25
25
#define IOCTL_INTERNAL_USB_CYCLE_PORT 0x0022001F
26
26
#define IOCTL_INTERNAL_USB_SUBMIT_IDLE_NOTIFICATION 0x00220027
28
#define URB_FUNCTION_SELECT_CONFIGURATION 0x0000
29
#define URB_FUNCTION_SELECT_INTERFACE 0x0001
30
#define URB_FUNCTION_ABORT_PIPE 0x0002
31
#define URB_FUNCTION_TAKE_FRAME_LENGTH_CONTROL 0x0003
32
#define URB_FUNCTION_RELEASE_FRAME_LENGTH_CONTROL 0x0004
33
#define URB_FUNCTION_GET_FRAME_LENGTH 0x0005
34
#define URB_FUNCTION_SET_FRAME_LENGTH 0x0006
35
#define URB_FUNCTION_GET_CURRENT_FRAME_NUMBER 0x0007
36
#define URB_FUNCTION_CONTROL_TRANSFER 0x0008
37
#define URB_FUNCTION_BULK_OR_INTERRUPT_TRANSFER 0x0009
38
#define URB_FUNCTION_ISOCH_TRANSFER 0x000A
39
#define URB_FUNCTION_GET_DESCRIPTOR_FROM_DEVICE 0x000B
40
#define URB_FUNCTION_SET_DESCRIPTOR_TO_DEVICE 0x000C
41
#define URB_FUNCTION_SET_FEATURE_TO_DEVICE 0x000D
42
#define URB_FUNCTION_SET_FEATURE_TO_INTERFACE 0x000E
43
#define URB_FUNCTION_SET_FEATURE_TO_ENDPOINT 0x000F
44
#define URB_FUNCTION_CLEAR_FEATURE_TO_DEVICE 0x0010
45
#define URB_FUNCTION_CLEAR_FEATURE_TO_INTERFACE 0x0011
46
#define URB_FUNCTION_CLEAR_FEATURE_TO_ENDPOINT 0x0012
47
#define URB_FUNCTION_GET_STATUS_FROM_DEVICE 0x0013
48
#define URB_FUNCTION_GET_STATUS_FROM_INTERFACE 0x0014
49
#define URB_FUNCTION_GET_STATUS_FROM_ENDPOINT 0x0015
50
#define URB_FUNCTION_RESERVED_0X0016 0x0016
51
#define URB_FUNCTION_VENDOR_DEVICE 0x0017
52
#define URB_FUNCTION_VENDOR_INTERFACE 0x0018
53
#define URB_FUNCTION_VENDOR_ENDPOINT 0x0019
54
#define URB_FUNCTION_CLASS_DEVICE 0x001A
55
#define URB_FUNCTION_CLASS_INTERFACE 0x001B
56
#define URB_FUNCTION_CLASS_ENDPOINT 0x001C
57
#define URB_FUNCTION_RESERVE_0X001D 0x001D
58
#define URB_FUNCTION_SYNC_RESET_PIPE_AND_CLEAR_STALL 0x001E
59
#define URB_FUNCTION_CLASS_OTHER 0x001F
60
#define URB_FUNCTION_VENDOR_OTHER 0x0020
61
#define URB_FUNCTION_GET_STATUS_FROM_OTHER 0x0021
62
#define URB_FUNCTION_CLEAR_FEATURE_TO_OTHER 0x0022
63
#define URB_FUNCTION_SET_FEATURE_TO_OTHER 0x0023
64
#define URB_FUNCTION_GET_DESCRIPTOR_FROM_ENDPOINT 0x0024
65
#define URB_FUNCTION_SET_DESCRIPTOR_TO_ENDPOINT 0x0025
66
#define URB_FUNCTION_GET_CONFIGURATION 0x0026
67
#define URB_FUNCTION_GET_INTERFACE 0x0027
68
#define URB_FUNCTION_GET_DESCRIPTOR_FROM_INTERFACE 0x0028
69
#define URB_FUNCTION_SET_DESCRIPTOR_TO_INTERFACE 0x0029
70
#define URB_FUNCTION_GET_MS_FEATURE_DESCRIPTOR 0x002A
71
#define URB_FUNCTION_RESERVE_0X002B 0x002B
72
#define URB_FUNCTION_RESERVE_0X002C 0x002C
73
#define URB_FUNCTION_RESERVE_0X002D 0x002D
74
#define URB_FUNCTION_RESERVE_0X002E 0x002E
75
#define URB_FUNCTION_RESERVE_0X002F 0x002F
28
#define URB_FUNCTION_SELECT_CONFIGURATION 0x0000
29
#define URB_FUNCTION_SELECT_INTERFACE 0x0001
30
#define URB_FUNCTION_ABORT_PIPE 0x0002
31
#define URB_FUNCTION_TAKE_FRAME_LENGTH_CONTROL 0x0003
32
#define URB_FUNCTION_RELEASE_FRAME_LENGTH_CONTROL 0x0004
33
#define URB_FUNCTION_GET_FRAME_LENGTH 0x0005
34
#define URB_FUNCTION_SET_FRAME_LENGTH 0x0006
35
#define URB_FUNCTION_GET_CURRENT_FRAME_NUMBER 0x0007
36
#define URB_FUNCTION_CONTROL_TRANSFER 0x0008
37
#define URB_FUNCTION_BULK_OR_INTERRUPT_TRANSFER 0x0009
38
#define URB_FUNCTION_ISOCH_TRANSFER 0x000A
39
#define URB_FUNCTION_GET_DESCRIPTOR_FROM_DEVICE 0x000B
40
#define URB_FUNCTION_SET_DESCRIPTOR_TO_DEVICE 0x000C
41
#define URB_FUNCTION_SET_FEATURE_TO_DEVICE 0x000D
42
#define URB_FUNCTION_SET_FEATURE_TO_INTERFACE 0x000E
43
#define URB_FUNCTION_SET_FEATURE_TO_ENDPOINT 0x000F
44
#define URB_FUNCTION_CLEAR_FEATURE_TO_DEVICE 0x0010
45
#define URB_FUNCTION_CLEAR_FEATURE_TO_INTERFACE 0x0011
46
#define URB_FUNCTION_CLEAR_FEATURE_TO_ENDPOINT 0x0012
47
#define URB_FUNCTION_GET_STATUS_FROM_DEVICE 0x0013
48
#define URB_FUNCTION_GET_STATUS_FROM_INTERFACE 0x0014
49
#define URB_FUNCTION_GET_STATUS_FROM_ENDPOINT 0x0015
50
#define URB_FUNCTION_RESERVED_0X0016 0x0016
51
#define URB_FUNCTION_VENDOR_DEVICE 0x0017
52
#define URB_FUNCTION_VENDOR_INTERFACE 0x0018
53
#define URB_FUNCTION_VENDOR_ENDPOINT 0x0019
54
#define URB_FUNCTION_CLASS_DEVICE 0x001A
55
#define URB_FUNCTION_CLASS_INTERFACE 0x001B
56
#define URB_FUNCTION_CLASS_ENDPOINT 0x001C
57
#define URB_FUNCTION_RESERVE_0X001D 0x001D
58
#define URB_FUNCTION_SYNC_RESET_PIPE_AND_CLEAR_STALL 0x001E
59
#define URB_FUNCTION_CLASS_OTHER 0x001F
60
#define URB_FUNCTION_VENDOR_OTHER 0x0020
61
#define URB_FUNCTION_GET_STATUS_FROM_OTHER 0x0021
62
#define URB_FUNCTION_CLEAR_FEATURE_TO_OTHER 0x0022
63
#define URB_FUNCTION_SET_FEATURE_TO_OTHER 0x0023
64
#define URB_FUNCTION_GET_DESCRIPTOR_FROM_ENDPOINT 0x0024
65
#define URB_FUNCTION_SET_DESCRIPTOR_TO_ENDPOINT 0x0025
66
#define URB_FUNCTION_GET_CONFIGURATION 0x0026
67
#define URB_FUNCTION_GET_INTERFACE 0x0027
68
#define URB_FUNCTION_GET_DESCRIPTOR_FROM_INTERFACE 0x0028
69
#define URB_FUNCTION_SET_DESCRIPTOR_TO_INTERFACE 0x0029
70
#define URB_FUNCTION_GET_MS_FEATURE_DESCRIPTOR 0x002A
71
#define URB_FUNCTION_RESERVE_0X002B 0x002B
72
#define URB_FUNCTION_RESERVE_0X002C 0x002C
73
#define URB_FUNCTION_RESERVE_0X002D 0x002D
74
#define URB_FUNCTION_RESERVE_0X002E 0x002E
75
#define URB_FUNCTION_RESERVE_0X002F 0x002F
76
76
// USB 2.0 calls start at 0x0030
77
#define URB_FUNCTION_SYNC_RESET_PIPE 0x0030
78
#define URB_FUNCTION_SYNC_CLEAR_STALL 0x0031
79
#define URB_FUNCTION_CONTROL_TRANSFER_EX 0x0032
77
#define URB_FUNCTION_SYNC_RESET_PIPE 0x0030
78
#define URB_FUNCTION_SYNC_CLEAR_STALL 0x0031
79
#define URB_FUNCTION_CONTROL_TRANSFER_EX 0x0032
81
81
#define USBD_PF_CHANGE_MAX_PACKET 0x00000001
357
354
NTSTATUS wrap_submit_irp(struct device_object *pdo, struct irp *irp);
358
355
void wrap_suspend_urbs(struct wrap_device *wd);
359
356
void wrap_resume_urbs(struct wrap_device *wd);
361
void USBD_InterfaceGetUSBDIVersion(void *context,
362
struct usbd_version_info *version_info,
363
ULONG *hcd_capa) wstdcall;
364
WIN_FUNC_DECL(USBD_InterfaceGetUSBDIVersion, 3);
365
BOOLEAN USBD_InterfaceIsDeviceHighSpeed(void *context) wstdcall;
366
WIN_FUNC_DECL(USBD_InterfaceIsDeviceHighSpeed, 1);
367
void USBD_InterfaceReference(void *context) wstdcall;
368
WIN_FUNC_DECL(USBD_InterfaceReference, 1);
369
void USBD_InterfaceDereference(void *context) wstdcall;
370
WIN_FUNC_DECL(USBD_InterfaceDereference, 1);
371
NTSTATUS USBD_InterfaceQueryBusTime(void *context, ULONG *frame) wstdcall;
372
WIN_FUNC_DECL(USBD_InterfaceQueryBusTime, 2);
373
NTSTATUS USBD_InterfaceSubmitIsoOutUrb(void *context,
374
union nt_urb *nt_urb) wstdcall;
375
WIN_FUNC_DECL(USBD_InterfaceSubmitIsoOutUrb, 2);
376
NTSTATUS USBD_InterfaceQueryBusInformation(void *context, ULONG level, void *buf,
378
ULONG *buf_actual_length) wstdcall;
379
WIN_FUNC_DECL(USBD_InterfaceQueryBusInformation, 5);
380
NTSTATUS USBD_InterfaceLogEntry(void *context, ULONG driver_tag, ULONG enum_tag,
381
ULONG p1, ULONG p2) wstdcall;
382
WIN_FUNC_DECL(USBD_InterfaceLogEntry, 5);
357
NTSTATUS usb_query_interface(struct wrap_device *wd,
358
struct io_stack_location *irp_sl);
384
360
#endif /* USB_H */