Revert "TODO epan/dissectors/asn1/kerberos/packet-kerberos-template.c new GSS flags"
[wireshark-sm.git] / epan / dissectors / packet-wlccp.c
blobc7ae9eb96d3af993fa58d0acfe5a7aafaec08bcd
1 /* packet-wlccp.c
2 * Routines for Cisco Wireless LAN Context Control Protocol dissection
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>
8 * Wireshark - Network traffic analyzer
9 * By Gerald Combs <gerald@wireshark.org>
10 * Copyright 1998 Gerald Combs
12 * The CISCOWL dissector was merged into this one.
14 * SPDX-License-Identifier: GPL-2.0-or-later
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 */
22 /* More clues to version 0x00 of the protocol:
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)
48 #include "config.h"
50 #include <epan/packet.h>
51 #include <epan/etypes.h>
52 #include <epan/oui.h>
53 #include "packet-llc.h"
55 void proto_register_wlccp(void);
56 void proto_reg_handoff_wlccp(void);
58 static dissector_handle_t wlccp_handle;
60 /* The UDP port that WLCCP is expected to ride on */
61 /* WLCCP also uses an LLC OUI type and an ethertype */
62 #define WLCCP_UDP_PORT 2887 /* Not IANA registered */
65 /* SAP is 2-bit version and 6-bit Type */
66 #define SAP_VERSION_MASK (0xC0)
67 #define SAP_VALUE_MASK (0x3f)
69 static const value_string wlccp_sap_vs[] = {
70 { 0x0, "Context Management" },
71 { 0x1, "Security" },
72 { 0x2, "Radio Resource Management" },
73 { 0x3, "QOS" },
74 { 0x4, "Network Management" },
75 { 0x5, "MIP" },
76 { 0, NULL }
79 #define WLCCP_SAP_CCM (0x00)
80 #define WLCCP_SAP_SEC (0x01)
81 #define WLCCP_SAP_RRM (0x02)
82 #define WLCCP_SAP_QOS (0x03)
83 #define WLCCP_SAP_NM (0x04)
84 #define WLCCP_SAP_MIP (0x05)
86 static const value_string wlccp_node_type_vs[] = {
87 { 0x00, "None" },
88 { 0x01, "Access Point (AP)" },
89 { 0x02, "Subnet Context Manager (SCM)" },
90 { 0x04, "Local Context Manager (LCM)" },
91 { 0x08, "Campus Context Manager (CCM)" },
92 { 0x10, "Infrastructure (ICN)" },
93 { 0x40, "Client" },
94 /* { 0x8000, "Multi Mask?" }, */
95 { 0, NULL }
98 /* The Message Type field contains a 2-bit Sub-Type and a 6-bit Base Message Type */
99 #define MT_SUBTYPE (0xC0)
100 #define MT_BASE_MSG_TYPE (0x3F)
102 static const value_string wlccp_subtype_vs[] = {
103 { 0x0, "Request" },
104 { 0x1, "Reply" },
105 { 0x2, "Confirm" },
106 { 0x3, "Ack" },
107 { 0, NULL }
110 /* The Message Type definitions are a combination of the SAP and the Type_ID */
111 /* fields. These mappings are not well documented and have been gathered from a */
112 /* combination of the WLCCP patent application, experimentation, and WLCCP */
113 /* device logs. */
115 /* For SAP=0 */
116 static const value_string wlccp_msg_type_vs_0[] = {
117 { 0x1, "SCM Advertise" },
118 { 0x2, "CCM Advertise" },
119 { 0x3, "Registration" },
120 { 0x4, "DeRegistration" },
121 { 0x5, "Detach" },
122 { 0x6, "Context" },
123 { 0x7, "Path Update" },
124 { 0x8, "Path Check" },
125 { 0x9, "PreRegistration" },
126 { 0x0a, "Trace" },
127 { 0x0b, "cmAAA EAP Authent" },
128 { 0x0c, "cmPathInit Path Authent" },
129 { 0x0f, "cmWIDS" },
130 { 0, NULL }
134 /* For SAP=1 */
135 static const value_string wlccp_msg_type_vs_1[] = {
136 /* { 0x1, "Unknown" }, */
137 { 0, NULL }
141 /* For SAP=2 */
142 static const value_string wlccp_msg_type_vs_2[] = {
143 { 0x1, "rmReq" },
144 { 0x2, "rmReqRoutingResp" },
145 { 0x3, "rmReport" },
146 { 0, NULL }
150 /* For SAP=3 */
151 static const value_string wlccp_msg_type_vs_3[] = {
152 /* { 0x1, "Unknown" }, */
153 { 0, NULL }
157 /* For SAP=4 */
158 static const value_string wlccp_msg_type_vs_4[] = {
159 { 0x01, "nmAck" },
160 { 0x10, "nmConfigRequest" },
161 { 0x11, "nmConfigReply" },
162 { 0x20, "nmApRegistration" },
163 { 0x21, "nmScmStateChange" },
164 { 0x22, "nmScmKeepActive" },
165 { 0x30, "nmClientEventReport" },
166 { 0x31, "nmAllClientRefreshRequest" },
167 { 0, NULL }
171 /* For SAP=5 */
172 static const value_string wlccp_msg_type_vs_5[] = {
173 /* { 0x1, "Unknown" }, */
174 { 0, NULL }
179 /* Mask definitions for the CM Flags field */
180 #define F_RETRY (1<<15)
181 #define F_RESPONSE_REQUEST (1<<14)
182 #define F_TLV (1<<13)
183 #define F_INBOUND (1<<12)
184 #define F_OUTBOUND (1<<11)
185 #define F_HOPWISE_ROUTING (1<<10)
186 #define F_ROOT_CM (1<<9)
187 #define F_RELAY (1<<8)
188 #define F_MIC (1<<7)
190 /* Mask definitions for the RM Flags field */
191 #define RM_F_REQUEST_REPLY (1<<0)
192 #define RM_F_MIC (1<<1)
194 /* Mask definitions for the NM Flags field */
195 /* the NM flags are the same as the CM flags except there is no
196 INBOUND, OUTBOUND, HOPWISE_ROUTING, ROOT_CM, or RELAY flag, and
197 the RESPONSE_REQUEST flag is renamed ACK_REQD
199 #define F_ACK_REQD (1<<14)
202 /* Mask definitions for the SCM Flags field */
203 #define F_SCM_LAYER2UPDATE (1<<3)
204 #define F_SCM_UNATTACHED (1<<2)
205 #define F_SCM_UNSCHEDULED (1<<1)
206 #define F_SCM_ACTIVE (1<<0)
208 /* Mask definitions for the SCM Priority Flags field */
209 #define F_SCM_PRIORITY 0xfe
210 #define F_SCM_PREFERRED 0x01
212 /* Mask definitions for the SCM Bridge Priority Flags field */
213 #define F_SCM_BRIDGE_PRIORITY 0xfe
214 #define F_SCM_BRIDGE_DISABLE 0x01
216 /* The TLV Type definitions are a combination of the TLV Group and the */
217 /* TLV Type ID fields. These mappings are not well documented and have been */
218 /* gathered from a combination of the WLCCP patent application, */
219 /* experimentation, and WLCCP device logs */
221 /* The TLV Group/Type Field contains some flags and the Group ID and Type ID */
222 #define TLV_F_CONTAINER (0x8000)
223 #define TLV_F_ENCRYPTED (0x4000)
224 #define TLV_F_RESVD (0x3000)
225 #define TLV_F_RESVD2 (0x2000)
226 #define TLV_F_RESVD3 (0x1000)
227 #define TLV_F_REQUEST (0x0080)
228 #define TLV_GROUP_ID (0x0F00)
229 #define TLV_TYPE_ID (0x007F)
231 static const value_string wlccp_tlv_group_vs[] = {
232 { 0x0, "WLCCP Group" },
233 { 0x1, "Security Group" },
234 { 0x2, "RRM Group" },
235 { 0x3, "QOS Group" },
236 { 0x4, "NM Group" },
237 { 0x5, "MIP Group" },
238 { 0, NULL }
242 #define WLCCP_TLV_GROUP_WLCCP (0x00)
243 #define WLCCP_TLV_GROUP_SEC (0x01)
244 #define WLCCP_TLV_GROUP_RRM (0x02)
245 #define WLCCP_TLV_GROUP_QOS (0x03)
246 #define WLCCP_TLV_GROUP_NM (0x04)
247 #define WLCCP_TLV_GROUP_MIP (0x05)
249 /* Group 0 */
250 static const value_string wlccp_tlv_typeID_0[] = {
251 { 0x00, "NULL TLV" },
252 { 0x09, "ipv4Address" },
253 { 0x01, "Container" },
254 { 0x02, "AP Port Info" },
255 { 0x03, "ipv4 Subnet ID" },
256 { 0x04, "Secondary LAN Address List" },
257 { 0x05, "Multicast Ethernet Address List" },
258 { 0x06, "ipv4 Multicast Address List" },
259 { 0x07, "AP Port List" },
260 { 0x08, "Requestor SSID" },
261 { 0, NULL }
264 /* Group 1 */
265 static const value_string wlccp_tlv_typeID_1[] = {
266 { 0x01, "initSession" },
267 { 0x02, "inSecureContextReq" },
268 { 0x06, "authenticator" },
269 { 0x08, "mic" },
270 { 0x0a, "inSecureContextReply" },
271 { 0, NULL }
274 /* Group 2 */
275 static const value_string wlccp_tlv_typeID_2[] = {
276 { 0x03, "rmReport" },
277 { 0x04, "aggrRmReport" },
278 { 0x15, "frameReport" },
279 { 0x17, "ccaReport" },
280 { 0x19, "rpiHistReport" },
281 { 0x1e, "commonBeaconReport" },
282 { 0x1f, "aggrBeaconReport" },
283 { 0x5b, "mfpRouting" },
284 { 0x5c, "mfpConfig" },
285 { 0, NULL }
288 /* Group 3 */
289 static const value_string wlccp_tlv_typeID_3[] = {
290 /* { 0x01, "Unknown" } */
291 { 0, NULL },
294 /* Group 4 */
295 static const value_string wlccp_tlv_typeID_4[] = {
296 /* { 0x01, "Unknown" } */
297 { 0, NULL },
300 /* Group 5 */
301 static const value_string wlccp_tlv_typeID_5[] = {
302 /* { 0x01, "Unknown" } */
303 { 0, NULL },
310 static const value_string wlccp_aaa_msg_type_vs[] = {
311 { 0x0, "Start" },
312 { 0x1, "Finish" },
313 { 0x2, "EAPOL" },
314 { 0x3, "Cisco Accounting" },
315 { 0, NULL }
318 static const value_string wlccp_eapol_auth_type_vs[] = {
319 { 0x0, "EAP Only" },
320 { 0x1, "MAC Only" },
321 { 0x2, "MAC then EAP" },
322 { 0x3, "MAC and EAP" },
323 { 0x4, "LEAP only" },
324 { 0x5, "MAC then LEAP" },
325 { 0x6, "MAC and LEAP" },
326 { 0, NULL }
329 static const value_string wlccp_key_mgmt_type_vs[] = {
330 { 0x0, "None" },
331 { 0x1, "CCKM" },
332 { 0x2, "Legacy 802.1x" },
333 { 0x3, "SSN/TGi" },
334 { 0, NULL }
337 static const value_string eapol_type_vs[] = {
338 { 0x0, "EAP Packet" },
339 { 0x1, "EAP Start" },
340 { 0x2, "Unknown" },
341 { 0x3, "Key" },
342 { 0, NULL }
346 static const value_string wlccp_status_vs[] = {
347 {0, "Success" },
348 { 0, NULL }
351 static const value_string cisco_pid_vals[] = {
352 { 0x0000, "WLCCP" },
353 { 0, NULL }
356 static const value_string wlccp_mode_vs[] = {
357 { 0x0, "apSelected" },
358 {0x01, "series" },
359 {0x3, "parallel" },
360 {0, NULL }
364 static const value_string phy_type_80211_vs[] = {
365 { 0x01, "FHSS 2.4 GHz" },
366 { 0x02, "DSSS 2.4 GHz" },
367 { 0x03, "IR Baseband" },
368 { 0x04, "OFDM 5GHz" },
369 { 0x05, "HRDSSS" },
370 { 0x06, "ERP" },
371 { 0, NULL }
375 /* 802.11 capabilities flags */
376 #define F_80211_ESS 0x0001
377 #define F_80211_IBSS 0x0002
378 #define F_80211_CFPOLL 0x0004
379 #define F_80211_CFPOLL_REQ 0x0008
380 #define F_80211_PRIVACY 0x0010
381 #define F_80211_SHORT_PREAMBLE 0x0020
382 #define F_80211_PBCC 0x0040
383 #define F_80211_CH_AGILITY 0x0080
384 #define F_80211_SPEC_MGMT 0x0100
385 #define F_80211_QOS 0x0200
386 #define F_80211_SHORT_TIME_SLOT 0x0400
387 #define F_80211_APSD 0x0800
388 #define F_80211_RESVD 0x1000
389 #define F_80211_DSSS_OFDM 0x2000
390 #define F_80211_DLYD_BLK_ACK 0x4000
391 #define F_80211_IMM_BLK_ACK 0x8000
397 struct subdissector_returns_t
399 static int consumed
400 static bool mic_flag;
401 static bool tlv_flag;
402 }; * struct flags_t declaration *
407 /* Forward declarations we need below */
408 static unsigned dissect_wlccp_ccm_msg(proto_tree *_tree, tvbuff_t *_tvb, unsigned _offset, uint8_t _base_message_type);
409 static unsigned dissect_wlccp_sec_msg(proto_tree *_tree, tvbuff_t *_tvb, unsigned _offset, uint8_t _base_message_type);
410 static unsigned dissect_wlccp_rrm_msg(proto_tree *_tree, tvbuff_t *_tvb, unsigned _offset, uint8_t _base_message_type);
411 static unsigned dissect_wlccp_qos_msg(proto_tree *_tree, tvbuff_t *_tvb, unsigned _offset, uint8_t _base_message_type);
412 static unsigned dissect_wlccp_nm_msg(proto_tree *_tree, tvbuff_t *_tvb, unsigned _offset, uint8_t _base_message_type);
413 static unsigned dissect_wlccp_mip_msg(proto_tree *_tree, tvbuff_t *_tvb, unsigned _offset, uint8_t _base_message_type);
415 static unsigned dissect_wlccp_tlvs(proto_tree *_tree, tvbuff_t *tvb, unsigned tlv_offset, unsigned _depth);
417 static unsigned dissect_wlccp_ccm_tlv(proto_tree *_tree, tvbuff_t *_tvb, unsigned _offset, int _type_id, unsigned _length, proto_item *_ti);
418 static unsigned dissect_wlccp_sec_tlv(proto_tree *_tree, tvbuff_t *_tvb, unsigned _offset, int _type_id, unsigned _length, proto_item *_ti);
419 static unsigned dissect_wlccp_rrm_tlv(proto_tree *_tree, tvbuff_t *_tvb, unsigned _offset, int _type_id, unsigned _length, proto_item *_ti);
420 static unsigned dissect_wlccp_qos_tlv(proto_tree *_tree, tvbuff_t *_tvb, unsigned _offset, int _type_id, unsigned _length, proto_item *_ti);
421 static unsigned dissect_wlccp_nm_tlv(proto_tree *_tree, tvbuff_t *_tvb, unsigned _offset, int _type_id, unsigned _length, proto_item *_ti);
422 static unsigned dissect_wlccp_mip_tlv(proto_tree *_tree, tvbuff_t *_tvb, unsigned _offset, int _type_id, unsigned _length, proto_item *_ti);
424 static void set_mic_flag(bool flag);
425 static void set_tlv_flag(bool flag);
426 static bool get_tlv_flag(void);
427 static bool get_mic_flag(void);
429 /* Initialize some utility variables */
430 static bool mic_flag=0, tlv_flag=0;
432 /* Initialize the protocol and registered fields */
433 static int proto_wlccp;
435 static int hf_llc_wlccp_pid;
439 static int hf_wlccp_dstmac;
440 static int hf_wlccp_srcmac;
441 static int hf_wlccp_hostname;
443 /* WLCCP Fixed header fields */
444 static int hf_wlccp_version;
446 static int hf_wlccp_sap; /* SAP Tree */
447 static int hf_wlccp_sap_version;
448 static int hf_wlccp_sap_id;
450 static int hf_wlccp_destination_node_type;
451 static int hf_wlccp_length;
453 static int hf_wlccp_type; /* Message Type Tree */
454 static int hf_wlccp_subtype;
455 static int hf_wlccp_base_message_type_0;
456 static int hf_wlccp_base_message_type_1;
457 static int hf_wlccp_base_message_type_2;
458 static int hf_wlccp_base_message_type_3;
459 static int hf_wlccp_base_message_type_4;
460 static int hf_wlccp_base_message_type_5;
461 static int hf_wlccp_base_message_type_unknown;
463 static int hf_wlccp_hops;
464 static int hf_wlccp_nm_version;
466 static int hf_wlccp_msg_id;
468 static int hf_wlccp_flags; /* Flags Tree */
469 static int hf_wlccp_rm_flags;
470 static int hf_wlccp_retry_flag;
471 static int hf_wlccp_response_request_flag;
472 static int hf_wlccp_ack_required_flag;
473 static int hf_wlccp_tlv_flag;
474 static int hf_wlccp_inbound_flag;
475 static int hf_wlccp_outbound_flag;
476 static int hf_wlccp_hopwise_routing_flag;
477 static int hf_wlccp_root_cm_flag;
478 static int hf_wlccp_relay_flag;
479 static int hf_wlccp_mic_flag;
480 static int hf_wlccp_rm_request_reply_flag;
481 static int hf_wlccp_rm_mic_flag;
483 static int hf_wlccp_originator; /* Originator Tree */
484 static int hf_wlccp_originator_node_type;
485 /* static int hf_wlccp_originator_id; */
487 static int hf_wlccp_responder; /* Responder Tree */
488 static int hf_wlccp_responder_node_type;
489 /*static int hf_wlccp_responder_id; */
492 /* static int hf_wlccp_relay_node;*/ /* Relay Node Tree */
493 static int hf_wlccp_relay_node_type;
494 static int hf_wlccp_relay_node_id;
496 /* static int hf_wlccp_priority; */
497 /* static int hf_wlccp_age; */
498 /* static int hf_wlccp_period; */
499 static int hf_wlccp_ipv4_address;
501 /* SCM Advertisement */
502 static int hf_wlccp_scm_hop_address;
504 static int hf_wlccp_scm_flags; /* SCM Flags Tree */
505 static int hf_wlccp_scm_active_flag;
506 static int hf_wlccp_scm_unscheduled_flag;
507 static int hf_wlccp_scm_unattached_flag;
508 static int hf_wlccp_scm_layer2update_flag;
510 static int hf_wlccp_scm_election_group;
511 static int hf_wlccp_scm_attach_count;
513 static int hf_wlccp_scm_priority_flags; /* SCM Priority Flags */
514 static int hf_wlccp_scm_priority;
515 static int hf_wlccp_scm_preferred_flag;
517 static int hf_wlccp_scm_bridge_priority_flags; /* SCM Bridge Priority Flags */
518 static int hf_wlccp_scm_bridge_priority;
519 static int hf_wlccp_scm_bridge_disable_flag;
521 static int hf_wlccp_scm_node_id;
522 static int hf_wlccp_scm_unknown_short;
523 static int hf_wlccp_scm_instance_age;
524 static int hf_wlccp_scm_path_cost;
525 static int hf_wlccp_scm_hop_count;
526 static int hf_wlccp_scm_advperiod;
528 /*kan for apRegistration messages*/
529 static int hf_wlccp_timestamp;
530 static int hf_wlccp_apregstatus;
531 static int hf_wlccp_ap_node_id;
532 static int hf_wlccp_ap_node_type;
533 static int hf_wlccp_ap_node_id_address;
534 /*kan for nmPathInit messages */
535 static int hf_wlccp_requ_node_type;
536 static int hf_wlccp_requ_node_id;
537 static int hf_wlccp_status;
538 static int hf_wlccp_path_init_rsvd;
539 /*kan - for cmAAA messages */
540 static int hf_wlccp_aaa_msg_type;
541 static int hf_wlccp_aaa_auth_type;
542 static int hf_wlccp_keymgmt_type;
543 /*kan - for cmAAA EAPOL messages */
544 static int hf_wlccp_eapol_msg;
545 static int hf_wlccp_eapol_version;
546 static int hf_wlccp_eapol_type;
547 static int hf_wlccp_eap_msg_length;
548 static int hf_wlccp_eap_msg;
549 /*kan - for cmAAA Proprietary message */
550 static int hf_wlccp_cisco_acctg_msg;
551 /*kan - for cmWIDS */
552 static int hf_wlccp_wids_msg_type;
553 /*kan - for nmConfigRequest and nmConfigReply */
554 static int hf_wlccp_nmconfig;
556 static int hf_wlccp_scmstate_change;
557 static int hf_wlccp_scmstate_change_reason;
559 static int hf_wlccp_scmattach_state;
560 static int hf_wlccp_nmcapability;
561 static int hf_wlccp_refresh_req_id;
563 static int hf_wlccp_tlv;
564 static int hf_tlv_flags;
566 static int hf_wlccp_null_tlv;
568 static int hf_wlccp_tlv_type;
569 static int hf_wlccp_tlv_type0;
570 static int hf_wlccp_tlv_type1;
571 static int hf_wlccp_tlv_type2;
572 static int hf_wlccp_tlv_type3;
573 static int hf_wlccp_tlv_type4;
574 static int hf_wlccp_tlv_type5;
575 static int hf_wlccp_tlv_group;
576 static int hf_wlccp_tlv_container_flag;
577 static int hf_wlccp_tlv_encrypted_flag;
578 static int hf_wlccp_tlv_request_flag;
579 static int hf_wlccp_tlv_reserved_bit;
580 static int hf_wlccp_tlv_length;
582 /* static int hf_wlccp_tlv_value; */
584 static int hf_wlccp_path_length;
585 static int hf_wlccp_mic_msg_seq_count;
586 static int hf_wlccp_mic_length;
587 static int hf_wlccp_mic_value;
589 static int hf_wlccp_key_seq_count;
590 static int hf_wlccp_dest_node_type;
591 static int hf_wlccp_dest_node_id;
592 static int hf_wlccp_supp_node_type;
593 static int hf_wlccp_supp_node_id;
594 static int hf_wlccp_key_mgmt_type;
595 static int hf_wlccp_nonce;
596 static int hf_wlccp_session_timeout;
597 static int hf_wlccp_src_node_type;
598 static int hf_wlccp_src_node_id;
599 static int hf_wlccp_token;
600 static int hf_wlccp_mode;
601 static int hf_wlccp_scan_mode;
602 static int hf_wlccp_rss;
603 static int hf_wlccp_srcidx;
604 static int hf_wlccp_parent_tsf;
605 static int hf_wlccp_target_tsf;
607 static int hf_wlccp_channel;
608 static int hf_wlccp_phy_type;
609 static int hf_wlccp_bssid;
610 static int hf_wlccp_beacon_interval;
611 /* static int hf_wlccp_capabilities; */
612 static int hf_wlccp_tlv80211;
613 static int hf_wlccp_duration;
614 static int hf_wlccp_rpidensity;
615 static int hf_wlccp_ccabusy;
616 static int hf_wlccp_sta_type;
617 static int hf_wlccp_stamac;
618 static int hf_wlccp_token2;
619 static int hf_wlccp_interval;
620 static int hf_wlccp_count;
621 static int hf_framereport_elements;
622 static int hf_wlccp_numframes;
623 static int hf_wlccp_mfpcapability;
624 static int hf_wlccp_mfpflags;
625 static int hf_wlccp_mfpconfig;
626 static int hf_wlccp_clientmac;
627 static int hf_time_elapsed;
628 static int hf_wlccp_parent_ap_mac;
629 static int hf_wlccp_auth_type;
630 static int hf_reg_lifetime;
631 static int hf_wlccp_radius_user_name;
632 static int hf_wds_reason;
635 static int hf_wlccp_80211_capabilities;
636 static int hf_80211_cap_ess;
637 static int hf_80211_cap_ibss;
638 static int hf_80211_cap_cf_pollable;
639 static int hf_80211_cap_cf_poll_req;
640 static int hf_80211_cap_privacy;
641 static int hf_80211_short_preamble;
642 static int hf_80211_pbcc;
643 static int hf_80211_chan_agility;
644 static int hf_80211_spectrum_mgmt;
645 static int hf_80211_qos;
646 static int hf_80211_short_time_slot;
647 static int hf_80211_apsd;
648 static int hf_80211_reserved;
649 static int hf_80211_dsss_ofdm;
650 static int hf_80211_dlyd_block_ack;
651 static int hf_80211_imm_block_ack;
654 static int hf_wlccp_tlv_unknown_value;
656 /* Initialize the subtree pointers */
657 static int ett_wlccp;
658 static int ett_wlccp_sap_tree;
659 static int ett_wlccp_type;
660 static int ett_wlccp_cm_flags;
661 static int ett_wlccp_scm_flags;
662 static int ett_wlccp_scm_priority_flags;
663 static int ett_wlccp_scm_bridge_priority_flags;
664 static int ett_wlccp_rm_flags;
665 static int ett_wlccp_nm_flags;
668 static int ett_wlccp_flags;
669 static int ett_wlccp_ap_node_id;
670 static int ett_wlccp_eapol_msg_tree;
671 static int ett_wlccp_eap_tree;
672 static int ett_wlccp_tlv_tree;
673 static int ett_tlv_flags_tree;
674 static int ett_tlv_sub_tree;
675 static int ett_80211_capability_flags_tree;
676 static int ett_framereport_elements_tree;
680 /* Code to actually dissect the packets */
681 static int
682 dissect_wlccp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
684 /* Set up structures needed to add the protocol subtree and manage it */
685 proto_item *ti;
686 proto_tree *wlccp_tree, *wlccp_sap_tree, *wlccp_type_tree;
688 unsigned offset = 0, old_offset;
690 uint8_t version=0, sap_id=0;
692 uint16_t type;
693 uint8_t base_message_type=0, message_sub_type=0;
695 /* Make entries in Protocol column and Info column on summary display */
696 col_set_str(pinfo->cinfo, COL_PROTOCOL, "WLCCP");
698 if(tvb_get_uint8(tvb, 0) == 0xC1) /* Get the version number */
700 sap_id = tvb_get_uint8(tvb,1) & SAP_VALUE_MASK;
701 base_message_type=(tvb_get_uint8(tvb,6)) & MT_BASE_MSG_TYPE;
702 message_sub_type=(tvb_get_uint8(tvb, 6) & MT_SUBTYPE ) >> 6;
704 switch (sap_id)
707 case WLCCP_SAP_CCM:
710 col_add_fstr(pinfo->cinfo, COL_INFO, "Message Type: %-27s SubType: %s",
711 val_to_str_const(base_message_type, wlccp_msg_type_vs_0, "Unknown"),
712 val_to_str_const(message_sub_type, wlccp_subtype_vs, "Unknown"));
713 break;
715 } /* case WLCCP_SAP_CCM */
717 case WLCCP_SAP_SEC:
720 col_add_fstr(pinfo->cinfo, COL_INFO, "Message Type: %-27s SubType: %s",
721 val_to_str_const(base_message_type, wlccp_msg_type_vs_1, "Unknown"),
722 val_to_str_const(message_sub_type, wlccp_subtype_vs, "Unknown"));
723 break;
724 } /* case WLCCP_SAP_SEC */
726 case WLCCP_SAP_RRM:
728 col_add_fstr(pinfo->cinfo, COL_INFO, "Message Type: %-27s SubType: %s",
729 val_to_str_const(base_message_type, wlccp_msg_type_vs_2, "Unknown"),
730 val_to_str_const(message_sub_type, wlccp_subtype_vs, "Unknown"));
731 break;
733 } /* case WLCCP_SAP_RRM */
735 case WLCCP_SAP_QOS:
737 col_add_fstr(pinfo->cinfo, COL_INFO, "Message Type: %-27s SubType: %s",
738 val_to_str_const(base_message_type, wlccp_msg_type_vs_3, "Unknown"),
739 val_to_str_const(message_sub_type, wlccp_subtype_vs, "Unknown"));
740 break;
741 } /* case WLCCP_SAP_QOS */
743 case WLCCP_SAP_NM:
745 col_add_fstr(pinfo->cinfo, COL_INFO, "Message Type: %-27s SubType: %s",
746 val_to_str_const(base_message_type, wlccp_msg_type_vs_4, "Unknown"),
747 val_to_str_const(message_sub_type, wlccp_subtype_vs, "Unknown"));
748 break;
750 } /* case WLCCP_SAP_NM */
752 case WLCCP_SAP_MIP:
754 col_add_fstr(pinfo->cinfo, COL_INFO, "Message Type: %-27s SubType: %s",
755 val_to_str_const(base_message_type, wlccp_msg_type_vs_5, "Unknown"),
756 val_to_str_const(message_sub_type, wlccp_subtype_vs, "Unknown"));
757 break;
758 } /* case WLCCP_SAP_MIP */
760 default:
762 col_add_fstr(pinfo->cinfo, COL_INFO, "Message Type: %-27s SubType: %s", "Unknown",
763 val_to_str_const(message_sub_type, wlccp_subtype_vs, "Unknown"));
764 break;
765 } /* default for switch sap */
768 } /* switch sap */
770 } /* if version=0xC1 (tvb_get_uint8(tvb, 0) == 0xC1)*/
772 if (tree) {
773 /* create display subtree for the protocol */
774 ti = proto_tree_add_item(tree, proto_wlccp, tvb, 0, -1, ENC_NA);
775 wlccp_tree = proto_item_add_subtree(ti, ett_wlccp);
777 proto_tree_add_item(wlccp_tree, hf_wlccp_version,
778 tvb, offset, 1, ENC_BIG_ENDIAN);
780 /* interpretation of the packet is determined by WLCCP version */
781 version = tvb_get_uint8(tvb, 0);
782 offset += 1;
784 if(version == 0x0) {
785 proto_tree_add_item(wlccp_tree, hf_wlccp_length,
786 tvb, 1, 1, ENC_BIG_ENDIAN);
788 proto_tree_add_item(wlccp_tree, hf_wlccp_type,
789 tvb, 2, 2, ENC_BIG_ENDIAN);
790 type = tvb_get_ntohs(tvb, 2);
792 proto_tree_add_item(wlccp_tree, hf_wlccp_dstmac,
793 tvb, 4, 6, ENC_NA);
795 proto_tree_add_item(wlccp_tree, hf_wlccp_srcmac,
796 tvb, 10, 6, ENC_NA);
798 if(type == 0x4081) {
799 proto_tree_add_item(wlccp_tree, hf_wlccp_ipv4_address,
800 tvb, 38, 4, ENC_BIG_ENDIAN);
802 proto_tree_add_item(wlccp_tree, hf_wlccp_hostname,
803 tvb, 44, 28, ENC_ASCII);
804 } /* if type = 0x4081 */
805 } /* if version == 0x00 */
807 if(version == 0xC1)
810 { /* SAP Field */
811 ti = proto_tree_add_item(wlccp_tree, hf_wlccp_sap,
812 tvb, offset, 1, ENC_BIG_ENDIAN);
813 wlccp_sap_tree = proto_item_add_subtree(ti, ett_wlccp_sap_tree);
815 proto_tree_add_item(wlccp_sap_tree, hf_wlccp_sap_version,
816 tvb, offset, 1, ENC_BIG_ENDIAN);
818 proto_tree_add_item(wlccp_sap_tree, hf_wlccp_sap_id,
819 tvb, offset, 1, ENC_BIG_ENDIAN);
821 sap_id = tvb_get_uint8(tvb,offset) & SAP_VALUE_MASK;
823 offset += 1;
825 } /* SAP Field */
827 proto_tree_add_item(wlccp_tree, hf_wlccp_destination_node_type,
828 tvb, offset, 2, ENC_BIG_ENDIAN);
829 offset += 2;
831 proto_tree_add_item(wlccp_tree, hf_wlccp_length,
832 tvb, offset, 2, ENC_BIG_ENDIAN);
833 offset += 2;
836 { /* Message Type Field */
837 ti = proto_tree_add_item(wlccp_tree, hf_wlccp_type,
838 tvb, offset, 1, ENC_BIG_ENDIAN);
840 wlccp_type_tree = proto_item_add_subtree(ti, ett_wlccp_type);
842 proto_tree_add_item(wlccp_type_tree, hf_wlccp_subtype,
843 tvb, offset, 1, ENC_BIG_ENDIAN);
845 switch (sap_id)
848 case WLCCP_SAP_CCM:
851 proto_tree_add_item(wlccp_type_tree, hf_wlccp_base_message_type_0,
852 tvb, offset, 1, ENC_BIG_ENDIAN);
854 break;
856 } /* case WLCCP_SAP_CCM */
858 case WLCCP_SAP_SEC:
860 proto_tree_add_item(wlccp_type_tree, hf_wlccp_base_message_type_1,
861 tvb, offset, 1, ENC_BIG_ENDIAN);
863 break;
865 } /* case WLCCP_SAP_SEC */
867 case WLCCP_SAP_RRM:
869 proto_tree_add_item(wlccp_type_tree, hf_wlccp_base_message_type_2,
870 tvb, offset, 1, ENC_BIG_ENDIAN);
872 break;
874 } /* case WLCCP_SAP_RRM */
876 case WLCCP_SAP_QOS:
878 proto_tree_add_item(wlccp_type_tree, hf_wlccp_base_message_type_3,
879 tvb, offset, 1, ENC_BIG_ENDIAN);
881 break;
883 } /* case WLCCP_SAP_QOS */
885 case WLCCP_SAP_NM:
887 proto_tree_add_item(wlccp_type_tree, hf_wlccp_base_message_type_4,
888 tvb, offset, 1, ENC_BIG_ENDIAN);
890 break;
892 } /* case WLCCP_SAP_NM */
894 case WLCCP_SAP_MIP:
896 proto_tree_add_item(wlccp_type_tree, hf_wlccp_base_message_type_5,
897 tvb, offset, 1, ENC_BIG_ENDIAN);
899 break;
901 } /* case WLCCP_SAP_MIP */
903 default:
906 proto_tree_add_item(wlccp_type_tree, hf_wlccp_base_message_type_unknown,
907 tvb, offset, 1, ENC_BIG_ENDIAN);
909 break;
911 } /* default for switch sap */
913 } /* switch sap */
915 base_message_type=(tvb_get_uint8(tvb,offset) & MT_BASE_MSG_TYPE );
917 offset += 1;
918 } /* Message Type Field */
920 /* after the Message Type Field things change based on SAP and Message Type */
922 set_mic_flag(false);
923 set_tlv_flag(false);
925 switch (sap_id)
928 case WLCCP_SAP_CCM:
931 offset = dissect_wlccp_ccm_msg(wlccp_tree, tvb, offset, base_message_type);
933 break;
935 } /* case WLCCP_SAP_CCM */
937 case WLCCP_SAP_SEC:
940 offset = dissect_wlccp_sec_msg(wlccp_tree, tvb, offset, base_message_type);
942 break;
944 } /* case WLCCP_SAP_SEC */
946 case WLCCP_SAP_RRM:
949 offset = dissect_wlccp_rrm_msg(wlccp_tree, tvb, offset, base_message_type);
951 break;
953 } /* case WLCCP_SAP_RRM */
955 case WLCCP_SAP_QOS:
958 offset = dissect_wlccp_qos_msg(wlccp_tree, tvb, offset, base_message_type);
960 break;
962 } /* case WLCCP_SAP_QOS */
964 case WLCCP_SAP_NM:
967 offset = dissect_wlccp_nm_msg(wlccp_tree, tvb, offset, base_message_type);
969 break;
971 } /* case WLCCP_SAP_NM */
973 case WLCCP_SAP_MIP:
976 offset = dissect_wlccp_mip_msg(wlccp_tree, tvb, offset, base_message_type);
978 break;
980 } /* case WLCCP_SAP_MIP */
982 default:
984 /* what should we do if we get an undefined SAP? */
986 break;
988 } /* default for switch sap */
990 } /* switch sap */
994 if(get_tlv_flag() || get_mic_flag())
997 if (tvb_reported_length_remaining(tvb,offset) < 4)
999 /* something is wrong if the TLV flag is set and there's not enough left in the buffer */
1001 /* proto_tree_add_string(wlccp_tree, NULL, tvb, offset, -1, "MIC Flag=%d and TLV Flag=%d, but no data left to decode."); */
1003 } /* if bytes_left <=0 */
1004 else
1007 while (tvb_reported_length_remaining(tvb,offset) >= 4)
1009 old_offset = offset;
1010 offset = dissect_wlccp_tlvs(wlccp_tree, tvb, offset, 0);
1011 DISSECTOR_ASSERT(offset > old_offset);
1012 } /* while bytes_left */
1015 } /*else bytes_left < 4 */
1017 } /* if tlv_flag || mic_flag */
1019 } /* if version == 0xC1 */
1021 } /* if tree */
1023 return tvb_captured_length(tvb);
1024 } /* dissect_wlccp */
1027 /*******************************************************************************************/
1029 /* some utility functions */
1031 /* these could be implemented with a struct */
1033 static void set_mic_flag(bool flag)
1035 mic_flag=flag;
1036 } /*set_mic_flag */
1038 static void set_tlv_flag(bool flag)
1040 tlv_flag=flag;
1041 } /* set_tlv_flag */
1043 static bool get_tlv_flag(void)
1045 return tlv_flag;
1046 } /* get_tlv_flag */
1048 static bool get_mic_flag(void)
1050 return mic_flag;
1051 } /* get_mic_flag */
1053 /*******************************************************************************************/
1055 static unsigned dissect_wlccp_ccm_msg(proto_tree *_tree, tvbuff_t *_tvb, unsigned _offset, uint8_t _base_message_type)
1057 proto_item *_ti;
1058 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;
1060 bool _relay_flag=0, _mic_flag=0, _tlv_flag=0;
1061 uint8_t _aaa_msg_type=0, _eapol_type=0;
1062 uint16_t _eap_msg_length=0;
1064 proto_tree_add_item(_tree, hf_wlccp_hops,
1065 _tvb, _offset, 1, ENC_BIG_ENDIAN);
1066 _offset += 1;
1068 proto_tree_add_item(_tree, hf_wlccp_msg_id,
1069 _tvb, _offset, 2, ENC_BIG_ENDIAN);
1070 _offset += 2;
1073 /* Decode the CM Flags Field */
1075 _ti = proto_tree_add_item(_tree, hf_wlccp_flags,
1076 _tvb, _offset, 2, ENC_BIG_ENDIAN);
1077 _wlccp_cm_flags_tree = proto_item_add_subtree(_ti, ett_wlccp_cm_flags);
1080 proto_tree_add_item(_wlccp_cm_flags_tree, hf_wlccp_retry_flag,
1081 _tvb, _offset, 2, ENC_BIG_ENDIAN);
1083 proto_tree_add_item(_wlccp_cm_flags_tree, hf_wlccp_response_request_flag,
1084 _tvb, _offset, 2, ENC_BIG_ENDIAN);
1086 proto_tree_add_item(_wlccp_cm_flags_tree, hf_wlccp_tlv_flag,
1087 _tvb, _offset, 2, ENC_BIG_ENDIAN);
1088 _tlv_flag = (tvb_get_ntohs(_tvb, _offset)>>13) & 1;
1089 set_tlv_flag(_tlv_flag);
1091 proto_tree_add_item(_wlccp_cm_flags_tree, hf_wlccp_inbound_flag,
1092 _tvb, _offset, 2, ENC_BIG_ENDIAN);
1094 proto_tree_add_item(_wlccp_cm_flags_tree, hf_wlccp_outbound_flag,
1095 _tvb, _offset, 2, ENC_BIG_ENDIAN);
1097 proto_tree_add_item(_wlccp_cm_flags_tree, hf_wlccp_hopwise_routing_flag,
1098 _tvb, _offset, 2, ENC_BIG_ENDIAN);
1100 proto_tree_add_item(_wlccp_cm_flags_tree, hf_wlccp_root_cm_flag,
1101 _tvb, _offset, 2, ENC_BIG_ENDIAN);
1103 proto_tree_add_item(_wlccp_cm_flags_tree, hf_wlccp_relay_flag,
1104 _tvb, _offset, 2, ENC_BIG_ENDIAN);
1105 _relay_flag = (tvb_get_ntohs(_tvb, _offset)>>8) & 1;
1107 proto_tree_add_item(_wlccp_cm_flags_tree, hf_wlccp_mic_flag,
1108 _tvb, _offset, 2, ENC_BIG_ENDIAN);
1109 _mic_flag = (tvb_get_ntohs(_tvb, _offset)>>7) & 1;
1110 set_mic_flag(_mic_flag);
1112 _offset += 2;
1114 /* End Decode the CM Flags Field */
1117 proto_tree_add_item(_tree, hf_wlccp_originator_node_type,
1118 _tvb, _offset, 2, ENC_BIG_ENDIAN);
1119 _offset += 2;
1121 proto_tree_add_item(_tree, hf_wlccp_originator,
1122 _tvb, _offset, 6, ENC_NA);
1123 _offset += 6;
1125 proto_tree_add_item(_tree, hf_wlccp_responder_node_type,
1126 _tvb, _offset, 2, ENC_BIG_ENDIAN);
1127 _offset += 2;
1129 proto_tree_add_item(_tree, hf_wlccp_responder,
1130 _tvb, _offset, 6, ENC_NA);
1131 _offset += 6;
1133 if(_relay_flag)
1135 proto_tree_add_item(_tree, hf_wlccp_relay_node_type,
1136 _tvb, _offset, 2, ENC_BIG_ENDIAN);
1137 _offset += 2;
1139 proto_tree_add_item(_tree, hf_wlccp_relay_node_id,
1140 _tvb, _offset, 6, ENC_NA);
1141 _offset += 6;
1143 } /* if _relay_flag */
1146 switch (_base_message_type)
1149 case 0x01:
1151 proto_tree_add_item(_tree, hf_wlccp_scm_hop_address,
1152 _tvb, _offset, 6, ENC_NA);
1153 _offset += 6;
1155 /* Decode the SCM Flags Field */
1157 _ti = proto_tree_add_item(_tree, hf_wlccp_scm_flags,
1158 _tvb, _offset, 2, ENC_BIG_ENDIAN);
1159 _wlccp_scm_flags_tree = proto_item_add_subtree(_ti, ett_wlccp_scm_flags);
1161 proto_tree_add_item(_wlccp_scm_flags_tree, hf_wlccp_scm_layer2update_flag,
1162 _tvb, _offset, 2, ENC_BIG_ENDIAN);
1164 proto_tree_add_item(_wlccp_scm_flags_tree, hf_wlccp_scm_unattached_flag,
1165 _tvb, _offset, 2, ENC_BIG_ENDIAN);
1167 proto_tree_add_item(_wlccp_scm_flags_tree, hf_wlccp_scm_unscheduled_flag,
1168 _tvb, _offset, 2, ENC_BIG_ENDIAN);
1170 proto_tree_add_item(_wlccp_scm_flags_tree, hf_wlccp_scm_active_flag,
1171 _tvb, _offset, 2, ENC_BIG_ENDIAN);
1172 _offset += 2;
1174 /* End Decode the SCM Flags Field */
1177 proto_tree_add_item(_tree, hf_wlccp_scm_election_group,
1178 _tvb, _offset, 1, ENC_BIG_ENDIAN);
1179 _offset += 1;
1181 proto_tree_add_item(_tree, hf_wlccp_scm_attach_count,
1182 _tvb, _offset, 1, ENC_BIG_ENDIAN);
1183 _offset += 1;
1185 /* Decode the SCM Priority Flags Field */
1187 _ti = proto_tree_add_item(_tree, hf_wlccp_scm_priority_flags,
1188 _tvb, _offset, 1, ENC_BIG_ENDIAN);
1189 _wlccp_scm_priority_flags_tree = proto_item_add_subtree(_ti, ett_wlccp_scm_priority_flags);
1191 proto_tree_add_item(_wlccp_scm_priority_flags_tree, hf_wlccp_scm_priority,
1192 _tvb, _offset, 1, ENC_BIG_ENDIAN);
1194 proto_tree_add_item(_wlccp_scm_priority_flags_tree, hf_wlccp_scm_preferred_flag,
1195 _tvb, _offset, 1, ENC_BIG_ENDIAN);
1197 _offset += 1;
1199 /* End Decode the SCM Priority Flags Field */
1201 /* Decode the SCM Bridge Priority Flags Field */
1203 _ti = proto_tree_add_item(_tree, hf_wlccp_scm_bridge_priority_flags,
1204 _tvb, _offset, 1, ENC_BIG_ENDIAN);
1205 _wlccp_scm_bridge_priority_flags_tree = proto_item_add_subtree(_ti, ett_wlccp_scm_bridge_priority_flags);
1207 proto_tree_add_item(_wlccp_scm_bridge_priority_flags_tree, hf_wlccp_scm_bridge_priority,
1208 _tvb, _offset, 1, ENC_BIG_ENDIAN);
1210 proto_tree_add_item(_wlccp_scm_bridge_priority_flags_tree, hf_wlccp_scm_bridge_disable_flag,
1211 _tvb, _offset, 1, ENC_BIG_ENDIAN);
1213 _offset += 1;
1215 /* End Decode the SCM Bridge Priority Flags Field */
1217 proto_tree_add_item(_tree, hf_wlccp_scm_node_id,
1218 _tvb, _offset, 6, ENC_NA);
1219 _offset += 6;
1221 proto_tree_add_item(_tree, hf_wlccp_scm_unknown_short,
1222 _tvb, _offset, 2, ENC_BIG_ENDIAN);
1223 _offset += 2;
1225 proto_tree_add_item(_tree, hf_wlccp_scm_instance_age,
1226 _tvb, _offset, 4, ENC_BIG_ENDIAN);
1227 _offset += 4;
1229 proto_tree_add_item(_tree, hf_wlccp_scm_path_cost,
1230 _tvb, _offset, 2, ENC_BIG_ENDIAN);
1231 _offset += 2;
1233 proto_tree_add_item(_tree, hf_wlccp_scm_hop_count,
1234 _tvb, _offset, 1, ENC_BIG_ENDIAN);
1235 _offset += 1;
1237 proto_tree_add_item(_tree, hf_wlccp_scm_advperiod,
1238 _tvb, _offset, 1, ENC_BIG_ENDIAN);
1239 _offset += 1;
1241 break;
1242 } /* case 0x01 */
1244 case 0x02:
1247 break;
1248 } /* case 0x02 */
1250 case 0x03:
1253 break;
1254 } /* case 0x03 */
1256 case 0x04:
1259 break;
1260 } /* case 0x04 */
1262 case 0x05:
1265 break;
1266 } /* case 0x05 */
1268 case 0x06:
1271 break;
1272 } /* case 0x06 */
1274 case 0x07:
1277 break;
1278 } /* case 0x07 */
1280 case 0x08:
1283 break;
1284 } /* case 0x08 */
1286 case 0x09:
1289 break;
1290 } /* case 0x09 */
1292 case 0x0a:
1295 break;
1296 } /* case 0x0a */
1298 case 0x0b: /* cmAAA */
1300 proto_tree_add_item(_tree, hf_wlccp_requ_node_type,
1301 _tvb, _offset, 2, ENC_BIG_ENDIAN);
1302 _offset += 2;
1304 proto_tree_add_item(_tree, hf_wlccp_requ_node_id,
1305 _tvb, _offset, 6, ENC_NA);
1306 _offset += 6;
1308 /*kan - according to the patent application these fields vary based
1309 on one another.
1310 For now we decode what we know about and then we'll come back and add
1311 the rest */
1313 proto_tree_add_item(_tree, hf_wlccp_aaa_msg_type,
1314 _tvb, _offset, 1, ENC_BIG_ENDIAN);
1315 _aaa_msg_type=tvb_get_uint8(_tvb,_offset);
1316 _offset += 1;
1318 proto_tree_add_item(_tree, hf_wlccp_aaa_auth_type,
1319 _tvb, _offset, 1, ENC_BIG_ENDIAN);
1320 _offset += 1;
1322 proto_tree_add_item(_tree, hf_wlccp_keymgmt_type,
1323 _tvb, _offset, 1, ENC_BIG_ENDIAN);
1324 _offset += 1;
1326 proto_tree_add_item(_tree, hf_wlccp_status,
1327 _tvb, _offset, 1, ENC_BIG_ENDIAN);
1328 _offset += 1;
1330 /* kan - I'm pretty sure this EAPOL tree only applies sometimes, but it's the only complete example that I have
1331 to test against for now.
1332 For that matter, it may be possible to just hand this piece of the packet over to the EAPOL dissector and let it
1333 handle things. To be investigated further */
1335 if (_aaa_msg_type == 0x2) /*EAPOL*/
1337 _ti = proto_tree_add_item(_tree, hf_wlccp_eapol_msg,
1338 _tvb, _offset, 6, ENC_NA);
1340 _wlccp_eapol_msg_tree = proto_item_add_subtree(
1341 _ti, ett_wlccp_eapol_msg_tree);
1344 /* THIS NEEDS TO BE CHECKED */
1345 /*kan - skip some unknown bytes */
1346 _offset += 2;
1348 proto_tree_add_item(_wlccp_eapol_msg_tree, hf_wlccp_eapol_version,
1349 _tvb, _offset, 1, ENC_BIG_ENDIAN);
1351 _offset += 1;
1353 proto_tree_add_item(_wlccp_eapol_msg_tree, hf_wlccp_eapol_type,
1354 _tvb, _offset, 1, ENC_BIG_ENDIAN);
1355 _eapol_type=tvb_get_uint8(_tvb, _offset);
1356 _offset += 1;
1358 if (_eapol_type == 0)
1360 proto_tree_add_item(_wlccp_eapol_msg_tree, hf_wlccp_eap_msg_length,
1361 _tvb, _offset, 2, ENC_BIG_ENDIAN);
1362 _eap_msg_length=tvb_get_ntohs(_tvb, _offset);
1363 _offset += 2;
1365 proto_tree_add_item(_wlccp_eapol_msg_tree, hf_wlccp_eap_msg,
1366 _tvb, _offset, _eap_msg_length, ENC_NA);
1367 _offset += _eap_msg_length;
1369 } /* if _eapol_type == 0 */
1371 } /* if _aaa_msg_type ==0x2 */
1373 if (_aaa_msg_type == 0x3) /*Cisco proprietary message*/
1375 proto_tree_add_item(_tree, hf_wlccp_cisco_acctg_msg,
1376 _tvb, _offset, -1, ENC_NA);
1377 } /* if aaa_msg_type == 0x3 */
1379 break;
1380 } /* case 0x0b */
1382 case 0x0c: /* cmPathInit */
1384 proto_tree_add_item(_tree, hf_wlccp_requ_node_type,
1385 _tvb, _offset, 2, ENC_BIG_ENDIAN);
1386 _offset += 2;
1388 proto_tree_add_item(_tree, hf_wlccp_requ_node_id,
1389 _tvb, _offset, 6, ENC_NA);
1390 _offset += 6;
1392 /*kan - there's a reserved alignment byte right here*/
1393 proto_tree_add_item(_tree, hf_wlccp_path_init_rsvd,
1394 _tvb, _offset, 1, ENC_BIG_ENDIAN);
1395 _offset += 1;
1397 proto_tree_add_item(_tree, hf_wlccp_status,
1398 _tvb, _offset, 1, ENC_BIG_ENDIAN);
1399 _offset +=1;
1401 break;
1402 } /* case 0x0c */
1404 case 0x0f: /* cmWIDS */
1406 proto_tree_add_item(_tree, hf_wlccp_wids_msg_type,
1407 _tvb, _offset, 1, ENC_BIG_ENDIAN);
1408 _offset += 1;
1410 proto_tree_add_item(_tree, hf_wlccp_status,
1411 _tvb, _offset, 1, ENC_BIG_ENDIAN);
1412 _offset +=1;
1414 break;
1415 } /* case 0x0f */
1417 default:
1420 break;
1421 } /* default for switch _base_message_type */
1423 } /* switch _base_message_type */
1426 return _offset;
1427 } /* dissect_wlccp_ccm_msg */
1429 static unsigned dissect_wlccp_sec_msg(proto_tree *_tree _U_, tvbuff_t *_tvb _U_, unsigned _offset, uint8_t _base_message_type)
1432 /* at the moment we have no more data to use to write this dissector code */
1433 /* it's just a place holder for now */
1435 switch (_base_message_type)
1438 case 0x01:
1441 break;
1442 } /* case 0x01 */
1444 default:
1447 break;
1448 } /* default for switch _base_message_type */
1450 } /* switch _base_message_type */
1454 return _offset;
1456 } /* dissect_wlccp_sec_msg */
1458 static unsigned dissect_wlccp_rrm_msg(proto_tree *_tree, tvbuff_t *_tvb, unsigned _offset, uint8_t _base_message_type)
1461 proto_tree *_wlccp_rm_flags_tree;
1462 proto_item *_ti;
1464 bool _mic_flag=0;
1468 /* Decode the RM Flags Field */
1470 _ti = proto_tree_add_item(_tree, hf_wlccp_rm_flags,
1471 _tvb, _offset, 1, ENC_BIG_ENDIAN);
1473 _wlccp_rm_flags_tree = proto_item_add_subtree(_ti, ett_wlccp_rm_flags);
1475 proto_tree_add_item(_wlccp_rm_flags_tree, hf_wlccp_rm_mic_flag,
1476 _tvb, _offset, 1, ENC_BIG_ENDIAN);
1478 _mic_flag = (tvb_get_uint8(_tvb, _offset) & RM_F_MIC) >> 1;
1480 set_mic_flag(_mic_flag);
1482 set_tlv_flag(true);
1484 proto_tree_add_item(_wlccp_rm_flags_tree, hf_wlccp_rm_request_reply_flag,
1485 _tvb, _offset, 1, ENC_BIG_ENDIAN);
1487 _offset += 1;
1489 /* End Decode the RM Flags Field */
1491 proto_tree_add_item(_tree, hf_wlccp_msg_id,
1492 _tvb, _offset, 2, ENC_BIG_ENDIAN);
1493 _offset += 2;
1495 proto_tree_add_item(_tree, hf_wlccp_originator_node_type,
1496 _tvb, _offset, 2, ENC_BIG_ENDIAN);
1497 _offset += 2;
1499 proto_tree_add_item(_tree, hf_wlccp_originator,
1500 _tvb, _offset, 6, ENC_NA);
1501 _offset += 6;
1503 proto_tree_add_item(_tree, hf_wlccp_responder_node_type,
1504 _tvb, _offset, 2, ENC_BIG_ENDIAN);
1505 _offset += 2;
1507 proto_tree_add_item(_tree, hf_wlccp_responder,
1508 _tvb, _offset, 6, ENC_NA);
1509 _offset += 6;
1512 switch (_base_message_type)
1515 case 0x01: /* rmReq */
1517 break;
1518 } /* case 0x01 */
1520 case 0x02: /* rmReqRoutingResp */
1522 break;
1523 } /* case 0x01 */
1525 case 0x03: /* rmReport */
1527 break;
1528 } /* case 0x01 */
1530 default:
1533 break;
1534 } /* default for switch _base_message_type */
1536 } /* switch _base_message_type */
1539 return _offset;
1541 } /* dissect_wlccp_rrm_msg */
1545 static unsigned dissect_wlccp_qos_msg(proto_tree *_tree _U_, tvbuff_t *_tvb _U_, unsigned _offset, uint8_t _base_message_type)
1547 /* at the moment we have no more data to use to write this dissector code */
1548 /* it's just a place holder for now */
1551 switch (_base_message_type)
1554 case 0x01:
1557 break;
1558 } /* case 0x01 */
1560 default:
1563 break;
1564 } /* default for switch _base_message_type */
1566 } /* switch _base_message_type */
1569 return _offset;
1571 } /* dissect_wlccp_qos_msg */
1574 static unsigned dissect_wlccp_nm_msg(proto_tree *_tree, tvbuff_t *_tvb, unsigned _offset, uint8_t _base_message_type)
1576 proto_item *_ti;
1577 proto_tree *_wlccp_ap_node_id_tree, *_wlccp_nm_flags_tree;
1579 bool _mic_flag=0, _tlv_flag=0;
1582 proto_tree_add_item(_tree, hf_wlccp_nm_version,
1583 _tvb, _offset, 1, ENC_BIG_ENDIAN);
1584 _offset += 1;
1586 proto_tree_add_item(_tree, hf_wlccp_msg_id,
1587 _tvb, _offset, 2, ENC_BIG_ENDIAN);
1588 _offset += 2;
1591 /* Decode the NM Flags Field */
1593 _ti = proto_tree_add_item(_tree, hf_wlccp_flags,
1594 _tvb, _offset, 2, ENC_BIG_ENDIAN);
1595 _wlccp_nm_flags_tree = proto_item_add_subtree(_ti, ett_wlccp_nm_flags);
1598 proto_tree_add_item(_wlccp_nm_flags_tree, hf_wlccp_retry_flag,
1599 _tvb, _offset, 2, ENC_BIG_ENDIAN);
1601 proto_tree_add_item(_wlccp_nm_flags_tree, hf_wlccp_ack_required_flag,
1602 _tvb, _offset, 2, ENC_BIG_ENDIAN);
1604 proto_tree_add_item(_wlccp_nm_flags_tree, hf_wlccp_tlv_flag,
1605 _tvb, _offset, 2, ENC_BIG_ENDIAN);
1606 _tlv_flag = (tvb_get_ntohs(_tvb, _offset)>>13) & 1;
1607 set_tlv_flag(_tlv_flag);
1609 proto_tree_add_item(_wlccp_nm_flags_tree, hf_wlccp_mic_flag,
1610 _tvb, _offset, 2, ENC_BIG_ENDIAN);
1611 _mic_flag = (tvb_get_ntohs(_tvb, _offset)>>7) & 1;
1612 set_mic_flag(_mic_flag);
1614 _offset += 2;
1616 /* End Decode the NM Flags Field */
1619 proto_tree_add_item(_tree, hf_wlccp_originator_node_type,
1620 _tvb, _offset, 2, ENC_BIG_ENDIAN);
1621 _offset += 2;
1623 proto_tree_add_item(_tree, hf_wlccp_originator,
1624 _tvb, _offset, 6, ENC_NA);
1625 _offset += 6;
1627 proto_tree_add_item(_tree, hf_wlccp_responder_node_type,
1628 _tvb, _offset, 2, ENC_BIG_ENDIAN);
1629 _offset += 2;
1631 proto_tree_add_item(_tree, hf_wlccp_responder,
1632 _tvb, _offset, 6, ENC_NA);
1633 _offset += 6;
1636 switch (_base_message_type)
1639 case 0x01: /* nmAck */
1641 break;
1642 } /* case 0x01 */
1644 case 0x10: /* nmConfigRequest */
1646 proto_tree_add_item(_tree, hf_wlccp_nmconfig,
1647 _tvb, _offset, 1, ENC_BIG_ENDIAN);
1648 _offset += 1;
1650 /* kan - there appears to be some padding or other unknowns here */
1651 _offset += 3;
1653 break;
1654 } /* case 0x10 */
1656 case 0x11: /* nmConfigReply */
1658 proto_tree_add_item(_tree, hf_wlccp_nmconfig,
1659 _tvb, _offset, 1, ENC_BIG_ENDIAN);
1660 _offset += 1;
1662 /* kan - there appears to be some padding or other unknowns here */
1663 _offset += 3;
1665 break;
1666 } /* case 0x11 */
1668 case 0x20: /* nmApRegistration */
1670 proto_tree_add_item(_tree, hf_wlccp_timestamp,
1671 _tvb, _offset, 8, ENC_BIG_ENDIAN);
1672 _offset += 8;
1674 proto_tree_add_item(_tree, hf_wlccp_apregstatus,
1675 _tvb, _offset, 1, ENC_BIG_ENDIAN);
1676 _offset += 1;
1678 _offset += 3; /*kan - skip some apparently unused bytes */
1680 _ti = proto_tree_add_item(_tree, hf_wlccp_ap_node_id,
1681 _tvb, _offset, 8, ENC_NA);
1683 _wlccp_ap_node_id_tree = proto_item_add_subtree(
1684 _ti, ett_wlccp_ap_node_id);
1686 proto_tree_add_item(_wlccp_ap_node_id_tree, hf_wlccp_ap_node_type,
1687 _tvb, _offset, 2, ENC_BIG_ENDIAN);
1688 _offset += 2;
1690 proto_tree_add_item(_wlccp_ap_node_id_tree, hf_wlccp_ap_node_id_address,
1691 _tvb, _offset, 6, ENC_NA);
1692 _offset += 6;
1694 break;
1695 } /* case 0x20 */
1697 case 0x21: /* nmScmStateChange */
1699 proto_tree_add_item(_tree, hf_wlccp_timestamp,
1700 _tvb, _offset, 8, ENC_BIG_ENDIAN);
1701 _offset += 8;
1703 proto_tree_add_item(_tree, hf_wlccp_scmstate_change,
1704 _tvb, _offset, 1, ENC_BIG_ENDIAN);
1705 _offset += 1;
1707 proto_tree_add_item(_tree, hf_wlccp_scmstate_change_reason,
1708 _tvb, _offset, 1, ENC_BIG_ENDIAN);
1709 _offset += 1;
1711 /*kan - skip some apparently unused bytes */
1712 _offset += 2;
1714 break;
1715 } /* case 0x21 */
1717 case 0x22: /* nmScmKeepActive */
1719 proto_tree_add_item(_tree, hf_wlccp_scmattach_state,
1720 _tvb, _offset, 1, ENC_BIG_ENDIAN);
1721 _offset += 1;
1723 proto_tree_add_item(_tree, hf_wlccp_nmconfig,
1724 _tvb, _offset, 1, ENC_BIG_ENDIAN);
1725 _offset += 1;
1727 proto_tree_add_item(_tree, hf_wlccp_nmcapability,
1728 _tvb, _offset, 1, ENC_BIG_ENDIAN);
1729 _offset += 1;
1731 /*kan - skip some apparently unused bytes */
1732 _offset += 1;
1734 break;
1735 } /* case 0x22 */
1737 case 0x30: /* nmClientEventReport */
1739 proto_tree_add_item(_tree, hf_wlccp_timestamp,
1740 _tvb, _offset, 8, ENC_BIG_ENDIAN);
1741 _offset += 8;
1743 break;
1744 } /* case 0x30 */
1746 case 0x31: /* nmAllClientRefreshRequest */
1748 proto_tree_add_item(_tree, hf_wlccp_refresh_req_id,
1749 _tvb, _offset, 4, ENC_BIG_ENDIAN);
1750 _offset += 4;
1752 break;
1753 } /* case 0x31 */
1755 default:
1758 break;
1759 } /* default for switch _base_message_type */
1761 } /* switch _base_message_type */
1765 return _offset;
1767 } /* dissect_wlccp_nm_msg */
1769 static unsigned dissect_wlccp_mip_msg(proto_tree *_tree _U_, tvbuff_t *_tvb _U_, unsigned _offset, uint8_t _base_message_type)
1771 /* at the moment we have no more data to use to write this dissector code */
1772 /* it's just a place holder for now */
1774 switch (_base_message_type)
1777 case 0x01:
1780 break;
1781 } /* case 0x01 */
1783 default:
1786 break;
1787 } /* default for switch _base_message_type */
1789 } /* switch _base_message_type */
1791 return _offset;
1793 } /* dissect_wlccp_mip_msg */
1796 /***************************************************************************************************/
1798 // NOLINTNEXTLINE(misc-no-recursion)
1799 static unsigned dissect_wlccp_tlvs( proto_tree *_tree, tvbuff_t *_tvb, unsigned _offset, unsigned _depth)
1802 proto_item *_ti, *_temp_ti;
1803 proto_tree *_tlv_tree;
1804 proto_tree *_tlv_flags_tree;
1806 bool _container_flag=0;
1807 int _group_id=0, _type_id=0;
1808 unsigned _length=0;
1809 unsigned _tlv_end=0;
1810 unsigned _old_offset;
1814 /* the TLV length is 2 bytes into the TLV, and we need it now */
1815 _length = tvb_get_ntohs(_tvb,_offset+2);
1817 /* figure out where the end of this TLV is so we know when to stop dissecting it */
1818 _tlv_end = _offset + _length;
1820 /* this TLV is _length bytes long */
1821 _ti = proto_tree_add_item(_tree, hf_wlccp_tlv, _tvb, _offset, _length, ENC_NA);
1822 /* create the TLV sub tree */
1823 _tlv_tree = proto_item_add_subtree(_ti, ett_wlccp_tlv_tree);
1825 /* save the pointer because we'll add some text to it later */
1826 _temp_ti = _ti;
1830 /* add an arbitrary safety factor in case we foul up the dissector recursion */
1831 DISSECTOR_ASSERT(_depth < 100);
1833 /* add the flags field to the tlv_tree */
1834 _ti = proto_tree_add_item(_tlv_tree, hf_tlv_flags, _tvb, _offset, 2, ENC_BIG_ENDIAN);
1835 _tlv_flags_tree = proto_item_add_subtree(_ti, ett_tlv_flags_tree);
1838 first 2 bytes are the flags, Group and Type
1839 bit 0 = container,
1840 bit 1 = encrypted,
1841 bits 2-3 = reserved,
1842 bits 4-7 = group ID,
1843 bit 5 = request,
1844 bits 9-15 = type ID
1848 /* the TLV group and type IDs are contained in the flags field, extract them */
1849 _group_id = (tvb_get_ntohs(_tvb,_offset) & TLV_GROUP_ID) >> 8;
1850 _type_id = (tvb_get_ntohs(_tvb,_offset) & TLV_TYPE_ID);
1852 /* add the flags to the tree */
1853 proto_tree_add_item(_tlv_flags_tree, hf_wlccp_tlv_container_flag, _tvb, _offset, 2, ENC_BIG_ENDIAN);
1854 proto_tree_add_item(_tlv_flags_tree, hf_wlccp_tlv_encrypted_flag, _tvb, _offset, 2, ENC_BIG_ENDIAN);
1855 proto_tree_add_item(_tlv_flags_tree, hf_wlccp_tlv_reserved_bit, _tvb, _offset, 2, ENC_BIG_ENDIAN);
1856 proto_tree_add_item(_tlv_flags_tree, hf_wlccp_tlv_group, _tvb, _offset, 2, ENC_BIG_ENDIAN);
1857 proto_tree_add_item(_tlv_flags_tree, hf_wlccp_tlv_request_flag, _tvb, _offset, 2, ENC_BIG_ENDIAN);
1859 /* a hack to show the right string representation of the type_id in the tree */
1860 switch (_group_id)
1862 case WLCCP_TLV_GROUP_WLCCP:
1864 proto_tree_add_item(_tlv_flags_tree, hf_wlccp_tlv_type0, _tvb, _offset, 2, ENC_BIG_ENDIAN);
1865 break;
1866 } /* case WLCCP_TLV_GROUP_WLCCP */
1868 case WLCCP_TLV_GROUP_SEC:
1870 proto_tree_add_item(_tlv_flags_tree, hf_wlccp_tlv_type1, _tvb, _offset, 2, ENC_BIG_ENDIAN);
1871 break;
1872 } /* case WLCCP_TLV_GROUP_SEC */
1874 case WLCCP_TLV_GROUP_RRM:
1876 proto_tree_add_item(_tlv_flags_tree, hf_wlccp_tlv_type2, _tvb, _offset, 2, ENC_BIG_ENDIAN);
1877 break;
1878 } /* case WLCCP_TLV_GROUP_RRM */
1880 case WLCCP_TLV_GROUP_QOS:
1882 proto_tree_add_item(_tlv_flags_tree, hf_wlccp_tlv_type3, _tvb, _offset, 2, ENC_BIG_ENDIAN);
1883 break;
1884 } /* case WLCCP_TLV_GROUP_QOS */
1886 case WLCCP_TLV_GROUP_NM:
1888 proto_tree_add_item(_tlv_flags_tree, hf_wlccp_tlv_type4, _tvb, _offset, 2, ENC_BIG_ENDIAN);
1889 break;
1890 } /* case WLCCP_TLV_GROUP_NM */
1892 case WLCCP_TLV_GROUP_MIP:
1894 proto_tree_add_item(_tlv_flags_tree, hf_wlccp_tlv_type5, _tvb, _offset, 2, ENC_BIG_ENDIAN);
1895 break;
1896 } /* case WLCCP_TLV_GROUP_MIP */
1898 default:
1900 proto_tree_add_item(_tlv_flags_tree, hf_wlccp_tlv_type, _tvb, _offset, 2, ENC_BIG_ENDIAN);
1901 break;
1902 } /* case default for switch _group_id */
1905 } /* switch _group_id */
1907 _container_flag = (tvb_get_ntohs(_tvb, _offset) & TLV_F_CONTAINER) >> 15;
1909 /* according to the patent, some behavior changes if the request flag is set */
1910 /* it would be nice if it said how, but I don't think it matters for decoding purposes */
1912 _offset += 2;
1914 /* finished with the flags field */
1916 /* add the length field to the tlv_tree */
1917 proto_tree_add_item(_tlv_tree, hf_wlccp_tlv_length, _tvb, _offset, 2, ENC_BIG_ENDIAN);
1919 _offset += 2;
1920 /* finished with the length field */
1922 /* now decode the fixed fields in each TLV */
1924 switch (_group_id)
1926 case WLCCP_TLV_GROUP_WLCCP:
1928 _offset = dissect_wlccp_ccm_tlv(_tlv_tree, _tvb, _offset, _type_id, _length - 4, _temp_ti);
1929 break;
1931 } /* case WLCCP_TLV_GROUP_WLCCP */
1933 case WLCCP_TLV_GROUP_SEC:
1935 _offset = dissect_wlccp_sec_tlv(_tlv_tree, _tvb, _offset, _type_id, _length - 4, _temp_ti);
1936 break;
1938 } /* case WLCCP_TLV_GROUP_SEC */
1940 case WLCCP_TLV_GROUP_RRM:
1942 _offset = dissect_wlccp_rrm_tlv(_tlv_tree, _tvb, _offset, _type_id, _length - 4, _temp_ti);
1943 break;
1945 } /* case WLCCP_TLV_GROUP_RRM */
1947 case WLCCP_TLV_GROUP_QOS:
1949 _offset = dissect_wlccp_qos_tlv(_tlv_tree, _tvb, _offset, _type_id, _length - 4, _temp_ti);
1950 break;
1952 } /* case WLCCP_TLV_GROUP_QOS */
1954 case WLCCP_TLV_GROUP_NM:
1956 _offset = dissect_wlccp_nm_tlv(_tlv_tree, _tvb, _offset, _type_id, _length - 4, _temp_ti);
1957 break;
1959 } /* case WLCCP_TLV_GROUP_NM */
1961 case WLCCP_TLV_GROUP_MIP:
1963 _offset = dissect_wlccp_mip_tlv(_tlv_tree, _tvb, _offset, _type_id, _length - 4, _temp_ti);
1964 break;
1966 } /* case WLCCP_TLV_GROUP_MIP */
1968 default:
1970 if (_offset < _tlv_end)
1971 _offset = _tlv_end;
1972 break;
1973 } /* case default for switch _group_id */
1975 } /* switch _group_id */
1977 /* done with decoding the fixed TLV fields */
1981 /* If this TLV is a container, then build a sub tree and decode the contained TLVs */
1983 if (_container_flag && (_offset >= _tlv_end) )
1985 /* something is wrong if there's not enough left in the buffer */
1987 } /* if container_flag and _offset >= _tlv_end */
1988 else /* _container_flag && _offset >= tlv_end */
1991 if (_container_flag && (_offset < _tlv_end) )
1994 while (_offset < _tlv_end)
1996 _old_offset = _offset;
1997 // We recurse here, but we'll run out of packet before we run out of stack.
1998 _offset = dissect_wlccp_tlvs(_tlv_tree, _tvb, _offset, _depth++);
1999 DISSECTOR_ASSERT(_offset > _old_offset);
2000 } /* while bytes_left >= 4*/
2002 } /* _container_flag && (tvb_length_remaining(_tvb,_offset) >= 4) */
2004 } /*_container_flag && (tvb_length_remaining(_tvb,_offset) < 4) */
2007 /* done with decoding the contained TLVs */
2009 return (_tlv_end > _offset) ? _tlv_end : _offset;
2011 } /* dissect_wlccp_tlvs */
2014 /* ************************************************************************************************************* */
2016 /* ALL THE TLV SUB-DISSECTORS NEED A DEFAULT CASE, OTHERWISE WE'LL GET INTO AN INFINITE RECURSION LOOP INSIDE */
2017 /* THE CALLING FUNCTION dissect_wlccp_tlvs. BESIDES, IT'S JUST GOOD FORM :-) */
2020 static unsigned dissect_wlccp_ccm_tlv(proto_tree *_tree, tvbuff_t *_tvb, unsigned _offset, int _type_id, unsigned _length, proto_item *_ti)
2023 switch (_type_id)
2026 case 0x00: /* NULL TLV */
2028 proto_item_append_text(_ti, " NULL TLV");
2029 proto_tree_add_item(_tree, hf_wlccp_null_tlv , _tvb, _offset, _length, ENC_NA);
2030 _offset += _length;
2032 break;
2034 } /* case tlv_type_id = 0x09 */
2037 case 0x09: /* ipv4Address */
2039 proto_item_append_text(_ti, " IPv4Address");
2040 proto_tree_add_item(_tree, hf_wlccp_ipv4_address, _tvb, _offset, 4, ENC_BIG_ENDIAN);
2041 _offset += 4;
2043 break;
2045 } /* case tlv_type_id = 0x09 */
2048 default:
2050 /* for unknown types, just add them to the tree as a blob */
2051 proto_item_append_text(_ti, " Unknown");
2053 proto_tree_add_item(_tree, hf_wlccp_tlv_unknown_value, _tvb, _offset, _length, ENC_NA);
2054 _offset += _length;
2056 break;
2057 } /* case default for tlv_group_id=0x00 */
2059 } /* switch _type_id */
2061 return _offset;
2063 } /* dissect_wlccp_ccm_tlv */
2067 static unsigned dissect_wlccp_sec_tlv(proto_tree *_tree, tvbuff_t *_tvb, unsigned _offset, int _type_id, unsigned _length, proto_item *_ti)
2070 switch (_type_id)
2073 case 0x01: /* initSession */
2076 proto_item_append_text(_ti, " initSession");
2078 /* skip some unused bytes */
2079 _offset += 1;
2081 proto_tree_add_item(_tree, hf_wlccp_path_length, _tvb, _offset, 1, ENC_BIG_ENDIAN);
2082 _offset += 1;
2084 /* skip some unused bytes */
2085 _offset += 2;
2088 break;
2089 } /* case 0x01 */
2091 case 0x02: /* inSecureContextReq */
2094 proto_item_append_text(_ti, " inSecureContextReq");
2096 proto_tree_add_item(_tree, hf_wlccp_key_seq_count, _tvb, _offset, 4, ENC_BIG_ENDIAN);
2097 _offset += 4;
2099 proto_tree_add_item(_tree, hf_wlccp_dest_node_type, _tvb, _offset, 2, ENC_BIG_ENDIAN);
2100 _offset += 2;
2102 proto_tree_add_item(_tree, hf_wlccp_dest_node_id, _tvb, _offset, 6, ENC_NA);
2103 _offset += 6;
2105 proto_tree_add_item(_tree, hf_wlccp_supp_node_type, _tvb, _offset, 2, ENC_BIG_ENDIAN);
2106 _offset += 2;
2108 proto_tree_add_item(_tree, hf_wlccp_supp_node_id, _tvb, _offset, 6, ENC_NA);
2109 _offset += 6;
2111 /* skip unused bytes */
2112 _offset += 1;
2114 proto_tree_add_item(_tree, hf_wlccp_key_mgmt_type, _tvb, _offset, 1, ENC_BIG_ENDIAN);
2115 _offset += 1;
2117 proto_tree_add_item(_tree, hf_wlccp_nonce, _tvb, _offset, 32, ENC_NA);
2118 _offset += 32;
2120 break;
2121 } /* case 0x02 */
2124 case 0x06: /* authenticator */
2127 proto_item_append_text(_ti, " authenticator");
2129 proto_tree_add_item(_tree, hf_wlccp_dest_node_type, _tvb, _offset, 2, ENC_BIG_ENDIAN);
2130 _offset += 2;
2132 proto_tree_add_item(_tree, hf_wlccp_dest_node_id, _tvb, _offset, 6, ENC_NA);
2133 _offset += 6;
2135 proto_tree_add_item(_tree, hf_wlccp_src_node_type, _tvb, _offset, 2, ENC_BIG_ENDIAN);
2136 _offset += 2;
2138 proto_tree_add_item(_tree, hf_wlccp_src_node_id, _tvb, _offset, 6, ENC_NA);
2139 _offset += 6;
2141 proto_tree_add_item(_tree, hf_wlccp_key_seq_count, _tvb, _offset, 4, ENC_BIG_ENDIAN);
2142 _offset += 4;
2144 /* skip unused bytes */
2145 _offset += 1;
2147 proto_tree_add_item(_tree, hf_wlccp_status, _tvb, _offset, 1, ENC_BIG_ENDIAN);
2148 _offset += 1;
2150 proto_tree_add_item(_tree, hf_wlccp_nonce, _tvb, _offset, 32, ENC_NA);
2151 _offset += 32;
2153 break;
2154 } /* case 0x06 */
2156 case 0x08: /* MIC */
2159 uint16_t _mic_length=0;
2161 proto_item_append_text(_ti, " mic");
2163 proto_tree_add_item(_tree, hf_wlccp_mic_msg_seq_count, _tvb, _offset, 8, ENC_BIG_ENDIAN);
2164 _offset += 8;
2166 proto_tree_add_item(_tree, hf_wlccp_mic_length, _tvb, _offset, 2, ENC_BIG_ENDIAN);
2167 _mic_length = tvb_get_ntohs(_tvb,_offset);
2168 _offset += 2;
2170 proto_tree_add_item(_tree, hf_wlccp_mic_value, _tvb, _offset, _mic_length, ENC_NA);
2171 _offset += _mic_length;
2173 break;
2176 case 0x0a: /* inSecureContextReply */
2179 proto_item_append_text(_ti, " inSecureContextReply");
2182 proto_tree_add_item(_tree, hf_wlccp_key_seq_count, _tvb, _offset, 4, ENC_BIG_ENDIAN);
2183 _offset += 4;
2185 proto_tree_add_item(_tree, hf_wlccp_dest_node_type, _tvb, _offset, 2, ENC_BIG_ENDIAN);
2186 _offset += 2;
2188 proto_tree_add_item(_tree, hf_wlccp_dest_node_id, _tvb, _offset, 6, ENC_NA);
2189 _offset += 6;
2191 proto_tree_add_item(_tree, hf_wlccp_supp_node_type, _tvb, _offset, 2, ENC_BIG_ENDIAN);
2192 _offset += 2;
2194 proto_tree_add_item(_tree, hf_wlccp_supp_node_id, _tvb, _offset, 6, ENC_NA);
2195 _offset += 6;
2197 proto_tree_add_item(_tree, hf_wlccp_nonce, _tvb, _offset, 32, ENC_NA);
2198 _offset += 32;
2200 proto_tree_add_item(_tree, hf_wlccp_session_timeout, _tvb, _offset, 4, ENC_BIG_ENDIAN);
2201 _offset += 4;
2203 break;
2204 } /* case 0x0a */
2208 default:
2210 /* for unknown types, just add them to the tree as a blob */
2211 proto_item_append_text(_ti, " Unknown");
2212 proto_tree_add_item(_tree, hf_wlccp_tlv_unknown_value, _tvb, _offset, _length, ENC_NA);
2213 _offset += _length;
2215 break;
2216 } /* default case for switch (_type_id) */
2218 } /* switch _type_id */
2220 return _offset;
2221 } /* dissect_wlccp_sec_tlv */
2225 static unsigned dissect_wlccp_rrm_tlv(proto_tree *_tree, tvbuff_t *_tvb, unsigned _offset, int _type_id, unsigned _length, proto_item *_ti)
2228 switch (_type_id)
2231 case 0x02: /* aggrRmReq */
2233 proto_item_append_text(_ti, " aggrRmReq");
2234 proto_tree_add_item(_tree, hf_wlccp_token2, _tvb, _offset, 2, ENC_BIG_ENDIAN);
2235 _offset += 2;
2237 proto_tree_add_item(_tree, hf_wlccp_interval, _tvb, _offset, 2, ENC_BIG_ENDIAN);
2238 _offset += 2;
2240 break;
2242 } /* case tlv_type_id = 0x02 */
2244 case 0x03 : /* rmReport */
2246 proto_item_append_text(_ti, " rmReport");
2248 proto_tree_add_item(_tree, hf_wlccp_sta_type, _tvb, _offset, 1, ENC_BIG_ENDIAN);
2249 _offset += 1;
2251 proto_tree_add_item(_tree, hf_wlccp_bssid, _tvb, _offset, 6, ENC_NA);
2252 _offset += 6;
2254 proto_tree_add_item(_tree, hf_wlccp_stamac, _tvb, _offset, 6, ENC_NA);
2255 _offset += 6;
2257 break;
2258 } /* case tlv_type_id = 0x03 */
2260 case 0x04: /* aggrRmReport */
2262 proto_item_append_text(_ti, " aggrRmReport");
2264 /* no fields */
2266 break;
2267 } /* case tlv_type_id = 0x04 */
2269 case 0x12: /* beaconRequest */
2271 proto_item_append_text(_ti, " beaconRequest");
2273 proto_tree_add_item(_tree, hf_wlccp_token, _tvb, _offset, 1, ENC_BIG_ENDIAN);
2274 _offset += 1;
2276 proto_tree_add_item(_tree, hf_wlccp_mode, _tvb, _offset, 1, ENC_BIG_ENDIAN);
2277 _offset += 1;
2279 proto_tree_add_item(_tree, hf_wlccp_channel, _tvb, _offset, 1, ENC_BIG_ENDIAN);
2280 _offset += 1;
2282 proto_tree_add_item(_tree, hf_wlccp_scan_mode, _tvb, _offset, 1, ENC_BIG_ENDIAN);
2283 _offset += 1;
2285 proto_tree_add_item(_tree, hf_wlccp_duration, _tvb, _offset, 2, ENC_BIG_ENDIAN);
2286 _offset += 2;
2289 break;
2290 } /* case 0x12 */
2292 case 0x14: /* frameRequest */
2295 unsigned _count=0, _counter=0;
2297 proto_item_append_text(_ti, " frameRequest");
2299 proto_tree_add_item(_tree, hf_wlccp_token, _tvb, _offset, 1, ENC_BIG_ENDIAN);
2300 _offset += 1;
2302 proto_tree_add_item(_tree, hf_wlccp_mode, _tvb, _offset, 1, ENC_BIG_ENDIAN);
2303 _offset += 1;
2305 proto_tree_add_item(_tree, hf_wlccp_channel, _tvb, _offset, 1, ENC_BIG_ENDIAN);
2306 _offset += 1;
2308 proto_tree_add_item(_tree, hf_wlccp_count, _tvb, _offset, 1, ENC_BIG_ENDIAN);
2309 _count = tvb_get_uint8(_tvb,_offset);
2310 _offset += 1;
2312 proto_tree_add_item(_tree, hf_wlccp_duration, _tvb, _offset, 2, ENC_BIG_ENDIAN);
2313 _offset += 2;
2315 for (_counter=0; _counter < _count; _counter++)
2318 proto_tree_add_item(_tree, hf_wlccp_bssid, _tvb, _offset, 6, ENC_NA);
2319 _offset += 6;
2321 } /* for _counter=0 */
2325 break;
2326 } /* case 0x14 */
2328 case 0x15: /* frameReport */
2331 proto_item *_fr_ti;
2332 proto_tree *_fr_elems_tree;
2334 unsigned _counter=0, _arraylen=0;
2336 proto_item_append_text(_ti, " frameReport");
2338 proto_tree_add_item(_tree, hf_wlccp_token, _tvb, _offset, 1, ENC_BIG_ENDIAN);
2339 _offset += 1;
2341 proto_tree_add_item(_tree, hf_wlccp_mode, _tvb, _offset, 1, ENC_BIG_ENDIAN);
2342 _offset += 1;
2344 proto_tree_add_item(_tree, hf_wlccp_channel, _tvb, _offset, 1, ENC_BIG_ENDIAN);
2345 _offset += 1;
2347 /* skip some unused bytes */
2348 _offset += 1;
2350 proto_tree_add_item(_tree, hf_wlccp_duration, _tvb, _offset, 2, ENC_BIG_ENDIAN);
2351 _offset += 2;
2353 _arraylen=(_length-10)/14;
2355 if (_arraylen > 0)
2358 _fr_ti = proto_tree_add_item(_tree, hf_framereport_elements, _tvb, _offset, (_length-10), ENC_NA);
2359 _fr_elems_tree = proto_item_add_subtree(_fr_ti, ett_framereport_elements_tree);
2361 for(_counter=0; _counter < _arraylen; _counter++)
2364 proto_tree_add_item(_fr_elems_tree, hf_wlccp_numframes, _tvb, _offset, 1, ENC_BIG_ENDIAN);
2365 _offset += 1;
2367 proto_tree_add_item(_fr_elems_tree, hf_wlccp_rss, _tvb, _offset, 1, ENC_BIG_ENDIAN);
2368 _offset += 1;
2370 proto_tree_add_item(_fr_elems_tree, hf_wlccp_bssid, _tvb, _offset, 6, ENC_NA);
2371 _offset += 6;
2373 proto_tree_add_item(_fr_elems_tree, hf_wlccp_stamac, _tvb, _offset, 6, ENC_NA);
2374 _offset += 6;
2376 } /* for _counter=0 */
2378 } /* if _arraylen > 0 */
2381 break;
2382 } /* case 0x15 */
2385 case 0x16: /* ccaRequest */
2387 proto_item_append_text(_ti, " ccaRequest");
2389 proto_tree_add_item(_tree, hf_wlccp_token, _tvb, _offset, 1, ENC_BIG_ENDIAN);
2390 _offset += 1;
2392 proto_tree_add_item(_tree, hf_wlccp_mode, _tvb, _offset, 1, ENC_BIG_ENDIAN);
2393 _offset += 1;
2395 proto_tree_add_item(_tree, hf_wlccp_channel, _tvb, _offset, 1, ENC_BIG_ENDIAN);
2396 _offset += 1;
2398 /* skip some unused bytes */
2399 _offset += 1;
2401 proto_tree_add_item(_tree, hf_wlccp_duration, _tvb, _offset, 2, ENC_BIG_ENDIAN);
2402 _offset += 2;
2404 break;
2405 } /* case 0x16 */
2408 case 0x17: /* ccaReport */
2410 proto_item_append_text(_ti, " ccaReport");
2412 proto_tree_add_item(_tree, hf_wlccp_token, _tvb, _offset, 1, ENC_BIG_ENDIAN);
2413 _offset += 1;
2415 proto_tree_add_item(_tree, hf_wlccp_mode, _tvb, _offset, 1, ENC_BIG_ENDIAN);
2416 _offset += 1;
2418 proto_tree_add_item(_tree, hf_wlccp_channel, _tvb, _offset, 1, ENC_BIG_ENDIAN);
2419 _offset += 1;
2421 /* skip some unused bytes */
2422 _offset += 1;
2424 proto_tree_add_item(_tree, hf_wlccp_duration, _tvb, _offset, 2, ENC_BIG_ENDIAN);
2425 _offset += 2;
2427 proto_tree_add_item(_tree, hf_wlccp_ccabusy, _tvb, _offset, 1, ENC_BIG_ENDIAN);
2428 _offset += 1;
2430 break;
2432 } /* case tlv_type_id = 0x17 */
2434 case 0x18: /* rpiHistRequest */
2436 proto_item_append_text(_ti, " rpiHistRequest");
2438 proto_tree_add_item(_tree, hf_wlccp_token, _tvb, _offset, 1, ENC_BIG_ENDIAN);
2439 _offset += 1;
2441 proto_tree_add_item(_tree, hf_wlccp_mode, _tvb, _offset, 1, ENC_BIG_ENDIAN);
2442 _offset += 1;
2444 proto_tree_add_item(_tree, hf_wlccp_channel, _tvb, _offset, 1, ENC_BIG_ENDIAN);
2445 _offset += 1;
2447 /* skip some unused bytes */
2448 _offset += 1;
2450 proto_tree_add_item(_tree, hf_wlccp_duration, _tvb, _offset, 2, ENC_BIG_ENDIAN);
2451 _offset += 2;
2453 break;
2454 } /* case 0x18 */
2456 case 0x19: /* rpiHistReport */
2459 unsigned _rpi_density_length=0;
2461 proto_item_append_text(_ti, " rpiHistReport");
2463 proto_tree_add_item(_tree, hf_wlccp_token, _tvb, _offset, 1, ENC_BIG_ENDIAN);
2464 _offset += 1;
2466 proto_tree_add_item(_tree, hf_wlccp_mode, _tvb, _offset, 1, ENC_BIG_ENDIAN);
2467 _offset += 1;
2469 proto_tree_add_item(_tree, hf_wlccp_channel, _tvb, _offset, 1, ENC_BIG_ENDIAN);
2470 _offset += 1;
2472 /* skip some unused bytes */
2473 _offset += 1;
2475 proto_tree_add_item(_tree, hf_wlccp_duration, _tvb, _offset, 2, ENC_BIG_ENDIAN);
2476 _offset += 2;
2478 _rpi_density_length = _length - 6 - 4;
2480 proto_tree_add_item(_tree, hf_wlccp_rpidensity, _tvb, _offset, _rpi_density_length, ENC_NA);
2481 _offset += _rpi_density_length;
2483 break;
2485 } /* case tlv_type_id = 0x19 */
2487 case 0x1c: /* nullRequest */
2489 proto_item_append_text(_ti, " nullRequest");
2491 proto_tree_add_item(_tree, hf_wlccp_token, _tvb, _offset, 1, ENC_BIG_ENDIAN);
2492 _offset += 1;
2494 proto_tree_add_item(_tree, hf_wlccp_mode, _tvb, _offset, 1, ENC_BIG_ENDIAN);
2495 _offset += 1;
2497 proto_tree_add_item(_tree, hf_wlccp_channel, _tvb, _offset, 1, ENC_BIG_ENDIAN);
2498 _offset += 1;
2500 /* skip some unused bytes */
2501 _offset += 1;
2503 proto_tree_add_item(_tree, hf_wlccp_duration, _tvb, _offset, 2, ENC_BIG_ENDIAN);
2504 _offset += 2;
2506 break;
2507 } /* case 0x1c */
2510 case 0x1e: /* commonBeaconReport */
2513 proto_tree *_80211_capabilities_tree;
2514 proto_item *_new_ti;
2516 unsigned _tlv80211length=0;
2518 proto_item_append_text(_ti, " commonBeaconReport");
2520 proto_tree_add_item(_tree, hf_wlccp_srcidx, _tvb, _offset, 1, ENC_BIG_ENDIAN);
2521 _offset += 1;
2523 proto_tree_add_item(_tree, hf_wlccp_channel, _tvb, _offset, 1, ENC_BIG_ENDIAN);
2524 _offset += 1;
2526 proto_tree_add_item(_tree, hf_wlccp_phy_type, _tvb, _offset, 1, ENC_BIG_ENDIAN);
2527 _offset += 1;
2529 proto_tree_add_item(_tree, hf_wlccp_bssid, _tvb, _offset, 6, ENC_NA);
2530 _offset += 6;
2532 proto_tree_add_item(_tree, hf_wlccp_beacon_interval, _tvb, _offset, 2, ENC_BIG_ENDIAN);
2533 _offset += 2;
2537 if we assume the next field is the capabilities field from the 802.11 beacon,
2538 then we have a 16-bit field thhf_wlccp_statusat contains the following (802.11-2007):
2539 bit 0 = ESS
2540 bit 1 = IBSS
2541 bit 2 = CF pollable
2542 bit 3 = CF Poll Request
2543 bit 4 = privacy
2544 bit 5 = Short Preamble
2545 bit 6 = PBCC
2546 bit 7 = Channel Agility
2547 bit 8 = Spectrum Management
2548 bit 9 = QoS
2549 bit 10 = Short Slot Time
2550 bit 11 = APSD
2551 bit 12 = Reserved
2552 bit 13 = DSSS-OFDM
2553 bit 14 = Delayed Block Ack
2554 bit 15 = Immediate Block Ack
2557 _new_ti = proto_tree_add_item(_tree, hf_wlccp_80211_capabilities,
2558 _tvb, _offset, 2, ENC_BIG_ENDIAN);
2559 _80211_capabilities_tree = proto_item_add_subtree(_new_ti, ett_80211_capability_flags_tree);
2561 proto_tree_add_item(_80211_capabilities_tree, hf_80211_imm_block_ack,
2562 _tvb, _offset, 2, ENC_BIG_ENDIAN);
2563 proto_tree_add_item(_80211_capabilities_tree, hf_80211_dlyd_block_ack,
2564 _tvb, _offset, 2, ENC_BIG_ENDIAN);
2565 proto_tree_add_item(_80211_capabilities_tree, hf_80211_dsss_ofdm,
2566 _tvb, _offset, 2, ENC_BIG_ENDIAN);
2567 proto_tree_add_item(_80211_capabilities_tree, hf_80211_reserved,
2568 _tvb, _offset, 2, ENC_BIG_ENDIAN);
2569 proto_tree_add_item(_80211_capabilities_tree, hf_80211_apsd,
2570 _tvb, _offset, 2, ENC_BIG_ENDIAN);
2571 proto_tree_add_item(_80211_capabilities_tree, hf_80211_short_time_slot,
2572 _tvb, _offset, 2, ENC_BIG_ENDIAN);
2573 proto_tree_add_item(_80211_capabilities_tree, hf_80211_qos,
2574 _tvb, _offset, 2, ENC_BIG_ENDIAN);
2575 proto_tree_add_item(_80211_capabilities_tree, hf_80211_spectrum_mgmt,
2576 _tvb, _offset, 2, ENC_BIG_ENDIAN);
2577 proto_tree_add_item(_80211_capabilities_tree, hf_80211_chan_agility,
2578 _tvb, _offset, 2, ENC_BIG_ENDIAN);
2579 proto_tree_add_item(_80211_capabilities_tree, hf_80211_pbcc,
2580 _tvb, _offset, 2, ENC_BIG_ENDIAN);
2581 proto_tree_add_item(_80211_capabilities_tree, hf_80211_short_preamble,
2582 _tvb, _offset, 2, ENC_BIG_ENDIAN);
2583 proto_tree_add_item(_80211_capabilities_tree, hf_80211_cap_privacy,
2584 _tvb, _offset, 2, ENC_BIG_ENDIAN);
2585 proto_tree_add_item(_80211_capabilities_tree, hf_80211_cap_cf_poll_req,
2586 _tvb, _offset, 2, ENC_BIG_ENDIAN);
2587 proto_tree_add_item(_80211_capabilities_tree, hf_80211_cap_cf_pollable,
2588 _tvb, _offset, 2, ENC_BIG_ENDIAN);
2589 proto_tree_add_item(_80211_capabilities_tree, hf_80211_cap_ibss,
2590 _tvb, _offset, 2, ENC_BIG_ENDIAN);
2591 proto_tree_add_item(_80211_capabilities_tree, hf_80211_cap_ess,
2592 _tvb, _offset, 2, ENC_BIG_ENDIAN);
2594 /* proto_tree_add_item(_tree, hf_wlccp_capabilities, _tvb, _offset, 2, ENC_BIG_ENDIAN); */
2595 _offset += 2;
2598 _tlv80211length = _length - 13 - 4;
2600 /* This TLV could be decoded per the 802.11 information element spec's */
2601 proto_tree_add_item(_tree, hf_wlccp_tlv80211, _tvb, _offset, _tlv80211length, ENC_NA);
2602 _offset += _tlv80211length;
2604 break;
2606 } /* case tlv_type_id = 0x1e */
2609 case 0x1f: /* aggrBeaconReport */
2611 proto_item_append_text(_ti, " aggrBeaconReport");
2613 proto_tree_add_item(_tree, hf_wlccp_token, _tvb, _offset, 1, ENC_BIG_ENDIAN);
2614 _offset += 1;
2616 proto_tree_add_item(_tree, hf_wlccp_mode, _tvb, _offset, 1, ENC_BIG_ENDIAN);
2617 _offset += 1;
2619 proto_tree_add_item(_tree, hf_wlccp_rss, _tvb, _offset, 1, ENC_BIG_ENDIAN);
2620 _offset += 1;
2622 proto_tree_add_item(_tree, hf_wlccp_srcidx, _tvb, _offset, 1, ENC_BIG_ENDIAN);
2623 _offset += 1;
2625 proto_tree_add_item(_tree, hf_wlccp_parent_tsf, _tvb, _offset, 4, ENC_BIG_ENDIAN);
2626 _offset += 4;
2628 proto_tree_add_item(_tree, hf_wlccp_target_tsf, _tvb, _offset, 8, ENC_BIG_ENDIAN);
2629 _offset += 8;
2631 break;
2632 } /* case tlv_type_id = 0x1f */
2635 case 0x20: /* rmReqRoutingList */
2638 unsigned _counter=0, _arraylen=0;
2640 proto_item_append_text(_ti, " rmReqRoutingList");
2642 _arraylen=(_length)/16;
2644 if (_arraylen > 0)
2647 for(_counter=0; _counter < _arraylen; _counter++)
2650 proto_tree_add_item(_tree, hf_wlccp_ipv4_address, _tvb, _offset, 4, ENC_BIG_ENDIAN);
2651 _offset += 4;
2653 proto_tree_add_item(_tree, hf_wlccp_bssid, _tvb, _offset, 6, ENC_NA);
2654 _offset += 6;
2656 proto_tree_add_item(_tree, hf_wlccp_stamac, _tvb, _offset, 6, ENC_NA);
2657 _offset += 6;
2659 } /* for _counter=0 */
2661 } /* if _arraylen > 0 */
2662 break;
2663 } /* case 0x20 */
2665 case 0x21: /* rmReqRoutingResp */
2668 unsigned _counter=0, _arraylen=0;
2670 proto_item_append_text(_ti, " rmReqRoutingResp");
2672 proto_tree_add_item(_tree, hf_wlccp_token2, _tvb, _offset, 2, ENC_BIG_ENDIAN);
2673 _offset += 2;
2675 _arraylen=(_length)/11;
2677 if (_arraylen > 0)
2680 for(_counter=0; _counter < _arraylen; _counter++)
2683 proto_tree_add_item(_tree, hf_wlccp_ipv4_address, _tvb, _offset, 4, ENC_BIG_ENDIAN);
2684 _offset += 4;
2686 proto_tree_add_item(_tree, hf_wlccp_bssid, _tvb, _offset, 6, ENC_NA);
2687 _offset += 6;
2689 proto_tree_add_item(_tree, hf_wlccp_status, _tvb, _offset, 1, ENC_BIG_ENDIAN);
2690 _offset += 1;
2692 } /* for _counter=0 */
2694 } /* if _arraylen > 0 */
2696 break;
2697 } /* case 0x21 */
2699 case 0x22: /* rmReqAck */
2701 proto_item_append_text(_ti, " rmReqAck");
2703 proto_tree_add_item(_tree, hf_wlccp_status, _tvb, _offset, 1, ENC_BIG_ENDIAN);
2704 _offset += 1;
2706 break;
2707 } /* case 0x22 */
2710 case 0x58: /* mfpCapability */
2712 proto_item_append_text(_ti, " mfpCapability");
2714 proto_tree_add_item(_tree, hf_wlccp_mfpcapability, _tvb, _offset, 2, ENC_BIG_ENDIAN);
2715 _offset += 2;
2717 break;
2718 } /* case 0x58 */
2720 case 0x5b: /* mfpRouting */
2722 proto_item_append_text(_ti, " mfpRouting");
2724 proto_tree_add_item(_tree, hf_wlccp_ipv4_address, _tvb, _offset, 4, ENC_BIG_ENDIAN);
2725 _offset += 4;
2727 proto_tree_add_item(_tree, hf_wlccp_bssid, _tvb, _offset, 6, ENC_NA);
2728 _offset += 6;
2730 proto_tree_add_item(_tree, hf_wlccp_mfpflags, _tvb, _offset, 2, ENC_BIG_ENDIAN);
2731 _offset += 2;
2733 break;
2734 } /* case 0x5b */
2736 case 0x5c: /* mfpConfig */
2738 proto_item_append_text(_ti, " mfpConfig");
2740 proto_tree_add_item(_tree, hf_wlccp_mfpconfig, _tvb, _offset, 2, ENC_BIG_ENDIAN);
2741 _offset += 2;
2743 break;
2744 } /* case 0x5c */
2747 default:
2749 /* for unknown types, just add them to the tree as a blob */
2750 proto_item_append_text(_ti, " Unknown");
2752 proto_tree_add_item(_tree, hf_wlccp_tlv_unknown_value, _tvb, _offset, _length, ENC_NA);
2753 _offset += _length;
2755 break;
2756 } /* case default */
2758 } /* switch type_id */
2760 return _offset;
2762 } /* dissect_wlccp_rrm_tlv */
2764 static unsigned dissect_wlccp_qos_tlv(proto_tree *_tree, tvbuff_t *_tvb, unsigned _offset, int _type_id, unsigned _length, proto_item *_ti)
2767 switch (_type_id)
2770 default:
2772 /* for unknown types, just add them to the tree as a blob */
2773 proto_item_append_text(_ti, " Unknown");
2775 proto_tree_add_item(_tree, hf_wlccp_tlv_unknown_value, _tvb, _offset, _length, ENC_NA);
2776 _offset += _length;
2778 break;
2779 } /* default case for switch (_type_id) */
2781 } /* switch _type_id */
2784 return _offset;
2786 } /* dissect_wlccp_qos_tlv */
2788 static unsigned dissect_wlccp_nm_tlv(proto_tree *_tree, tvbuff_t *_tvb, unsigned _offset, int _type_id, unsigned _length, proto_item *_ti)
2791 switch (_type_id)
2794 case 0x20: /* nmClientEventIntoWDS */
2797 unsigned _radius_user_name_length = 0;
2799 proto_item_append_text(_ti, " nmClientEventIntoWDS");
2801 proto_tree_add_item(_tree, hf_wlccp_clientmac, _tvb, _offset, 6, ENC_NA);
2802 _offset += 6;
2804 proto_tree_add_item(_tree, hf_time_elapsed, _tvb, _offset, 2, ENC_BIG_ENDIAN);
2805 _offset += 2;
2807 proto_tree_add_item(_tree, hf_wlccp_parent_ap_mac, _tvb, _offset, 6, ENC_NA);
2808 _offset += 6;
2810 proto_tree_add_item(_tree, hf_reg_lifetime, _tvb, _offset, 1, ENC_BIG_ENDIAN);
2811 _offset += 1;
2813 /* skip some unused bytes */
2814 _offset += 1;
2816 proto_tree_add_item(_tree, hf_wlccp_ipv4_address, _tvb, _offset, 4, ENC_BIG_ENDIAN);
2817 _offset += 4;
2819 proto_tree_add_item(_tree, hf_wlccp_auth_type, _tvb, _offset, 1, ENC_BIG_ENDIAN);
2820 _offset += 1;
2822 proto_tree_add_item(_tree, hf_wlccp_key_mgmt_type, _tvb, _offset, 1, ENC_BIG_ENDIAN);
2823 _offset += 1;
2825 /* skip some unused bytes */
2826 _offset += 1;
2828 _radius_user_name_length = _length - 23 - 4;
2830 proto_tree_add_item(_tree, hf_wlccp_radius_user_name, _tvb, _offset, _radius_user_name_length, ENC_ASCII);
2831 _offset += _radius_user_name_length;
2834 break;
2835 } /* case 0x20 */
2837 case 0x21: /* nmClientEventOutOfWDS */
2839 proto_item_append_text(_ti, " nmClientEventOutOfWDS");
2841 proto_tree_add_item(_tree, hf_wlccp_clientmac, _tvb, _offset, 6, ENC_NA);
2842 _offset += 6;
2844 proto_tree_add_item(_tree, hf_time_elapsed, _tvb, _offset, 2, ENC_BIG_ENDIAN);
2845 _offset += 2;
2847 proto_tree_add_item(_tree, hf_wlccp_parent_ap_mac, _tvb, _offset, 6, ENC_NA);
2848 _offset += 6;
2850 proto_tree_add_item(_tree, hf_wds_reason, _tvb, _offset, 1, ENC_BIG_ENDIAN);
2851 _offset += 1;
2853 /* skip some unused bytes */
2854 _offset += 1;
2856 break;
2857 } /* case 0x21 */
2859 case 0x22: /* nmClientEventIntraWDS */
2861 proto_item_append_text(_ti, " nmClientEventIntraWDS");
2863 proto_tree_add_item(_tree, hf_wlccp_clientmac, _tvb, _offset, 6, ENC_NA);
2864 _offset += 6;
2866 proto_tree_add_item(_tree, hf_time_elapsed, _tvb, _offset, 2, ENC_BIG_ENDIAN);
2867 _offset += 2;
2869 proto_tree_add_item(_tree, hf_wlccp_parent_ap_mac, _tvb, _offset, 6, ENC_NA);
2870 _offset += 6;
2872 proto_tree_add_item(_tree, hf_reg_lifetime, _tvb, _offset, 1, ENC_BIG_ENDIAN);
2873 _offset += 1;
2875 proto_tree_add_item(_tree, hf_wlccp_auth_type, _tvb, _offset, 1, ENC_BIG_ENDIAN);
2876 _offset += 1;
2878 proto_tree_add_item(_tree, hf_wlccp_key_mgmt_type, _tvb, _offset, 1, ENC_BIG_ENDIAN);
2879 _offset += 1;
2881 /* skip some unused bytes */
2882 _offset += 3;
2885 break;
2886 } /* case 0x22 */
2888 case 0x24: /* nmClientEventIPAddressUpdate */
2890 proto_item_append_text(_ti, " nmClientEventIPAddressUpdate");
2892 proto_tree_add_item(_tree, hf_wlccp_clientmac, _tvb, _offset, 6, ENC_NA);
2893 _offset += 6;
2895 proto_tree_add_item(_tree, hf_time_elapsed, _tvb, _offset, 2, ENC_BIG_ENDIAN);
2896 _offset += 2;
2898 proto_tree_add_item(_tree, hf_wlccp_parent_ap_mac, _tvb, _offset, 6, ENC_NA);
2899 _offset += 6;
2901 /* skip some unused bytes */
2902 _offset += 2;
2904 proto_tree_add_item(_tree, hf_wlccp_ipv4_address, _tvb, _offset, 4, ENC_BIG_ENDIAN);
2905 _offset += 4;
2908 break;
2909 } /* case 0x24 */
2911 case 0x26: /* nmClientEventRefresh */
2914 unsigned _radius_user_name_length = 0;
2916 proto_item_append_text(_ti, " nmClientEventRefresh");
2918 proto_tree_add_item(_tree, hf_wlccp_clientmac, _tvb, _offset, 6, ENC_NA);
2919 _offset += 6;
2921 proto_tree_add_item(_tree, hf_time_elapsed, _tvb, _offset, 2, ENC_BIG_ENDIAN);
2922 _offset += 2;
2924 proto_tree_add_item(_tree, hf_wlccp_parent_ap_mac, _tvb, _offset, 6, ENC_NA);
2925 _offset += 6;
2927 proto_tree_add_item(_tree, hf_reg_lifetime, _tvb, _offset, 1, ENC_BIG_ENDIAN);
2928 _offset += 1;
2930 /* skip some unused bytes */
2931 _offset += 1;
2933 proto_tree_add_item(_tree, hf_wlccp_ipv4_address, _tvb, _offset, 4, ENC_BIG_ENDIAN);
2934 _offset += 4;
2936 proto_tree_add_item(_tree, hf_wlccp_auth_type, _tvb, _offset, 1, ENC_BIG_ENDIAN);
2937 _offset += 1;
2939 proto_tree_add_item(_tree, hf_wlccp_key_mgmt_type, _tvb, _offset, 1, ENC_BIG_ENDIAN);
2940 _offset += 1;
2942 /* skip some unused bytes */
2943 _offset += 1;
2945 _radius_user_name_length = _length - 23 - 4;
2947 proto_tree_add_item(_tree, hf_wlccp_radius_user_name, _tvb, _offset, _radius_user_name_length, ENC_ASCII);
2948 _offset += _radius_user_name_length;
2950 break;
2951 } /* case 0x26 */
2953 case 0x27: /* nmClientEventRefreshDone */
2955 proto_item_append_text(_ti, " nmClientEventRefreshDone");
2957 /* skip some unused bytes */
2958 _offset += 6;
2960 proto_tree_add_item(_tree, hf_time_elapsed, _tvb, _offset, 2, ENC_BIG_ENDIAN);
2961 _offset += 2;
2963 proto_tree_add_item(_tree, hf_wlccp_refresh_req_id, _tvb, _offset, 4, ENC_BIG_ENDIAN);
2964 _offset += 4;
2967 break;
2968 } /* case 0x27 */
2971 default:
2973 /* for unknown types, just add them to the tree as a blob */
2974 proto_item_append_text(_ti, " Unknown");
2976 proto_tree_add_item(_tree, hf_wlccp_tlv_unknown_value, _tvb, _offset, _length, ENC_NA);
2977 _offset += _length;
2979 break;
2980 } /* default case for switch (_type_id) */
2982 } /* switch _type_id */
2985 return _offset;
2987 } /* dissect_wlccp_nm_tlv */
2989 static unsigned dissect_wlccp_mip_tlv(proto_tree *_tree, tvbuff_t *_tvb, unsigned _offset, int _type_id, unsigned _length, proto_item *_ti)
2992 switch (_type_id)
2996 default:
2998 /* for unknown types, just add them to the tree as a blob */
2999 proto_item_append_text(_ti, " Unknown");
3001 proto_tree_add_item(_tree, hf_wlccp_tlv_unknown_value, _tvb, _offset, _length, ENC_NA);
3002 _offset += _length;
3004 break;
3005 } /* default case for switch (_type_id) */
3007 } /* switch _type_id */
3010 return _offset;
3012 } /* dissect_wlccp_mip_tlv */
3015 /* Register the protocol with Wireshark */
3016 void
3017 proto_register_wlccp(void)
3019 /* Setup list of header fields See Section 1.6.1 for details*/
3020 static hf_register_info hf[] = {
3021 { &hf_wlccp_version,
3022 { "Version", "wlccp.version",
3023 FT_UINT8, BASE_HEX, NULL,
3024 0x0, "Protocol ID/Version", HFILL }
3027 { &hf_wlccp_srcmac,
3028 { "Src MAC", "wlccp.srcmac",
3029 FT_ETHER, BASE_NONE, NULL,
3030 0x0, "Source MAC address", HFILL }
3033 { &hf_wlccp_dstmac,
3034 { "Dst MAC", "wlccp.dstmac",
3035 FT_ETHER, BASE_NONE, NULL,
3036 0x0, "Destination MAC address", HFILL }
3039 { &hf_wlccp_hostname,
3040 { "Hostname", "wlccp.hostname",
3041 FT_STRING, BASE_NONE, NULL,
3042 0x0, "Hostname of device", HFILL }
3045 { &hf_wlccp_sap,
3046 { "SAP", "wlccp.sap",
3047 FT_UINT8, BASE_HEX, NULL,
3048 0x0, "Service Access Point", HFILL }
3051 { &hf_wlccp_sap_version,
3052 { "SAP Version", "wlccp.sap_version",
3053 FT_UINT8, BASE_DEC, NULL,
3054 SAP_VERSION_MASK, "Service Access Point Version", HFILL }
3057 { &hf_wlccp_sap_id,
3058 { "SAP ID", "wlccp.sap_id",
3059 FT_UINT8, BASE_DEC, VALS(wlccp_sap_vs),
3060 SAP_VALUE_MASK, "Service Access Point ID", HFILL }
3063 { &hf_wlccp_destination_node_type,
3064 { "Destination node type", "wlccp.destination_node_type",
3065 FT_UINT16, BASE_DEC, VALS(wlccp_node_type_vs),
3066 0x0, "Node type of the hop destination", HFILL }
3069 { &hf_wlccp_length,
3070 { "Length", "wlccp.length",
3071 FT_UINT16, BASE_DEC, NULL,
3072 0x0, "Length of WLCCP payload (bytes)", HFILL }
3076 { &hf_wlccp_type,
3077 { "Message Type", "wlccp.type",
3078 FT_UINT16, BASE_HEX, NULL,
3079 0x0, NULL, HFILL }
3082 { &hf_wlccp_subtype,
3083 { "Subtype", "wlccp.subtype",
3084 FT_UINT8, BASE_DEC, VALS(wlccp_subtype_vs),
3085 MT_SUBTYPE, "Message Subtype", HFILL }
3088 { &hf_wlccp_base_message_type_0,
3089 { "Base message type", "wlccp.base_message_type",
3090 FT_UINT8, BASE_HEX_DEC, VALS(wlccp_msg_type_vs_0),
3091 MT_BASE_MSG_TYPE, NULL, HFILL }
3094 { &hf_wlccp_base_message_type_1,
3095 { "Base message type", "wlccp.base_message_type",
3096 FT_UINT8, BASE_HEX_DEC, VALS(wlccp_msg_type_vs_1),
3097 MT_BASE_MSG_TYPE, NULL, HFILL }
3100 { &hf_wlccp_base_message_type_2,
3101 { "Base message type", "wlccp.base_message_type",
3102 FT_UINT8, BASE_HEX_DEC, VALS(wlccp_msg_type_vs_2),
3103 MT_BASE_MSG_TYPE, NULL, HFILL }
3106 { &hf_wlccp_base_message_type_3,
3107 { "Base message type", "wlccp.base_message_type",
3108 FT_UINT8, BASE_HEX_DEC, VALS(wlccp_msg_type_vs_3),
3109 MT_BASE_MSG_TYPE, NULL, HFILL }
3112 { &hf_wlccp_base_message_type_4,
3113 { "Base message type", "wlccp.base_message_type",
3114 FT_UINT8, BASE_HEX_DEC, VALS(wlccp_msg_type_vs_4),
3115 MT_BASE_MSG_TYPE, NULL, HFILL }
3118 { &hf_wlccp_base_message_type_5,
3119 { "Base message type", "wlccp.base_message_type",
3120 FT_UINT8, BASE_HEX_DEC, VALS(wlccp_msg_type_vs_5),
3121 MT_BASE_MSG_TYPE, NULL, HFILL }
3124 { &hf_wlccp_base_message_type_unknown,
3125 { "Base message type", "wlccp.base_message_type",
3126 FT_UINT8, BASE_HEX_DEC, NULL,
3127 MT_BASE_MSG_TYPE, NULL, HFILL }
3130 { &hf_wlccp_hops,
3131 { "Hops", "wlccp.hops",
3132 FT_UINT8, BASE_DEC, NULL,
3133 0x0, "Number of WLCCP hops", HFILL }
3136 { &hf_wlccp_nm_version,
3137 { "NM Version", "wlccp.nm_version",
3138 FT_UINT8, BASE_DEC, NULL,
3139 0x0, NULL, HFILL }
3142 { &hf_wlccp_msg_id,
3143 { "Message ID", "wlccp.msg_id",
3144 FT_UINT16, BASE_DEC, NULL,
3145 0x0, "Sequence number used to match request/reply pairs",
3146 HFILL }
3150 { &hf_wlccp_flags,
3151 { "Flags", "wlccp.flags",
3152 FT_UINT16, BASE_HEX, NULL,
3153 0x0, NULL, HFILL }
3156 { &hf_wlccp_rm_flags,
3157 { "RM Flags", "wlccp.rm_flags",
3158 FT_UINT8, BASE_HEX, NULL,
3159 0x0, NULL, HFILL }
3162 { &hf_wlccp_retry_flag,
3163 { "Retry flag", "wlccp.retry_flag",
3164 FT_UINT16, BASE_DEC, NULL,
3165 F_RETRY, "Set on for retransmissions", HFILL }
3168 { &hf_wlccp_response_request_flag,
3169 { "Response request flag", "wlccp.response_request_flag",
3170 FT_UINT16, BASE_DEC, NULL,
3171 F_RESPONSE_REQUEST, "Set on to request a reply", HFILL }
3174 { &hf_wlccp_rm_request_reply_flag,
3175 { "Request Reply flag", "wlccp.request_reply_flag",
3176 FT_UINT8, BASE_DEC, NULL,
3177 RM_F_REQUEST_REPLY, "Set on to request a reply", HFILL }
3180 { &hf_wlccp_ack_required_flag,
3181 { "Ack Required flag", "wlccp.ack_required_flag",
3182 FT_UINT16, BASE_DEC, NULL,
3183 F_ACK_REQD, "Set on to require an acknowledgement", HFILL }
3186 { &hf_wlccp_tlv_flag,
3187 { "TLV flag", "wlccp.tlv_flag",
3188 FT_UINT16, BASE_DEC, NULL,
3189 F_TLV, "Set to indicate that optional TLVs follow the fixed fields", HFILL }
3192 { &hf_wlccp_inbound_flag,
3193 { "Inbound flag", "wlccp.inbound_flag",
3194 FT_UINT16, BASE_DEC, NULL,
3195 F_INBOUND, "Message is inbound to the top of the topology tree", HFILL }
3198 { &hf_wlccp_outbound_flag,
3199 { "Outbound flag", "wlccp.outbound_flag",
3200 FT_UINT16, BASE_DEC, NULL,
3201 F_OUTBOUND, "Message is outbound from the top of the topology tree", HFILL }
3204 { &hf_wlccp_hopwise_routing_flag,
3205 { "Hopwise-routing flag", "wlccp.hopwise_routing_flag",
3206 FT_UINT16, BASE_DEC, NULL,
3207 F_HOPWISE_ROUTING, "On to force intermediate access points to process the message also", HFILL }
3210 { &hf_wlccp_root_cm_flag,
3211 { "Root context manager flag", "wlccp.root_cm_flag",
3212 FT_UINT16, BASE_DEC, NULL,
3213 F_ROOT_CM, "Set to on to send message to the root context manager of the topology tree", HFILL }
3216 { &hf_wlccp_relay_flag,
3217 { "Relay flag", "wlccp.relay_flag",
3218 FT_UINT16, BASE_DEC, NULL,
3219 F_RELAY, "Signifies that this header is immediately followed by a relay node field", HFILL }
3222 { &hf_wlccp_mic_flag,
3223 { "MIC flag", "wlccp.mic_flag",
3224 FT_UINT16, BASE_DEC, NULL,
3225 F_MIC, "On in a message that must be authenticated and has an authentication TLV", HFILL }
3228 { &hf_wlccp_rm_mic_flag,
3229 { "MIC flag", "wlccp.mic_flag",
3230 FT_UINT8, BASE_DEC, NULL,
3231 RM_F_MIC, "On in a message that must be authenticated and has an authentication TLV", HFILL }
3234 { &hf_wlccp_originator_node_type,
3235 { "Originator node type", "wlccp.originator_node_type",
3236 FT_UINT16, BASE_DEC, VALS(wlccp_node_type_vs),
3237 0x0, "Originating device's node type", HFILL }
3240 { &hf_wlccp_originator,
3241 { "Originator", "wlccp.originator",
3242 FT_ETHER, BASE_NONE, NULL,
3243 0x0, "Originating device's MAC address", HFILL }
3246 { &hf_wlccp_responder_node_type,
3247 { "Responder node type", "wlccp.responder_node_type",
3248 FT_UINT16, BASE_DEC, VALS(wlccp_node_type_vs),
3249 0x0, "Responding device's node type", HFILL }
3252 { &hf_wlccp_responder,
3253 { "Responder", "wlccp.responder",
3254 FT_ETHER, BASE_NONE, NULL,
3255 0x0, "Responding device's MAC address", HFILL }
3258 { &hf_wlccp_requ_node_type,
3259 { "Requestor node type", "wlccp.requ_node_type",
3260 FT_UINT16, BASE_DEC, VALS(wlccp_node_type_vs),
3261 0x0, "Requesting device's node type", HFILL }
3264 { &hf_wlccp_requ_node_id,
3265 { "Requestor", "wlccp.requestor",
3266 FT_ETHER, BASE_NONE, NULL,
3267 0x0, "Requestor device's MAC address", HFILL }
3270 { &hf_wlccp_status,
3271 { "Status", "wlccp.status",
3272 FT_UINT8, BASE_DEC, VALS(wlccp_status_vs),
3273 0x0, NULL, HFILL }
3276 { &hf_wlccp_path_init_rsvd,
3277 { "Reserved", "wlccp.path_init_reserved",
3278 FT_UINT8, BASE_DEC, NULL,
3279 0x0, NULL, HFILL }
3282 { &hf_wlccp_relay_node_type,
3283 { "Relay node type", "wlccp.relay_node_type",
3284 FT_UINT16, BASE_DEC, VALS(wlccp_node_type_vs),
3285 0x0, "Type of node which relayed this message", HFILL }
3288 { &hf_wlccp_relay_node_id,
3289 { "Relay node ID", "wlccp.relay_node_id",
3290 FT_ETHER, BASE_NONE, NULL,
3291 0x0, "Node which relayed this message", HFILL }
3294 #if 0
3295 { &hf_wlccp_priority,
3296 { "WDS priority", "wlccp.priority",
3297 FT_UINT8, BASE_DEC, NULL, 0,
3298 "WDS priority of this access point", HFILL }
3300 #endif
3301 #if 0
3302 { &hf_wlccp_age,
3303 { "Age", "wlccp.age",
3304 FT_UINT32, BASE_DEC, NULL, 0,
3305 "Time since AP became a WDS master", HFILL }
3307 #endif
3308 #if 0
3309 { &hf_wlccp_period,
3310 { "Period", "wlccp.period",
3311 FT_UINT8, BASE_DEC, NULL, 0,
3312 "Interval between announcements (seconds)", HFILL }
3314 #endif
3315 { &hf_wlccp_ipv4_address,
3316 { "IPv4 Address", "wlccp.ipv4_address",
3317 FT_IPv4, BASE_NONE, NULL, 0,
3318 NULL, HFILL }
3321 { &hf_wlccp_scm_hop_address,
3322 { "Hop Address", "wlccp.scm_hop_address",
3323 FT_ETHER, BASE_NONE, NULL,
3324 0x0, "Source 802 Port Address", HFILL }
3327 { &hf_wlccp_scm_flags,
3328 { "SCM flags", "wlccp.scm_flags",
3329 FT_UINT16, BASE_HEX, NULL,
3330 0x0, NULL, HFILL }
3333 { &hf_wlccp_scm_active_flag,
3334 { "Active flag", "wlccp.scm_active_flag",
3335 FT_UINT16, BASE_DEC, NULL,
3336 F_SCM_ACTIVE, "Set to on in advertisements from the active SCM", HFILL }
3339 { &hf_wlccp_scm_unscheduled_flag,
3340 { "Unscheduled flag", "wlccp.scm_unscheduled_flag",
3341 FT_UINT16, BASE_DEC, NULL,
3342 F_SCM_UNSCHEDULED, "Set to on in unscheduled advertisement messages", HFILL }
3345 { &hf_wlccp_scm_unattached_flag,
3346 { "Unattached flag", "wlccp.scm_unattached_flag",
3347 FT_UINT16, BASE_DEC, NULL,
3348 F_SCM_UNATTACHED, "Set to on in advertisements from an unattached node", HFILL }
3351 { &hf_wlccp_scm_layer2update_flag,
3352 { "Layer2 Update flag", "wlccp.scm_layer2update_flag",
3353 FT_UINT16, BASE_DEC, NULL,
3354 F_SCM_LAYER2UPDATE, "Set to on if WLCCP Layer 2 path updates are enabled", HFILL }
3357 { &hf_wlccp_scm_election_group,
3358 { "SCM Election Group", "wlccp.scm_election_group",
3359 FT_UINT8, BASE_DEC, NULL, 0,
3360 NULL, HFILL }
3363 { &hf_wlccp_scm_attach_count,
3364 { "Attach Count", "wlccp.scm_attach_count",
3365 FT_UINT8, BASE_DEC, NULL, 0,
3366 "Attach count of the hop source", HFILL }
3369 { &hf_wlccp_scm_priority_flags,
3370 { "SCM Priority flags", "wlccp.scm_priority_flags",
3371 FT_UINT8, BASE_HEX, NULL, 0,
3372 NULL, HFILL }
3375 { &hf_wlccp_scm_priority,
3376 { "SCM Priority", "wlccp.scm_priority",
3377 FT_UINT8, BASE_DEC, NULL,
3378 F_SCM_PRIORITY, NULL, HFILL }
3381 { &hf_wlccp_scm_preferred_flag,
3382 { "Preferred flag", "wlccp.scm_preferred_flag",
3383 FT_UINT8, BASE_DEC, NULL,
3384 F_SCM_PREFERRED, "Set to off if the SCM is the preferred SCM", HFILL }
3387 { &hf_wlccp_scm_bridge_priority_flags,
3388 { "Bridge Priority flags", "wlccp.scm_bridge_priority_flags",
3389 FT_UINT8, BASE_DEC, NULL, 0,
3390 NULL, HFILL }
3393 { &hf_wlccp_scm_bridge_priority,
3394 { "Bridge priority", "wlccp.scm_bridge_priority",
3395 FT_UINT8, BASE_DEC, NULL,
3396 F_SCM_BRIDGE_PRIORITY, "Used to negotiate the designated bridge on a non-STP secondary Ethernet LAN", HFILL }
3399 { &hf_wlccp_scm_bridge_disable_flag,
3400 { "Bridge disable flag", "wlccp.scm_bridge_disable_flag",
3401 FT_UINT8, BASE_DEC, NULL,
3402 F_SCM_BRIDGE_DISABLE, "Set to on to indicate that secondary bridging is disabled", HFILL }
3405 { &hf_wlccp_scm_node_id,
3406 { "SCM Node ID", "wlccp.scm_node_id",
3407 FT_ETHER, BASE_NONE, NULL,
3408 0x0, "Node ID of the SCM", HFILL }
3411 { &hf_wlccp_scm_unknown_short,
3412 { "Unknown Short", "wlccp.scm_unknown_short",
3413 FT_UINT16, BASE_HEX, NULL,
3414 0x0, "SCM Unknown Short Value", HFILL }
3417 { &hf_wlccp_scm_instance_age,
3418 { "Instance Age", "wlccp.scm_instance_age",
3419 FT_UINT32, BASE_DEC, NULL, 0,
3420 "Instance age of the SCM in seconds", HFILL }
3423 { &hf_wlccp_scm_path_cost,
3424 { "Path cost", "wlccp.scm_path_cost",
3425 FT_UINT16, BASE_DEC, NULL,
3426 0x0, "Sum of port costs on the path to the SCM", HFILL }
3429 { &hf_wlccp_scm_hop_count,
3430 { "Hop Count", "wlccp.scm_hop_count",
3431 FT_UINT8, BASE_DEC, NULL, 0,
3432 "Number of wireless hops on the path to SCM", HFILL }
3435 { &hf_wlccp_scm_advperiod,
3436 { "Advertisement Period", "wlccp.scm_advperiod",
3437 FT_UINT8, BASE_DEC, NULL, 0,
3438 "Average number of seconds between SCM advertisements", HFILL }
3441 { &hf_wlccp_timestamp,
3442 { "Timestamp", "wlccp.timestamp",
3443 FT_UINT64, BASE_DEC, NULL, 0,
3444 "Registration Timestamp", HFILL }
3447 { &hf_wlccp_apregstatus,
3448 { "Registration Status", "wlccp.apregstatus",
3449 FT_UINT8, BASE_HEX, NULL, 0,
3450 "AP Registration Status", HFILL }
3453 { &hf_wlccp_ap_node_id,
3454 { "AP Node ID", "wlccp.apnodeid",
3455 FT_NONE, BASE_NONE, NULL, 0,
3456 NULL, HFILL }
3459 { &hf_wlccp_ap_node_type,
3460 { "AP Node Type", "wlccp.apnodetype",
3461 FT_UINT16, BASE_HEX, NULL, 0,
3462 NULL, HFILL }
3465 { &hf_wlccp_ap_node_id_address,
3466 { "AP Node Address", "wlccp.apnodeidaddress",
3467 FT_ETHER, BASE_NONE, NULL, 0,
3468 NULL, HFILL }
3471 { &hf_wlccp_aaa_msg_type,
3472 { "AAA Message Type", "wlccp.aaa_msg_type",
3473 FT_UINT8, BASE_HEX, VALS(wlccp_aaa_msg_type_vs), 0,
3474 NULL, HFILL }
3477 { &hf_wlccp_aaa_auth_type,
3478 { "AAA Authentication Type", "wlccp.aaa_auth_type",
3479 FT_UINT8, BASE_HEX, VALS(wlccp_eapol_auth_type_vs), 0,
3480 NULL, HFILL }
3483 { &hf_wlccp_keymgmt_type,
3484 { "AAA Key Management Type", "wlccp.aaa_keymgmt_type",
3485 FT_UINT8, BASE_HEX, VALS(wlccp_key_mgmt_type_vs), 0,
3486 NULL, HFILL }
3489 { &hf_wlccp_eapol_msg,
3490 { "EAPOL Message", "wlccp.eapol_msg",
3491 FT_NONE, BASE_NONE, NULL, 0,
3492 NULL, HFILL }
3495 { &hf_wlccp_eapol_version,
3496 { "EAPOL Version", "wlccp.eapol_version",
3497 FT_UINT8, BASE_DEC, NULL, 0,
3498 NULL, HFILL }
3501 { &hf_wlccp_eapol_type,
3502 { "EAPOL Type", "wlccp.eapol_type",
3503 FT_UINT8, BASE_HEX, VALS(eapol_type_vs), 0,
3504 NULL, HFILL }
3507 { &hf_wlccp_eap_msg_length,
3508 { "EAP Packet Length", "wlccp.eap_pkt_length",
3509 FT_UINT16, BASE_DEC, NULL, 0,
3510 "EAPOL Type", HFILL }
3513 { &hf_wlccp_eap_msg,
3514 { "EAP Message", "wlccp.eap_msg",
3515 FT_BYTES, BASE_NONE, NULL, 0,
3516 NULL, HFILL }
3519 { &hf_wlccp_cisco_acctg_msg,
3520 { "Cisco Accounting Message", "wlccp.cisco_acctg_msg",
3521 FT_BYTES, BASE_NONE, NULL, 0,
3522 NULL, HFILL }
3525 { &hf_wlccp_wids_msg_type,
3526 { "WIDS Message Type", "wlccp.wids_msg_type",
3527 FT_UINT8, BASE_DEC, NULL, 0,
3528 NULL, HFILL }
3531 { &hf_wlccp_nmconfig,
3532 { "NM Config", "wlccp.nmconfig",
3533 FT_UINT8, BASE_DEC, NULL, 0,
3534 NULL, HFILL }
3537 { &hf_wlccp_scmstate_change,
3538 { "SCM State Change", "wlccp.scmstate_change",
3539 FT_UINT8, BASE_DEC, NULL, 0,
3540 NULL, HFILL }
3543 { &hf_wlccp_scmstate_change_reason,
3544 { "SCM State Change Reason", "wlccp.scmstate_change_reason",
3545 FT_UINT8, BASE_DEC, NULL, 0,
3546 NULL, HFILL }
3549 { &hf_wlccp_scmattach_state,
3550 { "SCM Attach State", "wlccp.scmattach_state",
3551 FT_UINT8, BASE_DEC, NULL, 0,
3552 NULL, HFILL }
3555 { &hf_wlccp_nmcapability,
3556 { "NM Capability", "wlccp.nm_capability",
3557 FT_UINT8, BASE_DEC, NULL, 0,
3558 NULL, HFILL }
3561 { &hf_wlccp_refresh_req_id,
3562 { "Refresh Request ID", "wlccp.refresh_request_id",
3563 FT_UINT32, BASE_DEC, NULL, 0,
3564 NULL, HFILL }
3567 { &hf_wlccp_tlv,
3568 { "WLCCP TLV", "wlccp.tlv",
3569 FT_NONE, BASE_NONE, NULL, 0,
3570 NULL, HFILL }
3573 { &hf_tlv_flags,
3574 { "TLV Flags", "wlccp.tlv_flags",
3575 FT_UINT16, BASE_HEX, NULL, 0,
3576 "TLV Flags, Group and Type", HFILL }
3579 { &hf_wlccp_null_tlv,
3580 { "NULL TLV", "wlccp.null_tlv",
3581 FT_BYTES, BASE_NONE, NULL ,
3582 0, NULL, HFILL }
3586 { &hf_wlccp_tlv_type,
3587 { "TLV Type", "wlccp.tlv_type",
3588 FT_UINT16, BASE_DEC, NULL ,
3589 TLV_TYPE_ID, "TLV Type ID", HFILL }
3592 { &hf_wlccp_tlv_type0,
3593 { "TLV Type", "wlccp.tlv_type",
3594 FT_UINT16, BASE_DEC, VALS(wlccp_tlv_typeID_0),
3595 TLV_TYPE_ID, "TLV Type ID", HFILL }
3598 { &hf_wlccp_tlv_type1,
3599 { "TLV Type", "wlccp.tlv_type",
3600 FT_UINT16, BASE_DEC, VALS(wlccp_tlv_typeID_1),
3601 TLV_TYPE_ID, "TLV Type ID", HFILL }
3604 { &hf_wlccp_tlv_type2,
3605 { "TLV Type", "wlccp.tlv_type",
3606 FT_UINT16, BASE_DEC, VALS(wlccp_tlv_typeID_2),
3607 TLV_TYPE_ID, "TLV Type ID", HFILL }
3610 { &hf_wlccp_tlv_type3,
3611 { "TLV Type", "wlccp.tlv_type",
3612 FT_UINT16, BASE_DEC, VALS(wlccp_tlv_typeID_3),
3613 TLV_TYPE_ID, "TLV Type ID", HFILL }
3616 { &hf_wlccp_tlv_type4,
3617 { "TLV Type", "wlccp.tlv_type",
3618 FT_UINT16, BASE_DEC, VALS(wlccp_tlv_typeID_4),
3619 TLV_TYPE_ID, "TLV Type ID", HFILL }
3622 { &hf_wlccp_tlv_type5,
3623 { "TLV Type", "wlccp.tlv_type",
3624 FT_UINT16, BASE_DEC, VALS(wlccp_tlv_typeID_5),
3625 TLV_TYPE_ID, "TLV Type ID", HFILL }
3628 { &hf_wlccp_tlv_group,
3629 { "TLV Group", "wlccp.tlv_group",
3630 FT_UINT16, BASE_DEC, VALS(wlccp_tlv_group_vs) ,
3631 TLV_GROUP_ID, "TLV Group ID", HFILL }
3634 { &hf_wlccp_tlv_container_flag,
3635 { "TLV Container Flag", "wlccp.tlv_container_flag",
3636 FT_UINT16, BASE_DEC, NULL,
3637 TLV_F_CONTAINER, "Set on if the TLV is a container", HFILL }
3640 { &hf_wlccp_tlv_encrypted_flag,
3641 { "TLV Encrypted Flag", "wlccp.tlv_encrypted_flag",
3642 FT_UINT16, BASE_DEC, NULL,
3643 TLV_F_ENCRYPTED, "Set on if the TLV is encrypted", HFILL }
3646 { &hf_wlccp_tlv_reserved_bit,
3647 { "Reserved bits", "wlccp.tlv_reserved_bit",
3648 FT_UINT16, BASE_DEC, NULL,
3649 TLV_F_RESVD, NULL, HFILL }
3652 { &hf_wlccp_tlv_request_flag,
3653 { "TLV Request Flag", "wlccp.tlv_request_flag",
3654 FT_UINT16, BASE_DEC, NULL,
3655 TLV_F_REQUEST, "Set on if the TLV is a request", HFILL }
3658 { &hf_wlccp_tlv_length,
3659 { "TLV Length", "wlccp.tlv_length",
3660 FT_UINT16, BASE_DEC, NULL, 0,
3661 NULL, HFILL }
3664 { &hf_wlccp_path_length,
3665 { "Path Length", "wlccp.path_length",
3666 FT_UINT8, BASE_DEC, NULL, 0,
3667 NULL, HFILL }
3670 { &hf_wlccp_mic_msg_seq_count,
3671 { "MIC Message Sequence Count", "wlccp.mic_msg_seq_count",
3672 FT_UINT64, BASE_DEC, NULL, 0,
3673 NULL, HFILL }
3676 { &hf_wlccp_mic_length,
3677 { "MIC Length", "wlccp.mic_length",
3678 FT_UINT16, BASE_DEC, NULL, 0,
3679 NULL, HFILL }
3682 { &hf_wlccp_mic_value,
3683 { "MIC Value", "wlccp.mic_value",
3684 FT_BYTES, BASE_NONE, NULL, 0,
3685 NULL, HFILL }
3688 { &hf_wlccp_dest_node_type,
3689 { "Destination node type", "wlccp.dest_node_type",
3690 FT_UINT16, BASE_DEC, VALS(wlccp_node_type_vs),
3691 0x0, NULL, HFILL }
3694 { &hf_wlccp_dest_node_id,
3695 { "Destination node ID", "wlccp.dest_node_id",
3696 FT_ETHER, BASE_NONE, NULL,
3697 0x0, NULL, HFILL }
3700 { &hf_wlccp_supp_node_type,
3701 { "Destination node type", "wlccp.supp_node_type",
3702 FT_UINT16, BASE_DEC, VALS(wlccp_node_type_vs),
3703 0x0, NULL, HFILL }
3706 { &hf_wlccp_supp_node_id,
3707 { "Supporting node ID", "wlccp.supp_node_id",
3708 FT_ETHER, BASE_NONE, NULL,
3709 0x0, NULL, HFILL }
3712 { &hf_wlccp_src_node_type,
3713 { "Source node type", "wlccp.source_node_type",
3714 FT_UINT16, BASE_DEC, VALS(wlccp_node_type_vs),
3715 0x0, NULL, HFILL }
3718 { &hf_wlccp_src_node_id,
3719 { "Source node ID", "wlccp.source_node_id",
3720 FT_ETHER, BASE_NONE, NULL,
3721 0x0, NULL, HFILL }
3724 { &hf_wlccp_key_mgmt_type,
3725 { "Key Management type", "wlccp.key_mgmt_type",
3726 FT_UINT8, BASE_HEX, NULL,
3727 0x0, NULL, HFILL }
3730 { &hf_wlccp_key_seq_count,
3731 { "Key Sequence Count", "wlccp.key_seq_count",
3732 FT_UINT32, BASE_DEC, NULL, 0,
3733 NULL, HFILL }
3736 { &hf_wlccp_session_timeout,
3737 { "Session Timeout", "wlccp.session_timeout",
3738 FT_UINT32, BASE_DEC, NULL, 0,
3739 NULL, HFILL }
3742 { &hf_wlccp_nonce,
3743 { "Nonce Value", "wlccp.nonce_value",
3744 FT_BYTES, BASE_NONE, NULL, 0,
3745 NULL, HFILL }
3748 { &hf_wlccp_token,
3749 { "Token", "wlccp.token",
3750 FT_UINT8, BASE_HEX, NULL, 0,
3751 NULL, HFILL }
3754 { &hf_wlccp_scan_mode,
3755 { "Scan Mode", "wlccp.scan_mode",
3756 FT_UINT8, BASE_HEX, NULL,
3757 0, NULL, HFILL }
3760 { &hf_wlccp_mode,
3761 { "Mode", "wlccp.mode",
3762 FT_UINT8, BASE_HEX, VALS(wlccp_mode_vs),
3763 0, NULL, HFILL }
3766 { &hf_wlccp_rss,
3767 { "RSS", "wlccp.rss",
3768 FT_INT8, BASE_DEC, NULL, 0,
3769 "Received Signal Strength", HFILL }
3772 { &hf_wlccp_srcidx,
3773 { "Source Index", "wlccp.srcidx",
3774 FT_UINT8, BASE_HEX, NULL, 0,
3775 NULL, HFILL }
3778 { &hf_wlccp_parent_tsf,
3779 { "Parent TSF", "wlccp.parenttsf",
3780 FT_UINT32, BASE_HEX, NULL, 0,
3781 NULL, HFILL }
3784 { &hf_wlccp_target_tsf,
3785 { "Target TSF", "wlccp.targettsf",
3786 FT_UINT64, BASE_HEX, NULL, 0,
3787 NULL, HFILL }
3790 { &hf_wlccp_channel,
3791 { "Channel", "wlccp.channel",
3792 FT_UINT8, BASE_DEC, NULL, 0,
3793 NULL, HFILL }
3796 { &hf_wlccp_phy_type,
3797 { "PHY Type", "wlccp.phy_type",
3798 FT_UINT8, BASE_DEC, VALS(phy_type_80211_vs), 0,
3799 NULL, HFILL }
3802 { &hf_wlccp_bssid,
3803 { "BSS ID", "wlccp.bssid",
3804 FT_ETHER, BASE_NONE, NULL, 0,
3805 "Basic Service Set ID", HFILL }
3808 { &hf_wlccp_beacon_interval,
3809 { "Beacon Interval", "wlccp.beacon_interval",
3810 FT_UINT16, BASE_DEC, NULL, 0,
3811 NULL, HFILL }
3815 { &hf_wlccp_capabilities,
3816 { "Capabilities", "wlccp.capabilities",
3817 FT_UINT16, BASE_HEX, NULL, 0,
3818 NULL, HFILL }
3822 { &hf_wlccp_80211_capabilities,
3823 { "802.11 Capabilities Flags", "wlccp.80211_capabilities",
3824 FT_UINT16, BASE_HEX, NULL,
3825 0x0, NULL, HFILL }
3828 { &hf_80211_cap_ess,
3829 { "ESS flag", "wlccp.80211_ess_flag",
3830 FT_UINT16, BASE_DEC, NULL,
3831 F_80211_ESS, "Set on by APs in Beacon or Probe Response", HFILL }
3835 { &hf_80211_cap_ibss,
3836 { "IBSS flag", "wlccp.80211_ibss_flag",
3837 FT_UINT16, BASE_DEC, NULL,
3838 F_80211_IBSS, "Set on by STAs in Beacon or Probe Response", HFILL }
3841 { &hf_80211_cap_cf_pollable,
3842 { "CF Pollable flag", "wlccp.80211_cf_pollable_flag",
3843 FT_UINT16, BASE_DEC, NULL,
3844 F_80211_CFPOLL, NULL, HFILL }
3847 { &hf_80211_cap_cf_poll_req,
3848 { "CF Poll Request flag", "wlccp.80211_cf_poll_req_flag",
3849 FT_UINT16, BASE_DEC, NULL,
3850 F_80211_CFPOLL_REQ, NULL, HFILL }
3853 { &hf_80211_cap_privacy,
3854 { "Privacy flag", "wlccp.80211_privacy",
3855 FT_UINT16, BASE_DEC, NULL,
3856 F_80211_PRIVACY, "Set on indicate confidentiality is required in the BSS", HFILL }
3859 { &hf_80211_short_preamble,
3860 { "Short Preamble flag", "wlccp.80211_short_preamble_flag",
3861 FT_UINT16, BASE_DEC, NULL,
3862 F_80211_SHORT_PREAMBLE, NULL, HFILL }
3865 { &hf_80211_pbcc,
3866 { "PBCC flag", "wlccp.80211_pbcc_flag",
3867 FT_UINT16, BASE_DEC, NULL,
3868 F_80211_PBCC, NULL, HFILL }
3871 { &hf_80211_chan_agility,
3872 { "Channel Agility flag", "wlccp.80211_chan_agility_flag",
3873 FT_UINT16, BASE_DEC, NULL,
3874 F_80211_CH_AGILITY, NULL, HFILL }
3877 { &hf_80211_spectrum_mgmt,
3878 { "Spectrum Management flag", "wlccp.80211_spectrum_mgmt_flag",
3879 FT_UINT16, BASE_DEC, NULL,
3880 F_80211_SPEC_MGMT, NULL, HFILL }
3883 { &hf_80211_qos,
3884 { "QOS flag", "wlccp.80211_qos_flag",
3885 FT_UINT16, BASE_DEC, NULL,
3886 F_80211_QOS, NULL, HFILL }
3889 { &hf_80211_short_time_slot,
3890 { "Short Time Slot flag", "wlccp.80211_short_time_slot_flag",
3891 FT_UINT16, BASE_DEC, NULL,
3892 F_80211_SHORT_TIME_SLOT, NULL, HFILL }
3895 { &hf_80211_apsd,
3896 { "APSD flag", "wlccp.80211_apsd_flag",
3897 FT_UINT16, BASE_DEC, NULL,
3898 F_80211_APSD, NULL, HFILL }
3901 { &hf_80211_reserved,
3902 { "Reserved", "wlccp.80211_reserved",
3903 FT_UINT16, BASE_DEC, NULL,
3904 F_80211_RESVD, NULL, HFILL }
3907 { &hf_80211_dsss_ofdm,
3908 { "DSSS-OFDM Flag", "wlccp.dsss_ofdm_flag",
3909 FT_UINT16, BASE_DEC, NULL,
3910 F_80211_DSSS_OFDM, NULL, HFILL }
3913 { &hf_80211_dlyd_block_ack,
3914 { "Delayed Block Ack Flag", "wlccp.dsss_dlyd_block_ack_flag",
3915 FT_UINT16, BASE_DEC, NULL,
3916 F_80211_DLYD_BLK_ACK, NULL, HFILL }
3919 { &hf_80211_imm_block_ack,
3920 { "Immediate Block Ack Flag", "wlccp.dsss_imm_block_ack_flag",
3921 FT_UINT16, BASE_DEC, NULL,
3922 F_80211_IMM_BLK_ACK, NULL, HFILL }
3926 { &hf_wlccp_tlv80211,
3927 { "802.11 TLV Value", "wlccp.tlv80211",
3928 FT_BYTES, BASE_NONE, NULL, 0,
3929 NULL, HFILL }
3932 { &hf_wlccp_duration,
3933 { "Duration", "wlccp.duration",
3934 FT_UINT16, BASE_DEC, NULL, 0,
3935 NULL, HFILL }
3938 { &hf_wlccp_rpidensity,
3939 { "RPI Density", "wlccp.rpi_density",
3940 FT_BYTES, BASE_NONE, NULL, 0,
3941 NULL, HFILL }
3944 { &hf_wlccp_ccabusy,
3945 { "CCA Busy", "wlccp.cca_busy",
3946 FT_UINT8, BASE_HEX, NULL, 0,
3947 NULL, HFILL }
3950 { &hf_wlccp_stamac,
3951 { "Station MAC", "wlccp.station_mac",
3952 FT_ETHER, BASE_NONE, NULL, 0,
3953 NULL, HFILL }
3956 { &hf_wlccp_sta_type,
3957 { "Station Type", "wlccp.station_type",
3958 FT_UINT8, BASE_HEX, NULL, 0,
3959 NULL, HFILL }
3962 { &hf_wlccp_token2,
3963 { "2 Byte Token", "wlccp.token2",
3964 FT_UINT16, BASE_HEX, NULL, 0,
3965 NULL, HFILL }
3968 { &hf_wlccp_interval,
3969 { "Interval", "wlccp.interval",
3970 FT_UINT16, BASE_DEC, NULL, 0,
3971 NULL, HFILL }
3974 { &hf_framereport_elements,
3975 { "Frame Report Elements", "wlccp.framereport_elements",
3976 FT_NONE, BASE_NONE, NULL, 0,
3977 NULL, HFILL }
3980 { &hf_wlccp_count,
3981 { "Element Count", "wlccp.element_count",
3982 FT_UINT8, BASE_DEC, NULL, 0,
3983 NULL, HFILL }
3986 { &hf_wlccp_numframes,
3987 { "Number of frames", "wlccp.numframes",
3988 FT_UINT8, BASE_DEC, NULL, 0,
3989 NULL, HFILL }
3992 { &hf_wlccp_mfpcapability,
3993 { "MFP Capability", "wlccp.mfp_capability",
3994 FT_UINT16, BASE_HEX, NULL, 0,
3995 NULL, HFILL }
3998 { &hf_wlccp_mfpflags,
3999 { "MFP Flags", "wlccp.mfp_flags",
4000 FT_UINT16, BASE_HEX, NULL, 0,
4001 NULL, HFILL }
4004 { &hf_wlccp_mfpconfig,
4005 { "MFP Config", "wlccp.mfp_config",
4006 FT_UINT16, BASE_HEX, NULL, 0,
4007 NULL, HFILL }
4010 { &hf_wlccp_clientmac,
4011 { "Client MAC", "wlccp.client_mac",
4012 FT_ETHER, BASE_NONE, NULL, 0,
4013 NULL, HFILL }
4016 { &hf_reg_lifetime,
4017 { "Reg. LifeTime", "wlccp.reg_lifetime",
4018 FT_UINT8, BASE_DEC, NULL, 0,
4019 NULL, HFILL }
4022 { &hf_time_elapsed,
4023 { "Elapsed Time", "wlccp.time_elapsed",
4024 FT_UINT16, BASE_DEC, NULL, 0,
4025 NULL, HFILL }
4028 { &hf_wlccp_parent_ap_mac,
4029 { "Parent AP MAC", "wlccp.parent_ap_mac",
4030 FT_ETHER, BASE_NONE, NULL, 0,
4031 NULL, HFILL }
4034 { &hf_wlccp_auth_type,
4035 { "Authentication Type", "wlccp.auth_type",
4036 FT_UINT8, BASE_HEX, NULL, 0,
4037 NULL, HFILL }
4040 { &hf_wlccp_radius_user_name,
4041 { "RADIUS Username", "wlccp.radius_username",
4042 FT_STRING, BASE_NONE, NULL,
4043 0x0, NULL, HFILL }
4046 { &hf_wds_reason,
4047 { "Reason Code", "wlccp.wds_reason",
4048 FT_UINT8, BASE_HEX, NULL, 0,
4049 NULL, HFILL }
4053 { &hf_wlccp_tlv_unknown_value,
4054 { "Unknown TLV Contents", "wlccp.tlv_unknown_value",
4055 FT_BYTES, BASE_NONE, NULL, 0,
4056 NULL, HFILL }
4059 }; /* hf_register_info hf */
4061 static hf_register_info oui_hf[] = {
4062 { &hf_llc_wlccp_pid,
4063 { "PID", "llc.wlccp_pid",
4064 FT_UINT16, BASE_HEX, VALS(cisco_pid_vals),
4065 0x0, NULL, HFILL }
4069 /* Setup protocol subtree array */
4070 static int *ett[] = {
4071 &ett_wlccp,
4072 &ett_wlccp_sap_tree,
4073 &ett_wlccp_type,
4074 &ett_wlccp_flags,
4075 &ett_wlccp_cm_flags,
4076 &ett_wlccp_scm_flags,
4077 &ett_wlccp_scm_priority_flags,
4078 &ett_wlccp_scm_bridge_priority_flags,
4079 &ett_wlccp_rm_flags,
4080 &ett_wlccp_nm_flags,
4081 &ett_wlccp_ap_node_id,
4082 &ett_wlccp_eapol_msg_tree,
4083 &ett_wlccp_eap_tree,
4084 &ett_wlccp_tlv_tree,
4085 &ett_tlv_flags_tree,
4086 &ett_tlv_sub_tree,
4087 &ett_80211_capability_flags_tree,
4088 &ett_framereport_elements_tree
4089 }; /* static int *ett[] */
4091 /* Register the protocol name and description */
4092 proto_wlccp = proto_register_protocol("Cisco Wireless LAN Context Control Protocol", "WLCCP", "wlccp");
4094 /* Required function calls to register the header fields and subtrees used */
4095 proto_register_field_array(proto_wlccp, hf, array_length(hf));
4096 proto_register_subtree_array(ett, array_length(ett));
4098 /* Register the subdissector */
4099 wlccp_handle = register_dissector("wlccp", dissect_wlccp, proto_wlccp);
4101 llc_add_oui(OUI_CISCOWL, "llc.wlccp_pid", "LLC Cisco WLCCP OUI PID", oui_hf, proto_wlccp);
4105 void
4106 proto_reg_handoff_wlccp(void)
4108 dissector_add_uint("ethertype", ETHERTYPE_WLCCP, wlccp_handle);
4109 dissector_add_uint_with_preference("udp.port", WLCCP_UDP_PORT, wlccp_handle);
4110 dissector_add_uint("llc.wlccp_pid", 0x0000, wlccp_handle);
4116 * Editor modelines - https://www.wireshark.org/tools/modelines.html
4118 * Local variables:
4119 * c-basic-offset: 8
4120 * tab-width: 8
4121 * indent-tabs-mode: t
4122 * End:
4124 * vi: set shiftwidth=8 tabstop=8 noexpandtab:
4125 * :indentSize=8:tabSize=8:noTabs=false: