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>
34 #include <epan/sminmpec.h>
36 #define UDP_PORT_CAPWAP_CONTROL 5246
37 #define UDP_PORT_CAPWAP_DATA 5247
39 static guint global_capwap_control_udp_port = UDP_PORT_CAPWAP_CONTROL;
40 static guint global_capwap_data_udp_port = UDP_PORT_CAPWAP_DATA;
41 static gboolean global_capwap_draft_8_cisco = FALSE;
42 static gboolean global_capwap_reassemble = TRUE;
43 static gboolean global_capwap_swap_frame_control = TRUE;
45 static GHashTable *capwap_fragment_table = NULL;
46 static GHashTable *capwap_reassembled_table = NULL;
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_type = -1;
109 static int hf_capwap_msg_element_length = -1;
110 static int hf_capwap_msg_element_value = -1;
112 static int hf_capwap_msg_element_type_ac_descriptor_stations = -1;
113 static int hf_capwap_msg_element_type_ac_descriptor_limit = -1;
114 static int hf_capwap_msg_element_type_ac_descriptor_active_wtp = -1;
115 static int hf_capwap_msg_element_type_ac_descriptor_max_wtp = -1;
116 /* AC Descriptor Security Flags... */
117 static int hf_capwap_msg_element_type_ac_descriptor_security = -1;
118 static int hf_capwap_msg_element_type_ac_descriptor_security_s = -1;
119 static int hf_capwap_msg_element_type_ac_descriptor_security_x = -1;
120 static int hf_capwap_msg_element_type_ac_descriptor_security_r = -1;
121 static int hf_capwap_msg_element_type_ac_descriptor_rmac_field = -1;
122 static int hf_capwap_msg_element_type_ac_descriptor_reserved = -1;
123 /* AC Descriptor DTLS Policy Flags... */
124 static int hf_capwap_msg_element_type_ac_descriptor_dtls_policy = -1;
125 static int hf_capwap_msg_element_type_ac_descriptor_dtls_policy_d = -1;
126 static int hf_capwap_msg_element_type_ac_descriptor_dtls_policy_c = -1;
127 static int hf_capwap_msg_element_type_ac_descriptor_dtls_policy_r = -1;
129 static int hf_capwap_msg_element_type_ac_information_vendor = -1;
130 static int hf_capwap_msg_element_type_ac_information_type = -1;
131 static int hf_capwap_msg_element_type_ac_information_length = -1;
132 static int hf_capwap_msg_element_type_ac_information_value = -1;
133 static int hf_capwap_msg_element_type_ac_information_hardware_version = -1;
134 static int hf_capwap_msg_element_type_ac_information_software_version = -1;
136 static int hf_capwap_msg_element_type_ac_name = -1;
137 static int hf_capwap_msg_element_type_ac_name_with_priority = -1;
139 static int hf_capwap_msg_element_type_ac_ipv4_list = -1;
140 static int hf_capwap_msg_element_type_ac_ipv6_list = -1;
142 static int hf_capwap_msg_element_type_capwap_control_ipv4 = -1;
143 static int hf_capwap_msg_element_type_capwap_control_ipv6 = -1;
144 static int hf_capwap_msg_element_type_capwap_control_wtp_count = -1;
146 static int hf_capwap_msg_element_type_capwap_timers_discovery = -1;
147 static int hf_capwap_msg_element_type_capwap_timers_echo_request = -1;
149 static int hf_capwap_msg_element_type_decryption_error_report_period_radio_id = -1;
150 static int hf_capwap_msg_element_type_decryption_error_report_period_interval = -1;
152 static int hf_capwap_msg_element_type_discovery_type = -1;
154 static int hf_capwap_msg_element_type_location_data = -1;
156 static int hf_capwap_msg_element_type_maximum_message_length = -1;
158 static int hf_capwap_msg_element_type_idle_timeout = -1;
159 static int hf_capwap_msg_element_type_radio_admin_id = -1;
160 static int hf_capwap_msg_element_type_radio_admin_state = -1;
162 static int hf_capwap_msg_element_type_radio_op_state_radio_id = -1;
163 static int hf_capwap_msg_element_type_radio_op_state_radio_state = -1;
164 static int hf_capwap_msg_element_type_radio_op_state_radio_cause = -1;
165 static int hf_capwap_msg_element_type_result_code = -1;
167 static int hf_capwap_msg_element_type_session_id = -1;
169 static int hf_capwap_msg_element_type_statistics_timer = -1;
171 static int hf_capwap_msg_element_type_vsp_vendor_identifier = -1;
172 static int hf_capwap_msg_element_type_vsp_vendor_element_id = -1;
173 static int hf_capwap_msg_element_type_vsp_vendor_data = -1;
175 static int hf_capwap_msg_element_type_wtp_board_data_vendor = -1;
176 static int hf_capwap_msg_element_type_wtp_board_data_type = -1;
177 static int hf_capwap_msg_element_type_wtp_board_data_length = -1;
178 static int hf_capwap_msg_element_type_wtp_board_data_value = -1;
179 static int hf_capwap_msg_element_type_wtp_board_data_wtp_model_number = -1;
180 static int hf_capwap_msg_element_type_wtp_board_data_wtp_serial_number = -1;
181 static int hf_capwap_msg_element_type_wtp_board_data_wtp_board_id = -1;
182 static int hf_capwap_msg_element_type_wtp_board_data_wtp_board_revision = -1;
183 static int hf_capwap_msg_element_type_wtp_board_data_base_mac_address = -1;
185 static int hf_capwap_msg_element_type_wtp_descriptor_max_radios = -1;
186 static int hf_capwap_msg_element_type_wtp_descriptor_radio_in_use = -1;
187 static int hf_capwap_msg_element_type_wtp_descriptor_number_encrypt = -1;
188 static int hf_capwap_msg_element_type_wtp_descriptor_encrypt_reserved = -1;
189 static int hf_capwap_msg_element_type_wtp_descriptor_encrypt_wbid = -1;
190 static int hf_capwap_msg_element_type_wtp_descriptor_encrypt_capabilities = -1;
191 static int hf_capwap_msg_element_type_wtp_descriptor_vendor = -1;
192 static int hf_capwap_msg_element_type_wtp_descriptor_type = -1;
193 static int hf_capwap_msg_element_type_wtp_descriptor_length = -1;
194 static int hf_capwap_msg_element_type_wtp_descriptor_value = -1;
195 static int hf_capwap_msg_element_type_wtp_descriptor_hardware_version = -1;
196 static int hf_capwap_msg_element_type_wtp_descriptor_active_software_version = -1;
197 static int hf_capwap_msg_element_type_wtp_descriptor_boot_version = -1;
198 static int hf_capwap_msg_element_type_wtp_descriptor_other_software_version = -1;
200 static int hf_capwap_msg_element_type_wtp_fallback = -1;
201 static int hf_capwap_msg_element_type_wtp_frame_tunnel_mode = -1;
202 static int hf_capwap_msg_element_type_wtp_frame_tunnel_mode_n = -1;
203 static int hf_capwap_msg_element_type_wtp_frame_tunnel_mode_e = -1;
204 static int hf_capwap_msg_element_type_wtp_frame_tunnel_mode_l = -1;
205 static int hf_capwap_msg_element_type_wtp_frame_tunnel_mode_r = -1;
207 static int hf_capwap_msg_element_type_wtp_mac_type = -1;
209 static int hf_capwap_msg_element_type_wtp_name = -1;
211 static int hf_capwap_msg_element_type_wtp_reboot_statistics_reboot_count = -1;
212 static int hf_capwap_msg_element_type_wtp_reboot_statistics_ac_initiated_count = -1;
213 static int hf_capwap_msg_element_type_wtp_reboot_statistics_link_failure_count = -1;
214 static int hf_capwap_msg_element_type_wtp_reboot_statistics_sw_failure_count = -1;
215 static int hf_capwap_msg_element_type_wtp_reboot_statistics_hw_failure_count = -1;
216 static int hf_capwap_msg_element_type_wtp_reboot_statistics_other_failure_count = -1;
217 static int hf_capwap_msg_element_type_wtp_reboot_statistics_unknown_failure_count = -1;
218 static int hf_capwap_msg_element_type_wtp_reboot_statistics_last_failure_type = -1;
220 static int hf_capwap_msg_element_type_ieee80211_rate_set_radio_id = -1;
221 static int hf_capwap_msg_element_type_ieee80211_rate_set_rate_set = -1;
223 static int hf_capwap_msg_element_type_ieee80211_station_session_key_mac = -1;
224 static int hf_capwap_msg_element_type_ieee80211_station_session_key_flags = -1;
225 static int hf_capwap_msg_element_type_ieee80211_station_session_key_flags_a = -1;
226 static int hf_capwap_msg_element_type_ieee80211_station_session_key_flags_c = -1;
227 static int hf_capwap_msg_element_type_ieee80211_station_session_key_pairwire_tsc = -1;
228 static int hf_capwap_msg_element_type_ieee80211_station_session_key_pairwire_rsc = -1;
229 static int hf_capwap_msg_element_type_ieee80211_station_session_key_key = -1;
231 static int hf_capwap_msg_element_type_ieee80211_wtp_radio_info_radio_id = -1;
232 static int hf_capwap_msg_element_type_ieee80211_wtp_radio_info_radio_type_reserved = -1;
233 static int hf_capwap_msg_element_type_ieee80211_wtp_radio_info_radio_type_n = -1;
234 static int hf_capwap_msg_element_type_ieee80211_wtp_radio_info_radio_type_g = -1;
235 static int hf_capwap_msg_element_type_ieee80211_wtp_radio_info_radio_type_a = -1;
236 static int hf_capwap_msg_element_type_ieee80211_wtp_radio_info_radio_type_b = -1;
238 static int hf_msg_fragments = -1;
239 static int hf_msg_fragment = -1;
240 static int hf_msg_fragment_overlap = -1;
241 static int hf_msg_fragment_overlap_conflicts = -1;
242 static int hf_msg_fragment_multiple_tails = -1;
243 static int hf_msg_fragment_too_long_fragment = -1;
244 static int hf_msg_fragment_error = -1;
245 static int hf_msg_fragment_count = -1;
246 static int hf_msg_reassembled_in = -1;
247 static int hf_msg_reassembled_length = -1;
249 static dissector_handle_t dtls_handle;
250 static dissector_handle_t ieee8023_handle;
251 static dissector_handle_t ieee80211_handle;
252 static dissector_handle_t ieee80211_bsfc_handle;
253 static dissector_handle_t data_handle;
255 /* Initialize the subtree pointers */
256 static gint ett_capwap = -1;
258 static gint ett_msg_fragment = -1;
259 static gint ett_msg_fragments = -1;
261 /* ************************************************************************* */
263 /* ************************************************************************* */
265 static const fragment_items capwap_frag_items = {
266 /* Fragment subtrees */
269 /* Fragment fields */
272 &hf_msg_fragment_overlap,
273 &hf_msg_fragment_overlap_conflicts,
274 &hf_msg_fragment_multiple_tails,
275 &hf_msg_fragment_too_long_fragment,
276 &hf_msg_fragment_error,
277 &hf_msg_fragment_count,
278 /* Reassembled in field */
279 &hf_msg_reassembled_in,
280 /* Reassembled length field */
281 &hf_msg_reassembled_length,
282 /* Reassembled data field */
288 /* ************************************************************************* */
290 /* ************************************************************************* */
291 static const value_string type_header_vals[] = {
292 { 0, "CAPWAP Header" },
293 { 1, "CAPWAP DTLS Header" },
296 /* ************************************************************************* */
297 /* Wireless Binding IDentifier (WBID) */
298 /* ************************************************************************* */
299 static const value_string type_wbid[] = {
301 { 1, "IEEE 802.11" },
302 { 2, "IEEE 802.16" }, /* From old RFC Draft... */
306 /* ************************************************************************* */
307 /* flag Type Transported (payload) */
308 /* ************************************************************************* */
309 static const true_false_string flag_type_t = {
310 "Native frame format (see Wireless Binding ID field)",
313 /* ************************************************************************* */
314 /* flag Type Fragment */
315 /* ************************************************************************* */
316 static const true_false_string flag_type_f = {
320 /* ************************************************************************* */
321 /* flag Type Last Fragment */
322 /* ************************************************************************* */
323 static const true_false_string flag_type_l = {
324 "This is the last fragment",
325 "More fragments follow"
327 /* ************************************************************************* */
328 /* flag Type Wireless */
329 /* ************************************************************************* */
330 static const true_false_string flag_type_w = {
331 "Wireless Specific Information is present",
332 "No Wireless Specific Information"
334 /* ************************************************************************* */
335 /* flag Type Radio Mac */
336 /* ************************************************************************* */
337 static const true_false_string flag_type_m = {
338 "Radio MAC Address is present",
339 "No Radio MAC Address"
341 /* ************************************************************************* */
342 /* flag Type Keep Alive */
343 /* ************************************************************************* */
344 static const true_false_string flag_type_k = {
348 /* ************************************************************************* */
349 /* Message Type Value */
350 /* ************************************************************************* */
351 static const value_string message_type[] = {
352 { 1, "Discovery Request" },
353 { 2, "Discovery Response" },
354 { 3, "Join Request" },
355 { 4, "Join Response" },
356 { 5, "Configuration Status Request" },
357 { 6, "Configuration Status Response" },
358 { 7, "Configuration Update Request" },
359 { 8, "Configuration Update Response" },
360 { 9, "WTP Event Request" },
361 { 10, "WTP Event Response" },
362 { 11, "Change State Request" },
363 { 12, "Change State Response" },
364 { 13, "Echo Request" },
365 { 14, "Echo Response" },
366 { 15, "Image Data Request" },
367 { 16, "Image Data Response" },
368 { 17, "Reset Request" },
369 { 18, "Reset Response" },
370 { 19, "Primary Discovery Request" },
371 { 20, "Primary Discovery Response" },
372 { 21, "Data Transfer Request" },
373 { 22, "Data Transfer Response" },
374 { 23, "Clear Configuration Request" },
375 { 24, "Clear Configuration Response" },
376 { 25, "Station Configuration Request" },
377 { 26, "Station Configuration Response" },
380 /* ************************************************************************* */
381 /* Message Element Type */
382 /* ************************************************************************* */
383 #define TYPE_AC_DESCRIPTOR 1
384 #define TYPE_AC_IPV4_LIST 2
385 #define TYPE_AC_IPV6_LIST 3
386 #define TYPE_AC_NAME 4
387 #define TYPE_AC_NAME_W_PRIORITY 5
388 #define TYPE_AC_TIMESTAMP 6
389 #define TYPE_ADD_MAC_ACL_ENTRY 7
390 #define TYPE_ADD_STATION 8
391 #define TYPE_RESERVED_9 9
392 #define TYPE_CAPWAP_CONTROL_IPV4_ADDRESS 10
393 #define TYPE_CAPWAP_CONTROL_IPV6_ADDRESS 11
394 #define TYPE_CAPWAP_TIMERS 12
395 #define TYPE_DATA_TRANSFER_DATA 13
396 #define TYPE_DATA_TRANSFER_MODE 14
397 #define TYPE_DESCRYPTION_ERROR_REPORT 15
398 #define TYPE_DECRYPTION_ERROR_REPORT_PERIOD 16
399 #define TYPE_DELETE_MAC_ENTRY 17
400 #define TYPE_DELETE_STATION 18
401 #define TYPE_RESERVED_19 19
402 #define TYPE_DISCOVERY_TYPE 20
403 #define TYPE_DUPLICATE_IPV4_ADDRESS 21
404 #define TYPE_DUPLICATE_IPV6_ADDRESS 22
405 #define TYPE_IDLE_TIMEOUT 23
406 #define TYPE_IMAGE_DATA 24
407 #define TYPE_IMAGE_IDENTIFIER 25
408 #define TYPE_IMAGE_INFORMATION 26
409 #define TYPE_INITIATE_DOWNLOAD 27
410 #define TYPE_LOCATION_DATA 28
411 #define TYPE_MAXIMUM_MESSAGE_LENGTH 29
412 #define TYPE_CAPWAP_LOCAL_IPV4_ADDRESS 30
413 #define TYPE_RADIO_ADMINISTRATIVE_STATE 31
414 #define TYPE_RADIO_OPERATIONAL_STATE 32
415 #define TYPE_RESULT_CODE 33
416 #define TYPE_RETURNED_MESSAGE_ELEMENT 34
417 #define TYPE_SESSION_ID 35
418 #define TYPE_STATISTICS_TIMER 36
419 #define TYPE_VENDOR_SPECIFIC_PAYLOAD 37
420 #define TYPE_WTP_BOARD_DATA 38
421 #define TYPE_WTP_DESCRIPTOR 39
422 #define TYPE_WTP_FALLBACK 40
423 #define TYPE_WTP_FRAME_TUNNEL_MODE 41
424 #define TYPE_RESERVED_42 42
425 #define TYPE_RESERVED_43 43
426 #define TYPE_WTP_MAC_TYPE 44
427 #define TYPE_WTP_NAME 45
428 #define TYPE_RESERVED_46 46
429 #define TYPE_WTP_RADIO_STATISTICS 47
430 #define TYPE_WTP_REBOOT_STATISTICS 48
431 #define TYPE_WTP_STATIC_IP_ADDRESS_INFORMATION 49
432 #define TYPE_CAPWAP_LOCAL_IPV6_ADDRESS 50
433 #define TYPE_CAPWAP_TRANSPORT_PROTOCOL 51
434 #define TYPE_MTU_DISCOVERY_PADDING 52
435 #define TYPE_ECN_SUPPORT 53
437 #define IEEE80211_ADD_WLAN 1024
438 #define IEEE80211_ANTENNA 1025
439 #define IEEE80211_ASSIGNED_WTP_BSSID 1026
440 #define IEEE80211_DELETE_WLAN 1027
441 #define IEEE80211_DIRECT_SEQUENCE_CONTROL 1028
442 #define IEEE80211_INFORMATION_ELEMENT 1029
443 #define IEEE80211_MAC_OPERATION 1030
444 #define IEEE80211_MIC_COUNTERMEASURES 1031
445 #define IEEE80211_MULTI_DOMAIN_CAPABILITY 1032
446 #define IEEE80211_OFDM_CONTROL 1033
447 #define IEEE80211_RATE_SET 1034
448 #define IEEE80211_RSNA_ERROR_REPORT_FROM_STATION 1035
449 #define IEEE80211_STATION 1036
450 #define IEEE80211_STATION_QOS_PROFILE 1037
451 #define IEEE80211_STATION_SESSION_KEY 1038
452 #define IEEE80211_STATISTICS 1039
453 #define IEEE80211_SUPPORTED_RATES 1040
454 #define IEEE80211_TX_POWER 1041
455 #define IEEE80211_TX_POWER_LEVEl 1042
456 #define IEEE80211_UPDATE_STATION_QOS 1043
457 #define IEEE80211_UPDATE_WLAN 1044
458 #define IEEE80211_WTP_QUALITY_OF_SERVICE 1045
459 #define IEEE80211_WTP_RADIO_CONFIGURATION 1046
460 #define IEEE80211_WTP_RADIO_FAIL_ALARM_INDICATION 1047
461 #define IEEE80211_WTP_RADIO_INFORMATION 1048
463 /* ************************************************************************* */
464 /* Message Element Type Value */
465 /* ************************************************************************* */
466 static const value_string message_element_type_vals[] = {
467 { TYPE_AC_DESCRIPTOR, "AC Descriptor" },
468 { TYPE_AC_IPV4_LIST, "AC IPv4 List" },
469 { TYPE_AC_IPV6_LIST, "AC IPv6 List" },
470 { TYPE_AC_NAME, "AC Name" },
471 { TYPE_AC_NAME_W_PRIORITY, "AC Name With Priority" },
472 { TYPE_AC_TIMESTAMP, "AC Timestamp" },
473 { TYPE_ADD_MAC_ACL_ENTRY, "Add MAC ACL Entry" },
474 { TYPE_ADD_STATION, "Add Station" },
475 { TYPE_RESERVED_9, "Reserved" },
476 { TYPE_CAPWAP_CONTROL_IPV4_ADDRESS, "CAPWAP Control IPv4 Address" },
477 { TYPE_CAPWAP_CONTROL_IPV6_ADDRESS, "CAPWAP Control IPv6 Address" },
478 { TYPE_CAPWAP_TIMERS, "CAPWAP Timers" },
479 { TYPE_DATA_TRANSFER_DATA, "Data Transfer Data" },
480 { TYPE_DATA_TRANSFER_MODE, "Data Transfer Mode" },
481 { TYPE_DESCRYPTION_ERROR_REPORT, "Decryption Error Report" },
482 { TYPE_DECRYPTION_ERROR_REPORT_PERIOD, "Decryption Error Report Period" },
483 { TYPE_DELETE_MAC_ENTRY, "Delete MAC ACL Entry" },
484 { TYPE_DELETE_STATION, "Delete Station" },
485 { TYPE_RESERVED_19, "Reserved" },
486 { TYPE_DISCOVERY_TYPE, "Discovery Type" },
487 { TYPE_DUPLICATE_IPV4_ADDRESS, "Duplicate IPv4 Address" },
488 { TYPE_DUPLICATE_IPV6_ADDRESS, "Duplicate IPv6 Address" },
489 { TYPE_IDLE_TIMEOUT, "Idle Timeout" },
490 { TYPE_IMAGE_DATA, "Image Data" },
491 { TYPE_IMAGE_IDENTIFIER, "Image Identifier" },
492 { TYPE_IMAGE_INFORMATION, "Image Information" },
493 { TYPE_INITIATE_DOWNLOAD, "Initiate Download" },
494 { TYPE_LOCATION_DATA, "Location Data" },
495 { TYPE_MAXIMUM_MESSAGE_LENGTH, "Maximum Message Length" },
496 { TYPE_CAPWAP_LOCAL_IPV4_ADDRESS, "CAPWAP Local IPv4 Address" },
497 { TYPE_RADIO_ADMINISTRATIVE_STATE, "Radio Administrative State " },
498 { TYPE_RADIO_OPERATIONAL_STATE, "Radio Operational State" },
499 { TYPE_RESULT_CODE, "Result Code" },
500 { TYPE_RETURNED_MESSAGE_ELEMENT, "Returned Message Element" },
501 { TYPE_SESSION_ID, "Session ID" },
502 { TYPE_STATISTICS_TIMER, "Statistics Timer" },
503 { TYPE_VENDOR_SPECIFIC_PAYLOAD, "Vendor Specific Payload" },
504 { TYPE_WTP_BOARD_DATA, "WTP Board Data" },
505 { TYPE_WTP_DESCRIPTOR, "WTP Descriptor" },
506 { TYPE_WTP_FALLBACK, "WTP Fallback " },
507 { TYPE_WTP_FRAME_TUNNEL_MODE, "WTP Frame Tunnel Mode " },
508 { TYPE_RESERVED_42, "Reserved" },
509 { TYPE_RESERVED_43, "Reserved" },
510 { TYPE_WTP_MAC_TYPE, "WTP MAC Type" },
511 { TYPE_WTP_NAME, "WTP Name" },
512 { TYPE_RESERVED_46, "Unused/Reserved" },
513 { TYPE_WTP_RADIO_STATISTICS, "WTP Radio Statistics" },
514 { TYPE_WTP_REBOOT_STATISTICS, "WTP Reboot Statistics" },
515 { TYPE_WTP_STATIC_IP_ADDRESS_INFORMATION, "WTP Static IP Address Information" },
516 { TYPE_CAPWAP_LOCAL_IPV6_ADDRESS, "CAPWAP Local IPv6 Address" },
517 { TYPE_CAPWAP_TRANSPORT_PROTOCOL, "CAPWAP Transport Protocol" },
518 { TYPE_MTU_DISCOVERY_PADDING, "MTU Discovery Padding" },
519 { TYPE_ECN_SUPPORT, "ECN Support" },
521 { IEEE80211_ADD_WLAN, "IEEE 802.11 Add WLAN" },
522 { IEEE80211_ANTENNA, "IEEE 802.11 Antenna" },
523 { IEEE80211_ASSIGNED_WTP_BSSID, "IEEE 802.11 Assigned WTP BSSID" },
524 { IEEE80211_DELETE_WLAN, "IEEE 802.11 Delete WLAN" },
525 { IEEE80211_DIRECT_SEQUENCE_CONTROL, "IEEE 802.11 Direct Sequence Control" },
526 { IEEE80211_INFORMATION_ELEMENT, "IEEE 802.11 Information Element" },
527 { IEEE80211_MAC_OPERATION, "IEEE 802.11 MAC Operation" },
528 { IEEE80211_MIC_COUNTERMEASURES, "IEEE 802.11 MIC Countermeasures" },
529 { IEEE80211_MULTI_DOMAIN_CAPABILITY, "IEEE 802.11 Multi-Domain Capability" },
530 { IEEE80211_OFDM_CONTROL, "IEEE 802.11 OFDM Control" },
531 { IEEE80211_RATE_SET, "IEEE 802.11 Rate Set" },
532 { IEEE80211_RSNA_ERROR_REPORT_FROM_STATION, "IEEE 802.11 RSNA Error Report From Station" },
533 { IEEE80211_STATION, "IEEE 802.11 Station" },
534 { IEEE80211_STATION_QOS_PROFILE, "IEEE 802.11 Station QoS Profile" },
535 { IEEE80211_STATION_SESSION_KEY, "IEEE 802.11 Station Session Key" },
536 { IEEE80211_STATISTICS, "IEEE 802.11 Statistics" },
537 { IEEE80211_SUPPORTED_RATES, "IEEE 802.11 Supported Rates" },
538 { IEEE80211_TX_POWER, "IEEE 802.11 Tx Power" },
539 { IEEE80211_TX_POWER_LEVEl, "IEEE 802.11 Tx Power Level" },
540 { IEEE80211_UPDATE_STATION_QOS, "IEEE 802.11 Update Station QoS" },
541 { IEEE80211_UPDATE_WLAN, "IEEE 802.11 Update WLAN" },
542 { IEEE80211_WTP_QUALITY_OF_SERVICE, "IEEE 802.11 WTP Quality of Service" },
543 { IEEE80211_WTP_RADIO_CONFIGURATION, "IEEE 802.11 WTP Radio Configuration" },
544 { IEEE80211_WTP_RADIO_FAIL_ALARM_INDICATION, "IEEE 802.11 WTP Radio Fail Alarm Indication" },
545 { IEEE80211_WTP_RADIO_INFORMATION, "IEEE 802.11 WTP Radio Information" },
548 /* ************************************************************************* */
550 /* ************************************************************************* */
551 static const value_string discovery_type_vals[] = {
553 { 1, "Static Configuration" },
556 { 4, "AC Referral" },
559 /* ************************************************************************* */
560 /* Radio Administrative State */
561 /* ************************************************************************* */
562 static const value_string radio_admin_state_vals[] = {
567 /* ************************************************************************* */
568 /* Radio Operational State */
569 /* ************************************************************************* */
570 static const value_string radio_op_state_vals[] = {
576 /* ************************************************************************* */
577 /* Radio Operational Cause */
578 /* ************************************************************************* */
579 static const value_string radio_op_cause_vals[] = {
581 { 1, "Radio Failure" },
582 { 2, "Software Failure" },
583 { 3, "Administratively Set" },
586 /* ************************************************************************* */
588 /* ************************************************************************* */
589 static const value_string result_code_vals[] = {
591 { 1 , "Failure (AC List Message Element MUST Be Present)" },
592 { 2 , "Success (NAT Detected)" },
593 { 3 , "Join Failure (Unspecified)" },
594 { 4 , "Join Failure (Resource Depletion)" },
595 { 5 , "Join Failure (Unknown Source)" },
596 { 6 , "Join Failure (Incorrect Data)" },
597 { 7 , "Join Failure (Session ID Already in Use)" },
598 { 8 , "Join Failure (WTP Hardware Not Supported)" },
599 { 9 , "Join Failure (Binding Not Supported)" },
600 { 10, "Reset Failure (Unable to Reset)" },
601 { 11, "Reset Failure (Firmware Write Error)" },
602 { 12, "Configuration Failure (Unable to Apply Requested Configuration - Service Provided Anyhow)" },
603 { 13, "Configuration Failure (Unable to Apply Requested Configuration - Service Not Provided)" },
604 { 14, "Image Data Error (Invalid Checksum)" },
605 { 15, "Image Data Error (Invalid Data Length)" },
606 { 16, "Image Data Error (Other Error)" },
607 { 17, "Image Data Error (Image Already Present)" },
608 { 18, "Message Unexpected (Invalid in Current State)" },
609 { 19, "Message Unexpected (Unrecognized Request)" },
610 { 20, "Failure - Missing Mandatory Message Element" },
611 { 21, "Failure - Unrecognized Message Element" },
612 { 22, "Data Transfer Error (No Information to Transfer)" },
615 /* ************************************************************************* */
616 /* Radio MAC Address Field */
617 /* ************************************************************************* */
618 static const value_string rmac_field_vals[] = {
621 { 2, "Not Supported" },
624 /* ************************************************************************* */
625 /* Board Data Type Value */
626 /* ************************************************************************* */
627 #define BOARD_DATA_WTP_MODEL_NUMBER 0
628 #define BOARD_DATA_WTP_SERIAL_NUMBER 1
629 #define BOARD_DATA_BOARD_ID 2
630 #define BOARD_DATA_BOARD_REVISION 3
631 #define BOARD_DATA_BASE_MAC_ADDRESS 4
633 static const value_string board_data_type_vals[] = {
634 { BOARD_DATA_WTP_MODEL_NUMBER, "WTP Model Number" },
635 { BOARD_DATA_WTP_SERIAL_NUMBER, "WTP Serial Number" },
636 { BOARD_DATA_BOARD_ID, "Board ID" },
637 { BOARD_DATA_BOARD_REVISION, "Board Revision" },
638 { BOARD_DATA_BASE_MAC_ADDRESS, "Base MAC Address" },
641 /* ************************************************************************* */
642 /* Descriptor WTP Type Value */
643 /* ************************************************************************* */
644 #define WTP_DESCRIPTOR_HARDWARE_VERSION 0
645 #define WTP_DESCRIPTOR_ACTIVE_SOFTWARE_VERSION 1
646 #define WTP_DESCRIPTOR_BOOT_VERSION 2
647 #define WTP_DESCRIPTOR_OTHER_SOFTWARE_VERSION 3
649 static const value_string wtp_descriptor_type_vals[] = {
650 { WTP_DESCRIPTOR_HARDWARE_VERSION, "WTP Hardware Version" },
651 { WTP_DESCRIPTOR_ACTIVE_SOFTWARE_VERSION, "WTP Active Software Version" },
652 { WTP_DESCRIPTOR_BOOT_VERSION, "WTP Boot Version" },
653 { WTP_DESCRIPTOR_OTHER_SOFTWARE_VERSION, "WTP Other Software Version" },
656 /* ************************************************************************* */
657 /* AC Information Type Value */
658 /* ************************************************************************* */
659 #define AC_INFORMATION_HARDWARE_VERSION 4
660 #define AC_INFORMATION_SOFTWARE_VERSION 5
662 static const value_string ac_information_type_vals[] = {
663 { AC_INFORMATION_HARDWARE_VERSION, "AC Hardware Version" },
664 { AC_INFORMATION_SOFTWARE_VERSION, "AC Software Version" },
667 /* ************************************************************************* */
669 /* ************************************************************************* */
670 static const value_string wtp_mac_vals[] = {
673 { 2, "Both (Local and Split MAC)" },
676 /* ************************************************************************* */
678 /* ************************************************************************* */
679 static const value_string wtp_fallback_vals[] = {
685 /* ************************************************************************* */
686 /* Last Failure Type */
687 /* ************************************************************************* */
688 static const value_string last_failure_type_vals[] = {
689 { 0, "Not Supported" },
690 { 1, "AC Initiated" },
691 { 2, "Link Failure" },
692 { 3, "Software Failure" },
693 { 4, "Hardware Failure" },
694 { 5, "Other Failure" },
695 { 255, "Unknown (e.g., WTP doesn't keep track of info)" },
699 static void capwap_reassemble_init(void)
701 fragment_table_init(&capwap_fragment_table);
702 reassembled_table_init(&capwap_reassembled_table);
706 dissect_capwap_data_message_bindings_ieee80211(tvbuff_t *tvb, proto_tree *data_message_binding_tree, guint offset, packet_info *pinfo)
708 proto_item *data_message_binding_item;
709 proto_tree *sub_data_message_binding_tree;
711 if (global_capwap_data_udp_port == pinfo->destport)
713 /* (WTP -> AC) IEEE 802.11 Frame Info */
714 data_message_binding_item = proto_tree_add_item(data_message_binding_tree, hf_capwap_header_wireless_data_ieee80211_fi,tvb, offset, 4, ENC_NA);
715 sub_data_message_binding_tree = proto_item_add_subtree(data_message_binding_item, ett_capwap);
717 proto_tree_add_item(sub_data_message_binding_tree, hf_capwap_header_wireless_data_ieee80211_fi_rssi,tvb, offset, 1, ENC_BIG_ENDIAN);
719 proto_tree_add_item(sub_data_message_binding_tree, hf_capwap_header_wireless_data_ieee80211_fi_snr,tvb, offset+1, 1, ENC_BIG_ENDIAN);
721 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);
725 /* (AC -> WTP) IEEE 802.11 Destination Wlans */
726 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);
727 sub_data_message_binding_tree = proto_item_add_subtree(data_message_binding_item, ett_capwap);
729 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);
731 proto_tree_add_item(sub_data_message_binding_tree, hf_capwap_header_wireless_data_ieee80211_dw_reserved,tvb, offset+2, 2, ENC_BIG_ENDIAN);
736 dissect_capwap_encryption_capabilities(tvbuff_t *tvb, proto_tree *encryption_capabilities_tree, guint offset)
738 guint wbid,encryption_capabilities = 0;
739 proto_item *encryption_capabilities_item;
740 proto_tree *sub_encryption_capabilities_tree;
742 encryption_capabilities = tvb_get_ntohs(tvb, offset+1);
743 wbid = tvb_get_bits8(tvb, offset*8+3,5);
745 encryption_capabilities_item = proto_tree_add_text(encryption_capabilities_tree, tvb, offset, 3, "Encryption Capabilities: (WBID=%d) %d", wbid, encryption_capabilities);
746 sub_encryption_capabilities_tree = proto_item_add_subtree(encryption_capabilities_item, ett_capwap);
748 proto_tree_add_uint(sub_encryption_capabilities_tree,hf_capwap_msg_element_type_wtp_descriptor_encrypt_reserved, tvb, offset, 1, tvb_get_bits8(tvb, offset*8,3));
750 proto_tree_add_uint(sub_encryption_capabilities_tree,hf_capwap_msg_element_type_wtp_descriptor_encrypt_wbid, tvb, offset, 1, wbid);
752 proto_tree_add_item(sub_encryption_capabilities_tree, hf_capwap_msg_element_type_wtp_descriptor_encrypt_capabilities, tvb, offset+1, 2, ENC_BIG_ENDIAN);
755 /* Returns the number of bytes consumed by this option. */
757 dissect_capwap_ac_information(tvbuff_t *tvb, proto_tree *ac_information_type_tree, guint offset)
759 guint optlen,ac_information_type = 0;
760 proto_item *ac_information_type_item;
761 proto_tree *sub_ac_information_type_tree;
763 ac_information_type = tvb_get_ntohs(tvb, offset+4);
764 optlen = tvb_get_ntohs(tvb, offset+6);
765 ac_information_type_item = proto_tree_add_text(ac_information_type_tree, tvb, offset, 4+2+2+optlen, "AC Information Type: (t=%d,l=%d) %s", ac_information_type, optlen, val_to_str(ac_information_type,ac_information_type_vals,"Unknown AC Information Type (%02d)") );
766 sub_ac_information_type_tree = proto_item_add_subtree(ac_information_type_item, ett_capwap);
768 proto_tree_add_item(sub_ac_information_type_tree, hf_capwap_msg_element_type_ac_information_vendor, tvb, offset, 4, ENC_BIG_ENDIAN);
770 proto_tree_add_item(sub_ac_information_type_tree, hf_capwap_msg_element_type_ac_information_type, tvb, offset+4, 2, ENC_BIG_ENDIAN);
772 proto_tree_add_item(sub_ac_information_type_tree, hf_capwap_msg_element_type_ac_information_length, tvb, offset+6, 2, ENC_BIG_ENDIAN);
774 proto_tree_add_item(sub_ac_information_type_tree, hf_capwap_msg_element_type_ac_information_value, tvb, offset+8, optlen, ENC_NA);
775 switch (ac_information_type) {
776 case AC_INFORMATION_HARDWARE_VERSION:
777 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);
780 case AC_INFORMATION_SOFTWARE_VERSION:
781 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);
785 /* No Default Action */
791 /* Returns the number of bytes consumed by this option. */
793 dissect_capwap_wtp_descriptor(tvbuff_t *tvb, proto_tree *wtp_descriptor_type_tree, guint offset)
795 guint optlen,wtp_descriptor_type = 0;
796 proto_item *wtp_descriptor_type_item;
797 proto_tree *sub_wtp_descriptor_type_tree;
799 wtp_descriptor_type = tvb_get_ntohs(tvb, offset+4);
800 optlen = tvb_get_ntohs(tvb, offset+6);
801 wtp_descriptor_type_item = proto_tree_add_text(wtp_descriptor_type_tree, tvb, offset, 4+2+2+optlen, "WTP Descriptor Type: (t=%d,l=%d) %s", wtp_descriptor_type, optlen, val_to_str(wtp_descriptor_type,wtp_descriptor_type_vals,"Unknown WTP Descriptor Type (%02d)") );
802 sub_wtp_descriptor_type_tree = proto_item_add_subtree(wtp_descriptor_type_item, ett_capwap);
804 proto_tree_add_item(sub_wtp_descriptor_type_tree, hf_capwap_msg_element_type_wtp_descriptor_vendor, tvb, offset, 4, ENC_BIG_ENDIAN);
806 proto_tree_add_item(sub_wtp_descriptor_type_tree, hf_capwap_msg_element_type_wtp_descriptor_type, tvb, offset+4, 2, ENC_BIG_ENDIAN);
808 proto_tree_add_item(sub_wtp_descriptor_type_tree, hf_capwap_msg_element_type_wtp_descriptor_length, tvb, offset+6, 2, ENC_BIG_ENDIAN);
810 proto_tree_add_item(sub_wtp_descriptor_type_tree, hf_capwap_msg_element_type_wtp_descriptor_value, tvb, offset+8, optlen, ENC_NA);
812 switch (wtp_descriptor_type) {
813 case WTP_DESCRIPTOR_HARDWARE_VERSION:
814 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);
817 case WTP_DESCRIPTOR_ACTIVE_SOFTWARE_VERSION:
818 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);
821 case WTP_DESCRIPTOR_BOOT_VERSION:
822 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);
825 case WTP_DESCRIPTOR_OTHER_SOFTWARE_VERSION:
826 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);
830 /* No Default Action */
837 /* Returns the number of bytes consumed by this option. */
839 dissect_capwap_board_data(tvbuff_t *tvb, proto_tree *board_data_type_tree, guint offset)
841 guint optlen,board_data_type = 0;
842 proto_item *board_data_type_item;
843 proto_tree *sub_board_data_type_tree;
845 board_data_type = tvb_get_ntohs(tvb, offset);
846 optlen = tvb_get_ntohs(tvb, offset+2);
847 board_data_type_item = proto_tree_add_text(board_data_type_tree, tvb, offset, 2+2+optlen, "Board Data Type: (t=%d,l=%d) %s", board_data_type, optlen, val_to_str(board_data_type,board_data_type_vals,"Unknown Board Data Type (%02d)") );
848 sub_board_data_type_tree = proto_item_add_subtree(board_data_type_item, ett_capwap);
850 proto_tree_add_item(sub_board_data_type_tree, hf_capwap_msg_element_type_wtp_board_data_type,tvb, offset, 2, ENC_BIG_ENDIAN);
852 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);
854 proto_tree_add_item(sub_board_data_type_tree, hf_capwap_msg_element_type_wtp_board_data_value, tvb, offset+4, optlen, ENC_NA);
855 switch (board_data_type) {
856 case BOARD_DATA_WTP_MODEL_NUMBER:
857 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);
860 case BOARD_DATA_WTP_SERIAL_NUMBER:
861 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);
864 case BOARD_DATA_BOARD_ID:
865 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);
868 case BOARD_DATA_BOARD_REVISION:
869 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);
872 case BOARD_DATA_BASE_MAC_ADDRESS:
873 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);
877 /* No Default Action */
884 /* Returns the number of bytes consumed by this option. */
886 dissect_capwap_message_element_type(tvbuff_t *tvb, proto_tree *msg_element_type_tree, guint offset)
888 guint optlen, offset_end, number_encrypt, i, msg_element_type = 0;
889 proto_item *msg_element_type_item, *msg_element_type_item_flag;
890 proto_tree *sub_msg_element_type_tree, *sub_msg_element_type_flag_tree;
892 msg_element_type = tvb_get_ntohs(tvb, offset);
893 optlen = tvb_get_ntohs(tvb, offset+2);
894 msg_element_type_item = proto_tree_add_text(msg_element_type_tree, tvb, offset, 2+2+optlen, "Type: (t=%d,l=%d) %s", msg_element_type, optlen, val_to_str(msg_element_type,message_element_type_vals,"Unknown Message Element Type (%02d)") );
895 sub_msg_element_type_tree = proto_item_add_subtree(msg_element_type_item, ett_capwap);
897 proto_tree_add_item(sub_msg_element_type_tree, hf_capwap_msg_element_type,tvb, offset, 2, ENC_BIG_ENDIAN);
899 proto_tree_add_item(sub_msg_element_type_tree, hf_capwap_msg_element_length, tvb, offset+2, 2, ENC_BIG_ENDIAN);
901 proto_tree_add_item(sub_msg_element_type_tree, hf_capwap_msg_element_value, tvb, offset+4, optlen, ENC_NA);
903 switch (msg_element_type) {
904 case TYPE_AC_DESCRIPTOR: /* AC Descriptor (1) */
905 proto_tree_add_item(sub_msg_element_type_tree, hf_capwap_msg_element_type_ac_descriptor_stations, tvb, offset+4, 2, ENC_BIG_ENDIAN);
906 proto_tree_add_item(sub_msg_element_type_tree, hf_capwap_msg_element_type_ac_descriptor_limit, tvb, offset+6, 2, ENC_BIG_ENDIAN);
907 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);
908 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);
910 /* AC Descriptor Security Flags... */
911 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);
912 sub_msg_element_type_flag_tree = proto_item_add_subtree(msg_element_type_item_flag, ett_capwap);
914 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);
915 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);
916 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);
918 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);
919 proto_tree_add_item(sub_msg_element_type_tree, hf_capwap_msg_element_type_ac_descriptor_reserved, tvb, offset+14, 1, ENC_BIG_ENDIAN);
921 /* AC Descriptor DTLS Flags... */
922 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);
923 sub_msg_element_type_flag_tree = proto_item_add_subtree(msg_element_type_item_flag, ett_capwap);
925 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);
926 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);
927 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);
929 offset_end = offset + optlen -4;
931 while (offset < offset_end) {
932 offset += dissect_capwap_ac_information(tvb, sub_msg_element_type_tree, offset);
936 case TYPE_AC_IPV4_LIST: /* AC IPv4 List (2) */
937 offset_end = offset + 4 + optlen;
942 while (offset_end-offset > 0)
944 proto_tree_add_item(sub_msg_element_type_tree, hf_capwap_msg_element_type_ac_ipv4_list, tvb, offset, 4, ENC_BIG_ENDIAN);
950 case TYPE_AC_IPV6_LIST: /* AC IPv6 List (3) */
951 offset_end = offset + 4 + optlen;
956 while (offset_end-offset > 0)
958 proto_tree_add_item(sub_msg_element_type_tree, hf_capwap_msg_element_type_ac_ipv6_list, tvb, offset, 16, ENC_NA);
964 case TYPE_AC_NAME: /* AC Name (4) */
965 proto_tree_add_item(sub_msg_element_type_tree, hf_capwap_msg_element_type_ac_name, tvb, offset+4, optlen, ENC_ASCII|ENC_NA);
968 case TYPE_AC_NAME_W_PRIORITY: /* AC Name With Priority (5) */
969 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);
970 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);
973 case TYPE_CAPWAP_CONTROL_IPV4_ADDRESS: /* CAPWAP Control IPv4 Address (10) */
974 proto_tree_add_item(sub_msg_element_type_tree, hf_capwap_msg_element_type_capwap_control_ipv4, tvb, offset+4, 4, ENC_BIG_ENDIAN);
975 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);
978 case TYPE_CAPWAP_CONTROL_IPV6_ADDRESS: /* CAPWAP Control IPv6 Address (11) */
979 proto_tree_add_item(sub_msg_element_type_tree, hf_capwap_msg_element_type_capwap_control_ipv6, tvb, offset+4, 16, ENC_NA);
980 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);
983 case TYPE_CAPWAP_TIMERS: /* CAPWAP Timers (12) */
984 proto_tree_add_item(sub_msg_element_type_tree, hf_capwap_msg_element_type_capwap_timers_discovery, tvb, offset+4, 1, ENC_BIG_ENDIAN);
985 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);
988 case TYPE_DECRYPTION_ERROR_REPORT_PERIOD: /* Decryption Error Report Period (16) */
989 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);
990 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);
993 case TYPE_DISCOVERY_TYPE: /* Discovery Type (20) */
994 proto_tree_add_item(sub_msg_element_type_tree, hf_capwap_msg_element_type_discovery_type, tvb, offset+4, optlen, ENC_BIG_ENDIAN);
996 case TYPE_IDLE_TIMEOUT: /* Idle Timeout (23) */
997 proto_tree_add_item(sub_msg_element_type_tree, hf_capwap_msg_element_type_idle_timeout, tvb, offset+4, 4, ENC_BIG_ENDIAN);
1000 case TYPE_LOCATION_DATA: /* Location Data (28) */
1001 proto_tree_add_item(sub_msg_element_type_tree, hf_capwap_msg_element_type_location_data, tvb, offset+4, optlen, ENC_ASCII|ENC_NA);
1004 case TYPE_MAXIMUM_MESSAGE_LENGTH: /* Maximum Message Length (29) */
1005 proto_tree_add_item(sub_msg_element_type_tree, hf_capwap_msg_element_type_maximum_message_length, tvb, offset+4, 2, ENC_BIG_ENDIAN);
1008 case TYPE_RADIO_ADMINISTRATIVE_STATE: /* Radio Administrative State (31) */
1009 proto_tree_add_item(sub_msg_element_type_tree, hf_capwap_msg_element_type_radio_admin_id, tvb, offset+4, 1, ENC_BIG_ENDIAN);
1010 proto_tree_add_item(sub_msg_element_type_tree, hf_capwap_msg_element_type_radio_admin_state, tvb, offset+5, 1, ENC_BIG_ENDIAN);
1014 case TYPE_RADIO_OPERATIONAL_STATE: /* Radio Operational State (32) */
1015 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);
1016 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);
1017 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);
1020 case TYPE_RESULT_CODE: /* Result Code (33) */
1021 proto_tree_add_item(sub_msg_element_type_tree, hf_capwap_msg_element_type_result_code, tvb, offset+4, optlen, ENC_BIG_ENDIAN);
1025 case TYPE_SESSION_ID: /* Session ID (35) */
1026 proto_tree_add_item(sub_msg_element_type_tree, hf_capwap_msg_element_type_session_id, tvb, offset+4, optlen, ENC_NA);
1029 case TYPE_STATISTICS_TIMER: /* Statistics Timer (36) */
1030 proto_tree_add_item(sub_msg_element_type_tree, hf_capwap_msg_element_type_statistics_timer, tvb, offset+4, 2, ENC_BIG_ENDIAN);
1033 case TYPE_VENDOR_SPECIFIC_PAYLOAD: /* Vendor Specific Payload (37) */
1034 proto_tree_add_item(sub_msg_element_type_tree, hf_capwap_msg_element_type_vsp_vendor_identifier, tvb, offset+4, 4, ENC_BIG_ENDIAN);
1035 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);
1036 proto_tree_add_item(sub_msg_element_type_tree, hf_capwap_msg_element_type_vsp_vendor_data, tvb, offset+10, optlen-6, ENC_NA);
1039 case TYPE_WTP_BOARD_DATA: /* WTP Board Data (38) */
1040 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);
1042 offset_end = offset + optlen -4;
1043 while (offset < offset_end) {
1044 offset += dissect_capwap_board_data(tvb, sub_msg_element_type_tree, offset);
1048 case TYPE_WTP_DESCRIPTOR: /* WTP Descriptor (39) */
1049 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);
1050 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);
1051 if (global_capwap_draft_8_cisco == 0)
1053 number_encrypt = tvb_get_guint8(tvb,offset+6);
1054 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);
1055 sub_msg_element_type_flag_tree = proto_item_add_subtree(msg_element_type_item_flag, ett_capwap);
1056 for (i=0; i < number_encrypt; i++) {
1057 dissect_capwap_encryption_capabilities(tvb, sub_msg_element_type_flag_tree, offset+4+3+i*3);
1059 offset_end = offset + optlen -4;
1060 offset += 4 + 3 + number_encrypt * 3;
1064 /*in Draft 8, there is only one "encryption_capabilities*/
1065 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);
1066 offset_end = offset + optlen -4;
1069 while (offset < offset_end) {
1070 offset += dissect_capwap_wtp_descriptor(tvb, sub_msg_element_type_tree, offset);
1074 case TYPE_WTP_FALLBACK: /* WTP Fallback (40) */
1075 proto_tree_add_item(sub_msg_element_type_tree, hf_capwap_msg_element_type_wtp_fallback, tvb, offset+4, 1, ENC_BIG_ENDIAN);
1078 case TYPE_WTP_FRAME_TUNNEL_MODE: /* WTP Frame Tunnel Mode (41) */
1079 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);
1080 sub_msg_element_type_flag_tree = proto_item_add_subtree(msg_element_type_item_flag, ett_capwap);
1082 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);
1083 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);
1084 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);
1085 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);
1088 case TYPE_WTP_MAC_TYPE: /* WTP MAC Type (44) */
1089 proto_tree_add_item(sub_msg_element_type_tree, hf_capwap_msg_element_type_wtp_mac_type, tvb, offset+4, optlen, ENC_BIG_ENDIAN);
1092 case TYPE_WTP_NAME: /* WTP Name (45) */
1093 proto_tree_add_item(sub_msg_element_type_tree, hf_capwap_msg_element_type_wtp_name, tvb, offset+4, optlen, ENC_ASCII|ENC_NA);
1096 case TYPE_WTP_REBOOT_STATISTICS: /* WTP Reboot Statistics (48) */
1097 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);
1098 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);
1099 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);
1100 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);
1101 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);
1102 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);
1103 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);
1104 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);
1107 case IEEE80211_RATE_SET: /* ieee80211 Rate Set (1034) */
1108 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);
1109 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);
1112 case IEEE80211_STATION_SESSION_KEY: /* ieee80211 Station Session Key (1038) */
1113 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);
1114 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);
1115 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);
1116 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);
1117 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);
1118 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);
1119 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);
1122 case IEEE80211_WTP_RADIO_INFORMATION: /* ieee80211 WTP Radio Information (1048) */
1123 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);
1124 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);
1125 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);
1126 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);
1127 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);
1128 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);
1132 /* No Default Action */
1139 /* Returns the number of bytes consumed by this option. */
1141 dissect_capwap_message_element(tvbuff_t *tvb, proto_tree *capwap_control_tree, guint offset)
1143 guint plen = 0, offset_end;
1145 proto_tree *capwap_message_element_tree;
1147 ti = proto_tree_add_item(capwap_control_tree, hf_capwap_message_element, tvb, offset, tvb_reported_length(tvb) - offset, ENC_NA);
1148 capwap_message_element_tree = proto_item_add_subtree(ti, ett_capwap);
1150 offset_end = tvb_reported_length(tvb);
1152 while (offset+plen < offset_end) {
1153 plen += dissect_capwap_message_element_type(tvb, capwap_message_element_tree, offset+plen);
1159 /* Returns the number of bytes consumed by this option. */
1161 dissect_capwap_control_header(tvbuff_t *tvb, proto_tree *capwap_control_tree, guint offset, packet_info *pinfo)
1164 proto_item *ti, *ti_flag;
1165 proto_tree *capwap_control_header_tree;
1166 proto_tree *capwap_control_msg_type_tree;
1168 ti = proto_tree_add_item(capwap_control_tree, hf_capwap_control_header, tvb, offset, 8, ENC_NA);
1169 capwap_control_header_tree = proto_item_add_subtree(ti, ett_capwap);
1171 /* Message Type 32 bits */
1172 ti_flag = proto_tree_add_item(capwap_control_header_tree, hf_capwap_control_header_msg_type, tvb, offset, 4, ENC_BIG_ENDIAN);
1173 capwap_control_msg_type_tree = proto_item_add_subtree(ti_flag, ett_capwap);
1175 proto_tree_add_item(capwap_control_msg_type_tree, hf_capwap_control_header_msg_type_enterprise_nbr, tvb, offset, 3, ENC_BIG_ENDIAN);
1176 proto_tree_add_item(capwap_control_msg_type_tree, hf_capwap_control_header_msg_type_enterprise_specific, tvb, offset+3, 1, ENC_BIG_ENDIAN);
1178 col_append_fstr(pinfo->cinfo, COL_INFO, " - %s",val_to_str(tvb_get_guint8(tvb, offset+3),message_type,"Unknown Message Type (0x%02x)"));
1181 /* Sequence 8 bits */
1182 proto_tree_add_item(capwap_control_header_tree, hf_capwap_control_header_seq_number, tvb, offset+plen, 1, ENC_BIG_ENDIAN);
1185 /* Message Element Length 16 bits */
1186 proto_tree_add_item(capwap_control_header_tree, hf_capwap_control_header_msg_element_length, tvb, offset+plen, 2, ENC_BIG_ENDIAN);
1189 proto_tree_add_item(capwap_control_header_tree, hf_capwap_control_header_flags, tvb, offset+plen, 1, ENC_BIG_ENDIAN);
1194 /* Returns the number of bytes consumed by this option. */
1196 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)
1199 proto_item *ti, *ti_flag;
1200 proto_tree *capwap_header_tree;
1201 proto_tree *capwap_header_flags_tree;
1203 guint8 maclength, wirelesslength;
1206 /* RFC 5415 HLEN: A 5-bit field containing the length of the CAPWAP transport header in 4-byte words */
1207 /* As we display the preamble separately reduce the length by 1 */
1208 ti = proto_tree_add_item(capwap_control_tree, hf_capwap_header, tvb, offset+plen, ((tvb_get_bits8(tvb, (offset+plen)*8, 5))*4)-1, ENC_NA);
1209 capwap_header_tree = proto_item_add_subtree(ti, ett_capwap);
1211 /* Header Length : 5 Bits */
1212 proto_tree_add_uint(capwap_header_tree, hf_capwap_header_hlen, tvb, offset+plen, 1, tvb_get_bits8(tvb, (offset+plen)*8, 5));
1213 /* Radio ID : 5 Bits */
1214 proto_tree_add_uint(capwap_header_tree, hf_capwap_header_rid, tvb, offset+plen, 1, tvb_get_bits8(tvb, (offset+plen)*8+5, 5));
1216 /* Wireless Binding ID : 5 Bits */
1217 proto_tree_add_uint(capwap_header_tree, hf_capwap_header_wbid, tvb, offset+plen, 1, tvb_get_bits8(tvb, (offset+plen)*8+10, 5));
1219 /* WBid of Payload (for CAPWAP Data Packet) */
1220 *payload_wbid = tvb_get_bits8(tvb, (offset+plen)*8+10, 5);
1223 /* Flags : 9 Bits */
1224 flags = tvb_get_bits16(tvb, (offset+plen)*8+7, 9, ENC_BIG_ENDIAN);
1225 ti_flag = proto_tree_add_uint_format(capwap_header_tree, hf_capwap_header_flags, tvb, offset+plen, 1, 0, "Header flags");
1226 capwap_header_flags_tree = proto_item_add_subtree(ti_flag, ett_capwap);
1228 proto_tree_add_boolean(capwap_header_flags_tree, hf_capwap_header_flags_t, tvb, offset+plen, 1, flags);
1229 proto_tree_add_boolean(capwap_header_flags_tree, hf_capwap_header_flags_f, tvb, offset+plen, 1, flags);
1230 proto_tree_add_boolean(capwap_header_flags_tree, hf_capwap_header_flags_l, tvb, offset+plen, 1, flags);
1231 proto_tree_add_boolean(capwap_header_flags_tree, hf_capwap_header_flags_w, tvb, offset+plen, 1, flags);
1232 proto_tree_add_boolean(capwap_header_flags_tree, hf_capwap_header_flags_m, tvb, offset+plen, 1, flags);
1233 proto_tree_add_boolean(capwap_header_flags_tree, hf_capwap_header_flags_k, tvb, offset+plen, 1, flags);
1234 proto_tree_add_boolean(capwap_header_flags_tree, hf_capwap_header_flags_r, tvb, offset+plen, 1, flags);
1237 *fragment_is = ((flags & 0x80) == 0x80) ? TRUE : FALSE;
1238 *fragment_more = ((flags &0x40) == 0x40) ? FALSE : TRUE;
1240 /* Type of Payload (for CAPWAP Data Packet) */
1241 *payload_type = tvb_get_bits8(tvb, (offset+plen)*8+7,1);
1245 /* Fragment ID : 16 Bits */
1246 proto_tree_add_item(capwap_header_tree, hf_capwap_header_fragment_id, tvb, offset+plen, 2, ENC_BIG_ENDIAN);
1247 *fragment_id = (guint32)tvb_get_ntohs(tvb, offset+plen);
1250 /* Fragment offset : 13 Bits */
1251 /* FIXME: Use _item and mask in hf element */
1252 proto_tree_add_uint(capwap_header_tree, hf_capwap_header_fragment_offset, tvb, offset+plen, 2, tvb_get_bits16(tvb, (offset+plen)*8, 13, ENC_BIG_ENDIAN));
1253 *fragment_offset = 8 * (guint32)tvb_get_bits16(tvb, (offset+plen)*8, 13, ENC_BIG_ENDIAN);
1255 /* Reserved 3 Bits */
1256 /* FIXME: Use _item and mask in hf element */
1257 proto_tree_add_uint(capwap_header_tree, hf_capwap_header_reserved, tvb, offset+plen+1, 1, tvb_get_bits8(tvb, (offset+plen)*8+13, 3));
1259 /* Optionnal Headers */
1260 if (flags & 0x10 /* Radio MAC address */) {
1261 maclength=tvb_get_guint8(tvb, offset+plen);
1262 proto_tree_add_item(capwap_header_tree, hf_capwap_header_mac_length, tvb, offset+plen, 1, ENC_BIG_ENDIAN);
1264 if (maclength == 6) {
1265 proto_tree_add_item(capwap_header_tree, hf_capwap_header_mac_eui48, tvb, offset+plen, maclength, ENC_NA);
1267 } else if (maclength == 8) {
1268 proto_tree_add_item(capwap_header_tree, hf_capwap_header_mac_eui64, tvb, offset+plen, maclength, ENC_BIG_ENDIAN);
1270 proto_tree_add_item(capwap_header_tree, hf_capwap_header_mac_data, tvb, offset+plen, maclength, ENC_NA);
1273 /* 4 Bytes Alignment ? */
1274 align = 4-((offset+plen)%4);
1277 proto_tree_add_item(capwap_header_tree, hf_capwap_header_padding, tvb, offset+plen, align, ENC_NA);
1281 if (flags & 0x20 /* Wireless specific information */) {
1282 wirelesslength=tvb_get_guint8(tvb, offset+plen);
1284 /* in Draft 8, the WBid is add in Wireless Specific Information*/
1285 if (global_capwap_draft_8_cisco == 1)
1290 proto_tree_add_item(capwap_header_tree, hf_capwap_header_wireless_length, tvb, offset+plen, 1, ENC_BIG_ENDIAN);
1292 proto_tree_add_item(capwap_header_tree, hf_capwap_header_wireless_data, tvb, offset+plen, wirelesslength, ENC_NA);
1294 /* Optional Wireless Specific Information for ieee80211 (wbid = 1) Section 4 of RFC5416 */
1295 if (*payload_wbid == 1)
1297 dissect_capwap_data_message_bindings_ieee80211(tvb, capwap_header_tree, offset+plen, pinfo);
1300 plen += wirelesslength;
1301 /* 4 Bytes Alignment ? */
1302 align = 4-((offset+plen)%4);
1305 proto_tree_add_item(capwap_header_tree, hf_capwap_header_padding, tvb, offset+plen, align, ENC_NA);
1312 /* Returns the number of bytes consumed by this option. */
1314 dissect_capwap_preamble(tvbuff_t *tvb, proto_tree *capwap_control_tree, guint offset, guint8 *type_header)
1318 proto_tree *capwap_preamble_tree;
1320 ti = proto_tree_add_item(capwap_control_tree, hf_capwap_preamble, tvb, offset+plen, -1, ENC_NA);
1321 capwap_preamble_tree = proto_item_add_subtree(ti, ett_capwap);
1323 proto_tree_add_uint(capwap_preamble_tree, hf_capwap_preamble_version, tvb, offset+plen, 1, hi_nibble(tvb_get_guint8(tvb, offset+plen)));
1324 proto_tree_add_uint(capwap_preamble_tree, hf_capwap_preamble_type, tvb, offset+plen, 1, lo_nibble(tvb_get_guint8(tvb, offset+plen)));
1325 *type_header = lo_nibble(tvb_get_guint8(tvb, offset+plen));
1328 if (*type_header == 1) {
1329 proto_tree_add_item(capwap_preamble_tree, hf_capwap_preamble_reserved, tvb, offset+plen, 3, ENC_BIG_ENDIAN);
1332 proto_item_set_len(ti, plen);
1336 /* Code to actually dissect the packets */
1338 dissect_capwap_control(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
1340 /* Set up structures needed to add the protocol subtree and manage it */
1342 proto_tree *capwap_control_tree;
1344 tvbuff_t *next_tvb = NULL;
1346 guint8 payload_type;
1347 guint8 payload_wbid;
1348 gboolean fragment_is;
1349 gboolean fragment_more;
1350 guint32 fragment_id;
1351 guint32 fragment_offset;
1352 fragment_data *frag_msg = NULL;
1353 gboolean save_fragmented;
1355 /* Make entries in Protocol column and Info column on summary display */
1356 col_set_str(pinfo->cinfo, COL_PROTOCOL, "CAPWAP");
1357 col_set_str(pinfo->cinfo, COL_INFO, "CAPWAP-Control");
1359 ti = proto_tree_add_item(tree, proto_capwap, tvb, 0, -1, ENC_NA);
1360 capwap_control_tree = proto_item_add_subtree(ti, ett_capwap);
1362 /* CAPWAP Preamble */
1363 offset += dissect_capwap_preamble(tvb, capwap_control_tree, offset, &type_header);
1365 if (type_header == 1) {
1366 next_tvb = tvb_new_subset_remaining (tvb, offset);
1367 call_dissector(dtls_handle, next_tvb, pinfo, tree);
1372 offset += dissect_capwap_header(tvb, capwap_control_tree, offset, pinfo, &payload_type, &payload_wbid, &fragment_is, &fragment_more, &fragment_id, &fragment_offset );
1374 /* CAPWAP Reassemble */
1375 save_fragmented = pinfo->fragmented;
1377 if (global_capwap_reassemble && fragment_is)
1379 const int len_rem = tvb_length_remaining(tvb, offset);
1383 pinfo->fragmented = TRUE;
1385 frag_msg = fragment_add_check(tvb, offset, pinfo,fragment_id,
1386 capwap_fragment_table,
1387 capwap_reassembled_table,
1392 next_tvb = process_reassembled_data(tvb, offset, pinfo,
1393 "Reassembled CAPWAP", frag_msg,
1394 &capwap_frag_items, NULL, tree);
1396 if (next_tvb == NULL)
1397 { /* make a new subset */
1398 next_tvb = tvb_new_subset_remaining(tvb, offset);
1399 call_dissector(data_handle, next_tvb, pinfo, tree);
1400 col_append_fstr(pinfo->cinfo, COL_INFO, " (Fragment ID: %u, Fragment Offset: %u)", fragment_id, fragment_offset);
1404 /* CAPWAP Control Header */
1405 offset = dissect_capwap_control_header(next_tvb, capwap_control_tree, 0, pinfo);
1407 /* CAPWAP Message Element */
1408 offset += dissect_capwap_message_element(next_tvb, capwap_control_tree, offset);
1409 col_append_fstr(pinfo->cinfo, COL_INFO, " (Reassembled, Fragment ID: %u)", fragment_id);
1414 /* CAPWAP Control Header */
1415 offset += dissect_capwap_control_header(tvb, capwap_control_tree, offset, pinfo);
1417 /* CAPWAP Message Element */
1418 offset += dissect_capwap_message_element(tvb, capwap_control_tree, offset);
1420 pinfo->fragmented = save_fragmented;
1424 /* Code to actually dissect the packets */
1426 dissect_capwap_data(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
1428 /* Set up structures needed to add the protocol subtree and manage it */
1430 proto_tree *capwap_data_tree;
1434 guint8 payload_type;
1435 guint8 payload_wbid;
1436 gboolean fragment_is;
1437 gboolean fragment_more;
1438 guint32 fragment_id;
1439 guint32 fragment_offset;
1440 fragment_data *frag_msg = NULL;
1441 gboolean save_fragmented;
1443 /* Make entries in Protocol column and Info column on summary display */
1444 col_set_str(pinfo->cinfo, COL_PROTOCOL, "CAPWAP");
1445 col_set_str(pinfo->cinfo, COL_INFO, "CAPWAP-Data");
1447 ti = proto_tree_add_item(tree, proto_capwap, tvb, 0, -1, ENC_NA);
1448 capwap_data_tree = proto_item_add_subtree(ti, ett_capwap);
1450 /* CAPWAP Preamble */
1451 offset += dissect_capwap_preamble(tvb, capwap_data_tree, offset, &type_header);
1453 if (type_header == 1) {
1454 next_tvb = tvb_new_subset_remaining (tvb, offset);
1455 call_dissector(dtls_handle, next_tvb, pinfo, tree);
1460 offset += dissect_capwap_header(tvb, capwap_data_tree, offset, pinfo, &payload_type, &payload_wbid, &fragment_is, &fragment_more, &fragment_id, &fragment_offset);
1462 /* CAPWAP Reassemble */
1463 save_fragmented = pinfo->fragmented;
1465 if (global_capwap_reassemble && fragment_is)
1467 gint len_rem = tvb_length_remaining(tvb, offset);
1471 pinfo->fragmented = TRUE;
1473 frag_msg = fragment_add_check(tvb, offset, pinfo,fragment_id,
1474 capwap_fragment_table,
1475 capwap_reassembled_table,
1480 next_tvb = process_reassembled_data(tvb, offset, pinfo,
1481 "Reassembled CAPWAP", frag_msg,
1482 &capwap_frag_items, NULL, tree);
1484 if (next_tvb == NULL)
1485 { /* make a new subset */
1486 next_tvb = tvb_new_subset_remaining(tvb, offset);
1487 call_dissector(data_handle,next_tvb, pinfo, tree);
1488 col_append_fstr(pinfo->cinfo, COL_INFO, " (Fragment ID: %u, Fragment Offset: %u)", fragment_id, fragment_offset);
1492 col_append_fstr(pinfo->cinfo, COL_INFO, " (Reassembled, Fragment ID: %u)", fragment_id);
1497 next_tvb = tvb_new_subset_remaining (tvb, offset);
1500 /* CAPWAP Data Payload */
1501 if (payload_type == 0) {
1502 /* IEEE 802.3 Frame */
1503 call_dissector(ieee8023_handle, next_tvb, pinfo, tree);
1505 switch (payload_wbid) {
1506 case 0: /* Reserved - Cisco seems to use this instead of 1 */
1507 /* It seems that just calling ieee80211_handle is not
1508 * quite enough to get this right, so call data_handle
1511 call_dissector(data_handle, next_tvb, pinfo, tree);
1513 case 1: /* IEEE 802.11 */
1514 call_dissector(global_capwap_swap_frame_control ? ieee80211_bsfc_handle : ieee80211_handle, next_tvb, pinfo, tree);
1516 default: /* Unknown Data */
1517 call_dissector(data_handle, next_tvb, pinfo, tree);
1521 pinfo->fragmented = save_fragmented;
1526 proto_register_capwap_control(void)
1528 module_t *capwap_module;
1530 static hf_register_info hf[] = {
1532 { &hf_capwap_preamble,
1533 { "Preamble", "capwap.preamble",
1534 FT_NONE, BASE_NONE, NULL, 0x0,
1536 { &hf_capwap_preamble_version,
1537 { "Version", "capwap.preamble.version",
1538 FT_UINT8, BASE_DEC, NULL, 0x0,
1539 "Version of CAPWAP", HFILL }},
1540 { &hf_capwap_preamble_type,
1541 { "Type", "capwap.preamble.type",
1542 FT_UINT8, BASE_DEC, VALS(type_header_vals), 0x0,
1543 "Type of Payload", HFILL }},
1544 { &hf_capwap_preamble_reserved,
1545 { "Reserved", "capwap.preamble.reserved",
1546 FT_UINT24, BASE_DEC, NULL, 0x0,
1549 { &hf_capwap_header,
1550 { "Header", "capwap.header",
1551 FT_NONE, BASE_NONE, NULL, 0x0,
1553 { &hf_capwap_header_hlen,
1554 { "Header Length", "capwap.header.length",
1555 FT_UINT8, BASE_DEC, NULL, 0x0,
1557 { &hf_capwap_header_rid,
1558 { "Radio ID", "capwap.header.rid",
1559 FT_UINT8, BASE_DEC, NULL, 0x0,
1561 { &hf_capwap_header_wbid,
1562 { "Wireless Binding ID", "capwap.header.wbid",
1563 FT_UINT8, BASE_DEC, VALS(type_wbid), 0x0,
1565 { &hf_capwap_header_flags,
1566 { "Header Flags", "capwap.header.flags",
1567 FT_UINT8, BASE_DEC, NULL, 0x0,
1569 { &hf_capwap_header_flags_t,
1570 { "Payload Type", "capwap.header.flags.t",
1571 FT_BOOLEAN, 9, TFS(&flag_type_t), 0x100,
1573 { &hf_capwap_header_flags_f,
1574 { "Fragment", "capwap.header.flags.f",
1575 FT_BOOLEAN, 9, TFS(&flag_type_f), 0x80,
1577 { &hf_capwap_header_flags_l,
1578 { "Last Fragment", "capwap.header.flags.l",
1579 FT_BOOLEAN, 9, TFS(&flag_type_l), 0x40,
1581 { &hf_capwap_header_flags_w,
1582 { "Wireless header", "capwap.header.flags.w",
1583 FT_BOOLEAN, 9, TFS(&flag_type_w), 0x20,
1585 { &hf_capwap_header_flags_m,
1586 { "Radio MAC header", "capwap.header.flags.m",
1587 FT_BOOLEAN, 9, TFS(&flag_type_m), 0x10,
1589 { &hf_capwap_header_flags_k,
1590 { "Keep-Alive", "capwap.header.flags.k",
1591 FT_BOOLEAN, 9, TFS(&flag_type_k), 0x08,
1593 { &hf_capwap_header_flags_r,
1594 { "Reserved", "capwap.header.flags.r",
1595 FT_BOOLEAN, 9, TFS(&tfs_set_notset), 0x07,
1597 { &hf_capwap_header_fragment_id,
1598 { "Fragment ID", "capwap.header.fragment.id",
1599 FT_UINT16, BASE_DEC, NULL, 0x00,
1601 { &hf_capwap_header_fragment_offset,
1602 { "Fragment Offset", "capwap.header.fragment.offset",
1603 FT_UINT16, BASE_DEC, NULL, 0x00,
1605 { &hf_capwap_header_reserved,
1606 { "Reserved", "capwap.header.fragment.reserved",
1607 FT_UINT8, BASE_DEC, NULL, 0x00,
1609 { &hf_capwap_header_mac_length,
1610 { "MAC length", "capwap.header.mac.length",
1611 FT_UINT8, BASE_DEC, NULL, 0x00,
1613 { &hf_capwap_header_mac_eui48,
1614 { "MAC address", "capwap.header.mac.eui48",
1615 FT_ETHER, BASE_NONE, NULL, 0x00,
1617 { &hf_capwap_header_mac_eui64,
1618 { "MAC address", "capwap.header.mac.eui64",
1619 FT_EUI64, BASE_NONE, NULL, 0x00,
1621 { &hf_capwap_header_mac_data,
1622 { "MAC address", "capwap.header.mac.data",
1623 FT_BYTES, BASE_NONE, NULL, 0x00,
1625 { &hf_capwap_header_wireless_length,
1626 { "Wireless length", "capwap.header.wireless.length",
1627 FT_UINT8, BASE_DEC, NULL, 0x00,
1629 { &hf_capwap_header_wireless_data,
1630 { "Wireless data", "capwap.header.wireless.data",
1631 FT_BYTES, BASE_NONE, NULL, 0x00,
1633 { &hf_capwap_header_wireless_data_ieee80211_fi,
1634 { "Wireless data ieee80211 Frame Info", "capwap.header.wireless.data.ieee80211.fi",
1635 FT_BYTES, BASE_NONE, NULL, 0x00,
1637 { &hf_capwap_header_wireless_data_ieee80211_fi_rssi,
1638 { "Wireless data ieee80211 RSSI (dBm)", "capwap.header.wireless.data.ieee80211.fi.rssi",
1639 FT_UINT8, BASE_DEC, NULL, 0x00,
1641 { &hf_capwap_header_wireless_data_ieee80211_fi_snr,
1642 { "Wireless data ieee80211 SNR (dB)", "capwap.header.wireless.data.ieee80211.fi.snr",
1643 FT_UINT8, BASE_DEC, NULL, 0x00,
1645 { &hf_capwap_header_wireless_data_ieee80211_fi_data_rate,
1646 { "Wireless data ieee80211 Data Rate (Mbps)", "capwap.header.wireless.data.ieee80211.fi.data_rate",
1647 FT_UINT16, BASE_DEC, NULL, 0x00,
1649 { &hf_capwap_header_wireless_data_ieee80211_dest_wlan,
1650 { "Wireless data ieee80211 Destination WLANs", "capwap.header.wireless.data.ieee80211.dw",
1651 FT_BYTES, BASE_NONE, NULL, 0x00,
1653 { &hf_capwap_header_wireless_data_ieee80211_dw_wlan_id_bitmap,
1654 { "Wireless data ieee80211 Destination Wlan Id bitmap",
1655 "capwap.header.wireless.data.ieee80211.dw.wlan_id_bitmap",
1656 FT_UINT16, BASE_DEC, NULL, 0x00,
1658 { &hf_capwap_header_wireless_data_ieee80211_dw_reserved,
1659 { "Wireless data ieee80211 Destination Wlan reserved", "capwap.header.wireless.data.ieee80211.dw.reserved",
1660 FT_UINT16, BASE_DEC, NULL, 0x00,
1662 { &hf_capwap_header_padding,
1663 { "Padding for 4 Byte Alignement", "capwap.header.padding",
1664 FT_BYTES, BASE_NONE, NULL, 0x00,
1667 /* CAPWAP Control Header Message */
1669 { &hf_capwap_control_header,
1670 { "Control Header", "capwap.control.header",
1671 FT_NONE, BASE_NONE, NULL, 0x00,
1673 { &hf_capwap_control_header_msg_type,
1674 { "Message Type", "capwap.control.header.message_type",
1675 FT_UINT32, BASE_DEC, NULL, 0x00,
1677 { &hf_capwap_control_header_msg_type_enterprise_nbr,
1678 { "Message Type (Enterprise Number)", "capwap.control.header.message_type.enterprise_number",
1679 FT_UINT32, BASE_DEC|BASE_EXT_STRING, &sminmpec_values_ext, 0x00,
1681 { &hf_capwap_control_header_msg_type_enterprise_specific,
1682 { "Message Type (Enterprise Specific)", "capwap.control.header.message_type.enterprise_specific",
1683 FT_UINT8, BASE_DEC, VALS(message_type), 0x00,
1685 { &hf_capwap_control_header_seq_number,
1686 { "Sequence Number", "capwap.control.header.sequence_number",
1687 FT_UINT8, BASE_DEC, NULL, 0x00,
1689 { &hf_capwap_control_header_msg_element_length,
1690 { "Message Element Length", "capwap.control.header.message_element_length",
1691 FT_UINT16, BASE_DEC, NULL, 0x00,
1693 { &hf_capwap_control_header_flags,
1694 { "Flags", "capwap.control.header.flags",
1695 FT_UINT8, BASE_DEC, NULL, 0x00,
1698 /* CAPWAP Protocol Message Elements */
1700 { &hf_capwap_message_element,
1701 { "Message Element", "capwap.message_element",
1702 FT_NONE, BASE_NONE, NULL, 0x00,
1704 { &hf_capwap_msg_element_type,
1705 { "Type", "capwap.message_element.type",
1706 FT_UINT16, BASE_DEC, VALS(message_element_type_vals), 0x00,
1707 "CAPWAP Message Element type", HFILL }},
1708 { &hf_capwap_msg_element_length,
1709 { "Length", "capwap.message_element.length",
1710 FT_UINT16, BASE_DEC, NULL, 0x00,
1711 "CAPWAP Message Element length", HFILL }},
1712 { &hf_capwap_msg_element_value,
1713 { "Value", "capwap.message_element.value",
1714 FT_BYTES, BASE_NONE, NULL, 0x00,
1715 "CAPWAP Message Element value", HFILL }},
1717 /* CAPWAP Protocol Message Element Type */
1720 { &hf_capwap_msg_element_type_ac_descriptor_stations,
1721 { "Stations", "capwap.control.message_element.ac_descriptor.stations",
1722 FT_UINT16, BASE_DEC, NULL, 0x00,
1724 { &hf_capwap_msg_element_type_ac_descriptor_limit,
1725 { "Limit Stations", "capwap.control.message_element.ac_descriptor.limit",
1726 FT_UINT16, BASE_DEC, NULL, 0x00,
1728 { &hf_capwap_msg_element_type_ac_descriptor_active_wtp,
1729 { "Active WTPs", "capwap.control.message_element.ac_descriptor.active_wtp",
1730 FT_UINT16, BASE_DEC, NULL, 0x00,
1732 { &hf_capwap_msg_element_type_ac_descriptor_max_wtp,
1733 { "Max WTPs", "capwap.control.message_element.ac_descriptor.max_wtp",
1734 FT_UINT16, BASE_DEC, NULL, 0x00,
1736 /* AC Descriptor Security Flags... */
1737 { &hf_capwap_msg_element_type_ac_descriptor_security,
1738 { "Security Flags", "capwap.control.message_element.ac_descriptor.security",
1739 FT_NONE, BASE_NONE, NULL, 0x0,
1741 { &hf_capwap_msg_element_type_ac_descriptor_security_s,
1742 { "AC supports the pre-shared", "capwap.control.message_element.ac_descriptor.security.s",
1743 FT_BOOLEAN, 8, TFS(&tfs_true_false), 0x04,
1745 { &hf_capwap_msg_element_type_ac_descriptor_security_x,
1746 { "AC supports X.509 Certificate", "capwap.control.message_element.ac_descriptor.security.x",
1747 FT_BOOLEAN, 8, TFS(&tfs_true_false), 0x02,
1749 { &hf_capwap_msg_element_type_ac_descriptor_security_r,
1750 { "Reserved", "capwap.control.message_element.ac_descriptor.security.r",
1751 FT_BOOLEAN, 8, TFS(&tfs_set_notset), 0xF9,
1754 { &hf_capwap_msg_element_type_ac_descriptor_rmac_field,
1755 { "R-MAC Field", "capwap.control.message_element.ac_descriptor.rmac_field",
1756 FT_UINT8, BASE_DEC, VALS(rmac_field_vals), 0x00,
1758 { &hf_capwap_msg_element_type_ac_descriptor_reserved,
1759 { "Reserved", "capwap.control.message_element.ac_descriptor.reserved",
1760 FT_UINT8, BASE_DEC, NULL, 0x00,
1762 /* AC Descriptor DTLS Policy Flags... */
1763 { &hf_capwap_msg_element_type_ac_descriptor_dtls_policy,
1764 { "DTLS Policy Flags", "capwap.control.message_element.ac_descriptor.dtls_policy",
1765 FT_NONE, BASE_NONE, NULL, 0x0,
1767 { &hf_capwap_msg_element_type_ac_descriptor_dtls_policy_d,
1768 { "DTLS-Enabled Data Channel Supported", "capwap.control.message_element.ac_descriptor.dtls_policy.d",
1769 FT_BOOLEAN, 8, TFS(&tfs_true_false), 0x04,
1771 { &hf_capwap_msg_element_type_ac_descriptor_dtls_policy_c,
1772 { "Clear Text Data Channel Supported", "capwap.control.message_element.ac_descriptor.dtls_policy.c",
1773 FT_BOOLEAN, 8, TFS(&tfs_true_false), 0x02,
1775 { &hf_capwap_msg_element_type_ac_descriptor_dtls_policy_r,
1776 { "Reserved", "capwap.control.message_element.ac_descriptor.dtls_policy.r",
1777 FT_BOOLEAN, 8, TFS(&tfs_set_notset), 0xF9,
1780 { &hf_capwap_msg_element_type_ac_information_vendor,
1781 { "AC Information Vendor", "capwap.control.message_element.ac_information.vendor",
1782 FT_UINT32, BASE_DEC|BASE_EXT_STRING, &sminmpec_values_ext, 0x00,
1784 { &hf_capwap_msg_element_type_ac_information_type,
1785 { "AC Information Type", "capwap.control.message_element.ac_information.type",
1786 FT_UINT16, BASE_DEC, VALS(ac_information_type_vals), 0x00,
1788 { &hf_capwap_msg_element_type_ac_information_length,
1789 { "AC Information Length", "capwap.control.message_element.ac_information.length",
1790 FT_UINT16, BASE_DEC, NULL, 0x0,
1793 { &hf_capwap_msg_element_type_ac_information_value,
1794 { "AC Information Value", "capwap.control.message_element.ac_information.value",
1795 FT_BYTES, BASE_NONE, NULL, 0x0,
1797 { &hf_capwap_msg_element_type_ac_information_hardware_version,
1798 { "AC Hardware Version", "capwap.control.message_element.ac_information.hardware_version",
1799 FT_STRING, BASE_NONE, NULL, 0x0,
1801 { &hf_capwap_msg_element_type_ac_information_software_version,
1802 { "AC Software Version", "capwap.control.message_element.ac_information.software_version",
1803 FT_STRING, BASE_NONE, NULL, 0x0,
1805 { &hf_capwap_msg_element_type_ac_ipv4_list,
1806 { "AC IPv4 List", "capwap.control.message_element.message_element.ac_ipv4_list",
1807 FT_IPv4, BASE_NONE, NULL, 0x00,
1809 { &hf_capwap_msg_element_type_ac_ipv6_list,
1810 { "AC IPv6 List", "capwap.control.message_element.message_element.ac_ipv6_list",
1811 FT_IPv6, BASE_NONE, NULL, 0x00,
1813 /* CAPWAP Control IPvX Address*/
1814 { &hf_capwap_msg_element_type_capwap_control_ipv4,
1815 { "CAPWAP Control IP Address", "capwap.control.message_element.message_element.capwap_control_ipv4",
1816 FT_IPv4, BASE_NONE, NULL, 0x00,
1818 { &hf_capwap_msg_element_type_capwap_control_ipv6,
1819 { "CAPWAP Control IP Address", "capwap.control.message_element.message_element.capwap_control_ipv6",
1820 FT_IPv6, BASE_NONE, NULL, 0x00,
1822 { &hf_capwap_msg_element_type_capwap_control_wtp_count,
1823 { "CAPWAP Control WTP Count", "capwap.control.message_element.capwap_control_wtp_count",
1824 FT_UINT16, BASE_DEC, NULL, 0x00,
1826 { &hf_capwap_msg_element_type_capwap_timers_discovery,
1827 { "CAPWAP Timers Discovery (Sec)", "capwap.control.message_element.capwap_timers_discovery",
1828 FT_UINT8, BASE_DEC, NULL, 0x00,
1830 { &hf_capwap_msg_element_type_capwap_timers_echo_request,
1831 { "CAPWAP Timers Echo Request (Sec)", "capwap.control.message_element.capwap_timers_echo_request",
1832 FT_UINT8, BASE_DEC, NULL, 0x00,
1834 { &hf_capwap_msg_element_type_decryption_error_report_period_radio_id,
1835 { "Decryption Error Report Period Radio ID", "capwap.control.message_element.decryption_error_report_period.radio_id",
1836 FT_UINT8, BASE_DEC, NULL, 0x00,
1838 { &hf_capwap_msg_element_type_decryption_error_report_period_interval,
1839 { "Decryption Error Report Report Interval (Sec)", "capwap.control.message_element.decryption_error_report_period.interval",
1840 FT_UINT16, BASE_DEC, NULL, 0x00,
1842 { &hf_capwap_msg_element_type_ac_name,
1843 { "AC Name", "capwap.control.message_element.ac_name",
1844 FT_STRING, BASE_NONE, NULL, 0x00,
1846 { &hf_capwap_msg_element_type_ac_name_with_priority,
1847 { "AC Name Priority", "capwap.control.message_element.ac_name_with_priority",
1848 FT_UINT8, BASE_DEC, NULL, 0x00,
1851 { &hf_capwap_msg_element_type_discovery_type,
1852 { "Discovery Type", "capwap.control.message_element.discovery_type",
1853 FT_UINT8, BASE_DEC, VALS(discovery_type_vals), 0x00,
1856 { &hf_capwap_msg_element_type_idle_timeout,
1857 { "Idle Timeout (Sec)", "capwap.control.message_element.idle_timeout",
1858 FT_UINT32, BASE_DEC, NULL, 0x00,
1860 { &hf_capwap_msg_element_type_location_data,
1861 { "Location Data", "capwap.control.message_element.location_data",
1862 FT_STRING, BASE_NONE, NULL, 0x00,
1864 { &hf_capwap_msg_element_type_maximum_message_length,
1865 { "Maximum Message Length", "capwap.control.message_element.maximum_message_length",
1866 FT_UINT16, BASE_DEC, NULL, 0x00,
1869 { &hf_capwap_msg_element_type_radio_admin_id,
1870 { "Radio Administrative ID", "capwap.control.message_element.radio_admin.id",
1871 FT_UINT8, BASE_DEC, NULL, 0x00,
1873 { &hf_capwap_msg_element_type_radio_admin_state,
1874 { "Radio Administrative State", "capwap.control.message_element.radio_admin.state",
1875 FT_UINT8, BASE_DEC, VALS(radio_admin_state_vals), 0x00,
1877 { &hf_capwap_msg_element_type_radio_op_state_radio_id,
1878 { "Radio Operational ID", "capwap.control.message_element.radio_op_state.radio_id",
1879 FT_UINT8, BASE_DEC, NULL, 0x00,
1881 { &hf_capwap_msg_element_type_radio_op_state_radio_state,
1882 { "Radio Operational State", "capwap.control.message_element.radio_op_state.radio_state",
1883 FT_UINT8, BASE_DEC, VALS(radio_op_state_vals), 0x00,
1885 { &hf_capwap_msg_element_type_radio_op_state_radio_cause,
1886 { "Radio Operational Cause", "capwap.control.message_element.radio_op_state.radio_cause",
1887 FT_UINT8, BASE_DEC, VALS(radio_op_cause_vals), 0x00,
1889 { &hf_capwap_msg_element_type_result_code,
1890 { "Result Code", "capwap.control.message_element.result_code",
1891 FT_UINT32, BASE_DEC, VALS(result_code_vals), 0x00,
1893 { &hf_capwap_msg_element_type_session_id,
1894 { "Session ID", "capwap.control.message_element.session_id",
1895 FT_BYTES, BASE_NONE, NULL, 0x00,
1897 { &hf_capwap_msg_element_type_statistics_timer,
1898 { "Statistics Timer (Sec)", "capwap.control.message_element.statistics_timer",
1899 FT_UINT16, BASE_DEC, NULL, 0x00,
1901 { &hf_capwap_msg_element_type_vsp_vendor_identifier,
1902 { "Vendor Identifier", "capwap.control.message_element.vsp.vendor_identifier",
1903 FT_UINT32, BASE_DEC|BASE_EXT_STRING, &sminmpec_values_ext, 0x00,
1905 { &hf_capwap_msg_element_type_vsp_vendor_element_id,
1906 { "Vendor Element ID", "capwap.control.message_element.vsp.vendor_element_id",
1907 FT_UINT16, BASE_DEC, NULL, 0x00,
1909 { &hf_capwap_msg_element_type_vsp_vendor_data,
1910 { "Vendor Data", "capwap.control.message_element.vsp.vendor_data",
1911 FT_BYTES, BASE_NONE, NULL, 0x00,
1914 { &hf_capwap_msg_element_type_wtp_board_data_vendor,
1915 { "WTP Board Data Vendor", "capwap.control.message_element.wtp_board_data.vendor",
1916 FT_UINT32, BASE_DEC|BASE_EXT_STRING, &sminmpec_values_ext, 0x00,
1918 { &hf_capwap_msg_element_type_wtp_board_data_type,
1919 { "Board Data Type", "capwap.control.message_element.wtp_board_data.type",
1920 FT_UINT16, BASE_DEC, VALS(board_data_type_vals), 0x00,
1922 { &hf_capwap_msg_element_type_wtp_board_data_length,
1923 { "Board Data Length", "capwap.control.message_element.wtp_board_data.length",
1924 FT_UINT16, BASE_DEC, NULL, 0x00,
1926 { &hf_capwap_msg_element_type_wtp_board_data_value,
1927 { "Board Data Value", "capwap.control.message_element.wtp_board_data.value",
1928 FT_BYTES, BASE_NONE, NULL, 0x00,
1931 { &hf_capwap_msg_element_type_wtp_board_data_wtp_model_number,
1932 { "WTP Model Number", "capwap.control.message_element.wtp_board_data.wtp_model_number",
1933 FT_STRING, BASE_NONE, NULL, 0x00,
1935 { &hf_capwap_msg_element_type_wtp_board_data_wtp_serial_number,
1936 { "WTP Serial Number", "capwap.control.message_element.wtp_board_data.wtp_serial_number",
1937 FT_STRING, BASE_NONE, NULL, 0x00,
1939 { &hf_capwap_msg_element_type_wtp_board_data_wtp_board_id,
1940 { "WTP Board ID", "capwap.control.message_element.wtp_board_data.wtp_board_id",
1941 FT_STRING, BASE_NONE, NULL, 0x0,
1943 { &hf_capwap_msg_element_type_wtp_board_data_wtp_board_revision,
1944 { "WTP Board Revision", "capwap.control.message_element.wtp_board_data.wtp_board_revision",
1945 FT_STRING, BASE_NONE, NULL, 0x0,
1947 { &hf_capwap_msg_element_type_wtp_board_data_base_mac_address,
1948 { "Base Mac Address", "capwap.control.message_element.wtp_board_data.base_mac_address",
1949 FT_ETHER, BASE_NONE, NULL, 0x0,
1952 { &hf_capwap_msg_element_type_wtp_descriptor_max_radios,
1953 { "Max Radios", "capwap.control.message_element.wtp_descriptor.max_radios",
1954 FT_UINT8, BASE_DEC, NULL, 0x00,
1956 { &hf_capwap_msg_element_type_wtp_descriptor_radio_in_use,
1957 { "Radio in use", "capwap.control.message_element.wtp_descriptor.radio_in_use",
1958 FT_UINT8, BASE_DEC, NULL, 0x00,
1960 { &hf_capwap_msg_element_type_wtp_descriptor_number_encrypt,
1961 { "Encryption Capabilities (Number)", "capwap.control.message_element.wtp_descriptor.number_encrypt",
1962 FT_UINT8, BASE_DEC, NULL, 0x00,
1964 { &hf_capwap_msg_element_type_wtp_descriptor_encrypt_reserved,
1965 { "Reserved (Encrypt)", "capwap.control.message_element.wtp_descriptor.encrypt_reserved",
1966 FT_UINT8, BASE_DEC, NULL, 0x00,
1968 { &hf_capwap_msg_element_type_wtp_descriptor_encrypt_wbid,
1969 { "Encrypt WBID", "capwap.control.message_element.wtp_descriptor.encrypt_wbid",
1970 FT_UINT8, BASE_DEC, VALS(type_wbid), 0x00,
1972 { &hf_capwap_msg_element_type_wtp_descriptor_encrypt_capabilities,
1973 { "Encryption Capabilities", "capwap.control.message_element.wtp_descriptor.encrypt_capabilities",
1974 FT_UINT16, BASE_DEC, NULL, 0x00,
1976 { &hf_capwap_msg_element_type_wtp_descriptor_vendor,
1977 { "WTP Descriptor Vendor", "capwap.control.message_element.wtp_descriptor.vendor",
1978 FT_UINT32, BASE_DEC|BASE_EXT_STRING, &sminmpec_values_ext, 0x00,
1980 { &hf_capwap_msg_element_type_wtp_descriptor_type,
1981 { "Descriptor Type", "capwap.control.message_element.wtp_descriptor.type",
1982 FT_UINT16, BASE_DEC, VALS(wtp_descriptor_type_vals), 0x0,
1984 { &hf_capwap_msg_element_type_wtp_descriptor_length,
1985 { "Descriptor Length", "capwap.control.message_element.wtp_descriptor.length",
1986 FT_UINT16, BASE_DEC, NULL, 0x0,
1988 { &hf_capwap_msg_element_type_wtp_descriptor_value,
1989 { "Descriptor Value", "capwap.control.message_element.wtp_descriptor.value",
1990 FT_BYTES, BASE_NONE, NULL, 0x0,
1992 { &hf_capwap_msg_element_type_wtp_descriptor_hardware_version,
1993 { "WTP Hardware Version", "capwap.control.message_element.wtp_descriptor.hardware_version",
1994 FT_STRING, BASE_NONE, NULL, 0x0,
1996 { &hf_capwap_msg_element_type_wtp_descriptor_active_software_version,
1997 { "WTP Active Software Version", "capwap.control.message_element.wtp_descriptor.active_software_version",
1998 FT_STRING, BASE_NONE, NULL, 0x0,
2000 { &hf_capwap_msg_element_type_wtp_descriptor_boot_version,
2001 { "WTP Boot Version", "capwap.control.message_element.wtp_descriptor.boot_version",
2002 FT_STRING, BASE_NONE, NULL, 0x0,
2004 { &hf_capwap_msg_element_type_wtp_descriptor_other_software_version,
2005 { "WTP Other Software Version", "capwap.control.message_element.wtp_descriptor.other_software_version",
2006 FT_STRING, BASE_NONE, NULL, 0x0,
2008 { &hf_capwap_msg_element_type_wtp_fallback,
2009 { "WTP Fallback", "capwap.control.message_element.wtp_fallback",
2010 FT_UINT8, BASE_DEC, VALS(wtp_fallback_vals), 0x0,
2013 { &hf_capwap_msg_element_type_wtp_frame_tunnel_mode,
2014 { "WTP Frame Tunnel Mode", "capwap.control.message_element.wtp_frame_tunnel_mode",
2015 FT_NONE, BASE_NONE, NULL, 0x0,
2017 { &hf_capwap_msg_element_type_wtp_frame_tunnel_mode_n,
2018 { "Native Frame Tunnel Mode", "capwap.control.message_element.wtp_frame_tunnel_mode.n",
2019 FT_BOOLEAN, 8, TFS(&tfs_true_false), 0x08,
2021 { &hf_capwap_msg_element_type_wtp_frame_tunnel_mode_e,
2022 { "802.3 Frame Tunnel Mode", "capwap.control.message_element.wtp_frame_tunnel_mode.e",
2023 FT_BOOLEAN, 8, TFS(&tfs_true_false), 0x04,
2025 { &hf_capwap_msg_element_type_wtp_frame_tunnel_mode_l,
2026 { "Local Bridging", "capwap.control.message_element.wtp_frame_tunnel_mode.l",
2027 FT_BOOLEAN, 8, TFS(&tfs_true_false), 0x02,
2029 { &hf_capwap_msg_element_type_wtp_frame_tunnel_mode_r,
2030 { "Reserved", "capwap.control.message_element.wtp_frame_tunnel_mode.r",
2031 FT_BOOLEAN, 8, TFS(&tfs_set_notset), 0xF1,
2034 { &hf_capwap_msg_element_type_wtp_mac_type,
2035 { "WTP MAC Type", "capwap.control.message_element.wtp_mac_type",
2036 FT_UINT8, BASE_DEC, VALS(wtp_mac_vals), 0x0,
2037 "The MAC mode of operation supported by the WTP", HFILL }},
2038 { &hf_capwap_msg_element_type_wtp_name,
2039 { "WTP Name", "capwap.control.message_element.wtp_name",
2040 FT_STRING, BASE_NONE, NULL, 0x0,
2042 { &hf_capwap_msg_element_type_wtp_reboot_statistics_reboot_count,
2043 { "Reboot Count", "capwap.control.message_element.wtp_reboot_statistics.reboot_count",
2044 FT_UINT16, BASE_DEC, NULL, 0x0,
2045 "The number of reboots that have occurred due to a WTP crash", HFILL }},
2046 { &hf_capwap_msg_element_type_wtp_reboot_statistics_ac_initiated_count,
2047 { "AC Initiated Count", "capwap.control.message_element.wtp_reboot_statistics.ac_initiated_count",
2048 FT_UINT16, BASE_DEC, NULL, 0x0,
2049 "The number of reboots that have occurred at the request of a CAPWAP protocol message", HFILL }},
2050 { &hf_capwap_msg_element_type_wtp_reboot_statistics_link_failure_count,
2051 { "Link Failure Count", "capwap.control.message_element.wtp_reboot_statistics.link_failure_count",
2052 FT_UINT16, BASE_DEC, NULL, 0x0,
2053 "The number of times that a CAPWAP protocol connection with an AC has failed due to link failure", HFILL }},
2054 { &hf_capwap_msg_element_type_wtp_reboot_statistics_sw_failure_count,
2055 { "SW Failure Count", "capwap.control.message_element.wtp_reboot_statistics.sw_failure_count",
2056 FT_UINT16, BASE_DEC, NULL, 0x0,
2057 "The number of times that a CAPWAP protocol connection with an AC has failed due to software-related reasons", HFILL }},
2058 { &hf_capwap_msg_element_type_wtp_reboot_statistics_hw_failure_count,
2059 { "HW Failure Count", "capwap.control.message_element.wtp_reboot_statistics.hw_failure_count",
2060 FT_UINT16, BASE_DEC, NULL, 0x0,
2061 "The number of times that a CAPWAP protocol connection with an AC has failed due to hardware-related reasons", HFILL }},
2062 { &hf_capwap_msg_element_type_wtp_reboot_statistics_other_failure_count,
2063 { "Other Failure Count", "capwap.control.message_element.wtp_reboot_statistics.other_failure_count",
2064 FT_UINT16, BASE_DEC, NULL, 0x0,
2065 "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 }},
2066 { &hf_capwap_msg_element_type_wtp_reboot_statistics_unknown_failure_count,
2067 { "Unknown Failure Count", "capwap.control.message_element.wtp_reboot_statistics.unknown_failure_count",
2068 FT_UINT16, BASE_DEC, NULL, 0x0,
2069 "The number of times that a CAPWAP protocol connection with an AC has failed for unknown reasons", HFILL }},
2070 { &hf_capwap_msg_element_type_wtp_reboot_statistics_last_failure_type,
2071 { "Last Failure Type", "capwap.control.message_element.wtp_reboot_statistics.last_failure_type",
2072 FT_UINT8, BASE_DEC, VALS(last_failure_type_vals), 0x0,
2073 "The failure type of the most recent WTP failure", HFILL }},
2075 { &hf_capwap_msg_element_type_ieee80211_rate_set_radio_id,
2076 { "Radio ID", "capwap.control.message_element.ieee80211_rate_set.radio_id",
2077 FT_UINT8, BASE_DEC, NULL, 0x0,
2079 { &hf_capwap_msg_element_type_ieee80211_rate_set_rate_set,
2080 { "Rate Set", "capwap.control.message_element.ieee80211_rate_set.rate_set",
2081 FT_BYTES, BASE_NONE, NULL, 0x0,
2083 { &hf_capwap_msg_element_type_ieee80211_station_session_key_mac,
2084 { "Mac Address", "capwap.control.message_element.ieee80211_station_session_key.mac",
2085 FT_ETHER, BASE_NONE, NULL, 0x0,
2086 "The station's MAC Address", HFILL }},
2087 { &hf_capwap_msg_element_type_ieee80211_station_session_key_flags,
2088 { "Flags", "capwap.control.message_element.ieee80211_station_session_key.flags",
2089 FT_UINT16, BASE_DEC, NULL, 0x3FFF,
2091 { &hf_capwap_msg_element_type_ieee80211_station_session_key_flags_a,
2092 { "Flag A", "capwap.control.message_element.ieee80211_station_session_key.flags_a",
2093 FT_BOOLEAN, 1, NULL, 0x2000,
2095 { &hf_capwap_msg_element_type_ieee80211_station_session_key_flags_c,
2096 { "Flag C", "capwap.control.message_element.ieee80211_station_session_key.flags_c",
2097 FT_BOOLEAN, 1, NULL, 0x1000,
2099 { &hf_capwap_msg_element_type_ieee80211_station_session_key_pairwire_tsc,
2100 { "Pairwise TSC", "capwap.control.message_element.ieee80211_station_session_key.pairwire_tsc",
2101 FT_BYTES, BASE_NONE, NULL, 0x0,
2102 "Transmit Sequence Counter (TSC)", HFILL }},
2103 { &hf_capwap_msg_element_type_ieee80211_station_session_key_pairwire_rsc,
2104 { "Pairwise RSC", "capwap.control.message_element.ieee80211_station_session_key.pairwire_rsc",
2105 FT_BYTES, BASE_NONE, NULL, 0x0,
2106 "Receive Sequence Counter (TSC)", HFILL }},
2107 { &hf_capwap_msg_element_type_ieee80211_station_session_key_key,
2108 { "Key", "capwap.control.message_element.ieee80211_station_session_key.key",
2109 FT_BYTES, BASE_NONE, NULL, 0x0,
2111 { &hf_capwap_msg_element_type_ieee80211_wtp_radio_info_radio_id,
2112 { "Radio ID", "capwap.control.message_element.ieee80211__wtp_radio_info.radio_id",
2113 FT_UINT8, BASE_DEC, NULL, 0x0,
2115 { &hf_capwap_msg_element_type_ieee80211_wtp_radio_info_radio_type_reserved,
2116 { "Radio Type Reserved", "capwap.control.message_element.ieee80211_wtp_info_radio.radio_type_reserved",
2117 FT_BYTES, BASE_NONE, NULL, 0x0,
2119 { &hf_capwap_msg_element_type_ieee80211_wtp_radio_info_radio_type_n,
2120 { "Radio Type 802.11n", "capwap.control.message_element.ieee80211_wtp_info_radio.radio_type_n",
2121 FT_BOOLEAN, 4, TFS(&tfs_true_false), 0x0008,
2123 { &hf_capwap_msg_element_type_ieee80211_wtp_radio_info_radio_type_g,
2124 { "Radio Type 802.11g", "capwap.control.message_element.ieee80211_wtp_info_radio.radio_type_g",
2125 FT_BOOLEAN, 4, TFS(&tfs_true_false), 0x0004,
2127 { &hf_capwap_msg_element_type_ieee80211_wtp_radio_info_radio_type_a,
2128 { "Radio Type 802.11a", "capwap.control.message_element.ieee80211_wtp_info_radio.radio_type_a",
2129 FT_BOOLEAN, 4, TFS(&tfs_true_false), 0x0002,
2131 { &hf_capwap_msg_element_type_ieee80211_wtp_radio_info_radio_type_b,
2132 { "Radio Type 802.11g", "capwap.control.message_element.ieee80211_wtp_info_radio.radio_type_b",
2133 FT_BOOLEAN, 4, TFS(&tfs_true_false), 0x0001,
2136 /* Fragment entries */
2137 { &hf_msg_fragments,
2138 { "Message fragments", "capwap.fragments", FT_NONE, BASE_NONE,
2139 NULL, 0x00, NULL, HFILL } },
2141 { "Message fragment", "capwap.fragment", FT_FRAMENUM, BASE_NONE,
2142 NULL, 0x00, NULL, HFILL } },
2143 { &hf_msg_fragment_overlap,
2144 { "Message fragment overlap", "capwap.fragment.overlap", FT_BOOLEAN,
2145 BASE_NONE, NULL, 0x00, NULL, HFILL } },
2146 { &hf_msg_fragment_overlap_conflicts,
2147 { "Message fragment overlapping with conflicting data",
2148 "capwap.fragment.overlap.conflicts", FT_BOOLEAN, BASE_NONE, NULL,
2149 0x00, NULL, HFILL } },
2150 { &hf_msg_fragment_multiple_tails,
2151 { "Message has multiple tail fragments",
2152 "capwap.fragment.multiple_tails", FT_BOOLEAN, BASE_NONE,
2153 NULL, 0x00, NULL, HFILL } },
2154 { &hf_msg_fragment_too_long_fragment,
2155 { "Message fragment too long", "capwap.fragment.too_long_fragment",
2156 FT_BOOLEAN, BASE_NONE, NULL, 0x00, NULL, HFILL } },
2157 { &hf_msg_fragment_error,
2158 { "Message defragmentation error", "capwap.fragment.error", FT_FRAMENUM,
2159 BASE_NONE, NULL, 0x00, NULL, HFILL } },
2160 { &hf_msg_fragment_count,
2161 { "Message fragment count", "capwap.fragment.count", FT_UINT32, BASE_DEC,
2162 NULL, 0x00, NULL, HFILL } },
2163 { &hf_msg_reassembled_in,
2164 { "Reassembled in", "capwap.reassembled.in", FT_FRAMENUM, BASE_NONE,
2165 NULL, 0x00, NULL, HFILL } },
2166 { &hf_msg_reassembled_length,
2167 { "Reassembled CAPWAP length", "capwap.reassembled.length", FT_UINT32, BASE_DEC,
2168 NULL, 0x00, NULL, HFILL } }
2171 /* Setup protocol subtree array */
2172 static gint *ett[] = {
2178 /* Register the protocol name and description */
2179 proto_capwap = proto_register_protocol("Control And Provisioning of Wireless Access Points", "CAPWAP", "capwap");
2181 /* Required function calls to register the header fields and subtrees used */
2182 proto_register_field_array(proto_capwap, hf, array_length(hf));
2184 proto_register_subtree_array(ett, array_length(ett));
2186 register_init_routine(&capwap_reassemble_init);
2188 /* Register preferences module (See Section 2.6 for more on preferences) */
2189 capwap_module = prefs_register_protocol(proto_capwap, proto_reg_handoff_capwap);
2191 prefs_register_uint_preference(capwap_module, "udp.port.control", "CAPWAP Control UDP Port",
2192 "Set the port for CAPWAP Control messages (if other than the default of 5246)",
2193 10, &global_capwap_control_udp_port);
2195 prefs_register_uint_preference(capwap_module, "udp.port.data", "CAPWAP Data UDP Port",
2196 "Set the port for CAPWAP Data messages (if other than the default of 5247)",
2197 10, &global_capwap_data_udp_port);
2199 prefs_register_bool_preference(capwap_module, "draft_8_cisco", "Cisco Wireless Controller Support",
2200 "Enable support of Cisco Wireless Controller (based on old 8 draft revision).",
2201 &global_capwap_draft_8_cisco);
2203 prefs_register_bool_preference(capwap_module, "reassemble", "Reassemble fragmented CAPWAP packets",
2204 "Reassemble fragmented CAPWAP packets.",
2205 &global_capwap_reassemble);
2207 prefs_register_bool_preference(capwap_module, "swap_fc", "Swap Frame Control",
2208 "Swap frame control bytes (needed for some APs).",
2209 &global_capwap_swap_frame_control);
2214 proto_reg_handoff_capwap(void)
2216 static gboolean inited = FALSE;
2217 static dissector_handle_t capwap_control_handle, capwap_data_handle;
2218 static guint capwap_control_udp_port, capwap_data_udp_port;
2221 capwap_control_handle = new_create_dissector_handle(dissect_capwap_control, proto_capwap);
2222 capwap_data_handle = create_dissector_handle(dissect_capwap_data, proto_capwap);
2223 dtls_handle = find_dissector("dtls");
2224 ieee8023_handle = find_dissector("eth_withoutfcs");
2225 ieee80211_handle = find_dissector("wlan");
2226 ieee80211_bsfc_handle = find_dissector("wlan_bsfc");
2227 data_handle = find_dissector("data");
2231 dissector_delete_uint("udp.port", capwap_control_udp_port, capwap_control_handle);
2232 dissector_delete_uint("udp.port", capwap_data_udp_port, capwap_data_handle);
2234 dissector_add_uint("udp.port", global_capwap_control_udp_port, capwap_control_handle);
2235 dissector_add_uint("udp.port", global_capwap_data_udp_port, capwap_data_handle);
2237 capwap_control_udp_port = global_capwap_control_udp_port;
2238 capwap_data_udp_port = global_capwap_data_udp_port;