HACK: pinfo->private_data points to smb_info again
[wireshark-wip.git] / epan / dissectors / packet-lldp.h
blobbb81bd8ce7ea1d5f20592112a7ad84a54f2ae87f
1 /* packet-lldp.h
2 * Routines for LLDP dissection
3 * By Juan Gonzalez <juan.gonzalez@pikatech.com>
4 * Copyright 2005 MITEL
6 * July 2005
7 * Modified by: Brian Bogora <brian_bogora@mitel.com>
9 * $Id$
11 * Wireshark - Network traffic analyzer
12 * By Gerald Combs <gerald@wireshark.org>
13 * Copyright 1998 Gerald Combs
15 * This program is free software; you can redistribute it and/or
16 * modify it under the terms of the GNU General Public License
17 * as published by the Free Software Foundation; either version 2
18 * of the License, or (at your option) any later version.
20 * This program is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 * GNU General Public License for more details.
25 * You should have received a copy of the GNU General Public License
26 * along with this program; if not, write to the Free Software
27 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
29 #ifndef PACKET_LLDP_H__
30 #define PACKET_LLDP_H__
32 #include "oui.h"
34 static const value_string tlv_oui_subtype_vals[] = {
35 /* Currently, the manuf file calls this "Ieee8021"; "IEEE 802.1" looks better */
36 { OUI_IEEE_802_1, "IEEE 802.1" },
37 /* Currently, the manuf file calls this "Ieee8023"; "IEEE 802.3" looks better */
38 { OUI_IEEE_802_3, "IEEE 802.3" },
39 /* Currently, the manuf file calls this "Telecomm"; "TIA TR-41 Committee" looks better */
40 { OUI_MEDIA_ENDPOINT, "TIA TR-41 Committee" },
41 /* Currently, the manuf file calls this "Profibus" */
42 { OUI_PROFINET, "PROFINET" },
43 /* Currently, the manuf file calls this "Procurve", as it's assigned to HP! */
44 { OUI_IEEE_802_1QBG, "IEEE 802.1Qbg" },
45 { 0, NULL }
48 /* TLV Types */
49 #define END_OF_LLDPDU_TLV_TYPE 0x00 /* Mandatory */
50 #define CHASSIS_ID_TLV_TYPE 0x01 /* Mandatory */
51 #define PORT_ID_TLV_TYPE 0x02 /* Mandatory */
52 #define TIME_TO_LIVE_TLV_TYPE 0x03 /* Mandatory */
53 #define PORT_DESCRIPTION_TLV_TYPE 0x04
54 #define SYSTEM_NAME_TLV_TYPE 0x05
55 #define SYSTEM_DESCRIPTION_TLV_TYPE 0x06
56 #define SYSTEM_CAPABILITIES_TLV_TYPE 0x07
57 #define MANAGEMENT_ADDR_TLV_TYPE 0x08
58 #define ORGANIZATION_SPECIFIC_TLV_TYPE 0x7F
60 /* Masks */
61 #define TLV_TYPE_MASK 0xFE00
62 #define TLV_TYPE(value) (((value) & TLV_TYPE_MASK) >> 9)
63 #define TLV_INFO_LEN_MASK 0x01FF
64 #define TLV_INFO_LEN(value) ((value) & TLV_INFO_LEN_MASK)
66 /* IEEE 802.1Qbg Subtypes */
67 static const value_string ieee_802_1qbg_subtypes[] = {
68 { 0x00, "EVB" },
69 { 0x01, "CDCP" },
70 { 0x02, "VDP" },
71 { 0, NULL }
74 gint32 dissect_lldp_end_of_lldpdu(tvbuff_t *, packet_info *, proto_tree *, guint32);
76 #endif /* PACKET_LLDP_H__ */