2 * Dissector for Bluetooth High Speed over wireless
3 * Copyright 2012 intel Corp.
4 * Written by Andrei Emeltchenko at intel dot com
8 * Wireshark - Network traffic analyzer
9 * By Gerald Combs <gerald@wireshark.org>
10 * Copyright 1998 Gerald Combs
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
29 #include <epan/packet.h>
30 #include "packet-llc.h"
33 static int hf_llc_bluetooth_pid
= -1;
36 * BLUETOOTH SPECIFICATION Version 4.0 [Vol 5] defines that
37 * before transmission, the PAL shall remove the HCI header,
38 * add LLC and SNAP headers and insert an 802.11 MAC header.
39 * Protocol identifier are described in Table 5.2.
42 #define AMP_U_L2CAP 0x0001
43 #define AMP_C_ACTIVITY_REPORT 0x0002
44 #define AMP_C_SECURITY_FRAME 0x0003
45 #define AMP_C_LINK_SUP_REQUEST 0x0004
46 #define AMP_C_LINK_SUP_REPLY 0x0005
48 static const value_string bluetooth_pid_vals
[] = {
49 { AMP_U_L2CAP
, "AMP_U L2CAP ACL data" },
50 { AMP_C_ACTIVITY_REPORT
, "AMP-C Activity Report" },
51 { AMP_C_SECURITY_FRAME
, "AMP-C Security frames" },
52 { AMP_C_LINK_SUP_REQUEST
, "AMP-C Link supervision request" },
53 { AMP_C_LINK_SUP_REPLY
, "AMP-C Link supervision reply" },
57 void proto_register_bt_oui(void);
58 void proto_reg_handoff_bt_oui(void);
61 * NOTE: there's no dissector here, just registration routines to set
62 * up the dissector table for the Bluetooth OUI
65 void proto_reg_handoff_bt_oui(void)
67 dissector_handle_t eapol_handle
;
68 dissector_handle_t btl2cap_handle
;
70 eapol_handle
= find_dissector("eapol");
71 btl2cap_handle
= find_dissector("btl2cap");
73 dissector_add_uint("llc.bluetooth_pid", AMP_C_SECURITY_FRAME
, eapol_handle
);
74 dissector_add_uint("llc.bluetooth_pid", AMP_U_L2CAP
, btl2cap_handle
);
78 void proto_register_bt_oui(void)
80 static hf_register_info hf
[] = {
81 { &hf_llc_bluetooth_pid
,
82 { "PID", "llc.bluetooth_pid", FT_UINT16
, BASE_HEX
,
83 VALS(bluetooth_pid_vals
), 0x0, "Protocol ID", HFILL
}
87 llc_add_oui(OUI_BLUETOOTH
, "llc.bluetooth_pid", "LLC Bluetooth OUI PID", hf
);