Changeset 6983 in vbox for trunk/include/VBox
- Timestamp:
- Feb 18, 2008 10:32:22 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/VBoxGuest.h
r6978 r6983 972 972 973 973 /** The VBGLBIGREQ::u32Magic value (Ryuu Murakami). */ 974 #define VBGLBIGREQ_MAGIC 974 #define VBGLBIGREQ_MAGIC 0x19520219 975 975 976 976 977 977 #if defined(RT_OS_WINDOWS) 978 /* legacy encoding. */ 978 979 # define IOCTL_CODE(DeviceType, Function, Method, Access, DataSize_ignored) \ 979 980 ( ((DeviceType) << 16) | ((Access) << 14) | ((Function) << 2) | (Method)) 980 981 981 982 #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) 987 996 988 997 #elif defined(RT_OS_LINUX) 998 /* No automatic buffering, size limited to 16KB. */ 989 999 # include <linux/ioctl.h> 990 /* Note that we can't use the Linux header _IOWR macro directly, as it expects991 a "type" argument, whereas we provide "sizeof(type)". */992 /* VBOXGUEST_IOCTL_CODE(Function, sizeof(type)) == _IOWR('V', (Function) | VBOXGUEST_IOCTL_FLAG, (type)) */993 1000 # define VBOXGUEST_IOCTL_CODE(Function, Size) _IOC(_IOC_READ|_IOC_WRITE, 'V', (Function) | VBOXGUEST_IOCTL_FLAG, (Size)) 994 1001 # define VBOXGUEST_IOCTL_CODE_FAST(Function) _IO( 'V', (Function) | VBOXGUEST_IOCTL_FLAG) 995 1002 # 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. */ 1005 1005 # include <sys/ioccom.h> 1006 1006 # define VBOXGUEST_IOCTL_CODE(Function, Size) _IORW('V', (Function) | VBOXGUEST_IOCTL_FLAG, (Size)) 1007 1007 # 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) 1009 1009 1010 1010 #else
Note:
See TracChangeset
for help on using the changeset viewer.