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
//! USB constant tables shared across the USB device protocols
//!
//! These are the USB specification values that `descriptors.rs` and the
//! individual device implementations build their descriptors and control
//! request handling from.
//!
//! The module is compiled under the `usb-common` feature, which every USB
//! device protocol (`usb-keyboard`, `usb-mouse`, `usb-serial`, `usb-msc`,
//! `usb-fido2`, `usb-smartcard`) enables. USB/IP framing - opcodes, protocol
//! version, device paths, connection state - is the `usbip` crate's job and
//! deliberately has no counterpart here.
/// USB device class codes
/// USB descriptor types
/// USB standard requests (bmRequestType)
/// USB standard request codes (bRequest)
/// HID-specific request codes
/// CDC-specific request codes.
///
/// This carried a note saying `usb-serial` "does not implement CDC class control
/// requests yet", which stopped being true some time ago and is worth correcting
/// rather than leaving: `UsbCdcAcmSerialHandler::handle_control`
/// (`src/server/usb/serial/handler.rs`) matches on these constants and answers
/// SET_LINE_CODING, GET_LINE_CODING, SET_CONTROL_LINE_STATE and SEND_BREAK
/// itself. `SEND_ENCAPSULATED_COMMAND` and `GET_ENCAPSULATED_RESPONSE` fall
/// through to the catch-all, which answers empty on purpose — an error would
/// abort the USB/IP session for the whole device, and a host probing an optional
/// request must not unplug the port.
/// Endpoint transfer types