aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-btatt.c
diff options
context:
space:
mode:
authorMichal Labedzki <michal.labedzki@tieto.com>2015-01-28 17:14:48 +0100
committerMichal Labedzki <michal.labedzki@tieto.com>2015-02-03 12:05:43 +0000
commite9429732ff91cbbbaead63b643870da91ef415bd (patch)
treeef75688b5e8a1d30b6091f084747d7aa2807bbb2 /epan/dissectors/packet-btatt.c
parent8417fbf6f9fafb2482811f1c44001a4066cad009 (diff)
Bluetooth/USB HID: Move boot form of reports from bthid to usbhid
Then call it as new dissectors from bthid and btatt. In future they will be used in usbhid, because they are part of HID. Change-Id: I9cb545f3079c27945b17bf8791ba4e3736c29e7c Reviewed-on: https://code.wireshark.org/review/6912 Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
Diffstat (limited to 'epan/dissectors/packet-btatt.c')
-rw-r--r--epan/dissectors/packet-btatt.c25
1 files changed, 22 insertions, 3 deletions
diff --git a/epan/dissectors/packet-btatt.c b/epan/dissectors/packet-btatt.c
index 39ba41b11f..7f24e4cbb9 100644
--- a/epan/dissectors/packet-btatt.c
+++ b/epan/dissectors/packet-btatt.c
@@ -523,6 +523,9 @@ static wmem_tree_t *fragments = NULL;
static wmem_tree_t *handle_to_uuid = NULL;
static dissector_handle_t btatt_handle;
+static dissector_handle_t usb_hid_boot_keyboard_input_report_handle;
+static dissector_handle_t usb_hid_boot_keyboard_output_report_handle;
+static dissector_handle_t usb_hid_boot_mouse_input_report_handle;
static dissector_table_t att_handle_dissector_table;
static dissector_table_t att_uuid16_dissector_table;
@@ -2190,6 +2193,11 @@ dissect_attribute_value(proto_tree *tree, proto_item *patron_item, packet_info *
offset += 2;
break;
+ case 0x2A22: /* Boot Keyboard Input Report */
+ call_dissector_with_data(usb_hid_boot_keyboard_input_report_handle, tvb_new_subset_remaining(tvb, offset), pinfo, tree, NULL);
+ offset += length;
+
+ break;
case 0x2A23: /* System ID */
proto_tree_add_item(tree, hf_btatt_system_id_manufacturer_identifier, tvb, offset, 5, ENC_LITTLE_ENDIAN);
offset += 5;
@@ -2237,6 +2245,16 @@ dissect_attribute_value(proto_tree *tree, proto_item *patron_item, packet_info *
offset += 1;
break;
+ case 0x2A32: /* Boot Keyboard Output Report */
+ call_dissector_with_data(usb_hid_boot_keyboard_output_report_handle, tvb_new_subset_remaining(tvb, offset), pinfo, tree, NULL);
+ offset += length;
+
+ break;
+ case 0x2A33: /* Boot Mouse Input Report */
+ call_dissector_with_data(usb_hid_boot_mouse_input_report_handle, tvb_new_subset_remaining(tvb, offset), pinfo, tree, NULL);
+ offset += length;
+
+ break;
case 0x2A38: /* Body Sensor Location */
proto_tree_add_item(tree, hf_btatt_body_sensor_location, tvb, offset, 1, ENC_NA);
offset += 1;
@@ -2655,10 +2673,7 @@ dissect_attribute_value(proto_tree *tree, proto_item *patron_item, packet_info *
case 0x2A18: /* Glucose Measurement */
case 0x2A1C: /* Temperature Measurement */
case 0x2A1E: /* Intermediate Temperature */
- case 0x2A22: /* Boot Keyboard Input Report */
case 0x2A2A: /* IEEE 11073-20601 Regulatory Certification Data List */
- case 0x2A32: /* Boot Keyboard Output Report */
- case 0x2A33: /* Boot Mouse Input Report */
case 0x2A34: /* Glucose Measurement Context */
case 0x2A35: /* Blood Pressure Measurement */
case 0x2A36: /* Intermediate Cuff Pressure */
@@ -4887,6 +4902,10 @@ proto_reg_handoff_btatt(void)
{
gint i_array;
+ usb_hid_boot_keyboard_input_report_handle = find_dissector("usbhid.boot_report.keyboard.input");
+ usb_hid_boot_keyboard_output_report_handle = find_dissector("usbhid.boot_report.keyboard.output");
+ usb_hid_boot_mouse_input_report_handle = find_dissector("usbhid.boot_report.mouse.input");
+
dissector_add_uint("btl2cap.psm", BTL2CAP_PSM_ATT, btatt_handle);
dissector_add_uint("btl2cap.cid", BTL2CAP_FIXED_CID_ATT, btatt_handle);