aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
authorAdrian Granados <adrian@intuitibits.com>2022-08-15 22:53:09 -0400
committerA Wireshark GitLab Utility <gerald+gitlab-utility@wireshark.org>2022-08-16 14:08:15 +0000
commit9a560060ad5be06471754cf7b91bb3ff56555681 (patch)
treed2cb56fc2575b987eca037af3a13ba47284eca6e /epan
parent321465db07daff4b45f66fa8961fff30df314b31 (diff)
ieee80211: Add dissector for Arista (Mojo) vendor specific IE
Dissector only supports type 6: AP Name.
Diffstat (limited to 'epan')
-rw-r--r--epan/dissectors/packet-ieee80211.c63
-rw-r--r--epan/oui.h1
2 files changed, 64 insertions, 0 deletions
diff --git a/epan/dissectors/packet-ieee80211.c b/epan/dissectors/packet-ieee80211.c
index 7e38f1fac7..7a2a293416 100644
--- a/epan/dissectors/packet-ieee80211.c
+++ b/epan/dissectors/packet-ieee80211.c
@@ -6084,6 +6084,10 @@ static int hf_ieee80211_vs_fortinet_system_apmodel = -1;
static int hf_ieee80211_vs_fortinet_system_apserial = -1;
static int hf_ieee80211_vs_fortinet_data = -1;
+static int hf_ieee80211_vs_arista_subtype = -1;
+static int hf_ieee80211_vs_arista_apname = -1;
+static int hf_ieee80211_vs_arista_data = -1;
+
static int hf_ieee80211_rsn_ie_ptk_keyid = -1;
static int hf_ieee80211_rsn_ie_gtk_kde_data_type = -1;
@@ -18482,6 +18486,46 @@ dissect_vendor_ie_fortinet(proto_item *item, proto_tree *ietree,
}
}
+#define ARISTA_APNAME 6
+static const value_string ieee80211_vs_arista_subtype_vals[] = {
+ { ARISTA_APNAME, "AP Name"},
+ { 0, NULL }
+};
+static void
+dissect_vendor_ie_arista(proto_item *item, proto_tree *ietree,
+ tvbuff_t *tvb, int offset, guint32 tag_len)
+{
+ guint8 type;
+ const guint8* name;
+
+ offset += 1; /* VS OUI Type */
+ tag_len -= 1;
+
+ type = tvb_get_guint8(tvb, offset);
+ proto_tree_add_item(ietree, hf_ieee80211_vs_arista_subtype, tvb, offset, 1, ENC_NA);
+ proto_item_append_text(item, ": %s", val_to_str_const(type, ieee80211_vs_arista_subtype_vals, "Unknown"));
+ offset += 1;
+ tag_len -= 1;
+
+ switch (type) {
+ case ARISTA_APNAME:
+ offset += 1;
+ tag_len -= 1;
+
+ proto_tree_add_item_ret_string(ietree, hf_ieee80211_vs_arista_apname, tvb,
+ offset, tag_len, ENC_ASCII|ENC_NA, wmem_packet_scope(), &name);
+ proto_item_append_text(item, " (%s)", name);
+ break;
+
+ default:
+ proto_tree_add_item(ietree, hf_ieee80211_vs_arista_data, tvb, offset,
+ tag_len, ENC_NA);
+ if (tag_len > 0)
+ proto_item_append_text(item, " (Data: %s)", tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, tag_len));
+ break;
+ }
+}
+
/* 802.11-2012 8.4.2.37 QoS Capability element */
static int
dissect_qos_capability(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset, int ftype)
@@ -27699,6 +27743,9 @@ ieee80211_tag_vendor_specific_ie(tvbuff_t *tvb, packet_info *pinfo, proto_tree *
case OUI_FORTINET:
dissect_vendor_ie_fortinet(field_data->item_tag, tree, tvb, offset, tag_vs_len);
break;
+ case OUI_MOJO_ARISTA:
+ dissect_vendor_ie_arista(field_data->item_tag, tree, tvb, offset, tag_vs_len);
+ break;
default:
proto_tree_add_item(tree, hf_ieee80211_tag_vendor_data, tvb, offset, tag_vs_len, ENC_NA);
@@ -47695,6 +47742,22 @@ proto_register_ieee80211(void)
FT_BYTES, BASE_NONE, NULL, 0,
NULL, HFILL }},
+ /* Vendor Specific : Arista Networks */
+ {&hf_ieee80211_vs_arista_subtype,
+ {"Subtype", "wlan.vs.arista.subtype",
+ FT_UINT8, BASE_DEC, VALS(ieee80211_vs_arista_subtype_vals), 0,
+ NULL, HFILL }},
+
+ {&hf_ieee80211_vs_arista_apname,
+ {"AP Name", "wlan.vs.arista.ap_name",
+ FT_STRINGZ, BASE_NONE, NULL, 0,
+ NULL, HFILL }},
+
+ {&hf_ieee80211_vs_arista_data,
+ {"Data", "wlan.vs.arista.data",
+ FT_BYTES, BASE_NONE, NULL, 0,
+ NULL, HFILL }},
+
{&hf_ieee80211_tsinfo,
{"Traffic Stream (TS) Info", "wlan.ts_info",
FT_UINT24, BASE_HEX, NULL, 0,
diff --git a/epan/oui.h b/epan/oui.h
index 3d3568a490..ab7723c73d 100644
--- a/epan/oui.h
+++ b/epan/oui.h
@@ -47,6 +47,7 @@
#define OUI_SONY_ERICSSON_3 0x000FDE /* Sony Ericsson Mobile Communications AB */
#define OUI_FORTINET 0x00090F /* Fortinet */
#define OUI_CIMETRICS 0x001090 /* Cimetrics, Inc. */
+#define OUI_MOJO_ARISTA 0x001174 /* Arista Networks (Formerly Mojo Networks) */
#define OUI_IEEE_802_3 0x00120F /* IEEE 802.3 */
#define OUI_MEDIA_ENDPOINT 0x0012BB /* Media (TIA TR-41 Committee) */
#define OUI_SONY_ERICSSON_4 0x0012EE /* Sony Ericsson Mobile Communications AB */