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>
10 * Wireshark - Network traffic analyzer
11 * By Gerald Combs <gerald@wireshark.org>
12 * Copyright 1998 Gerald Combs
14 * The CISCOWL dissector was merged into this one.
16 * This program is free software; you can redistribute it and/or
17 * modify it under the terms of the GNU General Public License
18 * as published by the Free Software Foundation; either version 2
19 * of the License, or (at your option) any later version.
21 * This program is distributed in the hope that it will be useful,
22 * but WITHOUT ANY WARRANTY; without even the implied warranty of
23 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 * GNU General Public License for more details.
26 * You should have received a copy of the GNU General Public License
27 * along with this program; if not, write to the Free Software
28 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
31 /* Version 0x00 was reverse engineered */
32 /* Version 0xC1 Protocol reference: US Patent Application 0050220054 */
33 /* and considerable reverse engineering due to the patent application*/
34 /* being incomplete */
36 /* More clues to version 0x00 of the protocol:
38 * Header (Eth V2 or SNAP)
41 * 0202: Unknown, Length 36 (14 + 20 + 2)
42 * 4001: Unknown, Length 48 (14 + 32 + 2)
43 * 4601: Unknown, Length 34 (14 + 18 + 2)
44 * 4081 on Eth V2: Name, Version Length 84 (14 + 48 + 20 + 2)
45 * 4081 on 802.3: Name Length 72 (14 + 56 + 2)
48 * Unknown1 (2 bytes) Unknown19 + Unknown2 may be a MAC address on type 0202
49 * Unknown2 (4 bytes) see Unknown19
53 * Device name (8 bytes)
57 * Version string (10 bytes)
70 #include <epan/packet.h>
71 #include <epan/etypes.h>
73 #include "packet-llc.h"
76 /* The UDP port that WLCCP is expected to ride on */
77 /* WLCCP also uses an LLC OUI type and an ethertype */
78 #define WLCCP_UDP_PORT 2887
81 /* SAP is 2-bit version and 6-bit Type */
82 #define SAP_VERSION_MASK (0xC0)
83 #define SAP_VALUE_MASK (0x3f)
85 static const value_string wlccp_sap_vs[] = {
86 { 0x0, "Context Management" },
88 { 0x2, "Radio Resource Management" },
90 { 0x4, "Network Management" },
95 #define WLCCP_SAP_CCM (0x00)
96 #define WLCCP_SAP_SEC (0x01)
97 #define WLCCP_SAP_RRM (0x02)
98 #define WLCCP_SAP_QOS (0x03)
99 #define WLCCP_SAP_NM (0x04)
100 #define WLCCP_SAP_MIP (0x05)
102 static const value_string wlccp_node_type_vs[] = {
104 { 0x01, "Access Point (AP)" },
105 { 0x02, "Subnet Context Manager (SCM)" },
106 { 0x04, "Local Context Manager (LCM)" },
107 { 0x08, "Campus Context Manager (CCM)" },
108 { 0x10, "Infrastructure (ICN)" },
110 /* { 0x8000, "Multi Mask?" }, */
114 /* The Message Type field contains a 2-bit Sub-Type and a 6-bit Base Message Type */
115 #define MT_SUBTYPE (0xC0)
116 #define MT_BASE_MSG_TYPE (0x3F)
118 static const value_string wlccp_subtype_vs[] = {
126 /* The Message Type definitions are a combination of the SAP and the Type_ID */
127 /* fields. These mappings are not well documented and have been gathered from a */
128 /* combination of the WLCCP patent application, experimentation, and WLCCP */
132 static const value_string wlccp_msg_type_vs_0[] = {
133 { 0x1, "SCM Advertise" },
134 { 0x2, "CCM Advertise" },
135 { 0x3, "Registration" },
136 { 0x4, "DeRegistration" },
139 { 0x7, "Path Update" },
140 { 0x8, "Path Check" },
141 { 0x9, "PreRegistration" },
143 { 0x0b, "cmAAA EAP Authent" },
144 { 0x0c, "cmPathInit Path Authent" },
151 static const value_string wlccp_msg_type_vs_1[] = {
152 /* { 0x1, "Unknown" }, */
158 static const value_string wlccp_msg_type_vs_2[] = {
160 { 0x2, "rmReqRoutingResp" },
167 static const value_string wlccp_msg_type_vs_3[] = {
168 /* { 0x1, "Unknown" }, */
174 static const value_string wlccp_msg_type_vs_4[] = {
176 { 0x10, "nmConfigRequest" },
177 { 0x11, "nmConfigReply" },
178 { 0x20, "nmApRegistration" },
179 { 0x21, "nmScmStateChange" },
180 { 0x22, "nmScmKeepActive" },
181 { 0x30, "nmClientEventReport" },
182 { 0x31, "nmAllClientRefreshRequest" },
188 static const value_string wlccp_msg_type_vs_5[] = {
189 /* { 0x1, "Unknown" }, */
195 /* Mask definitions for the CM Flags field */
196 #define F_RETRY (1<<15)
197 #define F_RESPONSE_REQUEST (1<<14)
198 #define F_TLV (1<<13)
199 #define F_INBOUND (1<<12)
200 #define F_OUTBOUND (1<<11)
201 #define F_HOPWISE_ROUTING (1<<10)
202 #define F_ROOT_CM (1<<9)
203 #define F_RELAY (1<<8)
206 /* Mask definitions for the RM Flags field */
207 #define RM_F_REQUEST_REPLY (1<<0)
208 #define RM_F_MIC (1<<1)
210 /* Mask definitions for the NM Flags field */
211 /* the NM flags are the same as the CM flags except there is no
212 INBOUND, OUTBOUND, HOPWISE_ROUTING, ROOT_CM, or RELAY flag, and
213 the RESPONSE_REQUEST flag is renamed ACK_REQD
215 #define F_ACK_REQD (1<<14)
218 /* Mask definitions for the SCM Flags field */
219 #define F_SCM_LAYER2UPDATE (1<<3)
220 #define F_SCM_UNATTACHED (1<<2)
221 #define F_SCM_UNSCHEDULED (1<<1)
222 #define F_SCM_ACTIVE (1<<0)
224 /* Mask definitions for the SCM Priority Flags field */
225 #define F_SCM_PRIORITY 0xfe
226 #define F_SCM_PREFERRED 0x01
228 /* Mask definitions for the SCM Bridge Priority Flags field */
229 #define F_SCM_BRIDGE_PRIORITY 0xfe
230 #define F_SCM_BRIDGE_DISABLE 0x01
232 /* The TLV Type definitions are a combination of the TLV Group and the */
233 /* TLV Type ID fields. These mappings are not well documented and have been */
234 /* gathered from a combination of the WLCCP patent application, */
235 /* experimentation, and WLCCP device logs */
237 /* The TLV Group/Type Field contains some flags and the Group ID and Type ID */
238 #define TLV_F_CONTAINER (0x8000)
239 #define TLV_F_ENCRYPTED (0x4000)
240 #define TLV_F_RESVD (0x3000)
241 #define TLV_F_RESVD2 (0x2000)
242 #define TLV_F_RESVD3 (0x1000)
243 #define TLV_F_REQUEST (0x0080)
244 #define TLV_GROUP_ID (0x0F00)
245 #define TLV_TYPE_ID (0x007F)
247 static const value_string wlccp_tlv_group_vs[] = {
248 { 0x0, "WLCCP Group" },
249 { 0x1, "Security Group" },
250 { 0x2, "RRM Group" },
251 { 0x3, "QOS Group" },
253 { 0x5, "MIP Group" },
258 #define WLCCP_TLV_GROUP_WLCCP (0x00)
259 #define WLCCP_TLV_GROUP_SEC (0x01)
260 #define WLCCP_TLV_GROUP_RRM (0x02)
261 #define WLCCP_TLV_GROUP_QOS (0x03)
262 #define WLCCP_TLV_GROUP_NM (0x04)
263 #define WLCCP_TLV_GROUP_MIP (0x05)
266 static const value_string wlccp_tlv_typeID_0[] = {
267 { 0x00, "NULL TLV" },
268 { 0x09, "ipv4Address" },
269 { 0x01, "Container" },
270 { 0x02, "AP Port Info" },
271 { 0x03, "ipv4 Subnet ID" },
272 { 0x04, "Secondary LAN Address List" },
273 { 0x05, "Multicast Ethernet Address List" },
274 { 0x06, "ipv4 Multicast Address List" },
275 { 0x07, "AP Port List" },
276 { 0x08, "Requestor SSID" },
281 static const value_string wlccp_tlv_typeID_1[] = {
282 { 0x01, "initSession" },
283 { 0x02, "inSecureContextReq" },
284 { 0x06, "authenticator" },
286 { 0x0a, "inSecureContextReply" },
291 static const value_string wlccp_tlv_typeID_2[] = {
292 { 0x03, "rmReport" },
293 { 0x04, "aggrRmReport" },
294 { 0x15, "frameReport" },
295 { 0x17, "ccaReport" },
296 { 0x19, "rpiHistReport" },
297 { 0x1e, "commonBeaconReport" },
298 { 0x1f, "aggrBeaconReport" },
299 { 0x5b, "mfpRouting" },
300 { 0x5c, "mfpConfig" },
305 static const value_string wlccp_tlv_typeID_3[] = {
306 /* { 0x01, "Unknown" } */
311 static const value_string wlccp_tlv_typeID_4[] = {
312 /* { 0x01, "Unknown" } */
317 static const value_string wlccp_tlv_typeID_5[] = {
318 /* { 0x01, "Unknown" } */
326 static const value_string wlccp_aaa_msg_type_vs[] = {
330 { 0x3, "Cisco Accounting" },
334 static const value_string wlccp_eapol_auth_type_vs[] = {
337 { 0x2, "MAC then EAP" },
338 { 0x3, "MAC and EAP" },
339 { 0x4, "LEAP only" },
340 { 0x5, "MAC then LEAP" },
341 { 0x6, "MAC and LEAP" },
345 static const value_string wlccp_key_mgmt_type_vs[] = {
348 { 0x2, "Legacy 802.1x" },
353 static const value_string eapol_type_vs[] = {
354 { 0x0, "EAP Packet" },
355 { 0x1, "EAP Start" },
362 static const value_string wlccp_status_vs[] = {
367 static const value_string cisco_pid_vals[] = {
372 static const value_string wlccp_mode_vs[] = {
373 { 0x0, "apSelected" },
380 static const value_string phy_type_80211_vs[] = {
381 { 0x01, "FHSS 2.4 GHz" },
382 { 0x02, "DSSS 2.4 GHz" },
383 { 0x03, "IR Baseband" },
384 { 0x04, "OFDM 5GHz" },
391 /* 802.11 capabilities flags */
392 #define F_80211_ESS 0x0001
393 #define F_80211_IBSS 0x0002
394 #define F_80211_CFPOLL 0x0004
395 #define F_80211_CFPOLL_REQ 0x0008
396 #define F_80211_PRIVACY 0x0010
397 #define F_80211_SHORT_PREAMBLE 0x0020
398 #define F_80211_PBCC 0x0040
399 #define F_80211_CH_AGILITY 0x0080
400 #define F_80211_SPEC_MGMT 0x0100
401 #define F_80211_QOS 0x0200
402 #define F_80211_SHORT_TIME_SLOT 0x0400
403 #define F_80211_APSD 0x0800
404 #define F_80211_RESVD 0x1000
405 #define F_80211_DSSS_OFDM 0x2000
406 #define F_80211_DLYD_BLK_ACK 0x4000
407 #define F_80211_IMM_BLK_ACK 0x8000
413 struct subdissector_returns_t
416 static gboolean mic_flag;
417 static gboolean tlv_flag;
418 }; * struct flags_t declaration *
423 /* Forward declarations we need below */
424 static guint dissect_wlccp_ccm_msg(proto_tree *_tree, tvbuff_t *_tvb, guint _offset, guint8 _base_message_type);
425 static guint dissect_wlccp_sec_msg(proto_tree *_tree, tvbuff_t *_tvb, guint _offset, guint8 _base_message_type);
426 static guint dissect_wlccp_rrm_msg(proto_tree *_tree, tvbuff_t *_tvb, guint _offset, guint8 _base_message_type);
427 static guint dissect_wlccp_qos_msg(proto_tree *_tree, tvbuff_t *_tvb, guint _offset, guint8 _base_message_type);
428 static guint dissect_wlccp_nm_msg(proto_tree *_tree, tvbuff_t *_tvb, guint _offset, guint8 _base_message_type);
429 static guint dissect_wlccp_mip_msg(proto_tree *_tree, tvbuff_t *_tvb, guint _offset, guint8 _base_message_type);
431 static guint dissect_wlccp_tlvs(proto_tree *_tree, tvbuff_t *tvb, guint tlv_offset, guint _depth);
433 static guint dissect_wlccp_ccm_tlv(proto_tree *_tree, tvbuff_t *_tvb, guint _offset, gint _type_id, guint _length, proto_item *_ti);
434 static guint dissect_wlccp_sec_tlv(proto_tree *_tree, tvbuff_t *_tvb, guint _offset, gint _type_id, guint _length, proto_item *_ti);
435 static guint dissect_wlccp_rrm_tlv(proto_tree *_tree, tvbuff_t *_tvb, guint _offset, gint _type_id, guint _length, proto_item *_ti);
436 static guint dissect_wlccp_qos_tlv(proto_tree *_tree, tvbuff_t *_tvb, guint _offset, gint _type_id, guint _length, proto_item *_ti);
437 static guint dissect_wlccp_nm_tlv(proto_tree *_tree, tvbuff_t *_tvb, guint _offset, gint _type_id, guint _length, proto_item *_ti);
438 static guint dissect_wlccp_mip_tlv(proto_tree *_tree, tvbuff_t *_tvb, guint _offset, gint _type_id, guint _length, proto_item *_ti);
440 static void set_mic_flag(gboolean flag);
441 static void set_tlv_flag(gboolean flag);
442 static gboolean get_tlv_flag(void);
443 static gboolean get_mic_flag(void);
445 /* Initialize some utlity variables */
446 static gboolean mic_flag=0, tlv_flag=0;
448 /* Initialize the protocol and registered fields */
449 static int proto_wlccp = -1;
451 static int hf_llc_wlccp_pid = -1;
455 static int hf_wlccp_dstmac = -1;
456 static int hf_wlccp_srcmac = -1;
457 static int hf_wlccp_hostname = -1;
459 /* WLCCP Fixed header fields */
460 static int hf_wlccp_version = -1;
462 static int hf_wlccp_sap = -1; /* SAP Tree */
463 static int hf_wlccp_sap_version = -1;
464 static int hf_wlccp_sap_id = -1;
466 static int hf_wlccp_destination_node_type = -1;
467 static int hf_wlccp_length = -1;
469 static int hf_wlccp_type = -1; /* Message Type Tree */
470 static int hf_wlccp_subtype = -1;
471 static int hf_wlccp_base_message_type_0 = -1;
472 static int hf_wlccp_base_message_type_1 = -1;
473 static int hf_wlccp_base_message_type_2 = -1;
474 static int hf_wlccp_base_message_type_3 = -1;
475 static int hf_wlccp_base_message_type_4 = -1;
476 static int hf_wlccp_base_message_type_5 = -1;
477 static int hf_wlccp_base_message_type_unknown = -1;
479 static int hf_wlccp_hops = -1;
480 static int hf_wlccp_nm_version = -1;
482 static int hf_wlccp_msg_id = -1;
484 static int hf_wlccp_flags = -1; /* Flags Tree */
485 static int hf_wlccp_rm_flags = -1;
486 static int hf_wlccp_retry_flag = -1;
487 static int hf_wlccp_response_request_flag = -1;
488 static int hf_wlccp_ack_required_flag = -1;
489 static int hf_wlccp_tlv_flag = -1;
490 static int hf_wlccp_inbound_flag = -1;
491 static int hf_wlccp_outbound_flag = -1;
492 static int hf_wlccp_hopwise_routing_flag = -1;
493 static int hf_wlccp_root_cm_flag = -1;
494 static int hf_wlccp_relay_flag = -1;
495 static int hf_wlccp_mic_flag = -1;
496 static int hf_wlccp_rm_request_reply_flag = -1;
497 static int hf_wlccp_rm_mic_flag = -1;
499 static int hf_wlccp_originator = -1; /* Originator Tree */
500 static int hf_wlccp_originator_node_type = -1;
501 /* static int hf_wlccp_originator_id = -1; */
503 static int hf_wlccp_responder = -1; /* Responder Tree */
504 static int hf_wlccp_responder_node_type = -1;
505 /*static int hf_wlccp_responder_id = -1; */
508 /* static int hf_wlccp_relay_node = -1;*/ /* Relay Node Tree */
509 static int hf_wlccp_relay_node_type = -1;
510 static int hf_wlccp_relay_node_id = -1;
512 static int hf_wlccp_priority = -1;
513 static int hf_wlccp_age = -1;
514 static int hf_wlccp_period = -1;
515 static int hf_wlccp_ipv4_address = -1;
517 /* SCM Advertisement */
518 static int hf_wlccp_scm_hop_address = -1;
520 static int hf_wlccp_scm_flags = -1; /* SCM Flags Tree */
521 static int hf_wlccp_scm_active_flag = -1;
522 static int hf_wlccp_scm_unscheduled_flag = -1;
523 static int hf_wlccp_scm_unattached_flag = -1;
524 static int hf_wlccp_scm_layer2update_flag = -1;
526 static int hf_wlccp_scm_election_group = -1;
527 static int hf_wlccp_scm_attach_count = -1;
529 static int hf_wlccp_scm_priority_flags = -1; /* SCM Priority Flags */
530 static int hf_wlccp_scm_priority = -1;
531 static int hf_wlccp_scm_preferred_flag = -1;
533 static int hf_wlccp_scm_bridge_priority_flags = -1; /* SCM Bridge Priority Flags */
534 static int hf_wlccp_scm_bridge_priority = -1;
535 static int hf_wlccp_scm_bridge_disable_flag = -1;
537 static int hf_wlccp_scm_node_id = -1;
538 static int hf_wlccp_scm_unknown_short = -1;
539 static int hf_wlccp_scm_instance_age = -1;
540 static int hf_wlccp_scm_path_cost = -1;
541 static int hf_wlccp_scm_hop_count = -1;
542 static int hf_wlccp_scm_advperiod = -1;
544 /*kan for apRegistration messages*/
545 static int hf_wlccp_timestamp = -1;
546 static int hf_wlccp_apregstatus = -1;
547 static int hf_wlccp_ap_node_id = -1;
548 static int hf_wlccp_ap_node_type = -1;
549 static int hf_wlccp_ap_node_id_address = -1;
550 /*kan for nmPathInit messages */
551 static int hf_wlccp_requ_node_type = -1;
552 static int hf_wlccp_requ_node_id = -1;
553 static int hf_wlccp_status = -1;
554 static int hf_wlccp_path_init_rsvd = -1;
555 /*kan - for cmAAA messages */
556 static int hf_wlccp_aaa_msg_type = -1;
557 static int hf_wlccp_aaa_auth_type = -1;
558 static int hf_wlccp_keymgmt_type = -1;
559 /*kan - for cmAAA EAPOL messages */
560 static int hf_wlccp_eapol_msg = -1;
561 static int hf_wlccp_eapol_version = -1;
562 static int hf_wlccp_eapol_type = -1;
563 static int hf_wlccp_eap_msg_length = -1;
564 static int hf_wlccp_eap_msg = -1;
565 /*kan - for cmAAA Proprietary message */
566 static int hf_wlccp_cisco_acctg_msg = -1;
567 /*kan - for cmWIDS */
568 static int hf_wlccp_wids_msg_type = -1;
569 /*kan - for nmConfigRequest and nmConfigReply */
570 static int hf_wlccp_nmconfig = -1;
572 static int hf_wlccp_scmstate_change = -1;
573 static int hf_wlccp_scmstate_change_reason = -1;
575 static int hf_wlccp_scmattach_state = -1;
576 static int hf_wlccp_nmcapability = -1;
577 static int hf_wlccp_refresh_req_id = -1;
579 static int hf_wlccp_tlv = -1;
580 static int hf_tlv_flags = -1;
582 static int hf_wlccp_null_tlv = -1;
584 static int hf_wlccp_tlv_type = -1;
585 static int hf_wlccp_tlv_type0 = -1;
586 static int hf_wlccp_tlv_type1 = -1;
587 static int hf_wlccp_tlv_type2 = -1;
588 static int hf_wlccp_tlv_type3 = -1;
589 static int hf_wlccp_tlv_type4 = -1;
590 static int hf_wlccp_tlv_type5 = -1;
591 static int hf_wlccp_tlv_group = -1;
592 static int hf_wlccp_tlv_container_flag = -1;
593 static int hf_wlccp_tlv_encrypted_flag = -1;
594 static int hf_wlccp_tlv_request_flag = -1;
595 static int hf_wlccp_tlv_reserved_bit = -1;
596 static int hf_wlccp_tlv_length = -1;
598 /* static int hf_wlccp_tlv_value = -1; */
600 static int hf_wlccp_path_length = -1;
601 static int hf_wlccp_mic_msg_seq_count = -1;
602 static int hf_wlccp_mic_length = -1;
603 static int hf_wlccp_mic_value = -1;
605 static int hf_wlccp_key_seq_count = -1;
606 static int hf_wlccp_dest_node_type = -1;
607 static int hf_wlccp_dest_node_id = -1;
608 static int hf_wlccp_supp_node_type = -1;
609 static int hf_wlccp_supp_node_id = -1;
610 static int hf_wlccp_key_mgmt_type = -1;
611 static int hf_wlccp_nonce = -1;
612 static int hf_wlccp_session_timeout = -1;
613 static int hf_wlccp_src_node_type = -1;
614 static int hf_wlccp_src_node_id = -1;
615 static int hf_wlccp_token = -1;
616 static int hf_wlccp_mode = -1;
617 static int hf_wlccp_scan_mode = -1;
618 static int hf_wlccp_rss = -1;
619 static int hf_wlccp_srcidx = -1;
620 static int hf_wlccp_parent_tsf = -1;
621 static int hf_wlccp_target_tsf = -1;
623 static int hf_wlccp_channel = -1;
624 static int hf_wlccp_phy_type = -1;
625 static int hf_wlccp_bssid = -1;
626 static int hf_wlccp_beacon_interval = -1;
627 /* static int hf_wlccp_capabilities = -1; */
628 static int hf_wlccp_tlv80211 = -1;
629 static int hf_wlccp_duration = -1;
630 static int hf_wlccp_rpidensity = -1;
631 static int hf_wlccp_ccabusy = -1;
632 static int hf_wlccp_sta_type = -1;
633 static int hf_wlccp_stamac = -1;
634 static int hf_wlccp_token2 = -1;
635 static int hf_wlccp_interval = -1;
636 static int hf_wlccp_count = -1;
637 static int hf_framereport_elements = -1;
638 static int hf_wlccp_numframes = -1;
639 static int hf_wlccp_mfpcapability = -1;
640 static int hf_wlccp_mfpflags = -1;
641 static int hf_wlccp_mfpconfig = -1;
642 static int hf_wlccp_clientmac = -1;
643 static int hf_time_elapsed = -1;
644 static int hf_wlccp_parent_ap_mac = -1;
645 static int hf_wlccp_auth_type =-1;
646 static int hf_reg_lifetime = -1;
647 static int hf_wlccp_radius_user_name = -1;
648 static int hf_wds_reason = -1;
651 static int hf_wlccp_80211_capabilities = -1;
652 static int hf_80211_cap_ess = -1;
653 static int hf_80211_cap_ibss = -1;
654 static int hf_80211_cap_cf_pollable = -1;
655 static int hf_80211_cap_cf_poll_req = -1;
656 static int hf_80211_cap_privacy = -1;
657 static int hf_80211_short_preamble = -1;
658 static int hf_80211_pbcc = -1;
659 static int hf_80211_chan_agility = -1;
660 static int hf_80211_spectrum_mgmt = -1;
661 static int hf_80211_qos = -1;
662 static int hf_80211_short_time_slot = -1;
663 static int hf_80211_apsd = -1;
664 static int hf_80211_reserved = -1;
665 static int hf_80211_dsss_ofdm = -1;
666 static int hf_80211_dlyd_block_ack = -1;
667 static int hf_80211_imm_block_ack = -1;
670 static int hf_wlccp_tlv_unknown_value = -1;
672 /* Initialize the subtree pointers */
673 static gint ett_wlccp = -1;
674 static gint ett_wlccp_sap_tree = -1;
675 static gint ett_wlccp_type = -1;
676 static gint ett_wlccp_cm_flags = -1;
677 static gint ett_wlccp_scm_flags = -1;
678 static gint ett_wlccp_scm_priority_flags = -1;
679 static gint ett_wlccp_scm_bridge_priority_flags = -1;
680 static gint ett_wlccp_rm_flags = -1;
681 static gint ett_wlccp_nm_flags = -1;
684 static gint ett_wlccp_flags = -1;
685 static gint ett_wlccp_ap_node_id = -1;
686 static gint ett_wlccp_eapol_msg_tree = -1;
687 static gint ett_wlccp_eap_tree = -1;
688 static gint ett_wlccp_tlv_tree = -1;
689 static gint ett_tlv_flags_tree = -1;
690 static gint ett_tlv_sub_tree = -1;
691 static gint ett_80211_capability_flags_tree = -1;
692 static gint ett_framereport_elements_tree = -1;
696 /* Code to actually dissect the packets */
698 dissect_wlccp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
700 /* Set up structures needed to add the protocol subtree and manage it */
702 proto_tree *wlccp_tree, *wlccp_sap_tree, *wlccp_type_tree;
704 guint offset = 0, old_offset;
706 guint8 version=0, sap_id=0;
709 guint8 base_message_type=0, message_sub_type=0;
711 /* Make entries in Protocol column and Info column on summary display */
712 col_set_str(pinfo->cinfo, COL_PROTOCOL, "WLCCP");
714 if (check_col(pinfo->cinfo, COL_INFO))
716 if(tvb_get_guint8(tvb, 0) == 0xC1) /* Get the version number */
719 sap_id = tvb_get_guint8(tvb,1) & SAP_VALUE_MASK;
720 base_message_type=(tvb_get_guint8(tvb,6)) & MT_BASE_MSG_TYPE;
721 message_sub_type=(tvb_get_guint8(tvb, 6) & MT_SUBTYPE ) >> 6;
730 col_add_fstr(pinfo->cinfo, COL_INFO, "Message Type: %-27s SubType: %s",
731 val_to_str(base_message_type, wlccp_msg_type_vs_0, "Unknown"),
732 val_to_str(message_sub_type, wlccp_subtype_vs, "Unknown")
736 } /* case WLCCP_SAP_CCM */
741 col_add_fstr(pinfo->cinfo, COL_INFO, "Message Type: %-27s SubType: %s",
742 val_to_str(base_message_type, wlccp_msg_type_vs_1, "Unknown"),
743 val_to_str(message_sub_type, wlccp_subtype_vs, "Unknown")
746 } /* case WLCCP_SAP_SEC */
750 col_add_fstr(pinfo->cinfo, COL_INFO, "Message Type: %-27s SubType: %s",
751 val_to_str(base_message_type, wlccp_msg_type_vs_2, "Unknown"),
752 val_to_str(message_sub_type, wlccp_subtype_vs, "Unknown")
756 } /* case WLCCP_SAP_RRM */
760 col_add_fstr(pinfo->cinfo, COL_INFO, "Message Type: %-27s SubType: %s",
761 val_to_str(base_message_type, wlccp_msg_type_vs_3, "Unknown"),
762 val_to_str(message_sub_type, wlccp_subtype_vs, "Unknown")
765 } /* case WLCCP_SAP_QOS */
769 col_add_fstr(pinfo->cinfo, COL_INFO, "Message Type: %-27s SubType: %s",
770 val_to_str(base_message_type, wlccp_msg_type_vs_4, "Unknown"),
771 val_to_str(message_sub_type, wlccp_subtype_vs, "Unknown")
775 } /* case WLCCP_SAP_NM */
779 col_add_fstr(pinfo->cinfo, COL_INFO, "Message Type: %-27s SubType: %s",
780 val_to_str(base_message_type, wlccp_msg_type_vs_5, "Unknown"),
781 val_to_str(message_sub_type, wlccp_subtype_vs, "Unknown")
784 } /* case WLCCP_SAP_MIP */
788 col_add_fstr(pinfo->cinfo, COL_INFO, "Message Type: %-27s SubType: %s",
790 val_to_str(message_sub_type, wlccp_subtype_vs, "Unknown")
793 } /* default for switch sap */
798 } /* if version=0xC1 (tvb_get_guint8(tvb, 0) == 0xC1)*/
803 /* create display subtree for the protocol */
804 ti = proto_tree_add_item(tree, proto_wlccp, tvb, 0, -1, ENC_BIG_ENDIAN);
805 wlccp_tree = proto_item_add_subtree(ti, ett_wlccp);
807 proto_tree_add_item(wlccp_tree, hf_wlccp_version,
808 tvb, offset, 1, ENC_BIG_ENDIAN);
810 /* interpretation of the packet is determined by WLCCP version */
811 version = tvb_get_guint8(tvb, 0);
815 proto_tree_add_item(wlccp_tree, hf_wlccp_length,
816 tvb, 1, 1, ENC_BIG_ENDIAN);
818 proto_tree_add_item(wlccp_tree, hf_wlccp_type,
819 tvb, 2, 2, ENC_BIG_ENDIAN);
820 type = tvb_get_ntohs(tvb, 2);
822 proto_tree_add_item(wlccp_tree, hf_wlccp_dstmac,
825 proto_tree_add_item(wlccp_tree, hf_wlccp_srcmac,
829 proto_tree_add_item(wlccp_tree, hf_wlccp_ipv4_address,
830 tvb, 38, 4, ENC_BIG_ENDIAN);
832 proto_tree_add_item(wlccp_tree, hf_wlccp_hostname,
833 tvb, 44, 28, ENC_ASCII|ENC_NA);
834 } /* if type = 0x4081 */
835 } /* if version == 0x00 */
841 ti = proto_tree_add_item(wlccp_tree, hf_wlccp_sap,
842 tvb, offset, 1, ENC_BIG_ENDIAN);
843 wlccp_sap_tree = proto_item_add_subtree(ti, ett_wlccp_sap_tree);
845 proto_tree_add_item(wlccp_sap_tree, hf_wlccp_sap_version,
846 tvb, offset, 1, ENC_BIG_ENDIAN);
848 proto_tree_add_item(wlccp_sap_tree, hf_wlccp_sap_id,
849 tvb, offset, 1, ENC_BIG_ENDIAN);
851 sap_id = tvb_get_guint8(tvb,offset) & SAP_VALUE_MASK;
857 proto_tree_add_item(wlccp_tree, hf_wlccp_destination_node_type,
858 tvb, offset, 2, ENC_BIG_ENDIAN);
861 proto_tree_add_item(wlccp_tree, hf_wlccp_length,
862 tvb, offset, 2, ENC_BIG_ENDIAN);
866 { /* Message Type Field */
867 ti = proto_tree_add_item(wlccp_tree, hf_wlccp_type,
868 tvb, offset, 1, ENC_BIG_ENDIAN);
870 wlccp_type_tree = proto_item_add_subtree(ti, ett_wlccp_type);
872 proto_tree_add_item(wlccp_type_tree, hf_wlccp_subtype,
873 tvb, offset, 1, ENC_BIG_ENDIAN);
881 proto_tree_add_item(wlccp_type_tree, hf_wlccp_base_message_type_0,
882 tvb, offset, 1, ENC_BIG_ENDIAN);
886 } /* case WLCCP_SAP_CCM */
890 proto_tree_add_item(wlccp_type_tree, hf_wlccp_base_message_type_1,
891 tvb, offset, 1, ENC_BIG_ENDIAN);
895 } /* case WLCCP_SAP_SEC */
899 proto_tree_add_item(wlccp_type_tree, hf_wlccp_base_message_type_2,
900 tvb, offset, 1, ENC_BIG_ENDIAN);
904 } /* case WLCCP_SAP_RRM */
908 proto_tree_add_item(wlccp_type_tree, hf_wlccp_base_message_type_3,
909 tvb, offset, 1, ENC_BIG_ENDIAN);
913 } /* case WLCCP_SAP_QOS */
917 proto_tree_add_item(wlccp_type_tree, hf_wlccp_base_message_type_4,
918 tvb, offset, 1, ENC_BIG_ENDIAN);
922 } /* case WLCCP_SAP_NM */
926 proto_tree_add_item(wlccp_type_tree, hf_wlccp_base_message_type_5,
927 tvb, offset, 1, ENC_BIG_ENDIAN);
931 } /* case WLCCP_SAP_MIP */
936 proto_tree_add_item(wlccp_type_tree, hf_wlccp_base_message_type_unknown,
937 tvb, offset, 1, ENC_BIG_ENDIAN);
941 } /* default for switch sap */
945 base_message_type=(tvb_get_guint8(tvb,offset) & MT_BASE_MSG_TYPE );
948 } /* Message Type Field */
950 /* after the Message Type Field things change based on SAP and Message Type */
961 offset = dissect_wlccp_ccm_msg(wlccp_tree, tvb, offset, base_message_type);
965 } /* case WLCCP_SAP_CCM */
970 offset = dissect_wlccp_sec_msg(wlccp_tree, tvb, offset, base_message_type);
974 } /* case WLCCP_SAP_SEC */
979 offset = dissect_wlccp_rrm_msg(wlccp_tree, tvb, offset, base_message_type);
983 } /* case WLCCP_SAP_RRM */
988 offset = dissect_wlccp_qos_msg(wlccp_tree, tvb, offset, base_message_type);
992 } /* case WLCCP_SAP_QOS */
997 offset = dissect_wlccp_nm_msg(wlccp_tree, tvb, offset, base_message_type);
1001 } /* case WLCCP_SAP_NM */
1006 offset = dissect_wlccp_mip_msg(wlccp_tree, tvb, offset, base_message_type);
1010 } /* case WLCCP_SAP_MIP */
1014 /* what should we do if we get an undefined SAP? */
1018 } /* default for switch sap */
1024 if(get_tlv_flag() || get_mic_flag())
1027 if (tvb_length_remaining(tvb,offset) < 4)
1029 /* something is wrong if the TLV flag is set and there's not enough left in the buffer */
1031 /* proto_tree_add_string(wlccp_tree, NULL, tvb, offset, -1, "MIC Flag=%d and TLV Flag=%d, but no data left to decode."); */
1033 } /* if bytes_left <=0 */
1037 while (tvb_length_remaining(tvb,offset) >= 4)
1039 old_offset = offset;
1040 offset = dissect_wlccp_tlvs(wlccp_tree, tvb, offset, 0);
1041 DISSECTOR_ASSERT(offset > old_offset);
1042 } /* while bytes_left */
1045 } /*else bytes_left < 4 */
1047 } /* if tlv_flag || mic_flag */
1049 } /* if version == 0xC1 */
1053 } /* dissect_wlccp */
1056 /*******************************************************************************************/
1058 /* some utility functions */
1060 /* these could be implemented with a struct */
1062 static void set_mic_flag(gboolean flag)
1067 static void set_tlv_flag(gboolean flag)
1070 } /* set_tlv_flag */
1072 static gboolean get_tlv_flag(void)
1075 } /* get_tlv_flag */
1077 static gboolean get_mic_flag(void)
1080 } /* get_mic_flag */
1082 /*******************************************************************************************/
1084 static guint dissect_wlccp_ccm_msg(proto_tree *_tree, tvbuff_t *_tvb, guint _offset, guint8 _base_message_type)
1087 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;
1089 gboolean _relay_flag=0, _mic_flag=0, _tlv_flag=0;
1090 guint8 _aaa_msg_type=0, _eapol_type=0;
1091 guint16 _eap_msg_length=0;
1093 proto_tree_add_item(_tree, hf_wlccp_hops,
1094 _tvb, _offset, 1, ENC_BIG_ENDIAN);
1097 proto_tree_add_item(_tree, hf_wlccp_msg_id,
1098 _tvb, _offset, 2, ENC_BIG_ENDIAN);
1102 /* Decode the CM Flags Field */
1104 _ti = proto_tree_add_item(_tree, hf_wlccp_flags,
1105 _tvb, _offset, 2, ENC_BIG_ENDIAN);
1106 _wlccp_cm_flags_tree = proto_item_add_subtree(_ti, ett_wlccp_cm_flags);
1109 proto_tree_add_item(_wlccp_cm_flags_tree, hf_wlccp_retry_flag,
1110 _tvb, _offset, 2, ENC_BIG_ENDIAN);
1112 proto_tree_add_item(_wlccp_cm_flags_tree, hf_wlccp_response_request_flag,
1113 _tvb, _offset, 2, ENC_BIG_ENDIAN);
1115 proto_tree_add_item(_wlccp_cm_flags_tree, hf_wlccp_tlv_flag,
1116 _tvb, _offset, 2, ENC_BIG_ENDIAN);
1117 _tlv_flag = (tvb_get_ntohs(_tvb, _offset)>>13) & 1;
1118 set_tlv_flag(_tlv_flag);
1120 proto_tree_add_item(_wlccp_cm_flags_tree, hf_wlccp_inbound_flag,
1121 _tvb, _offset, 2, ENC_BIG_ENDIAN);
1123 proto_tree_add_item(_wlccp_cm_flags_tree, hf_wlccp_outbound_flag,
1124 _tvb, _offset, 2, ENC_BIG_ENDIAN);
1126 proto_tree_add_item(_wlccp_cm_flags_tree, hf_wlccp_hopwise_routing_flag,
1127 _tvb, _offset, 2, ENC_BIG_ENDIAN);
1129 proto_tree_add_item(_wlccp_cm_flags_tree, hf_wlccp_root_cm_flag,
1130 _tvb, _offset, 2, ENC_BIG_ENDIAN);
1132 proto_tree_add_item(_wlccp_cm_flags_tree, hf_wlccp_relay_flag,
1133 _tvb, _offset, 2, ENC_BIG_ENDIAN);
1134 _relay_flag = (tvb_get_ntohs(_tvb, _offset)>>8) & 1;
1136 proto_tree_add_item(_wlccp_cm_flags_tree, hf_wlccp_mic_flag,
1137 _tvb, _offset, 2, ENC_BIG_ENDIAN);
1138 _mic_flag = (tvb_get_ntohs(_tvb, _offset)>>7) & 1;
1139 set_mic_flag(_mic_flag);
1143 /* End Decode the CM Flags Field */
1146 proto_tree_add_item(_tree, hf_wlccp_originator_node_type,
1147 _tvb, _offset, 2, ENC_BIG_ENDIAN);
1150 proto_tree_add_item(_tree, hf_wlccp_originator,
1151 _tvb, _offset, 6, ENC_NA);
1154 proto_tree_add_item(_tree, hf_wlccp_responder_node_type,
1155 _tvb, _offset, 2, ENC_BIG_ENDIAN);
1158 proto_tree_add_item(_tree, hf_wlccp_responder,
1159 _tvb, _offset, 6, ENC_NA);
1164 proto_tree_add_item(_tree, hf_wlccp_relay_node_type,
1165 _tvb, _offset, 2, ENC_BIG_ENDIAN);
1168 proto_tree_add_item(_tree, hf_wlccp_relay_node_id,
1169 _tvb, _offset, 6, ENC_NA);
1172 } /* if _relay_flag */
1175 switch (_base_message_type)
1180 proto_tree_add_item(_tree, hf_wlccp_scm_hop_address,
1181 _tvb, _offset, 6, ENC_NA);
1184 /* Decode the SCM Flags Field */
1186 _ti = proto_tree_add_item(_tree, hf_wlccp_scm_flags,
1187 _tvb, _offset, 2, ENC_BIG_ENDIAN);
1188 _wlccp_scm_flags_tree = proto_item_add_subtree(_ti, ett_wlccp_scm_flags);
1190 proto_tree_add_item(_wlccp_scm_flags_tree, hf_wlccp_scm_layer2update_flag,
1191 _tvb, _offset, 2, ENC_BIG_ENDIAN);
1193 proto_tree_add_item(_wlccp_scm_flags_tree, hf_wlccp_scm_unattached_flag,
1194 _tvb, _offset, 2, ENC_BIG_ENDIAN);
1196 proto_tree_add_item(_wlccp_scm_flags_tree, hf_wlccp_scm_unscheduled_flag,
1197 _tvb, _offset, 2, ENC_BIG_ENDIAN);
1199 proto_tree_add_item(_wlccp_scm_flags_tree, hf_wlccp_scm_active_flag,
1200 _tvb, _offset, 2, ENC_BIG_ENDIAN);
1203 /* End Decode the SCM Flags Field */
1206 proto_tree_add_item(_tree, hf_wlccp_scm_election_group,
1207 _tvb, _offset, 1, ENC_BIG_ENDIAN);
1210 proto_tree_add_item(_tree, hf_wlccp_scm_attach_count,
1211 _tvb, _offset, 1, ENC_BIG_ENDIAN);
1214 /* Decode the SCM Priority Flags Field */
1216 _ti = proto_tree_add_item(_tree, hf_wlccp_scm_priority_flags,
1217 _tvb, _offset, 1, ENC_BIG_ENDIAN);
1218 _wlccp_scm_priority_flags_tree = proto_item_add_subtree(_ti, ett_wlccp_scm_priority_flags);
1220 proto_tree_add_item(_wlccp_scm_priority_flags_tree, hf_wlccp_scm_priority,
1221 _tvb, _offset, 1, ENC_BIG_ENDIAN);
1223 proto_tree_add_item(_wlccp_scm_priority_flags_tree, hf_wlccp_scm_preferred_flag,
1224 _tvb, _offset, 1, ENC_BIG_ENDIAN);
1228 /* End Decode the SCM Priority Flags Field */
1230 /* Decode the SCM Bridge Priority Flags Field */
1232 _ti = proto_tree_add_item(_tree, hf_wlccp_scm_bridge_priority_flags,
1233 _tvb, _offset, 1, ENC_BIG_ENDIAN);
1234 _wlccp_scm_bridge_priority_flags_tree = proto_item_add_subtree(_ti, ett_wlccp_scm_bridge_priority_flags);
1236 proto_tree_add_item(_wlccp_scm_bridge_priority_flags_tree, hf_wlccp_scm_bridge_priority,
1237 _tvb, _offset, 1, ENC_BIG_ENDIAN);
1239 proto_tree_add_item(_wlccp_scm_bridge_priority_flags_tree, hf_wlccp_scm_bridge_disable_flag,
1240 _tvb, _offset, 1, ENC_BIG_ENDIAN);
1244 /* End Decode the SCM Bridge Priority Flags Field */
1246 proto_tree_add_item(_tree, hf_wlccp_scm_node_id,
1247 _tvb, _offset, 6, ENC_NA);
1250 proto_tree_add_item(_tree, hf_wlccp_scm_unknown_short,
1251 _tvb, _offset, 2, ENC_BIG_ENDIAN);
1254 proto_tree_add_item(_tree, hf_wlccp_scm_instance_age,
1255 _tvb, _offset, 4, ENC_BIG_ENDIAN);
1258 proto_tree_add_item(_tree, hf_wlccp_scm_path_cost,
1259 _tvb, _offset, 2, ENC_BIG_ENDIAN);
1262 proto_tree_add_item(_tree, hf_wlccp_scm_hop_count,
1263 _tvb, _offset, 1, ENC_BIG_ENDIAN);
1266 proto_tree_add_item(_tree, hf_wlccp_scm_advperiod,
1267 _tvb, _offset, 1, ENC_BIG_ENDIAN);
1327 case 0x0b: /* cmAAA */
1329 proto_tree_add_item(_tree, hf_wlccp_requ_node_type,
1330 _tvb, _offset, 2, ENC_BIG_ENDIAN);
1333 proto_tree_add_item(_tree, hf_wlccp_requ_node_id,
1334 _tvb, _offset, 6, ENC_NA);
1337 /*kan - according to the patent applicatoin these fields vary based
1339 For now we decode what we know about and then we'll come back and add
1342 proto_tree_add_item(_tree, hf_wlccp_aaa_msg_type,
1343 _tvb, _offset, 1, ENC_BIG_ENDIAN);
1344 _aaa_msg_type=tvb_get_guint8(_tvb,_offset);
1347 proto_tree_add_item(_tree, hf_wlccp_aaa_auth_type,
1348 _tvb, _offset, 1, ENC_BIG_ENDIAN);
1351 proto_tree_add_item(_tree, hf_wlccp_keymgmt_type,
1352 _tvb, _offset, 1, ENC_BIG_ENDIAN);
1355 proto_tree_add_item(_tree, hf_wlccp_status,
1356 _tvb, _offset, 1, ENC_BIG_ENDIAN);
1359 /* kan - I'm pretty sure this EAPOL tree only applies sometimes, but it's the only complete example that I have
1360 to test against for now.
1361 For that matter, it may be possible to just hand this piece of the packet over to the EAPOL dissector and let it
1362 handle things. To be investigated further */
1364 if (_aaa_msg_type == 0x2) /*EAPOL*/
1366 _ti = proto_tree_add_item(_tree, hf_wlccp_eapol_msg,
1367 _tvb, _offset, 6, ENC_NA);
1369 _wlccp_eapol_msg_tree = proto_item_add_subtree(
1370 _ti, ett_wlccp_eapol_msg_tree);
1373 /* THIS NEEDS TO BE CHECKED */
1374 /*kan - skip some unknown bytes */
1377 proto_tree_add_item(_wlccp_eapol_msg_tree, hf_wlccp_eapol_version,
1378 _tvb, _offset, 1, ENC_BIG_ENDIAN);
1382 proto_tree_add_item(_wlccp_eapol_msg_tree, hf_wlccp_eapol_type,
1383 _tvb, _offset, 1, ENC_BIG_ENDIAN);
1384 _eapol_type=tvb_get_guint8(_tvb, _offset);
1387 if (_eapol_type == 0)
1389 proto_tree_add_item(_wlccp_eapol_msg_tree, hf_wlccp_eap_msg_length,
1390 _tvb, _offset, 2, ENC_BIG_ENDIAN);
1391 _eap_msg_length=tvb_get_ntohs(_tvb, _offset);
1394 proto_tree_add_item(_wlccp_eapol_msg_tree, hf_wlccp_eap_msg,
1395 _tvb, _offset, _eap_msg_length, ENC_NA);
1396 _offset += _eap_msg_length;
1398 } /* if _eapol_type == 0 */
1400 } /* if _aaa_msg_type ==0x2 */
1402 if (_aaa_msg_type == 0x3) /*Cisco proprietary message*/
1404 proto_tree_add_item(_tree, hf_wlccp_cisco_acctg_msg,
1405 _tvb, _offset, -1, ENC_NA);
1406 } /* if aaa_msg_type == 0x3 */
1411 case 0x0c: /* cmPathInit */
1413 proto_tree_add_item(_tree, hf_wlccp_requ_node_type,
1414 _tvb, _offset, 2, ENC_BIG_ENDIAN);
1417 proto_tree_add_item(_tree, hf_wlccp_requ_node_id,
1418 _tvb, _offset, 6, ENC_NA);
1421 /*kan - there's a reserved alignment byte right here*/
1422 proto_tree_add_item(_tree, hf_wlccp_path_init_rsvd,
1423 _tvb, _offset, 1, ENC_BIG_ENDIAN);
1426 proto_tree_add_item(_tree, hf_wlccp_status,
1427 _tvb, _offset, 1, ENC_BIG_ENDIAN);
1433 case 0x0f: /* cmWIDS */
1435 proto_tree_add_item(_tree, hf_wlccp_wids_msg_type,
1436 _tvb, _offset, 1, ENC_BIG_ENDIAN);
1439 proto_tree_add_item(_tree, hf_wlccp_status,
1440 _tvb, _offset, 1, ENC_BIG_ENDIAN);
1450 } /* default for switch _base_message_type */
1452 } /* switch _base_message_type */
1456 } /* dissect_wlccp_ccm_msg */
1458 static guint dissect_wlccp_sec_msg(proto_tree *_tree _U_, tvbuff_t *_tvb _U_, guint _offset, guint8 _base_message_type)
1461 /* at the momemt we have no more data to use to write this dissector code */
1462 /* it's just a place holder for now */
1464 switch (_base_message_type)
1477 } /* default for switch _base_message_type */
1479 } /* switch _base_message_type */
1485 } /* dissect_wlccp_sec_msg */
1487 static guint dissect_wlccp_rrm_msg(proto_tree *_tree, tvbuff_t *_tvb, guint _offset, guint8 _base_message_type)
1490 proto_tree *_wlccp_rm_flags_tree;
1493 gboolean _mic_flag=0;
1497 /* Decode the RM Flags Field */
1499 _ti = proto_tree_add_item(_tree, hf_wlccp_rm_flags,
1500 _tvb, _offset, 1, ENC_BIG_ENDIAN);
1502 _wlccp_rm_flags_tree = proto_item_add_subtree(_ti, ett_wlccp_rm_flags);
1504 proto_tree_add_item(_wlccp_rm_flags_tree, hf_wlccp_rm_mic_flag,
1505 _tvb, _offset, 1, ENC_BIG_ENDIAN);
1507 _mic_flag = (tvb_get_guint8(_tvb, _offset) & RM_F_MIC) >> 1;
1509 set_mic_flag(_mic_flag);
1513 proto_tree_add_item(_wlccp_rm_flags_tree, hf_wlccp_rm_request_reply_flag,
1514 _tvb, _offset, 1, ENC_BIG_ENDIAN);
1518 /* End Decode the RM Flags Field */
1520 proto_tree_add_item(_tree, hf_wlccp_msg_id,
1521 _tvb, _offset, 2, ENC_BIG_ENDIAN);
1524 proto_tree_add_item(_tree, hf_wlccp_originator_node_type,
1525 _tvb, _offset, 2, ENC_BIG_ENDIAN);
1528 proto_tree_add_item(_tree, hf_wlccp_originator,
1529 _tvb, _offset, 6, ENC_NA);
1532 proto_tree_add_item(_tree, hf_wlccp_responder_node_type,
1533 _tvb, _offset, 2, ENC_BIG_ENDIAN);
1536 proto_tree_add_item(_tree, hf_wlccp_responder,
1537 _tvb, _offset, 6, ENC_NA);
1541 switch (_base_message_type)
1544 case 0x01: /* rmReq */
1549 case 0x02: /* rmReqRoutingResp */
1554 case 0x03: /* rmReport */
1563 } /* default for switch _base_message_type */
1565 } /* switch _base_message_type */
1570 } /* dissect_wlccp_rrm_msg */
1574 static guint dissect_wlccp_qos_msg(proto_tree *_tree _U_, tvbuff_t *_tvb _U_, guint _offset, guint8 _base_message_type)
1576 /* at the momemt we have no more data to use to write this dissector code */
1577 /* it's just a place holder for now */
1580 switch (_base_message_type)
1593 } /* default for switch _base_message_type */
1595 } /* switch _base_message_type */
1600 } /* dissect_wlccp_qos_msg */
1603 static guint dissect_wlccp_nm_msg(proto_tree *_tree, tvbuff_t *_tvb, guint _offset, guint8 _base_message_type)
1606 proto_tree *_wlccp_ap_node_id_tree, *_wlccp_nm_flags_tree;
1608 gboolean _mic_flag=0, _tlv_flag=0;
1611 proto_tree_add_item(_tree, hf_wlccp_nm_version,
1612 _tvb, _offset, 1, ENC_BIG_ENDIAN);
1615 proto_tree_add_item(_tree, hf_wlccp_msg_id,
1616 _tvb, _offset, 2, ENC_BIG_ENDIAN);
1620 /* Decode the NM Flags Field */
1622 _ti = proto_tree_add_item(_tree, hf_wlccp_flags,
1623 _tvb, _offset, 2, ENC_BIG_ENDIAN);
1624 _wlccp_nm_flags_tree = proto_item_add_subtree(_ti, ett_wlccp_nm_flags);
1627 proto_tree_add_item(_wlccp_nm_flags_tree, hf_wlccp_retry_flag,
1628 _tvb, _offset, 2, ENC_BIG_ENDIAN);
1630 proto_tree_add_item(_wlccp_nm_flags_tree, hf_wlccp_ack_required_flag,
1631 _tvb, _offset, 2, ENC_BIG_ENDIAN);
1633 proto_tree_add_item(_wlccp_nm_flags_tree, hf_wlccp_tlv_flag,
1634 _tvb, _offset, 2, ENC_BIG_ENDIAN);
1635 _tlv_flag = (tvb_get_ntohs(_tvb, _offset)>>13) & 1;
1636 set_tlv_flag(_tlv_flag);
1638 proto_tree_add_item(_wlccp_nm_flags_tree, hf_wlccp_mic_flag,
1639 _tvb, _offset, 2, ENC_BIG_ENDIAN);
1640 _mic_flag = (tvb_get_ntohs(_tvb, _offset)>>7) & 1;
1641 set_mic_flag(_mic_flag);
1645 /* End Decode the NM Flags Field */
1648 proto_tree_add_item(_tree, hf_wlccp_originator_node_type,
1649 _tvb, _offset, 2, ENC_BIG_ENDIAN);
1652 proto_tree_add_item(_tree, hf_wlccp_originator,
1653 _tvb, _offset, 6, ENC_NA);
1656 proto_tree_add_item(_tree, hf_wlccp_responder_node_type,
1657 _tvb, _offset, 2, ENC_BIG_ENDIAN);
1660 proto_tree_add_item(_tree, hf_wlccp_responder,
1661 _tvb, _offset, 6, ENC_NA);
1665 switch (_base_message_type)
1668 case 0x01: /* nmAck */
1673 case 0x10: /* nmConfigRequest */
1675 proto_tree_add_item(_tree, hf_wlccp_nmconfig,
1676 _tvb, _offset, 1, ENC_BIG_ENDIAN);
1679 /* kan - there appears to be some padding or other unknowns here */
1685 case 0x11: /* nmConfigReply */
1687 proto_tree_add_item(_tree, hf_wlccp_nmconfig,
1688 _tvb, _offset, 1, ENC_BIG_ENDIAN);
1691 /* kan - there appears to be some padding or other unknowns here */
1697 case 0x20: /* nmApRegistration */
1699 proto_tree_add_item(_tree, hf_wlccp_timestamp,
1700 _tvb, _offset, 8, ENC_BIG_ENDIAN);
1703 proto_tree_add_item(_tree, hf_wlccp_apregstatus,
1704 _tvb, _offset, 1, ENC_BIG_ENDIAN);
1707 _offset += 3; /*kan - skip some apparently unused bytes */
1709 _ti = proto_tree_add_item(_tree, hf_wlccp_ap_node_id,
1710 _tvb, _offset, 8, ENC_NA);
1712 _wlccp_ap_node_id_tree = proto_item_add_subtree(
1713 _ti, ett_wlccp_ap_node_id);
1715 proto_tree_add_item(_wlccp_ap_node_id_tree, hf_wlccp_ap_node_type,
1716 _tvb, _offset, 2, ENC_BIG_ENDIAN);
1719 proto_tree_add_item(_wlccp_ap_node_id_tree, hf_wlccp_ap_node_id_address,
1720 _tvb, _offset, 6, ENC_NA);
1726 case 0x21: /* nmScmStateChange */
1728 proto_tree_add_item(_tree, hf_wlccp_timestamp,
1729 _tvb, _offset, 8, ENC_BIG_ENDIAN);
1732 proto_tree_add_item(_tree, hf_wlccp_scmstate_change,
1733 _tvb, _offset, 1, ENC_BIG_ENDIAN);
1736 proto_tree_add_item(_tree, hf_wlccp_scmstate_change_reason,
1737 _tvb, _offset, 1, ENC_BIG_ENDIAN);
1740 /*kan - skip some apparently unused bytes */
1746 case 0x22: /* nmScmKeepActive */
1748 proto_tree_add_item(_tree, hf_wlccp_scmattach_state,
1749 _tvb, _offset, 1, ENC_BIG_ENDIAN);
1752 proto_tree_add_item(_tree, hf_wlccp_nmconfig,
1753 _tvb, _offset, 1, ENC_BIG_ENDIAN);
1756 proto_tree_add_item(_tree, hf_wlccp_nmcapability,
1757 _tvb, _offset, 1, ENC_BIG_ENDIAN);
1760 /*kan - skip some apparently unused bytes */
1766 case 0x30: /* nmClientEventReport */
1768 proto_tree_add_item(_tree, hf_wlccp_timestamp,
1769 _tvb, _offset, 8, ENC_BIG_ENDIAN);
1775 case 0x31: /* nmAllClientRefreshRequest */
1777 proto_tree_add_item(_tree, hf_wlccp_refresh_req_id,
1778 _tvb, _offset, 4, ENC_BIG_ENDIAN);
1788 } /* default for switch _base_message_type */
1790 } /* switch _base_message_type */
1796 } /* dissect_wlccp_nm_msg */
1798 static guint dissect_wlccp_mip_msg(proto_tree *_tree _U_, tvbuff_t *_tvb _U_, guint _offset, guint8 _base_message_type)
1800 /* at the momemt we have no more data to use to write this dissector code */
1801 /* it's just a place holder for now */
1803 switch (_base_message_type)
1816 } /* default for switch _base_message_type */
1818 } /* switch _base_message_type */
1822 } /* dissect_wlccp_mip_msg */
1825 /***************************************************************************************************/
1827 static guint dissect_wlccp_tlvs( proto_tree *_tree, tvbuff_t *_tvb, guint _offset, guint _depth)
1830 proto_item *_ti, *_temp_ti;
1831 proto_tree *_tlv_tree;
1832 proto_tree *_tlv_flags_tree;
1834 gboolean _container_flag=0;
1835 gint _group_id=0, _type_id=0;
1842 /* the TLV length is 2 bytes into the TLV, and we need it now */
1843 _length = tvb_get_ntohs(_tvb,_offset+2);
1845 /* figure out where the end of this TLV is so we know when to stop dissecting it */
1846 _tlv_end = _offset + _length;
1848 /* this TLV is _length bytes long */
1849 _ti = proto_tree_add_item(_tree, hf_wlccp_tlv, _tvb, _offset, _length, ENC_NA);
1850 /* create the TLV sub tree */
1851 _tlv_tree = proto_item_add_subtree(_ti, ett_wlccp_tlv_tree);
1853 /* save the pointer because we'll add some text to it later */
1858 /* add an arbitrary safety factor in case we foul up the dissector recursion */
1859 DISSECTOR_ASSERT(_depth < 100);
1861 /* add the flags field to the tlv_tree */
1862 _ti = proto_tree_add_item(_tlv_tree, hf_tlv_flags, _tvb, _offset, 2, ENC_BIG_ENDIAN);
1863 _tlv_flags_tree = proto_item_add_subtree(_ti, ett_tlv_flags_tree);
1866 first 2 bytes are the flags, Group and Type
1869 bits 2-3 = reserved,
1870 bits 4-7 = group ID,
1876 /* the TLV group and type IDs are contained in the flags field, extract them */
1877 _group_id = (tvb_get_ntohs(_tvb,_offset) & TLV_GROUP_ID) >> 8;
1878 _type_id = (tvb_get_ntohs(_tvb,_offset) & TLV_TYPE_ID);
1880 /* add the flags to the tree */
1881 proto_tree_add_item(_tlv_flags_tree, hf_wlccp_tlv_container_flag, _tvb, _offset, 2, ENC_BIG_ENDIAN);
1882 proto_tree_add_item(_tlv_flags_tree, hf_wlccp_tlv_encrypted_flag, _tvb, _offset, 2, ENC_BIG_ENDIAN);
1883 proto_tree_add_item(_tlv_flags_tree, hf_wlccp_tlv_reserved_bit, _tvb, _offset, 2, ENC_BIG_ENDIAN);
1884 proto_tree_add_item(_tlv_flags_tree, hf_wlccp_tlv_group, _tvb, _offset, 2, ENC_BIG_ENDIAN);
1885 proto_tree_add_item(_tlv_flags_tree, hf_wlccp_tlv_request_flag, _tvb, _offset, 2, ENC_BIG_ENDIAN);
1887 /* a hack to show the right string representation of the type_id in the tree */
1890 case WLCCP_TLV_GROUP_WLCCP:
1892 proto_tree_add_item(_tlv_flags_tree, hf_wlccp_tlv_type0, _tvb, _offset, 2, ENC_BIG_ENDIAN);
1894 } /* case WLCCP_TLV_GROUP_WLCCP */
1896 case WLCCP_TLV_GROUP_SEC:
1898 proto_tree_add_item(_tlv_flags_tree, hf_wlccp_tlv_type1, _tvb, _offset, 2, ENC_BIG_ENDIAN);
1900 } /* case WLCCP_TLV_GROUP_SEC */
1902 case WLCCP_TLV_GROUP_RRM:
1904 proto_tree_add_item(_tlv_flags_tree, hf_wlccp_tlv_type2, _tvb, _offset, 2, ENC_BIG_ENDIAN);
1906 } /* case WLCCP_TLV_GROUP_RRM */
1908 case WLCCP_TLV_GROUP_QOS:
1910 proto_tree_add_item(_tlv_flags_tree, hf_wlccp_tlv_type3, _tvb, _offset, 2, ENC_BIG_ENDIAN);
1912 } /* case WLCCP_TLV_GROUP_QOS */
1914 case WLCCP_TLV_GROUP_NM:
1916 proto_tree_add_item(_tlv_flags_tree, hf_wlccp_tlv_type4, _tvb, _offset, 2, ENC_BIG_ENDIAN);
1918 } /* case WLCCP_TLV_GROUP_NM */
1920 case WLCCP_TLV_GROUP_MIP:
1922 proto_tree_add_item(_tlv_flags_tree, hf_wlccp_tlv_type5, _tvb, _offset, 2, ENC_BIG_ENDIAN);
1924 } /* case WLCCP_TLV_GROUP_MIP */
1928 proto_tree_add_item(_tlv_flags_tree, hf_wlccp_tlv_type, _tvb, _offset, 2, ENC_BIG_ENDIAN);
1930 } /* case default for switch _group_id */
1933 } /* switch _group_id */
1935 _container_flag = (tvb_get_ntohs(_tvb, _offset) & TLV_F_CONTAINER) >> 15;
1937 /* according to the patent, some behavior changes if the request flag is set */
1938 /* it would be nice if it said how, but I don't think it matters for decoding purposes */
1942 /* finished with the flags field */
1944 /* add the length field to the tlv_tree */
1945 proto_tree_add_item(_tlv_tree, hf_wlccp_tlv_length, _tvb, _offset, 2, ENC_BIG_ENDIAN);
1948 /* finished with the length field */
1950 /* now decode the fixed fields in each TLV */
1954 case WLCCP_TLV_GROUP_WLCCP:
1956 _offset = dissect_wlccp_ccm_tlv(_tlv_tree, _tvb, _offset, _type_id, _length - 4, _temp_ti);
1959 } /* case WLCCP_TLV_GROUP_WLCCP */
1961 case WLCCP_TLV_GROUP_SEC:
1963 _offset = dissect_wlccp_sec_tlv(_tlv_tree, _tvb, _offset, _type_id, _length - 4, _temp_ti);
1966 } /* case WLCCP_TLV_GROUP_SEC */
1968 case WLCCP_TLV_GROUP_RRM:
1970 _offset = dissect_wlccp_rrm_tlv(_tlv_tree, _tvb, _offset, _type_id, _length - 4, _temp_ti);
1973 } /* case WLCCP_TLV_GROUP_RRM */
1975 case WLCCP_TLV_GROUP_QOS:
1977 _offset = dissect_wlccp_qos_tlv(_tlv_tree, _tvb, _offset, _type_id, _length - 4, _temp_ti);
1980 } /* case WLCCP_TLV_GROUP_QOS */
1982 case WLCCP_TLV_GROUP_NM:
1984 _offset = dissect_wlccp_nm_tlv(_tlv_tree, _tvb, _offset, _type_id, _length - 4, _temp_ti);
1987 } /* case WLCCP_TLV_GROUP_NM */
1989 case WLCCP_TLV_GROUP_MIP:
1991 _offset = dissect_wlccp_mip_tlv(_tlv_tree, _tvb, _offset, _type_id, _length - 4, _temp_ti);
1994 } /* case WLCCP_TLV_GROUP_MIP */
2000 } /* case default for switch _group_id */
2002 } /* switch _group_id */
2004 /* done with decoding the fixed TLV fields */
2008 /* If this TLV is a container, then build a sub tree and decode the contained TLVs */
2010 if (_container_flag && (_offset >= _tlv_end) )
2012 /* something is wrong if there's not enough left in the buffer */
2014 } /* if container_flag and _offset >= _tlv_end */
2015 else /* _container_flag && _offset >= tlv_end */
2018 if (_container_flag && (_offset < _tlv_end) )
2021 while (_offset < _tlv_end)
2023 _old_offset = _offset;
2024 _offset = dissect_wlccp_tlvs(_tlv_tree, _tvb, _offset, _depth++);
2025 DISSECTOR_ASSERT(_offset > _old_offset);
2026 } /* while bytes_left >= 4*/
2028 } /* _container_flag && (tvb_length_remaining(_tvb,_offset) >= 4) */
2030 } /*_container_flag && (tvb_length_remaining(_tvb,_offset) < 4) */
2033 /* done with decoding the contained TLVs */
2037 } /* dissect_wlccp_tlvs */
2040 /* ************************************************************************************************************* */
2042 /* ALL THE TLV SUB-DISSECTORS NEED A DEFAULT CASE, OTHERWISE WE'LL GET INTO AN INFINITE RECURSION LOOP INSIDE */
2043 /* THE CALLING FUNCTION dissect_wlccp_tlvs. BESIDES, IT'S JUST GOOD FORM :-) */
2046 static guint dissect_wlccp_ccm_tlv(proto_tree *_tree, tvbuff_t *_tvb, guint _offset, gint _type_id, guint _length, proto_item *_ti)
2052 case 0x00: /* NULL TLV */
2054 proto_item_append_text(_ti, " NULL TLV");
2055 proto_tree_add_item(_tree, hf_wlccp_null_tlv , _tvb, _offset, _length, ENC_NA);
2060 } /* case tlv_type_id = 0x09 */
2063 case 0x09: /* ipv4Address */
2065 proto_item_append_text(_ti, " IPv4Address");
2066 proto_tree_add_item(_tree, hf_wlccp_ipv4_address, _tvb, _offset, 4, ENC_BIG_ENDIAN);
2071 } /* case tlv_type_id = 0x09 */
2076 /* for unknown types, just add them to the tree as a blob */
2077 proto_item_append_text(_ti, " Unknown");
2079 proto_tree_add_item(_tree, hf_wlccp_tlv_unknown_value, _tvb, _offset, _length, ENC_NA);
2083 } /* case default for tlv_group_id=0x00 */
2085 } /* switch _type_id */
2089 } /* dissect_wlccp_ccm_tlv */
2093 static guint dissect_wlccp_sec_tlv(proto_tree *_tree, tvbuff_t *_tvb, guint _offset, gint _type_id, guint _length, proto_item *_ti)
2099 case 0x01: /* initSession */
2102 proto_item_append_text(_ti, " initSession");
2104 /* skip some unused bytes */
2107 proto_tree_add_item(_tree, hf_wlccp_path_length, _tvb, _offset, 1, ENC_BIG_ENDIAN);
2110 /* skip some unused bytes */
2117 case 0x02: /* inSecureContextReq */
2120 proto_item_append_text(_ti, " inSecureContextReq");
2122 proto_tree_add_item(_tree, hf_wlccp_key_seq_count, _tvb, _offset, 4, ENC_BIG_ENDIAN);
2125 proto_tree_add_item(_tree, hf_wlccp_dest_node_type, _tvb, _offset, 2, ENC_BIG_ENDIAN);
2128 proto_tree_add_item(_tree, hf_wlccp_dest_node_id, _tvb, _offset, 6, ENC_NA);
2131 proto_tree_add_item(_tree, hf_wlccp_supp_node_type, _tvb, _offset, 2, ENC_BIG_ENDIAN);
2134 proto_tree_add_item(_tree, hf_wlccp_supp_node_id, _tvb, _offset, 6, ENC_NA);
2137 /* skip unused bytes */
2140 proto_tree_add_item(_tree, hf_wlccp_key_mgmt_type, _tvb, _offset, 1, ENC_BIG_ENDIAN);
2143 proto_tree_add_item(_tree, hf_wlccp_nonce, _tvb, _offset, 32, ENC_NA);
2150 case 0x06: /* authenticator */
2153 proto_item_append_text(_ti, " authenticator");
2155 proto_tree_add_item(_tree, hf_wlccp_dest_node_type, _tvb, _offset, 2, ENC_BIG_ENDIAN);
2158 proto_tree_add_item(_tree, hf_wlccp_dest_node_id, _tvb, _offset, 6, ENC_NA);
2161 proto_tree_add_item(_tree, hf_wlccp_src_node_type, _tvb, _offset, 2, ENC_BIG_ENDIAN);
2164 proto_tree_add_item(_tree, hf_wlccp_src_node_id, _tvb, _offset, 6, ENC_NA);
2167 proto_tree_add_item(_tree, hf_wlccp_key_seq_count, _tvb, _offset, 4, ENC_BIG_ENDIAN);
2170 /* skip unused bytes */
2173 proto_tree_add_item(_tree, hf_wlccp_status, _tvb, _offset, 1, ENC_BIG_ENDIAN);
2176 proto_tree_add_item(_tree, hf_wlccp_nonce, _tvb, _offset, 32, ENC_NA);
2182 case 0x08: /* MIC */
2185 guint16 _mic_length=0;
2187 proto_item_append_text(_ti, " mic");
2189 proto_tree_add_item(_tree, hf_wlccp_mic_msg_seq_count, _tvb, _offset, 8, ENC_BIG_ENDIAN);
2192 proto_tree_add_item(_tree, hf_wlccp_mic_length, _tvb, _offset, 2, ENC_BIG_ENDIAN);
2193 _mic_length = tvb_get_ntohs(_tvb,_offset);
2196 proto_tree_add_item(_tree, hf_wlccp_mic_value, _tvb, _offset, _mic_length, ENC_NA);
2197 _offset += _mic_length;
2202 case 0x0a: /* inSecureContextReply */
2205 proto_item_append_text(_ti, " inSecureContextReply");
2208 proto_tree_add_item(_tree, hf_wlccp_key_seq_count, _tvb, _offset, 4, ENC_BIG_ENDIAN);
2211 proto_tree_add_item(_tree, hf_wlccp_dest_node_type, _tvb, _offset, 2, ENC_BIG_ENDIAN);
2214 proto_tree_add_item(_tree, hf_wlccp_dest_node_id, _tvb, _offset, 6, ENC_NA);
2217 proto_tree_add_item(_tree, hf_wlccp_supp_node_type, _tvb, _offset, 2, ENC_BIG_ENDIAN);
2220 proto_tree_add_item(_tree, hf_wlccp_supp_node_id, _tvb, _offset, 6, ENC_NA);
2223 proto_tree_add_item(_tree, hf_wlccp_nonce, _tvb, _offset, 32, ENC_NA);
2226 proto_tree_add_item(_tree, hf_wlccp_session_timeout, _tvb, _offset, 4, ENC_BIG_ENDIAN);
2236 /* for unknown types, just add them to the tree as a blob */
2237 proto_item_append_text(_ti, " Unknown");
2238 proto_tree_add_item(_tree, hf_wlccp_tlv_unknown_value, _tvb, _offset, _length, ENC_NA);
2242 } /* default case for switch (_type_id) */
2244 } /* switch _type_id */
2247 } /* dissect_wlccp_sec_tlv */
2251 static guint dissect_wlccp_rrm_tlv(proto_tree *_tree, tvbuff_t *_tvb, guint _offset, gint _type_id, guint _length, proto_item *_ti)
2257 case 0x02: /* aggrRmReq */
2259 proto_item_append_text(_ti, " aggrRmReq");
2260 proto_tree_add_item(_tree, hf_wlccp_token2, _tvb, _offset, 2, ENC_BIG_ENDIAN);
2263 proto_tree_add_item(_tree, hf_wlccp_interval, _tvb, _offset, 2, ENC_BIG_ENDIAN);
2268 } /* case tlv_type_id = 0x02 */
2270 case 0x03 : /* rmReport */
2272 proto_item_append_text(_ti, " rmReport");
2274 proto_tree_add_item(_tree, hf_wlccp_sta_type, _tvb, _offset, 1, ENC_BIG_ENDIAN);
2277 proto_tree_add_item(_tree, hf_wlccp_bssid, _tvb, _offset, 6, ENC_NA);
2280 proto_tree_add_item(_tree, hf_wlccp_stamac, _tvb, _offset, 6, ENC_NA);
2284 } /* case tlv_type_id = 0x03 */
2286 case 0x04: /* aggrRmReport */
2288 proto_item_append_text(_ti, " aggrRmReport");
2293 } /* case tlv_type_id = 0x04 */
2295 case 0x12: /* beaconRequest */
2297 proto_item_append_text(_ti, " beaconRequest");
2299 proto_tree_add_item(_tree, hf_wlccp_token, _tvb, _offset, 1, ENC_BIG_ENDIAN);
2302 proto_tree_add_item(_tree, hf_wlccp_mode, _tvb, _offset, 1, ENC_BIG_ENDIAN);
2305 proto_tree_add_item(_tree, hf_wlccp_channel, _tvb, _offset, 1, ENC_BIG_ENDIAN);
2308 proto_tree_add_item(_tree, hf_wlccp_scan_mode, _tvb, _offset, 1, ENC_BIG_ENDIAN);
2311 proto_tree_add_item(_tree, hf_wlccp_duration, _tvb, _offset, 2, ENC_BIG_ENDIAN);
2318 case 0x14: /* frameRequest */
2321 guint _count=0, _counter=0;
2323 proto_item_append_text(_ti, " frameRequest");
2325 proto_tree_add_item(_tree, hf_wlccp_token, _tvb, _offset, 1, ENC_BIG_ENDIAN);
2328 proto_tree_add_item(_tree, hf_wlccp_mode, _tvb, _offset, 1, ENC_BIG_ENDIAN);
2331 proto_tree_add_item(_tree, hf_wlccp_channel, _tvb, _offset, 1, ENC_BIG_ENDIAN);
2334 proto_tree_add_item(_tree, hf_wlccp_count, _tvb, _offset, 1, ENC_BIG_ENDIAN);
2335 _count = tvb_get_guint8(_tvb,_offset);
2338 proto_tree_add_item(_tree, hf_wlccp_duration, _tvb, _offset, 2, ENC_BIG_ENDIAN);
2341 for (_counter=0; _counter < _count; _counter++)
2344 proto_tree_add_item(_tree, hf_wlccp_bssid, _tvb, _offset, 6, ENC_NA);
2347 } /* for _counter=0 */
2354 case 0x15: /* frameReport */
2358 proto_tree *_fr_elems_tree;
2360 guint _counter=0, _arraylen=0;
2362 proto_item_append_text(_ti, " frameReport");
2364 proto_tree_add_item(_tree, hf_wlccp_token, _tvb, _offset, 1, ENC_BIG_ENDIAN);
2367 proto_tree_add_item(_tree, hf_wlccp_mode, _tvb, _offset, 1, ENC_BIG_ENDIAN);
2370 proto_tree_add_item(_tree, hf_wlccp_channel, _tvb, _offset, 1, ENC_BIG_ENDIAN);
2373 /* skip some unused bytes */
2376 proto_tree_add_item(_tree, hf_wlccp_duration, _tvb, _offset, 2, ENC_BIG_ENDIAN);
2379 _arraylen=(_length-10)/14;
2384 _fr_ti = proto_tree_add_item(_tree, hf_framereport_elements, _tvb, _offset, (_length-10), ENC_NA);
2385 _fr_elems_tree = proto_item_add_subtree(_fr_ti, ett_framereport_elements_tree);
2387 for(_counter=0; _counter < _arraylen; _counter++)
2390 proto_tree_add_item(_fr_elems_tree, hf_wlccp_numframes, _tvb, _offset, 1, ENC_BIG_ENDIAN);
2393 proto_tree_add_item(_fr_elems_tree, hf_wlccp_rss, _tvb, _offset, 1, ENC_BIG_ENDIAN);
2396 proto_tree_add_item(_fr_elems_tree, hf_wlccp_bssid, _tvb, _offset, 6, ENC_NA);
2399 proto_tree_add_item(_fr_elems_tree, hf_wlccp_stamac, _tvb, _offset, 6, ENC_NA);
2402 } /* for _counter=0 */
2404 } /* if _arraylen > 0 */
2411 case 0x16: /* ccaRequest */
2413 proto_item_append_text(_ti, " ccaRequest");
2415 proto_tree_add_item(_tree, hf_wlccp_token, _tvb, _offset, 1, ENC_BIG_ENDIAN);
2418 proto_tree_add_item(_tree, hf_wlccp_mode, _tvb, _offset, 1, ENC_BIG_ENDIAN);
2421 proto_tree_add_item(_tree, hf_wlccp_channel, _tvb, _offset, 1, ENC_BIG_ENDIAN);
2424 /* skip some unused bytes */
2427 proto_tree_add_item(_tree, hf_wlccp_duration, _tvb, _offset, 2, ENC_BIG_ENDIAN);
2434 case 0x17: /* ccaReport */
2436 proto_item_append_text(_ti, " ccaReport");
2438 proto_tree_add_item(_tree, hf_wlccp_token, _tvb, _offset, 1, ENC_BIG_ENDIAN);
2441 proto_tree_add_item(_tree, hf_wlccp_mode, _tvb, _offset, 1, ENC_BIG_ENDIAN);
2444 proto_tree_add_item(_tree, hf_wlccp_channel, _tvb, _offset, 1, ENC_BIG_ENDIAN);
2447 /* skip some unused bytes */
2450 proto_tree_add_item(_tree, hf_wlccp_duration, _tvb, _offset, 2, ENC_BIG_ENDIAN);
2453 proto_tree_add_item(_tree, hf_wlccp_ccabusy, _tvb, _offset, 1, ENC_BIG_ENDIAN);
2458 } /* case tlv_type_id = 0x17 */
2460 case 0x18: /* rpiHistRequest */
2462 proto_item_append_text(_ti, " rpiHistRequest");
2464 proto_tree_add_item(_tree, hf_wlccp_token, _tvb, _offset, 1, ENC_BIG_ENDIAN);
2467 proto_tree_add_item(_tree, hf_wlccp_mode, _tvb, _offset, 1, ENC_BIG_ENDIAN);
2470 proto_tree_add_item(_tree, hf_wlccp_channel, _tvb, _offset, 1, ENC_BIG_ENDIAN);
2473 /* skip some unused bytes */
2476 proto_tree_add_item(_tree, hf_wlccp_duration, _tvb, _offset, 2, ENC_BIG_ENDIAN);
2482 case 0x19: /* rpiHistReport */
2485 guint _rpi_density_length=0;
2487 proto_item_append_text(_ti, " rpiHistReport");
2489 proto_tree_add_item(_tree, hf_wlccp_token, _tvb, _offset, 1, ENC_BIG_ENDIAN);
2492 proto_tree_add_item(_tree, hf_wlccp_mode, _tvb, _offset, 1, ENC_BIG_ENDIAN);
2495 proto_tree_add_item(_tree, hf_wlccp_channel, _tvb, _offset, 1, ENC_BIG_ENDIAN);
2498 /* skip some unused bytes */
2501 proto_tree_add_item(_tree, hf_wlccp_duration, _tvb, _offset, 2, ENC_BIG_ENDIAN);
2504 _rpi_density_length = _length - 6 - 4;
2506 proto_tree_add_item(_tree, hf_wlccp_rpidensity, _tvb, _offset, _rpi_density_length, ENC_NA);
2507 _offset += _rpi_density_length;
2511 } /* case tlv_type_id = 0x19 */
2513 case 0x1c: /* nullRequest */
2515 proto_item_append_text(_ti, " nullRequest");
2517 proto_tree_add_item(_tree, hf_wlccp_token, _tvb, _offset, 1, ENC_BIG_ENDIAN);
2520 proto_tree_add_item(_tree, hf_wlccp_mode, _tvb, _offset, 1, ENC_BIG_ENDIAN);
2523 proto_tree_add_item(_tree, hf_wlccp_channel, _tvb, _offset, 1, ENC_BIG_ENDIAN);
2526 /* skip some unused bytes */
2529 proto_tree_add_item(_tree, hf_wlccp_duration, _tvb, _offset, 2, ENC_BIG_ENDIAN);
2536 case 0x1e: /* commonBeaconReport */
2539 proto_tree *_80211_capabilities_tree;
2540 proto_item *_new_ti;
2542 guint _tlv80211length=0;
2544 proto_item_append_text(_ti, " commonBeaconReport");
2546 proto_tree_add_item(_tree, hf_wlccp_srcidx, _tvb, _offset, 1, ENC_BIG_ENDIAN);
2549 proto_tree_add_item(_tree, hf_wlccp_channel, _tvb, _offset, 1, ENC_BIG_ENDIAN);
2552 proto_tree_add_item(_tree, hf_wlccp_phy_type, _tvb, _offset, 1, ENC_BIG_ENDIAN);
2555 proto_tree_add_item(_tree, hf_wlccp_bssid, _tvb, _offset, 6, ENC_NA);
2558 proto_tree_add_item(_tree, hf_wlccp_beacon_interval, _tvb, _offset, 2, ENC_BIG_ENDIAN);
2563 if we assume the next field is the capabilities field from the 802.11 beacon,
2564 then we have a 16-bit field thhf_wlccp_statusat contains the following (802.11-2007):
2568 bit 3 = CF Poll Request
2570 bit 5 = Short Preamble
2572 bit 7 = Channel Agility
2573 bit 8 = Spectrum Management
2575 bit 10 = Short Slot Time
2579 bit 14 = Delayed Block Ack
2580 bit 15 = Immediate Block Ack
2583 _new_ti = proto_tree_add_item(_tree, hf_wlccp_80211_capabilities,
2584 _tvb, _offset, 2, ENC_BIG_ENDIAN);
2585 _80211_capabilities_tree = proto_item_add_subtree(_new_ti, ett_80211_capability_flags_tree);
2587 proto_tree_add_item(_80211_capabilities_tree, hf_80211_imm_block_ack,
2588 _tvb, _offset, 2, ENC_BIG_ENDIAN);
2589 proto_tree_add_item(_80211_capabilities_tree, hf_80211_dlyd_block_ack,
2590 _tvb, _offset, 2, ENC_BIG_ENDIAN);
2591 proto_tree_add_item(_80211_capabilities_tree, hf_80211_dsss_ofdm,
2592 _tvb, _offset, 2, ENC_BIG_ENDIAN);
2593 proto_tree_add_item(_80211_capabilities_tree, hf_80211_reserved,
2594 _tvb, _offset, 2, ENC_BIG_ENDIAN);
2595 proto_tree_add_item(_80211_capabilities_tree, hf_80211_apsd,
2596 _tvb, _offset, 2, ENC_BIG_ENDIAN);
2597 proto_tree_add_item(_80211_capabilities_tree, hf_80211_short_time_slot,
2598 _tvb, _offset, 2, ENC_BIG_ENDIAN);
2599 proto_tree_add_item(_80211_capabilities_tree, hf_80211_qos,
2600 _tvb, _offset, 2, ENC_BIG_ENDIAN);
2601 proto_tree_add_item(_80211_capabilities_tree, hf_80211_spectrum_mgmt,
2602 _tvb, _offset, 2, ENC_BIG_ENDIAN);
2603 proto_tree_add_item(_80211_capabilities_tree, hf_80211_chan_agility,
2604 _tvb, _offset, 2, ENC_BIG_ENDIAN);
2605 proto_tree_add_item(_80211_capabilities_tree, hf_80211_pbcc,
2606 _tvb, _offset, 2, ENC_BIG_ENDIAN);
2607 proto_tree_add_item(_80211_capabilities_tree, hf_80211_short_preamble,
2608 _tvb, _offset, 2, ENC_BIG_ENDIAN);
2609 proto_tree_add_item(_80211_capabilities_tree, hf_80211_cap_privacy,
2610 _tvb, _offset, 2, ENC_BIG_ENDIAN);
2611 proto_tree_add_item(_80211_capabilities_tree, hf_80211_cap_cf_poll_req,
2612 _tvb, _offset, 2, ENC_BIG_ENDIAN);
2613 proto_tree_add_item(_80211_capabilities_tree, hf_80211_cap_cf_pollable,
2614 _tvb, _offset, 2, ENC_BIG_ENDIAN);
2615 proto_tree_add_item(_80211_capabilities_tree, hf_80211_cap_ibss,
2616 _tvb, _offset, 2, ENC_BIG_ENDIAN);
2617 proto_tree_add_item(_80211_capabilities_tree, hf_80211_cap_ess,
2618 _tvb, _offset, 2, ENC_BIG_ENDIAN);;
2620 /* proto_tree_add_item(_tree, hf_wlccp_capabilities, _tvb, _offset, 2, ENC_BIG_ENDIAN); */
2624 _tlv80211length = _length - 13 - 4;
2626 /* This TLV could be decoded per the 802.11 information element spec's */
2627 proto_tree_add_item(_tree, hf_wlccp_tlv80211, _tvb, _offset, _tlv80211length, ENC_NA);
2628 _offset += _tlv80211length;
2632 } /* case tlv_type_id = 0x1e */
2635 case 0x1f: /* aggrBeaconReport */
2637 proto_item_append_text(_ti, " aggrBeaconReport");
2639 proto_tree_add_item(_tree, hf_wlccp_token, _tvb, _offset, 1, ENC_BIG_ENDIAN);
2642 proto_tree_add_item(_tree, hf_wlccp_mode, _tvb, _offset, 1, ENC_BIG_ENDIAN);
2645 proto_tree_add_item(_tree, hf_wlccp_rss, _tvb, _offset, 1, ENC_BIG_ENDIAN);
2648 proto_tree_add_item(_tree, hf_wlccp_srcidx, _tvb, _offset, 1, ENC_BIG_ENDIAN);
2651 proto_tree_add_item(_tree, hf_wlccp_parent_tsf, _tvb, _offset, 4, ENC_BIG_ENDIAN);
2654 proto_tree_add_item(_tree, hf_wlccp_target_tsf, _tvb, _offset, 8, ENC_BIG_ENDIAN);
2658 } /* case tlv_type_id = 0x1f */
2661 case 0x20: /* rmReqRoutingList */
2664 guint _counter=0, _arraylen=0;
2666 proto_item_append_text(_ti, " rmReqRoutingList");
2668 _arraylen=(_length)/16;
2673 for(_counter=0; _counter < _arraylen; _counter++)
2676 proto_tree_add_item(_tree, hf_wlccp_ipv4_address, _tvb, _offset, 4, ENC_BIG_ENDIAN);
2679 proto_tree_add_item(_tree, hf_wlccp_bssid, _tvb, _offset, 6, ENC_NA);
2682 proto_tree_add_item(_tree, hf_wlccp_stamac, _tvb, _offset, 6, ENC_NA);
2685 } /* for _counter=0 */
2687 } /* if _arraylen > 0 */
2691 case 0x21: /* rmReqRoutingResp */
2694 guint _counter=0, _arraylen=0;
2696 proto_item_append_text(_ti, " rmReqRoutingResp");
2698 proto_tree_add_item(_tree, hf_wlccp_token2, _tvb, _offset, 2, ENC_BIG_ENDIAN);
2701 _arraylen=(_length)/11;
2706 for(_counter=0; _counter < _arraylen; _counter++)
2709 proto_tree_add_item(_tree, hf_wlccp_ipv4_address, _tvb, _offset, 4, ENC_BIG_ENDIAN);
2712 proto_tree_add_item(_tree, hf_wlccp_bssid, _tvb, _offset, 6, ENC_NA);
2715 proto_tree_add_item(_tree, hf_wlccp_status, _tvb, _offset, 1, ENC_BIG_ENDIAN);
2718 } /* for _counter=0 */
2720 } /* if _arraylen > 0 */
2725 case 0x22: /* rmReqAck */
2727 proto_item_append_text(_ti, " rmReqAck");
2729 proto_tree_add_item(_tree, hf_wlccp_status, _tvb, _offset, 1, ENC_BIG_ENDIAN);
2736 case 0x58: /* mfpCapability */
2738 proto_item_append_text(_ti, " mfpCapability");
2740 proto_tree_add_item(_tree, hf_wlccp_mfpcapability, _tvb, _offset, 2, ENC_BIG_ENDIAN);
2746 case 0x5b: /* mfpRouting */
2748 proto_item_append_text(_ti, " mfpRouting");
2750 proto_tree_add_item(_tree, hf_wlccp_ipv4_address, _tvb, _offset, 4, ENC_BIG_ENDIAN);
2753 proto_tree_add_item(_tree, hf_wlccp_bssid, _tvb, _offset, 6, ENC_NA);
2756 proto_tree_add_item(_tree, hf_wlccp_mfpflags, _tvb, _offset, 2, ENC_BIG_ENDIAN);
2762 case 0x5c: /* mfpConfig */
2764 proto_item_append_text(_ti, " mfpConfig");
2766 proto_tree_add_item(_tree, hf_wlccp_mfpconfig, _tvb, _offset, 2, ENC_BIG_ENDIAN);
2775 /* for unknown types, just add them to the tree as a blob */
2776 proto_item_append_text(_ti, " Unknown");
2778 proto_tree_add_item(_tree, hf_wlccp_tlv_unknown_value, _tvb, _offset, _length, ENC_NA);
2782 } /* case default */
2784 } /* switch type_id */
2788 } /* dissect_wlccp_rrm_tlv */
2790 static guint dissect_wlccp_qos_tlv(proto_tree *_tree, tvbuff_t *_tvb, guint _offset, gint _type_id, guint _length, proto_item *_ti)
2798 /* for unknown types, just add them to the tree as a blob */
2799 proto_item_append_text(_ti, " Unknown");
2801 proto_tree_add_item(_tree, hf_wlccp_tlv_unknown_value, _tvb, _offset, _length, ENC_NA);
2805 } /* default case for switch (_type_id) */
2807 } /* switch _type_id */
2812 } /* dissect_wlccp_qos_tlv */
2814 static guint dissect_wlccp_nm_tlv(proto_tree *_tree, tvbuff_t *_tvb, guint _offset, gint _type_id, guint _length, proto_item *_ti)
2820 case 0x20: /* nmClientEventIntoWDS */
2823 guint _radius_user_name_length = 0;
2825 proto_item_append_text(_ti, " nmClientEventIntoWDS");
2827 proto_tree_add_item(_tree, hf_wlccp_clientmac, _tvb, _offset, 6, ENC_NA);
2830 proto_tree_add_item(_tree, hf_time_elapsed, _tvb, _offset, 2, ENC_BIG_ENDIAN);
2833 proto_tree_add_item(_tree, hf_wlccp_parent_ap_mac, _tvb, _offset, 6, ENC_NA);
2836 proto_tree_add_item(_tree, hf_reg_lifetime, _tvb, _offset, 1, ENC_BIG_ENDIAN);
2839 /* skip some unused bytes */
2842 proto_tree_add_item(_tree, hf_wlccp_ipv4_address, _tvb, _offset, 4, ENC_BIG_ENDIAN);
2845 proto_tree_add_item(_tree, hf_wlccp_auth_type, _tvb, _offset, 1, ENC_BIG_ENDIAN);
2848 proto_tree_add_item(_tree, hf_wlccp_key_mgmt_type, _tvb, _offset, 1, ENC_BIG_ENDIAN);
2851 /* skip some unused bytes */
2854 _radius_user_name_length = _length - 23 - 4;
2856 proto_tree_add_item(_tree, hf_wlccp_radius_user_name, _tvb, _offset, _radius_user_name_length, ENC_ASCII|ENC_NA);
2857 _offset += _radius_user_name_length;
2863 case 0x21: /* nmClientEventOutOfWDS */
2865 proto_item_append_text(_ti, " nmClientEventOutOfWDS");
2867 proto_tree_add_item(_tree, hf_wlccp_clientmac, _tvb, _offset, 6, ENC_NA);
2870 proto_tree_add_item(_tree, hf_time_elapsed, _tvb, _offset, 2, ENC_BIG_ENDIAN);
2873 proto_tree_add_item(_tree, hf_wlccp_parent_ap_mac, _tvb, _offset, 6, ENC_NA);
2876 proto_tree_add_item(_tree, hf_wds_reason, _tvb, _offset, 1, ENC_BIG_ENDIAN);
2879 /* skip some unused bytes */
2885 case 0x22: /* nmClientEventIntraWDS */
2887 proto_item_append_text(_ti, " nmClientEventIntraWDS");
2889 proto_tree_add_item(_tree, hf_wlccp_clientmac, _tvb, _offset, 6, ENC_NA);
2892 proto_tree_add_item(_tree, hf_time_elapsed, _tvb, _offset, 2, ENC_BIG_ENDIAN);
2895 proto_tree_add_item(_tree, hf_wlccp_parent_ap_mac, _tvb, _offset, 6, ENC_NA);
2898 proto_tree_add_item(_tree, hf_reg_lifetime, _tvb, _offset, 1, ENC_BIG_ENDIAN);
2901 proto_tree_add_item(_tree, hf_wlccp_auth_type, _tvb, _offset, 1, ENC_BIG_ENDIAN);
2904 proto_tree_add_item(_tree, hf_wlccp_key_mgmt_type, _tvb, _offset, 1, ENC_BIG_ENDIAN);
2907 /* skip some unused bytes */
2914 case 0x24: /* nmClientEventIPAddressUpdate */
2916 proto_item_append_text(_ti, " nmClientEventIPAddressUpdate");
2918 proto_tree_add_item(_tree, hf_wlccp_clientmac, _tvb, _offset, 6, ENC_NA);
2921 proto_tree_add_item(_tree, hf_time_elapsed, _tvb, _offset, 2, ENC_BIG_ENDIAN);
2924 proto_tree_add_item(_tree, hf_wlccp_parent_ap_mac, _tvb, _offset, 6, ENC_NA);
2927 /* skip some unused bytes */
2930 proto_tree_add_item(_tree, hf_wlccp_ipv4_address, _tvb, _offset, 4, ENC_BIG_ENDIAN);
2937 case 0x26: /* nmClientEventRefresh */
2940 guint _radius_user_name_length = 0;
2942 proto_item_append_text(_ti, " nmClientEventRefresh");
2944 proto_tree_add_item(_tree, hf_wlccp_clientmac, _tvb, _offset, 6, ENC_NA);
2947 proto_tree_add_item(_tree, hf_time_elapsed, _tvb, _offset, 2, ENC_BIG_ENDIAN);
2950 proto_tree_add_item(_tree, hf_wlccp_parent_ap_mac, _tvb, _offset, 6, ENC_NA);
2953 proto_tree_add_item(_tree, hf_reg_lifetime, _tvb, _offset, 1, ENC_BIG_ENDIAN);
2956 /* skip some unused bytes */
2959 proto_tree_add_item(_tree, hf_wlccp_ipv4_address, _tvb, _offset, 4, ENC_BIG_ENDIAN);
2962 proto_tree_add_item(_tree, hf_wlccp_auth_type, _tvb, _offset, 1, ENC_BIG_ENDIAN);
2965 proto_tree_add_item(_tree, hf_wlccp_key_mgmt_type, _tvb, _offset, 1, ENC_BIG_ENDIAN);
2968 /* skip some unused bytes */
2971 _radius_user_name_length = _length - 23 - 4;
2973 proto_tree_add_item(_tree, hf_wlccp_radius_user_name, _tvb, _offset, _radius_user_name_length, ENC_ASCII|ENC_NA);
2974 _offset += _radius_user_name_length;
2979 case 0x27: /* nmClientEventRefreshDone */
2981 proto_item_append_text(_ti, " nmClientEventRefreshDone");
2983 /* skip some unused bytes */
2986 proto_tree_add_item(_tree, hf_time_elapsed, _tvb, _offset, 2, ENC_BIG_ENDIAN);
2989 proto_tree_add_item(_tree, hf_wlccp_refresh_req_id, _tvb, _offset, 4, ENC_BIG_ENDIAN);
2999 /* for unknown types, just add them to the tree as a blob */
3000 proto_item_append_text(_ti, " Unknown");
3002 proto_tree_add_item(_tree, hf_wlccp_tlv_unknown_value, _tvb, _offset, _length, ENC_NA);
3006 } /* default case for switch (_type_id) */
3008 } /* switch _type_id */
3013 } /* dissect_wlccp_nm_tlv */
3015 static guint dissect_wlccp_mip_tlv(proto_tree *_tree, tvbuff_t *_tvb, guint _offset, gint _type_id, guint _length, proto_item *_ti)
3024 /* for unknown types, just add them to the tree as a blob */
3025 proto_item_append_text(_ti, " Unknown");
3027 proto_tree_add_item(_tree, hf_wlccp_tlv_unknown_value, _tvb, _offset, _length, ENC_NA);
3031 } /* default case for switch (_type_id) */
3033 } /* switch _type_id */
3038 } /* dissect_wlccp_mip_tlv */
3041 /* Register the protocol with Wireshark */
3043 proto_register_wlccp(void)
3045 /* Setup list of header fields See Section 1.6.1 for details*/
3046 static hf_register_info hf[] = {
3047 { &hf_wlccp_version,
3048 { "Version", "wlccp.version",
3049 FT_UINT8, BASE_HEX, NULL,
3050 0x0, "Protocol ID/Version", HFILL }
3054 { "Src MAC", "wlccp.srcmac",
3055 FT_ETHER, BASE_NONE, NULL,
3056 0x0, "Source MAC address", HFILL }
3060 { "Dst MAC", "wlccp.dstmac",
3061 FT_ETHER, BASE_NONE, NULL,
3062 0x0, "Destination MAC address", HFILL }
3065 { &hf_wlccp_hostname,
3066 { "Hostname", "wlccp.hostname",
3067 FT_STRING, BASE_NONE, NULL,
3068 0x0, "Hostname of device", HFILL }
3072 { "SAP", "wlccp.sap",
3073 FT_UINT8, BASE_HEX, NULL,
3074 0x0, "Service Access Point", HFILL }
3077 { &hf_wlccp_sap_version,
3078 { "SAP Version", "wlccp.sap_version",
3079 FT_UINT8, BASE_DEC, NULL,
3080 SAP_VERSION_MASK, "Service Access Point Version", HFILL }
3084 { "SAP ID", "wlccp.sap_id",
3085 FT_UINT8, BASE_DEC, VALS(wlccp_sap_vs),
3086 SAP_VALUE_MASK, "Service Access Point ID", HFILL }
3089 { &hf_wlccp_destination_node_type,
3090 { "Destination node type", "wlccp.destination_node_type",
3091 FT_UINT16, BASE_DEC, VALS(wlccp_node_type_vs),
3092 0x0, "Node type of the hop destination", HFILL }
3096 { "Length", "wlccp.length",
3097 FT_UINT16, BASE_DEC, NULL,
3098 0x0, "Length of WLCCP payload (bytes)", HFILL }
3103 { "Message Type", "wlccp.type",
3104 FT_UINT8, BASE_HEX, NULL,
3108 { &hf_wlccp_subtype,
3109 { "Subtype", "wlccp.subtype",
3110 FT_UINT8, BASE_DEC, VALS(wlccp_subtype_vs),
3111 MT_SUBTYPE, "Message Subtype", HFILL }
3114 { &hf_wlccp_base_message_type_0,
3115 { "Base message type", "wlccp.base_message_type",
3116 FT_UINT8, BASE_HEX_DEC, VALS(wlccp_msg_type_vs_0),
3117 MT_BASE_MSG_TYPE, NULL, HFILL }
3120 { &hf_wlccp_base_message_type_1,
3121 { "Base message type", "wlccp.base_message_type",
3122 FT_UINT8, BASE_HEX_DEC, VALS(wlccp_msg_type_vs_1),
3123 MT_BASE_MSG_TYPE, NULL, HFILL }
3126 { &hf_wlccp_base_message_type_2,
3127 { "Base message type", "wlccp.base_message_type",
3128 FT_UINT8, BASE_HEX_DEC, VALS(wlccp_msg_type_vs_2),
3129 MT_BASE_MSG_TYPE, NULL, HFILL }
3132 { &hf_wlccp_base_message_type_3,
3133 { "Base message type", "wlccp.base_message_type",
3134 FT_UINT8, BASE_HEX_DEC, VALS(wlccp_msg_type_vs_3),
3135 MT_BASE_MSG_TYPE, NULL, HFILL }
3138 { &hf_wlccp_base_message_type_4,
3139 { "Base message type", "wlccp.base_message_type",
3140 FT_UINT8, BASE_HEX_DEC, VALS(wlccp_msg_type_vs_4),
3141 MT_BASE_MSG_TYPE, NULL, HFILL }
3144 { &hf_wlccp_base_message_type_5,
3145 { "Base message type", "wlccp.base_message_type",
3146 FT_UINT8, BASE_HEX_DEC, VALS(wlccp_msg_type_vs_5),
3147 MT_BASE_MSG_TYPE, NULL, HFILL }
3150 { &hf_wlccp_base_message_type_unknown,
3151 { "Base message type", "wlccp.base_message_type",
3152 FT_UINT8, BASE_HEX_DEC, NULL,
3153 MT_BASE_MSG_TYPE, NULL, HFILL }
3157 { "Hops", "wlccp.hops",
3158 FT_UINT8, BASE_DEC, NULL,
3159 0x0, "Number of WLCCP hops", HFILL }
3162 { &hf_wlccp_nm_version,
3163 { "NM Version", "wlccp.nm_version",
3164 FT_UINT8, BASE_DEC, NULL,
3169 { "Message ID", "wlccp.msg_id",
3170 FT_UINT16, BASE_DEC, NULL,
3171 0x0, "Sequence number used to match request/reply pairs",
3177 { "Flags", "wlccp.flags",
3178 FT_UINT16, BASE_HEX, NULL,
3182 { &hf_wlccp_rm_flags,
3183 { "RM Flags", "wlccp.rm_flags",
3184 FT_UINT8, BASE_HEX, NULL,
3188 { &hf_wlccp_retry_flag,
3189 { "Retry flag", "wlccp.retry_flag",
3190 FT_UINT16, BASE_DEC, NULL,
3191 F_RETRY, "Set on for retransmissions", HFILL }
3194 { &hf_wlccp_response_request_flag,
3195 { "Response request flag", "wlccp.response_request_flag",
3196 FT_UINT16, BASE_DEC, NULL,
3197 F_RESPONSE_REQUEST, "Set on to request a reply", HFILL }
3200 { &hf_wlccp_rm_request_reply_flag,
3201 { "Request Reply flag", "wlccp.request_reply_flag",
3202 FT_UINT8, BASE_DEC, NULL,
3203 RM_F_REQUEST_REPLY, "Set on to request a reply", HFILL }
3206 { &hf_wlccp_ack_required_flag,
3207 { "Ack Required flag", "wlccp.ack_required_flag",
3208 FT_UINT16, BASE_DEC, NULL,
3209 F_ACK_REQD, "Set on to require an acknowledgement", HFILL }
3212 { &hf_wlccp_tlv_flag,
3213 { "TLV flag", "wlccp.tlv_flag",
3214 FT_UINT16, BASE_DEC, NULL,
3215 F_TLV, "Set to indicate that optional TLVs follow the fixed fields", HFILL }
3218 { &hf_wlccp_inbound_flag,
3219 { "Inbound flag", "wlccp.inbound_flag",
3220 FT_UINT16, BASE_DEC, NULL,
3221 F_INBOUND, "Message is inbound to the top of the topology tree", HFILL }
3224 { &hf_wlccp_outbound_flag,
3225 { "Outbound flag", "wlccp.outbound_flag",
3226 FT_UINT16, BASE_DEC, NULL,
3227 F_OUTBOUND, "Message is outbound from the top of the topology tree", HFILL }
3230 { &hf_wlccp_hopwise_routing_flag,
3231 { "Hopwise-routing flag", "wlccp.hopwise_routing_flag",
3232 FT_UINT16, BASE_DEC, NULL,
3233 F_HOPWISE_ROUTING, "On to force intermediate access points to process the message also", HFILL }
3236 { &hf_wlccp_root_cm_flag,
3237 { "Root context manager flag", "wlccp.root_cm_flag",
3238 FT_UINT16, BASE_DEC, NULL,
3239 F_ROOT_CM, "Set to on to send message to the root context manager of the topology tree", HFILL }
3242 { &hf_wlccp_relay_flag,
3243 { "Relay flag", "wlccp.relay_flag",
3244 FT_UINT16, BASE_DEC, NULL,
3245 F_RELAY, "Signifies that this header is immediately followed by a relay node field", HFILL }
3248 { &hf_wlccp_mic_flag,
3249 { "MIC flag", "wlccp.mic_flag",
3250 FT_UINT16, BASE_DEC, NULL,
3251 F_MIC, "On in a message that must be authenticated and has an authentication TLV", HFILL }
3254 { &hf_wlccp_rm_mic_flag,
3255 { "MIC flag", "wlccp.mic_flag",
3256 FT_UINT8, BASE_DEC, NULL,
3257 RM_F_MIC, "On in a message that must be authenticated and has an authentication TLV", HFILL }
3260 { &hf_wlccp_originator_node_type,
3261 { "Originator node type", "wlccp.originator_node_type",
3262 FT_UINT16, BASE_DEC, VALS(wlccp_node_type_vs),
3263 0x0, "Originating device's node type", HFILL }
3266 { &hf_wlccp_originator,
3267 { "Originator", "wlccp.originator",
3268 FT_ETHER, BASE_NONE, NULL,
3269 0x0, "Originating device's MAC address", HFILL }
3272 { &hf_wlccp_responder_node_type,
3273 { "Responder node type", "wlccp.responder_node_type",
3274 FT_UINT16, BASE_DEC, VALS(wlccp_node_type_vs),
3275 0x0, "Responding device's node type", HFILL }
3278 { &hf_wlccp_responder,
3279 { "Responder", "wlccp.responder",
3280 FT_ETHER, BASE_NONE, NULL,
3281 0x0, "Responding device's MAC address", HFILL }
3284 { &hf_wlccp_requ_node_type,
3285 { "Requestor node type", "wlccp.requ_node_type",
3286 FT_UINT16, BASE_DEC, VALS(wlccp_node_type_vs),
3287 0x0, "Requesting device's node type", HFILL }
3290 { &hf_wlccp_requ_node_id,
3291 { "Requestor", "wlccp.requestor",
3292 FT_ETHER, BASE_NONE, NULL,
3293 0x0, "Requestor device's MAC address", HFILL }
3297 { "Status", "wlccp.status",
3298 FT_UINT8, BASE_DEC, VALS(wlccp_status_vs),
3302 { &hf_wlccp_path_init_rsvd,
3303 { "Reserved", "wlccp.path_init_reserved",
3304 FT_UINT8, BASE_DEC, NULL,
3308 { &hf_wlccp_relay_node_type,
3309 { "Relay node type", "wlccp.relay_node_type",
3310 FT_UINT16, BASE_DEC, VALS(wlccp_node_type_vs),
3311 0x0, "Type of node which relayed this message", HFILL }
3314 { &hf_wlccp_relay_node_id,
3315 { "Relay node ID", "wlccp.relay_node_id",
3316 FT_ETHER, BASE_NONE, NULL,
3317 0x0, "Node which relayed this message", HFILL }
3320 { &hf_wlccp_priority,
3321 { "WDS priority", "wlccp.priority",
3322 FT_UINT8, BASE_DEC, NULL, 0,
3323 "WDS priority of this access point", HFILL }
3327 { "Age", "wlccp.age",
3328 FT_UINT32, BASE_DEC, NULL, 0,
3329 "Time since AP became a WDS master", HFILL }
3333 { "Period", "wlccp.period",
3334 FT_UINT8, BASE_DEC, NULL, 0,
3335 "Interval between announcements (seconds)", HFILL }
3338 { &hf_wlccp_ipv4_address,
3339 { "IPv4 Address", "wlccp.ipv4_address",
3340 FT_IPv4, BASE_NONE, NULL, 0,
3344 { &hf_wlccp_scm_hop_address,
3345 { "Hop Address", "wlccp.scm_hop_address",
3346 FT_ETHER, BASE_NONE, NULL,
3347 0x0, "Source 802 Port Address", HFILL }
3350 { &hf_wlccp_scm_flags,
3351 { "SCM flags", "wlccp.scm_flags",
3352 FT_UINT16, BASE_HEX, NULL,
3356 { &hf_wlccp_scm_active_flag,
3357 { "Active flag", "wlccp.scm_active_flag",
3358 FT_UINT16, BASE_DEC, NULL,
3359 F_SCM_ACTIVE, "Set to on in advertisements from the active SCM", HFILL }
3362 { &hf_wlccp_scm_unscheduled_flag,
3363 { "Unscheduled flag", "wlccp.scm_unscheduled_flag",
3364 FT_UINT16, BASE_DEC, NULL,
3365 F_SCM_UNSCHEDULED, "Set to on in unscheduled advertisement messages", HFILL }
3368 { &hf_wlccp_scm_unattached_flag,
3369 { "Unattached flag", "wlccp.scm_unattached_flag",
3370 FT_UINT16, BASE_DEC, NULL,
3371 F_SCM_UNATTACHED, "Set to on in advertisements from an unattached node", HFILL }
3374 { &hf_wlccp_scm_layer2update_flag,
3375 { "Layer2 Update flag", "wlccp.scm_layer2update_flag",
3376 FT_UINT16, BASE_DEC, NULL,
3377 F_SCM_LAYER2UPDATE, "Set to on if WLCCP Layer 2 path updates are enabled", HFILL }
3380 { &hf_wlccp_scm_election_group,
3381 { "SCM Election Group", "wlccp.scm_election_group",
3382 FT_UINT8, BASE_DEC, NULL, 0,
3386 { &hf_wlccp_scm_attach_count,
3387 { "Attach Count", "wlccp.scm_attach_count",
3388 FT_UINT8, BASE_DEC, NULL, 0,
3389 "Attach count of the hop source", HFILL }
3392 { &hf_wlccp_scm_priority_flags,
3393 { "SCM Priority flags", "wlccp.scm_priority_flags",
3394 FT_UINT8, BASE_HEX, NULL, 0,
3398 { &hf_wlccp_scm_priority,
3399 { "SCM Priority", "wlccp.scm_priority",
3400 FT_UINT8, BASE_DEC, NULL,
3401 F_SCM_PRIORITY, NULL, HFILL }
3404 { &hf_wlccp_scm_preferred_flag,
3405 { "Preferred flag", "wlccp.scm_preferred_flag",
3406 FT_UINT8, BASE_DEC, NULL,
3407 F_SCM_PREFERRED, "Set to off if the SCM is the preferred SCM", HFILL }
3410 { &hf_wlccp_scm_bridge_priority_flags,
3411 { "Bridge Priority flags", "wlccp.scm_bridge_priority_flags",
3412 FT_UINT8, BASE_DEC, NULL, 0,
3416 { &hf_wlccp_scm_bridge_priority,
3417 { "Bridge priority", "wlccp.scm_bridge_priority",
3418 FT_UINT8, BASE_DEC, NULL,
3419 F_SCM_BRIDGE_PRIORITY, "Used to negotiate the designated bridge on a non-STP secondary Ethernet LAN", HFILL }
3422 { &hf_wlccp_scm_bridge_disable_flag,
3423 { "Bridge disable flag", "wlccp.scm_bridge_disable_flag",
3424 FT_UINT8, BASE_DEC, NULL,
3425 F_SCM_BRIDGE_DISABLE, "Set to on to indicate that secondary briding is disabled", HFILL }
3428 { &hf_wlccp_scm_node_id,
3429 { "SCM Node ID", "wlccp.scm_node_id",
3430 FT_ETHER, BASE_NONE, NULL,
3431 0x0, "Node ID of the SCM", HFILL }
3434 { &hf_wlccp_scm_unknown_short,
3435 { "Unknown Short", "wlccp.scm_unknown_short",
3436 FT_UINT16, BASE_HEX, NULL,
3437 0x0, "SCM Unknown Short Value", HFILL }
3440 { &hf_wlccp_scm_instance_age,
3441 { "Instance Age", "wlccp.scm_instance_age",
3442 FT_UINT32, BASE_DEC, NULL, 0,
3443 "Instance age of the SCM in seconds", HFILL }
3446 { &hf_wlccp_scm_path_cost,
3447 { "Path cost", "wlccp.scm_path_cost",
3448 FT_UINT16, BASE_DEC, NULL,
3449 0x0, "Sum of port costs on the path to the SCM", HFILL }
3452 { &hf_wlccp_scm_hop_count,
3453 { "Hop Count", "wlccp.scm_hop_count",
3454 FT_UINT8, BASE_DEC, NULL, 0,
3455 "Number of wireless hops on the path to SCM", HFILL }
3458 { &hf_wlccp_scm_advperiod,
3459 { "Advertisement Period", "wlccp.scm_advperiod",
3460 FT_UINT8, BASE_DEC, NULL, 0,
3461 "Average number of seconds between SCM advertisements", HFILL }
3464 { &hf_wlccp_timestamp,
3465 { "Timestamp", "wlccp.timestamp",
3466 FT_UINT64, BASE_DEC, NULL, 0,
3467 "Registration Timestamp", HFILL }
3470 { &hf_wlccp_apregstatus,
3471 { "Registration Status", "wlccp.apregstatus",
3472 FT_UINT8, BASE_HEX, NULL, 0,
3473 "AP Registration Status", HFILL }
3476 { &hf_wlccp_ap_node_id,
3477 { "AP Node ID", "wlccp.apnodeid",
3478 FT_NONE, BASE_NONE, NULL, 0,
3482 { &hf_wlccp_ap_node_type,
3483 { "AP Node Type", "wlccp.apnodetype",
3484 FT_UINT16, BASE_HEX, NULL, 0,
3488 { &hf_wlccp_ap_node_id_address,
3489 { "AP Node Address", "wlccp.apnodeidaddress",
3490 FT_ETHER, BASE_NONE, NULL, 0,
3494 { &hf_wlccp_aaa_msg_type,
3495 { "AAA Message Type", "wlccp.aaa_msg_type",
3496 FT_UINT8, BASE_HEX, VALS(wlccp_aaa_msg_type_vs), 0,
3500 { &hf_wlccp_aaa_auth_type,
3501 { "AAA Authentication Type", "wlccp.aaa_auth_type",
3502 FT_UINT8, BASE_HEX, VALS(wlccp_eapol_auth_type_vs), 0,
3506 { &hf_wlccp_keymgmt_type,
3507 { "AAA Key Management Type", "wlccp.aaa_keymgmt_type",
3508 FT_UINT8, BASE_HEX, VALS(wlccp_key_mgmt_type_vs), 0,
3512 { &hf_wlccp_eapol_msg,
3513 { "EAPOL Message", "wlccp.eapol_msg",
3514 FT_NONE, BASE_NONE, NULL, 0,
3518 { &hf_wlccp_eapol_version,
3519 { "EAPOL Version", "wlccp.eapol_version",
3520 FT_UINT8, BASE_DEC, NULL, 0,
3524 { &hf_wlccp_eapol_type,
3525 { "EAPOL Type", "wlccp.eapol_type",
3526 FT_UINT8, BASE_HEX, VALS(eapol_type_vs), 0,
3530 { &hf_wlccp_eap_msg_length,
3531 { "EAP Packet Length", "wlccp.eap_pkt_length",
3532 FT_UINT16, BASE_DEC, NULL, 0,
3533 "EAPOL Type", HFILL }
3536 { &hf_wlccp_eap_msg,
3537 { "EAP Message", "wlccp.eap_msg",
3538 FT_BYTES, BASE_NONE, NULL, 0,
3542 { &hf_wlccp_cisco_acctg_msg,
3543 { "Cisco Accounting Message", "wlccp.cisco_acctg_msg",
3544 FT_BYTES, BASE_NONE, NULL, 0,
3548 { &hf_wlccp_wids_msg_type,
3549 { "WIDS Message Type", "wlccp.wids_msg_type",
3550 FT_UINT8, BASE_DEC, NULL, 0,
3554 { &hf_wlccp_nmconfig,
3555 { "NM Config", "wlccp.nmconfig",
3556 FT_UINT8, BASE_DEC, NULL, 0,
3560 { &hf_wlccp_scmstate_change,
3561 { "SCM State Change", "wlccp.scmstate_change",
3562 FT_UINT8, BASE_DEC, NULL, 0,
3566 { &hf_wlccp_scmstate_change_reason,
3567 { "SCM State Change Reason", "wlccp.scmstate_change_reason",
3568 FT_UINT8, BASE_DEC, NULL, 0,
3572 { &hf_wlccp_scmattach_state,
3573 { "SCM Attach State", "wlccp.scmattach_state",
3574 FT_UINT8, BASE_DEC, NULL, 0,
3578 { &hf_wlccp_nmcapability,
3579 { "NM Capability", "wlccp.nm_capability",
3580 FT_UINT8, BASE_DEC, NULL, 0,
3584 { &hf_wlccp_refresh_req_id,
3585 { "Refresh Request ID", "wlccp.refresh_request_id",
3586 FT_UINT32, BASE_DEC, NULL, 0,
3591 { "WLCCP TLV", "wlccp.tlv",
3592 FT_NONE, BASE_NONE, NULL, 0,
3597 { "TLV Flags", "wlccp.tlv_flags",
3598 FT_UINT16, BASE_HEX, NULL, 0,
3599 "TLV Flags, Group and Type", HFILL }
3602 { &hf_wlccp_null_tlv,
3603 { "NULL TLV", "wlccp.null_tlv",
3604 FT_BYTES, BASE_NONE, NULL ,
3609 { &hf_wlccp_tlv_type,
3610 { "TLV Type", "wlccp.tlv_type",
3611 FT_UINT16, BASE_DEC, NULL ,
3612 TLV_TYPE_ID, "TLV Type ID", HFILL }
3615 { &hf_wlccp_tlv_type0,
3616 { "TLV Type", "wlccp.tlv_type",
3617 FT_UINT16, BASE_DEC, VALS(wlccp_tlv_typeID_0),
3618 TLV_TYPE_ID, "TLV Type ID", HFILL }
3621 { &hf_wlccp_tlv_type1,
3622 { "TLV Type", "wlccp.tlv_type",
3623 FT_UINT16, BASE_DEC, VALS(wlccp_tlv_typeID_1),
3624 TLV_TYPE_ID, "TLV Type ID", HFILL }
3627 { &hf_wlccp_tlv_type2,
3628 { "TLV Type", "wlccp.tlv_type",
3629 FT_UINT16, BASE_DEC, VALS(wlccp_tlv_typeID_2),
3630 TLV_TYPE_ID, "TLV Type ID", HFILL }
3633 { &hf_wlccp_tlv_type3,
3634 { "TLV Type", "wlccp.tlv_type",
3635 FT_UINT16, BASE_DEC, VALS(wlccp_tlv_typeID_3),
3636 TLV_TYPE_ID, "TLV Type ID", HFILL }
3639 { &hf_wlccp_tlv_type4,
3640 { "TLV Type", "wlccp.tlv_type",
3641 FT_UINT16, BASE_DEC, VALS(wlccp_tlv_typeID_4),
3642 TLV_TYPE_ID, "TLV Type ID", HFILL }
3645 { &hf_wlccp_tlv_type5,
3646 { "TLV Type", "wlccp.tlv_type",
3647 FT_UINT16, BASE_DEC, VALS(wlccp_tlv_typeID_5),
3648 TLV_TYPE_ID, "TLV Type ID", HFILL }
3651 { &hf_wlccp_tlv_group,
3652 { "TLV Group", "wlccp.tlv_group",
3653 FT_UINT16, BASE_DEC, VALS(wlccp_tlv_group_vs) ,
3654 TLV_GROUP_ID, "TLV Group ID", HFILL }
3657 { &hf_wlccp_tlv_container_flag,
3658 { "TLV Container Flag", "wlccp.tlv_container_flag",
3659 FT_UINT16, BASE_DEC, NULL,
3660 TLV_F_CONTAINER, "Set on if the TLV is a container", HFILL }
3663 { &hf_wlccp_tlv_encrypted_flag,
3664 { "TLV Encrypted Flag", "wlccp.tlv_encrypted_flag",
3665 FT_UINT16, BASE_DEC, NULL,
3666 TLV_F_ENCRYPTED, "Set on if the TLV is encrypted", HFILL }
3669 { &hf_wlccp_tlv_reserved_bit,
3670 { "Reserved bits", "wlccp.tlv_reserved_bit",
3671 FT_UINT16, BASE_DEC, NULL,
3672 TLV_F_RESVD, "Reserved", HFILL }
3675 { &hf_wlccp_tlv_request_flag,
3676 { "TLV Request Flag", "wlccp.tlv_request_flag",
3677 FT_UINT16, BASE_DEC, NULL,
3678 TLV_F_REQUEST, "Set on if the TLV is a request", HFILL }
3681 { &hf_wlccp_tlv_length,
3682 { "TLV Length", "wlccp.tlv_length",
3683 FT_UINT16, BASE_DEC, NULL, 0,
3687 { &hf_wlccp_path_length,
3688 { "Path Length", "wlccp.path_length",
3689 FT_UINT8, BASE_DEC, NULL, 0,
3693 { &hf_wlccp_mic_msg_seq_count,
3694 { "MIC Message Sequence Count", "wlccp.mic_msg_seq_count",
3695 FT_UINT64, BASE_DEC, NULL, 0,
3699 { &hf_wlccp_mic_length,
3700 { "MIC Length", "wlccp.mic_length",
3701 FT_UINT16, BASE_DEC, NULL, 0,
3705 { &hf_wlccp_mic_value,
3706 { "MIC Value", "wlccp.mic_value",
3707 FT_BYTES, BASE_NONE, NULL, 0,
3711 { &hf_wlccp_dest_node_type,
3712 { "Destination node type", "wlccp.dest_node_type",
3713 FT_UINT16, BASE_DEC, VALS(wlccp_node_type_vs),
3717 { &hf_wlccp_dest_node_id,
3718 { "Destination node ID", "wlccp.dest_node_id",
3719 FT_ETHER, BASE_NONE, NULL,
3723 { &hf_wlccp_supp_node_type,
3724 { "Destination node type", "wlccp.supp_node_type",
3725 FT_UINT16, BASE_DEC, VALS(wlccp_node_type_vs),
3729 { &hf_wlccp_supp_node_id,
3730 { "Supporting node ID", "wlccp.supp_node_id",
3731 FT_ETHER, BASE_NONE, NULL,
3735 { &hf_wlccp_src_node_type,
3736 { "Source node type", "wlccp.source_node_type",
3737 FT_UINT16, BASE_DEC, VALS(wlccp_node_type_vs),
3741 { &hf_wlccp_src_node_id,
3742 { "Source node ID", "wlccp.source_node_id",
3743 FT_ETHER, BASE_NONE, NULL,
3747 { &hf_wlccp_key_mgmt_type,
3748 { "Key Management type", "wlccp.key_mgmt_type",
3749 FT_UINT8, BASE_HEX, NULL,
3753 { &hf_wlccp_key_seq_count,
3754 { "Key Sequence Count", "wlccp.key_seq_count",
3755 FT_UINT32, BASE_DEC, NULL, 0,
3759 { &hf_wlccp_session_timeout,
3760 { "Session Timeout", "wlccp.session_timeout",
3761 FT_UINT32, BASE_DEC, NULL, 0,
3766 { "Nonce Value", "wlccp.nonce_value",
3767 FT_BYTES, BASE_NONE, NULL, 0,
3772 { "Token", "wlccp.token",
3773 FT_UINT8, BASE_HEX, NULL, 0,
3777 { &hf_wlccp_scan_mode,
3778 { "Scan Mode", "wlccp.scan_mode",
3779 FT_UINT8, BASE_HEX, NULL,
3784 { "Mode", "wlccp.mode",
3785 FT_UINT8, BASE_HEX, VALS(wlccp_mode_vs),
3790 { "RSS", "wlccp.rss",
3791 FT_INT8, BASE_DEC, NULL, 0,
3792 "Received Signal Strength", HFILL }
3796 { "Source Index", "wlccp.srcidx",
3797 FT_UINT8, BASE_HEX, NULL, 0,
3801 { &hf_wlccp_parent_tsf,
3802 { "Parent TSF", "wlccp.parenttsf",
3803 FT_UINT32, BASE_HEX, NULL, 0,
3807 { &hf_wlccp_target_tsf,
3808 { "Target TSF", "wlccp.targettsf",
3809 FT_UINT64, BASE_HEX, NULL, 0,
3813 { &hf_wlccp_channel,
3814 { "Channel", "wlccp.channel",
3815 FT_UINT8, BASE_DEC, NULL, 0,
3819 { &hf_wlccp_phy_type,
3820 { "PHY Type", "wlccp.phy_type",
3821 FT_UINT8, BASE_DEC, VALS(phy_type_80211_vs), 0,
3826 { "BSS ID", "wlccp.bssid",
3827 FT_ETHER, BASE_NONE, NULL, 0,
3828 "Basic Service Set ID", HFILL }
3831 { &hf_wlccp_beacon_interval,
3832 { "Beacon Interval", "wlccp.beacon_interval",
3833 FT_UINT16, BASE_DEC, NULL, 0,
3838 { &hf_wlccp_capabilities,
3839 { "Capabilities", "wlccp.capabilities",
3840 FT_UINT16, BASE_HEX, NULL, 0,
3845 { &hf_wlccp_80211_capabilities,
3846 { "802.11 Capabilities Flags", "wlccp.80211_capabilities",
3847 FT_UINT16, BASE_HEX, NULL,
3851 { &hf_80211_cap_ess,
3852 { "ESS flag", "wlccp.80211_ess_flag",
3853 FT_UINT16, BASE_DEC, NULL,
3854 F_80211_ESS, "Set on by APs in Beacon or Probe Response", HFILL }
3858 { &hf_80211_cap_ibss,
3859 { "IBSS flag", "wlccp.80211_ibss_flag",
3860 FT_UINT16, BASE_DEC, NULL,
3861 F_80211_IBSS, "Set on by STAs in Beacon or Probe Response", HFILL }
3864 { &hf_80211_cap_cf_pollable,
3865 { "CF Pollable flag", "wlccp.80211_cf_pollable_flag",
3866 FT_UINT16, BASE_DEC, NULL,
3867 F_80211_CFPOLL, NULL, HFILL }
3870 { &hf_80211_cap_cf_poll_req,
3871 { "CF Poll Request flag", "wlccp.80211_cf_poll_req_flag",
3872 FT_UINT16, BASE_DEC, NULL,
3873 F_80211_CFPOLL_REQ, NULL, HFILL }
3876 { &hf_80211_cap_privacy,
3877 { "Privacy flag", "wlccp.80211_cf_poll_req_flag",
3878 FT_UINT16, BASE_DEC, NULL,
3879 F_80211_PRIVACY, "Set on indicate confidentiality is required in the BSS", HFILL }
3882 { &hf_80211_short_preamble,
3883 { "Short Preamble flag", "wlccp.80211_short_preamble_flag",
3884 FT_UINT16, BASE_DEC, NULL,
3885 F_80211_SHORT_PREAMBLE, NULL, HFILL }
3889 { "PBCC flag", "wlccp.80211_pbcc_flag",
3890 FT_UINT16, BASE_DEC, NULL,
3891 F_80211_PBCC, NULL, HFILL }
3894 { &hf_80211_chan_agility,
3895 { "Channel Agility flag", "wlccp.80211_chan_agility_flag",
3896 FT_UINT16, BASE_DEC, NULL,
3897 F_80211_CH_AGILITY, NULL, HFILL }
3900 { &hf_80211_spectrum_mgmt,
3901 { "Spectrum Management flag", "wlccp.80211_spectrum_mgmt_flag",
3902 FT_UINT16, BASE_DEC, NULL,
3903 F_80211_SPEC_MGMT, NULL, HFILL }
3907 { "QOS flag", "wlccp.80211_qos_flag",
3908 FT_UINT16, BASE_DEC, NULL,
3909 F_80211_QOS, NULL, HFILL }
3912 { &hf_80211_short_time_slot,
3913 { "Short Time Slot flag", "wlccp.80211_short_time_slot_flag",
3914 FT_UINT16, BASE_DEC, NULL,
3915 F_80211_SHORT_TIME_SLOT, NULL, HFILL }
3919 { "APSD flag", "wlccp.80211_apsd_flag",
3920 FT_UINT16, BASE_DEC, NULL,
3921 F_80211_APSD, NULL, HFILL }
3924 { &hf_80211_reserved,
3925 { "Reserved", "wlccp.80211_reserved",
3926 FT_UINT16, BASE_DEC, NULL,
3927 F_80211_RESVD, NULL, HFILL }
3930 { &hf_80211_dsss_ofdm,
3931 { "DSSS-OFDM Flag", "wlccp.dsss_ofdm_flag",
3932 FT_UINT16, BASE_DEC, NULL,
3933 F_80211_DSSS_OFDM, NULL, HFILL }
3936 { &hf_80211_dlyd_block_ack,
3937 { "Delayed Block Ack Flag", "wlccp.dsss_dlyd_block_ack_flag",
3938 FT_UINT16, BASE_DEC, NULL,
3939 F_80211_DLYD_BLK_ACK, NULL, HFILL }
3942 { &hf_80211_imm_block_ack,
3943 { "Immediate Block Ack Flag", "wlccp.dsss_imm_block_ack_flag",
3944 FT_UINT16, BASE_DEC, NULL,
3945 F_80211_IMM_BLK_ACK, NULL, HFILL }
3949 { &hf_wlccp_tlv80211,
3950 { "802.11 TLV Value", "wlccp.tlv80211",
3951 FT_BYTES, BASE_NONE, NULL, 0,
3955 { &hf_wlccp_duration,
3956 { "Duration", "wlccp.duration",
3957 FT_UINT16, BASE_DEC, NULL, 0,
3961 { &hf_wlccp_rpidensity,
3962 { "RPI Density", "wlccp.rpi_denisty",
3963 FT_BYTES, BASE_NONE, NULL, 0,
3967 { &hf_wlccp_ccabusy,
3968 { "CCA Busy", "wlccp.cca_busy",
3969 FT_UINT8, BASE_HEX, NULL, 0,
3974 { "Station MAC", "wlccp.station_mac",
3975 FT_ETHER, BASE_NONE, NULL, 0,
3979 { &hf_wlccp_sta_type,
3980 { "Station Type", "wlccp.station_type",
3981 FT_UINT8, BASE_HEX, NULL, 0,
3986 { "2 Byte Token", "wlccp.token2",
3987 FT_UINT16, BASE_HEX, NULL, 0,
3991 { &hf_wlccp_interval,
3992 { "Interval", "wlccp.interval",
3993 FT_UINT16, BASE_DEC, NULL, 0,
3997 { &hf_framereport_elements,
3998 { "Frame Report Elements", "wlccp.framereport_elements",
3999 FT_NONE, BASE_NONE, NULL, 0,
4004 { "Element Count", "wlccp.element_count",
4005 FT_UINT8, BASE_DEC, NULL, 0,
4009 { &hf_wlccp_numframes,
4010 { "Number of frames", "wlccp.numframes",
4011 FT_UINT8, BASE_DEC, NULL, 0,
4015 { &hf_wlccp_mfpcapability,
4016 { "MFP Capability", "wlccp.mfp_capability",
4017 FT_UINT16, BASE_HEX, NULL, 0,
4021 { &hf_wlccp_mfpflags,
4022 { "MFP Flags", "wlccp.mfp_flags",
4023 FT_UINT16, BASE_HEX, NULL, 0,
4027 { &hf_wlccp_mfpconfig,
4028 { "MFP Config", "wlccp.mfp_config",
4029 FT_UINT16, BASE_HEX, NULL, 0,
4033 { &hf_wlccp_clientmac,
4034 { "Client MAC", "wlccp.client_mac",
4035 FT_ETHER, BASE_NONE, NULL, 0,
4040 { "Reg. LifeTime", "wlccp.reg_lifetime",
4041 FT_UINT8, BASE_DEC, NULL, 0,
4046 { "Elapsed Time", "wlccp.time_elapsed",
4047 FT_UINT16, BASE_DEC, NULL, 0,
4051 { &hf_wlccp_parent_ap_mac,
4052 { "Parent AP MAC", "wlccp.parent_ap_mac",
4053 FT_ETHER, BASE_NONE, NULL, 0,
4057 { &hf_wlccp_auth_type,
4058 { "Authentication Type", "wlccp.auth_type",
4059 FT_UINT8, BASE_HEX, NULL, 0,
4063 { &hf_wlccp_radius_user_name,
4064 { "RADIUS Username", "wlccp.radius_username",
4065 FT_STRING, BASE_NONE, NULL,
4070 { "Reason Code", "wlccp.wds_reason",
4071 FT_UINT8, BASE_HEX, NULL, 0,
4076 { &hf_wlccp_tlv_unknown_value,
4077 { "Unknown TLV Contents", "wlccp.tlv_unknown_value",
4078 FT_BYTES, BASE_NONE, NULL, 0,
4082 }; /* hf_register_info hf */
4084 /* Setup protocol subtree array */
4085 static gint *ett[] = {
4087 &ett_wlccp_sap_tree,
4090 &ett_wlccp_cm_flags,
4091 &ett_wlccp_scm_flags,
4092 &ett_wlccp_scm_priority_flags,
4093 &ett_wlccp_scm_bridge_priority_flags,
4094 &ett_wlccp_rm_flags,
4095 &ett_wlccp_nm_flags,
4096 &ett_wlccp_ap_node_id,
4097 &ett_wlccp_eapol_msg_tree,
4098 &ett_wlccp_eap_tree,
4099 &ett_wlccp_tlv_tree,
4100 &ett_tlv_flags_tree,
4102 &ett_80211_capability_flags_tree,
4103 &ett_framereport_elements_tree
4104 }; /* static gint *ett[] */
4106 /* Register the protocol name and description */
4107 proto_wlccp = proto_register_protocol("Cisco Wireless LAN Context Control Protocol", "WLCCP", "wlccp");
4109 /* Required function calls to register the header fields and subtrees used */
4110 proto_register_field_array(proto_wlccp, hf, array_length(hf));
4111 proto_register_subtree_array(ett, array_length(ett));
4117 proto_reg_handoff_wlccp(void)
4119 dissector_handle_t wlccp_handle;
4121 wlccp_handle = create_dissector_handle(dissect_wlccp, proto_wlccp);
4123 dissector_add_uint("ethertype", ETHERTYPE_WLCCP, wlccp_handle);
4124 dissector_add_uint("udp.port", WLCCP_UDP_PORT, wlccp_handle);
4125 dissector_add_uint("llc.wlccp_pid", 0x0000, wlccp_handle);
4131 proto_register_wlccp_oui(void)
4133 static hf_register_info hf[] = {
4134 { &hf_llc_wlccp_pid,
4135 { "PID", "llc.wlccp_pid",
4136 FT_UINT16, BASE_HEX, VALS(cisco_pid_vals),
4141 llc_add_oui(OUI_CISCOWL, "llc.wlccp_pid", "Cisco WLCCP OUI PID", hf);