10 #ifndef __PACKET_USB_H__ 11 #define __PACKET_USB_H__ 13 #include <epan/value_string.h> 14 #include <epan/wmem/wmem.h> 22 #define USB_ADDR_LEN (sizeof(usb_address_t)) 27 #define INTERFACE_PORT 0x80000000 34 USB_HEADER_LINUX_48_BYTES,
35 USB_HEADER_LINUX_64_BYTES,
42 #define USB_HEADER_IS_LINUX(type) \ 43 ((type) == USB_HEADER_LINUX_48_BYTES || (type) == USB_HEADER_LINUX_64_BYTES) 50 usb_header_t header_type;
77 usb_conv_info_t *interface_info;
82 enum usb_conv_class_data_type {USB_CONV_UNKNOWN = 0, USB_CONV_U3V, USB_CONV_AUDIO, USB_CONV_VIDEO, USB_CONV_MASS_STORAGE};
88 guint16 device_address;
92 guint32 device_protocol;
95 guint8 setup_requesttype;
97 guint16 interfaceClass;
98 guint16 interfaceSubclass;
99 guint16 interfaceProtocol;
102 guint16 deviceVendor;
103 guint32 deviceProduct;
108 enum usb_conv_class_data_type class_data_type;
116 guint8 transfer_type;
117 usb_conv_info_t *conv_info;
123 #define NO_ENDPOINT 0xffffffff 126 #define NO_ENDPOINT8 ((guint8)(NO_ENDPOINT& G_MAXUINT8)) 135 #define URB_SUBMIT 'S' 136 #define URB_COMPLETE 'C' 137 #define URB_ERROR 'E' 142 #define URB_ISOCHRONOUS 0x0 143 #define URB_INTERRUPT 0x1 144 #define URB_CONTROL 0x2 146 #define URB_UNKNOWN 0xFF 148 #define URB_TRANSFER_IN 0x80 152 #define IF_CLASS_DEVICE 0x00 153 #define IF_CLASS_AUDIO 0x01 154 #define IF_CLASS_COMMUNICATIONS 0x02 155 #define IF_CLASS_HID 0x03 156 #define IF_CLASS_PHYSICAL 0x05 157 #define IF_CLASS_IMAGE 0x06 158 #define IF_CLASS_PRINTER 0x07 159 #define IF_CLASS_MASS_STORAGE 0x08 160 #define IF_CLASS_HUB 0x09 161 #define IF_CLASS_CDC_DATA 0x0a 162 #define IF_CLASS_SMART_CARD 0x0b 163 #define IF_CLASS_CONTENT_SECURITY 0x0d 164 #define IF_CLASS_VIDEO 0x0e 165 #define IF_CLASS_PERSONAL_HEALTHCARE 0x0f 166 #define IF_CLASS_AUDIO_VIDEO 0x10 167 #define IF_CLASS_DIAGNOSTIC_DEVICE 0xdc 168 #define IF_CLASS_WIRELESS_CONTROLLER 0xe0 169 #define IF_CLASS_MISCELLANEOUS 0xef 170 #define IF_CLASS_APPLICATION_SPECIFIC 0xfe 171 #define IF_CLASS_VENDOR_SPECIFIC 0xff 173 #define IF_CLASS_UNKNOWN 0xffff 174 #define IF_SUBCLASS_UNKNOWN 0xffff 175 #define IF_PROTOCOL_UNKNOWN 0xffff 176 #define DEV_VENDOR_UNKNOWN 0x0000 177 #define DEV_PRODUCT_UNKNOWN 0xfffffff 179 #define IF_SUBCLASS_MISC_U3V 0x05 182 #define USB_DIR_OUT 0 183 #define USB_DIR_IN 0x80 185 #define USB_TYPE_MASK (0x03 << 5) 186 #define USB_TYPE(type) (((type) & USB_TYPE_MASK) >> 5) 187 #define RQT_SETUP_TYPE_STANDARD 0 188 #define RQT_SETUP_TYPE_CLASS 1 189 #define RQT_SETUP_TYPE_VENDOR 2 191 #define USB_RECIPIENT_MASK 0x1F 192 #define USB_RECIPIENT(type) ((type) & USB_RECIPIENT_MASK) 193 #define RQT_SETUP_RECIPIENT_DEVICE 0 194 #define RQT_SETUP_RECIPIENT_INTERFACE 1 195 #define RQT_SETUP_RECIPIENT_ENDPOINT 2 196 #define RQT_SETUP_RECIPIENT_OTHER 3 199 #define ENDPOINT_TYPE(ep_attrib) ((ep_attrib) & 0x03) 200 #define ENDPOINT_TYPE_CONTROL 0 201 #define ENDPOINT_TYPE_ISOCHRONOUS 1 202 #define ENDPOINT_TYPE_BULK 2 203 #define ENDPOINT_TYPE_INTERRUPT 3 206 #define USB_SETUP_GET_STATUS 0 207 #define USB_SETUP_CLEAR_FEATURE 1 208 #define USB_SETUP_SET_FEATURE 3 209 #define USB_SETUP_SET_ADDRESS 5 210 #define USB_SETUP_GET_DESCRIPTOR 6 211 #define USB_SETUP_SET_DESCRIPTOR 7 212 #define USB_SETUP_GET_CONFIGURATION 8 213 #define USB_SETUP_SET_CONFIGURATION 9 214 #define USB_SETUP_GET_INTERFACE 10 215 #define USB_SETUP_SET_INTERFACE 11 216 #define USB_SETUP_SYNCH_FRAME 12 217 #define USB_SETUP_SET_SEL 48 218 #define USB_SETUP_SET_ISOCH_DELAY 49 226 usb_conv_info_t *get_usb_iface_conv_info(
packet_info *pinfo, guint8 interface_num);
237 usb_conv_info_t *usb_conv_info);
242 usb_conv_info_t *usb_conv_info _U_);
248 usb_header_t header_type,
void *extra_data);
Definition: wmem_tree-int.h:47
Definition: packet_info.h:44
Definition: packet-usb.h:17
Definition: wmem_array.c:27
Definition: packet-usb.h:53
Definition: packet-usb.h:46
Definition: tvbuff-int.h:35
Definition: packet-usb.h:114
Definition: conversation.c:27
Definition: packet-usb.h:86
Definition: value_string.h:164