aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-mausb.c
diff options
context:
space:
mode:
authorSean O. Stalley <sean.stalley@intel.com>2014-07-03 14:05:24 -0700
committerEvan Huus <eapache@gmail.com>2014-07-04 02:20:38 +0000
commitbbb3e2f7af074ca92eb0da9e438d919b251ed07e (patch)
tree9d2780eacdf4fc758d0181b405b8d89554e2e980 /epan/dissectors/packet-mausb.c
parent212df87e7f3c91b36ff355bc6d4db845946d0c72 (diff)
Add Bus ID to USB Address Column
USB Addresses are now in the format of: bus_id.device_address.endpoint This makes it much easier to read traces that captured traffic on more than one bus. Change-Id: I264db2ceea712d94632d5d08d05d3af22a4a03fe Reviewed-on: https://code.wireshark.org/review/2833 Reviewed-by: Evan Huus <eapache@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-mausb.c')
-rw-r--r--epan/dissectors/packet-mausb.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/epan/dissectors/packet-mausb.c b/epan/dissectors/packet-mausb.c
index b79e251784..3999dde1dc 100644
--- a/epan/dissectors/packet-mausb.c
+++ b/epan/dissectors/packet-mausb.c
@@ -551,6 +551,10 @@ static guint8 mausb_ep_handle_dev_addr(guint16 handle) {
return (handle & MAUSB_EP_HANDLE_DEV_ADDR) >> MAUSB_EP_HANDLE_DEV_ADDR_OFFSET;
}
+static guint8 mausb_ep_handle_bus_num(guint16 handle) {
+ return (handle & MAUSB_EP_HANDLE_BUS_NUM) >> MAUSB_EP_HANDLE_BUS_NUM_OFFSET;
+}
+
/* returns the length field of the MAUSB packet */
static guint mausb_get_pkt_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset)
{
@@ -919,15 +923,17 @@ static conversation_t
conversation_t *conversation = NULL;
static usb_address_t src_addr, dst_addr; /* has to be static due to SET_ADDRESS */
guint16 device_address;
+ guint16 bus_num;
int endpoint;
/* Treat data packets the same as URBs */
if (is_data) {
device_address = mausb_ep_handle_dev_addr(handle);
endpoint = mausb_ep_handle_ep_num(handle);
+ bus_num = mausb_ep_handle_bus_num(handle);
- usb_set_addr(pinfo, &src_addr, &dst_addr, device_address, endpoint,
- req);
+ usb_set_addr(pinfo, &src_addr, &dst_addr, bus_num, device_address,
+ endpoint, req);
conversation = get_usb_conversation(pinfo, &pinfo->src, &pinfo->dst,
pinfo->srcport, pinfo->destport);
}