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