diff options
author | Martin Kaiser <wireshark@kaiser.cx> | 2014-08-20 13:49:51 +0200 |
---|---|---|
committer | Martin Kaiser <wireshark@kaiser.cx> | 2014-08-21 20:26:46 +0000 |
commit | a87112fafc06b9328d32f938aa26385f2168f2ac (patch) | |
tree | 5e514d2a9f9c531077b8336b1d4fa20bd37bae95 /epan | |
parent | b72acf37d0bdb94a6ae8f289829a351e935ddbdd (diff) | |
download | wireshark-a87112fafc06b9328d32f938aa26385f2168f2ac.tar.gz |
set usb_conv_info->endpoint to "no endpoint" for interface conversations
Change-Id: I625d20cc2c874f5b28c063590878077f8aa80196
Reviewed-on: https://code.wireshark.org/review/3780
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Martin Kaiser <wireshark@kaiser.cx>
Diffstat (limited to 'epan')
-rw-r--r-- | epan/dissectors/packet-usb.c | 5 | ||||
-rw-r--r-- | epan/dissectors/packet-usb.h | 10 |
2 files changed, 9 insertions, 6 deletions
diff --git a/epan/dissectors/packet-usb.c b/epan/dissectors/packet-usb.c index 2f7eda29dd..97fa555832 100644 --- a/epan/dissectors/packet-usb.c +++ b/epan/dissectors/packet-usb.c @@ -1601,8 +1601,11 @@ dissect_usb_interface_descriptor(packet_info *pinfo, proto_tree *parent_tree, if (!pinfo->fd->flags.visited && (alt_setting == 0)) { /* Register conversation for this interface in case CONTROL messages are sent to it */ usb_trans_info->interface_info = get_usb_iface_conv_info(pinfo, interface_num); + + /* in interface conversations, endpoint has no meaning */ + usb_trans_info->interface_info->endpoint = NO_ENDPOINT8; + usb_trans_info->interface_info->interfaceClass = tvb_get_guint8(tvb, offset); - /* save information useful to class-specific dissectors */ usb_trans_info->interface_info->interfaceSubclass = tvb_get_guint8(tvb, offset+1); usb_trans_info->interface_info->interfaceProtocol = tvb_get_guint8(tvb, offset+2); usb_trans_info->interface_info->deviceVendor = usb_conv_info->deviceVendor; diff --git a/epan/dissectors/packet-usb.h b/epan/dissectors/packet-usb.h index 4ea8f34f26..f383f43079 100644 --- a/epan/dissectors/packet-usb.h +++ b/epan/dissectors/packet-usb.h @@ -116,11 +116,11 @@ typedef struct _usb_tap_data_t { } usb_tap_data_t; -/* This is the endpoint number used for "no endpoint" or the fake endpoint - * for the host side since we need two endpoints to manage conversations - * properly. - */ -#define NO_ENDPOINT 0xffffffff +/* the value for "no endpoint" that's used usb_addr_t, e.g. for the address of the host */ +#define NO_ENDPOINT 0xffffffff +/* the 8bit version of NO_ENDPOINT, it's used in usb_conv_info_t + 0xff would be an invalid endpoint number (reserved bits are 1) */ +#define NO_ENDPOINT8 ((guint8)(NO_ENDPOINT& G_MAXUINT8)) /* * Values from the Linux USB pseudo-header. |