2 * Routines for CAPWAP dissection (RFC 5415 / RFC5416)
3 * Copyright 2009, Alexis La Goutte <alexis.lagoutte at gmail dot com>
7 * Wireshark - Network traffic analyzer
8 * By Gerald Combs <gerald@wireshark.org>
9 * Copyright 1998 Gerald Combs
11 * This program is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License
13 * as published by the Free Software Foundation; either version 2
14 * of the License, or (at your option) any later version.
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, write to the Free Software
23 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
30 #include <epan/packet.h>
31 #include <epan/prefs.h>
32 #include <epan/reassemble.h>
33 #include <epan/expert.h>
35 #include <epan/sminmpec.h>
37 #define UDP_PORT_CAPWAP_CONTROL 5246
38 #define UDP_PORT_CAPWAP_DATA 5247
40 static guint global_capwap_control_udp_port
= UDP_PORT_CAPWAP_CONTROL
;
41 static guint global_capwap_data_udp_port
= UDP_PORT_CAPWAP_DATA
;
42 static gboolean global_capwap_draft_8_cisco
= FALSE
;
43 static gboolean global_capwap_reassemble
= TRUE
;
44 static gboolean global_capwap_swap_frame_control
= TRUE
;
46 static reassembly_table capwap_reassembly_table
;
49 * add decryption of DLTS Message
50 * add support of all Messages Element Type
53 /* Forward declaration we need below */
54 void proto_reg_handoff_capwap(void);
56 /* Initialize the protocol and registered fields */
57 static int proto_capwap
= -1;
59 static int hf_capwap_preamble
= -1;
60 static int hf_capwap_preamble_version
= -1;
61 static int hf_capwap_preamble_type
= -1;
62 static int hf_capwap_preamble_reserved
= -1;
64 static int hf_capwap_header
= -1;
65 static int hf_capwap_header_hlen
= -1;
66 static int hf_capwap_header_rid
= -1;
67 static int hf_capwap_header_wbid
= -1;
69 static int hf_capwap_header_flags
= -1;
70 static int hf_capwap_header_flags_t
= -1;
71 static int hf_capwap_header_flags_f
= -1;
72 static int hf_capwap_header_flags_l
= -1;
73 static int hf_capwap_header_flags_w
= -1;
74 static int hf_capwap_header_flags_m
= -1;
75 static int hf_capwap_header_flags_k
= -1;
76 static int hf_capwap_header_flags_r
= -1;
78 static int hf_capwap_header_fragment_id
= -1;
79 static int hf_capwap_header_fragment_offset
= -1;
80 static int hf_capwap_header_reserved
= -1;
82 static int hf_capwap_header_mac_length
= -1;
83 static int hf_capwap_header_mac_eui48
= -1;
84 static int hf_capwap_header_mac_eui64
= -1;
85 static int hf_capwap_header_mac_data
= -1;
87 static int hf_capwap_header_wireless_length
= -1;
88 static int hf_capwap_header_wireless_data
= -1;
90 static int hf_capwap_header_wireless_data_ieee80211_fi
= -1;
91 static int hf_capwap_header_wireless_data_ieee80211_fi_rssi
= -1;
92 static int hf_capwap_header_wireless_data_ieee80211_fi_snr
= -1;
93 static int hf_capwap_header_wireless_data_ieee80211_fi_data_rate
= -1;
94 static int hf_capwap_header_wireless_data_ieee80211_dest_wlan
= -1;
95 static int hf_capwap_header_wireless_data_ieee80211_dw_wlan_id_bitmap
= -1;
96 static int hf_capwap_header_wireless_data_ieee80211_dw_reserved
= -1;
97 static int hf_capwap_header_padding
= -1;
99 static int hf_capwap_control_header
= -1;
100 static int hf_capwap_control_header_msg_type
= -1;
101 static int hf_capwap_control_header_msg_type_enterprise_nbr
= -1;
102 static int hf_capwap_control_header_msg_type_enterprise_specific
= -1;
103 static int hf_capwap_control_header_seq_number
= -1;
104 static int hf_capwap_control_header_flags
= -1;
105 static int hf_capwap_control_header_msg_element_length
= -1;
107 static int hf_capwap_message_element
= -1;
108 static int hf_capwap_msg_element
= -1;
109 static int hf_capwap_msg_element_type
= -1;
110 static int hf_capwap_msg_element_length
= -1;
111 static int hf_capwap_msg_element_value
= -1;
113 static int hf_capwap_msg_element_type_ac_descriptor_stations
= -1;
114 static int hf_capwap_msg_element_type_ac_descriptor_limit
= -1;
115 static int hf_capwap_msg_element_type_ac_descriptor_active_wtp
= -1;
116 static int hf_capwap_msg_element_type_ac_descriptor_max_wtp
= -1;
117 /* AC Descriptor Security Flags... */
118 static int hf_capwap_msg_element_type_ac_descriptor_security
= -1;
119 static int hf_capwap_msg_element_type_ac_descriptor_security_s
= -1;
120 static int hf_capwap_msg_element_type_ac_descriptor_security_x
= -1;
121 static int hf_capwap_msg_element_type_ac_descriptor_security_r
= -1;
122 static int hf_capwap_msg_element_type_ac_descriptor_rmac_field
= -1;
123 static int hf_capwap_msg_element_type_ac_descriptor_reserved
= -1;
124 /* AC Descriptor DTLS Policy Flags... */
125 static int hf_capwap_msg_element_type_ac_descriptor_dtls_policy
= -1;
126 static int hf_capwap_msg_element_type_ac_descriptor_dtls_policy_d
= -1;
127 static int hf_capwap_msg_element_type_ac_descriptor_dtls_policy_c
= -1;
128 static int hf_capwap_msg_element_type_ac_descriptor_dtls_policy_r
= -1;
130 static int hf_capwap_msg_element_type_ac_information
= -1;
131 static int hf_capwap_msg_element_type_ac_information_vendor
= -1;
132 static int hf_capwap_msg_element_type_ac_information_type
= -1;
133 static int hf_capwap_msg_element_type_ac_information_length
= -1;
134 static int hf_capwap_msg_element_type_ac_information_value
= -1;
135 static int hf_capwap_msg_element_type_ac_information_hardware_version
= -1;
136 static int hf_capwap_msg_element_type_ac_information_software_version
= -1;
138 static int hf_capwap_msg_element_type_ac_name
= -1;
139 static int hf_capwap_msg_element_type_ac_name_with_priority
= -1;
141 static int hf_capwap_msg_element_type_ac_ipv4_list
= -1;
142 static int hf_capwap_msg_element_type_ac_ipv6_list
= -1;
144 static int hf_capwap_msg_element_type_capwap_control_ipv4
= -1;
145 static int hf_capwap_msg_element_type_capwap_control_ipv6
= -1;
146 static int hf_capwap_msg_element_type_capwap_control_wtp_count
= -1;
148 static int hf_capwap_msg_element_type_capwap_timers_discovery
= -1;
149 static int hf_capwap_msg_element_type_capwap_timers_echo_request
= -1;
151 static int hf_capwap_msg_element_type_decryption_error_report_period_radio_id
= -1;
152 static int hf_capwap_msg_element_type_decryption_error_report_period_interval
= -1;
154 static int hf_capwap_msg_element_type_discovery_type
= -1;
156 static int hf_capwap_msg_element_type_location_data
= -1;
158 static int hf_capwap_msg_element_type_maximum_message_length
= -1;
160 static int hf_capwap_msg_element_type_idle_timeout
= -1;
161 static int hf_capwap_msg_element_type_radio_admin_id
= -1;
162 static int hf_capwap_msg_element_type_radio_admin_state
= -1;
164 static int hf_capwap_msg_element_type_radio_op_state_radio_id
= -1;
165 static int hf_capwap_msg_element_type_radio_op_state_radio_state
= -1;
166 static int hf_capwap_msg_element_type_radio_op_state_radio_cause
= -1;
167 static int hf_capwap_msg_element_type_result_code
= -1;
169 static int hf_capwap_msg_element_type_session_id
= -1;
171 static int hf_capwap_msg_element_type_statistics_timer
= -1;
173 static int hf_capwap_msg_element_type_vsp_vendor_identifier
= -1;
174 static int hf_capwap_msg_element_type_vsp_vendor_element_id
= -1;
175 static int hf_capwap_msg_element_type_vsp_vendor_data
= -1;
177 static int hf_capwap_msg_element_type_wtp_board_data
= -1;
178 static int hf_capwap_msg_element_type_wtp_board_data_vendor
= -1;
179 static int hf_capwap_msg_element_type_wtp_board_data_type
= -1;
180 static int hf_capwap_msg_element_type_wtp_board_data_length
= -1;
181 static int hf_capwap_msg_element_type_wtp_board_data_value
= -1;
182 static int hf_capwap_msg_element_type_wtp_board_data_wtp_model_number
= -1;
183 static int hf_capwap_msg_element_type_wtp_board_data_wtp_serial_number
= -1;
184 static int hf_capwap_msg_element_type_wtp_board_data_wtp_board_id
= -1;
185 static int hf_capwap_msg_element_type_wtp_board_data_wtp_board_revision
= -1;
186 static int hf_capwap_msg_element_type_wtp_board_data_base_mac_address
= -1;
188 static int hf_capwap_msg_element_type_wtp_descriptor_max_radios
= -1;
189 static int hf_capwap_msg_element_type_wtp_descriptor_radio_in_use
= -1;
190 static int hf_capwap_msg_element_type_wtp_descriptor_number_encrypt
= -1;
191 static int hf_capwap_msg_element_type_wtp_descriptor_encrypt
= -1;
192 static int hf_capwap_msg_element_type_wtp_descriptor_encrypt_reserved
= -1;
193 static int hf_capwap_msg_element_type_wtp_descriptor_encrypt_wbid
= -1;
194 static int hf_capwap_msg_element_type_wtp_descriptor_encrypt_capabilities
= -1;
196 static int hf_capwap_msg_element_type_wtp_descriptor
= -1;
197 static int hf_capwap_msg_element_type_wtp_descriptor_vendor
= -1;
198 static int hf_capwap_msg_element_type_wtp_descriptor_type
= -1;
199 static int hf_capwap_msg_element_type_wtp_descriptor_length
= -1;
200 static int hf_capwap_msg_element_type_wtp_descriptor_value
= -1;
201 static int hf_capwap_msg_element_type_wtp_descriptor_hardware_version
= -1;
202 static int hf_capwap_msg_element_type_wtp_descriptor_active_software_version
= -1;
203 static int hf_capwap_msg_element_type_wtp_descriptor_boot_version
= -1;
204 static int hf_capwap_msg_element_type_wtp_descriptor_other_software_version
= -1;
206 static int hf_capwap_msg_element_type_wtp_fallback
= -1;
207 static int hf_capwap_msg_element_type_wtp_frame_tunnel_mode
= -1;
208 static int hf_capwap_msg_element_type_wtp_frame_tunnel_mode_n
= -1;
209 static int hf_capwap_msg_element_type_wtp_frame_tunnel_mode_e
= -1;
210 static int hf_capwap_msg_element_type_wtp_frame_tunnel_mode_l
= -1;
211 static int hf_capwap_msg_element_type_wtp_frame_tunnel_mode_r
= -1;
213 static int hf_capwap_msg_element_type_wtp_mac_type
= -1;
215 static int hf_capwap_msg_element_type_wtp_name
= -1;
217 static int hf_capwap_msg_element_type_wtp_reboot_statistics_reboot_count
= -1;
218 static int hf_capwap_msg_element_type_wtp_reboot_statistics_ac_initiated_count
= -1;
219 static int hf_capwap_msg_element_type_wtp_reboot_statistics_link_failure_count
= -1;
220 static int hf_capwap_msg_element_type_wtp_reboot_statistics_sw_failure_count
= -1;
221 static int hf_capwap_msg_element_type_wtp_reboot_statistics_hw_failure_count
= -1;
222 static int hf_capwap_msg_element_type_wtp_reboot_statistics_other_failure_count
= -1;
223 static int hf_capwap_msg_element_type_wtp_reboot_statistics_unknown_failure_count
= -1;
224 static int hf_capwap_msg_element_type_wtp_reboot_statistics_last_failure_type
= -1;
226 static int hf_capwap_msg_element_type_ieee80211_rate_set_radio_id
= -1;
227 static int hf_capwap_msg_element_type_ieee80211_rate_set_rate_set
= -1;
229 static int hf_capwap_msg_element_type_ieee80211_station_session_key_mac
= -1;
230 static int hf_capwap_msg_element_type_ieee80211_station_session_key_flags
= -1;
231 static int hf_capwap_msg_element_type_ieee80211_station_session_key_flags_a
= -1;
232 static int hf_capwap_msg_element_type_ieee80211_station_session_key_flags_c
= -1;
233 static int hf_capwap_msg_element_type_ieee80211_station_session_key_pairwire_tsc
= -1;
234 static int hf_capwap_msg_element_type_ieee80211_station_session_key_pairwire_rsc
= -1;
235 static int hf_capwap_msg_element_type_ieee80211_station_session_key_key
= -1;
237 static int hf_capwap_msg_element_type_ieee80211_wtp_radio_info_radio_id
= -1;
238 static int hf_capwap_msg_element_type_ieee80211_wtp_radio_info_radio_type_reserved
= -1;
239 static int hf_capwap_msg_element_type_ieee80211_wtp_radio_info_radio_type_n
= -1;
240 static int hf_capwap_msg_element_type_ieee80211_wtp_radio_info_radio_type_g
= -1;
241 static int hf_capwap_msg_element_type_ieee80211_wtp_radio_info_radio_type_a
= -1;
242 static int hf_capwap_msg_element_type_ieee80211_wtp_radio_info_radio_type_b
= -1;
244 static int hf_capwap_data_keep_alive
= -1;
245 static int hf_capwap_data_keep_alive_length
= -1;
247 static int hf_msg_fragments
= -1;
248 static int hf_msg_fragment
= -1;
249 static int hf_msg_fragment_overlap
= -1;
250 static int hf_msg_fragment_overlap_conflicts
= -1;
251 static int hf_msg_fragment_multiple_tails
= -1;
252 static int hf_msg_fragment_too_long_fragment
= -1;
253 static int hf_msg_fragment_error
= -1;
254 static int hf_msg_fragment_count
= -1;
255 static int hf_msg_reassembled_in
= -1;
256 static int hf_msg_reassembled_length
= -1;
258 static dissector_handle_t dtls_handle
;
259 static dissector_handle_t ieee8023_handle
;
260 static dissector_handle_t ieee80211_handle
;
261 static dissector_handle_t ieee80211_bsfc_handle
;
262 static dissector_handle_t data_handle
;
264 /* Initialize the subtree pointers */
265 static gint ett_capwap
= -1;
267 static gint ett_msg_fragment
= -1;
268 static gint ett_msg_fragments
= -1;
270 static expert_field ei_capwap_header_length_bad
= EI_INIT
;
271 static expert_field ei_capwap_data_keep_alive_length
= EI_INIT
;
274 /* ************************************************************************* */
276 /* ************************************************************************* */
278 static const fragment_items capwap_frag_items
= {
279 /* Fragment subtrees */
282 /* Fragment fields */
285 &hf_msg_fragment_overlap
,
286 &hf_msg_fragment_overlap_conflicts
,
287 &hf_msg_fragment_multiple_tails
,
288 &hf_msg_fragment_too_long_fragment
,
289 &hf_msg_fragment_error
,
290 &hf_msg_fragment_count
,
291 /* Reassembled in field */
292 &hf_msg_reassembled_in
,
293 /* Reassembled length field */
294 &hf_msg_reassembled_length
,
295 /* Reassembled data field */
301 /* ************************************************************************* */
303 /* ************************************************************************* */
304 static const value_string type_header_vals
[] = {
305 { 0, "CAPWAP Header" },
306 { 1, "CAPWAP DTLS Header" },
309 /* ************************************************************************* */
310 /* Wireless Binding IDentifier (WBID) */
311 /* ************************************************************************* */
312 static const value_string type_wbid
[] = {
314 { 1, "IEEE 802.11" },
315 { 2, "IEEE 802.16" }, /* From old RFC Draft... */
319 /* ************************************************************************* */
320 /* flag Type Transported (payload) */
321 /* ************************************************************************* */
322 static const true_false_string flag_type_t
= {
323 "Native frame format (see Wireless Binding ID field)",
326 /* ************************************************************************* */
327 /* flag Type Fragment */
328 /* ************************************************************************* */
329 static const true_false_string flag_type_f
= {
333 /* ************************************************************************* */
334 /* flag Type Last Fragment */
335 /* ************************************************************************* */
336 static const true_false_string flag_type_l
= {
337 "This is the last fragment",
338 "More fragments follow"
340 /* ************************************************************************* */
341 /* flag Type Wireless */
342 /* ************************************************************************* */
343 static const true_false_string flag_type_w
= {
344 "Wireless Specific Information is present",
345 "No Wireless Specific Information"
347 /* ************************************************************************* */
348 /* flag Type Radio Mac */
349 /* ************************************************************************* */
350 static const true_false_string flag_type_m
= {
351 "Radio MAC Address is present",
352 "No Radio MAC Address"
354 /* ************************************************************************* */
355 /* flag Type Keep Alive */
356 /* ************************************************************************* */
357 static const true_false_string flag_type_k
= {
361 /* ************************************************************************* */
362 /* Message Type Value */
363 /* ************************************************************************* */
364 static const value_string message_type
[] = {
365 { 1, "Discovery Request" },
366 { 2, "Discovery Response" },
367 { 3, "Join Request" },
368 { 4, "Join Response" },
369 { 5, "Configuration Status Request" },
370 { 6, "Configuration Status Response" },
371 { 7, "Configuration Update Request" },
372 { 8, "Configuration Update Response" },
373 { 9, "WTP Event Request" },
374 { 10, "WTP Event Response" },
375 { 11, "Change State Request" },
376 { 12, "Change State Response" },
377 { 13, "Echo Request" },
378 { 14, "Echo Response" },
379 { 15, "Image Data Request" },
380 { 16, "Image Data Response" },
381 { 17, "Reset Request" },
382 { 18, "Reset Response" },
383 { 19, "Primary Discovery Request" },
384 { 20, "Primary Discovery Response" },
385 { 21, "Data Transfer Request" },
386 { 22, "Data Transfer Response" },
387 { 23, "Clear Configuration Request" },
388 { 24, "Clear Configuration Response" },
389 { 25, "Station Configuration Request" },
390 { 26, "Station Configuration Response" },
393 /* ************************************************************************* */
394 /* Message Element Type */
395 /* ************************************************************************* */
396 #define TYPE_AC_DESCRIPTOR 1
397 #define TYPE_AC_IPV4_LIST 2
398 #define TYPE_AC_IPV6_LIST 3
399 #define TYPE_AC_NAME 4
400 #define TYPE_AC_NAME_W_PRIORITY 5
401 #define TYPE_AC_TIMESTAMP 6
402 #define TYPE_ADD_MAC_ACL_ENTRY 7
403 #define TYPE_ADD_STATION 8
404 #define TYPE_RESERVED_9 9
405 #define TYPE_CAPWAP_CONTROL_IPV4_ADDRESS 10
406 #define TYPE_CAPWAP_CONTROL_IPV6_ADDRESS 11
407 #define TYPE_CAPWAP_TIMERS 12
408 #define TYPE_DATA_TRANSFER_DATA 13
409 #define TYPE_DATA_TRANSFER_MODE 14
410 #define TYPE_DESCRYPTION_ERROR_REPORT 15
411 #define TYPE_DECRYPTION_ERROR_REPORT_PERIOD 16
412 #define TYPE_DELETE_MAC_ENTRY 17
413 #define TYPE_DELETE_STATION 18
414 #define TYPE_RESERVED_19 19
415 #define TYPE_DISCOVERY_TYPE 20
416 #define TYPE_DUPLICATE_IPV4_ADDRESS 21
417 #define TYPE_DUPLICATE_IPV6_ADDRESS 22
418 #define TYPE_IDLE_TIMEOUT 23
419 #define TYPE_IMAGE_DATA 24
420 #define TYPE_IMAGE_IDENTIFIER 25
421 #define TYPE_IMAGE_INFORMATION 26
422 #define TYPE_INITIATE_DOWNLOAD 27
423 #define TYPE_LOCATION_DATA 28
424 #define TYPE_MAXIMUM_MESSAGE_LENGTH 29
425 #define TYPE_CAPWAP_LOCAL_IPV4_ADDRESS 30
426 #define TYPE_RADIO_ADMINISTRATIVE_STATE 31
427 #define TYPE_RADIO_OPERATIONAL_STATE 32
428 #define TYPE_RESULT_CODE 33
429 #define TYPE_RETURNED_MESSAGE_ELEMENT 34
430 #define TYPE_SESSION_ID 35
431 #define TYPE_STATISTICS_TIMER 36
432 #define TYPE_VENDOR_SPECIFIC_PAYLOAD 37
433 #define TYPE_WTP_BOARD_DATA 38
434 #define TYPE_WTP_DESCRIPTOR 39
435 #define TYPE_WTP_FALLBACK 40
436 #define TYPE_WTP_FRAME_TUNNEL_MODE 41
437 #define TYPE_RESERVED_42 42
438 #define TYPE_RESERVED_43 43
439 #define TYPE_WTP_MAC_TYPE 44
440 #define TYPE_WTP_NAME 45
441 #define TYPE_RESERVED_46 46
442 #define TYPE_WTP_RADIO_STATISTICS 47
443 #define TYPE_WTP_REBOOT_STATISTICS 48
444 #define TYPE_WTP_STATIC_IP_ADDRESS_INFORMATION 49
445 #define TYPE_CAPWAP_LOCAL_IPV6_ADDRESS 50
446 #define TYPE_CAPWAP_TRANSPORT_PROTOCOL 51
447 #define TYPE_MTU_DISCOVERY_PADDING 52
448 #define TYPE_ECN_SUPPORT 53
450 #define IEEE80211_ADD_WLAN 1024
451 #define IEEE80211_ANTENNA 1025
452 #define IEEE80211_ASSIGNED_WTP_BSSID 1026
453 #define IEEE80211_DELETE_WLAN 1027
454 #define IEEE80211_DIRECT_SEQUENCE_CONTROL 1028
455 #define IEEE80211_INFORMATION_ELEMENT 1029
456 #define IEEE80211_MAC_OPERATION 1030
457 #define IEEE80211_MIC_COUNTERMEASURES 1031
458 #define IEEE80211_MULTI_DOMAIN_CAPABILITY 1032
459 #define IEEE80211_OFDM_CONTROL 1033
460 #define IEEE80211_RATE_SET 1034
461 #define IEEE80211_RSNA_ERROR_REPORT_FROM_STATION 1035
462 #define IEEE80211_STATION 1036
463 #define IEEE80211_STATION_QOS_PROFILE 1037
464 #define IEEE80211_STATION_SESSION_KEY 1038
465 #define IEEE80211_STATISTICS 1039
466 #define IEEE80211_SUPPORTED_RATES 1040
467 #define IEEE80211_TX_POWER 1041
468 #define IEEE80211_TX_POWER_LEVEL 1042
469 #define IEEE80211_UPDATE_STATION_QOS 1043
470 #define IEEE80211_UPDATE_WLAN 1044
471 #define IEEE80211_WTP_QUALITY_OF_SERVICE 1045
472 #define IEEE80211_WTP_RADIO_CONFIGURATION 1046
473 #define IEEE80211_WTP_RADIO_FAIL_ALARM_INDICATION 1047
474 #define IEEE80211_WTP_RADIO_INFORMATION 1048
476 /* ************************************************************************* */
477 /* Message Element Type Value */
478 /* ************************************************************************* */
479 static const value_string message_element_type_vals
[] = {
480 { TYPE_AC_DESCRIPTOR
, "AC Descriptor" },
481 { TYPE_AC_IPV4_LIST
, "AC IPv4 List" },
482 { TYPE_AC_IPV6_LIST
, "AC IPv6 List" },
483 { TYPE_AC_NAME
, "AC Name" },
484 { TYPE_AC_NAME_W_PRIORITY
, "AC Name With Priority" },
485 { TYPE_AC_TIMESTAMP
, "AC Timestamp" },
486 { TYPE_ADD_MAC_ACL_ENTRY
, "Add MAC ACL Entry" },
487 { TYPE_ADD_STATION
, "Add Station" },
488 { TYPE_RESERVED_9
, "Reserved" },
489 { TYPE_CAPWAP_CONTROL_IPV4_ADDRESS
, "CAPWAP Control IPv4 Address" },
490 { TYPE_CAPWAP_CONTROL_IPV6_ADDRESS
, "CAPWAP Control IPv6 Address" },
491 { TYPE_CAPWAP_TIMERS
, "CAPWAP Timers" },
492 { TYPE_DATA_TRANSFER_DATA
, "Data Transfer Data" },
493 { TYPE_DATA_TRANSFER_MODE
, "Data Transfer Mode" },
494 { TYPE_DESCRYPTION_ERROR_REPORT
, "Decryption Error Report" },
495 { TYPE_DECRYPTION_ERROR_REPORT_PERIOD
, "Decryption Error Report Period" },
496 { TYPE_DELETE_MAC_ENTRY
, "Delete MAC ACL Entry" },
497 { TYPE_DELETE_STATION
, "Delete Station" },
498 { TYPE_RESERVED_19
, "Reserved" },
499 { TYPE_DISCOVERY_TYPE
, "Discovery Type" },
500 { TYPE_DUPLICATE_IPV4_ADDRESS
, "Duplicate IPv4 Address" },
501 { TYPE_DUPLICATE_IPV6_ADDRESS
, "Duplicate IPv6 Address" },
502 { TYPE_IDLE_TIMEOUT
, "Idle Timeout" },
503 { TYPE_IMAGE_DATA
, "Image Data" },
504 { TYPE_IMAGE_IDENTIFIER
, "Image Identifier" },
505 { TYPE_IMAGE_INFORMATION
, "Image Information" },
506 { TYPE_INITIATE_DOWNLOAD
, "Initiate Download" },
507 { TYPE_LOCATION_DATA
, "Location Data" },
508 { TYPE_MAXIMUM_MESSAGE_LENGTH
, "Maximum Message Length" },
509 { TYPE_CAPWAP_LOCAL_IPV4_ADDRESS
, "CAPWAP Local IPv4 Address" },
510 { TYPE_RADIO_ADMINISTRATIVE_STATE
, "Radio Administrative State " },
511 { TYPE_RADIO_OPERATIONAL_STATE
, "Radio Operational State" },
512 { TYPE_RESULT_CODE
, "Result Code" },
513 { TYPE_RETURNED_MESSAGE_ELEMENT
, "Returned Message Element" },
514 { TYPE_SESSION_ID
, "Session ID" },
515 { TYPE_STATISTICS_TIMER
, "Statistics Timer" },
516 { TYPE_VENDOR_SPECIFIC_PAYLOAD
, "Vendor Specific Payload" },
517 { TYPE_WTP_BOARD_DATA
, "WTP Board Data" },
518 { TYPE_WTP_DESCRIPTOR
, "WTP Descriptor" },
519 { TYPE_WTP_FALLBACK
, "WTP Fallback " },
520 { TYPE_WTP_FRAME_TUNNEL_MODE
, "WTP Frame Tunnel Mode " },
521 { TYPE_RESERVED_42
, "Reserved" },
522 { TYPE_RESERVED_43
, "Reserved" },
523 { TYPE_WTP_MAC_TYPE
, "WTP MAC Type" },
524 { TYPE_WTP_NAME
, "WTP Name" },
525 { TYPE_RESERVED_46
, "Unused/Reserved" },
526 { TYPE_WTP_RADIO_STATISTICS
, "WTP Radio Statistics" },
527 { TYPE_WTP_REBOOT_STATISTICS
, "WTP Reboot Statistics" },
528 { TYPE_WTP_STATIC_IP_ADDRESS_INFORMATION
, "WTP Static IP Address Information" },
529 { TYPE_CAPWAP_LOCAL_IPV6_ADDRESS
, "CAPWAP Local IPv6 Address" },
530 { TYPE_CAPWAP_TRANSPORT_PROTOCOL
, "CAPWAP Transport Protocol" },
531 { TYPE_MTU_DISCOVERY_PADDING
, "MTU Discovery Padding" },
532 { TYPE_ECN_SUPPORT
, "ECN Support" },
534 { IEEE80211_ADD_WLAN
, "IEEE 802.11 Add WLAN" },
535 { IEEE80211_ANTENNA
, "IEEE 802.11 Antenna" },
536 { IEEE80211_ASSIGNED_WTP_BSSID
, "IEEE 802.11 Assigned WTP BSSID" },
537 { IEEE80211_DELETE_WLAN
, "IEEE 802.11 Delete WLAN" },
538 { IEEE80211_DIRECT_SEQUENCE_CONTROL
, "IEEE 802.11 Direct Sequence Control" },
539 { IEEE80211_INFORMATION_ELEMENT
, "IEEE 802.11 Information Element" },
540 { IEEE80211_MAC_OPERATION
, "IEEE 802.11 MAC Operation" },
541 { IEEE80211_MIC_COUNTERMEASURES
, "IEEE 802.11 MIC Countermeasures" },
542 { IEEE80211_MULTI_DOMAIN_CAPABILITY
, "IEEE 802.11 Multi-Domain Capability" },
543 { IEEE80211_OFDM_CONTROL
, "IEEE 802.11 OFDM Control" },
544 { IEEE80211_RATE_SET
, "IEEE 802.11 Rate Set" },
545 { IEEE80211_RSNA_ERROR_REPORT_FROM_STATION
, "IEEE 802.11 RSNA Error Report From Station" },
546 { IEEE80211_STATION
, "IEEE 802.11 Station" },
547 { IEEE80211_STATION_QOS_PROFILE
, "IEEE 802.11 Station QoS Profile" },
548 { IEEE80211_STATION_SESSION_KEY
, "IEEE 802.11 Station Session Key" },
549 { IEEE80211_STATISTICS
, "IEEE 802.11 Statistics" },
550 { IEEE80211_SUPPORTED_RATES
, "IEEE 802.11 Supported Rates" },
551 { IEEE80211_TX_POWER
, "IEEE 802.11 Tx Power" },
552 { IEEE80211_TX_POWER_LEVEL
, "IEEE 802.11 Tx Power Level" },
553 { IEEE80211_UPDATE_STATION_QOS
, "IEEE 802.11 Update Station QoS" },
554 { IEEE80211_UPDATE_WLAN
, "IEEE 802.11 Update WLAN" },
555 { IEEE80211_WTP_QUALITY_OF_SERVICE
, "IEEE 802.11 WTP Quality of Service" },
556 { IEEE80211_WTP_RADIO_CONFIGURATION
, "IEEE 802.11 WTP Radio Configuration" },
557 { IEEE80211_WTP_RADIO_FAIL_ALARM_INDICATION
, "IEEE 802.11 WTP Radio Fail Alarm Indication" },
558 { IEEE80211_WTP_RADIO_INFORMATION
, "IEEE 802.11 WTP Radio Information" },
561 /* ************************************************************************* */
563 /* ************************************************************************* */
564 static const value_string discovery_type_vals
[] = {
566 { 1, "Static Configuration" },
569 { 4, "AC Referral" },
572 /* ************************************************************************* */
573 /* Radio Administrative State */
574 /* ************************************************************************* */
575 static const value_string radio_admin_state_vals
[] = {
580 /* ************************************************************************* */
581 /* Radio Operational State */
582 /* ************************************************************************* */
583 static const value_string radio_op_state_vals
[] = {
589 /* ************************************************************************* */
590 /* Radio Operational Cause */
591 /* ************************************************************************* */
592 static const value_string radio_op_cause_vals
[] = {
594 { 1, "Radio Failure" },
595 { 2, "Software Failure" },
596 { 3, "Administratively Set" },
599 /* ************************************************************************* */
601 /* ************************************************************************* */
602 static const value_string result_code_vals
[] = {
604 { 1 , "Failure (AC List Message Element MUST Be Present)" },
605 { 2 , "Success (NAT Detected)" },
606 { 3 , "Join Failure (Unspecified)" },
607 { 4 , "Join Failure (Resource Depletion)" },
608 { 5 , "Join Failure (Unknown Source)" },
609 { 6 , "Join Failure (Incorrect Data)" },
610 { 7 , "Join Failure (Session ID Already in Use)" },
611 { 8 , "Join Failure (WTP Hardware Not Supported)" },
612 { 9 , "Join Failure (Binding Not Supported)" },
613 { 10, "Reset Failure (Unable to Reset)" },
614 { 11, "Reset Failure (Firmware Write Error)" },
615 { 12, "Configuration Failure (Unable to Apply Requested Configuration - Service Provided Anyhow)" },
616 { 13, "Configuration Failure (Unable to Apply Requested Configuration - Service Not Provided)" },
617 { 14, "Image Data Error (Invalid Checksum)" },
618 { 15, "Image Data Error (Invalid Data Length)" },
619 { 16, "Image Data Error (Other Error)" },
620 { 17, "Image Data Error (Image Already Present)" },
621 { 18, "Message Unexpected (Invalid in Current State)" },
622 { 19, "Message Unexpected (Unrecognized Request)" },
623 { 20, "Failure - Missing Mandatory Message Element" },
624 { 21, "Failure - Unrecognized Message Element" },
625 { 22, "Data Transfer Error (No Information to Transfer)" },
628 /* ************************************************************************* */
629 /* Radio MAC Address Field */
630 /* ************************************************************************* */
631 static const value_string rmac_field_vals
[] = {
634 { 2, "Not Supported" },
637 /* ************************************************************************* */
638 /* Board Data Type Value */
639 /* ************************************************************************* */
640 #define BOARD_DATA_WTP_MODEL_NUMBER 0
641 #define BOARD_DATA_WTP_SERIAL_NUMBER 1
642 #define BOARD_DATA_BOARD_ID 2
643 #define BOARD_DATA_BOARD_REVISION 3
644 #define BOARD_DATA_BASE_MAC_ADDRESS 4
646 static const value_string board_data_type_vals
[] = {
647 { BOARD_DATA_WTP_MODEL_NUMBER
, "WTP Model Number" },
648 { BOARD_DATA_WTP_SERIAL_NUMBER
, "WTP Serial Number" },
649 { BOARD_DATA_BOARD_ID
, "Board ID" },
650 { BOARD_DATA_BOARD_REVISION
, "Board Revision" },
651 { BOARD_DATA_BASE_MAC_ADDRESS
, "Base MAC Address" },
654 /* ************************************************************************* */
655 /* Descriptor WTP Type Value */
656 /* ************************************************************************* */
657 #define WTP_DESCRIPTOR_HARDWARE_VERSION 0
658 #define WTP_DESCRIPTOR_ACTIVE_SOFTWARE_VERSION 1
659 #define WTP_DESCRIPTOR_BOOT_VERSION 2
660 #define WTP_DESCRIPTOR_OTHER_SOFTWARE_VERSION 3
662 static const value_string wtp_descriptor_type_vals
[] = {
663 { WTP_DESCRIPTOR_HARDWARE_VERSION
, "WTP Hardware Version" },
664 { WTP_DESCRIPTOR_ACTIVE_SOFTWARE_VERSION
, "WTP Active Software Version" },
665 { WTP_DESCRIPTOR_BOOT_VERSION
, "WTP Boot Version" },
666 { WTP_DESCRIPTOR_OTHER_SOFTWARE_VERSION
, "WTP Other Software Version" },
669 /* ************************************************************************* */
670 /* AC Information Type Value */
671 /* ************************************************************************* */
672 #define AC_INFORMATION_HARDWARE_VERSION 4
673 #define AC_INFORMATION_SOFTWARE_VERSION 5
675 static const value_string ac_information_type_vals
[] = {
676 { AC_INFORMATION_HARDWARE_VERSION
, "AC Hardware Version" },
677 { AC_INFORMATION_SOFTWARE_VERSION
, "AC Software Version" },
680 /* ************************************************************************* */
682 /* ************************************************************************* */
683 static const value_string wtp_mac_vals
[] = {
686 { 2, "Both (Local and Split MAC)" },
689 /* ************************************************************************* */
691 /* ************************************************************************* */
692 static const value_string wtp_fallback_vals
[] = {
698 /* ************************************************************************* */
699 /* Last Failure Type */
700 /* ************************************************************************* */
701 static const value_string last_failure_type_vals
[] = {
702 { 0, "Not Supported" },
703 { 1, "AC Initiated" },
704 { 2, "Link Failure" },
705 { 3, "Software Failure" },
706 { 4, "Hardware Failure" },
707 { 5, "Other Failure" },
708 { 255, "Unknown (e.g., WTP doesn't keep track of info)" },
712 static void capwap_reassemble_init(void)
714 reassembly_table_init(&capwap_reassembly_table
,
715 &addresses_reassembly_table_functions
);
719 dissect_capwap_data_message_bindings_ieee80211(tvbuff_t
*tvb
, proto_tree
*data_message_binding_tree
, guint offset
, packet_info
*pinfo
)
721 proto_item
*data_message_binding_item
;
722 proto_tree
*sub_data_message_binding_tree
;
724 if (global_capwap_data_udp_port
== pinfo
->destport
)
726 /* (WTP -> AC) IEEE 802.11 Frame Info */
727 data_message_binding_item
= proto_tree_add_item(data_message_binding_tree
, hf_capwap_header_wireless_data_ieee80211_fi
,tvb
, offset
, 4, ENC_NA
);
728 sub_data_message_binding_tree
= proto_item_add_subtree(data_message_binding_item
, ett_capwap
);
730 proto_tree_add_item(sub_data_message_binding_tree
, hf_capwap_header_wireless_data_ieee80211_fi_rssi
,tvb
, offset
, 1, ENC_BIG_ENDIAN
);
732 proto_tree_add_item(sub_data_message_binding_tree
, hf_capwap_header_wireless_data_ieee80211_fi_snr
,tvb
, offset
+1, 1, ENC_BIG_ENDIAN
);
734 proto_tree_add_item(sub_data_message_binding_tree
, hf_capwap_header_wireless_data_ieee80211_fi_data_rate
,tvb
, offset
+2, 2, ENC_BIG_ENDIAN
);
738 /* (AC -> WTP) IEEE 802.11 Destination Wlans */
739 data_message_binding_item
= proto_tree_add_item(data_message_binding_tree
, hf_capwap_header_wireless_data_ieee80211_dest_wlan
,tvb
, offset
, 4, ENC_NA
);
740 sub_data_message_binding_tree
= proto_item_add_subtree(data_message_binding_item
, ett_capwap
);
742 proto_tree_add_item(sub_data_message_binding_tree
, hf_capwap_header_wireless_data_ieee80211_dw_wlan_id_bitmap
,tvb
, offset
, 2, ENC_BIG_ENDIAN
);
744 proto_tree_add_item(sub_data_message_binding_tree
, hf_capwap_header_wireless_data_ieee80211_dw_reserved
,tvb
, offset
+2, 2, ENC_BIG_ENDIAN
);
749 dissect_capwap_encryption_capabilities(tvbuff_t
*tvb
, proto_tree
*encryption_capabilities_tree
, guint offset
)
751 proto_item
*encryption_capabilities_item
;
752 proto_tree
*sub_encryption_capabilities_tree
;
754 encryption_capabilities_item
= proto_tree_add_item(encryption_capabilities_tree
, hf_capwap_msg_element_type_wtp_descriptor_encrypt
, tvb
, offset
, 3, ENC_NA
);
755 sub_encryption_capabilities_tree
= proto_item_add_subtree(encryption_capabilities_item
, ett_capwap
);
757 proto_tree_add_item(sub_encryption_capabilities_tree
, hf_capwap_msg_element_type_wtp_descriptor_encrypt_reserved
, tvb
, offset
, 1, ENC_NA
);
759 proto_tree_add_item (sub_encryption_capabilities_tree
, hf_capwap_msg_element_type_wtp_descriptor_encrypt_wbid
, tvb
, offset
, 1, ENC_NA
);
760 proto_item_append_text(encryption_capabilities_item
, ": (WBID %d)",tvb_get_guint8(tvb
, offset
) & 0x1F);
763 proto_tree_add_item(sub_encryption_capabilities_tree
, hf_capwap_msg_element_type_wtp_descriptor_encrypt_capabilities
, tvb
, offset
+1, 2, ENC_BIG_ENDIAN
);
764 proto_item_append_text(encryption_capabilities_item
, " %d",tvb_get_ntohs(tvb
, offset
+1));
768 /* Returns the number of bytes consumed by this option. */
770 dissect_capwap_ac_information(tvbuff_t
*tvb
, proto_tree
*ac_information_type_tree
, guint offset
)
772 guint optlen
,ac_information_type
= 0;
773 proto_item
*ac_information_type_item
;
774 proto_tree
*sub_ac_information_type_tree
;
776 ac_information_type
= tvb_get_ntohs(tvb
, offset
+4);
777 optlen
= tvb_get_ntohs(tvb
, offset
+6);
778 ac_information_type_item
= proto_tree_add_item(ac_information_type_tree
, hf_capwap_msg_element_type_ac_information
, tvb
, offset
, 4+2+2+optlen
, ENC_NA
);
780 proto_item_append_text(ac_information_type_item
,": (t=%d,l=%d) %s", ac_information_type
, optlen
, val_to_str(ac_information_type
,ac_information_type_vals
,"Unknown AC Information Type (%02d)") );
782 sub_ac_information_type_tree
= proto_item_add_subtree(ac_information_type_item
, ett_capwap
);
784 proto_tree_add_item(sub_ac_information_type_tree
, hf_capwap_msg_element_type_ac_information_vendor
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
786 proto_tree_add_item(sub_ac_information_type_tree
, hf_capwap_msg_element_type_ac_information_type
, tvb
, offset
+4, 2, ENC_BIG_ENDIAN
);
788 proto_tree_add_item(sub_ac_information_type_tree
, hf_capwap_msg_element_type_ac_information_length
, tvb
, offset
+6, 2, ENC_BIG_ENDIAN
);
790 proto_tree_add_item(sub_ac_information_type_tree
, hf_capwap_msg_element_type_ac_information_value
, tvb
, offset
+8, optlen
, ENC_NA
);
792 switch (ac_information_type
) {
793 case AC_INFORMATION_HARDWARE_VERSION
:
794 proto_tree_add_item(sub_ac_information_type_tree
, hf_capwap_msg_element_type_ac_information_hardware_version
, tvb
, offset
+8, optlen
, ENC_ASCII
|ENC_NA
);
797 case AC_INFORMATION_SOFTWARE_VERSION
:
798 proto_tree_add_item(sub_ac_information_type_tree
, hf_capwap_msg_element_type_ac_information_software_version
, tvb
, offset
+8, optlen
, ENC_ASCII
|ENC_NA
);
802 /* No Default Action */
808 /* Returns the number of bytes consumed by this option. */
810 dissect_capwap_wtp_descriptor(tvbuff_t
*tvb
, proto_tree
*wtp_descriptor_type_tree
, guint offset
)
812 guint optlen
,wtp_descriptor_type
= 0;
813 proto_item
*wtp_descriptor_type_item
;
814 proto_tree
*sub_wtp_descriptor_type_tree
;
816 wtp_descriptor_type
= tvb_get_ntohs(tvb
, offset
+4);
817 optlen
= tvb_get_ntohs(tvb
, offset
+6);
818 wtp_descriptor_type_item
= proto_tree_add_item(wtp_descriptor_type_tree
, hf_capwap_msg_element_type_wtp_descriptor
, tvb
, offset
, 4+2+2+optlen
, ENC_NA
);
820 proto_item_append_text(wtp_descriptor_type_item
, ": (t=%d,l=%d) %s", wtp_descriptor_type
, optlen
, val_to_str(wtp_descriptor_type
,wtp_descriptor_type_vals
,"Unknown WTP Descriptor Type (%02d)") );
822 sub_wtp_descriptor_type_tree
= proto_item_add_subtree(wtp_descriptor_type_item
, ett_capwap
);
824 proto_tree_add_item(sub_wtp_descriptor_type_tree
, hf_capwap_msg_element_type_wtp_descriptor_vendor
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
826 proto_tree_add_item(sub_wtp_descriptor_type_tree
, hf_capwap_msg_element_type_wtp_descriptor_type
, tvb
, offset
+4, 2, ENC_BIG_ENDIAN
);
828 proto_tree_add_item(sub_wtp_descriptor_type_tree
, hf_capwap_msg_element_type_wtp_descriptor_length
, tvb
, offset
+6, 2, ENC_BIG_ENDIAN
);
830 proto_tree_add_item(sub_wtp_descriptor_type_tree
, hf_capwap_msg_element_type_wtp_descriptor_value
, tvb
, offset
+8, optlen
, ENC_NA
);
832 switch (wtp_descriptor_type
) {
833 case WTP_DESCRIPTOR_HARDWARE_VERSION
:
834 proto_tree_add_item(sub_wtp_descriptor_type_tree
, hf_capwap_msg_element_type_wtp_descriptor_hardware_version
, tvb
, offset
+8, optlen
, ENC_ASCII
|ENC_NA
);
837 case WTP_DESCRIPTOR_ACTIVE_SOFTWARE_VERSION
:
838 proto_tree_add_item(sub_wtp_descriptor_type_tree
, hf_capwap_msg_element_type_wtp_descriptor_active_software_version
, tvb
, offset
+8, optlen
, ENC_ASCII
|ENC_NA
);
841 case WTP_DESCRIPTOR_BOOT_VERSION
:
842 proto_tree_add_item(sub_wtp_descriptor_type_tree
, hf_capwap_msg_element_type_wtp_descriptor_boot_version
, tvb
, offset
+8, optlen
, ENC_ASCII
|ENC_NA
);
845 case WTP_DESCRIPTOR_OTHER_SOFTWARE_VERSION
:
846 proto_tree_add_item(sub_wtp_descriptor_type_tree
, hf_capwap_msg_element_type_wtp_descriptor_other_software_version
, tvb
, offset
+8, optlen
, ENC_ASCII
|ENC_NA
);
850 /* No Default Action */
857 /* Returns the number of bytes consumed by this option. */
859 dissect_capwap_board_data(tvbuff_t
*tvb
, proto_tree
*board_data_type_tree
, guint offset
)
861 guint optlen
,board_data_type
= 0;
862 proto_item
*board_data_type_item
;
863 proto_tree
*sub_board_data_type_tree
;
865 board_data_type
= tvb_get_ntohs(tvb
, offset
);
866 optlen
= tvb_get_ntohs(tvb
, offset
+2);
867 board_data_type_item
= proto_tree_add_item(board_data_type_tree
, hf_capwap_msg_element_type_wtp_board_data
, tvb
, offset
, 2+2+optlen
, ENC_NA
);
869 proto_item_append_text(board_data_type_item
, ": (t=%d,l=%d) %s", board_data_type
, optlen
, val_to_str(board_data_type
,board_data_type_vals
,"Unknown Board Data Type (%02d)") );
871 sub_board_data_type_tree
= proto_item_add_subtree(board_data_type_item
, ett_capwap
);
873 proto_tree_add_item(sub_board_data_type_tree
, hf_capwap_msg_element_type_wtp_board_data_type
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
875 proto_tree_add_item(sub_board_data_type_tree
, hf_capwap_msg_element_type_wtp_board_data_length
, tvb
, offset
+2, 2, ENC_BIG_ENDIAN
);
877 proto_tree_add_item(sub_board_data_type_tree
, hf_capwap_msg_element_type_wtp_board_data_value
, tvb
, offset
+4, optlen
, ENC_NA
);
878 switch (board_data_type
) {
879 case BOARD_DATA_WTP_MODEL_NUMBER
:
880 proto_tree_add_item(sub_board_data_type_tree
, hf_capwap_msg_element_type_wtp_board_data_wtp_model_number
, tvb
, offset
+4, optlen
, ENC_ASCII
|ENC_NA
);
883 case BOARD_DATA_WTP_SERIAL_NUMBER
:
884 proto_tree_add_item(sub_board_data_type_tree
, hf_capwap_msg_element_type_wtp_board_data_wtp_serial_number
, tvb
, offset
+4, optlen
, ENC_ASCII
|ENC_NA
);
887 case BOARD_DATA_BOARD_ID
:
888 proto_tree_add_item(sub_board_data_type_tree
, hf_capwap_msg_element_type_wtp_board_data_wtp_board_id
, tvb
, offset
+4, optlen
, ENC_ASCII
|ENC_NA
);
891 case BOARD_DATA_BOARD_REVISION
:
892 proto_tree_add_item(sub_board_data_type_tree
, hf_capwap_msg_element_type_wtp_board_data_wtp_board_revision
, tvb
, offset
+4, optlen
, ENC_ASCII
|ENC_NA
);
895 case BOARD_DATA_BASE_MAC_ADDRESS
:
896 proto_tree_add_item(sub_board_data_type_tree
, hf_capwap_msg_element_type_wtp_board_data_base_mac_address
, tvb
, offset
+4, 6, ENC_NA
);
900 /* No Default Action */
907 /* Returns the number of bytes consumed by this option. */
909 dissect_capwap_message_element_type(tvbuff_t
*tvb
, proto_tree
*msg_element_type_tree
, guint offset
)
911 guint optlen
, offset_end
, number_encrypt
, i
, msg_element_type
= 0;
912 proto_item
*msg_element_type_item
, *msg_element_type_item_flag
;
913 proto_tree
*sub_msg_element_type_tree
, *sub_msg_element_type_flag_tree
;
915 msg_element_type
= tvb_get_ntohs(tvb
, offset
);
916 optlen
= tvb_get_ntohs(tvb
, offset
+2);
917 msg_element_type_item
= proto_tree_add_item(msg_element_type_tree
, hf_capwap_msg_element
, tvb
, offset
, 2+2+optlen
, ENC_NA
);
919 proto_item_append_text(msg_element_type_item
, ": (t=%d,l=%d) %s", msg_element_type
, optlen
, val_to_str(msg_element_type
,message_element_type_vals
,"Unknown Message Element Type (%02d)") );
921 sub_msg_element_type_tree
= proto_item_add_subtree(msg_element_type_item
, ett_capwap
);
923 proto_tree_add_item(sub_msg_element_type_tree
, hf_capwap_msg_element_type
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
925 proto_tree_add_item(sub_msg_element_type_tree
, hf_capwap_msg_element_length
, tvb
, offset
+2, 2, ENC_BIG_ENDIAN
);
927 proto_tree_add_item(sub_msg_element_type_tree
, hf_capwap_msg_element_value
, tvb
, offset
+4, optlen
, ENC_NA
);
929 switch (msg_element_type
) {
930 case TYPE_AC_DESCRIPTOR
: /* AC Descriptor (1) */
931 proto_tree_add_item(sub_msg_element_type_tree
, hf_capwap_msg_element_type_ac_descriptor_stations
, tvb
, offset
+4, 2, ENC_BIG_ENDIAN
);
932 proto_tree_add_item(sub_msg_element_type_tree
, hf_capwap_msg_element_type_ac_descriptor_limit
, tvb
, offset
+6, 2, ENC_BIG_ENDIAN
);
933 proto_tree_add_item(sub_msg_element_type_tree
, hf_capwap_msg_element_type_ac_descriptor_active_wtp
, tvb
, offset
+8, 2, ENC_BIG_ENDIAN
);
934 proto_tree_add_item(sub_msg_element_type_tree
, hf_capwap_msg_element_type_ac_descriptor_max_wtp
, tvb
, offset
+10, 2, ENC_BIG_ENDIAN
);
936 /* AC Descriptor Security Flags... */
937 msg_element_type_item_flag
= proto_tree_add_item(sub_msg_element_type_tree
, hf_capwap_msg_element_type_ac_descriptor_security
, tvb
, offset
+12, 1, ENC_NA
);
938 sub_msg_element_type_flag_tree
= proto_item_add_subtree(msg_element_type_item_flag
, ett_capwap
);
940 proto_tree_add_item(sub_msg_element_type_flag_tree
, hf_capwap_msg_element_type_ac_descriptor_security_r
, tvb
, offset
+12, 1, ENC_BIG_ENDIAN
);
941 proto_tree_add_item(sub_msg_element_type_flag_tree
, hf_capwap_msg_element_type_ac_descriptor_security_s
, tvb
, offset
+12, 1, ENC_BIG_ENDIAN
);
942 proto_tree_add_item(sub_msg_element_type_flag_tree
, hf_capwap_msg_element_type_ac_descriptor_security_x
, tvb
, offset
+12, 1, ENC_BIG_ENDIAN
);
944 proto_tree_add_item(sub_msg_element_type_tree
, hf_capwap_msg_element_type_ac_descriptor_rmac_field
, tvb
, offset
+13, 1, ENC_BIG_ENDIAN
);
945 proto_tree_add_item(sub_msg_element_type_tree
, hf_capwap_msg_element_type_ac_descriptor_reserved
, tvb
, offset
+14, 1, ENC_BIG_ENDIAN
);
947 /* AC Descriptor DTLS Flags... */
948 msg_element_type_item_flag
= proto_tree_add_item(sub_msg_element_type_tree
, hf_capwap_msg_element_type_ac_descriptor_dtls_policy
, tvb
, offset
+15, 1, ENC_NA
);
949 sub_msg_element_type_flag_tree
= proto_item_add_subtree(msg_element_type_item_flag
, ett_capwap
);
951 proto_tree_add_item(sub_msg_element_type_flag_tree
, hf_capwap_msg_element_type_ac_descriptor_dtls_policy_r
, tvb
, offset
+15, 1, ENC_BIG_ENDIAN
);
952 proto_tree_add_item(sub_msg_element_type_flag_tree
, hf_capwap_msg_element_type_ac_descriptor_dtls_policy_d
, tvb
, offset
+15, 1, ENC_BIG_ENDIAN
);
953 proto_tree_add_item(sub_msg_element_type_flag_tree
, hf_capwap_msg_element_type_ac_descriptor_dtls_policy_c
, tvb
, offset
+15, 1, ENC_BIG_ENDIAN
);
955 offset_end
= offset
+ optlen
-4;
957 while (offset
< offset_end
) {
958 offset
+= dissect_capwap_ac_information(tvb
, sub_msg_element_type_tree
, offset
);
962 case TYPE_AC_IPV4_LIST
: /* AC IPv4 List (2) */
963 offset_end
= offset
+ 4 + optlen
;
968 while (offset_end
-offset
> 0)
970 proto_tree_add_item(sub_msg_element_type_tree
, hf_capwap_msg_element_type_ac_ipv4_list
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
976 case TYPE_AC_IPV6_LIST
: /* AC IPv6 List (3) */
977 offset_end
= offset
+ 4 + optlen
;
982 while (offset_end
-offset
> 0)
984 proto_tree_add_item(sub_msg_element_type_tree
, hf_capwap_msg_element_type_ac_ipv6_list
, tvb
, offset
, 16, ENC_NA
);
990 case TYPE_AC_NAME
: /* AC Name (4) */
991 proto_tree_add_item(sub_msg_element_type_tree
, hf_capwap_msg_element_type_ac_name
, tvb
, offset
+4, optlen
, ENC_ASCII
|ENC_NA
);
994 case TYPE_AC_NAME_W_PRIORITY
: /* AC Name With Priority (5) */
995 proto_tree_add_item(sub_msg_element_type_tree
, hf_capwap_msg_element_type_ac_name_with_priority
, tvb
, offset
+1, 1, ENC_BIG_ENDIAN
);
996 proto_tree_add_item(sub_msg_element_type_tree
, hf_capwap_msg_element_type_ac_name
, tvb
, offset
+5, optlen
-1, ENC_ASCII
|ENC_NA
);
999 case TYPE_CAPWAP_CONTROL_IPV4_ADDRESS
: /* CAPWAP Control IPv4 Address (10) */
1000 proto_tree_add_item(sub_msg_element_type_tree
, hf_capwap_msg_element_type_capwap_control_ipv4
, tvb
, offset
+4, 4, ENC_BIG_ENDIAN
);
1001 proto_tree_add_item(sub_msg_element_type_tree
, hf_capwap_msg_element_type_capwap_control_wtp_count
, tvb
, offset
+8, 2, ENC_BIG_ENDIAN
);
1004 case TYPE_CAPWAP_CONTROL_IPV6_ADDRESS
: /* CAPWAP Control IPv6 Address (11) */
1005 proto_tree_add_item(sub_msg_element_type_tree
, hf_capwap_msg_element_type_capwap_control_ipv6
, tvb
, offset
+4, 16, ENC_NA
);
1006 proto_tree_add_item(sub_msg_element_type_tree
, hf_capwap_msg_element_type_capwap_control_wtp_count
, tvb
, offset
+20, 2, ENC_BIG_ENDIAN
);
1009 case TYPE_CAPWAP_TIMERS
: /* CAPWAP Timers (12) */
1010 proto_tree_add_item(sub_msg_element_type_tree
, hf_capwap_msg_element_type_capwap_timers_discovery
, tvb
, offset
+4, 1, ENC_BIG_ENDIAN
);
1011 proto_tree_add_item(sub_msg_element_type_tree
, hf_capwap_msg_element_type_capwap_timers_echo_request
, tvb
, offset
+5, 1, ENC_BIG_ENDIAN
);
1014 case TYPE_DECRYPTION_ERROR_REPORT_PERIOD
: /* Decryption Error Report Period (16) */
1015 proto_tree_add_item(sub_msg_element_type_tree
, hf_capwap_msg_element_type_decryption_error_report_period_radio_id
, tvb
, offset
+4, 1, ENC_BIG_ENDIAN
);
1016 proto_tree_add_item(sub_msg_element_type_tree
,hf_capwap_msg_element_type_decryption_error_report_period_interval
, tvb
, offset
+5, 2, ENC_BIG_ENDIAN
);
1019 case TYPE_DISCOVERY_TYPE
: /* Discovery Type (20) */
1020 proto_tree_add_item(sub_msg_element_type_tree
, hf_capwap_msg_element_type_discovery_type
, tvb
, offset
+4, optlen
, ENC_BIG_ENDIAN
);
1022 case TYPE_IDLE_TIMEOUT
: /* Idle Timeout (23) */
1023 proto_tree_add_item(sub_msg_element_type_tree
, hf_capwap_msg_element_type_idle_timeout
, tvb
, offset
+4, 4, ENC_BIG_ENDIAN
);
1026 case TYPE_LOCATION_DATA
: /* Location Data (28) */
1027 proto_tree_add_item(sub_msg_element_type_tree
, hf_capwap_msg_element_type_location_data
, tvb
, offset
+4, optlen
, ENC_ASCII
|ENC_NA
);
1030 case TYPE_MAXIMUM_MESSAGE_LENGTH
: /* Maximum Message Length (29) */
1031 proto_tree_add_item(sub_msg_element_type_tree
, hf_capwap_msg_element_type_maximum_message_length
, tvb
, offset
+4, 2, ENC_BIG_ENDIAN
);
1034 case TYPE_RADIO_ADMINISTRATIVE_STATE
: /* Radio Administrative State (31) */
1035 proto_tree_add_item(sub_msg_element_type_tree
, hf_capwap_msg_element_type_radio_admin_id
, tvb
, offset
+4, 1, ENC_BIG_ENDIAN
);
1036 proto_tree_add_item(sub_msg_element_type_tree
, hf_capwap_msg_element_type_radio_admin_state
, tvb
, offset
+5, 1, ENC_BIG_ENDIAN
);
1040 case TYPE_RADIO_OPERATIONAL_STATE
: /* Radio Operational State (32) */
1041 proto_tree_add_item(sub_msg_element_type_tree
, hf_capwap_msg_element_type_radio_op_state_radio_id
, tvb
, offset
+4, 1, ENC_BIG_ENDIAN
);
1042 proto_tree_add_item(sub_msg_element_type_tree
, hf_capwap_msg_element_type_radio_op_state_radio_state
, tvb
, offset
+5, 1, ENC_BIG_ENDIAN
);
1043 proto_tree_add_item(sub_msg_element_type_tree
, hf_capwap_msg_element_type_radio_op_state_radio_cause
, tvb
, offset
+6, 1, ENC_BIG_ENDIAN
);
1046 case TYPE_RESULT_CODE
: /* Result Code (33) */
1047 proto_tree_add_item(sub_msg_element_type_tree
, hf_capwap_msg_element_type_result_code
, tvb
, offset
+4, optlen
, ENC_BIG_ENDIAN
);
1051 case TYPE_SESSION_ID
: /* Session ID (35) */
1052 proto_tree_add_item(sub_msg_element_type_tree
, hf_capwap_msg_element_type_session_id
, tvb
, offset
+4, optlen
, ENC_NA
);
1055 case TYPE_STATISTICS_TIMER
: /* Statistics Timer (36) */
1056 proto_tree_add_item(sub_msg_element_type_tree
, hf_capwap_msg_element_type_statistics_timer
, tvb
, offset
+4, 2, ENC_BIG_ENDIAN
);
1059 case TYPE_VENDOR_SPECIFIC_PAYLOAD
: /* Vendor Specific Payload (37) */
1060 proto_tree_add_item(sub_msg_element_type_tree
, hf_capwap_msg_element_type_vsp_vendor_identifier
, tvb
, offset
+4, 4, ENC_BIG_ENDIAN
);
1061 proto_tree_add_item(sub_msg_element_type_tree
, hf_capwap_msg_element_type_vsp_vendor_element_id
, tvb
, offset
+8, 2, ENC_BIG_ENDIAN
);
1062 proto_tree_add_item(sub_msg_element_type_tree
, hf_capwap_msg_element_type_vsp_vendor_data
, tvb
, offset
+10, optlen
-6, ENC_NA
);
1065 case TYPE_WTP_BOARD_DATA
: /* WTP Board Data (38) */
1066 proto_tree_add_item(sub_msg_element_type_tree
, hf_capwap_msg_element_type_wtp_board_data_vendor
, tvb
, offset
+4, 4, ENC_BIG_ENDIAN
);
1068 offset_end
= offset
+ optlen
-4;
1069 while (offset
< offset_end
) {
1070 offset
+= dissect_capwap_board_data(tvb
, sub_msg_element_type_tree
, offset
);
1074 case TYPE_WTP_DESCRIPTOR
: /* WTP Descriptor (39) */
1075 proto_tree_add_item(sub_msg_element_type_tree
, hf_capwap_msg_element_type_wtp_descriptor_max_radios
, tvb
, offset
+4, 1, ENC_BIG_ENDIAN
);
1076 proto_tree_add_item(sub_msg_element_type_tree
, hf_capwap_msg_element_type_wtp_descriptor_radio_in_use
, tvb
, offset
+5, 1, ENC_BIG_ENDIAN
);
1077 if (global_capwap_draft_8_cisco
== 0)
1079 number_encrypt
= tvb_get_guint8(tvb
,offset
+6);
1080 msg_element_type_item_flag
= proto_tree_add_item(sub_msg_element_type_tree
, hf_capwap_msg_element_type_wtp_descriptor_number_encrypt
, tvb
, offset
+6, 1, ENC_BIG_ENDIAN
);
1081 sub_msg_element_type_flag_tree
= proto_item_add_subtree(msg_element_type_item_flag
, ett_capwap
);
1082 for (i
=0; i
< number_encrypt
; i
++) {
1083 dissect_capwap_encryption_capabilities(tvb
, sub_msg_element_type_flag_tree
, offset
+4+3+i
*3);
1085 offset_end
= offset
+ optlen
-4;
1086 offset
+= 4 + 3 + number_encrypt
* 3;
1090 /*in Draft 8, there is only one "encryption_capabilities*/
1091 proto_tree_add_item(sub_msg_element_type_tree
, hf_capwap_msg_element_type_wtp_descriptor_encrypt_capabilities
, tvb
, offset
+6, 2, ENC_BIG_ENDIAN
);
1092 offset_end
= offset
+ optlen
-4;
1095 while (offset
< offset_end
) {
1096 offset
+= dissect_capwap_wtp_descriptor(tvb
, sub_msg_element_type_tree
, offset
);
1100 case TYPE_WTP_FALLBACK
: /* WTP Fallback (40) */
1101 proto_tree_add_item(sub_msg_element_type_tree
, hf_capwap_msg_element_type_wtp_fallback
, tvb
, offset
+4, 1, ENC_BIG_ENDIAN
);
1104 case TYPE_WTP_FRAME_TUNNEL_MODE
: /* WTP Frame Tunnel Mode (41) */
1105 msg_element_type_item_flag
= proto_tree_add_item(sub_msg_element_type_tree
, hf_capwap_msg_element_type_wtp_frame_tunnel_mode
, tvb
, offset
+4, 1, ENC_NA
);
1106 sub_msg_element_type_flag_tree
= proto_item_add_subtree(msg_element_type_item_flag
, ett_capwap
);
1108 proto_tree_add_item(sub_msg_element_type_flag_tree
, hf_capwap_msg_element_type_wtp_frame_tunnel_mode_n
, tvb
, offset
+4, 1, ENC_BIG_ENDIAN
);
1109 proto_tree_add_item(sub_msg_element_type_flag_tree
, hf_capwap_msg_element_type_wtp_frame_tunnel_mode_e
, tvb
, offset
+4, 1, ENC_BIG_ENDIAN
);
1110 proto_tree_add_item(sub_msg_element_type_flag_tree
, hf_capwap_msg_element_type_wtp_frame_tunnel_mode_l
, tvb
, offset
+4, 1, ENC_BIG_ENDIAN
);
1111 proto_tree_add_item(sub_msg_element_type_flag_tree
, hf_capwap_msg_element_type_wtp_frame_tunnel_mode_r
, tvb
, offset
+4, 1, ENC_BIG_ENDIAN
);
1114 case TYPE_WTP_MAC_TYPE
: /* WTP MAC Type (44) */
1115 proto_tree_add_item(sub_msg_element_type_tree
, hf_capwap_msg_element_type_wtp_mac_type
, tvb
, offset
+4, optlen
, ENC_BIG_ENDIAN
);
1118 case TYPE_WTP_NAME
: /* WTP Name (45) */
1119 proto_tree_add_item(sub_msg_element_type_tree
, hf_capwap_msg_element_type_wtp_name
, tvb
, offset
+4, optlen
, ENC_ASCII
|ENC_NA
);
1122 case TYPE_WTP_REBOOT_STATISTICS
: /* WTP Reboot Statistics (48) */
1123 proto_tree_add_item(sub_msg_element_type_tree
, hf_capwap_msg_element_type_wtp_reboot_statistics_reboot_count
, tvb
, offset
+4, 2, ENC_BIG_ENDIAN
);
1124 proto_tree_add_item(sub_msg_element_type_tree
, hf_capwap_msg_element_type_wtp_reboot_statistics_ac_initiated_count
, tvb
, offset
+6, 2, ENC_BIG_ENDIAN
);
1125 proto_tree_add_item(sub_msg_element_type_tree
, hf_capwap_msg_element_type_wtp_reboot_statistics_link_failure_count
, tvb
, offset
+8, 2, ENC_BIG_ENDIAN
);
1126 proto_tree_add_item(sub_msg_element_type_tree
, hf_capwap_msg_element_type_wtp_reboot_statistics_sw_failure_count
, tvb
, offset
+10, 2, ENC_BIG_ENDIAN
);
1127 proto_tree_add_item(sub_msg_element_type_tree
, hf_capwap_msg_element_type_wtp_reboot_statistics_hw_failure_count
, tvb
, offset
+12, 2, ENC_BIG_ENDIAN
);
1128 proto_tree_add_item(sub_msg_element_type_tree
, hf_capwap_msg_element_type_wtp_reboot_statistics_other_failure_count
, tvb
, offset
+14, 2, ENC_BIG_ENDIAN
);
1129 proto_tree_add_item(sub_msg_element_type_tree
, hf_capwap_msg_element_type_wtp_reboot_statistics_unknown_failure_count
, tvb
, offset
+16, 2, ENC_BIG_ENDIAN
);
1130 proto_tree_add_item(sub_msg_element_type_tree
, hf_capwap_msg_element_type_wtp_reboot_statistics_last_failure_type
, tvb
, offset
+18, 1, ENC_BIG_ENDIAN
);
1133 case IEEE80211_RATE_SET
: /* ieee80211 Rate Set (1034) */
1134 proto_tree_add_item(sub_msg_element_type_tree
, hf_capwap_msg_element_type_ieee80211_rate_set_radio_id
, tvb
, offset
+4, 1, ENC_BIG_ENDIAN
);
1135 proto_tree_add_item(sub_msg_element_type_tree
, hf_capwap_msg_element_type_ieee80211_rate_set_rate_set
, tvb
, offset
+5, optlen
-1, ENC_NA
);
1138 case IEEE80211_STATION_SESSION_KEY
: /* ieee80211 Station Session Key (1038) */
1139 proto_tree_add_item(sub_msg_element_type_tree
, hf_capwap_msg_element_type_ieee80211_station_session_key_mac
, tvb
, offset
+4, 6, ENC_NA
);
1140 proto_tree_add_item(sub_msg_element_type_tree
, hf_capwap_msg_element_type_ieee80211_station_session_key_flags
, tvb
, offset
+10, 2, ENC_BIG_ENDIAN
);
1141 proto_tree_add_item(sub_msg_element_type_tree
, hf_capwap_msg_element_type_ieee80211_station_session_key_flags_a
, tvb
, offset
+10, 2, ENC_BIG_ENDIAN
);
1142 proto_tree_add_item(sub_msg_element_type_tree
, hf_capwap_msg_element_type_ieee80211_station_session_key_flags_c
, tvb
, offset
+10, 2, ENC_BIG_ENDIAN
);
1143 proto_tree_add_item(sub_msg_element_type_tree
, hf_capwap_msg_element_type_ieee80211_station_session_key_pairwire_tsc
, tvb
, offset
+12, 6, ENC_NA
);
1144 proto_tree_add_item(sub_msg_element_type_tree
, hf_capwap_msg_element_type_ieee80211_station_session_key_pairwire_rsc
, tvb
, offset
+18, 6, ENC_NA
);
1145 proto_tree_add_item(sub_msg_element_type_tree
, hf_capwap_msg_element_type_ieee80211_station_session_key_key
, tvb
, offset
+24, optlen
-24, ENC_NA
);
1148 case IEEE80211_WTP_RADIO_INFORMATION
: /* ieee80211 WTP Radio Information (1048) */
1149 proto_tree_add_item(sub_msg_element_type_tree
, hf_capwap_msg_element_type_ieee80211_wtp_radio_info_radio_id
, tvb
, offset
+4, 1, ENC_BIG_ENDIAN
);
1150 proto_tree_add_item(sub_msg_element_type_tree
, hf_capwap_msg_element_type_ieee80211_wtp_radio_info_radio_type_reserved
, tvb
, offset
+5, 3, ENC_NA
);
1151 proto_tree_add_item(sub_msg_element_type_tree
, hf_capwap_msg_element_type_ieee80211_wtp_radio_info_radio_type_n
, tvb
, offset
+8, 1, ENC_BIG_ENDIAN
);
1152 proto_tree_add_item(sub_msg_element_type_tree
, hf_capwap_msg_element_type_ieee80211_wtp_radio_info_radio_type_g
, tvb
, offset
+8, 1, ENC_BIG_ENDIAN
);
1153 proto_tree_add_item(sub_msg_element_type_tree
, hf_capwap_msg_element_type_ieee80211_wtp_radio_info_radio_type_a
, tvb
, offset
+8, 1, ENC_BIG_ENDIAN
);
1154 proto_tree_add_item(sub_msg_element_type_tree
, hf_capwap_msg_element_type_ieee80211_wtp_radio_info_radio_type_b
, tvb
, offset
+8, 1, ENC_BIG_ENDIAN
);
1158 /* No Default Action */
1165 /* Returns the number of bytes consumed by this option. */
1167 dissect_capwap_message_element(tvbuff_t
*tvb
, proto_tree
*capwap_control_tree
, guint offset
)
1169 guint plen
= 0, offset_end
;
1171 proto_tree
*capwap_message_element_tree
;
1173 ti
= proto_tree_add_item(capwap_control_tree
, hf_capwap_message_element
, tvb
, offset
, tvb_reported_length(tvb
) - offset
, ENC_NA
);
1174 capwap_message_element_tree
= proto_item_add_subtree(ti
, ett_capwap
);
1176 offset_end
= tvb_reported_length(tvb
);
1178 while (offset
+plen
< offset_end
) {
1179 plen
+= dissect_capwap_message_element_type(tvb
, capwap_message_element_tree
, offset
+plen
);
1185 /* Returns the number of bytes consumed by this option. */
1187 dissect_capwap_data_keep_alive(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*capwap_data_tree
, guint offset
)
1190 guint plen
= 0, offset_end
;
1192 proto_tree
*capwap_data_keep_alive_tree
;
1194 ti
= proto_tree_add_item(capwap_data_tree
, hf_capwap_data_keep_alive
, tvb
, offset
, tvb_reported_length(tvb
), ENC_NA
);
1195 capwap_data_keep_alive_tree
= proto_item_add_subtree(ti
, ett_capwap
);
1197 ti
= proto_tree_add_item(capwap_data_keep_alive_tree
, hf_capwap_data_keep_alive_length
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1198 len
= tvb_get_ntohs(tvb
, offset
);
1199 if (len
!= tvb_reported_length(tvb
))
1200 expert_add_info(pinfo
, ti
, &ei_capwap_data_keep_alive_length
);
1204 offset_end
= tvb_reported_length(tvb
);
1206 while (offset
+plen
< offset_end
) {
1207 plen
+= dissect_capwap_message_element_type(tvb
, capwap_data_keep_alive_tree
, offset
+plen
);
1213 /* Returns the number of bytes consumed by this option. */
1215 dissect_capwap_control_header(tvbuff_t
*tvb
, proto_tree
*capwap_control_tree
, guint offset
, packet_info
*pinfo
)
1218 proto_item
*ti
, *ti_flag
;
1219 proto_tree
*capwap_control_header_tree
;
1220 proto_tree
*capwap_control_msg_type_tree
;
1222 ti
= proto_tree_add_item(capwap_control_tree
, hf_capwap_control_header
, tvb
, offset
, 8, ENC_NA
);
1223 capwap_control_header_tree
= proto_item_add_subtree(ti
, ett_capwap
);
1225 /* Message Type 32 bits */
1226 ti_flag
= proto_tree_add_item(capwap_control_header_tree
, hf_capwap_control_header_msg_type
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
1227 capwap_control_msg_type_tree
= proto_item_add_subtree(ti_flag
, ett_capwap
);
1229 proto_tree_add_item(capwap_control_msg_type_tree
, hf_capwap_control_header_msg_type_enterprise_nbr
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
1230 proto_tree_add_item(capwap_control_msg_type_tree
, hf_capwap_control_header_msg_type_enterprise_specific
, tvb
, offset
+3, 1, ENC_BIG_ENDIAN
);
1232 col_append_fstr(pinfo
->cinfo
, COL_INFO
, " - %s",val_to_str(tvb_get_guint8(tvb
, offset
+3),message_type
,"Unknown Message Type (0x%02x)"));
1235 /* Sequence 8 bits */
1236 proto_tree_add_item(capwap_control_header_tree
, hf_capwap_control_header_seq_number
, tvb
, offset
+plen
, 1, ENC_BIG_ENDIAN
);
1239 /* Message Element Length 16 bits */
1240 proto_tree_add_item(capwap_control_header_tree
, hf_capwap_control_header_msg_element_length
, tvb
, offset
+plen
, 2, ENC_BIG_ENDIAN
);
1243 proto_tree_add_item(capwap_control_header_tree
, hf_capwap_control_header_flags
, tvb
, offset
+plen
, 1, ENC_BIG_ENDIAN
);
1248 /* Returns the number of bytes consumed by this option. */
1250 dissect_capwap_header(tvbuff_t
*tvb
, proto_tree
*capwap_control_tree
, guint offset
, packet_info
*pinfo
, guint8
*payload_type
, guint8
*payload_wbid
, gboolean
*fragment_is
, gboolean
*fragment_more
, guint32
*fragment_id
, guint32
*fragment_offset
)
1252 guint plen
= 0, hlen
= 0;
1253 proto_item
*ti
, *ti_flag
, *ti_len
;
1254 proto_tree
*capwap_header_tree
;
1255 proto_tree
*capwap_header_flags_tree
;
1257 guint8 maclength
, wirelesslength
;
1260 /* RFC 5415 HLEN: A 5-bit field containing the length of the CAPWAP transport header in 4-byte words */
1261 /* As we display the preamble separately reduce the length by 1 */
1262 hlen
= tvb_get_bits8(tvb
, (offset
+plen
)*8, 5)*4-1;
1263 ti
= proto_tree_add_item(capwap_control_tree
, hf_capwap_header
, tvb
, offset
+plen
, hlen
, ENC_NA
);
1264 capwap_header_tree
= proto_item_add_subtree(ti
, ett_capwap
);
1266 /* Header Length : 5 Bits */
1267 ti_len
= proto_tree_add_item(capwap_header_tree
, hf_capwap_header_hlen
, tvb
, offset
+plen
, 1, ENC_BIG_ENDIAN
);
1268 proto_item_append_text(ti_len
, " (%d)",hlen
+1);
1269 /* Radio ID : 5 Bits */
1270 proto_tree_add_item(capwap_header_tree
, hf_capwap_header_rid
, tvb
, offset
+plen
, 3, ENC_BIG_ENDIAN
);
1272 /* Wireless Binding ID : 5 Bits */
1273 proto_tree_add_item(capwap_header_tree
, hf_capwap_header_wbid
, tvb
, offset
+plen
, 3, ENC_BIG_ENDIAN
);
1275 /* WBid of Payload (for CAPWAP Data Packet) */
1276 *payload_wbid
= tvb_get_bits8(tvb
, (offset
+plen
)*8+10, 5);
1278 /* Flags : 9 Bits */
1279 flags
= tvb_get_bits16(tvb
, (offset
+plen
)*8+15, 9, ENC_BIG_ENDIAN
);
1280 ti_flag
= proto_tree_add_item(capwap_header_tree
, hf_capwap_header_flags
, tvb
, offset
+plen
, 3, ENC_BIG_ENDIAN
);
1281 capwap_header_flags_tree
= proto_item_add_subtree(ti_flag
, ett_capwap
);
1283 proto_tree_add_item(capwap_header_flags_tree
, hf_capwap_header_flags_t
, tvb
, offset
+plen
, 3, ENC_BIG_ENDIAN
);
1284 proto_tree_add_item(capwap_header_flags_tree
, hf_capwap_header_flags_f
, tvb
, offset
+plen
, 3, ENC_BIG_ENDIAN
);
1285 proto_tree_add_item(capwap_header_flags_tree
, hf_capwap_header_flags_l
, tvb
, offset
+plen
, 3, ENC_BIG_ENDIAN
);
1286 proto_tree_add_item(capwap_header_flags_tree
, hf_capwap_header_flags_w
, tvb
, offset
+plen
, 3, ENC_BIG_ENDIAN
);
1287 proto_tree_add_item(capwap_header_flags_tree
, hf_capwap_header_flags_m
, tvb
, offset
+plen
, 3, ENC_BIG_ENDIAN
);
1288 proto_tree_add_item(capwap_header_flags_tree
, hf_capwap_header_flags_k
, tvb
, offset
+plen
, 3, ENC_BIG_ENDIAN
);
1289 proto_tree_add_item(capwap_header_flags_tree
, hf_capwap_header_flags_r
, tvb
, offset
+plen
, 3, ENC_BIG_ENDIAN
);
1292 *fragment_is
= ((flags
& 0x80) == 0x80) ? TRUE
: FALSE
;
1293 *fragment_more
= ((flags
&0x40) == 0x40) ? FALSE
: TRUE
;
1295 /* Type of Payload (for CAPWAP Data Packet), use 0xff for Keep-Alive */
1296 if (flags
&0x08 /* data channel Keep-Alive packet */) {
1297 col_append_str(pinfo
->cinfo
, COL_INFO
, " Keep-Alive");
1298 *payload_type
= 0xff;
1300 *payload_type
= tvb_get_bits8(tvb
, (offset
+plen
)*8+15,1);
1304 /* Fragment ID : 16 Bits */
1305 proto_tree_add_item(capwap_header_tree
, hf_capwap_header_fragment_id
, tvb
, offset
+plen
, 2, ENC_BIG_ENDIAN
);
1306 *fragment_id
= (guint32
)tvb_get_ntohs(tvb
, offset
+plen
);
1309 /* Fragment offset : 13 Bits */
1310 proto_tree_add_item(capwap_header_tree
, hf_capwap_header_fragment_offset
, tvb
, offset
+plen
, 2, ENC_BIG_ENDIAN
);
1311 *fragment_offset
= 8 * (guint32
)tvb_get_bits16(tvb
, (offset
+plen
)*8, 13, ENC_BIG_ENDIAN
);
1313 /* Reserved 3 Bits */
1314 proto_tree_add_item(capwap_header_tree
, hf_capwap_header_reserved
, tvb
, offset
+plen
+1, 1, ENC_BIG_ENDIAN
);
1316 /* Optionnal Headers */
1317 if (flags
& 0x10 /* Radio MAC address */) {
1318 maclength
=tvb_get_guint8(tvb
, offset
+plen
);
1319 proto_tree_add_item(capwap_header_tree
, hf_capwap_header_mac_length
, tvb
, offset
+plen
, 1, ENC_BIG_ENDIAN
);
1321 if (maclength
== 6) {
1322 proto_tree_add_item(capwap_header_tree
, hf_capwap_header_mac_eui48
, tvb
, offset
+plen
, maclength
, ENC_NA
);
1324 } else if (maclength
== 8) {
1325 proto_tree_add_item(capwap_header_tree
, hf_capwap_header_mac_eui64
, tvb
, offset
+plen
, maclength
, ENC_BIG_ENDIAN
);
1327 proto_tree_add_item(capwap_header_tree
, hf_capwap_header_mac_data
, tvb
, offset
+plen
, maclength
, ENC_NA
);
1330 /* 4 Bytes Alignment ? */
1331 align
= 4-((offset
+plen
)%4);
1334 proto_tree_add_item(capwap_header_tree
, hf_capwap_header_padding
, tvb
, offset
+plen
, align
, ENC_NA
);
1338 if (flags
& 0x20 /* Wireless specific information */) {
1339 wirelesslength
=tvb_get_guint8(tvb
, offset
+plen
);
1341 /* in Draft 8, the WBid is add in Wireless Specific Information*/
1342 if (global_capwap_draft_8_cisco
== 1)
1347 proto_tree_add_item(capwap_header_tree
, hf_capwap_header_wireless_length
, tvb
, offset
+plen
, 1, ENC_BIG_ENDIAN
);
1349 proto_tree_add_item(capwap_header_tree
, hf_capwap_header_wireless_data
, tvb
, offset
+plen
, wirelesslength
, ENC_NA
);
1351 /* Optional Wireless Specific Information for ieee80211 (wbid = 1) Section 4 of RFC5416 */
1352 if (*payload_wbid
== 1)
1354 dissect_capwap_data_message_bindings_ieee80211(tvb
, capwap_header_tree
, offset
+plen
, pinfo
);
1357 plen
+= wirelesslength
;
1358 /* 4 Bytes Alignment ? */
1359 align
= 4-((offset
+plen
)%4);
1362 proto_tree_add_item(capwap_header_tree
, hf_capwap_header_padding
, tvb
, offset
+plen
, align
, ENC_NA
);
1366 if ((plen
!= hlen
) && global_capwap_draft_8_cisco
== 0)
1368 expert_add_info_format(pinfo
, ti_len
, &ei_capwap_header_length_bad
, "Wrong calculate length (%d) =! header length (%d) ! (May be try to use Cisco Wireless Controller Support Preference ?)", plen
, hlen
);
1373 /* Returns the number of bytes consumed by this option. */
1375 dissect_capwap_preamble(tvbuff_t
*tvb
, proto_tree
*capwap_control_tree
, guint offset
, guint8
*type_header
)
1379 proto_tree
*capwap_preamble_tree
;
1381 ti
= proto_tree_add_item(capwap_control_tree
, hf_capwap_preamble
, tvb
, offset
+plen
, -1, ENC_NA
);
1382 capwap_preamble_tree
= proto_item_add_subtree(ti
, ett_capwap
);
1384 proto_tree_add_item(capwap_preamble_tree
, hf_capwap_preamble_version
, tvb
, offset
+plen
, 1, ENC_NA
);
1385 proto_tree_add_item(capwap_preamble_tree
, hf_capwap_preamble_type
, tvb
, offset
+plen
, 1, ENC_NA
);
1386 *type_header
= tvb_get_guint8(tvb
, offset
+plen
) & 0x0F;
1389 if (*type_header
== 1) {
1390 proto_tree_add_item(capwap_preamble_tree
, hf_capwap_preamble_reserved
, tvb
, offset
+plen
, 3, ENC_BIG_ENDIAN
);
1393 proto_item_set_len(ti
, plen
);
1397 /* Code to actually dissect the packets */
1399 dissect_capwap_control(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void *data _U_
)
1401 /* Set up structures needed to add the protocol subtree and manage it */
1403 proto_tree
*capwap_control_tree
;
1405 tvbuff_t
*next_tvb
= NULL
;
1407 guint8 payload_type
;
1408 guint8 payload_wbid
;
1409 gboolean fragment_is
;
1410 gboolean fragment_more
;
1411 guint32 fragment_id
;
1412 guint32 fragment_offset
;
1413 fragment_head
*frag_msg
= NULL
;
1414 gboolean save_fragmented
;
1416 /* Make entries in Protocol column and Info column on summary display */
1417 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "CAPWAP");
1418 col_set_str(pinfo
->cinfo
, COL_INFO
, "CAPWAP-Control");
1420 ti
= proto_tree_add_item(tree
, proto_capwap
, tvb
, 0, -1, ENC_NA
);
1421 capwap_control_tree
= proto_item_add_subtree(ti
, ett_capwap
);
1423 /* CAPWAP Preamble */
1424 offset
+= dissect_capwap_preamble(tvb
, capwap_control_tree
, offset
, &type_header
);
1426 if (type_header
== 1) {
1427 next_tvb
= tvb_new_subset_remaining (tvb
, offset
);
1428 call_dissector(dtls_handle
, next_tvb
, pinfo
, tree
);
1433 offset
+= dissect_capwap_header(tvb
, capwap_control_tree
, offset
, pinfo
, &payload_type
, &payload_wbid
, &fragment_is
, &fragment_more
, &fragment_id
, &fragment_offset
);
1435 /* CAPWAP Reassemble */
1436 save_fragmented
= pinfo
->fragmented
;
1438 if (global_capwap_reassemble
&& fragment_is
)
1440 const int len_rem
= tvb_length_remaining(tvb
, offset
);
1444 pinfo
->fragmented
= TRUE
;
1446 frag_msg
= fragment_add_check(&capwap_reassembly_table
,
1447 tvb
, offset
, pinfo
, fragment_id
, NULL
,
1452 next_tvb
= process_reassembled_data(tvb
, offset
, pinfo
,
1453 "Reassembled CAPWAP", frag_msg
,
1454 &capwap_frag_items
, NULL
, tree
);
1456 if (next_tvb
== NULL
)
1457 { /* make a new subset */
1458 next_tvb
= tvb_new_subset_remaining(tvb
, offset
);
1459 call_dissector(data_handle
, next_tvb
, pinfo
, tree
);
1460 col_append_fstr(pinfo
->cinfo
, COL_INFO
, " (Fragment ID: %u, Fragment Offset: %u)", fragment_id
, fragment_offset
);
1464 /* CAPWAP Control Header */
1465 offset
= dissect_capwap_control_header(next_tvb
, capwap_control_tree
, 0, pinfo
);
1467 /* CAPWAP Message Element */
1468 offset
+= dissect_capwap_message_element(next_tvb
, capwap_control_tree
, offset
);
1469 col_append_fstr(pinfo
->cinfo
, COL_INFO
, " (Reassembled, Fragment ID: %u)", fragment_id
);
1474 /* CAPWAP Control Header */
1475 offset
+= dissect_capwap_control_header(tvb
, capwap_control_tree
, offset
, pinfo
);
1477 /* CAPWAP Message Element */
1478 offset
+= dissect_capwap_message_element(tvb
, capwap_control_tree
, offset
);
1480 pinfo
->fragmented
= save_fragmented
;
1484 /* Code to actually dissect the packets */
1486 dissect_capwap_data(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
)
1488 /* Set up structures needed to add the protocol subtree and manage it */
1490 proto_tree
*capwap_data_tree
;
1494 guint8 payload_type
;
1495 guint8 payload_wbid
;
1496 gboolean fragment_is
;
1497 gboolean fragment_more
;
1498 guint32 fragment_id
;
1499 guint32 fragment_offset
;
1500 fragment_head
*frag_msg
= NULL
;
1501 gboolean save_fragmented
;
1503 /* Make entries in Protocol column and Info column on summary display */
1504 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "CAPWAP");
1505 col_set_str(pinfo
->cinfo
, COL_INFO
, "CAPWAP-Data");
1507 ti
= proto_tree_add_item(tree
, proto_capwap
, tvb
, 0, -1, ENC_NA
);
1508 capwap_data_tree
= proto_item_add_subtree(ti
, ett_capwap
);
1510 /* CAPWAP Preamble */
1511 offset
+= dissect_capwap_preamble(tvb
, capwap_data_tree
, offset
, &type_header
);
1513 if (type_header
== 1) {
1514 next_tvb
= tvb_new_subset_remaining (tvb
, offset
);
1515 call_dissector(dtls_handle
, next_tvb
, pinfo
, tree
);
1520 offset
+= dissect_capwap_header(tvb
, capwap_data_tree
, offset
, pinfo
, &payload_type
, &payload_wbid
, &fragment_is
, &fragment_more
, &fragment_id
, &fragment_offset
);
1522 /* CAPWAP Reassemble */
1523 save_fragmented
= pinfo
->fragmented
;
1525 if (global_capwap_reassemble
&& fragment_is
)
1527 gint len_rem
= tvb_length_remaining(tvb
, offset
);
1531 pinfo
->fragmented
= TRUE
;
1533 frag_msg
= fragment_add_check(&capwap_reassembly_table
,
1534 tvb
, offset
, pinfo
, fragment_id
, NULL
,
1539 next_tvb
= process_reassembled_data(tvb
, offset
, pinfo
,
1540 "Reassembled CAPWAP", frag_msg
,
1541 &capwap_frag_items
, NULL
, tree
);
1543 if (next_tvb
== NULL
)
1544 { /* make a new subset */
1545 next_tvb
= tvb_new_subset_remaining(tvb
, offset
);
1546 call_dissector(data_handle
,next_tvb
, pinfo
, tree
);
1547 col_append_fstr(pinfo
->cinfo
, COL_INFO
, " (Fragment ID: %u, Fragment Offset: %u)", fragment_id
, fragment_offset
);
1551 col_append_fstr(pinfo
->cinfo
, COL_INFO
, " (Reassembled, Fragment ID: %u)", fragment_id
);
1556 next_tvb
= tvb_new_subset_remaining (tvb
, offset
);
1559 /* CAPWAP Data Payload */
1560 if (payload_type
== 0) {
1561 /* IEEE 802.3 Frame */
1562 call_dissector(ieee8023_handle
, next_tvb
, pinfo
, tree
);
1564 else if (payload_type
== 0xff) {
1565 /* CAPWAP Keep-Alive Payload */
1566 dissect_capwap_data_keep_alive(next_tvb
, pinfo
, capwap_data_tree
, 0);
1570 switch (payload_wbid
) {
1571 case 0: /* Reserved - Cisco seems to use this instead of 1 */
1572 /* It seems that just calling ieee80211_handle is not
1573 * quite enough to get this right, so call data_handle
1576 call_dissector(data_handle
, next_tvb
, pinfo
, tree
);
1578 case 1: /* IEEE 802.11 */
1579 call_dissector(global_capwap_swap_frame_control
? ieee80211_bsfc_handle
: ieee80211_handle
, next_tvb
, pinfo
, tree
);
1581 default: /* Unknown Data */
1582 call_dissector(data_handle
, next_tvb
, pinfo
, tree
);
1586 pinfo
->fragmented
= save_fragmented
;
1590 proto_register_capwap_control(void)
1592 module_t
*capwap_module
;
1594 static hf_register_info hf
[] = {
1596 { &hf_capwap_preamble
,
1597 { "Preamble", "capwap.preamble",
1598 FT_NONE
, BASE_NONE
, NULL
, 0x0,
1600 { &hf_capwap_preamble_version
,
1601 { "Version", "capwap.preamble.version",
1602 FT_UINT8
, BASE_DEC
, NULL
, 0xF0,
1603 "Version of CAPWAP", HFILL
}},
1604 { &hf_capwap_preamble_type
,
1605 { "Type", "capwap.preamble.type",
1606 FT_UINT8
, BASE_DEC
, VALS(type_header_vals
), 0x0F,
1607 "Type of Payload", HFILL
}},
1608 { &hf_capwap_preamble_reserved
,
1609 { "Reserved", "capwap.preamble.reserved",
1610 FT_UINT24
, BASE_DEC
, NULL
, 0x0,
1613 { &hf_capwap_header
,
1614 { "Header", "capwap.header",
1615 FT_NONE
, BASE_NONE
, NULL
, 0x0,
1617 { &hf_capwap_header_hlen
,
1618 { "Header Length", "capwap.header.length",
1619 FT_UINT24
, BASE_DEC
, NULL
, 0xF80000,
1620 "Length of the CAPWAP transport header in 4-byte words (similar to IP header length)", HFILL
}},
1621 { &hf_capwap_header_rid
,
1622 { "Radio ID", "capwap.header.rid",
1623 FT_UINT24
, BASE_DEC
, NULL
, 0x07C000,
1625 { &hf_capwap_header_wbid
,
1626 { "Wireless Binding ID", "capwap.header.wbid",
1627 FT_UINT24
, BASE_DEC
, VALS(type_wbid
), 0x003E00,
1629 { &hf_capwap_header_flags
,
1630 { "Header Flags", "capwap.header.flags",
1631 FT_UINT24
, BASE_HEX
, NULL
, 0x0001FF,
1633 { &hf_capwap_header_flags_t
,
1634 { "Payload Type", "capwap.header.flags.t",
1635 FT_BOOLEAN
, 24, TFS(&flag_type_t
), 0x0000100,
1637 { &hf_capwap_header_flags_f
,
1638 { "Fragment", "capwap.header.flags.f",
1639 FT_BOOLEAN
, 24, TFS(&flag_type_f
), 0x000080,
1641 { &hf_capwap_header_flags_l
,
1642 { "Last Fragment", "capwap.header.flags.l",
1643 FT_BOOLEAN
, 24, TFS(&flag_type_l
), 0x000040,
1645 { &hf_capwap_header_flags_w
,
1646 { "Wireless header", "capwap.header.flags.w",
1647 FT_BOOLEAN
, 24, TFS(&flag_type_w
), 0x000020,
1649 { &hf_capwap_header_flags_m
,
1650 { "Radio MAC header", "capwap.header.flags.m",
1651 FT_BOOLEAN
, 24, TFS(&flag_type_m
), 0x000010,
1653 { &hf_capwap_header_flags_k
,
1654 { "Keep-Alive", "capwap.header.flags.k",
1655 FT_BOOLEAN
, 24, TFS(&flag_type_k
), 0x000008,
1657 { &hf_capwap_header_flags_r
,
1658 { "Reserved", "capwap.header.flags.r",
1659 FT_BOOLEAN
, 24, TFS(&tfs_set_notset
), 0x000007,
1661 { &hf_capwap_header_fragment_id
,
1662 { "Fragment ID", "capwap.header.fragment.id",
1663 FT_UINT16
, BASE_DEC
, NULL
, 0x00,
1665 { &hf_capwap_header_fragment_offset
,
1666 { "Fragment Offset", "capwap.header.fragment.offset",
1667 FT_UINT16
, BASE_DEC
, NULL
, 0xFFF8,
1669 { &hf_capwap_header_reserved
,
1670 { "Reserved", "capwap.header.fragment.reserved",
1671 FT_UINT16
, BASE_DEC
, NULL
, 0x0007,
1673 { &hf_capwap_header_mac_length
,
1674 { "MAC length", "capwap.header.mac.length",
1675 FT_UINT8
, BASE_DEC
, NULL
, 0x00,
1677 { &hf_capwap_header_mac_eui48
,
1678 { "MAC address", "capwap.header.mac.eui48",
1679 FT_ETHER
, BASE_NONE
, NULL
, 0x00,
1681 { &hf_capwap_header_mac_eui64
,
1682 { "MAC address", "capwap.header.mac.eui64",
1683 FT_EUI64
, BASE_NONE
, NULL
, 0x00,
1685 { &hf_capwap_header_mac_data
,
1686 { "MAC address", "capwap.header.mac.data",
1687 FT_BYTES
, BASE_NONE
, NULL
, 0x00,
1689 { &hf_capwap_header_wireless_length
,
1690 { "Wireless length", "capwap.header.wireless.length",
1691 FT_UINT8
, BASE_DEC
, NULL
, 0x00,
1693 { &hf_capwap_header_wireless_data
,
1694 { "Wireless data", "capwap.header.wireless.data",
1695 FT_BYTES
, BASE_NONE
, NULL
, 0x00,
1697 { &hf_capwap_header_wireless_data_ieee80211_fi
,
1698 { "Wireless data ieee80211 Frame Info", "capwap.header.wireless.data.ieee80211.fi",
1699 FT_BYTES
, BASE_NONE
, NULL
, 0x00,
1701 { &hf_capwap_header_wireless_data_ieee80211_fi_rssi
,
1702 { "Wireless data ieee80211 RSSI (dBm)", "capwap.header.wireless.data.ieee80211.fi.rssi",
1703 FT_UINT8
, BASE_DEC
, NULL
, 0x00,
1705 { &hf_capwap_header_wireless_data_ieee80211_fi_snr
,
1706 { "Wireless data ieee80211 SNR (dB)", "capwap.header.wireless.data.ieee80211.fi.snr",
1707 FT_UINT8
, BASE_DEC
, NULL
, 0x00,
1709 { &hf_capwap_header_wireless_data_ieee80211_fi_data_rate
,
1710 { "Wireless data ieee80211 Data Rate (Mbps)", "capwap.header.wireless.data.ieee80211.fi.data_rate",
1711 FT_UINT16
, BASE_DEC
, NULL
, 0x00,
1713 { &hf_capwap_header_wireless_data_ieee80211_dest_wlan
,
1714 { "Wireless data ieee80211 Destination WLANs", "capwap.header.wireless.data.ieee80211.dw",
1715 FT_BYTES
, BASE_NONE
, NULL
, 0x00,
1717 { &hf_capwap_header_wireless_data_ieee80211_dw_wlan_id_bitmap
,
1718 { "Wireless data ieee80211 Destination Wlan Id bitmap",
1719 "capwap.header.wireless.data.ieee80211.dw.wlan_id_bitmap",
1720 FT_UINT16
, BASE_DEC
, NULL
, 0x00,
1722 { &hf_capwap_header_wireless_data_ieee80211_dw_reserved
,
1723 { "Wireless data ieee80211 Destination Wlan reserved", "capwap.header.wireless.data.ieee80211.dw.reserved",
1724 FT_UINT16
, BASE_DEC
, NULL
, 0x00,
1726 { &hf_capwap_header_padding
,
1727 { "Padding for 4 Byte Alignement", "capwap.header.padding",
1728 FT_BYTES
, BASE_NONE
, NULL
, 0x00,
1731 /* CAPWAP Control Header Message */
1733 { &hf_capwap_control_header
,
1734 { "Control Header", "capwap.control.header",
1735 FT_NONE
, BASE_NONE
, NULL
, 0x00,
1737 { &hf_capwap_control_header_msg_type
,
1738 { "Message Type", "capwap.control.header.message_type",
1739 FT_UINT32
, BASE_DEC
, NULL
, 0x00,
1741 { &hf_capwap_control_header_msg_type_enterprise_nbr
,
1742 { "Message Type (Enterprise Number)", "capwap.control.header.message_type.enterprise_number",
1743 FT_UINT32
, BASE_DEC
|BASE_EXT_STRING
, &sminmpec_values_ext
, 0x00,
1745 { &hf_capwap_control_header_msg_type_enterprise_specific
,
1746 { "Message Type (Enterprise Specific)", "capwap.control.header.message_type.enterprise_specific",
1747 FT_UINT8
, BASE_DEC
, VALS(message_type
), 0x00,
1749 { &hf_capwap_control_header_seq_number
,
1750 { "Sequence Number", "capwap.control.header.sequence_number",
1751 FT_UINT8
, BASE_DEC
, NULL
, 0x00,
1753 { &hf_capwap_control_header_msg_element_length
,
1754 { "Message Element Length", "capwap.control.header.message_element_length",
1755 FT_UINT16
, BASE_DEC
, NULL
, 0x00,
1757 { &hf_capwap_control_header_flags
,
1758 { "Flags", "capwap.control.header.flags",
1759 FT_UINT8
, BASE_DEC
, NULL
, 0x00,
1762 /* CAPWAP Protocol Message Elements */
1764 { &hf_capwap_message_element
,
1765 { "Message Element", "capwap.message_element",
1766 FT_NONE
, BASE_NONE
, NULL
, 0x00,
1768 { &hf_capwap_msg_element
,
1769 { "Type", "capwap.message_element",
1770 FT_NONE
, BASE_NONE
, NULL
, 0x00,
1773 { &hf_capwap_msg_element_type
,
1774 { "Type", "capwap.message_element.type",
1775 FT_UINT16
, BASE_DEC
, VALS(message_element_type_vals
), 0x00,
1776 "CAPWAP Message Element type", HFILL
}},
1777 { &hf_capwap_msg_element_length
,
1778 { "Length", "capwap.message_element.length",
1779 FT_UINT16
, BASE_DEC
, NULL
, 0x00,
1780 "CAPWAP Message Element length", HFILL
}},
1781 { &hf_capwap_msg_element_value
,
1782 { "Value", "capwap.message_element.value",
1783 FT_BYTES
, BASE_NONE
, NULL
, 0x00,
1784 "CAPWAP Message Element value", HFILL
}},
1786 /* CAPWAP Protocol Message Element Type */
1789 { &hf_capwap_msg_element_type_ac_descriptor_stations
,
1790 { "Stations", "capwap.control.message_element.ac_descriptor.stations",
1791 FT_UINT16
, BASE_DEC
, NULL
, 0x00,
1793 { &hf_capwap_msg_element_type_ac_descriptor_limit
,
1794 { "Limit Stations", "capwap.control.message_element.ac_descriptor.limit",
1795 FT_UINT16
, BASE_DEC
, NULL
, 0x00,
1797 { &hf_capwap_msg_element_type_ac_descriptor_active_wtp
,
1798 { "Active WTPs", "capwap.control.message_element.ac_descriptor.active_wtp",
1799 FT_UINT16
, BASE_DEC
, NULL
, 0x00,
1801 { &hf_capwap_msg_element_type_ac_descriptor_max_wtp
,
1802 { "Max WTPs", "capwap.control.message_element.ac_descriptor.max_wtp",
1803 FT_UINT16
, BASE_DEC
, NULL
, 0x00,
1805 /* AC Descriptor Security Flags... */
1806 { &hf_capwap_msg_element_type_ac_descriptor_security
,
1807 { "Security Flags", "capwap.control.message_element.ac_descriptor.security",
1808 FT_NONE
, BASE_NONE
, NULL
, 0x0,
1810 { &hf_capwap_msg_element_type_ac_descriptor_security_s
,
1811 { "AC supports the pre-shared", "capwap.control.message_element.ac_descriptor.security.s",
1812 FT_BOOLEAN
, 8, TFS(&tfs_true_false
), 0x04,
1814 { &hf_capwap_msg_element_type_ac_descriptor_security_x
,
1815 { "AC supports X.509 Certificate", "capwap.control.message_element.ac_descriptor.security.x",
1816 FT_BOOLEAN
, 8, TFS(&tfs_true_false
), 0x02,
1818 { &hf_capwap_msg_element_type_ac_descriptor_security_r
,
1819 { "Reserved", "capwap.control.message_element.ac_descriptor.security.r",
1820 FT_BOOLEAN
, 8, TFS(&tfs_set_notset
), 0xF9,
1823 { &hf_capwap_msg_element_type_ac_descriptor_rmac_field
,
1824 { "R-MAC Field", "capwap.control.message_element.ac_descriptor.rmac_field",
1825 FT_UINT8
, BASE_DEC
, VALS(rmac_field_vals
), 0x00,
1827 { &hf_capwap_msg_element_type_ac_descriptor_reserved
,
1828 { "Reserved", "capwap.control.message_element.ac_descriptor.reserved",
1829 FT_UINT8
, BASE_DEC
, NULL
, 0x00,
1831 /* AC Descriptor DTLS Policy Flags... */
1832 { &hf_capwap_msg_element_type_ac_descriptor_dtls_policy
,
1833 { "DTLS Policy Flags", "capwap.control.message_element.ac_descriptor.dtls_policy",
1834 FT_NONE
, BASE_NONE
, NULL
, 0x0,
1836 { &hf_capwap_msg_element_type_ac_descriptor_dtls_policy_d
,
1837 { "DTLS-Enabled Data Channel Supported", "capwap.control.message_element.ac_descriptor.dtls_policy.d",
1838 FT_BOOLEAN
, 8, TFS(&tfs_true_false
), 0x04,
1840 { &hf_capwap_msg_element_type_ac_descriptor_dtls_policy_c
,
1841 { "Clear Text Data Channel Supported", "capwap.control.message_element.ac_descriptor.dtls_policy.c",
1842 FT_BOOLEAN
, 8, TFS(&tfs_true_false
), 0x02,
1844 { &hf_capwap_msg_element_type_ac_descriptor_dtls_policy_r
,
1845 { "Reserved", "capwap.control.message_element.ac_descriptor.dtls_policy.r",
1846 FT_BOOLEAN
, 8, TFS(&tfs_set_notset
), 0xF9,
1849 { &hf_capwap_msg_element_type_ac_information
,
1850 { "AC Information", "capwap.control.message_element.ac_information",
1851 FT_NONE
, BASE_NONE
, NULL
, 0x00,
1854 { &hf_capwap_msg_element_type_ac_information_vendor
,
1855 { "AC Information Vendor", "capwap.control.message_element.ac_information.vendor",
1856 FT_UINT32
, BASE_DEC
|BASE_EXT_STRING
, &sminmpec_values_ext
, 0x00,
1858 { &hf_capwap_msg_element_type_ac_information_type
,
1859 { "AC Information Type", "capwap.control.message_element.ac_information.type",
1860 FT_UINT16
, BASE_DEC
, VALS(ac_information_type_vals
), 0x00,
1862 { &hf_capwap_msg_element_type_ac_information_length
,
1863 { "AC Information Length", "capwap.control.message_element.ac_information.length",
1864 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
1867 { &hf_capwap_msg_element_type_ac_information_value
,
1868 { "AC Information Value", "capwap.control.message_element.ac_information.value",
1869 FT_BYTES
, BASE_NONE
, NULL
, 0x0,
1871 { &hf_capwap_msg_element_type_ac_information_hardware_version
,
1872 { "AC Hardware Version", "capwap.control.message_element.ac_information.hardware_version",
1873 FT_STRING
, BASE_NONE
, NULL
, 0x0,
1875 { &hf_capwap_msg_element_type_ac_information_software_version
,
1876 { "AC Software Version", "capwap.control.message_element.ac_information.software_version",
1877 FT_STRING
, BASE_NONE
, NULL
, 0x0,
1879 { &hf_capwap_msg_element_type_ac_ipv4_list
,
1880 { "AC IPv4 List", "capwap.control.message_element.message_element.ac_ipv4_list",
1881 FT_IPv4
, BASE_NONE
, NULL
, 0x00,
1883 { &hf_capwap_msg_element_type_ac_ipv6_list
,
1884 { "AC IPv6 List", "capwap.control.message_element.message_element.ac_ipv6_list",
1885 FT_IPv6
, BASE_NONE
, NULL
, 0x00,
1887 /* CAPWAP Control IPvX Address*/
1888 { &hf_capwap_msg_element_type_capwap_control_ipv4
,
1889 { "CAPWAP Control IP Address", "capwap.control.message_element.message_element.capwap_control_ipv4",
1890 FT_IPv4
, BASE_NONE
, NULL
, 0x00,
1892 { &hf_capwap_msg_element_type_capwap_control_ipv6
,
1893 { "CAPWAP Control IP Address", "capwap.control.message_element.message_element.capwap_control_ipv6",
1894 FT_IPv6
, BASE_NONE
, NULL
, 0x00,
1896 { &hf_capwap_msg_element_type_capwap_control_wtp_count
,
1897 { "CAPWAP Control WTP Count", "capwap.control.message_element.capwap_control_wtp_count",
1898 FT_UINT16
, BASE_DEC
, NULL
, 0x00,
1900 { &hf_capwap_msg_element_type_capwap_timers_discovery
,
1901 { "CAPWAP Timers Discovery (Sec)", "capwap.control.message_element.capwap_timers_discovery",
1902 FT_UINT8
, BASE_DEC
, NULL
, 0x00,
1904 { &hf_capwap_msg_element_type_capwap_timers_echo_request
,
1905 { "CAPWAP Timers Echo Request (Sec)", "capwap.control.message_element.capwap_timers_echo_request",
1906 FT_UINT8
, BASE_DEC
, NULL
, 0x00,
1908 { &hf_capwap_msg_element_type_decryption_error_report_period_radio_id
,
1909 { "Decryption Error Report Period Radio ID", "capwap.control.message_element.decryption_error_report_period.radio_id",
1910 FT_UINT8
, BASE_DEC
, NULL
, 0x00,
1912 { &hf_capwap_msg_element_type_decryption_error_report_period_interval
,
1913 { "Decryption Error Report Report Interval (Sec)", "capwap.control.message_element.decryption_error_report_period.interval",
1914 FT_UINT16
, BASE_DEC
, NULL
, 0x00,
1916 { &hf_capwap_msg_element_type_ac_name
,
1917 { "AC Name", "capwap.control.message_element.ac_name",
1918 FT_STRING
, BASE_NONE
, NULL
, 0x00,
1920 { &hf_capwap_msg_element_type_ac_name_with_priority
,
1921 { "AC Name Priority", "capwap.control.message_element.ac_name_with_priority",
1922 FT_UINT8
, BASE_DEC
, NULL
, 0x00,
1925 { &hf_capwap_msg_element_type_discovery_type
,
1926 { "Discovery Type", "capwap.control.message_element.discovery_type",
1927 FT_UINT8
, BASE_DEC
, VALS(discovery_type_vals
), 0x00,
1930 { &hf_capwap_msg_element_type_idle_timeout
,
1931 { "Idle Timeout (Sec)", "capwap.control.message_element.idle_timeout",
1932 FT_UINT32
, BASE_DEC
, NULL
, 0x00,
1934 { &hf_capwap_msg_element_type_location_data
,
1935 { "Location Data", "capwap.control.message_element.location_data",
1936 FT_STRING
, BASE_NONE
, NULL
, 0x00,
1938 { &hf_capwap_msg_element_type_maximum_message_length
,
1939 { "Maximum Message Length", "capwap.control.message_element.maximum_message_length",
1940 FT_UINT16
, BASE_DEC
, NULL
, 0x00,
1943 { &hf_capwap_msg_element_type_radio_admin_id
,
1944 { "Radio Administrative ID", "capwap.control.message_element.radio_admin.id",
1945 FT_UINT8
, BASE_DEC
, NULL
, 0x00,
1947 { &hf_capwap_msg_element_type_radio_admin_state
,
1948 { "Radio Administrative State", "capwap.control.message_element.radio_admin.state",
1949 FT_UINT8
, BASE_DEC
, VALS(radio_admin_state_vals
), 0x00,
1951 { &hf_capwap_msg_element_type_radio_op_state_radio_id
,
1952 { "Radio Operational ID", "capwap.control.message_element.radio_op_state.radio_id",
1953 FT_UINT8
, BASE_DEC
, NULL
, 0x00,
1955 { &hf_capwap_msg_element_type_radio_op_state_radio_state
,
1956 { "Radio Operational State", "capwap.control.message_element.radio_op_state.radio_state",
1957 FT_UINT8
, BASE_DEC
, VALS(radio_op_state_vals
), 0x00,
1959 { &hf_capwap_msg_element_type_radio_op_state_radio_cause
,
1960 { "Radio Operational Cause", "capwap.control.message_element.radio_op_state.radio_cause",
1961 FT_UINT8
, BASE_DEC
, VALS(radio_op_cause_vals
), 0x00,
1963 { &hf_capwap_msg_element_type_result_code
,
1964 { "Result Code", "capwap.control.message_element.result_code",
1965 FT_UINT32
, BASE_DEC
, VALS(result_code_vals
), 0x00,
1967 { &hf_capwap_msg_element_type_session_id
,
1968 { "Session ID", "capwap.control.message_element.session_id",
1969 FT_BYTES
, BASE_NONE
, NULL
, 0x00,
1971 { &hf_capwap_msg_element_type_statistics_timer
,
1972 { "Statistics Timer (Sec)", "capwap.control.message_element.statistics_timer",
1973 FT_UINT16
, BASE_DEC
, NULL
, 0x00,
1975 { &hf_capwap_msg_element_type_vsp_vendor_identifier
,
1976 { "Vendor Identifier", "capwap.control.message_element.vsp.vendor_identifier",
1977 FT_UINT32
, BASE_DEC
|BASE_EXT_STRING
, &sminmpec_values_ext
, 0x00,
1979 { &hf_capwap_msg_element_type_vsp_vendor_element_id
,
1980 { "Vendor Element ID", "capwap.control.message_element.vsp.vendor_element_id",
1981 FT_UINT16
, BASE_DEC
, NULL
, 0x00,
1983 { &hf_capwap_msg_element_type_vsp_vendor_data
,
1984 { "Vendor Data", "capwap.control.message_element.vsp.vendor_data",
1985 FT_BYTES
, BASE_NONE
, NULL
, 0x00,
1988 { &hf_capwap_msg_element_type_wtp_board_data
,
1989 { "WTP Board Data", "capwap.control.message_element.wtp_board_data",
1990 FT_NONE
, BASE_NONE
, NULL
, 0x00,
1992 { &hf_capwap_msg_element_type_wtp_board_data_vendor
,
1993 { "WTP Board Data Vendor", "capwap.control.message_element.wtp_board_data.vendor",
1994 FT_UINT32
, BASE_DEC
|BASE_EXT_STRING
, &sminmpec_values_ext
, 0x00,
1996 { &hf_capwap_msg_element_type_wtp_board_data_type
,
1997 { "Board Data Type", "capwap.control.message_element.wtp_board_data.type",
1998 FT_UINT16
, BASE_DEC
, VALS(board_data_type_vals
), 0x00,
2000 { &hf_capwap_msg_element_type_wtp_board_data_length
,
2001 { "Board Data Length", "capwap.control.message_element.wtp_board_data.length",
2002 FT_UINT16
, BASE_DEC
, NULL
, 0x00,
2004 { &hf_capwap_msg_element_type_wtp_board_data_value
,
2005 { "Board Data Value", "capwap.control.message_element.wtp_board_data.value",
2006 FT_BYTES
, BASE_NONE
, NULL
, 0x00,
2009 { &hf_capwap_msg_element_type_wtp_board_data_wtp_model_number
,
2010 { "WTP Model Number", "capwap.control.message_element.wtp_board_data.wtp_model_number",
2011 FT_STRING
, BASE_NONE
, NULL
, 0x00,
2013 { &hf_capwap_msg_element_type_wtp_board_data_wtp_serial_number
,
2014 { "WTP Serial Number", "capwap.control.message_element.wtp_board_data.wtp_serial_number",
2015 FT_STRING
, BASE_NONE
, NULL
, 0x00,
2017 { &hf_capwap_msg_element_type_wtp_board_data_wtp_board_id
,
2018 { "WTP Board ID", "capwap.control.message_element.wtp_board_data.wtp_board_id",
2019 FT_STRING
, BASE_NONE
, NULL
, 0x0,
2021 { &hf_capwap_msg_element_type_wtp_board_data_wtp_board_revision
,
2022 { "WTP Board Revision", "capwap.control.message_element.wtp_board_data.wtp_board_revision",
2023 FT_STRING
, BASE_NONE
, NULL
, 0x0,
2025 { &hf_capwap_msg_element_type_wtp_board_data_base_mac_address
,
2026 { "Base Mac Address", "capwap.control.message_element.wtp_board_data.base_mac_address",
2027 FT_ETHER
, BASE_NONE
, NULL
, 0x0,
2030 { &hf_capwap_msg_element_type_wtp_descriptor_max_radios
,
2031 { "Max Radios", "capwap.control.message_element.wtp_descriptor.max_radios",
2032 FT_UINT8
, BASE_DEC
, NULL
, 0x00,
2034 { &hf_capwap_msg_element_type_wtp_descriptor_radio_in_use
,
2035 { "Radio in use", "capwap.control.message_element.wtp_descriptor.radio_in_use",
2036 FT_UINT8
, BASE_DEC
, NULL
, 0x00,
2038 { &hf_capwap_msg_element_type_wtp_descriptor_number_encrypt
,
2039 { "Encryption Capabilities (Number)", "capwap.control.message_element.wtp_descriptor.number_encrypt",
2040 FT_UINT8
, BASE_DEC
, NULL
, 0x00,
2042 { &hf_capwap_msg_element_type_wtp_descriptor_encrypt
,
2043 { "Encryption Capabilities", "capwap.control.message_element.wtp_descriptor.encrypt",
2044 FT_NONE
, BASE_NONE
, NULL
, 0x00,
2046 { &hf_capwap_msg_element_type_wtp_descriptor_encrypt_reserved
,
2047 { "Reserved (Encrypt)", "capwap.control.message_element.wtp_descriptor.encrypt_reserved",
2048 FT_UINT8
, BASE_DEC
, NULL
, 0xE0,
2050 { &hf_capwap_msg_element_type_wtp_descriptor_encrypt_wbid
,
2051 { "Encrypt WBID", "capwap.control.message_element.wtp_descriptor.encrypt_wbid",
2052 FT_UINT8
, BASE_DEC
, VALS(type_wbid
), 0x1F,
2054 { &hf_capwap_msg_element_type_wtp_descriptor_encrypt_capabilities
,
2055 { "Encryption Capabilities", "capwap.control.message_element.wtp_descriptor.encrypt_capabilities",
2056 FT_UINT16
, BASE_DEC
, NULL
, 0x00,
2059 { &hf_capwap_msg_element_type_wtp_descriptor
,
2060 { "WTP Descriptor", "capwap.control.message_element.wtp_descriptor",
2061 FT_NONE
, BASE_NONE
, NULL
, 0x00,
2063 { &hf_capwap_msg_element_type_wtp_descriptor_vendor
,
2064 { "WTP Descriptor Vendor", "capwap.control.message_element.wtp_descriptor.vendor",
2065 FT_UINT32
, BASE_DEC
|BASE_EXT_STRING
, &sminmpec_values_ext
, 0x00,
2067 { &hf_capwap_msg_element_type_wtp_descriptor_type
,
2068 { "Descriptor Type", "capwap.control.message_element.wtp_descriptor.type",
2069 FT_UINT16
, BASE_DEC
, VALS(wtp_descriptor_type_vals
), 0x0,
2071 { &hf_capwap_msg_element_type_wtp_descriptor_length
,
2072 { "Descriptor Length", "capwap.control.message_element.wtp_descriptor.length",
2073 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
2075 { &hf_capwap_msg_element_type_wtp_descriptor_value
,
2076 { "Descriptor Value", "capwap.control.message_element.wtp_descriptor.value",
2077 FT_BYTES
, BASE_NONE
, NULL
, 0x0,
2079 { &hf_capwap_msg_element_type_wtp_descriptor_hardware_version
,
2080 { "WTP Hardware Version", "capwap.control.message_element.wtp_descriptor.hardware_version",
2081 FT_STRING
, BASE_NONE
, NULL
, 0x0,
2083 { &hf_capwap_msg_element_type_wtp_descriptor_active_software_version
,
2084 { "WTP Active Software Version", "capwap.control.message_element.wtp_descriptor.active_software_version",
2085 FT_STRING
, BASE_NONE
, NULL
, 0x0,
2087 { &hf_capwap_msg_element_type_wtp_descriptor_boot_version
,
2088 { "WTP Boot Version", "capwap.control.message_element.wtp_descriptor.boot_version",
2089 FT_STRING
, BASE_NONE
, NULL
, 0x0,
2091 { &hf_capwap_msg_element_type_wtp_descriptor_other_software_version
,
2092 { "WTP Other Software Version", "capwap.control.message_element.wtp_descriptor.other_software_version",
2093 FT_STRING
, BASE_NONE
, NULL
, 0x0,
2095 { &hf_capwap_msg_element_type_wtp_fallback
,
2096 { "WTP Fallback", "capwap.control.message_element.wtp_fallback",
2097 FT_UINT8
, BASE_DEC
, VALS(wtp_fallback_vals
), 0x0,
2100 { &hf_capwap_msg_element_type_wtp_frame_tunnel_mode
,
2101 { "WTP Frame Tunnel Mode", "capwap.control.message_element.wtp_frame_tunnel_mode",
2102 FT_NONE
, BASE_NONE
, NULL
, 0x0,
2104 { &hf_capwap_msg_element_type_wtp_frame_tunnel_mode_n
,
2105 { "Native Frame Tunnel Mode", "capwap.control.message_element.wtp_frame_tunnel_mode.n",
2106 FT_BOOLEAN
, 8, TFS(&tfs_true_false
), 0x08,
2108 { &hf_capwap_msg_element_type_wtp_frame_tunnel_mode_e
,
2109 { "802.3 Frame Tunnel Mode", "capwap.control.message_element.wtp_frame_tunnel_mode.e",
2110 FT_BOOLEAN
, 8, TFS(&tfs_true_false
), 0x04,
2112 { &hf_capwap_msg_element_type_wtp_frame_tunnel_mode_l
,
2113 { "Local Bridging", "capwap.control.message_element.wtp_frame_tunnel_mode.l",
2114 FT_BOOLEAN
, 8, TFS(&tfs_true_false
), 0x02,
2116 { &hf_capwap_msg_element_type_wtp_frame_tunnel_mode_r
,
2117 { "Reserved", "capwap.control.message_element.wtp_frame_tunnel_mode.r",
2118 FT_BOOLEAN
, 8, TFS(&tfs_set_notset
), 0xF1,
2121 { &hf_capwap_msg_element_type_wtp_mac_type
,
2122 { "WTP MAC Type", "capwap.control.message_element.wtp_mac_type",
2123 FT_UINT8
, BASE_DEC
, VALS(wtp_mac_vals
), 0x0,
2124 "The MAC mode of operation supported by the WTP", HFILL
}},
2125 { &hf_capwap_msg_element_type_wtp_name
,
2126 { "WTP Name", "capwap.control.message_element.wtp_name",
2127 FT_STRING
, BASE_NONE
, NULL
, 0x0,
2129 { &hf_capwap_msg_element_type_wtp_reboot_statistics_reboot_count
,
2130 { "Reboot Count", "capwap.control.message_element.wtp_reboot_statistics.reboot_count",
2131 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
2132 "The number of reboots that have occurred due to a WTP crash", HFILL
}},
2133 { &hf_capwap_msg_element_type_wtp_reboot_statistics_ac_initiated_count
,
2134 { "AC Initiated Count", "capwap.control.message_element.wtp_reboot_statistics.ac_initiated_count",
2135 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
2136 "The number of reboots that have occurred at the request of a CAPWAP protocol message", HFILL
}},
2137 { &hf_capwap_msg_element_type_wtp_reboot_statistics_link_failure_count
,
2138 { "Link Failure Count", "capwap.control.message_element.wtp_reboot_statistics.link_failure_count",
2139 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
2140 "The number of times that a CAPWAP protocol connection with an AC has failed due to link failure", HFILL
}},
2141 { &hf_capwap_msg_element_type_wtp_reboot_statistics_sw_failure_count
,
2142 { "SW Failure Count", "capwap.control.message_element.wtp_reboot_statistics.sw_failure_count",
2143 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
2144 "The number of times that a CAPWAP protocol connection with an AC has failed due to software-related reasons", HFILL
}},
2145 { &hf_capwap_msg_element_type_wtp_reboot_statistics_hw_failure_count
,
2146 { "HW Failure Count", "capwap.control.message_element.wtp_reboot_statistics.hw_failure_count",
2147 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
2148 "The number of times that a CAPWAP protocol connection with an AC has failed due to hardware-related reasons", HFILL
}},
2149 { &hf_capwap_msg_element_type_wtp_reboot_statistics_other_failure_count
,
2150 { "Other Failure Count", "capwap.control.message_element.wtp_reboot_statistics.other_failure_count",
2151 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
2152 "The number of times that a CAPWAP protocol connection with an AC has failed due to known reasons, other than AC initiated, link, SW or HW failure", HFILL
}},
2153 { &hf_capwap_msg_element_type_wtp_reboot_statistics_unknown_failure_count
,
2154 { "Unknown Failure Count", "capwap.control.message_element.wtp_reboot_statistics.unknown_failure_count",
2155 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
2156 "The number of times that a CAPWAP protocol connection with an AC has failed for unknown reasons", HFILL
}},
2157 { &hf_capwap_msg_element_type_wtp_reboot_statistics_last_failure_type
,
2158 { "Last Failure Type", "capwap.control.message_element.wtp_reboot_statistics.last_failure_type",
2159 FT_UINT8
, BASE_DEC
, VALS(last_failure_type_vals
), 0x0,
2160 "The failure type of the most recent WTP failure", HFILL
}},
2162 { &hf_capwap_msg_element_type_ieee80211_rate_set_radio_id
,
2163 { "Radio ID", "capwap.control.message_element.ieee80211_rate_set.radio_id",
2164 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
2166 { &hf_capwap_msg_element_type_ieee80211_rate_set_rate_set
,
2167 { "Rate Set", "capwap.control.message_element.ieee80211_rate_set.rate_set",
2168 FT_BYTES
, BASE_NONE
, NULL
, 0x0,
2170 { &hf_capwap_msg_element_type_ieee80211_station_session_key_mac
,
2171 { "Mac Address", "capwap.control.message_element.ieee80211_station_session_key.mac",
2172 FT_ETHER
, BASE_NONE
, NULL
, 0x0,
2173 "The station's MAC Address", HFILL
}},
2174 { &hf_capwap_msg_element_type_ieee80211_station_session_key_flags
,
2175 { "Flags", "capwap.control.message_element.ieee80211_station_session_key.flags",
2176 FT_UINT16
, BASE_DEC
, NULL
, 0x3FFF,
2178 { &hf_capwap_msg_element_type_ieee80211_station_session_key_flags_a
,
2179 { "Flag A", "capwap.control.message_element.ieee80211_station_session_key.flags_a",
2180 FT_BOOLEAN
, 1, NULL
, 0x2000,
2182 { &hf_capwap_msg_element_type_ieee80211_station_session_key_flags_c
,
2183 { "Flag C", "capwap.control.message_element.ieee80211_station_session_key.flags_c",
2184 FT_BOOLEAN
, 1, NULL
, 0x1000,
2186 { &hf_capwap_msg_element_type_ieee80211_station_session_key_pairwire_tsc
,
2187 { "Pairwise TSC", "capwap.control.message_element.ieee80211_station_session_key.pairwire_tsc",
2188 FT_BYTES
, BASE_NONE
, NULL
, 0x0,
2189 "Transmit Sequence Counter (TSC)", HFILL
}},
2190 { &hf_capwap_msg_element_type_ieee80211_station_session_key_pairwire_rsc
,
2191 { "Pairwise RSC", "capwap.control.message_element.ieee80211_station_session_key.pairwire_rsc",
2192 FT_BYTES
, BASE_NONE
, NULL
, 0x0,
2193 "Receive Sequence Counter (TSC)", HFILL
}},
2194 { &hf_capwap_msg_element_type_ieee80211_station_session_key_key
,
2195 { "Key", "capwap.control.message_element.ieee80211_station_session_key.key",
2196 FT_BYTES
, BASE_NONE
, NULL
, 0x0,
2198 { &hf_capwap_msg_element_type_ieee80211_wtp_radio_info_radio_id
,
2199 { "Radio ID", "capwap.control.message_element.ieee80211__wtp_radio_info.radio_id",
2200 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
2202 { &hf_capwap_msg_element_type_ieee80211_wtp_radio_info_radio_type_reserved
,
2203 { "Radio Type Reserved", "capwap.control.message_element.ieee80211_wtp_info_radio.radio_type_reserved",
2204 FT_BYTES
, BASE_NONE
, NULL
, 0x0,
2206 { &hf_capwap_msg_element_type_ieee80211_wtp_radio_info_radio_type_n
,
2207 { "Radio Type 802.11n", "capwap.control.message_element.ieee80211_wtp_info_radio.radio_type_n",
2208 FT_BOOLEAN
, 4, TFS(&tfs_true_false
), 0x0008,
2210 { &hf_capwap_msg_element_type_ieee80211_wtp_radio_info_radio_type_g
,
2211 { "Radio Type 802.11g", "capwap.control.message_element.ieee80211_wtp_info_radio.radio_type_g",
2212 FT_BOOLEAN
, 4, TFS(&tfs_true_false
), 0x0004,
2214 { &hf_capwap_msg_element_type_ieee80211_wtp_radio_info_radio_type_a
,
2215 { "Radio Type 802.11a", "capwap.control.message_element.ieee80211_wtp_info_radio.radio_type_a",
2216 FT_BOOLEAN
, 4, TFS(&tfs_true_false
), 0x0002,
2218 { &hf_capwap_msg_element_type_ieee80211_wtp_radio_info_radio_type_b
,
2219 { "Radio Type 802.11g", "capwap.control.message_element.ieee80211_wtp_info_radio.radio_type_b",
2220 FT_BOOLEAN
, 4, TFS(&tfs_true_false
), 0x0001,
2223 /* Data Channel Keep-Alive entries */
2224 { & hf_capwap_data_keep_alive
,
2225 { "Keep-Alive", "capwap.keep_alive", FT_NONE
, BASE_NONE
,
2226 NULL
, 0x00, NULL
, HFILL
} },
2227 { & hf_capwap_data_keep_alive_length
,
2228 { "Message Element Length", "capwap.keep_alive.length", FT_UINT16
, BASE_DEC
,
2229 NULL
, 0x00, NULL
, HFILL
} },
2231 /* Fragment entries */
2232 { &hf_msg_fragments
,
2233 { "Message fragments", "capwap.fragments", FT_NONE
, BASE_NONE
,
2234 NULL
, 0x00, NULL
, HFILL
} },
2236 { "Message fragment", "capwap.fragment", FT_FRAMENUM
, BASE_NONE
,
2237 NULL
, 0x00, NULL
, HFILL
} },
2238 { &hf_msg_fragment_overlap
,
2239 { "Message fragment overlap", "capwap.fragment.overlap", FT_BOOLEAN
,
2240 BASE_NONE
, NULL
, 0x00, NULL
, HFILL
} },
2241 { &hf_msg_fragment_overlap_conflicts
,
2242 { "Message fragment overlapping with conflicting data",
2243 "capwap.fragment.overlap.conflicts", FT_BOOLEAN
, BASE_NONE
, NULL
,
2244 0x00, NULL
, HFILL
} },
2245 { &hf_msg_fragment_multiple_tails
,
2246 { "Message has multiple tail fragments",
2247 "capwap.fragment.multiple_tails", FT_BOOLEAN
, BASE_NONE
,
2248 NULL
, 0x00, NULL
, HFILL
} },
2249 { &hf_msg_fragment_too_long_fragment
,
2250 { "Message fragment too long", "capwap.fragment.too_long_fragment",
2251 FT_BOOLEAN
, BASE_NONE
, NULL
, 0x00, NULL
, HFILL
} },
2252 { &hf_msg_fragment_error
,
2253 { "Message defragmentation error", "capwap.fragment.error", FT_FRAMENUM
,
2254 BASE_NONE
, NULL
, 0x00, NULL
, HFILL
} },
2255 { &hf_msg_fragment_count
,
2256 { "Message fragment count", "capwap.fragment.count", FT_UINT32
, BASE_DEC
,
2257 NULL
, 0x00, NULL
, HFILL
} },
2258 { &hf_msg_reassembled_in
,
2259 { "Reassembled in", "capwap.reassembled.in", FT_FRAMENUM
, BASE_NONE
,
2260 NULL
, 0x00, NULL
, HFILL
} },
2261 { &hf_msg_reassembled_length
,
2262 { "Reassembled CAPWAP length", "capwap.reassembled.length", FT_UINT32
, BASE_DEC
,
2263 NULL
, 0x00, NULL
, HFILL
} }
2266 /* Setup protocol subtree array */
2267 static gint
*ett
[] = {
2273 static ei_register_info ei
[] = {
2274 { &ei_capwap_header_length_bad
, { "capwap.header.length.bad", PI_MALFORMED
, PI_WARN
, "Wrong calculate length =! header length", EXPFILL
}},
2275 { &ei_capwap_data_keep_alive_length
, { "capwap.keep_alive.length.bad", PI_MALFORMED
, PI_WARN
, "Invalid Keep Alive length", EXPFILL
}},
2278 expert_module_t
* expert_capwap
;
2280 /* Register the protocol name and description */
2281 proto_capwap
= proto_register_protocol("Control And Provisioning of Wireless Access Points", "CAPWAP", "capwap");
2283 /* Required function calls to register the header fields and subtrees used */
2284 proto_register_field_array(proto_capwap
, hf
, array_length(hf
));
2286 proto_register_subtree_array(ett
, array_length(ett
));
2288 expert_capwap
= expert_register_protocol(proto_capwap
);
2289 expert_register_field_array(expert_capwap
, ei
, array_length(ei
));
2291 register_init_routine(&capwap_reassemble_init
);
2293 /* Register preferences module (See Section 2.6 for more on preferences) */
2294 capwap_module
= prefs_register_protocol(proto_capwap
, proto_reg_handoff_capwap
);
2296 prefs_register_uint_preference(capwap_module
, "udp.port.control", "CAPWAP Control UDP Port",
2297 "Set the port for CAPWAP Control messages (if other than the default of 5246)",
2298 10, &global_capwap_control_udp_port
);
2300 prefs_register_uint_preference(capwap_module
, "udp.port.data", "CAPWAP Data UDP Port",
2301 "Set the port for CAPWAP Data messages (if other than the default of 5247)",
2302 10, &global_capwap_data_udp_port
);
2304 prefs_register_bool_preference(capwap_module
, "draft_8_cisco", "Cisco Wireless Controller Support",
2305 "Enable support of Cisco Wireless Controller (based on old 8 draft revision).",
2306 &global_capwap_draft_8_cisco
);
2308 prefs_register_bool_preference(capwap_module
, "reassemble", "Reassemble fragmented CAPWAP packets",
2309 "Reassemble fragmented CAPWAP packets.",
2310 &global_capwap_reassemble
);
2312 prefs_register_bool_preference(capwap_module
, "swap_fc", "Swap Frame Control",
2313 "Swap frame control bytes (needed for some APs).",
2314 &global_capwap_swap_frame_control
);
2319 proto_reg_handoff_capwap(void)
2321 static gboolean inited
= FALSE
;
2322 static dissector_handle_t capwap_control_handle
, capwap_data_handle
;
2323 static guint capwap_control_udp_port
, capwap_data_udp_port
;
2326 capwap_control_handle
= new_create_dissector_handle(dissect_capwap_control
, proto_capwap
);
2327 capwap_data_handle
= create_dissector_handle(dissect_capwap_data
, proto_capwap
);
2328 dtls_handle
= find_dissector("dtls");
2329 ieee8023_handle
= find_dissector("eth_withoutfcs");
2330 ieee80211_handle
= find_dissector("wlan");
2331 ieee80211_bsfc_handle
= find_dissector("wlan_bsfc");
2332 data_handle
= find_dissector("data");
2336 dissector_delete_uint("udp.port", capwap_control_udp_port
, capwap_control_handle
);
2337 dissector_delete_uint("udp.port", capwap_data_udp_port
, capwap_data_handle
);
2339 dissector_add_uint("udp.port", global_capwap_control_udp_port
, capwap_control_handle
);
2340 dissector_add_uint("udp.port", global_capwap_data_udp_port
, capwap_data_handle
);
2342 capwap_control_udp_port
= global_capwap_control_udp_port
;
2343 capwap_data_udp_port
= global_capwap_data_udp_port
;
2351 * indent-tabs-mode: nil
2354 * ex: set shiftwidth=4 tabstop=8 expandtab:
2355 * :indentSize=4:tabSize=8:noTabs=true: