]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS-Labs/Demo/FreeRTOS_Plus_TCP_and_FAT_Windows_Simulator/WinPCap/pcap/usb.h
Add the Labs projects provided in the V10.2.1_191129 zip file.
[freertos] / FreeRTOS-Labs / Demo / FreeRTOS_Plus_TCP_and_FAT_Windows_Simulator / WinPCap / pcap / usb.h
diff --git a/FreeRTOS-Labs/Demo/FreeRTOS_Plus_TCP_and_FAT_Windows_Simulator/WinPCap/pcap/usb.h b/FreeRTOS-Labs/Demo/FreeRTOS_Plus_TCP_and_FAT_Windows_Simulator/WinPCap/pcap/usb.h
new file mode 100644 (file)
index 0000000..f150d3b
--- /dev/null
@@ -0,0 +1,90 @@
+/*\r
+ * Copyright (c) 2006 Paolo Abeni (Italy)\r
+ * All rights reserved.\r
+ *\r
+ * Redistribution and use in source and binary forms, with or without\r
+ * modification, are permitted provided that the following conditions\r
+ * are met:\r
+ *\r
+ * 1. Redistributions of source code must retain the above copyright\r
+ * notice, this list of conditions and the following disclaimer.\r
+ * 2. Redistributions in binary form must reproduce the above copyright\r
+ * notice, this list of conditions and the following disclaimer in the\r
+ * documentation and/or other materials provided with the distribution.\r
+ * 3. The name of the author may not be used to endorse or promote \r
+ * products derived from this software without specific prior written \r
+ * permission.\r
+ *\r
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\r
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\r
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\r
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\r
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\r
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\r
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\r
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+ *\r
+ * Basic USB data struct\r
+ * By Paolo Abeni <paolo.abeni@email.it>\r
+ *\r
+ * @(#) $Header: /tcpdump/master/libpcap/pcap/usb.h,v 1.6 2007/09/22 02:06:08 guy Exp $\r
+ */\r
\r
+#ifndef _PCAP_USB_STRUCTS_H__\r
+#define _PCAP_USB_STRUCTS_H__\r
+\r
+/* \r
+ * possible transfer mode\r
+ */\r
+#define URB_TRANSFER_IN   0x80\r
+#define URB_ISOCHRONOUS   0x0\r
+#define URB_INTERRUPT     0x1\r
+#define URB_CONTROL       0x2\r
+#define URB_BULK          0x3\r
+\r
+/*\r
+ * possible event type\r
+ */\r
+#define URB_SUBMIT        'S'\r
+#define URB_COMPLETE      'C'\r
+#define URB_ERROR         'E'\r
+\r
+/*\r
+ * USB setup header as defined in USB specification.\r
+ * Appears at the front of each packet in DLT_USB captures.\r
+ */\r
+typedef struct _usb_setup {\r
+       u_int8_t bmRequestType;\r
+       u_int8_t bRequest;\r
+       u_int16_t wValue;\r
+       u_int16_t wIndex;\r
+       u_int16_t wLength;\r
+} pcap_usb_setup;\r
+\r
+\r
+/*\r
+ * Header prepended by linux kernel to each event.\r
+ * Appears at the front of each packet in DLT_USB_LINUX captures.\r
+ */\r
+typedef struct _usb_header {\r
+       u_int64_t id;\r
+       u_int8_t event_type;\r
+       u_int8_t transfer_type;\r
+       u_int8_t endpoint_number;\r
+       u_int8_t device_address;\r
+       u_int16_t bus_id;\r
+       char setup_flag;/*if !=0 the urb setup header is not present*/\r
+       char data_flag; /*if !=0 no urb data is present*/\r
+       int64_t ts_sec;\r
+       int32_t ts_usec;\r
+       int32_t status;\r
+       u_int32_t urb_len;\r
+       u_int32_t data_len; /* amount of urb data really present in this event*/\r
+       pcap_usb_setup setup;\r
+} pcap_usb_header;\r
+\r
+\r
+#endif\r