diff options
author | Guy Harris <guy@alum.mit.edu> | 2015-06-15 20:23:24 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2015-06-16 03:23:51 +0000 |
commit | 68e65021e07914e9be40776ac6cc0b5bc416a718 (patch) | |
tree | 1702ea1aa07b91a15e98a896c81bc68dddffe053 /epan/dissectors/packet-hci_usb.c | |
parent | 60ab49592b58075d54db68353c60c8cfb2409b31 (diff) |
Clean up handling of metadata in Bluetooth dissectors.
Make the "previous protocol data" union in bluetooth_data_t a
discriminated union, and use the discriminator to decide whether to use
a given member of the union or not (or to check whether the member you
plan to use is valid).
Have separate top-level dissectors depending on what the data type
pointed to by the "data" argument is.
Use that member to point to pseudo-header metadata, and, for now, set it
to point to the appropriate pinfo->pseudo_header value; eventually, we
plan to pass the pseudo-header pointer in as the "data" argument from
the "frame" dissector.
Don't overwrite the pseudo-header in the packetlogger dissector -
construct a new one and pass it in.
Change-Id: Ia1ef71e7082a964c5d92d47221f8c00e32f3f087
Reviewed-on: https://code.wireshark.org/review/8943
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'epan/dissectors/packet-hci_usb.c')
-rw-r--r-- | epan/dissectors/packet-hci_usb.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/epan/dissectors/packet-hci_usb.c b/epan/dissectors/packet-hci_usb.c index 42c49d3e70..d08d461393 100644 --- a/epan/dissectors/packet-hci_usb.c +++ b/epan/dissectors/packet-hci_usb.c @@ -126,6 +126,7 @@ dissect_hci_usb(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data) if (data == NULL) return 0; + DISSECTOR_ASSERT(bluetooth_data->previous_protocol_data_type == BT_PD_USB_CONV_INFO); usb_conv_info = bluetooth_data->previous_protocol_data.usb_conv_info; titem = proto_tree_add_item(tree, proto_hci_usb, tvb, offset, -1, ENC_NA); |