-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathusbip.h
560 lines (491 loc) · 19.8 KB
/
usbip.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
/* ########################################################################
USBIP hardware emulation
########################################################################
Copyright (c) : 2016 Luis Claudio Gambôa Lopes
Copyright (c) : 2019 Oleg Moiseenko
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
For e-mail suggestions : [email protected]
######################################################################## */
#ifndef USBIP_H_
#define USBIP_H_
#define LINUX = __linux__
#ifdef LINUX
#include<sys/types.h>
#include<sys/socket.h>
#include<sys/un.h>
#include<netinet/in.h>
#include<arpa/inet.h>
#define min(a,b) ((a) < (b) ? (a) : (b))
#else
#include<winsock.h>
#endif
//system headers independent
#include<errno.h>
#include<stdarg.h>
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<unistd.h>
#include<stdint.h>
//defines
#define TCP_SERV_PORT 3240
typedef struct sockaddr sockaddr;
//USB definitions
#define byte uint8_t
#define word uint16_t
#define dword uint32_t
// USB Descriptors
#define USB_DESCRIPTOR_DEVICE 0x01 // Device Descriptor.
#define USB_DESCRIPTOR_CONFIGURATION 0x02 // Configuration Descriptor.
#define USB_DESCRIPTOR_STRING 0x03 // String Descriptor.
#define USB_DESCRIPTOR_INTERFACE 0x04 // Interface Descriptor.
#define USB_DESCRIPTOR_ENDPOINT 0x05 // Endpoint Descriptor.
#define USB_DESCRIPTOR_DEVICE_QUALIFIER 0x06 // Device Qualifier.
#define USB_DESCRIPTOR_ICC 0x21 // ICC descriptor.
typedef struct __attribute__ ((__packed__)) _USB_DEVICE_DESCRIPTOR
{
byte bLength; // Length of this descriptor.
byte bDescriptorType; // DEVICE descriptor type (USB_DESCRIPTOR_DEVICE).
word bcdUSB; // USB Spec Release Number (BCD).
byte bDeviceClass; // Class code (assigned by the USB-IF). 0xFF-Vendor specific.
byte bDeviceSubClass; // Subclass code (assigned by the USB-IF).
byte bDeviceProtocol; // Protocol code (assigned by the USB-IF). 0xFF-Vendor specific.
byte bMaxPacketSize0; // Maximum packet size for endpoint 0.
word idVendor; // Vendor ID (assigned by the USB-IF).
word idProduct; // Product ID (assigned by the manufacturer).
word bcdDevice; // Device release number (BCD).
byte iManufacturer; // Index of String Descriptor describing the manufacturer.
byte iProduct; // Index of String Descriptor describing the product.
byte iSerialNumber; // Index of String Descriptor with the device's serial number.
byte bNumConfigurations; // Number of possible configurations.
} USB_DEVICE_DESCRIPTOR;
typedef struct __attribute__ ((__packed__)) _USB_CONFIGURATION_DESCRIPTOR
{
byte bLength; // Length of this descriptor.
byte bDescriptorType; // CONFIGURATION descriptor type (USB_DESCRIPTOR_CONFIGURATION).
word wTotalLength; // Total length of all descriptors for this configuration.
byte bNumInterfaces; // Number of interfaces in this configuration.
byte bConfigurationValue; // Value of this configuration (1 based).
byte iConfiguration; // Index of String Descriptor describing the configuration.
byte bmAttributes; // Configuration characteristics.
byte bMaxPower; // Maximum power consumed by this configuration.
} USB_CONFIGURATION_DESCRIPTOR;
typedef struct __attribute__ ((__packed__)) _USB_INTERFACE_DESCRIPTOR
{
byte bLength; // Length of this descriptor.
byte bDescriptorType; // INTERFACE descriptor type (USB_DESCRIPTOR_INTERFACE).
byte bInterfaceNumber; // Number of this interface (0 based).
byte bAlternateSetting; // Value of this alternate interface setting.
byte bNumEndpoints; // Number of endpoints in this interface.
byte bInterfaceClass; // Class code (assigned by the USB-IF). 0xFF-Vendor specific.
byte bInterfaceSubClass; // Subclass code (assigned by the USB-IF).
byte bInterfaceProtocol; // Protocol code (assigned by the USB-IF). 0xFF-Vendor specific.
byte iInterface; // Index of String Descriptor describing the interface.
} USB_INTERFACE_DESCRIPTOR;
typedef struct __attribute__ ((__packed__)) _USB_ENDPOINT_DESCRIPTOR
{
byte bLength; // Length of this descriptor.
byte bDescriptorType; // ENDPOINT descriptor type (USB_DESCRIPTOR_ENDPOINT).
byte bEndpointAddress; // Endpoint address. Bit 7 indicates direction (0=OUT, 1=IN).
byte bmAttributes; // Endpoint transfer type.
word wMaxPacketSize; // Maximum packet size.
byte bInterval; // Polling interval in frames.
} USB_ENDPOINT_DESCRIPTOR;
typedef struct __attribute__ ((__packed__)) _USB_DEVICE_QUALIFIER_DESCRIPTOR
{
byte bLength; // Size of this descriptor
byte bType; // Type, always USB_DESCRIPTOR_DEVICE_QUALIFIER
word bcdUSB; // USB spec version, in BCD
byte bDeviceClass; // Device class code
byte bDeviceSubClass; // Device sub-class code
byte bDeviceProtocol; // Device protocol
byte bMaxPacketSize0; // EP0, max packet size
byte bNumConfigurations; // Number of "other-speed" configurations
byte bReserved; // Always zero (0)
} USB_DEVICE_QUALIFIER_DESCRIPTOR;
//=================================================================================
//Generic Configuration
//=================================================================================
typedef struct __attribute__ ((__packed__)) _CONFIG_GEN
{
USB_CONFIGURATION_DESCRIPTOR dev_conf;
USB_INTERFACE_DESCRIPTOR dev_int;
} CONFIG_GEN;
//=================================================================================
//HID
//=================================================================================
typedef struct __attribute__ ((__packed__)) _USB_HID_DESCRIPTOR
{
byte bLength;
byte bDescriptorType;
word bcdHID;
byte bCountryCode;
byte bNumDescriptors;
byte bRPDescriptorType;
word wRPDescriptorLength;
} USB_HID_DESCRIPTOR;
//Configuration
typedef struct __attribute__ ((__packed__)) _CONFIG_HID
{
USB_CONFIGURATION_DESCRIPTOR dev_conf;
USB_INTERFACE_DESCRIPTOR dev_int;
USB_HID_DESCRIPTOR dev_hid;
USB_ENDPOINT_DESCRIPTOR dev_ep;
} CONFIG_HID;
//=================================================================================
//CDC
/* Functional Descriptor Structure - See CDC Specification 1.1 for details */
//=================================================================================
/* Header Functional Descriptor */
typedef struct __attribute__ ((__packed__)) _USB_CDC_HEADER_FN_DSC
{
byte bFNLength;
byte bDscType;
byte bDscSubType;
word bcdCDC;
} USB_CDC_HEADER_FN_DSC;
/* Abstract Control Management Functional Descriptor */
typedef struct __attribute__ ((__packed__)) _USB_CDC_ACM_FN_DSC
{
byte bFNLength;
byte bDscType;
byte bDscSubType;
byte bmCapabilities;
} USB_CDC_ACM_FN_DSC;
/* Union Functional Descriptor */
typedef struct __attribute__ ((__packed__)) _USB_CDC_UNION_FN_DSC
{
byte bFNLength;
byte bDscType;
byte bDscSubType;
byte bMasterIntf;
byte bSaveIntf0;
} USB_CDC_UNION_FN_DSC;
/* Call Management Functional Descriptor */
typedef struct __attribute__ ((__packed__)) _USB_CDC_CALL_MGT_FN_DSC
{
byte bFNLength;
byte bDscType;
byte bDscSubType;
byte bmCapabilities;
byte bDataInterface;
} USB_CDC_CALL_MGT_FN_DSC;
//Configuration
typedef struct __attribute__ ((__packed__)) _CONFIG_CDC
{
USB_CONFIGURATION_DESCRIPTOR dev_conf0;
USB_INTERFACE_DESCRIPTOR dev_int0;
USB_CDC_HEADER_FN_DSC cdc_header;
USB_CDC_CALL_MGT_FN_DSC cdc_call_mgt;
USB_CDC_ACM_FN_DSC cdc_acm;
USB_CDC_UNION_FN_DSC cdc_union;
USB_ENDPOINT_DESCRIPTOR dev_ep0;
USB_INTERFACE_DESCRIPTOR dev_int1;
USB_ENDPOINT_DESCRIPTOR dev_ep1;
USB_ENDPOINT_DESCRIPTOR dev_ep2;
} CONFIG_CDC;
//=================================================================================
// CCID
//=================================================================================
#define CCID_IN_EP 0x84U /* EP1 for data IN */
#define CCID_OUT_EP 0x04U /* EP1 for data OUT */
#define CCID_CMD_EP 0x85U /* EP2 for CDC commands */
#define CCID_DATA_PACKET_SIZE 64
#define CCID_HEADER_SIZE 10
/*CCID specification version 1.10*/
#define CCID1_10 0x0110
#define SMART_CARD_DEVICE_CLASS 0x0B
/* Smart Card Device Class Descriptor Type */
#define CCID_DECRIPTOR_TYPE 0x21
/* Table 5.3-1 Summary of CCID Class Specific Request */
#define CCIDGENERICREQ_ABORT 0x01
#define CCIDGENERICREQ_GET_CLOCK_FREQUENCIES 0x02
#define CCIDGENERICREQ_GET_DATA_RATES 0x03
/* 6.1 Command Pipe, Bulk-OUT Messages */
#define PC_TO_RDR_ICCPOWERON 0x62
#define PC_TO_RDR_ICCPOWEROFF 0x63
#define PC_TO_RDR_GETSLOTSTATUS 0x65
#define PC_TO_RDR_XFRBLOCK 0x6F
#define PC_TO_RDR_GETPARAMETERS 0x6C
#define PC_TO_RDR_RESETPARAMETERS 0x6D
#define PC_TO_RDR_SETPARAMETERS 0x61
#define PC_TO_RDR_ESCAPE 0x6B
#define PC_TO_RDR_ICCCLOCK 0x6E
#define PC_TO_RDR_T0APDU 0x6A
#define PC_TO_RDR_SECURE 0x69
#define PC_TO_RDR_MECHANICAL 0x71
#define PC_TO_RDR_ABORT 0x72
#define PC_TO_RDR_SETDATARATEANDCLOCKFREQUENCY 0x73
/* 6.2 Response Pipe, Bulk-IN Messages */
#define RDR_TO_PC_DATABLOCK 0x80
#define RDR_TO_PC_SLOTSTATUS 0x81
#define RDR_TO_PC_PARAMETERS 0x82
#define RDR_TO_PC_ESCAPE 0x83
#define RDR_TO_PC_DATARATEANDCLOCKFREQUENCY 0x84
/* 6.3 Interrupt-IN Messages */
#define RDR_TO_PC_NOTIFYSLOTCHANGE 0x50
#define RDR_TO_PC_HARDWAREERROR 0x51
/* Command status for USB Bulk In Messages : bmCommandStatus */
#define BM_ICC_PRESENT_ACTIVE 0x00
#define BM_ICC_PRESENT_INACTIVE 0x01
#define BM_ICC_NO_ICC_PRESENT 0x02
#define BM_COMMAND_STATUS_OFFSET 0x06
#define BM_COMMAND_STATUS_NO_ERROR (0x00 << BM_COMMAND_STATUS_OFFSET)
#define BM_COMMAND_STATUS_FAILED (0x01 << BM_COMMAND_STATUS_OFFSET)
#define BM_COMMAND_STATUS_TIME_EXTN (0x02 << BM_COMMAND_STATUS_OFFSET)
/* ERROR CODES for USB Bulk In Messages : bError */
#define SLOT_NO_ERROR 0x81
#define SLOTERROR_UNKNOWN 0x82
/* Index of not supported / incorrect message parameter : 7Fh to 01h */
/* These Values are used for Return Types between Firmware Layers */
/*
Failure of a command
The CCID cannot parse one parameter or the ICC is not supporting one parameter.
Then the Slot Error register contains the index of the first bad parameter as a
positive number (1-127). For instance, if the CCID receives an ICC command to
an unimplemented slot, then the Slot Error register shall be set to
‘5’ (index of bSlot field). */
#define SLOTERROR_BAD_LENTGH 0x01
#define SLOTERROR_BAD_SLOT 0x05
#define SLOTERROR_BAD_POWERSELECT 0x07
#define SLOTERROR_BAD_PROTOCOLNUM 0x07
#define SLOTERROR_BAD_CLOCKCOMMAND 0x07
#define SLOTERROR_BAD_ABRFU_3B 0x07
#define SLOTERROR_BAD_BMCHANGES 0x07
#define SLOTERROR_BAD_BFUNCTION_MECHANICAL 0x07
#define SLOTERROR_BAD_ABRFU_2B 0x08
#define SLOTERROR_BAD_LEVELPARAMETER 0x08
#define SLOTERROR_BAD_FIDI 0x0A
#define SLOTERROR_BAD_T01CONVCHECKSUM 0x0B
#define SLOTERROR_BAD_GUARDTIME 0x0C
#define SLOTERROR_BAD_WAITINGINTEGER 0x0D
#define SLOTERROR_BAD_CLOCKSTOP 0x0E
#define SLOTERROR_BAD_IFSC 0x0F
#define SLOTERROR_BAD_NAD 0x10
#define SLOTERROR_BAD_DWLENGTH 0x08 /* Used in PC_to_RDR_XfrBlock*/
/* Table 6.2-2 Slot error register when bmCommandStatus = 1 (BM_COMMAND_STATUS_FAILED) */
#define SLOTERROR_CMD_ABORTED 0xFF
#define SLOTERROR_ICC_MUTE 0xFE
#define SLOTERROR_XFR_PARITY_ERROR 0xFD
#define SLOTERROR_XFR_OVERRUN 0xFC
#define SLOTERROR_HW_ERROR 0xFB
#define SLOTERROR_BAD_ATR_TS 0xF8
#define SLOTERROR_BAD_ATR_TCK 0xF7
#define SLOTERROR_ICC_PROTOCOL_NOT_SUPPORTED 0xF6
#define SLOTERROR_ICC_CLASS_NOT_SUPPORTED 0xF5
#define SLOTERROR_PROCEDURE_BYTE_CONFLICT 0xF4
#define SLOTERROR_DEACTIVATED_PROTOCOL 0xF3
#define SLOTERROR_BUSY_WITH_AUTO_SEQUENCE 0xF2
#define SLOTERROR_PIN_TIMEOUT 0xF0
#define SLOTERROR_PIN_CANCELLED 0xEF
#define SLOTERROR_CMD_SLOT_BUSY 0xE0
#define SLOTERROR_CMD_NOT_SUPPORTED 0x00
/* CCID rev 1.1, p.27 */
#define VOLTS_AUTO 0x00
#define VOLTS_5_0 0x01
#define VOLTS_3_0 0x02
#define VOLTS_1_8 0x03
/* 6.3.1 RDR_to_PC_NotifySlotChange */
#define ICC_NOT_PRESENT 0x00
#define ICC_PRESENT 0x01
#define ICC_CHANGE 0x02
#define ICC_INSERTED_EVENT (ICC_PRESENT+ICC_CHANGE)
typedef struct __attribute__ ((__packed__)) _USB_ICC_DESCRIPTOR
{
byte bFNLength;
byte bDscType;
word bcdCCID;
byte bMaxSlotIndex;
byte bVoltageSupport;
dword dwProtocols;
dword dwDefaultClock;
dword dwMaximumClock;
byte bNumClockSupported;
dword dwDataRate;
dword dwMaxDataRate;
byte bNumDataRateSupported;
dword dwMaxIFSD;
dword dwSynchProtocols;
dword dwMechanical;
dword dwFeatures;
dword dwMaxCCIDMessageLength;
byte bClassGetResponse;
byte bClassEnvelope;
word wLCDLayout;
byte bPinSupport;
byte bMaxCCIDBusySlots;
} USB_ICC_DESCRIPTOR;
//Configuration
typedef struct __attribute__ ((__packed__)) _CONFIG_CCID
{
USB_CONFIGURATION_DESCRIPTOR dev_conf0;
USB_INTERFACE_DESCRIPTOR dev_int0;
USB_ICC_DESCRIPTOR icc_desc0;
USB_ENDPOINT_DESCRIPTOR dev_ep0;
USB_ENDPOINT_DESCRIPTOR dev_ep1;
USB_ENDPOINT_DESCRIPTOR dev_ep2;
} CONFIG_CCID;
//=================================================================================
//USBIP data struct
typedef struct __attribute__ ((__packed__)) _OP_REQ_DEVLIST
{
word version;
word command;
int status;
} OP_REQ_DEVLIST;
typedef struct __attribute__ ((__packed__)) _OP_REP_DEVLIST_HEADER
{
word version;
word command;
int status;
int nExportedDevice;
}OP_REP_DEVLIST_HEADER;
//================= for each device
typedef struct __attribute__ ((__packed__)) _OP_REP_DEVLIST_DEVICE
{
char usbPath[256];
char busID[32];
int busnum;
int devnum;
int speed;
word idVendor;
word idProduct;
word bcdDevice;
byte bDeviceClass;
byte bDeviceSubClass;
byte bDeviceProtocol;
byte bConfigurationValue;
byte bNumConfigurations;
byte bNumInterfaces;
}OP_REP_DEVLIST_DEVICE;
//================== for each interface
typedef struct __attribute__ ((__packed__)) _OP_REP_DEVLIST_INTERFACE
{
byte bInterfaceClass;
byte bInterfaceSubClass;
byte bInterfaceProtocol;
byte padding;
}OP_REP_DEVLIST_INTERFACE;
typedef struct __attribute__ ((__packed__)) _OP_REP_DEVLIST
{
OP_REP_DEVLIST_HEADER header;
OP_REP_DEVLIST_DEVICE device; //only one!
OP_REP_DEVLIST_INTERFACE *interfaces;
}OP_REP_DEVLIST;
typedef struct __attribute__ ((__packed__)) _OP_REQ_IMPORT
{
word version;
word command;
int status;
char busID[32];
}OP_REQ_IMPORT;
typedef struct __attribute__ ((__packed__)) _OP_REP_IMPORT
{
word version;
word command;
int status;
//------------- if not ok, finish here
char usbPath[256];
char busID[32];
int busnum;
int devnum;
int speed;
word idVendor;
word idProduct;
word bcdDevice;
byte bDeviceClass;
byte bDeviceSubClass;
byte bDeviceProtocol;
byte bConfigurationValue;
byte bNumConfigurations;
byte bNumInterfaces;
}OP_REP_IMPORT;
typedef struct __attribute__ ((__packed__)) _USBIP_CMD_SUBMIT
{
int command;
int seqnum;
int devid;
int direction;
int ep;
int transfer_flags;
int transfer_buffer_length;
int start_frame;
int number_of_packets;
int interval;
long long setup;
}USBIP_CMD_SUBMIT;
/*
+ Allowed transfer_flags | value | control | interrupt | bulk | isochronous
+ -------------------------+------------+---------+-----------+----------+-------------
+ URB_SHORT_NOT_OK | 0x00000001 | only in | only in | only in | no
+ URB_ISO_ASAP | 0x00000002 | no | no | no | yes
+ URB_NO_TRANSFER_DMA_MAP | 0x00000004 | yes | yes | yes | yes
+ URB_NO_FSBR | 0x00000020 | yes | no | no | no
+ URB_ZERO_PACKET | 0x00000040 | no | no | only out | no
+ URB_NO_INTERRUPT | 0x00000080 | yes | yes | yes | yes
+ URB_FREE_BUFFER | 0x00000100 | yes | yes | yes | yes
+ URB_DIR_MASK | 0x00000200 | yes | yes | yes | yes
*/
typedef struct __attribute__ ((__packed__)) _USBIP_RET_SUBMIT
{
int command;
int seqnum;
int devid;
int direction;
int ep;
int status;
int actual_length;
int start_frame;
int number_of_packets;
int error_count;
long long setup;
}USBIP_RET_SUBMIT;
typedef struct __attribute__ ((__packed__)) _USBIP_CMD_UNLINK
{
int command;
int seqnum;
int devid;
int direction;
int ep;
int seqnum_urb;
}USBIP_CMD_UNLINK;
typedef struct __attribute__ ((__packed__)) _USBIP_RET_UNLINK
{
int command;
int seqnum;
int devid;
int direction;
int ep;
int status;
}USBIP_RET_UNLINK;
typedef struct __attribute__ ((__packed__)) _StandardDeviceRequest
{
byte bmRequestType;
byte bRequest;
byte wValue0;
byte wValue1;
byte wIndex0;
byte wIndex1;
word wLength;
}StandardDeviceRequest;
void send_usb_req(int sockfd, USBIP_RET_SUBMIT * usb_req, char * data, unsigned int size, unsigned int status);
void usbip_run (const USB_DEVICE_DESCRIPTOR *dev_dsc);
//implemented by user
extern const USB_DEVICE_DESCRIPTOR dev_dsc;
extern const USB_DEVICE_QUALIFIER_DESCRIPTOR dev_qua;
extern const char * configuration;
extern const USB_INTERFACE_DESCRIPTOR *interfaces[];
extern const unsigned char *strings[];
void handle_data(int sockfd, USBIP_RET_SUBMIT *usb_req, int bl);
void handle_unknown_control(int sockfd, StandardDeviceRequest * control_req, USBIP_RET_SUBMIT *usb_req);
#endif /* USBIP_H_ */