VirtualBox

Changeset 6983 in vbox for trunk/include/VBox


Ignore:
Timestamp:
Feb 18, 2008 10:32:22 AM (17 years ago)
Author:
vboxsync
Message:

Removed VBOXGUEST_IOCTL_SIZE. Docs.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/VBoxGuest.h

    r6978 r6983  
    972972
    973973/** The VBGLBIGREQ::u32Magic value (Ryuu Murakami). */
    974 #define VBGLBIGREQ_MAGIC                            0x19520219
     974#define VBGLBIGREQ_MAGIC                        0x19520219
    975975
    976976
    977977#if defined(RT_OS_WINDOWS)
     978  /* legacy encoding. */
    978979# define IOCTL_CODE(DeviceType, Function, Method, Access, DataSize_ignored) \
    979980    ( ((DeviceType) << 16) | ((Access) << 14) | ((Function) << 2) | (Method))
    980981
    981982#elif defined(RT_OS_OS2)
    982 # define VBOXGUEST_IOCTL_CATEGORY                   0xc2
    983 # define VBOXGUEST_IOCTL_CODE(Function, Size)       ((unsigned char)(Function))
    984 # define VBOXGUEST_IOCTL_CATEGORY_FAST              0xc3 /**< Also defined in VBoxGuestA-os2.asm. */
    985 # define VBOXGUEST_IOCTL_CODE_FAST(Function)        ((unsigned char)(Function))
    986 # define VBOXGUEST_IOCTL_STRIP_SIZE(Function)       (Function)
     983  /* No automatic buffering, size not encoded. */
     984# define VBOXGUEST_IOCTL_CATEGORY               0xc2
     985# define VBOXGUEST_IOCTL_CODE(Function, Size)   ((unsigned char)(Function))
     986# define VBOXGUEST_IOCTL_CATEGORY_FAST          0xc3 /**< Also defined in VBoxGuestA-os2.asm. */
     987# define VBOXGUEST_IOCTL_CODE_FAST(Function)    ((unsigned char)(Function))
     988# define VBOXGUEST_IOCTL_STRIP_SIZE(Code)       (Code)
     989
     990#elif defined(RT_OS_SOLARIS)
     991  /* No automatic buffering, size limited to 255 bytes => use VBGLBIGREQ for everything. */
     992# include <sys/ioccom.h>
     993# define VBOXGUEST_IOCTL_CODE(Function, Size)   _IOWRN('V', (Function) | VBOXGUEST_IOCTL_FLAG, sizeof(VBGLBIGREQ))
     994# define VBOXGUEST_IOCTL_CODE_FAST(Function)    _IO(  'V', (Function) | VBOXGUEST_IOCTL_FLAG)
     995# define VBOXGUEST_IOCTL_STRIP_SIZE(Code)       (Code)
    987996
    988997#elif defined(RT_OS_LINUX)
     998  /* No automatic buffering, size limited to 16KB. */
    989999# include <linux/ioctl.h>
    990 /* Note that we can't use the Linux header _IOWR macro directly, as it expects
    991    a "type" argument, whereas we provide "sizeof(type)". */
    992 /* VBOXGUEST_IOCTL_CODE(Function, sizeof(type)) == _IOWR('V', (Function) | VBOXGUEST_IOCTL_FLAG, (type)) */
    9931000# define VBOXGUEST_IOCTL_CODE(Function, Size)   _IOC(_IOC_READ|_IOC_WRITE, 'V', (Function) | VBOXGUEST_IOCTL_FLAG, (Size))
    9941001# define VBOXGUEST_IOCTL_CODE_FAST(Function)    _IO(  'V', (Function) | VBOXGUEST_IOCTL_FLAG)
    9951002# define VBOXGUEST_IOCTL_STRIP_SIZE(Code)       VBOXGUEST_IOCTL_CODE(_IOC_NR((Code)), 0)
    996 # define VBOXGUEST_IOCTL_SIZE(Code)             (_IOC_SIZE((Code)))
    997 
    998 #elif defined(RT_OS_SOLARIS)
    999 # include <sys/ioccom.h>
    1000 # define VBOXGUEST_IOCTL_CODE(Function, Size)   _IOWRN('V', (Function) | VBOXGUEST_IOCTL_FLAG, sizeof(VBGLBIGREQ))
    1001 # define VBOXGUEST_IOCTL_CODE_FAST(Function)    _IO(  'V', (Function) | VBOXGUEST_IOCTL_FLAG)
    1002 # define VBOXGUEST_IOCTL_STRIP_SIZE(Function)   (Function)
    1003 
    1004 #elif 0 /* BSD style - needs some adjusting _IORW takes a type and not a size. */
     1003
     1004#elif 0 /* BSD style - needs some adjusting since _IORW takes a type and not a size. */
    10051005# include <sys/ioccom.h>
    10061006# define VBOXGUEST_IOCTL_CODE(Function, Size)   _IORW('V', (Function) | VBOXGUEST_IOCTL_FLAG, (Size))
    10071007# define VBOXGUEST_IOCTL_CODE_FAST(Function)    _IO(  'V', (Function) | VBOXGUEST_IOCTL_FLAG)
    1008 # define VBOXGUEST_IOCTL_STRIP_SIZE(Function)   ((Function) - IOCPARM_LEN((Function)))
     1008# define VBOXGUEST_IOCTL_STRIP_SIZE(Code)       IOCBASECMD(Code)
    10091009
    10101010#else
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette