2 * Routines for Aruba IAP header disassembly
3 * Copyright 2014, Alexis La Goutte <alexis.lagoutte at gmail dot com>
5 * Wireshark - Network traffic analyzer
6 * By Gerald Combs <gerald@wireshark.org>
7 * Copyright 1998 Gerald Combs
9 * SPDX-License-Identifier: GPL-2.0-or-later
14 * Aruba Instant AP broadcast on L2 Layer with ethertype 0x8ffd
15 * All frame start with 0xbeef (Magic number)
16 * Octet 1 : Header (version)
17 * Octet 2 : Type (only see type 3, 4, 5, 7 with IP Address...)
21 * Only for Type 3, 4, 5 and 7
22 * Octet 5 : Status (Master / Slave..)
23 * Octet 6-9 : timestamp
24 * Octet 10-13 : The address IP(v4) of VC (Virtual Controller)
26 * Octet 15-16 : Vlan ID (of Uplink)
27 * Octet 17-20 : Unknown...
31 #include <epan/packet.h>
32 #include <epan/addr_resolv.h>
34 #define ETHERTYPE_IAP 0x8ffd
35 #define MAGIC_IAP 0xbeef
37 void proto_register_aruba_iap(void);
38 void proto_reg_handoff_aruba_iap(void);
40 static dissector_handle_t iap_handle
;
42 static int proto_aruba_iap
;
43 static int ett_aruba_iap
;
45 static int hf_iap_magic
;
46 static int hf_iap_version
;
47 static int hf_iap_type
;
48 static int hf_iap_length
;
50 static int hf_iap_status
;
51 static int hf_iap_uptime
;
52 static int hf_iap_vc_ip
;
53 static int hf_iap_pvid
;
54 static int hf_iap_model
;
55 static int hf_iap_unknown_uint
;
56 static int hf_iap_unknown_bytes
;
58 static const value_string iap_model
[] = {
59 { 0x0a, "Orion (IAP-104, IAP-105, IAP-175, RAP-3WN and RAP-3WNP)" },
60 { 0x0f, "Cassiopeia (IAP-130 Series)" },
61 { 0x17, "Aries (RAP-155 and RAP-155P)" },
62 { 0x19, "Centaurus (IAP-224, IAP-225, IAP-214/215, IAP-274, IAP-275 and IAP-277)" },
63 { 0x1a, "Pegasus (RAP-108, RAP-109, IAP-114, IAP-115 and IAP-103)" },
64 { 0x1e, "Taurus (IAP-204/205, IAP-205H)" },
65 { 0x28, "Hercules (IAP-314/315, IAP-324/325, IAP 318 and IAP 374/375/377)" },
66 { 0x2b, "Lupus (IAP-334/335)" },
67 { 0x2e, "Vela (IAP-203H, IAP-207, IAP-203R and IAP-203RP)" },
68 { 0x30, "Ursa (IAP-303, IAP-304/305, IAP-365/367 and IAP-303H)" },
69 { 0x37, "Draco (IAP-344/345)" },
70 { 0x39, "Scorpio (IAP-514 and IAP-515)" },
71 { 0x40, "Gemini (IAP-500 Series)" },
72 { 0x47, "Norma (IAP-635)" },
77 dissect_aruba_iap(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void* data _U_
)
80 proto_tree
*aruba_iap_tree
;
85 magic
= tvb_get_ntohs(tvb
, offset
);
87 if(magic
!= MAGIC_IAP
)
92 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "IAP");
93 col_clear(pinfo
->cinfo
, COL_INFO
);
95 ti
= proto_tree_add_item(tree
, proto_aruba_iap
, tvb
, 0, -1, ENC_NA
);
96 aruba_iap_tree
= proto_item_add_subtree(ti
, ett_aruba_iap
);
98 proto_tree_add_item(aruba_iap_tree
, hf_iap_magic
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
101 proto_tree_add_item(aruba_iap_tree
, hf_iap_version
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
103 col_set_str(pinfo
->cinfo
, COL_INFO
, "Aruba Instant AP");
105 proto_tree_add_item(aruba_iap_tree
, hf_iap_type
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
106 type
= tvb_get_uint8(tvb
, offset
);
109 proto_tree_add_item(aruba_iap_tree
, hf_iap_length
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
112 proto_tree_add_item(aruba_iap_tree
, hf_iap_id
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
115 if(type
== 3 || type
== 4 || type
== 5 || type
== 7){
117 proto_tree_add_item(aruba_iap_tree
, hf_iap_status
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
120 proto_tree_add_item(aruba_iap_tree
, hf_iap_uptime
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
123 proto_tree_add_item(aruba_iap_tree
, hf_iap_vc_ip
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
124 col_append_fstr(pinfo
->cinfo
, COL_INFO
, " VC IP: %s", tvb_ip_to_str(pinfo
->pool
, tvb
, offset
));
127 proto_tree_add_item(aruba_iap_tree
, hf_iap_model
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
130 proto_tree_add_item(aruba_iap_tree
, hf_iap_pvid
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
133 proto_tree_add_item(aruba_iap_tree
, hf_iap_unknown_uint
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
136 proto_tree_add_item(aruba_iap_tree
, hf_iap_unknown_bytes
, tvb
, offset
, -1, ENC_NA
);
139 proto_tree_add_item(aruba_iap_tree
, hf_iap_unknown_bytes
, tvb
, offset
, -1, ENC_NA
);
142 return tvb_reported_length(tvb
);
146 proto_register_aruba_iap(void)
148 static hf_register_info hf
[] = {
150 { "Magic", "aruba_iap.magic", FT_UINT16
, BASE_HEX
, NULL
,0x0,
151 "Magic Number of IAP traffic (Always 0x8ffd)", HFILL
}},
154 { "Version", "aruba_iap.version", FT_UINT8
, BASE_DEC
, NULL
, 0x0,
158 { "Type", "aruba_iap.type", FT_UINT8
, BASE_DEC
, NULL
, 0x0,
159 "Type of message", HFILL
}},
162 { "Length", "aruba_iap.length", FT_UINT8
, BASE_DEC
, NULL
, 0x0,
166 { "Id", "aruba_iap.id", FT_UINT8
, BASE_DEC
, NULL
, 0x0,
170 { "Status", "aruba_iap.status", FT_UINT8
, BASE_DEC
, NULL
, 0x0,
174 { "Uptime", "aruba_iap.uptime", FT_UINT32
, BASE_DEC
, NULL
, 0x0,
178 { "VC IP", "aruba_iap.vc_ip", FT_IPv4
, BASE_NONE
, NULL
, 0x0,
179 "Address IP of Virtual Controller", HFILL
}},
182 { "PVID (Port Vlan ID)", "aruba_iap.pvid", FT_UINT16
, BASE_DEC
, NULL
, 0x0,
183 "Vlan ID (of Uplink)", HFILL
}},
186 { "Model", "aruba_iap.model", FT_UINT8
, BASE_DEC_HEX
, VALS(iap_model
), 0x0,
189 { &hf_iap_unknown_bytes
,
190 { "Unknown", "aruba_iap.unknown.bytes", FT_BYTES
, BASE_NONE
, NULL
, 0x0,
191 "Unknown Data...", HFILL
}},
193 { &hf_iap_unknown_uint
,
194 { "Unknown", "aruba_iap.unknown.uint", FT_UINT32
, BASE_DEC_HEX
, NULL
, 0x0,
195 "Unknown (UINT) Data...", HFILL
}},
200 static int *ett
[] = {
204 proto_aruba_iap
= proto_register_protocol("Aruba Instant AP Protocol",
205 "aruba_iap", "aruba_iap");
206 proto_register_field_array(proto_aruba_iap
, hf
, array_length(hf
));
207 proto_register_subtree_array(ett
, array_length(ett
));
209 iap_handle
= register_dissector("aruba_iap", dissect_aruba_iap
, proto_aruba_iap
);
214 proto_reg_handoff_aruba_iap(void)
216 dissector_add_uint("ethertype", ETHERTYPE_IAP
, iap_handle
);
220 * Editor modelines - https://www.wireshark.org/tools/modelines.html
225 * indent-tabs-mode: nil
228 * vi: set shiftwidth=4 tabstop=8 expandtab:
229 * :indentSize=4:tabSize=8:noTabs=true: