epan/dissectors/pidl/ C99 drsuapi
[wireshark-sm.git] / epan / dissectors / packet-btamp.c
blob4a106d1d10c25b1221a839135460736000676501
1 /* packet-btamp.c
2 * Routines for the Bluetooth AMP dissection
4 * Copyright 2009, Kovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com>
6 * Wireshark - Network traffic analyzer
7 * By Gerald Combs <gerald@wireshark.org>
8 * Copyright 1998 Gerald Combs
10 * SPDX-License-Identifier: GPL-2.0-or-later
13 #include "config.h"
15 #include <epan/packet.h>
17 #include "packet-btl2cap.h"
19 /* Initialize the protocol and registered fields */
20 static int proto_btamp;
21 static int hf_btamp_command;
22 static int hf_btamp_cmd_code;
23 static int hf_btamp_cmd_ident;
24 static int hf_btamp_cmd_length;
25 static int hf_btamp_cmd_data;
26 static int hf_btamp_rej_reason;
27 static int hf_btamp_mtu;
28 static int hf_btamp_extfeatures;
29 static int hf_btamp_lcontroller_id;
30 static int hf_btamp_rcontroller_id;
31 static int hf_btamp_controller_list;
32 static int hf_btamp_controllers;
33 static int hf_btamp_controller_id;
34 static int hf_btamp_controller_type;
35 static int hf_btamp_controller_status;
36 static int hf_btamp_status;
37 /* static int hf_btamp_create_status; */
38 /* static int hf_btamp_disc_status; */
39 static int hf_btamp_total_bw;
40 static int hf_btamp_max_guaran_bw;
41 static int hf_btamp_min_latency;
42 static int hf_btamp_pal_caps_guaranteed;
43 static int hf_btamp_pal_caps_mask;
44 static int hf_btamp_amp_assoc_size;
45 static int hf_btamp_amp_assoc;
47 /* Initialize the subtree pointers */
48 static int ett_btamp;
49 static int ett_btamp_cmd;
50 static int ett_btamp_caps;
51 static int ett_btamp_controller_entry;
52 static int ett_btamp_controller_list;
54 static dissector_handle_t btamp_handle;
57 static const value_string command_code_vals[] = {
58 { 0x01, "AMP Command Reject" },
59 { 0x02, "AMP Discover Request" },
60 { 0x03, "AMP Discover Response" },
61 { 0x04, "AMP Change Notify" },
62 { 0x05, "AMP Change Response" },
63 { 0x06, "AMP Get Info Request" },
64 { 0x07, "AMP Get Info Response" },
65 { 0x08, "AMP Get AMP Assoc Request" },
66 { 0x09, "AMP Get AMP Assoc Response" },
67 { 0x0A, "AMP Create Physical Link Request" },
68 { 0x0B, "AMP Create Physical Link Response" },
69 { 0x0C, "AMP Disconnect Physical Link Request" },
70 { 0x0D, "AMP Disconnect Physical Link Response" },
71 { 0, NULL }
74 static const value_string reason_vals[] = {
75 { 0x0000, "Command not understood" },
76 { 0, NULL }
79 static const value_string controller_type_vals[] = {
80 { 0x0000, "Bluetooth BR/EDR" },
81 { 0x0001, "802.11" },
82 { 0x0002, "ECMA-368" },
83 { 0, NULL }
86 static const value_string controller_status_vals[] = {
87 { 0x0000, "Controller available but currently physically powered down" },
88 { 0x0001, "Controller used exclusively by Bluetooth BR/EDR" },
89 { 0x0002, "Controller has no capacity available for Bluetooth operation" },
90 { 0x0003, "Controller has low capacity available for Bluetooth operation" },
91 { 0x0004, "Controller has medium capacity available for Bluetooth operation" },
92 { 0x0005, "Controller has high capacity available for Bluetooth operation" },
93 { 0x0006, "Controller has full capacity available for Bluetooth operation" },
94 { 0, NULL }
97 static const value_string status_vals[] = {
98 { 0x0000, "Success" },
99 { 0x0001, "Invalid Controller ID" },
100 { 0, NULL }
103 #if 0
104 static const value_string create_status_vals[] = {
105 { 0x0000, "Success" },
106 { 0x0001, "Invalid Controller ID" },
107 { 0x0002, "Failed - Unable to start link creation" },
108 { 0x0003, "Failed - Collision Occurred" },
109 { 0x0004, "Failed - AMP Disconnected Physical Link Request packet received" },
110 { 0x0005, "Failed - Physical Link Already Exists" },
111 { 0, NULL }
114 static const value_string disc_status_vals[] = {
115 { 0x0000, "Success" },
116 { 0x0001, "Invalid Controller ID" },
117 { 0x0002, "Failed - No Physical Link exists and no Physical Link creation is in progress" },
118 { 0, NULL }
120 #endif
122 void proto_register_btamp(void);
123 void proto_reg_handoff_btamp(void);
125 static int
126 dissect_comrej(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
128 uint16_t reason;
130 reason = tvb_get_letohs(tvb, offset);
131 proto_tree_add_item(tree, hf_btamp_rej_reason, tvb, offset, 2, ENC_LITTLE_ENDIAN);
132 offset += 2;
134 switch (reason) {
135 case 0x0000: /* Command not understood */
136 break;
138 default:
139 break;
142 return offset;
145 static int
146 dissect_discoverrequest(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
148 proto_tree_add_item(tree, hf_btamp_mtu, tvb, offset, 2, ENC_LITTLE_ENDIAN);
149 offset += 2;
151 proto_tree_add_item(tree, hf_btamp_extfeatures, tvb, offset, 2, ENC_LITTLE_ENDIAN);
152 offset += 2;
154 return offset;
157 static int
158 dissect_controller_entry(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, uint16_t idx)
160 proto_item *ti_controller_entry;
161 proto_tree *btamp_controller_entry_tree;
163 ti_controller_entry = proto_tree_add_none_format(tree,
164 hf_btamp_controllers, tvb,
165 offset, 3,
166 "Entry: %u", idx);
167 btamp_controller_entry_tree = proto_item_add_subtree(ti_controller_entry, ett_btamp_controller_entry);
169 proto_tree_add_item(btamp_controller_entry_tree, hf_btamp_controller_id, tvb, offset, 1, ENC_LITTLE_ENDIAN);
170 offset += 1;
172 proto_tree_add_item(btamp_controller_entry_tree, hf_btamp_controller_type, tvb, offset, 1, ENC_LITTLE_ENDIAN);
173 offset += 1;
175 proto_tree_add_item(btamp_controller_entry_tree, hf_btamp_controller_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
176 offset += 1;
178 return offset;
181 static int
182 dissect_discoverresponse(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
184 uint16_t length;
185 uint16_t idx = 1;
186 proto_item *ti_controller_list;
187 proto_tree *btamp_controller_list_tree;
189 proto_tree_add_item(tree, hf_btamp_mtu, tvb, offset, 2, ENC_LITTLE_ENDIAN);
190 offset += 2;
192 proto_tree_add_item(tree, hf_btamp_extfeatures, tvb, offset, 2, ENC_LITTLE_ENDIAN);
193 offset += 2;
195 length = tvb_reported_length_remaining(tvb, offset);
196 ti_controller_list = proto_tree_add_none_format(tree,
197 hf_btamp_controller_list, tvb,
198 offset, length,
199 "Controller list");
200 btamp_controller_list_tree = proto_item_add_subtree(ti_controller_list, ett_btamp_controller_list);
202 while (tvb_reported_length_remaining(tvb, offset) >= 3) {
203 offset = dissect_controller_entry(tvb, offset, pinfo, btamp_controller_list_tree, idx);
204 idx += 1;
207 return offset;
210 static int
211 dissect_changenotify(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
213 uint16_t length;
214 uint16_t idx = 1;
215 proto_item *ti_controller_list;
216 proto_tree *btamp_controller_list_tree;
218 length = tvb_reported_length_remaining(tvb, offset);
219 ti_controller_list = proto_tree_add_none_format(tree,
220 hf_btamp_controller_list, tvb,
221 offset, length,
222 "Controller list");
223 btamp_controller_list_tree = proto_item_add_subtree(ti_controller_list, ett_btamp_controller_list);
225 while (tvb_reported_length_remaining(tvb, offset) >= 3) {
226 offset = dissect_controller_entry(tvb, offset, pinfo, btamp_controller_list_tree, idx);
227 idx += 1;
230 return offset;
233 static int
234 dissect_changeresponse(tvbuff_t *tvb _U_, int offset, packet_info *pinfo _U_, proto_tree *tree _U_)
236 return offset;
239 static int
240 dissect_getinforequest(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
242 proto_tree_add_item(tree, hf_btamp_controller_id, tvb, offset, 1, ENC_LITTLE_ENDIAN);
243 offset += 1;
245 return offset;
248 static int
249 dissect_getinforesponse(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
251 proto_item *ti_controller;
252 proto_tree *btamp_controller_tree;
254 proto_tree_add_item(tree, hf_btamp_controller_id, tvb, offset, 1, ENC_LITTLE_ENDIAN);
255 offset += 1;
257 proto_tree_add_item(tree, hf_btamp_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
258 offset += 1;
260 proto_tree_add_item(tree, hf_btamp_total_bw, tvb, offset, 4, ENC_LITTLE_ENDIAN);
261 offset += 4;
263 proto_tree_add_item(tree, hf_btamp_max_guaran_bw, tvb, offset, 4, ENC_LITTLE_ENDIAN);
264 offset += 4;
266 proto_tree_add_item(tree, hf_btamp_min_latency, tvb, offset, 4, ENC_LITTLE_ENDIAN);
267 offset += 4;
269 ti_controller = proto_tree_add_none_format(tree,
270 hf_btamp_pal_caps_mask, tvb,
271 offset, 2,
272 "PAL Capabilities");
273 btamp_controller_tree = proto_item_add_subtree(ti_controller, ett_btamp_caps);
274 proto_tree_add_item(btamp_controller_tree, hf_btamp_pal_caps_guaranteed, tvb, offset, 2, ENC_LITTLE_ENDIAN);
275 offset += 2;
277 proto_tree_add_item(tree, hf_btamp_amp_assoc_size, tvb, offset, 2, ENC_LITTLE_ENDIAN);
278 offset += 2;
280 return offset;
283 static int
284 dissect_getampassocrequest(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
286 proto_tree_add_item(tree, hf_btamp_controller_id, tvb, offset, 1, ENC_LITTLE_ENDIAN);
287 offset += 1;
289 return offset;
292 static int
293 dissect_ampassoc(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
295 proto_tree_add_item(tree, hf_btamp_amp_assoc, tvb, offset, tvb_reported_length_remaining(tvb, offset), ENC_NA);
296 return tvb_reported_length(tvb);
299 static int
300 dissect_getampassocresponse(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
302 proto_tree_add_item(tree, hf_btamp_controller_id, tvb, offset, 1, ENC_LITTLE_ENDIAN);
303 offset += 1;
305 proto_tree_add_item(tree, hf_btamp_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
306 offset += 1;
308 offset = dissect_ampassoc(tvb, offset, pinfo, tree);
310 return offset;
313 static int
314 dissect_createphysicalrequest(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
316 proto_tree_add_item(tree, hf_btamp_lcontroller_id, tvb, offset, 1, ENC_LITTLE_ENDIAN);
317 offset += 1;
319 proto_tree_add_item(tree, hf_btamp_rcontroller_id, tvb, offset, 1, ENC_LITTLE_ENDIAN);
320 offset += 1;
322 offset = dissect_ampassoc(tvb, offset, pinfo, tree);
324 return offset;
327 static int
328 dissect_createphysicalresponse(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
330 proto_tree_add_item(tree, hf_btamp_lcontroller_id, tvb, offset, 1, ENC_LITTLE_ENDIAN);
331 offset += 1;
333 proto_tree_add_item(tree, hf_btamp_rcontroller_id, tvb, offset, 1, ENC_LITTLE_ENDIAN);
334 offset += 1;
336 proto_tree_add_item(tree, hf_btamp_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
337 offset += 1;
339 return offset;
342 static int
343 dissect_discphysicalchanrequest(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
345 proto_tree_add_item(tree, hf_btamp_lcontroller_id, tvb, offset, 1, ENC_LITTLE_ENDIAN);
346 offset += 1;
348 proto_tree_add_item(tree, hf_btamp_rcontroller_id, tvb, offset, 1, ENC_LITTLE_ENDIAN);
349 offset += 1;
351 return offset;
354 static int
355 dissect_discphysicalchanresponse(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
357 proto_tree_add_item(tree, hf_btamp_lcontroller_id, tvb, offset, 1, ENC_LITTLE_ENDIAN);
358 offset += 1;
360 proto_tree_add_item(tree, hf_btamp_rcontroller_id, tvb, offset, 1, ENC_LITTLE_ENDIAN);
361 offset += 1;
363 proto_tree_add_item(tree, hf_btamp_controller_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
364 offset += 1;
366 return offset;
369 static int
370 dissect_btamp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
372 int offset = 0;
373 proto_item *ti;
374 proto_tree *btamp_tree;
375 uint16_t length;
376 proto_item *ti_command;
377 proto_tree *btamp_cmd_tree;
378 uint8_t cmd_code;
379 uint16_t cmd_length;
381 col_set_str(pinfo->cinfo, COL_PROTOCOL, "AMP");
383 switch (pinfo->p2p_dir) {
384 case P2P_DIR_SENT:
385 col_set_str(pinfo->cinfo, COL_INFO, "Sent ");
386 break;
387 case P2P_DIR_RECV:
388 col_set_str(pinfo->cinfo, COL_INFO, "Rcvd ");
389 break;
390 default:
391 col_set_str(pinfo->cinfo, COL_INFO, "UnknownDirection ");
392 break;
395 ti = proto_tree_add_item(tree, proto_btamp, tvb, offset, -1, ENC_NA);
396 btamp_tree = proto_item_add_subtree(ti, ett_btamp);
398 length = tvb_reported_length_remaining(tvb, offset);
399 ti_command = proto_tree_add_none_format(btamp_tree,
400 hf_btamp_command, tvb,
401 offset, length,
402 "Command: ");
403 btamp_cmd_tree = proto_item_add_subtree(ti_command, ett_btamp_cmd);
405 cmd_code = tvb_get_uint8(tvb, offset);
406 proto_tree_add_item(btamp_cmd_tree, hf_btamp_cmd_code, tvb, offset, 1, ENC_LITTLE_ENDIAN);
407 offset += 1;
409 proto_tree_add_item(btamp_cmd_tree, hf_btamp_cmd_ident, tvb, offset, 1, ENC_LITTLE_ENDIAN);
410 offset += 1;
412 cmd_length = tvb_get_letohs(tvb, offset);
413 proto_tree_add_item(btamp_cmd_tree, hf_btamp_cmd_length, tvb, offset, 2, ENC_LITTLE_ENDIAN);
414 proto_item_set_len(ti_command, cmd_length+4);
415 offset += 2;
417 switch(cmd_code) {
418 case 0x01: /* Command Reject */
419 offset = dissect_comrej(tvb, offset, pinfo, btamp_cmd_tree);
420 break;
422 case 0x02: /* Discover Request */
423 offset = dissect_discoverrequest(tvb, offset, pinfo, btamp_cmd_tree);
424 break;
426 case 0x03: /* Discover Response */
427 offset = dissect_discoverresponse(tvb, offset, pinfo, btamp_cmd_tree);
428 break;
430 case 0x04: /* AMP Change Notify */
431 offset = dissect_changenotify(tvb, offset, pinfo, btamp_cmd_tree);
432 break;
434 case 0x05: /* AMP Change Response */
435 offset = dissect_changeresponse(tvb, offset, pinfo, btamp_cmd_tree);
436 break;
438 case 0x06: /* AMP Get Info Request */
439 offset = dissect_getinforequest(tvb, offset, pinfo, btamp_cmd_tree);
440 break;
442 case 0x07: /* AMP Get Info Response */
443 offset = dissect_getinforesponse(tvb, offset, pinfo, btamp_cmd_tree);
444 break;
446 case 0x08: /* Get AMP Assoc Request */
447 offset = dissect_getampassocrequest(tvb, offset, pinfo, btamp_cmd_tree);
448 break;
450 case 0x09: /* Get AMP Assoc Response */
451 offset = dissect_getampassocresponse(tvb, offset, pinfo, btamp_cmd_tree);
452 break;
454 case 0x0A: /* Create Physical Link Request */
455 offset = dissect_createphysicalrequest(tvb, offset, pinfo, btamp_cmd_tree);
456 break;
458 case 0x0B: /* Create Physical Link Response */
459 offset = dissect_createphysicalresponse(tvb, offset, pinfo, btamp_cmd_tree);
460 break;
462 case 0x0c: /* Disconnect Physical Link Request */
463 offset = dissect_discphysicalchanrequest(tvb, offset, pinfo, btamp_cmd_tree);
464 break;
466 case 0x0d: /* Disconnect Physical Link Response */
467 offset = dissect_discphysicalchanresponse(tvb, offset, pinfo, btamp_cmd_tree);
468 break;
470 default:
471 proto_tree_add_item(btamp_cmd_tree, hf_btamp_cmd_data, tvb, offset, -1, ENC_NA);
472 offset = tvb_reported_length(tvb);
473 break;
476 proto_item_append_text(ti_command, "%s", val_to_str(cmd_code, command_code_vals, "Unknown PDU (%u)"));
477 col_append_str(pinfo->cinfo, COL_INFO, val_to_str(cmd_code, command_code_vals, "Unknown PDU (%u)"));
479 return offset;
482 /* Register the protocol with Wireshark */
483 void
484 proto_register_btamp(void)
486 /* Setup list of header fields See Section 1.6.1 for details*/
487 static hf_register_info hf[] = {
488 { &hf_btamp_command,
489 { "Command", "btamp.command",
490 FT_NONE, BASE_NONE, NULL, 0x0,
491 "L2CAP Command", HFILL }
493 { &hf_btamp_cmd_code,
494 { "Command Code", "btamp.cmd_code",
495 FT_UINT8, BASE_HEX, VALS(command_code_vals), 0x0,
496 "L2CAP Command Code", HFILL }
498 { &hf_btamp_cmd_ident,
499 { "Command Identifier", "btamp.cmd_ident",
500 FT_UINT8, BASE_HEX, NULL, 0x0,
501 "L2CAP Command Identifier", HFILL }
503 { &hf_btamp_cmd_length,
504 { "Command Length", "btamp.cmd_length",
505 FT_UINT16, BASE_DEC, NULL, 0x0,
506 "L2CAP Command Length", HFILL }
508 { &hf_btamp_cmd_data,
509 { "Command Data", "btamp.cmd_data",
510 FT_NONE, BASE_NONE, NULL, 0x0,
511 "L2CAP Command Data", HFILL }
513 { &hf_btamp_rej_reason,
514 { "Reason", "btamp.rej_reason",
515 FT_UINT16, BASE_HEX, VALS(reason_vals), 0x0,
516 NULL, HFILL }
518 { &hf_btamp_mtu,
519 { "MPS/MTU", "btamp.mps",
520 FT_UINT16, BASE_HEX, NULL, 0x0,
521 "MPS/MTU Size", HFILL }
523 { &hf_btamp_extfeatures,
524 { "Extended Features", "btamp.extfeatures",
525 FT_UINT16, BASE_HEX, NULL, 0x0,
526 "Extended Features Mask", HFILL }
528 { &hf_btamp_controllers,
529 { "Controller entry", "btamp.ctrl_entry",
530 FT_NONE, BASE_NONE, NULL, 0x0,
531 NULL, HFILL }
533 { &hf_btamp_controller_list,
534 { "Controller list", "btamp.ctrl_list",
535 FT_NONE, BASE_NONE, NULL, 0x0,
536 NULL, HFILL }
538 { &hf_btamp_lcontroller_id,
539 { "Local Controller ID", "btamp.lctrl_id",
540 FT_UINT8, BASE_DEC, NULL, 0x0,
541 NULL, HFILL }
543 { &hf_btamp_rcontroller_id,
544 { "Remote Controller ID", "btamp.rctrl_id",
545 FT_UINT8, BASE_DEC, NULL, 0x0,
546 NULL, HFILL }
548 { &hf_btamp_controller_id,
549 { "Controller ID", "btamp.ctrl_id",
550 FT_UINT8, BASE_DEC, NULL, 0x0,
551 NULL, HFILL }
553 { &hf_btamp_controller_type,
554 { "Controller Type", "btamp.ctrl_type",
555 FT_UINT8, BASE_DEC, VALS(controller_type_vals), 0x0,
556 NULL, HFILL }
558 { &hf_btamp_controller_status,
559 { "Controller Status", "btamp.ctrl_status",
560 FT_UINT8, BASE_DEC, VALS(controller_status_vals), 0x0,
561 NULL, HFILL }
563 { &hf_btamp_status,
564 { "Status", "btamp.status",
565 FT_UINT8, BASE_DEC, VALS(status_vals), 0x0,
566 NULL, HFILL }
568 #if 0
569 { &hf_btamp_create_status,
570 { "Status", "btamp.create_status",
571 FT_UINT8, BASE_DEC, VALS(create_status_vals), 0x0,
572 NULL, HFILL }
574 { &hf_btamp_disc_status,
575 { "Status", "btamp.disc_status",
576 FT_UINT8, BASE_DEC, VALS(disc_status_vals), 0x0,
577 NULL, HFILL }
579 #endif
580 { &hf_btamp_pal_caps_mask,
581 { "PAL Capabilities Mask", "btamp.pal_caps_mask",
582 FT_NONE, BASE_NONE, NULL, 0x0,
583 NULL, HFILL }
585 { &hf_btamp_pal_caps_guaranteed,
586 { "Guaranteed Service type", "btamp.guaranteed_type",
587 FT_BOOLEAN, 16, NULL, 0x0001,
588 NULL, HFILL }
590 { &hf_btamp_total_bw,
591 { "Total Bandwidth", "btamp.total_bw",
592 FT_UINT32, BASE_HEX, NULL, 0x0,
593 NULL, HFILL }
595 { &hf_btamp_max_guaran_bw,
596 { "Max Guaranteed Bandwidth", "btamp.max_guaran_bw",
597 FT_UINT32, BASE_HEX, NULL, 0x0,
598 NULL, HFILL }
600 { &hf_btamp_min_latency,
601 { "Minimum latency", "btamp.min_latency",
602 FT_UINT32, BASE_HEX, NULL, 0x0,
603 NULL, HFILL }
605 { &hf_btamp_amp_assoc_size,
606 { "Assoc Size", "btamp.assoc_size",
607 FT_UINT16, BASE_HEX, NULL, 0x0,
608 NULL, HFILL }
610 { &hf_btamp_amp_assoc,
611 { "Assoc", "btamp.assoc",
612 FT_BYTES, BASE_NONE, NULL, 0x0,
613 NULL, HFILL }
617 /* Setup protocol subtree array */
618 static int *ett[] = {
619 &ett_btamp,
620 &ett_btamp_cmd,
621 &ett_btamp_caps,
622 &ett_btamp_controller_entry,
623 &ett_btamp_controller_list,
626 /* Register the protocol name and description */
627 proto_btamp = proto_register_protocol("Bluetooth AMP Packet", "BT AMP", "btamp");
629 btamp_handle = register_dissector("btamp", dissect_btamp, proto_btamp);
631 /* Required function calls to register the header fields and subtrees used */
632 proto_register_field_array(proto_btamp, hf, array_length(hf));
633 proto_register_subtree_array(ett, array_length(ett));
636 void
637 proto_reg_handoff_btamp(void)
639 dissector_add_uint("btl2cap.cid", BTL2CAP_FIXED_CID_AMP_MAN, btamp_handle);
643 * Editor modelines - https://www.wireshark.org/tools/modelines.html
645 * Local variables:
646 * c-basic-offset: 4
647 * tab-width: 8
648 * indent-tabs-mode: nil
649 * End:
651 * vi: set shiftwidth=4 tabstop=8 expandtab:
652 * :indentSize=4:tabSize=8:noTabs=true: