diff options
author | Guy Harris <guy@alum.mit.edu> | 2014-06-01 02:19:03 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2014-06-01 09:19:40 +0000 |
commit | d55bb723e22675bfa65b8e2d7598aeaad34e9c5c (patch) | |
tree | bc6a08e11df6bf2178beb49491789a07415f8bc4 /epan | |
parent | 7c68a8e540399da07a8137e91b443039ab7ed73d (diff) |
Just have one value_string table for OUIs.
While we're at it, get rid of duplicate #defines for some OUIs, sort the
OUI #defines, and fix some routine names.
Change-Id: I8f4e5408b44896c3629a0014299b060ebc15bab6
Reviewed-on: https://code.wireshark.org/review/1906
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'epan')
-rw-r--r-- | epan/dissectors/packet-ecp-oui.c | 14 | ||||
-rw-r--r-- | epan/dissectors/packet-llc.c | 2 | ||||
-rw-r--r-- | epan/dissectors/packet-lldp.c | 4 | ||||
-rw-r--r-- | epan/oui.c | 24 | ||||
-rw-r--r-- | epan/oui.h | 15 |
5 files changed, 20 insertions, 39 deletions
diff --git a/epan/dissectors/packet-ecp-oui.c b/epan/dissectors/packet-ecp-oui.c index 00869d215d..6e4fee6d9b 100644 --- a/epan/dissectors/packet-ecp-oui.c +++ b/epan/dissectors/packet-ecp-oui.c @@ -199,9 +199,9 @@ dissect_vdp_fi_macvid(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, g return tempOffset-offset; } -/* Dissect VDP TLVs */ +/* Dissect Organizationally Defined TLVs */ static gint32 -dissect_vdp_tlv(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint32 offset) +dissect_vdp_org_specific_tlv(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint32 offset) { guint16 tempLen; guint16 len; @@ -223,7 +223,7 @@ dissect_vdp_tlv(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint32 oui = tvb_get_ntoh24(tvb, (tempOffset)); /* maintain previous OUI names. If not included, look in manuf database for OUI */ - ouiStr = val_to_str_const(oui, tlv_oui_subtype_vals, "Unknown"); + ouiStr = val_to_str_const(oui, oui_vals, "Unknown"); if (strcmp(ouiStr, "Unknown")==0) { ouiStr = uint_get_manuf_name_if_known(oui); if(ouiStr==NULL) ouiStr="Unknown"; @@ -296,7 +296,7 @@ dissect_vdp_tlv(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint32 /* Dissect End of VDP TLV (Mandatory) */ gint32 -dissect_vdp_end_of_vdpdu(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint32 offset) +dissect_vdp_end_of_vdpdu_tlv(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint32 offset) { guint16 tempLen; guint16 tempShort; @@ -356,10 +356,10 @@ dissect_ecp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) switch (tempType) { case ORG_SPECIFIC_TLV_TYPE: - tempLen = dissect_vdp_tlv(tvb, pinfo, ecp_tree, offset); + tempLen = dissect_vdp_org_specific_tlv(tvb, pinfo, ecp_tree, offset); break; case END_OF_VDPDU_TLV_TYPE: - tempLen = dissect_vdp_end_of_vdpdu(tvb, pinfo, ecp_tree, offset); + tempLen = dissect_vdp_end_of_vdpdu_tlv(tvb, pinfo, ecp_tree, offset); break; default: tempLen = dissect_ecp_unknown_tlv(tvb, pinfo, ecp_tree, offset); @@ -407,7 +407,7 @@ void proto_register_ecp_oui(void) #if 0 { &hf_ecp_vdp_oui, { "Organization Unique Code", "ecp.vdp.oui", FT_UINT24, BASE_HEX, - VALS(tlv_oui_subtype_vals), 0x0, NULL, HFILL } + VALS(oui_vals), 0x0, NULL, HFILL } }, #endif { &hf_ecp_vdp_mode, diff --git a/epan/dissectors/packet-llc.c b/epan/dissectors/packet-llc.c index 856536f122..225f0d15ec 100644 --- a/epan/dissectors/packet-llc.c +++ b/epan/dissectors/packet-llc.c @@ -623,7 +623,7 @@ dissect_snap(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, } break; - case OUI_BRIDGED: + case OUI_IEEE_802_1: /* * MAC frames bridged over ATM (RFC 2684) or Frame Relay * (RFC 2427). diff --git a/epan/dissectors/packet-lldp.c b/epan/dissectors/packet-lldp.c index 0753ded38a..4126f9110f 100644 --- a/epan/dissectors/packet-lldp.c +++ b/epan/dissectors/packet-lldp.c @@ -3025,7 +3025,7 @@ dissect_organizational_specific_tlv(tvbuff_t *tvb, packet_info *pinfo, proto_tre return tLength; } /* maintain previous OUI names. If not included, look in manuf database for OUI */ - ouiStr = val_to_str_const(oui, tlv_oui_subtype_vals, "Unknown"); + ouiStr = val_to_str_const(oui, oui_vals, "Unknown"); if (strcmp(ouiStr, "Unknown")==0) { ouiStr = uint_get_manuf_name_if_known(oui); if(ouiStr==NULL) ouiStr="Unknown"; @@ -3516,7 +3516,7 @@ proto_register_lldp(void) }, { &hf_org_spc_oui, { "Organization Unique Code", "lldp.orgtlv.oui", FT_UINT24, BASE_HEX, - VALS(tlv_oui_subtype_vals), 0x0, NULL, HFILL } + VALS(oui_vals), 0x0, NULL, HFILL } }, { &hf_dcbx_type, { "DCBx Protocol", "lldp.dcbx.proto", FT_UINT8, BASE_HEX, diff --git a/epan/oui.c b/epan/oui.c index dfd24aede4..af32beeba3 100644 --- a/epan/oui.c +++ b/epan/oui.c @@ -48,6 +48,7 @@ http://www.cisco.com/univercd/cc/td/doc/product/software/ios113ed/113ed_cr/ibm_r { OUI_CATENA, "Catena Networks" }, { OUI_SONY_ERICSSON, "Sony Ericsson Mobile Communications AB" }, { OUI_SONY_ERICSSON_2, "Sony Ericsson Mobile Communications AB" }, + /* PROFINET */ { OUI_PROFINET, "PROFIBUS Nutzerorganisation e.V." }, { OUI_SONY_ERICSSON_3, "Sony Ericsson Mobile Communications AB" }, { OUI_CIMETRICS, "Cimetrics" }, @@ -60,12 +61,13 @@ http://www.cisco.com/univercd/cc/td/doc/product/software/ios113ed/113ed_cr/ibm_r { OUI_SONY_ERICSSON_7, "Sony Ericsson Mobile Communications AB" }, { OUI_BLUETOOTH, "Bluetooth SIG, Inc." }, { OUI_SONY_ERICSSON_8, "Sony Ericsson Mobile Communications AB" }, + /* Currently, the manuf file calls this "Procurve", as it's assigned to HP! */ { OUI_IEEE_802_1QBG, "IEEE 802.1Qbg" }, { OUI_TURBOCELL, "Karlnet (Turbocell)" }, { OUI_CISCOWL, "Cisco Wireless (Aironet) L2" }, { OUI_MARVELL, "Marvell Semiconductor" }, - { OUI_BRIDGED, "Frame Relay or ATM bridged frames" }, - { OUI_IEEE_802_1, "IEEE 802.1 Committee" }, + /* Used for RFC 2427 bridged Frame Relay and RFC 2684 bridged ATM */ + { OUI_IEEE_802_1, "IEEE 802.1" }, { OUI_ATM_FORUM, "ATM Forum" }, { OUI_EXTREME, "Extreme Networks" }, /* RFC 2427, RFC 2684 */ @@ -77,22 +79,6 @@ http://www.cisco.com/univercd/cc/td/doc/product/software/ios113ed/113ed_cr/ibm_r /* Registry Name: PPP Vendor Specific OUI Options */ { OUI_3GPP2, "3GPP2 Vendor specific packet ID" }, { OUI_ERICSSON_2, "Ericsson Group" }, + { OUI_DCBX, "Data Center Bridging Capabilities Exchange" }, { 0, NULL } }; - -const value_string tlv_oui_subtype_vals[] = { - /* Currently, the manuf file calls this "Ieee8021"; "IEEE 802.1" looks better */ - { OUI_IEEE_802_1, "IEEE 802.1" }, - /* Currently, the manuf file calls this "Ieee8023"; "IEEE 802.3" looks better */ - { OUI_IEEE_802_3, "IEEE 802.3" }, - /* Currently, the manuf file calls this "Telecomm"; "TIA TR-41 Committee" looks better */ - { OUI_MEDIA_ENDPOINT, "TIA TR-41 Committee" }, - /* Currently, the manuf file calls this "Profibus" */ - { OUI_PROFINET, "PROFINET" }, - /* Currently, the manuf file calls this "Procurve", as it's assigned to HP! */ - { OUI_IEEE_802_1QBG, "IEEE 802.1Qbg" }, - /* Data Center Bridging Exchange */ - { OUI_DCBX, "Data Center Bridging Capabilities Exchange" }, - { 0, NULL } -}; - diff --git a/epan/oui.h b/epan/oui.h index b479aad07a..48ff23c5d3 100644 --- a/epan/oui.h +++ b/epan/oui.h @@ -46,8 +46,10 @@ #define OUI_CATENA 0x00025A /* Catena Networks */ #define OUI_ATHEROS 0x00037F /* Atheros Communications */ #define OUI_SONY_ERICSSON 0x000AD9 /* Sony Ericsson Mobile Communications AB */ +#define OUI_ARUBA 0x000B86 /* Aruba Networks */ #define OUI_SONY_ERICSSON_2 0x000E07 /* Sony Ericsson Mobile Communications AB */ #define OUI_PROFINET 0x000ECF /* PROFIBUS Nutzerorganisation e.V. */ +#define OUI_RSN 0x000FAC /* Wi-Fi : RSN */ #define OUI_SONY_ERICSSON_3 0x000FDE /* Sony Ericsson Mobile Communications AB */ #define OUI_CIMETRICS 0x001090 /* Cimetrics, Inc. */ #define OUI_IEEE_802_3 0x00120F /* IEEE 802.3 */ @@ -61,13 +63,14 @@ #define OUI_SONY_ERICSSON_8 0x001963 /* Sony Ericsson Mobile Communications AB */ #define OUI_DCBX 0x001B21 /* Data Center Bridging Capabilities Exchange Protocol */ #define OUI_IEEE_802_1QBG 0x001B3F /* IEEE 802.1 Qbg */ +#define OUI_NINTENDO 0x001F32 #define OUI_TURBOCELL 0x0020F6 /* KarlNet, who brought you Turbocell */ #define OUI_CISCOWL 0x004096 /* Cisco Wireless (Aironet) */ #define OUI_MARVELL 0x005043 /* Marvell Semiconductor */ +#define OUI_WPAWME 0x0050F2 /* Wi-Fi : WPA / WME */ #define OUI_ERICSSON_2 0x008037 /* Ericsson Group */ -#define OUI_BRIDGED 0x0080C2 /* Bridged Frame-Relay, RFC 2427 */ - /* and Bridged ATM, RFC 2684 */ #define OUI_IEEE_802_1 0x0080C2 /* IEEE 802.1 Committee */ +#define OUI_PRE11N 0x00904C /* Wi-Fi : 802.11 Pre-N */ #define OUI_ATM_FORUM 0x00A03E /* ATM Forum */ #define OUI_EXTREME 0x00E02B /* Extreme EDP/ESRP */ #define OUI_CABLE_BPDU 0x00E02F /* DOCSIS spanning tree BPDU */ @@ -78,17 +81,9 @@ #define OUI_HP_2 0x00805F /* Hewlett-Packard */ #define OUI_WFA 0x506F9A /* Wi-Fi Alliance */ #define OUI_3GPP2 0xCF0002 /* 3GPP2 */ -#define OUI_ARUBA 0x000b86 /* Aruba Networks */ -#define OUI_NINTENDO 0x001F32 - -#define OUI_WPAWME 0x0050F2 /* Wi-Fi : WPA / WME */ -#define OUI_RSN 0x000FAC /* Wi-Fi : RSN */ -#define OUI_PRE11N 0x00904C /* Wi-Fi : 802.11 Pre-N */ extern const value_string oui_vals[]; -extern const value_string tlv_oui_subtype_vals[]; - #endif /* |