Go to the documentation of this file.
9 #ifndef __LINUX_USB_CDC_H
10 #define __LINUX_USB_CDC_H
12 #include <linux/types.h>
14 #define USB_CDC_SUBCLASS_ACM 0x02
15 #define USB_CDC_SUBCLASS_ETHERNET 0x06
16 #define USB_CDC_SUBCLASS_WHCM 0x08
17 #define USB_CDC_SUBCLASS_DMM 0x09
18 #define USB_CDC_SUBCLASS_MDLM 0x0a
19 #define USB_CDC_SUBCLASS_OBEX 0x0b
20 #define USB_CDC_SUBCLASS_EEM 0x0c
21 #define USB_CDC_SUBCLASS_NCM 0x0d
23 #define USB_CDC_PROTO_NONE 0
25 #define USB_CDC_ACM_PROTO_AT_V25TER 1
26 #define USB_CDC_ACM_PROTO_AT_PCCA101 2
27 #define USB_CDC_ACM_PROTO_AT_PCCA101_WAKE 3
28 #define USB_CDC_ACM_PROTO_AT_GSM 4
29 #define USB_CDC_ACM_PROTO_AT_3G 5
30 #define USB_CDC_ACM_PROTO_AT_CDMA 6
31 #define USB_CDC_ACM_PROTO_VENDOR 0xff
33 #define USB_CDC_PROTO_EEM 7
35 #define USB_CDC_NCM_PROTO_NTB 1
43 #define USB_CDC_HEADER_TYPE 0x00
44 #define USB_CDC_CALL_MANAGEMENT_TYPE 0x01
45 #define USB_CDC_ACM_TYPE 0x02
46 #define USB_CDC_UNION_TYPE 0x06
47 #define USB_CDC_COUNTRY_TYPE 0x07
48 #define USB_CDC_NETWORK_TERMINAL_TYPE 0x0a
49 #define USB_CDC_ETHERNET_TYPE 0x0f
50 #define USB_CDC_WHCM_TYPE 0x11
51 #define USB_CDC_MDLM_TYPE 0x12
52 #define USB_CDC_MDLM_DETAIL_TYPE 0x13
53 #define USB_CDC_DMM_TYPE 0x14
54 #define USB_CDC_OBEX_TYPE 0x15
55 #define USB_CDC_NCM_TYPE 0x1a
73 #define USB_CDC_CALL_MGMT_CAP_CALL_MGMT 0x01
74 #define USB_CDC_CALL_MGMT_CAP_DATA_INTF 0x02
90 #define USB_CDC_COMM_FEATURE 0x01
91 #define USB_CDC_CAP_LINE 0x02
92 #define USB_CDC_CAP_BRK 0x04
93 #define USB_CDC_CAP_NOTIFY 0x08
202 #define USB_CDC_SEND_ENCAPSULATED_COMMAND 0x00
203 #define USB_CDC_GET_ENCAPSULATED_RESPONSE 0x01
204 #define USB_CDC_REQ_SET_LINE_CODING 0x20
205 #define USB_CDC_REQ_GET_LINE_CODING 0x21
206 #define USB_CDC_REQ_SET_CONTROL_LINE_STATE 0x22
207 #define USB_CDC_REQ_SEND_BREAK 0x23
208 #define USB_CDC_SET_ETHERNET_MULTICAST_FILTERS 0x40
209 #define USB_CDC_SET_ETHERNET_PM_PATTERN_FILTER 0x41
210 #define USB_CDC_GET_ETHERNET_PM_PATTERN_FILTER 0x42
211 #define USB_CDC_SET_ETHERNET_PACKET_FILTER 0x43
212 #define USB_CDC_GET_ETHERNET_STATISTIC 0x44
213 #define USB_CDC_GET_NTB_PARAMETERS 0x80
214 #define USB_CDC_GET_NET_ADDRESS 0x81
215 #define USB_CDC_SET_NET_ADDRESS 0x82
216 #define USB_CDC_GET_NTB_FORMAT 0x83
217 #define USB_CDC_SET_NTB_FORMAT 0x84
218 #define USB_CDC_GET_NTB_INPUT_SIZE 0x85
219 #define USB_CDC_SET_NTB_INPUT_SIZE 0x86
220 #define USB_CDC_GET_MAX_DATAGRAM_SIZE 0x87
221 #define USB_CDC_SET_MAX_DATAGRAM_SIZE 0x88
222 #define USB_CDC_GET_CRC_MODE 0x89
223 #define USB_CDC_SET_CRC_MODE 0x8a
229 #define USB_CDC_1_STOP_BITS 0
230 #define USB_CDC_1_5_STOP_BITS 1
231 #define USB_CDC_2_STOP_BITS 2
234 #define USB_CDC_NO_PARITY 0
235 #define USB_CDC_ODD_PARITY 1
236 #define USB_CDC_EVEN_PARITY 2
237 #define USB_CDC_MARK_PARITY 3
238 #define USB_CDC_SPACE_PARITY 4
244 #define USB_CDC_PACKET_TYPE_PROMISCUOUS (1 << 0)
245 #define USB_CDC_PACKET_TYPE_ALL_MULTICAST (1 << 1)
246 #define USB_CDC_PACKET_TYPE_DIRECTED (1 << 2)
247 #define USB_CDC_PACKET_TYPE_BROADCAST (1 << 3)
248 #define USB_CDC_PACKET_TYPE_MULTICAST (1 << 4)
261 #define USB_CDC_NOTIFY_NETWORK_CONNECTION 0x00
262 #define USB_CDC_NOTIFY_RESPONSE_AVAILABLE 0x01
263 #define USB_CDC_NOTIFY_SERIAL_STATE 0x20
264 #define USB_CDC_NOTIFY_SPEED_CHANGE 0x2a
307 #define USB_CDC_NCM_NTH16_SIGN 0x484D434E
308 #define USB_CDC_NCM_NTH32_SIGN 0x686D636E
330 #define USB_CDC_NCM_NDP16_CRC_SIGN 0x314D434E
331 #define USB_CDC_NCM_NDP16_NOCRC_SIGN 0x304D434E
332 #define USB_CDC_NCM_NDP32_CRC_SIGN 0x316D636E
333 #define USB_CDC_NCM_NDP32_NOCRC_SIGN 0x306D636E
366 #define USB_CDC_NCM_NDP16_INDEX_MIN 0x000C
367 #define USB_CDC_NCM_NDP32_INDEX_MIN 0x0010
370 #define USB_CDC_NCM_DATAGRAM_FORMAT_CRC 0x30
371 #define USB_CDC_NCM_DATAGRAM_FORMAT_NOCRC 0X31
374 #define USB_CDC_NCM_PROTO_CODE_NO_ENCAP_COMMANDS 0x00
375 #define USB_CDC_NCM_PROTO_CODE_EXTERN_PROTO 0xFE
378 #define USB_CDC_NCM_NCAP_ETH_FILTER (1 << 0)
379 #define USB_CDC_NCM_NCAP_NET_ADDRESS (1 << 1)
380 #define USB_CDC_NCM_NCAP_ENCAP_COMMAND (1 << 2)
381 #define USB_CDC_NCM_NCAP_MAX_DATAGRAM_SIZE (1 << 3)
382 #define USB_CDC_NCM_NCAP_CRC_MODE (1 << 4)
383 #define USB_CDC_NCM_NCAP_NTB_INPUT_SIZE (1 << 5)
386 #define USB_CDC_NCM_NTB16_SUPPORTED (1 << 0)
387 #define USB_CDC_NCM_NTB32_SUPPORTED (1 << 1)
390 #define USB_CDC_NCM_NDP_ALIGN_MIN_SIZE 0x04
391 #define USB_CDC_NCM_NTB_MAX_LENGTH 0x1C
394 #define USB_CDC_NCM_NTB16_FORMAT 0x00
395 #define USB_CDC_NCM_NTB32_FORMAT 0x01
398 #define USB_CDC_NCM_NTB_MIN_IN_SIZE 2048
399 #define USB_CDC_NCM_NTB_MIN_OUT_SIZE 2048
409 #define USB_CDC_NCM_CRC_NOT_APPENDED 0x00
410 #define USB_CDC_NCM_CRC_APPENDED 0x01