aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-bthci_cmd.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2017-07-09 13:47:59 -0400
committerMichael Mann <mmann78@netscape.net>2017-09-16 11:12:29 +0000
commit7d65b573f2734017be416f31852c4ede42bd987b (patch)
tree5fc5e6ebe6c44a5060292541f9664f0244a5e0e4 /epan/dissectors/packet-bthci_cmd.c
parentd992e85fe8e9192cb730abf8796336d3b6d6fd50 (diff)
Have register_decode_as_next_proto create dissector table.
For protocols that have don't have a unique identifier for their payload, have register_decode_as_next_proto be a one stop shop to create Decode As functionality and a dissector table of type FT_NONE. Change-Id: Ic1f2e9ed0aee0554a4eb8f232630b99c0604dfc0 Reviewed-on: https://code.wireshark.org/review/22575 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-bthci_cmd.c')
-rw-r--r--epan/dissectors/packet-bthci_cmd.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/epan/dissectors/packet-bthci_cmd.c b/epan/dissectors/packet-bthci_cmd.c
index 1125634928..f7702b9c09 100644
--- a/epan/dissectors/packet-bthci_cmd.c
+++ b/epan/dissectors/packet-bthci_cmd.c
@@ -4664,7 +4664,7 @@ dissect_bthci_cmd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *dat
if (ogf == HCI_OGF_VENDOR_SPECIFIC) {
col_append_fstr(pinfo->cinfo, COL_INFO, "Vendor Command 0x%04X (opcode 0x%04X)", ocf, opcode);
- if (!dissector_try_uint_new(vendor_dissector_table, HCI_VENDOR_DEFAULT, tvb, pinfo, tree, TRUE, bluetooth_data)) {
+ if (!dissector_try_payload_new(vendor_dissector_table, tvb, pinfo, tree, TRUE, bluetooth_data)) {
if (bluetooth_data) {
hci_vendor_data_t *hci_vendor_data;
@@ -7125,14 +7125,13 @@ proto_register_bthci_cmd(void)
bthci_cmds = wmem_tree_new_autoreset(wmem_epan_scope(), wmem_file_scope());
- vendor_dissector_table = register_dissector_table("bthci_cmd.vendor", "BT HCI Vendor", proto_bthci_cmd, FT_UINT16, BASE_HEX);
-
module = prefs_register_protocol(proto_bthci_cmd, NULL);
prefs_register_static_text_preference(module, "hci_cmd.version",
"Bluetooth HCI version: 4.0 (Core)",
"Version of protocol supported by this dissector.");
- register_decode_as_next_proto("bthci_evt", "Vendor", "bthci_cmd.vendor", (build_label_func*)&bthci_cmd_vendor_prompt);
+ vendor_dissector_table = register_decode_as_next_proto(proto_bthci_cmd, "Vendor", "bthci_cmd.vendor",
+ "BT HCI Vendor", (build_label_func*)&bthci_cmd_vendor_prompt);
}