aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-bthci_evt.c
diff options
context:
space:
mode:
authorMichal Labedzki <michal.labedzki@tieto.com>2014-12-29 11:07:22 +0100
committerMichal Labedzki <michal.labedzki@tieto.com>2015-02-02 10:47:20 +0000
commit359ff3100b06b5e7bacbb199830b2d9a814d3a41 (patch)
tree237dda951ccfcc19b20cc4347a798a4aa568b1be /epan/dissectors/packet-bthci_evt.c
parent2cae3201b7353ebef07cb8b07e8efd7c4bcb1842 (diff)
Bluetooth: HCI: Improve detecting of undecoded and unknown commands
Undecoded command - command does exist in specification, but not fully implemented in Wireshark yet Unknown command - command does not exist in specification or it is quite new and opcode number is not added yet Unexpected parameter - is now working correctly that means if there is known command but too many parameters so user should know about this issue Change-Id: If3ee24f617f7e6683049558f7a6d68e346e7c92f Reviewed-on: https://code.wireshark.org/review/6898 Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
Diffstat (limited to 'epan/dissectors/packet-bthci_evt.c')
-rw-r--r--epan/dissectors/packet-bthci_evt.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/epan/dissectors/packet-bthci_evt.c b/epan/dissectors/packet-bthci_evt.c
index 608f15261a..7a9d2cf298 100644
--- a/epan/dissectors/packet-bthci_evt.c
+++ b/epan/dissectors/packet-bthci_evt.c
@@ -348,7 +348,8 @@ static int hf_usable_packet_types = -1;
static int hf_changed_in_frame = -1;
static expert_field ei_event_undecoded = EI_INIT;
-static expert_field ei_event_unknown = EI_INIT;
+static expert_field ei_event_unknown_event = EI_INIT;
+static expert_field ei_event_unknown_command = EI_INIT;
static expert_field ei_manufacturer_data_changed = EI_INIT;
static dissector_table_t vendor_dissector_table;
@@ -3111,8 +3112,9 @@ dissect_bthci_evt_command_complete(tvbuff_t *tvb, int offset,
}
default:
- proto_tree_add_item(tree, hf_bthci_evt_ret_params, tvb, offset, -1, ENC_NA);
+ proto_tree_add_expert(tree, pinfo, &ei_event_unknown_command, tvb, offset, tvb_captured_length_remaining(tvb, offset));
offset += tvb_length_remaining(tvb, offset);
+
break;
}
@@ -3824,7 +3826,7 @@ dissect_bthci_evt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *dat
return tvb_captured_length(tvb);
default:
- proto_tree_add_expert(bthci_evt_tree, pinfo, &ei_event_unknown, tvb, offset, tvb_captured_length_remaining(tvb, offset));
+ proto_tree_add_expert(bthci_evt_tree, pinfo, &ei_event_unknown_event, tvb, offset, tvb_captured_length_remaining(tvb, offset));
offset += tvb_length_remaining(tvb, offset);
break;
}
@@ -5335,8 +5337,9 @@ proto_register_bthci_evt(void)
};
static ei_register_info ei[] = {
- { &ei_event_undecoded, { "bthci_evt.expert.event.undecoded", PI_PROTOCOL, PI_UNDECODED, "Event undecoded", EXPFILL }},
- { &ei_event_unknown, { "bthci_evt.expert.event.unknown", PI_PROTOCOL, PI_WARN, "Unknown event", EXPFILL }},
+ { &ei_event_undecoded, { "bthci_evt.expert.event.undecoded", PI_PROTOCOL, PI_UNDECODED, "Event undecoded", EXPFILL }},
+ { &ei_event_unknown_event, { "bthci_evt.expert.event.unknown_event", PI_PROTOCOL, PI_WARN, "Unknown event", EXPFILL }},
+ { &ei_event_unknown_command, { "bthci_evt.expert.event.unknown_command", PI_PROTOCOL, PI_WARN, "Unknown command", EXPFILL }},
{ &ei_manufacturer_data_changed, { "bthci_evt.expert.event.manufacturer_data_changed", PI_PROTOCOL, PI_WARN, "Manufacturer data changed", EXPFILL }}
};