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)
66 #include <epan/packet.h>
67 #include <epan/etypes.h>
69 #include "packet-llc.h"
72 /* The UDP port that WLCCP is expected to ride on */
73 /* WLCCP also uses an LLC OUI type and an ethertype */
74 #define WLCCP_UDP_PORT 2887
77 /* SAP is 2-bit version and 6-bit Type */
78 #define SAP_VERSION_MASK (0xC0)
79 #define SAP_VALUE_MASK (0x3f)
81 static const value_string wlccp_sap_vs
[] = {
82 { 0x0, "Context Management" },
84 { 0x2, "Radio Resource Management" },
86 { 0x4, "Network Management" },
91 #define WLCCP_SAP_CCM (0x00)
92 #define WLCCP_SAP_SEC (0x01)
93 #define WLCCP_SAP_RRM (0x02)
94 #define WLCCP_SAP_QOS (0x03)
95 #define WLCCP_SAP_NM (0x04)
96 #define WLCCP_SAP_MIP (0x05)
98 static const value_string wlccp_node_type_vs
[] = {
100 { 0x01, "Access Point (AP)" },
101 { 0x02, "Subnet Context Manager (SCM)" },
102 { 0x04, "Local Context Manager (LCM)" },
103 { 0x08, "Campus Context Manager (CCM)" },
104 { 0x10, "Infrastructure (ICN)" },
106 /* { 0x8000, "Multi Mask?" }, */
110 /* The Message Type field contains a 2-bit Sub-Type and a 6-bit Base Message Type */
111 #define MT_SUBTYPE (0xC0)
112 #define MT_BASE_MSG_TYPE (0x3F)
114 static const value_string wlccp_subtype_vs
[] = {
122 /* The Message Type definitions are a combination of the SAP and the Type_ID */
123 /* fields. These mappings are not well documented and have been gathered from a */
124 /* combination of the WLCCP patent application, experimentation, and WLCCP */
128 static const value_string wlccp_msg_type_vs_0
[] = {
129 { 0x1, "SCM Advertise" },
130 { 0x2, "CCM Advertise" },
131 { 0x3, "Registration" },
132 { 0x4, "DeRegistration" },
135 { 0x7, "Path Update" },
136 { 0x8, "Path Check" },
137 { 0x9, "PreRegistration" },
139 { 0x0b, "cmAAA EAP Authent" },
140 { 0x0c, "cmPathInit Path Authent" },
147 static const value_string wlccp_msg_type_vs_1
[] = {
148 /* { 0x1, "Unknown" }, */
154 static const value_string wlccp_msg_type_vs_2
[] = {
156 { 0x2, "rmReqRoutingResp" },
163 static const value_string wlccp_msg_type_vs_3
[] = {
164 /* { 0x1, "Unknown" }, */
170 static const value_string wlccp_msg_type_vs_4
[] = {
172 { 0x10, "nmConfigRequest" },
173 { 0x11, "nmConfigReply" },
174 { 0x20, "nmApRegistration" },
175 { 0x21, "nmScmStateChange" },
176 { 0x22, "nmScmKeepActive" },
177 { 0x30, "nmClientEventReport" },
178 { 0x31, "nmAllClientRefreshRequest" },
184 static const value_string wlccp_msg_type_vs_5
[] = {
185 /* { 0x1, "Unknown" }, */
191 /* Mask definitions for the CM Flags field */
192 #define F_RETRY (1<<15)
193 #define F_RESPONSE_REQUEST (1<<14)
194 #define F_TLV (1<<13)
195 #define F_INBOUND (1<<12)
196 #define F_OUTBOUND (1<<11)
197 #define F_HOPWISE_ROUTING (1<<10)
198 #define F_ROOT_CM (1<<9)
199 #define F_RELAY (1<<8)
202 /* Mask definitions for the RM Flags field */
203 #define RM_F_REQUEST_REPLY (1<<0)
204 #define RM_F_MIC (1<<1)
206 /* Mask definitions for the NM Flags field */
207 /* the NM flags are the same as the CM flags except there is no
208 INBOUND, OUTBOUND, HOPWISE_ROUTING, ROOT_CM, or RELAY flag, and
209 the RESPONSE_REQUEST flag is renamed ACK_REQD
211 #define F_ACK_REQD (1<<14)
214 /* Mask definitions for the SCM Flags field */
215 #define F_SCM_LAYER2UPDATE (1<<3)
216 #define F_SCM_UNATTACHED (1<<2)
217 #define F_SCM_UNSCHEDULED (1<<1)
218 #define F_SCM_ACTIVE (1<<0)
220 /* Mask definitions for the SCM Priority Flags field */
221 #define F_SCM_PRIORITY 0xfe
222 #define F_SCM_PREFERRED 0x01
224 /* Mask definitions for the SCM Bridge Priority Flags field */
225 #define F_SCM_BRIDGE_PRIORITY 0xfe
226 #define F_SCM_BRIDGE_DISABLE 0x01
228 /* The TLV Type definitions are a combination of the TLV Group and the */
229 /* TLV Type ID fields. These mappings are not well documented and have been */
230 /* gathered from a combination of the WLCCP patent application, */
231 /* experimentation, and WLCCP device logs */
233 /* The TLV Group/Type Field contains some flags and the Group ID and Type ID */
234 #define TLV_F_CONTAINER (0x8000)
235 #define TLV_F_ENCRYPTED (0x4000)
236 #define TLV_F_RESVD (0x3000)
237 #define TLV_F_RESVD2 (0x2000)
238 #define TLV_F_RESVD3 (0x1000)
239 #define TLV_F_REQUEST (0x0080)
240 #define TLV_GROUP_ID (0x0F00)
241 #define TLV_TYPE_ID (0x007F)
243 static const value_string wlccp_tlv_group_vs
[] = {
244 { 0x0, "WLCCP Group" },
245 { 0x1, "Security Group" },
246 { 0x2, "RRM Group" },
247 { 0x3, "QOS Group" },
249 { 0x5, "MIP Group" },
254 #define WLCCP_TLV_GROUP_WLCCP (0x00)
255 #define WLCCP_TLV_GROUP_SEC (0x01)
256 #define WLCCP_TLV_GROUP_RRM (0x02)
257 #define WLCCP_TLV_GROUP_QOS (0x03)
258 #define WLCCP_TLV_GROUP_NM (0x04)
259 #define WLCCP_TLV_GROUP_MIP (0x05)
262 static const value_string wlccp_tlv_typeID_0
[] = {
263 { 0x00, "NULL TLV" },
264 { 0x09, "ipv4Address" },
265 { 0x01, "Container" },
266 { 0x02, "AP Port Info" },
267 { 0x03, "ipv4 Subnet ID" },
268 { 0x04, "Secondary LAN Address List" },
269 { 0x05, "Multicast Ethernet Address List" },
270 { 0x06, "ipv4 Multicast Address List" },
271 { 0x07, "AP Port List" },
272 { 0x08, "Requestor SSID" },
277 static const value_string wlccp_tlv_typeID_1
[] = {
278 { 0x01, "initSession" },
279 { 0x02, "inSecureContextReq" },
280 { 0x06, "authenticator" },
282 { 0x0a, "inSecureContextReply" },
287 static const value_string wlccp_tlv_typeID_2
[] = {
288 { 0x03, "rmReport" },
289 { 0x04, "aggrRmReport" },
290 { 0x15, "frameReport" },
291 { 0x17, "ccaReport" },
292 { 0x19, "rpiHistReport" },
293 { 0x1e, "commonBeaconReport" },
294 { 0x1f, "aggrBeaconReport" },
295 { 0x5b, "mfpRouting" },
296 { 0x5c, "mfpConfig" },
301 static const value_string wlccp_tlv_typeID_3
[] = {
302 /* { 0x01, "Unknown" } */
307 static const value_string wlccp_tlv_typeID_4
[] = {
308 /* { 0x01, "Unknown" } */
313 static const value_string wlccp_tlv_typeID_5
[] = {
314 /* { 0x01, "Unknown" } */
322 static const value_string wlccp_aaa_msg_type_vs
[] = {
326 { 0x3, "Cisco Accounting" },
330 static const value_string wlccp_eapol_auth_type_vs
[] = {
333 { 0x2, "MAC then EAP" },
334 { 0x3, "MAC and EAP" },
335 { 0x4, "LEAP only" },
336 { 0x5, "MAC then LEAP" },
337 { 0x6, "MAC and LEAP" },
341 static const value_string wlccp_key_mgmt_type_vs
[] = {
344 { 0x2, "Legacy 802.1x" },
349 static const value_string eapol_type_vs
[] = {
350 { 0x0, "EAP Packet" },
351 { 0x1, "EAP Start" },
358 static const value_string wlccp_status_vs
[] = {
363 static const value_string cisco_pid_vals
[] = {
368 static const value_string wlccp_mode_vs
[] = {
369 { 0x0, "apSelected" },
376 static const value_string phy_type_80211_vs
[] = {
377 { 0x01, "FHSS 2.4 GHz" },
378 { 0x02, "DSSS 2.4 GHz" },
379 { 0x03, "IR Baseband" },
380 { 0x04, "OFDM 5GHz" },
387 /* 802.11 capabilities flags */
388 #define F_80211_ESS 0x0001
389 #define F_80211_IBSS 0x0002
390 #define F_80211_CFPOLL 0x0004
391 #define F_80211_CFPOLL_REQ 0x0008
392 #define F_80211_PRIVACY 0x0010
393 #define F_80211_SHORT_PREAMBLE 0x0020
394 #define F_80211_PBCC 0x0040
395 #define F_80211_CH_AGILITY 0x0080
396 #define F_80211_SPEC_MGMT 0x0100
397 #define F_80211_QOS 0x0200
398 #define F_80211_SHORT_TIME_SLOT 0x0400
399 #define F_80211_APSD 0x0800
400 #define F_80211_RESVD 0x1000
401 #define F_80211_DSSS_OFDM 0x2000
402 #define F_80211_DLYD_BLK_ACK 0x4000
403 #define F_80211_IMM_BLK_ACK 0x8000
409 struct subdissector_returns_t
412 static gboolean mic_flag;
413 static gboolean tlv_flag;
414 }; * struct flags_t declaration *
419 /* Forward declarations we need below */
420 static guint
dissect_wlccp_ccm_msg(proto_tree
*_tree
, tvbuff_t
*_tvb
, guint _offset
, guint8 _base_message_type
);
421 static guint
dissect_wlccp_sec_msg(proto_tree
*_tree
, tvbuff_t
*_tvb
, guint _offset
, guint8 _base_message_type
);
422 static guint
dissect_wlccp_rrm_msg(proto_tree
*_tree
, tvbuff_t
*_tvb
, guint _offset
, guint8 _base_message_type
);
423 static guint
dissect_wlccp_qos_msg(proto_tree
*_tree
, tvbuff_t
*_tvb
, guint _offset
, guint8 _base_message_type
);
424 static guint
dissect_wlccp_nm_msg(proto_tree
*_tree
, tvbuff_t
*_tvb
, guint _offset
, guint8 _base_message_type
);
425 static guint
dissect_wlccp_mip_msg(proto_tree
*_tree
, tvbuff_t
*_tvb
, guint _offset
, guint8 _base_message_type
);
427 static guint
dissect_wlccp_tlvs(proto_tree
*_tree
, tvbuff_t
*tvb
, guint tlv_offset
, guint _depth
);
429 static guint
dissect_wlccp_ccm_tlv(proto_tree
*_tree
, tvbuff_t
*_tvb
, guint _offset
, gint _type_id
, guint _length
, proto_item
*_ti
);
430 static guint
dissect_wlccp_sec_tlv(proto_tree
*_tree
, tvbuff_t
*_tvb
, guint _offset
, gint _type_id
, guint _length
, proto_item
*_ti
);
431 static guint
dissect_wlccp_rrm_tlv(proto_tree
*_tree
, tvbuff_t
*_tvb
, guint _offset
, gint _type_id
, guint _length
, proto_item
*_ti
);
432 static guint
dissect_wlccp_qos_tlv(proto_tree
*_tree
, tvbuff_t
*_tvb
, guint _offset
, gint _type_id
, guint _length
, proto_item
*_ti
);
433 static guint
dissect_wlccp_nm_tlv(proto_tree
*_tree
, tvbuff_t
*_tvb
, guint _offset
, gint _type_id
, guint _length
, proto_item
*_ti
);
434 static guint
dissect_wlccp_mip_tlv(proto_tree
*_tree
, tvbuff_t
*_tvb
, guint _offset
, gint _type_id
, guint _length
, proto_item
*_ti
);
436 static void set_mic_flag(gboolean flag
);
437 static void set_tlv_flag(gboolean flag
);
438 static gboolean
get_tlv_flag(void);
439 static gboolean
get_mic_flag(void);
441 /* Initialize some utlity variables */
442 static gboolean mic_flag
=0, tlv_flag
=0;
444 /* Initialize the protocol and registered fields */
445 static int proto_wlccp
= -1;
447 static int hf_llc_wlccp_pid
= -1;
451 static int hf_wlccp_dstmac
= -1;
452 static int hf_wlccp_srcmac
= -1;
453 static int hf_wlccp_hostname
= -1;
455 /* WLCCP Fixed header fields */
456 static int hf_wlccp_version
= -1;
458 static int hf_wlccp_sap
= -1; /* SAP Tree */
459 static int hf_wlccp_sap_version
= -1;
460 static int hf_wlccp_sap_id
= -1;
462 static int hf_wlccp_destination_node_type
= -1;
463 static int hf_wlccp_length
= -1;
465 static int hf_wlccp_type
= -1; /* Message Type Tree */
466 static int hf_wlccp_subtype
= -1;
467 static int hf_wlccp_base_message_type_0
= -1;
468 static int hf_wlccp_base_message_type_1
= -1;
469 static int hf_wlccp_base_message_type_2
= -1;
470 static int hf_wlccp_base_message_type_3
= -1;
471 static int hf_wlccp_base_message_type_4
= -1;
472 static int hf_wlccp_base_message_type_5
= -1;
473 static int hf_wlccp_base_message_type_unknown
= -1;
475 static int hf_wlccp_hops
= -1;
476 static int hf_wlccp_nm_version
= -1;
478 static int hf_wlccp_msg_id
= -1;
480 static int hf_wlccp_flags
= -1; /* Flags Tree */
481 static int hf_wlccp_rm_flags
= -1;
482 static int hf_wlccp_retry_flag
= -1;
483 static int hf_wlccp_response_request_flag
= -1;
484 static int hf_wlccp_ack_required_flag
= -1;
485 static int hf_wlccp_tlv_flag
= -1;
486 static int hf_wlccp_inbound_flag
= -1;
487 static int hf_wlccp_outbound_flag
= -1;
488 static int hf_wlccp_hopwise_routing_flag
= -1;
489 static int hf_wlccp_root_cm_flag
= -1;
490 static int hf_wlccp_relay_flag
= -1;
491 static int hf_wlccp_mic_flag
= -1;
492 static int hf_wlccp_rm_request_reply_flag
= -1;
493 static int hf_wlccp_rm_mic_flag
= -1;
495 static int hf_wlccp_originator
= -1; /* Originator Tree */
496 static int hf_wlccp_originator_node_type
= -1;
497 /* static int hf_wlccp_originator_id = -1; */
499 static int hf_wlccp_responder
= -1; /* Responder Tree */
500 static int hf_wlccp_responder_node_type
= -1;
501 /*static int hf_wlccp_responder_id = -1; */
504 /* static int hf_wlccp_relay_node = -1;*/ /* Relay Node Tree */
505 static int hf_wlccp_relay_node_type
= -1;
506 static int hf_wlccp_relay_node_id
= -1;
508 /* static int hf_wlccp_priority = -1; */
509 /* static int hf_wlccp_age = -1; */
510 /* static int hf_wlccp_period = -1; */
511 static int hf_wlccp_ipv4_address
= -1;
513 /* SCM Advertisement */
514 static int hf_wlccp_scm_hop_address
= -1;
516 static int hf_wlccp_scm_flags
= -1; /* SCM Flags Tree */
517 static int hf_wlccp_scm_active_flag
= -1;
518 static int hf_wlccp_scm_unscheduled_flag
= -1;
519 static int hf_wlccp_scm_unattached_flag
= -1;
520 static int hf_wlccp_scm_layer2update_flag
= -1;
522 static int hf_wlccp_scm_election_group
= -1;
523 static int hf_wlccp_scm_attach_count
= -1;
525 static int hf_wlccp_scm_priority_flags
= -1; /* SCM Priority Flags */
526 static int hf_wlccp_scm_priority
= -1;
527 static int hf_wlccp_scm_preferred_flag
= -1;
529 static int hf_wlccp_scm_bridge_priority_flags
= -1; /* SCM Bridge Priority Flags */
530 static int hf_wlccp_scm_bridge_priority
= -1;
531 static int hf_wlccp_scm_bridge_disable_flag
= -1;
533 static int hf_wlccp_scm_node_id
= -1;
534 static int hf_wlccp_scm_unknown_short
= -1;
535 static int hf_wlccp_scm_instance_age
= -1;
536 static int hf_wlccp_scm_path_cost
= -1;
537 static int hf_wlccp_scm_hop_count
= -1;
538 static int hf_wlccp_scm_advperiod
= -1;
540 /*kan for apRegistration messages*/
541 static int hf_wlccp_timestamp
= -1;
542 static int hf_wlccp_apregstatus
= -1;
543 static int hf_wlccp_ap_node_id
= -1;
544 static int hf_wlccp_ap_node_type
= -1;
545 static int hf_wlccp_ap_node_id_address
= -1;
546 /*kan for nmPathInit messages */
547 static int hf_wlccp_requ_node_type
= -1;
548 static int hf_wlccp_requ_node_id
= -1;
549 static int hf_wlccp_status
= -1;
550 static int hf_wlccp_path_init_rsvd
= -1;
551 /*kan - for cmAAA messages */
552 static int hf_wlccp_aaa_msg_type
= -1;
553 static int hf_wlccp_aaa_auth_type
= -1;
554 static int hf_wlccp_keymgmt_type
= -1;
555 /*kan - for cmAAA EAPOL messages */
556 static int hf_wlccp_eapol_msg
= -1;
557 static int hf_wlccp_eapol_version
= -1;
558 static int hf_wlccp_eapol_type
= -1;
559 static int hf_wlccp_eap_msg_length
= -1;
560 static int hf_wlccp_eap_msg
= -1;
561 /*kan - for cmAAA Proprietary message */
562 static int hf_wlccp_cisco_acctg_msg
= -1;
563 /*kan - for cmWIDS */
564 static int hf_wlccp_wids_msg_type
= -1;
565 /*kan - for nmConfigRequest and nmConfigReply */
566 static int hf_wlccp_nmconfig
= -1;
568 static int hf_wlccp_scmstate_change
= -1;
569 static int hf_wlccp_scmstate_change_reason
= -1;
571 static int hf_wlccp_scmattach_state
= -1;
572 static int hf_wlccp_nmcapability
= -1;
573 static int hf_wlccp_refresh_req_id
= -1;
575 static int hf_wlccp_tlv
= -1;
576 static int hf_tlv_flags
= -1;
578 static int hf_wlccp_null_tlv
= -1;
580 static int hf_wlccp_tlv_type
= -1;
581 static int hf_wlccp_tlv_type0
= -1;
582 static int hf_wlccp_tlv_type1
= -1;
583 static int hf_wlccp_tlv_type2
= -1;
584 static int hf_wlccp_tlv_type3
= -1;
585 static int hf_wlccp_tlv_type4
= -1;
586 static int hf_wlccp_tlv_type5
= -1;
587 static int hf_wlccp_tlv_group
= -1;
588 static int hf_wlccp_tlv_container_flag
= -1;
589 static int hf_wlccp_tlv_encrypted_flag
= -1;
590 static int hf_wlccp_tlv_request_flag
= -1;
591 static int hf_wlccp_tlv_reserved_bit
= -1;
592 static int hf_wlccp_tlv_length
= -1;
594 /* static int hf_wlccp_tlv_value = -1; */
596 static int hf_wlccp_path_length
= -1;
597 static int hf_wlccp_mic_msg_seq_count
= -1;
598 static int hf_wlccp_mic_length
= -1;
599 static int hf_wlccp_mic_value
= -1;
601 static int hf_wlccp_key_seq_count
= -1;
602 static int hf_wlccp_dest_node_type
= -1;
603 static int hf_wlccp_dest_node_id
= -1;
604 static int hf_wlccp_supp_node_type
= -1;
605 static int hf_wlccp_supp_node_id
= -1;
606 static int hf_wlccp_key_mgmt_type
= -1;
607 static int hf_wlccp_nonce
= -1;
608 static int hf_wlccp_session_timeout
= -1;
609 static int hf_wlccp_src_node_type
= -1;
610 static int hf_wlccp_src_node_id
= -1;
611 static int hf_wlccp_token
= -1;
612 static int hf_wlccp_mode
= -1;
613 static int hf_wlccp_scan_mode
= -1;
614 static int hf_wlccp_rss
= -1;
615 static int hf_wlccp_srcidx
= -1;
616 static int hf_wlccp_parent_tsf
= -1;
617 static int hf_wlccp_target_tsf
= -1;
619 static int hf_wlccp_channel
= -1;
620 static int hf_wlccp_phy_type
= -1;
621 static int hf_wlccp_bssid
= -1;
622 static int hf_wlccp_beacon_interval
= -1;
623 /* static int hf_wlccp_capabilities = -1; */
624 static int hf_wlccp_tlv80211
= -1;
625 static int hf_wlccp_duration
= -1;
626 static int hf_wlccp_rpidensity
= -1;
627 static int hf_wlccp_ccabusy
= -1;
628 static int hf_wlccp_sta_type
= -1;
629 static int hf_wlccp_stamac
= -1;
630 static int hf_wlccp_token2
= -1;
631 static int hf_wlccp_interval
= -1;
632 static int hf_wlccp_count
= -1;
633 static int hf_framereport_elements
= -1;
634 static int hf_wlccp_numframes
= -1;
635 static int hf_wlccp_mfpcapability
= -1;
636 static int hf_wlccp_mfpflags
= -1;
637 static int hf_wlccp_mfpconfig
= -1;
638 static int hf_wlccp_clientmac
= -1;
639 static int hf_time_elapsed
= -1;
640 static int hf_wlccp_parent_ap_mac
= -1;
641 static int hf_wlccp_auth_type
=-1;
642 static int hf_reg_lifetime
= -1;
643 static int hf_wlccp_radius_user_name
= -1;
644 static int hf_wds_reason
= -1;
647 static int hf_wlccp_80211_capabilities
= -1;
648 static int hf_80211_cap_ess
= -1;
649 static int hf_80211_cap_ibss
= -1;
650 static int hf_80211_cap_cf_pollable
= -1;
651 static int hf_80211_cap_cf_poll_req
= -1;
652 static int hf_80211_cap_privacy
= -1;
653 static int hf_80211_short_preamble
= -1;
654 static int hf_80211_pbcc
= -1;
655 static int hf_80211_chan_agility
= -1;
656 static int hf_80211_spectrum_mgmt
= -1;
657 static int hf_80211_qos
= -1;
658 static int hf_80211_short_time_slot
= -1;
659 static int hf_80211_apsd
= -1;
660 static int hf_80211_reserved
= -1;
661 static int hf_80211_dsss_ofdm
= -1;
662 static int hf_80211_dlyd_block_ack
= -1;
663 static int hf_80211_imm_block_ack
= -1;
666 static int hf_wlccp_tlv_unknown_value
= -1;
668 /* Initialize the subtree pointers */
669 static gint ett_wlccp
= -1;
670 static gint ett_wlccp_sap_tree
= -1;
671 static gint ett_wlccp_type
= -1;
672 static gint ett_wlccp_cm_flags
= -1;
673 static gint ett_wlccp_scm_flags
= -1;
674 static gint ett_wlccp_scm_priority_flags
= -1;
675 static gint ett_wlccp_scm_bridge_priority_flags
= -1;
676 static gint ett_wlccp_rm_flags
= -1;
677 static gint ett_wlccp_nm_flags
= -1;
680 static gint ett_wlccp_flags
= -1;
681 static gint ett_wlccp_ap_node_id
= -1;
682 static gint ett_wlccp_eapol_msg_tree
= -1;
683 static gint ett_wlccp_eap_tree
= -1;
684 static gint ett_wlccp_tlv_tree
= -1;
685 static gint ett_tlv_flags_tree
= -1;
686 static gint ett_tlv_sub_tree
= -1;
687 static gint ett_80211_capability_flags_tree
= -1;
688 static gint ett_framereport_elements_tree
= -1;
692 /* Code to actually dissect the packets */
694 dissect_wlccp(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
)
696 /* Set up structures needed to add the protocol subtree and manage it */
698 proto_tree
*wlccp_tree
, *wlccp_sap_tree
, *wlccp_type_tree
;
700 guint offset
= 0, old_offset
;
702 guint8 version
=0, sap_id
=0;
705 guint8 base_message_type
=0, message_sub_type
=0;
707 /* Make entries in Protocol column and Info column on summary display */
708 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "WLCCP");
710 if(tvb_get_guint8(tvb
, 0) == 0xC1) /* Get the version number */
713 sap_id
= tvb_get_guint8(tvb
,1) & SAP_VALUE_MASK
;
714 base_message_type
=(tvb_get_guint8(tvb
,6)) & MT_BASE_MSG_TYPE
;
715 message_sub_type
=(tvb_get_guint8(tvb
, 6) & MT_SUBTYPE
) >> 6;
724 col_add_fstr(pinfo
->cinfo
, COL_INFO
, "Message Type: %-27s SubType: %s",
725 val_to_str_const(base_message_type
, wlccp_msg_type_vs_0
, "Unknown"),
726 val_to_str_const(message_sub_type
, wlccp_subtype_vs
, "Unknown"));
729 } /* case WLCCP_SAP_CCM */
734 col_add_fstr(pinfo
->cinfo
, COL_INFO
, "Message Type: %-27s SubType: %s",
735 val_to_str_const(base_message_type
, wlccp_msg_type_vs_1
, "Unknown"),
736 val_to_str_const(message_sub_type
, wlccp_subtype_vs
, "Unknown"));
738 } /* case WLCCP_SAP_SEC */
742 col_add_fstr(pinfo
->cinfo
, COL_INFO
, "Message Type: %-27s SubType: %s",
743 val_to_str_const(base_message_type
, wlccp_msg_type_vs_2
, "Unknown"),
744 val_to_str_const(message_sub_type
, wlccp_subtype_vs
, "Unknown"));
747 } /* case WLCCP_SAP_RRM */
751 col_add_fstr(pinfo
->cinfo
, COL_INFO
, "Message Type: %-27s SubType: %s",
752 val_to_str_const(base_message_type
, wlccp_msg_type_vs_3
, "Unknown"),
753 val_to_str_const(message_sub_type
, wlccp_subtype_vs
, "Unknown"));
755 } /* case WLCCP_SAP_QOS */
759 col_add_fstr(pinfo
->cinfo
, COL_INFO
, "Message Type: %-27s SubType: %s",
760 val_to_str_const(base_message_type
, wlccp_msg_type_vs_4
, "Unknown"),
761 val_to_str_const(message_sub_type
, wlccp_subtype_vs
, "Unknown"));
764 } /* case WLCCP_SAP_NM */
768 col_add_fstr(pinfo
->cinfo
, COL_INFO
, "Message Type: %-27s SubType: %s",
769 val_to_str_const(base_message_type
, wlccp_msg_type_vs_5
, "Unknown"),
770 val_to_str_const(message_sub_type
, wlccp_subtype_vs
, "Unknown"));
772 } /* case WLCCP_SAP_MIP */
776 col_add_fstr(pinfo
->cinfo
, COL_INFO
, "Message Type: %-27s SubType: %s", "Unknown",
777 val_to_str_const(message_sub_type
, wlccp_subtype_vs
, "Unknown"));
779 } /* default for switch sap */
784 } /* if version=0xC1 (tvb_get_guint8(tvb, 0) == 0xC1)*/
787 /* create display subtree for the protocol */
788 ti
= proto_tree_add_item(tree
, proto_wlccp
, tvb
, 0, -1, ENC_NA
);
789 wlccp_tree
= proto_item_add_subtree(ti
, ett_wlccp
);
791 proto_tree_add_item(wlccp_tree
, hf_wlccp_version
,
792 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
794 /* interpretation of the packet is determined by WLCCP version */
795 version
= tvb_get_guint8(tvb
, 0);
799 proto_tree_add_item(wlccp_tree
, hf_wlccp_length
,
800 tvb
, 1, 1, ENC_BIG_ENDIAN
);
802 proto_tree_add_item(wlccp_tree
, hf_wlccp_type
,
803 tvb
, 2, 2, ENC_BIG_ENDIAN
);
804 type
= tvb_get_ntohs(tvb
, 2);
806 proto_tree_add_item(wlccp_tree
, hf_wlccp_dstmac
,
809 proto_tree_add_item(wlccp_tree
, hf_wlccp_srcmac
,
813 proto_tree_add_item(wlccp_tree
, hf_wlccp_ipv4_address
,
814 tvb
, 38, 4, ENC_BIG_ENDIAN
);
816 proto_tree_add_item(wlccp_tree
, hf_wlccp_hostname
,
817 tvb
, 44, 28, ENC_ASCII
|ENC_NA
);
818 } /* if type = 0x4081 */
819 } /* if version == 0x00 */
825 ti
= proto_tree_add_item(wlccp_tree
, hf_wlccp_sap
,
826 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
827 wlccp_sap_tree
= proto_item_add_subtree(ti
, ett_wlccp_sap_tree
);
829 proto_tree_add_item(wlccp_sap_tree
, hf_wlccp_sap_version
,
830 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
832 proto_tree_add_item(wlccp_sap_tree
, hf_wlccp_sap_id
,
833 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
835 sap_id
= tvb_get_guint8(tvb
,offset
) & SAP_VALUE_MASK
;
841 proto_tree_add_item(wlccp_tree
, hf_wlccp_destination_node_type
,
842 tvb
, offset
, 2, ENC_BIG_ENDIAN
);
845 proto_tree_add_item(wlccp_tree
, hf_wlccp_length
,
846 tvb
, offset
, 2, ENC_BIG_ENDIAN
);
850 { /* Message Type Field */
851 ti
= proto_tree_add_item(wlccp_tree
, hf_wlccp_type
,
852 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
854 wlccp_type_tree
= proto_item_add_subtree(ti
, ett_wlccp_type
);
856 proto_tree_add_item(wlccp_type_tree
, hf_wlccp_subtype
,
857 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
865 proto_tree_add_item(wlccp_type_tree
, hf_wlccp_base_message_type_0
,
866 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
870 } /* case WLCCP_SAP_CCM */
874 proto_tree_add_item(wlccp_type_tree
, hf_wlccp_base_message_type_1
,
875 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
879 } /* case WLCCP_SAP_SEC */
883 proto_tree_add_item(wlccp_type_tree
, hf_wlccp_base_message_type_2
,
884 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
888 } /* case WLCCP_SAP_RRM */
892 proto_tree_add_item(wlccp_type_tree
, hf_wlccp_base_message_type_3
,
893 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
897 } /* case WLCCP_SAP_QOS */
901 proto_tree_add_item(wlccp_type_tree
, hf_wlccp_base_message_type_4
,
902 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
906 } /* case WLCCP_SAP_NM */
910 proto_tree_add_item(wlccp_type_tree
, hf_wlccp_base_message_type_5
,
911 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
915 } /* case WLCCP_SAP_MIP */
920 proto_tree_add_item(wlccp_type_tree
, hf_wlccp_base_message_type_unknown
,
921 tvb
, offset
, 1, ENC_BIG_ENDIAN
);
925 } /* default for switch sap */
929 base_message_type
=(tvb_get_guint8(tvb
,offset
) & MT_BASE_MSG_TYPE
);
932 } /* Message Type Field */
934 /* after the Message Type Field things change based on SAP and Message Type */
945 offset
= dissect_wlccp_ccm_msg(wlccp_tree
, tvb
, offset
, base_message_type
);
949 } /* case WLCCP_SAP_CCM */
954 offset
= dissect_wlccp_sec_msg(wlccp_tree
, tvb
, offset
, base_message_type
);
958 } /* case WLCCP_SAP_SEC */
963 offset
= dissect_wlccp_rrm_msg(wlccp_tree
, tvb
, offset
, base_message_type
);
967 } /* case WLCCP_SAP_RRM */
972 offset
= dissect_wlccp_qos_msg(wlccp_tree
, tvb
, offset
, base_message_type
);
976 } /* case WLCCP_SAP_QOS */
981 offset
= dissect_wlccp_nm_msg(wlccp_tree
, tvb
, offset
, base_message_type
);
985 } /* case WLCCP_SAP_NM */
990 offset
= dissect_wlccp_mip_msg(wlccp_tree
, tvb
, offset
, base_message_type
);
994 } /* case WLCCP_SAP_MIP */
998 /* what should we do if we get an undefined SAP? */
1002 } /* default for switch sap */
1008 if(get_tlv_flag() || get_mic_flag())
1011 if (tvb_length_remaining(tvb
,offset
) < 4)
1013 /* something is wrong if the TLV flag is set and there's not enough left in the buffer */
1015 /* proto_tree_add_string(wlccp_tree, NULL, tvb, offset, -1, "MIC Flag=%d and TLV Flag=%d, but no data left to decode."); */
1017 } /* if bytes_left <=0 */
1021 while (tvb_length_remaining(tvb
,offset
) >= 4)
1023 old_offset
= offset
;
1024 offset
= dissect_wlccp_tlvs(wlccp_tree
, tvb
, offset
, 0);
1025 DISSECTOR_ASSERT(offset
> old_offset
);
1026 } /* while bytes_left */
1029 } /*else bytes_left < 4 */
1031 } /* if tlv_flag || mic_flag */
1033 } /* if version == 0xC1 */
1037 } /* dissect_wlccp */
1040 /*******************************************************************************************/
1042 /* some utility functions */
1044 /* these could be implemented with a struct */
1046 static void set_mic_flag(gboolean flag
)
1051 static void set_tlv_flag(gboolean flag
)
1054 } /* set_tlv_flag */
1056 static gboolean
get_tlv_flag(void)
1059 } /* get_tlv_flag */
1061 static gboolean
get_mic_flag(void)
1064 } /* get_mic_flag */
1066 /*******************************************************************************************/
1068 static guint
dissect_wlccp_ccm_msg(proto_tree
*_tree
, tvbuff_t
*_tvb
, guint _offset
, guint8 _base_message_type
)
1071 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
;
1073 gboolean _relay_flag
=0, _mic_flag
=0, _tlv_flag
=0;
1074 guint8 _aaa_msg_type
=0, _eapol_type
=0;
1075 guint16 _eap_msg_length
=0;
1077 proto_tree_add_item(_tree
, hf_wlccp_hops
,
1078 _tvb
, _offset
, 1, ENC_BIG_ENDIAN
);
1081 proto_tree_add_item(_tree
, hf_wlccp_msg_id
,
1082 _tvb
, _offset
, 2, ENC_BIG_ENDIAN
);
1086 /* Decode the CM Flags Field */
1088 _ti
= proto_tree_add_item(_tree
, hf_wlccp_flags
,
1089 _tvb
, _offset
, 2, ENC_BIG_ENDIAN
);
1090 _wlccp_cm_flags_tree
= proto_item_add_subtree(_ti
, ett_wlccp_cm_flags
);
1093 proto_tree_add_item(_wlccp_cm_flags_tree
, hf_wlccp_retry_flag
,
1094 _tvb
, _offset
, 2, ENC_BIG_ENDIAN
);
1096 proto_tree_add_item(_wlccp_cm_flags_tree
, hf_wlccp_response_request_flag
,
1097 _tvb
, _offset
, 2, ENC_BIG_ENDIAN
);
1099 proto_tree_add_item(_wlccp_cm_flags_tree
, hf_wlccp_tlv_flag
,
1100 _tvb
, _offset
, 2, ENC_BIG_ENDIAN
);
1101 _tlv_flag
= (tvb_get_ntohs(_tvb
, _offset
)>>13) & 1;
1102 set_tlv_flag(_tlv_flag
);
1104 proto_tree_add_item(_wlccp_cm_flags_tree
, hf_wlccp_inbound_flag
,
1105 _tvb
, _offset
, 2, ENC_BIG_ENDIAN
);
1107 proto_tree_add_item(_wlccp_cm_flags_tree
, hf_wlccp_outbound_flag
,
1108 _tvb
, _offset
, 2, ENC_BIG_ENDIAN
);
1110 proto_tree_add_item(_wlccp_cm_flags_tree
, hf_wlccp_hopwise_routing_flag
,
1111 _tvb
, _offset
, 2, ENC_BIG_ENDIAN
);
1113 proto_tree_add_item(_wlccp_cm_flags_tree
, hf_wlccp_root_cm_flag
,
1114 _tvb
, _offset
, 2, ENC_BIG_ENDIAN
);
1116 proto_tree_add_item(_wlccp_cm_flags_tree
, hf_wlccp_relay_flag
,
1117 _tvb
, _offset
, 2, ENC_BIG_ENDIAN
);
1118 _relay_flag
= (tvb_get_ntohs(_tvb
, _offset
)>>8) & 1;
1120 proto_tree_add_item(_wlccp_cm_flags_tree
, hf_wlccp_mic_flag
,
1121 _tvb
, _offset
, 2, ENC_BIG_ENDIAN
);
1122 _mic_flag
= (tvb_get_ntohs(_tvb
, _offset
)>>7) & 1;
1123 set_mic_flag(_mic_flag
);
1127 /* End Decode the CM Flags Field */
1130 proto_tree_add_item(_tree
, hf_wlccp_originator_node_type
,
1131 _tvb
, _offset
, 2, ENC_BIG_ENDIAN
);
1134 proto_tree_add_item(_tree
, hf_wlccp_originator
,
1135 _tvb
, _offset
, 6, ENC_NA
);
1138 proto_tree_add_item(_tree
, hf_wlccp_responder_node_type
,
1139 _tvb
, _offset
, 2, ENC_BIG_ENDIAN
);
1142 proto_tree_add_item(_tree
, hf_wlccp_responder
,
1143 _tvb
, _offset
, 6, ENC_NA
);
1148 proto_tree_add_item(_tree
, hf_wlccp_relay_node_type
,
1149 _tvb
, _offset
, 2, ENC_BIG_ENDIAN
);
1152 proto_tree_add_item(_tree
, hf_wlccp_relay_node_id
,
1153 _tvb
, _offset
, 6, ENC_NA
);
1156 } /* if _relay_flag */
1159 switch (_base_message_type
)
1164 proto_tree_add_item(_tree
, hf_wlccp_scm_hop_address
,
1165 _tvb
, _offset
, 6, ENC_NA
);
1168 /* Decode the SCM Flags Field */
1170 _ti
= proto_tree_add_item(_tree
, hf_wlccp_scm_flags
,
1171 _tvb
, _offset
, 2, ENC_BIG_ENDIAN
);
1172 _wlccp_scm_flags_tree
= proto_item_add_subtree(_ti
, ett_wlccp_scm_flags
);
1174 proto_tree_add_item(_wlccp_scm_flags_tree
, hf_wlccp_scm_layer2update_flag
,
1175 _tvb
, _offset
, 2, ENC_BIG_ENDIAN
);
1177 proto_tree_add_item(_wlccp_scm_flags_tree
, hf_wlccp_scm_unattached_flag
,
1178 _tvb
, _offset
, 2, ENC_BIG_ENDIAN
);
1180 proto_tree_add_item(_wlccp_scm_flags_tree
, hf_wlccp_scm_unscheduled_flag
,
1181 _tvb
, _offset
, 2, ENC_BIG_ENDIAN
);
1183 proto_tree_add_item(_wlccp_scm_flags_tree
, hf_wlccp_scm_active_flag
,
1184 _tvb
, _offset
, 2, ENC_BIG_ENDIAN
);
1187 /* End Decode the SCM Flags Field */
1190 proto_tree_add_item(_tree
, hf_wlccp_scm_election_group
,
1191 _tvb
, _offset
, 1, ENC_BIG_ENDIAN
);
1194 proto_tree_add_item(_tree
, hf_wlccp_scm_attach_count
,
1195 _tvb
, _offset
, 1, ENC_BIG_ENDIAN
);
1198 /* Decode the SCM Priority Flags Field */
1200 _ti
= proto_tree_add_item(_tree
, hf_wlccp_scm_priority_flags
,
1201 _tvb
, _offset
, 1, ENC_BIG_ENDIAN
);
1202 _wlccp_scm_priority_flags_tree
= proto_item_add_subtree(_ti
, ett_wlccp_scm_priority_flags
);
1204 proto_tree_add_item(_wlccp_scm_priority_flags_tree
, hf_wlccp_scm_priority
,
1205 _tvb
, _offset
, 1, ENC_BIG_ENDIAN
);
1207 proto_tree_add_item(_wlccp_scm_priority_flags_tree
, hf_wlccp_scm_preferred_flag
,
1208 _tvb
, _offset
, 1, ENC_BIG_ENDIAN
);
1212 /* End Decode the SCM Priority Flags Field */
1214 /* Decode the SCM Bridge Priority Flags Field */
1216 _ti
= proto_tree_add_item(_tree
, hf_wlccp_scm_bridge_priority_flags
,
1217 _tvb
, _offset
, 1, ENC_BIG_ENDIAN
);
1218 _wlccp_scm_bridge_priority_flags_tree
= proto_item_add_subtree(_ti
, ett_wlccp_scm_bridge_priority_flags
);
1220 proto_tree_add_item(_wlccp_scm_bridge_priority_flags_tree
, hf_wlccp_scm_bridge_priority
,
1221 _tvb
, _offset
, 1, ENC_BIG_ENDIAN
);
1223 proto_tree_add_item(_wlccp_scm_bridge_priority_flags_tree
, hf_wlccp_scm_bridge_disable_flag
,
1224 _tvb
, _offset
, 1, ENC_BIG_ENDIAN
);
1228 /* End Decode the SCM Bridge Priority Flags Field */
1230 proto_tree_add_item(_tree
, hf_wlccp_scm_node_id
,
1231 _tvb
, _offset
, 6, ENC_NA
);
1234 proto_tree_add_item(_tree
, hf_wlccp_scm_unknown_short
,
1235 _tvb
, _offset
, 2, ENC_BIG_ENDIAN
);
1238 proto_tree_add_item(_tree
, hf_wlccp_scm_instance_age
,
1239 _tvb
, _offset
, 4, ENC_BIG_ENDIAN
);
1242 proto_tree_add_item(_tree
, hf_wlccp_scm_path_cost
,
1243 _tvb
, _offset
, 2, ENC_BIG_ENDIAN
);
1246 proto_tree_add_item(_tree
, hf_wlccp_scm_hop_count
,
1247 _tvb
, _offset
, 1, ENC_BIG_ENDIAN
);
1250 proto_tree_add_item(_tree
, hf_wlccp_scm_advperiod
,
1251 _tvb
, _offset
, 1, ENC_BIG_ENDIAN
);
1311 case 0x0b: /* cmAAA */
1313 proto_tree_add_item(_tree
, hf_wlccp_requ_node_type
,
1314 _tvb
, _offset
, 2, ENC_BIG_ENDIAN
);
1317 proto_tree_add_item(_tree
, hf_wlccp_requ_node_id
,
1318 _tvb
, _offset
, 6, ENC_NA
);
1321 /*kan - according to the patent applicatoin these fields vary based
1323 For now we decode what we know about and then we'll come back and add
1326 proto_tree_add_item(_tree
, hf_wlccp_aaa_msg_type
,
1327 _tvb
, _offset
, 1, ENC_BIG_ENDIAN
);
1328 _aaa_msg_type
=tvb_get_guint8(_tvb
,_offset
);
1331 proto_tree_add_item(_tree
, hf_wlccp_aaa_auth_type
,
1332 _tvb
, _offset
, 1, ENC_BIG_ENDIAN
);
1335 proto_tree_add_item(_tree
, hf_wlccp_keymgmt_type
,
1336 _tvb
, _offset
, 1, ENC_BIG_ENDIAN
);
1339 proto_tree_add_item(_tree
, hf_wlccp_status
,
1340 _tvb
, _offset
, 1, ENC_BIG_ENDIAN
);
1343 /* kan - I'm pretty sure this EAPOL tree only applies sometimes, but it's the only complete example that I have
1344 to test against for now.
1345 For that matter, it may be possible to just hand this piece of the packet over to the EAPOL dissector and let it
1346 handle things. To be investigated further */
1348 if (_aaa_msg_type
== 0x2) /*EAPOL*/
1350 _ti
= proto_tree_add_item(_tree
, hf_wlccp_eapol_msg
,
1351 _tvb
, _offset
, 6, ENC_NA
);
1353 _wlccp_eapol_msg_tree
= proto_item_add_subtree(
1354 _ti
, ett_wlccp_eapol_msg_tree
);
1357 /* THIS NEEDS TO BE CHECKED */
1358 /*kan - skip some unknown bytes */
1361 proto_tree_add_item(_wlccp_eapol_msg_tree
, hf_wlccp_eapol_version
,
1362 _tvb
, _offset
, 1, ENC_BIG_ENDIAN
);
1366 proto_tree_add_item(_wlccp_eapol_msg_tree
, hf_wlccp_eapol_type
,
1367 _tvb
, _offset
, 1, ENC_BIG_ENDIAN
);
1368 _eapol_type
=tvb_get_guint8(_tvb
, _offset
);
1371 if (_eapol_type
== 0)
1373 proto_tree_add_item(_wlccp_eapol_msg_tree
, hf_wlccp_eap_msg_length
,
1374 _tvb
, _offset
, 2, ENC_BIG_ENDIAN
);
1375 _eap_msg_length
=tvb_get_ntohs(_tvb
, _offset
);
1378 proto_tree_add_item(_wlccp_eapol_msg_tree
, hf_wlccp_eap_msg
,
1379 _tvb
, _offset
, _eap_msg_length
, ENC_NA
);
1380 _offset
+= _eap_msg_length
;
1382 } /* if _eapol_type == 0 */
1384 } /* if _aaa_msg_type ==0x2 */
1386 if (_aaa_msg_type
== 0x3) /*Cisco proprietary message*/
1388 proto_tree_add_item(_tree
, hf_wlccp_cisco_acctg_msg
,
1389 _tvb
, _offset
, -1, ENC_NA
);
1390 } /* if aaa_msg_type == 0x3 */
1395 case 0x0c: /* cmPathInit */
1397 proto_tree_add_item(_tree
, hf_wlccp_requ_node_type
,
1398 _tvb
, _offset
, 2, ENC_BIG_ENDIAN
);
1401 proto_tree_add_item(_tree
, hf_wlccp_requ_node_id
,
1402 _tvb
, _offset
, 6, ENC_NA
);
1405 /*kan - there's a reserved alignment byte right here*/
1406 proto_tree_add_item(_tree
, hf_wlccp_path_init_rsvd
,
1407 _tvb
, _offset
, 1, ENC_BIG_ENDIAN
);
1410 proto_tree_add_item(_tree
, hf_wlccp_status
,
1411 _tvb
, _offset
, 1, ENC_BIG_ENDIAN
);
1417 case 0x0f: /* cmWIDS */
1419 proto_tree_add_item(_tree
, hf_wlccp_wids_msg_type
,
1420 _tvb
, _offset
, 1, ENC_BIG_ENDIAN
);
1423 proto_tree_add_item(_tree
, hf_wlccp_status
,
1424 _tvb
, _offset
, 1, ENC_BIG_ENDIAN
);
1434 } /* default for switch _base_message_type */
1436 } /* switch _base_message_type */
1440 } /* dissect_wlccp_ccm_msg */
1442 static guint
dissect_wlccp_sec_msg(proto_tree
*_tree _U_
, tvbuff_t
*_tvb _U_
, guint _offset
, guint8 _base_message_type
)
1445 /* at the momemt we have no more data to use to write this dissector code */
1446 /* it's just a place holder for now */
1448 switch (_base_message_type
)
1461 } /* default for switch _base_message_type */
1463 } /* switch _base_message_type */
1469 } /* dissect_wlccp_sec_msg */
1471 static guint
dissect_wlccp_rrm_msg(proto_tree
*_tree
, tvbuff_t
*_tvb
, guint _offset
, guint8 _base_message_type
)
1474 proto_tree
*_wlccp_rm_flags_tree
;
1477 gboolean _mic_flag
=0;
1481 /* Decode the RM Flags Field */
1483 _ti
= proto_tree_add_item(_tree
, hf_wlccp_rm_flags
,
1484 _tvb
, _offset
, 1, ENC_BIG_ENDIAN
);
1486 _wlccp_rm_flags_tree
= proto_item_add_subtree(_ti
, ett_wlccp_rm_flags
);
1488 proto_tree_add_item(_wlccp_rm_flags_tree
, hf_wlccp_rm_mic_flag
,
1489 _tvb
, _offset
, 1, ENC_BIG_ENDIAN
);
1491 _mic_flag
= (tvb_get_guint8(_tvb
, _offset
) & RM_F_MIC
) >> 1;
1493 set_mic_flag(_mic_flag
);
1497 proto_tree_add_item(_wlccp_rm_flags_tree
, hf_wlccp_rm_request_reply_flag
,
1498 _tvb
, _offset
, 1, ENC_BIG_ENDIAN
);
1502 /* End Decode the RM Flags Field */
1504 proto_tree_add_item(_tree
, hf_wlccp_msg_id
,
1505 _tvb
, _offset
, 2, ENC_BIG_ENDIAN
);
1508 proto_tree_add_item(_tree
, hf_wlccp_originator_node_type
,
1509 _tvb
, _offset
, 2, ENC_BIG_ENDIAN
);
1512 proto_tree_add_item(_tree
, hf_wlccp_originator
,
1513 _tvb
, _offset
, 6, ENC_NA
);
1516 proto_tree_add_item(_tree
, hf_wlccp_responder_node_type
,
1517 _tvb
, _offset
, 2, ENC_BIG_ENDIAN
);
1520 proto_tree_add_item(_tree
, hf_wlccp_responder
,
1521 _tvb
, _offset
, 6, ENC_NA
);
1525 switch (_base_message_type
)
1528 case 0x01: /* rmReq */
1533 case 0x02: /* rmReqRoutingResp */
1538 case 0x03: /* rmReport */
1547 } /* default for switch _base_message_type */
1549 } /* switch _base_message_type */
1554 } /* dissect_wlccp_rrm_msg */
1558 static guint
dissect_wlccp_qos_msg(proto_tree
*_tree _U_
, tvbuff_t
*_tvb _U_
, guint _offset
, guint8 _base_message_type
)
1560 /* at the momemt we have no more data to use to write this dissector code */
1561 /* it's just a place holder for now */
1564 switch (_base_message_type
)
1577 } /* default for switch _base_message_type */
1579 } /* switch _base_message_type */
1584 } /* dissect_wlccp_qos_msg */
1587 static guint
dissect_wlccp_nm_msg(proto_tree
*_tree
, tvbuff_t
*_tvb
, guint _offset
, guint8 _base_message_type
)
1590 proto_tree
*_wlccp_ap_node_id_tree
, *_wlccp_nm_flags_tree
;
1592 gboolean _mic_flag
=0, _tlv_flag
=0;
1595 proto_tree_add_item(_tree
, hf_wlccp_nm_version
,
1596 _tvb
, _offset
, 1, ENC_BIG_ENDIAN
);
1599 proto_tree_add_item(_tree
, hf_wlccp_msg_id
,
1600 _tvb
, _offset
, 2, ENC_BIG_ENDIAN
);
1604 /* Decode the NM Flags Field */
1606 _ti
= proto_tree_add_item(_tree
, hf_wlccp_flags
,
1607 _tvb
, _offset
, 2, ENC_BIG_ENDIAN
);
1608 _wlccp_nm_flags_tree
= proto_item_add_subtree(_ti
, ett_wlccp_nm_flags
);
1611 proto_tree_add_item(_wlccp_nm_flags_tree
, hf_wlccp_retry_flag
,
1612 _tvb
, _offset
, 2, ENC_BIG_ENDIAN
);
1614 proto_tree_add_item(_wlccp_nm_flags_tree
, hf_wlccp_ack_required_flag
,
1615 _tvb
, _offset
, 2, ENC_BIG_ENDIAN
);
1617 proto_tree_add_item(_wlccp_nm_flags_tree
, hf_wlccp_tlv_flag
,
1618 _tvb
, _offset
, 2, ENC_BIG_ENDIAN
);
1619 _tlv_flag
= (tvb_get_ntohs(_tvb
, _offset
)>>13) & 1;
1620 set_tlv_flag(_tlv_flag
);
1622 proto_tree_add_item(_wlccp_nm_flags_tree
, hf_wlccp_mic_flag
,
1623 _tvb
, _offset
, 2, ENC_BIG_ENDIAN
);
1624 _mic_flag
= (tvb_get_ntohs(_tvb
, _offset
)>>7) & 1;
1625 set_mic_flag(_mic_flag
);
1629 /* End Decode the NM Flags Field */
1632 proto_tree_add_item(_tree
, hf_wlccp_originator_node_type
,
1633 _tvb
, _offset
, 2, ENC_BIG_ENDIAN
);
1636 proto_tree_add_item(_tree
, hf_wlccp_originator
,
1637 _tvb
, _offset
, 6, ENC_NA
);
1640 proto_tree_add_item(_tree
, hf_wlccp_responder_node_type
,
1641 _tvb
, _offset
, 2, ENC_BIG_ENDIAN
);
1644 proto_tree_add_item(_tree
, hf_wlccp_responder
,
1645 _tvb
, _offset
, 6, ENC_NA
);
1649 switch (_base_message_type
)
1652 case 0x01: /* nmAck */
1657 case 0x10: /* nmConfigRequest */
1659 proto_tree_add_item(_tree
, hf_wlccp_nmconfig
,
1660 _tvb
, _offset
, 1, ENC_BIG_ENDIAN
);
1663 /* kan - there appears to be some padding or other unknowns here */
1669 case 0x11: /* nmConfigReply */
1671 proto_tree_add_item(_tree
, hf_wlccp_nmconfig
,
1672 _tvb
, _offset
, 1, ENC_BIG_ENDIAN
);
1675 /* kan - there appears to be some padding or other unknowns here */
1681 case 0x20: /* nmApRegistration */
1683 proto_tree_add_item(_tree
, hf_wlccp_timestamp
,
1684 _tvb
, _offset
, 8, ENC_BIG_ENDIAN
);
1687 proto_tree_add_item(_tree
, hf_wlccp_apregstatus
,
1688 _tvb
, _offset
, 1, ENC_BIG_ENDIAN
);
1691 _offset
+= 3; /*kan - skip some apparently unused bytes */
1693 _ti
= proto_tree_add_item(_tree
, hf_wlccp_ap_node_id
,
1694 _tvb
, _offset
, 8, ENC_NA
);
1696 _wlccp_ap_node_id_tree
= proto_item_add_subtree(
1697 _ti
, ett_wlccp_ap_node_id
);
1699 proto_tree_add_item(_wlccp_ap_node_id_tree
, hf_wlccp_ap_node_type
,
1700 _tvb
, _offset
, 2, ENC_BIG_ENDIAN
);
1703 proto_tree_add_item(_wlccp_ap_node_id_tree
, hf_wlccp_ap_node_id_address
,
1704 _tvb
, _offset
, 6, ENC_NA
);
1710 case 0x21: /* nmScmStateChange */
1712 proto_tree_add_item(_tree
, hf_wlccp_timestamp
,
1713 _tvb
, _offset
, 8, ENC_BIG_ENDIAN
);
1716 proto_tree_add_item(_tree
, hf_wlccp_scmstate_change
,
1717 _tvb
, _offset
, 1, ENC_BIG_ENDIAN
);
1720 proto_tree_add_item(_tree
, hf_wlccp_scmstate_change_reason
,
1721 _tvb
, _offset
, 1, ENC_BIG_ENDIAN
);
1724 /*kan - skip some apparently unused bytes */
1730 case 0x22: /* nmScmKeepActive */
1732 proto_tree_add_item(_tree
, hf_wlccp_scmattach_state
,
1733 _tvb
, _offset
, 1, ENC_BIG_ENDIAN
);
1736 proto_tree_add_item(_tree
, hf_wlccp_nmconfig
,
1737 _tvb
, _offset
, 1, ENC_BIG_ENDIAN
);
1740 proto_tree_add_item(_tree
, hf_wlccp_nmcapability
,
1741 _tvb
, _offset
, 1, ENC_BIG_ENDIAN
);
1744 /*kan - skip some apparently unused bytes */
1750 case 0x30: /* nmClientEventReport */
1752 proto_tree_add_item(_tree
, hf_wlccp_timestamp
,
1753 _tvb
, _offset
, 8, ENC_BIG_ENDIAN
);
1759 case 0x31: /* nmAllClientRefreshRequest */
1761 proto_tree_add_item(_tree
, hf_wlccp_refresh_req_id
,
1762 _tvb
, _offset
, 4, ENC_BIG_ENDIAN
);
1772 } /* default for switch _base_message_type */
1774 } /* switch _base_message_type */
1780 } /* dissect_wlccp_nm_msg */
1782 static guint
dissect_wlccp_mip_msg(proto_tree
*_tree _U_
, tvbuff_t
*_tvb _U_
, guint _offset
, guint8 _base_message_type
)
1784 /* at the momemt we have no more data to use to write this dissector code */
1785 /* it's just a place holder for now */
1787 switch (_base_message_type
)
1800 } /* default for switch _base_message_type */
1802 } /* switch _base_message_type */
1806 } /* dissect_wlccp_mip_msg */
1809 /***************************************************************************************************/
1811 static guint
dissect_wlccp_tlvs( proto_tree
*_tree
, tvbuff_t
*_tvb
, guint _offset
, guint _depth
)
1814 proto_item
*_ti
, *_temp_ti
;
1815 proto_tree
*_tlv_tree
;
1816 proto_tree
*_tlv_flags_tree
;
1818 gboolean _container_flag
=0;
1819 gint _group_id
=0, _type_id
=0;
1826 /* the TLV length is 2 bytes into the TLV, and we need it now */
1827 _length
= tvb_get_ntohs(_tvb
,_offset
+2);
1829 /* figure out where the end of this TLV is so we know when to stop dissecting it */
1830 _tlv_end
= _offset
+ _length
;
1832 /* this TLV is _length bytes long */
1833 _ti
= proto_tree_add_item(_tree
, hf_wlccp_tlv
, _tvb
, _offset
, _length
, ENC_NA
);
1834 /* create the TLV sub tree */
1835 _tlv_tree
= proto_item_add_subtree(_ti
, ett_wlccp_tlv_tree
);
1837 /* save the pointer because we'll add some text to it later */
1842 /* add an arbitrary safety factor in case we foul up the dissector recursion */
1843 DISSECTOR_ASSERT(_depth
< 100);
1845 /* add the flags field to the tlv_tree */
1846 _ti
= proto_tree_add_item(_tlv_tree
, hf_tlv_flags
, _tvb
, _offset
, 2, ENC_BIG_ENDIAN
);
1847 _tlv_flags_tree
= proto_item_add_subtree(_ti
, ett_tlv_flags_tree
);
1850 first 2 bytes are the flags, Group and Type
1853 bits 2-3 = reserved,
1854 bits 4-7 = group ID,
1860 /* the TLV group and type IDs are contained in the flags field, extract them */
1861 _group_id
= (tvb_get_ntohs(_tvb
,_offset
) & TLV_GROUP_ID
) >> 8;
1862 _type_id
= (tvb_get_ntohs(_tvb
,_offset
) & TLV_TYPE_ID
);
1864 /* add the flags to the tree */
1865 proto_tree_add_item(_tlv_flags_tree
, hf_wlccp_tlv_container_flag
, _tvb
, _offset
, 2, ENC_BIG_ENDIAN
);
1866 proto_tree_add_item(_tlv_flags_tree
, hf_wlccp_tlv_encrypted_flag
, _tvb
, _offset
, 2, ENC_BIG_ENDIAN
);
1867 proto_tree_add_item(_tlv_flags_tree
, hf_wlccp_tlv_reserved_bit
, _tvb
, _offset
, 2, ENC_BIG_ENDIAN
);
1868 proto_tree_add_item(_tlv_flags_tree
, hf_wlccp_tlv_group
, _tvb
, _offset
, 2, ENC_BIG_ENDIAN
);
1869 proto_tree_add_item(_tlv_flags_tree
, hf_wlccp_tlv_request_flag
, _tvb
, _offset
, 2, ENC_BIG_ENDIAN
);
1871 /* a hack to show the right string representation of the type_id in the tree */
1874 case WLCCP_TLV_GROUP_WLCCP
:
1876 proto_tree_add_item(_tlv_flags_tree
, hf_wlccp_tlv_type0
, _tvb
, _offset
, 2, ENC_BIG_ENDIAN
);
1878 } /* case WLCCP_TLV_GROUP_WLCCP */
1880 case WLCCP_TLV_GROUP_SEC
:
1882 proto_tree_add_item(_tlv_flags_tree
, hf_wlccp_tlv_type1
, _tvb
, _offset
, 2, ENC_BIG_ENDIAN
);
1884 } /* case WLCCP_TLV_GROUP_SEC */
1886 case WLCCP_TLV_GROUP_RRM
:
1888 proto_tree_add_item(_tlv_flags_tree
, hf_wlccp_tlv_type2
, _tvb
, _offset
, 2, ENC_BIG_ENDIAN
);
1890 } /* case WLCCP_TLV_GROUP_RRM */
1892 case WLCCP_TLV_GROUP_QOS
:
1894 proto_tree_add_item(_tlv_flags_tree
, hf_wlccp_tlv_type3
, _tvb
, _offset
, 2, ENC_BIG_ENDIAN
);
1896 } /* case WLCCP_TLV_GROUP_QOS */
1898 case WLCCP_TLV_GROUP_NM
:
1900 proto_tree_add_item(_tlv_flags_tree
, hf_wlccp_tlv_type4
, _tvb
, _offset
, 2, ENC_BIG_ENDIAN
);
1902 } /* case WLCCP_TLV_GROUP_NM */
1904 case WLCCP_TLV_GROUP_MIP
:
1906 proto_tree_add_item(_tlv_flags_tree
, hf_wlccp_tlv_type5
, _tvb
, _offset
, 2, ENC_BIG_ENDIAN
);
1908 } /* case WLCCP_TLV_GROUP_MIP */
1912 proto_tree_add_item(_tlv_flags_tree
, hf_wlccp_tlv_type
, _tvb
, _offset
, 2, ENC_BIG_ENDIAN
);
1914 } /* case default for switch _group_id */
1917 } /* switch _group_id */
1919 _container_flag
= (tvb_get_ntohs(_tvb
, _offset
) & TLV_F_CONTAINER
) >> 15;
1921 /* according to the patent, some behavior changes if the request flag is set */
1922 /* it would be nice if it said how, but I don't think it matters for decoding purposes */
1926 /* finished with the flags field */
1928 /* add the length field to the tlv_tree */
1929 proto_tree_add_item(_tlv_tree
, hf_wlccp_tlv_length
, _tvb
, _offset
, 2, ENC_BIG_ENDIAN
);
1932 /* finished with the length field */
1934 /* now decode the fixed fields in each TLV */
1938 case WLCCP_TLV_GROUP_WLCCP
:
1940 _offset
= dissect_wlccp_ccm_tlv(_tlv_tree
, _tvb
, _offset
, _type_id
, _length
- 4, _temp_ti
);
1943 } /* case WLCCP_TLV_GROUP_WLCCP */
1945 case WLCCP_TLV_GROUP_SEC
:
1947 _offset
= dissect_wlccp_sec_tlv(_tlv_tree
, _tvb
, _offset
, _type_id
, _length
- 4, _temp_ti
);
1950 } /* case WLCCP_TLV_GROUP_SEC */
1952 case WLCCP_TLV_GROUP_RRM
:
1954 _offset
= dissect_wlccp_rrm_tlv(_tlv_tree
, _tvb
, _offset
, _type_id
, _length
- 4, _temp_ti
);
1957 } /* case WLCCP_TLV_GROUP_RRM */
1959 case WLCCP_TLV_GROUP_QOS
:
1961 _offset
= dissect_wlccp_qos_tlv(_tlv_tree
, _tvb
, _offset
, _type_id
, _length
- 4, _temp_ti
);
1964 } /* case WLCCP_TLV_GROUP_QOS */
1966 case WLCCP_TLV_GROUP_NM
:
1968 _offset
= dissect_wlccp_nm_tlv(_tlv_tree
, _tvb
, _offset
, _type_id
, _length
- 4, _temp_ti
);
1971 } /* case WLCCP_TLV_GROUP_NM */
1973 case WLCCP_TLV_GROUP_MIP
:
1975 _offset
= dissect_wlccp_mip_tlv(_tlv_tree
, _tvb
, _offset
, _type_id
, _length
- 4, _temp_ti
);
1978 } /* case WLCCP_TLV_GROUP_MIP */
1984 } /* case default for switch _group_id */
1986 } /* switch _group_id */
1988 /* done with decoding the fixed TLV fields */
1992 /* If this TLV is a container, then build a sub tree and decode the contained TLVs */
1994 if (_container_flag
&& (_offset
>= _tlv_end
) )
1996 /* something is wrong if there's not enough left in the buffer */
1998 } /* if container_flag and _offset >= _tlv_end */
1999 else /* _container_flag && _offset >= tlv_end */
2002 if (_container_flag
&& (_offset
< _tlv_end
) )
2005 while (_offset
< _tlv_end
)
2007 _old_offset
= _offset
;
2008 _offset
= dissect_wlccp_tlvs(_tlv_tree
, _tvb
, _offset
, _depth
++);
2009 DISSECTOR_ASSERT(_offset
> _old_offset
);
2010 } /* while bytes_left >= 4*/
2012 } /* _container_flag && (tvb_length_remaining(_tvb,_offset) >= 4) */
2014 } /*_container_flag && (tvb_length_remaining(_tvb,_offset) < 4) */
2017 /* done with decoding the contained TLVs */
2021 } /* dissect_wlccp_tlvs */
2024 /* ************************************************************************************************************* */
2026 /* ALL THE TLV SUB-DISSECTORS NEED A DEFAULT CASE, OTHERWISE WE'LL GET INTO AN INFINITE RECURSION LOOP INSIDE */
2027 /* THE CALLING FUNCTION dissect_wlccp_tlvs. BESIDES, IT'S JUST GOOD FORM :-) */
2030 static guint
dissect_wlccp_ccm_tlv(proto_tree
*_tree
, tvbuff_t
*_tvb
, guint _offset
, gint _type_id
, guint _length
, proto_item
*_ti
)
2036 case 0x00: /* NULL TLV */
2038 proto_item_append_text(_ti
, " NULL TLV");
2039 proto_tree_add_item(_tree
, hf_wlccp_null_tlv
, _tvb
, _offset
, _length
, ENC_NA
);
2044 } /* case tlv_type_id = 0x09 */
2047 case 0x09: /* ipv4Address */
2049 proto_item_append_text(_ti
, " IPv4Address");
2050 proto_tree_add_item(_tree
, hf_wlccp_ipv4_address
, _tvb
, _offset
, 4, ENC_BIG_ENDIAN
);
2055 } /* case tlv_type_id = 0x09 */
2060 /* for unknown types, just add them to the tree as a blob */
2061 proto_item_append_text(_ti
, " Unknown");
2063 proto_tree_add_item(_tree
, hf_wlccp_tlv_unknown_value
, _tvb
, _offset
, _length
, ENC_NA
);
2067 } /* case default for tlv_group_id=0x00 */
2069 } /* switch _type_id */
2073 } /* dissect_wlccp_ccm_tlv */
2077 static guint
dissect_wlccp_sec_tlv(proto_tree
*_tree
, tvbuff_t
*_tvb
, guint _offset
, gint _type_id
, guint _length
, proto_item
*_ti
)
2083 case 0x01: /* initSession */
2086 proto_item_append_text(_ti
, " initSession");
2088 /* skip some unused bytes */
2091 proto_tree_add_item(_tree
, hf_wlccp_path_length
, _tvb
, _offset
, 1, ENC_BIG_ENDIAN
);
2094 /* skip some unused bytes */
2101 case 0x02: /* inSecureContextReq */
2104 proto_item_append_text(_ti
, " inSecureContextReq");
2106 proto_tree_add_item(_tree
, hf_wlccp_key_seq_count
, _tvb
, _offset
, 4, ENC_BIG_ENDIAN
);
2109 proto_tree_add_item(_tree
, hf_wlccp_dest_node_type
, _tvb
, _offset
, 2, ENC_BIG_ENDIAN
);
2112 proto_tree_add_item(_tree
, hf_wlccp_dest_node_id
, _tvb
, _offset
, 6, ENC_NA
);
2115 proto_tree_add_item(_tree
, hf_wlccp_supp_node_type
, _tvb
, _offset
, 2, ENC_BIG_ENDIAN
);
2118 proto_tree_add_item(_tree
, hf_wlccp_supp_node_id
, _tvb
, _offset
, 6, ENC_NA
);
2121 /* skip unused bytes */
2124 proto_tree_add_item(_tree
, hf_wlccp_key_mgmt_type
, _tvb
, _offset
, 1, ENC_BIG_ENDIAN
);
2127 proto_tree_add_item(_tree
, hf_wlccp_nonce
, _tvb
, _offset
, 32, ENC_NA
);
2134 case 0x06: /* authenticator */
2137 proto_item_append_text(_ti
, " authenticator");
2139 proto_tree_add_item(_tree
, hf_wlccp_dest_node_type
, _tvb
, _offset
, 2, ENC_BIG_ENDIAN
);
2142 proto_tree_add_item(_tree
, hf_wlccp_dest_node_id
, _tvb
, _offset
, 6, ENC_NA
);
2145 proto_tree_add_item(_tree
, hf_wlccp_src_node_type
, _tvb
, _offset
, 2, ENC_BIG_ENDIAN
);
2148 proto_tree_add_item(_tree
, hf_wlccp_src_node_id
, _tvb
, _offset
, 6, ENC_NA
);
2151 proto_tree_add_item(_tree
, hf_wlccp_key_seq_count
, _tvb
, _offset
, 4, ENC_BIG_ENDIAN
);
2154 /* skip unused bytes */
2157 proto_tree_add_item(_tree
, hf_wlccp_status
, _tvb
, _offset
, 1, ENC_BIG_ENDIAN
);
2160 proto_tree_add_item(_tree
, hf_wlccp_nonce
, _tvb
, _offset
, 32, ENC_NA
);
2166 case 0x08: /* MIC */
2169 guint16 _mic_length
=0;
2171 proto_item_append_text(_ti
, " mic");
2173 proto_tree_add_item(_tree
, hf_wlccp_mic_msg_seq_count
, _tvb
, _offset
, 8, ENC_BIG_ENDIAN
);
2176 proto_tree_add_item(_tree
, hf_wlccp_mic_length
, _tvb
, _offset
, 2, ENC_BIG_ENDIAN
);
2177 _mic_length
= tvb_get_ntohs(_tvb
,_offset
);
2180 proto_tree_add_item(_tree
, hf_wlccp_mic_value
, _tvb
, _offset
, _mic_length
, ENC_NA
);
2181 _offset
+= _mic_length
;
2186 case 0x0a: /* inSecureContextReply */
2189 proto_item_append_text(_ti
, " inSecureContextReply");
2192 proto_tree_add_item(_tree
, hf_wlccp_key_seq_count
, _tvb
, _offset
, 4, ENC_BIG_ENDIAN
);
2195 proto_tree_add_item(_tree
, hf_wlccp_dest_node_type
, _tvb
, _offset
, 2, ENC_BIG_ENDIAN
);
2198 proto_tree_add_item(_tree
, hf_wlccp_dest_node_id
, _tvb
, _offset
, 6, ENC_NA
);
2201 proto_tree_add_item(_tree
, hf_wlccp_supp_node_type
, _tvb
, _offset
, 2, ENC_BIG_ENDIAN
);
2204 proto_tree_add_item(_tree
, hf_wlccp_supp_node_id
, _tvb
, _offset
, 6, ENC_NA
);
2207 proto_tree_add_item(_tree
, hf_wlccp_nonce
, _tvb
, _offset
, 32, ENC_NA
);
2210 proto_tree_add_item(_tree
, hf_wlccp_session_timeout
, _tvb
, _offset
, 4, ENC_BIG_ENDIAN
);
2220 /* for unknown types, just add them to the tree as a blob */
2221 proto_item_append_text(_ti
, " Unknown");
2222 proto_tree_add_item(_tree
, hf_wlccp_tlv_unknown_value
, _tvb
, _offset
, _length
, ENC_NA
);
2226 } /* default case for switch (_type_id) */
2228 } /* switch _type_id */
2231 } /* dissect_wlccp_sec_tlv */
2235 static guint
dissect_wlccp_rrm_tlv(proto_tree
*_tree
, tvbuff_t
*_tvb
, guint _offset
, gint _type_id
, guint _length
, proto_item
*_ti
)
2241 case 0x02: /* aggrRmReq */
2243 proto_item_append_text(_ti
, " aggrRmReq");
2244 proto_tree_add_item(_tree
, hf_wlccp_token2
, _tvb
, _offset
, 2, ENC_BIG_ENDIAN
);
2247 proto_tree_add_item(_tree
, hf_wlccp_interval
, _tvb
, _offset
, 2, ENC_BIG_ENDIAN
);
2252 } /* case tlv_type_id = 0x02 */
2254 case 0x03 : /* rmReport */
2256 proto_item_append_text(_ti
, " rmReport");
2258 proto_tree_add_item(_tree
, hf_wlccp_sta_type
, _tvb
, _offset
, 1, ENC_BIG_ENDIAN
);
2261 proto_tree_add_item(_tree
, hf_wlccp_bssid
, _tvb
, _offset
, 6, ENC_NA
);
2264 proto_tree_add_item(_tree
, hf_wlccp_stamac
, _tvb
, _offset
, 6, ENC_NA
);
2268 } /* case tlv_type_id = 0x03 */
2270 case 0x04: /* aggrRmReport */
2272 proto_item_append_text(_ti
, " aggrRmReport");
2277 } /* case tlv_type_id = 0x04 */
2279 case 0x12: /* beaconRequest */
2281 proto_item_append_text(_ti
, " beaconRequest");
2283 proto_tree_add_item(_tree
, hf_wlccp_token
, _tvb
, _offset
, 1, ENC_BIG_ENDIAN
);
2286 proto_tree_add_item(_tree
, hf_wlccp_mode
, _tvb
, _offset
, 1, ENC_BIG_ENDIAN
);
2289 proto_tree_add_item(_tree
, hf_wlccp_channel
, _tvb
, _offset
, 1, ENC_BIG_ENDIAN
);
2292 proto_tree_add_item(_tree
, hf_wlccp_scan_mode
, _tvb
, _offset
, 1, ENC_BIG_ENDIAN
);
2295 proto_tree_add_item(_tree
, hf_wlccp_duration
, _tvb
, _offset
, 2, ENC_BIG_ENDIAN
);
2302 case 0x14: /* frameRequest */
2305 guint _count
=0, _counter
=0;
2307 proto_item_append_text(_ti
, " frameRequest");
2309 proto_tree_add_item(_tree
, hf_wlccp_token
, _tvb
, _offset
, 1, ENC_BIG_ENDIAN
);
2312 proto_tree_add_item(_tree
, hf_wlccp_mode
, _tvb
, _offset
, 1, ENC_BIG_ENDIAN
);
2315 proto_tree_add_item(_tree
, hf_wlccp_channel
, _tvb
, _offset
, 1, ENC_BIG_ENDIAN
);
2318 proto_tree_add_item(_tree
, hf_wlccp_count
, _tvb
, _offset
, 1, ENC_BIG_ENDIAN
);
2319 _count
= tvb_get_guint8(_tvb
,_offset
);
2322 proto_tree_add_item(_tree
, hf_wlccp_duration
, _tvb
, _offset
, 2, ENC_BIG_ENDIAN
);
2325 for (_counter
=0; _counter
< _count
; _counter
++)
2328 proto_tree_add_item(_tree
, hf_wlccp_bssid
, _tvb
, _offset
, 6, ENC_NA
);
2331 } /* for _counter=0 */
2338 case 0x15: /* frameReport */
2342 proto_tree
*_fr_elems_tree
;
2344 guint _counter
=0, _arraylen
=0;
2346 proto_item_append_text(_ti
, " frameReport");
2348 proto_tree_add_item(_tree
, hf_wlccp_token
, _tvb
, _offset
, 1, ENC_BIG_ENDIAN
);
2351 proto_tree_add_item(_tree
, hf_wlccp_mode
, _tvb
, _offset
, 1, ENC_BIG_ENDIAN
);
2354 proto_tree_add_item(_tree
, hf_wlccp_channel
, _tvb
, _offset
, 1, ENC_BIG_ENDIAN
);
2357 /* skip some unused bytes */
2360 proto_tree_add_item(_tree
, hf_wlccp_duration
, _tvb
, _offset
, 2, ENC_BIG_ENDIAN
);
2363 _arraylen
=(_length
-10)/14;
2368 _fr_ti
= proto_tree_add_item(_tree
, hf_framereport_elements
, _tvb
, _offset
, (_length
-10), ENC_NA
);
2369 _fr_elems_tree
= proto_item_add_subtree(_fr_ti
, ett_framereport_elements_tree
);
2371 for(_counter
=0; _counter
< _arraylen
; _counter
++)
2374 proto_tree_add_item(_fr_elems_tree
, hf_wlccp_numframes
, _tvb
, _offset
, 1, ENC_BIG_ENDIAN
);
2377 proto_tree_add_item(_fr_elems_tree
, hf_wlccp_rss
, _tvb
, _offset
, 1, ENC_BIG_ENDIAN
);
2380 proto_tree_add_item(_fr_elems_tree
, hf_wlccp_bssid
, _tvb
, _offset
, 6, ENC_NA
);
2383 proto_tree_add_item(_fr_elems_tree
, hf_wlccp_stamac
, _tvb
, _offset
, 6, ENC_NA
);
2386 } /* for _counter=0 */
2388 } /* if _arraylen > 0 */
2395 case 0x16: /* ccaRequest */
2397 proto_item_append_text(_ti
, " ccaRequest");
2399 proto_tree_add_item(_tree
, hf_wlccp_token
, _tvb
, _offset
, 1, ENC_BIG_ENDIAN
);
2402 proto_tree_add_item(_tree
, hf_wlccp_mode
, _tvb
, _offset
, 1, ENC_BIG_ENDIAN
);
2405 proto_tree_add_item(_tree
, hf_wlccp_channel
, _tvb
, _offset
, 1, ENC_BIG_ENDIAN
);
2408 /* skip some unused bytes */
2411 proto_tree_add_item(_tree
, hf_wlccp_duration
, _tvb
, _offset
, 2, ENC_BIG_ENDIAN
);
2418 case 0x17: /* ccaReport */
2420 proto_item_append_text(_ti
, " ccaReport");
2422 proto_tree_add_item(_tree
, hf_wlccp_token
, _tvb
, _offset
, 1, ENC_BIG_ENDIAN
);
2425 proto_tree_add_item(_tree
, hf_wlccp_mode
, _tvb
, _offset
, 1, ENC_BIG_ENDIAN
);
2428 proto_tree_add_item(_tree
, hf_wlccp_channel
, _tvb
, _offset
, 1, ENC_BIG_ENDIAN
);
2431 /* skip some unused bytes */
2434 proto_tree_add_item(_tree
, hf_wlccp_duration
, _tvb
, _offset
, 2, ENC_BIG_ENDIAN
);
2437 proto_tree_add_item(_tree
, hf_wlccp_ccabusy
, _tvb
, _offset
, 1, ENC_BIG_ENDIAN
);
2442 } /* case tlv_type_id = 0x17 */
2444 case 0x18: /* rpiHistRequest */
2446 proto_item_append_text(_ti
, " rpiHistRequest");
2448 proto_tree_add_item(_tree
, hf_wlccp_token
, _tvb
, _offset
, 1, ENC_BIG_ENDIAN
);
2451 proto_tree_add_item(_tree
, hf_wlccp_mode
, _tvb
, _offset
, 1, ENC_BIG_ENDIAN
);
2454 proto_tree_add_item(_tree
, hf_wlccp_channel
, _tvb
, _offset
, 1, ENC_BIG_ENDIAN
);
2457 /* skip some unused bytes */
2460 proto_tree_add_item(_tree
, hf_wlccp_duration
, _tvb
, _offset
, 2, ENC_BIG_ENDIAN
);
2466 case 0x19: /* rpiHistReport */
2469 guint _rpi_density_length
=0;
2471 proto_item_append_text(_ti
, " rpiHistReport");
2473 proto_tree_add_item(_tree
, hf_wlccp_token
, _tvb
, _offset
, 1, ENC_BIG_ENDIAN
);
2476 proto_tree_add_item(_tree
, hf_wlccp_mode
, _tvb
, _offset
, 1, ENC_BIG_ENDIAN
);
2479 proto_tree_add_item(_tree
, hf_wlccp_channel
, _tvb
, _offset
, 1, ENC_BIG_ENDIAN
);
2482 /* skip some unused bytes */
2485 proto_tree_add_item(_tree
, hf_wlccp_duration
, _tvb
, _offset
, 2, ENC_BIG_ENDIAN
);
2488 _rpi_density_length
= _length
- 6 - 4;
2490 proto_tree_add_item(_tree
, hf_wlccp_rpidensity
, _tvb
, _offset
, _rpi_density_length
, ENC_NA
);
2491 _offset
+= _rpi_density_length
;
2495 } /* case tlv_type_id = 0x19 */
2497 case 0x1c: /* nullRequest */
2499 proto_item_append_text(_ti
, " nullRequest");
2501 proto_tree_add_item(_tree
, hf_wlccp_token
, _tvb
, _offset
, 1, ENC_BIG_ENDIAN
);
2504 proto_tree_add_item(_tree
, hf_wlccp_mode
, _tvb
, _offset
, 1, ENC_BIG_ENDIAN
);
2507 proto_tree_add_item(_tree
, hf_wlccp_channel
, _tvb
, _offset
, 1, ENC_BIG_ENDIAN
);
2510 /* skip some unused bytes */
2513 proto_tree_add_item(_tree
, hf_wlccp_duration
, _tvb
, _offset
, 2, ENC_BIG_ENDIAN
);
2520 case 0x1e: /* commonBeaconReport */
2523 proto_tree
*_80211_capabilities_tree
;
2524 proto_item
*_new_ti
;
2526 guint _tlv80211length
=0;
2528 proto_item_append_text(_ti
, " commonBeaconReport");
2530 proto_tree_add_item(_tree
, hf_wlccp_srcidx
, _tvb
, _offset
, 1, ENC_BIG_ENDIAN
);
2533 proto_tree_add_item(_tree
, hf_wlccp_channel
, _tvb
, _offset
, 1, ENC_BIG_ENDIAN
);
2536 proto_tree_add_item(_tree
, hf_wlccp_phy_type
, _tvb
, _offset
, 1, ENC_BIG_ENDIAN
);
2539 proto_tree_add_item(_tree
, hf_wlccp_bssid
, _tvb
, _offset
, 6, ENC_NA
);
2542 proto_tree_add_item(_tree
, hf_wlccp_beacon_interval
, _tvb
, _offset
, 2, ENC_BIG_ENDIAN
);
2547 if we assume the next field is the capabilities field from the 802.11 beacon,
2548 then we have a 16-bit field thhf_wlccp_statusat contains the following (802.11-2007):
2552 bit 3 = CF Poll Request
2554 bit 5 = Short Preamble
2556 bit 7 = Channel Agility
2557 bit 8 = Spectrum Management
2559 bit 10 = Short Slot Time
2563 bit 14 = Delayed Block Ack
2564 bit 15 = Immediate Block Ack
2567 _new_ti
= proto_tree_add_item(_tree
, hf_wlccp_80211_capabilities
,
2568 _tvb
, _offset
, 2, ENC_BIG_ENDIAN
);
2569 _80211_capabilities_tree
= proto_item_add_subtree(_new_ti
, ett_80211_capability_flags_tree
);
2571 proto_tree_add_item(_80211_capabilities_tree
, hf_80211_imm_block_ack
,
2572 _tvb
, _offset
, 2, ENC_BIG_ENDIAN
);
2573 proto_tree_add_item(_80211_capabilities_tree
, hf_80211_dlyd_block_ack
,
2574 _tvb
, _offset
, 2, ENC_BIG_ENDIAN
);
2575 proto_tree_add_item(_80211_capabilities_tree
, hf_80211_dsss_ofdm
,
2576 _tvb
, _offset
, 2, ENC_BIG_ENDIAN
);
2577 proto_tree_add_item(_80211_capabilities_tree
, hf_80211_reserved
,
2578 _tvb
, _offset
, 2, ENC_BIG_ENDIAN
);
2579 proto_tree_add_item(_80211_capabilities_tree
, hf_80211_apsd
,
2580 _tvb
, _offset
, 2, ENC_BIG_ENDIAN
);
2581 proto_tree_add_item(_80211_capabilities_tree
, hf_80211_short_time_slot
,
2582 _tvb
, _offset
, 2, ENC_BIG_ENDIAN
);
2583 proto_tree_add_item(_80211_capabilities_tree
, hf_80211_qos
,
2584 _tvb
, _offset
, 2, ENC_BIG_ENDIAN
);
2585 proto_tree_add_item(_80211_capabilities_tree
, hf_80211_spectrum_mgmt
,
2586 _tvb
, _offset
, 2, ENC_BIG_ENDIAN
);
2587 proto_tree_add_item(_80211_capabilities_tree
, hf_80211_chan_agility
,
2588 _tvb
, _offset
, 2, ENC_BIG_ENDIAN
);
2589 proto_tree_add_item(_80211_capabilities_tree
, hf_80211_pbcc
,
2590 _tvb
, _offset
, 2, ENC_BIG_ENDIAN
);
2591 proto_tree_add_item(_80211_capabilities_tree
, hf_80211_short_preamble
,
2592 _tvb
, _offset
, 2, ENC_BIG_ENDIAN
);
2593 proto_tree_add_item(_80211_capabilities_tree
, hf_80211_cap_privacy
,
2594 _tvb
, _offset
, 2, ENC_BIG_ENDIAN
);
2595 proto_tree_add_item(_80211_capabilities_tree
, hf_80211_cap_cf_poll_req
,
2596 _tvb
, _offset
, 2, ENC_BIG_ENDIAN
);
2597 proto_tree_add_item(_80211_capabilities_tree
, hf_80211_cap_cf_pollable
,
2598 _tvb
, _offset
, 2, ENC_BIG_ENDIAN
);
2599 proto_tree_add_item(_80211_capabilities_tree
, hf_80211_cap_ibss
,
2600 _tvb
, _offset
, 2, ENC_BIG_ENDIAN
);
2601 proto_tree_add_item(_80211_capabilities_tree
, hf_80211_cap_ess
,
2602 _tvb
, _offset
, 2, ENC_BIG_ENDIAN
);
2604 /* proto_tree_add_item(_tree, hf_wlccp_capabilities, _tvb, _offset, 2, ENC_BIG_ENDIAN); */
2608 _tlv80211length
= _length
- 13 - 4;
2610 /* This TLV could be decoded per the 802.11 information element spec's */
2611 proto_tree_add_item(_tree
, hf_wlccp_tlv80211
, _tvb
, _offset
, _tlv80211length
, ENC_NA
);
2612 _offset
+= _tlv80211length
;
2616 } /* case tlv_type_id = 0x1e */
2619 case 0x1f: /* aggrBeaconReport */
2621 proto_item_append_text(_ti
, " aggrBeaconReport");
2623 proto_tree_add_item(_tree
, hf_wlccp_token
, _tvb
, _offset
, 1, ENC_BIG_ENDIAN
);
2626 proto_tree_add_item(_tree
, hf_wlccp_mode
, _tvb
, _offset
, 1, ENC_BIG_ENDIAN
);
2629 proto_tree_add_item(_tree
, hf_wlccp_rss
, _tvb
, _offset
, 1, ENC_BIG_ENDIAN
);
2632 proto_tree_add_item(_tree
, hf_wlccp_srcidx
, _tvb
, _offset
, 1, ENC_BIG_ENDIAN
);
2635 proto_tree_add_item(_tree
, hf_wlccp_parent_tsf
, _tvb
, _offset
, 4, ENC_BIG_ENDIAN
);
2638 proto_tree_add_item(_tree
, hf_wlccp_target_tsf
, _tvb
, _offset
, 8, ENC_BIG_ENDIAN
);
2642 } /* case tlv_type_id = 0x1f */
2645 case 0x20: /* rmReqRoutingList */
2648 guint _counter
=0, _arraylen
=0;
2650 proto_item_append_text(_ti
, " rmReqRoutingList");
2652 _arraylen
=(_length
)/16;
2657 for(_counter
=0; _counter
< _arraylen
; _counter
++)
2660 proto_tree_add_item(_tree
, hf_wlccp_ipv4_address
, _tvb
, _offset
, 4, ENC_BIG_ENDIAN
);
2663 proto_tree_add_item(_tree
, hf_wlccp_bssid
, _tvb
, _offset
, 6, ENC_NA
);
2666 proto_tree_add_item(_tree
, hf_wlccp_stamac
, _tvb
, _offset
, 6, ENC_NA
);
2669 } /* for _counter=0 */
2671 } /* if _arraylen > 0 */
2675 case 0x21: /* rmReqRoutingResp */
2678 guint _counter
=0, _arraylen
=0;
2680 proto_item_append_text(_ti
, " rmReqRoutingResp");
2682 proto_tree_add_item(_tree
, hf_wlccp_token2
, _tvb
, _offset
, 2, ENC_BIG_ENDIAN
);
2685 _arraylen
=(_length
)/11;
2690 for(_counter
=0; _counter
< _arraylen
; _counter
++)
2693 proto_tree_add_item(_tree
, hf_wlccp_ipv4_address
, _tvb
, _offset
, 4, ENC_BIG_ENDIAN
);
2696 proto_tree_add_item(_tree
, hf_wlccp_bssid
, _tvb
, _offset
, 6, ENC_NA
);
2699 proto_tree_add_item(_tree
, hf_wlccp_status
, _tvb
, _offset
, 1, ENC_BIG_ENDIAN
);
2702 } /* for _counter=0 */
2704 } /* if _arraylen > 0 */
2709 case 0x22: /* rmReqAck */
2711 proto_item_append_text(_ti
, " rmReqAck");
2713 proto_tree_add_item(_tree
, hf_wlccp_status
, _tvb
, _offset
, 1, ENC_BIG_ENDIAN
);
2720 case 0x58: /* mfpCapability */
2722 proto_item_append_text(_ti
, " mfpCapability");
2724 proto_tree_add_item(_tree
, hf_wlccp_mfpcapability
, _tvb
, _offset
, 2, ENC_BIG_ENDIAN
);
2730 case 0x5b: /* mfpRouting */
2732 proto_item_append_text(_ti
, " mfpRouting");
2734 proto_tree_add_item(_tree
, hf_wlccp_ipv4_address
, _tvb
, _offset
, 4, ENC_BIG_ENDIAN
);
2737 proto_tree_add_item(_tree
, hf_wlccp_bssid
, _tvb
, _offset
, 6, ENC_NA
);
2740 proto_tree_add_item(_tree
, hf_wlccp_mfpflags
, _tvb
, _offset
, 2, ENC_BIG_ENDIAN
);
2746 case 0x5c: /* mfpConfig */
2748 proto_item_append_text(_ti
, " mfpConfig");
2750 proto_tree_add_item(_tree
, hf_wlccp_mfpconfig
, _tvb
, _offset
, 2, ENC_BIG_ENDIAN
);
2759 /* for unknown types, just add them to the tree as a blob */
2760 proto_item_append_text(_ti
, " Unknown");
2762 proto_tree_add_item(_tree
, hf_wlccp_tlv_unknown_value
, _tvb
, _offset
, _length
, ENC_NA
);
2766 } /* case default */
2768 } /* switch type_id */
2772 } /* dissect_wlccp_rrm_tlv */
2774 static guint
dissect_wlccp_qos_tlv(proto_tree
*_tree
, tvbuff_t
*_tvb
, guint _offset
, gint _type_id
, guint _length
, proto_item
*_ti
)
2782 /* for unknown types, just add them to the tree as a blob */
2783 proto_item_append_text(_ti
, " Unknown");
2785 proto_tree_add_item(_tree
, hf_wlccp_tlv_unknown_value
, _tvb
, _offset
, _length
, ENC_NA
);
2789 } /* default case for switch (_type_id) */
2791 } /* switch _type_id */
2796 } /* dissect_wlccp_qos_tlv */
2798 static guint
dissect_wlccp_nm_tlv(proto_tree
*_tree
, tvbuff_t
*_tvb
, guint _offset
, gint _type_id
, guint _length
, proto_item
*_ti
)
2804 case 0x20: /* nmClientEventIntoWDS */
2807 guint _radius_user_name_length
= 0;
2809 proto_item_append_text(_ti
, " nmClientEventIntoWDS");
2811 proto_tree_add_item(_tree
, hf_wlccp_clientmac
, _tvb
, _offset
, 6, ENC_NA
);
2814 proto_tree_add_item(_tree
, hf_time_elapsed
, _tvb
, _offset
, 2, ENC_BIG_ENDIAN
);
2817 proto_tree_add_item(_tree
, hf_wlccp_parent_ap_mac
, _tvb
, _offset
, 6, ENC_NA
);
2820 proto_tree_add_item(_tree
, hf_reg_lifetime
, _tvb
, _offset
, 1, ENC_BIG_ENDIAN
);
2823 /* skip some unused bytes */
2826 proto_tree_add_item(_tree
, hf_wlccp_ipv4_address
, _tvb
, _offset
, 4, ENC_BIG_ENDIAN
);
2829 proto_tree_add_item(_tree
, hf_wlccp_auth_type
, _tvb
, _offset
, 1, ENC_BIG_ENDIAN
);
2832 proto_tree_add_item(_tree
, hf_wlccp_key_mgmt_type
, _tvb
, _offset
, 1, ENC_BIG_ENDIAN
);
2835 /* skip some unused bytes */
2838 _radius_user_name_length
= _length
- 23 - 4;
2840 proto_tree_add_item(_tree
, hf_wlccp_radius_user_name
, _tvb
, _offset
, _radius_user_name_length
, ENC_ASCII
|ENC_NA
);
2841 _offset
+= _radius_user_name_length
;
2847 case 0x21: /* nmClientEventOutOfWDS */
2849 proto_item_append_text(_ti
, " nmClientEventOutOfWDS");
2851 proto_tree_add_item(_tree
, hf_wlccp_clientmac
, _tvb
, _offset
, 6, ENC_NA
);
2854 proto_tree_add_item(_tree
, hf_time_elapsed
, _tvb
, _offset
, 2, ENC_BIG_ENDIAN
);
2857 proto_tree_add_item(_tree
, hf_wlccp_parent_ap_mac
, _tvb
, _offset
, 6, ENC_NA
);
2860 proto_tree_add_item(_tree
, hf_wds_reason
, _tvb
, _offset
, 1, ENC_BIG_ENDIAN
);
2863 /* skip some unused bytes */
2869 case 0x22: /* nmClientEventIntraWDS */
2871 proto_item_append_text(_ti
, " nmClientEventIntraWDS");
2873 proto_tree_add_item(_tree
, hf_wlccp_clientmac
, _tvb
, _offset
, 6, ENC_NA
);
2876 proto_tree_add_item(_tree
, hf_time_elapsed
, _tvb
, _offset
, 2, ENC_BIG_ENDIAN
);
2879 proto_tree_add_item(_tree
, hf_wlccp_parent_ap_mac
, _tvb
, _offset
, 6, ENC_NA
);
2882 proto_tree_add_item(_tree
, hf_reg_lifetime
, _tvb
, _offset
, 1, ENC_BIG_ENDIAN
);
2885 proto_tree_add_item(_tree
, hf_wlccp_auth_type
, _tvb
, _offset
, 1, ENC_BIG_ENDIAN
);
2888 proto_tree_add_item(_tree
, hf_wlccp_key_mgmt_type
, _tvb
, _offset
, 1, ENC_BIG_ENDIAN
);
2891 /* skip some unused bytes */
2898 case 0x24: /* nmClientEventIPAddressUpdate */
2900 proto_item_append_text(_ti
, " nmClientEventIPAddressUpdate");
2902 proto_tree_add_item(_tree
, hf_wlccp_clientmac
, _tvb
, _offset
, 6, ENC_NA
);
2905 proto_tree_add_item(_tree
, hf_time_elapsed
, _tvb
, _offset
, 2, ENC_BIG_ENDIAN
);
2908 proto_tree_add_item(_tree
, hf_wlccp_parent_ap_mac
, _tvb
, _offset
, 6, ENC_NA
);
2911 /* skip some unused bytes */
2914 proto_tree_add_item(_tree
, hf_wlccp_ipv4_address
, _tvb
, _offset
, 4, ENC_BIG_ENDIAN
);
2921 case 0x26: /* nmClientEventRefresh */
2924 guint _radius_user_name_length
= 0;
2926 proto_item_append_text(_ti
, " nmClientEventRefresh");
2928 proto_tree_add_item(_tree
, hf_wlccp_clientmac
, _tvb
, _offset
, 6, ENC_NA
);
2931 proto_tree_add_item(_tree
, hf_time_elapsed
, _tvb
, _offset
, 2, ENC_BIG_ENDIAN
);
2934 proto_tree_add_item(_tree
, hf_wlccp_parent_ap_mac
, _tvb
, _offset
, 6, ENC_NA
);
2937 proto_tree_add_item(_tree
, hf_reg_lifetime
, _tvb
, _offset
, 1, ENC_BIG_ENDIAN
);
2940 /* skip some unused bytes */
2943 proto_tree_add_item(_tree
, hf_wlccp_ipv4_address
, _tvb
, _offset
, 4, ENC_BIG_ENDIAN
);
2946 proto_tree_add_item(_tree
, hf_wlccp_auth_type
, _tvb
, _offset
, 1, ENC_BIG_ENDIAN
);
2949 proto_tree_add_item(_tree
, hf_wlccp_key_mgmt_type
, _tvb
, _offset
, 1, ENC_BIG_ENDIAN
);
2952 /* skip some unused bytes */
2955 _radius_user_name_length
= _length
- 23 - 4;
2957 proto_tree_add_item(_tree
, hf_wlccp_radius_user_name
, _tvb
, _offset
, _radius_user_name_length
, ENC_ASCII
|ENC_NA
);
2958 _offset
+= _radius_user_name_length
;
2963 case 0x27: /* nmClientEventRefreshDone */
2965 proto_item_append_text(_ti
, " nmClientEventRefreshDone");
2967 /* skip some unused bytes */
2970 proto_tree_add_item(_tree
, hf_time_elapsed
, _tvb
, _offset
, 2, ENC_BIG_ENDIAN
);
2973 proto_tree_add_item(_tree
, hf_wlccp_refresh_req_id
, _tvb
, _offset
, 4, ENC_BIG_ENDIAN
);
2983 /* for unknown types, just add them to the tree as a blob */
2984 proto_item_append_text(_ti
, " Unknown");
2986 proto_tree_add_item(_tree
, hf_wlccp_tlv_unknown_value
, _tvb
, _offset
, _length
, ENC_NA
);
2990 } /* default case for switch (_type_id) */
2992 } /* switch _type_id */
2997 } /* dissect_wlccp_nm_tlv */
2999 static guint
dissect_wlccp_mip_tlv(proto_tree
*_tree
, tvbuff_t
*_tvb
, guint _offset
, gint _type_id
, guint _length
, proto_item
*_ti
)
3008 /* for unknown types, just add them to the tree as a blob */
3009 proto_item_append_text(_ti
, " Unknown");
3011 proto_tree_add_item(_tree
, hf_wlccp_tlv_unknown_value
, _tvb
, _offset
, _length
, ENC_NA
);
3015 } /* default case for switch (_type_id) */
3017 } /* switch _type_id */
3022 } /* dissect_wlccp_mip_tlv */
3025 /* Register the protocol with Wireshark */
3027 proto_register_wlccp(void)
3029 /* Setup list of header fields See Section 1.6.1 for details*/
3030 static hf_register_info hf
[] = {
3031 { &hf_wlccp_version
,
3032 { "Version", "wlccp.version",
3033 FT_UINT8
, BASE_HEX
, NULL
,
3034 0x0, "Protocol ID/Version", HFILL
}
3038 { "Src MAC", "wlccp.srcmac",
3039 FT_ETHER
, BASE_NONE
, NULL
,
3040 0x0, "Source MAC address", HFILL
}
3044 { "Dst MAC", "wlccp.dstmac",
3045 FT_ETHER
, BASE_NONE
, NULL
,
3046 0x0, "Destination MAC address", HFILL
}
3049 { &hf_wlccp_hostname
,
3050 { "Hostname", "wlccp.hostname",
3051 FT_STRING
, BASE_NONE
, NULL
,
3052 0x0, "Hostname of device", HFILL
}
3056 { "SAP", "wlccp.sap",
3057 FT_UINT8
, BASE_HEX
, NULL
,
3058 0x0, "Service Access Point", HFILL
}
3061 { &hf_wlccp_sap_version
,
3062 { "SAP Version", "wlccp.sap_version",
3063 FT_UINT8
, BASE_DEC
, NULL
,
3064 SAP_VERSION_MASK
, "Service Access Point Version", HFILL
}
3068 { "SAP ID", "wlccp.sap_id",
3069 FT_UINT8
, BASE_DEC
, VALS(wlccp_sap_vs
),
3070 SAP_VALUE_MASK
, "Service Access Point ID", HFILL
}
3073 { &hf_wlccp_destination_node_type
,
3074 { "Destination node type", "wlccp.destination_node_type",
3075 FT_UINT16
, BASE_DEC
, VALS(wlccp_node_type_vs
),
3076 0x0, "Node type of the hop destination", HFILL
}
3080 { "Length", "wlccp.length",
3081 FT_UINT16
, BASE_DEC
, NULL
,
3082 0x0, "Length of WLCCP payload (bytes)", HFILL
}
3087 { "Message Type", "wlccp.type",
3088 FT_UINT8
, BASE_HEX
, NULL
,
3092 { &hf_wlccp_subtype
,
3093 { "Subtype", "wlccp.subtype",
3094 FT_UINT8
, BASE_DEC
, VALS(wlccp_subtype_vs
),
3095 MT_SUBTYPE
, "Message Subtype", HFILL
}
3098 { &hf_wlccp_base_message_type_0
,
3099 { "Base message type", "wlccp.base_message_type",
3100 FT_UINT8
, BASE_HEX_DEC
, VALS(wlccp_msg_type_vs_0
),
3101 MT_BASE_MSG_TYPE
, NULL
, HFILL
}
3104 { &hf_wlccp_base_message_type_1
,
3105 { "Base message type", "wlccp.base_message_type",
3106 FT_UINT8
, BASE_HEX_DEC
, VALS(wlccp_msg_type_vs_1
),
3107 MT_BASE_MSG_TYPE
, NULL
, HFILL
}
3110 { &hf_wlccp_base_message_type_2
,
3111 { "Base message type", "wlccp.base_message_type",
3112 FT_UINT8
, BASE_HEX_DEC
, VALS(wlccp_msg_type_vs_2
),
3113 MT_BASE_MSG_TYPE
, NULL
, HFILL
}
3116 { &hf_wlccp_base_message_type_3
,
3117 { "Base message type", "wlccp.base_message_type",
3118 FT_UINT8
, BASE_HEX_DEC
, VALS(wlccp_msg_type_vs_3
),
3119 MT_BASE_MSG_TYPE
, NULL
, HFILL
}
3122 { &hf_wlccp_base_message_type_4
,
3123 { "Base message type", "wlccp.base_message_type",
3124 FT_UINT8
, BASE_HEX_DEC
, VALS(wlccp_msg_type_vs_4
),
3125 MT_BASE_MSG_TYPE
, NULL
, HFILL
}
3128 { &hf_wlccp_base_message_type_5
,
3129 { "Base message type", "wlccp.base_message_type",
3130 FT_UINT8
, BASE_HEX_DEC
, VALS(wlccp_msg_type_vs_5
),
3131 MT_BASE_MSG_TYPE
, NULL
, HFILL
}
3134 { &hf_wlccp_base_message_type_unknown
,
3135 { "Base message type", "wlccp.base_message_type",
3136 FT_UINT8
, BASE_HEX_DEC
, NULL
,
3137 MT_BASE_MSG_TYPE
, NULL
, HFILL
}
3141 { "Hops", "wlccp.hops",
3142 FT_UINT8
, BASE_DEC
, NULL
,
3143 0x0, "Number of WLCCP hops", HFILL
}
3146 { &hf_wlccp_nm_version
,
3147 { "NM Version", "wlccp.nm_version",
3148 FT_UINT8
, BASE_DEC
, NULL
,
3153 { "Message ID", "wlccp.msg_id",
3154 FT_UINT16
, BASE_DEC
, NULL
,
3155 0x0, "Sequence number used to match request/reply pairs",
3161 { "Flags", "wlccp.flags",
3162 FT_UINT16
, BASE_HEX
, NULL
,
3166 { &hf_wlccp_rm_flags
,
3167 { "RM Flags", "wlccp.rm_flags",
3168 FT_UINT8
, BASE_HEX
, NULL
,
3172 { &hf_wlccp_retry_flag
,
3173 { "Retry flag", "wlccp.retry_flag",
3174 FT_UINT16
, BASE_DEC
, NULL
,
3175 F_RETRY
, "Set on for retransmissions", HFILL
}
3178 { &hf_wlccp_response_request_flag
,
3179 { "Response request flag", "wlccp.response_request_flag",
3180 FT_UINT16
, BASE_DEC
, NULL
,
3181 F_RESPONSE_REQUEST
, "Set on to request a reply", HFILL
}
3184 { &hf_wlccp_rm_request_reply_flag
,
3185 { "Request Reply flag", "wlccp.request_reply_flag",
3186 FT_UINT8
, BASE_DEC
, NULL
,
3187 RM_F_REQUEST_REPLY
, "Set on to request a reply", HFILL
}
3190 { &hf_wlccp_ack_required_flag
,
3191 { "Ack Required flag", "wlccp.ack_required_flag",
3192 FT_UINT16
, BASE_DEC
, NULL
,
3193 F_ACK_REQD
, "Set on to require an acknowledgement", HFILL
}
3196 { &hf_wlccp_tlv_flag
,
3197 { "TLV flag", "wlccp.tlv_flag",
3198 FT_UINT16
, BASE_DEC
, NULL
,
3199 F_TLV
, "Set to indicate that optional TLVs follow the fixed fields", HFILL
}
3202 { &hf_wlccp_inbound_flag
,
3203 { "Inbound flag", "wlccp.inbound_flag",
3204 FT_UINT16
, BASE_DEC
, NULL
,
3205 F_INBOUND
, "Message is inbound to the top of the topology tree", HFILL
}
3208 { &hf_wlccp_outbound_flag
,
3209 { "Outbound flag", "wlccp.outbound_flag",
3210 FT_UINT16
, BASE_DEC
, NULL
,
3211 F_OUTBOUND
, "Message is outbound from the top of the topology tree", HFILL
}
3214 { &hf_wlccp_hopwise_routing_flag
,
3215 { "Hopwise-routing flag", "wlccp.hopwise_routing_flag",
3216 FT_UINT16
, BASE_DEC
, NULL
,
3217 F_HOPWISE_ROUTING
, "On to force intermediate access points to process the message also", HFILL
}
3220 { &hf_wlccp_root_cm_flag
,
3221 { "Root context manager flag", "wlccp.root_cm_flag",
3222 FT_UINT16
, BASE_DEC
, NULL
,
3223 F_ROOT_CM
, "Set to on to send message to the root context manager of the topology tree", HFILL
}
3226 { &hf_wlccp_relay_flag
,
3227 { "Relay flag", "wlccp.relay_flag",
3228 FT_UINT16
, BASE_DEC
, NULL
,
3229 F_RELAY
, "Signifies that this header is immediately followed by a relay node field", HFILL
}
3232 { &hf_wlccp_mic_flag
,
3233 { "MIC flag", "wlccp.mic_flag",
3234 FT_UINT16
, BASE_DEC
, NULL
,
3235 F_MIC
, "On in a message that must be authenticated and has an authentication TLV", HFILL
}
3238 { &hf_wlccp_rm_mic_flag
,
3239 { "MIC flag", "wlccp.mic_flag",
3240 FT_UINT8
, BASE_DEC
, NULL
,
3241 RM_F_MIC
, "On in a message that must be authenticated and has an authentication TLV", HFILL
}
3244 { &hf_wlccp_originator_node_type
,
3245 { "Originator node type", "wlccp.originator_node_type",
3246 FT_UINT16
, BASE_DEC
, VALS(wlccp_node_type_vs
),
3247 0x0, "Originating device's node type", HFILL
}
3250 { &hf_wlccp_originator
,
3251 { "Originator", "wlccp.originator",
3252 FT_ETHER
, BASE_NONE
, NULL
,
3253 0x0, "Originating device's MAC address", HFILL
}
3256 { &hf_wlccp_responder_node_type
,
3257 { "Responder node type", "wlccp.responder_node_type",
3258 FT_UINT16
, BASE_DEC
, VALS(wlccp_node_type_vs
),
3259 0x0, "Responding device's node type", HFILL
}
3262 { &hf_wlccp_responder
,
3263 { "Responder", "wlccp.responder",
3264 FT_ETHER
, BASE_NONE
, NULL
,
3265 0x0, "Responding device's MAC address", HFILL
}
3268 { &hf_wlccp_requ_node_type
,
3269 { "Requestor node type", "wlccp.requ_node_type",
3270 FT_UINT16
, BASE_DEC
, VALS(wlccp_node_type_vs
),
3271 0x0, "Requesting device's node type", HFILL
}
3274 { &hf_wlccp_requ_node_id
,
3275 { "Requestor", "wlccp.requestor",
3276 FT_ETHER
, BASE_NONE
, NULL
,
3277 0x0, "Requestor device's MAC address", HFILL
}
3281 { "Status", "wlccp.status",
3282 FT_UINT8
, BASE_DEC
, VALS(wlccp_status_vs
),
3286 { &hf_wlccp_path_init_rsvd
,
3287 { "Reserved", "wlccp.path_init_reserved",
3288 FT_UINT8
, BASE_DEC
, NULL
,
3292 { &hf_wlccp_relay_node_type
,
3293 { "Relay node type", "wlccp.relay_node_type",
3294 FT_UINT16
, BASE_DEC
, VALS(wlccp_node_type_vs
),
3295 0x0, "Type of node which relayed this message", HFILL
}
3298 { &hf_wlccp_relay_node_id
,
3299 { "Relay node ID", "wlccp.relay_node_id",
3300 FT_ETHER
, BASE_NONE
, NULL
,
3301 0x0, "Node which relayed this message", HFILL
}
3305 { &hf_wlccp_priority
,
3306 { "WDS priority", "wlccp.priority",
3307 FT_UINT8
, BASE_DEC
, NULL
, 0,
3308 "WDS priority of this access point", HFILL
}
3313 { "Age", "wlccp.age",
3314 FT_UINT32
, BASE_DEC
, NULL
, 0,
3315 "Time since AP became a WDS master", HFILL
}
3320 { "Period", "wlccp.period",
3321 FT_UINT8
, BASE_DEC
, NULL
, 0,
3322 "Interval between announcements (seconds)", HFILL
}
3325 { &hf_wlccp_ipv4_address
,
3326 { "IPv4 Address", "wlccp.ipv4_address",
3327 FT_IPv4
, BASE_NONE
, NULL
, 0,
3331 { &hf_wlccp_scm_hop_address
,
3332 { "Hop Address", "wlccp.scm_hop_address",
3333 FT_ETHER
, BASE_NONE
, NULL
,
3334 0x0, "Source 802 Port Address", HFILL
}
3337 { &hf_wlccp_scm_flags
,
3338 { "SCM flags", "wlccp.scm_flags",
3339 FT_UINT16
, BASE_HEX
, NULL
,
3343 { &hf_wlccp_scm_active_flag
,
3344 { "Active flag", "wlccp.scm_active_flag",
3345 FT_UINT16
, BASE_DEC
, NULL
,
3346 F_SCM_ACTIVE
, "Set to on in advertisements from the active SCM", HFILL
}
3349 { &hf_wlccp_scm_unscheduled_flag
,
3350 { "Unscheduled flag", "wlccp.scm_unscheduled_flag",
3351 FT_UINT16
, BASE_DEC
, NULL
,
3352 F_SCM_UNSCHEDULED
, "Set to on in unscheduled advertisement messages", HFILL
}
3355 { &hf_wlccp_scm_unattached_flag
,
3356 { "Unattached flag", "wlccp.scm_unattached_flag",
3357 FT_UINT16
, BASE_DEC
, NULL
,
3358 F_SCM_UNATTACHED
, "Set to on in advertisements from an unattached node", HFILL
}
3361 { &hf_wlccp_scm_layer2update_flag
,
3362 { "Layer2 Update flag", "wlccp.scm_layer2update_flag",
3363 FT_UINT16
, BASE_DEC
, NULL
,
3364 F_SCM_LAYER2UPDATE
, "Set to on if WLCCP Layer 2 path updates are enabled", HFILL
}
3367 { &hf_wlccp_scm_election_group
,
3368 { "SCM Election Group", "wlccp.scm_election_group",
3369 FT_UINT8
, BASE_DEC
, NULL
, 0,
3373 { &hf_wlccp_scm_attach_count
,
3374 { "Attach Count", "wlccp.scm_attach_count",
3375 FT_UINT8
, BASE_DEC
, NULL
, 0,
3376 "Attach count of the hop source", HFILL
}
3379 { &hf_wlccp_scm_priority_flags
,
3380 { "SCM Priority flags", "wlccp.scm_priority_flags",
3381 FT_UINT8
, BASE_HEX
, NULL
, 0,
3385 { &hf_wlccp_scm_priority
,
3386 { "SCM Priority", "wlccp.scm_priority",
3387 FT_UINT8
, BASE_DEC
, NULL
,
3388 F_SCM_PRIORITY
, NULL
, HFILL
}
3391 { &hf_wlccp_scm_preferred_flag
,
3392 { "Preferred flag", "wlccp.scm_preferred_flag",
3393 FT_UINT8
, BASE_DEC
, NULL
,
3394 F_SCM_PREFERRED
, "Set to off if the SCM is the preferred SCM", HFILL
}
3397 { &hf_wlccp_scm_bridge_priority_flags
,
3398 { "Bridge Priority flags", "wlccp.scm_bridge_priority_flags",
3399 FT_UINT8
, BASE_DEC
, NULL
, 0,
3403 { &hf_wlccp_scm_bridge_priority
,
3404 { "Bridge priority", "wlccp.scm_bridge_priority",
3405 FT_UINT8
, BASE_DEC
, NULL
,
3406 F_SCM_BRIDGE_PRIORITY
, "Used to negotiate the designated bridge on a non-STP secondary Ethernet LAN", HFILL
}
3409 { &hf_wlccp_scm_bridge_disable_flag
,
3410 { "Bridge disable flag", "wlccp.scm_bridge_disable_flag",
3411 FT_UINT8
, BASE_DEC
, NULL
,
3412 F_SCM_BRIDGE_DISABLE
, "Set to on to indicate that secondary briding is disabled", HFILL
}
3415 { &hf_wlccp_scm_node_id
,
3416 { "SCM Node ID", "wlccp.scm_node_id",
3417 FT_ETHER
, BASE_NONE
, NULL
,
3418 0x0, "Node ID of the SCM", HFILL
}
3421 { &hf_wlccp_scm_unknown_short
,
3422 { "Unknown Short", "wlccp.scm_unknown_short",
3423 FT_UINT16
, BASE_HEX
, NULL
,
3424 0x0, "SCM Unknown Short Value", HFILL
}
3427 { &hf_wlccp_scm_instance_age
,
3428 { "Instance Age", "wlccp.scm_instance_age",
3429 FT_UINT32
, BASE_DEC
, NULL
, 0,
3430 "Instance age of the SCM in seconds", HFILL
}
3433 { &hf_wlccp_scm_path_cost
,
3434 { "Path cost", "wlccp.scm_path_cost",
3435 FT_UINT16
, BASE_DEC
, NULL
,
3436 0x0, "Sum of port costs on the path to the SCM", HFILL
}
3439 { &hf_wlccp_scm_hop_count
,
3440 { "Hop Count", "wlccp.scm_hop_count",
3441 FT_UINT8
, BASE_DEC
, NULL
, 0,
3442 "Number of wireless hops on the path to SCM", HFILL
}
3445 { &hf_wlccp_scm_advperiod
,
3446 { "Advertisement Period", "wlccp.scm_advperiod",
3447 FT_UINT8
, BASE_DEC
, NULL
, 0,
3448 "Average number of seconds between SCM advertisements", HFILL
}
3451 { &hf_wlccp_timestamp
,
3452 { "Timestamp", "wlccp.timestamp",
3453 FT_UINT64
, BASE_DEC
, NULL
, 0,
3454 "Registration Timestamp", HFILL
}
3457 { &hf_wlccp_apregstatus
,
3458 { "Registration Status", "wlccp.apregstatus",
3459 FT_UINT8
, BASE_HEX
, NULL
, 0,
3460 "AP Registration Status", HFILL
}
3463 { &hf_wlccp_ap_node_id
,
3464 { "AP Node ID", "wlccp.apnodeid",
3465 FT_NONE
, BASE_NONE
, NULL
, 0,
3469 { &hf_wlccp_ap_node_type
,
3470 { "AP Node Type", "wlccp.apnodetype",
3471 FT_UINT16
, BASE_HEX
, NULL
, 0,
3475 { &hf_wlccp_ap_node_id_address
,
3476 { "AP Node Address", "wlccp.apnodeidaddress",
3477 FT_ETHER
, BASE_NONE
, NULL
, 0,
3481 { &hf_wlccp_aaa_msg_type
,
3482 { "AAA Message Type", "wlccp.aaa_msg_type",
3483 FT_UINT8
, BASE_HEX
, VALS(wlccp_aaa_msg_type_vs
), 0,
3487 { &hf_wlccp_aaa_auth_type
,
3488 { "AAA Authentication Type", "wlccp.aaa_auth_type",
3489 FT_UINT8
, BASE_HEX
, VALS(wlccp_eapol_auth_type_vs
), 0,
3493 { &hf_wlccp_keymgmt_type
,
3494 { "AAA Key Management Type", "wlccp.aaa_keymgmt_type",
3495 FT_UINT8
, BASE_HEX
, VALS(wlccp_key_mgmt_type_vs
), 0,
3499 { &hf_wlccp_eapol_msg
,
3500 { "EAPOL Message", "wlccp.eapol_msg",
3501 FT_NONE
, BASE_NONE
, NULL
, 0,
3505 { &hf_wlccp_eapol_version
,
3506 { "EAPOL Version", "wlccp.eapol_version",
3507 FT_UINT8
, BASE_DEC
, NULL
, 0,
3511 { &hf_wlccp_eapol_type
,
3512 { "EAPOL Type", "wlccp.eapol_type",
3513 FT_UINT8
, BASE_HEX
, VALS(eapol_type_vs
), 0,
3517 { &hf_wlccp_eap_msg_length
,
3518 { "EAP Packet Length", "wlccp.eap_pkt_length",
3519 FT_UINT16
, BASE_DEC
, NULL
, 0,
3520 "EAPOL Type", HFILL
}
3523 { &hf_wlccp_eap_msg
,
3524 { "EAP Message", "wlccp.eap_msg",
3525 FT_BYTES
, BASE_NONE
, NULL
, 0,
3529 { &hf_wlccp_cisco_acctg_msg
,
3530 { "Cisco Accounting Message", "wlccp.cisco_acctg_msg",
3531 FT_BYTES
, BASE_NONE
, NULL
, 0,
3535 { &hf_wlccp_wids_msg_type
,
3536 { "WIDS Message Type", "wlccp.wids_msg_type",
3537 FT_UINT8
, BASE_DEC
, NULL
, 0,
3541 { &hf_wlccp_nmconfig
,
3542 { "NM Config", "wlccp.nmconfig",
3543 FT_UINT8
, BASE_DEC
, NULL
, 0,
3547 { &hf_wlccp_scmstate_change
,
3548 { "SCM State Change", "wlccp.scmstate_change",
3549 FT_UINT8
, BASE_DEC
, NULL
, 0,
3553 { &hf_wlccp_scmstate_change_reason
,
3554 { "SCM State Change Reason", "wlccp.scmstate_change_reason",
3555 FT_UINT8
, BASE_DEC
, NULL
, 0,
3559 { &hf_wlccp_scmattach_state
,
3560 { "SCM Attach State", "wlccp.scmattach_state",
3561 FT_UINT8
, BASE_DEC
, NULL
, 0,
3565 { &hf_wlccp_nmcapability
,
3566 { "NM Capability", "wlccp.nm_capability",
3567 FT_UINT8
, BASE_DEC
, NULL
, 0,
3571 { &hf_wlccp_refresh_req_id
,
3572 { "Refresh Request ID", "wlccp.refresh_request_id",
3573 FT_UINT32
, BASE_DEC
, NULL
, 0,
3578 { "WLCCP TLV", "wlccp.tlv",
3579 FT_NONE
, BASE_NONE
, NULL
, 0,
3584 { "TLV Flags", "wlccp.tlv_flags",
3585 FT_UINT16
, BASE_HEX
, NULL
, 0,
3586 "TLV Flags, Group and Type", HFILL
}
3589 { &hf_wlccp_null_tlv
,
3590 { "NULL TLV", "wlccp.null_tlv",
3591 FT_BYTES
, BASE_NONE
, NULL
,
3596 { &hf_wlccp_tlv_type
,
3597 { "TLV Type", "wlccp.tlv_type",
3598 FT_UINT16
, BASE_DEC
, NULL
,
3599 TLV_TYPE_ID
, "TLV Type ID", HFILL
}
3602 { &hf_wlccp_tlv_type0
,
3603 { "TLV Type", "wlccp.tlv_type",
3604 FT_UINT16
, BASE_DEC
, VALS(wlccp_tlv_typeID_0
),
3605 TLV_TYPE_ID
, "TLV Type ID", HFILL
}
3608 { &hf_wlccp_tlv_type1
,
3609 { "TLV Type", "wlccp.tlv_type",
3610 FT_UINT16
, BASE_DEC
, VALS(wlccp_tlv_typeID_1
),
3611 TLV_TYPE_ID
, "TLV Type ID", HFILL
}
3614 { &hf_wlccp_tlv_type2
,
3615 { "TLV Type", "wlccp.tlv_type",
3616 FT_UINT16
, BASE_DEC
, VALS(wlccp_tlv_typeID_2
),
3617 TLV_TYPE_ID
, "TLV Type ID", HFILL
}
3620 { &hf_wlccp_tlv_type3
,
3621 { "TLV Type", "wlccp.tlv_type",
3622 FT_UINT16
, BASE_DEC
, VALS(wlccp_tlv_typeID_3
),
3623 TLV_TYPE_ID
, "TLV Type ID", HFILL
}
3626 { &hf_wlccp_tlv_type4
,
3627 { "TLV Type", "wlccp.tlv_type",
3628 FT_UINT16
, BASE_DEC
, VALS(wlccp_tlv_typeID_4
),
3629 TLV_TYPE_ID
, "TLV Type ID", HFILL
}
3632 { &hf_wlccp_tlv_type5
,
3633 { "TLV Type", "wlccp.tlv_type",
3634 FT_UINT16
, BASE_DEC
, VALS(wlccp_tlv_typeID_5
),
3635 TLV_TYPE_ID
, "TLV Type ID", HFILL
}
3638 { &hf_wlccp_tlv_group
,
3639 { "TLV Group", "wlccp.tlv_group",
3640 FT_UINT16
, BASE_DEC
, VALS(wlccp_tlv_group_vs
) ,
3641 TLV_GROUP_ID
, "TLV Group ID", HFILL
}
3644 { &hf_wlccp_tlv_container_flag
,
3645 { "TLV Container Flag", "wlccp.tlv_container_flag",
3646 FT_UINT16
, BASE_DEC
, NULL
,
3647 TLV_F_CONTAINER
, "Set on if the TLV is a container", HFILL
}
3650 { &hf_wlccp_tlv_encrypted_flag
,
3651 { "TLV Encrypted Flag", "wlccp.tlv_encrypted_flag",
3652 FT_UINT16
, BASE_DEC
, NULL
,
3653 TLV_F_ENCRYPTED
, "Set on if the TLV is encrypted", HFILL
}
3656 { &hf_wlccp_tlv_reserved_bit
,
3657 { "Reserved bits", "wlccp.tlv_reserved_bit",
3658 FT_UINT16
, BASE_DEC
, NULL
,
3659 TLV_F_RESVD
, "Reserved", HFILL
}
3662 { &hf_wlccp_tlv_request_flag
,
3663 { "TLV Request Flag", "wlccp.tlv_request_flag",
3664 FT_UINT16
, BASE_DEC
, NULL
,
3665 TLV_F_REQUEST
, "Set on if the TLV is a request", HFILL
}
3668 { &hf_wlccp_tlv_length
,
3669 { "TLV Length", "wlccp.tlv_length",
3670 FT_UINT16
, BASE_DEC
, NULL
, 0,
3674 { &hf_wlccp_path_length
,
3675 { "Path Length", "wlccp.path_length",
3676 FT_UINT8
, BASE_DEC
, NULL
, 0,
3680 { &hf_wlccp_mic_msg_seq_count
,
3681 { "MIC Message Sequence Count", "wlccp.mic_msg_seq_count",
3682 FT_UINT64
, BASE_DEC
, NULL
, 0,
3686 { &hf_wlccp_mic_length
,
3687 { "MIC Length", "wlccp.mic_length",
3688 FT_UINT16
, BASE_DEC
, NULL
, 0,
3692 { &hf_wlccp_mic_value
,
3693 { "MIC Value", "wlccp.mic_value",
3694 FT_BYTES
, BASE_NONE
, NULL
, 0,
3698 { &hf_wlccp_dest_node_type
,
3699 { "Destination node type", "wlccp.dest_node_type",
3700 FT_UINT16
, BASE_DEC
, VALS(wlccp_node_type_vs
),
3704 { &hf_wlccp_dest_node_id
,
3705 { "Destination node ID", "wlccp.dest_node_id",
3706 FT_ETHER
, BASE_NONE
, NULL
,
3710 { &hf_wlccp_supp_node_type
,
3711 { "Destination node type", "wlccp.supp_node_type",
3712 FT_UINT16
, BASE_DEC
, VALS(wlccp_node_type_vs
),
3716 { &hf_wlccp_supp_node_id
,
3717 { "Supporting node ID", "wlccp.supp_node_id",
3718 FT_ETHER
, BASE_NONE
, NULL
,
3722 { &hf_wlccp_src_node_type
,
3723 { "Source node type", "wlccp.source_node_type",
3724 FT_UINT16
, BASE_DEC
, VALS(wlccp_node_type_vs
),
3728 { &hf_wlccp_src_node_id
,
3729 { "Source node ID", "wlccp.source_node_id",
3730 FT_ETHER
, BASE_NONE
, NULL
,
3734 { &hf_wlccp_key_mgmt_type
,
3735 { "Key Management type", "wlccp.key_mgmt_type",
3736 FT_UINT8
, BASE_HEX
, NULL
,
3740 { &hf_wlccp_key_seq_count
,
3741 { "Key Sequence Count", "wlccp.key_seq_count",
3742 FT_UINT32
, BASE_DEC
, NULL
, 0,
3746 { &hf_wlccp_session_timeout
,
3747 { "Session Timeout", "wlccp.session_timeout",
3748 FT_UINT32
, BASE_DEC
, NULL
, 0,
3753 { "Nonce Value", "wlccp.nonce_value",
3754 FT_BYTES
, BASE_NONE
, NULL
, 0,
3759 { "Token", "wlccp.token",
3760 FT_UINT8
, BASE_HEX
, NULL
, 0,
3764 { &hf_wlccp_scan_mode
,
3765 { "Scan Mode", "wlccp.scan_mode",
3766 FT_UINT8
, BASE_HEX
, NULL
,
3771 { "Mode", "wlccp.mode",
3772 FT_UINT8
, BASE_HEX
, VALS(wlccp_mode_vs
),
3777 { "RSS", "wlccp.rss",
3778 FT_INT8
, BASE_DEC
, NULL
, 0,
3779 "Received Signal Strength", HFILL
}
3783 { "Source Index", "wlccp.srcidx",
3784 FT_UINT8
, BASE_HEX
, NULL
, 0,
3788 { &hf_wlccp_parent_tsf
,
3789 { "Parent TSF", "wlccp.parenttsf",
3790 FT_UINT32
, BASE_HEX
, NULL
, 0,
3794 { &hf_wlccp_target_tsf
,
3795 { "Target TSF", "wlccp.targettsf",
3796 FT_UINT64
, BASE_HEX
, NULL
, 0,
3800 { &hf_wlccp_channel
,
3801 { "Channel", "wlccp.channel",
3802 FT_UINT8
, BASE_DEC
, NULL
, 0,
3806 { &hf_wlccp_phy_type
,
3807 { "PHY Type", "wlccp.phy_type",
3808 FT_UINT8
, BASE_DEC
, VALS(phy_type_80211_vs
), 0,
3813 { "BSS ID", "wlccp.bssid",
3814 FT_ETHER
, BASE_NONE
, NULL
, 0,
3815 "Basic Service Set ID", HFILL
}
3818 { &hf_wlccp_beacon_interval
,
3819 { "Beacon Interval", "wlccp.beacon_interval",
3820 FT_UINT16
, BASE_DEC
, NULL
, 0,
3825 { &hf_wlccp_capabilities,
3826 { "Capabilities", "wlccp.capabilities",
3827 FT_UINT16, BASE_HEX, NULL, 0,
3832 { &hf_wlccp_80211_capabilities
,
3833 { "802.11 Capabilities Flags", "wlccp.80211_capabilities",
3834 FT_UINT16
, BASE_HEX
, NULL
,
3838 { &hf_80211_cap_ess
,
3839 { "ESS flag", "wlccp.80211_ess_flag",
3840 FT_UINT16
, BASE_DEC
, NULL
,
3841 F_80211_ESS
, "Set on by APs in Beacon or Probe Response", HFILL
}
3845 { &hf_80211_cap_ibss
,
3846 { "IBSS flag", "wlccp.80211_ibss_flag",
3847 FT_UINT16
, BASE_DEC
, NULL
,
3848 F_80211_IBSS
, "Set on by STAs in Beacon or Probe Response", HFILL
}
3851 { &hf_80211_cap_cf_pollable
,
3852 { "CF Pollable flag", "wlccp.80211_cf_pollable_flag",
3853 FT_UINT16
, BASE_DEC
, NULL
,
3854 F_80211_CFPOLL
, NULL
, HFILL
}
3857 { &hf_80211_cap_cf_poll_req
,
3858 { "CF Poll Request flag", "wlccp.80211_cf_poll_req_flag",
3859 FT_UINT16
, BASE_DEC
, NULL
,
3860 F_80211_CFPOLL_REQ
, NULL
, HFILL
}
3863 { &hf_80211_cap_privacy
,
3864 { "Privacy flag", "wlccp.80211_cf_poll_req_flag",
3865 FT_UINT16
, BASE_DEC
, NULL
,
3866 F_80211_PRIVACY
, "Set on indicate confidentiality is required in the BSS", HFILL
}
3869 { &hf_80211_short_preamble
,
3870 { "Short Preamble flag", "wlccp.80211_short_preamble_flag",
3871 FT_UINT16
, BASE_DEC
, NULL
,
3872 F_80211_SHORT_PREAMBLE
, NULL
, HFILL
}
3876 { "PBCC flag", "wlccp.80211_pbcc_flag",
3877 FT_UINT16
, BASE_DEC
, NULL
,
3878 F_80211_PBCC
, NULL
, HFILL
}
3881 { &hf_80211_chan_agility
,
3882 { "Channel Agility flag", "wlccp.80211_chan_agility_flag",
3883 FT_UINT16
, BASE_DEC
, NULL
,
3884 F_80211_CH_AGILITY
, NULL
, HFILL
}
3887 { &hf_80211_spectrum_mgmt
,
3888 { "Spectrum Management flag", "wlccp.80211_spectrum_mgmt_flag",
3889 FT_UINT16
, BASE_DEC
, NULL
,
3890 F_80211_SPEC_MGMT
, NULL
, HFILL
}
3894 { "QOS flag", "wlccp.80211_qos_flag",
3895 FT_UINT16
, BASE_DEC
, NULL
,
3896 F_80211_QOS
, NULL
, HFILL
}
3899 { &hf_80211_short_time_slot
,
3900 { "Short Time Slot flag", "wlccp.80211_short_time_slot_flag",
3901 FT_UINT16
, BASE_DEC
, NULL
,
3902 F_80211_SHORT_TIME_SLOT
, NULL
, HFILL
}
3906 { "APSD flag", "wlccp.80211_apsd_flag",
3907 FT_UINT16
, BASE_DEC
, NULL
,
3908 F_80211_APSD
, NULL
, HFILL
}
3911 { &hf_80211_reserved
,
3912 { "Reserved", "wlccp.80211_reserved",
3913 FT_UINT16
, BASE_DEC
, NULL
,
3914 F_80211_RESVD
, NULL
, HFILL
}
3917 { &hf_80211_dsss_ofdm
,
3918 { "DSSS-OFDM Flag", "wlccp.dsss_ofdm_flag",
3919 FT_UINT16
, BASE_DEC
, NULL
,
3920 F_80211_DSSS_OFDM
, NULL
, HFILL
}
3923 { &hf_80211_dlyd_block_ack
,
3924 { "Delayed Block Ack Flag", "wlccp.dsss_dlyd_block_ack_flag",
3925 FT_UINT16
, BASE_DEC
, NULL
,
3926 F_80211_DLYD_BLK_ACK
, NULL
, HFILL
}
3929 { &hf_80211_imm_block_ack
,
3930 { "Immediate Block Ack Flag", "wlccp.dsss_imm_block_ack_flag",
3931 FT_UINT16
, BASE_DEC
, NULL
,
3932 F_80211_IMM_BLK_ACK
, NULL
, HFILL
}
3936 { &hf_wlccp_tlv80211
,
3937 { "802.11 TLV Value", "wlccp.tlv80211",
3938 FT_BYTES
, BASE_NONE
, NULL
, 0,
3942 { &hf_wlccp_duration
,
3943 { "Duration", "wlccp.duration",
3944 FT_UINT16
, BASE_DEC
, NULL
, 0,
3948 { &hf_wlccp_rpidensity
,
3949 { "RPI Density", "wlccp.rpi_denisty",
3950 FT_BYTES
, BASE_NONE
, NULL
, 0,
3954 { &hf_wlccp_ccabusy
,
3955 { "CCA Busy", "wlccp.cca_busy",
3956 FT_UINT8
, BASE_HEX
, NULL
, 0,
3961 { "Station MAC", "wlccp.station_mac",
3962 FT_ETHER
, BASE_NONE
, NULL
, 0,
3966 { &hf_wlccp_sta_type
,
3967 { "Station Type", "wlccp.station_type",
3968 FT_UINT8
, BASE_HEX
, NULL
, 0,
3973 { "2 Byte Token", "wlccp.token2",
3974 FT_UINT16
, BASE_HEX
, NULL
, 0,
3978 { &hf_wlccp_interval
,
3979 { "Interval", "wlccp.interval",
3980 FT_UINT16
, BASE_DEC
, NULL
, 0,
3984 { &hf_framereport_elements
,
3985 { "Frame Report Elements", "wlccp.framereport_elements",
3986 FT_NONE
, BASE_NONE
, NULL
, 0,
3991 { "Element Count", "wlccp.element_count",
3992 FT_UINT8
, BASE_DEC
, NULL
, 0,
3996 { &hf_wlccp_numframes
,
3997 { "Number of frames", "wlccp.numframes",
3998 FT_UINT8
, BASE_DEC
, NULL
, 0,
4002 { &hf_wlccp_mfpcapability
,
4003 { "MFP Capability", "wlccp.mfp_capability",
4004 FT_UINT16
, BASE_HEX
, NULL
, 0,
4008 { &hf_wlccp_mfpflags
,
4009 { "MFP Flags", "wlccp.mfp_flags",
4010 FT_UINT16
, BASE_HEX
, NULL
, 0,
4014 { &hf_wlccp_mfpconfig
,
4015 { "MFP Config", "wlccp.mfp_config",
4016 FT_UINT16
, BASE_HEX
, NULL
, 0,
4020 { &hf_wlccp_clientmac
,
4021 { "Client MAC", "wlccp.client_mac",
4022 FT_ETHER
, BASE_NONE
, NULL
, 0,
4027 { "Reg. LifeTime", "wlccp.reg_lifetime",
4028 FT_UINT8
, BASE_DEC
, NULL
, 0,
4033 { "Elapsed Time", "wlccp.time_elapsed",
4034 FT_UINT16
, BASE_DEC
, NULL
, 0,
4038 { &hf_wlccp_parent_ap_mac
,
4039 { "Parent AP MAC", "wlccp.parent_ap_mac",
4040 FT_ETHER
, BASE_NONE
, NULL
, 0,
4044 { &hf_wlccp_auth_type
,
4045 { "Authentication Type", "wlccp.auth_type",
4046 FT_UINT8
, BASE_HEX
, NULL
, 0,
4050 { &hf_wlccp_radius_user_name
,
4051 { "RADIUS Username", "wlccp.radius_username",
4052 FT_STRING
, BASE_NONE
, NULL
,
4057 { "Reason Code", "wlccp.wds_reason",
4058 FT_UINT8
, BASE_HEX
, NULL
, 0,
4063 { &hf_wlccp_tlv_unknown_value
,
4064 { "Unknown TLV Contents", "wlccp.tlv_unknown_value",
4065 FT_BYTES
, BASE_NONE
, NULL
, 0,
4069 }; /* hf_register_info hf */
4071 /* Setup protocol subtree array */
4072 static gint
*ett
[] = {
4074 &ett_wlccp_sap_tree
,
4077 &ett_wlccp_cm_flags
,
4078 &ett_wlccp_scm_flags
,
4079 &ett_wlccp_scm_priority_flags
,
4080 &ett_wlccp_scm_bridge_priority_flags
,
4081 &ett_wlccp_rm_flags
,
4082 &ett_wlccp_nm_flags
,
4083 &ett_wlccp_ap_node_id
,
4084 &ett_wlccp_eapol_msg_tree
,
4085 &ett_wlccp_eap_tree
,
4086 &ett_wlccp_tlv_tree
,
4087 &ett_tlv_flags_tree
,
4089 &ett_80211_capability_flags_tree
,
4090 &ett_framereport_elements_tree
4091 }; /* static gint *ett[] */
4093 /* Register the protocol name and description */
4094 proto_wlccp
= proto_register_protocol("Cisco Wireless LAN Context Control Protocol", "WLCCP", "wlccp");
4096 /* Required function calls to register the header fields and subtrees used */
4097 proto_register_field_array(proto_wlccp
, hf
, array_length(hf
));
4098 proto_register_subtree_array(ett
, array_length(ett
));
4104 proto_reg_handoff_wlccp(void)
4106 dissector_handle_t wlccp_handle
;
4108 wlccp_handle
= create_dissector_handle(dissect_wlccp
, proto_wlccp
);
4110 dissector_add_uint("ethertype", ETHERTYPE_WLCCP
, wlccp_handle
);
4111 dissector_add_uint("udp.port", WLCCP_UDP_PORT
, wlccp_handle
);
4112 dissector_add_uint("llc.wlccp_pid", 0x0000, wlccp_handle
);
4118 proto_register_wlccp_oui(void)
4120 static hf_register_info hf
[] = {
4121 { &hf_llc_wlccp_pid
,
4122 { "PID", "llc.wlccp_pid",
4123 FT_UINT16
, BASE_HEX
, VALS(cisco_pid_vals
),
4128 llc_add_oui(OUI_CISCOWL
, "llc.wlccp_pid", "LLC Cisco WLCCP OUI PID", hf
);