Changeset 15810 in vbox
- Timestamp:
- Jan 5, 2009 3:52:31 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/VBoxGuest.h
r15706 r15810 1242 1242 # define IOCTL_CODE(DeviceType, Function, Method, Access, DataSize_ignored) \ 1243 1243 ( ((DeviceType) << 16) | ((Access) << 14) | ((Function) << 2) | (Method)) 1244 # define VBOXGUEST_IOCTL_CODE (Function, Size)IOCTL_CODE(FILE_DEVICE_UNKNOWN, 2048 + (Function), METHOD_BUFFERED, FILE_WRITE_ACCESS, 0)1245 # define VBOXGUEST_IOCTL_STRIP_SIZE (Code)(Code)1244 # define VBOXGUEST_IOCTL_CODE_(Function, Size) IOCTL_CODE(FILE_DEVICE_UNKNOWN, 2048 + (Function), METHOD_BUFFERED, FILE_WRITE_ACCESS, 0) 1245 # define VBOXGUEST_IOCTL_STRIP_SIZE_(Code) (Code) 1246 1246 1247 1247 #elif defined(RT_OS_OS2) 1248 1248 /* No automatic buffering, size not encoded. */ 1249 1249 # define VBOXGUEST_IOCTL_CATEGORY 0xc2 1250 # define VBOXGUEST_IOCTL_CODE (Function, Size)((unsigned char)(Function))1250 # define VBOXGUEST_IOCTL_CODE_(Function, Size) ((unsigned char)(Function)) 1251 1251 # define VBOXGUEST_IOCTL_CATEGORY_FAST 0xc3 /**< Also defined in VBoxGuestA-os2.asm. */ 1252 # define VBOXGUEST_IOCTL_CODE_FAST (Function)((unsigned char)(Function))1252 # define VBOXGUEST_IOCTL_CODE_FAST_(Function) ((unsigned char)(Function)) 1253 1253 # define VBOXGUEST_IOCTL_STRIP_SIZE(Code) (Code) 1254 1254 … … 1256 1256 /* No automatic buffering, size limited to 255 bytes => use VBGLBIGREQ for everything. */ 1257 1257 # include <sys/ioccom.h> 1258 # define VBOXGUEST_IOCTL_CODE (Function, Size) _IOWRN('V', (Function) | VBOXGUEST_IOCTL_FLAG, sizeof(VBGLBIGREQ))1259 # define VBOXGUEST_IOCTL_CODE_FAST (Function) _IO( 'V', (Function) | VBOXGUEST_IOCTL_FLAG)1258 # define VBOXGUEST_IOCTL_CODE_(Function, Size) _IOWRN('V', (Function), sizeof(VBGLBIGREQ)) 1259 # define VBOXGUEST_IOCTL_CODE_FAST_(Function) _IO( 'V', (Function)) 1260 1260 # define VBOXGUEST_IOCTL_STRIP_SIZE(Code) (Code) 1261 1261 … … 1263 1263 /* No automatic buffering, size limited to 16KB. */ 1264 1264 # include <linux/ioctl.h> 1265 # define VBOXGUEST_IOCTL_CODE (Function, Size) _IOC(_IOC_READ|_IOC_WRITE, 'V', (Function) | VBOXGUEST_IOCTL_FLAG, (Size))1266 # define VBOXGUEST_IOCTL_CODE_FAST (Function) _IO( 'V', (Function) | VBOXGUEST_IOCTL_FLAG)1267 # define VBOXGUEST_IOCTL_STRIP_SIZE(Code) VBOXGUEST_IOCTL_CODE (_IOC_NR((Code)), 0)1265 # define VBOXGUEST_IOCTL_CODE_(Function, Size) _IOC(_IOC_READ|_IOC_WRITE, 'V', (Function), (Size)) 1266 # define VBOXGUEST_IOCTL_CODE_FAST_(Function) _IO( 'V', (Function)) 1267 # define VBOXGUEST_IOCTL_STRIP_SIZE(Code) VBOXGUEST_IOCTL_CODE_(_IOC_NR((Code)), 0) 1268 1268 1269 1269 #elif defined(RT_OS_FREEBSD) /** @todo r=bird: Please do it like SUPDRVIOC to keep it as similar as possible. */ 1270 1270 # include <sys/ioccom.h> 1271 1271 1272 # define VBOXGUEST_IOCTL_CODE (Function, Size) _IOWR('V', (Function) | VBOXGUEST_IOCTL_FLAG, VBGLBIGREQ)1273 # define VBOXGUEST_IOCTL_CODE_FAST (Function) _IO( 'V', (Function) | VBOXGUEST_IOCTL_FLAG)1272 # define VBOXGUEST_IOCTL_CODE_(Function, Size) _IOWR('V', (Function), VBGLBIGREQ) 1273 # define VBOXGUEST_IOCTL_CODE_FAST_(Function) _IO( 'V', (Function)) 1274 1274 # define VBOXGUEST_IOCTL_STRIP_SIZE(Code) IOCBASECMD(Code) 1275 1275 … … 1277 1277 /* PORTME */ 1278 1278 #endif 1279 1280 #define VBOXGUEST_IOCTL_CODE(Function, Size) VBOXGUEST_IOCTL_CODE_((Function) | VBOXGUEST_IOCTL_FLAG, Size) 1281 #define VBOXGUEST_IOCTL_CODE_FAST(Function) VBOXGUEST_IOCTL_CODE_FAST_((Function) | VBOXGUEST_IOCTL_FLAG) 1282 1283 /* Define 32 bit codes to support 32 bit applications requests in the 64 bit guest driver. */ 1284 #ifdef RT_ARCH_AMD64 1285 # define VBOXGUEST_IOCTL_CODE_32(Function, Size) VBOXGUEST_IOCTL_CODE_(Function, Size) 1286 # define VBOXGUEST_IOCTL_CODE_FAST_32(Function) VBOXGUEST_IOCTL_CODE_FAST_(Function) 1287 #endif /* RT_ARCH_AMD64 */ 1279 1288 1280 1289 /** IOCTL to VBoxGuest to query the VMMDev IO port region start. */ … … 1387 1396 # define VBOXGUEST_IOCTL_HGCM_CALL_TIMED(Size) VBOXGUEST_IOCTL_CODE(20, (Size)) 1388 1397 # define VBOXGUEST_IOCTL_CLIPBOARD_CONNECT VBOXGUEST_IOCTL_CODE(19, sizeof(uint32_t)) 1389 1390 # ifdef VBOX_WITH_64_BITS_GUESTS 1391 # ifndef VBOX_HGCM_HOST_CODE1392 # define VBOXGUEST_IOCTL_HGCM_CALL_32(Size) VBOXGUEST_IOCTL_CODE(18, (Size))1393 # endif /* !VBOX_HGCM_HOST_CODE */1394 # endif /* VBOX_WITH_64_BITS_GUESTS*/1398 #ifdef RT_ARCH_AMD64 1399 /* Following HGCM IOCtls can be used by a 32 bit application on a 64 bit guest (Windows OpenGL guest driver). */ 1400 # define VBOXGUEST_IOCTL_HGCM_CONNECT_32 VBOXGUEST_IOCTL_CODE_32(16, sizeof(VBoxGuestHGCMConnectInfo)) 1401 # define VBOXGUEST_IOCTL_HGCM_DISCONNECT_32 VBOXGUEST_IOCTL_CODE_32(17, sizeof(VBoxGuestHGCMDisconnectInfo)) 1402 # define VBOXGUEST_IOCTL_HGCM_CALL_32(Size) VBOXGUEST_IOCTL_CODE_32(18, (Size)) 1403 #endif /* RT_ARCH_AMD64 */ 1395 1404 1396 1405 # define VBOXGUEST_HGCM_CALL_PARMS(a) ((HGCMFunctionParameter *)((uint8_t *)(a) + sizeof (VBoxGuestHGCMCallInfo)))
Note:
See TracChangeset
for help on using the changeset viewer.