diff options
author | Sean O. Stalley <sean.stalley@intel.com> | 2016-01-11 15:39:12 -0500 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2016-01-13 20:36:45 +0000 |
commit | 161047ce0688569d2e273bcef8fb47b4f0c322c8 (patch) | |
tree | 861097a6612991d804c00767b3e0aaf7e28a1f9d /epan/dissectors/packet-usb.h | |
parent | 57252ad7331c2d16d25c7c5d8284741fab3b5acc (diff) |
Enable USB sub-dissectors for MA USB.
MA USB packets with USB payload are now passed into the USB dissector.
This allows the payload to be dissected by the USB sub-dissectors.
1. Refactor dissect_usb_common() and put the code needed for finding USB subdissectors
into a seperate helper function.
2. Add dissect_usb_payload() call
3. Add dissect_mausb_pkt_common() helper function
4. Put code for dissecting all types of MA USB packets into helper
function dissect_mausb_pkt().
5. Add dissect_mausb_pkt_data() helper function
6. Put code for dissecting MA USB datapacket-specific fields into helper
function dissect_mausb_pkt().
7. Use proto_tree_add_bitmask() call for MA USB bitfields.
8. Create packet-mausb.h to expose MA definitions to USB dissector
9. Dissect MA USB payload with USB subdissectors
10. Undeclare USB calls no longer used by MA USB dissector
Change-Id: I456714572cd8dfc9982b087670ca73c17e25a26c
Signed-off-by: Sean O. Stalley <sean.stalley@intel.com>
Reviewed-on: https://code.wireshark.org/review/13187
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/packet-usb.h')
-rw-r--r-- | epan/dissectors/packet-usb.h | 43 |
1 files changed, 17 insertions, 26 deletions
diff --git a/epan/dissectors/packet-usb.h b/epan/dissectors/packet-usb.h index 1e7c059515..0dfd3f2779 100644 --- a/epan/dissectors/packet-usb.h +++ b/epan/dissectors/packet-usb.h @@ -226,19 +226,12 @@ typedef struct _usb_tap_data_t { /* 9.6.6 */ extern const true_false_string tfs_endpoint_direction; -usb_conv_info_t * -get_usb_conv_info(conversation_t *conversation); - -conversation_t * -get_usb_conversation(packet_info *pinfo, - address *src_addr, address *dst_addr, - guint32 src_endpoint, guint32 dst_endpoint); - usb_conv_info_t *get_usb_iface_conv_info(packet_info *pinfo, guint8 interface_num); proto_item * dissect_usb_descriptor_header(proto_tree *tree, tvbuff_t *tvb, int offset, value_string_ext *type_val_str); + void dissect_usb_endpoint_address(proto_tree *tree, tvbuff_t *tvb, int offset); int @@ -251,25 +244,23 @@ dissect_usb_unknown_descriptor(packet_info *pinfo _U_, proto_tree *parent_tree, tvbuff_t *tvb, int offset, usb_conv_info_t *usb_conv_info _U_); -int -dissect_usb_setup_response(packet_info *pinfo, proto_tree *tree, - tvbuff_t *tvb, int offset, - guint8 urb_type, usb_conv_info_t *usb_conv_info); - -int -dissect_usb_setup_request(packet_info *pinfo, proto_tree *tree, - tvbuff_t *tvb, int offset, - guint8 urb_type, usb_conv_info_t *usb_conv_info, - usb_header_t header_type); - +struct mausb_header; void -usb_set_addr(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, guint16 bus_id, guint16 device_address, - int endpoint, gboolean req); - -usb_trans_info_t -*usb_get_trans_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, - usb_header_t header_type, usb_conv_info_t *usb_conv_info, guint64 usb_id); - +dissect_usb_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent, + usb_header_t header_type, struct mausb_header *ma_header); #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: + */ |