/src/wireshark/epan/dissectors/packet-wlccp.c
Line | Count | Source |
1 | | /* packet-wlccp.c |
2 | | * Routines for Cisco Wireless LAN Context Control Protocol dissection |
3 | | * |
4 | | * Copyright 2005, Joerg Mayer (see AUTHORS file) |
5 | | * Copyright 2006, Stephen Fisher (see AUTHORS file) |
6 | | * Copyright 2007, Kevin A. Noll <maillistnoll@earthlink.net> |
7 | | * |
8 | | * Wireshark - Network traffic analyzer |
9 | | * By Gerald Combs <gerald@wireshark.org> |
10 | | * Copyright 1998 Gerald Combs |
11 | | * |
12 | | * The CISCOWL dissector was merged into this one. |
13 | | * |
14 | | * SPDX-License-Identifier: GPL-2.0-or-later |
15 | | */ |
16 | | |
17 | | /* Version 0x00 was reverse engineered */ |
18 | | /* Version 0xC1 Protocol reference: US Patent Application 0050220054 */ |
19 | | /* and considerable reverse engineering due to the patent application*/ |
20 | | /* being incomplete */ |
21 | | |
22 | | /* More clues to version 0x00 of the protocol: |
23 | | * |
24 | | * Header (Eth V2 or SNAP) |
25 | | * Length (2 bytes) |
26 | | * Type (2 bytes) |
27 | | * 0202: Unknown, Length 36 (14 + 20 + 2) |
28 | | * 4001: Unknown, Length 48 (14 + 32 + 2) |
29 | | * 4601: Unknown, Length 34 (14 + 18 + 2) |
30 | | * 4081 on Eth V2: Name, Version Length 84 (14 + 48 + 20 + 2) |
31 | | * 4081 on 802.3: Name Length 72 (14 + 56 + 2) |
32 | | * Dst MAC (6 bytes) |
33 | | * Src MAC (6 bytes) |
34 | | * Unknown1 (2 bytes) Unknown19 + Unknown2 may be a MAC address on type 0202 |
35 | | * Unknown2 (4 bytes) see Unknown19 |
36 | | * 0 (17 bytes) |
37 | | * Device IP (4 bytes) |
38 | | * 0 (2 bytes) |
39 | | * Device name (8 bytes) |
40 | | * 0 (20 bytes) |
41 | | * Unknown3 (2 bytes) |
42 | | * Unknown4 (4 bytes) |
43 | | * Version string (10 bytes) |
44 | | * 0 (4 bytes) |
45 | | * 0 (2 bytes) |
46 | | */ |
47 | | |
48 | | #include "config.h" |
49 | | |
50 | | #include <epan/packet.h> |
51 | | #include <epan/etypes.h> |
52 | | #include <epan/oui.h> |
53 | | #include "packet-llc.h" |
54 | | |
55 | | void proto_register_wlccp(void); |
56 | | void proto_reg_handoff_wlccp(void); |
57 | | |
58 | | static dissector_handle_t wlccp_handle; |
59 | | |
60 | | /* The UDP port that WLCCP is expected to ride on */ |
61 | | /* WLCCP also uses an LLC OUI type and an ethertype */ |
62 | 14 | #define WLCCP_UDP_PORT 2887 /* Not IANA registered */ |
63 | | |
64 | | |
65 | | /* SAP is 2-bit version and 6-bit Type */ |
66 | 14 | #define SAP_VERSION_MASK (0xC0) |
67 | 50 | #define SAP_VALUE_MASK (0x3f) |
68 | | |
69 | | static const value_string wlccp_sap_vs[] = { |
70 | | { 0x0, "Context Management" }, |
71 | | { 0x1, "Security" }, |
72 | | { 0x2, "Radio Resource Management" }, |
73 | | { 0x3, "QOS" }, |
74 | | { 0x4, "Network Management" }, |
75 | | { 0x5, "MIP" }, |
76 | | { 0, NULL } |
77 | | }; |
78 | | |
79 | 45 | #define WLCCP_SAP_CCM (0x00) |
80 | 0 | #define WLCCP_SAP_SEC (0x01) |
81 | 0 | #define WLCCP_SAP_RRM (0x02) |
82 | 0 | #define WLCCP_SAP_QOS (0x03) |
83 | 9 | #define WLCCP_SAP_NM (0x04) |
84 | 0 | #define WLCCP_SAP_MIP (0x05) |
85 | | |
86 | | static const value_string wlccp_node_type_vs[] = { |
87 | | { 0x00, "None" }, |
88 | | { 0x01, "Access Point (AP)" }, |
89 | | { 0x02, "Subnet Context Manager (SCM)" }, |
90 | | { 0x04, "Local Context Manager (LCM)" }, |
91 | | { 0x08, "Campus Context Manager (CCM)" }, |
92 | | { 0x10, "Infrastructure (ICN)" }, |
93 | | { 0x40, "Client" }, |
94 | | /* { 0x8000, "Multi Mask?" }, */ |
95 | | { 0, NULL } |
96 | | }; |
97 | | |
98 | | /* The Message Type field contains a 2-bit Sub-Type and a 6-bit Base Message Type */ |
99 | 32 | #define MT_SUBTYPE (0xC0) |
100 | 134 | #define MT_BASE_MSG_TYPE (0x3F) |
101 | | |
102 | | static const value_string wlccp_subtype_vs[] = { |
103 | | { 0x0, "Request" }, |
104 | | { 0x1, "Reply" }, |
105 | | { 0x2, "Confirm" }, |
106 | | { 0x3, "Ack" }, |
107 | | { 0, NULL } |
108 | | }; |
109 | | |
110 | | /* The Message Type definitions are a combination of the SAP and the Type_ID */ |
111 | | /* fields. These mappings are not well documented and have been gathered from a */ |
112 | | /* combination of the WLCCP patent application, experimentation, and WLCCP */ |
113 | | /* device logs. */ |
114 | | |
115 | | /* For SAP=0 */ |
116 | | static const value_string wlccp_msg_type_vs_0[] = { |
117 | | { 0x1, "SCM Advertise" }, |
118 | | { 0x2, "CCM Advertise" }, |
119 | | { 0x3, "Registration" }, |
120 | | { 0x4, "DeRegistration" }, |
121 | | { 0x5, "Detach" }, |
122 | | { 0x6, "Context" }, |
123 | | { 0x7, "Path Update" }, |
124 | | { 0x8, "Path Check" }, |
125 | | { 0x9, "PreRegistration" }, |
126 | | { 0x0a, "Trace" }, |
127 | | { 0x0b, "cmAAA EAP Authent" }, |
128 | | { 0x0c, "cmPathInit Path Authent" }, |
129 | | { 0x0f, "cmWIDS" }, |
130 | | { 0, NULL } |
131 | | |
132 | | }; |
133 | | |
134 | | /* For SAP=1 */ |
135 | | static const value_string wlccp_msg_type_vs_1[] = { |
136 | | /* { 0x1, "Unknown" }, */ |
137 | | { 0, NULL } |
138 | | |
139 | | }; |
140 | | |
141 | | /* For SAP=2 */ |
142 | | static const value_string wlccp_msg_type_vs_2[] = { |
143 | | { 0x1, "rmReq" }, |
144 | | { 0x2, "rmReqRoutingResp" }, |
145 | | { 0x3, "rmReport" }, |
146 | | { 0, NULL } |
147 | | |
148 | | }; |
149 | | |
150 | | /* For SAP=3 */ |
151 | | static const value_string wlccp_msg_type_vs_3[] = { |
152 | | /* { 0x1, "Unknown" }, */ |
153 | | { 0, NULL } |
154 | | |
155 | | }; |
156 | | |
157 | | /* For SAP=4 */ |
158 | | static const value_string wlccp_msg_type_vs_4[] = { |
159 | | { 0x01, "nmAck" }, |
160 | | { 0x10, "nmConfigRequest" }, |
161 | | { 0x11, "nmConfigReply" }, |
162 | | { 0x20, "nmApRegistration" }, |
163 | | { 0x21, "nmScmStateChange" }, |
164 | | { 0x22, "nmScmKeepActive" }, |
165 | | { 0x30, "nmClientEventReport" }, |
166 | | { 0x31, "nmAllClientRefreshRequest" }, |
167 | | { 0, NULL } |
168 | | |
169 | | }; |
170 | | |
171 | | /* For SAP=5 */ |
172 | | static const value_string wlccp_msg_type_vs_5[] = { |
173 | | /* { 0x1, "Unknown" }, */ |
174 | | { 0, NULL } |
175 | | |
176 | | }; |
177 | | |
178 | | |
179 | | /* Mask definitions for the CM Flags field */ |
180 | 14 | #define F_RETRY (1<<15) |
181 | 14 | #define F_RESPONSE_REQUEST (1<<14) |
182 | 14 | #define F_TLV (1<<13) |
183 | 14 | #define F_INBOUND (1<<12) |
184 | 14 | #define F_OUTBOUND (1<<11) |
185 | 14 | #define F_HOPWISE_ROUTING (1<<10) |
186 | 14 | #define F_ROOT_CM (1<<9) |
187 | 14 | #define F_RELAY (1<<8) |
188 | 14 | #define F_MIC (1<<7) |
189 | | |
190 | | /* Mask definitions for the RM Flags field */ |
191 | 14 | #define RM_F_REQUEST_REPLY (1<<0) |
192 | 14 | #define RM_F_MIC (1<<1) |
193 | | |
194 | | /* Mask definitions for the NM Flags field */ |
195 | | /* the NM flags are the same as the CM flags except there is no |
196 | | INBOUND, OUTBOUND, HOPWISE_ROUTING, ROOT_CM, or RELAY flag, and |
197 | | the RESPONSE_REQUEST flag is renamed ACK_REQD |
198 | | */ |
199 | 14 | #define F_ACK_REQD (1<<14) |
200 | | |
201 | | |
202 | | /* Mask definitions for the SCM Flags field */ |
203 | 14 | #define F_SCM_LAYER2UPDATE (1<<3) |
204 | 14 | #define F_SCM_UNATTACHED (1<<2) |
205 | 14 | #define F_SCM_UNSCHEDULED (1<<1) |
206 | 14 | #define F_SCM_ACTIVE (1<<0) |
207 | | |
208 | | /* Mask definitions for the SCM Priority Flags field */ |
209 | 14 | #define F_SCM_PRIORITY 0xfe |
210 | 14 | #define F_SCM_PREFERRED 0x01 |
211 | | |
212 | | /* Mask definitions for the SCM Bridge Priority Flags field */ |
213 | 14 | #define F_SCM_BRIDGE_PRIORITY 0xfe |
214 | 14 | #define F_SCM_BRIDGE_DISABLE 0x01 |
215 | | |
216 | | /* The TLV Type definitions are a combination of the TLV Group and the */ |
217 | | /* TLV Type ID fields. These mappings are not well documented and have been */ |
218 | | /* gathered from a combination of the WLCCP patent application, */ |
219 | | /* experimentation, and WLCCP device logs */ |
220 | | |
221 | | /* The TLV Group/Type Field contains some flags and the Group ID and Type ID */ |
222 | 51 | #define TLV_F_CONTAINER (0x8000) |
223 | 14 | #define TLV_F_ENCRYPTED (0x4000) |
224 | 14 | #define TLV_F_RESVD (0x3000) |
225 | | #define TLV_F_RESVD2 (0x2000) |
226 | | #define TLV_F_RESVD3 (0x1000) |
227 | 14 | #define TLV_F_REQUEST (0x0080) |
228 | 52 | #define TLV_GROUP_ID (0x0F00) |
229 | 136 | #define TLV_TYPE_ID (0x007F) |
230 | | |
231 | | static const value_string wlccp_tlv_group_vs[] = { |
232 | | { 0x0, "WLCCP Group" }, |
233 | | { 0x1, "Security Group" }, |
234 | | { 0x2, "RRM Group" }, |
235 | | { 0x3, "QOS Group" }, |
236 | | { 0x4, "NM Group" }, |
237 | | { 0x5, "MIP Group" }, |
238 | | { 0, NULL } |
239 | | }; |
240 | | |
241 | | |
242 | 16 | #define WLCCP_TLV_GROUP_WLCCP (0x00) |
243 | 2 | #define WLCCP_TLV_GROUP_SEC (0x01) |
244 | 22 | #define WLCCP_TLV_GROUP_RRM (0x02) |
245 | 12 | #define WLCCP_TLV_GROUP_QOS (0x03) |
246 | 2 | #define WLCCP_TLV_GROUP_NM (0x04) |
247 | 2 | #define WLCCP_TLV_GROUP_MIP (0x05) |
248 | | |
249 | | /* Group 0 */ |
250 | | static const value_string wlccp_tlv_typeID_0[] = { |
251 | | { 0x00, "NULL TLV" }, |
252 | | { 0x09, "ipv4Address" }, |
253 | | { 0x01, "Container" }, |
254 | | { 0x02, "AP Port Info" }, |
255 | | { 0x03, "ipv4 Subnet ID" }, |
256 | | { 0x04, "Secondary LAN Address List" }, |
257 | | { 0x05, "Multicast Ethernet Address List" }, |
258 | | { 0x06, "ipv4 Multicast Address List" }, |
259 | | { 0x07, "AP Port List" }, |
260 | | { 0x08, "Requestor SSID" }, |
261 | | { 0, NULL } |
262 | | }; |
263 | | |
264 | | /* Group 1 */ |
265 | | static const value_string wlccp_tlv_typeID_1[] = { |
266 | | { 0x01, "initSession" }, |
267 | | { 0x02, "inSecureContextReq" }, |
268 | | { 0x06, "authenticator" }, |
269 | | { 0x08, "mic" }, |
270 | | { 0x0a, "inSecureContextReply" }, |
271 | | { 0, NULL } |
272 | | }; |
273 | | |
274 | | /* Group 2 */ |
275 | | static const value_string wlccp_tlv_typeID_2[] = { |
276 | | { 0x03, "rmReport" }, |
277 | | { 0x04, "aggrRmReport" }, |
278 | | { 0x15, "frameReport" }, |
279 | | { 0x17, "ccaReport" }, |
280 | | { 0x19, "rpiHistReport" }, |
281 | | { 0x1e, "commonBeaconReport" }, |
282 | | { 0x1f, "aggrBeaconReport" }, |
283 | | { 0x5b, "mfpRouting" }, |
284 | | { 0x5c, "mfpConfig" }, |
285 | | { 0, NULL } |
286 | | }; |
287 | | |
288 | | /* Group 3 */ |
289 | | static const value_string wlccp_tlv_typeID_3[] = { |
290 | | /* { 0x01, "Unknown" } */ |
291 | | { 0, NULL }, |
292 | | }; |
293 | | |
294 | | /* Group 4 */ |
295 | | static const value_string wlccp_tlv_typeID_4[] = { |
296 | | /* { 0x01, "Unknown" } */ |
297 | | { 0, NULL }, |
298 | | }; |
299 | | |
300 | | /* Group 5 */ |
301 | | static const value_string wlccp_tlv_typeID_5[] = { |
302 | | /* { 0x01, "Unknown" } */ |
303 | | { 0, NULL }, |
304 | | }; |
305 | | |
306 | | |
307 | | |
308 | | |
309 | | |
310 | | static const value_string wlccp_aaa_msg_type_vs[] = { |
311 | | { 0x0, "Start" }, |
312 | | { 0x1, "Finish" }, |
313 | | { 0x2, "EAPOL" }, |
314 | | { 0x3, "Cisco Accounting" }, |
315 | | { 0, NULL } |
316 | | }; |
317 | | |
318 | | static const value_string wlccp_eapol_auth_type_vs[] = { |
319 | | { 0x0, "EAP Only" }, |
320 | | { 0x1, "MAC Only" }, |
321 | | { 0x2, "MAC then EAP" }, |
322 | | { 0x3, "MAC and EAP" }, |
323 | | { 0x4, "LEAP only" }, |
324 | | { 0x5, "MAC then LEAP" }, |
325 | | { 0x6, "MAC and LEAP" }, |
326 | | { 0, NULL } |
327 | | }; |
328 | | |
329 | | static const value_string wlccp_key_mgmt_type_vs[] = { |
330 | | { 0x0, "None" }, |
331 | | { 0x1, "CCKM" }, |
332 | | { 0x2, "Legacy 802.1x" }, |
333 | | { 0x3, "SSN/TGi" }, |
334 | | { 0, NULL } |
335 | | }; |
336 | | |
337 | | static const value_string eapol_type_vs[] = { |
338 | | { 0x0, "EAP Packet" }, |
339 | | { 0x1, "EAP Start" }, |
340 | | { 0x2, "Unknown" }, |
341 | | { 0x3, "Key" }, |
342 | | { 0, NULL } |
343 | | |
344 | | }; |
345 | | |
346 | | static const value_string wlccp_status_vs[] = { |
347 | | {0, "Success" }, |
348 | | { 0, NULL } |
349 | | }; |
350 | | |
351 | | static const value_string cisco_pid_vals[] = { |
352 | | { 0x0000, "WLCCP" }, |
353 | | { 0, NULL } |
354 | | }; |
355 | | |
356 | | static const value_string wlccp_mode_vs[] = { |
357 | | { 0x0, "apSelected" }, |
358 | | {0x01, "series" }, |
359 | | {0x3, "parallel" }, |
360 | | {0, NULL } |
361 | | }; |
362 | | |
363 | | |
364 | | static const value_string phy_type_80211_vs[] = { |
365 | | { 0x01, "FHSS 2.4 GHz" }, |
366 | | { 0x02, "DSSS 2.4 GHz" }, |
367 | | { 0x03, "IR Baseband" }, |
368 | | { 0x04, "OFDM 5GHz" }, |
369 | | { 0x05, "HRDSSS" }, |
370 | | { 0x06, "ERP" }, |
371 | | { 0, NULL } |
372 | | }; |
373 | | |
374 | | |
375 | | /* 802.11 capabilities flags */ |
376 | 14 | #define F_80211_ESS 0x0001 |
377 | 14 | #define F_80211_IBSS 0x0002 |
378 | 14 | #define F_80211_CFPOLL 0x0004 |
379 | 14 | #define F_80211_CFPOLL_REQ 0x0008 |
380 | 14 | #define F_80211_PRIVACY 0x0010 |
381 | 14 | #define F_80211_SHORT_PREAMBLE 0x0020 |
382 | 14 | #define F_80211_PBCC 0x0040 |
383 | 14 | #define F_80211_CH_AGILITY 0x0080 |
384 | 14 | #define F_80211_SPEC_MGMT 0x0100 |
385 | 14 | #define F_80211_QOS 0x0200 |
386 | 14 | #define F_80211_SHORT_TIME_SLOT 0x0400 |
387 | 14 | #define F_80211_APSD 0x0800 |
388 | 14 | #define F_80211_RESVD 0x1000 |
389 | 14 | #define F_80211_DSSS_OFDM 0x2000 |
390 | 14 | #define F_80211_DLYD_BLK_ACK 0x4000 |
391 | 14 | #define F_80211_IMM_BLK_ACK 0x8000 |
392 | | |
393 | | |
394 | | |
395 | | |
396 | | /* |
397 | | struct subdissector_returns_t |
398 | | { |
399 | | static int consumed |
400 | | static bool mic_flag; |
401 | | static bool tlv_flag; |
402 | | }; * struct flags_t declaration * |
403 | | */ |
404 | | |
405 | | |
406 | | |
407 | | /* Forward declarations we need below */ |
408 | | static unsigned dissect_wlccp_ccm_msg(proto_tree *_tree, tvbuff_t *_tvb, unsigned _offset, uint8_t _base_message_type); |
409 | | static unsigned dissect_wlccp_sec_msg(proto_tree *_tree, tvbuff_t *_tvb, unsigned _offset, uint8_t _base_message_type); |
410 | | static unsigned dissect_wlccp_rrm_msg(proto_tree *_tree, tvbuff_t *_tvb, unsigned _offset, uint8_t _base_message_type); |
411 | | static unsigned dissect_wlccp_qos_msg(proto_tree *_tree, tvbuff_t *_tvb, unsigned _offset, uint8_t _base_message_type); |
412 | | static unsigned dissect_wlccp_nm_msg(proto_tree *_tree, tvbuff_t *_tvb, unsigned _offset, uint8_t _base_message_type); |
413 | | static unsigned dissect_wlccp_mip_msg(proto_tree *_tree, tvbuff_t *_tvb, unsigned _offset, uint8_t _base_message_type); |
414 | | |
415 | | static unsigned dissect_wlccp_tlvs(proto_tree *_tree, tvbuff_t *tvb, unsigned tlv_offset, unsigned _depth); |
416 | | |
417 | | static unsigned dissect_wlccp_ccm_tlv(proto_tree *_tree, tvbuff_t *_tvb, unsigned _offset, int _type_id, unsigned _length, proto_item *_ti); |
418 | | static unsigned dissect_wlccp_sec_tlv(proto_tree *_tree, tvbuff_t *_tvb, unsigned _offset, int _type_id, unsigned _length, proto_item *_ti); |
419 | | static unsigned dissect_wlccp_rrm_tlv(proto_tree *_tree, tvbuff_t *_tvb, unsigned _offset, int _type_id, unsigned _length, proto_item *_ti); |
420 | | static unsigned dissect_wlccp_qos_tlv(proto_tree *_tree, tvbuff_t *_tvb, unsigned _offset, int _type_id, unsigned _length, proto_item *_ti); |
421 | | static unsigned dissect_wlccp_nm_tlv(proto_tree *_tree, tvbuff_t *_tvb, unsigned _offset, int _type_id, unsigned _length, proto_item *_ti); |
422 | | static unsigned dissect_wlccp_mip_tlv(proto_tree *_tree, tvbuff_t *_tvb, unsigned _offset, int _type_id, unsigned _length, proto_item *_ti); |
423 | | |
424 | | static void set_mic_flag(bool flag); |
425 | | static void set_tlv_flag(bool flag); |
426 | | static bool get_tlv_flag(void); |
427 | | static bool get_mic_flag(void); |
428 | | |
429 | | /* Initialize some utility variables */ |
430 | | static bool mic_flag=0, tlv_flag=0; |
431 | | |
432 | | /* Initialize the protocol and registered fields */ |
433 | | static int proto_wlccp; |
434 | | |
435 | | static int hf_llc_wlccp_pid; |
436 | | |
437 | | |
438 | | |
439 | | static int hf_wlccp_dstmac; |
440 | | static int hf_wlccp_srcmac; |
441 | | static int hf_wlccp_hostname; |
442 | | |
443 | | /* WLCCP Fixed header fields */ |
444 | | static int hf_wlccp_version; |
445 | | |
446 | | static int hf_wlccp_sap; /* SAP Tree */ |
447 | | static int hf_wlccp_sap_version; |
448 | | static int hf_wlccp_sap_id; |
449 | | |
450 | | static int hf_wlccp_destination_node_type; |
451 | | static int hf_wlccp_length; |
452 | | |
453 | | static int hf_wlccp_type; /* Message Type Tree */ |
454 | | static int hf_wlccp_subtype; |
455 | | static int hf_wlccp_base_message_type_0; |
456 | | static int hf_wlccp_base_message_type_1; |
457 | | static int hf_wlccp_base_message_type_2; |
458 | | static int hf_wlccp_base_message_type_3; |
459 | | static int hf_wlccp_base_message_type_4; |
460 | | static int hf_wlccp_base_message_type_5; |
461 | | static int hf_wlccp_base_message_type_unknown; |
462 | | |
463 | | static int hf_wlccp_hops; |
464 | | static int hf_wlccp_nm_version; |
465 | | |
466 | | static int hf_wlccp_msg_id; |
467 | | |
468 | | static int hf_wlccp_flags; /* Flags Tree */ |
469 | | static int hf_wlccp_rm_flags; |
470 | | static int hf_wlccp_retry_flag; |
471 | | static int hf_wlccp_response_request_flag; |
472 | | static int hf_wlccp_ack_required_flag; |
473 | | static int hf_wlccp_tlv_flag; |
474 | | static int hf_wlccp_inbound_flag; |
475 | | static int hf_wlccp_outbound_flag; |
476 | | static int hf_wlccp_hopwise_routing_flag; |
477 | | static int hf_wlccp_root_cm_flag; |
478 | | static int hf_wlccp_relay_flag; |
479 | | static int hf_wlccp_mic_flag; |
480 | | static int hf_wlccp_rm_request_reply_flag; |
481 | | static int hf_wlccp_rm_mic_flag; |
482 | | |
483 | | static int hf_wlccp_originator; /* Originator Tree */ |
484 | | static int hf_wlccp_originator_node_type; |
485 | | /* static int hf_wlccp_originator_id; */ |
486 | | |
487 | | static int hf_wlccp_responder; /* Responder Tree */ |
488 | | static int hf_wlccp_responder_node_type; |
489 | | /*static int hf_wlccp_responder_id; */ |
490 | | |
491 | | |
492 | | /* static int hf_wlccp_relay_node;*/ /* Relay Node Tree */ |
493 | | static int hf_wlccp_relay_node_type; |
494 | | static int hf_wlccp_relay_node_id; |
495 | | |
496 | | /* static int hf_wlccp_priority; */ |
497 | | /* static int hf_wlccp_age; */ |
498 | | /* static int hf_wlccp_period; */ |
499 | | static int hf_wlccp_ipv4_address; |
500 | | |
501 | | /* SCM Advertisement */ |
502 | | static int hf_wlccp_scm_hop_address; |
503 | | |
504 | | static int hf_wlccp_scm_flags; /* SCM Flags Tree */ |
505 | | static int hf_wlccp_scm_active_flag; |
506 | | static int hf_wlccp_scm_unscheduled_flag; |
507 | | static int hf_wlccp_scm_unattached_flag; |
508 | | static int hf_wlccp_scm_layer2update_flag; |
509 | | |
510 | | static int hf_wlccp_scm_election_group; |
511 | | static int hf_wlccp_scm_attach_count; |
512 | | |
513 | | static int hf_wlccp_scm_priority_flags; /* SCM Priority Flags */ |
514 | | static int hf_wlccp_scm_priority; |
515 | | static int hf_wlccp_scm_preferred_flag; |
516 | | |
517 | | static int hf_wlccp_scm_bridge_priority_flags; /* SCM Bridge Priority Flags */ |
518 | | static int hf_wlccp_scm_bridge_priority; |
519 | | static int hf_wlccp_scm_bridge_disable_flag; |
520 | | |
521 | | static int hf_wlccp_scm_node_id; |
522 | | static int hf_wlccp_scm_unknown_short; |
523 | | static int hf_wlccp_scm_instance_age; |
524 | | static int hf_wlccp_scm_path_cost; |
525 | | static int hf_wlccp_scm_hop_count; |
526 | | static int hf_wlccp_scm_advperiod; |
527 | | |
528 | | /*kan for apRegistration messages*/ |
529 | | static int hf_wlccp_timestamp; |
530 | | static int hf_wlccp_apregstatus; |
531 | | static int hf_wlccp_ap_node_id; |
532 | | static int hf_wlccp_ap_node_type; |
533 | | static int hf_wlccp_ap_node_id_address; |
534 | | /*kan for nmPathInit messages */ |
535 | | static int hf_wlccp_requ_node_type; |
536 | | static int hf_wlccp_requ_node_id; |
537 | | static int hf_wlccp_status; |
538 | | static int hf_wlccp_path_init_rsvd; |
539 | | /*kan - for cmAAA messages */ |
540 | | static int hf_wlccp_aaa_msg_type; |
541 | | static int hf_wlccp_aaa_auth_type; |
542 | | static int hf_wlccp_keymgmt_type; |
543 | | /*kan - for cmAAA EAPOL messages */ |
544 | | static int hf_wlccp_eapol_msg; |
545 | | static int hf_wlccp_eapol_version; |
546 | | static int hf_wlccp_eapol_type; |
547 | | static int hf_wlccp_eap_msg_length; |
548 | | static int hf_wlccp_eap_msg; |
549 | | /*kan - for cmAAA Proprietary message */ |
550 | | static int hf_wlccp_cisco_acctg_msg; |
551 | | /*kan - for cmWIDS */ |
552 | | static int hf_wlccp_wids_msg_type; |
553 | | /*kan - for nmConfigRequest and nmConfigReply */ |
554 | | static int hf_wlccp_nmconfig; |
555 | | |
556 | | static int hf_wlccp_scmstate_change; |
557 | | static int hf_wlccp_scmstate_change_reason; |
558 | | |
559 | | static int hf_wlccp_scmattach_state; |
560 | | static int hf_wlccp_nmcapability; |
561 | | static int hf_wlccp_refresh_req_id; |
562 | | |
563 | | static int hf_wlccp_tlv; |
564 | | static int hf_tlv_flags; |
565 | | |
566 | | static int hf_wlccp_null_tlv; |
567 | | |
568 | | static int hf_wlccp_tlv_type; |
569 | | static int hf_wlccp_tlv_type0; |
570 | | static int hf_wlccp_tlv_type1; |
571 | | static int hf_wlccp_tlv_type2; |
572 | | static int hf_wlccp_tlv_type3; |
573 | | static int hf_wlccp_tlv_type4; |
574 | | static int hf_wlccp_tlv_type5; |
575 | | static int hf_wlccp_tlv_group; |
576 | | static int hf_wlccp_tlv_container_flag; |
577 | | static int hf_wlccp_tlv_encrypted_flag; |
578 | | static int hf_wlccp_tlv_request_flag; |
579 | | static int hf_wlccp_tlv_reserved_bit; |
580 | | static int hf_wlccp_tlv_length; |
581 | | |
582 | | /* static int hf_wlccp_tlv_value; */ |
583 | | |
584 | | static int hf_wlccp_path_length; |
585 | | static int hf_wlccp_mic_msg_seq_count; |
586 | | static int hf_wlccp_mic_length; |
587 | | static int hf_wlccp_mic_value; |
588 | | |
589 | | static int hf_wlccp_key_seq_count; |
590 | | static int hf_wlccp_dest_node_type; |
591 | | static int hf_wlccp_dest_node_id; |
592 | | static int hf_wlccp_supp_node_type; |
593 | | static int hf_wlccp_supp_node_id; |
594 | | static int hf_wlccp_key_mgmt_type; |
595 | | static int hf_wlccp_nonce; |
596 | | static int hf_wlccp_session_timeout; |
597 | | static int hf_wlccp_src_node_type; |
598 | | static int hf_wlccp_src_node_id; |
599 | | static int hf_wlccp_token; |
600 | | static int hf_wlccp_mode; |
601 | | static int hf_wlccp_scan_mode; |
602 | | static int hf_wlccp_rss; |
603 | | static int hf_wlccp_srcidx; |
604 | | static int hf_wlccp_parent_tsf; |
605 | | static int hf_wlccp_target_tsf; |
606 | | |
607 | | static int hf_wlccp_channel; |
608 | | static int hf_wlccp_phy_type; |
609 | | static int hf_wlccp_bssid; |
610 | | static int hf_wlccp_beacon_interval; |
611 | | /* static int hf_wlccp_capabilities; */ |
612 | | static int hf_wlccp_tlv80211; |
613 | | static int hf_wlccp_duration; |
614 | | static int hf_wlccp_rpidensity; |
615 | | static int hf_wlccp_ccabusy; |
616 | | static int hf_wlccp_sta_type; |
617 | | static int hf_wlccp_stamac; |
618 | | static int hf_wlccp_token2; |
619 | | static int hf_wlccp_interval; |
620 | | static int hf_wlccp_count; |
621 | | static int hf_framereport_elements; |
622 | | static int hf_wlccp_numframes; |
623 | | static int hf_wlccp_mfpcapability; |
624 | | static int hf_wlccp_mfpflags; |
625 | | static int hf_wlccp_mfpconfig; |
626 | | static int hf_wlccp_clientmac; |
627 | | static int hf_time_elapsed; |
628 | | static int hf_wlccp_parent_ap_mac; |
629 | | static int hf_wlccp_auth_type; |
630 | | static int hf_reg_lifetime; |
631 | | static int hf_wlccp_radius_user_name; |
632 | | static int hf_wds_reason; |
633 | | |
634 | | |
635 | | static int hf_wlccp_80211_capabilities; |
636 | | static int hf_80211_cap_ess; |
637 | | static int hf_80211_cap_ibss; |
638 | | static int hf_80211_cap_cf_pollable; |
639 | | static int hf_80211_cap_cf_poll_req; |
640 | | static int hf_80211_cap_privacy; |
641 | | static int hf_80211_short_preamble; |
642 | | static int hf_80211_pbcc; |
643 | | static int hf_80211_chan_agility; |
644 | | static int hf_80211_spectrum_mgmt; |
645 | | static int hf_80211_qos; |
646 | | static int hf_80211_short_time_slot; |
647 | | static int hf_80211_apsd; |
648 | | static int hf_80211_reserved; |
649 | | static int hf_80211_dsss_ofdm; |
650 | | static int hf_80211_dlyd_block_ack; |
651 | | static int hf_80211_imm_block_ack; |
652 | | |
653 | | |
654 | | static int hf_wlccp_tlv_unknown_value; |
655 | | |
656 | | /* Initialize the subtree pointers */ |
657 | | static int ett_wlccp; |
658 | | static int ett_wlccp_sap_tree; |
659 | | static int ett_wlccp_type; |
660 | | static int ett_wlccp_cm_flags; |
661 | | static int ett_wlccp_scm_flags; |
662 | | static int ett_wlccp_scm_priority_flags; |
663 | | static int ett_wlccp_scm_bridge_priority_flags; |
664 | | static int ett_wlccp_rm_flags; |
665 | | static int ett_wlccp_nm_flags; |
666 | | |
667 | | |
668 | | static int ett_wlccp_flags; |
669 | | static int ett_wlccp_ap_node_id; |
670 | | static int ett_wlccp_eapol_msg_tree; |
671 | | static int ett_wlccp_eap_tree; |
672 | | static int ett_wlccp_tlv_tree; |
673 | | static int ett_tlv_flags_tree; |
674 | | static int ett_tlv_sub_tree; |
675 | | static int ett_80211_capability_flags_tree; |
676 | | static int ett_framereport_elements_tree; |
677 | | |
678 | | |
679 | | |
680 | | /* Code to actually dissect the packets */ |
681 | | static int |
682 | | dissect_wlccp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) |
683 | 25 | { |
684 | | /* Set up structures needed to add the protocol subtree and manage it */ |
685 | 25 | proto_item *ti; |
686 | 25 | proto_tree *wlccp_tree, *wlccp_sap_tree, *wlccp_type_tree; |
687 | | |
688 | 25 | unsigned offset = 0, old_offset; |
689 | | |
690 | 25 | uint8_t version=0, sap_id=0; |
691 | | |
692 | 25 | uint16_t type; |
693 | 25 | uint8_t base_message_type=0, message_sub_type=0; |
694 | | |
695 | | /* Make entries in Protocol column and Info column on summary display */ |
696 | 25 | col_set_str(pinfo->cinfo, COL_PROTOCOL, "WLCCP"); |
697 | | |
698 | 25 | if(tvb_get_uint8(tvb, 0) == 0xC1) /* Get the version number */ |
699 | 18 | { |
700 | 18 | sap_id = tvb_get_uint8(tvb,1) & SAP_VALUE_MASK; |
701 | 18 | base_message_type=(tvb_get_uint8(tvb,6)) & MT_BASE_MSG_TYPE; |
702 | 18 | message_sub_type=(tvb_get_uint8(tvb, 6) & MT_SUBTYPE ) >> 6; |
703 | | |
704 | 18 | switch (sap_id) |
705 | 18 | { |
706 | | |
707 | 15 | case WLCCP_SAP_CCM: |
708 | 15 | { |
709 | | |
710 | 15 | col_add_fstr(pinfo->cinfo, COL_INFO, "Message Type: %-27s SubType: %s", |
711 | 15 | val_to_str_const(base_message_type, wlccp_msg_type_vs_0, "Unknown"), |
712 | 15 | val_to_str_const(message_sub_type, wlccp_subtype_vs, "Unknown")); |
713 | 15 | break; |
714 | | |
715 | 0 | } /* case WLCCP_SAP_CCM */ |
716 | | |
717 | 0 | case WLCCP_SAP_SEC: |
718 | 0 | { |
719 | |
|
720 | 0 | col_add_fstr(pinfo->cinfo, COL_INFO, "Message Type: %-27s SubType: %s", |
721 | 0 | val_to_str_const(base_message_type, wlccp_msg_type_vs_1, "Unknown"), |
722 | 0 | val_to_str_const(message_sub_type, wlccp_subtype_vs, "Unknown")); |
723 | 0 | break; |
724 | 0 | } /* case WLCCP_SAP_SEC */ |
725 | | |
726 | 0 | case WLCCP_SAP_RRM: |
727 | 0 | { |
728 | 0 | col_add_fstr(pinfo->cinfo, COL_INFO, "Message Type: %-27s SubType: %s", |
729 | 0 | val_to_str_const(base_message_type, wlccp_msg_type_vs_2, "Unknown"), |
730 | 0 | val_to_str_const(message_sub_type, wlccp_subtype_vs, "Unknown")); |
731 | 0 | break; |
732 | | |
733 | 0 | } /* case WLCCP_SAP_RRM */ |
734 | | |
735 | 0 | case WLCCP_SAP_QOS: |
736 | 0 | { |
737 | 0 | col_add_fstr(pinfo->cinfo, COL_INFO, "Message Type: %-27s SubType: %s", |
738 | 0 | val_to_str_const(base_message_type, wlccp_msg_type_vs_3, "Unknown"), |
739 | 0 | val_to_str_const(message_sub_type, wlccp_subtype_vs, "Unknown")); |
740 | 0 | break; |
741 | 0 | } /* case WLCCP_SAP_QOS */ |
742 | | |
743 | 3 | case WLCCP_SAP_NM: |
744 | 3 | { |
745 | 3 | col_add_fstr(pinfo->cinfo, COL_INFO, "Message Type: %-27s SubType: %s", |
746 | 3 | val_to_str_const(base_message_type, wlccp_msg_type_vs_4, "Unknown"), |
747 | 3 | val_to_str_const(message_sub_type, wlccp_subtype_vs, "Unknown")); |
748 | 3 | break; |
749 | | |
750 | 0 | } /* case WLCCP_SAP_NM */ |
751 | | |
752 | 0 | case WLCCP_SAP_MIP: |
753 | 0 | { |
754 | 0 | col_add_fstr(pinfo->cinfo, COL_INFO, "Message Type: %-27s SubType: %s", |
755 | 0 | val_to_str_const(base_message_type, wlccp_msg_type_vs_5, "Unknown"), |
756 | 0 | val_to_str_const(message_sub_type, wlccp_subtype_vs, "Unknown")); |
757 | 0 | break; |
758 | 0 | } /* case WLCCP_SAP_MIP */ |
759 | | |
760 | 0 | default: |
761 | 0 | { |
762 | 0 | col_add_fstr(pinfo->cinfo, COL_INFO, "Message Type: %-27s SubType: %s", "Unknown", |
763 | 0 | val_to_str_const(message_sub_type, wlccp_subtype_vs, "Unknown")); |
764 | 0 | break; |
765 | 0 | } /* default for switch sap */ |
766 | | |
767 | | |
768 | 18 | } /* switch sap */ |
769 | | |
770 | 18 | } /* if version=0xC1 (tvb_get_uint8(tvb, 0) == 0xC1)*/ |
771 | | |
772 | 25 | if (tree) { |
773 | | /* create display subtree for the protocol */ |
774 | 25 | ti = proto_tree_add_item(tree, proto_wlccp, tvb, 0, -1, ENC_NA); |
775 | 25 | wlccp_tree = proto_item_add_subtree(ti, ett_wlccp); |
776 | | |
777 | 25 | proto_tree_add_item(wlccp_tree, hf_wlccp_version, |
778 | 25 | tvb, offset, 1, ENC_BIG_ENDIAN); |
779 | | |
780 | | /* interpretation of the packet is determined by WLCCP version */ |
781 | 25 | version = tvb_get_uint8(tvb, 0); |
782 | 25 | offset += 1; |
783 | | |
784 | 25 | if(version == 0x0) { |
785 | 2 | proto_tree_add_item(wlccp_tree, hf_wlccp_length, |
786 | 2 | tvb, 1, 1, ENC_BIG_ENDIAN); |
787 | | |
788 | 2 | proto_tree_add_item(wlccp_tree, hf_wlccp_type, |
789 | 2 | tvb, 2, 2, ENC_BIG_ENDIAN); |
790 | 2 | type = tvb_get_ntohs(tvb, 2); |
791 | | |
792 | 2 | proto_tree_add_item(wlccp_tree, hf_wlccp_dstmac, |
793 | 2 | tvb, 4, 6, ENC_NA); |
794 | | |
795 | 2 | proto_tree_add_item(wlccp_tree, hf_wlccp_srcmac, |
796 | 2 | tvb, 10, 6, ENC_NA); |
797 | | |
798 | 2 | if(type == 0x4081) { |
799 | 0 | proto_tree_add_item(wlccp_tree, hf_wlccp_ipv4_address, |
800 | 0 | tvb, 38, 4, ENC_BIG_ENDIAN); |
801 | |
|
802 | 0 | proto_tree_add_item(wlccp_tree, hf_wlccp_hostname, |
803 | 0 | tvb, 44, 28, ENC_ASCII); |
804 | 0 | } /* if type = 0x4081 */ |
805 | 2 | } /* if version == 0x00 */ |
806 | | |
807 | 25 | if(version == 0xC1) |
808 | 18 | { |
809 | | |
810 | 18 | { /* SAP Field */ |
811 | 18 | ti = proto_tree_add_item(wlccp_tree, hf_wlccp_sap, |
812 | 18 | tvb, offset, 1, ENC_BIG_ENDIAN); |
813 | 18 | wlccp_sap_tree = proto_item_add_subtree(ti, ett_wlccp_sap_tree); |
814 | | |
815 | 18 | proto_tree_add_item(wlccp_sap_tree, hf_wlccp_sap_version, |
816 | 18 | tvb, offset, 1, ENC_BIG_ENDIAN); |
817 | | |
818 | 18 | proto_tree_add_item(wlccp_sap_tree, hf_wlccp_sap_id, |
819 | 18 | tvb, offset, 1, ENC_BIG_ENDIAN); |
820 | | |
821 | 18 | sap_id = tvb_get_uint8(tvb,offset) & SAP_VALUE_MASK; |
822 | | |
823 | 18 | offset += 1; |
824 | | |
825 | 18 | } /* SAP Field */ |
826 | | |
827 | 18 | proto_tree_add_item(wlccp_tree, hf_wlccp_destination_node_type, |
828 | 18 | tvb, offset, 2, ENC_BIG_ENDIAN); |
829 | 18 | offset += 2; |
830 | | |
831 | 18 | proto_tree_add_item(wlccp_tree, hf_wlccp_length, |
832 | 18 | tvb, offset, 2, ENC_BIG_ENDIAN); |
833 | 18 | offset += 2; |
834 | | |
835 | | |
836 | 18 | { /* Message Type Field */ |
837 | 18 | ti = proto_tree_add_item(wlccp_tree, hf_wlccp_type, |
838 | 18 | tvb, offset, 1, ENC_BIG_ENDIAN); |
839 | | |
840 | 18 | wlccp_type_tree = proto_item_add_subtree(ti, ett_wlccp_type); |
841 | | |
842 | 18 | proto_tree_add_item(wlccp_type_tree, hf_wlccp_subtype, |
843 | 18 | tvb, offset, 1, ENC_BIG_ENDIAN); |
844 | | |
845 | 18 | switch (sap_id) |
846 | 18 | { |
847 | | |
848 | 15 | case WLCCP_SAP_CCM: |
849 | 15 | { |
850 | | |
851 | 15 | proto_tree_add_item(wlccp_type_tree, hf_wlccp_base_message_type_0, |
852 | 15 | tvb, offset, 1, ENC_BIG_ENDIAN); |
853 | | |
854 | 15 | break; |
855 | | |
856 | 0 | } /* case WLCCP_SAP_CCM */ |
857 | | |
858 | 0 | case WLCCP_SAP_SEC: |
859 | 0 | { |
860 | 0 | proto_tree_add_item(wlccp_type_tree, hf_wlccp_base_message_type_1, |
861 | 0 | tvb, offset, 1, ENC_BIG_ENDIAN); |
862 | |
|
863 | 0 | break; |
864 | | |
865 | 0 | } /* case WLCCP_SAP_SEC */ |
866 | | |
867 | 0 | case WLCCP_SAP_RRM: |
868 | 0 | { |
869 | 0 | proto_tree_add_item(wlccp_type_tree, hf_wlccp_base_message_type_2, |
870 | 0 | tvb, offset, 1, ENC_BIG_ENDIAN); |
871 | |
|
872 | 0 | break; |
873 | | |
874 | 0 | } /* case WLCCP_SAP_RRM */ |
875 | | |
876 | 0 | case WLCCP_SAP_QOS: |
877 | 0 | { |
878 | 0 | proto_tree_add_item(wlccp_type_tree, hf_wlccp_base_message_type_3, |
879 | 0 | tvb, offset, 1, ENC_BIG_ENDIAN); |
880 | |
|
881 | 0 | break; |
882 | | |
883 | 0 | } /* case WLCCP_SAP_QOS */ |
884 | | |
885 | 3 | case WLCCP_SAP_NM: |
886 | 3 | { |
887 | 3 | proto_tree_add_item(wlccp_type_tree, hf_wlccp_base_message_type_4, |
888 | 3 | tvb, offset, 1, ENC_BIG_ENDIAN); |
889 | | |
890 | 3 | break; |
891 | | |
892 | 0 | } /* case WLCCP_SAP_NM */ |
893 | | |
894 | 0 | case WLCCP_SAP_MIP: |
895 | 0 | { |
896 | 0 | proto_tree_add_item(wlccp_type_tree, hf_wlccp_base_message_type_5, |
897 | 0 | tvb, offset, 1, ENC_BIG_ENDIAN); |
898 | |
|
899 | 0 | break; |
900 | | |
901 | 0 | } /* case WLCCP_SAP_MIP */ |
902 | | |
903 | 0 | default: |
904 | 0 | { |
905 | |
|
906 | 0 | proto_tree_add_item(wlccp_type_tree, hf_wlccp_base_message_type_unknown, |
907 | 0 | tvb, offset, 1, ENC_BIG_ENDIAN); |
908 | |
|
909 | 0 | break; |
910 | | |
911 | 0 | } /* default for switch sap */ |
912 | | |
913 | 18 | } /* switch sap */ |
914 | | |
915 | 18 | base_message_type=(tvb_get_uint8(tvb,offset) & MT_BASE_MSG_TYPE ); |
916 | | |
917 | 18 | offset += 1; |
918 | 18 | } /* Message Type Field */ |
919 | | |
920 | | /* after the Message Type Field things change based on SAP and Message Type */ |
921 | | |
922 | 18 | set_mic_flag(false); |
923 | 18 | set_tlv_flag(false); |
924 | | |
925 | 18 | switch (sap_id) |
926 | 18 | { |
927 | | |
928 | 15 | case WLCCP_SAP_CCM: |
929 | 15 | { |
930 | | |
931 | 15 | offset = dissect_wlccp_ccm_msg(wlccp_tree, tvb, offset, base_message_type); |
932 | | |
933 | 15 | break; |
934 | | |
935 | 0 | } /* case WLCCP_SAP_CCM */ |
936 | | |
937 | 0 | case WLCCP_SAP_SEC: |
938 | 0 | { |
939 | |
|
940 | 0 | offset = dissect_wlccp_sec_msg(wlccp_tree, tvb, offset, base_message_type); |
941 | |
|
942 | 0 | break; |
943 | | |
944 | 0 | } /* case WLCCP_SAP_SEC */ |
945 | | |
946 | 0 | case WLCCP_SAP_RRM: |
947 | 0 | { |
948 | |
|
949 | 0 | offset = dissect_wlccp_rrm_msg(wlccp_tree, tvb, offset, base_message_type); |
950 | |
|
951 | 0 | break; |
952 | | |
953 | 0 | } /* case WLCCP_SAP_RRM */ |
954 | | |
955 | 0 | case WLCCP_SAP_QOS: |
956 | 0 | { |
957 | |
|
958 | 0 | offset = dissect_wlccp_qos_msg(wlccp_tree, tvb, offset, base_message_type); |
959 | |
|
960 | 0 | break; |
961 | | |
962 | 0 | } /* case WLCCP_SAP_QOS */ |
963 | | |
964 | 3 | case WLCCP_SAP_NM: |
965 | 3 | { |
966 | | |
967 | 3 | offset = dissect_wlccp_nm_msg(wlccp_tree, tvb, offset, base_message_type); |
968 | | |
969 | 3 | break; |
970 | | |
971 | 0 | } /* case WLCCP_SAP_NM */ |
972 | | |
973 | 0 | case WLCCP_SAP_MIP: |
974 | 0 | { |
975 | |
|
976 | 0 | offset = dissect_wlccp_mip_msg(wlccp_tree, tvb, offset, base_message_type); |
977 | |
|
978 | 0 | break; |
979 | | |
980 | 0 | } /* case WLCCP_SAP_MIP */ |
981 | | |
982 | 0 | default: |
983 | 0 | { |
984 | | /* what should we do if we get an undefined SAP? */ |
985 | |
|
986 | 0 | break; |
987 | | |
988 | 0 | } /* default for switch sap */ |
989 | | |
990 | 18 | } /* switch sap */ |
991 | | |
992 | | |
993 | | |
994 | 17 | if(get_tlv_flag() || get_mic_flag()) |
995 | 16 | { |
996 | | |
997 | 16 | if (tvb_reported_length_remaining(tvb,offset) < 4) |
998 | 1 | { |
999 | | /* something is wrong if the TLV flag is set and there's not enough left in the buffer */ |
1000 | | |
1001 | | /* proto_tree_add_string(wlccp_tree, NULL, tvb, offset, -1, "MIC Flag=%d and TLV Flag=%d, but no data left to decode."); */ |
1002 | | |
1003 | 1 | } /* if bytes_left <=0 */ |
1004 | 15 | else |
1005 | 15 | { |
1006 | | |
1007 | 44 | while (tvb_reported_length_remaining(tvb,offset) >= 4) |
1008 | 29 | { |
1009 | 29 | old_offset = offset; |
1010 | 29 | offset = dissect_wlccp_tlvs(wlccp_tree, tvb, offset, 0); |
1011 | 29 | DISSECTOR_ASSERT(offset > old_offset); |
1012 | 29 | } /* while bytes_left */ |
1013 | | |
1014 | 15 | ; |
1015 | 15 | } /*else bytes_left < 4 */ |
1016 | | |
1017 | 16 | } /* if tlv_flag || mic_flag */ |
1018 | | |
1019 | 17 | } /* if version == 0xC1 */ |
1020 | | |
1021 | 25 | } /* if tree */ |
1022 | | |
1023 | 24 | return tvb_captured_length(tvb); |
1024 | 25 | } /* dissect_wlccp */ |
1025 | | |
1026 | | |
1027 | | /*******************************************************************************************/ |
1028 | | |
1029 | | /* some utility functions */ |
1030 | | |
1031 | | /* these could be implemented with a struct */ |
1032 | | |
1033 | | static void set_mic_flag(bool flag) |
1034 | 35 | { |
1035 | 35 | mic_flag=flag; |
1036 | 35 | } /*set_mic_flag */ |
1037 | | |
1038 | | static void set_tlv_flag(bool flag) |
1039 | 35 | { |
1040 | 35 | tlv_flag=flag; |
1041 | 35 | } /* set_tlv_flag */ |
1042 | | |
1043 | | static bool get_tlv_flag(void) |
1044 | 17 | { |
1045 | 17 | return tlv_flag; |
1046 | 17 | } /* get_tlv_flag */ |
1047 | | |
1048 | | static bool get_mic_flag(void) |
1049 | 7 | { |
1050 | 7 | return mic_flag; |
1051 | 7 | } /* get_mic_flag */ |
1052 | | |
1053 | | /*******************************************************************************************/ |
1054 | | |
1055 | | static unsigned dissect_wlccp_ccm_msg(proto_tree *_tree, tvbuff_t *_tvb, unsigned _offset, uint8_t _base_message_type) |
1056 | 15 | { |
1057 | 15 | proto_item *_ti; |
1058 | 15 | proto_tree *_wlccp_eapol_msg_tree, *_wlccp_cm_flags_tree, *_wlccp_scm_flags_tree, *_wlccp_scm_priority_flags_tree, *_wlccp_scm_bridge_priority_flags_tree; |
1059 | | |
1060 | 15 | bool _relay_flag=0, _mic_flag=0, _tlv_flag=0; |
1061 | 15 | uint8_t _aaa_msg_type=0, _eapol_type=0; |
1062 | 15 | uint16_t _eap_msg_length=0; |
1063 | | |
1064 | 15 | proto_tree_add_item(_tree, hf_wlccp_hops, |
1065 | 15 | _tvb, _offset, 1, ENC_BIG_ENDIAN); |
1066 | 15 | _offset += 1; |
1067 | | |
1068 | 15 | proto_tree_add_item(_tree, hf_wlccp_msg_id, |
1069 | 15 | _tvb, _offset, 2, ENC_BIG_ENDIAN); |
1070 | 15 | _offset += 2; |
1071 | | |
1072 | | |
1073 | | /* Decode the CM Flags Field */ |
1074 | | |
1075 | 15 | _ti = proto_tree_add_item(_tree, hf_wlccp_flags, |
1076 | 15 | _tvb, _offset, 2, ENC_BIG_ENDIAN); |
1077 | 15 | _wlccp_cm_flags_tree = proto_item_add_subtree(_ti, ett_wlccp_cm_flags); |
1078 | | |
1079 | | |
1080 | 15 | proto_tree_add_item(_wlccp_cm_flags_tree, hf_wlccp_retry_flag, |
1081 | 15 | _tvb, _offset, 2, ENC_BIG_ENDIAN); |
1082 | | |
1083 | 15 | proto_tree_add_item(_wlccp_cm_flags_tree, hf_wlccp_response_request_flag, |
1084 | 15 | _tvb, _offset, 2, ENC_BIG_ENDIAN); |
1085 | | |
1086 | 15 | proto_tree_add_item(_wlccp_cm_flags_tree, hf_wlccp_tlv_flag, |
1087 | 15 | _tvb, _offset, 2, ENC_BIG_ENDIAN); |
1088 | 15 | _tlv_flag = (tvb_get_ntohs(_tvb, _offset)>>13) & 1; |
1089 | 15 | set_tlv_flag(_tlv_flag); |
1090 | | |
1091 | 15 | proto_tree_add_item(_wlccp_cm_flags_tree, hf_wlccp_inbound_flag, |
1092 | 15 | _tvb, _offset, 2, ENC_BIG_ENDIAN); |
1093 | | |
1094 | 15 | proto_tree_add_item(_wlccp_cm_flags_tree, hf_wlccp_outbound_flag, |
1095 | 15 | _tvb, _offset, 2, ENC_BIG_ENDIAN); |
1096 | | |
1097 | 15 | proto_tree_add_item(_wlccp_cm_flags_tree, hf_wlccp_hopwise_routing_flag, |
1098 | 15 | _tvb, _offset, 2, ENC_BIG_ENDIAN); |
1099 | | |
1100 | 15 | proto_tree_add_item(_wlccp_cm_flags_tree, hf_wlccp_root_cm_flag, |
1101 | 15 | _tvb, _offset, 2, ENC_BIG_ENDIAN); |
1102 | | |
1103 | 15 | proto_tree_add_item(_wlccp_cm_flags_tree, hf_wlccp_relay_flag, |
1104 | 15 | _tvb, _offset, 2, ENC_BIG_ENDIAN); |
1105 | 15 | _relay_flag = (tvb_get_ntohs(_tvb, _offset)>>8) & 1; |
1106 | | |
1107 | 15 | proto_tree_add_item(_wlccp_cm_flags_tree, hf_wlccp_mic_flag, |
1108 | 15 | _tvb, _offset, 2, ENC_BIG_ENDIAN); |
1109 | 15 | _mic_flag = (tvb_get_ntohs(_tvb, _offset)>>7) & 1; |
1110 | 15 | set_mic_flag(_mic_flag); |
1111 | | |
1112 | 15 | _offset += 2; |
1113 | | |
1114 | | /* End Decode the CM Flags Field */ |
1115 | | |
1116 | | |
1117 | 15 | proto_tree_add_item(_tree, hf_wlccp_originator_node_type, |
1118 | 15 | _tvb, _offset, 2, ENC_BIG_ENDIAN); |
1119 | 15 | _offset += 2; |
1120 | | |
1121 | 15 | proto_tree_add_item(_tree, hf_wlccp_originator, |
1122 | 15 | _tvb, _offset, 6, ENC_NA); |
1123 | 15 | _offset += 6; |
1124 | | |
1125 | 15 | proto_tree_add_item(_tree, hf_wlccp_responder_node_type, |
1126 | 15 | _tvb, _offset, 2, ENC_BIG_ENDIAN); |
1127 | 15 | _offset += 2; |
1128 | | |
1129 | 15 | proto_tree_add_item(_tree, hf_wlccp_responder, |
1130 | 15 | _tvb, _offset, 6, ENC_NA); |
1131 | 15 | _offset += 6; |
1132 | | |
1133 | 15 | if(_relay_flag) |
1134 | 5 | { |
1135 | 5 | proto_tree_add_item(_tree, hf_wlccp_relay_node_type, |
1136 | 5 | _tvb, _offset, 2, ENC_BIG_ENDIAN); |
1137 | 5 | _offset += 2; |
1138 | | |
1139 | 5 | proto_tree_add_item(_tree, hf_wlccp_relay_node_id, |
1140 | 5 | _tvb, _offset, 6, ENC_NA); |
1141 | 5 | _offset += 6; |
1142 | | |
1143 | 5 | } /* if _relay_flag */ |
1144 | | |
1145 | | |
1146 | 15 | switch (_base_message_type) |
1147 | 15 | { |
1148 | | |
1149 | 1 | case 0x01: |
1150 | 1 | { |
1151 | 1 | proto_tree_add_item(_tree, hf_wlccp_scm_hop_address, |
1152 | 1 | _tvb, _offset, 6, ENC_NA); |
1153 | 1 | _offset += 6; |
1154 | | |
1155 | | /* Decode the SCM Flags Field */ |
1156 | | |
1157 | 1 | _ti = proto_tree_add_item(_tree, hf_wlccp_scm_flags, |
1158 | 1 | _tvb, _offset, 2, ENC_BIG_ENDIAN); |
1159 | 1 | _wlccp_scm_flags_tree = proto_item_add_subtree(_ti, ett_wlccp_scm_flags); |
1160 | | |
1161 | 1 | proto_tree_add_item(_wlccp_scm_flags_tree, hf_wlccp_scm_layer2update_flag, |
1162 | 1 | _tvb, _offset, 2, ENC_BIG_ENDIAN); |
1163 | | |
1164 | 1 | proto_tree_add_item(_wlccp_scm_flags_tree, hf_wlccp_scm_unattached_flag, |
1165 | 1 | _tvb, _offset, 2, ENC_BIG_ENDIAN); |
1166 | | |
1167 | 1 | proto_tree_add_item(_wlccp_scm_flags_tree, hf_wlccp_scm_unscheduled_flag, |
1168 | 1 | _tvb, _offset, 2, ENC_BIG_ENDIAN); |
1169 | | |
1170 | 1 | proto_tree_add_item(_wlccp_scm_flags_tree, hf_wlccp_scm_active_flag, |
1171 | 1 | _tvb, _offset, 2, ENC_BIG_ENDIAN); |
1172 | 1 | _offset += 2; |
1173 | | |
1174 | | /* End Decode the SCM Flags Field */ |
1175 | | |
1176 | | |
1177 | 1 | proto_tree_add_item(_tree, hf_wlccp_scm_election_group, |
1178 | 1 | _tvb, _offset, 1, ENC_BIG_ENDIAN); |
1179 | 1 | _offset += 1; |
1180 | | |
1181 | 1 | proto_tree_add_item(_tree, hf_wlccp_scm_attach_count, |
1182 | 1 | _tvb, _offset, 1, ENC_BIG_ENDIAN); |
1183 | 1 | _offset += 1; |
1184 | | |
1185 | | /* Decode the SCM Priority Flags Field */ |
1186 | | |
1187 | 1 | _ti = proto_tree_add_item(_tree, hf_wlccp_scm_priority_flags, |
1188 | 1 | _tvb, _offset, 1, ENC_BIG_ENDIAN); |
1189 | 1 | _wlccp_scm_priority_flags_tree = proto_item_add_subtree(_ti, ett_wlccp_scm_priority_flags); |
1190 | | |
1191 | 1 | proto_tree_add_item(_wlccp_scm_priority_flags_tree, hf_wlccp_scm_priority, |
1192 | 1 | _tvb, _offset, 1, ENC_BIG_ENDIAN); |
1193 | | |
1194 | 1 | proto_tree_add_item(_wlccp_scm_priority_flags_tree, hf_wlccp_scm_preferred_flag, |
1195 | 1 | _tvb, _offset, 1, ENC_BIG_ENDIAN); |
1196 | | |
1197 | 1 | _offset += 1; |
1198 | | |
1199 | | /* End Decode the SCM Priority Flags Field */ |
1200 | | |
1201 | | /* Decode the SCM Bridge Priority Flags Field */ |
1202 | | |
1203 | 1 | _ti = proto_tree_add_item(_tree, hf_wlccp_scm_bridge_priority_flags, |
1204 | 1 | _tvb, _offset, 1, ENC_BIG_ENDIAN); |
1205 | 1 | _wlccp_scm_bridge_priority_flags_tree = proto_item_add_subtree(_ti, ett_wlccp_scm_bridge_priority_flags); |
1206 | | |
1207 | 1 | proto_tree_add_item(_wlccp_scm_bridge_priority_flags_tree, hf_wlccp_scm_bridge_priority, |
1208 | 1 | _tvb, _offset, 1, ENC_BIG_ENDIAN); |
1209 | | |
1210 | 1 | proto_tree_add_item(_wlccp_scm_bridge_priority_flags_tree, hf_wlccp_scm_bridge_disable_flag, |
1211 | 1 | _tvb, _offset, 1, ENC_BIG_ENDIAN); |
1212 | | |
1213 | 1 | _offset += 1; |
1214 | | |
1215 | | /* End Decode the SCM Bridge Priority Flags Field */ |
1216 | | |
1217 | 1 | proto_tree_add_item(_tree, hf_wlccp_scm_node_id, |
1218 | 1 | _tvb, _offset, 6, ENC_NA); |
1219 | 1 | _offset += 6; |
1220 | | |
1221 | 1 | proto_tree_add_item(_tree, hf_wlccp_scm_unknown_short, |
1222 | 1 | _tvb, _offset, 2, ENC_BIG_ENDIAN); |
1223 | 1 | _offset += 2; |
1224 | | |
1225 | 1 | proto_tree_add_item(_tree, hf_wlccp_scm_instance_age, |
1226 | 1 | _tvb, _offset, 4, ENC_BIG_ENDIAN); |
1227 | 1 | _offset += 4; |
1228 | | |
1229 | 1 | proto_tree_add_item(_tree, hf_wlccp_scm_path_cost, |
1230 | 1 | _tvb, _offset, 2, ENC_BIG_ENDIAN); |
1231 | 1 | _offset += 2; |
1232 | | |
1233 | 1 | proto_tree_add_item(_tree, hf_wlccp_scm_hop_count, |
1234 | 1 | _tvb, _offset, 1, ENC_BIG_ENDIAN); |
1235 | 1 | _offset += 1; |
1236 | | |
1237 | 1 | proto_tree_add_item(_tree, hf_wlccp_scm_advperiod, |
1238 | 1 | _tvb, _offset, 1, ENC_BIG_ENDIAN); |
1239 | 1 | _offset += 1; |
1240 | | |
1241 | 1 | break; |
1242 | 0 | } /* case 0x01 */ |
1243 | | |
1244 | 0 | case 0x02: |
1245 | 0 | { |
1246 | |
|
1247 | 0 | break; |
1248 | 0 | } /* case 0x02 */ |
1249 | | |
1250 | 0 | case 0x03: |
1251 | 0 | { |
1252 | |
|
1253 | 0 | break; |
1254 | 0 | } /* case 0x03 */ |
1255 | | |
1256 | 0 | case 0x04: |
1257 | 0 | { |
1258 | |
|
1259 | 0 | break; |
1260 | 0 | } /* case 0x04 */ |
1261 | | |
1262 | 0 | case 0x05: |
1263 | 0 | { |
1264 | |
|
1265 | 0 | break; |
1266 | 0 | } /* case 0x05 */ |
1267 | | |
1268 | 0 | case 0x06: |
1269 | 0 | { |
1270 | |
|
1271 | 0 | break; |
1272 | 0 | } /* case 0x06 */ |
1273 | | |
1274 | 1 | case 0x07: |
1275 | 1 | { |
1276 | | |
1277 | 1 | break; |
1278 | 0 | } /* case 0x07 */ |
1279 | | |
1280 | 0 | case 0x08: |
1281 | 0 | { |
1282 | |
|
1283 | 0 | break; |
1284 | 0 | } /* case 0x08 */ |
1285 | | |
1286 | 0 | case 0x09: |
1287 | 0 | { |
1288 | |
|
1289 | 0 | break; |
1290 | 0 | } /* case 0x09 */ |
1291 | | |
1292 | 1 | case 0x0a: |
1293 | 1 | { |
1294 | | |
1295 | 1 | break; |
1296 | 0 | } /* case 0x0a */ |
1297 | | |
1298 | 0 | case 0x0b: /* cmAAA */ |
1299 | 0 | { |
1300 | 0 | proto_tree_add_item(_tree, hf_wlccp_requ_node_type, |
1301 | 0 | _tvb, _offset, 2, ENC_BIG_ENDIAN); |
1302 | 0 | _offset += 2; |
1303 | |
|
1304 | 0 | proto_tree_add_item(_tree, hf_wlccp_requ_node_id, |
1305 | 0 | _tvb, _offset, 6, ENC_NA); |
1306 | 0 | _offset += 6; |
1307 | | |
1308 | | /*kan - according to the patent application these fields vary based |
1309 | | on one another. |
1310 | | For now we decode what we know about and then we'll come back and add |
1311 | | the rest */ |
1312 | |
|
1313 | 0 | proto_tree_add_item(_tree, hf_wlccp_aaa_msg_type, |
1314 | 0 | _tvb, _offset, 1, ENC_BIG_ENDIAN); |
1315 | 0 | _aaa_msg_type=tvb_get_uint8(_tvb,_offset); |
1316 | 0 | _offset += 1; |
1317 | |
|
1318 | 0 | proto_tree_add_item(_tree, hf_wlccp_aaa_auth_type, |
1319 | 0 | _tvb, _offset, 1, ENC_BIG_ENDIAN); |
1320 | 0 | _offset += 1; |
1321 | |
|
1322 | 0 | proto_tree_add_item(_tree, hf_wlccp_keymgmt_type, |
1323 | 0 | _tvb, _offset, 1, ENC_BIG_ENDIAN); |
1324 | 0 | _offset += 1; |
1325 | |
|
1326 | 0 | proto_tree_add_item(_tree, hf_wlccp_status, |
1327 | 0 | _tvb, _offset, 1, ENC_BIG_ENDIAN); |
1328 | 0 | _offset += 1; |
1329 | | |
1330 | | /* kan - I'm pretty sure this EAPOL tree only applies sometimes, but it's the only complete example that I have |
1331 | | to test against for now. |
1332 | | For that matter, it may be possible to just hand this piece of the packet over to the EAPOL dissector and let it |
1333 | | handle things. To be investigated further */ |
1334 | |
|
1335 | 0 | if (_aaa_msg_type == 0x2) /*EAPOL*/ |
1336 | 0 | { |
1337 | 0 | _ti = proto_tree_add_item(_tree, hf_wlccp_eapol_msg, |
1338 | 0 | _tvb, _offset, 6, ENC_NA); |
1339 | |
|
1340 | 0 | _wlccp_eapol_msg_tree = proto_item_add_subtree( |
1341 | 0 | _ti, ett_wlccp_eapol_msg_tree); |
1342 | | |
1343 | | |
1344 | | /* THIS NEEDS TO BE CHECKED */ |
1345 | | /*kan - skip some unknown bytes */ |
1346 | 0 | _offset += 2; |
1347 | |
|
1348 | 0 | proto_tree_add_item(_wlccp_eapol_msg_tree, hf_wlccp_eapol_version, |
1349 | 0 | _tvb, _offset, 1, ENC_BIG_ENDIAN); |
1350 | |
|
1351 | 0 | _offset += 1; |
1352 | |
|
1353 | 0 | proto_tree_add_item(_wlccp_eapol_msg_tree, hf_wlccp_eapol_type, |
1354 | 0 | _tvb, _offset, 1, ENC_BIG_ENDIAN); |
1355 | 0 | _eapol_type=tvb_get_uint8(_tvb, _offset); |
1356 | 0 | _offset += 1; |
1357 | |
|
1358 | 0 | if (_eapol_type == 0) |
1359 | 0 | { |
1360 | 0 | proto_tree_add_item(_wlccp_eapol_msg_tree, hf_wlccp_eap_msg_length, |
1361 | 0 | _tvb, _offset, 2, ENC_BIG_ENDIAN); |
1362 | 0 | _eap_msg_length=tvb_get_ntohs(_tvb, _offset); |
1363 | 0 | _offset += 2; |
1364 | |
|
1365 | 0 | proto_tree_add_item(_wlccp_eapol_msg_tree, hf_wlccp_eap_msg, |
1366 | 0 | _tvb, _offset, _eap_msg_length, ENC_NA); |
1367 | 0 | _offset += _eap_msg_length; |
1368 | |
|
1369 | 0 | } /* if _eapol_type == 0 */ |
1370 | |
|
1371 | 0 | } /* if _aaa_msg_type ==0x2 */ |
1372 | |
|
1373 | 0 | if (_aaa_msg_type == 0x3) /*Cisco proprietary message*/ |
1374 | 0 | { |
1375 | 0 | proto_tree_add_item(_tree, hf_wlccp_cisco_acctg_msg, |
1376 | 0 | _tvb, _offset, -1, ENC_NA); |
1377 | 0 | } /* if aaa_msg_type == 0x3 */ |
1378 | |
|
1379 | 0 | break; |
1380 | 0 | } /* case 0x0b */ |
1381 | | |
1382 | 0 | case 0x0c: /* cmPathInit */ |
1383 | 0 | { |
1384 | 0 | proto_tree_add_item(_tree, hf_wlccp_requ_node_type, |
1385 | 0 | _tvb, _offset, 2, ENC_BIG_ENDIAN); |
1386 | 0 | _offset += 2; |
1387 | |
|
1388 | 0 | proto_tree_add_item(_tree, hf_wlccp_requ_node_id, |
1389 | 0 | _tvb, _offset, 6, ENC_NA); |
1390 | 0 | _offset += 6; |
1391 | | |
1392 | | /*kan - there's a reserved alignment byte right here*/ |
1393 | 0 | proto_tree_add_item(_tree, hf_wlccp_path_init_rsvd, |
1394 | 0 | _tvb, _offset, 1, ENC_BIG_ENDIAN); |
1395 | 0 | _offset += 1; |
1396 | |
|
1397 | 0 | proto_tree_add_item(_tree, hf_wlccp_status, |
1398 | 0 | _tvb, _offset, 1, ENC_BIG_ENDIAN); |
1399 | 0 | _offset +=1; |
1400 | |
|
1401 | 0 | break; |
1402 | 0 | } /* case 0x0c */ |
1403 | | |
1404 | 0 | case 0x0f: /* cmWIDS */ |
1405 | 0 | { |
1406 | 0 | proto_tree_add_item(_tree, hf_wlccp_wids_msg_type, |
1407 | 0 | _tvb, _offset, 1, ENC_BIG_ENDIAN); |
1408 | 0 | _offset += 1; |
1409 | |
|
1410 | 0 | proto_tree_add_item(_tree, hf_wlccp_status, |
1411 | 0 | _tvb, _offset, 1, ENC_BIG_ENDIAN); |
1412 | 0 | _offset +=1; |
1413 | |
|
1414 | 0 | break; |
1415 | 0 | } /* case 0x0f */ |
1416 | | |
1417 | 11 | default: |
1418 | 11 | { |
1419 | | |
1420 | 11 | break; |
1421 | 0 | } /* default for switch _base_message_type */ |
1422 | | |
1423 | 15 | } /* switch _base_message_type */ |
1424 | | |
1425 | | |
1426 | 14 | return _offset; |
1427 | 15 | } /* dissect_wlccp_ccm_msg */ |
1428 | | |
1429 | | static unsigned dissect_wlccp_sec_msg(proto_tree *_tree _U_, tvbuff_t *_tvb _U_, unsigned _offset, uint8_t _base_message_type) |
1430 | 0 | { |
1431 | | |
1432 | | /* at the moment we have no more data to use to write this dissector code */ |
1433 | | /* it's just a place holder for now */ |
1434 | |
|
1435 | 0 | switch (_base_message_type) |
1436 | 0 | { |
1437 | | |
1438 | 0 | case 0x01: |
1439 | 0 | { |
1440 | |
|
1441 | 0 | break; |
1442 | 0 | } /* case 0x01 */ |
1443 | | |
1444 | 0 | default: |
1445 | 0 | { |
1446 | |
|
1447 | 0 | break; |
1448 | 0 | } /* default for switch _base_message_type */ |
1449 | |
|
1450 | 0 | } /* switch _base_message_type */ |
1451 | | |
1452 | | |
1453 | | |
1454 | 0 | return _offset; |
1455 | |
|
1456 | 0 | } /* dissect_wlccp_sec_msg */ |
1457 | | |
1458 | | static unsigned dissect_wlccp_rrm_msg(proto_tree *_tree, tvbuff_t *_tvb, unsigned _offset, uint8_t _base_message_type) |
1459 | 0 | { |
1460 | |
|
1461 | 0 | proto_tree *_wlccp_rm_flags_tree; |
1462 | 0 | proto_item *_ti; |
1463 | |
|
1464 | 0 | bool _mic_flag=0; |
1465 | | |
1466 | | |
1467 | | |
1468 | | /* Decode the RM Flags Field */ |
1469 | |
|
1470 | 0 | _ti = proto_tree_add_item(_tree, hf_wlccp_rm_flags, |
1471 | 0 | _tvb, _offset, 1, ENC_BIG_ENDIAN); |
1472 | |
|
1473 | 0 | _wlccp_rm_flags_tree = proto_item_add_subtree(_ti, ett_wlccp_rm_flags); |
1474 | |
|
1475 | 0 | proto_tree_add_item(_wlccp_rm_flags_tree, hf_wlccp_rm_mic_flag, |
1476 | 0 | _tvb, _offset, 1, ENC_BIG_ENDIAN); |
1477 | |
|
1478 | 0 | _mic_flag = (tvb_get_uint8(_tvb, _offset) & RM_F_MIC) >> 1; |
1479 | |
|
1480 | 0 | set_mic_flag(_mic_flag); |
1481 | |
|
1482 | 0 | set_tlv_flag(true); |
1483 | |
|
1484 | 0 | proto_tree_add_item(_wlccp_rm_flags_tree, hf_wlccp_rm_request_reply_flag, |
1485 | 0 | _tvb, _offset, 1, ENC_BIG_ENDIAN); |
1486 | |
|
1487 | 0 | _offset += 1; |
1488 | | |
1489 | | /* End Decode the RM Flags Field */ |
1490 | |
|
1491 | 0 | proto_tree_add_item(_tree, hf_wlccp_msg_id, |
1492 | 0 | _tvb, _offset, 2, ENC_BIG_ENDIAN); |
1493 | 0 | _offset += 2; |
1494 | |
|
1495 | 0 | proto_tree_add_item(_tree, hf_wlccp_originator_node_type, |
1496 | 0 | _tvb, _offset, 2, ENC_BIG_ENDIAN); |
1497 | 0 | _offset += 2; |
1498 | |
|
1499 | 0 | proto_tree_add_item(_tree, hf_wlccp_originator, |
1500 | 0 | _tvb, _offset, 6, ENC_NA); |
1501 | 0 | _offset += 6; |
1502 | |
|
1503 | 0 | proto_tree_add_item(_tree, hf_wlccp_responder_node_type, |
1504 | 0 | _tvb, _offset, 2, ENC_BIG_ENDIAN); |
1505 | 0 | _offset += 2; |
1506 | |
|
1507 | 0 | proto_tree_add_item(_tree, hf_wlccp_responder, |
1508 | 0 | _tvb, _offset, 6, ENC_NA); |
1509 | 0 | _offset += 6; |
1510 | | |
1511 | |
|
1512 | 0 | switch (_base_message_type) |
1513 | 0 | { |
1514 | | |
1515 | 0 | case 0x01: /* rmReq */ |
1516 | 0 | { |
1517 | 0 | break; |
1518 | 0 | } /* case 0x01 */ |
1519 | | |
1520 | 0 | case 0x02: /* rmReqRoutingResp */ |
1521 | 0 | { |
1522 | 0 | break; |
1523 | 0 | } /* case 0x01 */ |
1524 | | |
1525 | 0 | case 0x03: /* rmReport */ |
1526 | 0 | { |
1527 | 0 | break; |
1528 | 0 | } /* case 0x01 */ |
1529 | | |
1530 | 0 | default: |
1531 | 0 | { |
1532 | |
|
1533 | 0 | break; |
1534 | 0 | } /* default for switch _base_message_type */ |
1535 | |
|
1536 | 0 | } /* switch _base_message_type */ |
1537 | | |
1538 | | |
1539 | 0 | return _offset; |
1540 | |
|
1541 | 0 | } /* dissect_wlccp_rrm_msg */ |
1542 | | |
1543 | | |
1544 | | |
1545 | | static unsigned dissect_wlccp_qos_msg(proto_tree *_tree _U_, tvbuff_t *_tvb _U_, unsigned _offset, uint8_t _base_message_type) |
1546 | 0 | { |
1547 | | /* at the moment we have no more data to use to write this dissector code */ |
1548 | | /* it's just a place holder for now */ |
1549 | | |
1550 | |
|
1551 | 0 | switch (_base_message_type) |
1552 | 0 | { |
1553 | | |
1554 | 0 | case 0x01: |
1555 | 0 | { |
1556 | |
|
1557 | 0 | break; |
1558 | 0 | } /* case 0x01 */ |
1559 | | |
1560 | 0 | default: |
1561 | 0 | { |
1562 | |
|
1563 | 0 | break; |
1564 | 0 | } /* default for switch _base_message_type */ |
1565 | |
|
1566 | 0 | } /* switch _base_message_type */ |
1567 | | |
1568 | | |
1569 | 0 | return _offset; |
1570 | |
|
1571 | 0 | } /* dissect_wlccp_qos_msg */ |
1572 | | |
1573 | | |
1574 | | static unsigned dissect_wlccp_nm_msg(proto_tree *_tree, tvbuff_t *_tvb, unsigned _offset, uint8_t _base_message_type) |
1575 | 3 | { |
1576 | 3 | proto_item *_ti; |
1577 | 3 | proto_tree *_wlccp_ap_node_id_tree, *_wlccp_nm_flags_tree; |
1578 | | |
1579 | 3 | bool _mic_flag=0, _tlv_flag=0; |
1580 | | |
1581 | | |
1582 | 3 | proto_tree_add_item(_tree, hf_wlccp_nm_version, |
1583 | 3 | _tvb, _offset, 1, ENC_BIG_ENDIAN); |
1584 | 3 | _offset += 1; |
1585 | | |
1586 | 3 | proto_tree_add_item(_tree, hf_wlccp_msg_id, |
1587 | 3 | _tvb, _offset, 2, ENC_BIG_ENDIAN); |
1588 | 3 | _offset += 2; |
1589 | | |
1590 | | |
1591 | | /* Decode the NM Flags Field */ |
1592 | | |
1593 | 3 | _ti = proto_tree_add_item(_tree, hf_wlccp_flags, |
1594 | 3 | _tvb, _offset, 2, ENC_BIG_ENDIAN); |
1595 | 3 | _wlccp_nm_flags_tree = proto_item_add_subtree(_ti, ett_wlccp_nm_flags); |
1596 | | |
1597 | | |
1598 | 3 | proto_tree_add_item(_wlccp_nm_flags_tree, hf_wlccp_retry_flag, |
1599 | 3 | _tvb, _offset, 2, ENC_BIG_ENDIAN); |
1600 | | |
1601 | 3 | proto_tree_add_item(_wlccp_nm_flags_tree, hf_wlccp_ack_required_flag, |
1602 | 3 | _tvb, _offset, 2, ENC_BIG_ENDIAN); |
1603 | | |
1604 | 3 | proto_tree_add_item(_wlccp_nm_flags_tree, hf_wlccp_tlv_flag, |
1605 | 3 | _tvb, _offset, 2, ENC_BIG_ENDIAN); |
1606 | 3 | _tlv_flag = (tvb_get_ntohs(_tvb, _offset)>>13) & 1; |
1607 | 3 | set_tlv_flag(_tlv_flag); |
1608 | | |
1609 | 3 | proto_tree_add_item(_wlccp_nm_flags_tree, hf_wlccp_mic_flag, |
1610 | 3 | _tvb, _offset, 2, ENC_BIG_ENDIAN); |
1611 | 3 | _mic_flag = (tvb_get_ntohs(_tvb, _offset)>>7) & 1; |
1612 | 3 | set_mic_flag(_mic_flag); |
1613 | | |
1614 | 3 | _offset += 2; |
1615 | | |
1616 | | /* End Decode the NM Flags Field */ |
1617 | | |
1618 | | |
1619 | 3 | proto_tree_add_item(_tree, hf_wlccp_originator_node_type, |
1620 | 3 | _tvb, _offset, 2, ENC_BIG_ENDIAN); |
1621 | 3 | _offset += 2; |
1622 | | |
1623 | 3 | proto_tree_add_item(_tree, hf_wlccp_originator, |
1624 | 3 | _tvb, _offset, 6, ENC_NA); |
1625 | 3 | _offset += 6; |
1626 | | |
1627 | 3 | proto_tree_add_item(_tree, hf_wlccp_responder_node_type, |
1628 | 3 | _tvb, _offset, 2, ENC_BIG_ENDIAN); |
1629 | 3 | _offset += 2; |
1630 | | |
1631 | 3 | proto_tree_add_item(_tree, hf_wlccp_responder, |
1632 | 3 | _tvb, _offset, 6, ENC_NA); |
1633 | 3 | _offset += 6; |
1634 | | |
1635 | | |
1636 | 3 | switch (_base_message_type) |
1637 | 3 | { |
1638 | | |
1639 | 0 | case 0x01: /* nmAck */ |
1640 | 0 | { |
1641 | 0 | break; |
1642 | 0 | } /* case 0x01 */ |
1643 | | |
1644 | 0 | case 0x10: /* nmConfigRequest */ |
1645 | 0 | { |
1646 | 0 | proto_tree_add_item(_tree, hf_wlccp_nmconfig, |
1647 | 0 | _tvb, _offset, 1, ENC_BIG_ENDIAN); |
1648 | 0 | _offset += 1; |
1649 | | |
1650 | | /* kan - there appears to be some padding or other unknowns here */ |
1651 | 0 | _offset += 3; |
1652 | |
|
1653 | 0 | break; |
1654 | 0 | } /* case 0x10 */ |
1655 | | |
1656 | 0 | case 0x11: /* nmConfigReply */ |
1657 | 0 | { |
1658 | 0 | proto_tree_add_item(_tree, hf_wlccp_nmconfig, |
1659 | 0 | _tvb, _offset, 1, ENC_BIG_ENDIAN); |
1660 | 0 | _offset += 1; |
1661 | | |
1662 | | /* kan - there appears to be some padding or other unknowns here */ |
1663 | 0 | _offset += 3; |
1664 | |
|
1665 | 0 | break; |
1666 | 0 | } /* case 0x11 */ |
1667 | | |
1668 | 0 | case 0x20: /* nmApRegistration */ |
1669 | 0 | { |
1670 | 0 | proto_tree_add_item(_tree, hf_wlccp_timestamp, |
1671 | 0 | _tvb, _offset, 8, ENC_BIG_ENDIAN); |
1672 | 0 | _offset += 8; |
1673 | |
|
1674 | 0 | proto_tree_add_item(_tree, hf_wlccp_apregstatus, |
1675 | 0 | _tvb, _offset, 1, ENC_BIG_ENDIAN); |
1676 | 0 | _offset += 1; |
1677 | |
|
1678 | 0 | _offset += 3; /*kan - skip some apparently unused bytes */ |
1679 | |
|
1680 | 0 | _ti = proto_tree_add_item(_tree, hf_wlccp_ap_node_id, |
1681 | 0 | _tvb, _offset, 8, ENC_NA); |
1682 | |
|
1683 | 0 | _wlccp_ap_node_id_tree = proto_item_add_subtree( |
1684 | 0 | _ti, ett_wlccp_ap_node_id); |
1685 | |
|
1686 | 0 | proto_tree_add_item(_wlccp_ap_node_id_tree, hf_wlccp_ap_node_type, |
1687 | 0 | _tvb, _offset, 2, ENC_BIG_ENDIAN); |
1688 | 0 | _offset += 2; |
1689 | |
|
1690 | 0 | proto_tree_add_item(_wlccp_ap_node_id_tree, hf_wlccp_ap_node_id_address, |
1691 | 0 | _tvb, _offset, 6, ENC_NA); |
1692 | 0 | _offset += 6; |
1693 | |
|
1694 | 0 | break; |
1695 | 0 | } /* case 0x20 */ |
1696 | | |
1697 | 0 | case 0x21: /* nmScmStateChange */ |
1698 | 0 | { |
1699 | 0 | proto_tree_add_item(_tree, hf_wlccp_timestamp, |
1700 | 0 | _tvb, _offset, 8, ENC_BIG_ENDIAN); |
1701 | 0 | _offset += 8; |
1702 | |
|
1703 | 0 | proto_tree_add_item(_tree, hf_wlccp_scmstate_change, |
1704 | 0 | _tvb, _offset, 1, ENC_BIG_ENDIAN); |
1705 | 0 | _offset += 1; |
1706 | |
|
1707 | 0 | proto_tree_add_item(_tree, hf_wlccp_scmstate_change_reason, |
1708 | 0 | _tvb, _offset, 1, ENC_BIG_ENDIAN); |
1709 | 0 | _offset += 1; |
1710 | | |
1711 | | /*kan - skip some apparently unused bytes */ |
1712 | 0 | _offset += 2; |
1713 | |
|
1714 | 0 | break; |
1715 | 0 | } /* case 0x21 */ |
1716 | | |
1717 | 0 | case 0x22: /* nmScmKeepActive */ |
1718 | 0 | { |
1719 | 0 | proto_tree_add_item(_tree, hf_wlccp_scmattach_state, |
1720 | 0 | _tvb, _offset, 1, ENC_BIG_ENDIAN); |
1721 | 0 | _offset += 1; |
1722 | |
|
1723 | 0 | proto_tree_add_item(_tree, hf_wlccp_nmconfig, |
1724 | 0 | _tvb, _offset, 1, ENC_BIG_ENDIAN); |
1725 | 0 | _offset += 1; |
1726 | |
|
1727 | 0 | proto_tree_add_item(_tree, hf_wlccp_nmcapability, |
1728 | 0 | _tvb, _offset, 1, ENC_BIG_ENDIAN); |
1729 | 0 | _offset += 1; |
1730 | | |
1731 | | /*kan - skip some apparently unused bytes */ |
1732 | 0 | _offset += 1; |
1733 | |
|
1734 | 0 | break; |
1735 | 0 | } /* case 0x22 */ |
1736 | | |
1737 | 0 | case 0x30: /* nmClientEventReport */ |
1738 | 0 | { |
1739 | 0 | proto_tree_add_item(_tree, hf_wlccp_timestamp, |
1740 | 0 | _tvb, _offset, 8, ENC_BIG_ENDIAN); |
1741 | 0 | _offset += 8; |
1742 | |
|
1743 | 0 | break; |
1744 | 0 | } /* case 0x30 */ |
1745 | | |
1746 | 1 | case 0x31: /* nmAllClientRefreshRequest */ |
1747 | 1 | { |
1748 | 1 | proto_tree_add_item(_tree, hf_wlccp_refresh_req_id, |
1749 | 1 | _tvb, _offset, 4, ENC_BIG_ENDIAN); |
1750 | 1 | _offset += 4; |
1751 | | |
1752 | 1 | break; |
1753 | 0 | } /* case 0x31 */ |
1754 | | |
1755 | 2 | default: |
1756 | 2 | { |
1757 | | |
1758 | 2 | break; |
1759 | 0 | } /* default for switch _base_message_type */ |
1760 | | |
1761 | 3 | } /* switch _base_message_type */ |
1762 | | |
1763 | | |
1764 | | |
1765 | 3 | return _offset; |
1766 | | |
1767 | 3 | } /* dissect_wlccp_nm_msg */ |
1768 | | |
1769 | | static unsigned dissect_wlccp_mip_msg(proto_tree *_tree _U_, tvbuff_t *_tvb _U_, unsigned _offset, uint8_t _base_message_type) |
1770 | 0 | { |
1771 | | /* at the moment we have no more data to use to write this dissector code */ |
1772 | | /* it's just a place holder for now */ |
1773 | |
|
1774 | 0 | switch (_base_message_type) |
1775 | 0 | { |
1776 | | |
1777 | 0 | case 0x01: |
1778 | 0 | { |
1779 | |
|
1780 | 0 | break; |
1781 | 0 | } /* case 0x01 */ |
1782 | | |
1783 | 0 | default: |
1784 | 0 | { |
1785 | |
|
1786 | 0 | break; |
1787 | 0 | } /* default for switch _base_message_type */ |
1788 | |
|
1789 | 0 | } /* switch _base_message_type */ |
1790 | | |
1791 | 0 | return _offset; |
1792 | |
|
1793 | 0 | } /* dissect_wlccp_mip_msg */ |
1794 | | |
1795 | | |
1796 | | /***************************************************************************************************/ |
1797 | | |
1798 | | // NOLINTNEXTLINE(misc-no-recursion) |
1799 | | static unsigned dissect_wlccp_tlvs( proto_tree *_tree, tvbuff_t *_tvb, unsigned _offset, unsigned _depth) |
1800 | 38 | { |
1801 | | |
1802 | 38 | proto_item *_ti, *_temp_ti; |
1803 | 38 | proto_tree *_tlv_tree; |
1804 | 38 | proto_tree *_tlv_flags_tree; |
1805 | | |
1806 | 38 | bool _container_flag=0; |
1807 | 38 | int _group_id=0, _type_id=0; |
1808 | 38 | unsigned _length=0; |
1809 | 38 | unsigned _tlv_end=0; |
1810 | 38 | unsigned _old_offset; |
1811 | | |
1812 | | |
1813 | | |
1814 | | /* the TLV length is 2 bytes into the TLV, and we need it now */ |
1815 | 38 | _length = tvb_get_ntohs(_tvb,_offset+2); |
1816 | | |
1817 | | /* figure out where the end of this TLV is so we know when to stop dissecting it */ |
1818 | 38 | _tlv_end = _offset + _length; |
1819 | | |
1820 | | /* this TLV is _length bytes long */ |
1821 | 38 | _ti = proto_tree_add_item(_tree, hf_wlccp_tlv, _tvb, _offset, _length, ENC_NA); |
1822 | | /* create the TLV sub tree */ |
1823 | 38 | _tlv_tree = proto_item_add_subtree(_ti, ett_wlccp_tlv_tree); |
1824 | | |
1825 | | /* save the pointer because we'll add some text to it later */ |
1826 | 38 | _temp_ti = _ti; |
1827 | | |
1828 | | |
1829 | | |
1830 | | /* add an arbitrary safety factor in case we foul up the dissector recursion */ |
1831 | 38 | DISSECTOR_ASSERT(_depth < 100); |
1832 | | |
1833 | | /* add the flags field to the tlv_tree */ |
1834 | 38 | _ti = proto_tree_add_item(_tlv_tree, hf_tlv_flags, _tvb, _offset, 2, ENC_BIG_ENDIAN); |
1835 | 38 | _tlv_flags_tree = proto_item_add_subtree(_ti, ett_tlv_flags_tree); |
1836 | | |
1837 | | /* |
1838 | | first 2 bytes are the flags, Group and Type |
1839 | | bit 0 = container, |
1840 | | bit 1 = encrypted, |
1841 | | bits 2-3 = reserved, |
1842 | | bits 4-7 = group ID, |
1843 | | bit 5 = request, |
1844 | | bits 9-15 = type ID |
1845 | | */ |
1846 | | |
1847 | | |
1848 | | /* the TLV group and type IDs are contained in the flags field, extract them */ |
1849 | 38 | _group_id = (tvb_get_ntohs(_tvb,_offset) & TLV_GROUP_ID) >> 8; |
1850 | 38 | _type_id = (tvb_get_ntohs(_tvb,_offset) & TLV_TYPE_ID); |
1851 | | |
1852 | | /* add the flags to the tree */ |
1853 | 38 | proto_tree_add_item(_tlv_flags_tree, hf_wlccp_tlv_container_flag, _tvb, _offset, 2, ENC_BIG_ENDIAN); |
1854 | 38 | proto_tree_add_item(_tlv_flags_tree, hf_wlccp_tlv_encrypted_flag, _tvb, _offset, 2, ENC_BIG_ENDIAN); |
1855 | 38 | proto_tree_add_item(_tlv_flags_tree, hf_wlccp_tlv_reserved_bit, _tvb, _offset, 2, ENC_BIG_ENDIAN); |
1856 | 38 | proto_tree_add_item(_tlv_flags_tree, hf_wlccp_tlv_group, _tvb, _offset, 2, ENC_BIG_ENDIAN); |
1857 | 38 | proto_tree_add_item(_tlv_flags_tree, hf_wlccp_tlv_request_flag, _tvb, _offset, 2, ENC_BIG_ENDIAN); |
1858 | | |
1859 | | /* a hack to show the right string representation of the type_id in the tree */ |
1860 | 38 | switch (_group_id) |
1861 | 38 | { |
1862 | 8 | case WLCCP_TLV_GROUP_WLCCP: |
1863 | 8 | { |
1864 | 8 | proto_tree_add_item(_tlv_flags_tree, hf_wlccp_tlv_type0, _tvb, _offset, 2, ENC_BIG_ENDIAN); |
1865 | 8 | break; |
1866 | 0 | } /* case WLCCP_TLV_GROUP_WLCCP */ |
1867 | | |
1868 | 1 | case WLCCP_TLV_GROUP_SEC: |
1869 | 1 | { |
1870 | 1 | proto_tree_add_item(_tlv_flags_tree, hf_wlccp_tlv_type1, _tvb, _offset, 2, ENC_BIG_ENDIAN); |
1871 | 1 | break; |
1872 | 0 | } /* case WLCCP_TLV_GROUP_SEC */ |
1873 | | |
1874 | 11 | case WLCCP_TLV_GROUP_RRM: |
1875 | 11 | { |
1876 | 11 | proto_tree_add_item(_tlv_flags_tree, hf_wlccp_tlv_type2, _tvb, _offset, 2, ENC_BIG_ENDIAN); |
1877 | 11 | break; |
1878 | 0 | } /* case WLCCP_TLV_GROUP_RRM */ |
1879 | | |
1880 | 6 | case WLCCP_TLV_GROUP_QOS: |
1881 | 6 | { |
1882 | 6 | proto_tree_add_item(_tlv_flags_tree, hf_wlccp_tlv_type3, _tvb, _offset, 2, ENC_BIG_ENDIAN); |
1883 | 6 | break; |
1884 | 0 | } /* case WLCCP_TLV_GROUP_QOS */ |
1885 | | |
1886 | 1 | case WLCCP_TLV_GROUP_NM: |
1887 | 1 | { |
1888 | 1 | proto_tree_add_item(_tlv_flags_tree, hf_wlccp_tlv_type4, _tvb, _offset, 2, ENC_BIG_ENDIAN); |
1889 | 1 | break; |
1890 | 0 | } /* case WLCCP_TLV_GROUP_NM */ |
1891 | | |
1892 | 1 | case WLCCP_TLV_GROUP_MIP: |
1893 | 1 | { |
1894 | 1 | proto_tree_add_item(_tlv_flags_tree, hf_wlccp_tlv_type5, _tvb, _offset, 2, ENC_BIG_ENDIAN); |
1895 | 1 | break; |
1896 | 0 | } /* case WLCCP_TLV_GROUP_MIP */ |
1897 | | |
1898 | 9 | default: |
1899 | 9 | { |
1900 | 9 | proto_tree_add_item(_tlv_flags_tree, hf_wlccp_tlv_type, _tvb, _offset, 2, ENC_BIG_ENDIAN); |
1901 | 9 | break; |
1902 | 0 | } /* case default for switch _group_id */ |
1903 | | |
1904 | | |
1905 | 38 | } /* switch _group_id */ |
1906 | | |
1907 | 37 | _container_flag = (tvb_get_ntohs(_tvb, _offset) & TLV_F_CONTAINER) >> 15; |
1908 | | |
1909 | | /* according to the patent, some behavior changes if the request flag is set */ |
1910 | | /* it would be nice if it said how, but I don't think it matters for decoding purposes */ |
1911 | | |
1912 | 37 | _offset += 2; |
1913 | | |
1914 | | /* finished with the flags field */ |
1915 | | |
1916 | | /* add the length field to the tlv_tree */ |
1917 | 37 | proto_tree_add_item(_tlv_tree, hf_wlccp_tlv_length, _tvb, _offset, 2, ENC_BIG_ENDIAN); |
1918 | | |
1919 | 37 | _offset += 2; |
1920 | | /* finished with the length field */ |
1921 | | |
1922 | | /* now decode the fixed fields in each TLV */ |
1923 | | |
1924 | 37 | switch (_group_id) |
1925 | 37 | { |
1926 | 8 | case WLCCP_TLV_GROUP_WLCCP: |
1927 | 8 | { |
1928 | 8 | _offset = dissect_wlccp_ccm_tlv(_tlv_tree, _tvb, _offset, _type_id, _length - 4, _temp_ti); |
1929 | 8 | break; |
1930 | | |
1931 | 0 | } /* case WLCCP_TLV_GROUP_WLCCP */ |
1932 | | |
1933 | 1 | case WLCCP_TLV_GROUP_SEC: |
1934 | 1 | { |
1935 | 1 | _offset = dissect_wlccp_sec_tlv(_tlv_tree, _tvb, _offset, _type_id, _length - 4, _temp_ti); |
1936 | 1 | break; |
1937 | | |
1938 | 0 | } /* case WLCCP_TLV_GROUP_SEC */ |
1939 | | |
1940 | 11 | case WLCCP_TLV_GROUP_RRM: |
1941 | 11 | { |
1942 | 11 | _offset = dissect_wlccp_rrm_tlv(_tlv_tree, _tvb, _offset, _type_id, _length - 4, _temp_ti); |
1943 | 11 | break; |
1944 | | |
1945 | 0 | } /* case WLCCP_TLV_GROUP_RRM */ |
1946 | | |
1947 | 6 | case WLCCP_TLV_GROUP_QOS: |
1948 | 6 | { |
1949 | 6 | _offset = dissect_wlccp_qos_tlv(_tlv_tree, _tvb, _offset, _type_id, _length - 4, _temp_ti); |
1950 | 6 | break; |
1951 | | |
1952 | 0 | } /* case WLCCP_TLV_GROUP_QOS */ |
1953 | | |
1954 | 1 | case WLCCP_TLV_GROUP_NM: |
1955 | 1 | { |
1956 | 1 | _offset = dissect_wlccp_nm_tlv(_tlv_tree, _tvb, _offset, _type_id, _length - 4, _temp_ti); |
1957 | 1 | break; |
1958 | | |
1959 | 0 | } /* case WLCCP_TLV_GROUP_NM */ |
1960 | | |
1961 | 1 | case WLCCP_TLV_GROUP_MIP: |
1962 | 1 | { |
1963 | 1 | _offset = dissect_wlccp_mip_tlv(_tlv_tree, _tvb, _offset, _type_id, _length - 4, _temp_ti); |
1964 | 1 | break; |
1965 | | |
1966 | 0 | } /* case WLCCP_TLV_GROUP_MIP */ |
1967 | | |
1968 | 9 | default: |
1969 | 9 | { |
1970 | 9 | if (_offset < _tlv_end) |
1971 | 5 | _offset = _tlv_end; |
1972 | 9 | break; |
1973 | 0 | } /* case default for switch _group_id */ |
1974 | | |
1975 | 37 | } /* switch _group_id */ |
1976 | | |
1977 | | /* done with decoding the fixed TLV fields */ |
1978 | | |
1979 | | |
1980 | | |
1981 | | /* If this TLV is a container, then build a sub tree and decode the contained TLVs */ |
1982 | | |
1983 | 27 | if (_container_flag && (_offset >= _tlv_end) ) |
1984 | 4 | { |
1985 | | /* something is wrong if there's not enough left in the buffer */ |
1986 | | |
1987 | 4 | } /* if container_flag and _offset >= _tlv_end */ |
1988 | 23 | else /* _container_flag && _offset >= tlv_end */ |
1989 | 23 | { |
1990 | | |
1991 | 23 | if (_container_flag && (_offset < _tlv_end) ) |
1992 | 8 | { |
1993 | | |
1994 | 17 | while (_offset < _tlv_end) |
1995 | 9 | { |
1996 | 9 | _old_offset = _offset; |
1997 | | // We recurse here, but we'll run out of packet before we run out of stack. |
1998 | 9 | _offset = dissect_wlccp_tlvs(_tlv_tree, _tvb, _offset, _depth++); |
1999 | 9 | DISSECTOR_ASSERT(_offset > _old_offset); |
2000 | 9 | } /* while bytes_left >= 4*/ |
2001 | | |
2002 | 8 | } /* _container_flag && (tvb_length_remaining(_tvb,_offset) >= 4) */ |
2003 | | |
2004 | 23 | } /*_container_flag && (tvb_length_remaining(_tvb,_offset) < 4) */ |
2005 | | |
2006 | | |
2007 | | /* done with decoding the contained TLVs */ |
2008 | | |
2009 | 27 | return (_tlv_end > _offset) ? _tlv_end : _offset; |
2010 | | |
2011 | 37 | } /* dissect_wlccp_tlvs */ |
2012 | | |
2013 | | |
2014 | | /* ************************************************************************************************************* */ |
2015 | | |
2016 | | /* ALL THE TLV SUB-DISSECTORS NEED A DEFAULT CASE, OTHERWISE WE'LL GET INTO AN INFINITE RECURSION LOOP INSIDE */ |
2017 | | /* THE CALLING FUNCTION dissect_wlccp_tlvs. BESIDES, IT'S JUST GOOD FORM :-) */ |
2018 | | |
2019 | | |
2020 | | static unsigned dissect_wlccp_ccm_tlv(proto_tree *_tree, tvbuff_t *_tvb, unsigned _offset, int _type_id, unsigned _length, proto_item *_ti) |
2021 | 8 | { |
2022 | | |
2023 | 8 | switch (_type_id) |
2024 | 8 | { |
2025 | | |
2026 | 7 | case 0x00: /* NULL TLV */ |
2027 | 7 | { |
2028 | 7 | proto_item_append_text(_ti, " NULL TLV"); |
2029 | 7 | proto_tree_add_item(_tree, hf_wlccp_null_tlv , _tvb, _offset, _length, ENC_NA); |
2030 | 7 | _offset += _length; |
2031 | | |
2032 | 7 | break; |
2033 | | |
2034 | 0 | } /* case tlv_type_id = 0x09 */ |
2035 | | |
2036 | | |
2037 | 0 | case 0x09: /* ipv4Address */ |
2038 | 0 | { |
2039 | 0 | proto_item_append_text(_ti, " IPv4Address"); |
2040 | 0 | proto_tree_add_item(_tree, hf_wlccp_ipv4_address, _tvb, _offset, 4, ENC_BIG_ENDIAN); |
2041 | 0 | _offset += 4; |
2042 | |
|
2043 | 0 | break; |
2044 | | |
2045 | 0 | } /* case tlv_type_id = 0x09 */ |
2046 | | |
2047 | | |
2048 | 1 | default: |
2049 | 1 | { |
2050 | | /* for unknown types, just add them to the tree as a blob */ |
2051 | 1 | proto_item_append_text(_ti, " Unknown"); |
2052 | | |
2053 | 1 | proto_tree_add_item(_tree, hf_wlccp_tlv_unknown_value, _tvb, _offset, _length, ENC_NA); |
2054 | 1 | _offset += _length; |
2055 | | |
2056 | 1 | break; |
2057 | 0 | } /* case default for tlv_group_id=0x00 */ |
2058 | | |
2059 | 8 | } /* switch _type_id */ |
2060 | | |
2061 | 4 | return _offset; |
2062 | | |
2063 | 8 | } /* dissect_wlccp_ccm_tlv */ |
2064 | | |
2065 | | |
2066 | | |
2067 | | static unsigned dissect_wlccp_sec_tlv(proto_tree *_tree, tvbuff_t *_tvb, unsigned _offset, int _type_id, unsigned _length, proto_item *_ti) |
2068 | 1 | { |
2069 | | |
2070 | 1 | switch (_type_id) |
2071 | 1 | { |
2072 | | |
2073 | 0 | case 0x01: /* initSession */ |
2074 | 0 | { |
2075 | |
|
2076 | 0 | proto_item_append_text(_ti, " initSession"); |
2077 | | |
2078 | | /* skip some unused bytes */ |
2079 | 0 | _offset += 1; |
2080 | |
|
2081 | 0 | proto_tree_add_item(_tree, hf_wlccp_path_length, _tvb, _offset, 1, ENC_BIG_ENDIAN); |
2082 | 0 | _offset += 1; |
2083 | | |
2084 | | /* skip some unused bytes */ |
2085 | 0 | _offset += 2; |
2086 | | |
2087 | |
|
2088 | 0 | break; |
2089 | 0 | } /* case 0x01 */ |
2090 | | |
2091 | 0 | case 0x02: /* inSecureContextReq */ |
2092 | 0 | { |
2093 | |
|
2094 | 0 | proto_item_append_text(_ti, " inSecureContextReq"); |
2095 | |
|
2096 | 0 | proto_tree_add_item(_tree, hf_wlccp_key_seq_count, _tvb, _offset, 4, ENC_BIG_ENDIAN); |
2097 | 0 | _offset += 4; |
2098 | |
|
2099 | 0 | proto_tree_add_item(_tree, hf_wlccp_dest_node_type, _tvb, _offset, 2, ENC_BIG_ENDIAN); |
2100 | 0 | _offset += 2; |
2101 | |
|
2102 | 0 | proto_tree_add_item(_tree, hf_wlccp_dest_node_id, _tvb, _offset, 6, ENC_NA); |
2103 | 0 | _offset += 6; |
2104 | |
|
2105 | 0 | proto_tree_add_item(_tree, hf_wlccp_supp_node_type, _tvb, _offset, 2, ENC_BIG_ENDIAN); |
2106 | 0 | _offset += 2; |
2107 | |
|
2108 | 0 | proto_tree_add_item(_tree, hf_wlccp_supp_node_id, _tvb, _offset, 6, ENC_NA); |
2109 | 0 | _offset += 6; |
2110 | | |
2111 | | /* skip unused bytes */ |
2112 | 0 | _offset += 1; |
2113 | |
|
2114 | 0 | proto_tree_add_item(_tree, hf_wlccp_key_mgmt_type, _tvb, _offset, 1, ENC_BIG_ENDIAN); |
2115 | 0 | _offset += 1; |
2116 | |
|
2117 | 0 | proto_tree_add_item(_tree, hf_wlccp_nonce, _tvb, _offset, 32, ENC_NA); |
2118 | 0 | _offset += 32; |
2119 | |
|
2120 | 0 | break; |
2121 | 0 | } /* case 0x02 */ |
2122 | | |
2123 | | |
2124 | 0 | case 0x06: /* authenticator */ |
2125 | 0 | { |
2126 | |
|
2127 | 0 | proto_item_append_text(_ti, " authenticator"); |
2128 | |
|
2129 | 0 | proto_tree_add_item(_tree, hf_wlccp_dest_node_type, _tvb, _offset, 2, ENC_BIG_ENDIAN); |
2130 | 0 | _offset += 2; |
2131 | |
|
2132 | 0 | proto_tree_add_item(_tree, hf_wlccp_dest_node_id, _tvb, _offset, 6, ENC_NA); |
2133 | 0 | _offset += 6; |
2134 | |
|
2135 | 0 | proto_tree_add_item(_tree, hf_wlccp_src_node_type, _tvb, _offset, 2, ENC_BIG_ENDIAN); |
2136 | 0 | _offset += 2; |
2137 | |
|
2138 | 0 | proto_tree_add_item(_tree, hf_wlccp_src_node_id, _tvb, _offset, 6, ENC_NA); |
2139 | 0 | _offset += 6; |
2140 | |
|
2141 | 0 | proto_tree_add_item(_tree, hf_wlccp_key_seq_count, _tvb, _offset, 4, ENC_BIG_ENDIAN); |
2142 | 0 | _offset += 4; |
2143 | | |
2144 | | /* skip unused bytes */ |
2145 | 0 | _offset += 1; |
2146 | |
|
2147 | 0 | proto_tree_add_item(_tree, hf_wlccp_status, _tvb, _offset, 1, ENC_BIG_ENDIAN); |
2148 | 0 | _offset += 1; |
2149 | |
|
2150 | 0 | proto_tree_add_item(_tree, hf_wlccp_nonce, _tvb, _offset, 32, ENC_NA); |
2151 | 0 | _offset += 32; |
2152 | |
|
2153 | 0 | break; |
2154 | 0 | } /* case 0x06 */ |
2155 | | |
2156 | 0 | case 0x08: /* MIC */ |
2157 | 0 | { |
2158 | |
|
2159 | 0 | uint16_t _mic_length=0; |
2160 | |
|
2161 | 0 | proto_item_append_text(_ti, " mic"); |
2162 | |
|
2163 | 0 | proto_tree_add_item(_tree, hf_wlccp_mic_msg_seq_count, _tvb, _offset, 8, ENC_BIG_ENDIAN); |
2164 | 0 | _offset += 8; |
2165 | |
|
2166 | 0 | proto_tree_add_item(_tree, hf_wlccp_mic_length, _tvb, _offset, 2, ENC_BIG_ENDIAN); |
2167 | 0 | _mic_length = tvb_get_ntohs(_tvb,_offset); |
2168 | 0 | _offset += 2; |
2169 | |
|
2170 | 0 | proto_tree_add_item(_tree, hf_wlccp_mic_value, _tvb, _offset, _mic_length, ENC_NA); |
2171 | 0 | _offset += _mic_length; |
2172 | |
|
2173 | 0 | break; |
2174 | 0 | } |
2175 | | |
2176 | 0 | case 0x0a: /* inSecureContextReply */ |
2177 | 0 | { |
2178 | |
|
2179 | 0 | proto_item_append_text(_ti, " inSecureContextReply"); |
2180 | | |
2181 | |
|
2182 | 0 | proto_tree_add_item(_tree, hf_wlccp_key_seq_count, _tvb, _offset, 4, ENC_BIG_ENDIAN); |
2183 | 0 | _offset += 4; |
2184 | |
|
2185 | 0 | proto_tree_add_item(_tree, hf_wlccp_dest_node_type, _tvb, _offset, 2, ENC_BIG_ENDIAN); |
2186 | 0 | _offset += 2; |
2187 | |
|
2188 | 0 | proto_tree_add_item(_tree, hf_wlccp_dest_node_id, _tvb, _offset, 6, ENC_NA); |
2189 | 0 | _offset += 6; |
2190 | |
|
2191 | 0 | proto_tree_add_item(_tree, hf_wlccp_supp_node_type, _tvb, _offset, 2, ENC_BIG_ENDIAN); |
2192 | 0 | _offset += 2; |
2193 | |
|
2194 | 0 | proto_tree_add_item(_tree, hf_wlccp_supp_node_id, _tvb, _offset, 6, ENC_NA); |
2195 | 0 | _offset += 6; |
2196 | |
|
2197 | 0 | proto_tree_add_item(_tree, hf_wlccp_nonce, _tvb, _offset, 32, ENC_NA); |
2198 | 0 | _offset += 32; |
2199 | |
|
2200 | 0 | proto_tree_add_item(_tree, hf_wlccp_session_timeout, _tvb, _offset, 4, ENC_BIG_ENDIAN); |
2201 | 0 | _offset += 4; |
2202 | |
|
2203 | 0 | break; |
2204 | 0 | } /* case 0x0a */ |
2205 | | |
2206 | | |
2207 | | |
2208 | 1 | default: |
2209 | 1 | { |
2210 | | /* for unknown types, just add them to the tree as a blob */ |
2211 | 1 | proto_item_append_text(_ti, " Unknown"); |
2212 | 1 | proto_tree_add_item(_tree, hf_wlccp_tlv_unknown_value, _tvb, _offset, _length, ENC_NA); |
2213 | 1 | _offset += _length; |
2214 | | |
2215 | 1 | break; |
2216 | 0 | } /* default case for switch (_type_id) */ |
2217 | | |
2218 | 1 | } /* switch _type_id */ |
2219 | | |
2220 | 0 | return _offset; |
2221 | 1 | } /* dissect_wlccp_sec_tlv */ |
2222 | | |
2223 | | |
2224 | | |
2225 | | static unsigned dissect_wlccp_rrm_tlv(proto_tree *_tree, tvbuff_t *_tvb, unsigned _offset, int _type_id, unsigned _length, proto_item *_ti) |
2226 | 11 | { |
2227 | | |
2228 | 11 | switch (_type_id) |
2229 | 11 | { |
2230 | | |
2231 | 4 | case 0x02: /* aggrRmReq */ |
2232 | 4 | { |
2233 | 4 | proto_item_append_text(_ti, " aggrRmReq"); |
2234 | 4 | proto_tree_add_item(_tree, hf_wlccp_token2, _tvb, _offset, 2, ENC_BIG_ENDIAN); |
2235 | 4 | _offset += 2; |
2236 | | |
2237 | 4 | proto_tree_add_item(_tree, hf_wlccp_interval, _tvb, _offset, 2, ENC_BIG_ENDIAN); |
2238 | 4 | _offset += 2; |
2239 | | |
2240 | 4 | break; |
2241 | | |
2242 | 0 | } /* case tlv_type_id = 0x02 */ |
2243 | | |
2244 | 0 | case 0x03 : /* rmReport */ |
2245 | 0 | { |
2246 | 0 | proto_item_append_text(_ti, " rmReport"); |
2247 | |
|
2248 | 0 | proto_tree_add_item(_tree, hf_wlccp_sta_type, _tvb, _offset, 1, ENC_BIG_ENDIAN); |
2249 | 0 | _offset += 1; |
2250 | |
|
2251 | 0 | proto_tree_add_item(_tree, hf_wlccp_bssid, _tvb, _offset, 6, ENC_NA); |
2252 | 0 | _offset += 6; |
2253 | |
|
2254 | 0 | proto_tree_add_item(_tree, hf_wlccp_stamac, _tvb, _offset, 6, ENC_NA); |
2255 | 0 | _offset += 6; |
2256 | |
|
2257 | 0 | break; |
2258 | 0 | } /* case tlv_type_id = 0x03 */ |
2259 | | |
2260 | 0 | case 0x04: /* aggrRmReport */ |
2261 | 0 | { |
2262 | 0 | proto_item_append_text(_ti, " aggrRmReport"); |
2263 | | |
2264 | | /* no fields */ |
2265 | |
|
2266 | 0 | break; |
2267 | 0 | } /* case tlv_type_id = 0x04 */ |
2268 | | |
2269 | 4 | case 0x12: /* beaconRequest */ |
2270 | 4 | { |
2271 | 4 | proto_item_append_text(_ti, " beaconRequest"); |
2272 | | |
2273 | 4 | proto_tree_add_item(_tree, hf_wlccp_token, _tvb, _offset, 1, ENC_BIG_ENDIAN); |
2274 | 4 | _offset += 1; |
2275 | | |
2276 | 4 | proto_tree_add_item(_tree, hf_wlccp_mode, _tvb, _offset, 1, ENC_BIG_ENDIAN); |
2277 | 4 | _offset += 1; |
2278 | | |
2279 | 4 | proto_tree_add_item(_tree, hf_wlccp_channel, _tvb, _offset, 1, ENC_BIG_ENDIAN); |
2280 | 4 | _offset += 1; |
2281 | | |
2282 | 4 | proto_tree_add_item(_tree, hf_wlccp_scan_mode, _tvb, _offset, 1, ENC_BIG_ENDIAN); |
2283 | 4 | _offset += 1; |
2284 | | |
2285 | 4 | proto_tree_add_item(_tree, hf_wlccp_duration, _tvb, _offset, 2, ENC_BIG_ENDIAN); |
2286 | 4 | _offset += 2; |
2287 | | |
2288 | | |
2289 | 4 | break; |
2290 | 0 | } /* case 0x12 */ |
2291 | | |
2292 | 0 | case 0x14: /* frameRequest */ |
2293 | 0 | { |
2294 | |
|
2295 | 0 | unsigned _count=0, _counter=0; |
2296 | |
|
2297 | 0 | proto_item_append_text(_ti, " frameRequest"); |
2298 | |
|
2299 | 0 | proto_tree_add_item(_tree, hf_wlccp_token, _tvb, _offset, 1, ENC_BIG_ENDIAN); |
2300 | 0 | _offset += 1; |
2301 | |
|
2302 | 0 | proto_tree_add_item(_tree, hf_wlccp_mode, _tvb, _offset, 1, ENC_BIG_ENDIAN); |
2303 | 0 | _offset += 1; |
2304 | |
|
2305 | 0 | proto_tree_add_item(_tree, hf_wlccp_channel, _tvb, _offset, 1, ENC_BIG_ENDIAN); |
2306 | 0 | _offset += 1; |
2307 | |
|
2308 | 0 | proto_tree_add_item(_tree, hf_wlccp_count, _tvb, _offset, 1, ENC_BIG_ENDIAN); |
2309 | 0 | _count = tvb_get_uint8(_tvb,_offset); |
2310 | 0 | _offset += 1; |
2311 | |
|
2312 | 0 | proto_tree_add_item(_tree, hf_wlccp_duration, _tvb, _offset, 2, ENC_BIG_ENDIAN); |
2313 | 0 | _offset += 2; |
2314 | |
|
2315 | 0 | for (_counter=0; _counter < _count; _counter++) |
2316 | 0 | { |
2317 | |
|
2318 | 0 | proto_tree_add_item(_tree, hf_wlccp_bssid, _tvb, _offset, 6, ENC_NA); |
2319 | 0 | _offset += 6; |
2320 | |
|
2321 | 0 | } /* for _counter=0 */ |
2322 | | |
2323 | | |
2324 | |
|
2325 | 0 | break; |
2326 | 0 | } /* case 0x14 */ |
2327 | | |
2328 | 0 | case 0x15: /* frameReport */ |
2329 | 0 | { |
2330 | |
|
2331 | 0 | proto_item *_fr_ti; |
2332 | 0 | proto_tree *_fr_elems_tree; |
2333 | |
|
2334 | 0 | unsigned _counter=0, _arraylen=0; |
2335 | |
|
2336 | 0 | proto_item_append_text(_ti, " frameReport"); |
2337 | |
|
2338 | 0 | proto_tree_add_item(_tree, hf_wlccp_token, _tvb, _offset, 1, ENC_BIG_ENDIAN); |
2339 | 0 | _offset += 1; |
2340 | |
|
2341 | 0 | proto_tree_add_item(_tree, hf_wlccp_mode, _tvb, _offset, 1, ENC_BIG_ENDIAN); |
2342 | 0 | _offset += 1; |
2343 | |
|
2344 | 0 | proto_tree_add_item(_tree, hf_wlccp_channel, _tvb, _offset, 1, ENC_BIG_ENDIAN); |
2345 | 0 | _offset += 1; |
2346 | | |
2347 | | /* skip some unused bytes */ |
2348 | 0 | _offset += 1; |
2349 | |
|
2350 | 0 | proto_tree_add_item(_tree, hf_wlccp_duration, _tvb, _offset, 2, ENC_BIG_ENDIAN); |
2351 | 0 | _offset += 2; |
2352 | |
|
2353 | 0 | _arraylen=(_length-10)/14; |
2354 | |
|
2355 | 0 | if (_arraylen > 0) |
2356 | 0 | { |
2357 | |
|
2358 | 0 | _fr_ti = proto_tree_add_item(_tree, hf_framereport_elements, _tvb, _offset, (_length-10), ENC_NA); |
2359 | 0 | _fr_elems_tree = proto_item_add_subtree(_fr_ti, ett_framereport_elements_tree); |
2360 | |
|
2361 | 0 | for(_counter=0; _counter < _arraylen; _counter++) |
2362 | 0 | { |
2363 | |
|
2364 | 0 | proto_tree_add_item(_fr_elems_tree, hf_wlccp_numframes, _tvb, _offset, 1, ENC_BIG_ENDIAN); |
2365 | 0 | _offset += 1; |
2366 | |
|
2367 | 0 | proto_tree_add_item(_fr_elems_tree, hf_wlccp_rss, _tvb, _offset, 1, ENC_BIG_ENDIAN); |
2368 | 0 | _offset += 1; |
2369 | |
|
2370 | 0 | proto_tree_add_item(_fr_elems_tree, hf_wlccp_bssid, _tvb, _offset, 6, ENC_NA); |
2371 | 0 | _offset += 6; |
2372 | |
|
2373 | 0 | proto_tree_add_item(_fr_elems_tree, hf_wlccp_stamac, _tvb, _offset, 6, ENC_NA); |
2374 | 0 | _offset += 6; |
2375 | |
|
2376 | 0 | } /* for _counter=0 */ |
2377 | |
|
2378 | 0 | } /* if _arraylen > 0 */ |
2379 | | |
2380 | |
|
2381 | 0 | break; |
2382 | 0 | } /* case 0x15 */ |
2383 | | |
2384 | | |
2385 | 0 | case 0x16: /* ccaRequest */ |
2386 | 0 | { |
2387 | 0 | proto_item_append_text(_ti, " ccaRequest"); |
2388 | |
|
2389 | 0 | proto_tree_add_item(_tree, hf_wlccp_token, _tvb, _offset, 1, ENC_BIG_ENDIAN); |
2390 | 0 | _offset += 1; |
2391 | |
|
2392 | 0 | proto_tree_add_item(_tree, hf_wlccp_mode, _tvb, _offset, 1, ENC_BIG_ENDIAN); |
2393 | 0 | _offset += 1; |
2394 | |
|
2395 | 0 | proto_tree_add_item(_tree, hf_wlccp_channel, _tvb, _offset, 1, ENC_BIG_ENDIAN); |
2396 | 0 | _offset += 1; |
2397 | | |
2398 | | /* skip some unused bytes */ |
2399 | 0 | _offset += 1; |
2400 | |
|
2401 | 0 | proto_tree_add_item(_tree, hf_wlccp_duration, _tvb, _offset, 2, ENC_BIG_ENDIAN); |
2402 | 0 | _offset += 2; |
2403 | |
|
2404 | 0 | break; |
2405 | 0 | } /* case 0x16 */ |
2406 | | |
2407 | | |
2408 | 0 | case 0x17: /* ccaReport */ |
2409 | 0 | { |
2410 | 0 | proto_item_append_text(_ti, " ccaReport"); |
2411 | |
|
2412 | 0 | proto_tree_add_item(_tree, hf_wlccp_token, _tvb, _offset, 1, ENC_BIG_ENDIAN); |
2413 | 0 | _offset += 1; |
2414 | |
|
2415 | 0 | proto_tree_add_item(_tree, hf_wlccp_mode, _tvb, _offset, 1, ENC_BIG_ENDIAN); |
2416 | 0 | _offset += 1; |
2417 | |
|
2418 | 0 | proto_tree_add_item(_tree, hf_wlccp_channel, _tvb, _offset, 1, ENC_BIG_ENDIAN); |
2419 | 0 | _offset += 1; |
2420 | | |
2421 | | /* skip some unused bytes */ |
2422 | 0 | _offset += 1; |
2423 | |
|
2424 | 0 | proto_tree_add_item(_tree, hf_wlccp_duration, _tvb, _offset, 2, ENC_BIG_ENDIAN); |
2425 | 0 | _offset += 2; |
2426 | |
|
2427 | 0 | proto_tree_add_item(_tree, hf_wlccp_ccabusy, _tvb, _offset, 1, ENC_BIG_ENDIAN); |
2428 | 0 | _offset += 1; |
2429 | |
|
2430 | 0 | break; |
2431 | | |
2432 | 0 | } /* case tlv_type_id = 0x17 */ |
2433 | | |
2434 | 0 | case 0x18: /* rpiHistRequest */ |
2435 | 0 | { |
2436 | 0 | proto_item_append_text(_ti, " rpiHistRequest"); |
2437 | |
|
2438 | 0 | proto_tree_add_item(_tree, hf_wlccp_token, _tvb, _offset, 1, ENC_BIG_ENDIAN); |
2439 | 0 | _offset += 1; |
2440 | |
|
2441 | 0 | proto_tree_add_item(_tree, hf_wlccp_mode, _tvb, _offset, 1, ENC_BIG_ENDIAN); |
2442 | 0 | _offset += 1; |
2443 | |
|
2444 | 0 | proto_tree_add_item(_tree, hf_wlccp_channel, _tvb, _offset, 1, ENC_BIG_ENDIAN); |
2445 | 0 | _offset += 1; |
2446 | | |
2447 | | /* skip some unused bytes */ |
2448 | 0 | _offset += 1; |
2449 | |
|
2450 | 0 | proto_tree_add_item(_tree, hf_wlccp_duration, _tvb, _offset, 2, ENC_BIG_ENDIAN); |
2451 | 0 | _offset += 2; |
2452 | |
|
2453 | 0 | break; |
2454 | 0 | } /* case 0x18 */ |
2455 | | |
2456 | 0 | case 0x19: /* rpiHistReport */ |
2457 | 0 | { |
2458 | |
|
2459 | 0 | unsigned _rpi_density_length=0; |
2460 | |
|
2461 | 0 | proto_item_append_text(_ti, " rpiHistReport"); |
2462 | |
|
2463 | 0 | proto_tree_add_item(_tree, hf_wlccp_token, _tvb, _offset, 1, ENC_BIG_ENDIAN); |
2464 | 0 | _offset += 1; |
2465 | |
|
2466 | 0 | proto_tree_add_item(_tree, hf_wlccp_mode, _tvb, _offset, 1, ENC_BIG_ENDIAN); |
2467 | 0 | _offset += 1; |
2468 | |
|
2469 | 0 | proto_tree_add_item(_tree, hf_wlccp_channel, _tvb, _offset, 1, ENC_BIG_ENDIAN); |
2470 | 0 | _offset += 1; |
2471 | | |
2472 | | /* skip some unused bytes */ |
2473 | 0 | _offset += 1; |
2474 | |
|
2475 | 0 | proto_tree_add_item(_tree, hf_wlccp_duration, _tvb, _offset, 2, ENC_BIG_ENDIAN); |
2476 | 0 | _offset += 2; |
2477 | |
|
2478 | 0 | _rpi_density_length = _length - 6 - 4; |
2479 | |
|
2480 | 0 | proto_tree_add_item(_tree, hf_wlccp_rpidensity, _tvb, _offset, _rpi_density_length, ENC_NA); |
2481 | 0 | _offset += _rpi_density_length; |
2482 | |
|
2483 | 0 | break; |
2484 | | |
2485 | 0 | } /* case tlv_type_id = 0x19 */ |
2486 | | |
2487 | 0 | case 0x1c: /* nullRequest */ |
2488 | 0 | { |
2489 | 0 | proto_item_append_text(_ti, " nullRequest"); |
2490 | |
|
2491 | 0 | proto_tree_add_item(_tree, hf_wlccp_token, _tvb, _offset, 1, ENC_BIG_ENDIAN); |
2492 | 0 | _offset += 1; |
2493 | |
|
2494 | 0 | proto_tree_add_item(_tree, hf_wlccp_mode, _tvb, _offset, 1, ENC_BIG_ENDIAN); |
2495 | 0 | _offset += 1; |
2496 | |
|
2497 | 0 | proto_tree_add_item(_tree, hf_wlccp_channel, _tvb, _offset, 1, ENC_BIG_ENDIAN); |
2498 | 0 | _offset += 1; |
2499 | | |
2500 | | /* skip some unused bytes */ |
2501 | 0 | _offset += 1; |
2502 | |
|
2503 | 0 | proto_tree_add_item(_tree, hf_wlccp_duration, _tvb, _offset, 2, ENC_BIG_ENDIAN); |
2504 | 0 | _offset += 2; |
2505 | |
|
2506 | 0 | break; |
2507 | 0 | } /* case 0x1c */ |
2508 | | |
2509 | | |
2510 | 0 | case 0x1e: /* commonBeaconReport */ |
2511 | 0 | { |
2512 | |
|
2513 | 0 | proto_tree *_80211_capabilities_tree; |
2514 | 0 | proto_item *_new_ti; |
2515 | |
|
2516 | 0 | unsigned _tlv80211length=0; |
2517 | |
|
2518 | 0 | proto_item_append_text(_ti, " commonBeaconReport"); |
2519 | |
|
2520 | 0 | proto_tree_add_item(_tree, hf_wlccp_srcidx, _tvb, _offset, 1, ENC_BIG_ENDIAN); |
2521 | 0 | _offset += 1; |
2522 | |
|
2523 | 0 | proto_tree_add_item(_tree, hf_wlccp_channel, _tvb, _offset, 1, ENC_BIG_ENDIAN); |
2524 | 0 | _offset += 1; |
2525 | |
|
2526 | 0 | proto_tree_add_item(_tree, hf_wlccp_phy_type, _tvb, _offset, 1, ENC_BIG_ENDIAN); |
2527 | 0 | _offset += 1; |
2528 | |
|
2529 | 0 | proto_tree_add_item(_tree, hf_wlccp_bssid, _tvb, _offset, 6, ENC_NA); |
2530 | 0 | _offset += 6; |
2531 | |
|
2532 | 0 | proto_tree_add_item(_tree, hf_wlccp_beacon_interval, _tvb, _offset, 2, ENC_BIG_ENDIAN); |
2533 | 0 | _offset += 2; |
2534 | | |
2535 | | |
2536 | | /* |
2537 | | if we assume the next field is the capabilities field from the 802.11 beacon, |
2538 | | then we have a 16-bit field thhf_wlccp_statusat contains the following (802.11-2007): |
2539 | | bit 0 = ESS |
2540 | | bit 1 = IBSS |
2541 | | bit 2 = CF pollable |
2542 | | bit 3 = CF Poll Request |
2543 | | bit 4 = privacy |
2544 | | bit 5 = Short Preamble |
2545 | | bit 6 = PBCC |
2546 | | bit 7 = Channel Agility |
2547 | | bit 8 = Spectrum Management |
2548 | | bit 9 = QoS |
2549 | | bit 10 = Short Slot Time |
2550 | | bit 11 = APSD |
2551 | | bit 12 = Reserved |
2552 | | bit 13 = DSSS-OFDM |
2553 | | bit 14 = Delayed Block Ack |
2554 | | bit 15 = Immediate Block Ack |
2555 | | */ |
2556 | |
|
2557 | 0 | _new_ti = proto_tree_add_item(_tree, hf_wlccp_80211_capabilities, |
2558 | 0 | _tvb, _offset, 2, ENC_BIG_ENDIAN); |
2559 | 0 | _80211_capabilities_tree = proto_item_add_subtree(_new_ti, ett_80211_capability_flags_tree); |
2560 | |
|
2561 | 0 | proto_tree_add_item(_80211_capabilities_tree, hf_80211_imm_block_ack, |
2562 | 0 | _tvb, _offset, 2, ENC_BIG_ENDIAN); |
2563 | 0 | proto_tree_add_item(_80211_capabilities_tree, hf_80211_dlyd_block_ack, |
2564 | 0 | _tvb, _offset, 2, ENC_BIG_ENDIAN); |
2565 | 0 | proto_tree_add_item(_80211_capabilities_tree, hf_80211_dsss_ofdm, |
2566 | 0 | _tvb, _offset, 2, ENC_BIG_ENDIAN); |
2567 | 0 | proto_tree_add_item(_80211_capabilities_tree, hf_80211_reserved, |
2568 | 0 | _tvb, _offset, 2, ENC_BIG_ENDIAN); |
2569 | 0 | proto_tree_add_item(_80211_capabilities_tree, hf_80211_apsd, |
2570 | 0 | _tvb, _offset, 2, ENC_BIG_ENDIAN); |
2571 | 0 | proto_tree_add_item(_80211_capabilities_tree, hf_80211_short_time_slot, |
2572 | 0 | _tvb, _offset, 2, ENC_BIG_ENDIAN); |
2573 | 0 | proto_tree_add_item(_80211_capabilities_tree, hf_80211_qos, |
2574 | 0 | _tvb, _offset, 2, ENC_BIG_ENDIAN); |
2575 | 0 | proto_tree_add_item(_80211_capabilities_tree, hf_80211_spectrum_mgmt, |
2576 | 0 | _tvb, _offset, 2, ENC_BIG_ENDIAN); |
2577 | 0 | proto_tree_add_item(_80211_capabilities_tree, hf_80211_chan_agility, |
2578 | 0 | _tvb, _offset, 2, ENC_BIG_ENDIAN); |
2579 | 0 | proto_tree_add_item(_80211_capabilities_tree, hf_80211_pbcc, |
2580 | 0 | _tvb, _offset, 2, ENC_BIG_ENDIAN); |
2581 | 0 | proto_tree_add_item(_80211_capabilities_tree, hf_80211_short_preamble, |
2582 | 0 | _tvb, _offset, 2, ENC_BIG_ENDIAN); |
2583 | 0 | proto_tree_add_item(_80211_capabilities_tree, hf_80211_cap_privacy, |
2584 | 0 | _tvb, _offset, 2, ENC_BIG_ENDIAN); |
2585 | 0 | proto_tree_add_item(_80211_capabilities_tree, hf_80211_cap_cf_poll_req, |
2586 | 0 | _tvb, _offset, 2, ENC_BIG_ENDIAN); |
2587 | 0 | proto_tree_add_item(_80211_capabilities_tree, hf_80211_cap_cf_pollable, |
2588 | 0 | _tvb, _offset, 2, ENC_BIG_ENDIAN); |
2589 | 0 | proto_tree_add_item(_80211_capabilities_tree, hf_80211_cap_ibss, |
2590 | 0 | _tvb, _offset, 2, ENC_BIG_ENDIAN); |
2591 | 0 | proto_tree_add_item(_80211_capabilities_tree, hf_80211_cap_ess, |
2592 | 0 | _tvb, _offset, 2, ENC_BIG_ENDIAN); |
2593 | | |
2594 | | /* proto_tree_add_item(_tree, hf_wlccp_capabilities, _tvb, _offset, 2, ENC_BIG_ENDIAN); */ |
2595 | 0 | _offset += 2; |
2596 | | |
2597 | |
|
2598 | 0 | _tlv80211length = _length - 13 - 4; |
2599 | | |
2600 | | /* This TLV could be decoded per the 802.11 information element spec's */ |
2601 | 0 | proto_tree_add_item(_tree, hf_wlccp_tlv80211, _tvb, _offset, _tlv80211length, ENC_NA); |
2602 | 0 | _offset += _tlv80211length; |
2603 | |
|
2604 | 0 | break; |
2605 | | |
2606 | 0 | } /* case tlv_type_id = 0x1e */ |
2607 | | |
2608 | | |
2609 | 0 | case 0x1f: /* aggrBeaconReport */ |
2610 | 0 | { |
2611 | 0 | proto_item_append_text(_ti, " aggrBeaconReport"); |
2612 | |
|
2613 | 0 | proto_tree_add_item(_tree, hf_wlccp_token, _tvb, _offset, 1, ENC_BIG_ENDIAN); |
2614 | 0 | _offset += 1; |
2615 | |
|
2616 | 0 | proto_tree_add_item(_tree, hf_wlccp_mode, _tvb, _offset, 1, ENC_BIG_ENDIAN); |
2617 | 0 | _offset += 1; |
2618 | |
|
2619 | 0 | proto_tree_add_item(_tree, hf_wlccp_rss, _tvb, _offset, 1, ENC_BIG_ENDIAN); |
2620 | 0 | _offset += 1; |
2621 | |
|
2622 | 0 | proto_tree_add_item(_tree, hf_wlccp_srcidx, _tvb, _offset, 1, ENC_BIG_ENDIAN); |
2623 | 0 | _offset += 1; |
2624 | |
|
2625 | 0 | proto_tree_add_item(_tree, hf_wlccp_parent_tsf, _tvb, _offset, 4, ENC_BIG_ENDIAN); |
2626 | 0 | _offset += 4; |
2627 | |
|
2628 | 0 | proto_tree_add_item(_tree, hf_wlccp_target_tsf, _tvb, _offset, 8, ENC_BIG_ENDIAN); |
2629 | 0 | _offset += 8; |
2630 | |
|
2631 | 0 | break; |
2632 | 0 | } /* case tlv_type_id = 0x1f */ |
2633 | | |
2634 | | |
2635 | 0 | case 0x20: /* rmReqRoutingList */ |
2636 | 0 | { |
2637 | |
|
2638 | 0 | unsigned _counter=0, _arraylen=0; |
2639 | |
|
2640 | 0 | proto_item_append_text(_ti, " rmReqRoutingList"); |
2641 | |
|
2642 | 0 | _arraylen=(_length)/16; |
2643 | |
|
2644 | 0 | if (_arraylen > 0) |
2645 | 0 | { |
2646 | |
|
2647 | 0 | for(_counter=0; _counter < _arraylen; _counter++) |
2648 | 0 | { |
2649 | |
|
2650 | 0 | proto_tree_add_item(_tree, hf_wlccp_ipv4_address, _tvb, _offset, 4, ENC_BIG_ENDIAN); |
2651 | 0 | _offset += 4; |
2652 | |
|
2653 | 0 | proto_tree_add_item(_tree, hf_wlccp_bssid, _tvb, _offset, 6, ENC_NA); |
2654 | 0 | _offset += 6; |
2655 | |
|
2656 | 0 | proto_tree_add_item(_tree, hf_wlccp_stamac, _tvb, _offset, 6, ENC_NA); |
2657 | 0 | _offset += 6; |
2658 | |
|
2659 | 0 | } /* for _counter=0 */ |
2660 | |
|
2661 | 0 | } /* if _arraylen > 0 */ |
2662 | 0 | break; |
2663 | 0 | } /* case 0x20 */ |
2664 | | |
2665 | 0 | case 0x21: /* rmReqRoutingResp */ |
2666 | 0 | { |
2667 | |
|
2668 | 0 | unsigned _counter=0, _arraylen=0; |
2669 | |
|
2670 | 0 | proto_item_append_text(_ti, " rmReqRoutingResp"); |
2671 | |
|
2672 | 0 | proto_tree_add_item(_tree, hf_wlccp_token2, _tvb, _offset, 2, ENC_BIG_ENDIAN); |
2673 | 0 | _offset += 2; |
2674 | |
|
2675 | 0 | _arraylen=(_length)/11; |
2676 | |
|
2677 | 0 | if (_arraylen > 0) |
2678 | 0 | { |
2679 | |
|
2680 | 0 | for(_counter=0; _counter < _arraylen; _counter++) |
2681 | 0 | { |
2682 | |
|
2683 | 0 | proto_tree_add_item(_tree, hf_wlccp_ipv4_address, _tvb, _offset, 4, ENC_BIG_ENDIAN); |
2684 | 0 | _offset += 4; |
2685 | |
|
2686 | 0 | proto_tree_add_item(_tree, hf_wlccp_bssid, _tvb, _offset, 6, ENC_NA); |
2687 | 0 | _offset += 6; |
2688 | |
|
2689 | 0 | proto_tree_add_item(_tree, hf_wlccp_status, _tvb, _offset, 1, ENC_BIG_ENDIAN); |
2690 | 0 | _offset += 1; |
2691 | |
|
2692 | 0 | } /* for _counter=0 */ |
2693 | |
|
2694 | 0 | } /* if _arraylen > 0 */ |
2695 | |
|
2696 | 0 | break; |
2697 | 0 | } /* case 0x21 */ |
2698 | | |
2699 | 1 | case 0x22: /* rmReqAck */ |
2700 | 1 | { |
2701 | 1 | proto_item_append_text(_ti, " rmReqAck"); |
2702 | | |
2703 | 1 | proto_tree_add_item(_tree, hf_wlccp_status, _tvb, _offset, 1, ENC_BIG_ENDIAN); |
2704 | 1 | _offset += 1; |
2705 | | |
2706 | 1 | break; |
2707 | 0 | } /* case 0x22 */ |
2708 | | |
2709 | | |
2710 | 0 | case 0x58: /* mfpCapability */ |
2711 | 0 | { |
2712 | 0 | proto_item_append_text(_ti, " mfpCapability"); |
2713 | |
|
2714 | 0 | proto_tree_add_item(_tree, hf_wlccp_mfpcapability, _tvb, _offset, 2, ENC_BIG_ENDIAN); |
2715 | 0 | _offset += 2; |
2716 | |
|
2717 | 0 | break; |
2718 | 0 | } /* case 0x58 */ |
2719 | | |
2720 | 0 | case 0x5b: /* mfpRouting */ |
2721 | 0 | { |
2722 | 0 | proto_item_append_text(_ti, " mfpRouting"); |
2723 | |
|
2724 | 0 | proto_tree_add_item(_tree, hf_wlccp_ipv4_address, _tvb, _offset, 4, ENC_BIG_ENDIAN); |
2725 | 0 | _offset += 4; |
2726 | |
|
2727 | 0 | proto_tree_add_item(_tree, hf_wlccp_bssid, _tvb, _offset, 6, ENC_NA); |
2728 | 0 | _offset += 6; |
2729 | |
|
2730 | 0 | proto_tree_add_item(_tree, hf_wlccp_mfpflags, _tvb, _offset, 2, ENC_BIG_ENDIAN); |
2731 | 0 | _offset += 2; |
2732 | |
|
2733 | 0 | break; |
2734 | 0 | } /* case 0x5b */ |
2735 | | |
2736 | 0 | case 0x5c: /* mfpConfig */ |
2737 | 0 | { |
2738 | 0 | proto_item_append_text(_ti, " mfpConfig"); |
2739 | |
|
2740 | 0 | proto_tree_add_item(_tree, hf_wlccp_mfpconfig, _tvb, _offset, 2, ENC_BIG_ENDIAN); |
2741 | 0 | _offset += 2; |
2742 | |
|
2743 | 0 | break; |
2744 | 0 | } /* case 0x5c */ |
2745 | | |
2746 | | |
2747 | 2 | default: |
2748 | 2 | { |
2749 | | /* for unknown types, just add them to the tree as a blob */ |
2750 | 2 | proto_item_append_text(_ti, " Unknown"); |
2751 | | |
2752 | 2 | proto_tree_add_item(_tree, hf_wlccp_tlv_unknown_value, _tvb, _offset, _length, ENC_NA); |
2753 | 2 | _offset += _length; |
2754 | | |
2755 | 2 | break; |
2756 | 0 | } /* case default */ |
2757 | | |
2758 | 11 | } /* switch type_id */ |
2759 | | |
2760 | 9 | return _offset; |
2761 | | |
2762 | 11 | } /* dissect_wlccp_rrm_tlv */ |
2763 | | |
2764 | | static unsigned dissect_wlccp_qos_tlv(proto_tree *_tree, tvbuff_t *_tvb, unsigned _offset, int _type_id, unsigned _length, proto_item *_ti) |
2765 | 6 | { |
2766 | | |
2767 | 6 | switch (_type_id) |
2768 | 6 | { |
2769 | | |
2770 | 6 | default: |
2771 | 6 | { |
2772 | | /* for unknown types, just add them to the tree as a blob */ |
2773 | 6 | proto_item_append_text(_ti, " Unknown"); |
2774 | | |
2775 | 6 | proto_tree_add_item(_tree, hf_wlccp_tlv_unknown_value, _tvb, _offset, _length, ENC_NA); |
2776 | 6 | _offset += _length; |
2777 | | |
2778 | 6 | break; |
2779 | 0 | } /* default case for switch (_type_id) */ |
2780 | | |
2781 | 6 | } /* switch _type_id */ |
2782 | | |
2783 | | |
2784 | 5 | return _offset; |
2785 | | |
2786 | 6 | } /* dissect_wlccp_qos_tlv */ |
2787 | | |
2788 | | static unsigned dissect_wlccp_nm_tlv(proto_tree *_tree, tvbuff_t *_tvb, unsigned _offset, int _type_id, unsigned _length, proto_item *_ti) |
2789 | 1 | { |
2790 | | |
2791 | 1 | switch (_type_id) |
2792 | 1 | { |
2793 | | |
2794 | 0 | case 0x20: /* nmClientEventIntoWDS */ |
2795 | 0 | { |
2796 | |
|
2797 | 0 | unsigned _radius_user_name_length = 0; |
2798 | |
|
2799 | 0 | proto_item_append_text(_ti, " nmClientEventIntoWDS"); |
2800 | |
|
2801 | 0 | proto_tree_add_item(_tree, hf_wlccp_clientmac, _tvb, _offset, 6, ENC_NA); |
2802 | 0 | _offset += 6; |
2803 | |
|
2804 | 0 | proto_tree_add_item(_tree, hf_time_elapsed, _tvb, _offset, 2, ENC_BIG_ENDIAN); |
2805 | 0 | _offset += 2; |
2806 | |
|
2807 | 0 | proto_tree_add_item(_tree, hf_wlccp_parent_ap_mac, _tvb, _offset, 6, ENC_NA); |
2808 | 0 | _offset += 6; |
2809 | |
|
2810 | 0 | proto_tree_add_item(_tree, hf_reg_lifetime, _tvb, _offset, 1, ENC_BIG_ENDIAN); |
2811 | 0 | _offset += 1; |
2812 | | |
2813 | | /* skip some unused bytes */ |
2814 | 0 | _offset += 1; |
2815 | |
|
2816 | 0 | proto_tree_add_item(_tree, hf_wlccp_ipv4_address, _tvb, _offset, 4, ENC_BIG_ENDIAN); |
2817 | 0 | _offset += 4; |
2818 | |
|
2819 | 0 | proto_tree_add_item(_tree, hf_wlccp_auth_type, _tvb, _offset, 1, ENC_BIG_ENDIAN); |
2820 | 0 | _offset += 1; |
2821 | |
|
2822 | 0 | proto_tree_add_item(_tree, hf_wlccp_key_mgmt_type, _tvb, _offset, 1, ENC_BIG_ENDIAN); |
2823 | 0 | _offset += 1; |
2824 | | |
2825 | | /* skip some unused bytes */ |
2826 | 0 | _offset += 1; |
2827 | |
|
2828 | 0 | _radius_user_name_length = _length - 23 - 4; |
2829 | |
|
2830 | 0 | proto_tree_add_item(_tree, hf_wlccp_radius_user_name, _tvb, _offset, _radius_user_name_length, ENC_ASCII); |
2831 | 0 | _offset += _radius_user_name_length; |
2832 | | |
2833 | |
|
2834 | 0 | break; |
2835 | 0 | } /* case 0x20 */ |
2836 | | |
2837 | 0 | case 0x21: /* nmClientEventOutOfWDS */ |
2838 | 0 | { |
2839 | 0 | proto_item_append_text(_ti, " nmClientEventOutOfWDS"); |
2840 | |
|
2841 | 0 | proto_tree_add_item(_tree, hf_wlccp_clientmac, _tvb, _offset, 6, ENC_NA); |
2842 | 0 | _offset += 6; |
2843 | |
|
2844 | 0 | proto_tree_add_item(_tree, hf_time_elapsed, _tvb, _offset, 2, ENC_BIG_ENDIAN); |
2845 | 0 | _offset += 2; |
2846 | |
|
2847 | 0 | proto_tree_add_item(_tree, hf_wlccp_parent_ap_mac, _tvb, _offset, 6, ENC_NA); |
2848 | 0 | _offset += 6; |
2849 | |
|
2850 | 0 | proto_tree_add_item(_tree, hf_wds_reason, _tvb, _offset, 1, ENC_BIG_ENDIAN); |
2851 | 0 | _offset += 1; |
2852 | | |
2853 | | /* skip some unused bytes */ |
2854 | 0 | _offset += 1; |
2855 | |
|
2856 | 0 | break; |
2857 | 0 | } /* case 0x21 */ |
2858 | | |
2859 | 0 | case 0x22: /* nmClientEventIntraWDS */ |
2860 | 0 | { |
2861 | 0 | proto_item_append_text(_ti, " nmClientEventIntraWDS"); |
2862 | |
|
2863 | 0 | proto_tree_add_item(_tree, hf_wlccp_clientmac, _tvb, _offset, 6, ENC_NA); |
2864 | 0 | _offset += 6; |
2865 | |
|
2866 | 0 | proto_tree_add_item(_tree, hf_time_elapsed, _tvb, _offset, 2, ENC_BIG_ENDIAN); |
2867 | 0 | _offset += 2; |
2868 | |
|
2869 | 0 | proto_tree_add_item(_tree, hf_wlccp_parent_ap_mac, _tvb, _offset, 6, ENC_NA); |
2870 | 0 | _offset += 6; |
2871 | |
|
2872 | 0 | proto_tree_add_item(_tree, hf_reg_lifetime, _tvb, _offset, 1, ENC_BIG_ENDIAN); |
2873 | 0 | _offset += 1; |
2874 | |
|
2875 | 0 | proto_tree_add_item(_tree, hf_wlccp_auth_type, _tvb, _offset, 1, ENC_BIG_ENDIAN); |
2876 | 0 | _offset += 1; |
2877 | |
|
2878 | 0 | proto_tree_add_item(_tree, hf_wlccp_key_mgmt_type, _tvb, _offset, 1, ENC_BIG_ENDIAN); |
2879 | 0 | _offset += 1; |
2880 | | |
2881 | | /* skip some unused bytes */ |
2882 | 0 | _offset += 3; |
2883 | | |
2884 | |
|
2885 | 0 | break; |
2886 | 0 | } /* case 0x22 */ |
2887 | | |
2888 | 0 | case 0x24: /* nmClientEventIPAddressUpdate */ |
2889 | 0 | { |
2890 | 0 | proto_item_append_text(_ti, " nmClientEventIPAddressUpdate"); |
2891 | |
|
2892 | 0 | proto_tree_add_item(_tree, hf_wlccp_clientmac, _tvb, _offset, 6, ENC_NA); |
2893 | 0 | _offset += 6; |
2894 | |
|
2895 | 0 | proto_tree_add_item(_tree, hf_time_elapsed, _tvb, _offset, 2, ENC_BIG_ENDIAN); |
2896 | 0 | _offset += 2; |
2897 | |
|
2898 | 0 | proto_tree_add_item(_tree, hf_wlccp_parent_ap_mac, _tvb, _offset, 6, ENC_NA); |
2899 | 0 | _offset += 6; |
2900 | | |
2901 | | /* skip some unused bytes */ |
2902 | 0 | _offset += 2; |
2903 | |
|
2904 | 0 | proto_tree_add_item(_tree, hf_wlccp_ipv4_address, _tvb, _offset, 4, ENC_BIG_ENDIAN); |
2905 | 0 | _offset += 4; |
2906 | | |
2907 | |
|
2908 | 0 | break; |
2909 | 0 | } /* case 0x24 */ |
2910 | | |
2911 | 0 | case 0x26: /* nmClientEventRefresh */ |
2912 | 0 | { |
2913 | |
|
2914 | 0 | unsigned _radius_user_name_length = 0; |
2915 | |
|
2916 | 0 | proto_item_append_text(_ti, " nmClientEventRefresh"); |
2917 | |
|
2918 | 0 | proto_tree_add_item(_tree, hf_wlccp_clientmac, _tvb, _offset, 6, ENC_NA); |
2919 | 0 | _offset += 6; |
2920 | |
|
2921 | 0 | proto_tree_add_item(_tree, hf_time_elapsed, _tvb, _offset, 2, ENC_BIG_ENDIAN); |
2922 | 0 | _offset += 2; |
2923 | |
|
2924 | 0 | proto_tree_add_item(_tree, hf_wlccp_parent_ap_mac, _tvb, _offset, 6, ENC_NA); |
2925 | 0 | _offset += 6; |
2926 | |
|
2927 | 0 | proto_tree_add_item(_tree, hf_reg_lifetime, _tvb, _offset, 1, ENC_BIG_ENDIAN); |
2928 | 0 | _offset += 1; |
2929 | | |
2930 | | /* skip some unused bytes */ |
2931 | 0 | _offset += 1; |
2932 | |
|
2933 | 0 | proto_tree_add_item(_tree, hf_wlccp_ipv4_address, _tvb, _offset, 4, ENC_BIG_ENDIAN); |
2934 | 0 | _offset += 4; |
2935 | |
|
2936 | 0 | proto_tree_add_item(_tree, hf_wlccp_auth_type, _tvb, _offset, 1, ENC_BIG_ENDIAN); |
2937 | 0 | _offset += 1; |
2938 | |
|
2939 | 0 | proto_tree_add_item(_tree, hf_wlccp_key_mgmt_type, _tvb, _offset, 1, ENC_BIG_ENDIAN); |
2940 | 0 | _offset += 1; |
2941 | | |
2942 | | /* skip some unused bytes */ |
2943 | 0 | _offset += 1; |
2944 | |
|
2945 | 0 | _radius_user_name_length = _length - 23 - 4; |
2946 | |
|
2947 | 0 | proto_tree_add_item(_tree, hf_wlccp_radius_user_name, _tvb, _offset, _radius_user_name_length, ENC_ASCII); |
2948 | 0 | _offset += _radius_user_name_length; |
2949 | |
|
2950 | 0 | break; |
2951 | 0 | } /* case 0x26 */ |
2952 | | |
2953 | 0 | case 0x27: /* nmClientEventRefreshDone */ |
2954 | 0 | { |
2955 | 0 | proto_item_append_text(_ti, " nmClientEventRefreshDone"); |
2956 | | |
2957 | | /* skip some unused bytes */ |
2958 | 0 | _offset += 6; |
2959 | |
|
2960 | 0 | proto_tree_add_item(_tree, hf_time_elapsed, _tvb, _offset, 2, ENC_BIG_ENDIAN); |
2961 | 0 | _offset += 2; |
2962 | |
|
2963 | 0 | proto_tree_add_item(_tree, hf_wlccp_refresh_req_id, _tvb, _offset, 4, ENC_BIG_ENDIAN); |
2964 | 0 | _offset += 4; |
2965 | | |
2966 | |
|
2967 | 0 | break; |
2968 | 0 | } /* case 0x27 */ |
2969 | | |
2970 | | |
2971 | 1 | default: |
2972 | 1 | { |
2973 | | /* for unknown types, just add them to the tree as a blob */ |
2974 | 1 | proto_item_append_text(_ti, " Unknown"); |
2975 | | |
2976 | 1 | proto_tree_add_item(_tree, hf_wlccp_tlv_unknown_value, _tvb, _offset, _length, ENC_NA); |
2977 | 1 | _offset += _length; |
2978 | | |
2979 | 1 | break; |
2980 | 0 | } /* default case for switch (_type_id) */ |
2981 | | |
2982 | 1 | } /* switch _type_id */ |
2983 | | |
2984 | | |
2985 | 0 | return _offset; |
2986 | | |
2987 | 1 | } /* dissect_wlccp_nm_tlv */ |
2988 | | |
2989 | | static unsigned dissect_wlccp_mip_tlv(proto_tree *_tree, tvbuff_t *_tvb, unsigned _offset, int _type_id, unsigned _length, proto_item *_ti) |
2990 | 1 | { |
2991 | | |
2992 | 1 | switch (_type_id) |
2993 | 1 | { |
2994 | | |
2995 | | |
2996 | 1 | default: |
2997 | 1 | { |
2998 | | /* for unknown types, just add them to the tree as a blob */ |
2999 | 1 | proto_item_append_text(_ti, " Unknown"); |
3000 | | |
3001 | 1 | proto_tree_add_item(_tree, hf_wlccp_tlv_unknown_value, _tvb, _offset, _length, ENC_NA); |
3002 | 1 | _offset += _length; |
3003 | | |
3004 | 1 | break; |
3005 | 0 | } /* default case for switch (_type_id) */ |
3006 | | |
3007 | 1 | } /* switch _type_id */ |
3008 | | |
3009 | | |
3010 | 0 | return _offset; |
3011 | | |
3012 | 1 | } /* dissect_wlccp_mip_tlv */ |
3013 | | |
3014 | | |
3015 | | /* Register the protocol with Wireshark */ |
3016 | | void |
3017 | | proto_register_wlccp(void) |
3018 | 14 | { |
3019 | | /* Setup list of header fields See Section 1.6.1 for details*/ |
3020 | 14 | static hf_register_info hf[] = { |
3021 | 14 | { &hf_wlccp_version, |
3022 | 14 | { "Version", "wlccp.version", |
3023 | 14 | FT_UINT8, BASE_HEX, NULL, |
3024 | 14 | 0x0, "Protocol ID/Version", HFILL } |
3025 | 14 | }, |
3026 | | |
3027 | 14 | { &hf_wlccp_srcmac, |
3028 | 14 | { "Src MAC", "wlccp.srcmac", |
3029 | 14 | FT_ETHER, BASE_NONE, NULL, |
3030 | 14 | 0x0, "Source MAC address", HFILL } |
3031 | 14 | }, |
3032 | | |
3033 | 14 | { &hf_wlccp_dstmac, |
3034 | 14 | { "Dst MAC", "wlccp.dstmac", |
3035 | 14 | FT_ETHER, BASE_NONE, NULL, |
3036 | 14 | 0x0, "Destination MAC address", HFILL } |
3037 | 14 | }, |
3038 | | |
3039 | 14 | { &hf_wlccp_hostname, |
3040 | 14 | { "Hostname", "wlccp.hostname", |
3041 | 14 | FT_STRING, BASE_NONE, NULL, |
3042 | 14 | 0x0, "Hostname of device", HFILL } |
3043 | 14 | }, |
3044 | | |
3045 | 14 | { &hf_wlccp_sap, |
3046 | 14 | { "SAP", "wlccp.sap", |
3047 | 14 | FT_UINT8, BASE_HEX, NULL, |
3048 | 14 | 0x0, "Service Access Point", HFILL } |
3049 | 14 | }, |
3050 | | |
3051 | 14 | { &hf_wlccp_sap_version, |
3052 | 14 | { "SAP Version", "wlccp.sap_version", |
3053 | 14 | FT_UINT8, BASE_DEC, NULL, |
3054 | 14 | SAP_VERSION_MASK, "Service Access Point Version", HFILL } |
3055 | 14 | }, |
3056 | | |
3057 | 14 | { &hf_wlccp_sap_id, |
3058 | 14 | { "SAP ID", "wlccp.sap_id", |
3059 | 14 | FT_UINT8, BASE_DEC, VALS(wlccp_sap_vs), |
3060 | 14 | SAP_VALUE_MASK, "Service Access Point ID", HFILL } |
3061 | 14 | }, |
3062 | | |
3063 | 14 | { &hf_wlccp_destination_node_type, |
3064 | 14 | { "Destination node type", "wlccp.destination_node_type", |
3065 | 14 | FT_UINT16, BASE_DEC, VALS(wlccp_node_type_vs), |
3066 | 14 | 0x0, "Node type of the hop destination", HFILL } |
3067 | 14 | }, |
3068 | | |
3069 | 14 | { &hf_wlccp_length, |
3070 | 14 | { "Length", "wlccp.length", |
3071 | 14 | FT_UINT16, BASE_DEC, NULL, |
3072 | 14 | 0x0, "Length of WLCCP payload (bytes)", HFILL } |
3073 | 14 | }, |
3074 | | |
3075 | | |
3076 | 14 | { &hf_wlccp_type, |
3077 | 14 | { "Message Type", "wlccp.type", |
3078 | 14 | FT_UINT16, BASE_HEX, NULL, |
3079 | 14 | 0x0, NULL, HFILL } |
3080 | 14 | }, |
3081 | | |
3082 | 14 | { &hf_wlccp_subtype, |
3083 | 14 | { "Subtype", "wlccp.subtype", |
3084 | 14 | FT_UINT8, BASE_DEC, VALS(wlccp_subtype_vs), |
3085 | 14 | MT_SUBTYPE, "Message Subtype", HFILL } |
3086 | 14 | }, |
3087 | | |
3088 | 14 | { &hf_wlccp_base_message_type_0, |
3089 | 14 | { "Base message type", "wlccp.base_message_type", |
3090 | 14 | FT_UINT8, BASE_HEX_DEC, VALS(wlccp_msg_type_vs_0), |
3091 | 14 | MT_BASE_MSG_TYPE, NULL, HFILL } |
3092 | 14 | }, |
3093 | | |
3094 | 14 | { &hf_wlccp_base_message_type_1, |
3095 | 14 | { "Base message type", "wlccp.base_message_type", |
3096 | 14 | FT_UINT8, BASE_HEX_DEC, VALS(wlccp_msg_type_vs_1), |
3097 | 14 | MT_BASE_MSG_TYPE, NULL, HFILL } |
3098 | 14 | }, |
3099 | | |
3100 | 14 | { &hf_wlccp_base_message_type_2, |
3101 | 14 | { "Base message type", "wlccp.base_message_type", |
3102 | 14 | FT_UINT8, BASE_HEX_DEC, VALS(wlccp_msg_type_vs_2), |
3103 | 14 | MT_BASE_MSG_TYPE, NULL, HFILL } |
3104 | 14 | }, |
3105 | | |
3106 | 14 | { &hf_wlccp_base_message_type_3, |
3107 | 14 | { "Base message type", "wlccp.base_message_type", |
3108 | 14 | FT_UINT8, BASE_HEX_DEC, VALS(wlccp_msg_type_vs_3), |
3109 | 14 | MT_BASE_MSG_TYPE, NULL, HFILL } |
3110 | 14 | }, |
3111 | | |
3112 | 14 | { &hf_wlccp_base_message_type_4, |
3113 | 14 | { "Base message type", "wlccp.base_message_type", |
3114 | 14 | FT_UINT8, BASE_HEX_DEC, VALS(wlccp_msg_type_vs_4), |
3115 | 14 | MT_BASE_MSG_TYPE, NULL, HFILL } |
3116 | 14 | }, |
3117 | | |
3118 | 14 | { &hf_wlccp_base_message_type_5, |
3119 | 14 | { "Base message type", "wlccp.base_message_type", |
3120 | 14 | FT_UINT8, BASE_HEX_DEC, VALS(wlccp_msg_type_vs_5), |
3121 | 14 | MT_BASE_MSG_TYPE, NULL, HFILL } |
3122 | 14 | }, |
3123 | | |
3124 | 14 | { &hf_wlccp_base_message_type_unknown, |
3125 | 14 | { "Base message type", "wlccp.base_message_type", |
3126 | 14 | FT_UINT8, BASE_HEX_DEC, NULL, |
3127 | 14 | MT_BASE_MSG_TYPE, NULL, HFILL } |
3128 | 14 | }, |
3129 | | |
3130 | 14 | { &hf_wlccp_hops, |
3131 | 14 | { "Hops", "wlccp.hops", |
3132 | 14 | FT_UINT8, BASE_DEC, NULL, |
3133 | 14 | 0x0, "Number of WLCCP hops", HFILL } |
3134 | 14 | }, |
3135 | | |
3136 | 14 | { &hf_wlccp_nm_version, |
3137 | 14 | { "NM Version", "wlccp.nm_version", |
3138 | 14 | FT_UINT8, BASE_DEC, NULL, |
3139 | 14 | 0x0, NULL, HFILL } |
3140 | 14 | }, |
3141 | | |
3142 | 14 | { &hf_wlccp_msg_id, |
3143 | 14 | { "Message ID", "wlccp.msg_id", |
3144 | 14 | FT_UINT16, BASE_DEC, NULL, |
3145 | 14 | 0x0, "Sequence number used to match request/reply pairs", |
3146 | 14 | HFILL } |
3147 | 14 | }, |
3148 | | |
3149 | | |
3150 | 14 | { &hf_wlccp_flags, |
3151 | 14 | { "Flags", "wlccp.flags", |
3152 | 14 | FT_UINT16, BASE_HEX, NULL, |
3153 | 14 | 0x0, NULL, HFILL } |
3154 | 14 | }, |
3155 | | |
3156 | 14 | { &hf_wlccp_rm_flags, |
3157 | 14 | { "RM Flags", "wlccp.rm_flags", |
3158 | 14 | FT_UINT8, BASE_HEX, NULL, |
3159 | 14 | 0x0, NULL, HFILL } |
3160 | 14 | }, |
3161 | | |
3162 | 14 | { &hf_wlccp_retry_flag, |
3163 | 14 | { "Retry flag", "wlccp.retry_flag", |
3164 | 14 | FT_UINT16, BASE_DEC, NULL, |
3165 | 14 | F_RETRY, "Set on for retransmissions", HFILL } |
3166 | 14 | }, |
3167 | | |
3168 | 14 | { &hf_wlccp_response_request_flag, |
3169 | 14 | { "Response request flag", "wlccp.response_request_flag", |
3170 | 14 | FT_UINT16, BASE_DEC, NULL, |
3171 | 14 | F_RESPONSE_REQUEST, "Set on to request a reply", HFILL } |
3172 | 14 | }, |
3173 | | |
3174 | 14 | { &hf_wlccp_rm_request_reply_flag, |
3175 | 14 | { "Request Reply flag", "wlccp.request_reply_flag", |
3176 | 14 | FT_UINT8, BASE_DEC, NULL, |
3177 | 14 | RM_F_REQUEST_REPLY, "Set on to request a reply", HFILL } |
3178 | 14 | }, |
3179 | | |
3180 | 14 | { &hf_wlccp_ack_required_flag, |
3181 | 14 | { "Ack Required flag", "wlccp.ack_required_flag", |
3182 | 14 | FT_UINT16, BASE_DEC, NULL, |
3183 | 14 | F_ACK_REQD, "Set on to require an acknowledgement", HFILL } |
3184 | 14 | }, |
3185 | | |
3186 | 14 | { &hf_wlccp_tlv_flag, |
3187 | 14 | { "TLV flag", "wlccp.tlv_flag", |
3188 | 14 | FT_UINT16, BASE_DEC, NULL, |
3189 | 14 | F_TLV, "Set to indicate that optional TLVs follow the fixed fields", HFILL } |
3190 | 14 | }, |
3191 | | |
3192 | 14 | { &hf_wlccp_inbound_flag, |
3193 | 14 | { "Inbound flag", "wlccp.inbound_flag", |
3194 | 14 | FT_UINT16, BASE_DEC, NULL, |
3195 | 14 | F_INBOUND, "Message is inbound to the top of the topology tree", HFILL } |
3196 | 14 | }, |
3197 | | |
3198 | 14 | { &hf_wlccp_outbound_flag, |
3199 | 14 | { "Outbound flag", "wlccp.outbound_flag", |
3200 | 14 | FT_UINT16, BASE_DEC, NULL, |
3201 | 14 | F_OUTBOUND, "Message is outbound from the top of the topology tree", HFILL } |
3202 | 14 | }, |
3203 | | |
3204 | 14 | { &hf_wlccp_hopwise_routing_flag, |
3205 | 14 | { "Hopwise-routing flag", "wlccp.hopwise_routing_flag", |
3206 | 14 | FT_UINT16, BASE_DEC, NULL, |
3207 | 14 | F_HOPWISE_ROUTING, "On to force intermediate access points to process the message also", HFILL } |
3208 | 14 | }, |
3209 | | |
3210 | 14 | { &hf_wlccp_root_cm_flag, |
3211 | 14 | { "Root context manager flag", "wlccp.root_cm_flag", |
3212 | 14 | FT_UINT16, BASE_DEC, NULL, |
3213 | 14 | F_ROOT_CM, "Set to on to send message to the root context manager of the topology tree", HFILL } |
3214 | 14 | }, |
3215 | | |
3216 | 14 | { &hf_wlccp_relay_flag, |
3217 | 14 | { "Relay flag", "wlccp.relay_flag", |
3218 | 14 | FT_UINT16, BASE_DEC, NULL, |
3219 | 14 | F_RELAY, "Signifies that this header is immediately followed by a relay node field", HFILL } |
3220 | 14 | }, |
3221 | | |
3222 | 14 | { &hf_wlccp_mic_flag, |
3223 | 14 | { "MIC flag", "wlccp.mic_flag", |
3224 | 14 | FT_UINT16, BASE_DEC, NULL, |
3225 | 14 | F_MIC, "On in a message that must be authenticated and has an authentication TLV", HFILL } |
3226 | 14 | }, |
3227 | | |
3228 | 14 | { &hf_wlccp_rm_mic_flag, |
3229 | 14 | { "MIC flag", "wlccp.mic_flag", |
3230 | 14 | FT_UINT8, BASE_DEC, NULL, |
3231 | 14 | RM_F_MIC, "On in a message that must be authenticated and has an authentication TLV", HFILL } |
3232 | 14 | }, |
3233 | | |
3234 | 14 | { &hf_wlccp_originator_node_type, |
3235 | 14 | { "Originator node type", "wlccp.originator_node_type", |
3236 | 14 | FT_UINT16, BASE_DEC, VALS(wlccp_node_type_vs), |
3237 | 14 | 0x0, "Originating device's node type", HFILL } |
3238 | 14 | }, |
3239 | | |
3240 | 14 | { &hf_wlccp_originator, |
3241 | 14 | { "Originator", "wlccp.originator", |
3242 | 14 | FT_ETHER, BASE_NONE, NULL, |
3243 | 14 | 0x0, "Originating device's MAC address", HFILL } |
3244 | 14 | }, |
3245 | | |
3246 | 14 | { &hf_wlccp_responder_node_type, |
3247 | 14 | { "Responder node type", "wlccp.responder_node_type", |
3248 | 14 | FT_UINT16, BASE_DEC, VALS(wlccp_node_type_vs), |
3249 | 14 | 0x0, "Responding device's node type", HFILL } |
3250 | 14 | }, |
3251 | | |
3252 | 14 | { &hf_wlccp_responder, |
3253 | 14 | { "Responder", "wlccp.responder", |
3254 | 14 | FT_ETHER, BASE_NONE, NULL, |
3255 | 14 | 0x0, "Responding device's MAC address", HFILL } |
3256 | 14 | }, |
3257 | | |
3258 | 14 | { &hf_wlccp_requ_node_type, |
3259 | 14 | { "Requestor node type", "wlccp.requ_node_type", |
3260 | 14 | FT_UINT16, BASE_DEC, VALS(wlccp_node_type_vs), |
3261 | 14 | 0x0, "Requesting device's node type", HFILL } |
3262 | 14 | }, |
3263 | | |
3264 | 14 | { &hf_wlccp_requ_node_id, |
3265 | 14 | { "Requestor", "wlccp.requestor", |
3266 | 14 | FT_ETHER, BASE_NONE, NULL, |
3267 | 14 | 0x0, "Requestor device's MAC address", HFILL } |
3268 | 14 | }, |
3269 | | |
3270 | 14 | { &hf_wlccp_status, |
3271 | 14 | { "Status", "wlccp.status", |
3272 | 14 | FT_UINT8, BASE_DEC, VALS(wlccp_status_vs), |
3273 | 14 | 0x0, NULL, HFILL } |
3274 | 14 | }, |
3275 | | |
3276 | 14 | { &hf_wlccp_path_init_rsvd, |
3277 | 14 | { "Reserved", "wlccp.path_init_reserved", |
3278 | 14 | FT_UINT8, BASE_DEC, NULL, |
3279 | 14 | 0x0, NULL, HFILL } |
3280 | 14 | }, |
3281 | | |
3282 | 14 | { &hf_wlccp_relay_node_type, |
3283 | 14 | { "Relay node type", "wlccp.relay_node_type", |
3284 | 14 | FT_UINT16, BASE_DEC, VALS(wlccp_node_type_vs), |
3285 | 14 | 0x0, "Type of node which relayed this message", HFILL } |
3286 | 14 | }, |
3287 | | |
3288 | 14 | { &hf_wlccp_relay_node_id, |
3289 | 14 | { "Relay node ID", "wlccp.relay_node_id", |
3290 | 14 | FT_ETHER, BASE_NONE, NULL, |
3291 | 14 | 0x0, "Node which relayed this message", HFILL } |
3292 | 14 | }, |
3293 | | |
3294 | | #if 0 |
3295 | | { &hf_wlccp_priority, |
3296 | | { "WDS priority", "wlccp.priority", |
3297 | | FT_UINT8, BASE_DEC, NULL, 0, |
3298 | | "WDS priority of this access point", HFILL } |
3299 | | }, |
3300 | | #endif |
3301 | | #if 0 |
3302 | | { &hf_wlccp_age, |
3303 | | { "Age", "wlccp.age", |
3304 | | FT_UINT32, BASE_DEC, NULL, 0, |
3305 | | "Time since AP became a WDS master", HFILL } |
3306 | | }, |
3307 | | #endif |
3308 | | #if 0 |
3309 | | { &hf_wlccp_period, |
3310 | | { "Period", "wlccp.period", |
3311 | | FT_UINT8, BASE_DEC, NULL, 0, |
3312 | | "Interval between announcements (seconds)", HFILL } |
3313 | | }, |
3314 | | #endif |
3315 | 14 | { &hf_wlccp_ipv4_address, |
3316 | 14 | { "IPv4 Address", "wlccp.ipv4_address", |
3317 | 14 | FT_IPv4, BASE_NONE, NULL, 0, |
3318 | 14 | NULL, HFILL } |
3319 | 14 | }, |
3320 | | |
3321 | 14 | { &hf_wlccp_scm_hop_address, |
3322 | 14 | { "Hop Address", "wlccp.scm_hop_address", |
3323 | 14 | FT_ETHER, BASE_NONE, NULL, |
3324 | 14 | 0x0, "Source 802 Port Address", HFILL } |
3325 | 14 | }, |
3326 | | |
3327 | 14 | { &hf_wlccp_scm_flags, |
3328 | 14 | { "SCM flags", "wlccp.scm_flags", |
3329 | 14 | FT_UINT16, BASE_HEX, NULL, |
3330 | 14 | 0x0, NULL, HFILL } |
3331 | 14 | }, |
3332 | | |
3333 | 14 | { &hf_wlccp_scm_active_flag, |
3334 | 14 | { "Active flag", "wlccp.scm_active_flag", |
3335 | 14 | FT_UINT16, BASE_DEC, NULL, |
3336 | 14 | F_SCM_ACTIVE, "Set to on in advertisements from the active SCM", HFILL } |
3337 | 14 | }, |
3338 | | |
3339 | 14 | { &hf_wlccp_scm_unscheduled_flag, |
3340 | 14 | { "Unscheduled flag", "wlccp.scm_unscheduled_flag", |
3341 | 14 | FT_UINT16, BASE_DEC, NULL, |
3342 | 14 | F_SCM_UNSCHEDULED, "Set to on in unscheduled advertisement messages", HFILL } |
3343 | 14 | }, |
3344 | | |
3345 | 14 | { &hf_wlccp_scm_unattached_flag, |
3346 | 14 | { "Unattached flag", "wlccp.scm_unattached_flag", |
3347 | 14 | FT_UINT16, BASE_DEC, NULL, |
3348 | 14 | F_SCM_UNATTACHED, "Set to on in advertisements from an unattached node", HFILL } |
3349 | 14 | }, |
3350 | | |
3351 | 14 | { &hf_wlccp_scm_layer2update_flag, |
3352 | 14 | { "Layer2 Update flag", "wlccp.scm_layer2update_flag", |
3353 | 14 | FT_UINT16, BASE_DEC, NULL, |
3354 | 14 | F_SCM_LAYER2UPDATE, "Set to on if WLCCP Layer 2 path updates are enabled", HFILL } |
3355 | 14 | }, |
3356 | | |
3357 | 14 | { &hf_wlccp_scm_election_group, |
3358 | 14 | { "SCM Election Group", "wlccp.scm_election_group", |
3359 | 14 | FT_UINT8, BASE_DEC, NULL, 0, |
3360 | 14 | NULL, HFILL } |
3361 | 14 | }, |
3362 | | |
3363 | 14 | { &hf_wlccp_scm_attach_count, |
3364 | 14 | { "Attach Count", "wlccp.scm_attach_count", |
3365 | 14 | FT_UINT8, BASE_DEC, NULL, 0, |
3366 | 14 | "Attach count of the hop source", HFILL } |
3367 | 14 | }, |
3368 | | |
3369 | 14 | { &hf_wlccp_scm_priority_flags, |
3370 | 14 | { "SCM Priority flags", "wlccp.scm_priority_flags", |
3371 | 14 | FT_UINT8, BASE_HEX, NULL, 0, |
3372 | 14 | NULL, HFILL } |
3373 | 14 | }, |
3374 | | |
3375 | 14 | { &hf_wlccp_scm_priority, |
3376 | 14 | { "SCM Priority", "wlccp.scm_priority", |
3377 | 14 | FT_UINT8, BASE_DEC, NULL, |
3378 | 14 | F_SCM_PRIORITY, NULL, HFILL } |
3379 | 14 | }, |
3380 | | |
3381 | 14 | { &hf_wlccp_scm_preferred_flag, |
3382 | 14 | { "Preferred flag", "wlccp.scm_preferred_flag", |
3383 | 14 | FT_UINT8, BASE_DEC, NULL, |
3384 | 14 | F_SCM_PREFERRED, "Set to off if the SCM is the preferred SCM", HFILL } |
3385 | 14 | }, |
3386 | | |
3387 | 14 | { &hf_wlccp_scm_bridge_priority_flags, |
3388 | 14 | { "Bridge Priority flags", "wlccp.scm_bridge_priority_flags", |
3389 | 14 | FT_UINT8, BASE_DEC, NULL, 0, |
3390 | 14 | NULL, HFILL } |
3391 | 14 | }, |
3392 | | |
3393 | 14 | { &hf_wlccp_scm_bridge_priority, |
3394 | 14 | { "Bridge priority", "wlccp.scm_bridge_priority", |
3395 | 14 | FT_UINT8, BASE_DEC, NULL, |
3396 | 14 | F_SCM_BRIDGE_PRIORITY, "Used to negotiate the designated bridge on a non-STP secondary Ethernet LAN", HFILL } |
3397 | 14 | }, |
3398 | | |
3399 | 14 | { &hf_wlccp_scm_bridge_disable_flag, |
3400 | 14 | { "Bridge disable flag", "wlccp.scm_bridge_disable_flag", |
3401 | 14 | FT_UINT8, BASE_DEC, NULL, |
3402 | 14 | F_SCM_BRIDGE_DISABLE, "Set to on to indicate that secondary bridging is disabled", HFILL } |
3403 | 14 | }, |
3404 | | |
3405 | 14 | { &hf_wlccp_scm_node_id, |
3406 | 14 | { "SCM Node ID", "wlccp.scm_node_id", |
3407 | 14 | FT_ETHER, BASE_NONE, NULL, |
3408 | 14 | 0x0, "Node ID of the SCM", HFILL } |
3409 | 14 | }, |
3410 | | |
3411 | 14 | { &hf_wlccp_scm_unknown_short, |
3412 | 14 | { "Unknown Short", "wlccp.scm_unknown_short", |
3413 | 14 | FT_UINT16, BASE_HEX, NULL, |
3414 | 14 | 0x0, "SCM Unknown Short Value", HFILL } |
3415 | 14 | }, |
3416 | | |
3417 | 14 | { &hf_wlccp_scm_instance_age, |
3418 | 14 | { "Instance Age", "wlccp.scm_instance_age", |
3419 | 14 | FT_UINT32, BASE_DEC, NULL, 0, |
3420 | 14 | "Instance age of the SCM in seconds", HFILL } |
3421 | 14 | }, |
3422 | | |
3423 | 14 | { &hf_wlccp_scm_path_cost, |
3424 | 14 | { "Path cost", "wlccp.scm_path_cost", |
3425 | 14 | FT_UINT16, BASE_DEC, NULL, |
3426 | 14 | 0x0, "Sum of port costs on the path to the SCM", HFILL } |
3427 | 14 | }, |
3428 | | |
3429 | 14 | { &hf_wlccp_scm_hop_count, |
3430 | 14 | { "Hop Count", "wlccp.scm_hop_count", |
3431 | 14 | FT_UINT8, BASE_DEC, NULL, 0, |
3432 | 14 | "Number of wireless hops on the path to SCM", HFILL } |
3433 | 14 | }, |
3434 | | |
3435 | 14 | { &hf_wlccp_scm_advperiod, |
3436 | 14 | { "Advertisement Period", "wlccp.scm_advperiod", |
3437 | 14 | FT_UINT8, BASE_DEC, NULL, 0, |
3438 | 14 | "Average number of seconds between SCM advertisements", HFILL } |
3439 | 14 | }, |
3440 | | |
3441 | 14 | { &hf_wlccp_timestamp, |
3442 | 14 | { "Timestamp", "wlccp.timestamp", |
3443 | 14 | FT_UINT64, BASE_DEC, NULL, 0, |
3444 | 14 | "Registration Timestamp", HFILL } |
3445 | 14 | }, |
3446 | | |
3447 | 14 | { &hf_wlccp_apregstatus, |
3448 | 14 | { "Registration Status", "wlccp.apregstatus", |
3449 | 14 | FT_UINT8, BASE_HEX, NULL, 0, |
3450 | 14 | "AP Registration Status", HFILL } |
3451 | 14 | }, |
3452 | | |
3453 | 14 | { &hf_wlccp_ap_node_id, |
3454 | 14 | { "AP Node ID", "wlccp.apnodeid", |
3455 | 14 | FT_NONE, BASE_NONE, NULL, 0, |
3456 | 14 | NULL, HFILL } |
3457 | 14 | }, |
3458 | | |
3459 | 14 | { &hf_wlccp_ap_node_type, |
3460 | 14 | { "AP Node Type", "wlccp.apnodetype", |
3461 | 14 | FT_UINT16, BASE_HEX, NULL, 0, |
3462 | 14 | NULL, HFILL } |
3463 | 14 | }, |
3464 | | |
3465 | 14 | { &hf_wlccp_ap_node_id_address, |
3466 | 14 | { "AP Node Address", "wlccp.apnodeidaddress", |
3467 | 14 | FT_ETHER, BASE_NONE, NULL, 0, |
3468 | 14 | NULL, HFILL } |
3469 | 14 | }, |
3470 | | |
3471 | 14 | { &hf_wlccp_aaa_msg_type, |
3472 | 14 | { "AAA Message Type", "wlccp.aaa_msg_type", |
3473 | 14 | FT_UINT8, BASE_HEX, VALS(wlccp_aaa_msg_type_vs), 0, |
3474 | 14 | NULL, HFILL } |
3475 | 14 | }, |
3476 | | |
3477 | 14 | { &hf_wlccp_aaa_auth_type, |
3478 | 14 | { "AAA Authentication Type", "wlccp.aaa_auth_type", |
3479 | 14 | FT_UINT8, BASE_HEX, VALS(wlccp_eapol_auth_type_vs), 0, |
3480 | 14 | NULL, HFILL } |
3481 | 14 | }, |
3482 | | |
3483 | 14 | { &hf_wlccp_keymgmt_type, |
3484 | 14 | { "AAA Key Management Type", "wlccp.aaa_keymgmt_type", |
3485 | 14 | FT_UINT8, BASE_HEX, VALS(wlccp_key_mgmt_type_vs), 0, |
3486 | 14 | NULL, HFILL } |
3487 | 14 | }, |
3488 | | |
3489 | 14 | { &hf_wlccp_eapol_msg, |
3490 | 14 | { "EAPOL Message", "wlccp.eapol_msg", |
3491 | 14 | FT_NONE, BASE_NONE, NULL, 0, |
3492 | 14 | NULL, HFILL } |
3493 | 14 | }, |
3494 | | |
3495 | 14 | { &hf_wlccp_eapol_version, |
3496 | 14 | { "EAPOL Version", "wlccp.eapol_version", |
3497 | 14 | FT_UINT8, BASE_DEC, NULL, 0, |
3498 | 14 | NULL, HFILL } |
3499 | 14 | }, |
3500 | | |
3501 | 14 | { &hf_wlccp_eapol_type, |
3502 | 14 | { "EAPOL Type", "wlccp.eapol_type", |
3503 | 14 | FT_UINT8, BASE_HEX, VALS(eapol_type_vs), 0, |
3504 | 14 | NULL, HFILL } |
3505 | 14 | }, |
3506 | | |
3507 | 14 | { &hf_wlccp_eap_msg_length, |
3508 | 14 | { "EAP Packet Length", "wlccp.eap_pkt_length", |
3509 | 14 | FT_UINT16, BASE_DEC, NULL, 0, |
3510 | 14 | "EAPOL Type", HFILL } |
3511 | 14 | }, |
3512 | | |
3513 | 14 | { &hf_wlccp_eap_msg, |
3514 | 14 | { "EAP Message", "wlccp.eap_msg", |
3515 | 14 | FT_BYTES, BASE_NONE, NULL, 0, |
3516 | 14 | NULL, HFILL } |
3517 | 14 | }, |
3518 | | |
3519 | 14 | { &hf_wlccp_cisco_acctg_msg, |
3520 | 14 | { "Cisco Accounting Message", "wlccp.cisco_acctg_msg", |
3521 | 14 | FT_BYTES, BASE_NONE, NULL, 0, |
3522 | 14 | NULL, HFILL } |
3523 | 14 | }, |
3524 | | |
3525 | 14 | { &hf_wlccp_wids_msg_type, |
3526 | 14 | { "WIDS Message Type", "wlccp.wids_msg_type", |
3527 | 14 | FT_UINT8, BASE_DEC, NULL, 0, |
3528 | 14 | NULL, HFILL } |
3529 | 14 | }, |
3530 | | |
3531 | 14 | { &hf_wlccp_nmconfig, |
3532 | 14 | { "NM Config", "wlccp.nmconfig", |
3533 | 14 | FT_UINT8, BASE_DEC, NULL, 0, |
3534 | 14 | NULL, HFILL } |
3535 | 14 | }, |
3536 | | |
3537 | 14 | { &hf_wlccp_scmstate_change, |
3538 | 14 | { "SCM State Change", "wlccp.scmstate_change", |
3539 | 14 | FT_UINT8, BASE_DEC, NULL, 0, |
3540 | 14 | NULL, HFILL } |
3541 | 14 | }, |
3542 | | |
3543 | 14 | { &hf_wlccp_scmstate_change_reason, |
3544 | 14 | { "SCM State Change Reason", "wlccp.scmstate_change_reason", |
3545 | 14 | FT_UINT8, BASE_DEC, NULL, 0, |
3546 | 14 | NULL, HFILL } |
3547 | 14 | }, |
3548 | | |
3549 | 14 | { &hf_wlccp_scmattach_state, |
3550 | 14 | { "SCM Attach State", "wlccp.scmattach_state", |
3551 | 14 | FT_UINT8, BASE_DEC, NULL, 0, |
3552 | 14 | NULL, HFILL } |
3553 | 14 | }, |
3554 | | |
3555 | 14 | { &hf_wlccp_nmcapability, |
3556 | 14 | { "NM Capability", "wlccp.nm_capability", |
3557 | 14 | FT_UINT8, BASE_DEC, NULL, 0, |
3558 | 14 | NULL, HFILL } |
3559 | 14 | }, |
3560 | | |
3561 | 14 | { &hf_wlccp_refresh_req_id, |
3562 | 14 | { "Refresh Request ID", "wlccp.refresh_request_id", |
3563 | 14 | FT_UINT32, BASE_DEC, NULL, 0, |
3564 | 14 | NULL, HFILL } |
3565 | 14 | }, |
3566 | | |
3567 | 14 | { &hf_wlccp_tlv, |
3568 | 14 | { "WLCCP TLV", "wlccp.tlv", |
3569 | 14 | FT_NONE, BASE_NONE, NULL, 0, |
3570 | 14 | NULL, HFILL } |
3571 | 14 | }, |
3572 | | |
3573 | 14 | { &hf_tlv_flags, |
3574 | 14 | { "TLV Flags", "wlccp.tlv_flags", |
3575 | 14 | FT_UINT16, BASE_HEX, NULL, 0, |
3576 | 14 | "TLV Flags, Group and Type", HFILL } |
3577 | 14 | }, |
3578 | | |
3579 | 14 | { &hf_wlccp_null_tlv, |
3580 | 14 | { "NULL TLV", "wlccp.null_tlv", |
3581 | 14 | FT_BYTES, BASE_NONE, NULL , |
3582 | 14 | 0, NULL, HFILL } |
3583 | 14 | }, |
3584 | | |
3585 | | |
3586 | 14 | { &hf_wlccp_tlv_type, |
3587 | 14 | { "TLV Type", "wlccp.tlv_type", |
3588 | 14 | FT_UINT16, BASE_DEC, NULL , |
3589 | 14 | TLV_TYPE_ID, "TLV Type ID", HFILL } |
3590 | 14 | }, |
3591 | | |
3592 | 14 | { &hf_wlccp_tlv_type0, |
3593 | 14 | { "TLV Type", "wlccp.tlv_type", |
3594 | 14 | FT_UINT16, BASE_DEC, VALS(wlccp_tlv_typeID_0), |
3595 | 14 | TLV_TYPE_ID, "TLV Type ID", HFILL } |
3596 | 14 | }, |
3597 | | |
3598 | 14 | { &hf_wlccp_tlv_type1, |
3599 | 14 | { "TLV Type", "wlccp.tlv_type", |
3600 | 14 | FT_UINT16, BASE_DEC, VALS(wlccp_tlv_typeID_1), |
3601 | 14 | TLV_TYPE_ID, "TLV Type ID", HFILL } |
3602 | 14 | }, |
3603 | | |
3604 | 14 | { &hf_wlccp_tlv_type2, |
3605 | 14 | { "TLV Type", "wlccp.tlv_type", |
3606 | 14 | FT_UINT16, BASE_DEC, VALS(wlccp_tlv_typeID_2), |
3607 | 14 | TLV_TYPE_ID, "TLV Type ID", HFILL } |
3608 | 14 | }, |
3609 | | |
3610 | 14 | { &hf_wlccp_tlv_type3, |
3611 | 14 | { "TLV Type", "wlccp.tlv_type", |
3612 | 14 | FT_UINT16, BASE_DEC, VALS(wlccp_tlv_typeID_3), |
3613 | 14 | TLV_TYPE_ID, "TLV Type ID", HFILL } |
3614 | 14 | }, |
3615 | | |
3616 | 14 | { &hf_wlccp_tlv_type4, |
3617 | 14 | { "TLV Type", "wlccp.tlv_type", |
3618 | 14 | FT_UINT16, BASE_DEC, VALS(wlccp_tlv_typeID_4), |
3619 | 14 | TLV_TYPE_ID, "TLV Type ID", HFILL } |
3620 | 14 | }, |
3621 | | |
3622 | 14 | { &hf_wlccp_tlv_type5, |
3623 | 14 | { "TLV Type", "wlccp.tlv_type", |
3624 | 14 | FT_UINT16, BASE_DEC, VALS(wlccp_tlv_typeID_5), |
3625 | 14 | TLV_TYPE_ID, "TLV Type ID", HFILL } |
3626 | 14 | }, |
3627 | | |
3628 | 14 | { &hf_wlccp_tlv_group, |
3629 | 14 | { "TLV Group", "wlccp.tlv_group", |
3630 | 14 | FT_UINT16, BASE_DEC, VALS(wlccp_tlv_group_vs) , |
3631 | 14 | TLV_GROUP_ID, "TLV Group ID", HFILL } |
3632 | 14 | }, |
3633 | | |
3634 | 14 | { &hf_wlccp_tlv_container_flag, |
3635 | 14 | { "TLV Container Flag", "wlccp.tlv_container_flag", |
3636 | 14 | FT_UINT16, BASE_DEC, NULL, |
3637 | 14 | TLV_F_CONTAINER, "Set on if the TLV is a container", HFILL } |
3638 | 14 | }, |
3639 | | |
3640 | 14 | { &hf_wlccp_tlv_encrypted_flag, |
3641 | 14 | { "TLV Encrypted Flag", "wlccp.tlv_encrypted_flag", |
3642 | 14 | FT_UINT16, BASE_DEC, NULL, |
3643 | 14 | TLV_F_ENCRYPTED, "Set on if the TLV is encrypted", HFILL } |
3644 | 14 | }, |
3645 | | |
3646 | 14 | { &hf_wlccp_tlv_reserved_bit, |
3647 | 14 | { "Reserved bits", "wlccp.tlv_reserved_bit", |
3648 | 14 | FT_UINT16, BASE_DEC, NULL, |
3649 | 14 | TLV_F_RESVD, NULL, HFILL } |
3650 | 14 | }, |
3651 | | |
3652 | 14 | { &hf_wlccp_tlv_request_flag, |
3653 | 14 | { "TLV Request Flag", "wlccp.tlv_request_flag", |
3654 | 14 | FT_UINT16, BASE_DEC, NULL, |
3655 | 14 | TLV_F_REQUEST, "Set on if the TLV is a request", HFILL } |
3656 | 14 | }, |
3657 | | |
3658 | 14 | { &hf_wlccp_tlv_length, |
3659 | 14 | { "TLV Length", "wlccp.tlv_length", |
3660 | 14 | FT_UINT16, BASE_DEC, NULL, 0, |
3661 | 14 | NULL, HFILL } |
3662 | 14 | }, |
3663 | | |
3664 | 14 | { &hf_wlccp_path_length, |
3665 | 14 | { "Path Length", "wlccp.path_length", |
3666 | 14 | FT_UINT8, BASE_DEC, NULL, 0, |
3667 | 14 | NULL, HFILL } |
3668 | 14 | }, |
3669 | | |
3670 | 14 | { &hf_wlccp_mic_msg_seq_count, |
3671 | 14 | { "MIC Message Sequence Count", "wlccp.mic_msg_seq_count", |
3672 | 14 | FT_UINT64, BASE_DEC, NULL, 0, |
3673 | 14 | NULL, HFILL } |
3674 | 14 | }, |
3675 | | |
3676 | 14 | { &hf_wlccp_mic_length, |
3677 | 14 | { "MIC Length", "wlccp.mic_length", |
3678 | 14 | FT_UINT16, BASE_DEC, NULL, 0, |
3679 | 14 | NULL, HFILL } |
3680 | 14 | }, |
3681 | | |
3682 | 14 | { &hf_wlccp_mic_value, |
3683 | 14 | { "MIC Value", "wlccp.mic_value", |
3684 | 14 | FT_BYTES, BASE_NONE, NULL, 0, |
3685 | 14 | NULL, HFILL } |
3686 | 14 | }, |
3687 | | |
3688 | 14 | { &hf_wlccp_dest_node_type, |
3689 | 14 | { "Destination node type", "wlccp.dest_node_type", |
3690 | 14 | FT_UINT16, BASE_DEC, VALS(wlccp_node_type_vs), |
3691 | 14 | 0x0, NULL, HFILL } |
3692 | 14 | }, |
3693 | | |
3694 | 14 | { &hf_wlccp_dest_node_id, |
3695 | 14 | { "Destination node ID", "wlccp.dest_node_id", |
3696 | 14 | FT_ETHER, BASE_NONE, NULL, |
3697 | 14 | 0x0, NULL, HFILL } |
3698 | 14 | }, |
3699 | | |
3700 | 14 | { &hf_wlccp_supp_node_type, |
3701 | 14 | { "Destination node type", "wlccp.supp_node_type", |
3702 | 14 | FT_UINT16, BASE_DEC, VALS(wlccp_node_type_vs), |
3703 | 14 | 0x0, NULL, HFILL } |
3704 | 14 | }, |
3705 | | |
3706 | 14 | { &hf_wlccp_supp_node_id, |
3707 | 14 | { "Supporting node ID", "wlccp.supp_node_id", |
3708 | 14 | FT_ETHER, BASE_NONE, NULL, |
3709 | 14 | 0x0, NULL, HFILL } |
3710 | 14 | }, |
3711 | | |
3712 | 14 | { &hf_wlccp_src_node_type, |
3713 | 14 | { "Source node type", "wlccp.source_node_type", |
3714 | 14 | FT_UINT16, BASE_DEC, VALS(wlccp_node_type_vs), |
3715 | 14 | 0x0, NULL, HFILL } |
3716 | 14 | }, |
3717 | | |
3718 | 14 | { &hf_wlccp_src_node_id, |
3719 | 14 | { "Source node ID", "wlccp.source_node_id", |
3720 | 14 | FT_ETHER, BASE_NONE, NULL, |
3721 | 14 | 0x0, NULL, HFILL } |
3722 | 14 | }, |
3723 | | |
3724 | 14 | { &hf_wlccp_key_mgmt_type, |
3725 | 14 | { "Key Management type", "wlccp.key_mgmt_type", |
3726 | 14 | FT_UINT8, BASE_HEX, NULL, |
3727 | 14 | 0x0, NULL, HFILL } |
3728 | 14 | }, |
3729 | | |
3730 | 14 | { &hf_wlccp_key_seq_count, |
3731 | 14 | { "Key Sequence Count", "wlccp.key_seq_count", |
3732 | 14 | FT_UINT32, BASE_DEC, NULL, 0, |
3733 | 14 | NULL, HFILL } |
3734 | 14 | }, |
3735 | | |
3736 | 14 | { &hf_wlccp_session_timeout, |
3737 | 14 | { "Session Timeout", "wlccp.session_timeout", |
3738 | 14 | FT_UINT32, BASE_DEC, NULL, 0, |
3739 | 14 | NULL, HFILL } |
3740 | 14 | }, |
3741 | | |
3742 | 14 | { &hf_wlccp_nonce, |
3743 | 14 | { "Nonce Value", "wlccp.nonce_value", |
3744 | 14 | FT_BYTES, BASE_NONE, NULL, 0, |
3745 | 14 | NULL, HFILL } |
3746 | 14 | }, |
3747 | | |
3748 | 14 | { &hf_wlccp_token, |
3749 | 14 | { "Token", "wlccp.token", |
3750 | 14 | FT_UINT8, BASE_HEX, NULL, 0, |
3751 | 14 | NULL, HFILL } |
3752 | 14 | }, |
3753 | | |
3754 | 14 | { &hf_wlccp_scan_mode, |
3755 | 14 | { "Scan Mode", "wlccp.scan_mode", |
3756 | 14 | FT_UINT8, BASE_HEX, NULL, |
3757 | 14 | 0, NULL, HFILL } |
3758 | 14 | }, |
3759 | | |
3760 | 14 | { &hf_wlccp_mode, |
3761 | 14 | { "Mode", "wlccp.mode", |
3762 | 14 | FT_UINT8, BASE_HEX, VALS(wlccp_mode_vs), |
3763 | 14 | 0, NULL, HFILL } |
3764 | 14 | }, |
3765 | | |
3766 | 14 | { &hf_wlccp_rss, |
3767 | 14 | { "RSS", "wlccp.rss", |
3768 | 14 | FT_INT8, BASE_DEC, NULL, 0, |
3769 | 14 | "Received Signal Strength", HFILL } |
3770 | 14 | }, |
3771 | | |
3772 | 14 | { &hf_wlccp_srcidx, |
3773 | 14 | { "Source Index", "wlccp.srcidx", |
3774 | 14 | FT_UINT8, BASE_HEX, NULL, 0, |
3775 | 14 | NULL, HFILL } |
3776 | 14 | }, |
3777 | | |
3778 | 14 | { &hf_wlccp_parent_tsf, |
3779 | 14 | { "Parent TSF", "wlccp.parenttsf", |
3780 | 14 | FT_UINT32, BASE_HEX, NULL, 0, |
3781 | 14 | NULL, HFILL } |
3782 | 14 | }, |
3783 | | |
3784 | 14 | { &hf_wlccp_target_tsf, |
3785 | 14 | { "Target TSF", "wlccp.targettsf", |
3786 | 14 | FT_UINT64, BASE_HEX, NULL, 0, |
3787 | 14 | NULL, HFILL } |
3788 | 14 | }, |
3789 | | |
3790 | 14 | { &hf_wlccp_channel, |
3791 | 14 | { "Channel", "wlccp.channel", |
3792 | 14 | FT_UINT8, BASE_DEC, NULL, 0, |
3793 | 14 | NULL, HFILL } |
3794 | 14 | }, |
3795 | | |
3796 | 14 | { &hf_wlccp_phy_type, |
3797 | 14 | { "PHY Type", "wlccp.phy_type", |
3798 | 14 | FT_UINT8, BASE_DEC, VALS(phy_type_80211_vs), 0, |
3799 | 14 | NULL, HFILL } |
3800 | 14 | }, |
3801 | | |
3802 | 14 | { &hf_wlccp_bssid, |
3803 | 14 | { "BSS ID", "wlccp.bssid", |
3804 | 14 | FT_ETHER, BASE_NONE, NULL, 0, |
3805 | 14 | "Basic Service Set ID", HFILL } |
3806 | 14 | }, |
3807 | | |
3808 | 14 | { &hf_wlccp_beacon_interval, |
3809 | 14 | { "Beacon Interval", "wlccp.beacon_interval", |
3810 | 14 | FT_UINT16, BASE_DEC, NULL, 0, |
3811 | 14 | NULL, HFILL } |
3812 | 14 | }, |
3813 | | |
3814 | | /* |
3815 | | { &hf_wlccp_capabilities, |
3816 | | { "Capabilities", "wlccp.capabilities", |
3817 | | FT_UINT16, BASE_HEX, NULL, 0, |
3818 | | NULL, HFILL } |
3819 | | }, |
3820 | | */ |
3821 | | |
3822 | 14 | { &hf_wlccp_80211_capabilities, |
3823 | 14 | { "802.11 Capabilities Flags", "wlccp.80211_capabilities", |
3824 | 14 | FT_UINT16, BASE_HEX, NULL, |
3825 | 14 | 0x0, NULL, HFILL } |
3826 | 14 | }, |
3827 | | |
3828 | 14 | { &hf_80211_cap_ess, |
3829 | 14 | { "ESS flag", "wlccp.80211_ess_flag", |
3830 | 14 | FT_UINT16, BASE_DEC, NULL, |
3831 | 14 | F_80211_ESS, "Set on by APs in Beacon or Probe Response", HFILL } |
3832 | 14 | }, |
3833 | | |
3834 | | |
3835 | 14 | { &hf_80211_cap_ibss, |
3836 | 14 | { "IBSS flag", "wlccp.80211_ibss_flag", |
3837 | 14 | FT_UINT16, BASE_DEC, NULL, |
3838 | 14 | F_80211_IBSS, "Set on by STAs in Beacon or Probe Response", HFILL } |
3839 | 14 | }, |
3840 | | |
3841 | 14 | { &hf_80211_cap_cf_pollable, |
3842 | 14 | { "CF Pollable flag", "wlccp.80211_cf_pollable_flag", |
3843 | 14 | FT_UINT16, BASE_DEC, NULL, |
3844 | 14 | F_80211_CFPOLL, NULL, HFILL } |
3845 | 14 | }, |
3846 | | |
3847 | 14 | { &hf_80211_cap_cf_poll_req, |
3848 | 14 | { "CF Poll Request flag", "wlccp.80211_cf_poll_req_flag", |
3849 | 14 | FT_UINT16, BASE_DEC, NULL, |
3850 | 14 | F_80211_CFPOLL_REQ, NULL, HFILL } |
3851 | 14 | }, |
3852 | | |
3853 | 14 | { &hf_80211_cap_privacy, |
3854 | 14 | { "Privacy flag", "wlccp.80211_privacy", |
3855 | 14 | FT_UINT16, BASE_DEC, NULL, |
3856 | 14 | F_80211_PRIVACY, "Set on indicate confidentiality is required in the BSS", HFILL } |
3857 | 14 | }, |
3858 | | |
3859 | 14 | { &hf_80211_short_preamble, |
3860 | 14 | { "Short Preamble flag", "wlccp.80211_short_preamble_flag", |
3861 | 14 | FT_UINT16, BASE_DEC, NULL, |
3862 | 14 | F_80211_SHORT_PREAMBLE, NULL, HFILL } |
3863 | 14 | }, |
3864 | | |
3865 | 14 | { &hf_80211_pbcc, |
3866 | 14 | { "PBCC flag", "wlccp.80211_pbcc_flag", |
3867 | 14 | FT_UINT16, BASE_DEC, NULL, |
3868 | 14 | F_80211_PBCC, NULL, HFILL } |
3869 | 14 | }, |
3870 | | |
3871 | 14 | { &hf_80211_chan_agility, |
3872 | 14 | { "Channel Agility flag", "wlccp.80211_chan_agility_flag", |
3873 | 14 | FT_UINT16, BASE_DEC, NULL, |
3874 | 14 | F_80211_CH_AGILITY, NULL, HFILL } |
3875 | 14 | }, |
3876 | | |
3877 | 14 | { &hf_80211_spectrum_mgmt, |
3878 | 14 | { "Spectrum Management flag", "wlccp.80211_spectrum_mgmt_flag", |
3879 | 14 | FT_UINT16, BASE_DEC, NULL, |
3880 | 14 | F_80211_SPEC_MGMT, NULL, HFILL } |
3881 | 14 | }, |
3882 | | |
3883 | 14 | { &hf_80211_qos, |
3884 | 14 | { "QOS flag", "wlccp.80211_qos_flag", |
3885 | 14 | FT_UINT16, BASE_DEC, NULL, |
3886 | 14 | F_80211_QOS, NULL, HFILL } |
3887 | 14 | }, |
3888 | | |
3889 | 14 | { &hf_80211_short_time_slot, |
3890 | 14 | { "Short Time Slot flag", "wlccp.80211_short_time_slot_flag", |
3891 | 14 | FT_UINT16, BASE_DEC, NULL, |
3892 | 14 | F_80211_SHORT_TIME_SLOT, NULL, HFILL } |
3893 | 14 | }, |
3894 | | |
3895 | 14 | { &hf_80211_apsd, |
3896 | 14 | { "APSD flag", "wlccp.80211_apsd_flag", |
3897 | 14 | FT_UINT16, BASE_DEC, NULL, |
3898 | 14 | F_80211_APSD, NULL, HFILL } |
3899 | 14 | }, |
3900 | | |
3901 | 14 | { &hf_80211_reserved, |
3902 | 14 | { "Reserved", "wlccp.80211_reserved", |
3903 | 14 | FT_UINT16, BASE_DEC, NULL, |
3904 | 14 | F_80211_RESVD, NULL, HFILL } |
3905 | 14 | }, |
3906 | | |
3907 | 14 | { &hf_80211_dsss_ofdm, |
3908 | 14 | { "DSSS-OFDM Flag", "wlccp.dsss_ofdm_flag", |
3909 | 14 | FT_UINT16, BASE_DEC, NULL, |
3910 | 14 | F_80211_DSSS_OFDM, NULL, HFILL } |
3911 | 14 | }, |
3912 | | |
3913 | 14 | { &hf_80211_dlyd_block_ack, |
3914 | 14 | { "Delayed Block Ack Flag", "wlccp.dsss_dlyd_block_ack_flag", |
3915 | 14 | FT_UINT16, BASE_DEC, NULL, |
3916 | 14 | F_80211_DLYD_BLK_ACK, NULL, HFILL } |
3917 | 14 | }, |
3918 | | |
3919 | 14 | { &hf_80211_imm_block_ack, |
3920 | 14 | { "Immediate Block Ack Flag", "wlccp.dsss_imm_block_ack_flag", |
3921 | 14 | FT_UINT16, BASE_DEC, NULL, |
3922 | 14 | F_80211_IMM_BLK_ACK, NULL, HFILL } |
3923 | 14 | }, |
3924 | | |
3925 | | |
3926 | 14 | { &hf_wlccp_tlv80211, |
3927 | 14 | { "802.11 TLV Value", "wlccp.tlv80211", |
3928 | 14 | FT_BYTES, BASE_NONE, NULL, 0, |
3929 | 14 | NULL, HFILL } |
3930 | 14 | }, |
3931 | | |
3932 | 14 | { &hf_wlccp_duration, |
3933 | 14 | { "Duration", "wlccp.duration", |
3934 | 14 | FT_UINT16, BASE_DEC, NULL, 0, |
3935 | 14 | NULL, HFILL } |
3936 | 14 | }, |
3937 | | |
3938 | 14 | { &hf_wlccp_rpidensity, |
3939 | 14 | { "RPI Density", "wlccp.rpi_density", |
3940 | 14 | FT_BYTES, BASE_NONE, NULL, 0, |
3941 | 14 | NULL, HFILL } |
3942 | 14 | }, |
3943 | | |
3944 | 14 | { &hf_wlccp_ccabusy, |
3945 | 14 | { "CCA Busy", "wlccp.cca_busy", |
3946 | 14 | FT_UINT8, BASE_HEX, NULL, 0, |
3947 | 14 | NULL, HFILL } |
3948 | 14 | }, |
3949 | | |
3950 | 14 | { &hf_wlccp_stamac, |
3951 | 14 | { "Station MAC", "wlccp.station_mac", |
3952 | 14 | FT_ETHER, BASE_NONE, NULL, 0, |
3953 | 14 | NULL, HFILL } |
3954 | 14 | }, |
3955 | | |
3956 | 14 | { &hf_wlccp_sta_type, |
3957 | 14 | { "Station Type", "wlccp.station_type", |
3958 | 14 | FT_UINT8, BASE_HEX, NULL, 0, |
3959 | 14 | NULL, HFILL } |
3960 | 14 | }, |
3961 | | |
3962 | 14 | { &hf_wlccp_token2, |
3963 | 14 | { "2 Byte Token", "wlccp.token2", |
3964 | 14 | FT_UINT16, BASE_HEX, NULL, 0, |
3965 | 14 | NULL, HFILL } |
3966 | 14 | }, |
3967 | | |
3968 | 14 | { &hf_wlccp_interval, |
3969 | 14 | { "Interval", "wlccp.interval", |
3970 | 14 | FT_UINT16, BASE_DEC, NULL, 0, |
3971 | 14 | NULL, HFILL } |
3972 | 14 | }, |
3973 | | |
3974 | 14 | { &hf_framereport_elements, |
3975 | 14 | { "Frame Report Elements", "wlccp.framereport_elements", |
3976 | 14 | FT_NONE, BASE_NONE, NULL, 0, |
3977 | 14 | NULL, HFILL } |
3978 | 14 | }, |
3979 | | |
3980 | 14 | { &hf_wlccp_count, |
3981 | 14 | { "Element Count", "wlccp.element_count", |
3982 | 14 | FT_UINT8, BASE_DEC, NULL, 0, |
3983 | 14 | NULL, HFILL } |
3984 | 14 | }, |
3985 | | |
3986 | 14 | { &hf_wlccp_numframes, |
3987 | 14 | { "Number of frames", "wlccp.numframes", |
3988 | 14 | FT_UINT8, BASE_DEC, NULL, 0, |
3989 | 14 | NULL, HFILL } |
3990 | 14 | }, |
3991 | | |
3992 | 14 | { &hf_wlccp_mfpcapability, |
3993 | 14 | { "MFP Capability", "wlccp.mfp_capability", |
3994 | 14 | FT_UINT16, BASE_HEX, NULL, 0, |
3995 | 14 | NULL, HFILL } |
3996 | 14 | }, |
3997 | | |
3998 | 14 | { &hf_wlccp_mfpflags, |
3999 | 14 | { "MFP Flags", "wlccp.mfp_flags", |
4000 | 14 | FT_UINT16, BASE_HEX, NULL, 0, |
4001 | 14 | NULL, HFILL } |
4002 | 14 | }, |
4003 | | |
4004 | 14 | { &hf_wlccp_mfpconfig, |
4005 | 14 | { "MFP Config", "wlccp.mfp_config", |
4006 | 14 | FT_UINT16, BASE_HEX, NULL, 0, |
4007 | 14 | NULL, HFILL } |
4008 | 14 | }, |
4009 | | |
4010 | 14 | { &hf_wlccp_clientmac, |
4011 | 14 | { "Client MAC", "wlccp.client_mac", |
4012 | 14 | FT_ETHER, BASE_NONE, NULL, 0, |
4013 | 14 | NULL, HFILL } |
4014 | 14 | }, |
4015 | | |
4016 | 14 | { &hf_reg_lifetime, |
4017 | 14 | { "Reg. LifeTime", "wlccp.reg_lifetime", |
4018 | 14 | FT_UINT8, BASE_DEC, NULL, 0, |
4019 | 14 | NULL, HFILL } |
4020 | 14 | }, |
4021 | | |
4022 | 14 | { &hf_time_elapsed, |
4023 | 14 | { "Elapsed Time", "wlccp.time_elapsed", |
4024 | 14 | FT_UINT16, BASE_DEC, NULL, 0, |
4025 | 14 | NULL, HFILL } |
4026 | 14 | }, |
4027 | | |
4028 | 14 | { &hf_wlccp_parent_ap_mac, |
4029 | 14 | { "Parent AP MAC", "wlccp.parent_ap_mac", |
4030 | 14 | FT_ETHER, BASE_NONE, NULL, 0, |
4031 | 14 | NULL, HFILL } |
4032 | 14 | }, |
4033 | | |
4034 | 14 | { &hf_wlccp_auth_type, |
4035 | 14 | { "Authentication Type", "wlccp.auth_type", |
4036 | 14 | FT_UINT8, BASE_HEX, NULL, 0, |
4037 | 14 | NULL, HFILL } |
4038 | 14 | }, |
4039 | | |
4040 | 14 | { &hf_wlccp_radius_user_name, |
4041 | 14 | { "RADIUS Username", "wlccp.radius_username", |
4042 | 14 | FT_STRING, BASE_NONE, NULL, |
4043 | 14 | 0x0, NULL, HFILL } |
4044 | 14 | }, |
4045 | | |
4046 | 14 | { &hf_wds_reason, |
4047 | 14 | { "Reason Code", "wlccp.wds_reason", |
4048 | 14 | FT_UINT8, BASE_HEX, NULL, 0, |
4049 | 14 | NULL, HFILL } |
4050 | 14 | }, |
4051 | | |
4052 | | |
4053 | 14 | { &hf_wlccp_tlv_unknown_value, |
4054 | 14 | { "Unknown TLV Contents", "wlccp.tlv_unknown_value", |
4055 | 14 | FT_BYTES, BASE_NONE, NULL, 0, |
4056 | 14 | NULL, HFILL } |
4057 | 14 | } |
4058 | | |
4059 | 14 | }; /* hf_register_info hf */ |
4060 | | |
4061 | 14 | static hf_register_info oui_hf[] = { |
4062 | 14 | { &hf_llc_wlccp_pid, |
4063 | 14 | { "PID", "llc.wlccp_pid", |
4064 | 14 | FT_UINT16, BASE_HEX, VALS(cisco_pid_vals), |
4065 | 14 | 0x0, NULL, HFILL } |
4066 | 14 | } |
4067 | 14 | }; |
4068 | | |
4069 | | /* Setup protocol subtree array */ |
4070 | 14 | static int *ett[] = { |
4071 | 14 | &ett_wlccp, |
4072 | 14 | &ett_wlccp_sap_tree, |
4073 | 14 | &ett_wlccp_type, |
4074 | 14 | &ett_wlccp_flags, |
4075 | 14 | &ett_wlccp_cm_flags, |
4076 | 14 | &ett_wlccp_scm_flags, |
4077 | 14 | &ett_wlccp_scm_priority_flags, |
4078 | 14 | &ett_wlccp_scm_bridge_priority_flags, |
4079 | 14 | &ett_wlccp_rm_flags, |
4080 | 14 | &ett_wlccp_nm_flags, |
4081 | 14 | &ett_wlccp_ap_node_id, |
4082 | 14 | &ett_wlccp_eapol_msg_tree, |
4083 | 14 | &ett_wlccp_eap_tree, |
4084 | 14 | &ett_wlccp_tlv_tree, |
4085 | 14 | &ett_tlv_flags_tree, |
4086 | 14 | &ett_tlv_sub_tree, |
4087 | 14 | &ett_80211_capability_flags_tree, |
4088 | 14 | &ett_framereport_elements_tree |
4089 | 14 | }; /* static int *ett[] */ |
4090 | | |
4091 | | /* Register the protocol name and description */ |
4092 | 14 | proto_wlccp = proto_register_protocol("Cisco Wireless LAN Context Control Protocol", "WLCCP", "wlccp"); |
4093 | | |
4094 | | /* Required function calls to register the header fields and subtrees used */ |
4095 | 14 | proto_register_field_array(proto_wlccp, hf, array_length(hf)); |
4096 | 14 | proto_register_subtree_array(ett, array_length(ett)); |
4097 | | |
4098 | | /* Register the subdissector */ |
4099 | 14 | wlccp_handle = register_dissector("wlccp", dissect_wlccp, proto_wlccp); |
4100 | | |
4101 | 14 | llc_add_oui(OUI_CISCOWL, "llc.wlccp_pid", "LLC Cisco WLCCP OUI PID", oui_hf, proto_wlccp); |
4102 | 14 | } |
4103 | | |
4104 | | |
4105 | | void |
4106 | | proto_reg_handoff_wlccp(void) |
4107 | 14 | { |
4108 | 14 | dissector_add_uint("ethertype", ETHERTYPE_WLCCP, wlccp_handle); |
4109 | 14 | dissector_add_uint_with_preference("udp.port", WLCCP_UDP_PORT, wlccp_handle); |
4110 | 14 | dissector_add_uint("llc.wlccp_pid", 0x0000, wlccp_handle); |
4111 | | |
4112 | 14 | } |
4113 | | |
4114 | | |
4115 | | /* |
4116 | | * Editor modelines - https://www.wireshark.org/tools/modelines.html |
4117 | | * |
4118 | | * Local variables: |
4119 | | * c-basic-offset: 8 |
4120 | | * tab-width: 8 |
4121 | | * indent-tabs-mode: t |
4122 | | * End: |
4123 | | * |
4124 | | * vi: set shiftwidth=8 tabstop=8 noexpandtab: |
4125 | | * :indentSize=8:tabSize=8:noTabs=false: |
4126 | | */ |