diff options
author | Alexis La Goutte <alexis.lagoutte@gmail.com> | 2013-04-07 15:57:11 +0000 |
---|---|---|
committer | Alexis La Goutte <alexis.lagoutte@gmail.com> | 2013-04-07 15:57:11 +0000 |
commit | 8576eb409f8f6ea554f6bd89a9dc846a5338049e (patch) | |
tree | 18fcd52c485347658ed0531696e88b1d91aa30f4 /epan | |
parent | 5bd548e9b567d7fbab15ea1b17cd76ee6e6882a4 (diff) | |
download | wireshark-8576eb409f8f6ea554f6bd89a9dc846a5338049e.tar.gz |
Move #define OUI include in ieee80211 dissector to epan/oui.h Add Modelines to epan/oui.h
svn path=/trunk/; revision=48768
Diffstat (limited to 'epan')
-rw-r--r-- | epan/dissectors/packet-ieee80211.c | 30 | ||||
-rw-r--r-- | epan/oui.h | 17 |
2 files changed, 27 insertions, 20 deletions
diff --git a/epan/dissectors/packet-ieee80211.c b/epan/dissectors/packet-ieee80211.c index a515b51aa6..9638e4d962 100644 --- a/epan/dissectors/packet-ieee80211.c +++ b/epan/dissectors/packet-ieee80211.c @@ -801,13 +801,6 @@ static const value_string tag_num_vals[] = { }; static value_string_ext tag_num_vals_ext = VALUE_STRING_EXT_INIT(tag_num_vals); -#define WPA_OUI (const guint8 *) "\x00\x50\xF2" -#define RSN_OUI (const guint8 *) "\x00\x0F\xAC" -#define WME_OUI (const guint8 *) "\x00\x50\xF2" -#define PRE_11N_OUI (const guint8 *) "\x00\x90\x4c" /* 802.11n pre 1 oui */ -#define WFA_OUI (const guint8 *) "\x50\x6f\x9a" -#define WAPI_OUI (const guint8 *) "\x00\x14\x72" - /* WFA vendor specific subtypes */ #define WFA_SUBTYPE_P2P 9 @@ -7345,7 +7338,7 @@ dissect_vendor_ie_wpawme(proto_tree *tree, tvbuff_t *tvb, int offset, guint32 ta proto_tree_add_item(wpa_mcs_tree, hf_ieee80211_wfa_ie_wpa_mcs_oui, tvb, offset, 3, ENC_BIG_ENDIAN); /* Check if OUI is 00:50:F2 (WFA) */ - if (tvb_get_ntoh24(tvb, offset) == 0x0050F2) + if (tvb_get_ntoh24(tvb, offset) == OUI_WPAWME) { proto_tree_add_item(wpa_mcs_tree, hf_ieee80211_wfa_ie_wpa_mcs_wfa_type, tvb, offset + 3, 1, ENC_BIG_ENDIAN); } else { @@ -7367,7 +7360,7 @@ dissect_vendor_ie_wpawme(proto_tree *tree, tvbuff_t *tvb, int offset, guint32 ta proto_tree_add_item(wpa_sub_ucs_tree, hf_ieee80211_wfa_ie_wpa_ucs_oui, tvb, offset, 3, ENC_BIG_ENDIAN); /* Check if OUI is 00:50:F2 (WFA) */ - if (tvb_get_ntoh24(tvb, offset) == 0x0050F2) + if (tvb_get_ntoh24(tvb, offset) == OUI_WPAWME) { proto_tree_add_item(wpa_sub_ucs_tree, hf_ieee80211_wfa_ie_wpa_ucs_wfa_type, tvb, offset+3, 1, ENC_BIG_ENDIAN); proto_item_append_text(wpa_ucs_item, " %s", wpa_ucs_return(tvb_get_ntohl(tvb, offset))); @@ -7391,7 +7384,7 @@ dissect_vendor_ie_wpawme(proto_tree *tree, tvbuff_t *tvb, int offset, guint32 ta proto_tree_add_item(wpa_sub_akms_tree, hf_ieee80211_wfa_ie_wpa_akms_oui, tvb, offset, 3, ENC_BIG_ENDIAN); /* Check if OUI is 00:50:F2 (WFA) */ - if (tvb_get_ntoh24(tvb, offset) == 0x0050F2) + if (tvb_get_ntoh24(tvb, offset) == OUI_WPAWME) { proto_tree_add_item(wpa_sub_akms_tree, hf_ieee80211_wfa_ie_wpa_akms_wfa_type, tvb, offset+3, 1, ENC_BIG_ENDIAN); proto_item_append_text(wpa_akms_item, " %s", wpa_akms_return(tvb_get_ntohl(tvb, offset))); @@ -7912,7 +7905,7 @@ dissect_rsn_ie(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, proto_tree_add_item(rsn_gcs_tree, hf_ieee80211_rsn_gcs_oui, tvb, offset, 3, ENC_BIG_ENDIAN); /* Check if OUI is 00:0F:AC (ieee80211) */ - if (tvb_get_ntoh24(tvb, offset) == 0x000FAC) + if (tvb_get_ntoh24(tvb, offset) == OUI_RSN) { proto_tree_add_item(rsn_gcs_tree, hf_ieee80211_rsn_gcs_80211_type, tvb, offset + 3, 1, ENC_BIG_ENDIAN); } else { @@ -7941,7 +7934,7 @@ dissect_rsn_ie(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, proto_tree_add_item(rsn_sub_pcs_tree, hf_ieee80211_rsn_pcs_oui, tvb, offset, 3, ENC_BIG_ENDIAN); /* Check if OUI is 00:0F:AC (ieee80211) */ - if (tvb_get_ntoh24(tvb, offset) == 0x000FAC) + if (tvb_get_ntoh24(tvb, offset) == OUI_RSN) { proto_tree_add_item(rsn_sub_pcs_tree, hf_ieee80211_rsn_pcs_80211_type, tvb, offset+3, 1, ENC_BIG_ENDIAN); proto_item_append_text(rsn_pcs_item, " %s", rsn_pcs_return(tvb_get_ntohl(tvb, offset))); @@ -7977,7 +7970,7 @@ dissect_rsn_ie(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, proto_tree_add_item(rsn_sub_akms_tree, hf_ieee80211_rsn_akms_oui, tvb, offset, 3, ENC_BIG_ENDIAN); /* Check if OUI is 00:0F:AC (ieee80211) */ - if (tvb_get_ntoh24(tvb, offset) == 0x000FAC) + if (tvb_get_ntoh24(tvb, offset) == OUI_RSN) { proto_tree_add_item(rsn_sub_akms_tree, hf_ieee80211_rsn_akms_80211_type, tvb, offset+3, 1, ENC_BIG_ENDIAN); proto_item_append_text(rsn_akms_item, " %s", rsn_akms_return(tvb_get_ntohl(tvb, offset))); @@ -8032,7 +8025,7 @@ dissect_rsn_ie(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, rsn_gmcs_tree = proto_item_add_subtree(rsn_gmcs_item, ett_rsn_gmcs_tree); proto_tree_add_item(rsn_gmcs_tree, hf_ieee80211_rsn_gmcs_oui, tvb, offset, 3, ENC_BIG_ENDIAN); /* Check if OUI is 00:0F:AC (ieee80211) */ - if (tvb_get_ntoh24(tvb, offset) == 0x000FAC) + if (tvb_get_ntoh24(tvb, offset) == OUI_RSN) { proto_tree_add_item(rsn_gmcs_tree, hf_ieee80211_rsn_gmcs_80211_type, tvb, offset + 3, 1, ENC_BIG_ENDIAN); } else { @@ -11323,16 +11316,13 @@ add_tagged_field(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset switch (oui) { /* 802.11 specific vendor ids */ -# define WPAWME_OUI 0x0050F2 -# define RSNOUI_VAL 0x000FAC -# define PRE11N_OUI 0x00904c - case WPAWME_OUI: + case OUI_WPAWME: offset = dissect_vendor_ie_wpawme(tree, tvb, offset, tag_vs_len, ftype); break; - case RSNOUI_VAL: + case OUI_RSN: dissect_vendor_ie_rsn(ti, tree, tvb, offset, tag_vs_len); break; - case PRE11N_OUI: + case OUI_PRE11N: dissect_vendor_ie_ht(tvb, pinfo, tree, offset, ti, ti_len, tag_vs_len); break; case OUI_WFA: diff --git a/epan/oui.h b/epan/oui.h index 46ada702e5..87d282de49 100644 --- a/epan/oui.h +++ b/epan/oui.h @@ -80,9 +80,26 @@ #define OUI_WFA 0x506F9A /* Wi-Fi Alliance */ #define OUI_3GPP2 0xCF0002 /* 3GPP2 */ +#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 */ + /* * Defined in packet-llc.c */ extern const value_string oui_vals[]; #endif + +/* + * Editor modelines + * + * Local Variables: + * c-basic-offset: 4 + * tab-width: 8 + * indent-tabs-mode: nil + * End: + * + * ex: set shiftwidth=4 tabstop=8 expandtab: + * :indentSize=4:tabSize=8:noTabs=true: + */ |