From 68e65021e07914e9be40776ac6cc0b5bc416a718 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Mon, 15 Jun 2015 20:23:24 -0700 Subject: 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 --- epan/dissectors/packet-hci_usb.c | 1 + 1 file changed, 1 insertion(+) (limited to 'epan/dissectors/packet-hci_usb.c') 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); -- cgit v1.2.3