aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-usbip.h
diff options
context:
space:
mode:
authorChristian Lamparter <chunkeey@googlemail.com>2016-01-31 03:07:45 +0100
committerPascal Quantin <pascal.quantin@gmail.com>2016-02-16 18:52:49 +0000
commit360349c002418281ce4f8d5e5b538c30bb6fd057 (patch)
tree19ddbb65d8ffe9b401c419fde3ee86a0e078e3e0 /epan/dissectors/packet-usbip.h
parent878d724c528d1a33b511e8493607ad2ccbad5019 (diff)
USBIP: add USBIP Protocol dissector
This patch adds support for the USBIP protocol [0]. A document describing the protocol in detail is available from the linux kernel source [1]. The USBIP protocol mimics a USB HCD on a client PC that tunnels USB data over TCP/IP between the client and the host where the physical USB device is connected. A testcase has been submitted to bug.wireshark.org [2]. [0] <http://usbip.sourceforge.net/> [1] <https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/drivers/usb/usbip/usbip_protocol.txt> [2] <https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=12127> Bug: 12127 Change-Id: I4e557dc274017eb029c7af2717a62be4b00aebda Reviewed-on: https://code.wireshark.org/review/13797 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-usbip.h')
-rw-r--r--epan/dissectors/packet-usbip.h53
1 files changed, 53 insertions, 0 deletions
diff --git a/epan/dissectors/packet-usbip.h b/epan/dissectors/packet-usbip.h
new file mode 100644
index 0000000000..c61f4d5f0a
--- /dev/null
+++ b/epan/dissectors/packet-usbip.h
@@ -0,0 +1,53 @@
+/* packet-usbip.h
+ * Definitions for USBIP dissection
+ * Copyright 2016, Christian Lamparter <chunkeey@googlemail.com>
+ *
+ * Wireshark - Network traffic analyzer
+ * By Gerald Combs <gerald@wireshark.org>
+ * Copyright 1998 Gerald Combs
+ *
+ * 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 of the License, 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.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#ifndef __PACKET_USBIP_H__
+#define __PACKET_USBIP_H__
+
+#define USBIP_HEADER_WITH_SETUP_LEN 0x28
+#define USBIP_HEADER_LEN 0x30
+
+#define USBIP_DIR_OUT 0x00
+#define USBIP_DIR_IN 0x01
+
+struct usbip_header {
+ guint8 devid;
+ guint8 busid;
+ guint32 ep;
+ guint32 dir;
+};
+
+#endif
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 4
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * vi: set shiftwidth=4 tabstop=8 expandtab:
+ * :indentSize=4:tabSize=8:noTabs=true:
+ */