summaryrefslogtreecommitdiff
path: root/epan/dissectors/packet-usb.c
diff options
context:
space:
mode:
authorStig Bjørlykke <stig@bjorlykke.org>2009-10-29 21:32:21 +0000
committerStig Bjørlykke <stig@bjorlykke.org>2009-10-29 21:32:21 +0000
commit373fff9846dfad061c97d88043955e1998acd4cb (patch)
treeea80c551a27c98e958ea57a0ba7feb44e2df1ec7 /epan/dissectors/packet-usb.c
parentf36f5897ee59c5101048da161c5779aaa831be17 (diff)
downloadwireshark-373fff9846dfad061c97d88043955e1998acd4cb.tar.gz
From Marton Nemeth via bug 4173:
Move bmRequestType field constants to header file. svn path=/trunk/; revision=30761
Diffstat (limited to 'epan/dissectors/packet-usb.c')
-rw-r--r--epan/dissectors/packet-usb.c19
1 files changed, 6 insertions, 13 deletions
diff --git a/epan/dissectors/packet-usb.c b/epan/dissectors/packet-usb.c
index a0155b0db4..b80edd6334 100644
--- a/epan/dissectors/packet-usb.c
+++ b/epan/dissectors/packet-usb.c
@@ -1525,31 +1525,24 @@ static const value_string setup_request_names_vals[] = {
};
-#define USB_DIR_OUT 0 /* to device */
-#define USB_DIR_IN 0x80 /* to host */
-
static const true_false_string tfs_bmrequesttype_direction = {
"Device-to-host",
"Host-to-device"
};
-#define USB_TYPE_MASK (0x03 << 5)
-#define RQT_SETUP_TYPE_STANDARD 0
-#define RQT_SETUP_TYPE_CLASS 1
-#define RQT_SETUP_TYPE_VENDOR 2
-
static const value_string bmrequesttype_type_vals[] = {
{RQT_SETUP_TYPE_STANDARD, "Standard"},
{RQT_SETUP_TYPE_CLASS, "Class"},
{RQT_SETUP_TYPE_VENDOR, "Vendor"},
{0, NULL}
};
+
static const value_string bmrequesttype_recipient_vals[] = {
- {0, "Device"},
- {1, "Interface"},
- {2, "Endpoint"},
- {3, "Other"},
- {0, NULL}
+ { RQT_SETUP_RECIPIENT_DEVICE, "Device" },
+ { RQT_SETUP_RECIPIENT_INTERFACE, "Interface" },
+ { RQT_SETUP_RECIPIENT_INTERFACE, "Endpoint" },
+ { RQT_SETUP_RECIPIENT_INTERFACE, "Other" },
+ { 0, NULL }
};
static int