2 * Routines for Wireless LAN (IEEE 802.11) dissection
3 * Copyright 2000, Axis Communications AB
4 * Inquiries/bugreports should be sent to Johan.Jorgensen@axis.com
8 * Wireshark - Network traffic analyzer
9 * By Gerald Combs <gerald@wireshark.org>
10 * Copyright 1998 Gerald Combs
12 * Copied from README.developer
14 * This program is free software; you can redistribute it and/or
15 * modify it under the terms of the GNU General Public License
16 * as published by the Free Software Foundation; either version 2
17 * of the License, or (at your option) any later version.
19 * This program is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
24 * You should have received a copy of the GNU General Public License
25 * along with this program; if not, write to the Free Software
26 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
30 * The following people helped me by pointing out bugs etc. Thank you!
34 * Magnus Hultman-Persson
38 * 09/12/2003 - Added dissection of country information tag
40 * Ritchie<at>tipsybottle.com
42 * 03/22/2004 - Added dissection of RSN IE
43 * Jouni Malinen <jkmaline@cc.hut.fi>
45 * 10/24/2005 - Add dissection for 802.11e
46 * Zhu Yi <yi.zhu@intel.com>
48 * Dutin Johnson - 802.11n and portions of 802.11k and 802.11ma
49 * dustin@dustinj.us & dustin.johnson@cacetech.com
51 * 01/31/2008 - Added dissection of 802.11s
52 * Javier Cardona <javier@cozybit.com>
54 * 04/21/2008 - Added dissection for 802.11p
55 * Arada Systems <http://www.aradasystems.com>
57 * Enhance 802.11 dissector by Alexis La Goutte
62 * The 802.11 standard is "free", 6 month after the publication.
64 * IEEE Std 802.11-2007: Revision of IEEE Std 802.11-199
65 * include 8 amendments (802.11a,b,d,e,g,h,i,j)
66 * http://standards.ieee.org/getieee802/download/802.11-2007.pdf
68 * IEEE Std 802.11k-2008: Radio Resource Measurement of Wireless LANs
69 * http://standards.ieee.org/getieee802/download/802.11k-2008.pdf
71 * IEEE Std 802.11r-2008: Fast Basic Service Set (BSS) Transition
72 * http://standards.ieee.org/getieee802/download/802.11r-2008.pdf
74 * IEEE Std 802.11y-2008: 3650-3700 MHz Operation in USA
75 * http://standards.ieee.org/getieee802/download/802.11y-2008.pdf
77 * IEEE Std 802.11w-2009: Protected Management Frames
78 * http://standards.ieee.org/getieee802/download/802.11w-2009.pdf
80 * IEEE Std 802.11n-2009: Enhancements for Higher Throughput
81 * http://standards.ieee.org/getieee802/download/802.11n-2009.pdf
83 * IEEE Std 802.11p-2010: Wireless Access in Vehicular Environments
84 * http://standards.ieee.org/getieee802/download/802.11p-2010.pdf
97 #include <epan/bitswap.h>
98 #include <epan/proto.h>
99 #include <epan/packet.h>
100 #include <epan/addr_resolv.h>
101 #include <epan/strutil.h>
102 #include <epan/prefs.h>
103 #include <epan/reassemble.h>
104 #include "packet-ipx.h"
105 #include "packet-llc.h"
106 #include "packet-ieee80211.h"
107 #include <epan/etypes.h>
108 #include <epan/greproto.h>
109 #include <epan/oui.h>
110 #include <epan/crc32.h>
111 #include <epan/tap.h>
112 #include <epan/emem.h>
113 #include <epan/crypt/wep-wpadefs.h>
114 #include <epan/expert.h>
119 #include "packet-wps.h"
120 #include "packet-wifi-p2p.h"
123 #define roundup2(x, y) (((x)+((y)-1))&(~((y)-1))) /* if y is powers of two */
126 /* Defragment fragmented 802.11 datagrams */
127 static gboolean wlan_defragment = TRUE;
129 /* call subdissector for retransmitted frames */
130 static gboolean wlan_subdissector = TRUE;
132 /* Check for the presence of the 802.11 FCS */
133 static gboolean wlan_check_fcs = FALSE;
135 /* Ignore vendor-specific HT elements */
136 static gboolean wlan_ignore_draft_ht = FALSE;
138 /* Ignore the WEP bit; assume packet is decrypted */
139 #define WLAN_IGNORE_WEP_NO 0
140 #define WLAN_IGNORE_WEP_WO_IV 1
141 #define WLAN_IGNORE_WEP_W_IV 2
142 static gint wlan_ignore_wep = WLAN_IGNORE_WEP_NO;
144 /* Tables for reassembly of fragments. */
145 static GHashTable *wlan_fragment_table = NULL;
146 static GHashTable *wlan_reassembled_table = NULL;
148 /* Statistical data */
149 static struct _wlan_stats wlan_stats;
151 /* Stuff for the WEP decoder */
152 static gboolean enable_decryption = FALSE;
153 static void init_wepkeys(void);
155 #ifndef HAVE_AIRPDCAP
156 static gint num_wepkeys = 0;
157 static guint8 **wep_keys = NULL;
158 static int *wep_keylens = NULL;
159 static tvbuff_t *try_decrypt_wep(tvbuff_t *tvb, guint32 offset, guint32 len);
160 static int wep_decrypt(guint8 *buf, guint32 len, int key_override);
162 /* Davide Schiera (2006-11-26): created function to decrypt WEP and WPA/WPA2 */
163 static tvbuff_t *try_decrypt(tvbuff_t *tvb, guint32 offset, guint32 len, guint8 *algorithm, guint32 *sec_header, guint32 *sec_trailer);
166 static int weak_iv(guchar *iv);
167 #define SSWAP(a,b) {guint8 tmp = s[a]; s[a] = s[b]; s[b] = tmp;}
169 /* #define USE_ENV */
170 /* When this is set, an unlimited number of WEP keys can be set in the
173 WIRESHARK_WEPKEYNUM=##
174 WIRESHARK_WEPKEY1=aa:bb:cc:dd:...
175 WIRESHARK_WEPKEY2=aa:bab:cc:dd:ee:...
177 ... you get the idea.
179 otherwise you're limited to specifying four keys in the preference system.
183 static char *wep_keystr[MAX_ENCRYPTION_KEYS];
186 typedef struct mimo_control
192 guint8 coefficient_size;
193 guint8 codebook_info;
194 guint8 remaining_matrix_segment;
197 mimo_control_t get_mimo_control (tvbuff_t *tvb, int offset);
198 int add_mimo_csi_matrices_report (proto_tree *tree, tvbuff_t *tvb, int offset, mimo_control_t mimo_cntrl);
199 int add_mimo_beamforming_feedback_report (proto_tree *tree, tvbuff_t *tvb, int offset, mimo_control_t mimo_cntrl);
200 int add_mimo_compressed_beamforming_feedback_report (proto_tree *tree, tvbuff_t *tvb, int offset, mimo_control_t mimo_cntrl);
202 /* ************************************************************************* */
203 /* Miscellaneous Constants */
204 /* ************************************************************************* */
205 #define SHORT_STR 256
207 /* ************************************************************************* */
208 /* Define some very useful macros that are used to analyze frame types etc. */
209 /* ************************************************************************* */
212 * Fetch the frame control field and swap it if needed. "fcf" and "tvb"
213 * must be valid variables.
215 #define FETCH_FCF(off) (wlan_broken_fc ? \
216 BSWAP16(tvb_get_letohs(tvb, off)) : \
217 tvb_get_letohs(tvb, off))
220 * Extract the protocol version from the frame control field
222 #define FCF_PROT_VERSION(x) ((x) & 0x3)
225 * Extract the frame type from the frame control field.
227 #define FCF_FRAME_TYPE(x) (((x) & 0xC) >> 2)
230 * Extract the frame subtype from the frame control field.
232 #define FCF_FRAME_SUBTYPE(x) (((x) & 0xF0) >> 4)
235 * Convert the frame type and subtype from the frame control field into
236 * one of the MGT_, CTRL_, or DATA_ values.
238 #define COMPOSE_FRAME_TYPE(x) (((x & 0x0C)<< 2)+FCF_FRAME_SUBTYPE(x)) /* Create key to (sub)type */
241 * The subtype field of a data frame is, in effect, composed of 4 flag
242 * bits - CF-Ack, CF-Poll, Null (means the frame doesn't actually have
243 * any data), and QoS.
245 #define DATA_FRAME_IS_CF_ACK(x) ((x) & 0x01)
246 #define DATA_FRAME_IS_CF_POLL(x) ((x) & 0x02)
247 #define DATA_FRAME_IS_NULL(x) ((x) & 0x04)
248 #define DATA_FRAME_IS_QOS(x) ((x) & 0x08)
251 * Extract the flags from the frame control field.
253 #define FCF_FLAGS(x) (((x) & 0xFF00) >> 8)
256 * Bits from the flags field.
258 #define FLAG_TO_DS 0x01
259 #define FLAG_FROM_DS 0x02
260 #define FLAG_MORE_FRAGMENTS 0x04
261 #define FLAG_RETRY 0x08
262 #define FLAG_POWER_MGT 0x10
263 #define FLAG_MORE_DATA 0x20
264 #define FLAG_PROTECTED 0x40
265 #define FLAG_ORDER 0x80
268 * Test bits in the flags field.
271 * XXX - Only HAVE_FRAGMENTS, IS_PROTECTED, and IS_STRICTLY_ORDERED
272 * are in use. Should the rest be removed?
274 #define IS_TO_DS(x) ((x) & FLAG_TO_DS)
275 #define IS_FROM_DS(x) ((x) & FLAG_FROM_DS)
276 #define HAVE_FRAGMENTS(x) ((x) & FLAG_MORE_FRAGMENTS)
277 #define IS_RETRY(x) ((x) & FLAG_RETRY)
278 #define POWER_MGT_STATUS(x) ((x) & FLAG_POWER_MGT)
279 #define HAS_MORE_DATA(x) ((x) & FLAG_MORE_DATA)
280 #define IS_PROTECTED(x) ((x) & FLAG_PROTECTED)
281 #define IS_STRICTLY_ORDERED(x) ((x) & FLAG_ORDER)
284 * Extract subfields from the flags field.
286 #define FLAGS_DS_STATUS(x) ((x) & (FLAG_FROM_DS|FLAG_TO_DS))
289 * Extract an indication of the types of addresses in a data frame from
290 * the frame control field.
292 #define FCF_ADDR_SELECTOR(x) ((x) & ((FLAG_TO_DS|FLAG_FROM_DS) << 8))
294 #define DATA_ADDR_T1 0
295 #define DATA_ADDR_T2 (FLAG_FROM_DS << 8)
296 #define DATA_ADDR_T3 (FLAG_TO_DS << 8)
297 #define DATA_ADDR_T4 ((FLAG_TO_DS|FLAG_FROM_DS) << 8)
300 * Extract the fragment number and sequence number from the sequence
303 #define SEQCTL_FRAGMENT_NUMBER(x) ((x) & 0x000F)
304 #define SEQCTL_SEQUENCE_NUMBER(x) (((x) & 0xFFF0) >> 4)
307 * Extract subfields from the QoS control field.
309 #define QOS_TID(x) ((x) & 0x000F)
310 #define QOS_PRIORITY(x) ((x) & 0x0007)
311 #define QOS_EOSP(x) (((x) & 0x0010) >> 4) /* end of service period */
312 #define QOS_ACK_POLICY(x) (((x) & 0x0060) >> 5)
313 #define QOS_AMSDU_PRESENT(x) (((x) & 0x0080) >> 6)
314 #define QOS_FIELD_CONTENT(x) (((x) & 0xFF00) >> 8)
316 #define QOS_FLAG_EOSP 0x10
319 * Extract subfields from the result of QOS_FIELD_CONTENT().
321 #define QOS_PS_BUF_STATE_INDICATED(x) (((x) & 0x02) >> 1)
322 #define QOS_PS_HIGHEST_PRI_BUF_AC(x) (((x) & 0x0C) >> 2)
323 #define QOS_PS_QAP_BUF_LOAD(x) (((x) & 0xF0) >> 4)
326 * Extract subfields from the HT Control field.
327 * .11n D-1.10 & D-2.0, 7.1.3.5a, 32 bits.
329 #define HTC_LAC(htc) ((htc) & 0xFF)
330 #define HTC_LAC_MAI(htc) (((htc) >> 2) & 0xF)
331 #define HTC_IS_ASELI(htc) (HTC_LAC_MAI(htc) == 0xE)
332 #define HTC_LAC_MAI_MRQ(htc) ((HTC_LAC_MAI(htc)) & 0x1)
333 #define HTC_LAC_MAI_MSI(htc) ((HTC_LAC_MAI(htc) >> 1) & 0x7)
334 #define HTC_LAC_MFSI(htc) (((htc) >> 4) & 0x7)
335 #define HTC_LAC_ASEL_CMD(htc) (((htc) >> 9) & 0x7)
336 #define HTC_LAC_ASEL_DATA(htc) (((htc) >> 12) & 0xF)
337 #define HTC_LAC_MFB(htc) (((htc) >> 9) & 0x7F)
338 #define HTC_CAL_POS(htc) (((htc) >> 16) & 0x3)
339 #define HTC_CAL_SEQ(htc) (((htc) >> 18) & 0x3)
340 #define HTC_CSI_STEERING(htc) (((htc) >> 22) & 0x3)
341 #define HTC_NDP_ANN(htc) (((htc) >> 24) & 0x1)
342 #define HTC_AC_CONSTRAINT(htc) (((htc) >> 30) & 0x1)
343 #define HTC_RDG_MORE_PPDU(htc) (((htc) >> 31) & 0x1)
346 * Extract subfields from the key octet in WEP-encrypted frames.
348 #define KEY_OCTET_WEP_KEY(x) (((x) & 0xC0) >> 6)
350 #define KEY_EXTIV 0x20
353 /* Uncomment for 802.11s draft (mesh) support */
354 /* #define MESH_OVERRIDES 1 */
355 #ifdef MESH_OVERRIDES
357 * Bits from the Mesh Flags field
359 #define MESH_FLAGS_ADDRESS_EXTENSION 0x3
360 #endif /* MESH_OVERRIDES */
362 /* ************************************************************************* */
363 /* Constants used to identify cooked frame types */
364 /* ************************************************************************* */
365 #define MGT_FRAME 0x00 /* Frame type is management */
366 #define CONTROL_FRAME 0x01 /* Frame type is control */
367 #define DATA_FRAME 0x02 /* Frame type is Data */
369 #define DATA_SHORT_HDR_LEN 24
370 #define DATA_LONG_HDR_LEN 30
371 #define MGT_FRAME_HDR_LEN 24 /* Length of Managment frame-headers */
374 * COMPOSE_FRAME_TYPE() values for management frames.
376 #define MGT_ASSOC_REQ 0x00 /* association request */
377 #define MGT_ASSOC_RESP 0x01 /* association response */
378 #define MGT_REASSOC_REQ 0x02 /* reassociation request */
379 #define MGT_REASSOC_RESP 0x03 /* reassociation response */
380 #define MGT_PROBE_REQ 0x04 /* Probe request */
381 #define MGT_PROBE_RESP 0x05 /* Probe response */
382 #define MGT_MEASUREMENT_PILOT 0x06 /* Measurement Pilot */
383 #define MGT_BEACON 0x08 /* Beacon frame */
384 #define MGT_ATIM 0x09 /* ATIM */
385 #define MGT_DISASS 0x0A /* Disassociation */
386 #define MGT_AUTHENTICATION 0x0B /* Authentication */
387 #define MGT_DEAUTHENTICATION 0x0C /* Deauthentication */
388 #define MGT_ACTION 0x0D /* Action */
389 #define MGT_ACTION_NO_ACK 0x0E /* Action No Ack */
390 #define MGT_ARUBA_WLAN 0x0F /* Aruba WLAN Specific */
393 * COMPOSE_FRAME_TYPE() values for control frames.
395 #define CTRL_CONTROL_WRAPPER 0x17 /* Control Wrapper */
396 #define CTRL_BLOCK_ACK_REQ 0x18 /* Block ack Request */
397 #define CTRL_BLOCK_ACK 0x19 /* Block ack */
398 #define CTRL_PS_POLL 0x1A /* power-save poll */
399 #define CTRL_RTS 0x1B /* request to send */
400 #define CTRL_CTS 0x1C /* clear to send */
401 #define CTRL_ACKNOWLEDGEMENT 0x1D /* acknowledgement */
402 #define CTRL_CFP_END 0x1E /* contention-free period end */
403 #define CTRL_CFP_ENDACK 0x1F /* contention-free period end/ack */
406 * COMPOSE_FRAME_TYPE() values for data frames.
408 #define DATA 0x20 /* Data */
409 #define DATA_CF_ACK 0x21 /* Data + CF-Ack */
410 #define DATA_CF_POLL 0x22 /* Data + CF-Poll */
411 #define DATA_CF_ACK_POLL 0x23 /* Data + CF-Ack + CF-Poll */
412 #define DATA_NULL_FUNCTION 0x24 /* Null function (no data) */
413 #define DATA_CF_ACK_NOD 0x25 /* CF-Ack (no data) */
414 #define DATA_CF_POLL_NOD 0x26 /* CF-Poll (No data) */
415 #define DATA_CF_ACK_POLL_NOD 0x27 /* CF-Ack + CF-Poll (no data) */
417 #define DATA_QOS_DATA 0x28 /* QoS Data */
418 #define DATA_QOS_DATA_CF_ACK 0x29 /* QoS Data + CF-Ack */
419 #define DATA_QOS_DATA_CF_POLL 0x2A /* QoS Data + CF-Poll */
420 #define DATA_QOS_DATA_CF_ACK_POLL 0x2B /* QoS Data + CF-Ack + CF-Poll */
421 #define DATA_QOS_NULL 0x2C /* QoS Null */
422 #define DATA_QOS_CF_POLL_NOD 0x2E /* QoS CF-Poll (No Data) */
423 #define DATA_QOS_CF_ACK_POLL_NOD 0x2F /* QoS CF-Ack + CF-Poll (No Data) */
426 /* ************************************************************************* */
427 /* Logical field codes (dissector's encoding of fixed fields) */
428 /* ************************************************************************* */
429 #define FIELD_TIMESTAMP 0x01 /* 64-bit timestamp */
430 #define FIELD_BEACON_INTERVAL 0x02 /* 16-bit beacon interval */
431 #define FIELD_CAP_INFO 0x03 /* Add capability information tree */
432 #define FIELD_AUTH_ALG 0x04 /* Authentication algorithm used */
433 #define FIELD_AUTH_TRANS_SEQ 0x05 /* Authentication sequence number */
434 #define FIELD_CURRENT_AP_ADDR 0x06
435 #define FIELD_LISTEN_IVAL 0x07
436 #define FIELD_REASON_CODE 0x08
437 #define FIELD_ASSOC_ID 0x09
438 #define FIELD_STATUS_CODE 0x0A
439 #define FIELD_CATEGORY_CODE 0x0B /* Management action category */
440 #define FIELD_ACTION_CODE 0x0C /* Management action code */
441 #define FIELD_DIALOG_TOKEN 0x0D /* Management action dialog token */
442 #define FIELD_WME_ACTION_CODE 0x0E /* Management notification action code */
443 #define FIELD_WME_DIALOG_TOKEN 0x0F /* Management notification dialog token */
444 #define FIELD_WME_STATUS_CODE 0x10 /* Management notification setup response status code */
445 #define FIELD_QOS_ACTION_CODE 0x11
446 #define FIELD_QOS_TS_INFO 0x12
447 #define FIELD_DLS_ACTION_CODE 0x13
448 #define FIELD_DST_MAC_ADDR 0X14 /* DLS destination MAC address */
449 #define FIELD_SRC_MAC_ADDR 0X15 /* DLS source MAC address */
450 #define FIELD_DLS_TIMEOUT 0X16 /* DLS timeout value */
451 #define FIELD_SCHEDULE_INFO 0X17 /* Schedule Info field */
452 #define FIELD_ACTION 0X18 /* Action field */
453 #define FIELD_BLOCK_ACK_ACTION_CODE 0x19
454 #define FIELD_QOS_INFO_AP 0x1A
455 #define FIELD_QOS_INFO_STA 0x1B
456 #define FIELD_BLOCK_ACK_PARAM 0x1C
457 #define FIELD_BLOCK_ACK_TIMEOUT 0x1D
458 #define FIELD_BLOCK_ACK_SSC 0x1E
459 #define FIELD_DELBA_PARAM_SET 0x1F
460 #define FIELD_MAX_REG_PWR 0x20
461 #define FIELD_MEASUREMENT_PILOT_INT 0x21
462 #define FIELD_COUNTRY_STR 0x22
463 #define FIELD_MAX_TX_PWR 0x23
464 #define FIELD_TX_PWR_USED 0x24
465 #define FIELD_TRANSCEIVER_NOISE_FLOOR 0x25
466 #define FIELD_DS_PARAM_SET 0x26
467 #define FIELD_CHANNEL_WIDTH 0x27
468 #define FIELD_SM_PWR_CNTRL 0x28
469 #define FIELD_PCO_PHASE_CNTRL 0x29
470 #define FIELD_PSMP_PARAM_SET 0x2A
471 #define FIELD_PSMP_STA_INFO 0x2B
472 #define FIELD_MIMO_CNTRL 0x2C
473 #define FIELD_ANT_SELECTION 0x2D
474 #define FIELD_EXTENDED_CHANNEL_SWITCH_ANNOUNCEMENT 0x2E
475 #define FIELD_HT_INFORMATION 0x2F
476 #define FIELD_HT_ACTION_CODE 0x30
477 #define FIELD_PA_ACTION_CODE 0x31
478 #define FIELD_FT_ACTION_CODE 0x32
479 #define FIELD_STA_ADDRESS 0x33
480 #define FIELD_TARGET_AP_ADDRESS 0x34
481 #define FIELD_MESH_MGT_ACTION_PS_CODE 0x35 /* Mesh Management action peer link code */
482 #define FIELD_MESH_MGT_ACTION_PL_CODE 0x36 /* Mesh Management action peer link code */
483 #define FIELD_GAS_COMEBACK_DELAY 0x37
484 #define FIELD_GAS_FRAGMENT_ID 0x38
485 #define FIELD_SA_QUERY_ACTION_CODE 0x39
486 #define FIELD_TRANSACTION_ID 0x3A
487 #define FIELD_TDLS_ACTION_CODE 0x3B
488 #define FIELD_TARGET_CHANNEL 0x3C
489 #define FIELD_REGULATORY_CLASS 0x3D
492 /* ************************************************************************* */
493 /* Logical field codes (IEEE 802.11 encoding of tags) */
494 /* ************************************************************************* */
496 #define TAG_SUPP_RATES 1
497 #define TAG_FH_PARAMETER 2
498 #define TAG_DS_PARAMETER 3
499 #define TAG_CF_PARAMETER 4
501 #define TAG_IBSS_PARAMETER 6
502 #define TAG_COUNTRY_INFO 7
503 #define TAG_FH_HOPPING_PARAMETER 8
504 #define TAG_FH_HOPPING_TABLE 9
505 #define TAG_REQUEST 10
506 #define TAG_QBSS_LOAD 11
507 #define TAG_EDCA_PARAM_SET 12
510 #define TAG_SCHEDULE 15
511 #define TAG_CHALLENGE_TEXT 16
513 #define TAG_POWER_CONSTRAINT 32
514 #define TAG_POWER_CAPABILITY 33
515 #define TAG_TPC_REQUEST 34
516 #define TAG_TPC_REPORT 35
518 #define TAG_ERP_INFO 42
519 #define TAG_TS_DELAY 43
520 #define TAG_TCLAS_PROCESS 44
521 #define TAG_HT_CAPABILITY 45 /* IEEE Stc 802.11n/D2.0 */
522 #define TAG_QOS_CAPABILITY 46
523 #define TAG_ERP_INFO_OLD 47 /* IEEE Std 802.11g/D4.0 */
524 #define TAG_RSN_IE 48
526 #define TAG_EXT_SUPP_RATES 50
527 #define TAG_AP_CHANNEL_REPORT 51
530 #define TAG_MOBILITY_DOMAIN 54 /* IEEE Std 802.11r-2008 */
532 #define TAG_TIMEOUT_INTERVAL 56 /* IEEE Std 802.11r-2008 */
533 #define TAG_RIC_DATA 57 /* IEEE Std 802.11r-2008 */
535 #define TAG_SUPPORTED_REGULATORY_CLASSES 59 /* IEEE Std 802.11w-2009 */
536 #define TAG_EXTENDED_CHANNEL_SWITCH_ANNOUNCEMENT 60 /* IEEE Std 802.11w-2009 */
537 #define TAG_HT_INFO 61 /* IEEE Stc 802.11n/D2.0 */
538 #define TAG_SECONDARY_CHANNEL_OFFSET 62 /* IEEE Stc 802.11n/D1.10/D2.0 */
540 #define TAG_20_40_BSS_CO_EX 72 /* IEEE P802.11n/D6.0 */
541 #define TAG_20_40_BSS_INTOL_CH_REP 73 /* IEEE P802.11n/D6.0 */
542 #define TAG_OVERLAP_BSS_SCAN_PAR 74 /* IEEE P802.11n/D6.0 */
543 #define TAG_RIC_DESCRIPTOR 75 /* IEEE Std 802.11r-2008 */
544 #define TAG_MMIE 76 /* IEEE Std 802.11w-2009 */
545 #define TAG_LINK_IDENTIFIER 101 /* IEEE Std 802.11z-2010 */
546 #define TAG_WAKEUP_SCHEDULE 102 /* IEEE Std 802.11z-2010 */
547 #define TAG_CHANNEL_SWITCH_TIMING 104 /* IEEE Std 802.11z-2010 */
548 #define TAG_PTI_CONTROL 105 /* IEEE Std 802.11z-2010 */
549 #define TAG_PU_BUFFER_STATUS 106 /* IEEE Std 802.11z-2010 */
550 #define TAG_ADVERTISEMENT_PROTOCOL 108 /* IEEE P802.11u/D10.0 */
551 #define TAG_EXTENDED_CAPABILITIES 127 /* IEEE Stc 802.11n/D1.10/D2.0 */
552 #define TAG_AGERE_PROPRIETARY 128
553 #define TAG_CISCO_CCX1_CKIP 133 /* Cisco Compatible eXtensions */
554 #define TAG_CISCO_UNKNOWN_88 136 /* Cisco Compatible eXtensions? */
555 #define TAG_CISCO_UNKNOWN_95 149 /* Cisco Compatible eXtensions */
556 #define TAG_CISCO_UNKNOWN_96 150 /* Cisco Compatible eXtensions */
557 #define TAG_SYMBOL_PROPRIETARY 173
558 #define TAG_VENDOR_SPECIFIC_IE 221
560 #ifndef MESH_OVERRIDES
561 #define TAG_SUPPORTED_CHANNELS 36
562 #define TAG_CHANNEL_SWITCH_ANN 37
563 #define TAG_MEASURE_REQ 38
564 #define TAG_MEASURE_REP 39
566 #define TAG_IBSS_DFS 41
567 #define TAG_NEIGHBOR_REPORT 52
568 #define TAG_FAST_BSS_TRANSITION 55 /* IEEE Std 802.11r-2008 */
569 #define TAG_WSIE 69 /* tag of the Wave Service Information (802.11p) */
570 #else /* MESH_OVERRIDES */
571 #define TAG_SUPPORTED_CHANNELS 224
572 #define TAG_CHANNEL_SWITCH_ANN 225
573 #define TAG_MEASURE_REQ 226
574 #define TAG_MEASURE_REP 227
575 #define TAG_QUIET 228
576 #define TAG_IBSS_DFS 229
577 /* Not yet assigned by ANA */
578 #define TAG_MESH_CONFIGURATION 51
579 #define TAG_MESH_ID 52
580 #define TAG_MESH_PEER_LINK_MGMT 55
581 #define TAG_MESH_PREQ 68
582 #define TAG_MESH_PREP 69
583 #define TAG_MESH_PERR 70
584 #endif /* MESH_OVERRIDES */
586 static const range_string tag_num_vals[] = {
587 { TAG_SSID, TAG_SSID, "SSID parameter set" },
588 { TAG_SUPP_RATES, TAG_SUPP_RATES, "Supported Rates" },
589 { TAG_FH_PARAMETER, TAG_FH_PARAMETER, "FH Parameter set" },
590 { TAG_DS_PARAMETER, TAG_DS_PARAMETER, "DS Parameter set" },
591 { TAG_CF_PARAMETER, TAG_CF_PARAMETER, "CF Parameter set" },
592 { TAG_TIM, TAG_TIM, "Traffic Indication Map (TIM)" },
593 { TAG_IBSS_PARAMETER, TAG_IBSS_PARAMETER, "IBSS Parameter set" },
594 { TAG_COUNTRY_INFO, TAG_COUNTRY_INFO, "Country Information" },
595 { TAG_FH_HOPPING_PARAMETER, TAG_FH_HOPPING_PARAMETER, "Hopping Pattern Parameters" },
596 { TAG_FH_HOPPING_TABLE, TAG_FH_HOPPING_TABLE, "Hopping Pattern Table" },
597 { TAG_REQUEST, TAG_REQUEST, "Request" },
598 { TAG_QBSS_LOAD, TAG_QBSS_LOAD, "QBSS Load Element" },
599 { TAG_EDCA_PARAM_SET, TAG_EDCA_PARAM_SET, "EDCA Parameter Set" },
600 { TAG_TSPEC, TAG_TSPEC, "Traffic Specification" },
601 { TAG_TCLAS, TAG_TCLAS, "Traffic Classification" },
602 { TAG_SCHEDULE, TAG_SCHEDULE, "Schedule" },
603 { TAG_CHALLENGE_TEXT, TAG_CHALLENGE_TEXT,"Challenge text" },
604 { 17, 31, "Reserved" },
605 { TAG_POWER_CONSTRAINT, TAG_POWER_CONSTRAINT, "Power Constraint" },
606 { TAG_POWER_CAPABILITY, TAG_POWER_CAPABILITY, "Power Capability" },
607 { TAG_TPC_REQUEST, TAG_TPC_REQUEST, "TPC Request" },
608 { TAG_TPC_REPORT, TAG_TPC_REPORT, "TPC Report" },
609 { TAG_SUPPORTED_CHANNELS, TAG_SUPPORTED_CHANNELS, "Supported Channels" },
610 { TAG_CHANNEL_SWITCH_ANN, TAG_CHANNEL_SWITCH_ANN, "Channel Switch Announcement" },
611 { TAG_MEASURE_REQ, TAG_MEASURE_REQ, "Measurement Request" },
612 { TAG_MEASURE_REP, TAG_MEASURE_REP, "Measurement Report" },
613 { TAG_QUIET, TAG_QUIET, "Quiet" },
614 { TAG_IBSS_DFS, TAG_IBSS_DFS, "IBSS DFS" },
615 { TAG_ERP_INFO, TAG_ERP_INFO, "ERP Information" },
616 { TAG_TS_DELAY, TAG_TS_DELAY, "TS Delay" },
617 { TAG_TCLAS_PROCESS, TAG_TCLAS_PROCESS, "TCLAS Processing" },
618 { TAG_HT_CAPABILITY, TAG_HT_CAPABILITY, "HT Capabilities (802.11n D1.10)" },
619 { TAG_QOS_CAPABILITY, TAG_QOS_CAPABILITY, "QoS Capability" },
620 { TAG_ERP_INFO_OLD, TAG_ERP_INFO_OLD, "ERP Information" }, /* Reserved... */
621 { TAG_RSN_IE, TAG_RSN_IE, "RSN Information" },
622 { TAG_EXT_SUPP_RATES, TAG_EXT_SUPP_RATES, "Extended Supported Rates" },
623 { TAG_AP_CHANNEL_REPORT, TAG_AP_CHANNEL_REPORT, "AP Channel Report" },
624 #ifndef MESH_OVERRIDES
625 { TAG_NEIGHBOR_REPORT, TAG_NEIGHBOR_REPORT, "Neighbor Report" },
627 { TAG_RCPI, TAG_RCPI, "RCPI" },
628 { TAG_MOBILITY_DOMAIN, TAG_MOBILITY_DOMAIN, "Mobility Domain" },
629 #ifndef MESH_OVERRIDES
630 { TAG_FAST_BSS_TRANSITION, TAG_FAST_BSS_TRANSITION, "Fast BSS Transition" },
632 { TAG_TIMEOUT_INTERVAL, TAG_TIMEOUT_INTERVAL,"Timeout Interval" },
633 { TAG_RIC_DATA, TAG_RIC_DATA, "RIC Data" },
634 { TAG_SUPPORTED_REGULATORY_CLASSES, TAG_SUPPORTED_REGULATORY_CLASSES, "Supported Regulatory Classes" },
635 { TAG_EXTENDED_CHANNEL_SWITCH_ANNOUNCEMENT, TAG_EXTENDED_CHANNEL_SWITCH_ANNOUNCEMENT, "Extended Channel Switch Announcement" },
636 #ifndef MESH_OVERRIDES
637 { TAG_WSIE, TAG_WSIE, "Wave Service Information" }, /* www.aradasystems.com */
639 { TAG_20_40_BSS_CO_EX, TAG_20_40_BSS_CO_EX, "20/40 BSS Coexistence" },
640 { TAG_20_40_BSS_INTOL_CH_REP, TAG_20_40_BSS_INTOL_CH_REP, "20/40 BSS Intolerant Channel Report" }, /* IEEE P802.11n/D6.0 */
641 { TAG_OVERLAP_BSS_SCAN_PAR, TAG_OVERLAP_BSS_SCAN_PAR, "Overlapping BSS Scan Parameters" }, /* IEEE P802.11n/D6.0 */
642 { TAG_RIC_DESCRIPTOR, TAG_RIC_DESCRIPTOR, "RIC Descriptor" },
643 { TAG_MMIE, TAG_MMIE, "Management MIC" },
644 { TAG_LINK_IDENTIFIER, TAG_LINK_IDENTIFIER, "Link Identifier" },
645 { TAG_WAKEUP_SCHEDULE, TAG_WAKEUP_SCHEDULE, "Wakeup Schedule" },
646 { TAG_CHANNEL_SWITCH_TIMING, TAG_CHANNEL_SWITCH_TIMING, "Channel Switch Timing" },
647 { TAG_PTI_CONTROL, TAG_PTI_CONTROL, "PTI Control" },
648 { TAG_PU_BUFFER_STATUS, TAG_PU_BUFFER_STATUS, "PU Buffer Status" },
649 { TAG_ADVERTISEMENT_PROTOCOL, TAG_ADVERTISEMENT_PROTOCOL, "Advertisement Protocol"},
650 { TAG_EXTENDED_CAPABILITIES, TAG_EXTENDED_CAPABILITIES, "Extended Capabilities" },
651 { TAG_AGERE_PROPRIETARY, TAG_AGERE_PROPRIETARY, "Agere Proprietary" },
652 { TAG_CISCO_CCX1_CKIP, TAG_CISCO_CCX1_CKIP, "Cisco CCX1 CKIP + Device Name" },
653 { TAG_CISCO_UNKNOWN_88, TAG_CISCO_UNKNOWN_88, "Cisco Unknown 88" },
654 { TAG_CISCO_UNKNOWN_95, TAG_CISCO_UNKNOWN_95, "Cisco Unknown 95" },
655 { TAG_CISCO_UNKNOWN_96, TAG_CISCO_UNKNOWN_96, "Cisco Unknown 96" },
656 { TAG_SYMBOL_PROPRIETARY, TAG_SYMBOL_PROPRIETARY, "Symbol Proprietary" },
657 { TAG_VENDOR_SPECIFIC_IE, TAG_VENDOR_SPECIFIC_IE, "Vendor Specific" },
658 #ifdef MESH_OVERRIDES
659 { TAG_MESH_ID, TAG_MESH_ID, "Mesh ID" },
660 { TAG_MESH_CONFIGURATION, TAG_MESH_CONFIGURATION, "Mesh Configuration" },
661 { TAG_MESH_PEER_LINK_MGMT, TAG_MESH_PEER_LINK_MGMT, "Mesh Peer Link Management" },
662 { TAG_MESH_PREQ, TAG_MESH_PREQ, "Mesh Path Request" },
663 { TAG_MESH_PREP, TAG_MESH_PREP, "Mesh Path Response" },
664 { TAG_MESH_PERR, TAG_MESH_PERR, "Mesh Path Error" },
665 #endif /* MESH_OVERRIDES */
669 #define WPA_OUI (const guint8 *) "\x00\x50\xF2"
670 #define RSN_OUI (const guint8 *) "\x00\x0F\xAC"
671 #define WME_OUI (const guint8 *) "\x00\x50\xF2"
672 #define PRE_11N_OUI (const guint8 *) "\x00\x90\x4c" /* 802.11n pre 1 oui */
673 #define WFA_OUI (const guint8 *) "\x50\x6f\x9a"
675 /* WFA vendor specific subtypes */
676 #define WFA_SUBTYPE_P2P 9
680 /* ************************************************************************* */
681 /* Wireless Access in Vehicular Environment IEEE 802.11p */
682 /* ************************************************************************* */
683 #define WAVE_ACID 0x0001
684 #define WAVE_ACM 0x0002
685 #define WAVE_ACF 0x0004
686 #define WAVE_PRIORITY 0x0008
687 #define WAVE_CHANNEL 0x0010
688 #define WAVE_IPV6ADDR 0x0020
689 #define WAVE_PEERMAC 0x0040
691 /* ************************************************************************* */
692 /* Supported Rates (7.3.2.2) */
693 /* ************************************************************************* */
695 static const value_string ieee80211_supported_rates_vals[] = {
736 { 0xFF, "BSS requires support for mandatory features of HT PHY (IEEE 802.11 - Clause 20)" },
739 /* ************************************************************************* */
740 /* Frame types, and their names */
741 /* ************************************************************************* */
742 static const value_string frame_type_subtype_vals[] = {
743 {MGT_ASSOC_REQ, "Association Request"},
744 {MGT_ASSOC_RESP, "Association Response"},
745 {MGT_REASSOC_REQ, "Reassociation Request"},
746 {MGT_REASSOC_RESP, "Reassociation Response"},
747 {MGT_PROBE_REQ, "Probe Request"},
748 {MGT_PROBE_RESP, "Probe Response"},
749 {MGT_MEASUREMENT_PILOT, "Measurement Pilot"},
750 {MGT_BEACON, "Beacon frame"},
752 {MGT_DISASS, "Disassociate"},
753 {MGT_AUTHENTICATION, "Authentication"},
754 {MGT_DEAUTHENTICATION, "Deauthentication"},
755 {MGT_ACTION, "Action"},
756 {MGT_ACTION_NO_ACK, "Action No Ack"},
757 {MGT_ARUBA_WLAN, "Aruba Management"},
759 {CTRL_CONTROL_WRAPPER, "Control Wrapper"},
760 {CTRL_BLOCK_ACK_REQ, "802.11 Block Ack Req"},
761 {CTRL_BLOCK_ACK, "802.11 Block Ack"},
762 {CTRL_PS_POLL, "Power-Save poll"},
763 {CTRL_RTS, "Request-to-send"},
764 {CTRL_CTS, "Clear-to-send"},
765 {CTRL_ACKNOWLEDGEMENT, "Acknowledgement"},
766 {CTRL_CFP_END, "CF-End (Control-frame)"},
767 {CTRL_CFP_ENDACK, "CF-End + CF-Ack (Control-frame)"},
770 {DATA_CF_ACK, "Data + CF-Ack"},
771 {DATA_CF_POLL, "Data + CF-Poll"},
772 {DATA_CF_ACK_POLL, "Data + CF-Ack + CF-Poll"},
773 {DATA_NULL_FUNCTION, "Null function (No data)"},
774 {DATA_CF_ACK_NOD, "Acknowledgement (No data)"},
775 {DATA_CF_POLL_NOD, "CF-Poll (No data)"},
776 {DATA_CF_ACK_POLL_NOD, "CF-Ack/Poll (No data)"},
777 {DATA_QOS_DATA, "QoS Data"},
778 {DATA_QOS_DATA_CF_ACK, "QoS Data + CF-Acknowledgment"},
779 {DATA_QOS_DATA_CF_POLL, "QoS Data + CF-Poll"},
780 {DATA_QOS_DATA_CF_ACK_POLL, "QoS Data + CF-Ack + CF-Poll"},
781 {DATA_QOS_NULL, "QoS Null function (No data)"},
782 {DATA_QOS_CF_POLL_NOD, "QoS CF-Poll (No Data)"},
783 {DATA_QOS_CF_ACK_POLL_NOD, "QoS CF-Ack + CF-Poll (No data)"},
787 /* ************************************************************************* */
788 /* 802.1D Tag Names */
789 /* ************************************************************************* */
790 static const char *qos_tags[8] = {
801 /* ************************************************************************* */
802 /* WME Access Category Names (by 802.1D Tag) */
803 /* ************************************************************************* */
804 static const char *qos_acs[8] = {
815 /* ************************************************************************* */
816 /* WME Access Category Names (by WME ACI) */
817 /* ************************************************************************* */
818 static const value_string wme_acs[] = {
819 { 0, "Best Effort" },
826 /* ************************************************************************* */
827 /* Aruba Management Type */
828 /* ************************************************************************* */
829 static const value_string aruba_mgt_typevals[] = {
833 { 0x0004, "Ageout" },
834 { 0x0005, "Heartbeat" },
835 { 0x0006, "Deauth" },
836 { 0x0007, "Disassoc" },
837 { 0x0008, "Probe response" },
838 { 0x0009, "Tunnel update" },
839 { 0x000A, "Laser beam active" },
840 { 0x000B, "Client IP" },
841 { 0x000C, "Laser beam active v2" },
842 { 0x000D, "AP statistics" },
846 /*** Begin: Action Fixed Parameter ***/
847 #define CAT_SPECTRUM_MGMT 0
850 #define CAT_BLOCK_ACK 3
853 #define CAT_RADIO_MEASUREMENT 5
854 #define CAT_FAST_BSS_TRANSITION 6
856 #define CAT_SA_QUERY 8
857 #define CAT_PUBLIC_PROTECTED 9
859 #define CAT_MGMT_NOTIFICATION 17
860 #define CAT_VENDOR_SPECIFIC_PROTECTED 126
861 #define CAT_VENDOR_SPECIFIC 127
863 #ifdef MESH_OVERRIDES
864 #define CAT_MESH_PEER_LINK 30 /* Per 802.11s draft 1.08. ANA will probably revise this */
865 #define CAT_MESH_LINK_METRIC 31
866 #define CAT_MESH_PATH_SELECTION 32
867 #define CAT_MESH_INTERWORKING 33
868 #define CAT_MESH_RESOURCE_COORDINATION 34
869 #define CAT_MESH_SECURITY_ARCHITECTURE 35
870 #endif /* MESH_OVERRIDES */
872 #define SM_ACTION_MEASUREMENT_REQUEST 0
873 #define SM_ACTION_MEASUREMENT_REPORT 1
874 #define SM_ACTION_TPC_REQUEST 2
875 #define SM_ACTION_TPC_REPORT 3
876 #define SM_ACTION_CHAN_SWITCH_ANNC 4
877 #define SM_ACTION_EXT_CHAN_SWITCH_ANNC 5
879 #define SM_ACTION_ADDTS_REQUEST 0
880 #define SM_ACTION_ADDTS_RESPONSE 1
881 #define SM_ACTION_DELTS 2
882 #define SM_ACTION_QOS_SCHEDULE 3
884 #define SM_ACTION_DLS_REQUEST 0
885 #define SM_ACTION_DLS_RESPONSE 1
886 #define SM_ACTION_DLS_TEARDOWN 2
888 #define BA_ADD_BLOCK_ACK_REQUEST 0
889 #define BA_ADD_BLOCK_ACK_RESPONSE 1
890 #define BA_DELETE_BLOCK_ACK 2
892 #define PA_DSE_ENABLEMENT 1
893 #define PA_DSE_DEENABLEMENT 2
894 #define PA_DSE_REG_LOC_ANNOUNCEMENT 3
895 #define PA_EXT_CHANNEL_SWITCH_ANNOUNCEMENT 4
896 #define PA_DSE_MEASUREMENT_REQUEST 5
897 #define PA_DSE_MEASUREMENT_REPORT 6
898 #define PA_MEASUREMENT_PILOT 7
899 #define PA_DSE_POWER_CONSTRAINT 8
900 #define PA_VENDOR_SPECIFIC 9
901 #define PA_GAS_INITIAL_REQUEST 10
902 #define PA_GAS_INITIAL_RESPONSE 11
903 #define PA_GAS_COMEBACK_REQUEST 12
904 #define PA_GAS_COMEBACK_RESPONSE 13
905 #define PA_TDLS_DISCOVERY_RESPONSE 14
907 #define HT_ACTION_NOTIFY_CHAN_WIDTH 0
908 #define HT_ACTION_SM_PWR_SAVE 1
909 #define HT_ACTION_PSMP_ACTION 2
910 #define HT_ACTION_SET_PCO_PHASE 3
911 #define HT_ACTION_MIMO_CSI 4
912 #define HT_ACTION_MIMO_BEAMFORMING 5
913 #define HT_ACTION_MIMO_COMPRESSED_BEAMFORMING 6
914 #define HT_ACTION_ANT_SEL_FEEDBACK 7
915 #define HT_ACTION_HT_INFO_EXCHANGE 8
917 /* IEEE Std 802.11r-2008, 7.4.8, Table 7-57g */
918 #define FT_ACTION_REQUEST 1
919 #define FT_ACTION_RESPONSE 2
920 #define FT_ACTION_CONFIRM 3
921 #define FT_ACTION_ACK 4
923 /* SA Query Action frame codes (IEEE 802.11w-2009, 7.4.9) */
924 #define SA_QUERY_REQUEST 0
925 #define SA_QUERY_RESPONSE 1
927 /* IEEE Std 802.11z-2010, 7.4.11, Table 7-57v1 */
928 #define TDLS_SETUP_REQUEST 0
929 #define TDLS_SETUP_RESPONSE 1
930 #define TDLS_SETUP_CONFIRM 2
931 #define TDLS_TEARDOWN 3
932 #define TDLS_PEER_TRAFFIC_INDICATION 4
933 #define TDLS_CHANNEL_SWITCH_REQUEST 5
934 #define TDLS_CHANNEL_SWITCH_RESPONSE 6
935 #define TDLS_PEER_PSM_REQUEST 7
936 #define TDLS_PEER_PSM_RESPONSE 8
937 #define TDLS_PEER_TRAFFIC_RESPONSE 9
938 #define TDLS_DISCOVERY_REQUEST 10
940 #ifdef MESH_OVERRIDES
941 #define MESH_PL_PEER_LINK_OPEN 0
942 #define MESH_PL_PEER_LINK_CONFIRM 1
943 #define MESH_PL_PEER_LINK_CLOSE 2
945 #define MESH_PS_PATH_REQUEST 0
946 #define MESH_PS_PATH_REPLY 1
947 #define MESH_PS_PATH_ERROR 2
948 #define MESH_PS_ROOT_ANNOUNCEMENT 3
949 #endif /* MESH_OVERRIDES */
951 /* 11s draft, table 7-22 */
952 #define MESH_LINK_CANCELLED 2
953 #define MESH_MAX_NEIGHBORS 3
954 #define MESH_CONFIG_POLICY_VIOLATION 4
955 #define MESH_CLOSE_RCVD 5
956 #define MESH_MAX_RETRIES 6
957 #define MESH_CONFIRM_TIMEOUT 7
961 #define MRVL_ACTION_MESH_MANAGEMENT 1
963 #define MRVL_MESH_MGMT_ACTION_RREQ 0
964 #define MRVL_MESH_MGMT_ACTION_RREP 1
965 #define MRVL_MESH_MGMT_ACTION_RERR 2
966 #define MRVL_MESH_MGMT_ACTION_PLDM 3
968 /*** End: Action Fixed Parameter ***/
970 static const value_string ieee80211_tag_measure_request_type_flags[] = {
971 {0x00, "Basic Request"},
972 {0x01, "Clear Channel Assessment (CCA) Request"},
973 {0x02, "Receive Power Indication (RPI) Histogram Request"},
974 {0x03, "Channel Load Request"},
975 {0x04, "Noise Histogram Request"},
976 {0x05, "Beacon Request"},
977 {0x06, "Frame Request"},
978 {0x07, "STA Statistics Request"},
979 {0x08, "Location Configuration Indication (LCI) Request"},
980 {0x09, "Transmit Stream Measurement Request"},
981 {0x0A, "Measurement Pause Request"},
985 static const value_string ieee80211_tag_measure_report_type_flags[] = {
986 { 0x00, "Basic Report" },
987 { 0x01, "Clear Channel Assessment (CCA) Report" },
988 { 0x02, "Receive Power Indication (RPI) Histogram Report" },
989 { 0x03, "Channel Load Report" },
990 { 0x04, "Noise Histogram Report" },
991 { 0x05, "Beacon Report" },
992 { 0x06, "Frame Report" },
993 { 0x07, "STA Statistics Report" },
994 { 0x08, "Location Configuration Information (LCI) Report" },
995 { 0x09, "Transmit Stream Measurement Report" },
999 static const true_false_string ieee80211_tag_measure_report_frame_info_frame_type_flag = {
1000 "Measurement Pilot Frame",
1001 "Beacon/Probe Response Frame"
1004 static const true_false_string ieee80211_tag_measure_map_field_bss_flag = {
1005 "At least one MPDU was received by another BSS or IBSS in the measurement period.",
1006 "No MPDUs were received from another BSS or IBSS in the measurement period."
1009 static const value_string ieee80211_tag_measure_request_measurement_mode_flags[] = {
1010 { 0x00, "Passive" },
1012 { 0x02, "Beacon Table" },
1016 #define MEASURE_REQ_BEACON_SUB_SSID 0
1017 #define MEASURE_REQ_BEACON_SUB_BRI 1
1018 #define MEASURE_REQ_BEACON_SUB_RD 2
1019 #define MEASURE_REQ_BEACON_SUB_REQUEST 10
1020 #define MEASURE_REQ_BEACON_SUB_APCP 51
1021 #define MEASURE_REQ_BEACON_SUB_VS 221
1023 static const value_string ieee80211_tag_measure_request_beacon_sub_id_flags[] = {
1024 { MEASURE_REQ_BEACON_SUB_SSID, "SSID" },
1025 { MEASURE_REQ_BEACON_SUB_BRI, "Beacon Reporting Information" },
1026 { MEASURE_REQ_BEACON_SUB_RD, "Reporting Detail" },
1027 { MEASURE_REQ_BEACON_SUB_REQUEST, "Request" },
1028 { MEASURE_REQ_BEACON_SUB_APCP, "AP Channel Report" },
1029 { MEASURE_REQ_BEACON_SUB_VS, "Vendor Specific" },
1033 static const value_string ieee80211_tag_measure_request_beacon_sub_bri_reporting_condition_flags[] = {
1034 { 0x00, "Report to be issued after each measurement." },
1035 { 0x01, "The measured RCPI level is greater than an absolute threshold." },
1036 { 0x02, "The measured RCPI level is less than an absolute threshold." },
1037 { 0x03, "The measured RSNI level is greater than an absolute threshold." },
1038 { 0x04, "The measured RSNI level is less than an absolute threshold." },
1039 { 0x05, "The measured RCPI level is greater than a threshold defined by an offset from the serving AP's reference RCPI." },
1040 { 0x06, "The measured RCPI level is less than a threshold defined by an offset from the serving AP's reference RCPI." },
1041 { 0x07, "The measured RSNI level is greater than a threshold defined by an offset from the serving AP's reference RSNI." },
1042 { 0x08, "The measured RSNI level is less than a threshold defined by an offset from the serving AP's reference RSNI." },
1043 { 0x09, "The measured RCPI level is in a range bound by the serving AP's reference RCPI and an offset from the serving AP's reference RCPI." },
1044 { 0x0a, "The measured RSNI level is in a range bound by the serving AP's reference RSNI and an offset from the serving AP's reference RSNI." },
1045 { 0xfe, "Report not required to be issued" },
1049 static const value_string ieee80211_tag_measure_request_beacon_sub_reporting_detail_flags[] = {
1050 { 0, "No fixed length fields or elements" },
1051 { 1, "All fixed length fields and any requested elements in the Request information element if present" },
1052 { 2, "All fixed length fields and elements (default, used when Reporting Detail subelement is not included in Beacon Request" },
1056 static const value_string ieee80211_tag_measure_request_group_id_flags[] = {
1057 { 0x00, "STA Counters from dot11CountersTable" },
1058 { 0x01, "STA Counters from dot11MacStatistics group" },
1059 { 0x02, "QoS STA Counters for UP0 from dot11QosCountersTable" },
1060 { 0x03, "QoS STA Counters for UP1 from dot11QosCountersTable" },
1061 { 0x04, "QoS STA Counters for UP2 from dot11QosCountersTable" },
1062 { 0x05, "QoS STA Counters for UP3 from dot11QosCountersTable" },
1063 { 0x06, "QoS STA Counters for UP4 from dot11QosCountersTable" },
1064 { 0x07, "QoS STA Counters for UP5 from dot11QosCountersTable" },
1065 { 0x08, "QoS STA Counters for UP6 from dot11QosCountersTable" },
1066 { 0x09, "QoS STA Counters for UP7 from dot11QosCountersTable" },
1067 { 0x0a, "BSS Average Access Delays" },
1068 { 0x0b, "STA Counters from dot11A-MSDU Group" },
1069 { 0x0c, "STA Counters from dot11A-MPDU Group" },
1070 { 0x0d, "STA Counters from dot11 BAR, Channel Width, PSMP Group" },
1071 { 0x0e, "STA Counters from dot11Protection Group" },
1072 { 0x0f, "STBC Group" },
1076 static int proto_wlan = -1;
1077 static int proto_aggregate = -1;
1078 static packet_info * g_pinfo;
1080 static int proto_radio = -1;
1081 static int proto_wlancap = -1;
1082 static int proto_prism = -1;
1084 /* ************************************************************************* */
1085 /* Header field info values for radio information */
1086 /* ************************************************************************* */
1087 static int hf_mactime = -1;
1088 static int hf_hosttime = -1;
1089 static int hf_data_rate = -1;
1090 static int hf_channel = -1;
1091 static int hf_channel_frequency = -1;
1092 static int hf_normrssi_antsignal = -1;
1093 static int hf_dbm_antsignal = -1;
1094 static int hf_rawrssi_antsignal = -1;
1095 static int hf_normrssi_antnoise = -1;
1096 static int hf_dbm_antnoise = -1;
1097 static int hf_rawrssi_antnoise = -1;
1098 static int hf_signal_strength = -1;
1100 /* Prism radio header */
1102 static int hf_ieee80211_prism_msgcode = -1;
1103 static int hf_ieee80211_prism_msglen = -1;
1104 static int hf_ieee80211_prism_devname = -1;
1105 static int hf_ieee80211_prism_did = -1;
1106 static int hf_ieee80211_prism_did_type = -1;
1107 static int hf_ieee80211_prism_did_status = -1;
1108 static int hf_ieee80211_prism_did_length = -1;
1109 static int hf_ieee80211_prism_did_hosttime = -1;
1110 static int hf_ieee80211_prism_did_mactime = -1;
1111 static int hf_ieee80211_prism_did_channel = -1;
1112 static int hf_ieee80211_prism_did_rssi = -1;
1113 static int hf_ieee80211_prism_did_sq = -1;
1114 static int hf_ieee80211_prism_did_signal = -1;
1115 static int hf_ieee80211_prism_did_noise = -1;
1116 static int hf_ieee80211_prism_did_rate = -1;
1117 static int hf_ieee80211_prism_did_istx = -1;
1118 static int hf_ieee80211_prism_did_frmlen = -1;
1119 static int hf_ieee80211_prism_did_unknown = -1;
1121 /* AVS WLANCAP radio header */
1122 static int hf_wlan_magic = -1;
1123 static int hf_wlan_version = -1;
1124 static int hf_wlan_length = -1;
1125 static int hf_wlan_phytype = -1;
1126 static int hf_wlan_antenna = -1;
1127 static int hf_wlan_priority = -1;
1128 static int hf_wlan_ssi_type = -1;
1129 static int hf_wlan_preamble = -1;
1130 static int hf_wlan_encoding = -1;
1131 static int hf_wlan_sequence = -1;
1132 static int hf_wlan_drops = -1;
1133 static int hf_wlan_receiver_addr = -1;
1134 static int hf_wlan_padding = -1;
1136 /* ************************************************************************* */
1137 /* Header field info values for FC-field */
1138 /* ************************************************************************* */
1139 static int hf_ieee80211_fc_field = -1;
1140 static int hf_ieee80211_fc_proto_version = -1;
1141 static int hf_ieee80211_fc_frame_type = -1;
1142 static int hf_ieee80211_fc_frame_subtype = -1;
1143 static int hf_ieee80211_fc_frame_type_subtype = -1;
1145 static int hf_ieee80211_fc_flags = -1;
1146 static int hf_ieee80211_fc_to_ds = -1;
1147 static int hf_ieee80211_fc_from_ds = -1;
1148 static int hf_ieee80211_fc_data_ds = -1;
1150 static int hf_ieee80211_fc_more_frag = -1;
1151 static int hf_ieee80211_fc_retry = -1;
1152 static int hf_ieee80211_fc_pwr_mgt = -1;
1153 static int hf_ieee80211_fc_more_data = -1;
1154 static int hf_ieee80211_fc_protected = -1;
1155 static int hf_ieee80211_fc_order = -1;
1157 typedef struct retransmit_key {
1160 guint16 seq_control;
1164 static GHashTable *fc_analyse_retransmit_table = NULL;
1165 static GHashTable *fc_first_frame_table = NULL;
1167 static int hf_ieee80211_fc_analysis_retransmission = -1;
1168 static int hf_ieee80211_fc_analysis_retransmission_frame = -1;
1170 /* ************************************************************************* */
1171 /* Header values for Duration/ID field */
1172 /* ************************************************************************* */
1173 static int hf_ieee80211_did_duration = -1;
1174 static int hf_ieee80211_assoc_id = -1;
1176 /* ************************************************************************* */
1177 /* Header values for different address-fields (all 4 of them) */
1178 /* ************************************************************************* */
1179 static int hf_ieee80211_addr_da = -1; /* Destination address subfield */
1180 static int hf_ieee80211_addr_sa = -1; /* Source address subfield */
1181 static int hf_ieee80211_addr_ra = -1; /* Receiver address subfield */
1182 static int hf_ieee80211_addr_ta = -1; /* Transmitter address subfield */
1183 static int hf_ieee80211_addr_bssid = -1; /* address is bssid */
1185 static int hf_ieee80211_addr = -1; /* Source or destination address subfield */
1188 /* ************************************************************************* */
1189 /* Header values for QoS control field */
1190 /* ************************************************************************* */
1191 static int hf_ieee80211_qos_priority = -1;
1192 static int hf_ieee80211_qos_ack_policy = -1;
1193 static int hf_ieee80211_qos_amsdu_present = -1;
1194 static int hf_ieee80211_qos_eosp = -1;
1195 static int hf_ieee80211_qos_bit4 = -1;
1196 static int hf_ieee80211_qos_txop_limit = -1;
1197 static int hf_ieee80211_qos_buf_state_indicated = -1;
1198 static int hf_ieee80211_qos_highest_pri_buf_ac = -1;
1199 static int hf_ieee80211_qos_qap_buf_load = -1;
1200 static int hf_ieee80211_qos_txop_dur_req = -1;
1201 static int hf_ieee80211_qos_queue_size = -1;
1203 /* ************************************************************************* */
1204 /* Header values for HT control field (+HTC) */
1205 /* ************************************************************************* */
1206 /* 802.11nD-1.10 & 802.11nD-2.0 7.1.3.5a */
1207 static int hf_ieee80211_htc = -1;
1208 static int hf_ieee80211_htc_lac = -1;
1209 static int hf_ieee80211_htc_lac_reserved = -1;
1210 static int hf_ieee80211_htc_lac_trq = -1;
1211 static int hf_ieee80211_htc_lac_mai_aseli = -1;
1212 static int hf_ieee80211_htc_lac_mai_mrq = -1;
1213 static int hf_ieee80211_htc_lac_mai_msi = -1;
1214 static int hf_ieee80211_htc_lac_mai_reserved = -1;
1215 static int hf_ieee80211_htc_lac_mfsi = -1;
1216 static int hf_ieee80211_htc_lac_mfb = -1;
1217 static int hf_ieee80211_htc_lac_asel_command = -1;
1218 static int hf_ieee80211_htc_lac_asel_data = -1;
1219 static int hf_ieee80211_htc_cal_pos = -1;
1220 static int hf_ieee80211_htc_cal_seq = -1;
1221 static int hf_ieee80211_htc_reserved1 = -1;
1222 static int hf_ieee80211_htc_csi_steering = -1;
1223 static int hf_ieee80211_htc_ndp_announcement = -1;
1224 static int hf_ieee80211_htc_reserved2 = -1;
1225 static int hf_ieee80211_htc_ac_constraint = -1;
1226 static int hf_ieee80211_htc_rdg_more_ppdu = -1;
1228 /* ************************************************************************* */
1229 /* Header values for sequence number field */
1230 /* ************************************************************************* */
1231 static int hf_ieee80211_frag_number = -1;
1232 static int hf_ieee80211_seq_number = -1;
1234 /* ************************************************************************* */
1235 /* Header values for Frame Check field */
1236 /* ************************************************************************* */
1237 static int hf_ieee80211_fcs = -1;
1238 static int hf_ieee80211_fcs_good = -1;
1239 static int hf_ieee80211_fcs_bad = -1;
1241 /* ************************************************************************* */
1242 /* Header values for reassembly */
1243 /* ************************************************************************* */
1244 static int hf_ieee80211_fragments = -1;
1245 static int hf_ieee80211_fragment = -1;
1246 static int hf_ieee80211_fragment_overlap = -1;
1247 static int hf_ieee80211_fragment_overlap_conflict = -1;
1248 static int hf_ieee80211_fragment_multiple_tails = -1;
1249 static int hf_ieee80211_fragment_too_long_fragment = -1;
1250 static int hf_ieee80211_fragment_error = -1;
1251 static int hf_ieee80211_fragment_count = -1;
1252 static int hf_ieee80211_reassembled_in = -1;
1253 static int hf_ieee80211_reassembled_length = -1;
1255 static int proto_wlan_mgt = -1;
1257 /* ************************************************************************* */
1258 /* Header values for WAVE */
1259 /* ************************************************************************* */
1261 static int hf_ieee80211_pst_timingquality = -1;
1262 static int hf_ieee80211_pst_providercount = -1;
1263 static int hf_ieee80211_pst_providercap = -1;
1264 static int hf_ieee80211_pst_length = -1;
1265 static int hf_ieee80211_pst_contents = -1;
1266 static int hf_ieee80211_pst_acid = -1;
1267 static int hf_ieee80211_pst_acm_length = -1;
1268 static int hf_ieee80211_pst_acm_contents =-1;
1269 static int hf_ieee80211_pst_acf = -1;
1270 static int hf_ieee80211_pst_priority = -1;
1271 static int hf_ieee80211_pst_ipv6addr = -1;
1272 static int hf_ieee80211_pst_serviceport = -1;
1273 static int hf_ieee80211_pst_addressing = -1;
1274 static int hf_ieee80211_pst_macaddr = -1;
1275 static int hf_ieee80211_pst_channel = -1;
1277 static int hf_ieee80211_chan_noc = -1;
1278 static int hf_ieee80211_chan_length = -1;
1279 static int hf_ieee80211_chan_content = -1;
1280 static int hf_ieee80211_chan_channel = -1;
1281 static int hf_ieee80211_chan_adapt = -1;
1282 static int hf_ieee80211_chan_rate = -1;
1283 static int hf_ieee80211_chan_tx_pow = -1;
1285 #ifdef MESH_OVERRIDES
1286 /* ************************************************************************* */
1287 /* Header values for Mesh Header field */
1288 /* ************************************************************************* */
1289 static int hf_ieee80211_mesh_ttl = -1;
1290 static int hf_ieee80211_mesh_seq = -1;
1291 static int hf_ieee80211_mesh_flags = -1;
1292 static int hf_ieee80211_mesh_ae1 = -1;
1293 static int hf_ieee80211_mesh_ae2 = -1;
1294 static int hf_ieee80211_mesh_ae3 = -1;
1295 #endif /* MESH_OVERRIDES */
1297 /* ************************************************************************* */
1298 /* Fixed fields found in mgt frames */
1299 /* ************************************************************************* */
1300 static int hf_ieee80211_fixed_parameters = -1; /* Protocol payload for management frames */
1302 static int hf_ieee80211_ff_auth_alg = -1; /* Authentication algorithm field */
1303 static int hf_ieee80211_ff_auth_seq = -1; /* Authentication transaction sequence */
1304 static int hf_ieee80211_ff_current_ap = -1; /* Current AP MAC address */
1305 static int hf_ieee80211_ff_listen_ival = -1; /* Listen interval fixed field */
1306 static int hf_ieee80211_ff_timestamp = -1; /* 64 bit timestamp */
1307 static int hf_ieee80211_ff_beacon_interval = -1; /* 16 bit Beacon interval */
1308 static int hf_ieee80211_ff_assoc_id = -1; /* 16 bit AID field */
1309 static int hf_ieee80211_ff_reason = -1; /* 16 bit reason code */
1310 static int hf_ieee80211_ff_status_code = -1; /* Status code */
1311 static int hf_ieee80211_ff_category_code = -1; /* 8 bit Category code */
1312 static int hf_ieee80211_ff_action_code = -1; /* 8 bit Action code */
1313 static int hf_ieee80211_ff_dialog_token = -1; /* 8 bit Dialog token */
1314 static int hf_ieee80211_ff_wme_action_code = -1; /* Management notification action code */
1315 static int hf_ieee80211_ff_wme_status_code = -1; /* Management notification setup response status code */
1316 static int hf_ieee80211_ff_qos_action_code = -1;
1317 static int hf_ieee80211_ff_dls_action_code = -1;
1318 static int hf_ieee80211_ff_dst_mac_addr = -1; /* DLS destination MAC addressi */
1319 static int hf_ieee80211_ff_src_mac_addr = -1; /* DLS source MAC addressi */
1320 static int hf_ieee80211_ff_dls_timeout = -1; /* DLS timeout value */
1321 static int hf_ieee80211_ff_ft_action_code = -1; /* 8 bit FT Action code */
1322 static int hf_ieee80211_ff_sta_address = -1;
1323 static int hf_ieee80211_ff_target_ap_address = -1;
1324 static int hf_ieee80211_ff_gas_comeback_delay = -1;
1325 static int hf_ieee80211_ff_gas_fragment_id = -1;
1326 static int hf_ieee80211_ff_more_gas_fragments = -1;
1327 static int hf_ieee80211_ff_query_request_length = -1;
1328 static int hf_ieee80211_ff_query_request = -1;
1329 static int hf_ieee80211_ff_query_response_length = -1;
1330 static int hf_ieee80211_ff_query_response = -1;
1331 static int hf_ieee80211_ff_anqp_info_id = -1;
1332 static int hf_ieee80211_ff_anqp_info_length = -1;
1333 static int hf_ieee80211_ff_anqp_info = -1;
1334 static int hf_ieee80211_ff_tdls_action_code = -1;
1335 static int hf_ieee80211_ff_target_channel = -1;
1336 static int hf_ieee80211_ff_regulatory_class = -1;
1338 static int hf_ieee80211_ff_sa_query_action_code = -1;
1339 static int hf_ieee80211_ff_transaction_id = -1;
1341 /* Vendor specific */
1342 static int hf_ieee80211_ff_marvell_action_type = -1;
1343 static int hf_ieee80211_ff_marvell_mesh_mgt_action_code = -1;
1344 static int hf_ieee80211_ff_mesh_mgt_length = -1; /* Mesh Management length */
1345 static int hf_ieee80211_ff_mesh_mgt_mode = -1; /* Mesh Management mode */
1346 static int hf_ieee80211_ff_mesh_mgt_ttl = -1; /* Mesh Management TTL */
1347 static int hf_ieee80211_ff_mesh_mgt_dstcount = -1; /* Mesh Management dst count */
1348 static int hf_ieee80211_ff_mesh_mgt_hopcount = -1; /* Mesh Management hop count */
1349 static int hf_ieee80211_ff_mesh_mgt_rreqid = -1; /* Mesh Management RREQ ID */
1350 static int hf_ieee80211_ff_mesh_mgt_sa = -1; /* Mesh Management src addr */
1351 static int hf_ieee80211_ff_mesh_mgt_ssn = -1; /* Mesh Management src sequence number */
1352 static int hf_ieee80211_ff_mesh_mgt_metric = -1; /* Mesh Management metric */
1353 static int hf_ieee80211_ff_mesh_mgt_flags = -1; /* Mesh Management RREQ flags */
1354 static int hf_ieee80211_ff_mesh_mgt_da = -1; /* Mesh Management dst addr */
1355 static int hf_ieee80211_ff_mesh_mgt_dsn = -1; /* Mesh Management dst sequence number */
1356 static int hf_ieee80211_ff_mesh_mgt_lifetime = -1; /* Mesh Management lifetime */
1359 static int hf_ieee80211_ff_ba_action = -1;
1361 static int hf_ieee80211_ff_block_ack_params = -1;
1362 static int hf_ieee80211_ff_block_ack_params_amsdu_permitted = -1;
1363 static int hf_ieee80211_ff_block_ack_params_policy = -1;
1364 static int hf_ieee80211_ff_block_ack_params_tid = -1;
1365 static int hf_ieee80211_ff_block_ack_params_buffer_size = -1;
1367 static int hf_ieee80211_ff_block_ack_timeout = -1;
1369 static int hf_ieee80211_ff_block_ack_ssc = -1;
1370 static int hf_ieee80211_ff_block_ack_ssc_fragment = -1;
1371 static int hf_ieee80211_ff_block_ack_ssc_sequence = -1;
1373 static int hf_ieee80211_ff_delba_param = -1;
1374 static int hf_ieee80211_ff_delba_param_reserved = -1;
1375 static int hf_ieee80211_ff_delba_param_init = -1;
1376 static int hf_ieee80211_ff_delba_param_tid = -1;
1378 static int hf_ieee80211_ff_max_reg_pwr = -1;
1379 static int hf_ieee80211_ff_measurement_pilot_int = -1;
1380 static int hf_ieee80211_ff_country_str = -1;
1381 static int hf_ieee80211_ff_max_tx_pwr = -1;
1382 static int hf_ieee80211_ff_tx_pwr_used = -1;
1383 static int hf_ieee80211_ff_transceiver_noise_floor = -1;
1384 static int hf_ieee80211_ff_channel_width = -1;
1386 static int hf_ieee80211_ff_qos_info_ap = -1;
1387 static int hf_ieee80211_ff_qos_info_ap_edca_param_set_counter = -1;
1388 static int hf_ieee80211_ff_qos_info_ap_q_ack = -1;
1389 static int hf_ieee80211_ff_qos_info_ap_queue_req = -1;
1390 static int hf_ieee80211_ff_qos_info_ap_txop_request = -1;
1391 static int hf_ieee80211_ff_qos_info_ap_reserved = -1;
1393 static int hf_ieee80211_ff_qos_info_sta = -1;
1394 static int hf_ieee80211_ff_qos_info_sta_ac_vo = -1;
1395 static int hf_ieee80211_ff_qos_info_sta_ac_vi = -1;
1396 static int hf_ieee80211_ff_qos_info_sta_ac_bk = -1;
1397 static int hf_ieee80211_ff_qos_info_sta_ac_be = -1;
1398 static int hf_ieee80211_ff_qos_info_sta_q_ack = -1;
1399 static int hf_ieee80211_ff_qos_info_sta_max_sp_len = -1;
1400 static int hf_ieee80211_ff_qos_info_sta_more_data_ack = -1;
1402 static int hf_ieee80211_ff_sm_pwr_save = -1;
1403 static int hf_ieee80211_ff_sm_pwr_save_enabled = -1;
1404 static int hf_ieee80211_ff_sm_pwr_save_sm_mode = -1;
1405 static int hf_ieee80211_ff_sm_pwr_save_reserved = -1;
1407 static int hf_ieee80211_ff_pco_phase_cntrl = -1;
1409 static int hf_ieee80211_ff_psmp_param_set = -1;
1410 static int hf_ieee80211_ff_psmp_param_set_n_sta = -1;
1411 static int hf_ieee80211_ff_psmp_param_set_more_psmp = -1;
1412 static int hf_ieee80211_ff_psmp_param_set_psmp_sequence_duration = -1;
1414 static int hf_ieee80211_ff_mimo_cntrl = -1;
1415 static int hf_ieee80211_ff_mimo_cntrl_nc_index = -1;
1416 static int hf_ieee80211_ff_mimo_cntrl_nr_index = -1;
1417 static int hf_ieee80211_ff_mimo_cntrl_channel_width = -1;
1418 static int hf_ieee80211_ff_mimo_cntrl_grouping = -1;
1419 static int hf_ieee80211_ff_mimo_cntrl_coefficient_size = -1;
1420 static int hf_ieee80211_ff_mimo_cntrl_codebook_info = -1;
1421 static int hf_ieee80211_ff_mimo_cntrl_remaining_matrix_segment = -1;
1422 static int hf_ieee80211_ff_mimo_cntrl_reserved = -1;
1423 static int hf_ieee80211_ff_mimo_cntrl_sounding_timestamp = -1;
1425 static int hf_ieee80211_ff_ant_selection = -1;
1426 static int hf_ieee80211_ff_ant_selection_0 = -1;
1427 static int hf_ieee80211_ff_ant_selection_1 = -1;
1428 static int hf_ieee80211_ff_ant_selection_2 = -1;
1429 static int hf_ieee80211_ff_ant_selection_3 = -1;
1430 static int hf_ieee80211_ff_ant_selection_4 = -1;
1431 static int hf_ieee80211_ff_ant_selection_5 = -1;
1432 static int hf_ieee80211_ff_ant_selection_6 = -1;
1433 static int hf_ieee80211_ff_ant_selection_7 = -1;
1435 static int hf_ieee80211_ff_ext_channel_switch_announcement = -1;
1436 static int hf_ieee80211_ff_ext_channel_switch_announcement_switch_mode = -1;
1437 static int hf_ieee80211_ff_ext_channel_switch_announcement_new_reg_class = -1;
1438 static int hf_ieee80211_ff_ext_channel_switch_announcement_new_chan_number = -1;
1439 static int hf_ieee80211_ff_ext_channel_switch_announcement_switch_count = -1;
1441 static int hf_ieee80211_ff_ht_info = -1;
1442 static int hf_ieee80211_ff_ht_info_information_request = -1;
1443 static int hf_ieee80211_ff_ht_info_40_mhz_intolerant = -1;
1444 static int hf_ieee80211_ff_ht_info_sta_chan_width = -1;
1445 static int hf_ieee80211_ff_ht_info_reserved = -1;
1447 static int hf_ieee80211_ff_ht_action = -1;
1449 static int hf_ieee80211_ff_psmp_sta_info = -1;
1450 static int hf_ieee80211_ff_psmp_sta_info_type = -1;
1451 static int hf_ieee80211_ff_psmp_sta_info_dtt_start_offset = -1;
1452 static int hf_ieee80211_ff_psmp_sta_info_dtt_duration = -1;
1453 static int hf_ieee80211_ff_psmp_sta_info_sta_id = -1;
1454 static int hf_ieee80211_ff_psmp_sta_info_utt_start_offset = -1;
1455 static int hf_ieee80211_ff_psmp_sta_info_utt_duration = -1;
1456 static int hf_ieee80211_ff_psmp_sta_info_reserved_small= -1;
1457 static int hf_ieee80211_ff_psmp_sta_info_reserved_large = -1;
1458 static int hf_ieee80211_ff_psmp_sta_info_psmp_multicast_id = -1;
1460 static int hf_ieee80211_ff_mimo_csi_snr = -1;
1462 #ifdef MESH_OVERRIDES
1464 /*** Begin: Mesh Frame Format ***/
1465 static int hf_ieee80211_ff_mesh_mgt_action_ps_code = -1;/* Mesh Management path selection action code */
1466 static int hf_ieee80211_ff_mesh_mgt_action_pl_code = -1;/* Mesh Management peer link action code */
1467 /* NB: see above for more items */
1468 static int hf_ieee80211_ff_mesh_mgt_dest_flags = -1; /* Mesh Management destination flags */
1469 static int hf_ieee80211_ff_mesh_mgt_srccount = -1; /* Mesh Management src count */
1470 static int hf_ieee80211_ff_mesh_mgt_dest_do_flags = -1; /* Mesh Management Destination Only flag */
1471 static int hf_ieee80211_ff_mesh_mgt_dest_rf_flags = -1; /* Mesh Management Reply and Forward flag */
1474 /* variable header fields */
1475 static int hf_ieee80211_mesh_mgt_pl_subtype = -1;/* Mesh Management peer link frame subtype */
1476 static int hf_ieee80211_mesh_mgt_pl_local_link_id = -1;/* Mesh Management local link id */
1477 static int hf_ieee80211_mesh_mgt_pl_peer_link_id = -1;/* Mesh Management peer link id */
1478 static int hf_ieee80211_mesh_mgt_pl_reason_code = -1;/* Mesh Management peer link reason code */
1479 static int hf_ieee80211_mesh_config_version = -1;
1480 static int hf_ieee80211_mesh_config_path_sel_protocol = -1;
1481 static int hf_ieee80211_mesh_config_path_sel_metric = -1;
1482 static int hf_ieee80211_mesh_config_congestion_control = -1;
1483 static int hf_ieee80211_mesh_config_channel_prec = -1;
1484 static int hf_ieee80211_mesh_config_capability = -1;
1485 static int hf_ieee80211_mesh_id = -1;
1486 /*** End: Mesh Frame Format ***/
1488 #endif /* MESH_OVERRIDES */
1490 static int hf_ieee80211_ff_public_action = -1;
1492 /* ************************************************************************* */
1493 /* Flags found in the capability field (fixed field) */
1494 /* ************************************************************************* */
1495 static int hf_ieee80211_ff_capture = -1;
1496 static int hf_ieee80211_ff_cf_ess = -1;
1497 static int hf_ieee80211_ff_cf_ibss = -1;
1498 static int hf_ieee80211_ff_cf_sta_poll = -1; /* CF pollable status for a STA */
1499 static int hf_ieee80211_ff_cf_ap_poll = -1; /* CF pollable status for an AP */
1500 static int hf_ieee80211_ff_cf_privacy = -1;
1501 static int hf_ieee80211_ff_cf_preamble = -1;
1502 static int hf_ieee80211_ff_cf_pbcc = -1;
1503 static int hf_ieee80211_ff_cf_agility = -1;
1504 static int hf_ieee80211_ff_short_slot_time = -1;
1505 static int hf_ieee80211_ff_dsss_ofdm = -1;
1506 static int hf_ieee80211_ff_cf_spec_man = -1;
1507 static int hf_ieee80211_ff_cf_apsd = -1;
1508 static int hf_ieee80211_ff_cf_del_blk_ack = -1;
1509 static int hf_ieee80211_ff_cf_imm_blk_ack = -1;
1511 /* ************************************************************************* */
1513 /* ************************************************************************* */
1514 static int hf_ieee80211_amsdu_msdu_header_text = -1;
1517 /* ************************************************************************* */
1518 /* Tagged value format fields */
1519 /* ************************************************************************* */
1520 static int hf_ieee80211_tagged_parameters = -1; /* Fixed payload item */
1521 static int hf_ieee80211_tag = -1;
1522 static int hf_ieee80211_tag_number = -1;
1523 static int hf_ieee80211_tag_length = -1;
1524 static int hf_ieee80211_tag_interpretation = -1;
1525 static int hf_ieee80211_tag_oui = -1;
1526 static int hf_ieee80211_tag_ssid = -1;
1527 static int hf_ieee80211_tag_supp_rates = -1;
1528 static int hf_ieee80211_tag_fh_dwell_time = -1;
1529 static int hf_ieee80211_tag_fh_hop_set = -1;
1530 static int hf_ieee80211_tag_fh_hop_pattern = -1;
1531 static int hf_ieee80211_tag_fh_hop_index = -1;
1532 static int hf_ieee80211_tag_ds_param_channel = -1;
1533 static int hf_ieee80211_tag_cfp_count = -1;
1534 static int hf_ieee80211_tag_cfp_period = -1;
1535 static int hf_ieee80211_tag_cfp_max_duration = -1;
1536 static int hf_ieee80211_tag_cfp_dur_remaining = -1;
1537 static int hf_ieee80211_tim_dtim_count = -1;
1538 static int hf_ieee80211_tim_dtim_period = -1;
1539 static int hf_ieee80211_tim_bmapctl = -1;
1540 static int hf_ieee80211_tim_bmapctl_mcast = -1;
1541 static int hf_ieee80211_tim_bmapctl_offset = -1;
1542 static int hf_ieee80211_tim_partial_virtual_bitmap = -1;
1543 static int hf_ieee80211_tag_ibss_atim_window = -1;
1544 static int hf_ieee80211_tag_country_info_code = -1;
1545 static int hf_ieee80211_tag_country_info_env = -1;
1546 static int hf_ieee80211_tag_country_info_fnm = -1;
1547 static int hf_ieee80211_tag_country_info_fnm_fcn = -1;
1548 static int hf_ieee80211_tag_country_info_fnm_nc = -1;
1549 static int hf_ieee80211_tag_country_info_fnm_mtpl = -1;
1550 static int hf_ieee80211_tag_country_info_rrc = -1;
1551 static int hf_ieee80211_tag_country_info_rrc_rei = -1;
1552 static int hf_ieee80211_tag_country_info_rrc_rc = -1;
1553 static int hf_ieee80211_tag_country_info_rrc_cc = -1;
1554 static int hf_ieee80211_tag_fh_hopping_parameter_prime_radix = -1;
1555 static int hf_ieee80211_tag_fh_hopping_parameter_nb_channels = -1;
1556 static int hf_ieee80211_tag_fh_hopping_table_flag = -1;
1557 static int hf_ieee80211_tag_fh_hopping_table_number_of_sets = -1;
1558 static int hf_ieee80211_tag_fh_hopping_table_modulus = -1;
1559 static int hf_ieee80211_tag_fh_hopping_table_offset = -1;
1560 static int hf_ieee80211_tag_fh_hopping_random_table = -1;
1561 static int hf_ieee80211_tag_request = -1;
1562 static int hf_ieee80211_tag_challenge_text = -1;
1564 static int hf_ieee80211_wep_iv = -1;
1565 static int hf_ieee80211_wep_iv_weak = -1;
1566 static int hf_ieee80211_tkip_extiv = -1;
1567 static int hf_ieee80211_ccmp_extiv = -1;
1568 static int hf_ieee80211_wep_key = -1;
1569 static int hf_ieee80211_wep_icv = -1;
1571 static int hf_ieee80211_block_ack_request_control = -1;
1572 static int hf_ieee80211_block_ack_control = -1;
1573 static int hf_ieee80211_block_ack_control_ack_policy = -1;
1574 static int hf_ieee80211_block_ack_control_multi_tid = -1;
1575 static int hf_ieee80211_block_ack_control_compressed_bitmap = -1;
1576 static int hf_ieee80211_block_ack_control_reserved = -1;
1578 static int hf_ieee80211_block_ack_control_basic_tid_info = -1;
1579 static int hf_ieee80211_block_ack_control_compressed_tid_info = -1;
1580 static int hf_ieee80211_block_ack_control_multi_tid_info = -1;
1582 static int hf_ieee80211_block_ack_multi_tid_info = -1;
1583 static int hf_ieee80211_block_ack_request_type = -1;
1584 static int hf_ieee80211_block_ack_multi_tid_reserved = -1;
1585 static int hf_ieee80211_block_ack_multi_tid_value = -1;
1586 static int hf_ieee80211_block_ack_type = -1;
1587 static int hf_ieee80211_block_ack_bitmap = -1;
1589 static int hf_ieee80211_tag_measure_request_measurement_mode = -1;
1590 static int hf_ieee80211_tag_measure_request_bssid = -1;
1592 static int hf_ieee80211_tag_measure_request_subelement_length = -1;
1593 static int hf_ieee80211_tag_measure_request_beacon_sub_id = -1;
1594 static int hf_ieee80211_tag_measure_request_beacon_sub_ssid = -1;
1595 static int hf_ieee80211_tag_measure_request_beacon_sub_bri_reporting_condition = -1;
1596 static int hf_ieee80211_tag_measure_request_beacon_sub_bri_threshold_offset = -1;
1597 static int hf_ieee80211_tag_measure_request_beacon_sub_reporting_detail = -1;
1598 static int hf_ieee80211_tag_measure_request_beacon_sub_request = -1;
1599 static int hf_ieee80211_tag_measure_request_beacon_unknown = -1;
1601 static int hf_ieee80211_tag_measure_request_frame_request_type = -1;
1602 static int hf_ieee80211_tag_measure_request_mac_address = -1;
1603 static int hf_ieee80211_tag_measure_request_peer_mac_address = -1;
1604 static int hf_ieee80211_tag_measure_request_group_id = -1;
1606 static int hf_ieee80211_ht_cap = -1;
1607 static int hf_ieee80211_ht_vs_cap = -1;
1608 static int hf_ieee80211_ht_ldpc_coding = -1;
1609 static int hf_ieee80211_ht_chan_width = -1;
1610 static int hf_ieee80211_ht_sm_pwsave = -1;
1611 static int hf_ieee80211_ht_green = -1;
1612 static int hf_ieee80211_ht_short20 = -1;
1613 static int hf_ieee80211_ht_short40 = -1;
1614 static int hf_ieee80211_ht_tx_stbc = -1;
1615 static int hf_ieee80211_ht_rx_stbc = -1;
1616 static int hf_ieee80211_ht_delayed_block_ack = -1;
1617 static int hf_ieee80211_ht_max_amsdu = -1;
1618 static int hf_ieee80211_ht_dss_cck_40 = -1;
1619 static int hf_ieee80211_ht_psmp = -1;
1620 static int hf_ieee80211_ht_40_mhz_intolerant = -1;
1621 static int hf_ieee80211_ht_l_sig = -1;
1623 static int hf_ieee80211_ampduparam = -1;
1624 static int hf_ieee80211_ampduparam_vs = -1;
1625 static int hf_ieee80211_ampduparam_mpdu = -1;
1626 static int hf_ieee80211_ampduparam_mpdu_start_spacing = -1;
1627 static int hf_ieee80211_ampduparam_reserved = -1;
1629 static int hf_ieee80211_mcsset = -1;
1630 static int hf_ieee80211_mcsset_vs = -1;
1631 static int hf_ieee80211_mcsset_rx_bitmask_0to7 = -1;
1632 static int hf_ieee80211_mcsset_rx_bitmask_8to15 = -1;
1633 static int hf_ieee80211_mcsset_rx_bitmask_16to23 = -1;
1634 static int hf_ieee80211_mcsset_rx_bitmask_24to31 = -1;
1635 static int hf_ieee80211_mcsset_rx_bitmask_32 = -1;
1636 static int hf_ieee80211_mcsset_rx_bitmask_33to38 = -1;
1637 static int hf_ieee80211_mcsset_rx_bitmask_39to52 = -1;
1638 static int hf_ieee80211_mcsset_rx_bitmask_53to76 = -1;
1639 static int hf_ieee80211_mcsset_highest_data_rate = -1;
1640 static int hf_ieee80211_mcsset_tx_mcs_set_defined = -1;
1641 static int hf_ieee80211_mcsset_tx_rx_mcs_set_not_equal = -1;
1642 static int hf_ieee80211_mcsset_tx_max_spatial_streams = -1;
1643 static int hf_ieee80211_mcsset_tx_unequal_modulation = -1;
1645 static int hf_ieee80211_htex_cap = -1;
1646 static int hf_ieee80211_htex_vs_cap = -1;
1647 static int hf_ieee80211_htex_pco = -1;
1648 static int hf_ieee80211_htex_transtime = -1;
1649 static int hf_ieee80211_htex_mcs = -1;
1650 static int hf_ieee80211_htex_htc_support = -1;
1651 static int hf_ieee80211_htex_rd_responder = -1;
1653 static int hf_ieee80211_txbf = -1;
1654 static int hf_ieee80211_txbf_vs = -1;
1655 static int hf_ieee80211_txbf_cap = -1;
1656 static int hf_ieee80211_txbf_rcv_ssc = -1;
1657 static int hf_ieee80211_txbf_tx_ssc = -1;
1658 static int hf_ieee80211_txbf_rcv_ndp = -1;
1659 static int hf_ieee80211_txbf_tx_ndp = -1;
1660 static int hf_ieee80211_txbf_impl_txbf = -1;
1661 static int hf_ieee80211_txbf_calib = -1;
1662 static int hf_ieee80211_txbf_expl_csi = -1;
1663 static int hf_ieee80211_txbf_expl_uncomp_fm = -1;
1664 static int hf_ieee80211_txbf_expl_comp_fm = -1;
1665 static int hf_ieee80211_txbf_expl_bf_csi = -1;
1666 static int hf_ieee80211_txbf_expl_uncomp_fm_feed = -1;
1667 static int hf_ieee80211_txbf_expl_comp_fm_feed = -1;
1668 static int hf_ieee80211_txbf_csi_num_bf_ant = -1;
1669 static int hf_ieee80211_txbf_min_group = -1;
1670 static int hf_ieee80211_txbf_uncomp_sm_bf_ant = -1;
1671 static int hf_ieee80211_txbf_comp_sm_bf_ant = -1;
1672 static int hf_ieee80211_txbf_csi_max_rows_bf = -1;
1673 static int hf_ieee80211_txbf_chan_est = -1;
1674 static int hf_ieee80211_txbf_resrv = -1;
1676 /*** Begin: 802.11n D1.10 - HT Information IE ***/
1677 static int hf_ieee80211_ht_info_primary_channel = -1;
1679 static int hf_ieee80211_ht_info_delimiter1 = -1;
1680 static int hf_ieee80211_ht_info_secondary_channel_offset = -1;
1681 static int hf_ieee80211_ht_info_channel_width = -1;
1682 static int hf_ieee80211_ht_info_rifs_mode = -1;
1683 static int hf_ieee80211_ht_info_psmp_stas_only = -1;
1684 static int hf_ieee80211_ht_info_service_interval_granularity = -1;
1686 static int hf_ieee80211_ht_info_delimiter2 = -1;
1687 static int hf_ieee80211_ht_info_operating_mode = -1;
1688 static int hf_ieee80211_ht_info_non_greenfield_sta_present = -1;
1689 static int hf_ieee80211_ht_info_transmit_burst_limit = -1;
1690 static int hf_ieee80211_ht_info_obss_non_ht_stas_present = -1;
1691 static int hf_ieee80211_ht_info_reserved_1 = -1;
1693 static int hf_ieee80211_ht_info_delimiter3 = -1;
1694 static int hf_ieee80211_ht_info_reserved_2 = -1;
1695 static int hf_ieee80211_ht_info_dual_beacon = -1;
1696 static int hf_ieee80211_ht_info_dual_cts_protection = -1;
1697 static int hf_ieee80211_ht_info_secondary_beacon = -1;
1698 static int hf_ieee80211_ht_info_lsig_txop_protection_full_support = -1;
1699 static int hf_ieee80211_ht_info_pco_active = -1;
1700 static int hf_ieee80211_ht_info_pco_phase = -1;
1701 static int hf_ieee80211_ht_info_reserved_3 = -1;
1702 /*** End: 802.11n D1.10 - HT Information IE ***/
1704 static int hf_ieee80211_tag_secondary_channel_offset = -1;
1706 static int hf_ieee80211_tag_power_constraint_local = -1;
1708 static int hf_ieee80211_tag_power_capability_min = -1;
1709 static int hf_ieee80211_tag_power_capability_max = -1;
1711 static int hf_ieee80211_tag_tpc_report_trsmt_pow = -1;
1712 static int hf_ieee80211_tag_tpc_report_link_mrg = -1;
1714 static int hf_ieee80211_tag_supported_channels = -1;
1715 static int hf_ieee80211_tag_supported_channels_first = -1;
1716 static int hf_ieee80211_tag_supported_channels_range = -1;
1718 static int hf_ieee80211_csa_channel_switch_mode = -1;
1719 static int hf_ieee80211_csa_new_channel_number = -1;
1720 static int hf_ieee80211_csa_channel_switch_count = -1;
1722 static int hf_ieee80211_tag_measure_request_token = -1;
1723 static int hf_ieee80211_tag_measure_request_mode = -1;
1724 static int hf_ieee80211_tag_measure_request_mode_parallel = -1;
1725 static int hf_ieee80211_tag_measure_request_mode_enable = -1;
1726 static int hf_ieee80211_tag_measure_request_mode_request = -1;
1727 static int hf_ieee80211_tag_measure_request_mode_report = -1;
1728 static int hf_ieee80211_tag_measure_request_mode_duration_mandatory = -1;
1729 static int hf_ieee80211_tag_measure_request_mode_reserved = -1;
1730 static int hf_ieee80211_tag_measure_request_type = -1;
1732 static int hf_ieee80211_tag_measure_request_channel_number = -1;
1733 static int hf_ieee80211_tag_measure_request_start_time = -1;
1734 static int hf_ieee80211_tag_measure_request_duration = -1;
1736 static int hf_ieee80211_tag_measure_request_regulatory_class = -1;
1737 static int hf_ieee80211_tag_measure_request_randomization_interval = -1;
1739 static int hf_ieee80211_tag_measure_report_measurement_token = -1;
1740 static int hf_ieee80211_tag_measure_report_mode = -1;
1741 static int hf_ieee80211_tag_measure_report_mode_late = -1;
1742 static int hf_ieee80211_tag_measure_report_mode_incapable = -1;
1743 static int hf_ieee80211_tag_measure_report_mode_refused = -1;
1744 static int hf_ieee80211_tag_measure_report_mode_reserved = -1;
1745 static int hf_ieee80211_tag_measure_report_type = -1;
1746 static int hf_ieee80211_tag_measure_report_channel_number = -1;
1747 static int hf_ieee80211_tag_measure_report_start_time = -1;
1748 static int hf_ieee80211_tag_measure_report_duration = -1;
1750 static int hf_ieee80211_tag_measure_basic_map_field = -1;
1751 static int hf_ieee80211_tag_measure_map_field_bss = -1;
1752 static int hf_ieee80211_tag_measure_map_field_odfm = -1;
1753 static int hf_ieee80211_tag_measure_map_field_unident_signal = -1;
1754 static int hf_ieee80211_tag_measure_map_field_radar = -1;
1755 static int hf_ieee80211_tag_measure_map_field_unmeasured = -1;
1756 static int hf_ieee80211_tag_measure_map_field_reserved = -1;
1758 static int hf_ieee80211_tag_measure_cca_busy_fraction = -1;
1760 static int hf_ieee80211_tag_measure_rpi_histogram_report = -1;
1761 static int hf_ieee80211_tag_measure_rpi_histogram_report_0 = -1;
1762 static int hf_ieee80211_tag_measure_rpi_histogram_report_1 = -1;
1763 static int hf_ieee80211_tag_measure_rpi_histogram_report_2 = -1;
1764 static int hf_ieee80211_tag_measure_rpi_histogram_report_3 = -1;
1765 static int hf_ieee80211_tag_measure_rpi_histogram_report_4 = -1;
1766 static int hf_ieee80211_tag_measure_rpi_histogram_report_5 = -1;
1767 static int hf_ieee80211_tag_measure_rpi_histogram_report_6 = -1;
1768 static int hf_ieee80211_tag_measure_rpi_histogram_report_7 = -1;
1770 static int hf_ieee80211_tag_measure_report_regulatory_class = -1;
1771 static int hf_ieee80211_tag_measure_report_channel_load = -1;
1772 static int hf_ieee80211_tag_measure_report_frame_info = -1;
1773 static int hf_ieee80211_tag_measure_report_frame_info_phy_type = -1;
1774 static int hf_ieee80211_tag_measure_report_frame_info_frame_type = -1;
1775 static int hf_ieee80211_tag_measure_report_rcpi = -1;
1776 static int hf_ieee80211_tag_measure_report_rsni = -1;
1777 static int hf_ieee80211_tag_measure_report_bssid = -1;
1778 static int hf_ieee80211_tag_measure_report_ant_id = -1;
1779 static int hf_ieee80211_tag_measure_report_anpi = -1;
1780 static int hf_ieee80211_tag_measure_report_ipi_density_0 = -1;
1781 static int hf_ieee80211_tag_measure_report_ipi_density_1 = -1;
1782 static int hf_ieee80211_tag_measure_report_ipi_density_2 = -1;
1783 static int hf_ieee80211_tag_measure_report_ipi_density_3 = -1;
1784 static int hf_ieee80211_tag_measure_report_ipi_density_4 = -1;
1785 static int hf_ieee80211_tag_measure_report_ipi_density_5 = -1;
1786 static int hf_ieee80211_tag_measure_report_ipi_density_6 = -1;
1787 static int hf_ieee80211_tag_measure_report_ipi_density_7 = -1;
1788 static int hf_ieee80211_tag_measure_report_ipi_density_8 = -1;
1789 static int hf_ieee80211_tag_measure_report_ipi_density_9 = -1;
1790 static int hf_ieee80211_tag_measure_report_ipi_density_10 = -1;
1791 static int hf_ieee80211_tag_measure_report_parent_tsf = -1;
1793 static int hf_ieee80211_tag_extended_capabilities = -1;
1794 static int hf_ieee80211_tag_extended_capabilities_b0 = -1;
1795 static int hf_ieee80211_tag_extended_capabilities_b1 = -1;
1796 static int hf_ieee80211_tag_extended_capabilities_b2 = -1;
1797 static int hf_ieee80211_tag_extended_capabilities_b3 = -1;
1798 static int hf_ieee80211_tag_extended_capabilities_b4 = -1;
1799 static int hf_ieee80211_tag_extended_capabilities_b6 = -1;
1800 static int hf_ieee80211_tag_extended_capabilities_b28 = -1;
1801 static int hf_ieee80211_tag_extended_capabilities_b29 = -1;
1802 static int hf_ieee80211_tag_extended_capabilities_b30 = -1;
1803 static int hf_ieee80211_tag_extended_capabilities_b37 = -1;
1804 static int hf_ieee80211_tag_extended_capabilities_b38 = -1;
1805 static int hf_ieee80211_tag_extended_capabilities_b39 = -1;
1806 static int hf_ieee80211_tag_extended_capabilities_b40 = -1;
1807 static int hf_ieee80211_tag_extended_capabilities_serv_int_granularity = -1;
1809 static int hf_ieee80211_tag_neighbor_report_bssid = -1;
1810 static int hf_ieee80211_tag_neighbor_report_bssid_info = -1;
1811 static int hf_ieee80211_tag_neighbor_report_bssid_info_reachability = -1;
1812 static int hf_ieee80211_tag_neighbor_report_bssid_info_security = -1;
1813 static int hf_ieee80211_tag_neighbor_report_bssid_info_key_scope = -1;
1814 /*static int hf_ieee80211_tag_neighbor_report_bssid_info_capability = -1; */ /* TODO Make this the parent tree item */
1815 static int hf_ieee80211_tag_neighbor_report_bssid_info_capability_spec_mng = -1;
1816 static int hf_ieee80211_tag_neighbor_report_bssid_info_capability_qos = -1;
1817 static int hf_ieee80211_tag_neighbor_report_bssid_info_capability_apsd = -1;
1818 static int hf_ieee80211_tag_neighbor_report_bssid_info_capability_radio_msnt = -1;
1819 static int hf_ieee80211_tag_neighbor_report_bssid_info_capability_dback = -1;
1820 static int hf_ieee80211_tag_neighbor_report_bssid_info_capability_iback = -1;
1821 static int hf_ieee80211_tag_neighbor_report_bssid_info_mobility_domain = -1;
1822 static int hf_ieee80211_tag_neighbor_report_bssid_info_high_throughput = -1;
1823 static int hf_ieee80211_tag_neighbor_report_bssid_info_reserved = -1;
1824 static int hf_ieee80211_tag_neighbor_report_reg_class = -1;
1825 static int hf_ieee80211_tag_neighbor_report_channel_number = -1;
1826 static int hf_ieee80211_tag_neighbor_report_phy_type = -1;
1828 static int hf_ieee80211_tag_supported_reg_classes_current = -1;
1829 static int hf_ieee80211_tag_supported_reg_classes_alternate = -1;
1831 /* IEEE Std 802.11r-2008 7.3.2.47 */
1832 static int hf_ieee80211_tag_mobility_domain_mdid = -1;
1833 static int hf_ieee80211_tag_mobility_domain_ft_capab = -1;
1834 static int hf_ieee80211_tag_mobility_domain_ft_capab_ft_over_ds = -1;
1835 static int hf_ieee80211_tag_mobility_domain_ft_capab_resource_req = -1;
1837 /* IEEE Std 802.11r-2008 7.3.2.48 */
1838 static int hf_ieee80211_tag_ft_mic_control = -1;
1839 static int hf_ieee80211_tag_ft_element_count = -1;
1840 static int hf_ieee80211_tag_ft_mic = -1;
1841 static int hf_ieee80211_tag_ft_anonce = -1;
1842 static int hf_ieee80211_tag_ft_snonce = -1;
1843 static int hf_ieee80211_tag_ft_subelem_id = -1;
1844 static int hf_ieee80211_tag_ft_subelem_len = -1;
1845 static int hf_ieee80211_tag_ft_subelem_data = -1;
1846 static int hf_ieee80211_tag_ft_subelem_r1kh_id = -1;
1847 static int hf_ieee80211_tag_ft_subelem_gtk_key_info = -1;
1848 static int hf_ieee80211_tag_ft_subelem_gtk_key_id = -1;
1849 static int hf_ieee80211_tag_ft_subelem_gtk_key_length = -1;
1850 static int hf_ieee80211_tag_ft_subelem_gtk_rsc = -1;
1851 static int hf_ieee80211_tag_ft_subelem_gtk_key = -1;
1852 static int hf_ieee80211_tag_ft_subelem_r0kh_id = -1;
1853 static int hf_ieee80211_tag_ft_subelem_igtk_key_id = -1;
1854 static int hf_ieee80211_tag_ft_subelem_igtk_ipn = -1;
1855 static int hf_ieee80211_tag_ft_subelem_igtk_key_length = -1;
1856 static int hf_ieee80211_tag_ft_subelem_igtk_key = -1;
1858 /* IEEE Std 802.11w-2009 7.3.2.55 */
1859 static int hf_ieee80211_tag_mmie_keyid = -1;
1860 static int hf_ieee80211_tag_mmie_ipn = -1;
1861 static int hf_ieee80211_tag_mmie_mic = -1;
1863 /* IEEE P802.11u/D10.0, 7.3.2.91 */
1864 static int hf_ieee80211_tag_adv_proto_resp_len_limit = -1;
1865 static int hf_ieee80211_tag_adv_proto_pame_bi = -1;
1866 static int hf_ieee80211_tag_adv_proto_id = -1;
1868 /* 802.11n 7.3.2.48 */
1869 static int hf_ieee80211_hta_cap = -1;
1870 static int hf_ieee80211_hta_ext_chan_offset = -1;
1871 static int hf_ieee80211_hta_rec_tx_width = -1;
1872 static int hf_ieee80211_hta_rifs_mode = -1;
1873 static int hf_ieee80211_hta_controlled_access = -1;
1874 static int hf_ieee80211_hta_service_interval = -1;
1875 static int hf_ieee80211_hta_operating_mode = -1;
1876 static int hf_ieee80211_hta_non_gf_devices = -1;
1877 static int hf_ieee80211_hta_basic_stbc_mcs = -1;
1878 static int hf_ieee80211_hta_dual_stbc_protection = -1;
1879 static int hf_ieee80211_hta_secondary_beacon = -1;
1880 static int hf_ieee80211_hta_lsig_txop_protection = -1;
1881 static int hf_ieee80211_hta_pco_active = -1;
1882 static int hf_ieee80211_hta_pco_phase = -1;
1884 static int hf_ieee80211_antsel = -1;
1885 static int hf_ieee80211_antsel_vs = -1;
1886 static int hf_ieee80211_antsel_b0 = -1;
1887 static int hf_ieee80211_antsel_b1 = -1;
1888 static int hf_ieee80211_antsel_b2 = -1;
1889 static int hf_ieee80211_antsel_b3 = -1;
1890 static int hf_ieee80211_antsel_b4 = -1;
1891 static int hf_ieee80211_antsel_b5 = -1;
1892 static int hf_ieee80211_antsel_b6 = -1;
1893 static int hf_ieee80211_antsel_b7 = -1;
1895 static int hf_ieee80211_rsn_version = -1;
1896 static int hf_ieee80211_rsn_gcs = -1;
1897 static int hf_ieee80211_rsn_gcs_oui = -1;
1898 static int hf_ieee80211_rsn_gcs_type = -1;
1899 static int hf_ieee80211_rsn_gcs_80211_type = -1;
1900 static int hf_ieee80211_rsn_pcs_count = -1;
1901 static int hf_ieee80211_rsn_pcs_list = -1;
1902 static int hf_ieee80211_rsn_pcs = -1;
1903 static int hf_ieee80211_rsn_pcs_oui = -1;
1904 static int hf_ieee80211_rsn_pcs_80211_type = -1;
1905 static int hf_ieee80211_rsn_pcs_type = -1;
1906 static int hf_ieee80211_rsn_akms_count = -1;
1907 static int hf_ieee80211_rsn_akms_list = -1;
1908 static int hf_ieee80211_rsn_akms = -1;
1909 static int hf_ieee80211_rsn_akms_oui = -1;
1910 static int hf_ieee80211_rsn_akms_80211_type = -1;
1911 static int hf_ieee80211_rsn_akms_type = -1;
1912 static int hf_ieee80211_rsn_cap = -1;
1913 static int hf_ieee80211_rsn_cap_preauth = -1;
1914 static int hf_ieee80211_rsn_cap_no_pairwise = -1;
1915 static int hf_ieee80211_rsn_cap_ptksa_replay_counter = -1;
1916 static int hf_ieee80211_rsn_cap_gtksa_replay_counter = -1;
1917 static int hf_ieee80211_rsn_cap_mfpr = -1;
1918 static int hf_ieee80211_rsn_cap_mfpc = -1;
1919 static int hf_ieee80211_rsn_cap_peerkey = -1;
1920 static int hf_ieee80211_rsn_pmkid_count = -1;
1921 static int hf_ieee80211_rsn_pmkid_list = -1;
1922 static int hf_ieee80211_rsn_pmkid = -1;
1923 static int hf_ieee80211_rsn_gmcs = -1;
1924 static int hf_ieee80211_rsn_gmcs_oui = -1;
1925 static int hf_ieee80211_rsn_gmcs_type = -1;
1926 static int hf_ieee80211_rsn_gmcs_80211_type = -1;
1928 static int hf_ieee80211_aironet_ie_type = -1;
1929 static int hf_ieee80211_aironet_ie_version = -1;
1930 static int hf_ieee80211_aironet_ie_data = -1;
1931 static int hf_ieee80211_aironet_ie_qos_unk1 = -1;
1932 static int hf_ieee80211_aironet_ie_qos_paramset = -1;
1933 static int hf_ieee80211_aironet_ie_qos_val = -1;
1935 static int hf_ieee80211_marvell_ie_type = -1;
1936 static int hf_ieee80211_marvell_ie_mesh_subtype = -1;
1937 static int hf_ieee80211_marvell_ie_mesh_version = -1;
1938 static int hf_ieee80211_marvell_ie_mesh_active_proto_id = -1;
1939 static int hf_ieee80211_marvell_ie_mesh_active_metric_id = -1;
1940 static int hf_ieee80211_marvell_ie_mesh_cap = -1;
1941 static int hf_ieee80211_marvell_ie_data = -1;
1943 static int hf_ieee80211_atheros_ie_type = -1;
1944 static int hf_ieee80211_atheros_ie_subtype = -1;
1945 static int hf_ieee80211_atheros_ie_version = -1;
1946 static int hf_ieee80211_atheros_ie_cap_f_turbop = -1;
1947 static int hf_ieee80211_atheros_ie_cap_f_comp = -1;
1948 static int hf_ieee80211_atheros_ie_cap_f_ff = -1;
1949 static int hf_ieee80211_atheros_ie_cap_f_xr = -1;
1950 static int hf_ieee80211_atheros_ie_cap_f_ar = -1;
1951 static int hf_ieee80211_atheros_ie_cap_f_burst = -1;
1952 static int hf_ieee80211_atheros_ie_cap_f_wme = -1;
1953 static int hf_ieee80211_atheros_ie_cap_f_boost = -1;
1954 static int hf_ieee80211_atheros_ie_advcap_cap = -1;
1955 static int hf_ieee80211_atheros_ie_advcap_defkey = -1;
1956 static int hf_ieee80211_atheros_ie_xr_info = -1;
1957 static int hf_ieee80211_atheros_ie_xr_base_bssid = -1;
1958 static int hf_ieee80211_atheros_ie_xr_xr_bssid = -1;
1959 static int hf_ieee80211_atheros_ie_xr_xr_beacon = -1;
1960 static int hf_ieee80211_atheros_ie_xr_base_cap = -1;
1961 static int hf_ieee80211_atheros_ie_xr_xr_cap = -1;
1962 static int hf_ieee80211_atheros_ie_data = -1;
1964 /*QBSS - Version 1,2,802.11e*/
1966 static int hf_ieee80211_qbss2_cal = -1;
1967 static int hf_ieee80211_qbss2_gl = -1;
1968 static int hf_ieee80211_qbss_cu = -1;
1969 static int hf_ieee80211_qbss2_cu = -1;
1970 static int hf_ieee80211_qbss_scount = -1;
1971 static int hf_ieee80211_qbss2_scount = -1;
1972 static int hf_ieee80211_qbss_version = -1;
1973 static int hf_ieee80211_qbss_adc = -1;
1975 static int hf_ieee80211_tsinfo = -1;
1976 static int hf_ieee80211_tsinfo_type = -1;
1977 static int hf_ieee80211_tsinfo_tsid = -1;
1978 static int hf_ieee80211_tsinfo_dir = -1;
1979 static int hf_ieee80211_tsinfo_access = -1;
1980 static int hf_ieee80211_tsinfo_agg = -1;
1981 static int hf_ieee80211_tsinfo_apsd = -1;
1982 static int hf_ieee80211_tsinfo_up = -1;
1983 static int hf_ieee80211_tsinfo_ack = -1;
1984 static int hf_ieee80211_tsinfo_sched = -1;
1985 static int hf_ieee80211_tsinfo_rsv = -1;
1986 static int hf_ieee80211_tspec_nor_msdu = -1;
1987 static int hf_ieee80211_tspec_max_msdu = -1;
1988 static int hf_ieee80211_tspec_min_srv = -1;
1989 static int hf_ieee80211_tspec_max_srv = -1;
1990 static int hf_ieee80211_tspec_inact_int = -1;
1991 static int hf_ieee80211_tspec_susp_int = -1;
1992 static int hf_ieee80211_tspec_srv_start = -1;
1993 static int hf_ieee80211_tspec_min_data = -1;
1994 static int hf_ieee80211_tspec_mean_data = -1;
1995 static int hf_ieee80211_tspec_peak_data = -1;
1996 static int hf_ieee80211_tspec_burst_size = -1;
1997 static int hf_ieee80211_tspec_delay_bound = -1;
1998 static int hf_ieee80211_tspec_min_phy = -1;
1999 static int hf_ieee80211_tspec_surplus = -1;
2000 static int hf_ieee80211_tspec_medium = -1;
2001 static int hf_ieee80211_ts_delay = -1;
2002 static int hf_ieee80211_tclass_process = -1;
2003 static int hf_ieee80211_sched_info = -1;
2004 static int hf_ieee80211_sched_info_agg = -1;
2005 static int hf_ieee80211_sched_info_tsid = -1;
2006 static int hf_ieee80211_sched_info_dir = -1;
2007 static int hf_ieee80211_sched_srv_start = -1;
2008 static int hf_ieee80211_sched_srv_int = -1;
2009 static int hf_ieee80211_sched_spec_int = -1;
2010 static int hf_ieee80211_action = -1;
2011 static int hf_ieee80211_tclas_up = -1;
2012 static int hf_ieee80211_tclas_class_type = -1;
2013 static int hf_ieee80211_tclas_class_mask = -1;
2014 static int hf_ieee80211_tclas_src_mac_addr = -1;
2015 static int hf_ieee80211_tclas_dst_mac_addr = -1;
2016 static int hf_ieee80211_tclas_ether_type = -1;
2017 static int hf_ieee80211_tclas_version = -1;
2018 static int hf_ieee80211_tclas_ipv4_src = -1;
2019 static int hf_ieee80211_tclas_ipv4_dst = -1;
2020 static int hf_ieee80211_tclas_src_port = -1;
2021 static int hf_ieee80211_tclas_dst_port = -1;
2022 static int hf_ieee80211_tclas_dscp = -1;
2023 static int hf_ieee80211_tclas_protocol = -1;
2024 static int hf_ieee80211_tclas_ipv6_src = -1;
2025 static int hf_ieee80211_tclas_ipv6_dst = -1;
2026 static int hf_ieee80211_tclas_flow = -1;
2027 static int hf_ieee80211_tclas_tag_type = -1;
2029 static int hf_ieee80211_aruba = -1;
2030 static int hf_ieee80211_aruba_hb_seq = -1;
2031 static int hf_ieee80211_aruba_mtu = -1;
2033 static int hf_ieee80211_tag_vendor_oui_type = -1;
2035 /* IEEE Std 802.11z-2010 7.3.2.62 */
2036 static int hf_ieee80211_tag_link_id_bssid = -1;
2037 static int hf_ieee80211_tag_link_id_init_sta = -1;
2038 static int hf_ieee80211_tag_link_id_resp_sta = -1;
2040 /* IEEE Std 802.11z-2010 7.3.2.63 */
2041 static int hf_ieee80211_tag_wakeup_schedule_offset = -1;
2042 static int hf_ieee80211_tag_wakeup_schedule_interval = -1;
2043 static int hf_ieee80211_tag_wakeup_schedule_awake_window_slots = -1;
2044 static int hf_ieee80211_tag_wakeup_schedule_max_awake_dur = -1;
2045 static int hf_ieee80211_tag_wakeup_schedule_idle_count = -1;
2047 /* IEEE Std 802.11z-2010 7.3.2.64 */
2048 static int hf_ieee80211_tag_channel_switch_timing_switch_time = -1;
2049 static int hf_ieee80211_tag_channel_switch_timing_switch_timeout = -1;
2051 /* IEEE Std 802.11z-2010 7.3.2.65 */
2052 static int hf_ieee80211_tag_pti_control_tid = -1;
2053 static int hf_ieee80211_tag_pti_control_sequence_control = -1;
2055 /* IEEE Std 802.11z-2010 7.3.2.66 */
2056 static int hf_ieee80211_tag_pu_buffer_status_ac_bk = -1;
2057 static int hf_ieee80211_tag_pu_buffer_status_ac_be = -1;
2058 static int hf_ieee80211_tag_pu_buffer_status_ac_vi = -1;
2059 static int hf_ieee80211_tag_pu_buffer_status_ac_vo = -1;
2061 /* IEEE Std 802.11r-2008 7.3.2.49 */
2062 static int hf_ieee80211_tag_timeout_int_type = -1;
2063 static int hf_ieee80211_tag_timeout_int_value = -1;
2065 /* Ethertype 89-0d */
2066 static int hf_ieee80211_data_encap_payload_type = -1;
2068 /* ************************************************************************* */
2069 /* Protocol trees */
2070 /* ************************************************************************* */
2071 static gint ett_80211 = -1;
2072 static gint ett_proto_flags = -1;
2073 static gint ett_cap_tree = -1;
2074 static gint ett_fc_tree = -1;
2075 static gint ett_cntrl_wrapper_fc = -1;
2076 static gint ett_cntrl_wrapper_payload = -1;
2077 static gint ett_fragments = -1;
2078 static gint ett_fragment = -1;
2079 static gint ett_block_ack = -1;
2080 static gint ett_ath_cap_tree = -1;
2083 static gint ett_80211_mgt = -1;
2084 static gint ett_fixed_parameters = -1;
2085 static gint ett_tagged_parameters = -1;
2086 static gint ett_tag_bmapctl_tree = -1;
2087 static gint ett_tag_country_fnm_tree = -1;
2088 static gint ett_tag_country_rcc_tree = -1;
2089 static gint ett_qos_parameters = -1;
2090 static gint ett_qos_ps_buf_state = -1;
2091 static gint ett_wep_parameters = -1;
2092 #ifdef MESH_OVERRIDES
2093 static gint ett_msh_parameters = -1;
2094 static gint ett_msh_dest_flags_tree = -1;
2095 #endif /* MESH_OVERRIDES */
2097 static gint ett_rsn_gcs_tree = -1;
2098 static gint ett_rsn_pcs_tree = -1;
2099 static gint ett_rsn_sub_pcs_tree = -1;
2100 static gint ett_rsn_akms_tree = -1;
2101 static gint ett_rsn_sub_akms_tree = -1;
2102 static gint ett_rsn_cap_tree = -1;
2103 static gint ett_rsn_pmkid_tree = -1;
2104 static gint ett_rsn_gmcs_tree = -1;
2106 static gint ett_ht_cap_tree = -1;
2107 static gint ett_ampduparam_tree = -1;
2108 static gint ett_mcsset_tree = -1;
2109 static gint ett_mcsbit_tree = -1;
2110 static gint ett_htex_cap_tree = -1;
2111 static gint ett_txbf_tree = -1;
2112 static gint ett_antsel_tree = -1;
2113 static gint ett_hta_cap_tree = -1;
2114 static gint ett_hta_cap1_tree = -1;
2115 static gint ett_hta_cap2_tree = -1;
2116 static gint ett_htc_tree = -1;
2118 static gint ett_ht_info_delimiter1_tree = -1;
2119 static gint ett_ht_info_delimiter2_tree = -1;
2120 static gint ett_ht_info_delimiter3_tree = -1;
2122 static gint ett_tag_measure_request_mode_tree = -1;
2123 static gint ett_tag_measure_request_type_tree = -1;
2124 static gint ett_tag_measure_report_mode_tree = -1;
2125 static gint ett_tag_measure_report_type_tree = -1;
2126 static gint ett_tag_measure_report_basic_map_tree = -1;
2127 static gint ett_tag_measure_report_rpi_tree = -1;
2128 static gint ett_tag_measure_report_frame_tree = -1;
2130 static gint ett_tag_ex_cap = -1;
2132 static gint ett_tag_supported_channels = -1;
2134 static gint ett_tag_neighbor_report_bssid_info_tree = -1;
2135 static gint ett_tag_neighbor_report_bssid_info_capability_tree = -1;
2136 static gint ett_tag_neighbor_report_sub_tag_tree = -1;
2138 static gint ett_ff_ba_param_tree = -1;
2139 static gint ett_ff_ba_ssc_tree = -1;
2140 static gint ett_ff_delba_param_tree = -1;
2141 static gint ett_ff_qos_info = -1;
2142 static gint ett_ff_sm_pwr_save = -1;
2143 static gint ett_ff_psmp_param_set = -1;
2144 static gint ett_ff_mimo_cntrl = -1;
2145 static gint ett_ff_ant_sel = -1;
2146 static gint ett_mimo_report = -1;
2147 static gint ett_ff_chan_switch_announce = -1;
2148 static gint ett_ff_ht_info = -1;
2149 static gint ett_ff_psmp_sta_info = -1;
2151 static gint ett_msdu_aggregation_parent_tree = -1;
2152 static gint ett_msdu_aggregation_subframe_tree = -1;
2154 /*** Begin: WAVE Service information element Dissection - IEEE 802.11p Draft 4.0 ***/
2155 static gint ett_pst_tree = -1;
2156 static gint ett_pst_cap_tree = -1;
2157 static gint ett_chan_noc_tree = -1;
2158 static gint ett_wave_chnl_tree = -1;
2160 /*** End: WAVE Service information element Dissection - IEEE 802.11p Draft 4.0 ***/
2162 static gint ett_80211_mgt_ie = -1;
2163 static gint ett_tsinfo_tree = -1;
2164 static gint ett_sched_tree = -1;
2166 static gint ett_fcs = -1;
2168 static gint ett_radio = -1;
2169 static gint ett_prism = -1;
2170 static gint ett_prism_did = -1;
2172 static gint ett_adv_proto = -1;
2173 static gint ett_adv_proto_tuple = -1;
2174 static gint ett_gas_query = -1;
2175 static gint ett_gas_anqp = -1;
2177 static const fragment_items frag_items = {
2180 &hf_ieee80211_fragments,
2181 &hf_ieee80211_fragment,
2182 &hf_ieee80211_fragment_overlap,
2183 &hf_ieee80211_fragment_overlap_conflict,
2184 &hf_ieee80211_fragment_multiple_tails,
2185 &hf_ieee80211_fragment_too_long_fragment,
2186 &hf_ieee80211_fragment_error,
2187 &hf_ieee80211_fragment_count,
2188 &hf_ieee80211_reassembled_in,
2189 &hf_ieee80211_reassembled_length,
2193 static enum_val_t wlan_ignore_wep_options[] = {
2194 { "no", "No", WLAN_IGNORE_WEP_NO },
2195 { "without_iv", "Yes - without IV", WLAN_IGNORE_WEP_WO_IV },
2196 { "with_iv", "Yes - with IV", WLAN_IGNORE_WEP_W_IV },
2200 static dissector_handle_t ieee80211_handle;
2201 static dissector_handle_t llc_handle;
2202 static dissector_handle_t ipx_handle;
2203 static dissector_handle_t eth_withoutfcs_handle;
2204 static dissector_handle_t data_handle;
2205 static dissector_handle_t wlancap_handle;
2207 static int wlan_tap = -1;
2209 static const value_string adv_proto_id_vals[] =
2211 {0, "Access Network Query Protocol"},
2212 {1, "MIH Information Service"},
2213 {2, "MIH Command and Event Services Capability Discovery"},
2214 {3, "Emergency Alert System (EAS)"},
2215 {4, "Location-to-Service Translation Protocol"},
2216 {221, "Vendor Specific"},
2220 static const value_string timeout_int_types[] =
2222 {1, "Reassociation deadline interval (TUs)"},
2223 {2, "Key lifetime interval (seconds)"},
2224 {3, "Association Comeback time (TUs)"},
2228 static const value_string tdls_action_codes[] ={
2229 {TDLS_SETUP_REQUEST, "TDLS Setup Request"},
2230 {TDLS_SETUP_RESPONSE, "TDLS Setup Response"},
2231 {TDLS_SETUP_CONFIRM, "TDLS Setup Confirm"},
2232 {TDLS_TEARDOWN, "TDLS Teardown"},
2233 {TDLS_PEER_TRAFFIC_INDICATION, "TDLS Peer Traffic Indication"},
2234 {TDLS_CHANNEL_SWITCH_REQUEST, "TDLS Channel Switch Request"},
2235 {TDLS_CHANNEL_SWITCH_RESPONSE, "TDLS Channel Switch Response"},
2236 {TDLS_PEER_PSM_REQUEST, "TDLS Peer PSM Request"},
2237 {TDLS_PEER_PSM_RESPONSE, "TDLS Peer PSM Response"},
2238 {TDLS_PEER_TRAFFIC_RESPONSE, "TDLS Peer Traffic Response"},
2239 {TDLS_DISCOVERY_REQUEST, "TDLS Discovery Request"},
2243 #define PSMP_STA_INFO_BROADCAST 0
2244 #define PSMP_STA_INFO_MULTICAST 1
2245 #define PSMP_STA_INFO_INDIVIDUALLY_ADDRESSED 2
2247 #define PSMP_STA_INFO_FLAG_TYPE 0x00000003
2248 #define PSMP_STA_INFO_FLAG_DTT_START 0x00001FFC
2249 #define PSMP_STA_INFO_FLAG_DTT_DURATION 0x001FE000
2251 #define PSMP_STA_INFO_FLAG_STA_ID 0x001FFFE0
2253 #define PSMP_STA_INFO_FLAG_UTT_START 0x0000FFE0
2254 #define PSMP_STA_INFO_FLAG_UTT_DURATION 0x03FF0000
2256 #define PSMP_STA_INFO_FLAG_IA_RESERVED 0xFC000000
2258 static const value_string ff_psmp_sta_info_flags[] = {
2259 { PSMP_STA_INFO_BROADCAST, "Broadcast"},
2260 { PSMP_STA_INFO_MULTICAST, "Multicast"},
2261 { PSMP_STA_INFO_INDIVIDUALLY_ADDRESSED, "Individually Addressed"},
2266 beacon_interval_base_custom(gchar *result, guint32 beacon_interval)
2269 temp_double = (double)beacon_interval;
2270 g_snprintf(result, ITEM_LABEL_LENGTH, "%f [Seconds]", (temp_double * 1024 / 1000000) );
2273 /* Davide Schiera (2006-11-22): including AirPDcap project */
2274 #ifdef HAVE_AIRPDCAP
2275 #include <epan/crypt/airpdcap_ws.h>
2276 AIRPDCAP_CONTEXT airpdcap_ctx;
2280 /* Davide Schiera (2006-11-22) ---------------------------------------------- */
2283 /* ************************************************************************* */
2284 /* Return the length of the current header (in bytes) */
2285 /* ************************************************************************* */
2287 find_header_length (guint16 fcf, guint16 ctrl_fcf, gboolean is_ht)
2292 switch (FCF_FRAME_TYPE (fcf)) {
2295 if (is_ht && IS_STRICTLY_ORDERED(FCF_FLAGS(fcf)))
2296 return MGT_FRAME_HDR_LEN + 4;
2298 return MGT_FRAME_HDR_LEN;
2301 if (COMPOSE_FRAME_TYPE(fcf) == CTRL_CONTROL_WRAPPER) {
2308 switch (COMPOSE_FRAME_TYPE (cw_fcf)) {
2311 case CTRL_ACKNOWLEDGEMENT:
2317 case CTRL_CFP_ENDACK:
2318 case CTRL_BLOCK_ACK_REQ:
2319 case CTRL_BLOCK_ACK:
2322 return len + 4; /* XXX */
2325 len = (FCF_ADDR_SELECTOR(fcf) ==
2326 DATA_ADDR_T4) ? DATA_LONG_HDR_LEN : DATA_SHORT_HDR_LEN;
2328 if (DATA_FRAME_IS_QOS(COMPOSE_FRAME_TYPE(fcf))) {
2330 if (is_ht && IS_STRICTLY_ORDERED(FCF_FLAGS(fcf))) {
2342 #ifdef MESH_OVERRIDES
2343 /* ************************************************************************* */
2344 /* Return the length of the mesh header if any (in bytes)
2346 * Per IEEE 802.11-07/0799r8:
2347 * 7.1.3.5a.1 The Mesh Header field (...) is present in Data frames if and
2348 * only if they are transmitted between peer MPs with an established peer
2349 * link. Data frames including the Mesh Header field are referred to as
2352 * We need a stateful sniffer for that. For now, use heuristics: If we
2353 * find valid mesh flags (currently, only MESH_FLAGS_ADDRESS_EXTENSION) at the
2354 * offset where mesh flags should be, assume we're dealing with a mesh header.
2355 * ************************************************************************* */
2357 find_mesh_header_length(const guchar * pd, int offset, guint16 fcf)
2361 switch (FCF_FRAME_TYPE (fcf)) {
2364 /* TODO: Multihop Action Frames */
2368 mesh_flags = pd[offset];
2371 /* asume mesh if all reserved bits in the mesh_flags field are zero */
2372 if ((mesh_flags & ~MESH_FLAGS_ADDRESS_EXTENSION) == 0)
2373 return 6 + 6*(mesh_flags & MESH_FLAGS_ADDRESS_EXTENSION);
2378 #endif /* MESH_OVERRIDES */
2380 mimo_control_t get_mimo_control (tvbuff_t *tvb, int offset)
2383 mimo_control_t output;
2385 mimo = tvb_get_letohs (tvb, offset);
2387 output.nc = (mimo & 0x0003) + 1;
2388 output.nr = ((mimo & 0x000C) >> 2) + 1;
2389 output.chan_width = (mimo & 0x0010) >> 4;
2390 output.coefficient_size = 4; /* XXX - Is this a good default? */
2392 switch ((mimo & 0x0060) >> 5)
2395 output.grouping = 1;
2399 output.grouping = 2;
2403 output.grouping = 4;
2407 output.grouping = 1;
2411 switch ((mimo & 0x0180) >> 7)
2414 output.coefficient_size = 4;
2418 output.coefficient_size = 5;
2422 output.coefficient_size = 6;
2426 output.coefficient_size = 8;
2430 output.codebook_info = (mimo & 0x0600) >> 9;
2431 output.remaining_matrix_segment = (mimo & 0x3800) >> 11;
2436 int get_mimo_na (guint8 nr, guint8 nc)
2438 if (nr == 2 && nc == 1){
2440 }else if (nr == 2 && nc == 2){
2442 }else if (nr == 3 && nc == 1){
2444 }else if (nr == 3 && nc == 2){
2446 }else if (nr == 3 && nc == 3){
2448 }else if (nr == 4 && nc == 1){
2450 }else if (nr == 4 && nc == 2){
2452 }else if (nr == 4 && nc == 3){
2454 }else if (nr == 4 && nc == 4){
2461 int get_mimo_ns (gboolean chan_width, guint8 output_grouping)
2467 switch (output_grouping)
2485 switch (output_grouping)
2507 int add_mimo_csi_matrices_report (proto_tree *tree, tvbuff_t *tvb, int offset, mimo_control_t mimo_cntrl)
2509 proto_item *snr_item;
2510 proto_tree *snr_tree;
2511 int csi_matrix_size, start_offset;
2514 start_offset = offset;
2515 snr_item = proto_tree_add_text(tree, tvb, offset, mimo_cntrl.nc, "Signal to Noise Ratio");
2516 snr_tree = proto_item_add_subtree (snr_item, ett_mimo_report);
2518 for (i=1; i <= mimo_cntrl.nr; i++)
2522 snr = tvb_get_guint8(tvb, offset);
2523 proto_tree_add_uint_format(snr_tree, hf_ieee80211_ff_mimo_csi_snr, tvb, offset, 1, snr, "Channel %d - Signal to Noise Ratio: 0x%02X", i, snr);
2527 ns = get_mimo_ns(mimo_cntrl.chan_width, mimo_cntrl.grouping);
2528 csi_matrix_size = ns*(3+(2*mimo_cntrl.nc*mimo_cntrl.nr*mimo_cntrl.coefficient_size));
2529 csi_matrix_size = roundup2(csi_matrix_size, 8) / 8;
2530 proto_tree_add_text(tree, tvb, offset, csi_matrix_size, "CSI Matrices");
2531 offset += csi_matrix_size;
2532 return offset - start_offset;
2535 int add_mimo_beamforming_feedback_report (proto_tree *tree, tvbuff_t *tvb, int offset, mimo_control_t mimo_cntrl)
2537 proto_item *snr_item;
2538 proto_tree *snr_tree;
2539 int csi_matrix_size, start_offset;
2542 start_offset = offset;
2543 snr_item = proto_tree_add_text(tree, tvb, offset, mimo_cntrl.nc, "Signal to Noise Ratio");
2544 snr_tree = proto_item_add_subtree (snr_item, ett_mimo_report);
2546 for (i=1; i <= mimo_cntrl.nc; i++)
2550 snr = tvb_get_guint8(tvb, offset);
2551 proto_tree_add_uint_format(snr_tree, hf_ieee80211_ff_mimo_csi_snr, tvb, offset, 1, snr, "Stream %d - Signal to Noise Ratio: 0x%02X", i, snr);
2555 ns = get_mimo_ns(mimo_cntrl.chan_width, mimo_cntrl.grouping);
2556 csi_matrix_size = ns*(2*mimo_cntrl.nc*mimo_cntrl.nr*mimo_cntrl.coefficient_size);
2557 csi_matrix_size = roundup2(csi_matrix_size, 8) / 8;
2558 proto_tree_add_text(tree, tvb, offset, csi_matrix_size, "Beamforming Feedback Matrices");
2559 offset += csi_matrix_size;
2560 return offset - start_offset;
2563 int add_mimo_compressed_beamforming_feedback_report (proto_tree *tree, tvbuff_t *tvb, int offset, mimo_control_t mimo_cntrl)
2565 proto_item *snr_item;
2566 proto_tree *snr_tree;
2567 int csi_matrix_size, start_offset;
2570 start_offset = offset;
2571 snr_item = proto_tree_add_text(tree, tvb, offset, mimo_cntrl.nc, "Signal to Noise Ratio");
2572 snr_tree = proto_item_add_subtree (snr_item, ett_mimo_report);
2574 for (i=1; i <= mimo_cntrl.nc; i++)
2578 snr = tvb_get_guint8(tvb, offset);
2579 proto_tree_add_uint_format(snr_tree, hf_ieee80211_ff_mimo_csi_snr, tvb, offset, 1, snr, "Stream %d - Signal to Noise Ratio: 0x%02X", i, snr);
2583 na = get_mimo_na(mimo_cntrl.nr, mimo_cntrl.nc);
2584 ns = get_mimo_ns(mimo_cntrl.chan_width, mimo_cntrl.grouping);
2585 csi_matrix_size = ns*(na*((mimo_cntrl.codebook_info+1)*2 + 2)/2);
2586 csi_matrix_size = roundup2(csi_matrix_size, 8) / 8;
2587 proto_tree_add_text(tree, tvb, offset, csi_matrix_size, "Compressed Beamforming Feedback Matrices");
2588 offset += csi_matrix_size;
2589 return offset - start_offset;
2592 /* ************************************************************************* */
2593 /* This is the capture function used to update packet counts */
2594 /* ************************************************************************* */
2596 capture_ieee80211_common (const guchar * pd, int offset, int len,
2597 packet_counts * ld, gboolean fixed_length_header,
2598 gboolean datapad, gboolean is_ht)
2600 guint16 fcf, hdr_length;
2601 #ifdef MESH_OVERRIDES
2602 guint16 meshdr_length;
2603 #endif /* MESH_OVERRIDES */
2605 if (!BYTES_ARE_IN_FRAME(offset, len, 2)) {
2610 fcf = pletohs (&pd[offset]);
2612 if (IS_PROTECTED(FCF_FLAGS(fcf)) && wlan_ignore_wep == WLAN_IGNORE_WEP_NO) {
2617 switch (COMPOSE_FRAME_TYPE (fcf)) {
2619 case DATA: /* We got a data frame */
2620 case DATA_CF_ACK: /* Data with ACK */
2622 case DATA_CF_ACK_POLL:
2625 if (fixed_length_header) {
2626 hdr_length = DATA_LONG_HDR_LEN;
2627 #ifdef MESH_OVERRIDES
2629 #endif /* MESH_OVERRIDES */
2631 hdr_length = find_header_length (fcf, 0, is_ht);
2632 #ifdef MESH_OVERRIDES
2634 hdr_length = roundup2(hdr_length, 4);
2635 meshdr_length = find_mesh_header_length(pd, offset + hdr_length, fcf);
2636 g_warning("mesh hdr_length %d hdr_length %d\n", meshdr_length, hdr_length);
2637 hdr_length += meshdr_length;
2639 #else /* MESH_OVERRIDES */
2642 hdr_length = roundup2(hdr_length, 4);
2643 #endif /* MESH_OVERRIDES */
2644 /* I guess some bridges take Netware Ethernet_802_3 frames,
2645 which are 802.3 frames (with a length field rather than
2646 a type field, but with no 802.2 header in the payload),
2647 and just stick the payload into an 802.11 frame. I've seen
2648 captures that show frames of that sort.
2650 We also handle some odd form of encapsulation in which a
2651 complete Ethernet frame is encapsulated within an 802.11
2652 data frame, with no 802.2 header. This has been seen
2655 On top of that, at least at some point it appeared that
2656 the OLPC XO sent out frames with two bytes of 0 between
2657 the "end" of the 802.11 header and the beginning of
2660 So, if the packet doesn't start with 0xaa 0xaa:
2662 we first use the same scheme that linux-wlan-ng does to detect
2663 those encapsulated Ethernet frames, namely looking to see whether
2664 the frame either starts with 6 octets that match the destination
2665 address from the 802.11 header or has 6 octets that match the
2666 source address from the 802.11 header following the first 6 octets,
2667 and, if so, treat it as an encapsulated Ethernet frame;
2669 otherwise, we use the same scheme that we use in the Ethernet
2670 dissector to recognize Netware 802.3 frames, namely checking
2671 whether the packet starts with 0xff 0xff and, if so, treat it
2672 as an encapsulated IPX frame, and then check whether the
2673 packet starts with 0x00 0x00 and, if so, treat it as an OLPC
2675 if (!BYTES_ARE_IN_FRAME(offset+hdr_length, len, 2)) {
2679 if (pd[offset+hdr_length] != 0xaa && pd[offset+hdr_length+1] != 0xaa) {
2681 /* XXX - this requires us to parse the header to find the source
2682 and destination addresses. */
2683 if (BYTES_ARE_IN_FRAME(offset+hdr_length, len, 12) {
2684 /* We have two MAC addresses after the header. */
2685 if (memcmp(&pd[offset+hdr_length+6], pinfo->dl_src.data, 6) == 0 ||
2686 memcmp(&pd[offset+hdr_length+6], pinfo->dl_dst.data, 6) == 0) {
2687 capture_eth (pd, offset + hdr_length, len, ld);
2692 if (pd[offset+hdr_length] == 0xff && pd[offset+hdr_length+1] == 0xff)
2694 else if (pd[offset+hdr_length] == 0x00 && pd[offset+hdr_length+1] == 0x00)
2695 capture_llc (pd, offset + hdr_length + 2, len, ld);
2698 capture_llc (pd, offset + hdr_length, len, ld);
2710 * Handle 802.11 with a variable-length link-layer header.
2713 capture_ieee80211 (const guchar * pd, int offset, int len, packet_counts * ld)
2715 capture_ieee80211_common (pd, offset, len, ld, FALSE, FALSE, FALSE);
2719 * Handle 802.11 with a variable-length link-layer header and data padding.
2722 capture_ieee80211_datapad (const guchar * pd, int offset, int len,
2725 capture_ieee80211_common (pd, offset, len, ld, FALSE, TRUE, FALSE);
2729 * Handle 802.11 with a fixed-length link-layer header (padded to the
2733 capture_ieee80211_fixed (const guchar * pd, int offset, int len, packet_counts * ld)
2735 capture_ieee80211_common (pd, offset, len, ld, TRUE, FALSE, FALSE);
2739 * Handle an HT 802.11 with a variable-length link-layer header.
2742 capture_ieee80211_ht (const guchar * pd, int offset, int len, packet_counts * ld)
2744 capture_ieee80211_common (pd, offset, len, ld, FALSE, FALSE, TRUE);
2747 #define WLANCAP_MAGIC_COOKIE_BASE 0x80211000
2748 #define WLANCAP_MAGIC_COOKIE_V1 0x80211001
2749 #define WLANCAP_MAGIC_COOKIE_V2 0x80211002
2753 * Prism II-based wlan devices have a monitoring mode that sticks
2754 * a proprietary header on each packet with lots of good
2755 * information. This file is responsible for decoding that
2758 * Support by Tim Newsham
2760 * A value from the header.
2762 * It appears from looking at the linux-wlan-ng and Prism II HostAP
2763 * drivers, and various patches to the orinoco_cs drivers to add
2764 * Prism headers, that:
2766 * the "did" identifies what the value is (i.e., what it's the value
2769 * "status" is 0 if the value is present or 1 if it's absent;
2771 * "len" is the length of the value (always 4, in that code);
2773 * "data" is the value of the data (or 0 if not present).
2775 * Note: all of those values are in the *host* byte order of the machine
2776 * on which the capture was written.
2781 * Header attached during Prism monitor mode.
2783 * At least according to one paper I've seen, the Prism 2.5 chip set
2786 * RSSI (receive signal strength indication) is "the total power
2787 * received by the radio hardware while receiving the frame,
2788 * including signal, interfereence, and background noise";
2790 * "silence value" is "the total power observed just before the
2791 * start of the frame".
2793 * None of the drivers I looked at supply the "rssi" or "sq" value,
2794 * but they do supply "signal" and "noise" values, along with a "rate"
2795 * value that's 1/5 of the raw value from what is presumably a raw
2796 * HFA384x frame descriptor, with the comment "set to 802.11 units",
2797 * which presumably means the units are 500 Kb/s.
2799 * I infer from the current NetBSD "wi" driver that "signal" and "noise"
2800 * are adjusted dBm values, with the dBm value having 100 added to it
2801 * for the Prism II cards (although the NetBSD code has an XXX comment
2802 * for the #define for WI_PRISM_DBM_OFFSET) and 149 (with no XXX comment)
2803 * for the Orinoco cards.
2805 * XXX - what about other drivers that supply Prism headers, such as
2806 * old versions of the MadWifi driver?
2809 #define PRISM_HEADER_LENGTH 144 /* Default Prism Header Length */
2810 #define PRISM_DID_HOSTTIME 0x00010044 /* Host time element */
2811 #define PRISM_DID_MACTIME 0x00020044 /* Mac time element */
2812 #define PRISM_DID_CHANNEL 0x00030044 /* Channel element */
2813 #define PRISM_DID_RSSI 0x00040044 /* RSSI element */
2814 #define PRISM_DID_SQ 0x00050044 /* SQ element */
2815 #define PRISM_DID_SIGNAL 0x00060044 /* Signal element */
2816 #define PRISM_DID_NOISE 0x00070044 /* Noise element */
2817 #define PRISM_DID_RATE 0x00080044 /* Rate element */
2818 #define PRISM_DID_ISTX 0x00090044 /* Is Tx frame */
2819 #define PRISM_DID_FRMLEN 0x000A0044 /* Frame length */
2821 static const value_string prism_did_vals[] =
2823 { PRISM_DID_HOSTTIME, "Host Time" },
2824 { PRISM_DID_MACTIME, "Mac Time" },
2825 { PRISM_DID_CHANNEL, "Channel" },
2826 { PRISM_DID_RSSI, "RSSI" },
2827 { PRISM_DID_SQ, "SQ" },
2828 { PRISM_DID_SIGNAL, "Signal" },
2829 { PRISM_DID_NOISE, "Noise" },
2830 { PRISM_DID_RATE, "Rate" },
2831 { PRISM_DID_ISTX, "Is Tx" },
2832 { PRISM_DID_FRMLEN, "Frame Length" },
2836 static const value_string prism_status_vals[] =
2838 { 0, "Not Supplied" },
2843 static const value_string prism_istx_vals[] =
2851 prism_rate_base_custom(gchar *result, guint32 rate)
2853 g_snprintf(result, ITEM_LABEL_LENGTH, "%u.%u", rate /2, rate & 1 ? 5 : 0);
2857 prism_rate_return(guint32 rate)
2860 result = ep_alloc(SHORT_STR);
2862 prism_rate_base_custom(result, rate);
2869 capture_prism(const guchar *pd, int offset, int len, packet_counts *ld)
2873 if (!BYTES_ARE_IN_FRAME(offset, len, 4)) {
2878 /* Some captures with DLT_PRISM have the AVS WLAN header */
2879 cookie = pntohl(pd);
2880 if ((cookie == WLANCAP_MAGIC_COOKIE_V1) ||
2881 (cookie == WLANCAP_MAGIC_COOKIE_V2)) {
2882 capture_wlancap(pd, offset, len, ld);
2887 if (!BYTES_ARE_IN_FRAME(offset, len, PRISM_HEADER_LENGTH)) {
2891 offset += PRISM_HEADER_LENGTH;
2893 /* 802.11 header follows */
2894 capture_ieee80211(pd, offset, len, ld);
2898 capture_wlancap(const guchar *pd, int offset, int len, packet_counts *ld)
2902 if (!BYTES_ARE_IN_FRAME(offset, len, sizeof(guint32)*2)) {
2907 length = pntohl(pd+sizeof(guint32));
2909 if (!BYTES_ARE_IN_FRAME(offset, len, length)) {
2916 /* 802.11 header follows */
2917 capture_ieee80211(pd, offset, len, ld);
2920 /* ************************************************************************* */
2921 /* Add the subtree used to store the fixed parameters */
2922 /* ************************************************************************* */
2924 get_fixed_parameter_tree (proto_tree * tree, tvbuff_t *tvb, int start, int size)
2926 proto_item *fixed_fields;
2928 proto_tree_add_uint_format (tree, hf_ieee80211_fixed_parameters, tvb, start,
2929 size, size, "Fixed parameters (%d bytes)",
2932 return proto_item_add_subtree (fixed_fields, ett_fixed_parameters);
2936 /* ************************************************************************* */
2937 /* Add the subtree used to store tagged parameters */
2938 /* ************************************************************************* */
2940 get_tagged_parameter_tree (proto_tree * tree, tvbuff_t *tvb, int start, int size)
2942 proto_item *tagged_fields;
2944 tagged_fields = proto_tree_add_uint_format (tree, hf_ieee80211_tagged_parameters,
2949 "Tagged parameters (%d bytes)",
2952 return proto_item_add_subtree (tagged_fields, ett_tagged_parameters);
2957 dissect_vendor_action_marvell(proto_tree *tree, tvbuff_t *tvb, int offset)
2961 octet = tvb_get_guint8(tvb, offset);
2962 proto_tree_add_item (tree, hf_ieee80211_ff_marvell_action_type, tvb, offset, 1, TRUE);
2966 case MRVL_ACTION_MESH_MANAGEMENT:
2967 octet = tvb_get_guint8(tvb, offset);
2968 proto_tree_add_item (tree, hf_ieee80211_ff_marvell_mesh_mgt_action_code, tvb, offset, 1, TRUE);
2972 case MRVL_MESH_MGMT_ACTION_RREQ:
2973 proto_tree_add_item (tree, hf_ieee80211_ff_mesh_mgt_length, tvb, offset, 1, TRUE);
2975 proto_tree_add_item (tree, hf_ieee80211_ff_mesh_mgt_mode, tvb, offset, 1, TRUE);
2977 proto_tree_add_item (tree, hf_ieee80211_ff_mesh_mgt_hopcount, tvb, offset, 1, TRUE);
2979 proto_tree_add_item (tree, hf_ieee80211_ff_mesh_mgt_ttl, tvb, offset, 1, TRUE);
2981 proto_tree_add_item (tree, hf_ieee80211_ff_mesh_mgt_rreqid, tvb, offset, 4, TRUE);
2983 proto_tree_add_item (tree, hf_ieee80211_ff_mesh_mgt_sa, tvb, offset, 6, FALSE);
2985 proto_tree_add_item (tree, hf_ieee80211_ff_mesh_mgt_ssn, tvb, offset, 4, TRUE);
2987 proto_tree_add_item (tree, hf_ieee80211_ff_mesh_mgt_lifetime, tvb, offset, 4, TRUE);
2989 proto_tree_add_item (tree, hf_ieee80211_ff_mesh_mgt_metric, tvb, offset, 4, TRUE);
2991 proto_tree_add_item (tree, hf_ieee80211_ff_mesh_mgt_dstcount, tvb, offset, 1, TRUE);
2993 proto_tree_add_item (tree, hf_ieee80211_ff_mesh_mgt_flags, tvb, offset, 1, TRUE);
2995 proto_tree_add_item (tree, hf_ieee80211_ff_mesh_mgt_da, tvb, offset, 6, FALSE);
2997 proto_tree_add_item (tree, hf_ieee80211_ff_mesh_mgt_dsn, tvb, offset, 4, TRUE);
3000 case MRVL_MESH_MGMT_ACTION_RREP:
3001 proto_tree_add_item (tree, hf_ieee80211_ff_mesh_mgt_length, tvb, offset, 1, TRUE);
3003 proto_tree_add_item (tree, hf_ieee80211_ff_mesh_mgt_mode, tvb, offset, 1, TRUE);
3005 proto_tree_add_item (tree, hf_ieee80211_ff_mesh_mgt_hopcount, tvb, offset, 1, TRUE);
3007 proto_tree_add_item (tree, hf_ieee80211_ff_mesh_mgt_ttl, tvb, offset, 1, TRUE);
3009 proto_tree_add_item (tree, hf_ieee80211_ff_mesh_mgt_da, tvb, offset, 6, FALSE);
3011 proto_tree_add_item (tree, hf_ieee80211_ff_mesh_mgt_dsn, tvb, offset, 4, TRUE);
3013 proto_tree_add_item (tree, hf_ieee80211_ff_mesh_mgt_lifetime, tvb, offset, 4, TRUE);
3015 proto_tree_add_item (tree, hf_ieee80211_ff_mesh_mgt_metric, tvb, offset, 4, TRUE);
3017 proto_tree_add_item (tree, hf_ieee80211_ff_mesh_mgt_sa, tvb, offset, 6, FALSE);
3019 proto_tree_add_item (tree, hf_ieee80211_ff_mesh_mgt_ssn, tvb, offset, 4, TRUE);
3022 case MRVL_MESH_MGMT_ACTION_RERR:
3023 proto_tree_add_item (tree, hf_ieee80211_ff_mesh_mgt_length, tvb, offset, 1, TRUE);
3025 proto_tree_add_item (tree, hf_ieee80211_ff_mesh_mgt_mode, tvb, offset, 1, TRUE);
3027 proto_tree_add_item (tree, hf_ieee80211_ff_mesh_mgt_dstcount, tvb, offset, 1, TRUE);
3029 proto_tree_add_item (tree, hf_ieee80211_ff_mesh_mgt_da, tvb, offset, 6, FALSE);
3031 proto_tree_add_item (tree, hf_ieee80211_ff_mesh_mgt_dsn, tvb, offset, 4, TRUE);
3046 dissect_advertisement_protocol(packet_info *pinfo, proto_tree *tree,
3047 tvbuff_t *tvb, int offset, gboolean *anqp)
3049 guint8 tag_no, tag_len, left;
3050 proto_item *item = NULL;
3051 proto_tree *adv_tree, *adv_tuple_tree;
3055 tag_no = tvb_get_guint8(tvb, offset);
3056 item = proto_tree_add_item(tree, hf_ieee80211_tag_number, tvb, offset, 1, TRUE);
3058 tag_len = tvb_get_guint8(tvb, offset + 1);
3059 if (tag_no != TAG_ADVERTISEMENT_PROTOCOL) {
3060 expert_add_info_format(pinfo, item, PI_MALFORMED, PI_ERROR,
3061 "Unexpected IE %d (expected Advertisement "
3062 "Protocol)", tag_no);
3065 item = proto_tree_add_uint(tree, hf_ieee80211_tag_length, tvb, offset + 1, 1, tag_len);
3067 expert_add_info_format(pinfo, item, PI_MALFORMED, PI_ERROR,
3068 "Advertisement Protocol: IE must be at least 2 "
3075 item = proto_tree_add_text(tree, tvb, offset, left,
3076 "Advertisement Protocol element");
3077 adv_tree = proto_item_add_subtree(item, ett_adv_proto);
3082 id = tvb_get_guint8(tvb, offset + 1);
3083 item = proto_tree_add_text(adv_tree, tvb, offset, 2,
3084 "Advertisement Protocol Tuple: %s",
3085 val_to_str(id, adv_proto_id_vals,
3087 adv_tuple_tree = proto_item_add_subtree(item, ett_adv_proto_tuple);
3089 proto_tree_add_item(adv_tuple_tree,
3090 hf_ieee80211_tag_adv_proto_resp_len_limit, tvb,
3092 proto_tree_add_item(adv_tuple_tree,
3093 hf_ieee80211_tag_adv_proto_pame_bi, tvb,
3097 proto_tree_add_item(adv_tuple_tree, hf_ieee80211_tag_adv_proto_id, tvb,
3102 if (id == 0 && anqp)
3106 /* Vendor specific */
3107 guint8 len = tvb_get_guint8(tvb, offset);
3111 expert_add_info_format(pinfo, item, PI_MALFORMED, PI_ERROR,
3112 "Vendor specific info length error");
3115 proto_tree_add_text(adv_tuple_tree, tvb, offset, len,
3116 "Vendor Specific Advertisement Protocol info");
3123 expert_add_info_format(pinfo, item, PI_MALFORMED, PI_ERROR,
3124 "Unexpected extra data in the end");
3131 dissect_anqp(proto_tree *tree, tvbuff_t *tvb, int offset, gboolean request)
3135 proto_tree_add_text(tree, tvb, offset, 4,
3136 request ? "Access Network Query Protocol Request" :
3137 "Access Network Query Protocol Response");
3138 proto_tree_add_item(tree, hf_ieee80211_ff_anqp_info_id,
3139 tvb, offset, 2, TRUE);
3140 id = tvb_get_letohs(tvb, offset);
3142 proto_tree_add_item(tree, hf_ieee80211_ff_anqp_info_length,
3143 tvb, offset, 2, TRUE);
3144 len = tvb_get_letohs(tvb, offset);
3146 proto_tree_add_item(tree, hf_ieee80211_ff_anqp_info,
3147 tvb, offset, len, FALSE);
3149 /* ANQP vendor-specific list */
3152 const guint8 *tag_data_ptr;
3154 oui = tvb_get_ntoh24(tvb, offset);
3155 tag_data_ptr = tvb_get_ptr(tvb, offset, 3);
3156 proto_tree_add_bytes_format(tree, hf_ieee80211_tag_oui, tvb, offset, 3,
3157 tag_data_ptr, "Vendor: %s",
3158 get_manuf_name(tag_data_ptr));
3163 subtype = tvb_get_guint8(tvb, offset);
3164 if (subtype == WFA_SUBTYPE_P2P) {
3165 proto_tree_add_text(tree, tvb, offset, 1, "Subtype %u: P2P ANQP",
3167 dissect_wifi_p2p_anqp(g_pinfo, tree, tvb, offset + 1, request);
3169 proto_tree_add_text(tree, tvb, offset, 1, "Subtype %u", subtype);
3176 dissect_gas_initial_request(proto_tree *tree, tvbuff_t *tvb, int offset,
3182 proto_tree *query, *anqp_tree;
3184 /* Query Request Length (2 octets) */
3185 req_len = tvb_get_letohs(tvb, offset);
3187 item = proto_tree_add_text(tree, tvb, offset, 2 + req_len, "Query Request");
3188 query = proto_item_add_subtree(item, ett_gas_query);
3190 proto_tree_add_item(query, hf_ieee80211_ff_query_request_length,
3191 tvb, offset, 2, TRUE);
3194 * Query Request (GAS query; formatted per protocol specified in the
3195 * Advertisement Protocol IE)
3197 item = proto_tree_add_item(query, hf_ieee80211_ff_query_request,
3198 tvb, offset, req_len, FALSE);
3200 anqp_tree = proto_item_add_subtree(item, ett_gas_anqp);
3201 dissect_anqp(anqp_tree, tvb, offset, TRUE);
3205 return offset - start;
3209 dissect_gas_initial_response(proto_tree *tree, tvbuff_t *tvb, int offset,
3215 proto_tree *query, *anqp_tree;
3217 /* Query Response Length (2 octets) */
3218 resp_len = tvb_get_letohs(tvb, offset);
3220 item = proto_tree_add_text(tree, tvb, offset, 2 + resp_len,
3222 query = proto_item_add_subtree(item, ett_gas_query);
3224 proto_tree_add_item(query, hf_ieee80211_ff_query_response_length,
3225 tvb, offset, 2, TRUE);
3227 /* Query Response (optional) */
3229 item = proto_tree_add_item(query, hf_ieee80211_ff_query_response,
3230 tvb, offset, resp_len, FALSE);
3232 anqp_tree = proto_item_add_subtree(item, ett_gas_anqp);
3233 dissect_anqp(anqp_tree, tvb, offset, FALSE);
3238 return offset - start;
3242 dissect_gas_comeback_response(proto_tree *tree, tvbuff_t *tvb, int offset,
3243 gboolean anqp, guint8 frag)
3248 proto_tree *query, *anqp_tree;
3250 /* Query Response Length (2 octets) */
3251 resp_len = tvb_get_letohs(tvb, offset);
3253 item = proto_tree_add_text(tree, tvb, offset, 2 + resp_len,
3255 query = proto_item_add_subtree(item, ett_gas_query);
3257 proto_tree_add_item(query, hf_ieee80211_ff_query_response_length,
3258 tvb, offset, 2, TRUE);
3260 /* Query Response (optional) */
3262 item = proto_tree_add_item(query, hf_ieee80211_ff_query_response,
3263 tvb, offset, resp_len, FALSE);
3264 if (anqp && frag == 0) {
3265 anqp_tree = proto_item_add_subtree(item, ett_gas_anqp);
3266 dissect_anqp(anqp_tree, tvb, offset, FALSE);
3271 return offset - start;
3274 /* ************************************************************************* */
3275 /* Dissect and add fixed mgmt fields to protocol tree */
3276 /* ************************************************************************* */
3278 add_fixed_field(proto_tree * tree, tvbuff_t * tvb, int offset, int lfcode)
3285 case FIELD_TIMESTAMP:
3286 proto_tree_add_item(tree, hf_ieee80211_ff_timestamp, tvb, offset, 8, TRUE);
3290 case FIELD_BEACON_INTERVAL:
3292 proto_tree_add_item(tree, hf_ieee80211_ff_beacon_interval, tvb, offset, 2, TRUE);
3293 col_append_fstr(g_pinfo->cinfo, COL_INFO, ", BI=%d", tvb_get_letohs (tvb, offset));
3298 case FIELD_CAP_INFO:
3301 proto_item *cap_item;
3302 proto_tree *cap_tree;
3304 cap_item = proto_tree_add_item(tree, hf_ieee80211_ff_capture, tvb, offset, 2, TRUE);
3305 cap_tree = proto_item_add_subtree (cap_item, ett_cap_tree);
3307 proto_tree_add_item(cap_tree, hf_ieee80211_ff_cf_ess, tvb, offset, 2, TRUE);
3308 proto_tree_add_item(cap_tree, hf_ieee80211_ff_cf_ibss, tvb, offset, 2, TRUE);
3309 if ((tvb_get_letohs(tvb, offset) & 0x0001) != 0) /* This is an AP */
3310 proto_tree_add_item(cap_tree, hf_ieee80211_ff_cf_ap_poll, tvb, offset, 2, TRUE);
3311 else /* This is a STA */
3312 proto_tree_add_item(cap_tree, hf_ieee80211_ff_cf_sta_poll, tvb, offset, 2, TRUE);
3314 proto_tree_add_item(cap_tree, hf_ieee80211_ff_cf_privacy, tvb, offset, 2, TRUE);
3315 proto_tree_add_item(cap_tree, hf_ieee80211_ff_cf_preamble, tvb, offset, 2, TRUE);
3316 proto_tree_add_item(cap_tree, hf_ieee80211_ff_cf_pbcc, tvb, offset, 2, TRUE);
3317 proto_tree_add_item(cap_tree, hf_ieee80211_ff_cf_agility, tvb, offset, 2, TRUE);
3318 proto_tree_add_item(cap_tree, hf_ieee80211_ff_cf_spec_man, tvb, offset, 2, TRUE);
3319 proto_tree_add_item(cap_tree, hf_ieee80211_ff_short_slot_time, tvb, offset, 2, TRUE);
3320 proto_tree_add_item(cap_tree, hf_ieee80211_ff_cf_apsd, tvb, offset, 2, TRUE);
3321 proto_tree_add_item(cap_tree, hf_ieee80211_ff_dsss_ofdm, tvb, offset, 2, TRUE);
3322 proto_tree_add_item(cap_tree, hf_ieee80211_ff_cf_del_blk_ack, tvb, offset, 2, TRUE);
3323 proto_tree_add_item(cap_tree, hf_ieee80211_ff_cf_imm_blk_ack, tvb, offset, 2, TRUE);
3327 case FIELD_AUTH_ALG:
3328 proto_tree_add_item(tree, hf_ieee80211_ff_auth_alg, tvb, offset, 2, TRUE);
3332 case FIELD_AUTH_TRANS_SEQ:
3333 proto_tree_add_item(tree, hf_ieee80211_ff_auth_seq, tvb, offset, 2, TRUE);
3337 case FIELD_CURRENT_AP_ADDR:
3338 proto_tree_add_item(tree, hf_ieee80211_ff_current_ap, tvb, offset, 6, FALSE);
3342 case FIELD_LISTEN_IVAL:
3343 proto_tree_add_item(tree, hf_ieee80211_ff_listen_ival, tvb, offset, 2, TRUE);
3347 case FIELD_REASON_CODE:
3348 proto_tree_add_item(tree, hf_ieee80211_ff_reason, tvb, offset, 2, TRUE);
3352 case FIELD_ASSOC_ID:
3353 proto_tree_add_item(tree, hf_ieee80211_ff_assoc_id, tvb, offset, 2, TRUE);
3357 case FIELD_STATUS_CODE:
3358 proto_tree_add_item(tree, hf_ieee80211_ff_status_code, tvb, offset, 2, TRUE);
3362 case FIELD_CATEGORY_CODE:
3363 proto_tree_add_item(tree, hf_ieee80211_ff_category_code, tvb, offset, 1, TRUE);
3367 case FIELD_ACTION_CODE:
3368 proto_tree_add_item(tree, hf_ieee80211_ff_action_code, tvb, offset, 1, TRUE);
3372 case FIELD_DIALOG_TOKEN:
3373 proto_tree_add_item(tree, hf_ieee80211_ff_dialog_token, tvb, offset, 1, TRUE);
3377 case FIELD_WME_ACTION_CODE:
3378 proto_tree_add_item(tree, hf_ieee80211_ff_wme_action_code, tvb, offset, 1, TRUE);
3382 case FIELD_WME_STATUS_CODE:
3383 proto_tree_add_item(tree, hf_ieee80211_ff_wme_status_code, tvb, offset, 1, TRUE);
3387 case FIELD_QOS_ACTION_CODE:
3388 proto_tree_add_item(tree, hf_ieee80211_ff_qos_action_code, tvb, offset, 1, TRUE);
3392 case FIELD_BLOCK_ACK_ACTION_CODE:
3393 proto_tree_add_item(tree, hf_ieee80211_ff_ba_action, tvb, offset, 1, TRUE);
3397 case FIELD_BLOCK_ACK_PARAM:
3399 proto_item *param_item;
3400 proto_tree *param_tree;
3402 param_item = proto_tree_add_item(tree, hf_ieee80211_ff_block_ack_params, tvb, offset, 2, TRUE);
3403 param_tree = proto_item_add_subtree (param_item, ett_ff_ba_param_tree);
3405 proto_tree_add_item(param_tree, hf_ieee80211_ff_block_ack_params_amsdu_permitted, tvb, offset, 2, TRUE);
3406 proto_tree_add_item(param_tree, hf_ieee80211_ff_block_ack_params_policy, tvb, offset, 2, TRUE);
3407 proto_tree_add_item(param_tree, hf_ieee80211_ff_block_ack_params_tid, tvb, offset, 2, TRUE);
3408 proto_tree_add_item(param_tree, hf_ieee80211_ff_block_ack_params_buffer_size, tvb, offset, 2, TRUE);
3413 case FIELD_BLOCK_ACK_TIMEOUT:
3415 proto_tree_add_item(tree, hf_ieee80211_ff_block_ack_timeout, tvb, offset, 2, TRUE);
3420 case FIELD_BLOCK_ACK_SSC:
3422 proto_item *ssc_item;
3423 proto_tree *ssc_tree;
3425 ssc_item = proto_tree_add_item(tree, hf_ieee80211_ff_block_ack_ssc, tvb, offset, 2, TRUE);
3426 ssc_tree = proto_item_add_subtree (ssc_item, ett_ff_ba_ssc_tree);
3428 proto_tree_add_item(ssc_tree, hf_ieee80211_ff_block_ack_ssc_fragment, tvb, offset, 2, TRUE);
3429 proto_tree_add_item(ssc_tree, hf_ieee80211_ff_block_ack_ssc_sequence, tvb, offset, 2, TRUE);
3434 case FIELD_QOS_TS_INFO:
3436 proto_item *tsinfo_item;
3437 proto_tree *tsinfo_tree;
3439 tsinfo_item = proto_tree_add_item(tree, hf_ieee80211_tsinfo, tvb, offset, 3, TRUE);
3440 tsinfo_tree = proto_item_add_subtree(tsinfo_item, ett_tsinfo_tree);
3442 proto_tree_add_item(tsinfo_tree, hf_ieee80211_tsinfo_type, tvb, offset, 3, TRUE);
3443 proto_tree_add_item(tsinfo_tree, hf_ieee80211_tsinfo_tsid, tvb, offset, 3, TRUE);
3444 proto_tree_add_item(tsinfo_tree, hf_ieee80211_tsinfo_dir, tvb, offset, 3, TRUE);
3445 proto_tree_add_item(tsinfo_tree, hf_ieee80211_tsinfo_access, tvb, offset, 3, TRUE);
3446 proto_tree_add_item(tsinfo_tree, hf_ieee80211_tsinfo_agg, tvb, offset, 3, TRUE);
3447 proto_tree_add_item(tsinfo_tree, hf_ieee80211_tsinfo_apsd, tvb, offset, 3, TRUE);
3448 proto_tree_add_item(tsinfo_tree, hf_ieee80211_tsinfo_up, tvb, offset, 3, TRUE);
3449 proto_tree_add_item(tsinfo_tree, hf_ieee80211_tsinfo_ack, tvb, offset, 3, TRUE);
3450 proto_tree_add_item(tsinfo_tree, hf_ieee80211_tsinfo_sched, tvb, offset, 3, TRUE);
3451 proto_tree_add_item(tsinfo_tree, hf_ieee80211_tsinfo_rsv, tvb, offset, 3, TRUE);
3456 #ifdef MESH_OVERRIDES
3457 /* Mesh Management */
3458 case FIELD_MESH_MGT_ACTION_PS_CODE:
3459 proto_tree_add_item(tree, hf_ieee80211_ff_mesh_mgt_action_ps_code, tvb, offset, 1, TRUE);
3463 case FIELD_MESH_MGT_ACTION_PL_CODE:
3464 proto_tree_add_item(tree, hf_ieee80211_ff_mesh_mgt_action_pl_code, tvb, offset, 1, TRUE);
3467 #endif /* MESH_OVERRIDES */
3469 case FIELD_DLS_ACTION_CODE:
3470 proto_tree_add_item(tree, hf_ieee80211_ff_dls_action_code, tvb, offset, 1, TRUE);
3474 case FIELD_DST_MAC_ADDR:
3475 proto_tree_add_item(tree, hf_ieee80211_ff_dst_mac_addr, tvb, offset, 6, TRUE);
3479 case FIELD_SRC_MAC_ADDR:
3480 proto_tree_add_item(tree, hf_ieee80211_ff_src_mac_addr, tvb, offset, 6, TRUE);
3484 case FIELD_DLS_TIMEOUT:
3485 proto_tree_add_item(tree, hf_ieee80211_ff_dls_timeout, tvb, offset, 2, TRUE);
3489 case FIELD_DELBA_PARAM_SET:
3491 proto_item *param_item;
3492 proto_tree *param_tree;
3494 param_item = proto_tree_add_item(tree, hf_ieee80211_ff_delba_param, tvb, offset, 2, TRUE);
3495 param_tree = proto_item_add_subtree (param_item, ett_ff_ba_param_tree);
3497 proto_tree_add_item(param_tree, hf_ieee80211_ff_delba_param_reserved, tvb, offset, 2, TRUE);
3498 proto_tree_add_item(param_tree, hf_ieee80211_ff_delba_param_init, tvb, offset, 2, TRUE);
3499 proto_tree_add_item(param_tree, hf_ieee80211_ff_delba_param_tid, tvb, offset, 2, TRUE);
3504 case FIELD_MAX_REG_PWR:
3505 proto_tree_add_item(tree, hf_ieee80211_ff_max_reg_pwr, tvb, offset, 2, TRUE);
3509 case FIELD_MEASUREMENT_PILOT_INT:
3510 proto_tree_add_item(tree, hf_ieee80211_ff_measurement_pilot_int, tvb, offset, 2, TRUE);
3514 case FIELD_COUNTRY_STR:
3515 proto_tree_add_string (tree, hf_ieee80211_ff_country_str, tvb, offset, 3, FALSE);
3520 case FIELD_MAX_TX_PWR:
3521 proto_tree_add_item(tree, hf_ieee80211_ff_max_tx_pwr, tvb, offset, 1, TRUE);
3525 case FIELD_TX_PWR_USED:
3526 proto_tree_add_item(tree, hf_ieee80211_ff_tx_pwr_used, tvb, offset, 1, TRUE);
3530 case FIELD_TRANSCEIVER_NOISE_FLOOR:
3531 proto_tree_add_item(tree, hf_ieee80211_ff_transceiver_noise_floor, tvb, offset, 1, TRUE);
3535 case FIELD_CHANNEL_WIDTH:
3536 proto_tree_add_item(tree, hf_ieee80211_ff_channel_width, tvb, offset, 1, TRUE);
3540 case FIELD_QOS_INFO_AP:
3542 proto_item *info_item;
3543 proto_tree *info_tree;
3545 info_item = proto_tree_add_item(tree, hf_ieee80211_ff_qos_info_ap, tvb, offset, 1, TRUE);
3546 info_tree = proto_item_add_subtree (info_item, ett_ff_qos_info);
3548 proto_tree_add_item(info_tree, hf_ieee80211_ff_qos_info_ap_edca_param_set_counter, tvb, offset, 1, TRUE);
3549 proto_tree_add_item(info_tree, hf_ieee80211_ff_qos_info_ap_q_ack, tvb, offset, 1, TRUE);
3550 proto_tree_add_item(info_tree, hf_ieee80211_ff_qos_info_ap_queue_req, tvb, offset, 1, TRUE);
3551 proto_tree_add_item(info_tree, hf_ieee80211_ff_qos_info_ap_txop_request, tvb, offset, 1, TRUE);
3552 proto_tree_add_item(info_tree, hf_ieee80211_ff_qos_info_ap_reserved, tvb, offset, 1, TRUE);
3557 case FIELD_QOS_INFO_STA:
3559 proto_item *info_item;
3560 proto_tree *info_tree;
3562 info_item = proto_tree_add_item(tree, hf_ieee80211_ff_qos_info_sta, tvb, offset, 1, TRUE);
3563 info_tree = proto_item_add_subtree (info_item, ett_ff_qos_info);
3565 proto_tree_add_item(info_tree, hf_ieee80211_ff_qos_info_sta_ac_vo, tvb, offset, 1, TRUE);
3566 proto_tree_add_item(info_tree, hf_ieee80211_ff_qos_info_sta_ac_vi, tvb, offset, 1, TRUE);
3567 proto_tree_add_item(info_tree, hf_ieee80211_ff_qos_info_sta_ac_bk, tvb, offset, 1, TRUE);
3568 proto_tree_add_item(info_tree, hf_ieee80211_ff_qos_info_sta_ac_be, tvb, offset, 1, TRUE);
3569 proto_tree_add_item(info_tree, hf_ieee80211_ff_qos_info_sta_q_ack, tvb, offset, 1, TRUE);
3570 proto_tree_add_item(info_tree, hf_ieee80211_ff_qos_info_sta_max_sp_len, tvb, offset, 1, TRUE);
3571 proto_tree_add_item(info_tree, hf_ieee80211_ff_qos_info_sta_more_data_ack, tvb, offset, 1, TRUE);
3576 case FIELD_SM_PWR_CNTRL:
3578 proto_item *info_item;
3579 proto_tree *info_tree;
3581 info_item = proto_tree_add_item(tree, hf_ieee80211_ff_sm_pwr_save, tvb, offset, 1, TRUE);
3582 info_tree = proto_item_add_subtree (info_item, ett_ff_sm_pwr_save);
3584 proto_tree_add_item(info_tree, hf_ieee80211_ff_sm_pwr_save_enabled, tvb, offset, 1, TRUE);
3585 proto_tree_add_item(info_tree, hf_ieee80211_ff_sm_pwr_save_sm_mode, tvb, offset, 1, TRUE);
3586 proto_tree_add_item(info_tree, hf_ieee80211_ff_sm_pwr_save_reserved, tvb, offset, 1, TRUE);
3591 case FIELD_PCO_PHASE_CNTRL:
3592 proto_tree_add_item(tree, hf_ieee80211_ff_pco_phase_cntrl, tvb, offset, 1, TRUE);
3596 case FIELD_PSMP_PARAM_SET:
3598 proto_item *param_item;
3599 proto_tree *param_tree;
3601 param_item = proto_tree_add_item(tree, hf_ieee80211_ff_psmp_param_set, tvb, offset, 2, TRUE);
3602 param_tree = proto_item_add_subtree (param_item, ett_ff_psmp_param_set);
3604 proto_tree_add_item(param_tree, hf_ieee80211_ff_psmp_param_set_n_sta, tvb, offset, 2, TRUE);
3605 proto_tree_add_item(param_tree, hf_ieee80211_ff_psmp_param_set_more_psmp, tvb, offset, 2, TRUE );
3606 proto_tree_add_item(param_tree, hf_ieee80211_ff_psmp_param_set_psmp_sequence_duration, tvb, offset, 2, TRUE);
3611 case FIELD_MIMO_CNTRL:
3613 proto_item *mimo_item;
3614 proto_tree *mimo_tree;
3616 mimo_item = proto_tree_add_item(tree, hf_ieee80211_ff_mimo_cntrl, tvb, offset, 6, TRUE);
3617 mimo_tree = proto_item_add_subtree (mimo_item, ett_ff_mimo_cntrl);
3619 proto_tree_add_item(mimo_tree, hf_ieee80211_ff_mimo_cntrl_nc_index, tvb, offset, 1, TRUE);
3620 proto_tree_add_item(mimo_tree, hf_ieee80211_ff_mimo_cntrl_nr_index, tvb, offset, 1, TRUE);
3621 proto_tree_add_item(mimo_tree, hf_ieee80211_ff_mimo_cntrl_channel_width, tvb, offset, 1, TRUE);
3622 proto_tree_add_item(mimo_tree, hf_ieee80211_ff_mimo_cntrl_grouping, tvb, offset, 1, TRUE);
3623 proto_tree_add_item(mimo_tree, hf_ieee80211_ff_mimo_cntrl_coefficient_size, tvb, offset, 2, TRUE);
3624 proto_tree_add_item(mimo_tree, hf_ieee80211_ff_mimo_cntrl_codebook_info, tvb, offset, 1, TRUE);
3625 proto_tree_add_item(mimo_tree, hf_ieee80211_ff_mimo_cntrl_remaining_matrix_segment, tvb, offset, 1, TRUE);
3626 proto_tree_add_item(mimo_tree, hf_ieee80211_ff_mimo_cntrl_reserved, tvb, offset, 1, TRUE);
3629 proto_tree_add_item(mimo_tree, hf_ieee80211_ff_mimo_cntrl_sounding_timestamp, tvb, offset, 4, TRUE);
3634 case FIELD_ANT_SELECTION:
3636 proto_item *ant_item;
3637 proto_tree *ant_tree;
3639 ant_item = proto_tree_add_item(tree, hf_ieee80211_ff_ant_selection, tvb, offset, 1, TRUE);
3640 ant_tree = proto_item_add_subtree (ant_item, ett_ff_ant_sel);
3642 proto_tree_add_item(ant_tree, hf_ieee80211_ff_ant_selection_0, tvb, offset, 1, TRUE);
3643 proto_tree_add_item(ant_tree, hf_ieee80211_ff_ant_selection_1, tvb, offset, 1, TRUE);
3644 proto_tree_add_item(ant_tree, hf_ieee80211_ff_ant_selection_2, tvb, offset, 1, TRUE);
3645 proto_tree_add_item(ant_tree, hf_ieee80211_ff_ant_selection_3, tvb, offset, 1, TRUE);
3646 proto_tree_add_item(ant_tree, hf_ieee80211_ff_ant_selection_4, tvb, offset, 1, TRUE);
3647 proto_tree_add_item(ant_tree, hf_ieee80211_ff_ant_selection_5, tvb, offset, 1, TRUE);
3648 proto_tree_add_item(ant_tree, hf_ieee80211_ff_ant_selection_6, tvb, offset, 1, TRUE);
3649 proto_tree_add_item(ant_tree, hf_ieee80211_ff_ant_selection_7, tvb, offset, 1, TRUE);
3655 case FIELD_EXTENDED_CHANNEL_SWITCH_ANNOUNCEMENT:
3657 proto_item *chan_item;
3658 proto_tree *chan_tree;
3660 chan_item = proto_tree_add_item(tree, hf_ieee80211_ff_ext_channel_switch_announcement, tvb, offset, 4, TRUE);
3661 chan_tree = proto_item_add_subtree (chan_item, ett_ff_chan_switch_announce);
3663 proto_tree_add_item(chan_tree, hf_ieee80211_ff_ext_channel_switch_announcement_switch_mode, tvb, offset, 4, TRUE);
3664 proto_tree_add_item(chan_tree, hf_ieee80211_ff_ext_channel_switch_announcement_new_reg_class, tvb, offset, 4, TRUE);
3665 proto_tree_add_item(chan_tree, hf_ieee80211_ff_ext_channel_switch_announcement_new_chan_number, tvb, offset, 4, TRUE);
3666 proto_tree_add_item(chan_tree, hf_ieee80211_ff_ext_channel_switch_announcement_switch_count, tvb, offset, 4, TRUE);
3671 case FIELD_HT_INFORMATION:
3673 proto_item *ht_item;
3674 proto_tree *ht_tree;
3676 ht_item = proto_tree_add_uint(tree, hf_ieee80211_ff_ht_info, tvb, offset, 1, TRUE);
3677 ht_tree = proto_item_add_subtree (ht_item, ett_ff_ht_info);
3679 proto_tree_add_item(ht_tree, hf_ieee80211_ff_ht_info_information_request, tvb, offset, 1, TRUE);
3680 proto_tree_add_item(ht_tree, hf_ieee80211_ff_ht_info_40_mhz_intolerant, tvb, offset, 1, TRUE);
3681 proto_tree_add_item(ht_tree, hf_ieee80211_ff_ht_info_sta_chan_width, tvb, offset, 1, TRUE);
3682 proto_tree_add_item(ht_tree, hf_ieee80211_ff_ht_info_reserved, tvb, offset, 1, TRUE);
3687 case FIELD_HT_ACTION_CODE:
3688 proto_tree_add_item(tree, hf_ieee80211_ff_ht_action, tvb, offset, 1, TRUE);
3692 case FIELD_PSMP_STA_INFO:
3695 proto_item *psmp_item;
3696 proto_tree *psmp_tree;
3698 psmp_item = proto_tree_add_item(tree, hf_ieee80211_ff_psmp_sta_info, tvb, offset, 8, TRUE);
3699 psmp_tree = proto_item_add_subtree(psmp_item, ett_ff_psmp_sta_info);
3701 proto_tree_add_item(psmp_item, hf_ieee80211_ff_psmp_sta_info_type, tvb, offset, 4, TRUE);
3703 switch (tvb_get_letohl(tvb, offset) & PSMP_STA_INFO_FLAG_TYPE)
3705 case PSMP_STA_INFO_BROADCAST:
3707 proto_tree_add_item(psmp_tree, hf_ieee80211_ff_psmp_sta_info_dtt_start_offset, tvb, offset, 4, TRUE);
3708 proto_tree_add_item(psmp_tree, hf_ieee80211_ff_psmp_sta_info_dtt_duration, tvb, offset, 4, TRUE);
3709 /* Missing 64 bit bitmask... */
3710 proto_tree_add_uint64(psmp_tree, hf_ieee80211_ff_psmp_sta_info_reserved_large, tvb, offset, 8, (tvb_get_letoh64 (tvb, offset) & G_GINT64_CONSTANT(0xFFFFFFFFFFE00000)) >> 21);
3714 case PSMP_STA_INFO_MULTICAST:
3716 proto_tree_add_item(psmp_tree, hf_ieee80211_ff_psmp_sta_info_dtt_start_offset, tvb, offset, 4, TRUE);
3717 proto_tree_add_item(psmp_tree, hf_ieee80211_ff_psmp_sta_info_dtt_duration, tvb, offset, 4, TRUE);
3718 /* Missing 64 bit bitmask... */
3719 proto_tree_add_uint64(psmp_tree, hf_ieee80211_ff_psmp_sta_info_psmp_multicast_id, tvb, offset, 6, (tvb_get_letoh64 (tvb, offset) & G_GINT64_CONSTANT(0xFFFFFFFFFFE00000)) >> 21);
3723 case PSMP_STA_INFO_INDIVIDUALLY_ADDRESSED:
3725 proto_tree_add_item(psmp_tree, hf_ieee80211_ff_psmp_sta_info_dtt_start_offset, tvb, offset, 4, TRUE);
3726 proto_tree_add_item(psmp_tree, hf_ieee80211_ff_psmp_sta_info_dtt_duration, tvb, offset, 4, TRUE);
3729 proto_tree_add_item(psmp_tree, hf_ieee80211_ff_psmp_sta_info_sta_id, tvb, offset, 4, TRUE);
3732 proto_tree_add_item(psmp_tree, hf_ieee80211_ff_psmp_sta_info_utt_start_offset, tvb, offset, 4, TRUE);
3733 proto_tree_add_item(psmp_tree, hf_ieee80211_ff_psmp_sta_info_utt_duration, tvb, offset, 4, TRUE);
3734 proto_tree_add_item(psmp_tree, hf_ieee80211_ff_psmp_sta_info_reserved_small, tvb, offset, 4, TRUE);
3742 case FIELD_SCHEDULE_INFO:
3744 proto_item *sched_item;
3745 proto_tree *sched_tree;
3747 sched_item = proto_tree_add_item(tree, hf_ieee80211_sched_info, tvb, offset, 2, TRUE);
3748 sched_tree = proto_item_add_subtree(sched_item, ett_sched_tree);
3750 proto_tree_add_item(sched_tree, hf_ieee80211_sched_info_agg, tvb, offset, 2, TRUE);
3751 if (tvb_get_letohs(tvb, offset) & 0x0001)
3753 proto_tree_add_item(sched_tree, hf_ieee80211_sched_info_tsid, tvb, offset, 2, TRUE);
3754 proto_tree_add_item(sched_tree, hf_ieee80211_sched_info_dir, tvb, offset, 2, TRUE);
3761 case FIELD_PA_ACTION_CODE:
3762 proto_tree_add_item(tree, hf_ieee80211_ff_public_action, tvb, offset, 1, FALSE);
3768 proto_item *action_item;
3769 proto_tree *action_tree;
3771 action_item = proto_tree_add_item(tree, hf_ieee80211_action, tvb, offset, 1, TRUE);
3772 action_tree = proto_item_add_subtree(action_item, ett_sched_tree);
3774 switch (tvb_get_guint8(tvb, offset) & 0x7f)
3776 case CAT_SPECTRUM_MGMT:
3778 switch (tvb_get_guint8(tvb, offset+1))
3780 case SM_ACTION_MEASUREMENT_REQUEST:
3781 case SM_ACTION_MEASUREMENT_REPORT:
3782 case SM_ACTION_TPC_REQUEST:
3783 case SM_ACTION_TPC_REPORT:
3784 add_fixed_field(action_tree, tvb, offset, FIELD_CATEGORY_CODE);
3785 add_fixed_field(action_tree, tvb, offset+1, FIELD_ACTION_CODE);
3786 add_fixed_field(action_tree, tvb, offset+2, FIELD_DIALOG_TOKEN);
3787 length += 3; /* Size of fixed fields */
3790 case SM_ACTION_CHAN_SWITCH_ANNC:
3791 case SM_ACTION_EXT_CHAN_SWITCH_ANNC:
3792 add_fixed_field(action_tree, tvb, offset, FIELD_CATEGORY_CODE);
3793 add_fixed_field(action_tree, tvb, offset+1, FIELD_ACTION_CODE);
3794 length += 2; /* Size of fixed fields */
3798 add_fixed_field(action_tree, tvb, offset, FIELD_CATEGORY_CODE);
3799 add_fixed_field(action_tree, tvb, offset+1, FIELD_ACTION_CODE);
3800 length += 2; /* Size of fixed fields */
3808 switch (tvb_get_guint8(tvb, offset+1))
3810 case SM_ACTION_ADDTS_REQUEST:
3811 add_fixed_field(action_tree, tvb, offset, FIELD_CATEGORY_CODE);
3812 add_fixed_field(action_tree, tvb, offset+1, FIELD_QOS_ACTION_CODE);
3813 add_fixed_field(action_tree, tvb, offset+2, FIELD_DIALOG_TOKEN);
3817 case SM_ACTION_ADDTS_RESPONSE:
3818 add_fixed_field(action_tree, tvb, offset, FIELD_CATEGORY_CODE);
3819 add_fixed_field(action_tree, tvb, offset+1, FIELD_QOS_ACTION_CODE);
3820 add_fixed_field(action_tree, tvb, offset+2, FIELD_DIALOG_TOKEN);
3821 add_fixed_field(action_tree, tvb, offset+3, FIELD_STATUS_CODE);
3825 case SM_ACTION_DELTS:
3826 add_fixed_field(action_tree, tvb, offset, FIELD_CATEGORY_CODE);
3827 add_fixed_field(action_tree, tvb, offset+1, FIELD_QOS_ACTION_CODE);
3828 add_fixed_field(action_tree, tvb, offset+2, FIELD_QOS_TS_INFO);
3829 add_fixed_field(action_tree, tvb, offset+5, FIELD_REASON_CODE);
3833 case SM_ACTION_QOS_SCHEDULE:
3834 add_fixed_field(action_tree, tvb, offset, FIELD_CATEGORY_CODE);
3835 add_fixed_field(action_tree, tvb, offset+1, FIELD_QOS_ACTION_CODE);
3840 add_fixed_field(action_tree, tvb, offset, FIELD_CATEGORY_CODE);
3841 length += 2; /* Size of fixed fields */
3849 switch (tvb_get_guint8(tvb, offset+1))
3851 case SM_ACTION_DLS_REQUEST:
3852 add_fixed_field(action_tree, tvb, offset, FIELD_CATEGORY_CODE);
3853 add_fixed_field(action_tree, tvb, offset+1, FIELD_DLS_ACTION_CODE);
3854 add_fixed_field(action_tree, tvb, offset+2, FIELD_DST_MAC_ADDR);
3855 add_fixed_field(action_tree, tvb, offset+8, FIELD_SRC_MAC_ADDR);
3856 add_fixed_field(action_tree, tvb, offset+14, FIELD_CAP_INFO);
3857 add_fixed_field(action_tree, tvb, offset+16, FIELD_DLS_TIMEOUT);
3861 case SM_ACTION_DLS_RESPONSE:
3862 add_fixed_field(action_tree, tvb, offset, FIELD_CATEGORY_CODE);
3863 add_fixed_field(action_tree, tvb, offset+1, FIELD_DLS_ACTION_CODE);
3864 add_fixed_field(action_tree, tvb, offset+2, FIELD_STATUS_CODE);
3865 add_fixed_field(action_tree, tvb, offset+4, FIELD_DST_MAC_ADDR);
3866 add_fixed_field(action_tree, tvb, offset+10, FIELD_SRC_MAC_ADDR);
3868 if (!hf_ieee80211_ff_status_code)
3869 add_fixed_field(action_tree, tvb, offset+16, FIELD_CAP_INFO);
3872 case SM_ACTION_DLS_TEARDOWN:
3873 add_fixed_field(action_tree, tvb, offset, FIELD_CATEGORY_CODE);
3874 add_fixed_field(action_tree, tvb, offset+1, FIELD_DLS_ACTION_CODE);
3875 add_fixed_field(action_tree, tvb, offset+2, FIELD_DST_MAC_ADDR);
3876 add_fixed_field(action_tree, tvb, offset+8, FIELD_SRC_MAC_ADDR);
3877 add_fixed_field(action_tree, tvb, offset+14, FIELD_REASON_CODE);
3882 add_fixed_field(action_tree, tvb, offset, FIELD_CATEGORY_CODE);
3883 length += 2; /* Size of fixed fields */
3891 switch (tvb_get_guint8(tvb, offset+1))
3893 case BA_ADD_BLOCK_ACK_REQUEST:
3895 guint start = offset;
3897 offset += add_fixed_field(action_tree, tvb, offset, FIELD_CATEGORY_CODE);
3898 offset += add_fixed_field(action_tree, tvb, offset, FIELD_BLOCK_ACK_ACTION_CODE);
3899 offset += add_fixed_field(action_tree, tvb, offset, FIELD_DIALOG_TOKEN);
3900 offset += add_fixed_field(action_tree, tvb, offset, FIELD_BLOCK_ACK_PARAM);
3901 offset += add_fixed_field(action_tree, tvb, offset, FIELD_BLOCK_ACK_TIMEOUT);
3902 offset += add_fixed_field(action_tree, tvb, offset, FIELD_BLOCK_ACK_SSC);
3903 length = offset - start; /* Size of fixed fields */
3906 case BA_ADD_BLOCK_ACK_RESPONSE:
3908 guint start = offset;
3910 offset += add_fixed_field(action_tree, tvb, offset, FIELD_CATEGORY_CODE);
3911 offset += add_fixed_field(action_tree, tvb, offset, FIELD_BLOCK_ACK_ACTION_CODE);
3912 offset += add_fixed_field(action_tree, tvb, offset, FIELD_DIALOG_TOKEN);
3913 offset += add_fixed_field(action_tree, tvb, offset, FIELD_STATUS_CODE);
3914 offset += add_fixed_field(action_tree, tvb, offset, FIELD_BLOCK_ACK_PARAM);
3915 offset += add_fixed_field(action_tree, tvb, offset, FIELD_BLOCK_ACK_TIMEOUT);
3916 length = offset - start; /* Size of fixed fields */
3919 case BA_DELETE_BLOCK_ACK:
3921 guint start = offset;
3923 offset += add_fixed_field(action_tree, tvb, offset, FIELD_CATEGORY_CODE);
3924 offset += add_fixed_field(action_tree, tvb, offset, FIELD_BLOCK_ACK_ACTION_CODE);
3925 offset += add_fixed_field(action_tree, tvb, offset, FIELD_DELBA_PARAM_SET);
3926 offset += add_fixed_field(action_tree, tvb, offset, FIELD_REASON_CODE);
3927 length = offset - start; /* Size of fixed fields */
3936 guint start = offset;
3938 const guint8 *tag_data_ptr;
3942 offset += add_fixed_field(action_tree, tvb, offset, FIELD_CATEGORY_CODE);
3943 code = tvb_get_guint8(tvb, offset);
3944 offset += add_fixed_field(action_tree, tvb, offset, FIELD_PA_ACTION_CODE);
3948 case PA_VENDOR_SPECIFIC:
3949 oui = tvb_get_ntoh24(tvb, offset);
3950 tag_data_ptr = tvb_get_ptr(tvb, offset, 3);
3951 proto_tree_add_bytes_format(action_tree, hf_ieee80211_tag_oui, tvb, offset, 3,
3952 tag_data_ptr, "Vendor: %s", get_manuf_name(tag_data_ptr));
3957 subtype = tvb_get_guint8(tvb, offset);
3958 proto_tree_add_text(action_tree, tvb, offset, 1,
3959 "Subtype %u", subtype);
3961 if (subtype == WFA_SUBTYPE_P2P)
3962 offset = dissect_wifi_p2p_public_action(action_tree, tvb, offset);
3965 /* Don't know how to handle this vendor */
3969 case PA_GAS_INITIAL_REQUEST:
3972 offset += add_fixed_field(action_tree, tvb, offset, FIELD_DIALOG_TOKEN);
3973 offset += dissect_advertisement_protocol(g_pinfo, action_tree, tvb, offset, &anqp);
3974 offset += dissect_gas_initial_request(action_tree, tvb, offset, anqp);
3977 case PA_GAS_INITIAL_RESPONSE:
3980 offset += add_fixed_field(action_tree, tvb, offset, FIELD_DIALOG_TOKEN);
3981 offset += add_fixed_field(action_tree, tvb, offset, FIELD_STATUS_CODE);
3982 offset += add_fixed_field(action_tree, tvb, offset, FIELD_GAS_COMEBACK_DELAY);
3983 offset += dissect_advertisement_protocol(g_pinfo, action_tree, tvb, offset, &anqp);
3984 offset += dissect_gas_initial_response(action_tree, tvb, offset, anqp);
3987 case PA_GAS_COMEBACK_REQUEST:
3988 offset += add_fixed_field(action_tree, tvb, offset, FIELD_DIALOG_TOKEN);
3990 case PA_GAS_COMEBACK_RESPONSE:
3994 offset += add_fixed_field(action_tree, tvb, offset, FIELD_DIALOG_TOKEN);
3995 offset += add_fixed_field(action_tree, tvb, offset, FIELD_STATUS_CODE);
3996 frag = tvb_get_guint8(tvb, offset) & 0x7f;
3997 offset += add_fixed_field(action_tree, tvb, offset, FIELD_GAS_FRAGMENT_ID);
3998 offset += add_fixed_field(action_tree, tvb, offset, FIELD_GAS_COMEBACK_DELAY);
3999 offset += dissect_advertisement_protocol(g_pinfo, action_tree, tvb, offset, &anqp);
4000 offset += dissect_gas_comeback_response(action_tree, tvb, offset, anqp, frag);
4003 case PA_TDLS_DISCOVERY_RESPONSE:
4004 col_set_str(g_pinfo->cinfo, COL_PROTOCOL, "TDLS");
4005 col_set_str(g_pinfo->cinfo, COL_INFO, "TDLS Discovery Response");
4006 offset += add_fixed_field(action_tree, tvb, offset, FIELD_DIALOG_TOKEN);
4007 offset += add_fixed_field(action_tree, tvb, offset, FIELD_CAP_INFO);
4010 length += offset - start; /* Size of fixed fields */
4014 case CAT_FAST_BSS_TRANSITION:
4016 guint start = offset;
4018 offset += add_fixed_field(action_tree, tvb, offset, FIELD_CATEGORY_CODE);
4019 code = tvb_get_guint8(tvb, offset);
4020 offset += add_fixed_field(action_tree, tvb, offset, FIELD_FT_ACTION_CODE);
4023 case FT_ACTION_REQUEST:
4024 offset += add_fixed_field(action_tree, tvb, offset, FIELD_STA_ADDRESS);
4025 offset += add_fixed_field(action_tree, tvb, offset, FIELD_TARGET_AP_ADDRESS);
4026 /* Followed by FT Request frame body (IEs) */
4028 case FT_ACTION_RESPONSE:
4029 offset += add_fixed_field(action_tree, tvb, offset, FIELD_STA_ADDRESS);
4030 offset += add_fixed_field(action_tree, tvb, offset, FIELD_TARGET_AP_ADDRESS);
4031 offset += add_fixed_field(action_tree, tvb, offset, FIELD_STATUS_CODE);
4032 /* Followed by FT Response frame body (IEs) */
4034 case FT_ACTION_CONFIRM:
4035 offset += add_fixed_field(action_tree, tvb, offset, FIELD_STA_ADDRESS);
4036 offset += add_fixed_field(action_tree, tvb, offset, FIELD_TARGET_AP_ADDRESS);
4037 /* Followed by FT Confirm frame body (IEs) */
4040 offset += add_fixed_field(action_tree, tvb, offset, FIELD_STA_ADDRESS);
4041 offset += add_fixed_field(action_tree, tvb, offset, FIELD_TARGET_AP_ADDRESS);
4042 offset += add_fixed_field(action_tree, tvb, offset, FIELD_STATUS_CODE);
4043 /* Followed by FT Ack frame body (IEs) */
4047 length += offset - start; /* Size of fixed fields */
4053 guint start = offset;
4055 offset += add_fixed_field(action_tree, tvb, offset, FIELD_CATEGORY_CODE);
4056 code = tvb_get_guint8(tvb, offset);
4057 offset += add_fixed_field(action_tree, tvb, offset, FIELD_SA_QUERY_ACTION_CODE);
4060 case SA_QUERY_REQUEST:
4061 offset += add_fixed_field(action_tree, tvb, offset, FIELD_TRANSACTION_ID);
4063 case SA_QUERY_RESPONSE:
4064 offset += add_fixed_field(action_tree, tvb, offset, FIELD_TRANSACTION_ID);
4068 length += offset - start; /* Size of fixed fields */
4072 #ifdef MESH_OVERRIDES
4073 case CAT_MESH_PEER_LINK:
4074 /* Non-IE fixed fields here. edit TAG_MESH_* for IE fields */
4075 switch (tvb_get_guint8(tvb, 1))
4078 case MESH_PL_PEER_LINK_OPEN:
4080 offset += add_fixed_field (action_tree, tvb, offset, FIELD_CATEGORY_CODE);
4081 offset += add_fixed_field (action_tree, tvb, offset, FIELD_MESH_MGT_ACTION_PL_CODE);
4082 offset += add_fixed_field (action_tree, tvb, offset, FIELD_CAP_INFO);
4086 case MESH_PL_PEER_LINK_CONFIRM:
4088 offset += add_fixed_field (action_tree, tvb, offset, FIELD_CATEGORY_CODE);
4089 offset += add_fixed_field (action_tree, tvb, offset, FIELD_MESH_MGT_ACTION_PL_CODE);
4090 offset += add_fixed_field (action_tree, tvb, offset, FIELD_CAP_INFO);
4091 offset += add_fixed_field (action_tree, tvb, offset, FIELD_STATUS_CODE);
4092 offset += add_fixed_field (action_tree, tvb, offset, FIELD_ASSOC_ID);
4096 case MESH_PL_PEER_LINK_CLOSE:
4098 offset += add_fixed_field (action_tree, tvb, offset, FIELD_CATEGORY_CODE);
4099 offset += add_fixed_field (action_tree, tvb, offset, FIELD_MESH_MGT_ACTION_PL_CODE);
4100 offset += add_fixed_field (action_tree, tvb, offset, FIELD_REASON_CODE);
4101 length = offset; /* Size of fixed fields */
4106 offset += add_fixed_field (action_tree, tvb, offset, FIELD_CATEGORY_CODE);
4107 offset += add_fixed_field (action_tree, tvb, offset, FIELD_MESH_MGT_ACTION_PL_CODE);
4108 length = offset; /* Size of fixed fields */
4113 case CAT_MESH_PATH_SELECTION:
4114 switch (tvb_get_guint8(tvb, 1))
4117 /* defined values */
4118 case MESH_PS_PATH_REQUEST:
4120 offset += add_fixed_field (action_tree, tvb, offset, FIELD_CATEGORY_CODE);
4121 offset += add_fixed_field (action_tree, tvb, offset, FIELD_MESH_MGT_ACTION_PS_CODE);
4125 case MESH_PS_PATH_REPLY:
4127 offset += add_fixed_field (action_tree, tvb, offset, FIELD_CATEGORY_CODE);
4128 offset += add_fixed_field (action_tree, tvb, offset, FIELD_MESH_MGT_ACTION_PS_CODE);
4132 case MESH_PS_PATH_ERROR:
4134 offset += add_fixed_field (action_tree, tvb, offset, FIELD_CATEGORY_CODE);
4135 offset += add_fixed_field (action_tree, tvb, offset, FIELD_MESH_MGT_ACTION_PS_CODE);
4139 case MESH_PS_ROOT_ANNOUNCEMENT:
4141 offset += add_fixed_field (action_tree, tvb, 0, FIELD_CATEGORY_CODE);
4142 offset += add_fixed_field (action_tree, tvb, 1, FIELD_MESH_MGT_ACTION_PS_CODE);
4146 /* undefined values */
4149 offset += add_fixed_field (action_tree, tvb, 0, FIELD_CATEGORY_CODE);
4150 offset += add_fixed_field (action_tree, tvb, 1, FIELD_MESH_MGT_ACTION_PS_CODE);
4155 #endif /* MESH_OVERRIDES */
4161 guint start = offset;
4163 offset += add_fixed_field(action_tree, tvb, offset, FIELD_CATEGORY_CODE);
4164 code = tvb_get_guint8(tvb, offset);
4165 offset += add_fixed_field(action_tree, tvb, offset, FIELD_TDLS_ACTION_CODE);
4167 case TDLS_SETUP_REQUEST:
4168 offset += add_fixed_field(action_tree, tvb, offset, FIELD_DIALOG_TOKEN);
4169 offset += add_fixed_field(action_tree, tvb, offset, FIELD_CAP_INFO);
4171 case TDLS_SETUP_RESPONSE:
4172 status = tvb_get_letohs(tvb, offset);
4173 offset += add_fixed_field(action_tree, tvb, offset, FIELD_STATUS_CODE);
4174 offset += add_fixed_field(action_tree, tvb, offset, FIELD_DIALOG_TOKEN);
4175 if (tvb_reported_length_remaining(tvb, offset) < 2) {
4177 expert_add_info_format(g_pinfo, action_item, PI_MALFORMED, PI_ERROR, "TDLS Setup Response (success) does not include mandatory fields");
4181 offset += add_fixed_field(action_tree, tvb, offset, FIELD_CAP_INFO);
4183 case TDLS_SETUP_CONFIRM:
4184 status = tvb_get_letohs(tvb, offset);
4185 offset += add_fixed_field(action_tree, tvb, offset, FIELD_STATUS_CODE);
4186 if (tvb_reported_length_remaining(tvb, offset) < 1) {
4188 expert_add_info_format(g_pinfo, action_item, PI_MALFORMED, PI_ERROR, "TDLS Setup Confirm (success) does not include mandatory fields");
4192 offset += add_fixed_field(action_tree, tvb, offset, FIELD_DIALOG_TOKEN);
4195 offset += add_fixed_field(action_tree, tvb, offset, FIELD_REASON_CODE);
4197 case TDLS_PEER_TRAFFIC_INDICATION:
4198 offset += add_fixed_field(action_tree, tvb, offset, FIELD_DIALOG_TOKEN);
4200 case TDLS_CHANNEL_SWITCH_REQUEST:
4201 offset += add_fixed_field(action_tree, tvb, offset, FIELD_TARGET_CHANNEL);
4202 offset += add_fixed_field(action_tree, tvb, offset, FIELD_REGULATORY_CLASS);
4204 case TDLS_CHANNEL_SWITCH_RESPONSE:
4205 offset += add_fixed_field(action_tree, tvb, offset, FIELD_STATUS_CODE);
4207 case TDLS_PEER_PSM_REQUEST:
4208 offset += add_fixed_field(action_tree, tvb, offset, FIELD_DIALOG_TOKEN);
4210 case TDLS_PEER_PSM_RESPONSE:
4211 offset += add_fixed_field(action_tree, tvb, offset, FIELD_DIALOG_TOKEN);
4212 offset += add_fixed_field(action_tree, tvb, offset, FIELD_STATUS_CODE);
4214 case TDLS_PEER_TRAFFIC_RESPONSE:
4215 offset += add_fixed_field(action_tree, tvb, offset, FIELD_DIALOG_TOKEN);
4217 case TDLS_DISCOVERY_REQUEST:
4218 offset += add_fixed_field(action_tree, tvb, offset, FIELD_DIALOG_TOKEN);
4222 length = offset - start; /* Size of fixed fields */
4226 case CAT_MGMT_NOTIFICATION: /* Management notification frame */
4228 guint start = offset;
4230 offset += add_fixed_field(action_tree, tvb, offset, FIELD_CATEGORY_CODE);
4231 offset += add_fixed_field(action_tree, tvb, offset, FIELD_WME_ACTION_CODE);
4232 offset += add_fixed_field(action_tree, tvb, offset, FIELD_DIALOG_TOKEN);
4233 offset += add_fixed_field(action_tree, tvb, offset, FIELD_WME_STATUS_CODE);
4234 length = offset - start; /* Size of fixed fields */
4238 case CAT_VENDOR_SPECIFIC: /* Vendor Specific Category */
4240 guint start = offset;
4242 const guint8 *tag_data_ptr;
4245 offset += add_fixed_field(action_tree, tvb, offset, FIELD_CATEGORY_CODE);
4246 oui = tvb_get_ntoh24(tvb, offset);
4247 tag_data_ptr = tvb_get_ptr(tvb, offset, 3);
4248 proto_tree_add_bytes_format (action_tree, hf_ieee80211_tag_oui, tvb, offset, 3,
4249 tag_data_ptr, "Vendor: %s", get_manuf_name(tag_data_ptr));
4254 offset = dissect_vendor_action_marvell(action_tree, tvb, offset);
4257 subtype = tvb_get_guint8(tvb, offset);
4258 proto_tree_add_text(action_tree, tvb, offset, 1,
4259 "Subtype %u", subtype);
4261 if (subtype == WFA_SUBTYPE_P2P)
4262 offset = dissect_wifi_p2p_action(action_tree, tvb,
4266 /* Don't know how to handle this vendor */
4269 length = offset - start; /* Size of fixed fields */
4271 }/* Case vendor specific */
4278 offset += add_fixed_field(action_tree, tvb, offset, FIELD_CATEGORY_CODE);
4279 offset += add_fixed_field(action_tree, tvb, offset, FIELD_HT_ACTION_CODE);
4280 switch (tvb_get_guint8(tvb, offset-1))
4282 case HT_ACTION_NOTIFY_CHAN_WIDTH:
4283 offset += add_fixed_field(action_tree, tvb, offset, FIELD_CHANNEL_WIDTH);
4286 case HT_ACTION_SM_PWR_SAVE:
4287 offset += add_fixed_field(action_tree, tvb, offset, FIELD_SM_PWR_CNTRL);
4290 case HT_ACTION_PSMP_ACTION:
4294 n_sta = tvb_get_guint8(tvb, offset);
4295 offset += add_fixed_field(action_tree, tvb, offset, FIELD_PSMP_PARAM_SET);
4297 for (i=0; i< (n_sta & 0x0F); i++)
4298 offset += add_fixed_field(action_tree, tvb, offset, FIELD_PSMP_STA_INFO);
4303 case HT_ACTION_SET_PCO_PHASE:
4304 offset += add_fixed_field(action_tree, tvb, offset, FIELD_PCO_PHASE_CNTRL);
4307 case HT_ACTION_MIMO_CSI:
4309 mimo_control_t mimo_cntrl;
4310 mimo_cntrl = get_mimo_control(tvb, offset);
4311 offset += add_fixed_field(action_tree, tvb, offset, FIELD_MIMO_CNTRL);
4312 offset += add_mimo_csi_matrices_report(action_tree, tvb, offset, mimo_cntrl);
4316 case HT_ACTION_MIMO_BEAMFORMING:
4318 mimo_control_t mimo_cntrl;
4319 mimo_cntrl = get_mimo_control(tvb, offset);
4320 offset += add_fixed_field(action_tree, tvb, offset, FIELD_MIMO_CNTRL);
4321 offset += add_mimo_beamforming_feedback_report(action_tree, tvb, offset, mimo_cntrl);
4325 case HT_ACTION_MIMO_COMPRESSED_BEAMFORMING:
4327 mimo_control_t mimo_cntrl;
4328 mimo_cntrl = get_mimo_control(tvb, offset);
4329 offset += add_fixed_field(action_tree, tvb, offset, FIELD_MIMO_CNTRL);
4330 offset += add_mimo_compressed_beamforming_feedback_report(action_tree, tvb, offset, mimo_cntrl);
4334 case HT_ACTION_ANT_SEL_FEEDBACK:
4335 offset += add_fixed_field(action_tree, tvb, offset, FIELD_ANT_SELECTION);
4338 case HT_ACTION_HT_INFO_EXCHANGE:
4339 offset += add_fixed_field(action_tree, tvb, offset, FIELD_HT_INFORMATION);
4346 length = offset - start;
4351 add_fixed_field(action_tree, tvb, offset, FIELD_CATEGORY_CODE);
4352 length += 1; /* Size of fixed fields */
4358 case FIELD_FT_ACTION_CODE:
4359 proto_tree_add_item(tree, hf_ieee80211_ff_ft_action_code, tvb, offset, 1, FALSE);
4363 case FIELD_STA_ADDRESS:
4364 proto_tree_add_item(tree, hf_ieee80211_ff_sta_address, tvb, offset, 6, FALSE);
4368 case FIELD_TARGET_AP_ADDRESS:
4369 proto_tree_add_item(tree, hf_ieee80211_ff_target_ap_address, tvb, offset, 6, FALSE);
4373 case FIELD_GAS_COMEBACK_DELAY:
4374 proto_tree_add_item(tree, hf_ieee80211_ff_gas_comeback_delay, tvb, offset, 2, TRUE);
4378 case FIELD_GAS_FRAGMENT_ID:
4379 proto_tree_add_item(tree, hf_ieee80211_ff_gas_fragment_id, tvb, offset, 1, FALSE);
4380 proto_tree_add_item(tree, hf_ieee80211_ff_more_gas_fragments, tvb, offset, 1, FALSE);
4384 case FIELD_SA_QUERY_ACTION_CODE:
4385 proto_tree_add_item(tree, hf_ieee80211_ff_sa_query_action_code, tvb, offset, 1, FALSE);
4389 case FIELD_TRANSACTION_ID:
4390 proto_tree_add_item(tree, hf_ieee80211_ff_transaction_id, tvb, offset, 2, TRUE);
4394 case FIELD_TDLS_ACTION_CODE:
4397 code = tvb_get_guint8(tvb, offset);
4398 col_set_str(g_pinfo->cinfo, COL_INFO, val_to_str_const(code, tdls_action_codes, "Unknown TDLS Action"));
4399 proto_tree_add_item(tree, hf_ieee80211_ff_tdls_action_code, tvb, offset, 1, FALSE);
4404 case FIELD_TARGET_CHANNEL:
4405 proto_tree_add_item(tree, hf_ieee80211_ff_target_channel, tvb, offset, 1, FALSE);
4409 case FIELD_REGULATORY_CLASS:
4410 proto_tree_add_item(tree, hf_ieee80211_ff_regulatory_class, tvb, offset, 1, FALSE);
4417 static const value_string wpa_cipher_vals[] =
4420 {1, "WEP (40-bit)"},
4424 {5, "WEP (104-bit)"},
4426 {7, "Group addressed traffic not allowed"},
4430 static const value_string ieee80211_rsn_cipher_vals[] =
4433 {1, "WEP (40-bit)"},
4437 {5, "WEP (104-bit)"},
4439 {7, "Group addressed traffic not allowed"},
4443 static const value_string ieee80211_rsn_keymgmt_vals[] =
4448 {3, "FT over IEEE 802.1X"},
4449 {4, "FT using PSK"},
4450 {5, "WPA (SHA256)"},
4451 {6, "PSK (SHA256)"},
4452 {7, "TDLS / TPK Handshake"},
4457 oui_base_custom(gchar *result, guint32 oui)
4460 const gchar *manuf_name;
4461 p_oui[0] = oui >> 16 & 0xFF;
4462 p_oui[1] = oui >> 8 & 0xFF;
4463 p_oui[2] = oui & 0xFF;
4465 /* Attempt an OUI lookup. */
4466 manuf_name = get_manuf_name_if_known(p_oui);
4467 if (manuf_name == NULL) {
4468 /* Could not find an OUI. */
4469 g_snprintf(result, ITEM_LABEL_LENGTH, "%.2x-%.2x-%.2x", p_oui[0], p_oui[1], p_oui[2] );
4472 /* Found an address string. */
4473 g_snprintf(result, ITEM_LABEL_LENGTH, "%.2x-%.2x-%.2x (%s)", p_oui[0], p_oui[1], p_oui[2], manuf_name );
4477 rsn_gcs_base_custom(gchar *result, guint32 gcs)
4479 gchar *oui_result=NULL;
4480 oui_result = ep_alloc(SHORT_STR);
4481 oui_result[0] = '\0';
4482 oui_base_custom(oui_result, gcs >>8);
4483 g_snprintf(result, ITEM_LABEL_LENGTH, "%s %s", oui_result, val_to_str( gcs & 0xFF, ieee80211_rsn_cipher_vals, "Unknown %d") );
4487 rsn_pcs_base_custom(gchar *result, guint32 pcs)
4489 gchar *oui_result=NULL;
4490 oui_result = ep_alloc(SHORT_STR);
4491 oui_result[0] = '\0';
4492 oui_base_custom(oui_result, pcs >>8);
4493 g_snprintf(result, ITEM_LABEL_LENGTH, "%s %s", oui_result, val_to_str( pcs & 0xFF, ieee80211_rsn_cipher_vals, "Unknown %d") );
4497 rsn_akms_base_custom(gchar *result, guint32 akms)
4499 gchar *oui_result=NULL;
4500 oui_result = ep_alloc(SHORT_STR);
4501 oui_result[0] = '\0';
4502 oui_base_custom(oui_result, akms >>8);
4503 g_snprintf(result, ITEM_LABEL_LENGTH, "%s %s", oui_result, val_to_str( akms & 0xFF, ieee80211_rsn_keymgmt_vals, "Unknown %d") );
4507 rsn_pcs_return(guint32 pcs)
4510 result = ep_alloc(SHORT_STR);
4512 rsn_pcs_base_custom(result, pcs);
4518 rsn_akms_return(guint32 akms)
4521 result = ep_alloc(SHORT_STR);
4523 rsn_akms_base_custom(result, akms);
4529 rsn_gmcs_base_custom(gchar *result, guint32 gmcs)
4531 gchar *oui_result=NULL;
4532 oui_result = ep_alloc(SHORT_STR);
4533 oui_result[0] = '\0';
4534 oui_base_custom(oui_result, gmcs >>8);
4535 g_snprintf(result, ITEM_LABEL_LENGTH, "%s %s", oui_result, val_to_str( gmcs & 0xFF, ieee80211_rsn_cipher_vals, "Unknown %d") );
4538 static const value_string wpa_keymgmt_vals[] =
4543 {3, "FT over IEEE 802.1X"},
4544 {4, "FT using PSK"},
4545 {5, "WPA (SHA256)"},
4546 {6, "PSK (SHA256)"},
4547 {7, "TDLS / TPK Handshake"},
4551 static const value_string ft_subelem_id_vals[] =
4554 {1, "PMK-R1 key holder identifier (R1KH-ID)"},
4555 {2, "GTK subelement"},
4556 {3, "PMK-R0 key holder identifier (R0KH-ID)"},
4561 static const value_string anqp_info_id_vals[] =
4563 {256, "ANQP Query list"},
4564 {257, "ANQP Capability list"},
4565 {258, "Venue Name information"},
4566 {259, "Emergency Call Number information"},
4567 {260, "Network Authentication Type information"},
4568 {261, "Roaming Consortium list"},
4569 {262, "IP Address Type Availability information"},
4570 {263, "NAI Realm list"},
4571 {264, "3GPP Cellular Network information"},
4572 {265, "AP Geospatial Location"},
4573 {266, "AP Civic Location"},
4574 {267, "AP Location Public Identifier URI"},
4575 {268, "Domain Name list"},
4576 {269, "Emergency Alert Identifier URI"},
4577 {270, "TDLS Discovery"},
4578 {56797, "ANQP vendor-specific list"},
4584 dissect_vendor_ie_wpawme(proto_item * item, proto_tree * tree, tvbuff_t * tag_tvb)
4587 gint tag_len = tvb_length(tag_tvb);
4588 gchar out_buff[SHORT_STR];
4589 guint i, byte1, byte2;
4591 /* Wi-Fi Protected Access (WPA) Information Element */
4592 if (tag_off + 6 <= tag_len && !tvb_memeql(tag_tvb, tag_off, WPA_OUI"\x01", 4)) {
4593 g_snprintf(out_buff, SHORT_STR, "WPA IE, type %u, version %u",
4594 tvb_get_guint8(tag_tvb, tag_off + 3), tvb_get_letohs(tag_tvb, tag_off + 4));
4595 proto_tree_add_string(tree, hf_ieee80211_tag_interpretation, tag_tvb, tag_off, 6, out_buff);
4597 if (tag_off + 4 <= tag_len) {
4598 /* multicast cipher suite */
4599 if (!tvb_memeql(tag_tvb, tag_off, WPA_OUI, 3)) {
4600 g_snprintf(out_buff, SHORT_STR, "Multicast cipher suite: %s",
4601 val_to_str(tvb_get_guint8(tag_tvb, tag_off + 3), wpa_cipher_vals,
4603 proto_tree_add_string(tree, hf_ieee80211_tag_interpretation, tag_tvb, tag_off, 4,
4606 /* unicast cipher suites */
4607 if (tag_off + 2 <= tag_len) {
4608 g_snprintf(out_buff, SHORT_STR,
4609 "# of unicast cipher suites: %u", tvb_get_letohs(tag_tvb, tag_off));
4610 proto_tree_add_string(tree, hf_ieee80211_tag_interpretation, tag_tvb, tag_off, 2,
4614 while (tag_off + 4 <= tag_len) {
4615 if (!tvb_memeql(tag_tvb, tag_off, WPA_OUI, 3)) {
4616 g_snprintf(out_buff, SHORT_STR,
4617 "Unicast cipher suite %u: %s", i,
4618 val_to_str(tvb_get_guint8(tag_tvb, tag_off + 3),
4619 wpa_cipher_vals, "UNKNOWN"));
4620 proto_tree_add_string(tree, hf_ieee80211_tag_interpretation, tag_tvb, tag_off, 4,
4628 /* authenticated key management suites */
4629 if (tag_off + 2 <= tag_len) {
4630 g_snprintf(out_buff, SHORT_STR,
4631 "# of auth key management suites: %u", tvb_get_letohs(tag_tvb, tag_off));
4632 proto_tree_add_string(tree, hf_ieee80211_tag_interpretation, tag_tvb, tag_off, 2,
4636 while (tag_off + 4 <= tag_len) {
4637 if (!tvb_memeql(tag_tvb, tag_off, WPA_OUI, 3)) {
4638 g_snprintf(out_buff, SHORT_STR,
4639 "auth key management suite %u: %s", i,
4640 val_to_str(tvb_get_guint8(tag_tvb, tag_off + 3),
4641 wpa_keymgmt_vals, "UNKNOWN"));
4642 proto_tree_add_string(tree, hf_ieee80211_tag_interpretation, tag_tvb, tag_off, 4,
4654 if (tag_off < tag_len)
4655 proto_tree_add_string(tree, hf_ieee80211_tag_interpretation, tag_tvb,
4656 tag_off, tag_len - tag_off, "Not interpreted");
4657 proto_item_append_text(item, ": WPA");
4658 } else if (tag_off + 7 <= tag_len && !tvb_memeql(tag_tvb, tag_off, WME_OUI"\x02\x00", 5)) {
4659 /* Wireless Multimedia Enhancements (WME) Information Element */
4660 g_snprintf(out_buff, SHORT_STR,
4661 "WME IE: type %u, subtype %u, version %u, parameter set %u",
4662 tvb_get_guint8(tag_tvb, tag_off+3), tvb_get_guint8(tag_tvb, tag_off+4),
4663 tvb_get_guint8(tag_tvb, tag_off+5), tvb_get_guint8(tag_tvb, tag_off+6));
4664 proto_tree_add_string(tree, hf_ieee80211_tag_interpretation, tag_tvb, tag_off, 7,
4666 proto_item_append_text(item, ": WME");
4667 } else if (tag_off + 24 <= tag_len && !tvb_memeql(tag_tvb, tag_off, WME_OUI"\x02\x01", 5)) {
4668 /* Wireless Multimedia Enhancements (WME) Parameter Element */
4669 g_snprintf(out_buff, SHORT_STR,
4670 "WME PE: type %u, subtype %u, version %u, parameter set %u",
4671 tvb_get_guint8(tag_tvb, tag_off+3), tvb_get_guint8(tag_tvb, tag_off+4),
4672 tvb_get_guint8(tag_tvb, tag_off+5), tvb_get_guint8(tag_tvb, tag_off+6));
4673 proto_tree_add_string(tree, hf_ieee80211_tag_interpretation, tag_tvb, tag_off, 7,
4676 for (i = 0; i < 4; i++) {
4677 byte1 = tvb_get_guint8(tag_tvb, tag_off);
4678 byte2 = tvb_get_guint8(tag_tvb, tag_off + 1);
4679 g_snprintf(out_buff, SHORT_STR,
4680 "WME AC Parameters: ACI %u (%s), Admission Control %sMandatory, AIFSN %u, ECWmin %u, ECWmax %u, TXOP %u",
4681 (byte1 & 0x60) >> 5, match_strval((byte1 & 0x60) >> 5, wme_acs),
4682 (byte1 & 0x10) ? "" : "not ", byte1 & 0x0f,
4683 byte2 & 0x0f, (byte2 & 0xf0) >> 4,
4684 tvb_get_letohs(tag_tvb, tag_off + 2));
4685 proto_tree_add_string(tree, hf_ieee80211_tag_interpretation, tag_tvb, tag_off, 4,
4689 proto_item_append_text(item, ": WME");
4690 } else if (tag_off + 56 <= tag_len && !tvb_memeql(tag_tvb, tag_off, WME_OUI"\x02\x02", 5)) {
4691 /* Wireless Multimedia Enhancements (WME) TSPEC Element */
4692 guint16 ts_info, msdu_size, surplus_bandwidth;
4693 const char *direction[] = { "Uplink", "Downlink", "Reserved", "Bi-directional" };
4694 const value_string fields[] = {
4695 {13, "Minimum Service Interval"},
4696 {17, "Maximum Service Interval"},
4697 {21, "Inactivity Interval"},
4698 {25, "Suspension Interval"},
4699 {29, "Service Start Time"},
4700 {33, "Minimum Data Rate"},
4701 {37, "Mean Data Rate"},
4702 {41, "Peak Data Rate"},
4703 {45, "Maximum Burst Size"},
4704 {49, "Delay Bound"},
4705 {53, "Minimum PHY Rate"},
4710 g_snprintf(out_buff, SHORT_STR,
4711 "WME TSPEC: type %u, subtype %u, version %u",
4712 tvb_get_guint8(tag_tvb, tag_off+3), tvb_get_guint8(tag_tvb, tag_off+4),
4713 tvb_get_guint8(tag_tvb, tag_off+5));
4714 proto_tree_add_string(tree, hf_ieee80211_tag_interpretation, tag_tvb, tag_off, 6,
4718 ts_info = tvb_get_letohs(tag_tvb, tag_off);
4719 byte1 = (ts_info >> 11) & 0x7;
4720 g_snprintf(out_buff, SHORT_STR,
4721 "WME TS Info: Priority %u (%s) (%s), Contention-based access %sset, %s",
4722 byte1, qos_tags[byte1], qos_acs[byte1],
4723 (ts_info & 0x0080) ? "" : "not ",
4724 direction[(ts_info >> 5) & 0x3]);
4725 proto_tree_add_string(tree, hf_ieee80211_tag_interpretation, tag_tvb, tag_off, 3,
4729 msdu_size = tvb_get_letohs(tag_tvb, tag_off);
4730 g_snprintf(out_buff, SHORT_STR,
4731 "WME TSPEC: %s MSDU Size %u",
4732 (msdu_size & 0x8000) ? "Fixed" : "Nominal", msdu_size & 0x7fff);
4733 proto_tree_add_string(tree, hf_ieee80211_tag_interpretation, tag_tvb, tag_off, 2,
4737 g_snprintf(out_buff, SHORT_STR,
4738 "WME TSPEC: Maximum MSDU Size %u", tvb_get_letohs(tag_tvb, tag_off));
4739 proto_tree_add_string(tree, hf_ieee80211_tag_interpretation, tag_tvb, tag_off, 2,
4743 while ((field = val_to_str(tag_off, fields, "Unknown"))) {
4744 g_snprintf(out_buff, SHORT_STR,
4745 "WME TSPEC: %s %u", field, tvb_get_letohl(tag_tvb, tag_off));
4746 proto_tree_add_string(tree, hf_ieee80211_tag_interpretation, tag_tvb, tag_off, 4,
4753 surplus_bandwidth = tvb_get_letohs(tag_tvb, tag_off);
4754 g_snprintf(out_buff, SHORT_STR,
4755 "WME TSPEC: Surplus Bandwidth Allowance Factor %u.%u",
4756 (surplus_bandwidth >> 13) & 0x7, (surplus_bandwidth & 0x1fff));
4757 proto_tree_add_string(tree, hf_ieee80211_tag_interpretation, tag_tvb, tag_off, 2,
4761 g_snprintf(out_buff, SHORT_STR,
4762 "WME TSPEC: Medium Time %u", tvb_get_letohs(tag_tvb, tag_off));
4763 proto_tree_add_string(tree, hf_ieee80211_tag_interpretation, tag_tvb, tag_off, 2,
4766 proto_item_append_text(item, ": WME");
4767 } else if (tag_off + 6 <= tag_len && !tvb_memeql(tag_tvb, tag_off, WPA_OUI"\x04", 4)) {
4768 dissect_wps_tlvs(item, tag_tvb, tag_off+4, tag_len-4, NULL);
4769 proto_item_append_text(item, ": WPS");
4774 dissect_vendor_ie_wfa(packet_info *pinfo, proto_item *item, tvbuff_t *tag_tvb)
4776 gint tag_len = tvb_length(tag_tvb);
4781 switch (tvb_get_guint8(tag_tvb, 3)) {
4782 case WFA_SUBTYPE_P2P:
4783 dissect_wifi_p2p_ie(pinfo, item, tag_tvb, 4, tag_len - 4);
4784 proto_item_append_text(item, ": P2P");
4790 dissect_vendor_ie_rsn(proto_item * item, proto_tree * tree, tvbuff_t * tag_tvb)
4793 guint tag_len = tvb_length(tag_tvb);
4794 guint pmkid_len = tag_len - 4;
4795 char out_buff[SHORT_STR], valid_str[SHORT_STR] = "";
4797 if (tag_len >= 4 && !tvb_memeql(tag_tvb, tag_off, RSN_OUI"\x04", 4)) {
4798 /* IEEE 802.11i / Key Data Encapsulation / Data Type=4 - PMKID.
4799 * This is only used within EAPOL-Key frame Key Data. */
4800 if (pmkid_len != PMKID_LEN) {
4801 g_snprintf(valid_str, SHORT_STR,
4802 "(invalid PMKID len=%d, expected 16) ", pmkid_len);
4804 g_snprintf(out_buff, SHORT_STR, "RSN PMKID: %s%s", valid_str,
4805 tvb_bytes_to_str(tag_tvb, 4, pmkid_len));
4806 proto_tree_add_string(tree, hf_ieee80211_tag_interpretation, tag_tvb, 0,
4809 proto_item_append_text(item, ": RSN");
4814 } marvell_ie_type_t;
4817 dissect_vendor_ie_marvell(proto_item * item _U_, proto_tree * ietree,
4818 tvbuff_t * tvb, int offset, guint32 tag_len)
4822 type = tvb_get_guint8(tvb, offset);
4823 proto_tree_add_item (ietree, hf_ieee80211_marvell_ie_type, tvb, offset, 1, TRUE);
4827 case MARVELL_IE_MESH:
4828 proto_tree_add_item (ietree, hf_ieee80211_marvell_ie_mesh_subtype, tvb,
4829 offset++, 1, TRUE );
4830 proto_tree_add_item (ietree, hf_ieee80211_marvell_ie_mesh_version, tvb,
4831 offset++, 1, TRUE );
4832 proto_tree_add_item (ietree, hf_ieee80211_marvell_ie_mesh_active_proto_id, tvb,
4833 offset++, 1, TRUE );
4834 proto_tree_add_item (ietree, hf_ieee80211_marvell_ie_mesh_active_metric_id, tvb,
4835 offset++, 1, TRUE );
4836 proto_tree_add_item (ietree, hf_ieee80211_marvell_ie_mesh_cap, tvb,
4837 offset++, 1, TRUE );
4841 proto_tree_add_item(ietree, hf_ieee80211_marvell_ie_data, tvb, offset,
4842 tag_len - 1, FALSE);
4848 ATHEROS_IE_ADVCAP = 1,
4850 } atheros_ie_type_t;
4853 ATHEROS_IE_ADVCAP_S = 1,
4854 } atheros_ie_advcap_subtype_t;
4857 ATHEROS_IE_XR_S = 1,
4858 } atheros_ie_xr_subtype_t;
4861 ATHEROS_IE_CAP_TURBOP = 0x01,
4862 ATHEROS_IE_CAP_COMP = 0x02,
4863 ATHEROS_IE_CAP_FF = 0x04,
4864 ATHEROS_IE_CAP_XR = 0x08,
4865 ATHEROS_IE_CAP_AR = 0x10,
4866 ATHEROS_IE_CAP_BURST = 0x20,
4867 ATHEROS_IE_CAP_WME = 0x40,
4868 ATHEROS_IE_CAP_BOOST = 0x80
4871 static const value_string atheros_ie_type_vals[] = {
4872 { ATHEROS_IE_ADVCAP, "Advanced Capability"},
4873 { ATHEROS_IE_XR, "eXtended Range"},
4878 dissect_vendor_ie_atheros_cap(proto_item * item _U_, tvbuff_t *tvb, int offset)
4880 proto_tree *cap_tree;
4882 cap_tree = proto_item_add_subtree(item, ett_ath_cap_tree);
4884 proto_tree_add_item(cap_tree, hf_ieee80211_atheros_ie_cap_f_turbop, tvb, offset, 1, ENC_NA);
4885 proto_tree_add_item(cap_tree, hf_ieee80211_atheros_ie_cap_f_comp, tvb, offset, 1, ENC_NA);
4886 proto_tree_add_item(cap_tree, hf_ieee80211_atheros_ie_cap_f_ff, tvb, offset, 1, ENC_NA);
4887 proto_tree_add_item(cap_tree, hf_ieee80211_atheros_ie_cap_f_xr, tvb, offset, 1, ENC_NA);
4888 proto_tree_add_item(cap_tree, hf_ieee80211_atheros_ie_cap_f_ar, tvb, offset, 1, ENC_NA);
4889 proto_tree_add_item(cap_tree, hf_ieee80211_atheros_ie_cap_f_burst, tvb, offset, 1, ENC_NA);
4890 proto_tree_add_item(cap_tree, hf_ieee80211_atheros_ie_cap_f_wme, tvb, offset, 1, ENC_NA);
4891 proto_tree_add_item(cap_tree, hf_ieee80211_atheros_ie_cap_f_boost, tvb, offset, 1, ENC_NA);
4896 dissect_vendor_ie_atheros(proto_item * item _U_, proto_tree * ietree,
4897 tvbuff_t * tvb, int offset, guint tag_len,
4898 packet_info * pinfo, int tag_end, proto_item *ti_len)
4903 proto_item *cap_item;
4907 expert_add_info_format(pinfo, ti_len, PI_MALFORMED, PI_ERROR, "Tag length %u too short, must be >= 6", tag_len);
4910 proto_tree_add_item(ietree, hf_ieee80211_atheros_ie_type, tvb, offset, 1, ENC_NA);
4911 type = tvb_get_guint8(tvb, offset);
4912 proto_item_append_text(item, ": %s", val_to_str(type, atheros_ie_type_vals, "Unknown"));
4915 proto_tree_add_item(ietree, hf_ieee80211_atheros_ie_subtype, tvb, offset, 1, ENC_NA);
4916 subtype = tvb_get_guint8(tvb, offset);
4919 proto_tree_add_item(ietree, hf_ieee80211_atheros_ie_version, tvb, offset, 1, ENC_NA);
4920 version = tvb_get_guint8(tvb, offset);
4926 case ATHEROS_IE_ADVCAP:
4929 case ATHEROS_IE_ADVCAP_S:
4931 cap_item = proto_tree_add_item(ietree, hf_ieee80211_atheros_ie_advcap_cap, tvb, offset, 1, ENC_NA);
4932 dissect_vendor_ie_atheros_cap(cap_item, tvb, offset);
4935 proto_tree_add_item(ietree, hf_ieee80211_atheros_ie_advcap_defkey, tvb, offset, 2, ENC_LITTLE_ENDIAN);
4940 /* No default Action */
4942 } /* End switch(subtype) */
4948 case ATHEROS_IE_XR_S:
4950 proto_tree_add_item(ietree, hf_ieee80211_atheros_ie_xr_info, tvb, offset, 1, ENC_NA);
4953 proto_tree_add_item(ietree, hf_ieee80211_atheros_ie_xr_base_bssid, tvb, offset, 6, ENC_NA);
4956 proto_tree_add_item(ietree, hf_ieee80211_atheros_ie_xr_xr_bssid, tvb, offset, 6, ENC_NA);
4959 proto_tree_add_item(ietree, hf_ieee80211_atheros_ie_xr_xr_beacon, tvb, offset, 2, ENC_LITTLE_ENDIAN);
4962 cap_item = proto_tree_add_item(ietree, hf_ieee80211_atheros_ie_xr_base_cap, tvb, offset, 1, ENC_NA);
4963 dissect_vendor_ie_atheros_cap(cap_item, tvb, offset);
4966 cap_item = proto_tree_add_item(ietree, hf_ieee80211_atheros_ie_xr_xr_cap, tvb, offset, 1, ENC_NA);
4967 dissect_vendor_ie_atheros_cap(cap_item, tvb, offset);
4972 /* No default Action */
4975 } /* End switch(subtype) */
4977 /* No default Action */
4979 } /* End switch(type) */
4983 if(offset < tag_end){
4984 ti = proto_tree_add_item(ietree, hf_ieee80211_atheros_ie_data, tvb, offset, tag_len, FALSE);
4985 expert_add_info_format(pinfo, ti, PI_UNDECODED, PI_WARN, "Unknown Data (not interpreted)");
4992 AIRONET_IE_VERSION = 3,
4994 AIRONET_IE_QBSS_V2 = 14
4995 } aironet_ie_type_t;
4997 static const value_string aironet_ie_type_vals[] = {
4998 { AIRONET_IE_VERSION, "CCX version"},
4999 { AIRONET_IE_QOS, "Qos"},
5000 { AIRONET_IE_QBSS_V2, "QBSS V2 - CCA"},
5005 dissect_vendor_ie_aironet(proto_item * aironet_item, proto_tree * ietree,
5006 tvbuff_t * tvb, int offset, guint32 tag_len)
5010 gboolean dont_change = FALSE; /* Don't change the IE item text to default */
5012 type = tvb_get_guint8(tvb, offset);
5013 proto_tree_add_item (ietree, hf_ieee80211_aironet_ie_type, tvb, offset, 1, TRUE);
5017 case AIRONET_IE_VERSION:
5018 proto_tree_add_item (ietree, hf_ieee80211_aironet_ie_version, tvb, offset, 1, TRUE);
5019 proto_item_append_text(aironet_item, ": Aironet CCX version = %d",
5020 tvb_get_guint8(tvb, offset));
5023 case AIRONET_IE_QOS:
5024 proto_tree_add_item (ietree, hf_ieee80211_aironet_ie_qos_unk1, tvb, offset, 1, TRUE);
5026 proto_tree_add_item (ietree, hf_ieee80211_aironet_ie_qos_paramset, tvb, offset, 1, TRUE);
5029 /* XXX: just copied over from WME. Maybe "Best Effort" and "Background"
5030 * need to be swapped. Also, the "TXOP" may be TXOP - or not.
5032 for (i = 0; i < 4; i++) {
5033 guint8 byte1, byte2;
5035 byte1 = tvb_get_guint8(tvb, offset);
5036 byte2 = tvb_get_guint8(tvb, offset + 1);
5037 txop = tvb_get_letohs(tvb, offset + 2);
5038 proto_tree_add_bytes_format(ietree, hf_ieee80211_aironet_ie_qos_val, tvb, offset, 4, NULL,
5039 "CCX QoS Parameters??: ACI %u (%s), Admission Control %sMandatory, AIFSN %u, ECWmin %u, ECWmax %u, TXOP %u",
5040 (byte1 & 0x60) >> 5, match_strval((byte1 & 0x60) >> 5, wme_acs),
5041 (byte1 & 0x10) ? "" : "not ", byte1 & 0x0f,
5042 byte2 & 0x0f, (byte2 & 0xf0) >> 4,
5047 case AIRONET_IE_QBSS_V2:
5048 /* Extract Values */
5049 proto_tree_add_item (ietree, hf_ieee80211_qbss2_scount, tvb, offset, 2, TRUE);
5050 proto_tree_add_item (ietree, hf_ieee80211_qbss2_cu, tvb, offset + 2, 1, FALSE);
5051 proto_tree_add_item (ietree, hf_ieee80211_qbss2_cal, tvb, offset + 3, 1, FALSE);
5052 proto_tree_add_item (ietree, hf_ieee80211_qbss2_gl, tvb, offset + 4, 1, FALSE);
5055 proto_tree_add_item(ietree, hf_ieee80211_aironet_ie_data, tvb, offset,
5056 tag_len - 1, FALSE);
5060 proto_item_append_text(aironet_item, ": Aironet %s",
5061 val_to_str(type, aironet_ie_type_vals, "Unknown"));
5064 /* 7.3.2.25 RSN information element */
5066 dissect_rsn_ie(proto_tree * tree, tvbuff_t * tvb, int offset, guint32 tag_len)
5068 proto_item *rsn_gcs_item, *rsn_pcs_item, *rsn_akms_item, *rsn_cap_item, *rsn_pmkid_item, *rsn_gmcs_item;
5069 proto_item *rsn_sub_pcs_item, *rsn_sub_akms_item;
5070 proto_tree *rsn_gcs_tree, *rsn_pcs_tree, *rsn_akms_tree, *rsn_cap_tree, *rsn_pmkid_tree, *rsn_gmcs_tree;
5071 proto_tree *rsn_sub_pcs_tree, *rsn_sub_akms_tree;
5072 guint16 i, pcs_count, akms_count, pmkid_count;
5073 int tag_end = offset + tag_len;
5075 proto_tree_add_item(tree, hf_ieee80211_rsn_version, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5078 /* 7.3.2.25.1 Cipher suites */
5079 rsn_gcs_item = proto_tree_add_item(tree, hf_ieee80211_rsn_gcs, tvb, offset, 4, FALSE);
5080 rsn_gcs_tree = proto_item_add_subtree(rsn_gcs_item, ett_rsn_gcs_tree);
5081 proto_tree_add_item(rsn_gcs_tree, hf_ieee80211_rsn_gcs_oui, tvb, offset, 3, FALSE);
5082 /* Check if OUI is 00:0F:AC (ieee80211) */
5083 if(tvb_get_ntoh24(tvb, offset) == 0x000FAC)
5085 proto_tree_add_item(rsn_gcs_tree, hf_ieee80211_rsn_gcs_80211_type, tvb, offset + 3, 1, FALSE);
5087 proto_tree_add_item(rsn_gcs_tree, hf_ieee80211_rsn_gcs_type, tvb, offset + 3, 1, FALSE);
5091 proto_tree_add_item(tree, hf_ieee80211_rsn_pcs_count, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5092 pcs_count = tvb_get_letohs(tvb, offset);
5095 rsn_pcs_item = proto_tree_add_item(tree, hf_ieee80211_rsn_pcs_list, tvb, offset, pcs_count * 4, FALSE);
5096 rsn_pcs_tree = proto_item_add_subtree(rsn_pcs_item, ett_rsn_pcs_tree);
5097 for(i=1; i <= pcs_count; i++)
5099 rsn_sub_pcs_item = proto_tree_add_item(rsn_pcs_tree, hf_ieee80211_rsn_pcs, tvb, offset, 4, FALSE);
5100 rsn_sub_pcs_tree = proto_item_add_subtree(rsn_sub_pcs_item, ett_rsn_sub_pcs_tree);
5101 proto_tree_add_item(rsn_sub_pcs_tree, hf_ieee80211_rsn_pcs_oui, tvb, offset, 3, FALSE);
5102 /* Check if OUI is 00:0F:AC (ieee80211) */
5103 if(tvb_get_ntoh24(tvb, offset) == 0x000FAC)
5105 proto_tree_add_item(rsn_sub_pcs_tree, hf_ieee80211_rsn_pcs_80211_type, tvb, offset+3, 1, FALSE);
5106 proto_item_append_text(rsn_pcs_item, " %s", rsn_pcs_return(tvb_get_ntohl(tvb, offset)));
5108 proto_tree_add_item(rsn_sub_pcs_tree, hf_ieee80211_rsn_pcs_type, tvb, offset+3, 1, FALSE);
5113 /* 7.3.2.25.2 AKM suites */
5114 proto_tree_add_item(tree, hf_ieee80211_rsn_akms_count, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5115 akms_count = tvb_get_letohs(tvb, offset);
5118 rsn_akms_item = proto_tree_add_item(tree, hf_ieee80211_rsn_akms_list, tvb, offset, akms_count * 4, FALSE);
5119 rsn_akms_tree = proto_item_add_subtree(rsn_akms_item, ett_rsn_akms_tree);
5120 for(i=1; i <= akms_count; i++)
5122 rsn_sub_akms_item = proto_tree_add_item(rsn_akms_tree, hf_ieee80211_rsn_akms, tvb, offset, 4, FALSE);
5123 rsn_sub_akms_tree = proto_item_add_subtree(rsn_sub_akms_item, ett_rsn_sub_akms_tree);
5124 proto_tree_add_item(rsn_sub_akms_tree, hf_ieee80211_rsn_akms_oui, tvb, offset, 3, FALSE);
5126 /* Check if OUI is 00:0F:AC (ieee80211) */
5127 if(tvb_get_ntoh24(tvb, offset) == 0x000FAC)
5129 proto_tree_add_item(rsn_sub_akms_tree, hf_ieee80211_rsn_akms_80211_type, tvb, offset+3, 1, FALSE);
5130 proto_item_append_text(rsn_akms_item, " %s", rsn_akms_return(tvb_get_ntohl(tvb, offset)));
5132 proto_tree_add_item(rsn_sub_akms_tree, hf_ieee80211_rsn_akms_type, tvb, offset+3, 1, FALSE);
5137 /* 7.3.2.25.3 RSN capabilities */
5138 rsn_cap_item = proto_tree_add_item(tree, hf_ieee80211_rsn_cap, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5139 rsn_cap_tree = proto_item_add_subtree(rsn_cap_item, ett_rsn_cap_tree);
5141 proto_tree_add_item(rsn_cap_tree, hf_ieee80211_rsn_cap_preauth, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5142 proto_tree_add_item(rsn_cap_tree, hf_ieee80211_rsn_cap_no_pairwise, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5143 proto_tree_add_item(rsn_cap_tree, hf_ieee80211_rsn_cap_ptksa_replay_counter, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5144 proto_tree_add_item(rsn_cap_tree, hf_ieee80211_rsn_cap_gtksa_replay_counter, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5145 proto_tree_add_item(rsn_cap_tree, hf_ieee80211_rsn_cap_mfpr, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5146 proto_tree_add_item(rsn_cap_tree, hf_ieee80211_rsn_cap_mfpc, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5147 proto_tree_add_item(rsn_cap_tree, hf_ieee80211_rsn_cap_peerkey, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5149 if(offset >= tag_end)
5153 /* 7.3.2.25.4 PMKID */
5154 proto_tree_add_item(tree, hf_ieee80211_rsn_pmkid_count, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5155 pmkid_count = tvb_get_letohs(tvb, offset);
5158 rsn_pmkid_item = proto_tree_add_item(tree, hf_ieee80211_rsn_pmkid_list, tvb, offset, pmkid_count * 16, FALSE);
5159 rsn_pmkid_tree = proto_item_add_subtree(rsn_pmkid_item, ett_rsn_pmkid_tree);
5160 for(i=1; i <= pmkid_count; i++)
5162 proto_tree_add_item(rsn_pmkid_tree, hf_ieee80211_rsn_pmkid, tvb, offset, 16, FALSE);
5166 if(offset >= tag_end)
5170 /* Group Management Cipher Suite (802.11w)*/
5171 rsn_gmcs_item = proto_tree_add_item(tree, hf_ieee80211_rsn_gmcs, tvb, offset, 4, FALSE);
5172 rsn_gmcs_tree = proto_item_add_subtree(rsn_gmcs_item, ett_rsn_gmcs_tree);
5173 proto_tree_add_item(rsn_gmcs_tree, hf_ieee80211_rsn_gmcs_oui, tvb, offset, 3, FALSE);
5174 /* Check if OUI is 00:0F:AC (ieee80211) */
5175 if(tvb_get_ntoh24(tvb, offset) == 0x000FAC)
5177 proto_tree_add_item(rsn_gmcs_tree, hf_ieee80211_rsn_gmcs_80211_type, tvb, offset + 3, 1, FALSE);
5179 proto_tree_add_item(rsn_gmcs_tree, hf_ieee80211_rsn_gmcs_type, tvb, offset + 3, 1, FALSE);
5186 dissect_mobility_domain(proto_tree *tree, tvbuff_t *tvb, int offset,
5190 proto_tree_add_string(tree, hf_ieee80211_tag_interpretation, tvb, offset, tag_len,
5191 "MDIE content length must be at least 3 bytes");
5195 proto_tree_add_item(tree, hf_ieee80211_tag_mobility_domain_mdid,
5196 tvb, offset, 2, ENC_LITTLE_ENDIAN);
5197 proto_tree_add_item(tree, hf_ieee80211_tag_mobility_domain_ft_capab,
5198 tvb, offset + 2, 1, FALSE);
5199 proto_tree_add_item(tree, hf_ieee80211_tag_mobility_domain_ft_capab_ft_over_ds,
5200 tvb, offset + 2, 1, FALSE);
5201 proto_tree_add_item(tree, hf_ieee80211_tag_mobility_domain_ft_capab_resource_req,
5202 tvb, offset + 2, 1, FALSE);
5205 #ifndef MESH_OVERRIDES
5207 dissect_fast_bss_transition(proto_tree *tree, tvbuff_t *tvb, int offset,
5210 int end = offset + tag_len;
5212 proto_tree_add_string(tree, hf_ieee80211_tag_interpretation, tvb, offset, tag_len,
5213 "FTIE content length must be at least 82 bytes");
5217 proto_tree_add_item(tree, hf_ieee80211_tag_ft_mic_control,
5218 tvb, offset, 2, TRUE);
5219 proto_tree_add_item(tree, hf_ieee80211_tag_ft_element_count,
5220 tvb, offset, 2, TRUE);
5222 proto_tree_add_item(tree, hf_ieee80211_tag_ft_mic,
5223 tvb, offset, 16, FALSE);
5225 proto_tree_add_item(tree, hf_ieee80211_tag_ft_anonce,
5226 tvb, offset, 32, FALSE);
5228 proto_tree_add_item(tree, hf_ieee80211_tag_ft_snonce,
5229 tvb, offset, 32, FALSE);
5232 while (offset + 2 <= end) {
5235 proto_tree_add_item(tree, hf_ieee80211_tag_ft_subelem_id,
5236 tvb, offset, 1, FALSE);
5237 id = tvb_get_guint8(tvb, offset);
5240 proto_tree_add_item(tree, hf_ieee80211_tag_ft_subelem_len,
5241 tvb, offset, 1, FALSE);
5242 len = tvb_get_guint8(tvb, offset);
5245 if (offset + len > end) {
5246 proto_tree_add_string(tree, hf_ieee80211_tag_interpretation, tvb, offset,
5247 end - offset, "Invalid FTIE subelement");
5251 s_end = offset + len;
5254 proto_tree_add_item(tree, hf_ieee80211_tag_ft_subelem_r1kh_id,
5255 tvb, offset, len, FALSE);
5258 proto_tree_add_item(tree, hf_ieee80211_tag_ft_subelem_gtk_key_info,
5259 tvb, offset, 2, TRUE);
5260 proto_tree_add_item(tree, hf_ieee80211_tag_ft_subelem_gtk_key_id,
5261 tvb, offset, 2, TRUE);
5265 proto_tree_add_item(tree, hf_ieee80211_tag_ft_subelem_gtk_key_length,
5266 tvb, offset, 1, FALSE);
5270 proto_tree_add_item(tree, hf_ieee80211_tag_ft_subelem_gtk_rsc,
5271 tvb, offset, 8, FALSE);
5275 proto_tree_add_item(tree, hf_ieee80211_tag_ft_subelem_gtk_key,
5276 tvb, offset, s_end - offset, FALSE);
5279 proto_tree_add_item(tree, hf_ieee80211_tag_ft_subelem_r0kh_id,
5280 tvb, offset, len, FALSE);
5283 proto_tree_add_item(tree, hf_ieee80211_tag_ft_subelem_igtk_key_id,
5284 tvb, offset, 2, TRUE);
5288 proto_tree_add_item(tree, hf_ieee80211_tag_ft_subelem_igtk_ipn,
5289 tvb, offset, 6, FALSE);
5293 proto_tree_add_item(tree, hf_ieee80211_tag_ft_subelem_igtk_key_length,
5294 tvb, offset, 1, FALSE);
5298 proto_tree_add_item(tree, hf_ieee80211_tag_ft_subelem_igtk_key,
5299 tvb, offset, 24, FALSE);
5302 proto_tree_add_item(tree, hf_ieee80211_tag_ft_subelem_data,
5303 tvb, offset, len, FALSE);
5309 #endif /* MESH_OVERRIDES */
5312 dissect_mmie(proto_tree *tree, tvbuff_t *tvb, int offset, guint32 tag_len)
5315 proto_tree_add_string(tree, hf_ieee80211_tag_interpretation, tvb, offset, tag_len,
5316 "MMIE content length must be at least 16 bytes");
5320 proto_tree_add_item(tree, hf_ieee80211_tag_mmie_keyid, tvb, offset, 2, TRUE);
5321 proto_tree_add_item(tree, hf_ieee80211_tag_mmie_ipn, tvb, offset + 2, 6,
5323 proto_tree_add_item(tree, hf_ieee80211_tag_mmie_mic, tvb, offset + 8, 8,
5328 dissect_link_identifier(proto_tree *tree, tvbuff_t *tvb, int offset,
5332 proto_tree_add_string(tree, hf_ieee80211_tag_interpretation, tvb, offset, tag_len,
5333 "Link Identifier content length must be at least "
5338 proto_tree_add_item(tree, hf_ieee80211_tag_link_id_bssid, tvb,
5340 proto_tree_add_item(tree, hf_ieee80211_tag_link_id_init_sta, tvb,
5341 offset + 6, 6, FALSE);
5342 proto_tree_add_item(tree, hf_ieee80211_tag_link_id_resp_sta, tvb,
5343 offset + 12, 6, FALSE);
5347 dissect_wakeup_schedule(proto_tree *tree, tvbuff_t *tvb, int offset,
5351 proto_tree_add_string(tree, hf_ieee80211_tag_interpretation, tvb, offset, tag_len,
5352 "Wakeup Schedule content length must be at least "
5357 proto_tree_add_item(tree, hf_ieee80211_tag_wakeup_schedule_offset, tvb,
5361 proto_tree_add_item(tree, hf_ieee80211_tag_wakeup_schedule_interval, tvb,
5365 proto_tree_add_item(tree,
5366 hf_ieee80211_tag_wakeup_schedule_awake_window_slots, tvb,
5370 proto_tree_add_item(tree, hf_ieee80211_tag_wakeup_schedule_max_awake_dur,
5371 tvb, offset, 4, TRUE);
5374 proto_tree_add_item(tree, hf_ieee80211_tag_wakeup_schedule_idle_count, tvb,
5379 dissect_channel_switch_timing(proto_tree *tree, tvbuff_t *tvb, int offset,
5383 proto_tree_add_string(tree, hf_ieee80211_tag_interpretation, tvb, offset, tag_len,
5384 "Channel Switch Timing content length must be at "
5389 proto_tree_add_item(tree, hf_ieee80211_tag_channel_switch_timing_switch_time,
5390 tvb, offset, 2, TRUE);
5393 proto_tree_add_item(tree,
5394 hf_ieee80211_tag_channel_switch_timing_switch_timeout,
5395 tvb, offset, 2, TRUE);
5399 dissect_pti_control(proto_tree *tree, tvbuff_t *tvb, int offset,
5403 proto_tree_add_string(tree, hf_ieee80211_tag_interpretation, tvb, offset, tag_len,
5404 "PTI Control content length must be at least "
5409 proto_tree_add_item(tree, hf_ieee80211_tag_pti_control_tid, tvb,
5413 proto_tree_add_item(tree, hf_ieee80211_tag_pti_control_sequence_control, tvb,
5418 dissect_pu_buffer_status(proto_tree *tree, tvbuff_t *tvb, int offset,
5422 proto_tree_add_string(tree, hf_ieee80211_tag_interpretation, tvb, offset, tag_len,
5423 "PU Buffer Status content length must be at least "
5428 proto_tree_add_item(tree, hf_ieee80211_tag_pu_buffer_status_ac_bk, tvb,
5430 proto_tree_add_item(tree, hf_ieee80211_tag_pu_buffer_status_ac_be, tvb,
5432 proto_tree_add_item(tree, hf_ieee80211_tag_pu_buffer_status_ac_vi, tvb,
5434 proto_tree_add_item(tree, hf_ieee80211_tag_pu_buffer_status_ac_vo, tvb,
5439 dissect_timeout_interval(proto_tree *tree, tvbuff_t *tvb, int offset,
5444 pi = proto_tree_add_item(tree, hf_ieee80211_tag_timeout_int_type, tvb,
5447 expert_add_info_format(g_pinfo, pi, PI_MALFORMED, PI_ERROR,
5448 "Timeout Interval content length must be at least "
5453 proto_tree_add_item(tree, hf_ieee80211_tag_timeout_int_value, tvb,
5454 offset + 1, 4, TRUE);
5458 dissect_mcs_set(proto_tree *tree, tvbuff_t *tvb, int offset, gboolean basic, gboolean vs) {
5460 proto_tree *mcs_tree, *bit_tree;
5463 /* 16 byte Supported MCS set */
5466 ti = proto_tree_add_string(tree, hf_ieee80211_mcsset_vs, tvb, offset, 16,
5467 basic ? "Basic MCS Set" : "MCS Set");
5470 ti = proto_tree_add_string(tree, hf_ieee80211_mcsset, tvb, offset, 16,
5471 basic ? "Basic MCS Set" : "MCS Set");
5473 mcs_tree = proto_item_add_subtree(ti, ett_mcsset_tree);
5475 /* Rx MCS Bitmask */
5476 ti = proto_tree_add_string(mcs_tree, hf_ieee80211_tag_interpretation, tvb, offset,
5477 10, "Rx Modulation and Coding Scheme (One bit per modulation)");
5478 bit_tree = proto_item_add_subtree(ti, ett_mcsbit_tree);
5481 proto_tree_add_item(bit_tree, hf_ieee80211_mcsset_rx_bitmask_0to7, tvb, offset, 4, TRUE);
5482 proto_tree_add_item(bit_tree, hf_ieee80211_mcsset_rx_bitmask_8to15, tvb, offset, 4, TRUE);
5483 proto_tree_add_item(bit_tree, hf_ieee80211_mcsset_rx_bitmask_16to23, tvb, offset, 4, TRUE);
5484 proto_tree_add_item(bit_tree, hf_ieee80211_mcsset_rx_bitmask_24to31, tvb, offset, 4, TRUE);
5487 proto_tree_add_item(bit_tree, hf_ieee80211_mcsset_rx_bitmask_32, tvb, offset + 4, 4, TRUE);
5488 proto_tree_add_item(bit_tree, hf_ieee80211_mcsset_rx_bitmask_33to38, tvb, offset + 4, 4, TRUE);
5489 proto_tree_add_item(bit_tree, hf_ieee80211_mcsset_rx_bitmask_39to52, tvb, offset + 4, 4, TRUE);
5492 proto_tree_add_item(bit_tree, hf_ieee80211_mcsset_rx_bitmask_53to76, tvb, offset + 6, 4, TRUE);
5494 capability = tvb_get_letohs (tvb, offset+10);
5495 proto_tree_add_uint_format(mcs_tree, hf_ieee80211_mcsset_highest_data_rate, tvb, offset + 10, 2,
5496 capability, "Highest Supported Data Rate: 0x%04X", capability);
5497 capability = tvb_get_letohs (tvb, offset+12);
5498 proto_tree_add_boolean(mcs_tree, hf_ieee80211_mcsset_tx_mcs_set_defined, tvb, offset + 12, 1,
5500 proto_tree_add_boolean(mcs_tree, hf_ieee80211_mcsset_tx_rx_mcs_set_not_equal, tvb, offset + 12, 1,
5502 proto_tree_add_uint(mcs_tree, hf_ieee80211_mcsset_tx_max_spatial_streams, tvb, offset + 12, 1,
5504 proto_tree_add_boolean(mcs_tree, hf_ieee80211_mcsset_tx_unequal_modulation, tvb, offset + 12, 1,
5508 /* 802.11n D1.10 - HT Information IE */
5510 dissect_ht_info_ie_1_1(proto_tree * tree, tvbuff_t * tvb, int offset,
5513 proto_item *cap_item;
5514 proto_tree *cap_tree;
5515 guint32 tag_val_init_off = 0;
5518 tag_val_init_off = offset;
5522 proto_tree_add_string(tree, hf_ieee80211_tag_interpretation, tvb, offset, tag_len,
5523 "HT Information IE content length must be at least 22 bytes");
5527 info = tvb_get_guint8 (tvb, offset);
5528 proto_tree_add_item(cap_tree, hf_ieee80211_ht_info_primary_channel, tvb, offset, 1, TRUE);
5530 info = tvb_get_guint8 (tvb, ++offset);
5531 cap_item = proto_tree_add_uint_format(tree, hf_ieee80211_ht_info_delimiter1, tvb,
5533 "HT Information Subset (1 of 3): 0x%02X", info);
5534 cap_tree = proto_item_add_subtree(cap_item, ett_ht_info_delimiter1_tree);
5535 proto_tree_add_uint(cap_tree, hf_ieee80211_ht_info_secondary_channel_offset, tvb, offset, 1,
5537 proto_tree_add_boolean(cap_tree, hf_ieee80211_ht_info_channel_width, tvb, offset, 1,
5539 proto_tree_add_boolean(cap_tree, hf_ieee80211_ht_info_rifs_mode, tvb, offset, 1,
5541 proto_tree_add_boolean(cap_tree, hf_ieee80211_ht_info_psmp_stas_only, tvb, offset, 1,
5543 proto_tree_add_uint(cap_tree, hf_ieee80211_ht_info_service_interval_granularity, tvb, offset, 1,
5546 info = tvb_get_letohs (tvb, ++offset);
5547 cap_item = proto_tree_add_uint_format(tree, hf_ieee80211_ht_info_delimiter2, tvb,
5549 "HT Information Subset (2 of 3): 0x%04X", info);
5550 cap_tree = proto_item_add_subtree(cap_item, ett_ht_info_delimiter2_tree);
5551 proto_tree_add_uint(cap_tree, hf_ieee80211_ht_info_operating_mode, tvb, offset, 1,
5553 proto_tree_add_boolean(cap_tree, hf_ieee80211_ht_info_non_greenfield_sta_present, tvb, offset, 1,
5555 proto_tree_add_boolean(cap_tree, hf_ieee80211_ht_info_transmit_burst_limit, tvb, offset, 1,
5557 proto_tree_add_boolean(cap_tree, hf_ieee80211_ht_info_obss_non_ht_stas_present, tvb, offset, 1,
5559 proto_tree_add_uint(cap_tree, hf_ieee80211_ht_info_reserved_1, tvb, offset, 2,
5563 info = tvb_get_letohs (tvb, offset);
5564 cap_item = proto_tree_add_uint_format(tree, hf_ieee80211_ht_info_delimiter3, tvb,
5566 "HT Information Subset (3 of 3): 0x%04X", info);
5567 cap_tree = proto_item_add_subtree(cap_item, ett_ht_info_delimiter3_tree);
5568 proto_tree_add_uint(cap_tree, hf_ieee80211_ht_info_reserved_2, tvb, offset, 1,
5570 proto_tree_add_boolean(cap_tree, hf_ieee80211_ht_info_dual_beacon, tvb, offset, 1,
5572 proto_tree_add_boolean(cap_tree, hf_ieee80211_ht_info_dual_cts_protection, tvb, offset, 1,
5574 proto_tree_add_boolean(cap_tree, hf_ieee80211_ht_info_secondary_beacon, tvb, offset+1, 1,
5576 proto_tree_add_boolean(cap_tree, hf_ieee80211_ht_info_lsig_txop_protection_full_support, tvb, offset+1, 1,
5578 proto_tree_add_boolean(cap_tree, hf_ieee80211_ht_info_pco_active, tvb, offset+1, 1,
5580 proto_tree_add_boolean(cap_tree, hf_ieee80211_ht_info_pco_phase, tvb, offset+1, 1,
5582 proto_tree_add_uint(cap_tree, hf_ieee80211_ht_info_reserved_3, tvb, offset+1, 1,
5588 dissect_mcs_set(cap_tree, tvb, offset, TRUE, FALSE);
5591 if (tag_val_init_off - offset < tag_len){
5592 proto_tree_add_string(cap_tree, hf_ieee80211_tag_interpretation, tvb, offset,
5593 tag_len + tag_val_init_off - offset, "Unparsed Extra Data");
5597 #ifndef MESH_OVERRIDES
5598 /*** WAVE Service information element Dissection - IEEE 802.11p Draft 4.0 ***/
5600 dissect_wsie_ie(proto_tree * tree, tvbuff_t * tvb, int offset, guint32 tag_len _U_)
5602 proto_item *pst_item, *cap_item, *chan_noc_item, *chnl_item;
5603 proto_tree *pst_tree, *cap_tree, *chan_noc_tree, *chnl_tree;
5605 guint8 providercount, pst_contents, pst_acm_length;
5607 guint16 pst_length = 0;
5609 guint8 chan_length = 0;
5612 proto_tree_add_item(tree, hf_ieee80211_pst_timingquality, tvb, offset, 2, TRUE);
5615 providercount = tvb_get_guint8 (tvb, offset);
5616 pst_item = proto_tree_add_item(tree, hf_ieee80211_pst_providercount, tvb, offset, 1, TRUE);
5617 pst_tree = proto_item_add_subtree(pst_item, ett_pst_tree);
5620 for (i=0;i<providercount;i++) {
5622 local_offset = offset;
5623 cap_item = proto_tree_add_item(pst_tree, hf_ieee80211_pst_providercap, tvb, local_offset, 0, TRUE);
5624 proto_item_append_text(cap_item, ": %u", i+1);
5625 cap_tree = proto_item_add_subtree(cap_item, ett_pst_cap_tree);
5627 pst_length = tvb_get_letohl(tvb, local_offset);
5628 proto_item_set_len(cap_item, pst_length);
5629 proto_tree_add_item(cap_tree, hf_ieee80211_pst_length, tvb, local_offset, 2, TRUE);
5632 pst_contents = tvb_get_guint8 (tvb, local_offset);
5633 proto_tree_add_item(cap_tree, hf_ieee80211_pst_contents, tvb, local_offset, 1, TRUE);
5636 if (pst_contents & WAVE_ACID) {
5637 proto_tree_add_item(cap_tree, hf_ieee80211_pst_acid, tvb, local_offset, 1, TRUE);
5641 if (pst_contents & WAVE_ACM) {
5642 pst_acm_length = tvb_get_guint8 (tvb, local_offset);
5643 proto_tree_add_item(cap_tree, hf_ieee80211_pst_acm_length, tvb, local_offset, 1, TRUE);
5645 proto_tree_add_item(cap_tree, hf_ieee80211_pst_acm_contents, tvb, local_offset, pst_acm_length, FALSE);
5646 local_offset += pst_acm_length;
5648 if (pst_contents & WAVE_ACF) {
5649 proto_tree_add_item(cap_tree, hf_ieee80211_pst_acf, tvb, local_offset, 32, FALSE);
5652 if (pst_contents & WAVE_PRIORITY) {
5653 proto_tree_add_item(cap_tree, hf_ieee80211_pst_priority, tvb, local_offset, 1, TRUE);
5656 if (pst_contents & WAVE_IPV6ADDR) {
5657 proto_tree_add_item(cap_tree, hf_ieee80211_pst_ipv6addr, tvb, local_offset, 16, FALSE);
5659 proto_tree_add_item(cap_tree, hf_ieee80211_pst_serviceport, tvb, local_offset, 2, FALSE);
5661 proto_tree_add_item(cap_tree, hf_ieee80211_pst_addressing, tvb, local_offset, 1, FALSE);
5664 if (pst_contents & WAVE_PEERMAC) {
5665 proto_tree_add_item(cap_tree, hf_ieee80211_pst_macaddr, tvb, local_offset, 6, FALSE);
5668 if (pst_contents & WAVE_CHANNEL) {
5669 proto_tree_add_item(cap_tree, hf_ieee80211_pst_channel, tvb, local_offset, 1, FALSE);
5673 offset = offset + pst_length;
5676 chan_noc = tvb_get_guint8 (tvb, offset);
5677 chan_noc_item = proto_tree_add_item(tree, hf_ieee80211_chan_noc, tvb, offset, 1, TRUE);
5678 chan_noc_tree = proto_item_add_subtree(chan_noc_item,ett_chan_noc_tree);
5682 for (i=0;i<chan_noc;i++) {
5683 chan_length = tvb_get_guint8 (tvb, offset);
5684 chnl_item = proto_tree_add_text (chan_noc_tree, tvb, offset, chan_length, "Channel :%u Information ", i+1);
5685 chnl_tree = proto_item_add_subtree(chnl_item, ett_wave_chnl_tree);
5686 proto_tree_add_item(chnl_tree, hf_ieee80211_chan_length, tvb, offset, 1, TRUE);
5687 proto_tree_add_item(chnl_tree, hf_ieee80211_chan_content, tvb, offset+1, 1, TRUE);
5688 proto_tree_add_item(chnl_tree, hf_ieee80211_chan_channel, tvb, offset+2, 1, TRUE);
5689 proto_tree_add_item(chnl_tree, hf_ieee80211_chan_adapt, tvb, offset+3, 1, TRUE);
5690 proto_tree_add_item(chnl_tree, hf_ieee80211_chan_rate, tvb, offset+4, 1, TRUE);
5691 proto_tree_add_item(chnl_tree, hf_ieee80211_chan_tx_pow, tvb, offset+5, 1, TRUE);
5692 offset = offset + chan_length;
5696 #endif /* MESH_OVERRIDES */
5698 static void secondary_channel_offset_ie(proto_tree * tree, tvbuff_t * tvb, int offset, guint32 tag_len)
5704 proto_tree_add_text (tree, tvb, offset, tag_len, "Secondary Channel Offset: Error: Tag length must be at least 1 byte long");
5708 tag_offset = offset;
5709 proto_tree_add_uint(tree, hf_ieee80211_tag_secondary_channel_offset, tvb, offset, 1, tvb_get_guint8 (tvb, offset));
5712 if ((tag_len - (offset-tag_offset)) > 0)
5714 proto_tree_add_text (tree, tvb, offset, tag_len - (offset-tag_offset), "Unknown Data");
5720 dissect_ht_capability_ie(proto_tree * tree, tvbuff_t * tvb, int offset,
5721 guint32 tag_len, gboolean vs)
5723 proto_item *cap_item;
5724 proto_tree *cap_tree;
5727 guint32 tag_val_off = 0;
5729 if (tag_val_off + 2 > tag_len) {
5730 proto_tree_add_string(tree, hf_ieee80211_tag_interpretation, tvb, offset, tag_len,
5735 if (tag_len != 26) {
5736 proto_tree_add_string(tree, hf_ieee80211_tag_interpretation, tvb, offset, tag_len,
5737 "HT Capabilities IE content length must be exactly 26 bytes");
5741 if (wlan_ignore_draft_ht && vs)
5744 /* 2 byte HT Capabilities Info*/
5745 capability = tvb_get_letohs (tvb, offset);
5748 cap_item = proto_tree_add_item(tree, hf_ieee80211_ht_vs_cap, tvb, offset, 2, TRUE);
5752 cap_item = proto_tree_add_item(tree, hf_ieee80211_ht_cap, tvb, offset, 2, TRUE);
5754 cap_tree = proto_item_add_subtree(cap_item, ett_ht_cap_tree);
5755 proto_tree_add_boolean(cap_tree, hf_ieee80211_ht_ldpc_coding, tvb, offset, 1,
5757 proto_tree_add_boolean(cap_tree, hf_ieee80211_ht_chan_width, tvb, offset, 1,
5759 proto_tree_add_uint(cap_tree, hf_ieee80211_ht_sm_pwsave, tvb, offset, 1,
5761 proto_tree_add_boolean(cap_tree, hf_ieee80211_ht_green, tvb, offset, 1,
5763 proto_tree_add_boolean(cap_tree, hf_ieee80211_ht_short20, tvb, offset, 1,
5765 proto_tree_add_boolean(cap_tree, hf_ieee80211_ht_short40, tvb, offset, 1,
5767 proto_tree_add_boolean(cap_tree, hf_ieee80211_ht_tx_stbc, tvb, offset, 1,
5769 proto_tree_add_uint(cap_tree, hf_ieee80211_ht_rx_stbc, tvb, offset+1, 1,
5771 proto_tree_add_boolean(cap_tree, hf_ieee80211_ht_delayed_block_ack, tvb, offset+1, 1,
5773 proto_tree_add_boolean(cap_tree, hf_ieee80211_ht_max_amsdu, tvb, offset+1, 1,
5775 proto_tree_add_boolean(cap_tree, hf_ieee80211_ht_dss_cck_40, tvb, offset+1, 1,
5777 proto_tree_add_boolean(cap_tree, hf_ieee80211_ht_psmp, tvb, offset+1, 1,
5779 proto_tree_add_boolean(cap_tree, hf_ieee80211_ht_40_mhz_intolerant, tvb, offset+1, 1,
5781 proto_tree_add_boolean(cap_tree, hf_ieee80211_ht_l_sig, tvb, offset+1, 1,
5787 /* 1 byte A-MPDU Parameters */
5788 capability = tvb_get_guint8 (tvb, offset);
5791 cap_item = proto_tree_add_item(tree, hf_ieee80211_ampduparam_vs, tvb, offset, 1, TRUE);
5794 cap_item = proto_tree_add_item(tree, hf_ieee80211_ampduparam, tvb, offset, 1, TRUE);
5796 cap_tree = proto_item_add_subtree(cap_item, ett_ampduparam_tree);
5797 proto_tree_add_uint_format(cap_tree, hf_ieee80211_ampduparam_mpdu, tvb, offset, 1, capability,
5798 "%sMaximum Rx A-MPDU Length: %04.0f [Bytes]",
5799 decode_numeric_bitfield(capability, 0x03, 8, ""),
5800 pow(2,13+(capability & 0x3))-1);
5801 proto_tree_add_uint(cap_tree, hf_ieee80211_ampduparam_mpdu_start_spacing, tvb, offset, 1, capability);
5802 proto_tree_add_uint(cap_tree, hf_ieee80211_ampduparam_reserved, tvb, offset, 1, capability);
5806 /* 16 byte MCS set */
5807 dissect_mcs_set(tree, tvb, offset, FALSE, vs);
5811 /* 2 byte HT Extended Capabilities */
5812 capability = tvb_get_letohs (tvb, offset);
5815 cap_item = proto_tree_add_item(tree, hf_ieee80211_htex_vs_cap, tvb, offset, 2, TRUE);
5817 cap_item = proto_tree_add_item(tree, hf_ieee80211_htex_cap, tvb, offset, 2, TRUE);
5819 cap_tree = proto_item_add_subtree(cap_item, ett_htex_cap_tree);
5820 proto_tree_add_boolean(cap_tree, hf_ieee80211_htex_pco, tvb, offset, 1,
5822 proto_tree_add_uint(cap_tree, hf_ieee80211_htex_transtime, tvb, offset, 1,
5824 proto_tree_add_uint(cap_tree, hf_ieee80211_htex_mcs, tvb, offset+1, 1,
5826 proto_tree_add_boolean(cap_tree, hf_ieee80211_htex_htc_support, tvb, offset+1, 1,
5828 proto_tree_add_boolean(cap_tree, hf_ieee80211_htex_rd_responder, tvb, offset+1, 1,
5834 /* 4 byte TxBF capabilities */
5835 txbfcap = tvb_get_letohl (tvb, offset);
5838 cap_item = proto_tree_add_item(tree, hf_ieee80211_txbf_vs, tvb, offset, 4, TRUE);
5840 cap_item = proto_tree_add_item(tree, hf_ieee80211_txbf, tvb, offset, 4, TRUE);
5842 cap_tree = proto_item_add_subtree(cap_item, ett_txbf_tree);
5843 proto_tree_add_boolean(cap_tree, hf_ieee80211_txbf_cap, tvb, offset, 1,
5845 proto_tree_add_boolean(cap_tree, hf_ieee80211_txbf_rcv_ssc, tvb, offset, 1,
5847 proto_tree_add_boolean(cap_tree, hf_ieee80211_txbf_tx_ssc, tvb, offset, 1,
5849 proto_tree_add_boolean(cap_tree, hf_ieee80211_txbf_rcv_ndp, tvb, offset, 1,
5851 proto_tree_add_boolean(cap_tree, hf_ieee80211_txbf_tx_ndp, tvb, offset, 1,
5853 proto_tree_add_boolean(cap_tree, hf_ieee80211_txbf_impl_txbf, tvb, offset, 1,
5855 proto_tree_add_uint(cap_tree, hf_ieee80211_txbf_calib, tvb, offset, 1,
5857 proto_tree_add_boolean(cap_tree, hf_ieee80211_txbf_expl_csi, tvb, offset+1, 1,
5859 proto_tree_add_boolean(cap_tree, hf_ieee80211_txbf_expl_uncomp_fm, tvb, offset+1, 1,
5861 proto_tree_add_boolean(cap_tree, hf_ieee80211_txbf_expl_comp_fm, tvb, offset+1, 1,
5863 proto_tree_add_uint(cap_tree, hf_ieee80211_txbf_expl_bf_csi, tvb, offset+1, 1,
5865 proto_tree_add_uint(cap_tree, hf_ieee80211_txbf_expl_uncomp_fm_feed, tvb, offset+1, 1,
5867 proto_tree_add_uint(cap_tree, hf_ieee80211_txbf_expl_comp_fm_feed, tvb, offset+1, 2,
5869 proto_tree_add_uint(cap_tree, hf_ieee80211_txbf_min_group, tvb, offset+2, 1,
5871 proto_tree_add_uint(cap_tree, hf_ieee80211_txbf_csi_num_bf_ant, tvb, offset+2, 1,
5873 proto_tree_add_uint(cap_tree, hf_ieee80211_txbf_uncomp_sm_bf_ant, tvb, offset+2, 1,
5875 proto_tree_add_uint(cap_tree, hf_ieee80211_txbf_comp_sm_bf_ant, tvb, offset+2, 2,
5877 proto_tree_add_uint(cap_tree, hf_ieee80211_txbf_csi_max_rows_bf, tvb, offset+3, 1,
5879 proto_tree_add_uint(cap_tree, hf_ieee80211_txbf_chan_est, tvb, offset+3, 1,
5881 proto_tree_add_uint(cap_tree, hf_ieee80211_txbf_resrv, tvb, offset+3, 1,
5887 /* 1 byte Antenna Selection (ASEL) capabilities */
5888 capability = tvb_get_guint8 (tvb, offset);
5891 cap_item = proto_tree_add_item(tree, hf_ieee80211_antsel_vs, tvb, offset, 1, TRUE);
5895 cap_item = proto_tree_add_item(tree, hf_ieee80211_antsel, tvb, offset, 1, TRUE);
5897 cap_tree = proto_item_add_subtree(cap_item, ett_antsel_tree);
5898 proto_tree_add_boolean(cap_tree, hf_ieee80211_antsel_b0, tvb, offset, 1,
5900 proto_tree_add_boolean(cap_tree, hf_ieee80211_antsel_b1, tvb, offset, 1,
5902 proto_tree_add_boolean(cap_tree, hf_ieee80211_antsel_b2, tvb, offset, 1,
5904 proto_tree_add_boolean(cap_tree, hf_ieee80211_antsel_b3, tvb, offset, 1,
5906 proto_tree_add_boolean(cap_tree, hf_ieee80211_antsel_b4, tvb, offset, 1,
5908 proto_tree_add_boolean(cap_tree, hf_ieee80211_antsel_b5, tvb, offset, 1,
5910 proto_tree_add_boolean(cap_tree, hf_ieee80211_antsel_b6, tvb, offset, 1,
5912 proto_tree_add_uint(cap_tree, hf_ieee80211_antsel_b7, tvb, offset, 1,
5920 dissect_ht_info_ie_1_0(proto_tree * tree, tvbuff_t * tvb, int offset,
5923 proto_item *cap_item;
5924 proto_tree *cap_tree;
5926 guint32 tag_val_off = 0;
5927 gchar out_buff[SHORT_STR];
5929 if (tag_val_off + 2 > tag_len) {
5930 proto_tree_add_string(tree, hf_ieee80211_tag_interpretation, tvb, offset, tag_len,
5936 proto_tree_add_string(tree, hf_ieee80211_tag_interpretation, tvb, offset, tag_len,
5937 "HT Additional Capabilities IE content length must be 22");
5941 if (wlan_ignore_draft_ht)
5944 g_snprintf(out_buff, SHORT_STR, "Control Channel %d",
5945 tvb_get_guint8(tvb, offset));
5946 proto_tree_add_string(tree, hf_ieee80211_tag_interpretation, tvb, offset, 1, out_buff);
5950 /* 1 byte HT additional capabilities */
5951 capability = tvb_get_guint8 (tvb, offset);
5952 cap_item = proto_tree_add_uint_format(tree, hf_ieee80211_hta_cap, tvb,
5953 offset, 1, capability,
5954 "HT Additional Capabilities: 0x%04X", capability);
5955 cap_tree = proto_item_add_subtree(cap_item, ett_hta_cap_tree);
5956 proto_tree_add_uint(cap_tree, hf_ieee80211_hta_ext_chan_offset, tvb, offset, 1,
5958 proto_tree_add_boolean(cap_tree, hf_ieee80211_hta_rec_tx_width, tvb, offset, 1,
5960 proto_tree_add_boolean(cap_tree, hf_ieee80211_hta_rifs_mode, tvb, offset, 1,
5962 proto_tree_add_boolean(cap_tree, hf_ieee80211_hta_controlled_access, tvb, offset, 1,
5964 proto_tree_add_uint(cap_tree, hf_ieee80211_hta_service_interval, tvb, offset, 1,
5969 /* 2 byte HT additional capabilities */
5970 capability = tvb_get_letohs (tvb, offset);
5971 cap_item = proto_tree_add_uint_format(tree, hf_ieee80211_hta_cap, tvb,
5972 offset, 2, capability,
5973 "HT Additional Capabilities: 0x%04X", capability);
5974 cap_tree = proto_item_add_subtree(cap_item, ett_hta_cap1_tree);
5975 proto_tree_add_uint(cap_tree, hf_ieee80211_hta_operating_mode, tvb, offset, 2,
5977 proto_tree_add_boolean(cap_tree, hf_ieee80211_hta_non_gf_devices, tvb, offset, 2,
5983 /* 2 byte HT additional capabilities */
5984 capability = tvb_get_letohs (tvb, offset);
5985 cap_item = proto_tree_add_uint_format(tree, hf_ieee80211_hta_cap, tvb,
5986 offset, 2, capability,
5987 "HT Additional Capabilities: 0x%04X", capability);
5988 cap_tree = proto_item_add_subtree(cap_item, ett_hta_cap2_tree);
5989 proto_tree_add_uint(cap_tree, hf_ieee80211_hta_basic_stbc_mcs, tvb, offset, 2,
5991 proto_tree_add_boolean(cap_tree, hf_ieee80211_hta_dual_stbc_protection, tvb, offset, 2,
5993 proto_tree_add_boolean(cap_tree, hf_ieee80211_hta_secondary_beacon, tvb, offset, 2,
5995 proto_tree_add_boolean(cap_tree, hf_ieee80211_hta_lsig_txop_protection, tvb, offset, 2,
5997 proto_tree_add_boolean(cap_tree, hf_ieee80211_hta_pco_active, tvb, offset, 2,
5999 proto_tree_add_boolean(cap_tree, hf_ieee80211_hta_pco_phase, tvb, offset, 2,
6004 /* 16 byte Supported MCS set */
6005 dissect_mcs_set(tree, tvb, offset, FALSE, TRUE);
6009 if (tag_val_off < tag_len)
6010 proto_tree_add_string(tree, hf_ieee80211_tag_interpretation, tvb, offset,
6011 tag_len - tag_val_off, "Not interpreted");
6014 /* 802.11n-D1.10 and 802.11n-D2.0, 7.1.3.5a */
6018 * "The Order field is 1 bit in length and is set to 1 in any non-QoS Data
6019 * frame that contains an MSDU, or fragment thereof, which is being
6020 * transferred using the StrictlyOrdered service class. The presence of the
6021 * HT Control field in frames is indicated by setting the Order field to 1
6022 * in any Data type or Management type frame that is transmitted with a
6023 * value of HT_GF or HT_MM for the FORMAT parameter of the TXVECTOR except
6024 * a non-QoS Data frame or a Control Wrapper frame. The Order field is set
6025 * to 0 in all other frames. All non-HT QoS STAs set the Order field to 0."
6027 * ...so does this mean that we can check for the presence of +HTC by
6028 * looking for QoS frames with the Order bit set, or do we need extra
6029 * information from the PHY (which would be monumentally silly)?
6031 * At any rate, it doesn't look like any equipment we have produces
6032 * +HTC frames, so the code is completely untested.
6036 dissect_ht_control(proto_tree *tree, tvbuff_t * tvb, int offset)
6039 proto_tree *htc_tree, *lac_subtree;
6042 htc = tvb_get_letohs(tvb, offset);
6044 ti = proto_tree_add_item(tree, hf_ieee80211_htc, tvb, offset, 4, TRUE);
6045 htc_tree = proto_item_add_subtree(ti, ett_htc_tree);
6047 /* Start: Link Adaptation Control */
6048 ti = proto_tree_add_item(htc_tree, hf_ieee80211_htc_lac, tvb, offset, 2, TRUE);
6049 lac_subtree = proto_item_add_subtree(ti, ett_htc_tree);
6050 proto_tree_add_item(lac_subtree, hf_ieee80211_htc_lac_reserved, tvb, offset, 1, htc);
6051 proto_tree_add_item(lac_subtree, hf_ieee80211_htc_lac_trq, tvb, offset, 1, TRUE);
6053 if (HTC_IS_ASELI(htc)) {
6054 proto_tree_add_uint(lac_subtree, hf_ieee80211_htc_lac_mai_aseli, tvb, offset, 1, htc);
6056 proto_tree_add_item(lac_subtree, hf_ieee80211_htc_lac_mai_mrq, tvb, offset, 1, TRUE);
6057 if (HTC_LAC_MAI_MRQ(htc)){
6058 proto_tree_add_uint(lac_subtree, hf_ieee80211_htc_lac_mai_msi, tvb, offset, 1, htc);
6060 proto_tree_add_uint(lac_subtree, hf_ieee80211_htc_lac_mai_reserved, tvb, offset, 1, htc);
6064 proto_tree_add_uint(lac_subtree, hf_ieee80211_htc_lac_mfsi, tvb, offset, 2, htc);
6067 if (HTC_IS_ASELI(htc)) {
6068 proto_tree_add_uint(lac_subtree, hf_ieee80211_htc_lac_asel_command, tvb, offset, 1, htc);
6069 proto_tree_add_uint(lac_subtree, hf_ieee80211_htc_lac_asel_data, tvb, offset, 1, htc);
6071 proto_tree_add_uint(lac_subtree, hf_ieee80211_htc_lac_mfb, tvb, offset, 1, htc);
6073 /* End: Link Adaptation Control */
6076 htc = tvb_get_letohs(tvb, offset);
6078 proto_tree_add_uint(htc_tree, hf_ieee80211_htc_cal_pos, tvb, offset, 1, htc);
6079 proto_tree_add_uint(htc_tree, hf_ieee80211_htc_cal_seq, tvb, offset, 1, htc);
6080 proto_tree_add_uint(htc_tree, hf_ieee80211_htc_reserved1, tvb, offset, 1, htc);
6081 proto_tree_add_uint(htc_tree, hf_ieee80211_htc_csi_steering, tvb, offset, 1, htc);
6084 proto_tree_add_boolean(htc_tree, hf_ieee80211_htc_ndp_announcement, tvb, offset, 1, htc);
6085 proto_tree_add_uint(htc_tree, hf_ieee80211_htc_reserved2, tvb, offset, 1, htc);
6086 proto_tree_add_boolean(htc_tree, hf_ieee80211_htc_ac_constraint, tvb, offset, 1, htc);
6087 proto_tree_add_boolean(htc_tree, hf_ieee80211_htc_rdg_more_ppdu, tvb, offset, 1, htc);
6091 dissect_frame_control(proto_tree * tree, tvbuff_t * tvb, gboolean wlan_broken_fc,
6094 guint16 fcf, flags, frame_type_subtype;
6095 proto_tree *fc_tree, *flag_tree;
6096 proto_item *fc_item, *flag_item, *hidden_item;
6098 fcf = FETCH_FCF(offset);
6100 flags = FCF_FLAGS(fcf);
6101 frame_type_subtype = COMPOSE_FRAME_TYPE(fcf);
6103 proto_tree_add_uint (tree, hf_ieee80211_fc_frame_type_subtype,
6104 tvb, wlan_broken_fc?offset+1:offset, 1,
6105 frame_type_subtype);
6107 fc_item = proto_tree_add_uint_format (tree, hf_ieee80211_fc_field, tvb,
6108 offset, 2, fcf, "Frame Control: 0x%04X (%s)",
6109 fcf, wlan_broken_fc?"Swapped":"Normal");
6111 fc_tree = proto_item_add_subtree (fc_item, ett_fc_tree);
6113 proto_tree_add_uint (fc_tree, hf_ieee80211_fc_proto_version, tvb, wlan_broken_fc?offset+1:offset, 1,
6114 FCF_PROT_VERSION (fcf));
6116 proto_tree_add_uint (fc_tree, hf_ieee80211_fc_frame_type, tvb, wlan_broken_fc?offset+1:offset, 1,
6117 FCF_FRAME_TYPE (fcf));
6119 proto_tree_add_uint (fc_tree, hf_ieee80211_fc_frame_subtype, tvb, wlan_broken_fc?offset+1:offset, 1,
6120 FCF_FRAME_SUBTYPE (fcf));
6122 flag_item = proto_tree_add_uint_format (fc_tree, hf_ieee80211_fc_flags, tvb,
6123 wlan_broken_fc?offset:offset+1, 1,
6124 flags, "Flags: 0x%X", flags);
6126 flag_tree = proto_item_add_subtree (flag_item, ett_proto_flags);
6127 proto_tree_add_uint (flag_tree, hf_ieee80211_fc_data_ds, tvb, wlan_broken_fc?offset:offset+1, 1,
6128 FLAGS_DS_STATUS (flags));
6129 hidden_item = proto_tree_add_boolean (flag_tree, hf_ieee80211_fc_to_ds, tvb, offset+1, 1, flags);
6130 PROTO_ITEM_SET_HIDDEN(hidden_item);
6131 hidden_item = proto_tree_add_boolean (flag_tree, hf_ieee80211_fc_from_ds, tvb, offset+1, 1, flags);
6132 PROTO_ITEM_SET_HIDDEN(hidden_item);
6133 proto_tree_add_boolean (flag_tree, hf_ieee80211_fc_more_frag, tvb, wlan_broken_fc?offset:offset+1, 1,
6135 proto_tree_add_boolean (flag_tree, hf_ieee80211_fc_retry, tvb, wlan_broken_fc?offset:offset+1, 1,
6137 proto_tree_add_boolean (flag_tree, hf_ieee80211_fc_pwr_mgt, tvb, wlan_broken_fc?offset:offset+1, 1,
6139 proto_tree_add_boolean (flag_tree, hf_ieee80211_fc_more_data, tvb, wlan_broken_fc?offset:offset+1, 1,
6141 proto_tree_add_boolean (flag_tree, hf_ieee80211_fc_protected, tvb, wlan_broken_fc?offset:offset+1, 1,
6143 proto_tree_add_boolean (flag_tree, hf_ieee80211_fc_order, tvb, wlan_broken_fc?offset:offset+1, 1,
6148 dissect_vendor_ie_ht(proto_item * item, proto_tree * tree, tvbuff_t * tag_tvb)
6150 gint tag_len = tvb_length(tag_tvb);
6152 proto_tree_add_string(tree, hf_ieee80211_tag_interpretation, tag_tvb, 0, 3, "802.11n (Pre) OUI");
6153 /* 802.11n OUI Information Element */
6154 if (4 <= tag_len && !tvb_memeql(tag_tvb, 0, PRE_11N_OUI"\x33", 4)) {
6155 proto_tree_add_string(tree, hf_ieee80211_tag_interpretation, tag_tvb, 3, 1,"802.11n (Pre) HT information" );
6157 dissect_ht_capability_ie(tree, tag_tvb, 4, tag_len - 4, TRUE);
6158 proto_item_append_text(item, ": HT Capabilities (802.11n D1.10)");
6161 if (4 <= tag_len && !tvb_memeql(tag_tvb, 0, PRE_11N_OUI"\x34", 4)) {
6162 proto_tree_add_string(tree, hf_ieee80211_tag_interpretation, tag_tvb, 3, 1, "HT additional information (802.11n D1.00)");
6164 dissect_ht_info_ie_1_0(tree, tag_tvb, 4, tag_len - 4);
6165 proto_item_append_text(item, ": HT Additional Capabilities (802.11n D1.00)");
6168 proto_tree_add_string(tree, hf_ieee80211_tag_interpretation, tag_tvb, 3, 1, "Unknown type");
6169 proto_item_append_text(item, ": 802.11n (pre) Unknown type");
6170 proto_tree_add_string(tree, hf_ieee80211_tag_interpretation, tag_tvb, 4,
6171 tag_len - 4, "Not interpreted");
6177 /* ************************************************************************* */
6178 /* Dissect and add tagged (optional) fields to proto tree */
6179 /* ************************************************************************* */
6183 static const value_string environment_vals[] = {
6185 { 0x4f, "Outdoor" },
6190 static int beacon_padding = 0; /* beacon padding bug */
6192 add_tagged_field(packet_info * pinfo, proto_tree * tree, tvbuff_t * tvb, int offset)
6196 const guint8 *tag_data_ptr;
6197 guint32 tag_no, tag_len;
6199 char out_buff[SHORT_STR];
6200 char print_buff[SHORT_STR];
6201 proto_tree * orig_tree=tree;
6202 proto_item *ti = NULL, *ti_len = NULL;
6204 guint8 tag_len_len; /* The length of the length parameter in bytes*/
6206 tag_no = tvb_get_guint8(tvb, offset);
6207 #ifndef MESH_OVERRIDES
6208 if(tag_no == TAG_WSIE){
6210 tag_len = tvb_get_letohl(tvb, offset + 1);
6212 #endif /* MESH_OVERRIDES */
6215 tag_len = tvb_get_guint8(tvb, offset + 1);
6217 tag_end = offset + 2 + tag_len;
6219 ti = proto_tree_add_item(orig_tree, hf_ieee80211_tag, tvb, offset, 2 + tag_len , FALSE);
6220 proto_item_append_text(ti, ": %s", rval_to_str(tag_no, tag_num_vals, "Reserved tag Number"));
6222 tree = proto_item_add_subtree(ti, ett_80211_mgt_ie);
6224 proto_tree_add_item(tree, hf_ieee80211_tag_number, tvb, offset, 1, FALSE);
6227 ti_len = proto_tree_add_uint(tree, hf_ieee80211_tag_length, tvb, offset + 1, tag_len_len, tag_len);
6232 case TAG_SSID: /* 7.3.2.1 SSID element (0) */
6233 if(beacon_padding == 0) /* padding bug */
6235 guint8 *ssid; /* The SSID may consist of arbitrary bytes */
6237 if(tag_len > MAX_SSID_LEN) {
6238 expert_add_info_format(pinfo, ti_len, PI_MALFORMED, PI_ERROR,
6239 "SSID length (%u) greater than maximum (%u)",
6240 tag_len, MAX_SSID_LEN);
6243 ssid = tvb_get_ephemeral_string(tvb, offset + 2, tag_len);
6244 #ifdef HAVE_AIRPDCAP
6245 AirPDcapSetLastSSID(&airpdcap_ctx, (CHAR *) ssid, tag_len);
6247 proto_tree_add_item(tree, hf_ieee80211_tag_ssid, tvb, offset + 2, tag_len, FALSE);
6249 proto_item_append_text(ti, ": %s", ssid);
6251 col_append_fstr(pinfo->cinfo, COL_INFO, ", SSID=%s", ssid );
6254 memcpy(wlan_stats.ssid, ssid, MIN(tag_len, MAX_SSID_LEN));
6255 wlan_stats.ssid_len = tag_len;
6257 proto_item_append_text(ti, ": Broadcast");
6259 col_append_str(pinfo->cinfo, COL_INFO, ", SSID=Broadcast");
6262 beacon_padding++; /* padding bug */
6266 case TAG_SUPP_RATES: /* 7.3.2.2 Supported Rates element (1) */
6267 case TAG_EXT_SUPP_RATES:
6270 expert_add_info_format(pinfo, ti_len, PI_MALFORMED, PI_ERROR, "Tag length %u too short, must be greater than 0", tag_len);
6275 while(offset < tag_end)
6277 proto_tree_add_item(tree, hf_ieee80211_tag_supp_rates, tvb, offset, 1, FALSE);
6278 proto_item_append_text(ti, " %s,", val_to_str(tvb_get_guint8(tvb, offset), ieee80211_supported_rates_vals, "Unknown Rate") );
6281 proto_item_append_text(ti, " [Mbit/sec]");
6284 case TAG_FH_PARAMETER: /* 7.3.2.3 FH Parameter Set element (2) */
6287 expert_add_info_format(pinfo, ti_len, PI_MALFORMED, PI_ERROR, "Tag length %u too short, must be >= 5", tag_len);
6292 proto_tree_add_item(tree, hf_ieee80211_tag_fh_dwell_time, tvb, offset, 2, TRUE);
6295 proto_tree_add_item(tree, hf_ieee80211_tag_fh_hop_set, tvb, offset, 1, TRUE);
6298 proto_tree_add_item(tree, hf_ieee80211_tag_fh_hop_pattern, tvb, offset, 1, TRUE);
6301 proto_tree_add_item(tree, hf_ieee80211_tag_fh_hop_index, tvb, offset, 1, TRUE);
6305 case TAG_DS_PARAMETER: /* 7.3.2.4 DS Parameter Set element (3) */
6308 expert_add_info_format(pinfo, ti_len, PI_MALFORMED, PI_ERROR, "Tag length %u wrong, must be = 1", tag_len);
6313 proto_tree_add_item(tree, hf_ieee80211_tag_ds_param_channel, tvb, offset , 1, FALSE);
6315 proto_item_append_text(ti, " : Current Channel: %u", tvb_get_guint8(tvb, offset));
6317 wlan_stats.channel = tvb_get_guint8(tvb, offset);
6320 case TAG_CF_PARAMETER: /* 7.3.2.5 CF Parameter Set element (4) */
6323 expert_add_info_format(pinfo, ti_len, PI_MALFORMED, PI_ERROR, "Tag length %u wrong, must be = 6", tag_len);
6328 proto_tree_add_item(tree, hf_ieee80211_tag_cfp_count, tvb, offset , 1, FALSE);
6329 proto_item_append_text(ti, ": CFP count %u", tvb_get_guint8(tvb, offset));
6332 proto_tree_add_item(tree, hf_ieee80211_tag_cfp_period, tvb, offset , 1, FALSE);
6333 proto_item_append_text(ti, ": CFP Period %u", tvb_get_guint8(tvb, offset));
6336 proto_tree_add_item(tree, hf_ieee80211_tag_cfp_max_duration, tvb, offset , 2, TRUE);
6337 proto_item_append_text(ti, ": CFP Max Duration %u", tvb_get_letohs(tvb, offset));
6340 proto_tree_add_item(tree, hf_ieee80211_tag_cfp_dur_remaining, tvb, offset , 2, TRUE);
6341 proto_item_append_text(ti, ": CFP Dur Remaining %u", tvb_get_letohs(tvb, offset));
6345 case TAG_TIM: /* 7.3.2.6 TIM (5) */
6347 proto_tree *bmapctl_tree;
6348 proto_item *bmapctl_item;
6351 expert_add_info_format(pinfo, ti_len, PI_MALFORMED, PI_ERROR, "Tag length %u too short, must be >= 4", tag_len);
6356 proto_tree_add_item(tree, hf_ieee80211_tim_dtim_count, tvb, offset, 1, TRUE);
6357 proto_item_append_text(ti, ": DTIM %u of", tvb_get_guint8(tvb, offset));
6360 proto_tree_add_item(tree, hf_ieee80211_tim_dtim_period, tvb, offset, 1, TRUE);
6361 proto_item_append_text(ti, " %u bitmap", tvb_get_guint8(tvb, offset + 1));
6364 bmapctl_item = proto_tree_add_item(tree, hf_ieee80211_tim_bmapctl, tvb, offset, 1, TRUE);
6365 bmapctl_tree = proto_item_add_subtree(bmapctl_item, ett_tag_bmapctl_tree);
6366 proto_tree_add_item(bmapctl_tree, hf_ieee80211_tim_bmapctl_mcast, tvb, offset, 1, TRUE);
6367 proto_tree_add_item(bmapctl_tree, hf_ieee80211_tim_bmapctl_offset, tvb, offset, 1, TRUE);
6370 proto_tree_add_item(tree, hf_ieee80211_tim_partial_virtual_bitmap, tvb, offset, tag_len - 3, TRUE);
6374 case TAG_IBSS_PARAMETER: /* 7.3.2.7 IBSS Parameter Set element (6) */
6377 expert_add_info_format(pinfo, ti_len, PI_MALFORMED, PI_ERROR, "Tag length %u wrong, must be = 2", tag_len);
6382 proto_tree_add_item(tree, hf_ieee80211_tag_ibss_atim_window, tvb, offset, 2, TRUE);
6383 proto_item_append_text(ti, ": ATIM window 0x%x", tvb_get_letohs(tvb, offset));
6386 case TAG_COUNTRY_INFO: /* 7.3.2.9 Country information element (7) */
6388 proto_tree *sub_tree;
6389 proto_item *sub_item;
6392 expert_add_info_format(pinfo, ti_len, PI_MALFORMED, PI_ERROR, "Tag length %u too short, must be >= 6", tag_len);
6397 proto_tree_add_item(tree, hf_ieee80211_tag_country_info_code, tvb, offset, 2, FALSE);
6398 proto_item_append_text(ti, ": Country Code %s", tvb_get_ephemeral_string(tvb, offset, 2));
6401 proto_tree_add_item(tree, hf_ieee80211_tag_country_info_env, tvb, offset, 1, FALSE);
6402 proto_item_append_text(ti, ", Environment %s", val_to_str(tvb_get_guint8(tvb, offset), environment_vals,"Unknown (0x%02x)"));
6405 while(offset < tag_end)
6407 if(tvb_get_guint8(tvb, offset) <= 200) { /* 802.11d */
6408 sub_item = proto_tree_add_item(tree, hf_ieee80211_tag_country_info_fnm, tvb, offset, 3, FALSE);
6409 sub_tree = proto_item_add_subtree(sub_item, ett_tag_country_fnm_tree);
6411 proto_tree_add_item(sub_tree, hf_ieee80211_tag_country_info_fnm_fcn, tvb, offset, 1, FALSE);
6412 proto_item_append_text(sub_item, ": First Channel Number: %d", tvb_get_guint8(tvb, offset));
6414 proto_tree_add_item(sub_tree, hf_ieee80211_tag_country_info_fnm_nc, tvb, offset, 1, FALSE);
6415 proto_item_append_text(sub_item, ", Number of Channels: %d", tvb_get_guint8(tvb, offset));
6417 proto_tree_add_item(sub_tree, hf_ieee80211_tag_country_info_fnm_mtpl, tvb, offset, 1, FALSE);
6418 proto_item_append_text(sub_item, ", Maximum Transmit Power Level: %d dBm", tvb_get_guint8(tvb, offset));
6420 } else { /* 802.11j */
6421 sub_item = proto_tree_add_item(tree, hf_ieee80211_tag_country_info_rrc, tvb, offset, 3, FALSE);
6422 sub_tree = proto_item_add_subtree(sub_item, ett_tag_country_rcc_tree);
6424 proto_tree_add_item(sub_tree, hf_ieee80211_tag_country_info_rrc_rei, tvb, offset, 1, FALSE);
6425 proto_item_append_text(sub_item, ": Regulatory Extension Identifier: %d", tvb_get_guint8(tvb, offset));
6427 proto_tree_add_item(sub_tree, hf_ieee80211_tag_country_info_rrc_rc, tvb, offset, 1, FALSE);
6428 proto_item_append_text(sub_item, ", Regulatory Class: %d", tvb_get_guint8(tvb, offset));
6430 proto_tree_add_item(sub_tree, hf_ieee80211_tag_country_info_rrc_cc, tvb, offset, 1, FALSE);
6431 proto_item_append_text(sub_item, ", Coverage Class: %d", tvb_get_guint8(tvb, offset));
6440 case TAG_FH_HOPPING_PARAMETER: /* 7.3.2.10 Hopping Pattern Parameters information element (8) */
6443 expert_add_info_format(pinfo, ti_len, PI_MALFORMED, PI_ERROR, "Tag length %u too short, must be >= 2", tag_len);
6448 proto_tree_add_item(tree, hf_ieee80211_tag_fh_hopping_parameter_prime_radix, tvb, offset, 1, FALSE);
6449 proto_item_append_text(ti, ": Prime Radix: %u", tvb_get_guint8(tvb, offset));
6452 proto_tree_add_item(tree, hf_ieee80211_tag_fh_hopping_parameter_nb_channels, tvb, offset, 1, FALSE);
6453 proto_item_append_text(ti, ", Number of Channels: %u", tvb_get_guint8(tvb, offset));
6457 case TAG_FH_HOPPING_TABLE: /* 7.3.2.11 Hopping Pattern Table information element (9) */
6460 expert_add_info_format(pinfo, ti_len, PI_MALFORMED, PI_ERROR, "Tag length %u too short, must be >= 4", tag_len);
6465 proto_tree_add_item(tree, hf_ieee80211_tag_fh_hopping_table_flag, tvb, offset, 1, FALSE);
6468 proto_tree_add_item(tree, hf_ieee80211_tag_fh_hopping_table_number_of_sets, tvb, offset, 1, FALSE);
6471 proto_tree_add_item(tree, hf_ieee80211_tag_fh_hopping_table_modulus, tvb, offset, 1, FALSE);
6474 proto_tree_add_item(tree, hf_ieee80211_tag_fh_hopping_table_offset, tvb, offset, 1, FALSE);
6477 while(offset < tag_end )
6479 proto_tree_add_item(tree, hf_ieee80211_tag_fh_hopping_random_table, tvb, offset, 2, FALSE);
6484 case TAG_REQUEST: /* 7.3.2.12 Request information element (10) */
6485 while(offset < tag_end )
6487 proto_tree_add_item(tree, hf_ieee80211_tag_request, tvb, offset, 1, FALSE);
6492 case TAG_QBSS_LOAD: /* 7.3.2.28 BSS Load element (11) */
6493 if (tag_len < 4 || tag_len >5)
6495 expert_add_info_format(pinfo, ti_len, PI_MALFORMED, PI_ERROR, "Tag Length %u wrong, must be = 4 or 5", tag_len);
6501 /* QBSS Version 1 */
6502 proto_item_append_text(ti, " Cisco QBSS Version 1 - non CCA");
6504 /* Extract Values */
6505 proto_tree_add_uint(tree, hf_ieee80211_qbss_version, tvb, offset + 2, tag_len, 1);
6506 proto_tree_add_item(tree, hf_ieee80211_qbss_scount, tvb, offset + 2, 2, TRUE);
6507 proto_tree_add_item(tree, hf_ieee80211_qbss_cu, tvb, offset + 4, 1, FALSE);
6508 proto_tree_add_item(tree, hf_ieee80211_qbss_adc, tvb, offset + 5, 1, FALSE);
6510 else if (tag_len == 5)
6512 /* QBSS Version 2 */
6513 proto_item_append_text(ti, " 802.11e CCA Version");
6515 /* Extract Values */
6516 proto_tree_add_uint(tree, hf_ieee80211_qbss_version, tvb, offset + 2, tag_len, 2);
6517 proto_tree_add_item(tree, hf_ieee80211_qbss_scount, tvb, offset + 2, 2, TRUE);
6518 proto_tree_add_item(tree, hf_ieee80211_qbss_cu, tvb, offset + 4, 1, FALSE);
6519 proto_tree_add_item(tree, hf_ieee80211_qbss_adc, tvb, offset + 5, 2, TRUE);
6523 case TAG_TSPEC: /* 7.3.2.30 TSPEC element (13) */
6526 expert_add_info_format(pinfo, ti_len, PI_MALFORMED, PI_ERROR, "Tag Length %u wrong, must be = 55", tag_len);
6531 add_fixed_field(tree, tvb, offset, FIELD_QOS_TS_INFO);
6534 proto_tree_add_item(tree, hf_ieee80211_tspec_nor_msdu, tvb, offset, 2, TRUE);
6537 proto_tree_add_item(tree, hf_ieee80211_tspec_max_msdu, tvb, offset, 2, TRUE);
6540 proto_tree_add_item(tree, hf_ieee80211_tspec_min_srv, tvb, offset, 4, TRUE);
6543 proto_tree_add_item(tree, hf_ieee80211_tspec_max_srv, tvb, offset, 4, TRUE);
6546 proto_tree_add_item(tree, hf_ieee80211_tspec_inact_int, tvb, offset, 4, TRUE);
6549 proto_tree_add_item(tree, hf_ieee80211_tspec_susp_int, tvb, offset, 4, TRUE);
6552 proto_tree_add_item(tree, hf_ieee80211_tspec_srv_start, tvb, offset, 4, TRUE);
6555 proto_tree_add_item(tree, hf_ieee80211_tspec_min_data, tvb, offset, 4, TRUE);
6558 proto_tree_add_item(tree, hf_ieee80211_tspec_mean_data, tvb, offset, 4, TRUE);
6561 proto_tree_add_item(tree, hf_ieee80211_tspec_peak_data, tvb, offset, 4, TRUE);
6564 proto_tree_add_item(tree, hf_ieee80211_tspec_burst_size, tvb, offset, 4, TRUE);
6567 proto_tree_add_item(tree, hf_ieee80211_tspec_delay_bound, tvb, offset, 4, TRUE);
6570 proto_tree_add_item(tree, hf_ieee80211_tspec_min_phy, tvb, offset, 4, TRUE);
6573 proto_tree_add_item(tree, hf_ieee80211_tspec_surplus, tvb, offset, 2, TRUE);
6576 proto_tree_add_item(tree, hf_ieee80211_tspec_medium, tvb, offset, 2, TRUE);
6581 case TAG_TCLAS: /* 7.3.2.31 TCLAS element (14) */
6584 expert_add_info_format(pinfo, ti_len, PI_MALFORMED, PI_ERROR, "Tag length %u too short, must be >= 6", tag_len);
6592 proto_tree_add_item(tree, hf_ieee80211_tclas_up, tvb, offset, 1, TRUE);
6593 type = tvb_get_guint8(tvb, offset);
6596 proto_tree_add_item(tree, hf_ieee80211_tclas_class_type, tvb, offset, 1, TRUE);
6599 proto_tree_add_item(tree, hf_ieee80211_tclas_class_mask, tvb, offset, 1, TRUE);
6605 proto_tree_add_item(tree, hf_ieee80211_tclas_src_mac_addr, tvb, offset, 6, TRUE);
6608 proto_tree_add_item(tree, hf_ieee80211_tclas_dst_mac_addr, tvb, offset, 6, TRUE);
6611 proto_tree_add_item(tree, hf_ieee80211_tclas_ether_type, tvb, offset, 2, TRUE);
6616 version = tvb_get_guint8(tvb, offset + 5);
6617 proto_tree_add_item(tree, hf_ieee80211_tclas_version, tvb, offset + 5, 1, TRUE);
6621 proto_tree_add_item(tree, hf_ieee80211_tclas_ipv4_src, tvb, offset, 4, FALSE);
6623 proto_tree_add_item(tree, hf_ieee80211_tclas_ipv4_dst, tvb, offset, 4, FALSE);
6625 proto_tree_add_item(tree, hf_ieee80211_tclas_src_port, tvb, offset, 2, FALSE);
6627 proto_tree_add_item(tree, hf_ieee80211_tclas_dst_port, tvb, offset, 2, FALSE);
6629 proto_tree_add_item(tree, hf_ieee80211_tclas_dscp, tvb, offset, 1, FALSE);
6631 proto_tree_add_item(tree, hf_ieee80211_tclas_protocol, tvb, offset, 1, FALSE);
6634 else if (version == 6)
6636 proto_tree_add_item(tree, hf_ieee80211_tclas_ipv6_src, tvb, offset, 16, FALSE);
6638 proto_tree_add_item(tree, hf_ieee80211_tclas_ipv6_dst, tvb, offset, 16, FALSE);
6640 proto_tree_add_item(tree, hf_ieee80211_tclas_src_port, tvb, offset, 2, FALSE);
6642 proto_tree_add_item(tree, hf_ieee80211_tclas_dst_port, tvb, offset, 2, FALSE);
6644 proto_tree_add_item(tree, hf_ieee80211_tclas_flow, tvb, offset, 3, FALSE);
6650 proto_tree_add_item(tree, hf_ieee80211_tclas_tag_type, tvb, offset, 2, TRUE);
6660 case TAG_SCHEDULE: /* 7.3.2.34 Schedule element (15) */
6663 expert_add_info_format(pinfo, ti_len, PI_MALFORMED, PI_ERROR, "Tag Length %u wrong, must be = 14", tag_len);
6668 add_fixed_field(tree, tvb, offset, FIELD_SCHEDULE_INFO);
6671 proto_tree_add_item(tree, hf_ieee80211_sched_srv_start, tvb, offset, 4, TRUE);
6674 proto_tree_add_item(tree, hf_ieee80211_sched_srv_int, tvb, offset, 4, TRUE);
6677 proto_tree_add_item(tree, hf_ieee80211_sched_spec_int, tvb, offset, 2, TRUE);
6681 case TAG_CHALLENGE_TEXT: /* 7.3.2.8 Challenge Text element (16) */
6683 proto_tree_add_item(tree, hf_ieee80211_tag_challenge_text, tvb, offset, tag_len, FALSE);
6686 case TAG_POWER_CONSTRAINT: /* 7.3.2.15 Power Constraint element (32) */
6690 expert_add_info_format(pinfo, ti_len, PI_MALFORMED, PI_ERROR, "Tag Length %u wrong, must be = 1", tag_len);
6695 proto_tree_add_item(tree, hf_ieee80211_tag_power_constraint_local, tvb, offset, 1, TRUE);
6696 proto_item_append_text(ti, " :%d", tvb_get_guint8(tvb, offset));
6702 case TAG_POWER_CAPABILITY: /* 7.3.2.16 Power Capability element (33) */
6706 expert_add_info_format(pinfo, ti_len, PI_MALFORMED, PI_ERROR, "Tag Length %u wrong, must be = 2", tag_len);
6711 proto_tree_add_item(tree, hf_ieee80211_tag_power_capability_min, tvb, offset, 1, TRUE);
6712 proto_item_append_text(ti, " Min: %d", tvb_get_guint8(tvb, offset));
6715 proto_tree_add_item(tree, hf_ieee80211_tag_power_capability_max, tvb, offset, 1, TRUE);
6716 proto_item_append_text(ti, ", Max :%d", tvb_get_guint8(tvb, offset));
6721 case TAG_TPC_REQUEST: /* 7.3.2.18 TPC Request element (34) */
6725 expert_add_info_format(pinfo, ti_len, PI_MALFORMED, PI_ERROR, "Tag Length %u wrong, must be = 0", tag_len);
6734 case TAG_TPC_REPORT: /* 7.3.2.18 TPC Report element (35) */
6738 expert_add_info_format(pinfo, ti_len, PI_MALFORMED, PI_ERROR, "Tag Length %u wrong, must be = 2", tag_len);
6743 proto_tree_add_item(tree, hf_ieee80211_tag_tpc_report_trsmt_pow, tvb, offset, 1, TRUE);
6744 proto_item_append_text(ti, " Transmit Power :%d", tvb_get_guint8(tvb, offset));
6747 proto_tree_add_item(tree, hf_ieee80211_tag_tpc_report_link_mrg, tvb, offset, 1, TRUE);
6748 proto_item_append_text(ti, ", Link Margin :%d", tvb_get_guint8(tvb, offset));
6754 case TAG_SUPPORTED_CHANNELS: /* 7.3.2.19 Supported Channels element (36) */
6756 proto_item *chan_item;
6757 proto_tree *chan_tree;
6761 if (tag_len % 2 == 1) {
6762 expert_add_info_format(pinfo, ti_len, PI_MALFORMED, PI_ERROR, "Tag length %u must be even",tag_len);
6765 while(offset < tag_end)
6767 chan_item = proto_tree_add_item(tree, hf_ieee80211_tag_supported_channels, tvb, offset, 2, FALSE);
6768 proto_item_append_text(chan_item, " #%d", i);
6771 chan_tree = proto_item_add_subtree(chan_item , ett_tag_supported_channels);
6773 proto_tree_add_item(chan_tree, hf_ieee80211_tag_supported_channels_first, tvb, offset, 1, TRUE);
6774 proto_item_append_text(chan_item, " First: %d", tvb_get_guint8(tvb, offset));
6777 proto_tree_add_item(chan_tree, hf_ieee80211_tag_supported_channels_range, tvb, offset, 1, TRUE);
6778 proto_item_append_text(chan_item, ", Range: %d ", tvb_get_guint8(tvb, offset));
6784 case TAG_CHANNEL_SWITCH_ANN: /* 7.3.2.20 Channel Switch Announcement element (37) */
6788 expert_add_info_format(pinfo, ti_len, PI_MALFORMED, PI_ERROR, "Tag Length %u wrong, must be = 3", tag_len);
6793 proto_tree_add_item(tree, hf_ieee80211_csa_channel_switch_mode, tvb, offset, 1, TRUE);
6794 proto_item_append_text(ti, " Mode: %d", tvb_get_guint8(tvb, offset));
6797 proto_tree_add_item(tree, hf_ieee80211_csa_new_channel_number, tvb, offset, 1, TRUE);
6798 proto_item_append_text(ti, ", Number: %d ", tvb_get_guint8(tvb, offset));
6801 proto_tree_add_item(tree, hf_ieee80211_csa_channel_switch_count, tvb, offset, 1, TRUE);
6802 proto_item_append_text(ti, ", Count: %d ", tvb_get_guint8(tvb, offset));
6806 case TAG_MEASURE_REQ: /* 7.3.2.21 Measurement Request element (38) with update from 802.11k-2008 */
6809 expert_add_info_format(pinfo, ti_len, PI_MALFORMED, PI_ERROR, "Tag length %u too short, must be >= 3", tag_len);
6813 guint8 request_type;
6815 proto_item *parent_item;
6816 proto_tree *sub_tree;
6819 tag_offset = offset;
6821 proto_tree_add_item(tree, hf_ieee80211_tag_measure_request_token, tvb, offset, 1, ENC_NA);
6824 parent_item = proto_tree_add_item(tree, hf_ieee80211_tag_measure_request_mode, tvb, offset, 1, ENC_NA);
6825 sub_tree = proto_item_add_subtree(parent_item, ett_tag_measure_request_mode_tree);
6826 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_request_mode_parallel, tvb, offset, 1, ENC_NA);
6827 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_request_mode_enable, tvb, offset, 1, ENC_NA);
6828 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_request_mode_request, tvb, offset, 1, ENC_NA);
6829 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_request_mode_report, tvb, offset, 1, ENC_NA);
6830 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_request_mode_duration_mandatory, tvb, offset, 1, ENC_NA);
6831 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_request_mode_reserved, tvb, offset, 1, ENC_NA);
6835 parent_item = proto_tree_add_item(tree, hf_ieee80211_tag_measure_request_type, tvb, offset, 1, ENC_NA);
6836 sub_tree = proto_item_add_subtree(parent_item, ett_tag_measure_request_type_tree);
6837 request_type = tvb_get_guint8 (tvb, offset);
6840 switch(request_type) {
6841 case 0: /* Basic Request */
6842 case 1: /* Clear channel assessment (CCA) request */
6843 case 2: /* Receive power indication (RPI) histogram request */
6846 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_request_channel_number, tvb, offset, 1, ENC_NA);
6849 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_request_start_time, tvb, offset, 8, ENC_LITTLE_ENDIAN);
6852 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_request_duration, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6856 case 3: /* Channel Load Request */
6857 case 4: /* Noise Histogram Request */
6859 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_request_regulatory_class, tvb, offset, 1, ENC_NA);
6862 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_request_channel_number, tvb, offset, 1, ENC_NA);
6865 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_request_randomization_interval, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6868 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_request_duration, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6870 /* TODO Add Optionnal Subelements */
6873 case 5: /* Beacon Request */
6875 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_request_regulatory_class, tvb, offset, 1, ENC_NA);
6878 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_request_channel_number, tvb, offset, 1, ENC_NA);
6881 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_request_randomization_interval, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6884 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_request_duration, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6887 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_request_measurement_mode, tvb, offset, 1, ENC_NA);
6890 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_request_bssid, tvb, offset, 6, ENC_NA);
6893 while(offset < tag_end)
6895 guint8 sub_id, sub_length, sub_tag_end;
6897 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_request_beacon_sub_id, tvb, offset, 1, ENC_NA);
6898 sub_id = tvb_get_guint8(tvb, offset);
6901 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_request_subelement_length, tvb, offset, 1, ENC_NA);
6902 sub_length = tvb_get_guint8(tvb, offset);
6904 sub_tag_end = offset + sub_length;
6907 case MEASURE_REQ_BEACON_SUB_SSID: /* SSID (0) */
6908 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_request_beacon_sub_ssid, tvb, offset, sub_length, FALSE);
6909 offset += sub_length;
6911 case MEASURE_REQ_BEACON_SUB_BRI: /* Beacon Reporting Information (1) */
6912 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_request_beacon_sub_bri_reporting_condition, tvb, offset, 1, FALSE);
6914 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_request_beacon_sub_bri_threshold_offset, tvb, offset, 1, FALSE);
6917 case MEASURE_REQ_BEACON_SUB_RD: /* Reporting Detail (2) */
6918 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_request_beacon_sub_reporting_detail, tvb, offset, 1, FALSE);
6921 case MEASURE_REQ_BEACON_SUB_REQUEST: /* Request (10) */
6922 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_request_beacon_sub_request, tvb, offset, 1, FALSE);
6925 case MEASURE_REQ_BEACON_SUB_APCP: /* Request (51) */
6929 /* no default action */
6932 if(offset < sub_tag_end)
6934 ti = proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_request_beacon_unknown, tvb, offset, sub_tag_end - offset, ENC_NA);
6935 expert_add_info_format(pinfo, ti, PI_UNDECODED, PI_WARN, " Unknown Data (not interpreted)");
6936 offset = sub_tag_end;
6942 case 6: /* Frame Request */
6944 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_request_regulatory_class, tvb, offset, 1, ENC_NA);
6947 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_request_channel_number, tvb, offset, 1, ENC_NA);
6950 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_request_randomization_interval, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6953 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_request_duration, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6956 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_request_frame_request_type, tvb, offset, 1, ENC_NA);
6959 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_request_mac_address, tvb, offset, 6, ENC_NA);
6962 /* TODO Add Optionnal Subelements */
6965 case 7: /* BSTA Statistics Request */
6967 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_request_peer_mac_address, tvb, offset, 6, ENC_NA);
6970 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_request_randomization_interval, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6973 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_request_duration, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6976 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_request_group_id, tvb, offset, 1, ENC_NA);
6979 /* TODO Add Optionnal Subelements */
6982 case 8: /* Location Configuration Indication (LCI) Request */
6984 case 9: /* Transmit Stream Measurement Request */
6986 case 255: /* Measurement Pause Request*/
6988 default: /* unknown */
6994 case TAG_MEASURE_REP: /* 7.3.2.22 Measurement Report element (39) with update from 802.11k-2008 */
6997 expert_add_info_format(pinfo, ti_len, PI_MALFORMED, PI_ERROR, "Tag length %u too short, must be >= 3", tag_len);
7001 proto_item *parent_item;
7002 proto_tree *sub_tree;
7006 proto_tree_add_item(tree, hf_ieee80211_tag_measure_report_measurement_token, tvb, offset, 1, ENC_NA);
7009 parent_item = proto_tree_add_item(tree, hf_ieee80211_tag_measure_report_mode, tvb, offset, 1, ENC_NA);
7010 sub_tree = proto_item_add_subtree(parent_item, ett_tag_measure_report_mode_tree);
7011 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_report_mode_late, tvb, offset, 1, ENC_NA);
7012 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_report_mode_incapable, tvb, offset, 1, ENC_NA);
7013 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_report_mode_refused, tvb, offset, 1, ENC_NA);
7014 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_report_mode_reserved, tvb, offset, 1, ENC_NA);
7017 report_type = tvb_get_guint8(tvb, offset);
7018 parent_item = proto_tree_add_uint(tree, hf_ieee80211_tag_measure_report_type, tvb, offset, 1, ENC_NA);
7019 sub_tree = proto_item_add_subtree(parent_item, ett_tag_measure_report_type_tree);
7024 switch (report_type) {
7025 case 0: /* Basic Report */
7027 proto_tree *sub_tree_map_field;
7029 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_report_channel_number, tvb, offset, 1, ENC_NA);
7032 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_report_start_time, tvb, offset, 8, ENC_LITTLE_ENDIAN);
7035 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_report_duration, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7039 parent_item = proto_tree_add_item(tree, hf_ieee80211_tag_measure_basic_map_field, tvb, offset, 1, ENC_NA);
7040 sub_tree_map_field = proto_item_add_subtree(parent_item, ett_tag_measure_report_basic_map_tree);
7041 proto_tree_add_item(sub_tree_map_field, hf_ieee80211_tag_measure_map_field_bss, tvb, offset, 1, ENC_NA);
7042 proto_tree_add_item(sub_tree_map_field, hf_ieee80211_tag_measure_map_field_odfm, tvb, offset, 1, ENC_NA);
7043 proto_tree_add_item(sub_tree_map_field, hf_ieee80211_tag_measure_map_field_unident_signal, tvb, offset, 1, ENC_NA);
7044 proto_tree_add_item(sub_tree_map_field, hf_ieee80211_tag_measure_map_field_radar, tvb, offset, 1, ENC_NA);
7045 proto_tree_add_item(sub_tree_map_field, hf_ieee80211_tag_measure_map_field_unmeasured, tvb, offset, 1, ENC_NA);
7046 proto_tree_add_item(sub_tree_map_field, hf_ieee80211_tag_measure_map_field_reserved, tvb, offset, 1, ENC_NA);
7049 case 1: /* Clear channel assessment (CCA) report */
7050 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_report_channel_number, tvb, offset, 1, ENC_NA);
7053 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_report_start_time, tvb, offset, 8, ENC_LITTLE_ENDIAN);
7056 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_report_duration, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7059 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_cca_busy_fraction, tvb, offset, 1, ENC_NA);
7062 case 2: /* Receive power indication (RPI) histogram report */
7063 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_report_channel_number, tvb, offset, 1, ENC_NA);
7066 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_report_start_time, tvb, offset, 8, ENC_LITTLE_ENDIAN);
7069 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_report_duration, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7072 parent_item = proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_rpi_histogram_report, tvb, offset, 8, ENC_NA);
7073 sub_tree = proto_item_add_subtree(parent_item, ett_tag_measure_report_rpi_tree);
7075 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_rpi_histogram_report_0, tvb, offset, 1, ENC_NA);
7078 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_rpi_histogram_report_1, tvb, offset, 1, ENC_NA);
7081 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_rpi_histogram_report_2, tvb, offset, 1, ENC_NA);
7084 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_rpi_histogram_report_3, tvb, offset, 1, ENC_NA);
7087 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_rpi_histogram_report_4, tvb, offset, 1, ENC_NA);
7090 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_rpi_histogram_report_5, tvb, offset, 1, ENC_NA);
7093 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_rpi_histogram_report_6, tvb, offset, 1, ENC_NA);
7096 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_rpi_histogram_report_7, tvb, offset, 1, ENC_NA);
7099 case 3: /* Channel Load Report */
7101 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_report_regulatory_class, tvb, offset, 1, ENC_NA);
7104 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_report_channel_number, tvb, offset, 1, ENC_NA);
7107 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_report_start_time, tvb, offset, 8, ENC_LITTLE_ENDIAN);
7110 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_report_duration, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7113 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_report_channel_load, tvb, offset, 1, ENC_NA);
7116 /* TODO Add Optionnal Subelements */
7119 case 4: /* Noise Histogram Report */
7120 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_report_regulatory_class, tvb, offset, 1, ENC_NA);
7123 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_report_channel_number, tvb, offset, 1, ENC_NA);
7126 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_report_start_time, tvb, offset, 8, ENC_LITTLE_ENDIAN);
7129 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_report_duration, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7132 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_report_ant_id, tvb, offset, 1, ENC_NA);
7135 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_report_anpi, tvb, offset, 1, ENC_NA);
7138 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_report_ipi_density_0, tvb, offset, 1, ENC_NA);
7141 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_report_ipi_density_1, tvb, offset, 1, ENC_NA);
7144 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_report_ipi_density_2, tvb, offset, 1, ENC_NA);
7147 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_report_ipi_density_3, tvb, offset, 1, ENC_NA);
7150 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_report_ipi_density_4, tvb, offset, 1, ENC_NA);
7153 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_report_ipi_density_5, tvb, offset, 1, ENC_NA);
7156 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_report_ipi_density_6, tvb, offset, 1, ENC_NA);
7159 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_report_ipi_density_7, tvb, offset, 1, ENC_NA);
7162 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_report_ipi_density_8, tvb, offset, 1, ENC_NA);
7165 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_report_ipi_density_9, tvb, offset, 1, ENC_NA);
7168 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_report_ipi_density_10, tvb, offset, 1, ENC_NA);
7171 /* TODO Add Optionnal Subelements */
7173 case 5: /* Beacon Report */
7175 proto_tree *sub_tree_frame_info;
7177 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_report_regulatory_class, tvb, offset, 1, ENC_NA);
7180 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_report_channel_number, tvb, offset, 1, ENC_NA);
7183 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_report_start_time, tvb, offset, 8, ENC_LITTLE_ENDIAN);
7186 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_report_duration, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7189 parent_item = proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_report_frame_info, tvb, offset, 1, ENC_NA);
7190 sub_tree_frame_info = proto_item_add_subtree(parent_item, ett_tag_measure_report_frame_tree);
7191 proto_tree_add_item(sub_tree_frame_info, hf_ieee80211_tag_measure_report_frame_info_phy_type, tvb, offset, 1, ENC_NA);
7192 proto_tree_add_item(sub_tree_frame_info, hf_ieee80211_tag_measure_report_frame_info_frame_type, tvb, offset, 1, ENC_NA);
7195 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_report_rcpi, tvb, offset, 1, ENC_NA);
7198 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_report_rsni, tvb, offset, 1, ENC_NA);
7201 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_report_bssid, tvb, offset, 6, ENC_NA);
7204 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_report_ant_id, tvb, offset, 1, ENC_NA);
7207 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_report_parent_tsf, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7209 /* TODO Add Optionnal Subelements */
7212 case 6: /* Frame Report */
7213 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_report_regulatory_class, tvb, offset, 1, ENC_NA);
7216 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_report_channel_number, tvb, offset, 1, ENC_NA);
7219 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_report_start_time, tvb, offset, 8, ENC_LITTLE_ENDIAN);
7222 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_report_duration, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7225 /* TODO Add Optionnal Subelements */
7227 case 7: /* BSTA Statistics Report */
7229 case 8: /* Location Configuration Information Report element */
7231 case 9: /* Transmit Stream Measurement Report */
7233 default: /* unknown */
7237 case TAG_TCLAS_PROCESS:
7240 expert_add_info_format(pinfo, ti_len, PI_MALFORMED, PI_ERROR, "Tag Length %u wrong, must be = 1", tag_len);
7245 proto_tree_add_item(tree, hf_ieee80211_tclass_process, tvb, offset, 1, TRUE);
7249 case TAG_ERP_INFO_OLD:
7255 proto_tree_add_text (tree, tvb, offset + 2, tag_len, "Tag length %u too short, must be >= 1",
7259 erp_info = tvb_get_guint8 (tvb, offset + 2);
7260 g_snprintf (print_buff, SHORT_STR, "%sNon-ERP STAs, %suse protection, %s preambles",
7261 erp_info & 0x01 ? "" : "no ",
7262 erp_info & 0x02 ? "" : "do not ",
7263 /* 802.11g, 7.3.2.13: 1 means "one or more ... STAs
7264 * are not short preamble capable" */
7265 erp_info & 0x04 ? "long": "short or long");
7266 g_snprintf (out_buff, SHORT_STR,
7267 "ERP info: 0x%x (%s)",erp_info,print_buff);
7268 proto_tree_add_string (tree, hf_ieee80211_tag_interpretation, tvb, offset + 2,
7270 proto_item_append_text(ti, ": %s", print_buff);
7277 proto_tree_add_text (tree, tvb, offset + 2, tag_len,
7278 "TS_DELAY tag length %u != 4", tag_len);
7281 proto_tree_add_item(tree, hf_ieee80211_ts_delay, tvb, offset + 2, 4, TRUE);
7284 case TAG_CISCO_CCX1_CKIP:
7286 * If Aironet IE support is enabled, the access point sends an Aironet
7287 * IE 0x85 (which contains the access point name, load, number of
7288 * associated clients, and so on) in the beacon and probe responses of
7289 * this WLAN, and the controller sends Aironet IEs 0x85 and 0x95
7290 * (which contains the management IP address of the controller and
7291 * the IP address of the access point) in the reassociation response
7292 * if it receives Aironet IE 0x85 in the reassociation request.
7295 /* The Name of the sending device starts at offset 10 and is up to
7296 15 or 16 bytes in length, \0 padded */
7299 proto_tree_add_text (tree, tvb, offset + 2, tag_len, "Tag length %u too short, must be >= 26",
7303 /* A cisco AP transmits the first 15 bytes of the AP name, probably
7304 followed by '\0' for ASCII termination */
7305 g_snprintf (out_buff, SHORT_STR, "%.16s",
7306 tvb_format_stringzpad(tvb, offset + 12, 16));
7307 proto_tree_add_string_format (tree, hf_ieee80211_tag_interpretation, tvb, offset + 2,
7308 tag_len, "", "Tag interpretation: Unknown + Name: %s #Clients: %u",
7310 /* Total number off associated clients and repeater access points */
7311 tvb_get_guint8(tvb, offset + 28));
7312 col_append_fstr(pinfo->cinfo, COL_INFO, ", Name=\"%s\"", out_buff);
7316 * 7.3.2.26 Vendor Specific information element
7318 * information element is in the format shown in Figure 7-75 and requires that the first 3 octets of the
7319 * information field contain the OUI of the entity that has defined the content of the particular Vendor Specific
7320 * information element. The length of the information field (n) is 3 >= n =< 255. The OUI field shall be a public
7321 * OUI assigned by the IEEE. It is 3 octets in length. The length of the vendor-specific content is n-3 octets.
7323 * Element ID Length OUI Vendor-specific content
7327 case TAG_VENDOR_SPECIFIC_IE:
7328 tvb_ensure_bytes_exist (tvb, offset + 2, tag_len);
7330 oui = tvb_get_ntoh24(tvb, offset + 2);
7331 tag_tvb = tvb_new_subset(tvb, offset + 2, tag_len, tag_len);
7332 tag_data_ptr = tvb_get_ptr(tag_tvb, 0, 3);
7333 proto_tree_add_bytes_format (tree, hf_ieee80211_tag_oui, tvb, offset + 2, 3,
7334 tag_data_ptr, "Vendor: %s", get_manuf_name(tag_data_ptr));
7335 proto_item_append_text(ti, ": %s", get_manuf_name(tag_data_ptr));
7337 proto_tree_add_item(ti, hf_ieee80211_tag_vendor_oui_type, tag_tvb,
7341 #define WPAWME_OUI 0x0050F2
7342 #define RSNOUI_VAL 0x000FAC
7343 #define PRE11N_OUI 0x00904c
7347 dissect_vendor_ie_wpawme(ti, tree, tag_tvb);
7350 dissect_vendor_ie_rsn(ti, tree, tag_tvb);
7352 case OUI_CISCOWL: /* Cisco Wireless (Aironet) */
7353 dissect_vendor_ie_aironet(ti, tree, tvb, offset + 5, tag_len - 3);
7356 dissect_vendor_ie_ht(ti, tree, tag_tvb);
7359 dissect_vendor_ie_marvell(ti, tree, tvb, offset + 5, tag_len - 3);
7362 dissect_vendor_ie_wfa(pinfo, ti, tag_tvb);
7365 dissect_vendor_ie_atheros(ti, tree, tvb, offset + 5, tag_len, pinfo, tag_end, ti_len);
7368 proto_tree_add_string (tree, hf_ieee80211_tag_interpretation, tvb, offset + 5,
7369 tag_len - 3, "Not interpreted");
7377 /* Add Expert Info to check tag_len ? */
7378 dissect_rsn_ie(tree, tvb, offset + 2, tag_len);
7381 case TAG_MOBILITY_DOMAIN:
7382 dissect_mobility_domain(tree, tvb, offset + 2, tag_len);
7385 #ifndef MESH_OVERRIDES
7386 case TAG_FAST_BSS_TRANSITION:
7387 dissect_fast_bss_transition(tree, tvb, offset + 2, tag_len);
7389 #endif /* MESH_OVERRIDES */
7392 dissect_mmie(tree, tvb, offset + 2, tag_len);
7395 case TAG_TIMEOUT_INTERVAL:
7396 dissect_timeout_interval(tree, tvb, offset + 2, tag_len);
7399 case TAG_LINK_IDENTIFIER:
7400 dissect_link_identifier(tree, tvb, offset + 2, tag_len);
7403 case TAG_WAKEUP_SCHEDULE:
7404 dissect_wakeup_schedule(tree, tvb, offset + 2, tag_len);
7407 case TAG_CHANNEL_SWITCH_TIMING:
7408 dissect_channel_switch_timing(tree, tvb, offset + 2, tag_len);
7411 case TAG_PTI_CONTROL:
7412 dissect_pti_control(tree, tvb, offset + 2, tag_len);
7415 case TAG_PU_BUFFER_STATUS:
7416 dissect_pu_buffer_status(tree, tvb, offset + 2, tag_len);
7419 case TAG_HT_CAPABILITY:
7420 dissect_ht_capability_ie(tree, tvb, offset + 2, tag_len, FALSE);
7424 dissect_ht_info_ie_1_1(tree, tvb, offset + 2, tag_len);
7426 case TAG_SECONDARY_CHANNEL_OFFSET:
7427 secondary_channel_offset_ie(tree, tvb, offset + 2, tag_len);
7430 #ifndef MESH_OVERRIDES
7431 /*** Begin: WAVE Service information element Dissection - IEEE 802.11p Draft 4.0 ***/
7433 dissect_wsie_ie(tree, tvb, offset + 3, tag_len);
7435 /*** End: WAVE Service information element Dissection - IEEE 802.11p Draft 4.0 ***/
7436 #endif /* MESH_OVERRIDES */
7440 #ifdef MESH_OVERRIDES
7441 case TAG_MESH_PEER_LINK_MGMT:
7444 proto_tree_add_item (tree, hf_ieee80211_mesh_mgt_pl_subtype, tvb, offset, 1, TRUE);
7446 switch (tvb_get_guint8(tvb, 1))
7448 case MESH_PL_PEER_LINK_OPEN:
7449 proto_tree_add_item (tree, hf_ieee80211_mesh_mgt_pl_local_link_id, tvb, offset, 2, TRUE);
7452 case MESH_PL_PEER_LINK_CONFIRM:
7453 proto_tree_add_item (tree, hf_ieee80211_mesh_mgt_pl_local_link_id, tvb, offset, 2, TRUE);
7454 proto_tree_add_item (tree, hf_ieee80211_mesh_mgt_pl_peer_link_id, tvb, offset + 2, 2, TRUE);
7457 case MESH_PL_PEER_LINK_CLOSE:
7458 proto_tree_add_item (tree, hf_ieee80211_mesh_mgt_pl_local_link_id, tvb, offset, 2, TRUE);
7459 proto_tree_add_item (tree, hf_ieee80211_mesh_mgt_pl_peer_link_id, tvb, offset + 2, 2, TRUE);
7460 proto_tree_add_item (tree, hf_ieee80211_mesh_mgt_pl_reason_code, tvb, offset + 4, 2, TRUE);
7463 /* undefined values */
7465 proto_tree_add_text (tree, tvb, offset, tag_len, "Unknown Peer Link Message Subtype");
7471 case TAG_MESH_CONFIGURATION:
7474 proto_tree_add_item (tree, hf_ieee80211_mesh_config_version, tvb, offset, 1, TRUE);
7475 proto_tree_add_item (tree, hf_ieee80211_mesh_config_path_sel_protocol, tvb, offset + 1, 4, TRUE);
7476 proto_tree_add_item (tree, hf_ieee80211_mesh_config_path_sel_metric, tvb, offset + 5, 4, TRUE);
7477 proto_tree_add_item (tree, hf_ieee80211_mesh_config_congestion_control, tvb, offset + 9, 4, TRUE);
7478 proto_tree_add_item (tree, hf_ieee80211_mesh_config_channel_prec, tvb, offset + 13, 4, TRUE);
7479 proto_tree_add_item (tree, hf_ieee80211_mesh_config_capability, tvb, offset + 17, 2, TRUE);
7487 proto_tree_add_item(tree, hf_ieee80211_mesh_id, tvb, offset, tag_len, FALSE);
7489 col_append_fstr(pinfo->cinfo, COL_INFO, ", MESHID=%s", tvb_get_ephemeral_string(tvb, offset, tag_len));
7490 proto_item_append_text(ti, ": %s", tvb_get_ephemeral_string(tvb, offset, tag_len));
7500 proto_tree *subtree;
7503 proto_tree_add_item (tree, hf_ieee80211_ff_mesh_mgt_flags, tvb, offset, 1, TRUE);
7504 proto_tree_add_item (tree, hf_ieee80211_ff_mesh_mgt_hopcount, tvb, offset + 1, 1, TRUE);
7505 proto_tree_add_item (tree, hf_ieee80211_ff_mesh_mgt_ttl, tvb, offset + 2, 1, TRUE);
7506 proto_tree_add_item (tree, hf_ieee80211_ff_mesh_mgt_rreqid, tvb, offset + 3, 4, TRUE);
7507 proto_tree_add_item (tree, hf_ieee80211_ff_mesh_mgt_sa, tvb, offset + 7, 6, FALSE);
7508 proto_tree_add_item (tree, hf_ieee80211_ff_mesh_mgt_ssn, tvb, offset + 13, 4, TRUE);
7509 /* TODO: display proxied address if present */
7510 proto_tree_add_item (tree, hf_ieee80211_ff_mesh_mgt_lifetime, tvb, offset + 17, 4, TRUE);
7511 proto_tree_add_item (tree, hf_ieee80211_ff_mesh_mgt_metric, tvb, offset + 21, 4, TRUE);
7512 proto_tree_add_item (tree, hf_ieee80211_ff_mesh_mgt_dstcount, tvb, offset + 25, 1, TRUE);
7513 flags = tvb_get_letohs (tvb, offset + 26);
7514 item = proto_tree_add_item (tree, hf_ieee80211_ff_mesh_mgt_dest_flags, tvb, offset + 26, 1, TRUE);
7515 subtree = proto_item_add_subtree(item, ett_msh_dest_flags_tree);
7516 proto_tree_add_boolean(subtree, hf_ieee80211_ff_mesh_mgt_dest_do_flags, tvb, offset + 26, 1, flags);
7517 proto_tree_add_boolean(subtree, hf_ieee80211_ff_mesh_mgt_dest_rf_flags, tvb, offset + 26, 1, flags);
7518 proto_tree_add_item (tree, hf_ieee80211_ff_mesh_mgt_da, tvb, offset + 27, 6, FALSE);
7519 proto_tree_add_item (tree, hf_ieee80211_ff_mesh_mgt_dsn, tvb, offset + 33, 4, TRUE);
7526 proto_tree_add_item (tree, hf_ieee80211_ff_mesh_mgt_flags, tvb, offset, 1, TRUE);
7527 proto_tree_add_item (tree, hf_ieee80211_ff_mesh_mgt_hopcount, tvb, offset + 1, 1, TRUE);
7528 proto_tree_add_item (tree, hf_ieee80211_ff_mesh_mgt_ttl, tvb, offset + 2, 1, TRUE);
7529 proto_tree_add_item (tree, hf_ieee80211_ff_mesh_mgt_da, tvb, offset + 3, 6, FALSE);
7530 proto_tree_add_item (tree, hf_ieee80211_ff_mesh_mgt_dsn, tvb, offset + 9, 4, TRUE);
7531 /* TODO: display proxied address if present */
7532 proto_tree_add_item (tree, hf_ieee80211_ff_mesh_mgt_lifetime, tvb, offset + 13, 4, TRUE);
7533 proto_tree_add_item (tree, hf_ieee80211_ff_mesh_mgt_metric, tvb, offset + 17, 4, TRUE);
7534 proto_tree_add_item (tree, hf_ieee80211_ff_mesh_mgt_sa, tvb, offset + 21, 6, FALSE);
7535 proto_tree_add_item (tree, hf_ieee80211_ff_mesh_mgt_ssn, tvb, offset + 27, 4, TRUE);
7542 proto_tree_add_item (tree, hf_ieee80211_ff_mesh_mgt_flags, tvb, offset, 1, TRUE);
7543 proto_tree_add_item (tree, hf_ieee80211_ff_mesh_mgt_srccount, tvb, offset + 1, 1, FALSE);
7544 proto_tree_add_item (tree, hf_ieee80211_ff_mesh_mgt_sa, tvb, offset + 2, 6, FALSE);
7545 proto_tree_add_item (tree, hf_ieee80211_ff_mesh_mgt_ssn, tvb, offset + 8, 4, TRUE);
7548 #endif /* MESH_OVERRIDES */
7551 /* The Capabilities field is a bit field indicating the capabilities being advertised
7552 * by the STA transmitting the information element
7554 case TAG_EXTENDED_CAPABILITIES:
7557 guint8 info_exchange;
7559 proto_tree *ex_cap_tree;
7563 proto_tree_add_text (tree, tvb, offset + 2, tag_len,
7564 "Extended Capabilities: Error: Tag length must be at least 1 byte long");
7568 tag_offset = offset;
7570 /* Extended Capability octet 0 */
7571 info_exchange = tvb_get_guint8 (tvb, offset);
7572 tii = proto_tree_add_item (tree, hf_ieee80211_tag_extended_capabilities, tvb, offset, 1, FALSE);
7573 ex_cap_tree = proto_item_add_subtree (tii, ett_tag_ex_cap);
7574 proto_tree_add_item (ex_cap_tree, hf_ieee80211_tag_extended_capabilities_b0, tvb, offset, 1, FALSE);
7575 proto_tree_add_item (ex_cap_tree, hf_ieee80211_tag_extended_capabilities_b1, tvb, offset, 1, FALSE);
7576 proto_tree_add_item (ex_cap_tree, hf_ieee80211_tag_extended_capabilities_b2, tvb, offset, 1, FALSE);
7577 proto_tree_add_item (ex_cap_tree, hf_ieee80211_tag_extended_capabilities_b3, tvb, offset, 1, FALSE);
7578 proto_tree_add_item (ex_cap_tree, hf_ieee80211_tag_extended_capabilities_b4, tvb, offset, 1, FALSE);
7579 proto_tree_add_item (ex_cap_tree, hf_ieee80211_tag_extended_capabilities_b6, tvb, offset, 1, FALSE);
7582 if (tag_len > offset - tag_offset) {
7583 /* Extended Capability octet 1 */
7587 if (tag_len > offset - tag_offset) {
7588 /* Extended Capability octet 2 */
7592 if (tag_len > offset - tag_offset) {
7593 /* Extended Capability octet 3 */
7594 tii = proto_tree_add_item(tree, hf_ieee80211_tag_extended_capabilities, tvb,
7596 ex_cap_tree = proto_item_add_subtree(tii, ett_tag_ex_cap);
7597 proto_tree_add_item(ex_cap_tree, hf_ieee80211_tag_extended_capabilities_b28,
7598 tvb, offset, 1, FALSE);
7599 proto_tree_add_item(ex_cap_tree, hf_ieee80211_tag_extended_capabilities_b29,
7600 tvb, offset, 1, FALSE);
7601 proto_tree_add_item(ex_cap_tree, hf_ieee80211_tag_extended_capabilities_b30,
7602 tvb, offset, 1, FALSE);
7606 if (tag_len > offset - tag_offset) {
7607 /* Extended Capability octet 4 */
7608 tii = proto_tree_add_item(tree, hf_ieee80211_tag_extended_capabilities, tvb,
7610 ex_cap_tree = proto_item_add_subtree(tii, ett_tag_ex_cap);
7611 proto_tree_add_item(ex_cap_tree, hf_ieee80211_tag_extended_capabilities_b37,
7612 tvb, offset, 1, FALSE);
7613 proto_tree_add_item(ex_cap_tree, hf_ieee80211_tag_extended_capabilities_b38,
7614 tvb, offset, 1, FALSE);
7615 proto_tree_add_item(ex_cap_tree, hf_ieee80211_tag_extended_capabilities_b39,
7616 tvb, offset, 1, FALSE);
7620 if (tag_len > offset - tag_offset) {
7621 /* Extended Capability octet 5 */
7622 tii = proto_tree_add_item(tree, hf_ieee80211_tag_extended_capabilities, tvb,
7624 ex_cap_tree = proto_item_add_subtree(tii, ett_tag_ex_cap);
7625 proto_tree_add_item(ex_cap_tree, hf_ieee80211_tag_extended_capabilities_b40,
7626 tvb, offset, 1, FALSE);
7627 proto_tree_add_item(ex_cap_tree,
7628 hf_ieee80211_tag_extended_capabilities_serv_int_granularity,
7629 tvb, offset, 1, FALSE);
7633 if (tag_len > (offset - tag_offset))
7635 proto_tree_add_text (tree, tvb, offset, tag_len - (offset - tag_offset), "Unknown Data");
7640 case TAG_ADVERTISEMENT_PROTOCOL:
7642 dissect_advertisement_protocol(pinfo, tree, tvb, offset, NULL);
7646 #ifndef MESH_OVERRIDES
7647 case TAG_NEIGHBOR_REPORT:
7649 #define SUB_TAG_TSF_INFO 0x01
7650 #define SUB_TAG_MEASUREMENT_PILOT_INFO 0x02
7651 #define SUB_TAG_HT_CAPABILITIES 0x03
7652 #define SUB_TAG_HT_INFO 0x04
7653 #define SUB_TAG_SEC_CHANNEL_OFFSET 0x05
7654 #define SUB_TAG_VENDOR_SPECIFIC 0xDD
7659 guint32 bssid_info, info, sub_tag_length;
7660 proto_item *parent_item;
7661 proto_tree *bssid_info_subtree, *sub_tag_tree;
7662 tvbuff_t *volatile sub_tag_tvb = NULL;
7666 proto_tree_add_text (tree, tvb, offset + 2, tag_len,
7667 "Neighbor Report: Error: Tag length must be at least 13 bytes long");
7671 tag_offset = offset;
7673 proto_tree_add_item(tree, hf_ieee80211_tag_neighbor_report_bssid, tvb, offset, 6, ENC_NA);
7675 /*** Begin: BSSID Information ***/
7677 bssid_info = tvb_get_letohl (tvb, offset);
7678 parent_item = proto_tree_add_uint_format(tree, hf_ieee80211_tag_neighbor_report_bssid_info, tvb, offset, 4, bssid_info, "BSSID Information: 0x%08X", bssid_info);
7679 bssid_info_subtree = proto_item_add_subtree(parent_item, ett_tag_neighbor_report_bssid_info_tree);
7681 proto_tree_add_uint(bssid_info_subtree, hf_ieee80211_tag_neighbor_report_bssid_info_reachability, tvb, offset, 1, bssid_info);
7682 proto_tree_add_uint(bssid_info_subtree, hf_ieee80211_tag_neighbor_report_bssid_info_security, tvb, offset, 1, bssid_info);
7683 proto_tree_add_uint(bssid_info_subtree, hf_ieee80211_tag_neighbor_report_bssid_info_key_scope, tvb, offset, 1, bssid_info);
7684 proto_tree_add_uint(bssid_info_subtree, hf_ieee80211_tag_neighbor_report_bssid_info_capability_spec_mng, tvb, offset, 1, bssid_info);
7685 proto_tree_add_uint(bssid_info_subtree, hf_ieee80211_tag_neighbor_report_bssid_info_capability_qos, tvb, offset, 1, bssid_info);
7686 proto_tree_add_uint(bssid_info_subtree, hf_ieee80211_tag_neighbor_report_bssid_info_capability_apsd, tvb, offset, 1, bssid_info);
7687 proto_tree_add_uint(bssid_info_subtree, hf_ieee80211_tag_neighbor_report_bssid_info_capability_radio_msnt, tvb, offset, 1, bssid_info);
7688 proto_tree_add_uint(bssid_info_subtree, hf_ieee80211_tag_neighbor_report_bssid_info_capability_dback, tvb, offset+1, 1, bssid_info);
7689 proto_tree_add_uint(bssid_info_subtree, hf_ieee80211_tag_neighbor_report_bssid_info_capability_iback, tvb, offset+1, 1, bssid_info);
7690 proto_tree_add_uint(bssid_info_subtree, hf_ieee80211_tag_neighbor_report_bssid_info_mobility_domain, tvb, offset+1, 1, bssid_info);
7691 proto_tree_add_uint(bssid_info_subtree, hf_ieee80211_tag_neighbor_report_bssid_info_high_throughput, tvb, offset+1, 1, bssid_info);
7692 proto_tree_add_uint(bssid_info_subtree, hf_ieee80211_tag_neighbor_report_bssid_info_reserved, tvb, offset+1, 3, (bssid_info & 0xfffff000) >> 12);
7693 /*** End: BSSID Information ***/
7696 info = tvb_get_guint8 (tvb, offset);
7697 proto_tree_add_uint_format(tree, hf_ieee80211_tag_neighbor_report_reg_class, tvb, offset, 1, info, "Regulatory Class: 0x%02X", info);
7700 info = tvb_get_guint8 (tvb, offset);
7701 proto_tree_add_uint_format(tree, hf_ieee80211_tag_neighbor_report_channel_number, tvb, offset, 1, info, "Channel Number: 0x%02X", info);
7704 info = tvb_get_guint8 (tvb, offset);
7705 proto_tree_add_uint_format(tree, hf_ieee80211_tag_neighbor_report_phy_type, tvb, offset, 1, info, "PHY Type: 0x%02X", info);
7708 sub_tag_id = tvb_get_guint8 (tvb, offset);
7710 sub_tag_length = tvb_get_guint8 (tvb, offset);
7713 sub_tag_tvb = tvb_new_subset(tvb, offset, sub_tag_length, -1);
7715 switch (sub_tag_id) {
7716 case SUB_TAG_TSF_INFO:
7719 case SUB_TAG_MEASUREMENT_PILOT_INFO:
7722 case SUB_TAG_HT_CAPABILITIES:
7723 parent_item = proto_tree_add_text (tree, tvb, offset, sub_tag_length, "HT Capabilities");
7724 sub_tag_tree = proto_item_add_subtree(parent_item, ett_tag_neighbor_report_sub_tag_tree);
7725 dissect_ht_capability_ie(sub_tag_tree, sub_tag_tvb, 0, sub_tag_length, FALSE);
7727 case SUB_TAG_HT_INFO:
7728 parent_item = proto_tree_add_text (tree, tvb, offset, sub_tag_length, "HT Information");
7729 sub_tag_tree = proto_item_add_subtree(parent_item, ett_tag_neighbor_report_sub_tag_tree);
7730 dissect_ht_info_ie_1_1(sub_tag_tree, sub_tag_tvb, 0, sub_tag_length);
7732 case SUB_TAG_SEC_CHANNEL_OFFSET:
7733 parent_item = proto_tree_add_text (tree, tvb, offset, sub_tag_length, "Secondary Channel Offset");
7734 sub_tag_tree = proto_item_add_subtree(parent_item, ett_tag_neighbor_report_sub_tag_tree);
7735 secondary_channel_offset_ie(sub_tag_tree, sub_tag_tvb, 0, sub_tag_length);
7737 case SUB_TAG_VENDOR_SPECIFIC:
7742 offset += sub_tag_length;
7744 if (tag_len > (offset - tag_offset))
7746 proto_tree_add_text (tree, tvb, offset, tag_len - (offset - tag_offset), "Unknown Data");
7751 #endif /* MESH_OVERRIDES */
7753 case TAG_EXTENDED_CHANNEL_SWITCH_ANNOUNCEMENT:
7759 proto_tree_add_text (tree, tvb, offset + 2, tag_len,
7760 "Extended Channel Switch Announcement: Error: Tag length must be exactly 4 bytes long");
7765 tag_offset = offset;
7767 offset+= add_fixed_field(tree, tvb, offset, FIELD_EXTENDED_CHANNEL_SWITCH_ANNOUNCEMENT);
7769 if (tag_len > (offset - tag_offset))
7771 proto_tree_add_text (tree, tvb, offset, tag_len - (offset - tag_offset), "Unknown Data");
7776 case TAG_SUPPORTED_REGULATORY_CLASSES:
7779 guint8 current_field;
7783 proto_tree_add_text (tree, tvb, offset + 2, tag_len,
7784 "Supported Regulatory Classes: Error: Tag length must be at least 2 bytes long");
7786 } else if (tag_len > 32) {
7787 proto_tree_add_text (tree, tvb, offset + 2, tag_len,
7788 "Supported Regulatory Classes: Error: Tag length must be no more than 32 bytes long");
7793 tag_offset = offset;
7795 current_field = tvb_get_guint8 (tvb, offset);
7796 proto_tree_add_uint(tree, hf_ieee80211_tag_supported_reg_classes_current, tvb, offset, 1, current_field);
7799 /* Partially taken from the ssid section */
7800 tag_data_ptr = tvb_get_ptr (tvb, offset, tag_len);
7801 for (i = 0, n = 0; i < tag_len && n < SHORT_STR; i++) {
7802 ret = g_snprintf (print_buff + n, SHORT_STR - n, (i == tag_len-1)?"%d":"%d, ", tag_data_ptr[i]);
7803 if (ret >= SHORT_STR - n) {
7804 /* ret >= <buf_size> means buffer truncated */
7809 proto_tree_add_string (tree, hf_ieee80211_tag_supported_reg_classes_alternate, tvb, offset, tag_len, print_buff);
7814 tvb_ensure_bytes_exist (tvb, offset + 2, tag_len);
7815 proto_tree_add_string (tree, hf_ieee80211_tag_interpretation, tvb, offset + 1 + tag_len_len,
7816 tag_len, "Not interpreted");
7817 proto_item_append_text(ti, ": Tag %u Len %u", tag_no, tag_len);
7821 return tag_len + 1 + tag_len_len;
7825 ieee_80211_add_tagged_parameters (tvbuff_t * tvb, int offset, packet_info * pinfo,
7826 proto_tree * tree, int tagged_parameters_len)
7830 beacon_padding = 0; /* this is for the beacon padding confused with ssid fix */
7831 while (tagged_parameters_len > 0) {
7832 if ((next_len=add_tagged_field (pinfo, tree, tvb, offset))==0)
7834 if (next_len > tagged_parameters_len) {
7835 /* XXX - flag this as an error? */
7836 next_len = tagged_parameters_len;
7839 tagged_parameters_len -= next_len;
7843 /* ************************************************************************* */
7844 /* Dissect 802.11 management frame */
7845 /* ************************************************************************* */
7847 dissect_ieee80211_mgt (guint16 fcf, tvbuff_t * tvb, packet_info * pinfo,
7850 proto_item *ti = NULL;
7851 proto_tree *mgt_tree;
7852 proto_tree *fixed_tree;
7853 proto_tree *tagged_tree;
7855 int tagged_parameter_tree_len;
7859 CHECK_DISPLAY_AS_X(data_handle,proto_wlan_mgt, tvb, pinfo, tree);
7861 ti = proto_tree_add_item (tree, proto_wlan_mgt, tvb, 0, -1, FALSE);
7862 mgt_tree = proto_item_add_subtree (ti, ett_80211_mgt);
7864 switch (COMPOSE_FRAME_TYPE(fcf))
7868 fixed_tree = get_fixed_parameter_tree (mgt_tree, tvb, 0, 4);
7869 add_fixed_field(fixed_tree, tvb, 0, FIELD_CAP_INFO);
7870 add_fixed_field(fixed_tree, tvb, 2, FIELD_LISTEN_IVAL);
7871 offset = 4; /* Size of fixed fields */
7873 tagged_parameter_tree_len =
7874 tvb_reported_length_remaining(tvb, offset);
7875 tagged_tree = get_tagged_parameter_tree (mgt_tree, tvb, offset,
7876 tagged_parameter_tree_len);
7877 ieee_80211_add_tagged_parameters (tvb, offset, pinfo, tagged_tree,
7878 tagged_parameter_tree_len);
7882 case MGT_ASSOC_RESP:
7883 fixed_tree = get_fixed_parameter_tree (mgt_tree, tvb, 0, 6);
7884 add_fixed_field(fixed_tree, tvb, 0, FIELD_CAP_INFO);
7885 add_fixed_field(fixed_tree, tvb, 2, FIELD_STATUS_CODE);
7886 add_fixed_field(fixed_tree, tvb, 4, FIELD_ASSOC_ID);
7887 offset = 6; /* Size of fixed fields */
7889 tagged_parameter_tree_len =
7890 tvb_reported_length_remaining(tvb, offset);
7891 tagged_tree = get_tagged_parameter_tree (mgt_tree, tvb, offset,
7892 tagged_parameter_tree_len);
7893 ieee_80211_add_tagged_parameters (tvb, offset, pinfo, tagged_tree,
7894 tagged_parameter_tree_len);
7898 case MGT_REASSOC_REQ:
7899 fixed_tree = get_fixed_parameter_tree (mgt_tree, tvb, 0, 10);
7900 add_fixed_field(fixed_tree, tvb, 0, FIELD_CAP_INFO);
7901 add_fixed_field(fixed_tree, tvb, 2, FIELD_LISTEN_IVAL);
7902 add_fixed_field(fixed_tree, tvb, 4, FIELD_CURRENT_AP_ADDR);
7903 offset = 10; /* Size of fixed fields */
7905 tagged_parameter_tree_len =
7906 tvb_reported_length_remaining(tvb, offset);
7907 tagged_tree = get_tagged_parameter_tree (mgt_tree, tvb, offset,
7908 tagged_parameter_tree_len);
7909 ieee_80211_add_tagged_parameters (tvb, offset, pinfo, tagged_tree,
7910 tagged_parameter_tree_len);
7913 case MGT_REASSOC_RESP:
7914 fixed_tree = get_fixed_parameter_tree (mgt_tree, tvb, 0, 6);
7915 add_fixed_field(fixed_tree, tvb, 0, FIELD_CAP_INFO);
7916 add_fixed_field(fixed_tree, tvb, 2, FIELD_STATUS_CODE);
7917 add_fixed_field(fixed_tree, tvb, 4, FIELD_ASSOC_ID);
7918 offset = 6; /* Size of fixed fields */
7920 tagged_parameter_tree_len =
7921 tvb_reported_length_remaining(tvb, offset);
7922 tagged_tree = get_tagged_parameter_tree (mgt_tree, tvb, offset,
7923 tagged_parameter_tree_len);
7924 ieee_80211_add_tagged_parameters (tvb, offset, pinfo, tagged_tree,
7925 tagged_parameter_tree_len);
7931 tagged_parameter_tree_len =
7932 tvb_reported_length_remaining(tvb, offset);
7933 tagged_tree = get_tagged_parameter_tree (mgt_tree, tvb, offset,
7934 tagged_parameter_tree_len);
7935 ieee_80211_add_tagged_parameters (tvb, offset, pinfo, tagged_tree,
7936 tagged_parameter_tree_len);
7939 case MGT_PROBE_RESP:
7941 fixed_tree = get_fixed_parameter_tree (mgt_tree, tvb, 0, 12);
7942 add_fixed_field(fixed_tree, tvb, 0, FIELD_TIMESTAMP);
7943 add_fixed_field(fixed_tree, tvb, 8, FIELD_BEACON_INTERVAL);
7944 add_fixed_field(fixed_tree, tvb, 10, FIELD_CAP_INFO);
7945 offset = 12; /* Size of fixed fields */
7947 tagged_parameter_tree_len = tvb_reported_length_remaining(tvb, offset);
7948 tagged_tree = get_tagged_parameter_tree (mgt_tree, tvb, offset, tagged_parameter_tree_len);
7949 ieee_80211_add_tagged_parameters (tvb, offset, pinfo, tagged_tree, tagged_parameter_tree_len);
7952 case MGT_MEASUREMENT_PILOT:
7954 fixed_tree = get_fixed_parameter_tree (mgt_tree, tvb, 0, 12);
7955 offset += add_fixed_field(fixed_tree, tvb, offset, FIELD_TIMESTAMP);
7956 offset += add_fixed_field(fixed_tree, tvb, offset, FIELD_MEASUREMENT_PILOT_INT);
7957 offset += add_fixed_field(fixed_tree, tvb, offset, FIELD_BEACON_INTERVAL);
7958 offset += add_fixed_field(fixed_tree, tvb, offset, FIELD_CAP_INFO);
7959 offset += add_fixed_field(fixed_tree, tvb, offset, FIELD_COUNTRY_STR);
7960 offset += add_fixed_field(fixed_tree, tvb, offset, FIELD_MAX_REG_PWR);
7961 offset += add_fixed_field(fixed_tree, tvb, offset, FIELD_MAX_TX_PWR);
7962 offset += add_fixed_field(fixed_tree, tvb, offset, FIELD_TX_PWR_USED);
7963 offset += add_fixed_field(fixed_tree, tvb, offset, FIELD_TRANSCEIVER_NOISE_FLOOR);
7964 /* TODO DS Parameter Set ??? */
7966 tagged_parameter_tree_len = tvb_reported_length_remaining(tvb, offset);
7967 tagged_tree = get_tagged_parameter_tree (mgt_tree, tvb, offset, tagged_parameter_tree_len);
7968 ieee_80211_add_tagged_parameters (tvb, offset, pinfo, tagged_tree, tagged_parameter_tree_len);
7971 case MGT_BEACON: /* Dissect protocol payload fields */
7972 fixed_tree = get_fixed_parameter_tree (mgt_tree, tvb, 0, 12);
7973 add_fixed_field(fixed_tree, tvb, 0, FIELD_TIMESTAMP);
7974 add_fixed_field(fixed_tree, tvb, 8, FIELD_BEACON_INTERVAL);
7975 add_fixed_field(fixed_tree, tvb, 10, FIELD_CAP_INFO);
7976 offset = 12; /* Size of fixed fields */
7978 tagged_parameter_tree_len =
7979 tvb_reported_length_remaining(tvb, offset);
7980 tagged_tree = get_tagged_parameter_tree (mgt_tree, tvb, offset,
7981 tagged_parameter_tree_len);
7982 ieee_80211_add_tagged_parameters (tvb, offset, pinfo, tagged_tree,
7983 tagged_parameter_tree_len);
7990 fixed_tree = get_fixed_parameter_tree (mgt_tree, tvb, 0, 2);
7991 add_fixed_field(fixed_tree, tvb, 0, FIELD_REASON_CODE);
7992 offset = 2; /* Size of fixed fields */
7993 tagged_parameter_tree_len = tvb_reported_length_remaining(tvb, offset);
7994 if (tagged_parameter_tree_len > 0) {
7995 tagged_tree = get_tagged_parameter_tree(mgt_tree, tvb, offset,
7996 tagged_parameter_tree_len);
7997 ieee_80211_add_tagged_parameters(tvb, offset, pinfo, tagged_tree,
7998 tagged_parameter_tree_len);
8002 case MGT_AUTHENTICATION:
8003 fixed_tree = get_fixed_parameter_tree (mgt_tree, tvb, 0, 6);
8004 add_fixed_field(fixed_tree, tvb, 0, FIELD_AUTH_ALG);
8005 add_fixed_field(fixed_tree, tvb, 2, FIELD_AUTH_TRANS_SEQ);
8006 add_fixed_field(fixed_tree, tvb, 4, FIELD_STATUS_CODE);
8007 offset = 6; /* Size of fixed fields */
8009 tagged_parameter_tree_len =
8010 tvb_reported_length_remaining(tvb, offset);
8011 if (tagged_parameter_tree_len != 0)
8013 tagged_tree = get_tagged_parameter_tree (mgt_tree,
8016 tagged_parameter_tree_len);
8017 ieee_80211_add_tagged_parameters (tvb, offset, pinfo, tagged_tree,
8018 tagged_parameter_tree_len);
8022 case MGT_DEAUTHENTICATION:
8023 fixed_tree = get_fixed_parameter_tree (mgt_tree, tvb, 0, 2);
8024 add_fixed_field(fixed_tree, tvb, 0, FIELD_REASON_CODE);
8025 offset = 2; /* Size of fixed fields */
8026 tagged_parameter_tree_len = tvb_reported_length_remaining(tvb, offset);
8027 if (tagged_parameter_tree_len > 0) {
8028 tagged_tree = get_tagged_parameter_tree(mgt_tree, tvb, offset,
8029 tagged_parameter_tree_len);
8030 ieee_80211_add_tagged_parameters(tvb, offset, pinfo, tagged_tree,
8031 tagged_parameter_tree_len);
8037 proto_item *lcl_fixed_hdr;
8038 proto_tree *lcl_fixed_tree;
8039 lcl_fixed_hdr = proto_tree_add_text(mgt_tree, tvb, 0, 0, "Fixed parameters");
8040 lcl_fixed_tree = proto_item_add_subtree (lcl_fixed_hdr, ett_fixed_parameters);
8042 offset += add_fixed_field(lcl_fixed_tree, tvb, 0, FIELD_ACTION);
8044 proto_item_set_len(lcl_fixed_hdr, offset);
8045 tagged_parameter_tree_len = tvb_reported_length_remaining(tvb, offset);
8046 if (tagged_parameter_tree_len != 0)
8048 tagged_tree = get_tagged_parameter_tree (mgt_tree, tvb, offset,
8049 tagged_parameter_tree_len);
8050 ieee_80211_add_tagged_parameters (tvb, offset, pinfo, tagged_tree,
8051 tagged_parameter_tree_len);
8055 case MGT_ACTION_NO_ACK:
8057 proto_item *lcl_fixed_hdr;
8058 proto_tree *lcl_fixed_tree;
8059 lcl_fixed_hdr = proto_tree_add_text(mgt_tree, tvb, 0, 0, "Fixed parameters");
8060 lcl_fixed_tree = proto_item_add_subtree (lcl_fixed_hdr, ett_fixed_parameters);
8062 offset += add_fixed_field(lcl_fixed_tree, tvb, 0, FIELD_ACTION);
8064 proto_item_set_len(lcl_fixed_hdr, offset);
8065 tagged_parameter_tree_len = tvb_reported_length_remaining(tvb, offset);
8066 if (tagged_parameter_tree_len != 0)
8068 tagged_tree = get_tagged_parameter_tree (mgt_tree, tvb, offset,
8069 tagged_parameter_tree_len);
8070 ieee_80211_add_tagged_parameters (tvb, offset, pinfo, tagged_tree,
8071 tagged_parameter_tree_len);
8075 case MGT_ARUBA_WLAN:
8077 proto_item *aruba_hdr;
8078 proto_tree *aruba_tree;
8080 type = tvb_get_ntohs(tvb, offset);
8082 aruba_hdr = proto_tree_add_text(mgt_tree, tvb, 0, 0, "Aruba Management");
8083 aruba_tree = proto_item_add_subtree(aruba_hdr, ett_fixed_parameters);
8085 proto_tree_add_item(aruba_tree, hf_ieee80211_aruba, tvb, offset, 2, FALSE);
8087 /* HeartBeat Sequence */
8088 if ( type == 0x0005 )
8090 proto_tree_add_item(aruba_tree, hf_ieee80211_aruba_hb_seq, tvb, offset, 8, FALSE);
8093 if ( type == 0x0003 )
8095 proto_tree_add_item(aruba_tree, hf_ieee80211_aruba_mtu, tvb, offset, 2, FALSE);
8103 set_src_addr_cols(packet_info *pinfo, const guint8 *addr, const char *type)
8105 col_add_fstr(pinfo->cinfo, COL_RES_DL_SRC, "%s (%s)",
8106 get_ether_name(addr), type);
8107 col_add_str(pinfo->cinfo, COL_UNRES_DL_SRC, ether_to_str(addr));
8111 set_dst_addr_cols(packet_info *pinfo, const guint8 *addr, const char *type)
8113 col_add_fstr(pinfo->cinfo, COL_RES_DL_DST, "%s (%s)",
8114 get_ether_name(addr), type);
8115 col_add_str(pinfo->cinfo, COL_UNRES_DL_DST, ether_to_str(addr));
8119 crc32_802_tvb_padded(tvbuff_t *tvb, guint hdr_len, guint hdr_size, guint len)
8123 c_crc = crc32_ccitt_tvb(tvb, hdr_len);
8124 c_crc = crc32_ccitt_seed(tvb_get_ptr(tvb, hdr_size, len), len, ~c_crc);
8127 c_crc = ((unsigned char)(c_crc>>0)<<24) |
8128 ((unsigned char)(c_crc>>8)<<16) |
8129 ((unsigned char)(c_crc>>16)<<8) |
8130 ((unsigned char)(c_crc>>24)<<0);
8142 /* ************************************************************************* */
8143 /* Dissect 802.11 frame */
8144 /* ************************************************************************* */
8147 * The 802.11n specification makes some fairly significant changes to the
8148 * layout of the MAC header. The first two bits of the MAC header are the
8149 * protocol version. You'd think that the 802.11 committee would have
8150 * bumped the version to indicate a different MAC layout, but NOOOO -- we
8151 * have to go digging for bits in various locations instead.
8155 dissect_ieee80211_common (tvbuff_t * tvb, packet_info * pinfo,
8156 proto_tree * tree, gboolean fixed_length_header, gint fcs_len,
8157 gboolean wlan_broken_fc, gboolean datapad,
8160 guint16 fcf, flags, frame_type_subtype, ctrl_fcf, ctrl_type_subtype;
8161 guint16 seq_control;
8162 guint32 seq_number, frag_number;
8163 gboolean more_frags;
8164 const guint8 *src = NULL;
8165 const guint8 *dst = NULL;
8166 const guint8 *bssid = NULL;
8167 proto_item *ti = NULL;
8168 proto_item *fcs_item = NULL;
8169 proto_item *cw_item = NULL;
8170 proto_item *hidden_item;
8171 proto_tree *volatile hdr_tree = NULL;
8172 proto_tree *fcs_tree = NULL;
8173 proto_tree *cw_tree = NULL;
8174 guint16 hdr_len, ohdr_len, htc_len = 0;
8175 gboolean has_fcs, fcs_good, fcs_bad;
8176 gint len, reported_len, ivlen;
8177 gboolean is_amsdu = 0;
8178 gboolean save_fragmented;
8179 tvbuff_t *volatile next_tvb = NULL;
8181 volatile encap_t encap_type;
8182 guint8 octet1, octet2;
8183 char out_buff[SHORT_STR];
8186 const char *addr1_str = NULL;
8189 const gchar *fts_str;
8190 gchar flag_str[] = "opmPRMFTC";
8193 wlan_hdr *volatile whdr;
8194 static wlan_hdr whdrs[4];
8195 gboolean retransmitted;
8199 col_set_str (pinfo->cinfo, COL_PROTOCOL, "802.11");
8200 col_clear(pinfo->cinfo, COL_INFO);
8203 frame_type_subtype = COMPOSE_FRAME_TYPE(fcf);
8204 if (frame_type_subtype == CTRL_CONTROL_WRAPPER)
8205 ctrl_fcf = FETCH_FCF(10);
8209 if (fixed_length_header)
8210 hdr_len = DATA_LONG_HDR_LEN;
8212 hdr_len = find_header_length (fcf, ctrl_fcf, is_ht);
8215 hdr_len = roundup2(hdr_len, 4);
8217 fts_str = val_to_str_const(frame_type_subtype, frame_type_subtype_vals,
8218 "Unrecognized (Reserved frame)");
8219 col_set_str (pinfo->cinfo, COL_INFO, fts_str);
8222 flags = FCF_FLAGS (fcf);
8223 more_frags = HAVE_FRAGMENTS (flags);
8225 for (ii = 0; ii < 8; ii++) {
8226 if (! (flags & 0x80 >> ii)) {
8231 if (is_ht && IS_STRICTLY_ORDERED(flags) &&
8232 ((FCF_FRAME_TYPE(fcf) == MGT_FRAME) || (FCF_FRAME_TYPE(fcf) == DATA_FRAME &&
8233 DATA_FRAME_IS_QOS(frame_type_subtype)))) {
8237 /* Add the FC to the current tree */
8240 ti = proto_tree_add_protocol_format (tree, proto_wlan, tvb, 0, hdr_len,
8241 "IEEE 802.11 %s", fts_str);
8242 hdr_tree = proto_item_add_subtree (ti, ett_80211);
8244 dissect_frame_control(hdr_tree, tvb, wlan_broken_fc, 0);
8246 if (frame_type_subtype == CTRL_PS_POLL)
8247 proto_tree_add_uint(hdr_tree, hf_ieee80211_assoc_id, tvb, 2, 2, TRUE);
8250 proto_tree_add_uint (hdr_tree, hf_ieee80211_did_duration, tvb, 2, 2,
8251 tvb_get_letohs (tvb, 2));
8255 * Decode the part of the frame header that isn't the same for all
8262 switch (FCF_FRAME_TYPE (fcf))
8267 * All management frame types have the same header.
8269 src = tvb_get_ptr (tvb, 10, 6);
8270 dst = tvb_get_ptr (tvb, 4, 6);
8272 SET_ADDRESS(&pinfo->dl_src, AT_ETHER, 6, src);
8273 SET_ADDRESS(&pinfo->src, AT_ETHER, 6, src);
8274 SET_ADDRESS(&pinfo->dl_dst, AT_ETHER, 6, dst);
8275 SET_ADDRESS(&pinfo->dst, AT_ETHER, 6, dst);
8278 SET_ADDRESS(&whdr->bssid, AT_ETHER, 6, tvb_get_ptr(tvb, 16,6));
8279 SET_ADDRESS(&whdr->src, AT_ETHER, 6, src);
8280 SET_ADDRESS(&whdr->dst, AT_ETHER, 6, dst);
8281 whdr->type = frame_type_subtype;
8283 seq_control = tvb_get_letohs(tvb, 22);
8284 frag_number = SEQCTL_FRAGMENT_NUMBER(seq_control);
8285 seq_number = SEQCTL_SEQUENCE_NUMBER(seq_control);
8287 col_append_fstr(pinfo->cinfo, COL_INFO,
8288 ", SN=%d", seq_number);
8290 col_append_fstr(pinfo->cinfo, COL_INFO,
8291 ", FN=%d",frag_number);
8295 proto_tree_add_ether (hdr_tree, hf_ieee80211_addr_da, tvb, 4, 6, dst);
8297 proto_tree_add_ether (hdr_tree, hf_ieee80211_addr_sa, tvb, 10, 6, src);
8299 /* add items for wlan.addr filter */
8300 hidden_item = proto_tree_add_ether (hdr_tree, hf_ieee80211_addr, tvb, 4, 6, dst);
8301 PROTO_ITEM_SET_HIDDEN(hidden_item);
8302 hidden_item = proto_tree_add_ether (hdr_tree, hf_ieee80211_addr, tvb, 10, 6, src);
8303 PROTO_ITEM_SET_HIDDEN(hidden_item);
8305 proto_tree_add_item (hdr_tree, hf_ieee80211_addr_bssid, tvb, 16, 6, ENC_NA);
8307 proto_tree_add_uint (hdr_tree, hf_ieee80211_frag_number, tvb, 22, 2,
8310 proto_tree_add_uint (hdr_tree, hf_ieee80211_seq_number, tvb, 22, 2,
8318 * Control Wrapper frames insert themselves between address 1
8319 * and address 2 in a normal control frame. Process address 1
8320 * first, then handle the rest of the frame in dissect_control.
8322 if (frame_type_subtype == CTRL_CONTROL_WRAPPER) {
8323 offset = 10; /* FC + D/ID + Address 1 + CFC + HTC */
8324 ctrl_fcf = FETCH_FCF(10);
8325 ctrl_type_subtype = COMPOSE_FRAME_TYPE(ctrl_fcf);
8327 offset = 10; /* FC + D/ID + Address 1 */
8329 ctrl_type_subtype = frame_type_subtype;
8332 switch (ctrl_type_subtype)
8335 addr1_str = "BSSID";
8336 addr1_hf = hf_ieee80211_addr_bssid;
8340 case CTRL_ACKNOWLEDGEMENT:
8342 case CTRL_CFP_ENDACK:
8343 case CTRL_BLOCK_ACK_REQ:
8344 case CTRL_BLOCK_ACK:
8346 addr1_hf = hf_ieee80211_addr_ra;
8352 if (!addr1_str) /* XXX - Should we throw some sort of error? */
8356 dst = tvb_get_ptr(tvb, 4, 6);
8357 set_dst_addr_cols(pinfo, dst, addr1_str);
8359 proto_tree_add_item(hdr_tree, addr1_hf, tvb, 4, 6, FALSE);
8363 * Start shoving in other fields if needed.
8364 * XXX - Should we look for is_ht as well?
8366 if (frame_type_subtype == CTRL_CONTROL_WRAPPER && tree) {
8367 cw_item = proto_tree_add_text(hdr_tree, tvb, offset, 2,
8368 "Contained Frame Control");
8369 cw_tree = proto_item_add_subtree (cw_item, ett_cntrl_wrapper_fc);
8370 dissect_frame_control(cw_tree, tvb, FALSE, offset);
8371 dissect_ht_control(hdr_tree, tvb, offset + 2);
8373 cw_item = proto_tree_add_text(hdr_tree, tvb, offset, 2,
8375 hdr_tree = proto_item_add_subtree (cw_item, ett_cntrl_wrapper_fc);
8378 switch (ctrl_type_subtype)
8382 case CTRL_CFP_ENDACK:
8384 src = tvb_get_ptr (tvb, offset, 6);
8385 set_src_addr_cols(pinfo, src, "BSSID");
8387 proto_tree_add_item(hdr_tree, hf_ieee80211_addr_ta, tvb, offset, 6, FALSE);
8394 src = tvb_get_ptr (tvb, offset, 6);
8395 set_src_addr_cols(pinfo, src, "TA");
8397 proto_tree_add_item(hdr_tree, hf_ieee80211_addr_ta, tvb, offset, 6, FALSE);
8402 case CTRL_CONTROL_WRAPPER:
8404 /* XXX - We shouldn't see this. Should we throw an error? */
8408 case CTRL_BLOCK_ACK_REQ:
8410 src = tvb_get_ptr (tvb, offset, 6);
8411 set_src_addr_cols(pinfo, src, "TA");
8415 guint16 bar_control;
8416 guint8 block_ack_type;
8417 proto_item *bar_parent_item;
8418 proto_tree *bar_sub_tree;
8420 proto_tree_add_item(hdr_tree, hf_ieee80211_addr_ta, tvb, offset, 6, FALSE);
8423 bar_control = tvb_get_letohs(tvb, offset);
8424 block_ack_type = (bar_control & 0x0006) >> 1;
8425 proto_tree_add_uint(hdr_tree, hf_ieee80211_block_ack_request_type, tvb,
8426 offset, 1, block_ack_type);
8427 bar_parent_item = proto_tree_add_uint_format(hdr_tree,
8428 hf_ieee80211_block_ack_request_control, tvb, offset, 2, bar_control,
8429 "Block Ack Request (BAR) Control: 0x%04X", bar_control);
8430 bar_sub_tree = proto_item_add_subtree(bar_parent_item,
8432 proto_tree_add_boolean(bar_sub_tree,
8433 hf_ieee80211_block_ack_control_ack_policy, tvb, offset, 1, bar_control);
8434 proto_tree_add_boolean(bar_sub_tree, hf_ieee80211_block_ack_control_multi_tid,
8435 tvb, offset, 1, bar_control);
8436 proto_tree_add_boolean(bar_sub_tree,
8437 hf_ieee80211_block_ack_control_compressed_bitmap, tvb, offset, 1,
8439 proto_tree_add_uint(bar_sub_tree, hf_ieee80211_block_ack_control_reserved,
8440 tvb, offset, 2, bar_control);
8442 switch (block_ack_type)
8444 case 0: /*Basic BlockAckReq */
8446 proto_tree_add_uint(bar_sub_tree,
8447 hf_ieee80211_block_ack_control_basic_tid_info, tvb, offset+1, 1,
8451 offset += add_fixed_field(hdr_tree, tvb, offset,
8452 FIELD_BLOCK_ACK_SSC);
8455 case 2: /* Compressed BlockAckReq */
8457 proto_tree_add_uint(bar_sub_tree,
8458 hf_ieee80211_block_ack_control_compressed_tid_info, tvb, offset+1, 1,
8462 offset += add_fixed_field(hdr_tree, tvb, offset,
8463 FIELD_BLOCK_ACK_SSC);
8466 case 3: /* Multi-TID BlockAckReq */
8468 guint8 tid_count, i;
8469 proto_tree *bar_mtid_tree, *bar_mtid_sub_tree;
8471 tid_count = ((bar_control & 0xF000) >> 12) + 1;
8472 proto_tree_add_uint_format(bar_sub_tree, hf_ieee80211_block_ack_control_multi_tid_info, tvb, offset+1, 1, bar_control,
8473 decode_numeric_bitfield(bar_control, 0xF000, 16,"Number of TIDs Present: 0x%%X"), tid_count);
8476 bar_parent_item = proto_tree_add_text (hdr_tree, tvb, offset, tid_count*4, "Per TID Info");
8477 bar_mtid_tree = proto_item_add_subtree(bar_parent_item, ett_block_ack);
8478 for (i = 1; i <= tid_count; i++) {
8479 bar_parent_item = proto_tree_add_uint(bar_mtid_tree, hf_ieee80211_block_ack_multi_tid_info, tvb, offset, 4, i);
8480 bar_mtid_sub_tree = proto_item_add_subtree(bar_parent_item, ett_block_ack);
8482 bar_control = tvb_get_letohs(tvb, offset);
8483 proto_tree_add_uint(bar_mtid_sub_tree, hf_ieee80211_block_ack_multi_tid_reserved, tvb, offset, 2, bar_control);
8484 proto_tree_add_uint(bar_mtid_sub_tree, hf_ieee80211_block_ack_multi_tid_value, tvb, offset+1, 1, bar_control);
8487 offset += add_fixed_field(bar_mtid_sub_tree, tvb, offset, FIELD_BLOCK_ACK_SSC);
8496 case CTRL_BLOCK_ACK:
8498 src = tvb_get_ptr (tvb, offset, 6);
8499 set_src_addr_cols(pinfo, src, "TA");
8504 guint8 block_ack_type;
8505 proto_item *ba_parent_item;
8506 proto_tree *ba_sub_tree;
8508 proto_tree_add_item(hdr_tree, hf_ieee80211_addr_ta, tvb, offset, 6, FALSE);
8511 ba_control = tvb_get_letohs(tvb, offset);
8512 block_ack_type = (ba_control & 0x0006) >> 1;
8513 proto_tree_add_uint(hdr_tree, hf_ieee80211_block_ack_type, tvb, offset, 1, block_ack_type);
8514 ba_parent_item = proto_tree_add_uint_format(hdr_tree,
8515 hf_ieee80211_block_ack_control, tvb, offset, 2, ba_control,
8516 "Block Ack (BA) Control: 0x%04X", ba_control);
8517 ba_sub_tree = proto_item_add_subtree(ba_parent_item, ett_block_ack);
8518 proto_tree_add_boolean(ba_sub_tree, hf_ieee80211_block_ack_control_ack_policy,
8519 tvb, offset, 1, ba_control);
8520 proto_tree_add_boolean(ba_sub_tree, hf_ieee80211_block_ack_control_multi_tid,
8521 tvb, offset, 1, ba_control);
8522 proto_tree_add_boolean(ba_sub_tree,
8523 hf_ieee80211_block_ack_control_compressed_bitmap, tvb, offset, 1,
8525 proto_tree_add_uint(ba_sub_tree, hf_ieee80211_block_ack_control_reserved, tvb,
8526 offset, 2, ba_control);
8528 switch (block_ack_type)
8530 case 0: /*Basic BlockAck */
8532 proto_tree_add_uint(ba_sub_tree,
8533 hf_ieee80211_block_ack_control_basic_tid_info, tvb, offset+1, 1,
8537 offset += add_fixed_field(hdr_tree, tvb, offset, FIELD_BLOCK_ACK_SSC);
8538 proto_tree_add_item(hdr_tree, hf_ieee80211_block_ack_bitmap, tvb, offset, 128, FALSE);
8542 case 2: /* Compressed BlockAck */
8544 proto_tree_add_uint(ba_sub_tree, hf_ieee80211_block_ack_control_basic_tid_info, tvb, offset+1, 1, ba_control);
8547 offset += add_fixed_field(hdr_tree, tvb, offset, FIELD_BLOCK_ACK_SSC);
8548 proto_tree_add_item(hdr_tree, hf_ieee80211_block_ack_bitmap, tvb, offset, 8, FALSE);
8552 case 3: /* Multi-TID BlockAck */
8554 guint8 tid_count, i;
8555 proto_tree *ba_mtid_tree, *ba_mtid_sub_tree;
8557 tid_count = ((ba_control & 0xF000) >> 12) + 1;
8558 proto_tree_add_uint_format(ba_sub_tree,
8559 hf_ieee80211_block_ack_control_compressed_tid_info, tvb, offset+1, 1,
8560 ba_control, decode_numeric_bitfield(ba_control, 0xF000,
8561 16,"Number of TIDs Present: 0x%%X"), tid_count);
8564 ba_parent_item = proto_tree_add_text (hdr_tree, tvb, offset, tid_count*4, "Per TID Info");
8565 ba_mtid_tree = proto_item_add_subtree(ba_parent_item, ett_block_ack);
8566 for (i=1; i<=tid_count; i++) {
8567 ba_parent_item = proto_tree_add_uint(ba_mtid_tree, hf_ieee80211_block_ack_multi_tid_info, tvb, offset, 4, i);
8568 ba_mtid_sub_tree = proto_item_add_subtree(ba_parent_item, ett_block_ack);
8570 ba_control = tvb_get_letohs(tvb, offset);
8571 proto_tree_add_uint(ba_mtid_sub_tree, hf_ieee80211_block_ack_multi_tid_reserved, tvb, offset, 2, ba_control);
8572 proto_tree_add_uint(ba_mtid_sub_tree, hf_ieee80211_block_ack_multi_tid_value, tvb, offset+1, 1, ba_control);
8575 offset += add_fixed_field(ba_mtid_sub_tree, tvb, offset, FIELD_BLOCK_ACK_SSC);
8576 proto_tree_add_item(ba_mtid_sub_tree, hf_ieee80211_block_ack_bitmap, tvb, offset, 8, FALSE);
8590 addr_type = FCF_ADDR_SELECTOR (fcf);
8592 /* In order to show src/dst address we must always do the following */
8597 src = tvb_get_ptr (tvb, 10, 6);
8598 dst = tvb_get_ptr (tvb, 4, 6);
8599 bssid = tvb_get_ptr (tvb, 16, 6);
8603 src = tvb_get_ptr (tvb, 16, 6);
8604 dst = tvb_get_ptr (tvb, 4, 6);
8605 bssid = tvb_get_ptr (tvb, 10, 6);
8609 src = tvb_get_ptr (tvb, 10, 6);
8610 dst = tvb_get_ptr (tvb, 16, 6);
8611 bssid = tvb_get_ptr (tvb, 4, 6);
8615 src = tvb_get_ptr (tvb, 24, 6);
8616 dst = tvb_get_ptr (tvb, 16, 6);
8617 bssid = tvb_get_ptr (tvb, 16, 6);
8621 SET_ADDRESS(&pinfo->dl_src, AT_ETHER, 6, src);
8622 SET_ADDRESS(&pinfo->src, AT_ETHER, 6, src);
8623 SET_ADDRESS(&pinfo->dl_dst, AT_ETHER, 6, dst);
8624 SET_ADDRESS(&pinfo->dst, AT_ETHER, 6, dst);
8628 SET_ADDRESS(&whdr->bssid, AT_ETHER, 6, bssid);
8629 SET_ADDRESS(&whdr->src, AT_ETHER, 6, src);
8630 SET_ADDRESS(&whdr->dst, AT_ETHER, 6, dst);
8631 whdr->type = frame_type_subtype;
8633 seq_control = tvb_get_letohs(tvb, 22);
8634 frag_number = SEQCTL_FRAGMENT_NUMBER(seq_control);
8635 seq_number = SEQCTL_SEQUENCE_NUMBER(seq_control);
8637 col_append_fstr(pinfo->cinfo, COL_INFO,
8638 ", SN=%d, FN=%d", seq_number,frag_number);
8640 /* Now if we have a tree we start adding stuff */
8648 proto_tree_add_ether (hdr_tree, hf_ieee80211_addr_da, tvb, 4, 6, dst);
8649 proto_tree_add_ether (hdr_tree, hf_ieee80211_addr_sa, tvb, 10, 6, src);
8650 proto_tree_add_ether (hdr_tree, hf_ieee80211_addr_bssid, tvb, 16, 6, bssid);
8651 proto_tree_add_uint (hdr_tree, hf_ieee80211_frag_number, tvb, 22, 2,
8653 proto_tree_add_uint (hdr_tree, hf_ieee80211_seq_number, tvb, 22, 2,
8656 /* add items for wlan.addr filter */
8657 hidden_item = proto_tree_add_ether (hdr_tree, hf_ieee80211_addr, tvb, 4, 6, dst);
8658 PROTO_ITEM_SET_HIDDEN(hidden_item);
8659 hidden_item = proto_tree_add_ether (hdr_tree, hf_ieee80211_addr, tvb, 10, 6, src);
8660 PROTO_ITEM_SET_HIDDEN(hidden_item);
8664 proto_tree_add_ether (hdr_tree, hf_ieee80211_addr_da, tvb, 4, 6, dst);
8665 proto_tree_add_ether (hdr_tree, hf_ieee80211_addr_bssid, tvb, 10, 6, bssid);
8666 proto_tree_add_ether (hdr_tree, hf_ieee80211_addr_sa, tvb, 16, 6, src);
8667 proto_tree_add_uint (hdr_tree, hf_ieee80211_frag_number, tvb, 22, 2,
8669 proto_tree_add_uint (hdr_tree, hf_ieee80211_seq_number, tvb, 22, 2,
8672 /* add items for wlan.addr filter */
8673 hidden_item = proto_tree_add_ether (hdr_tree, hf_ieee80211_addr, tvb, 4, 6, dst);
8674 PROTO_ITEM_SET_HIDDEN(hidden_item);
8675 hidden_item = proto_tree_add_ether (hdr_tree, hf_ieee80211_addr, tvb, 16, 6, src);
8676 PROTO_ITEM_SET_HIDDEN(hidden_item);
8680 proto_tree_add_ether (hdr_tree, hf_ieee80211_addr_bssid, tvb, 4, 6, bssid);
8681 proto_tree_add_ether (hdr_tree, hf_ieee80211_addr_sa, tvb, 10, 6, src);
8682 proto_tree_add_ether (hdr_tree, hf_ieee80211_addr_da, tvb, 16, 6, dst);
8684 proto_tree_add_uint (hdr_tree, hf_ieee80211_frag_number, tvb, 22, 2,
8686 proto_tree_add_uint (hdr_tree, hf_ieee80211_seq_number, tvb, 22, 2,
8689 /* add items for wlan.addr filter */
8690 hidden_item = proto_tree_add_ether (hdr_tree, hf_ieee80211_addr, tvb, 10, 6, src);
8691 PROTO_ITEM_SET_HIDDEN(hidden_item);
8692 hidden_item = proto_tree_add_ether (hdr_tree, hf_ieee80211_addr, tvb, 16, 6, dst);
8693 PROTO_ITEM_SET_HIDDEN(hidden_item);
8697 proto_tree_add_item (hdr_tree, hf_ieee80211_addr_ra, tvb, 4, 6, ENC_NA);
8698 proto_tree_add_item (hdr_tree, hf_ieee80211_addr_ta, tvb, 10, 6, ENC_NA);
8699 proto_tree_add_ether (hdr_tree, hf_ieee80211_addr_da, tvb, 16, 6, dst);
8700 proto_tree_add_uint (hdr_tree, hf_ieee80211_frag_number, tvb, 22, 2,
8702 proto_tree_add_uint (hdr_tree, hf_ieee80211_seq_number, tvb, 22, 2,
8704 proto_tree_add_ether (hdr_tree, hf_ieee80211_addr_sa, tvb, 24, 6, src);
8706 /* add items for wlan.addr filter */
8707 hidden_item = proto_tree_add_ether (hdr_tree, hf_ieee80211_addr, tvb, 16, 6, dst);
8708 PROTO_ITEM_SET_HIDDEN(hidden_item);
8709 hidden_item = proto_tree_add_ether (hdr_tree, hf_ieee80211_addr, tvb, 24, 6, src);
8710 PROTO_ITEM_SET_HIDDEN(hidden_item);
8716 #ifdef MESH_OVERRIDES
8718 (FCF_ADDR_SELECTOR(fcf) == DATA_ADDR_T4 ||
8719 FCF_ADDR_SELECTOR(fcf) == DATA_ADDR_T2))
8721 proto_item *msh_fields;
8722 proto_tree *msh_tree;
8727 guint32 mesh_seq_number;
8728 guint8 mesh_hdr_len;
8731 mesh_flags = tvb_get_guint8(tvb, mshoff + 0);
8732 /* heuristic method to determine if this is a mesh frame */
8733 if (mesh_flags & ~MESH_FLAGS_ADDRESS_EXTENSION) {
8735 g_warning("Invalid mesh flags: %x. Interpreting as WDS frame.\n", mesh_flags);
8739 mesh_hdr_len = find_mesh_header_length(tvb_get_ptr(tvb, mshoff, 1), 0, fcf);
8740 mesh_ttl = tvb_get_guint8(tvb, mshoff + 1);
8741 mesh_seq_number = 0xffffff & tvb_get_letohl(tvb, mshoff + 2);
8743 msh_fields = proto_tree_add_text(hdr_tree, tvb, mshoff, mesh_hdr_len, "Mesh Header");
8744 msh_tree = proto_item_add_subtree (msh_fields, ett_msh_parameters);
8746 proto_tree_add_boolean_format (msh_tree, hf_ieee80211_mesh_flags,
8747 tvb, mshoff, 1, mesh_flags, "Address Extension %x", mesh_flags & MESH_FLAGS_ADDRESS_EXTENSION);
8748 proto_tree_add_uint (msh_tree, hf_ieee80211_mesh_ttl, tvb, mshoff + 1, 1, mesh_ttl);
8749 proto_tree_add_uint (msh_tree, hf_ieee80211_mesh_seq, tvb, mshoff + 2, 4, mesh_seq_number);
8750 switch (mesh_hdr_len) {
8752 proto_tree_add_item(msh_tree, hf_ieee80211_mesh_ae3, tvb, mshoff + 18, 6, ENC_NA);
8754 proto_tree_add_item(msh_tree, hf_ieee80211_mesh_ae2, tvb, mshoff + 12, 6, ENC_NA);
8756 proto_tree_add_item(msh_tree, hf_ieee80211_mesh_ae1, tvb, mshoff + 6, 6, ENC_NA);
8760 expert_add_info_format(pinfo, ti, PI_MALFORMED, PI_ERROR,
8761 "Invalid mesh header length (%d)\n",
8764 hdr_len += mesh_hdr_len;
8766 #endif /* MESH_OVERRIDES */
8770 len = tvb_length_remaining(tvb, hdr_len);
8771 reported_len = tvb_reported_length_remaining(tvb, hdr_len);
8775 case 0: /* Definitely has no FCS */
8779 case 4: /* Definitely has an FCS */
8783 default: /* Don't know - use "wlan_check_fcs" */
8784 has_fcs = wlan_check_fcs;
8790 * Well, this packet should, in theory, have an FCS.
8791 * Do we have the entire packet, and does it have enough data for
8794 if (reported_len < 4)
8797 * The packet is claimed not to even have enough data for a 4-byte
8799 * Pretend it doesn't have an FCS.
8803 else if (len < reported_len)
8806 * The packet is claimed to have enough data for a 4-byte FCS, but
8807 * we didn't capture all of the packet.
8808 * Slice off the 4-byte FCS from the reported length, and trim the
8809 * captured length so it's no more than the reported length; that
8810 * will slice off what of the FCS, if any, is in the captured
8814 if (len > reported_len)
8820 * We have the entire packet, and it includes a 4-byte FCS.
8821 * Slice it off, and put it into the tree.
8827 guint32 sent_fcs = tvb_get_ntohl(tvb, hdr_len + len);
8831 fcs = crc32_802_tvb_padded(tvb, ohdr_len, hdr_len, len);
8833 fcs = crc32_802_tvb(tvb, hdr_len + len);
8834 if (fcs == sent_fcs) {
8843 fcs_item = proto_tree_add_uint_format(hdr_tree, hf_ieee80211_fcs, tvb,
8844 hdr_len + len, 4, sent_fcs,
8845 "Frame check sequence: 0x%08x [correct]", sent_fcs);
8847 fcs_item = proto_tree_add_uint_format(hdr_tree, hf_ieee80211_fcs, tvb,
8848 hdr_len + len, 4, sent_fcs,
8849 "Frame check sequence: 0x%08x [incorrect, should be 0x%08x]",
8854 proto_tree_set_appendix(hdr_tree, tvb, hdr_len + len, 4);
8856 fcs_tree = proto_item_add_subtree(fcs_item, ett_fcs);
8858 fcs_item = proto_tree_add_boolean(fcs_tree,
8859 hf_ieee80211_fcs_good, tvb,
8862 PROTO_ITEM_SET_GENERATED(fcs_item);
8864 fcs_item = proto_tree_add_boolean(fcs_tree,
8865 hf_ieee80211_fcs_bad, tvb,
8868 PROTO_ITEM_SET_GENERATED(fcs_item);
8875 proto_item_append_text(ti, ", Flags: %s", flag_str);
8876 col_append_fstr (pinfo->cinfo, COL_INFO, ", Flags=%s", flag_str);
8880 * Only management and data frames have a body, so we don't have
8881 * anything more to do for other types of frames.
8883 switch (FCF_FRAME_TYPE (fcf))
8888 dissect_ht_control(hdr_tree, tvb, ohdr_len - 4);
8893 if (tree && DATA_FRAME_IS_QOS(frame_type_subtype))
8895 proto_item *qos_fields;
8896 proto_tree *qos_tree;
8899 guint16 qos_control;
8900 guint16 qos_priority;
8901 guint16 qos_ack_policy;
8902 guint16 qos_amsdu_present;
8904 guint16 qos_field_content;
8907 * We calculate the offset to the QoS header data as
8908 * an offset relative to the end of the header. But
8909 * when the header has been padded to align the data
8910 * this must be done relative to true header size, not
8911 * the padded/aligned value. To simplify this work we
8912 * stash the original header size in ohdr_len instead
8913 * of recalculating it.
8915 qosoff = ohdr_len - htc_len - 2;
8916 qos_fields = proto_tree_add_text(hdr_tree, tvb, qosoff, 2,
8918 qos_tree = proto_item_add_subtree (qos_fields, ett_qos_parameters);
8920 qos_control = tvb_get_letohs(tvb, qosoff + 0);
8921 qos_priority = QOS_PRIORITY(qos_control);
8922 qos_ack_policy = QOS_ACK_POLICY(qos_control);
8923 qos_amsdu_present = QOS_AMSDU_PRESENT(qos_control);
8924 qos_eosp = QOS_EOSP(qos_control);
8925 qos_field_content = QOS_FIELD_CONTENT(qos_control);
8927 proto_tree_add_uint_format (qos_tree, hf_ieee80211_qos_priority, tvb,
8928 qosoff, 1, qos_priority,
8929 "Priority: %d (%s) (%s)",
8930 qos_priority, qos_tags[qos_priority], qos_acs[qos_priority]);
8932 if (flags & FLAG_FROM_DS) {
8933 proto_tree_add_boolean (qos_tree, hf_ieee80211_qos_eosp, tvb,
8934 qosoff, 1, qos_control);
8936 proto_tree_add_boolean (qos_tree, hf_ieee80211_qos_bit4, tvb,
8937 qosoff, 1, qos_control);
8940 proto_tree_add_uint (qos_tree, hf_ieee80211_qos_ack_policy, tvb, qosoff, 1,
8943 if (flags & FLAG_FROM_DS) {
8944 if (!DATA_FRAME_IS_NULL(frame_type_subtype)) {
8945 proto_tree_add_boolean(qos_tree, hf_ieee80211_qos_amsdu_present, tvb,
8946 qosoff, 1, qos_amsdu_present);
8947 is_amsdu = qos_amsdu_present;
8949 if (DATA_FRAME_IS_CF_POLL(frame_type_subtype)) {
8951 if (qos_field_content == 0) {
8952 proto_tree_add_uint_format_value (qos_tree, hf_ieee80211_qos_txop_limit, tvb,
8953 qosoff + 1, 1, qos_field_content,
8954 "transmit one frame immediately (0)");
8956 proto_tree_add_uint (qos_tree, hf_ieee80211_qos_txop_limit, tvb,
8957 qosoff + 1, 1, qos_field_content);
8960 /* qap ps buffer state */
8961 proto_item *qos_ps_buf_state_fields;
8962 proto_tree *qos_ps_buf_state_tree;
8963 guint8 qap_buf_load;
8965 qos_ps_buf_state_fields = proto_tree_add_text(qos_tree, tvb, qosoff + 1, 1,
8966 "QAP PS Buffer State: 0x%x", qos_field_content);
8967 qos_ps_buf_state_tree = proto_item_add_subtree (qos_ps_buf_state_fields, ett_qos_ps_buf_state);
8969 proto_tree_add_boolean (qos_ps_buf_state_tree, hf_ieee80211_qos_buf_state_indicated,
8970 tvb, qosoff + 1, 1, qos_field_content);
8972 if (QOS_PS_BUF_STATE_INDICATED(qos_field_content)) {
8973 proto_tree_add_uint (qos_ps_buf_state_tree, hf_ieee80211_qos_highest_pri_buf_ac, tvb,
8974 qosoff + 1, 1, qos_field_content);
8976 qap_buf_load = QOS_PS_QAP_BUF_LOAD(qos_field_content);
8977 switch (qap_buf_load) {
8980 proto_tree_add_uint_format_value (qos_ps_buf_state_tree, hf_ieee80211_qos_qap_buf_load, tvb,
8981 qosoff + 1, 1, qos_field_content,
8982 "no buffered traffic (0)");
8986 proto_tree_add_uint_format_value (qos_ps_buf_state_tree, hf_ieee80211_qos_qap_buf_load, tvb,
8987 qosoff + 1, 1, qos_field_content,
8988 "%d octets (%d)", qap_buf_load*4096, qap_buf_load);
8992 proto_tree_add_uint_format_value (qos_ps_buf_state_tree, hf_ieee80211_qos_qap_buf_load, tvb,
8993 qosoff + 1, 1, qos_field_content,
8994 "greater than 57344 octets (15)");
9000 if (!DATA_FRAME_IS_NULL(frame_type_subtype)) {
9001 proto_tree_add_boolean(qos_tree, hf_ieee80211_qos_amsdu_present, tvb,
9002 qosoff, 1, qos_amsdu_present);
9003 is_amsdu = qos_amsdu_present;
9007 switch (qos_field_content) {
9010 proto_tree_add_uint_format_value (qos_tree, hf_ieee80211_qos_queue_size,
9011 tvb, qosoff + 1, 1, qos_field_content,
9012 "no buffered traffic in the queue (0)");
9016 proto_tree_add_uint_format_value (qos_tree, hf_ieee80211_qos_queue_size,
9017 tvb, qosoff + 1, 1, qos_field_content,
9018 "%u bytes (%u)", qos_field_content*256, qos_field_content);
9022 proto_tree_add_uint_format_value (qos_tree, hf_ieee80211_qos_queue_size,
9023 tvb, qosoff + 1, 1, qos_field_content,
9024 "more than 64768 octets (254)");
9028 proto_tree_add_uint_format_value (qos_tree, hf_ieee80211_qos_queue_size,
9029 tvb, qosoff + 1, 1, qos_field_content,
9030 "unspecified or unknown (256)");
9034 /* txop duration requested */
9035 if (qos_field_content == 0) {
9036 proto_tree_add_uint_format_value (qos_tree, hf_ieee80211_qos_txop_dur_req,
9037 tvb, qosoff + 1, 1, qos_field_content,
9038 "no TXOP requested (0)");
9040 proto_tree_add_uint (qos_tree, hf_ieee80211_qos_txop_dur_req,
9041 tvb, qosoff + 1, 1, qos_field_content);
9046 /* Do we have +HTC? */
9048 dissect_ht_control(hdr_tree, tvb, ohdr_len - 4);
9050 } /* end of qos control field */
9052 #ifdef HAVE_AIRPDCAP
9053 /* Davide Schiera (2006-11-21): process handshake packet with AirPDcap */
9054 /* the processing will take care of 4-way handshake sessions for WPA */
9055 /* and WPA2 decryption */
9056 if (enable_decryption && !pinfo->fd->flags.visited) {
9057 const guint8 *enc_data = tvb_get_ptr(tvb, 0, hdr_len+reported_len);
9058 AirPDcapPacketProcess(&airpdcap_ctx, enc_data, hdr_len, hdr_len+reported_len, NULL, 0, NULL, TRUE, FALSE);
9060 /* Davide Schiera -------------------------------------------------------- */
9064 * No-data frames don't have a body.
9066 if (DATA_FRAME_IS_NULL(frame_type_subtype))
9069 if (!wlan_subdissector) {
9073 * data: last seq_control seen and frame number
9075 retransmitted = FALSE;
9076 if(!pinfo->fd->flags.visited){
9078 retransmit_key *result;
9080 memcpy(key.bssid, bssid, 6);
9081 memcpy(key.src, src, 6);
9082 key.seq_control = 0;
9083 result = (retransmit_key *)g_hash_table_lookup(fc_analyse_retransmit_table, &key);
9084 if (result && result->seq_control == seq_control) {
9085 /* keep a pointer to the first seen frame, could be done with proto data? */
9086 fnum = result->fnum;
9087 g_hash_table_insert(fc_first_frame_table, GINT_TO_POINTER( pinfo->fd->num),
9088 GINT_TO_POINTER(fnum));
9089 retransmitted = TRUE;
9091 /* first time or new seq*/
9093 result = se_alloc(sizeof(retransmit_key));
9095 g_hash_table_insert(fc_analyse_retransmit_table, result, result);
9097 result->seq_control = seq_control;
9098 result->fnum = pinfo->fd->num;
9101 else if ((fnum = GPOINTER_TO_UINT(g_hash_table_lookup(fc_first_frame_table, GINT_TO_POINTER( pinfo->fd->num))))) {
9102 retransmitted = TRUE;
9105 if (retransmitted) {
9106 col_append_str(pinfo->cinfo, COL_INFO, " [retransmitted]");
9110 item=proto_tree_add_none_format(hdr_tree, hf_ieee80211_fc_analysis_retransmission, tvb, 0, 0, "Retransmitted frame");
9111 PROTO_ITEM_SET_GENERATED(item);
9112 item=proto_tree_add_uint(hdr_tree, hf_ieee80211_fc_analysis_retransmission_frame,tvb, 0, 0, fnum);
9113 PROTO_ITEM_SET_GENERATED(item);
9115 next_tvb = tvb_new_subset (tvb, hdr_len, len, reported_len);
9116 call_dissector(data_handle, next_tvb, pinfo, tree);
9130 if (IS_PROTECTED(FCF_FLAGS(fcf)) && wlan_ignore_wep != WLAN_IGNORE_WEP_WO_IV) {
9132 * It's a WEP or WPA encrypted frame; dissect the protections parameters
9133 * and decrypt the data, if we have a matching key. Otherwise display it as data.
9136 gboolean can_decrypt = FALSE;
9137 proto_tree *wep_tree = NULL;
9139 guint8 key, keybyte;
9141 /* Davide Schiera (2006-11-27): define algorithms constants and macros */
9142 #ifdef HAVE_AIRPDCAP
9143 #define PROTECTION_ALG_TKIP AIRPDCAP_KEY_TYPE_TKIP
9144 #define PROTECTION_ALG_CCMP AIRPDCAP_KEY_TYPE_CCMP
9145 #define PROTECTION_ALG_WEP AIRPDCAP_KEY_TYPE_WEP
9146 #define PROTECTION_ALG_RSNA PROTECTION_ALG_CCMP | PROTECTION_ALG_TKIP
9148 #define PROTECTION_ALG_WEP 0
9149 #define PROTECTION_ALG_TKIP 1
9150 #define PROTECTION_ALG_CCMP 2
9151 #define PROTECTION_ALG_RSNA PROTECTION_ALG_CCMP | PROTECTION_ALG_TKIP
9153 guint8 algorithm=G_MAXUINT8;
9154 /* Davide Schiera (2006-11-27): added macros to check the algorithm */
9155 /* used could be TKIP or CCMP */
9156 #define IS_TKIP(tvb, hdr_len) (tvb_get_guint8(tvb, hdr_len + 1) & 0x20)
9157 #define IS_CCMP(tvb, hdr_len) (tvb_get_guint8(tvb, hdr_len + 2) == 0)
9158 /* Davide Schiera ----------------------------------------------------- */
9160 #ifdef HAVE_AIRPDCAP
9161 /* Davide Schiera (2006-11-21): recorded original lengths to pass them */
9162 /* to the packets process function */
9163 guint32 sec_header=0;
9164 guint32 sec_trailer=0;
9166 next_tvb = try_decrypt(tvb, hdr_len, reported_len, &algorithm, &sec_header, &sec_trailer);
9168 /* Davide Schiera ----------------------------------------------------- */
9170 keybyte = tvb_get_guint8(tvb, hdr_len + 3);
9171 key = KEY_OCTET_WEP_KEY(keybyte);
9172 if ((keybyte & KEY_EXTIV) && (len >= EXTIV_LEN)) {
9173 /* Extended IV; this frame is likely encrypted with TKIP or CCMP */
9177 proto_item *extiv_fields;
9179 #ifdef HAVE_AIRPDCAP
9180 /* Davide Schiera (2006-11-27): differentiated CCMP and TKIP if */
9182 if (algorithm==PROTECTION_ALG_TKIP)
9183 extiv_fields = proto_tree_add_text(hdr_tree, tvb, hdr_len, 8,
9185 else if (algorithm==PROTECTION_ALG_CCMP)
9186 extiv_fields = proto_tree_add_text(hdr_tree, tvb, hdr_len, 8,
9189 /* Davide Schiera -------------------------------------------- */
9191 /* Davide Schiera (2006-11-27): differentiated CCMP and TKIP if*/
9193 if (IS_TKIP(tvb, hdr_len)) {
9194 algorithm=PROTECTION_ALG_TKIP;
9195 extiv_fields = proto_tree_add_text(hdr_tree, tvb, hdr_len, 8,
9197 } else if (IS_CCMP(tvb, hdr_len)) {
9198 algorithm=PROTECTION_ALG_CCMP;
9199 extiv_fields = proto_tree_add_text(hdr_tree, tvb, hdr_len, 8,
9202 extiv_fields = proto_tree_add_text(hdr_tree, tvb, hdr_len, 8,
9203 "TKIP/CCMP parameters");
9204 #ifdef HAVE_AIRPDCAP
9207 proto_item_set_len (ti, hdr_len + 8);
9209 wep_tree = proto_item_add_subtree (extiv_fields, ett_wep_parameters);
9211 if (algorithm==PROTECTION_ALG_TKIP) {
9212 g_snprintf(out_buff, SHORT_STR, "0x%08X%02X%02X",
9213 tvb_get_letohl(tvb, hdr_len + 4),
9214 tvb_get_guint8(tvb, hdr_len),
9215 tvb_get_guint8(tvb, hdr_len + 2));
9216 proto_tree_add_string(wep_tree, hf_ieee80211_tkip_extiv, tvb, hdr_len,
9217 EXTIV_LEN, out_buff);
9218 } else if (algorithm==PROTECTION_ALG_CCMP) {
9219 g_snprintf(out_buff, SHORT_STR, "0x%08X%02X%02X",
9220 tvb_get_letohl(tvb, hdr_len + 4),
9221 tvb_get_guint8(tvb, hdr_len + 1),
9222 tvb_get_guint8(tvb, hdr_len));
9223 proto_tree_add_string(wep_tree, hf_ieee80211_ccmp_extiv, tvb, hdr_len,
9224 EXTIV_LEN, out_buff);
9227 proto_tree_add_uint(wep_tree, hf_ieee80211_wep_key, tvb, hdr_len + 3, 1, key);
9230 /* Subtract out the length of the IV. */
9232 reported_len -= EXTIV_LEN;
9234 /* It is unknown whether this is TKIP or CCMP, so let's not even try to
9235 * parse TKIP Michael MIC+ICV or CCMP MIC. */
9237 #ifdef HAVE_AIRPDCAP
9238 /* Davide Schiera (2006-11-21): enable TKIP and CCMP decryption */
9239 /* checking for the trailer */
9240 if (next_tvb!=NULL) {
9241 if (reported_len < (gint) sec_trailer) {
9242 /* There is no space for a trailer, ignore it and don't decrypt */
9244 } else if (len < reported_len) {
9245 /* There is space for a trailer, but we haven't capture all the */
9246 /* packet. Slice off the trailer, but don't try to decrypt */
9247 reported_len -= sec_trailer;
9248 if (len > reported_len)
9251 /* Ok, we have a trailer and the whole packet. Decrypt it! */
9252 /* TODO: At the moment we won't add the trailer to the tree, */
9253 /* so don't remove the trailer from the packet */
9255 reported_len -= sec_trailer;
9259 /* Davide Schiera -------------------------------------------------- */
9262 /* No Ext. IV - WEP packet */
9264 * XXX - pass the IV and key to "try_decrypt_wep()", and have it pass
9265 * them to "wep_decrypt()", rather than having "wep_decrypt()" extract
9268 * Also, just pass the data *following* the WEP parameters as the
9269 * buffer to decrypt.
9271 iv = tvb_get_ntoh24(tvb, hdr_len);
9273 proto_item *wep_fields;
9275 wep_fields = proto_tree_add_text(hdr_tree, tvb, hdr_len, 4,
9278 wep_tree = proto_item_add_subtree (wep_fields, ett_wep_parameters);
9279 proto_tree_add_uint (wep_tree, hf_ieee80211_wep_iv, tvb, hdr_len, 3, iv);
9280 tvb_memcpy(tvb, iv_buff, hdr_len, 3);
9281 is_iv_bad = weak_iv(iv_buff);
9282 if (is_iv_bad != -1) {
9283 proto_tree_add_boolean_format (wep_tree, hf_ieee80211_wep_iv_weak,
9285 "Weak IV for key byte %d",
9290 proto_tree_add_uint (wep_tree, hf_ieee80211_wep_key, tvb, hdr_len + 3, 1, key);
9292 /* Subtract out the length of the IV. */
9297 /* Davide Schiera (2006-11-27): Even if the decryption was not */
9298 /* successful, set the algorithm */
9299 algorithm=PROTECTION_ALG_WEP;
9302 * Well, this packet should, in theory, have an ICV.
9303 * Do we have the entire packet, and does it have enough data for
9306 if (reported_len < 4) {
9308 * The packet is claimed not to even have enough data for a
9310 * Pretend it doesn't have an ICV.
9313 } else if (len < reported_len) {
9315 * The packet is claimed to have enough data for a 4-byte ICV,
9316 * but we didn't capture all of the packet.
9317 * Slice off the 4-byte ICV from the reported length, and trim
9318 * the captured length so it's no more than the reported length;
9319 * that will slice off what of the ICV, if any, is in the
9323 if (len > reported_len)
9327 * We have the entire packet, and it includes a 4-byte ICV.
9328 * Slice it off, and put it into the tree.
9330 * We only support decrypting if we have the the ICV.
9332 * XXX - the ICV is encrypted; we're putting the encrypted
9333 * value, not the decrypted value, into the tree.
9341 if (algorithm == PROTECTION_ALG_WEP) {
9342 g_strlcpy (wlan_stats.protection, "WEP", MAX_PROTECT_LEN);
9343 } else if (algorithm == PROTECTION_ALG_TKIP) {
9344 g_strlcpy (wlan_stats.protection, "TKIP", MAX_PROTECT_LEN);
9345 } else if (algorithm == PROTECTION_ALG_CCMP) {
9346 g_strlcpy (wlan_stats.protection, "CCMP", MAX_PROTECT_LEN);
9348 g_strlcpy (wlan_stats.protection, "Unknown", MAX_PROTECT_LEN);
9351 #ifndef HAVE_AIRPDCAP
9353 next_tvb = try_decrypt_wep(tvb, hdr_len, reported_len + 8);
9355 /* Davide Schiera (2006-11-26): decrypted before parsing header and */
9356 /* protection header */
9358 if (!can_decrypt || next_tvb == NULL) {
9360 * WEP decode impossible or failed, treat payload as raw data
9361 * and don't attempt fragment reassembly or further dissection.
9363 next_tvb = tvb_new_subset(tvb, hdr_len + ivlen, len, reported_len);
9366 /* Davide Schiera (2006-11-21): added WEP or WPA separation */
9367 if (algorithm==PROTECTION_ALG_WEP) {
9369 proto_tree_add_uint_format (wep_tree, hf_ieee80211_wep_icv, tvb,
9370 hdr_len + ivlen + len, 4,
9371 tvb_get_ntohl(tvb, hdr_len + ivlen + len),
9372 "WEP ICV: 0x%08x (not verified)",
9373 tvb_get_ntohl(tvb, hdr_len + ivlen + len));
9374 } else if (algorithm==PROTECTION_ALG_CCMP) {
9375 } else if (algorithm==PROTECTION_ALG_TKIP) {
9378 /* Davide Schiera (2006-11-21) ---------------------------------- */
9380 if (pinfo->ethertype != ETHERTYPE_CENTRINO_PROMISC && wlan_ignore_wep == WLAN_IGNORE_WEP_NO) {
9381 /* Some wireless drivers (such as Centrino) WEP payload already decrypted */
9382 call_dissector(data_handle, next_tvb, pinfo, tree);
9386 /* Davide Schiera (2006-11-21): added WEP or WPA separation */
9387 if (algorithm==PROTECTION_ALG_WEP) {
9389 proto_tree_add_uint_format (wep_tree, hf_ieee80211_wep_icv, tvb,
9390 hdr_len + ivlen + len, 4,
9391 tvb_get_ntohl(tvb, hdr_len + ivlen + len),
9392 "WEP ICV: 0x%08x (correct)",
9393 tvb_get_ntohl(tvb, hdr_len + ivlen + len));
9395 add_new_data_source(pinfo, next_tvb, "Decrypted WEP data");
9396 } else if (algorithm==PROTECTION_ALG_CCMP) {
9397 add_new_data_source(pinfo, next_tvb, "Decrypted CCMP data");
9398 } else if (algorithm==PROTECTION_ALG_TKIP) {
9399 add_new_data_source(pinfo, next_tvb, "Decrypted TKIP data");
9401 /* Davide Schiera (2006-11-21) ------------------------------------- */
9402 /* Davide Schiera (2006-11-27): undefine macros and definitions */
9405 #undef PROTECTION_ALG_CCMP
9406 #undef PROTECTION_ALG_TKIP
9407 #undef PROTECTION_ALG_WEP
9408 /* Davide Schiera -------------------------------------------------- */
9412 * WEP decryption successful!
9414 * Use the tvbuff we got back from the decryption; the data starts at
9415 * the beginning. The lengths are already correct for the decoded WEP
9422 * Not a WEP-encrypted frame; just use the data from the tvbuff
9425 * The payload starts at "hdr_len" (i.e., just past the 802.11
9426 * MAC header), the length of data in the tvbuff following the
9427 * 802.11 header is "len", and the length of data in the packet
9428 * following the 802.11 header is "reported_len".
9434 * Do defragmentation if "wlan_defragment" is true, and we have more
9435 * fragments or this isn't the first fragment.
9437 * We have to do some special handling to catch frames that
9438 * have the "More Fragments" indicator not set but that
9439 * don't show up as reassembled and don't have any other
9440 * fragments present. Some networking interfaces appear
9441 * to do reassembly even when you're capturing raw packets
9442 * *and* show the reassembled packet without the "More
9443 * Fragments" indicator set *but* with a non-zero fragment
9446 * "fragment_add_seq_802_11()" handles that; we want to call it
9447 * even if we have a short frame, so that it does those checks - if
9448 * the frame is short, it doesn't do reassembly on it.
9450 * (This could get some false positives if we really *did* only
9451 * capture the last fragment of a fragmented packet, but that's
9454 save_fragmented = pinfo->fragmented;
9455 if (wlan_defragment && (more_frags || frag_number != 0)) {
9456 fragment_data *fd_head;
9459 * If we've already seen this frame, look it up in the
9460 * table of reassembled packets, otherwise add it to
9461 * whatever reassembly is in progress, if any, and see
9464 if (reported_len < 0)
9465 THROW(ReportedBoundsError);
9466 fd_head = fragment_add_seq_802_11(next_tvb, hdr_len, pinfo, seq_number,
9467 wlan_fragment_table,
9468 wlan_reassembled_table,
9472 next_tvb = process_reassembled_data(tvb, hdr_len, pinfo,
9473 "Reassembled 802.11", fd_head,
9474 &frag_items, NULL, hdr_tree);
9477 * If this is the first fragment, dissect its contents, otherwise
9478 * just show it as a fragment.
9480 if (frag_number != 0) {
9481 /* Not the first fragment - don't dissect it. */
9484 /* First fragment, or not fragmented. Dissect what we have here. */
9486 /* Get a tvbuff for the payload. */
9487 next_tvb = tvb_new_subset (next_tvb, hdr_len, len, reported_len);
9490 * If this is the first fragment, but not the only fragment,
9491 * tell the next protocol that.
9494 pinfo->fragmented = TRUE;
9496 pinfo->fragmented = FALSE;
9500 if (next_tvb == NULL) {
9501 /* Just show this as an incomplete fragment. */
9502 col_set_str(pinfo->cinfo, COL_INFO, "Fragmented IEEE 802.11 frame");
9503 next_tvb = tvb_new_subset (tvb, hdr_len, len, reported_len);
9504 call_dissector(data_handle, next_tvb, pinfo, tree);
9505 pinfo->fragmented = save_fragmented;
9509 switch (FCF_FRAME_TYPE (fcf))
9513 dissect_ieee80211_mgt (fcf, next_tvb, pinfo, tree);
9517 if (is_amsdu && tvb_reported_length_remaining(next_tvb, 0) > 4){
9518 tvbuff_t *volatile msdu_tvb = NULL;
9519 guint32 msdu_offset = 0;
9521 const guint8 *lcl_src = NULL;
9522 const guint8 *lcl_dst = NULL;
9523 guint16 msdu_length;
9524 proto_item *parent_item;
9525 proto_tree *mpdu_tree;
9526 proto_tree *subframe_tree;
9528 parent_item = proto_tree_add_protocol_format(tree, proto_aggregate, next_tvb, 0,
9529 tvb_reported_length_remaining(next_tvb, 0), "IEEE 802.11 Aggregate MSDU");
9530 mpdu_tree = proto_item_add_subtree(parent_item, ett_msdu_aggregation_parent_tree);
9533 lcl_dst = tvb_get_ptr (next_tvb, msdu_offset, 6);
9534 lcl_src = tvb_get_ptr (next_tvb, msdu_offset+6, 6);
9535 msdu_length = tvb_get_ntohs (next_tvb, msdu_offset+12);
9537 parent_item = proto_tree_add_uint_format(mpdu_tree, hf_ieee80211_amsdu_msdu_header_text, next_tvb,
9538 msdu_offset, roundup2(msdu_offset+14+msdu_length, 4),
9539 i, "A-MSDU Subframe #%u", i);
9540 subframe_tree = proto_item_add_subtree(parent_item, ett_msdu_aggregation_subframe_tree);
9543 proto_tree_add_ether(subframe_tree, hf_ieee80211_addr_da, next_tvb, msdu_offset, 6, lcl_dst);
9544 proto_tree_add_ether(subframe_tree, hf_ieee80211_addr_sa, next_tvb, msdu_offset+6, 6, lcl_src);
9545 proto_tree_add_uint_format(subframe_tree, hf_ieee80211_mcsset_highest_data_rate, next_tvb, msdu_offset+12, 2,
9546 msdu_length, "MSDU length: 0x%04X", msdu_length);
9549 msdu_tvb = tvb_new_subset(next_tvb, msdu_offset, msdu_length, -1);
9550 call_dissector(llc_handle, msdu_tvb, pinfo, subframe_tree);
9551 msdu_offset = roundup2(msdu_offset+msdu_length, 4);
9552 } while (tvb_reported_length_remaining(next_tvb, msdu_offset) > 14);
9556 /* I guess some bridges take Netware Ethernet_802_3 frames,
9557 which are 802.3 frames (with a length field rather than
9558 a type field, but with no 802.2 header in the payload),
9559 and just stick the payload into an 802.11 frame. I've seen
9560 captures that show frames of that sort.
9562 We also handle some odd form of encapsulation in which a
9563 complete Ethernet frame is encapsulated within an 802.11
9564 data frame, with no 802.2 header. This has been seen
9567 On top of that, at least at some point it appeared that
9568 the OLPC XO sent out frames with two bytes of 0 between
9569 the "end" of the 802.11 header and the beginning of
9572 So, if the packet doesn't start with 0xaa 0xaa:
9574 we first use the same scheme that linux-wlan-ng does to detect
9575 those encapsulated Ethernet frames, namely looking to see whether
9576 the frame either starts with 6 octets that match the destination
9577 address from the 802.11 header or has 6 octets that match the
9578 source address from the 802.11 header following the first 6 octets,
9579 and, if so, treat it as an encapsulated Ethernet frame;
9581 otherwise, we use the same scheme that we use in the Ethernet
9582 dissector to recognize Netware 802.3 frames, namely checking
9583 whether the packet starts with 0xff 0xff and, if so, treat it
9584 as an encapsulated IPX frame, and then check whether the
9585 packet starts with 0x00 0x00 and, if so, treat it as an OLPC
9587 encap_type = ENCAP_802_2;
9589 octet1 = tvb_get_guint8(next_tvb, 0);
9590 octet2 = tvb_get_guint8(next_tvb, 1);
9591 if (octet1 != 0xaa || octet2 != 0xaa) {
9592 if (tvb_memeql(next_tvb, 6, pinfo->dl_src.data, 6) == 0 ||
9593 tvb_memeql(next_tvb, 0, pinfo->dl_dst.data, 6) == 0)
9594 encap_type = ENCAP_ETHERNET;
9595 else if (octet1 == 0xff && octet2 == 0xff)
9596 encap_type = ENCAP_IPX;
9597 else if (octet1 == 0x00 && octet2 == 0x00) {
9598 proto_tree_add_text(tree, next_tvb, 0, 2, "Mysterious OLPC stuff");
9599 next_tvb = tvb_new_subset_remaining (next_tvb, 2);
9603 CATCH2(BoundsError, ReportedBoundsError) {
9609 switch (encap_type) {
9612 call_dissector(llc_handle, next_tvb, pinfo, tree);
9615 case ENCAP_ETHERNET:
9616 call_dissector(eth_withoutfcs_handle, next_tvb, pinfo, tree);
9620 call_dissector(ipx_handle, next_tvb, pinfo, tree);
9625 pinfo->fragmented = save_fragmented;
9628 whdr->stats = wlan_stats;
9629 tap_queue_packet(wlan_tap, pinfo, whdr);
9630 memset (&wlan_stats, 0, sizeof wlan_stats);
9634 * Dissect 802.11 with a variable-length link-layer header.
9637 dissect_ieee80211 (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
9639 dissect_ieee80211_common (tvb, pinfo, tree, FALSE,
9640 pinfo->pseudo_header->ieee_802_11.fcs_len, FALSE, FALSE, FALSE);
9644 * Dissect 802.11 with a variable-length link-layer header and data padding.
9647 dissect_ieee80211_datapad (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
9649 dissect_ieee80211_common (tvb, pinfo, tree, FALSE,
9650 pinfo->pseudo_header->ieee_802_11.fcs_len, FALSE, TRUE, FALSE);
9654 * Dissect 802.11 with a variable-length link-layer header and a pseudo-
9655 * header containing radio information.
9658 dissect_radio (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
9660 proto_item *ti = NULL;
9661 proto_tree *radio_tree = NULL;
9663 col_set_str(pinfo->cinfo, COL_PROTOCOL, "Radio");
9664 col_clear(pinfo->cinfo, COL_INFO);
9666 /* Add the radio information to the column information */
9667 col_add_fstr(pinfo->cinfo, COL_TX_RATE, "%u.%u",
9668 pinfo->pseudo_header->ieee_802_11.data_rate / 2,
9669 pinfo->pseudo_header->ieee_802_11.data_rate & 1 ? 5 : 0);
9670 /* XX - this is a percentage, not a dBm or normalized or raw RSSI */
9671 col_add_fstr(pinfo->cinfo, COL_RSSI, "%u",
9672 pinfo->pseudo_header->ieee_802_11.signal_level);
9675 ti = proto_tree_add_item(tree, proto_radio, tvb, 0, 0, FALSE);
9676 radio_tree = proto_item_add_subtree (ti, ett_radio);
9678 proto_tree_add_uint64_format(radio_tree, hf_data_rate, tvb, 0, 0,
9679 (guint64)pinfo->pseudo_header->ieee_802_11.data_rate * 500000,
9680 "Data Rate: %u.%u Mb/s",
9681 pinfo->pseudo_header->ieee_802_11.data_rate / 2,
9682 pinfo->pseudo_header->ieee_802_11.data_rate & 1 ? 5 : 0);
9684 proto_tree_add_uint(radio_tree, hf_channel, tvb, 0, 0,
9685 pinfo->pseudo_header->ieee_802_11.channel);
9687 proto_tree_add_uint_format(radio_tree, hf_signal_strength, tvb, 0, 0,
9688 pinfo->pseudo_header->ieee_802_11.signal_level,
9689 "Signal Strength: %u%%",
9690 pinfo->pseudo_header->ieee_802_11.signal_level);
9693 pinfo->current_proto = "IEEE 802.11";
9694 dissect_ieee80211_common (tvb, pinfo, tree, FALSE,
9695 pinfo->pseudo_header->ieee_802_11.fcs_len, FALSE, FALSE, FALSE);
9699 * Dissect 802.11 with a variable-length link-layer header and a byte-swapped
9700 * control field (some hardware sends out LWAPP-encapsulated 802.11
9701 * packets with the control field byte swapped).
9704 dissect_ieee80211_bsfc (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
9706 dissect_ieee80211_common (tvb, pinfo, tree, FALSE, 0, TRUE, FALSE, FALSE);
9710 * Dissect 802.11 with a fixed-length link-layer header (padded to the
9714 dissect_ieee80211_fixed (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
9716 dissect_ieee80211_common (tvb, pinfo, tree, TRUE, 0, FALSE, FALSE, FALSE);
9720 * Dissect an HT 802.11 frame with a variable-length link-layer header.
9721 * XXX - Can we tell if a frame is +HTC just by looking at the MAC header?
9722 * If so, we can dispense with this.
9725 dissect_ieee80211_ht (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
9727 dissect_ieee80211_common (tvb, pinfo, tree, FALSE,
9728 pinfo->pseudo_header->ieee_802_11.fcs_len, FALSE, FALSE, TRUE);
9732 wlan_defragment_init(void)
9734 fragment_table_init(&wlan_fragment_table);
9735 reassembled_table_init(&wlan_reassembled_table);
9740 retransmit_hash(gconstpointer k)
9742 const retransmit_key *key = (const retransmit_key *)k;
9747 for (i = 0; i < 6; i++)
9748 hash_val += key->bssid[i];
9750 for (i = 0; i < 6; i++)
9751 hash_val += key->src[i];
9757 retransmit_equal(gconstpointer k1, gconstpointer k2)
9759 const retransmit_key *key1 = (const retransmit_key *)k1;
9760 const retransmit_key *key2 = (const retransmit_key *)k2;
9762 return ( (!memcmp(key1->bssid, key2->bssid, 6) && !memcmp( key1->src, key2->src, 6))? TRUE:FALSE);
9766 frame_hash(gconstpointer k)
9768 guint32 frame = GPOINTER_TO_UINT(k);
9774 frame_equal(gconstpointer k1, gconstpointer k2)
9776 guint32 frame1 = GPOINTER_TO_UINT(k1);
9777 guint32 frame2 = GPOINTER_TO_UINT(k2);
9779 return frame1==frame2;
9783 wlan_retransmit_init(void)
9785 if ( fc_analyse_retransmit_table ){
9786 g_hash_table_destroy(fc_analyse_retransmit_table);
9787 fc_analyse_retransmit_table = NULL;
9790 if( fc_first_frame_table ){
9791 g_hash_table_destroy(fc_first_frame_table);
9792 fc_first_frame_table = NULL;
9795 if (wlan_subdissector)
9798 fc_analyse_retransmit_table= g_hash_table_new(retransmit_hash, retransmit_equal);
9799 fc_first_frame_table = g_hash_table_new( frame_hash, frame_equal);
9804 dissect_prism(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
9806 proto_tree *prism_tree = NULL, *prism_did_tree = NULL;
9807 proto_item *ti = NULL, *ti_did = NULL;
9810 guint32 msgcode, msglen, did;
9816 /* handle the new capture type. */
9817 msgcode = tvb_get_ntohl(tvb, offset);
9818 if ((msgcode == WLANCAP_MAGIC_COOKIE_V1) ||
9819 (msgcode == WLANCAP_MAGIC_COOKIE_V2)) {
9820 call_dissector(wlancap_handle, tvb, pinfo, tree);
9824 col_set_str(pinfo->cinfo, COL_PROTOCOL, "Prism");
9825 col_clear(pinfo->cinfo, COL_INFO);
9828 ti = proto_tree_add_item(tree, proto_prism, tvb, 0, 144, FALSE);
9829 prism_tree = proto_item_add_subtree(ti, ett_prism);
9834 proto_tree_add_item(prism_tree, hf_ieee80211_prism_msgcode, tvb, offset, 4, TRUE);
9836 msgcode = tvb_get_letohl(tvb, offset);
9839 /* Message Length */
9841 proto_tree_add_item(prism_tree, hf_ieee80211_prism_msglen, tvb, offset, 4, TRUE);
9843 msglen = tvb_get_letohl(tvb, offset);
9848 proto_tree_add_item(prism_tree, hf_ieee80211_prism_devname, tvb, offset, 16, TRUE);
9850 devname = tvb_get_ephemeral_string(tvb, offset, 16);
9853 col_add_fstr(pinfo->cinfo, COL_INFO, "Device: %s, Message 0x%x, Length %d", devname, msgcode, msglen);
9856 while(offset < PRISM_HEADER_LENGTH)
9860 ti_did = proto_tree_add_item(prism_tree, hf_ieee80211_prism_did, tvb, offset, 12, TRUE);
9861 prism_did_tree = proto_item_add_subtree(ti_did, ett_prism_did);
9863 proto_tree_add_item(prism_did_tree, hf_ieee80211_prism_did_type, tvb, offset, 4, TRUE);
9864 did = tvb_get_letohl(tvb, offset);
9865 proto_item_append_text(ti_did, " %s", val_to_str(did, prism_did_vals, "Unknown %x") );
9872 proto_tree_add_item(prism_did_tree, hf_ieee80211_prism_did_status, tvb, offset, 2, TRUE);
9878 proto_tree_add_item(prism_did_tree, hf_ieee80211_prism_did_length, tvb, offset, 2, TRUE);
9884 case PRISM_DID_HOSTTIME:
9886 proto_tree_add_item(prism_did_tree, hf_ieee80211_prism_did_hosttime, tvb, offset, 4, TRUE);
9887 proto_item_append_text(ti_did, " %d", tvb_get_letohl(tvb, offset) );
9890 case PRISM_DID_MACTIME:
9892 proto_tree_add_item(prism_did_tree, hf_ieee80211_prism_did_mactime, tvb, offset, 4, TRUE);
9893 proto_item_append_text(ti_did, " %d", tvb_get_letohl(tvb, offset) );
9896 case PRISM_DID_CHANNEL:
9898 proto_tree_add_item(prism_did_tree, hf_ieee80211_prism_did_channel, tvb, offset, 4, TRUE);
9899 proto_item_append_text(ti_did, " %d", tvb_get_letohl(tvb, offset) );
9901 col_add_fstr(pinfo->cinfo, COL_FREQ_CHAN, "%u", tvb_get_letohl(tvb, offset));
9903 case PRISM_DID_RSSI:
9905 proto_tree_add_item(prism_did_tree, hf_ieee80211_prism_did_rssi, tvb, offset, 4, TRUE);
9906 proto_item_append_text(ti_did, " 0x%x", tvb_get_letohl(tvb, offset) );
9908 col_add_fstr(pinfo->cinfo, COL_RSSI, "%d", tvb_get_letohl(tvb, offset));
9912 proto_tree_add_item(prism_did_tree, hf_ieee80211_prism_did_sq, tvb, offset, 4, TRUE);
9913 proto_item_append_text(ti_did, " 0x%x", tvb_get_letohl(tvb, offset) );
9916 case PRISM_DID_SIGNAL:
9918 proto_tree_add_item(prism_did_tree, hf_ieee80211_prism_did_signal, tvb, offset, 4, TRUE);
9919 proto_item_append_text(ti_did, " 0x%x", tvb_get_letohl(tvb, offset) );
9922 case PRISM_DID_NOISE:
9924 proto_tree_add_item(prism_did_tree, hf_ieee80211_prism_did_noise, tvb, offset, 4, TRUE);
9925 proto_item_append_text(ti_did, " 0x%x", tvb_get_letohl(tvb, offset) );
9928 case PRISM_DID_RATE:
9930 proto_tree_add_item(prism_did_tree, hf_ieee80211_prism_did_rate, tvb, offset, 4, TRUE);
9931 proto_item_append_text(ti_did, " %s Mb/s", prism_rate_return(tvb_get_letohl(tvb, offset)) );
9933 col_add_fstr(pinfo->cinfo, COL_TX_RATE, "%s", prism_rate_return(tvb_get_letohl(tvb, offset)) );
9936 case PRISM_DID_ISTX:
9938 proto_tree_add_item(prism_did_tree, hf_ieee80211_prism_did_istx, tvb, offset, 4, TRUE);
9939 proto_item_append_text(ti_did, " 0x%x", tvb_get_letohl(tvb, offset) );
9942 case PRISM_DID_FRMLEN:
9944 proto_tree_add_item(prism_did_tree, hf_ieee80211_prism_did_frmlen, tvb, offset, 4, TRUE);
9945 proto_item_append_text(ti_did, " %d", tvb_get_letohl(tvb, offset) );
9950 proto_tree_add_item(prism_did_tree, hf_ieee80211_prism_did_unknown, tvb, offset, 4, TRUE);
9957 /* dissect the 802.11 header next */
9958 next_tvb = tvb_new_subset_remaining(tvb, offset);
9959 call_dissector(ieee80211_handle, next_tvb, pinfo, tree);
9963 * AVS linux-wlan-based products use a new sniff header to replace the
9964 * old Prism header. This one has additional fields, is designed to be
9965 * non-hardware-specific, and more importantly, version and length fields
9966 * so it can be extended later without breaking anything.
9968 * Support by Solomon Peachy
9970 * Description, from the capturefrm.txt file in the linux-wlan-ng 0.2.9
9971 * release (linux-wlan-ng-0.2.9/doc/capturefrm.txt):
9973 AVS Capture Frame Format
9977 The original header format for "monitor mode" or capturing frames was
9978 a considerable hack. The document covers a redesign of that format.
9980 Any questions, corrections, or proposed changes go to info@linux-wlan.com
9983 All sniff frames follow the same format:
9985 Offset Name Size Description
9986 --------------------------------------------------------------------
9987 0 CaptureHeader AVS capture metadata header
9988 64 802.11Header [10-30] 802.11 frame header
9989 ?? 802.11Payload [0-2312] 802.11 frame payload
9990 ?? 802.11FCS 4 802.11 frame check sequence
9992 Note that the header and payload are variable length and the payload
9995 If the hardware does not supply the FCS to the driver, then the frame shall
9996 have a FCS of 0xFFFFFFFF.
9999 All multibyte fields of the capture header are in "network" byte
10000 order. The "host to network" and "network to host" functions should
10001 work just fine. All the remaining multibyte fields are ordered
10002 according to their respective standards.
10004 4. Capture Header Format
10005 The following fields make up the AVS capture header:
10008 ------------------------------
10014 28 frequency uint32
10019 48 ssi_signal int32
10025 72 receiver_addr uint8[6]
10026 78 padding uint8[2]
10027 ------------------------------
10030 The following subsections detail the fields of the capture header.
10033 The version field identifies this type of frame as a subtype of
10034 ETH_P_802111_CAPTURE as received by an ARPHRD_IEEE80211_PRISM or
10035 an ARPHRD_IEEE80211_CAPTURE device. The value of this field shall be
10036 0x80211002. As new revisions of this header are necessary, we can
10037 increment the version appropriately.
10040 The length field contains the length of the entire AVS capture header,
10044 Many WLAN devices supply a relatively high resolution frame reception
10045 time value. This field contains the value supplied by the device. If
10046 the device does not supply a receive time value, this field shall be
10047 set to zero. The units for this field are microseconds.
10049 If possible, this time value should be absolute, representing the number
10050 of microseconds elapsed since the UNIX epoch.
10053 The hosttime field is set to the current value of the host maintained
10054 clock variable when the frame is received by the host.
10056 If possible, this time value should be absolute, representing the number
10057 of microseconds elapsed since the UNIX epoch.
10060 The phytype field identifies what type of PHY is employed by the WLAN
10061 device used to capture this frame. The valid values are:
10064 -------------------------------------
10065 phytype_fhss_dot11_97 1
10066 phytype_dsss_dot11_97 2
10067 phytype_irbaseband 3
10068 phytype_dsss_dot11_b 4
10069 phytype_pbcc_dot11_b 5
10070 phytype_ofdm_dot11_g 6
10071 phytype_pbcc_dot11_g 7
10072 phytype_ofdm_dot11_a 8
10073 phytype_dss_ofdm_dot11_g 9
10077 This represents the frequency or channel number of the receiver at the
10078 time the frame was received. It is interpreted as follows:
10080 For frequency hopping radios, this field is broken in to the
10081 following subfields:
10084 ------------------------
10090 For non-hopping radios, the frequency is interpreted as follows:
10093 -----------------------------------------
10094 < 256 Channel number (using externally-defined
10096 < 10000 Center frequency, in MHz
10097 >= 10000 Center frequency, in KHz
10100 The data rate field contains the rate at which the frame was received
10101 in units of 100kbps.
10104 For WLAN devices that indicate the receive antenna for each frame, the
10105 antenna field shall contain an index value into the dot11AntennaList.
10106 If the device does not indicate a receive antenna value, this field
10107 shall be set to zero.
10110 The priority field indicates the receive priority of the frame. The
10111 value is in the range [0-15] with the value 0 reserved to indicate
10112 contention period and the value 6 reserved to indicate contention free
10116 The ssi_type field is used to indicate what type of signal strength
10117 information is present: "None", "Normalized RSSI" or "dBm". "None"
10118 indicates that the underlying WLAN device does not supply any signal
10119 strength at all and the ssi_* values are unset. "Normalized RSSI"
10120 values are integers in the range [0-1000] where higher numbers
10121 indicate stronger signal. "dBm" values indicate an actual signal
10122 strength measurement quantity and are usually in the range [-108 - 10].
10123 The following values indicate the three types:
10126 ---------------------------------------------
10133 The ssi_signal field contains the signal strength value reported by
10134 the WLAN device for this frame. Note that this is a signed quantity
10135 and if the ssi_type value is "dBm" that the value may be negative.
10138 The ssi_noise field contains the noise or "silence" value reported by
10139 the WLAN device. This value is commonly defined to be the "signal
10140 strength reported immediately prior to the baseband processor lock on
10141 the frame preamble". If the hardware does not provide noise data, this
10142 shall equal 0xffffffff.
10145 For PHYs that support variable preamble lengths, the preamble field
10146 indicates the preamble type used for this frame. The values are:
10149 ---------------------------------------------
10155 This specifies the encoding of the received packet. For PHYs that support
10156 multiple encoding types, this will tell us which one was used.
10159 ---------------------------------------------
10171 This is a receive frame sequence counter. The sniff host shall
10172 increment this by one for every valid frame received off the medium.
10173 By watching for gaps in the sequence numbers we can determine when
10174 packets are lost due to unreliable transport, rather than a frame never
10175 being received to begin with.
10178 This is a counter of the number of known frame drops that occured. This
10179 is particularly useful when the system or hardware cannot keep up with
10183 This specifies the MAC address of the receiver of this frame.
10184 It is six octets in length. This field is followed by two octets of
10185 padding to keep the structure 32-bit word aligned.
10187 ================================
10191 * Added contact e-mail address to introduction
10192 * Added sniffer_addr, drop count, and sequence fields, bringing total
10194 * Bumped version to 0x80211002
10195 * Mactime is specified in microseconds, not nanoseconds
10196 * Added 64QAM, 16QAM, BPSK, QPSK encodings
10198 ================================
10200 Changes: v2.1->v2.1.1
10202 * Renamed 'channel' to 'frequency'
10203 * Clarified the interpretation of the frequency/channel field.
10204 * Renamed 'sniffer address' to 'receiver address'
10205 * Clarified timestamp fields.
10209 * Signal/noise strength type values.
10211 #define SSI_NONE 0 /* no SSI information */
10212 #define SSI_NORM_RSSI 1 /* normalized RSSI - 0-1000 */
10213 #define SSI_DBM 2 /* dBm */
10214 #define SSI_RAW_RSSI 3 /* raw RSSI from the hardware */
10217 dissect_wlancap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
10219 proto_tree *wlan_tree = NULL;
10221 tvbuff_t *next_tvb;
10230 col_set_str(pinfo->cinfo, COL_PROTOCOL, "WLAN");
10231 col_clear(pinfo->cinfo, COL_INFO);
10234 version = tvb_get_ntohl(tvb, offset) - WLANCAP_MAGIC_COOKIE_BASE;
10236 length = tvb_get_ntohl(tvb, offset+4);
10238 col_add_fstr(pinfo->cinfo, COL_INFO, "AVS WLAN Capture v%x, Length %d",version, length);
10244 /* Dissect the AVS header */
10246 ti = proto_tree_add_item(tree, proto_wlancap, tvb, 0, length, FALSE);
10247 wlan_tree = proto_item_add_subtree(ti, ett_radio);
10248 proto_tree_add_item(wlan_tree, hf_wlan_magic, tvb, offset, 4, FALSE);
10249 proto_tree_add_item(wlan_tree, hf_wlan_version, tvb, offset, 4, FALSE);
10253 proto_tree_add_item(wlan_tree, hf_wlan_length, tvb, offset, 4, FALSE);
10256 proto_tree_add_item(wlan_tree, hf_mactime, tvb, offset, 8, FALSE);
10259 proto_tree_add_item(wlan_tree, hf_hosttime, tvb, offset, 8, FALSE);
10262 proto_tree_add_item(wlan_tree, hf_wlan_phytype, tvb, offset, 4, FALSE);
10265 /* XXX cook channel (fh uses different numbers) */
10266 channel = tvb_get_ntohl(tvb, offset);
10267 if (channel < 256) {
10268 col_add_fstr(pinfo->cinfo, COL_FREQ_CHAN, "%u", channel);
10270 proto_tree_add_uint(wlan_tree, hf_channel, tvb, offset, 4, channel);
10271 } else if (channel < 10000) {
10272 col_add_fstr(pinfo->cinfo, COL_FREQ_CHAN, "%u MHz", channel);
10274 proto_tree_add_uint_format(wlan_tree, hf_channel_frequency, tvb, offset,
10275 4, channel, "Frequency: %u MHz", channel);
10277 col_add_fstr(pinfo->cinfo, COL_FREQ_CHAN, "%u KHz", channel);
10279 proto_tree_add_uint_format(wlan_tree, hf_channel_frequency, tvb, offset,
10280 4, channel, "Frequency: %u KHz", channel);
10283 datarate = tvb_get_ntohl(tvb, offset);
10284 if (datarate < 100000) {
10285 /* In units of 100 Kb/s; convert to b/s */
10286 datarate *= 100000;
10289 col_add_fstr(pinfo->cinfo, COL_TX_RATE, "%u.%u",
10290 datarate / 1000000,
10291 ((datarate % 1000000) > 500000) ? 5 : 0);
10293 proto_tree_add_uint64_format(wlan_tree, hf_data_rate, tvb, offset, 4,
10295 "Data Rate: %u.%u Mb/s",
10297 ((datarate % 1000000) > 500000) ? 5 : 0);
10301 proto_tree_add_item(wlan_tree, hf_wlan_antenna, tvb, offset, 4, FALSE);
10304 proto_tree_add_item(wlan_tree, hf_wlan_priority, tvb, offset, 4, FALSE);
10306 ssi_type = tvb_get_ntohl(tvb, offset);
10308 proto_tree_add_uint(wlan_tree, hf_wlan_ssi_type, tvb, offset, 4, ssi_type);
10310 switch (ssi_type) {
10314 /* either there is no SSI information, or we don't know what type it is */
10317 case SSI_NORM_RSSI:
10318 /* Normalized RSSI */
10319 col_add_fstr(pinfo->cinfo, COL_RSSI, "%u (norm)", tvb_get_ntohl(tvb, offset));
10321 proto_tree_add_item(wlan_tree, hf_normrssi_antsignal, tvb, offset, 4, FALSE);
10326 col_add_fstr(pinfo->cinfo, COL_RSSI, "%d dBm", tvb_get_ntohl(tvb, offset));
10328 proto_tree_add_item(wlan_tree, hf_dbm_antsignal, tvb, offset, 4, FALSE);
10333 col_add_fstr(pinfo->cinfo, COL_RSSI, "%u (raw)", tvb_get_ntohl(tvb, offset));
10335 proto_tree_add_item(wlan_tree, hf_rawrssi_antsignal, tvb, offset, 4, FALSE);
10339 antnoise = tvb_get_ntohl(tvb, offset);
10340 /* 0xffffffff means "hardware does not provide noise data" */
10341 if (antnoise != 0xffffffff) {
10342 switch (ssi_type) {
10346 /* either there is no SSI information, or we don't know what type it is */
10349 case SSI_NORM_RSSI:
10350 /* Normalized RSSI */
10352 proto_tree_add_uint(wlan_tree, hf_normrssi_antnoise, tvb, offset, 4, antnoise);
10358 proto_tree_add_int(wlan_tree, hf_dbm_antnoise, tvb, offset, 4, antnoise);
10364 proto_tree_add_uint(wlan_tree, hf_rawrssi_antnoise, tvb, offset, 4, antnoise);
10370 proto_tree_add_item(wlan_tree, hf_wlan_preamble, tvb, offset, 4, FALSE);
10373 proto_tree_add_item(wlan_tree, hf_wlan_encoding, tvb, offset, 4, FALSE);
10377 proto_tree_add_item(wlan_tree, hf_wlan_sequence, tvb, offset, 4, FALSE);
10380 proto_tree_add_item(wlan_tree, hf_wlan_drops, tvb, offset, 4, FALSE);
10383 proto_tree_add_item(wlan_tree, hf_wlan_receiver_addr, tvb, offset, 6, FALSE);
10386 proto_tree_add_item(wlan_tree, hf_wlan_padding, tvb, offset, 2, FALSE);
10394 /* dissect the 802.11 header next */
10395 next_tvb = tvb_new_subset_remaining(tvb, offset);
10396 call_dissector(ieee80211_handle, next_tvb, pinfo, tree);
10400 proto_register_ieee80211 (void)
10403 GString *key_name, *key_title, *key_desc;
10405 static const value_string frame_type[] = {
10406 {MGT_FRAME, "Management frame"},
10407 {CONTROL_FRAME, "Control frame"},
10408 {DATA_FRAME, "Data frame"},
10412 static const value_string tofrom_ds[] = {
10413 {0, "Not leaving DS or network is operating "
10414 "in AD-HOC mode (To DS: 0 From DS: 0)"},
10415 {FLAG_TO_DS, "Frame from STA to DS via an AP (To DS: 1 "
10417 {FLAG_FROM_DS, "Frame from DS to a STA via AP(To DS: 0 "
10419 #ifdef MESH_OVERRIDES
10420 {FLAG_TO_DS|FLAG_FROM_DS, "WDS (AP to AP) or Mesh (MP to MP) Frame "
10421 "(To DS: 1 From DS: 1)"},
10422 #else /* MESH_OVERRIDES */
10423 {FLAG_TO_DS|FLAG_FROM_DS, "Frame part of WDS from one AP to another "
10424 "AP (To DS: 1 From DS: 1)"},
10425 #endif /* MESH_OVERRIDES */
10429 static const true_false_string tods_flag = {
10430 "Frame is entering DS",
10431 "Frame is not entering DS"
10434 static const true_false_string fromds_flag = {
10435 "Frame is exiting DS",
10436 "Frame is not exiting DS"
10439 static const true_false_string more_frags = {
10440 "More fragments follow",
10441 "This is the last fragment"
10444 static const true_false_string retry_flags = {
10445 "Frame is being retransmitted",
10446 "Frame is not being retransmitted"
10449 static const true_false_string pm_flags = {
10450 "STA will go to sleep",
10454 static const true_false_string md_flags = {
10455 "Data is buffered for STA at AP",
10459 static const true_false_string protected_flags = {
10460 "Data is protected",
10461 "Data is not protected"
10464 static const true_false_string order_flags = {
10465 "Strictly ordered",
10466 "Not strictly ordered"
10469 static const true_false_string cf_ess_flags = {
10470 "Transmitter is an AP",
10471 "Transmitter is a STA"
10475 static const true_false_string cf_privacy_flags = {
10476 "AP/STA can support WEP",
10477 "AP/STA cannot support WEP"
10480 static const true_false_string cf_preamble_flags = {
10481 "Short preamble allowed",
10482 "Short preamble not allowed"
10485 static const true_false_string cf_pbcc_flags = {
10486 "PBCC modulation allowed",
10487 "PBCC modulation not allowed"
10490 static const true_false_string cf_agility_flags = {
10491 "Channel agility in use",
10492 "Channel agility not in use"
10495 static const true_false_string short_slot_time_flags = {
10496 "Short slot time in use",
10497 "Short slot time not in use"
10500 static const true_false_string dsss_ofdm_flags = {
10501 "DSSS-OFDM modulation allowed",
10502 "DSSS-OFDM modulation not allowed"
10505 static const true_false_string cf_spec_man_flags = {
10506 "dot11SpectrumManagementRequired TRUE",
10507 "dot11SpectrumManagementRequired FALSE"
10510 static const true_false_string cf_apsd_flags = {
10511 "apsd implemented",
10512 "apsd not implemented"
10515 static const true_false_string cf_del_blk_ack_flags = {
10516 "delayed block ack implemented",
10517 "delayed block ack not implemented"
10520 static const true_false_string cf_imm_blk_ack_flags = {
10521 "immediate block ack implemented",
10522 "immediate block ack not implemented"
10524 static const true_false_string cf_ibss_flags = {
10525 "Transmitter belongs to an IBSS",
10526 "Transmitter belongs to a BSS"
10529 static const true_false_string eosp_flag = {
10530 "End of service period",
10534 static const true_false_string bit4_flag = {
10535 "Bits 8-15 of QoS Control field are Queue Size",
10536 "Bits 8-15 of QoS Control field are TXOP Duration Requested"
10539 static const true_false_string ieee80211_qos_amsdu_present_flag = {
10544 static const value_string sta_cf_pollable[] = {
10545 {0x00, "Station is not CF-Pollable"},
10546 {0x02, "Station is CF-Pollable, "
10547 "not requesting to be placed on the CF-polling list"},
10548 {0x01, "Station is CF-Pollable, "
10549 "requesting to be placed on the CF-polling list"},
10550 {0x03, "Station is CF-Pollable, requesting never to be polled"},
10551 {0x0200, "QSTA requesting association in QBSS"},
10555 static const value_string ap_cf_pollable[] = {
10556 {0x00, "No point coordinator at AP"},
10557 {0x02, "Point coordinator at AP for delivery only (no polling)"},
10558 {0x01, "Point coordinator at AP for delivery and polling"},
10559 {0x03, "Reserved"},
10560 {0x0200, "QAP (HC) does not use CFP for delivery of unicast data type frames"},
10561 {0x0202, "QAP (HC) uses CFP for delivery, but does not send CF-Polls to non-QoS STAs"},
10562 {0x0201, "QAP (HC) uses CFP for delivery, and sends CF-Polls to non-QoS STAs"},
10563 {0x0203, "Reserved"},
10568 static const value_string auth_alg[] = {
10569 {0x00, "Open System"},
10570 {0x01, "Shared key"},
10571 {0x02, "Fast BSS Transition"},
10572 {0x80, "Network EAP"}, /* Cisco proprietary? */
10576 static const true_false_string ff_block_ack_params_amsdu_permitted_flag = {
10577 "Permitted in QoS Data MPDUs",
10581 static const true_false_string ff_block_ack_params_policy_flag = {
10582 "Immediate Block Ack",
10583 "Delayed Block Ack"
10586 static const value_string ff_channel_width_vals[] = {
10587 {0x00, "20 MHz channel width only"},
10588 {0x01, "Any channel width in the STA's Supported Channel Width Set"},
10592 static const true_false_string ff_qos_info_ap_q_ack_flag = {
10597 static const true_false_string ff_qos_info_ap_queue_req_flag = {
10598 "Can process a nonzero Queue Size subfield in the QoS Control field in QoS data frames",
10599 "Can NOT process a nonzero Queue Size subfield in the QoS Control field in QoS data frames"
10602 static const true_false_string ff_qos_info_ap_txop_request_flag = {
10603 "Can process a nonzero TXOP Duration Requested subfield in the QoS Control field in QoS data frames",
10604 "Can NOT process a nonzero TXOP Duration Requested subfield in the QoS Control field in QoS data frames"
10607 static const true_false_string ff_qos_info_sta_ac_flag = {
10608 "Trigger-enabled and Delivery-enabled",
10609 "Neither Trigger-enabled nor Delivery-enabled"
10612 static const true_false_string ff_qos_info_sta_q_ack_flag = {
10617 static const value_string ff_qos_info_sta_max_sp_len_flags[] = {
10618 {0x00, "AP may deliver all buffered MSDUs, A-MSDUs and MMPDUs"},
10619 {0x01, "AP may deliver a maximum of two MSDUs and MMPDUs per SP"},
10620 {0x02, "AP may deliver a maximum of four MSDUs and MMPDUs per SP"},
10621 {0x03, "AP may deliver a maximum of six MSDUs and MMPDUs per SP"},
10625 static const true_false_string ff_qos_info_sta_more_data_ack_flag = {
10626 "Can process ACK frames with the More Data bit in the Frame Control field set to 1",
10627 "Can NOT process ACK frames with the More Data bit in the Frame Control field set to 1"
10630 static const true_false_string ff_sm_pwr_save_sm_mode_flag = {
10631 "Dynamic SM Power Save mode",
10632 "Static SM Power Save mode"
10635 static const true_false_string ff_pco_phase_cntrl_flag = {
10640 static const true_false_string ff_psmp_param_set_more_psmp_flag = {
10641 "More PSMP Sequences Follow",
10642 "No PSMP Sequences Follow"
10645 static const value_string ff_mimo_cntrl_nc_index_flags[] = {
10646 {0x00, "1 Column"},
10647 {0x01, "2 Columns"},
10648 {0x02, "3 Columns"},
10649 {0x03, "4 Columns"},
10653 static const value_string ff_mimo_cntrl_nr_index_flags[] = {
10661 static const true_false_string ff_mimo_cntrl_channel_width_flag = {
10666 static const true_false_string ff_ht_info_information_request_flag = {
10667 "Requesting HT Information Exchange management action frame",
10668 "Should not send an HT Information Exchange management action frame"
10671 static const true_false_string ff_ht_info_40_mhz_intolerant_flag = {
10672 "Transmitting station is intolerant of 40 MHz operation",
10673 "Transmitting station permits 40 MHz operation"
10676 static const true_false_string ff_ht_info_sta_chan_width_flag = {
10681 static const value_string ff_ht_action_flags[] = {
10682 {HT_ACTION_NOTIFY_CHAN_WIDTH, "Notify Channel Width"},
10683 {HT_ACTION_SM_PWR_SAVE, "Spatial Multiplexing (SM) Power Save"},
10684 {HT_ACTION_PSMP_ACTION, "Power Save Multi-Poll (PSMP) action frame"},
10685 {HT_ACTION_SET_PCO_PHASE, "Set PCO Phase"},
10686 {HT_ACTION_MIMO_CSI, "MIMO CSI Matrices"},
10687 {HT_ACTION_MIMO_BEAMFORMING, "MIMO Non-compressed Beamforming"},
10688 {HT_ACTION_MIMO_COMPRESSED_BEAMFORMING, "MIMO Compressed Beamforming"},
10689 {HT_ACTION_ANT_SEL_FEEDBACK, "Antenna Selection Indices Feedback"},
10690 {HT_ACTION_HT_INFO_EXCHANGE, "HT Information Exchange"},
10694 static const value_string ff_mimo_cntrl_grouping_flags[] = {
10695 {0x00, "No Grouping"},
10696 {0x01, "Carrier Groups of 2"},
10697 {0x02, "Carrier Groups of 4"},
10698 {0x03, "Reserved"},
10702 static const value_string ff_mimo_cntrl_coefficient_size_flags[] = {
10710 static const value_string ff_mimo_cntrl_codebook_info_flags[] = {
10711 {0x00, "1 bit for 'Capital Psi', 3 bits for 'Small Psi'"},
10712 {0x01, "2 bit for 'Capital Psi', 4 bits for 'Small Psi'"},
10713 {0x02, "3 bit for 'Capital Psi', 5 bits for 'Small Psi'"},
10714 {0x03, "4 bit for 'Capital Psi', 6 bits for 'Small Psi'"},
10720 static const value_string ff_pa_action_codes[] = {
10721 {PA_DSE_ENABLEMENT, "DSE enablement"},
10722 {PA_DSE_DEENABLEMENT, "DSE deenablement"},
10723 {PA_DSE_REG_LOC_ANNOUNCEMENT, "DSE Registered Location Announcement"},
10724 {PA_EXT_CHANNEL_SWITCH_ANNOUNCEMENT, "Extended Channel Switch Announcement"},
10725 {PA_DSE_MEASUREMENT_REQUEST, "DSE measurement request"},
10726 {PA_DSE_MEASUREMENT_REPORT, "DSE measurement report"},
10727 {PA_MEASUREMENT_PILOT, "Measurement Pilot"},
10728 {PA_DSE_POWER_CONSTRAINT, "DSE power constraint"},
10729 {PA_VENDOR_SPECIFIC, "Vendor Specific"},
10730 {PA_GAS_INITIAL_REQUEST, "GAS Initial Request"},
10731 {PA_GAS_INITIAL_RESPONSE, "GAS Initial Response"},
10732 {PA_GAS_COMEBACK_REQUEST, "GAS Comeback Request"},
10733 {PA_GAS_COMEBACK_RESPONSE, "GAS Comeback Response"},
10734 {PA_TDLS_DISCOVERY_RESPONSE, "TDLS Discovery Response"},
10738 static const value_string reason_codes[] = {
10739 {0x00, "Reserved"},
10740 {0x01, "Unspecified reason"},
10741 {0x02, "Previous authentication no longer valid"},
10742 {0x03, "Deauthenticated because sending STA is leaving (has left) "
10744 {0x04, "Disassociated due to inactivity"},
10745 {0x05, "Disassociated because AP is unable to handle all currently "
10746 "associated stations"},
10747 {0x06, "Class 2 frame received from nonauthenticated station"},
10748 {0x07, "Class 3 frame received from nonassociated station"},
10749 {0x08, "Disassociated because sending STA is leaving (has left) BSS"},
10750 {0x09, "Station requesting (re)association is not authenticated with "
10751 "responding station"},
10752 {0x0A, "Disassociated because the information in the Power Capability "
10753 "element is unacceptable"},
10754 {0x0B, "Disassociated because the information in the Supported"
10755 "Channels element is unacceptable"},
10756 {0x0D, "Invalid Information Element"},
10757 {0x0E, "Michael MIC failure"},
10758 {0x0F, "4-Way Handshake timeout"},
10759 {0x10, "Group key update timeout"},
10760 {0x11, "Information element in 4-Way Handshake different from "
10761 "(Re)Association Request/Probe Response/Beacon"},
10762 {0x12, "Group Cipher is not valid"},
10763 {0x13, "Pairwise Cipher is not valid"},
10764 {0x14, "AKMP is not valid"},
10765 {0x15, "Unsupported RSN IE version"},
10766 {0x16, "Invalid RSN IE Capabilities"},
10767 {0x17, "IEEE 802.1X Authentication failed"},
10768 {0x18, "Cipher suite is rejected per security policy"},
10769 {0x19, "TDLS direct-link teardown due to TDLS peer STA unreachable via "
10770 "the TDLS direct link"},
10771 {0x1A, "TDLS direct-link teardown for unspecified reason"},
10772 {0x20, "Disassociated for unspecified, QoS-related reason"},
10773 {0x21, "Disassociated because QoS AP lacks sufficient bandwidth for this QoS STA"},
10774 {0x22, "Disassociated because of excessive number of frames that need to be "
10775 "acknowledged, but are not acknowledged for AP transmissions and/or poor "
10776 "channel conditions"},
10777 {0x23, "Disassociated because STA is transmitting outside the limits of its TXOPs"},
10778 {0x24, "Requested from peer STA as the STA is leaving the BSS (or resetting)"},
10779 {0x25, "Requested from peer STA as it does not want to use the mechanism"},
10780 {0x26, "Requested from peer STA as the STA received frames using the mechanism "
10781 "for which a set up is required"},
10782 {0x27, "Requested from peer STA due to time out"},
10783 {0x2D, "Peer STA does not support the requested cipher suite"},
10784 {0x2E, "Association denied due to requesting STA not supporting HT features"},
10789 static const value_string status_codes[] = {
10790 {0x00, "Successful"},
10791 {0x01, "Unspecified failure"},
10792 {0x02, "TDLS wakeup schedule rejected but alternative schedule provided"},
10793 {0x03, "TDLS wakeup schedule rejected"},
10794 {0x05, "Security disabled"},
10795 {0x06, "Unacceptable lifetime"},
10796 {0x07, "Not in same BSS"},
10797 {0x0A, "Cannot support all requested capabilities in the "
10798 "Capability information field"},
10799 {0x0B, "Reassociation denied due to inability to confirm that "
10800 "association exists"},
10801 {0x0C, "Association denied due to reason outside the scope of this "
10804 {0x0D, "Responding station does not support the specified authentication "
10806 {0x0E, "Received an Authentication frame with authentication sequence "
10807 "transaction sequence number out of expected sequence"},
10808 {0x0F, "Authentication rejected because of challenge failure"},
10809 {0x10, "Authentication rejected due to timeout waiting for next "
10810 "frame in sequence"},
10811 {0x11, "Association denied because AP is unable to handle additional "
10812 "associated stations"},
10813 {0x12, "Association denied due to requesting station not supporting all "
10814 "of the datarates in the BSSBasicServiceSet Parameter"},
10815 {0x13, "Association denied due to requesting station not supporting "
10816 "short preamble operation"},
10817 {0x14, "Association denied due to requesting station not supporting "
10819 {0x15, "Association denied due to requesting station not supporting "
10820 "channel agility"},
10821 {0x16, "Association request rejected because Spectrum Management"
10822 "capability is required"},
10823 {0x17, "Association request rejected because the information in the"
10824 "Power Capability element is unacceptable"},
10825 {0x18, "Association request rejected because the information in the"
10826 "Supported Channels element is unacceptable"},
10827 {0x19, "Association denied due to requesting station not supporting "
10828 "short slot operation"},
10829 {0x1A, "Association denied due to requesting station not supporting "
10830 "DSSS-OFDM operation"},
10831 {0x1C, "R0KH unreachable"},
10832 {0x1E, "Association request rejected temporarily; try again later"},
10833 {0x1F, "Robust Management frame policy violation"},
10834 {0x20, "Unspecified, QoS-related failure"},
10835 {0x21, "Association denied due to QAP having insufficient bandwidth "
10836 "to handle another QSTA"},
10837 {0x22, "Association denied due to excessive frame loss rates and/or "
10838 "poor conditions on current operating channel"},
10839 {0x23, "Association (with QBSS) denied due to requesting station not "
10840 "supporting the QoS facility"},
10841 {0x24, "Association denied due to requesting station not supporting "
10843 {0x25, "The request has been declined."},
10844 {0x26, "The request has not been successful as one or more parameters "
10845 "have invalid values."},
10846 {0x27, "The TS has not been created because the request cannot be honored. "
10847 "However, a suggested TSPEC is provided so that the initiating QSTA may "
10848 "attempt to set another TS with the suggested changes to the TSPEC."},
10849 {0x28, "Invalid Information Element"},
10850 {0x29, "Group Cipher is not valid"},
10851 {0x2A, "Pairwise Cipher is not valid"},
10852 {0x2B, "AKMP is not valid"},
10853 {0x2C, "Unsupported RSN IE version"},
10854 {0x2D, "Invalid RSN IE Capabilities"},
10855 {0x2E, "Cipher suite is rejected per security policy"},
10856 {0x2F, "The TS has not been created. However, the HC may be capable of "
10857 "creating a TS, in response to a request, after the time indicated in the TS Delay element."},
10858 {0x30, "Direct Link is not allowed in the BSS by policy"},
10859 {0x31, "Destination STA is not present within this QBSS."},
10860 {0x32, "The Destination STA is not a QSTA."},
10861 {0x34, "Invalid FT Action frame count"},
10862 {0x35, "Invalid pairwise master key identifier (PMKID)"},
10863 {0x36, "Invalid MDIE"},
10864 {0x37, "Invalid FTIE"},
10865 {0x3B, "GAS Advertisement Protocol not supported"},
10866 {0x3C, "No outstanding GAS request"},
10867 {0x3D, "GAS Response not received from the Advertisement Server"},
10868 {0x3E, "STA timed out waiting for GAS Query Response"},
10869 {0x3F, "GAS Response is larger than query response length limit"},
10870 {0x40, "Advertisement Server in the network is not currently reachable"},
10871 {0x41, "Requested information is not available for this BSSID"},
10872 {0x42, "Transmission failure"},
10873 {0x43, "Request refused due to permissions received via SSPN interface"},
10874 {0x44, "Request refused because AP does not support unauthenticated "
10876 {0x48, "Invalid contents of RSNIE"},
10880 static const value_string category_codes[] = {
10881 {CAT_SPECTRUM_MGMT, "Spectrum Management (SM)"},
10882 {0x80 | CAT_SPECTRUM_MGMT, "Spectrum Management (SM) (error)"},
10883 {CAT_QOS, "Quality of Service (QoS)"},
10884 {0x80 | CAT_QOS, "Quality of Service (QoS (error))"},
10885 {CAT_DLS, "Direct-Link Setup (DLS)"},
10886 {0x80 | CAT_DLS, "Direct-Link Setup (DLS) (error)"},
10887 {CAT_BLOCK_ACK, "Block Ack"},
10888 {0x80 | CAT_BLOCK_ACK, "Block Ack (error)"},
10889 {CAT_PUBLIC, "Public Action"},
10890 {0x80 | CAT_PUBLIC, "Public Action (error)"},
10891 #ifdef MESH_OVERRIDES
10892 {CAT_MESH_PEER_LINK, "Mesh Peer Link"},
10893 {0x80 | CAT_MESH_PEER_LINK, "Mesh Peer Link"},
10894 {CAT_MESH_LINK_METRIC, "Mesh Link Metric"},
10895 {0x80 | CAT_MESH_LINK_METRIC, "Mesh Link Metric"},
10896 {CAT_MESH_PATH_SELECTION, "Mesh Path Selection"},
10897 {0x80 | CAT_MESH_PATH_SELECTION, "Mesh Path Selection"},
10898 {CAT_MESH_INTERWORKING, "Mesh Internetworking"},
10899 {0x80 | CAT_MESH_INTERWORKING, "Mesh Internetworking"},
10900 {CAT_MESH_RESOURCE_COORDINATION, "Mesh Resource Coordination"},
10901 {0x80 | CAT_MESH_RESOURCE_COORDINATION, "Mesh Resource Coordination"},
10902 {CAT_MESH_SECURITY_ARCHITECTURE, "Mesh Security Arch"},
10903 {0x80 | CAT_MESH_SECURITY_ARCHITECTURE, "Mesh Security Arch"},
10904 #endif /* MESH_OVERRIDES */
10905 {CAT_RADIO_MEASUREMENT, "Radio Measurement"},
10906 {0x80 | CAT_RADIO_MEASUREMENT, "Radio Measurement (error)"},
10907 {CAT_FAST_BSS_TRANSITION, "Fast BSS Transition"},
10908 {0x80 | CAT_FAST_BSS_TRANSITION, "Fast BSS Transition (error)"},
10909 {CAT_HT, "High Throughput"},
10910 {0x80 | CAT_HT, "High Throughput (error)"},
10911 {CAT_SA_QUERY, "SA Query"},
10912 {0x80 | CAT_SA_QUERY, "SA Query (error)"},
10913 {CAT_PUBLIC_PROTECTED, "Protected Dual of Public Action"},
10914 {0x80 | CAT_PUBLIC_PROTECTED, "Protected Dual of Public Action (error)"},
10915 {CAT_TDLS, "TDLS"},
10916 {0x80 | CAT_TDLS, "TDLS (error)"},
10917 {CAT_MGMT_NOTIFICATION, "Management Notification"},
10918 {0x80 | CAT_MGMT_NOTIFICATION, "Management Notification (error)"},
10919 {CAT_VENDOR_SPECIFIC_PROTECTED, "Vendor-specific Protected"},
10920 {0x80 | CAT_VENDOR_SPECIFIC_PROTECTED, "Vendor-specific Protected (error)"},
10921 {CAT_VENDOR_SPECIFIC, "Vendor Specific"},
10922 {0x80 | CAT_VENDOR_SPECIFIC, "Vendor Specific (error)"},
10926 static const value_string action_codes[] ={
10927 {SM_ACTION_MEASUREMENT_REQUEST, "Measurement Request"},
10928 {SM_ACTION_MEASUREMENT_REPORT, "Measurement Report"},
10929 {SM_ACTION_TPC_REQUEST, "TPC Request"},
10930 {SM_ACTION_TPC_REPORT, "TPC Report"},
10931 {SM_ACTION_CHAN_SWITCH_ANNC, "Channel Switch Announcement"},
10935 static const value_string vendor_action_types_mrvl[] ={
10936 {MRVL_ACTION_MESH_MANAGEMENT, "Mesh Management"},
10940 static const value_string mesh_mgt_action_codes_mrvl[] ={
10941 {MRVL_MESH_MGMT_ACTION_RREQ, "Route Request"},
10942 {MRVL_MESH_MGMT_ACTION_RREP, "Route Response"},
10943 {MRVL_MESH_MGMT_ACTION_RERR, "Route Error"},
10944 {MRVL_MESH_MGMT_ACTION_PLDM, "Peer Link Down"},
10948 static const value_string mesh_path_selection_codes[] ={
10949 {0x0, "Hybrid Wireless Mesh Protocol"},
10953 static const value_string mesh_metric_codes[] ={
10954 {0x0, "Airtime Link Metric"},
10958 static const value_string wme_action_codes[] = {
10959 {0x00, "Setup request"},
10960 {0x01, "Setup response"},
10961 {0x02, "Teardown"},
10965 static const value_string wme_status_codes[] = {
10966 {0x00, "Admission accepted"},
10967 {0x01, "Invalid parameters"},
10972 #ifdef MESH_OVERRIDES
10973 static const value_string mesh_mgt_action_ps_codes[] ={
10974 {MESH_PS_PATH_REQUEST, "Path Request"},
10975 {MESH_PS_PATH_REPLY, "Path Reply"},
10976 {MESH_PS_PATH_ERROR, "Path Error"},
10977 {MESH_PS_ROOT_ANNOUNCEMENT, "Root Announcement"},
10981 static const value_string mesh_mgt_action_pl_codes[] ={
10982 {MESH_PL_PEER_LINK_OPEN, "Peer Link Open"},
10983 {MESH_PL_PEER_LINK_CONFIRM, "Peer Link Confirm"},
10984 {MESH_PL_PEER_LINK_CLOSE, "Peer Link Close"},
10988 static const value_string mesh_mgt_pl_reason_codes[] = {
10989 {MESH_LINK_CANCELLED, "Link Cancelled"},
10990 {MESH_MAX_NEIGHBORS, "Maximum Number of Peers Reached"},
10991 {MESH_CONFIG_POLICY_VIOLATION, "Policy Violation"},
10992 {MESH_CLOSE_RCVD, "Close Received"},
10993 {MESH_MAX_RETRIES, "Maximum Retries"},
10994 {MESH_CONFIRM_TIMEOUT, "Confirm Timeout"},
10998 static const true_false_string mesh_dest_rf_flags ={
10999 "[RF = 1] Intermediate Nodes That Respond Will Also Forward",
11000 "[RF = 0] Intermediate Nodes That Respond Will Not Forward"
11003 static const true_false_string mesh_dest_do_flags ={
11004 "[DO = 1] Only Destination Will Respond",
11005 "[DO = 0] Intermediate Nodes May Respond"
11007 #endif /* MESH_OVERRIDES */
11009 static const value_string ack_policy[] = {
11010 {0x00, "Normal Ack"},
11012 {0x02, "No explicit acknowledgment"},
11013 {0x03, "Block Ack"},
11017 static const value_string qos_action_codes[] = {
11018 {SM_ACTION_ADDTS_REQUEST, "ADDTS Request"},
11019 {SM_ACTION_ADDTS_RESPONSE, "ADDTS Response"},
11020 {SM_ACTION_DELTS, "DELTS"},
11021 {SM_ACTION_QOS_SCHEDULE, "Schedule"},
11025 static const value_string ba_action_codes[] = {
11026 {BA_ADD_BLOCK_ACK_REQUEST, "Add Block Ack Request"},
11027 {BA_ADD_BLOCK_ACK_RESPONSE, "Add Block Ack Response"},
11028 {BA_DELETE_BLOCK_ACK, "Delete Block Ack"},
11032 static const value_string dls_action_codes[] = {
11033 {SM_ACTION_DLS_REQUEST, "DLS Request"},
11034 {SM_ACTION_DLS_RESPONSE, "DLS Response"},
11035 {SM_ACTION_DLS_TEARDOWN, "DLS Teardown"},
11039 static const value_string tsinfo_type[] = {
11040 {0x0, "Aperiodic or unspecified Traffic"},
11041 {0x1, "Periodic Traffic"},
11045 static const value_string tsinfo_direction[] = {
11047 {0x01, "Downlink"},
11048 {0x02, "Direct link"},
11049 {0x03, "Bidirectional link"},
11053 static const value_string tsinfo_access[] = {
11054 {0x00, "Reserved"},
11061 static const value_string qos_up[] = {
11062 {0x00, "Best Effort"},
11063 {0x01, "Background"},
11065 {0x03, "Excellent Effort"},
11066 {0x04, "Controlled Load"},
11069 {0x07, "Network Control"},
11073 static const value_string classifier_type[] = {
11074 {0x00, "Ethernet parameters"},
11075 {0x01, "TCP/UDP IP parameters"},
11076 {0x02, "IEEE 802.1D/Q parameters"},
11080 static const value_string tclas_process[] = {
11081 {0x00, "Incoming MSDU's higher layer parameters have to match to the parameters in all associated TCLAS elements."},
11082 {0x01, "Incoming MSDU's higher layer parameters have to match to at least one of the associated TCLAS elements."},
11083 {0x02, "Incoming MSDU's that do not belong to any other TS are classified to the TS for which this TCLAS Processing element is used. In this case, there will not be any associated TCLAS elements."},
11087 static const true_false_string ieee80211_block_ack_control_ack_policy_flag = {
11088 "Immediate Acknowledgement Required",
11089 "Sender Does Not Require Immediate Acknowledgement"
11092 static const value_string ieee80211_block_ack_request_type_flags[] = {
11093 {0x00, "Basic Block Ack Request"},
11094 {0x01, "Reserved"},
11095 {0x02, "Compressed Block Ack Request"},
11096 {0x03, "Multi-TID Block Ack Request"},
11100 static const value_string ieee80211_block_ack_type_flags[] = {
11101 {0x00, "Basic Block Ack"},
11102 {0x01, "Reserved"},
11103 {0x02, "Compressed Block"},
11104 {0x03, "Multi-TID Block"},
11108 static const value_string phy_type[] = {
11110 { 1, "FHSS 802.11 '97" },
11111 { 2, "DSSS 802.11 '97" },
11112 { 3, "IR Baseband" },
11113 { 4, "DSSS 802.11b" },
11114 { 5, "PBCC 802.11b" },
11115 { 6, "OFDM 802.11g" },
11116 { 7, "PBCC 802.11g" },
11117 { 8, "OFDM 802.11a" },
11121 static const value_string encoding_type[] = {
11134 static const value_string ssi_type[] = {
11135 { SSI_NONE, "None" },
11136 { SSI_NORM_RSSI, "Normalized RSSI" },
11137 { SSI_DBM, "dBm" },
11138 { SSI_RAW_RSSI, "Raw RSSI" },
11142 static const value_string preamble_type[] = {
11149 static const value_string ft_action_codes[] ={
11150 {FT_ACTION_REQUEST, "FT Request"},
11151 {FT_ACTION_RESPONSE, "FT Response"},
11152 {FT_ACTION_CONFIRM, "FT Confirm"},
11153 {FT_ACTION_ACK, "FT Ack"},
11157 static const value_string sa_query_action_codes[] ={
11158 {SA_QUERY_REQUEST, "SA Query Request"},
11159 {SA_QUERY_RESPONSE, "SA Query Response"},
11163 static const value_string ieee80211_data_encap_payload_types[] = {
11164 {1, "Remote Request/Response"},
11169 static hf_register_info hf[] = {
11171 {"MAC timestamp", "wlan.mactime", FT_UINT64, BASE_DEC, NULL, 0x0,
11172 "Value in microseconds of the MAC's Time Synchronization Function timer when the first bit of the MPDU arrived at the MAC", HFILL }},
11175 {"Host timestamp", "wlan.hosttime", FT_UINT64, BASE_DEC, NULL, 0x0,
11179 {"Data Rate", "wlan.data_rate", FT_UINT64, BASE_DEC, NULL, 0,
11180 "Data rate (b/s)", HFILL }},
11183 {"Channel", "wlan.channel", FT_UINT8, BASE_DEC, NULL, 0,
11184 "802.11 channel number that this frame was sent/received on", HFILL }},
11186 {&hf_channel_frequency,
11187 {"Channel frequency", "wlan.channel_frequency", FT_UINT32, BASE_DEC, NULL, 0x0,
11188 "Channel frequency in megahertz that this frame was sent/received on", HFILL }},
11191 {"Antenna", "wlan.antenna", FT_UINT32, BASE_DEC, NULL, 0x0,
11192 "Antenna number this frame was sent/received over (starting at 0)", HFILL } },
11194 {&hf_normrssi_antsignal,
11195 {"Normalized RSSI Signal", "wlan.normrssi_antsignal", FT_UINT32, BASE_DEC, NULL, 0x0,
11196 "RF signal power at the antenna, normalized to the range 0-1000", HFILL }},
11198 {&hf_dbm_antsignal,
11199 {"SSI Signal (dBm)", "wlan.dbm_antsignal", FT_INT32, BASE_DEC, NULL, 0x0,
11200 "RF signal power at the antenna from a fixed, arbitrary value in decibels from one milliwatt", HFILL }},
11202 {&hf_rawrssi_antsignal,
11203 {"Raw RSSI Signal", "wlan.rawrssi_antsignal", FT_UINT32, BASE_DEC, NULL, 0x0,
11204 "RF signal power at the antenna, reported as RSSI by the adapter", HFILL }},
11206 {&hf_normrssi_antnoise,
11207 {"Normalized RSSI Noise", "wlan.normrssi_antnoise", FT_UINT32, BASE_DEC, NULL, 0x0,
11208 "RF noise power at the antenna, normalized to the range 0-1000", HFILL }},
11211 {"SSI Noise (dBm)", "wlan.dbm_antnoise", FT_INT32, BASE_DEC, NULL, 0x0,
11212 "RF noise power at the antenna from a fixed, arbitrary value in decibels per one milliwatt", HFILL }},
11214 {&hf_rawrssi_antnoise,
11215 {"Raw RSSI Noise", "wlan.rawrssi_antnoise", FT_UINT32, BASE_DEC, NULL, 0x0,
11216 "RF noise power at the antenna, reported as RSSI by the adapter", HFILL }},
11218 {&hf_signal_strength,
11219 {"Signal Strength", "wlan.signal_strength", FT_UINT8, BASE_DEC, NULL, 0,
11220 "Signal strength (Percentage)", HFILL }},
11222 {&hf_ieee80211_fc_field,
11223 {"Frame Control Field", "wlan.fc", FT_UINT16, BASE_HEX, NULL, 0,
11224 "MAC Frame control", HFILL }},
11226 {&hf_ieee80211_fc_proto_version,
11227 {"Version", "wlan.fc.version", FT_UINT8, BASE_DEC, NULL, 0,
11228 "MAC Protocol version", HFILL }}, /* 0 */
11230 {&hf_ieee80211_fc_frame_type,
11231 {"Type", "wlan.fc.type", FT_UINT8, BASE_DEC, VALS(frame_type), 0,
11232 "Frame type", HFILL }},
11234 {&hf_ieee80211_fc_frame_subtype,
11235 {"Subtype", "wlan.fc.subtype", FT_UINT8, BASE_DEC, NULL, 0,
11236 "Frame subtype", HFILL }}, /* 2 */
11238 {&hf_ieee80211_fc_frame_type_subtype,
11239 {"Type/Subtype", "wlan.fc.type_subtype", FT_UINT8, BASE_HEX, VALS(frame_type_subtype_vals), 0,
11240 "Type and subtype combined (first byte: type, second byte: subtype)", HFILL }},
11242 {&hf_ieee80211_fc_flags,
11243 {"Protocol Flags", "wlan.flags", FT_UINT8, BASE_HEX, NULL, 0,
11246 {&hf_ieee80211_fc_data_ds,
11247 {"DS status", "wlan.fc.ds", FT_UINT8, BASE_HEX, VALS (&tofrom_ds), (FLAG_FROM_DS|FLAG_TO_DS),
11248 "Data-frame DS-traversal status", HFILL }}, /* 3 */
11250 {&hf_ieee80211_fc_to_ds,
11251 {"To DS", "wlan.fc.tods", FT_BOOLEAN, 8, TFS (&tods_flag), FLAG_TO_DS,
11252 "To DS flag", HFILL }}, /* 4 */
11254 {&hf_ieee80211_fc_from_ds,
11255 {"From DS", "wlan.fc.fromds", FT_BOOLEAN, 8, TFS (&fromds_flag), FLAG_FROM_DS,
11256 "From DS flag", HFILL }}, /* 5 */
11258 {&hf_ieee80211_fc_more_frag,
11259 {"More Fragments", "wlan.fc.frag", FT_BOOLEAN, 8, TFS (&more_frags), FLAG_MORE_FRAGMENTS,
11260 "More Fragments flag", HFILL }}, /* 6 */
11262 {&hf_ieee80211_fc_retry,
11263 {"Retry", "wlan.fc.retry", FT_BOOLEAN, 8, TFS (&retry_flags), FLAG_RETRY,
11264 "Retransmission flag", HFILL }},
11266 { &hf_ieee80211_fc_analysis_retransmission,
11267 {"Retransmission", "wlan.analysis.retransmission", FT_NONE, BASE_NONE,
11268 NULL, 0x0, "This frame is a suspected wireless retransmission", HFILL }},
11270 { &hf_ieee80211_fc_analysis_retransmission_frame,
11271 {"Retransmission of frame", "wlan.analysis.retransmission_frame", FT_FRAMENUM, BASE_NONE,
11272 NULL, 0x0, "This is a retransmission of frame #", HFILL }},
11274 {&hf_ieee80211_fc_pwr_mgt,
11275 {"PWR MGT", "wlan.fc.pwrmgt", FT_BOOLEAN, 8, TFS (&pm_flags), FLAG_POWER_MGT,
11276 "Power management status", HFILL }},
11278 {&hf_ieee80211_fc_more_data,
11279 {"More Data", "wlan.fc.moredata", FT_BOOLEAN, 8, TFS (&md_flags), FLAG_MORE_DATA,
11280 "More data flag", HFILL }},
11282 {&hf_ieee80211_fc_protected,
11283 {"Protected flag", "wlan.fc.protected", FT_BOOLEAN, 8, TFS (&protected_flags), FLAG_PROTECTED,
11286 {&hf_ieee80211_fc_order,
11287 {"Order flag", "wlan.fc.order", FT_BOOLEAN, 8, TFS (&order_flags), FLAG_ORDER,
11288 "Strictly ordered flag", HFILL }},
11290 {&hf_ieee80211_assoc_id,
11291 {"Association ID","wlan.aid",FT_UINT16, BASE_DEC, NULL, 0x3FFF,
11292 "Association-ID field", HFILL }},
11294 {&hf_ieee80211_did_duration,
11295 {"Duration", "wlan.duration", FT_UINT16, BASE_DEC, NULL, 0,
11296 "Duration field", HFILL }},
11298 {&hf_ieee80211_addr_da,
11299 {"Destination address", "wlan.da", FT_ETHER, BASE_NONE, NULL, 0,
11300 "Destination Hardware Address", HFILL }},
11302 {&hf_ieee80211_addr_sa,
11303 {"Source address", "wlan.sa", FT_ETHER, BASE_NONE, NULL, 0,
11304 "Source Hardware Address", HFILL }},
11306 { &hf_ieee80211_addr,
11307 {"Source or Destination address", "wlan.addr", FT_ETHER, BASE_NONE, NULL, 0,
11308 "Source or Destination Hardware Address", HFILL }},
11310 {&hf_ieee80211_addr_ra,
11311 {"Receiver address", "wlan.ra", FT_ETHER, BASE_NONE, NULL, 0,
11312 "Receiving Station Hardware Address", HFILL }},
11314 {&hf_ieee80211_addr_ta,
11315 {"Transmitter address", "wlan.ta", FT_ETHER, BASE_NONE, NULL, 0,
11316 "Transmitting Station Hardware Address", HFILL }},
11318 {&hf_ieee80211_addr_bssid,
11319 {"BSS Id", "wlan.bssid", FT_ETHER, BASE_NONE, NULL, 0,
11320 "Basic Service Set ID", HFILL }},
11322 {&hf_ieee80211_frag_number,
11323 {"Fragment number", "wlan.frag", FT_UINT16, BASE_DEC, NULL, 0,
11326 {&hf_ieee80211_seq_number,
11327 {"Sequence number", "wlan.seq", FT_UINT16, BASE_DEC, NULL, 0,
11330 {&hf_ieee80211_qos_priority,
11331 {"Priority", "wlan.qos.priority", FT_UINT16, BASE_DEC, NULL, 0,
11332 "802.1D Tag", HFILL }},
11334 {&hf_ieee80211_qos_eosp,
11335 {"EOSP", "wlan.qos.eosp", FT_BOOLEAN, 8, TFS (&eosp_flag), QOS_FLAG_EOSP,
11336 "EOSP Field", HFILL }},
11338 {&hf_ieee80211_qos_bit4,
11339 {"QoS bit 4", "wlan.qos.bit4", FT_BOOLEAN, 8, TFS (&bit4_flag), QOS_FLAG_EOSP,
11342 {&hf_ieee80211_qos_ack_policy,
11343 {"Ack Policy", "wlan.qos.ack", FT_UINT8, BASE_HEX, VALS (&ack_policy), 0,
11346 {&hf_ieee80211_qos_amsdu_present,
11347 {"Payload Type", "wlan.qos.amsdupresent", FT_BOOLEAN, BASE_NONE,
11348 TFS (&ieee80211_qos_amsdu_present_flag), 0x0, NULL, HFILL }},
11350 {&hf_ieee80211_qos_txop_limit,
11351 {"TXOP Limit", "wlan.qos.txop_limit", FT_UINT16, BASE_DEC, NULL, 0,
11354 {&hf_ieee80211_qos_buf_state_indicated,
11355 {"Buffer State Indicated", "wlan.qos.buf_state_indicated",
11356 FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x02,
11359 {&hf_ieee80211_qos_highest_pri_buf_ac,
11360 {"Highest-Priority Buffered AC", "wlan.qos.highest_pri_buf_ac",
11361 FT_UINT8, BASE_DEC, VALS(wme_acs), 0x0C,
11364 {&hf_ieee80211_qos_qap_buf_load,
11365 {"QAP Buffered Load", "wlan.qos.qap_buf_load",
11366 FT_UINT8, BASE_DEC, NULL, 0xF0,
11369 {&hf_ieee80211_qos_txop_dur_req,
11370 {"TXOP Duration Requested", "wlan.qos.txop_dur_req", FT_UINT16, BASE_DEC, NULL, 0,
11373 {&hf_ieee80211_qos_queue_size,
11374 {"Queue Size", "wlan.qos.queue_size", FT_UINT16, BASE_DEC, NULL, 0,
11377 {&hf_ieee80211_fcs,
11378 {"Frame check sequence", "wlan.fcs", FT_UINT32, BASE_HEX,
11379 NULL, 0, "Frame Check Sequence (FCS)", HFILL }},
11381 {&hf_ieee80211_fcs_good,
11382 {"Good", "wlan.fcs_good", FT_BOOLEAN, BASE_NONE,
11383 NULL, 0x0, "True if the FCS is correct", HFILL }},
11385 {&hf_ieee80211_fcs_bad,
11386 {"Bad", "wlan.fcs_bad", FT_BOOLEAN, BASE_NONE,
11387 NULL, 0x0, "True if the FCS is incorrect", HFILL }},
11389 {&hf_ieee80211_fragment_overlap,
11390 {"Fragment overlap", "wlan.fragment.overlap", FT_BOOLEAN, BASE_NONE,
11391 NULL, 0x0, "Fragment overlaps with other fragments", HFILL }},
11393 {&hf_ieee80211_fragment_overlap_conflict,
11394 {"Conflicting data in fragment overlap", "wlan.fragment.overlap.conflict",
11395 FT_BOOLEAN, BASE_NONE, NULL, 0x0,
11396 "Overlapping fragments contained conflicting data", HFILL }},
11398 {&hf_ieee80211_fragment_multiple_tails,
11399 {"Multiple tail fragments found", "wlan.fragment.multipletails",
11400 FT_BOOLEAN, BASE_NONE, NULL, 0x0,
11401 "Several tails were found when defragmenting the packet", HFILL }},
11403 {&hf_ieee80211_fragment_too_long_fragment,
11404 {"Fragment too long", "wlan.fragment.toolongfragment",
11405 FT_BOOLEAN, BASE_NONE, NULL, 0x0,
11406 "Fragment contained data past end of packet", HFILL }},
11408 {&hf_ieee80211_fragment_error,
11409 {"Defragmentation error", "wlan.fragment.error",
11410 FT_FRAMENUM, BASE_NONE, NULL, 0x0,
11411 "Defragmentation error due to illegal fragments", HFILL }},
11413 {&hf_ieee80211_fragment_count,
11414 {"Fragment count", "wlan.fragment.count", FT_UINT32, BASE_DEC, NULL, 0x0,
11417 {&hf_ieee80211_fragment,
11418 {"802.11 Fragment", "wlan.fragment", FT_FRAMENUM, BASE_NONE, NULL, 0x0,
11421 {&hf_ieee80211_fragments,
11422 {"802.11 Fragments", "wlan.fragments", FT_NONE, BASE_NONE, NULL, 0x0,
11425 {&hf_ieee80211_reassembled_in,
11426 {"Reassembled 802.11 in frame", "wlan.reassembled_in", FT_FRAMENUM, BASE_NONE, NULL, 0x0,
11427 "This 802.11 packet is reassembled in this frame", HFILL }},
11429 {&hf_ieee80211_reassembled_length,
11430 {"Reassembled 802.11 length", "wlan.reassembled.length", FT_UINT32, BASE_DEC, NULL, 0x0,
11431 "The total length of the reassembled payload", HFILL }},
11433 {&hf_ieee80211_wep_iv,
11434 {"Initialization Vector", "wlan.wep.iv", FT_UINT24, BASE_HEX, NULL, 0,
11437 {&hf_ieee80211_wep_iv_weak,
11438 {"Weak IV", "wlan.wep.weakiv", FT_BOOLEAN,BASE_NONE, NULL,0x0,
11441 {&hf_ieee80211_tkip_extiv,
11442 {"TKIP Ext. Initialization Vector", "wlan.tkip.extiv", FT_STRING,
11443 BASE_NONE, NULL, 0, "TKIP Extended Initialization Vector", HFILL }},
11445 {&hf_ieee80211_ccmp_extiv,
11446 {"CCMP Ext. Initialization Vector", "wlan.ccmp.extiv", FT_STRING,
11447 BASE_NONE, NULL, 0, "CCMP Extended Initialization Vector", HFILL }},
11449 {&hf_ieee80211_wep_key,
11450 {"Key Index", "wlan.wep.key", FT_UINT8, BASE_DEC, NULL, 0,
11453 {&hf_ieee80211_wep_icv,
11454 {"WEP ICV", "wlan.wep.icv", FT_UINT32, BASE_HEX, NULL, 0,
11456 /*** Begin: WAVE Service information element Dissection - IEEE 802.11p Draft 4.0 ***/
11459 {&hf_ieee80211_pst_timingquality,
11460 {"Timing Quality", "pst.timingQuality", FT_UINT16, BASE_DEC, NULL, 0,
11461 "PST Timing Quality", HFILL }},
11463 {&hf_ieee80211_pst_providercount,
11464 {"No. of Providers announcing their Services", "pst.providerCount", FT_UINT8, BASE_DEC, NULL, 0,
11465 "Provider Count", HFILL }},
11467 {&hf_ieee80211_pst_providercap,
11468 {"Capabilities of Provider", "pst.providercap", FT_NONE, BASE_NONE, NULL, 0,
11471 {&hf_ieee80211_pst_length,
11472 {"Provider Service Table Length", "pst.length", FT_UINT16, BASE_DEC, NULL, 0,
11473 "PST Length", HFILL }},
11475 {&hf_ieee80211_pst_contents,
11476 {"Provider Service Table Contents", "pst.contents", FT_UINT8, BASE_HEX, NULL, 0,
11477 "PST Contents", HFILL }},
11479 {&hf_ieee80211_pst_acid,
11480 {"Application Class ID (ACID)", "pst.ACID", FT_UINT8, BASE_DEC, NULL, 0,
11481 "PST ACID", HFILL }},
11483 {&hf_ieee80211_pst_acm_length,
11484 {"Application Context Mask (ACM) Length", "pst.ACM.length", FT_UINT8, BASE_DEC, NULL, 0,
11485 "PST ACM Length", HFILL }},
11487 {&hf_ieee80211_pst_acm_contents,
11488 {"Application Context Mask Contents (ACM)", "pst.ACM.contents", FT_STRING, BASE_NONE, NULL, 0,
11489 "PST ACM Contents", HFILL }},
11491 {&hf_ieee80211_pst_acf,
11492 {"Application Contents Field (ACF)", "pst.ACF", FT_STRING, BASE_NONE, NULL, 0,
11493 "PST ACF", HFILL }},
11495 {&hf_ieee80211_pst_priority,
11496 {"Application Priority", "pst.priority", FT_UINT8, BASE_DEC, NULL, 0,
11497 "PST Priority", HFILL }},
11499 {&hf_ieee80211_pst_ipv6addr,
11500 {"Internet Protocol V6 Address", "pst.ipv6addr", FT_IPv6, BASE_NONE, NULL, 0,
11501 "IP v6 Addr", HFILL }},
11503 {&hf_ieee80211_pst_macaddr,
11504 {"Medium Access Control Address (MAC addr)", "pst.macaddr", FT_ETHER, BASE_NONE, NULL, 0,
11505 "MAC Address", HFILL }},
11507 {&hf_ieee80211_pst_serviceport,
11508 {"Service Port", "pst.serviceport", FT_UINT16, BASE_DEC, NULL, 0,
11509 "PST Service Port", HFILL }},
11511 {&hf_ieee80211_pst_addressing,
11512 {"Addressing", "pst.addressing", FT_UINT8, BASE_DEC, NULL, 0,
11513 "PST Addressing", HFILL }},
11515 {&hf_ieee80211_pst_channel,
11516 {"Service (IEE802.11) Channel", "pst.channel", FT_UINT8, BASE_DEC, NULL, 0,
11517 "PST Service Channel", HFILL }},
11519 {&hf_ieee80211_chan_noc,
11520 {"Number of Channels", "chan.chan_uknown", FT_UINT8, BASE_DEC, NULL, 0,
11523 {&hf_ieee80211_chan_length,
11524 {"Length", "chan.chan_length", FT_UINT8, BASE_DEC, NULL, 0,
11527 {&hf_ieee80211_chan_content,
11528 {"Contents", "chan.chan_content", FT_UINT8, BASE_DEC, NULL, 0,
11531 {&hf_ieee80211_chan_channel,
11532 {"channel", "chan.chan_channel", FT_UINT8, BASE_DEC, NULL, 0,
11535 {&hf_ieee80211_chan_adapt,
11536 {"Adaptable", "chan.chan_adapt", FT_UINT8, BASE_DEC, NULL, 0,
11539 {&hf_ieee80211_chan_rate,
11540 {"Rate", "chan.chan_rate", FT_UINT8, BASE_DEC, NULL, 0,
11543 {&hf_ieee80211_chan_tx_pow,
11544 {"Tx Power", "chan.chan_tx_pow", FT_UINT8, BASE_DEC, NULL, 0,
11547 {&hf_ieee80211_block_ack_request_control,
11548 {"Block Ack Request (BAR) Control", "wlan.bar.control",
11549 FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL }},
11551 {&hf_ieee80211_block_ack_control,
11552 {"Block Ack Request Control", "wlan.ba.control",
11553 FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL }},
11555 {&hf_ieee80211_block_ack_control_ack_policy,
11556 {"BAR Ack Policy", "wlan.ba.control.ackpolicy",
11557 FT_BOOLEAN, 16, TFS (&ieee80211_block_ack_control_ack_policy_flag), 0x01, "Block Ack Request (BAR) Ack Policy", HFILL }},
11559 {&hf_ieee80211_block_ack_control_multi_tid,
11560 {"Multi-TID", "wlan.ba.control.multitid",
11561 FT_BOOLEAN, 16, 0, 0x02, "Multi-Traffic Identifier (TID)", HFILL }},
11563 {&hf_ieee80211_block_ack_control_compressed_bitmap,
11564 {"Compressed Bitmap", "wlan.ba.control.cbitmap",
11565 FT_BOOLEAN, 16, 0, 0x04, NULL, HFILL }},
11567 {&hf_ieee80211_block_ack_control_reserved,
11568 {"Reserved", "wlan.ba.control.cbitmap",
11569 FT_UINT16, BASE_HEX, NULL, 0x0ff8, NULL, HFILL }},
11571 {&hf_ieee80211_block_ack_control_basic_tid_info,
11572 {"TID for which a Basic BlockAck frame is requested", "wlan.ba.basic.tidinfo",
11573 FT_UINT16, BASE_HEX, NULL, 0xf000, "Traffic Identifier (TID) for which a Basic BlockAck frame is requested", HFILL }},
11575 {&hf_ieee80211_block_ack_control_compressed_tid_info,
11576 {"TID for which a BlockAck frame is requested", "wlan.bar.compressed.tidinfo",
11577 FT_UINT16, BASE_HEX, NULL, 0xf000, "Traffic Identifier (TID) for which a BlockAck frame is requested", HFILL }},
11579 {&hf_ieee80211_block_ack_control_multi_tid_info,
11580 {"Number of TIDs Present", "wlan.ba.mtid.tidinfo",
11581 FT_UINT16, BASE_HEX, NULL, 0xf000, "Number of Traffic Identifiers (TIDs) Present", HFILL }},
11583 {&hf_ieee80211_block_ack_multi_tid_info,
11584 {"Traffic Identifier (TID) Info", "wlan.ba.mtid.tid",
11585 FT_UINT8, BASE_DEC, 0, 0, NULL, HFILL }},
11587 {&hf_ieee80211_block_ack_multi_tid_reserved,
11588 {"Reserved", "wlan.bar.mtid.tidinfo.reserved",
11589 FT_UINT16, BASE_HEX, 0, 0x0fff, NULL, HFILL }},
11591 {&hf_ieee80211_block_ack_multi_tid_value,
11592 {"Multi-TID Value", "wlan.bar.mtid.tidinfo.value",
11593 FT_UINT16, BASE_HEX, 0, 0xf000, NULL, HFILL }},
11595 {&hf_ieee80211_block_ack_request_type,
11596 {"Block Ack Request Type", "wlan.bar.type",
11597 FT_UINT8, BASE_HEX, VALS(ieee80211_block_ack_request_type_flags), 0, "Block Ack Request (BAR) Type", HFILL }},
11599 {&hf_ieee80211_block_ack_type,
11600 {"Block Ack Type", "wlan.ba.type",
11601 FT_UINT8, BASE_HEX, VALS(ieee80211_block_ack_type_flags), 0, NULL, HFILL }},
11603 {&hf_ieee80211_block_ack_bitmap,
11604 {"Block Ack Bitmap", "wlan.ba.bm",
11605 FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }},
11607 {&hf_ieee80211_data_encap_payload_type,
11608 {"Payload Type", "wlan.data_encap.payload_type",
11609 FT_UINT8, BASE_DEC, VALS(ieee80211_data_encap_payload_types), 0, NULL,
11612 {&hf_ieee80211_ff_tdls_action_code,
11613 {"Action code", "wlan_mgt.fixed.action_code",
11614 FT_UINT8, BASE_DEC, VALS(&tdls_action_codes), 0,
11615 "Management action code", HFILL }},
11617 {&hf_ieee80211_ff_target_channel,
11618 {"Target Channel", "wlan_mgt.fixed.target_channel",
11619 FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
11621 {&hf_ieee80211_ff_regulatory_class,
11622 {"Regulatory Class", "wlan_mgt.fixed.regulatory_class",
11623 FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }}
11625 #ifdef MESH_OVERRIDES
11627 {&hf_ieee80211_mesh_flags,
11628 {"Mesh Flags", "wlan.mesh.flags",
11629 FT_BOOLEAN, BASE_NONE, NULL, 0x0,
11632 {&hf_ieee80211_mesh_seq,
11633 {"Mesh Seq", "wlan.mesh.seq", FT_UINT32, BASE_DEC, NULL, 0,
11634 "Mesh End-to-End sequence number", HFILL }},
11636 {&hf_ieee80211_mesh_ttl,
11637 {"Mesh TTL", "wlan.mesh.ttl", FT_UINT8, BASE_DEC, NULL, 0,
11640 {&hf_ieee80211_mesh_ae1,
11641 {"Mesh A4", "wlan.mesh.a4", FT_ETHER, BASE_NONE, NULL, 0,
11642 "Mesh Address4", HFILL }},
11644 {&hf_ieee80211_mesh_ae2,
11645 {"Mesh A5", "wlan.mesh.a5", FT_ETHER, BASE_NONE, NULL, 0,
11646 "Mesh Address5", HFILL }},
11648 {&hf_ieee80211_mesh_ae3,
11649 {"Mesh A6", "wlan.mesh.a6", FT_ETHER, BASE_NONE, NULL, 0,
11650 "Mesh Address6", HFILL }}
11652 #endif /* MESH_OVERRIDES */
11655 static hf_register_info hf_prism[] = {
11656 /* Prism-specific header fields
11657 XXX - make as many of these generic as possible. */
11658 { &hf_ieee80211_prism_msgcode,
11659 {"Message Code", "prism.msgcode", FT_UINT32, BASE_DEC, NULL, 0x0,
11662 { &hf_ieee80211_prism_msglen,
11663 {"Message Length", "prism.msglen", FT_UINT32, BASE_DEC, NULL, 0x0,
11666 { &hf_ieee80211_prism_devname,
11667 {"Device Name", "prism.devname", FT_STRING, BASE_NONE, NULL, 0x0,
11670 { &hf_ieee80211_prism_did,
11671 {"DID", "prism.did.type", FT_NONE, BASE_NONE, NULL, 0x0,
11674 { &hf_ieee80211_prism_did_type,
11675 {"DID", "prism.did.type", FT_UINT32, BASE_HEX, VALS(&prism_did_vals), 0x0,
11676 "Different ID for each parameter", HFILL }},
11678 { &hf_ieee80211_prism_did_status,
11679 {"Status", "prism.did.status", FT_UINT16, BASE_DEC, VALS(&prism_status_vals), 0x0,
11680 "Supplied by the driver or not", HFILL }},
11682 { &hf_ieee80211_prism_did_length,
11683 {"Length", "prism.did.length", FT_UINT16, BASE_DEC, NULL, 0x0,
11684 "Length of data", HFILL }},
11686 { &hf_ieee80211_prism_did_hosttime,
11687 {"Host Time", "prism.did.hosttime", FT_UINT32, BASE_DEC, NULL, 0x0,
11688 "In jiffies - for our system this is in 10ms units", HFILL }},
11690 { &hf_ieee80211_prism_did_mactime,
11691 {"Mac Time", "prism.did.hosttime", FT_UINT32, BASE_DEC, NULL, 0x0,
11692 "In micro-seconds", HFILL }},
11694 { &hf_ieee80211_prism_did_channel,
11695 {"Channel", "prism.did.hosttime", FT_UINT32, BASE_DEC, NULL, 0x0,
11698 { &hf_ieee80211_prism_did_rssi,
11699 {"RSSI", "prism.did.rssi", FT_UINT32, BASE_HEX, NULL, 0x0,
11702 { &hf_ieee80211_prism_did_sq,
11703 {"SQ", "prism.did.sq", FT_UINT32, BASE_HEX, NULL, 0x0,
11706 { &hf_ieee80211_prism_did_signal,
11707 {"Signal", "prism.did.signal", FT_UINT32, BASE_HEX, NULL, 0x0,
11710 { &hf_ieee80211_prism_did_noise,
11711 {"Noise", "prism.did.noise", FT_UINT32, BASE_HEX, NULL, 0x0,
11714 { &hf_ieee80211_prism_did_rate,
11715 {"Rate (In Mb/s)", "prism.did.rate", FT_UINT32, BASE_CUSTOM, prism_rate_base_custom, 0x0,
11716 "In Mb/s", HFILL }},
11718 { &hf_ieee80211_prism_did_istx,
11719 {"IsTX", "prism.did.istx", FT_UINT32, BASE_HEX, VALS(&prism_istx_vals), 0x0,
11720 "Type of packet (RX or TX ?)", HFILL }},
11722 { &hf_ieee80211_prism_did_frmlen,
11723 {"Frame Length", "prism.did.frmlen", FT_UINT32, BASE_HEX_DEC, NULL, 0x0,
11724 "Length of the following frame in bytes", HFILL }},
11726 { &hf_ieee80211_prism_did_unknown,
11727 {"Unknown DID Field", "prism.did.unknown", FT_UINT32, BASE_HEX_DEC, NULL, 0x0,
11731 static hf_register_info hf_wlancap[] = {
11732 /* AVS-specific header fields.
11733 XXX - make as many of these generic as possible. */
11735 {"Header magic", "wlancap.magic", FT_UINT32, BASE_HEX, NULL, 0xFFFFFFF0, NULL, HFILL } },
11736 { &hf_wlan_version, { "Header revision", "wlancap.version", FT_UINT32,
11737 BASE_DEC, NULL, 0xF, NULL, HFILL } },
11738 { &hf_wlan_length, { "Header length", "wlancap.length", FT_UINT32,
11739 BASE_DEC, NULL, 0x0, NULL, HFILL } },
11741 {"PHY type", "wlan.phytype", FT_UINT32, BASE_DEC, VALS(phy_type), 0x0,
11744 { &hf_wlan_priority, { "Priority", "wlancap.priority", FT_UINT32, BASE_DEC,
11745 NULL, 0x0, NULL, HFILL } },
11746 { &hf_wlan_ssi_type, { "SSI Type", "wlancap.ssi_type", FT_UINT32, BASE_DEC,
11747 VALS(ssi_type), 0x0, NULL, HFILL } },
11748 { &hf_wlan_preamble, { "Preamble", "wlancap.preamble", FT_UINT32,
11749 BASE_DEC, VALS(preamble_type), 0x0, NULL, HFILL } },
11750 { &hf_wlan_encoding, { "Encoding Type", "wlancap.encoding", FT_UINT32,
11751 BASE_DEC, VALS(encoding_type), 0x0, NULL, HFILL } },
11752 { &hf_wlan_sequence, { "Receive sequence", "wlancap.sequence", FT_UINT32,
11753 BASE_DEC, NULL, 0x0, NULL, HFILL } },
11754 { &hf_wlan_drops, { "Known Dropped Frames", "wlancap.drops", FT_UINT32,
11755 BASE_DEC, NULL, 0x0, NULL, HFILL } },
11756 { &hf_wlan_receiver_addr, { "Receiver Address", "wlancap.receiver_addr", FT_ETHER,
11757 BASE_NONE, NULL, 0x0, "Receiver Hardware Address", HFILL } },
11758 { &hf_wlan_padding, { "Padding", "wlancap.padding", FT_BYTES,
11759 BASE_NONE, NULL, 0x0, NULL, HFILL } }
11762 static const true_false_string rsn_preauth_flags = {
11763 "Transmitter supports pre-authentication",
11764 "Transmitter does not support pre-authentication"
11767 static const true_false_string rsn_no_pairwise_flags = {
11768 "Transmitter cannot support WEP default key 0 simultaneously with "
11770 "Transmitter can support WEP default key 0 simultaneously with "
11774 static const value_string rsn_cap_replay_counter[] = {
11775 {0x00, "1 replay counter per PTKSA/GTKSA/STAKeySA"},
11776 {0x01, "2 replay counters per PTKSA/GTKSA/STAKeySA"},
11777 {0x02, "4 replay counters per PTKSA/GTKSA/STAKeySA"},
11778 {0x03, "16 replay counters per PTKSA/GTKSA/STAKeySA"},
11782 static const true_false_string ht_ldpc_coding_flag = {
11783 "Transmitter supports receiving LDPC coded packets",
11784 "Transmitter does not support receiving LDPC coded packets"
11787 static const true_false_string ht_chan_width_flag = {
11788 "Transmitter supports 20MHz and 40MHz operation",
11789 "Transmitter only supports 20MHz operation"
11792 static const value_string ht_sm_pwsave_flag[] = {
11793 {0x00, "Static SM Power Save mode"},
11794 {0x01, "Dynamic SM Power Save mode"},
11795 {0x02, "Reserved"},
11796 {0x03, "SM Power Save disabled"},
11800 static const true_false_string ht_green_flag = {
11801 "Transmitter is able to receive PPDUs with Green Field (GF) preamble",
11802 "Transmitter is not able to receive PPDUs with Green Field (GF) preamble"
11805 static const value_string ht_rx_stbc_flag[] = {
11806 {0x00, "No Rx STBC support"},
11807 {0x01, "Rx support of one spatial stream"},
11808 {0x02, "Rx support of one and two spatial streams"},
11809 {0x03, "Rx support of one, two, and three spatial streams"},
11813 static const true_false_string ht_delayed_block_ack_flag = {
11814 "Transmitter supports HT-Delayed BlockAck",
11815 "Transmitter does not support HT-Delayed BlockAck"
11818 static const true_false_string ht_max_amsdu_flag = {
11823 static const true_false_string ht_dss_cck_40_flag = {
11824 "Will/Can use DSSS/CCK in 40 MHz",
11825 "Won't/Can't use of DSSS/CCK in 40 MHz"
11828 static const true_false_string ht_psmp_flag = {
11829 "Will/Can support PSMP operation",
11830 "Won't/Can't support PSMP operation"
11833 static const true_false_string ht_40_mhz_intolerant_flag = {
11834 "Use of 40 MHz transmissions restricted/disallowed",
11835 "Use of 40 MHz transmissions unrestricted/allowed"
11838 static const value_string ampduparam_mpdu_start_spacing_flags[] = {
11839 {0x00, "no restriction"},
11840 {0x01, "1/4 [usec]"},
11841 {0x02, "1/2 [usec]"},
11842 {0x03, "1 [usec]"},
11843 {0x04, "2 [usec]"},
11844 {0x05, "4 [usec]"},
11845 {0x06, "8 [usec]"},
11846 {0x07, "16 [usec]"},
11850 static const true_false_string mcsset_tx_mcs_set_defined_flag = {
11855 static const true_false_string mcsset_tx_rx_mcs_set_not_equal_flag = {
11860 static const value_string mcsset_tx_max_spatial_streams_flags[] = {
11861 {0x00, "1 spatial stream"},
11862 {0x01, "2 spatial streams"},
11863 {0x02, "3 spatial streams"},
11864 {0x03, "4 spatial streams"},
11868 static const value_string htex_transtime_flags[] = {
11869 {0x00, "No Transition"},
11870 {0x01, "400 usec"},
11871 {0x02, "1.5 msec"},
11876 static const value_string htex_mcs_flags[] = {
11877 {0x00, "STA does not provide MCS feedback"},
11878 {0x01, "Reserved"},
11879 {0x02, "STA provides only unsolicited MCS feedback"},
11880 {0x03, "STA can provide MCS feedback in response to MRQ as well as unsolicited MCS feedback"},
11884 static const value_string txbf_calib_flag[] = {
11885 {0x00, "incapable"},
11886 {0x01, "Limited involvement, cannot initiate"},
11887 {0x02, "Limited involvement, can initiate"},
11888 {0x03, "Fully capable"},
11892 static const value_string txbf_feedback_flags[] = {
11893 {0x00, "not supported"},
11894 {0x01, "delayed feedback capable"},
11895 {0x02, "immediate feedback capable"},
11896 {0x03, "delayed and immediate feedback capable"},
11900 static const value_string txbf_antenna_flags[] = {
11901 {0x00, "1 TX antenna sounding"},
11902 {0x01, "2 TX antenna sounding"},
11903 {0x02, "3 TX antenna sounding"},
11904 {0x03, "4 TX antenna sounding"},
11908 static const value_string txbf_csi_max_rows_bf_flags[] = {
11909 {0x00, "1 row of CSI"},
11910 {0x01, "2 rows of CSI"},
11911 {0x02, "3 rows of CSI"},
11912 {0x03, "4 rows of CSI"},
11916 static const value_string txbf_chan_est_flags[] = {
11917 {0x00, "1 space time stream"},
11918 {0x01, "2 space time streams"},
11919 {0x02, "3 space time streams"},
11920 {0x03, "4 space time streams"},
11924 static const value_string txbf_min_group_flags[] = {
11925 {0x00, "No grouping supported"},
11926 {0x01, "Groups of 1,2 supported"},
11927 {0x02, "Groups of 1,4 supported"},
11928 {0x03, "Groups of 1,2,4 supported"},
11932 static const value_string hta_ext_chan_offset_flag[] = {
11933 {0x00, "No Extension Channel"},
11934 {0x01, "Extension Channel above control channel"},
11935 {0x02, "Undefined"},
11936 {0x03, "Extension Channel below control channel"},
11940 static const true_false_string hta_rec_tx_width_flag = {
11941 "Any channel width enabled",
11942 "Use 20MHz channel (control)"
11945 static const true_false_string hta_rifs_mode_flag = {
11946 "Use of RIFS permitted",
11947 "Use of RIFS prohibited"
11950 static const true_false_string hta_controlled_access_flag = {
11955 static const value_string hta_service_interval_flag[] = {
11967 static const value_string hta_operating_mode_flag[] = {
11968 {0x00, "Pure HT, no protection"},
11969 {0x01, "There may be non-HT devices (control & ext channel)"},
11970 {0x02, "No non-HT is associated, but at least 1 20MHz is. protect on"},
11971 {0x03, "Mixed: no non-HT is associated, protect on"},
11975 static const true_false_string hta_non_gf_devices_flag = {
11976 "All HT devices associated are GF capable",
11977 "One or More HT devices are not GF capable"
11980 static const true_false_string hta_dual_stbc_protection_flag = {
11981 "Dual CTS protections is used",
11982 "Regular use of RTS/CTS"
11985 static const true_false_string hta_secondary_beacon_flag = {
11986 "Secondary Beacon",
11990 static const true_false_string hta_lsig_txop_protection_flag = {
11995 static const true_false_string hta_pco_active_flag = {
11996 "PCO is activated in the BSS",
11997 "PCO is not activated in the BSS"
12000 static const true_false_string hta_pco_phase_flag = {
12001 "Switch to 20MHz phase/keep 20MHz",
12002 "Switch to 40MHz phase/keep 40MHz"
12005 static const value_string ht_info_secondary_channel_offset_flags[] = {
12006 {0x00, "No secondary channel"},
12007 {0x01, "Secondary channel is above the primary channel"},
12008 {0x02, "Reserved"},
12009 {0x03, "Secondary channel is below the primary channel"},
12013 static const true_false_string ht_info_channel_width_flag = {
12014 "Channel of any width supported",
12015 "20 MHz channel width only"
12018 static const true_false_string ht_info_rifs_mode_flag = {
12023 static const true_false_string ht_info_psmp_stas_only_flag = {
12024 "Association requests are accepted from only PSMP capable STA",
12025 "Association requests are accepted regardless of PSMP capability"
12028 static const value_string ht_info_service_interval_granularity_flags[] = {
12040 static const value_string ht_info_operating_mode_flags[] = {
12041 {0x00, "All STAs are - 20/40 MHz HT or in a 20/40 MHz BSS or are 20 MHz HT in a 20 MHz BSS"},
12042 {0x01, "HT non-member protection mode"},
12043 {0x02, "Only HT STAs in the BSS, however, there exists at least one 20 MHz STA"},
12044 {0x03, "HT mixed mode"},
12048 static const true_false_string ht_info_non_greenfield_sta_present_flag = {
12049 "One or more associated STAs are not greenfield capable",
12050 "All associated STAs are greenfield capable"
12053 static const true_false_string ht_info_transmit_burst_limit_flag = {
12054 "2.4 GHz - 6.16 ms | All other bands - 3.08 ms",
12058 static const true_false_string ht_info_obss_non_ht_stas_present_flag = {
12059 "Use of protection for non-HT STAs by overlapping BSSs is needed",
12060 "Use of protection for non-HT STAs by overlapping BSSs is not needed"
12063 static const true_false_string ht_info_dual_beacon_flag = {
12064 "AP transmits a secondary beacon",
12065 "No second beacon is transmitted"
12068 static const true_false_string ht_info_dual_cts_protection_flag = {
12073 static const true_false_string ht_info_secondary_beacon_flag = {
12074 "Secondary beacon",
12078 static const true_false_string ht_info_lsig_txop_protection_full_support_flag = {
12079 "All HT STAs in the BSS support L-SIG TXOP protection",
12080 "One or more HT STAs in the BSS do not support L-SIG TXOP protection"
12083 static const true_false_string ht_info_pco_phase_flag = {
12084 "Switch to or continue 40 MHz phase",
12085 "Switch to or continue 20 MHz phase"
12088 static const true_false_string htc_lac_trq_flag = {
12089 "Want sounding PPDU",
12090 "Don't want sounding PPDU"
12093 static const true_false_string htc_lac_mai_mrq_flag = {
12094 "MCS feedback requested",
12095 "No MCS feedback requested"
12098 static const value_string ieee80211_htc_lac_asel_command_flags[] = {
12099 {0x00, "Transmit Antenna Selection Sounding Indication (TXASSI)"},
12100 {0x01, "Transmit Antenna Selection Sounding Request (TXASSR)"},
12101 {0x02, "Receive Antenna Selection Sounding Indication (RXASSI)"},
12102 {0x03, "Receive Antenna Selection Sounding Request (RXASSR)"},
12103 {0x04, "Sounding Label"},
12104 {0x05, "No feedback, ASEL training failure"},
12105 {0x06, "Transmit Antenna Selection Sounding Indication (TXASSI) requesting feedback of explicit CSI"},
12106 {0x07, "Reserved"},
12110 static const value_string ieee80211_htc_cal_pos_flags[] = {
12111 {0x00, "Not a calibration frame"},
12112 {0x01, "Calibration Start"},
12113 {0x02, "Sounding Response"},
12114 {0x03, "Sounding Complete"},
12118 static const true_false_string ieee80211_htc_ndp_announcement_flag = {
12120 "No NDP will follow"
12123 static const value_string ieee80211_htc_csi_steering_flags[] = {
12124 {0x00, "No feedback required"},
12126 {0x02, "Non-compressed Beamforming Feedback Matrix"},
12127 {0x03, "Compressed Beamforming Feedback Matrix"},
12131 static const value_string ieee80211_tag_secondary_channel_offset_flags[] = {
12132 {0x00, "No Secondary Channel"},
12133 {0x01, "Above Primary Channel"},
12134 {0x02, "Reserved"},
12135 {0x03, "Below Primary Channel"},
12139 static const value_string ieee80211_tag_ext_channel_switch_announcement_switch_mode_flags[] = {
12140 {0x00, "Frames may be transmitted before the channel switch has been completed"},
12141 {0x01, "No more frames are to be transmitted until the channel switch has been completed"},
12145 static const value_string service_interval_granularity_vals[] = {
12157 static hf_register_info ff[] = {
12159 {&hf_ieee80211_ff_timestamp,
12160 {"Timestamp", "wlan_mgt.fixed.timestamp", FT_UINT64, BASE_HEX,
12161 NULL, 0, NULL, HFILL }},
12163 {&hf_ieee80211_ff_auth_alg,
12164 {"Authentication Algorithm", "wlan_mgt.fixed.auth.alg",
12165 FT_UINT16, BASE_DEC, VALS (&auth_alg), 0, NULL, HFILL }},
12167 {&hf_ieee80211_ff_beacon_interval,
12168 {"Beacon Interval", "wlan_mgt.fixed.beacon", FT_UINT32, BASE_CUSTOM, beacon_interval_base_custom, 0,
12171 {&hf_ieee80211_fixed_parameters,
12172 {"Fixed parameters", "wlan_mgt.fixed.all", FT_UINT16, BASE_DEC, NULL, 0,
12175 {&hf_ieee80211_tagged_parameters,
12176 {"Tagged parameters", "wlan_mgt.tagged.all", FT_UINT16, BASE_DEC, NULL, 0,
12179 {&hf_ieee80211_tag_ssid,
12180 {"SSID", "wlan_mgt.ssid", FT_STRING, BASE_NONE, NULL, 0,
12181 "Indicates the identity of an ESS or IBSS", HFILL }},
12183 {&hf_ieee80211_tag_supp_rates,
12184 {"Supported Rates", "wlan_mgt.supported_rates",
12185 FT_UINT8, BASE_NONE, VALS(ieee80211_supported_rates_vals), 0x0,
12186 "In Mbit/sec, (B) for Basic Rates", HFILL }},
12188 {&hf_ieee80211_tag_fh_dwell_time,
12189 {"Dwell Time", "wlan_mgt.fh.dwell_time",
12190 FT_UINT16, BASE_HEX, NULL, 0x0,
12191 "In Time Unit (TU)", HFILL }},
12193 {&hf_ieee80211_tag_fh_hop_set,
12194 {"Hop Set", "wlan_mgt.fh.hop_set",
12195 FT_UINT8, BASE_DEC, NULL, 0x0,
12198 {&hf_ieee80211_tag_fh_hop_pattern,
12199 {"Hop Pattern", "wlan_mgt.fh.hop_pattern",
12200 FT_UINT8, BASE_DEC, NULL, 0x0,
12203 {&hf_ieee80211_tag_fh_hop_index,
12204 {"Hop Index", "wlan_mgt.fh.hop_index",
12205 FT_UINT8, BASE_DEC, NULL, 0x0,
12208 {&hf_ieee80211_ff_block_ack_params,
12209 {"Block Ack Parameters", "wlan_mgt.fixed.baparams",
12210 FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL }},
12212 {&hf_ieee80211_ff_block_ack_params_amsdu_permitted,
12213 {"A-MSDUs", "wlan_mgt.fixed.baparams.amsdu",
12214 FT_BOOLEAN, 16, TFS (&ff_block_ack_params_amsdu_permitted_flag), 0x0001, "A-MSDU Permitted in QoS Data MPDUs", HFILL }},
12216 {&hf_ieee80211_ff_block_ack_params_policy,
12217 {"Block Ack Policy", "wlan_mgt.fixed.baparams.policy",
12218 FT_BOOLEAN, 16, TFS (&ff_block_ack_params_policy_flag), 0x0002, NULL, HFILL }},
12220 {&hf_ieee80211_ff_block_ack_params_tid,
12221 {"Traffic Identifier", "wlan_mgt.fixed.baparams.tid",
12222 FT_UINT16, BASE_HEX, NULL, 0x003C, NULL, HFILL }},
12224 {&hf_ieee80211_ff_block_ack_params_buffer_size,
12225 {"Number of Buffers (1 Buffer = 2304 Bytes)", "wlan_mgt.fixed.baparams.buffersize",
12226 FT_UINT16, BASE_DEC, NULL, 0xFFC0, "Number of Buffers", HFILL }},
12228 {&hf_ieee80211_ff_block_ack_timeout,
12229 {"Block Ack Timeout", "wlan_mgt.fixed.batimeout",
12230 FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL }},
12232 {&hf_ieee80211_ff_block_ack_ssc,
12233 {"Block Ack Starting Sequence Control (SSC)", "wlan_mgt.fixed.ssc",
12234 FT_UINT16, BASE_HEX, 0, 0, NULL, HFILL }},
12236 {&hf_ieee80211_ff_block_ack_ssc_fragment,
12237 {"Fragment", "wlan_mgt.fixed.fragment",
12238 FT_UINT16, BASE_DEC, 0, 0x000f, NULL, HFILL }},
12240 {&hf_ieee80211_ff_block_ack_ssc_sequence,
12241 {"Starting Sequence Number", "wlan_mgt.fixed.sequence",
12242 FT_UINT16, BASE_DEC, 0, 0xfff0, NULL, HFILL }},
12244 {&hf_ieee80211_ff_delba_param,
12245 {"Delete Block Ack (DELBA) Parameter Set", "wlan_mgt.fixed.delba.param",
12246 FT_UINT16, BASE_HEX, 0, 0, NULL, HFILL }},
12248 {&hf_ieee80211_ff_delba_param_reserved,
12249 {"Reserved", "wlan_mgt.fixed.delba.param.reserved",
12250 FT_UINT16, BASE_HEX, 0, 0x07ff, NULL, HFILL }},
12252 {&hf_ieee80211_ff_delba_param_init,
12253 {"Initiator", "wlan_mgt.fixed.delba.param.initiator",
12254 FT_BOOLEAN, 16, 0, 0x0800, NULL, HFILL }},
12256 {&hf_ieee80211_ff_delba_param_tid,
12257 {"TID", "wlan_mgt.fixed.delba.param.tid",
12258 FT_UINT16, BASE_HEX, 0, 0xf000, "Traffic Identifier (TID)", HFILL }},
12260 {&hf_ieee80211_ff_max_reg_pwr,
12261 {"Maximum Regulation Power", "wlan_mgt.fixed.maxregpwr",
12262 FT_UINT16, BASE_HEX, 0, 0, NULL, HFILL }},
12264 {&hf_ieee80211_ff_measurement_pilot_int,
12265 {"Measurement Pilot Interval", "wlan_mgt.fixed.msmtpilotint",
12266 FT_UINT16, BASE_HEX, 0, 0, "Measurement Pilot Interval Fixed Field", HFILL }},
12268 {&hf_ieee80211_ff_country_str,
12269 {"Country String", "wlan_mgt.fixed.country",
12270 FT_STRING, BASE_NONE, 0, 0, NULL, HFILL }},
12272 {&hf_ieee80211_ff_max_tx_pwr,
12273 {"Maximum Transmit Power", "wlan_mgt.fixed.maxtxpwr",
12274 FT_UINT8, BASE_HEX, 0, 0, NULL, HFILL }},
12276 {&hf_ieee80211_ff_tx_pwr_used,
12277 {"Transmit Power Used", "wlan_mgt.fixed.txpwr",
12278 FT_UINT8, BASE_HEX, 0, 0, NULL, HFILL }},
12280 {&hf_ieee80211_ff_transceiver_noise_floor,
12281 {"Transceiver Noise Floor", "wlan_mgt.fixed.tnoisefloor",
12282 FT_UINT8, BASE_HEX, 0, 0, NULL, HFILL }},
12284 {&hf_ieee80211_ff_channel_width,
12285 {"Supported Channel Width", "wlan_mgt.fixed.chanwidth",
12286 FT_UINT8, BASE_HEX, VALS (ff_channel_width_vals), 0, NULL, HFILL }},
12288 {&hf_ieee80211_ff_qos_info_ap,
12289 {"QoS Information (AP)", "wlan_mgt.fixed.qosinfo.ap",
12290 FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
12292 {&hf_ieee80211_ff_qos_info_ap_edca_param_set_counter,
12293 {"EDCA Parameter Set Update Count", "wlan_mgt.fixed.qosinfo.ap.edcaupdate",
12294 FT_UINT8, BASE_HEX, NULL, 0x0F, "Enhanced Distributed Channel Access (EDCA) Parameter Set Update Count", HFILL }},
12296 {&hf_ieee80211_ff_qos_info_ap_q_ack,
12297 {"Q-Ack", "wlan_mgt.fixed.qosinfo.ap.qack",
12298 FT_BOOLEAN, 8, TFS (&ff_qos_info_ap_q_ack_flag), 0x10, "QoS Ack", HFILL }},
12300 {&hf_ieee80211_ff_qos_info_ap_queue_req,
12301 {"Queue Request", "wlan_mgt.fixed.qosinfo.ap",
12302 FT_BOOLEAN, 8, TFS (&ff_qos_info_ap_queue_req_flag), 0x20, NULL, HFILL }},
12304 {&hf_ieee80211_ff_qos_info_ap_txop_request,
12305 {"TXOP Request", "wlan_mgt.fixed.qosinfo.ap.txopreq",
12306 FT_BOOLEAN, 8, TFS (&ff_qos_info_ap_txop_request_flag), 0x40, "Transmit Opportunity (TXOP) Request", HFILL }},
12308 {&hf_ieee80211_ff_qos_info_ap_reserved,
12309 {"Reserved", "wlan_mgt.fixed.qosinfo.ap.reserved",
12310 FT_BOOLEAN, 8, NULL, 0x80, NULL, HFILL }},
12312 {&hf_ieee80211_ff_qos_info_sta,
12313 {"QoS Information (STA)", "wlan_mgt.fixed.qosinfo.sta",
12314 FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
12316 {&hf_ieee80211_ff_qos_info_sta_ac_vo,
12317 {"AC_VO", "wlan_mgt.fixed.qosinfo.sta.ac.vo",
12318 FT_BOOLEAN, 8, TFS (&ff_qos_info_sta_ac_flag), 0x01, NULL, HFILL }},
12320 {&hf_ieee80211_ff_qos_info_sta_ac_vi,
12321 {"AC_VI", "wlan_mgt.fixed.qosinfo.sta.ac.vi",
12322 FT_BOOLEAN, 8, TFS (&ff_qos_info_sta_ac_flag), 0x02, NULL, HFILL }},
12324 {&hf_ieee80211_ff_qos_info_sta_ac_bk,
12325 {"AC_BK", "wlan_mgt.fixed.qosinfo.sta.ac.bk",
12326 FT_BOOLEAN, 8, TFS (&ff_qos_info_sta_ac_flag), 0x04, NULL, HFILL }},
12328 {&hf_ieee80211_ff_qos_info_sta_ac_be,
12329 {"AC_BE", "wlan_mgt.fixed.qosinfo.sta.ac.be",
12330 FT_BOOLEAN, 8, TFS (&ff_qos_info_sta_ac_flag), 0x08, NULL, HFILL }},
12332 {&hf_ieee80211_ff_qos_info_sta_q_ack,
12333 {"Q-Ack", "wlan_mgt.fixed.qosinfo.sta.qack",
12334 FT_BOOLEAN, 8, TFS (&ff_qos_info_sta_q_ack_flag), 0x10, "QoS Ack", HFILL }},
12336 {&hf_ieee80211_ff_qos_info_sta_max_sp_len,
12337 {"Service Period (SP) Length", "wlan_mgt.fixed.qosinfo.sta.splen",
12338 FT_UINT8, BASE_HEX, VALS (&ff_qos_info_sta_max_sp_len_flags) , 0x60, NULL, HFILL }},
12340 {&hf_ieee80211_ff_qos_info_sta_more_data_ack,
12341 {"More Data Ack", "wlan_mgt.fixed.qosinfo.sta.moredataack",
12342 FT_BOOLEAN, 8, TFS (&ff_qos_info_sta_more_data_ack_flag), 0x80, NULL, HFILL }},
12344 {&hf_ieee80211_ff_sm_pwr_save,
12345 {"Spatial Multiplexing (SM) Power Control", "wlan_mgt.fixed.sm.powercontrol",
12346 FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
12348 {&hf_ieee80211_ff_sm_pwr_save_enabled,
12349 {"SM Power Save", "wlan_mgt.fixed.sm.powercontrol.enabled",
12350 FT_BOOLEAN, 8, TFS (&tfs_enabled_disabled), 0x01, "Spatial Multiplexing (SM) Power Save", HFILL }},
12352 {&hf_ieee80211_ff_sm_pwr_save_sm_mode,
12353 {"SM Mode", "wlan_mgt.fixed.sm.powercontrol.mode",
12354 FT_BOOLEAN, 8, TFS (&ff_sm_pwr_save_sm_mode_flag), 0x02, "Spatial Multiplexing (SM) Mode", HFILL }},
12356 {&hf_ieee80211_ff_sm_pwr_save_reserved,
12357 {"Reserved", "wlan_mgt.fixed.sm.powercontrol.reserved",
12358 FT_UINT8, BASE_HEX, NULL, 0xFC, NULL, HFILL }},
12360 {&hf_ieee80211_ff_pco_phase_cntrl,
12361 {"Phased Coexistence Operation (PCO) Phase Control", "wlan_mgt.fixed.pco.phasecntrl",
12362 FT_BOOLEAN, BASE_NONE, TFS (&ff_pco_phase_cntrl_flag), 0x0, NULL, HFILL }},
12364 {&hf_ieee80211_ff_psmp_param_set,
12365 {"Power Save Multi-Poll (PSMP) Parameter Set", "wlan_mgt.fixed.psmp.paramset",
12366 FT_UINT16, BASE_HEX, 0, 0, NULL, HFILL }},
12368 {&hf_ieee80211_ff_psmp_param_set_n_sta,
12369 {"Number of STA Info Fields Present", "wlan_mgt.fixed.psmp.paramset.nsta",
12370 FT_UINT16, BASE_HEX, 0, 0x000F, NULL, HFILL }},
12372 {&hf_ieee80211_ff_psmp_param_set_more_psmp,
12373 {"More PSMP", "wlan_mgt.fixed.psmp.paramset.more",
12374 FT_BOOLEAN, 16, TFS(&ff_psmp_param_set_more_psmp_flag), 0x0010, "More Power Save Multi-Poll (PSMP)", HFILL }},
12376 {&hf_ieee80211_ff_psmp_param_set_psmp_sequence_duration,
12377 {"PSMP Sequence Duration [us]", "wlan_mgt.fixed.psmp.paramset.seqduration",
12378 FT_UINT16, BASE_DEC, 0, 0xFFE0, "Power Save Multi-Poll (PSMP) Sequence Duration", HFILL }},
12380 {&hf_ieee80211_ff_mimo_cntrl,
12381 {"MIMO Control", "wlan_mgt.fixed.mimo.control.",
12382 FT_BYTES, BASE_NONE, 0, 0x0, NULL, HFILL }},
12384 {&hf_ieee80211_ff_mimo_cntrl_nc_index,
12385 {"Nc Index", "wlan_mgt.fixed.mimo.control.ncindex",
12386 FT_UINT16, BASE_HEX, VALS(&ff_mimo_cntrl_nc_index_flags), 0x0003, "Number of Columns Less One", HFILL }},
12388 {&hf_ieee80211_ff_mimo_cntrl_nr_index,
12389 {"Nr Index", "wlan_mgt.fixed.mimo.control.nrindex",
12390 FT_UINT16, BASE_HEX, VALS(&ff_mimo_cntrl_nr_index_flags), 0x000C, "Number of Rows Less One", HFILL }},
12392 {&hf_ieee80211_ff_mimo_cntrl_channel_width,
12393 {"Channel Width", "wlan_mgt.fixed.mimo.control.chanwidth",
12394 FT_BOOLEAN, 16, TFS(&ff_mimo_cntrl_channel_width_flag), 0x0010, NULL, HFILL }},
12396 {&hf_ieee80211_ff_mimo_cntrl_grouping,
12397 {"Grouping (Ng)", "wlan_mgt.fixed.mimo.control.grouping",
12398 FT_UINT16, BASE_HEX, VALS(&ff_mimo_cntrl_grouping_flags), 0x0060, NULL, HFILL }},
12400 {&hf_ieee80211_ff_mimo_cntrl_coefficient_size,
12401 {"Coefficient Size (Nb)", "wlan_mgt.fixed.mimo.control.cosize",
12402 FT_UINT16, BASE_HEX, VALS(&ff_mimo_cntrl_coefficient_size_flags), 0x0180, NULL, HFILL }},
12404 {&hf_ieee80211_ff_mimo_cntrl_codebook_info,
12405 {"Codebook Information", "wlan_mgt.fixed.mimo.control.codebookinfo",
12406 FT_UINT16, BASE_HEX, VALS(&ff_mimo_cntrl_codebook_info_flags), 0x0600, NULL, HFILL }},
12408 {&hf_ieee80211_ff_mimo_cntrl_remaining_matrix_segment,
12409 {"Remaining Matrix Segment", "wlan_mgt.fixed.mimo.control.matrixseg",
12410 FT_UINT16, BASE_HEX, 0, 0x3800, NULL, HFILL }},
12412 {&hf_ieee80211_ff_mimo_cntrl_reserved,
12413 {"Reserved", "wlan_mgt.fixed.mimo.control.reserved",
12414 FT_UINT16, BASE_HEX, 0, 0xC000, NULL, HFILL }},
12416 {&hf_ieee80211_ff_mimo_cntrl_sounding_timestamp,
12417 {"Sounding Timestamp", "wlan_mgt.fixed.mimo.control.soundingtime",
12418 FT_UINT32, BASE_HEX, 0, 0, NULL, HFILL }},
12420 {&hf_ieee80211_ff_psmp_sta_info,
12421 {"Power Save Multi-Poll (PSMP) Station Information", "wlan_mgt.fixed.psmp.stainfo",
12422 FT_UINT64, BASE_HEX, 0, 0, NULL, HFILL }},
12424 {&hf_ieee80211_ff_psmp_sta_info_type,
12425 {"Sta Info Type", "wlan_mgt.fixed.psmp.stainfo.type",
12426 FT_UINT32, BASE_HEX, VALS(&ff_psmp_sta_info_flags), PSMP_STA_INFO_FLAG_TYPE, NULL, HFILL }},
12428 {&hf_ieee80211_ff_psmp_sta_info_dtt_start_offset,
12429 {"DTT Start Offset", "wlan_mgt.fixed.psmp.stainfo.dttstart",
12430 FT_UINT32, BASE_HEX, 0, PSMP_STA_INFO_FLAG_DTT_START, NULL, HFILL }},
12432 {&hf_ieee80211_ff_psmp_sta_info_dtt_duration,
12433 {"DTT Duration", "wlan_mgt.fixed.psmp.stainfo.dttduration",
12434 FT_UINT32, BASE_HEX, 0, PSMP_STA_INFO_FLAG_DTT_DURATION, NULL, HFILL }},
12436 {&hf_ieee80211_ff_psmp_sta_info_sta_id,
12437 {"Target Station ID", "wlan_mgt.fixed.psmp.stainfo.staid",
12438 FT_UINT32, BASE_HEX, 0, PSMP_STA_INFO_FLAG_STA_ID, NULL, HFILL }},
12440 {&hf_ieee80211_ff_psmp_sta_info_utt_start_offset,
12441 {"UTT Start Offset", "wlan_mgt.fixed.psmp.stainfo.uttstart",
12442 FT_UINT32, BASE_HEX, 0, PSMP_STA_INFO_FLAG_UTT_START, NULL, HFILL }},
12444 {&hf_ieee80211_ff_psmp_sta_info_utt_duration,
12445 {"UTT Duration", "wlan_mgt.fixed.psmp.stainfo.uttduration",
12446 FT_UINT32, BASE_HEX, 0, PSMP_STA_INFO_FLAG_UTT_DURATION, NULL, HFILL }},
12448 {&hf_ieee80211_ff_psmp_sta_info_reserved_small,
12449 {"Reserved", "wlan_mgt.fixed.psmp.stainfo.reserved",
12450 FT_UINT32, BASE_HEX, 0, PSMP_STA_INFO_FLAG_IA_RESERVED, NULL, HFILL }},
12452 {&hf_ieee80211_ff_psmp_sta_info_reserved_large,
12453 {"Reserved", "wlan_mgt.fixed.psmp.stainfo.reserved",
12454 FT_UINT64, BASE_HEX, 0, 0, NULL, HFILL }},
12456 {&hf_ieee80211_ff_psmp_sta_info_psmp_multicast_id,
12457 {"Power Save Multi-Poll (PSMP) Multicast ID", "wlan_mgt.fixed.psmp.stainfo.multicastid",
12458 FT_UINT64, BASE_HEX, 0, 0, NULL, HFILL }},
12460 {&hf_ieee80211_ff_ant_selection,
12461 {"Antenna Selection", "wlan_mgt.fixed.antsel",
12462 FT_UINT8, BASE_HEX, 0, 0, NULL, HFILL }},
12464 {&hf_ieee80211_ff_ant_selection_0,
12465 {"Antenna 0", "wlan_mgt.fixed.antsel.ant0",
12466 FT_UINT8, BASE_HEX, 0, 0x01, NULL, HFILL }},
12468 {&hf_ieee80211_ff_ant_selection_1,
12469 {"Antenna 1", "wlan_mgt.fixed.antsel.ant1",
12470 FT_UINT8, BASE_HEX, 0, 0x02, NULL, HFILL }},
12472 {&hf_ieee80211_ff_ant_selection_2,
12473 {"Antenna 2", "wlan_mgt.fixed.antsel.ant2",
12474 FT_UINT8, BASE_HEX, 0, 0x04, NULL, HFILL }},
12476 {&hf_ieee80211_ff_ant_selection_3,
12477 {"Antenna 3", "wlan_mgt.fixed.antsel.ant3",
12478 FT_UINT8, BASE_HEX, 0, 0x08, NULL, HFILL }},
12480 {&hf_ieee80211_ff_ant_selection_4,
12481 {"Antenna 4", "wlan_mgt.fixed.antsel.ant4",
12482 FT_UINT8, BASE_HEX, 0, 0x10, NULL, HFILL }},
12484 {&hf_ieee80211_ff_ant_selection_5,
12485 {"Antenna 5", "wlan_mgt.fixed.antsel.ant5",
12486 FT_UINT8, BASE_HEX, 0, 0x20, NULL, HFILL }},
12488 {&hf_ieee80211_ff_ant_selection_6,
12489 {"Antenna 6", "wlan_mgt.fixed.antsel.ant6",
12490 FT_UINT8, BASE_HEX, 0, 0x40, NULL, HFILL }},
12492 {&hf_ieee80211_ff_ant_selection_7,
12493 {"Antenna 7", "wlan_mgt.fixed.antsel.ant7",
12494 FT_UINT8, BASE_HEX, 0, 0x80, NULL, HFILL }},
12496 {&hf_ieee80211_ff_ext_channel_switch_announcement,
12497 {"Extended Channel Switch Announcement", "wlan_mgt.fixed.extchansw",
12498 FT_UINT32, BASE_HEX, 0, 0, NULL, HFILL }},
12500 {&hf_ieee80211_ff_ext_channel_switch_announcement_switch_mode,
12501 {"Channel Switch Mode", "wlan_mgt.fixed.extchansw.switchmode",
12502 FT_UINT32, BASE_HEX, VALS(&ieee80211_tag_ext_channel_switch_announcement_switch_mode_flags), 0x000000FF, NULL, HFILL }},
12504 {&hf_ieee80211_ff_ext_channel_switch_announcement_new_reg_class,
12505 {"New Regulatory Class", "wlan_mgt.fixed.extchansw.new.regclass",
12506 FT_UINT32, BASE_HEX, NULL, 0x0000FF00, NULL, HFILL }},
12508 {&hf_ieee80211_ff_ext_channel_switch_announcement_new_chan_number,
12509 {"New Channel Number", "wlan_mgt.fixed.extchansw.new.channumber",
12510 FT_UINT32, BASE_HEX, NULL, 0x00FF0000, NULL, HFILL }},
12512 {&hf_ieee80211_ff_ext_channel_switch_announcement_switch_count,
12513 {"Channel Switch Count", "wlan_mgt.extchanswitch.switchcount",
12514 FT_UINT32, BASE_HEX, NULL, 0xFF000000, NULL, HFILL }},
12516 {&hf_ieee80211_ff_ht_info,
12517 {"HT Information", "wlan_mgt.fixed.extchansw",
12518 FT_UINT8, BASE_HEX, 0, 0, "HT Information Fixed Field", HFILL }},
12520 {&hf_ieee80211_ff_ht_info_information_request,
12521 {"Information Request", "wlan_mgt.fixed.mimo.control.chanwidth",
12522 FT_BOOLEAN, 8, TFS(&ff_ht_info_information_request_flag), 0x01, NULL, HFILL }},
12524 {&hf_ieee80211_ff_ht_info_40_mhz_intolerant,
12525 {"40 MHz Intolerant", "wlan_mgt.fixed.mimo.control.chanwidth",
12526 FT_BOOLEAN, 8, TFS(&ff_ht_info_40_mhz_intolerant_flag), 0x02, NULL, HFILL }},
12528 {&hf_ieee80211_ff_ht_info_sta_chan_width,
12529 {"Station Channel Width", "wlan_mgt.fixed.mimo.control.chanwidth",
12530 FT_BOOLEAN, 8, TFS(&ff_ht_info_sta_chan_width_flag), 0x04, NULL, HFILL }},
12532 {&hf_ieee80211_ff_ht_info_reserved,
12533 {"Reserved", "wlan_mgt.fixed.extchansw",
12534 FT_UINT8, BASE_HEX, 0, 0xF8, "Reserved Field", HFILL }},
12536 {&hf_ieee80211_ff_ht_action,
12537 {"HT Action", "wlan_mgt.fixed.htact",
12538 FT_UINT8, BASE_HEX, VALS (&ff_ht_action_flags), 0, "HT Action Code", HFILL }},
12540 {&hf_ieee80211_ff_mimo_csi_snr,
12541 {"Signal to Noise Ratio (SNR)", "wlan_mgt.mimo.csimatrices.snr",
12542 FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
12544 {&hf_ieee80211_ff_public_action,
12545 {"Public Action", "wlan_mgt.fixed.publicact",
12546 FT_UINT8, BASE_HEX, VALS(ff_pa_action_codes), 0, "Public Action Code", HFILL }},
12548 {&hf_ieee80211_ff_capture,
12549 {"Capabilities Information", "wlan_mgt.fixed.capabilities", FT_UINT16, BASE_HEX, NULL, 0,
12550 "Capability information", HFILL }},
12552 {&hf_ieee80211_ff_cf_ess,
12553 {"ESS capabilities", "wlan_mgt.fixed.capabilities.ess",
12554 FT_BOOLEAN, 16, TFS (&cf_ess_flags), 0x0001, NULL, HFILL }},
12556 {&hf_ieee80211_ff_cf_ibss,
12557 {"IBSS status", "wlan_mgt.fixed.capabilities.ibss",
12558 FT_BOOLEAN, 16, TFS (&cf_ibss_flags), 0x0002, "IBSS participation", HFILL }},
12560 {&hf_ieee80211_ff_cf_sta_poll,
12561 {"CFP participation capabilities", "wlan_mgt.fixed.capabilities.cfpoll.sta",
12562 FT_UINT16, BASE_HEX, VALS (&sta_cf_pollable), 0x020C,
12563 "CF-Poll capabilities for a STA", HFILL }},
12565 {&hf_ieee80211_ff_cf_ap_poll,
12566 {"CFP participation capabilities", "wlan_mgt.fixed.capabilities.cfpoll.ap",
12567 FT_UINT16, BASE_HEX, VALS (&ap_cf_pollable), 0x020C,
12568 "CF-Poll capabilities for an AP", HFILL }},
12570 {&hf_ieee80211_ff_cf_privacy,
12571 {"Privacy", "wlan_mgt.fixed.capabilities.privacy",
12572 FT_BOOLEAN, 16, TFS (&cf_privacy_flags), 0x0010, "WEP support", HFILL }},
12574 {&hf_ieee80211_ff_cf_preamble,
12575 {"Short Preamble", "wlan_mgt.fixed.capabilities.preamble",
12576 FT_BOOLEAN, 16, TFS (&cf_preamble_flags), 0x0020, NULL, HFILL }},
12578 {&hf_ieee80211_ff_cf_pbcc,
12579 {"PBCC", "wlan_mgt.fixed.capabilities.pbcc",
12580 FT_BOOLEAN, 16, TFS (&cf_pbcc_flags), 0x0040, "PBCC Modulation", HFILL }},
12582 {&hf_ieee80211_ff_cf_agility,
12583 {"Channel Agility", "wlan_mgt.fixed.capabilities.agility",
12584 FT_BOOLEAN, 16, TFS (&cf_agility_flags), 0x0080, NULL, HFILL }},
12586 {&hf_ieee80211_ff_cf_spec_man,
12587 {"Spectrum Management", "wlan_mgt.fixed.capabilities.spec_man",
12588 FT_BOOLEAN, 16, TFS (&cf_spec_man_flags), 0x0100, NULL, HFILL }},
12590 {&hf_ieee80211_ff_short_slot_time,
12591 {"Short Slot Time", "wlan_mgt.fixed.capabilities.short_slot_time",
12592 FT_BOOLEAN, 16, TFS (&short_slot_time_flags), 0x0400, NULL,
12595 {&hf_ieee80211_ff_cf_apsd,
12596 {"Automatic Power Save Delivery", "wlan_mgt.fixed.capabilities.apsd",
12597 FT_BOOLEAN, 16, TFS (&cf_apsd_flags), 0x0800, NULL, HFILL }},
12599 {&hf_ieee80211_ff_dsss_ofdm,
12600 {"DSSS-OFDM", "wlan_mgt.fixed.capabilities.dsss_ofdm",
12601 FT_BOOLEAN, 16, TFS (&dsss_ofdm_flags), 0x2000, "DSSS-OFDM Modulation",
12604 {&hf_ieee80211_ff_cf_del_blk_ack,
12605 {"Delayed Block Ack", "wlan_mgt.fixed.capabilities.del_blk_ack",
12606 FT_BOOLEAN, 16, TFS (&cf_del_blk_ack_flags), 0x4000, NULL, HFILL }},
12608 {&hf_ieee80211_ff_cf_imm_blk_ack,
12609 {"Immediate Block Ack", "wlan_mgt.fixed.capabilities.imm_blk_ack",
12610 FT_BOOLEAN, 16, TFS (&cf_imm_blk_ack_flags), 0x8000, NULL, HFILL }},
12612 {&hf_ieee80211_ff_auth_seq,
12613 {"Authentication SEQ", "wlan_mgt.fixed.auth_seq",
12614 FT_UINT16, BASE_HEX, NULL, 0, "Authentication Sequence Number", HFILL }},
12616 {&hf_ieee80211_ff_assoc_id,
12617 {"Association ID", "wlan_mgt.fixed.aid",
12618 FT_UINT16, BASE_HEX, NULL, 0x3FFF, NULL, HFILL }},
12620 {&hf_ieee80211_ff_listen_ival,
12621 {"Listen Interval", "wlan_mgt.fixed.listen_ival",
12622 FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL }},
12624 {&hf_ieee80211_ff_current_ap,
12625 {"Current AP", "wlan_mgt.fixed.current_ap",
12626 FT_ETHER, BASE_NONE, NULL, 0, "MAC address of current AP", HFILL }},
12628 {&hf_ieee80211_ff_reason,
12629 {"Reason code", "wlan_mgt.fixed.reason_code",
12630 FT_UINT16, BASE_HEX, VALS (&reason_codes), 0,
12631 "Reason for unsolicited notification", HFILL }},
12633 {&hf_ieee80211_ff_status_code,
12634 {"Status code", "wlan_mgt.fixed.status_code",
12635 FT_UINT16, BASE_HEX, VALS (&status_codes), 0,
12636 "Status of requested event", HFILL }},
12638 {&hf_ieee80211_ff_category_code,
12639 {"Category code", "wlan_mgt.fixed.category_code",
12640 FT_UINT16, BASE_DEC, VALS (&category_codes), 0,
12641 "Management action category", HFILL }},
12643 {&hf_ieee80211_ff_action_code,
12644 {"Action code", "wlan_mgt.fixed.action_code",
12645 FT_UINT16, BASE_DEC, VALS (&action_codes), 0,
12646 "Management action code", HFILL }},
12648 {&hf_ieee80211_ff_dialog_token,
12649 {"Dialog token", "wlan_mgt.fixed.dialog_token",
12650 FT_UINT8, BASE_HEX, NULL, 0, "Management action dialog token", HFILL }},
12652 {&hf_ieee80211_ff_marvell_action_type,
12653 {"Marvell Action type", "wlan_mgt.fixed.mrvl_action_type",
12654 FT_UINT8, BASE_DEC, VALS (&vendor_action_types_mrvl), 0,
12655 "Vendor Specific Action Type (Marvell)", HFILL }},
12657 {&hf_ieee80211_ff_marvell_mesh_mgt_action_code,
12658 {"Mesh action(Marvell)", "wlan_mgt.fixed.mrvl_mesh_action",
12659 FT_UINT8, BASE_HEX, VALS (&mesh_mgt_action_codes_mrvl), 0,
12660 "Mesh action code(Marvell)", HFILL }},
12662 {&hf_ieee80211_ff_mesh_mgt_length,
12663 {"Message Length", "wlan_mgt.fixed.length",
12664 FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
12666 {&hf_ieee80211_ff_mesh_mgt_mode,
12667 {"Message Mode", "wlan_mgt.fixed.mode",
12668 FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
12670 {&hf_ieee80211_ff_mesh_mgt_ttl,
12671 {"Message TTL", "wlan_mgt.fixed.ttl",
12672 FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
12674 {&hf_ieee80211_ff_mesh_mgt_dstcount,
12675 {"Destination Count", "wlan_mgt.fixed.dstcount",
12676 FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
12678 {&hf_ieee80211_ff_mesh_mgt_hopcount,
12679 {"Hop Count", "wlan_mgt.fixed.hopcount",
12680 FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
12682 {&hf_ieee80211_ff_mesh_mgt_rreqid,
12683 {"RREQ ID", "wlan_mgt.fixed.rreqid",
12684 FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
12686 {&hf_ieee80211_ff_mesh_mgt_sa,
12687 {"Source Address", "wlan_mgt.fixed.sa",
12688 FT_ETHER, BASE_NONE, NULL, 0, "Source MAC address", HFILL }},
12690 {&hf_ieee80211_ff_mesh_mgt_ssn,
12691 {"SSN", "wlan_mgt.fixed.ssn",
12692 FT_UINT32, BASE_DEC, NULL, 0, "Source Sequence Number", HFILL }},
12694 {&hf_ieee80211_ff_mesh_mgt_metric,
12695 {"Metric", "wlan_mgt.fixed.metric",
12696 FT_UINT32, BASE_DEC, NULL, 0, "Route Metric", HFILL }},
12698 {&hf_ieee80211_ff_mesh_mgt_flags,
12699 {"RREQ Flags", "wlan_mgt.fixed.hopcount",
12700 FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
12702 {&hf_ieee80211_ff_mesh_mgt_da,
12703 {"Destination Address", "wlan_mgt.fixed.da",
12704 FT_ETHER, BASE_NONE, NULL, 0, "Destination MAC address", HFILL }},
12706 {&hf_ieee80211_ff_mesh_mgt_dsn,
12707 {"DSN", "wlan_mgt.fixed.dsn",
12708 FT_UINT32, BASE_DEC, NULL, 0, "Destination Sequence Number", HFILL }},
12710 {&hf_ieee80211_ff_mesh_mgt_lifetime,
12711 {"Lifetime", "wlan_mgt.fixed.lifetime",
12712 FT_UINT32, BASE_DEC, NULL, 0, "Route Lifetime", HFILL }},
12714 {&hf_ieee80211_ff_wme_action_code,
12715 {"Action code", "wlan_mgt.fixed.action_code",
12716 FT_UINT16, BASE_HEX, VALS (&wme_action_codes), 0,
12717 "Management notification action code", HFILL }},
12719 {&hf_ieee80211_ff_wme_status_code,
12720 {"Status code", "wlan_mgt.fixed.status_code",
12721 FT_UINT16, BASE_HEX, VALS (&wme_status_codes), 0,
12722 "Management notification setup response status code", HFILL }},
12724 #ifdef MESH_OVERRIDES
12725 {&hf_ieee80211_ff_mesh_mgt_action_ps_code,
12726 {"Action code", "wlan_mgt.fixed.action_code",
12727 FT_UINT16, BASE_HEX, VALS (&mesh_mgt_action_ps_codes), 0,
12728 "Mesh Management Path Selection action code", HFILL }},
12730 {&hf_ieee80211_ff_mesh_mgt_action_pl_code,
12731 {"Action code", "wlan_mgt.fixed.action_code",
12732 FT_UINT16, BASE_HEX, VALS (&mesh_mgt_action_pl_codes), 0,
12733 "Mesh Management Peer Link action code", HFILL }},
12735 {&hf_ieee80211_mesh_mgt_pl_local_link_id,
12736 {"Local Link ID", "wlan.pl.local_id",
12737 FT_UINT16, BASE_HEX, NULL, 0,
12738 "Mesh Management Local Link ID", HFILL }},
12740 {&hf_ieee80211_mesh_mgt_pl_subtype,
12741 {"Peer Link Subtype", "wlan.pl.subtype",
12742 FT_UINT16, BASE_HEX, VALS (&mesh_mgt_action_pl_codes), 0,
12743 "Mesh Management Peer Link Subtype", HFILL }},
12745 {&hf_ieee80211_mesh_mgt_pl_reason_code,
12746 {"Reason Code", "wlan.pl.reason_code",
12747 FT_UINT16, BASE_HEX, VALS (&mesh_mgt_pl_reason_codes), 0,
12748 "Mesh Management Reason Code", HFILL }},
12750 {&hf_ieee80211_mesh_mgt_pl_peer_link_id,
12751 {"Peer Link ID", "wlan.pl.peer_id",
12752 FT_UINT16, BASE_HEX, NULL, 0,
12753 "Mesh Management Peer Link ID", HFILL }},
12755 {&hf_ieee80211_mesh_config_version,
12756 {"Version", "wlan.mesh.config.version",
12757 FT_UINT16, BASE_HEX, NULL, 0,
12758 "Mesh Configuration Version", HFILL }},
12760 {&hf_ieee80211_mesh_config_path_sel_protocol,
12761 {"Path Selection Protocol", "wlan.mesh.config.ps_protocol",
12762 FT_UINT16, BASE_HEX, NULL, 0,
12763 "Mesh Configuration Path Selection Protocol", HFILL }},
12765 {&hf_ieee80211_mesh_config_path_sel_metric,
12766 {"Path Selection Metric", "wlan.mesh.config.ps_metric",
12767 FT_UINT16, BASE_HEX, NULL, 0,
12768 "Mesh Configuration Path Selection Metric", HFILL }},
12770 {&hf_ieee80211_mesh_config_congestion_control,
12771 {"Congestion Control", "wlan.mesh.config.cong_ctl",
12772 FT_UINT16, BASE_HEX, NULL, 0,
12773 "Mesh Configuration Congestion Control", HFILL }},
12775 {&hf_ieee80211_mesh_config_channel_prec,
12776 {"Channel Precedence", "wlan.mesh.config.chan_prec",
12777 FT_UINT16, BASE_HEX, NULL, 0,
12778 "Mesh Configuration Channel Precedence", HFILL }},
12780 {&hf_ieee80211_mesh_config_capability,
12781 {"Capability", "wlan.mesh.config.cap",
12782 FT_UINT16, BASE_HEX, NULL, 0,
12783 "Mesh Configuration Capability", HFILL }},
12785 {&hf_ieee80211_mesh_id,
12786 {"Mesh ID", "wlan.mesh.id",
12787 FT_STRING, BASE_NONE, NULL, 0,
12790 {&hf_ieee80211_ff_mesh_mgt_dest_flags,
12791 {"Destination Flags", "wlan.preq.dest_flags",
12792 FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
12794 {&hf_ieee80211_ff_mesh_mgt_dest_do_flags,
12795 {"Destination Flags", "wlan.preq.dest_flags.do",
12796 FT_BOOLEAN, 8, TFS (&mesh_dest_do_flags), 0x01,
12797 "Dest Flags", HFILL }},
12799 {&hf_ieee80211_ff_mesh_mgt_dest_rf_flags,
12800 {"Destination Flags", "wlan.preq.dest_flags.rf",
12801 FT_BOOLEAN, 8, TFS (&mesh_dest_rf_flags), 0x02,
12802 "Dest Flags", HFILL }},
12804 {&hf_ieee80211_ff_mesh_mgt_srccount,
12805 {"Source Count", "wlan.mesh.srccount",
12806 FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
12807 #endif /* MESH_OVERRIDES */
12809 {&hf_ieee80211_ff_qos_action_code,
12810 {"Action code", "wlan_mgt.fixed.action_code",
12811 FT_UINT16, BASE_HEX, VALS (&qos_action_codes), 0,
12812 "QoS management action code", HFILL }},
12814 {&hf_ieee80211_ff_ba_action,
12815 {"Action code", "wlan_mgt.fixed.action_code",
12816 FT_UINT8, BASE_HEX, VALS (&ba_action_codes), 0,
12817 "Block Ack action code", HFILL }},
12819 {&hf_ieee80211_ff_dls_action_code,
12820 {"Action code", "wlan_mgt.fixed.action_code",
12821 FT_UINT16, BASE_HEX, VALS (&dls_action_codes), 0,
12822 "DLS management action code", HFILL }},
12824 {&hf_ieee80211_ff_dst_mac_addr,
12825 {"Destination address", "wlan_mgt.fixed.dst_mac_addr",
12826 FT_ETHER, BASE_NONE, NULL, 0, "Destination MAC address", HFILL }},
12828 {&hf_ieee80211_ff_src_mac_addr,
12829 {"Source address", "wlan_mgt.fixed.src_mac_addr",
12830 FT_ETHER, BASE_NONE, NULL, 0, "Source MAC address", HFILL }},
12832 {&hf_ieee80211_ff_ft_action_code,
12833 {"Action code", "wlan_mgt.fixed.action_code",
12834 FT_UINT8, BASE_DEC, VALS(&ft_action_codes), 0,
12835 "Management action code", HFILL }},
12837 {&hf_ieee80211_ff_sta_address,
12838 {"STA Address", "wlan_mgt.fixed.sta_address",
12839 FT_ETHER, BASE_NONE, NULL, 0, NULL, HFILL }},
12841 {&hf_ieee80211_ff_target_ap_address,
12842 {"Target AP Address", "wlan_mgt.fixed.target_ap_address",
12843 FT_ETHER, BASE_NONE, NULL, 0, "Target AP MAC address", HFILL }},
12845 {&hf_ieee80211_ff_gas_comeback_delay,
12846 {"GAS Comeback Delay", "wlan_mgt.fixed.gas_comeback_delay",
12847 FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }},
12849 {&hf_ieee80211_ff_gas_fragment_id,
12850 {"GAS Query Response Fragment ID", "wlan_mgt.fixed.gas_fragment_id",
12851 FT_UINT8, BASE_DEC, NULL, 0x7f, NULL, HFILL
12854 {&hf_ieee80211_ff_more_gas_fragments,
12855 {"More GAS Fragments", "wlan_mgt.fixed.more_gas_fragments",
12856 FT_UINT8, BASE_DEC, NULL, 0x80, NULL, HFILL }},
12858 {&hf_ieee80211_ff_query_request_length,
12859 {"Query Request Length", "wlan_mgt.fixed.query_request_length",
12860 FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }},
12862 {&hf_ieee80211_ff_query_request,
12863 {"Query Request", "wlan_mgt.fixed.query_request",
12864 FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }},
12866 {&hf_ieee80211_ff_query_response_length,
12867 {"Query Response Length", "wlan_mgt.fixed.query_response_length",
12868 FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }},
12870 {&hf_ieee80211_ff_query_response,
12871 {"Query Response", "wlan_mgt.fixed.query_response",
12872 FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }},
12874 {&hf_ieee80211_ff_anqp_info_id,
12875 {"Info ID", "wlan_mgt.fixed.anqp.info_id",
12876 FT_UINT16, BASE_DEC, VALS(&anqp_info_id_vals), 0,
12877 "Access Network Query Protocol Info ID", HFILL }},
12879 {&hf_ieee80211_ff_anqp_info_length,
12880 {"Length", "wlan_mgt.fixed.anqp.info_length",
12881 FT_UINT16, BASE_DEC, NULL, 0, "Access Network Query Protocol Length",
12884 {&hf_ieee80211_ff_anqp_info,
12885 {"Information", "wlan_mgt.fixed.anqp.info",
12886 FT_BYTES, BASE_NONE, NULL, 0,
12887 "Access Network Query Protocol Information", HFILL }},
12889 {&hf_ieee80211_ff_dls_timeout,
12890 {"DLS timeout", "wlan_mgt.fixed.dls_timeout",
12891 FT_UINT16, BASE_HEX, NULL, 0, "DLS timeout value", HFILL }},
12893 {&hf_ieee80211_ff_sa_query_action_code,
12894 {"Action code", "wlan_mgt.fixed.action_code",
12895 FT_UINT8, BASE_DEC, VALS(&sa_query_action_codes), 0,
12896 "Management action code", HFILL }},
12898 {&hf_ieee80211_ff_transaction_id,
12899 {"Transaction Id", "wlan_mgt.fixed.transaction_id",
12900 FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL }},
12902 {&hf_ieee80211_tag,
12903 {"Tag", "wlan_mgt.tag",
12904 FT_NONE, BASE_NONE, 0x0, 0,
12907 {&hf_ieee80211_tag_number,
12908 {"Tag Number", "wlan_mgt.tag.number",
12909 FT_UINT8, BASE_RANGE_STRING | BASE_DEC, RVALS(tag_num_vals), 0,
12910 "Element ID", HFILL }},
12912 {&hf_ieee80211_tag_length,
12913 {"Tag length", "wlan_mgt.tag.length",
12914 FT_UINT32, BASE_DEC, NULL, 0, "Length of tag", HFILL }},
12916 {&hf_ieee80211_tag_interpretation,
12917 {"Tag interpretation", "wlan_mgt.tag.interpretation",
12918 FT_STRING, BASE_NONE, NULL, 0, "Interpretation of tag", HFILL }},
12920 {&hf_ieee80211_tag_oui,
12921 {"OUI", "wlan_mgt.tag.oui",
12922 FT_BYTES, BASE_NONE, NULL, 0, "OUI of vendor specific IE", HFILL }},
12924 {&hf_ieee80211_tag_ds_param_channel,
12925 {"Current Channel", "wlan_mgt.ds.current_channel",
12926 FT_UINT8, BASE_DEC, NULL, 0,
12927 "DS Parameter Set - Current Channel", HFILL }},
12929 {&hf_ieee80211_tag_cfp_count,
12930 {"CFP Count", "wlan_mgt.cfp.count",
12931 FT_UINT8, BASE_DEC, NULL, 0,
12932 "Indicates how many delivery traffic indication messages (DTIMs)", HFILL }},
12934 {&hf_ieee80211_tag_cfp_period,
12935 {"CFP Period", "wlan_mgt.cfp.period",
12936 FT_UINT8, BASE_DEC, NULL, 0,
12937 "Indicates the number of DTIM intervals between the start of CFPs", HFILL }},
12939 {&hf_ieee80211_tag_cfp_max_duration,
12940 {"CFP Max Duration", "wlan_mgt.cfp.max_duration",
12941 FT_UINT16, BASE_DEC, NULL, 0,
12942 "Indicates the maximum duration (in TU) of the CFP that may be generated by this PCF", HFILL }},
12944 {&hf_ieee80211_tag_cfp_dur_remaining,
12945 {"CFP Dur Remaining", "wlan_mgt.cfp.dur_remaining",
12946 FT_UINT16, BASE_DEC, NULL, 0,
12947 "Indicates the maximum time (in TU) remaining in the present CFP", HFILL }},
12949 {&hf_ieee80211_tag_vendor_oui_type,
12950 {"Vendor Specific OUI Type", "wlan_mgt.tag.oui.type",
12951 FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
12953 {&hf_ieee80211_tim_dtim_count,
12954 {"DTIM count", "wlan_mgt.tim.dtim_count",
12955 FT_UINT8, BASE_DEC, NULL, 0,
12956 "Indicates how many Beacon frames (including the current frame) appear before the next DTIM", HFILL }},
12958 {&hf_ieee80211_tim_dtim_period,
12959 {"DTIM period", "wlan_mgt.tim.dtim_period",
12960 FT_UINT8, BASE_DEC, NULL, 0,
12961 "Indicates the number of beacon intervals between successive DTIMs", HFILL }},
12963 {&hf_ieee80211_tim_bmapctl,
12964 {"Bitmap control", "wlan_mgt.tim.bmapctl",
12965 FT_UINT8, BASE_HEX, NULL, 0,
12968 {&hf_ieee80211_tim_bmapctl_mcast,
12969 {"Multicast", "wlan_mgt.tim.bmapctl.multicast",
12970 FT_BOOLEAN, 8, NULL, 0x1,
12971 "Contains the Traffic Indicator bit associated with Association ID 0", HFILL }},
12973 {&hf_ieee80211_tim_bmapctl_offset,
12974 {"Bitmap Offset", "wlan_mgt.tim.bmapctl.offset",
12975 FT_UINT8, BASE_HEX, NULL, 0xFE,
12978 {&hf_ieee80211_tim_partial_virtual_bitmap,
12979 {"Partial Virtual Bitmap", "wlan_mgt.tim.partial_virtual_bitmap",
12980 FT_BYTES, BASE_NONE, NULL, 0x0,
12983 {&hf_ieee80211_tag_ibss_atim_window,
12984 {"Atim Windows", "wlan_mgt.ibss.atim_windows",
12985 FT_UINT16, BASE_HEX, NULL, 0x0,
12986 "Contains the ATIM Window length in TU", HFILL }},
12988 {&hf_ieee80211_tag_country_info_code,
12989 {"Code", "wlan_mgt.country_info.code",
12990 FT_STRING, BASE_NONE, NULL, 0x0,
12993 {&hf_ieee80211_tag_country_info_env,
12994 {"Environment", "wlan_mgt.country_info.environment",
12995 FT_UINT8, BASE_HEX, VALS(environment_vals), 0x0,
12998 {&hf_ieee80211_tag_country_info_fnm,
12999 {"Country Info", "wlan_mgt.country_info.fnm",
13000 FT_NONE, BASE_NONE, NULL, 0x0,
13003 {&hf_ieee80211_tag_country_info_fnm_fcn,
13004 {"First Channel Number", "wlan_mgt.country_info.fnm.fcn",
13005 FT_UINT8, BASE_DEC, NULL, 0x0,
13008 {&hf_ieee80211_tag_country_info_fnm_nc,
13009 {"Number of Channels", "wlan_mgt.country_info.fnm.nc",
13010 FT_UINT8, BASE_DEC, NULL, 0x0,
13013 {&hf_ieee80211_tag_country_info_fnm_mtpl,
13014 {"Maximum Transmit Power Level (in dBm)", "wlan_mgt.country_info.fnm.mtpl",
13015 FT_UINT8, BASE_DEC, NULL, 0x0,
13018 {&hf_ieee80211_tag_country_info_rrc,
13019 {"Country Info", "wlan_mgt.country_info.rrc",
13020 FT_NONE, BASE_NONE, NULL, 0x0,
13023 {&hf_ieee80211_tag_country_info_rrc_rei,
13024 {"Regulatory Extension Identifier", "wlan_mgt.country_info.rrc.rei",
13025 FT_UINT8, BASE_DEC, NULL, 0x0,
13028 {&hf_ieee80211_tag_country_info_rrc_rc,
13029 {"Regulatory Class", "wlan_mgt.country_info.rrc.rc",
13030 FT_UINT8, BASE_DEC, NULL, 0x0,
13033 {&hf_ieee80211_tag_country_info_rrc_cc,
13034 {"Coverage Class", "wlan_mgt.country_info.rrc.cc",
13035 FT_UINT8, BASE_DEC, NULL, 0x0,
13038 {&hf_ieee80211_tag_fh_hopping_parameter_prime_radix,
13039 {"Prime Radix", "wlan_mgt.fh_hopping.parameter.prime_radix",
13040 FT_UINT8, BASE_DEC, NULL, 0x0,
13043 {&hf_ieee80211_tag_fh_hopping_parameter_nb_channels,
13044 {"Number of Channels", "wlan_mgt.fh_hopping.parameter.nb_channels",
13045 FT_UINT8, BASE_DEC, NULL, 0x0,
13048 {&hf_ieee80211_tag_fh_hopping_table_flag,
13049 {"Flag", "wlan_mgt.fh_hopping.table.flag",
13050 FT_UINT8, BASE_HEX, NULL, 0x0,
13051 "Indicates that a Random Table is present when the value is 1", HFILL }},
13053 {&hf_ieee80211_tag_fh_hopping_table_number_of_sets,
13054 {"Number of Sets", "wlan_mgt.fh_hopping.table.number_of_sets",
13055 FT_UINT8, BASE_DEC, NULL, 0x0,
13056 "Indicates the total number of sets within the hopping patterns", HFILL }},
13058 {&hf_ieee80211_tag_fh_hopping_table_modulus,
13059 {"Modulus", "wlan_mgt.fh_hopping.table.modulus",
13060 FT_UINT8, BASE_HEX, NULL, 0x0,
13061 "Indicate the values to be used in the equations to create a hopping sequence from the Random Table information", HFILL }},
13063 {&hf_ieee80211_tag_fh_hopping_table_offset,
13064 {"Offset", "wlan_mgt.fh_hopping.table.offset",
13065 FT_UINT8, BASE_HEX, NULL, 0x0,
13066 "Indicate the values to be used in the equations to create a hopping sequence from the Random Table information", HFILL }},
13068 {&hf_ieee80211_tag_fh_hopping_random_table,
13069 {"Random Table", "wlan_mgt.fh_hopping.table.random_table",
13070 FT_UINT16, BASE_HEX, NULL, 0x0,
13071 "It is a vector of single octet values that indicate the random sequence to be followed during a hopping sequence", HFILL }},
13073 {&hf_ieee80211_tag_request,
13074 {"Requested Element ID", "wlan_mgt.tag.request",
13075 FT_UINT8, BASE_RANGE_STRING | BASE_DEC, RVALS(tag_num_vals), 0,
13076 "The list of elements that are to be included in the responding STA Probe Response frame", HFILL }},
13078 {&hf_ieee80211_tclas_up,
13079 {"User Priority", "wlan_mgt.tclas.user_priority",
13080 FT_UINT8, BASE_DEC, NULL, 0,
13081 "Contains the value of the UP of the associated MSDUs", HFILL }},
13083 {&hf_ieee80211_tclas_class_type,
13084 {"Classifier Type", "wlan_mgt.tclas.class_type",
13085 FT_UINT8, BASE_DEC, VALS (classifier_type), 0,
13086 "Specifies the type of classifier parameters", HFILL }},
13088 {&hf_ieee80211_tclas_class_mask,
13089 {"Classifier Mask", "wlan_mgt.tclas.class_mask",
13090 FT_UINT8, BASE_HEX, NULL, 0,
13091 "Specifies a bitmap where bits that are set to 1 identify a subset of the classifier parameters", HFILL }},
13093 {&hf_ieee80211_tclas_src_mac_addr,
13094 {"Source address", "wlan_mgt.tclas.type",
13095 FT_ETHER, BASE_NONE, NULL, 0,
13096 "Classifier Parameters Ethernet Type", HFILL }},
13098 {&hf_ieee80211_tclas_dst_mac_addr,
13099 {"Destination address", "wlan_mgt.tclas.type",
13100 FT_ETHER, BASE_NONE, NULL, 0,
13103 {&hf_ieee80211_tclas_ether_type,
13104 {"Ethernet Type", "wlan_mgt.tclas.type",
13105 FT_UINT8, BASE_DEC, NULL, 0,
13108 {&hf_ieee80211_tclas_version,
13109 {"IP Version", "wlan_mgt.tclas.version",
13110 FT_UINT8, BASE_DEC, NULL, 0,
13113 {&hf_ieee80211_tclas_ipv4_src,
13114 {"IPv4 Src Addr", "wlan_mgt.tclas.ipv4_src",
13115 FT_IPv4, BASE_NONE, NULL, 0,
13118 {&hf_ieee80211_tclas_ipv4_dst,
13119 {"IPv4 Dst Addr", "wlan_mgt.tclas.ipv4_dst",
13120 FT_IPv4, BASE_NONE, NULL, 0,
13123 {&hf_ieee80211_tclas_src_port,
13124 {"Source Port", "wlan_mgt.tclas.src_port",
13125 FT_UINT16, BASE_DEC, NULL, 0,
13128 {&hf_ieee80211_tclas_dst_port,
13129 {"Destination Port", "wlan_mgt.tclas.dst_port",
13130 FT_UINT16, BASE_DEC, NULL, 0,
13133 {&hf_ieee80211_tclas_dscp,
13134 {"IPv4 DSCP", "wlan_mgt.tclas.dscp",
13135 FT_UINT8, BASE_HEX, NULL, 0,
13136 "IPv4 Differentiated Services Code Point (DSCP) Field", HFILL }},
13138 {&hf_ieee80211_tclas_protocol,
13139 {"Protocol", "wlan_mgt.tclas.protocol",
13140 FT_UINT8, BASE_HEX, NULL, 0, "IPv4 Protocol", HFILL }},
13142 {&hf_ieee80211_tclas_ipv6_src,
13143 {"IPv6 Src Addr", "wlan_mgt.tclas.ipv6_src",
13144 FT_IPv6, BASE_NONE,
13145 NULL, 0, NULL, HFILL }},
13147 {&hf_ieee80211_tclas_ipv6_dst,
13148 {"IPv6 Dst Addr", "wlan_mgt.tclas.ipv6_dst",
13149 FT_IPv6, BASE_NONE, NULL, 0,
13152 {&hf_ieee80211_tclas_flow,
13153 {"Flow Label", "wlan_mgt.tclas.flow",
13154 FT_UINT24, BASE_HEX, NULL, 0,
13155 "IPv6 Flow Label", HFILL }},
13157 {&hf_ieee80211_tclas_tag_type,
13158 {"802.1Q Tag Type", "wlan_mgt.tclas.tag_type",
13159 FT_UINT16, BASE_HEX, NULL, 0,
13162 {&hf_ieee80211_tag_challenge_text,
13163 {"Challenge Text", "wlan_mgt.tag.challenge_text",
13164 FT_BYTES, BASE_NONE, NULL, 0,
13167 {&hf_ieee80211_rsn_version,
13168 {"RSN Version", "wlan_mgt.rsn.version", FT_UINT16, BASE_DEC,
13169 NULL, 0, "Indicates the version number of the RSNA protocol", HFILL }},
13171 {&hf_ieee80211_rsn_gcs,
13172 {"Group Cipher Suite", "wlan_mgt.rsn.gcs", FT_UINT32, BASE_CUSTOM,
13173 rsn_gcs_base_custom, 0, "Contains the cipher suite selector used by the BSS to protect broadcast/multicast traffic", HFILL }},
13175 {&hf_ieee80211_rsn_gcs_oui,
13176 {"Group Cipher Suite OUI", "wlan_mgt.rsn.gcs.oui", FT_UINT24, BASE_CUSTOM,
13177 oui_base_custom, 0, NULL, HFILL }},
13179 {&hf_ieee80211_rsn_gcs_type,
13180 {"Group Cipher Suite type", "wlan_mgt.rsn.gcs.type", FT_UINT8, BASE_DEC,
13181 NULL, 0, NULL, HFILL }},
13183 {&hf_ieee80211_rsn_gcs_80211_type,
13184 {"Group Cipher Suite type", "wlan_mgt.rsn.gcs.type", FT_UINT8, BASE_DEC,
13185 VALS(ieee80211_rsn_cipher_vals), 0, NULL, HFILL }},
13187 {&hf_ieee80211_rsn_pcs_count,
13188 {"Pairwise Cipher Suite Count", "wlan_mgt.rsn.pcs.count", FT_UINT16, BASE_DEC,
13189 NULL, 0, "Indicates the number of pairwise cipher suite selectors that are contained in the Pairwise Cipher Suite List", HFILL }},
13191 {&hf_ieee80211_rsn_pcs_list,
13192 {"Pairwise Cipher Suite List", "wlan_mgt.rsn.pcs.list", FT_NONE, BASE_NONE,
13193 NULL, 0, "Contains a series of cipher suite selectors that indicate the pairwisecipher suites", HFILL }},
13195 {&hf_ieee80211_rsn_pcs,
13196 {"Pairwise Cipher Suite", "wlan_mgt.rsn.pcs", FT_UINT32, BASE_CUSTOM,
13197 rsn_pcs_base_custom, 0, NULL, HFILL }},
13199 {&hf_ieee80211_rsn_pcs_oui,
13200 {"Pairwise Cipher Suite OUI", "wlan_mgt.rsn.pcs.oui", FT_UINT24, BASE_CUSTOM,
13201 oui_base_custom, 0, NULL, HFILL }},
13203 {&hf_ieee80211_rsn_pcs_type,
13204 {"Pairwise Cipher Suite type", "wlan_mgt.rsn.pcs.type", FT_UINT8, BASE_DEC,
13205 NULL, 0, NULL, HFILL }},
13207 {&hf_ieee80211_rsn_pcs_80211_type,
13208 {"Pairwise Cipher Suite type", "wlan_mgt.rsn.pcs.type", FT_UINT8, BASE_DEC,
13209 VALS(ieee80211_rsn_cipher_vals), 0, NULL, HFILL }},
13211 {&hf_ieee80211_rsn_akms_count,
13212 {"Auth Key Management (AKM) Suite Count", "wlan_mgt.rsn.akms.count", FT_UINT16, BASE_DEC,
13213 NULL, 0, "Indicates the number of Auth Key Management suite selectors that are contained in the Auth Key Management Suite List", HFILL }},
13215 {&hf_ieee80211_rsn_akms_list,
13216 {"Auth Key Management (AKM) List", "wlan_mgt.rsn.akms.list", FT_NONE, BASE_NONE,
13217 NULL, 0, "Contains a series of cipher suite selectors that indicate the AKM suites", HFILL }},
13219 {&hf_ieee80211_rsn_akms,
13220 {"Auth Key Management (AKM) Suite", "wlan_mgt.rsn.akms", FT_UINT32, BASE_CUSTOM,
13221 rsn_akms_base_custom, 0, NULL, HFILL }},
13223 {&hf_ieee80211_rsn_akms_oui,
13224 {"Auth Key Management (AKM) OUI", "wlan_mgt.rsn.akms.oui", FT_UINT24, BASE_CUSTOM,
13225 oui_base_custom, 0, NULL, HFILL }},
13227 {&hf_ieee80211_rsn_akms_type,
13228 {"Auth Key Management (AKM) type", "wlan_mgt.rsn.akms.type", FT_UINT8, BASE_DEC,
13229 NULL, 0, NULL, HFILL }},
13231 {&hf_ieee80211_rsn_akms_80211_type,
13232 {"Auth Key Management (AKM) type", "wlan_mgt.rsn.akms.type", FT_UINT8, BASE_DEC,
13233 VALS(ieee80211_rsn_keymgmt_vals), 0, NULL, HFILL }},
13235 {&hf_ieee80211_rsn_cap,
13236 {"RSN Capabilities", "wlan_mgt.rsn.capabilities", FT_UINT16, BASE_HEX,
13237 NULL, 0, "RSN Capability information", HFILL }},
13239 {&hf_ieee80211_rsn_cap_preauth,
13240 {"RSN Pre-Auth capabilities", "wlan_mgt.rsn.capabilities.preauth",
13241 FT_BOOLEAN, 16, TFS(&rsn_preauth_flags), 0x0001,
13244 {&hf_ieee80211_rsn_cap_no_pairwise,
13245 {"RSN No Pairwise capabilities", "wlan_mgt.rsn.capabilities.no_pairwise",
13246 FT_BOOLEAN, 16, TFS(&rsn_no_pairwise_flags), 0x0002,
13249 {&hf_ieee80211_rsn_cap_ptksa_replay_counter,
13250 {"RSN PTKSA Replay Counter capabilities",
13251 "wlan_mgt.rsn.capabilities.ptksa_replay_counter",
13252 FT_UINT16, BASE_HEX, VALS(&rsn_cap_replay_counter), 0x000C,
13255 {&hf_ieee80211_rsn_cap_gtksa_replay_counter,
13256 {"RSN GTKSA Replay Counter capabilities",
13257 "wlan_mgt.rsn.capabilities.gtksa_replay_counter",
13258 FT_UINT16, BASE_HEX, VALS(&rsn_cap_replay_counter), 0x0030,
13261 {&hf_ieee80211_rsn_cap_mfpr,
13262 {"Management Frame Protection Required",
13263 "wlan_mgt.rsn.capabilities.mfpr",
13264 FT_BOOLEAN, 16, NULL, 0x0040, NULL, HFILL }},
13266 {&hf_ieee80211_rsn_cap_mfpc,
13267 {"Management Frame Protection Capable",
13268 "wlan_mgt.rsn.capabilities.mfpc",
13269 FT_BOOLEAN, 16, NULL, 0x0080, NULL, HFILL }},
13271 {&hf_ieee80211_rsn_cap_peerkey,
13272 {"PeerKey Enabled",
13273 "wlan_mgt.rsn.capabilities.peerkey",
13274 FT_BOOLEAN, 16, NULL, 0x0200, NULL, HFILL }},
13276 {&hf_ieee80211_rsn_pmkid_count,
13277 {"PMKID Count", "wlan_mgt.rsn.pmkid.count", FT_UINT16, BASE_DEC,
13278 NULL, 0, "Indicates the number of PMKID selectors that are contained in the PMKID Suite List", HFILL }},
13280 {&hf_ieee80211_rsn_pmkid_list,
13281 {"PMKID List", "wlan_mgt.rsn.pmkid.list", FT_NONE, BASE_NONE,
13282 NULL, 0, "Contains a series of cipher suite selectors that indicate the AKM suites", HFILL }},
13284 {&hf_ieee80211_rsn_pmkid,
13285 {"PMKID", "wlan_mgt.pmkid.akms", FT_BYTES, BASE_NONE,
13286 NULL, 0, NULL, HFILL }},
13288 {&hf_ieee80211_rsn_gmcs,
13289 {"Group Managemement Cipher Suite", "wlan_mgt.rsn.gmcs", FT_UINT32, BASE_CUSTOM,
13290 rsn_gmcs_base_custom, 0, "Contains the cipher suite selector used by the BSS to protect broadcast/multicast traffic", HFILL }},
13292 {&hf_ieee80211_rsn_gmcs_oui,
13293 {"Group Managemement Cipher Suite OUI", "wlan_mgt.rsn.gmcs.oui", FT_UINT24, BASE_CUSTOM,
13294 oui_base_custom, 0, NULL, HFILL }},
13296 {&hf_ieee80211_rsn_gmcs_type,
13297 {"Group Managemement Cipher Suite type", "wlan_mgt.rsn.gmcs.type", FT_UINT8, BASE_DEC,
13298 NULL, 0, NULL, HFILL }},
13300 {&hf_ieee80211_rsn_gmcs_80211_type,
13301 {"Group Managemement Cipher Suite type", "wlan_mgt.rsn.gmcs.type", FT_UINT8, BASE_DEC,
13302 VALS(ieee80211_rsn_cipher_vals), 0, NULL, HFILL }},
13305 {&hf_ieee80211_ht_cap,
13306 {"HT Capabilities Info", "wlan_mgt.ht.capabilities", FT_UINT16, BASE_HEX,
13307 NULL, 0, "HT Capability information", HFILL }},
13309 {&hf_ieee80211_ht_vs_cap,
13310 {"HT Capabilities Info (VS)", "wlan_mgt.vs.ht.capabilities", FT_UINT16, BASE_HEX,
13311 NULL, 0, "Vendor Specific HT Capability information", HFILL }},
13313 {&hf_ieee80211_ht_ldpc_coding,
13314 {"HT LDPC coding capability", "wlan_mgt.ht.capabilities.ldpccoding",
13315 FT_BOOLEAN, 16, TFS (&ht_ldpc_coding_flag), 0x0001,
13318 {&hf_ieee80211_ht_chan_width,
13319 {"HT Support channel width", "wlan_mgt.ht.capabilities.width",
13320 FT_BOOLEAN, 16, TFS (&ht_chan_width_flag), 0x0002,
13323 {&hf_ieee80211_ht_sm_pwsave,
13324 {"HT SM Power Save", "wlan_mgt.ht.capabilities.sm",
13325 FT_UINT16, BASE_HEX, VALS (&ht_sm_pwsave_flag), 0x000c,
13328 {&hf_ieee80211_ht_green,
13329 {"HT Green Field", "wlan_mgt.ht.capabilities.green",
13330 FT_BOOLEAN, 16, TFS (&ht_green_flag), 0x0010,
13333 {&hf_ieee80211_ht_short20,
13334 {"HT Short GI for 20MHz", "wlan_mgt.ht.capabilities.short20",
13335 FT_BOOLEAN, 16, TFS (&tfs_supported_not_supported), 0x0020,
13338 {&hf_ieee80211_ht_short40,
13339 {"HT Short GI for 40MHz", "wlan_mgt.ht.capabilities.short40",
13340 FT_BOOLEAN, 16, TFS (&tfs_supported_not_supported), 0x0040,
13343 {&hf_ieee80211_ht_tx_stbc,
13344 {"HT Tx STBC", "wlan_mgt.ht.capabilities.txstbc",
13345 FT_BOOLEAN, 16, TFS (&tfs_supported_not_supported), 0x0080,
13348 {&hf_ieee80211_ht_rx_stbc,
13349 {"HT Rx STBC", "wlan_mgt.ht.capabilities.rxstbc",
13350 FT_UINT16, BASE_HEX, VALS (&ht_rx_stbc_flag), 0x0300,
13351 "HT Tx STBC", HFILL }},
13353 {&hf_ieee80211_ht_delayed_block_ack,
13354 {"HT Delayed Block ACK", "wlan_mgt.ht.capabilities.delayedblockack",
13355 FT_BOOLEAN, 16, TFS (&ht_delayed_block_ack_flag), 0x0400,
13358 {&hf_ieee80211_ht_max_amsdu,
13359 {"HT Max A-MSDU length", "wlan_mgt.ht.capabilities.amsdu",
13360 FT_BOOLEAN, 16, TFS (&ht_max_amsdu_flag), 0x0800,
13363 {&hf_ieee80211_ht_dss_cck_40,
13364 {"HT DSSS/CCK mode in 40MHz", "wlan_mgt.ht.capabilities.dsscck",
13365 FT_BOOLEAN, 16, TFS (&ht_dss_cck_40_flag), 0x1000,
13366 "HT DSS/CCK mode in 40MHz", HFILL }},
13368 {&hf_ieee80211_ht_psmp,
13369 {"HT PSMP Support", "wlan_mgt.ht.capabilities.psmp",
13370 FT_BOOLEAN, 16, TFS (&ht_psmp_flag), 0x2000,
13373 {&hf_ieee80211_ht_40_mhz_intolerant,
13374 {"HT Forty MHz Intolerant", "wlan_mgt.ht.capabilities.40mhzintolerant",
13375 FT_BOOLEAN, 16, TFS (&ht_40_mhz_intolerant_flag), 0x4000,
13378 {&hf_ieee80211_ht_l_sig,
13379 {"HT L-SIG TXOP Protection support", "wlan_mgt.ht.capabilities.lsig",
13380 FT_BOOLEAN, 16, TFS (&tfs_supported_not_supported), 0x8000,
13383 {&hf_ieee80211_ampduparam,
13384 {"A-MPDU Parameters", "wlan_mgt.ht.ampduparam", FT_UINT16, BASE_HEX,
13385 NULL, 0, NULL, HFILL }},
13387 {&hf_ieee80211_ampduparam_vs,
13388 {"A-MPDU Parameters (VS)", "wlan_mgt.vs.ht.ampduparam", FT_UINT16, BASE_HEX,
13389 NULL, 0, "Vendor Specific A-MPDU Parameters", HFILL }},
13391 {&hf_ieee80211_ampduparam_mpdu,
13392 {"Maximum Rx A-MPDU Length", "wlan_mgt.ht.ampduparam.maxlength",
13393 FT_UINT8, BASE_HEX, 0 , 0x03,
13396 {&hf_ieee80211_ampduparam_mpdu_start_spacing,
13397 {"MPDU Density", "wlan_mgt.ht.ampduparam.mpdudensity",
13398 FT_UINT8, BASE_HEX, VALS (&duparam_mpdu_start_spacing_flags) , 0x1c,
13401 {&hf_ieee80211_ampduparam_reserved,
13402 {"Reserved", "wlan_mgt.ht.ampduparam.reserved",
13403 FT_UINT8, BASE_HEX, NULL, 0xE0,
13406 {&hf_ieee80211_mcsset,
13407 {"Rx Supported Modulation and Coding Scheme Set", "wlan_mgt.ht.mcsset",
13408 FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL }},
13410 {&hf_ieee80211_mcsset_vs,
13411 {"Rx Supported Modulation and Coding Scheme Set (VS)", "wlan_mgt.vs.ht.mcsset",
13412 FT_STRING, BASE_NONE, NULL, 0, "Vendor Specific Rx Supported Modulation and Coding Scheme Set", HFILL }},
13414 {&hf_ieee80211_mcsset_rx_bitmask_0to7,
13415 {"Rx Bitmask Bits 0-7", "wlan_mgt.ht.mcsset.rxbitmask.0to7",
13416 FT_UINT32, BASE_HEX, 0, 0x000000ff, NULL, HFILL }},
13418 {&hf_ieee80211_mcsset_rx_bitmask_8to15,
13419 {"Rx Bitmask Bits 8-15", "wlan_mgt.ht.mcsset.rxbitmask.8to15",
13420 FT_UINT32, BASE_HEX, 0, 0x0000ff00, NULL, HFILL }},
13422 {&hf_ieee80211_mcsset_rx_bitmask_16to23,
13423 {"Rx Bitmask Bits 16-23", "wlan_mgt.ht.mcsset.rxbitmask.16to23",
13424 FT_UINT32, BASE_HEX, 0, 0x00ff0000, NULL, HFILL }},
13426 {&hf_ieee80211_mcsset_rx_bitmask_24to31,
13427 {"Rx Bitmask Bits 24-31", "wlan_mgt.ht.mcsset.rxbitmask.24to31",
13428 FT_UINT32, BASE_HEX, 0, 0xff000000, NULL, HFILL }},
13430 {&hf_ieee80211_mcsset_rx_bitmask_32,
13431 {"Rx Bitmask Bit 32", "wlan_mgt.ht.mcsset.rxbitmask.32",
13432 FT_UINT32, BASE_HEX, 0, 0x000001, NULL, HFILL }},
13434 {&hf_ieee80211_mcsset_rx_bitmask_33to38,
13435 {"Rx Bitmask Bits 33-38", "wlan_mgt.ht.mcsset.rxbitmask.33to38",
13436 FT_UINT32, BASE_HEX, 0, 0x00007e, NULL, HFILL }},
13438 {&hf_ieee80211_mcsset_rx_bitmask_39to52,
13439 {"Rx Bitmask Bits 39-52", "wlan_mgt.ht.mcsset.rxbitmask.39to52",
13440 FT_UINT32, BASE_HEX, 0, 0x1fff80, NULL, HFILL }},
13442 {&hf_ieee80211_mcsset_rx_bitmask_53to76,
13443 {"Rx Bitmask Bits 53-76", "wlan_mgt.ht.mcsset.rxbitmask.53to76",
13444 FT_UINT32, BASE_HEX, 0, 0x1fffffe0, NULL, HFILL }},
13446 {&hf_ieee80211_mcsset_highest_data_rate,
13447 {"Highest Supported Data Rate", "wlan_mgt.ht.mcsset.highestdatarate",
13448 FT_UINT16, BASE_HEX, 0, 0x03ff, NULL, HFILL }},
13450 {&hf_ieee80211_mcsset_tx_mcs_set_defined,
13451 {"Tx Supported MCS Set", "wlan_mgt.ht.mcsset.txsetdefined",
13452 FT_BOOLEAN, 16, TFS (&mcsset_tx_mcs_set_defined_flag), 0x0001,
13455 {&hf_ieee80211_mcsset_tx_rx_mcs_set_not_equal,
13456 {"Tx and Rx MCS Set", "wlan_mgt.ht.mcsset.txrxmcsnotequal",
13457 FT_BOOLEAN, 16, TFS (&mcsset_tx_rx_mcs_set_not_equal_flag), 0x0002,
13460 {&hf_ieee80211_mcsset_tx_max_spatial_streams,
13461 {"Tx Maximum Number of Spatial Streams Supported", "wlan_mgt.ht.mcsset.txmaxss",
13462 FT_UINT16, BASE_HEX, VALS (&mcsset_tx_max_spatial_streams_flags) , 0x000c,
13465 {&hf_ieee80211_mcsset_tx_unequal_modulation,
13466 {"Unequal Modulation", "wlan_mgt.ht.mcsset.txunequalmod",
13467 FT_BOOLEAN, 16, TFS (&tfs_supported_not_supported), 0x0010,
13470 {&hf_ieee80211_htex_cap,
13471 {"HT Extended Capabilities", "wlan_mgt.htex.capabilities", FT_UINT16, BASE_HEX,
13472 NULL, 0, "HT Extended Capability information", HFILL }},
13474 {&hf_ieee80211_htex_vs_cap,
13475 {"HT Extended Capabilities (VS)", "wlan_mgt.vs.htex.capabilities", FT_UINT16, BASE_HEX,
13476 NULL, 0, "Vendor Specific HT Extended Capability information", HFILL }},
13478 {&hf_ieee80211_htex_pco,
13479 {"Transmitter supports PCO", "wlan_mgt.htex.capabilities.pco",
13480 FT_BOOLEAN, 16, TFS (&tfs_supported_not_supported), 0x0001,
13483 {&hf_ieee80211_htex_transtime,
13484 {"Time needed to transition between 20MHz and 40MHz", "wlan_mgt.htex.capabilities.transtime",
13485 FT_UINT16, BASE_HEX, VALS (&htex_transtime_flags), 0x0006,
13488 {&hf_ieee80211_htex_mcs,
13489 {"MCS Feedback capability", "wlan_mgt.htex.capabilities.mcs",
13490 FT_UINT16, BASE_HEX, VALS (&htex_mcs_flags), 0x0300,
13493 {&hf_ieee80211_htex_htc_support,
13494 {"High Throughput", "wlan_mgt.htex.capabilities.htc",
13495 FT_BOOLEAN, 16, TFS (&tfs_supported_not_supported), 0x0400,
13498 {&hf_ieee80211_htex_rd_responder,
13499 {"Reverse Direction Responder", "wlan_mgt.htex.capabilities.rdresponder",
13500 FT_BOOLEAN, 16, TFS (&tfs_supported_not_supported), 0x0800,
13503 {&hf_ieee80211_txbf,
13504 {"Transmit Beam Forming (TxBF) Capabilities", "wlan_mgt.txbf", FT_UINT16, BASE_HEX,
13505 NULL, 0, NULL, HFILL }},
13507 {&hf_ieee80211_txbf_vs,
13508 {"Transmit Beam Forming (TxBF) Capabilities (VS)", "wlan_mgt.vs.txbf", FT_UINT16, BASE_HEX,
13509 NULL, 0, "Vendor Specific Transmit Beam Forming (TxBF) Capabilities", HFILL }},
13511 {&hf_ieee80211_txbf_cap,
13512 {"Transmit Beamforming", "wlan_mgt.txbf.txbf",
13513 FT_BOOLEAN, 32, TFS (&tfs_supported_not_supported), 0x00000001,
13516 {&hf_ieee80211_txbf_rcv_ssc,
13517 {"Receive Staggered Sounding", "wlan_mgt.txbf.rxss",
13518 FT_BOOLEAN, 32, TFS (&tfs_supported_not_supported), 0x00000002,
13521 {&hf_ieee80211_txbf_tx_ssc,
13522 {"Transmit Staggered Sounding", "wlan_mgt.txbf.txss",
13523 FT_BOOLEAN, 32, TFS (&tfs_supported_not_supported), 0x00000004,
13526 {&hf_ieee80211_txbf_rcv_ndp,
13527 {"Receive Null Data packet (NDP)", "wlan_mgt.txbf.rxndp",
13528 FT_BOOLEAN, 32, TFS (&tfs_supported_not_supported), 0x00000008,
13531 {&hf_ieee80211_txbf_tx_ndp,
13532 {"Transmit Null Data packet (NDP)", "wlan_mgt.txbf.txndp",
13533 FT_BOOLEAN, 32, TFS (&tfs_supported_not_supported), 0x00000010,
13536 {&hf_ieee80211_txbf_impl_txbf,
13537 {"Implicit TxBF capable", "wlan_mgt.txbf.impltxbf",
13538 FT_BOOLEAN, 32, TFS (&tfs_supported_not_supported), 0x00000020,
13539 "Implicit Transmit Beamforming (TxBF) capable", HFILL }},
13541 {&hf_ieee80211_txbf_calib,
13542 {"Calibration", "wlan_mgt.txbf.calibration",
13543 FT_UINT32, BASE_HEX, VALS (&txbf_calib_flag), 0x000000c0,
13546 {&hf_ieee80211_txbf_expl_csi,
13547 {"STA can apply TxBF using CSI explicit feedback", "wlan_mgt.txbf.csi",
13548 FT_BOOLEAN, 32, TFS (&tfs_supported_not_supported), 0x00000100,
13549 "Station can apply TxBF using CSI explicit feedback", HFILL }},
13551 {&hf_ieee80211_txbf_expl_uncomp_fm,
13552 {"STA can apply TxBF using uncompressed beamforming feedback matrix", "wlan_mgt.txbf.fm.uncompressed.tbf",
13553 FT_BOOLEAN, 32, TFS (&tfs_supported_not_supported), 0x00000200,
13554 "Station can apply TxBF using uncompressed beamforming feedback matrix", HFILL }},
13556 {&hf_ieee80211_txbf_expl_comp_fm,
13557 {"STA can apply TxBF using compressed beamforming feedback matrix", "wlan_mgt.txbf.fm.compressed.tbf",
13558 FT_BOOLEAN, 32, TFS (&tfs_supported_not_supported), 0x00000400,
13559 "Station can apply TxBF using compressed beamforming feedback matrix", HFILL }},
13561 {&hf_ieee80211_txbf_expl_bf_csi,
13562 {"Receiver can return explicit CSI feedback", "wlan_mgt.txbf.rcsi",
13563 FT_UINT32, BASE_HEX, VALS (&txbf_feedback_flags), 0x00001800,
13566 {&hf_ieee80211_txbf_expl_uncomp_fm_feed,
13567 {"Receiver can return explicit uncompressed Beamforming Feedback Matrix", "wlan_mgt.txbf.fm.uncompressed.rbf",
13568 FT_UINT32, BASE_HEX, VALS (&txbf_feedback_flags), 0x00006000,
13571 {&hf_ieee80211_txbf_expl_comp_fm_feed,
13572 {"STA can compress and use compressed Beamforming Feedback Matrix", "wlan_mgt.txbf.fm.compressed.bf",
13573 FT_UINT32, BASE_HEX, VALS (&txbf_feedback_flags), 0x00018000,
13574 "Station can compress and use compressed Beamforming Feedback Matrix", HFILL }},
13576 {&hf_ieee80211_txbf_min_group,
13577 {"Minimal grouping used for explicit feedback reports", "wlan_mgt.txbf.mingroup",
13578 FT_UINT32, BASE_HEX, VALS (&txbf_min_group_flags), 0x00060000,
13581 {&hf_ieee80211_txbf_csi_num_bf_ant,
13582 {"Max antennae STA can support when CSI feedback required", "wlan_mgt.txbf.csinumant",
13583 FT_UINT32, BASE_HEX, VALS (&txbf_antenna_flags), 0x00180000,
13584 "Max antennae station can support when CSI feedback required", HFILL }},
13586 {&hf_ieee80211_txbf_uncomp_sm_bf_ant,
13587 {"Max antennae STA can support when uncompressed Beamforming feedback required", "wlan_mgt.txbf.fm.uncompressed.maxant",
13588 FT_UINT32, BASE_HEX, VALS (&txbf_antenna_flags), 0x00600000,
13589 "Max antennae station can support when uncompressed Beamforming feedback required", HFILL }},
13591 {&hf_ieee80211_txbf_comp_sm_bf_ant,
13592 {"Max antennae STA can support when compressed Beamforming feedback required", "wlan_mgt.txbf.fm.compressed.maxant",
13593 FT_UINT32, BASE_HEX, VALS (&txbf_antenna_flags), 0x01800000,
13594 "Max antennae station can support when compressed Beamforming feedback required", HFILL }},
13596 {&hf_ieee80211_txbf_csi_max_rows_bf,
13597 {"Maximum number of rows of CSI explicit feedback", "wlan_mgt.txbf.csi.maxrows",
13598 FT_UINT32, BASE_HEX, VALS (&txbf_csi_max_rows_bf_flags), 0x06000000,
13601 {&hf_ieee80211_txbf_chan_est,
13602 {"Maximum number of space time streams for which channel dimensions can be simultaneously estimated", "wlan_mgt.txbf.channelest",
13603 FT_UINT32, BASE_HEX, VALS (&txbf_chan_est_flags), 0x18000000,
13606 {&hf_ieee80211_txbf_resrv,
13607 {"Reserved", "wlan_mgt.txbf.reserved",
13608 FT_UINT32, BASE_HEX, NULL, 0xe0000000,
13611 {&hf_ieee80211_hta_cap,
13612 {"HT Additional Capabilities", "wlan_mgt.hta.capabilities", FT_UINT16, BASE_HEX,
13613 NULL, 0, "HT Additional Capability information", HFILL }},
13615 {&hf_ieee80211_hta_ext_chan_offset,
13616 {"Extension Channel Offset", "wlan_mgt.hta.capabilities.extchan",
13617 FT_UINT16, BASE_HEX, VALS (&hta_ext_chan_offset_flag), 0x0003,
13620 {&hf_ieee80211_hta_rec_tx_width,
13621 {"Recommended Tx Channel Width", "wlan_mgt.hta.capabilities.rectxwidth",
13622 FT_BOOLEAN, 16, TFS (&hta_rec_tx_width_flag), 0x0004,
13623 "Recommended Transmit Channel Width", HFILL }},
13625 {&hf_ieee80211_hta_rifs_mode,
13626 {"Reduced Interframe Spacing (RIFS) Mode", "wlan_mgt.hta.capabilities.rifsmode",
13627 FT_BOOLEAN, 16, TFS (&hta_rifs_mode_flag), 0x0008,
13630 {&hf_ieee80211_hta_controlled_access,
13631 {"Controlled Access Only", "wlan_mgt.hta.capabilities.controlledaccess",
13632 FT_BOOLEAN, 16, TFS (&hta_controlled_access_flag), 0x0010,
13635 {&hf_ieee80211_hta_service_interval,
13636 {"Service Interval Granularity", "wlan_mgt.hta.capabilities.serviceinterval",
13637 FT_UINT16, BASE_HEX, VALS (&hta_service_interval_flag), 0x00E0,
13640 {&hf_ieee80211_hta_operating_mode,
13641 {"Operating Mode", "wlan_mgt.hta.capabilities.operatingmode",
13642 FT_UINT16, BASE_HEX, VALS (&hta_operating_mode_flag), 0x0003,
13645 {&hf_ieee80211_hta_non_gf_devices,
13646 {"Non Greenfield (GF) devices Present", "wlan_mgt.hta.capabilities.nongfdevices",
13647 FT_BOOLEAN, 16, TFS (&hta_non_gf_devices_flag), 0x0004,
13648 "on Greenfield (GF) devices Present", HFILL }},
13650 {&hf_ieee80211_hta_basic_stbc_mcs,
13651 {"Basic STB Modulation and Coding Scheme (MCS)", "wlan_mgt.hta.capabilities.",
13652 FT_UINT16, BASE_HEX, NULL , 0x007f,
13655 {&hf_ieee80211_hta_dual_stbc_protection,
13656 {"Dual Clear To Send (CTS) Protection", "wlan_mgt.hta.capabilities.",
13657 FT_BOOLEAN, 16, TFS (&hta_dual_stbc_protection_flag), 0x0080,
13660 {&hf_ieee80211_hta_secondary_beacon,
13661 {"Secondary Beacon", "wlan_mgt.hta.capabilities.",
13662 FT_BOOLEAN, 16, TFS (&hta_secondary_beacon_flag), 0x0100,
13665 {&hf_ieee80211_hta_lsig_txop_protection,
13666 {"L-SIG TXOP Protection Support", "wlan_mgt.hta.capabilities.",
13667 FT_BOOLEAN, 16, TFS (&hta_lsig_txop_protection_flag), 0x0200,
13670 {&hf_ieee80211_hta_pco_active,
13671 {"Phased Coexistence Operation (PCO) Active", "wlan_mgt.hta.capabilities.",
13672 FT_BOOLEAN, 16, TFS (&hta_pco_active_flag), 0x0400,
13675 {&hf_ieee80211_hta_pco_phase,
13676 {"Phased Coexistence Operation (PCO) Phase", "wlan_mgt.hta.capabilities.",
13677 FT_BOOLEAN, 16, TFS (&hta_pco_phase_flag), 0x0800,
13680 {&hf_ieee80211_antsel,
13681 {"Antenna Selection (ASEL) Capabilities", "wlan_mgt.asel",
13682 FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
13684 {&hf_ieee80211_antsel_vs,
13685 {"Antenna Selection (ASEL) Capabilities (VS)", "wlan_mgt.vs.asel",
13686 FT_UINT8, BASE_HEX, NULL, 0, "Vendor Specific Antenna Selection (ASEL) Capabilities", HFILL }},
13688 {&hf_ieee80211_antsel_b0,
13689 {"Antenna Selection Capable", "wlan_mgt.asel.capable",
13690 FT_BOOLEAN, 8, TFS (&tfs_supported_not_supported), 0x01, NULL, HFILL }},
13692 {&hf_ieee80211_antsel_b1,
13693 {"Explicit CSI Feedback Based Tx ASEL", "wlan_mgt.asel.txcsi",
13694 FT_BOOLEAN, 8, TFS (&tfs_supported_not_supported), 0x02, NULL, HFILL }},
13696 {&hf_ieee80211_antsel_b2,
13697 {"Antenna Indices Feedback Based Tx ASEL", "wlan_mgt.asel.txif",
13698 FT_BOOLEAN, 8, TFS (&tfs_supported_not_supported), 0x04, NULL, HFILL }},
13700 {&hf_ieee80211_antsel_b3,
13701 {"Explicit CSI Feedback", "wlan_mgt.asel.csi",
13702 FT_BOOLEAN, 8, TFS (&tfs_supported_not_supported), 0x08, NULL, HFILL }},
13704 {&hf_ieee80211_antsel_b4,
13705 {"Antenna Indices Feedback", "wlan_mgt.asel.if",
13706 FT_BOOLEAN, 8, TFS (&tfs_supported_not_supported), 0x10, NULL, HFILL }},
13708 {&hf_ieee80211_antsel_b5,
13709 {"Rx ASEL", "wlan_mgt.asel.rx",
13710 FT_BOOLEAN, 8, TFS (&tfs_supported_not_supported), 0x20, NULL, HFILL }},
13712 {&hf_ieee80211_antsel_b6,
13713 {"Tx Sounding PPDUs", "wlan_mgt.asel.sppdu",
13714 FT_BOOLEAN, 8, TFS (&tfs_supported_not_supported), 0x40, NULL, HFILL }},
13716 {&hf_ieee80211_antsel_b7,
13717 {"Reserved", "wlan_mgt.asel.reserved",
13718 FT_UINT8, BASE_HEX, NULL, 0x80, NULL, HFILL }},
13720 {&hf_ieee80211_ht_info_delimiter1,
13721 {"HT Information Delimiter #1", "wlan_mgt.ht.info.delim1",
13722 FT_UINT8, BASE_HEX, NULL, 0xff, NULL, HFILL }},
13724 {&hf_ieee80211_ht_info_primary_channel,
13725 {"Primary Channel", "wlan_mgt.ht.info.primarychannel",
13726 FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
13728 {&hf_ieee80211_ht_info_secondary_channel_offset,
13729 {"Secondary channel offset", "wlan_mgt.ht.info.secchanoffset",
13730 FT_UINT8, BASE_HEX, VALS (&ht_info_secondary_channel_offset_flags), 0x03, NULL, HFILL }},
13732 {&hf_ieee80211_ht_info_channel_width,
13733 {"Supported channel width", "wlan_mgt.ht.info.chanwidth",
13734 FT_BOOLEAN, 8, TFS (&ht_info_channel_width_flag), 0x04, NULL, HFILL }},
13736 {&hf_ieee80211_ht_info_rifs_mode,
13737 {"Reduced Interframe Spacing (RIFS)", "wlan_mgt.ht.info.rifs",
13738 FT_BOOLEAN, 8, TFS (&ht_info_rifs_mode_flag), 0x08, NULL, HFILL }},
13740 {&hf_ieee80211_ht_info_psmp_stas_only,
13741 {"Power Save Multi-Poll (PSMP) stations only", "wlan_mgt.ht.info.psmponly",
13742 FT_BOOLEAN, 8, TFS (&ht_info_psmp_stas_only_flag), 0x10, NULL, HFILL }},
13744 {&hf_ieee80211_ht_info_service_interval_granularity,
13745 {"Shortest service interval", "wlan_mgt.ht.info.",
13746 FT_UINT8, BASE_HEX, VALS (&ht_info_service_interval_granularity_flags), 0xe0, NULL, HFILL }},
13748 {&hf_ieee80211_ht_info_delimiter2,
13749 {"HT Information Delimiter #2", "wlan_mgt.ht.info.delim2",
13750 FT_UINT16, BASE_HEX, NULL, 0xffff, NULL, HFILL }},
13752 {&hf_ieee80211_ht_info_operating_mode,
13753 {"Operating mode of BSS", "wlan_mgt.ht.info.operatingmode",
13754 FT_UINT16, BASE_HEX, VALS (&ht_info_operating_mode_flags), 0x0003, NULL, HFILL }},
13756 {&hf_ieee80211_ht_info_non_greenfield_sta_present,
13757 {"Non-greenfield STAs present", "wlan_mgt.ht.info.greenfield",
13758 FT_BOOLEAN, 16, TFS (&ht_info_non_greenfield_sta_present_flag), 0x0004, NULL, HFILL }},
13760 {&hf_ieee80211_ht_info_transmit_burst_limit,
13761 {"Transmit burst limit", "wlan_mgt.ht.info.burstlim",
13762 FT_BOOLEAN, 16, TFS (&ht_info_transmit_burst_limit_flag), 0x0008, NULL, HFILL }},
13764 {&hf_ieee80211_ht_info_obss_non_ht_stas_present,
13765 {"OBSS non-HT STAs present", "wlan_mgt.ht.info.obssnonht",
13766 FT_BOOLEAN, 16, TFS (&ht_info_obss_non_ht_stas_present_flag), 0x0010, NULL, HFILL }},
13768 {&hf_ieee80211_ht_info_reserved_1,
13769 {"Reserved", "wlan_mgt.ht.info.reserved1",
13770 FT_UINT16, BASE_HEX, NULL, 0xffe0, NULL, HFILL }},
13772 {&hf_ieee80211_ht_info_delimiter3,
13773 {"HT Information Delimiter #3", "wlan_mgt.ht.info.delim3",
13774 FT_UINT16, BASE_HEX, NULL, 0xffff, NULL, HFILL }},
13776 {&hf_ieee80211_ht_info_reserved_2,
13777 {"Reserved", "wlan_mgt.ht.info.reserved2",
13778 FT_UINT16, BASE_HEX, NULL, 0x003f, NULL, HFILL }},
13780 {&hf_ieee80211_ht_info_dual_beacon,
13781 {"Dual beacon", "wlan_mgt.ht.info.dualbeacon",
13782 FT_BOOLEAN, 16, TFS (&ht_info_dual_beacon_flag), 0x0040, NULL, HFILL }},
13784 {&hf_ieee80211_ht_info_dual_cts_protection,
13785 {"Dual Clear To Send (CTS) protection", "wlan_mgt.ht.info.dualcts",
13786 FT_BOOLEAN, 16, TFS (&ht_info_dual_cts_protection_flag), 0x0080, NULL, HFILL }},
13788 {&hf_ieee80211_ht_info_secondary_beacon,
13789 {"Beacon ID", "wlan_mgt.ht.info.secondarybeacon",
13790 FT_BOOLEAN, 16, TFS (&ht_info_secondary_beacon_flag), 0x0100, NULL, HFILL }},
13792 {&hf_ieee80211_ht_info_lsig_txop_protection_full_support,
13793 {"L-SIG TXOP Protection Full Support", "wlan_mgt.ht.info.lsigprotsupport",
13794 FT_BOOLEAN, 16, TFS (&ht_info_lsig_txop_protection_full_support_flag), 0x0200, NULL, HFILL }},
13796 {&hf_ieee80211_ht_info_pco_active,
13797 {"Phased Coexistence Operation (PCO)", "wlan_mgt.ht.info.pco.active",
13798 FT_BOOLEAN, 16, TFS (&tfs_active_inactive), 0x0400, NULL, HFILL }},
13800 {&hf_ieee80211_ht_info_pco_phase,
13801 {"Phased Coexistence Operation (PCO) Phase", "wlan_mgt.ht.info.pco.phase",
13802 FT_BOOLEAN, 16, TFS (&ht_info_pco_phase_flag), 0x0800, NULL, HFILL }},
13804 {&hf_ieee80211_ht_info_reserved_3,
13805 {"Reserved", "wlan_mgt.ht.info.reserved3",
13806 FT_UINT16, BASE_HEX, NULL, 0xf000, NULL, HFILL }},
13808 {&hf_ieee80211_tag_secondary_channel_offset,
13809 {"Secondary Channel Offset", "wlan_mgt.secchanoffset",
13810 FT_UINT8, BASE_HEX, VALS (&ieee80211_tag_secondary_channel_offset_flags), 0,
13813 {&hf_ieee80211_tag_power_constraint_local,
13814 {"Local Power Constraint", "wlan_mgt.powercon.local",
13815 FT_UINT8, BASE_HEX, NULL, 0,
13816 "Value that allows the mitigation requirements to be satisfied in the current channel", HFILL }},
13818 {&hf_ieee80211_tag_power_capability_min,
13819 {"Minimum Transmit Power", "wlan_mgt.powercap.min",
13820 FT_UINT8, BASE_HEX, NULL, 0,
13821 "The nominal minimum transmit power with which the STA is capable of transmitting in the current channel", HFILL }},
13823 {&hf_ieee80211_tag_power_capability_max,
13824 {"Maximum Transmit Power", "wlan_mgt.powercap.max",
13825 FT_UINT8, BASE_HEX, NULL, 0,
13826 "The nominal maximum transmit power with which the STA is capable of transmitting in the current channel", HFILL }},
13828 {&hf_ieee80211_tag_tpc_report_trsmt_pow,
13829 {"Transmit Power", "wlan_mgt.tcprep.trsmt_pow",
13830 FT_INT8, BASE_DEC, NULL, 0,
13833 {&hf_ieee80211_tag_tpc_report_link_mrg,
13834 {"Link Margin", "wlan_mgt.tcprep.link_mrg",
13835 FT_INT8, BASE_DEC, NULL, 0,
13838 {&hf_ieee80211_tag_supported_channels,
13839 {"Supported Channels Set", "wlan_mgt.supchan",
13840 FT_NONE, BASE_NONE, NULL, 0,
13843 {&hf_ieee80211_tag_supported_channels_first,
13844 {"First Supported Channel", "wlan_mgt.supchan.first",
13845 FT_UINT8, BASE_HEX, NULL, 0,
13848 {&hf_ieee80211_tag_supported_channels_range,
13849 {"Supported Channel Range", "wlan_mgt.supchan.range",
13850 FT_UINT8, BASE_HEX, NULL, 0,
13853 {&hf_ieee80211_csa_channel_switch_mode,
13854 {"Channel Switch Mode", "wlan_mgt.csa.channel_switch_mode",
13855 FT_UINT8, BASE_HEX, NULL, 0,
13856 "Indicates any restrictions on transmission until a channel switch", HFILL }},
13858 {&hf_ieee80211_csa_new_channel_number,
13859 {"New Channel Number", "wlan_mgt.csa.new_channel_number",
13860 FT_UINT8, BASE_HEX, NULL, 0,
13861 "Set to the number of the channel to which the STA is moving", HFILL }},
13863 {&hf_ieee80211_csa_channel_switch_count,
13864 {"Channel Switch Count", "wlan_mgt.csa.channel_switch_count",
13865 FT_UINT8, BASE_DEC, NULL, 0,
13866 "Set to the number of TBTTs until the STA sending the Channel Switch Announcement element switches to the new channel or shall be set to 0", HFILL }},
13868 {&hf_ieee80211_tag_measure_request_token,
13869 {"Measurement Token", "wlan_mgt.measure.req.token",
13870 FT_UINT8, BASE_HEX, NULL, 0xff, NULL, HFILL }},
13872 {&hf_ieee80211_tag_measure_request_mode,
13873 {"Measurement Request Mode", "wlan_mgt.measure.req.mode",
13874 FT_UINT8, BASE_HEX, NULL, 0xff, NULL, HFILL }},
13876 {&hf_ieee80211_tag_measure_request_mode_parallel,
13877 {"Parallel", "wlan_mgt.measure.req.reqmode.parallel",
13878 FT_BOOLEAN, 8, NULL, 0x01, NULL, HFILL }},
13880 {&hf_ieee80211_tag_measure_request_mode_enable,
13881 {"Measurement Request Mode Field", "wlan_mgt.measure.req.reqmode.enable",
13882 FT_BOOLEAN, 8, TFS (&tfs_enabled_disabled), 0x02, NULL, HFILL }},
13884 {&hf_ieee80211_tag_measure_request_mode_request,
13885 {"Measurement Reports", "wlan_mgt.measure.req.reqmode.request",
13886 FT_BOOLEAN, 8, TFS (&tfs_accepted_not_accepted), 0x04, NULL, HFILL }},
13888 {&hf_ieee80211_tag_measure_request_mode_report,
13889 {"Autonomous Measurement Reports", "wlan_mgt.measure.req.reqmode.report",
13890 FT_BOOLEAN, 8, TFS (&tfs_accepted_not_accepted), 0x08, NULL, HFILL }},
13892 {&hf_ieee80211_tag_measure_request_mode_duration_mandatory,
13893 {"Duration Mandatory", "wlan_mgt.measure.req.reqmode.duration_mandatory",
13894 FT_BOOLEAN, 8, TFS (&tfs_accepted_not_accepted), 0x10, NULL, HFILL }},
13896 {&hf_ieee80211_tag_measure_request_mode_reserved,
13897 {"Reserved", "wlan_mgt.measure.req.reqmode.reserved",
13898 FT_UINT8, BASE_HEX, NULL, 0xE0, NULL, HFILL }},
13900 {&hf_ieee80211_tag_measure_request_type,
13901 {"Measurement Request Type", "wlan_mgt.measure.req.reqtype",
13902 FT_UINT8, BASE_HEX, VALS (&ieee80211_tag_measure_request_type_flags), 0x00, NULL, HFILL }},
13904 {&hf_ieee80211_tag_measure_request_channel_number,
13905 {"Measurement Channel Number", "wlan_mgt.measure.req.channelnumber",
13906 FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
13908 {&hf_ieee80211_tag_measure_request_start_time,
13909 {"Measurement Start Time", "wlan_mgt.measure.req.starttime",
13910 FT_UINT64, BASE_HEX, NULL, 0, NULL, HFILL }},
13912 {&hf_ieee80211_tag_measure_request_duration,
13913 {"Measurement Duration", "wlan_mgt.measure.req.channelnumber",
13914 FT_UINT16, BASE_HEX, NULL, 0, "in TU (1 TU = 1024 us)", HFILL }},
13916 {&hf_ieee80211_tag_measure_request_regulatory_class,
13917 {"Measurement Channel Number", "wlan_mgt.measure.req.regclass",
13918 FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
13920 {&hf_ieee80211_tag_measure_request_randomization_interval,
13921 {"Randomization Interval", "wlan_mgt.measure.req.randint",
13922 FT_UINT16, BASE_HEX, NULL, 0, "in TU (1 TU = 1024 us)", HFILL }},
13924 {&hf_ieee80211_tag_measure_request_measurement_mode,
13925 {"Measurement Mode", "wlan_mgt.measure.req.measurementmode",
13926 FT_UINT8, BASE_HEX, VALS(ieee80211_tag_measure_request_measurement_mode_flags), 0, NULL, HFILL }},
13928 {&hf_ieee80211_tag_measure_request_bssid,
13929 {"BSSID", "wlan_mgt.measure.req.bssid",
13930 FT_ETHER, BASE_NONE, NULL, 0, NULL, HFILL }},
13932 {&hf_ieee80211_tag_measure_request_subelement_length,
13933 {"Length", "wlan_mgt.measure.req.sub.length",
13934 FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
13936 {&hf_ieee80211_tag_measure_request_beacon_sub_id,
13937 {"SubElement ID", "wlan_mgt.measure.req.beacon.sub.id",
13938 FT_UINT8, BASE_DEC, VALS(ieee80211_tag_measure_request_beacon_sub_id_flags), 0, NULL, HFILL }},
13940 {&hf_ieee80211_tag_measure_request_beacon_sub_ssid,
13941 {"SSID", "wlan_mgt.measure.req.beacon.sub.ssid",
13942 FT_STRING, BASE_NONE, 0, 0, NULL, HFILL }},
13944 {&hf_ieee80211_tag_measure_request_beacon_sub_bri_reporting_condition,
13945 {"Reporting Condition", "wlan_mgt.measure.req.beacon.sub.bri.repcond",
13946 FT_UINT8, BASE_HEX, VALS(ieee80211_tag_measure_request_beacon_sub_bri_reporting_condition_flags), 0, NULL, HFILL }},
13948 {&hf_ieee80211_tag_measure_request_beacon_sub_bri_threshold_offset,
13949 {"Threshold/Offset", "wlan_mgt.measure.req.beacon.sub.bri.threshold_offset",
13950 FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
13952 {&hf_ieee80211_tag_measure_request_beacon_sub_reporting_detail,
13953 {"Reporting Detail", "wlan_mgt.measure.req.beacon.sub.bri.reporting_detail",
13954 FT_UINT8, BASE_HEX, VALS(ieee80211_tag_measure_request_beacon_sub_reporting_detail_flags), 0, NULL, HFILL }},
13956 {&hf_ieee80211_tag_measure_request_beacon_sub_request,
13957 {"Request", "wlan_mgt.measure.req.beacon.sub.request",
13958 FT_UINT8, BASE_DEC, 0, 0, NULL, HFILL }},
13960 {&hf_ieee80211_tag_measure_request_beacon_unknown,
13961 {"Unknown Data", "wlan_mgt.measure.req.beacon.unknown",
13962 FT_BYTES, BASE_NONE, NULL, 0, "(not interpreted)", HFILL }},
13964 {&hf_ieee80211_tag_measure_request_frame_request_type,
13965 {"Frame Request Type", "wlan_mgt.measure.req.frame_request_type",
13966 FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
13968 {&hf_ieee80211_tag_measure_request_mac_address,
13969 {"MAC Address", "wlan_mgt.measure.req.mac_address",
13970 FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }},
13972 {&hf_ieee80211_tag_measure_request_peer_mac_address,
13973 {"Peer MAC Address", "wlan_mgt.measure.req.peer_mac_address",
13974 FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }},
13976 {&hf_ieee80211_tag_measure_request_group_id,
13977 {"Group ID", "wlan_mgt.measure.req.groupid",
13978 FT_UINT8, BASE_HEX, VALS(ieee80211_tag_measure_request_group_id_flags), 0, NULL, HFILL }},
13980 {&hf_ieee80211_tag_measure_report_measurement_token,
13981 {"Measurement Token", "wlan_mgt.measure.req.token",
13982 FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
13984 {&hf_ieee80211_tag_measure_report_mode,
13985 {"Measurement Report Mode", "wlan_mgt.measure.req.mode",
13986 FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
13988 {&hf_ieee80211_tag_measure_report_mode_late,
13989 {"Measurement Report Mode Field", "wlan_mgt.measure.rep.repmode.late",
13990 FT_BOOLEAN, 8, TFS (&tfs_enabled_disabled), 0x01, NULL, HFILL }},
13992 {&hf_ieee80211_tag_measure_report_mode_incapable,
13993 {"Measurement Reports", "wlan_mgt.measure.rep.repmode.incapable",
13994 FT_BOOLEAN, 8, TFS (&tfs_accepted_not_accepted), 0x02, NULL, HFILL }},
13996 {&hf_ieee80211_tag_measure_report_mode_refused,
13997 {"Autonomous Measurement Reports", "wlan_mgt.measure.rep.repmode.refused",
13998 FT_BOOLEAN, 8, TFS (&tfs_accepted_not_accepted), 0x04, NULL, HFILL }},
14000 {&hf_ieee80211_tag_measure_report_mode_reserved,
14001 {"Reserved", "wlan_mgt.measure.rep.repmode.reserved",
14002 FT_UINT8, BASE_HEX, NULL, 0xf8, NULL, HFILL }},
14004 {&hf_ieee80211_tag_measure_report_type,
14005 {"Measurement Report Type", "wlan_mgt.measure.rep.reptype",
14006 FT_UINT8, BASE_HEX, VALS (&ieee80211_tag_measure_report_type_flags), 0x00, NULL, HFILL }},
14008 {&hf_ieee80211_tag_measure_report_channel_number,
14009 {"Measurement Channel Number", "wlan_mgt.measure.rep.channelnumber",
14010 FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
14012 {&hf_ieee80211_tag_measure_report_start_time,
14013 {"Measurement Start Time", "wlan_mgt.measure.rep.starttime",
14014 FT_UINT64, BASE_HEX, NULL, 0, NULL, HFILL }},
14016 {&hf_ieee80211_tag_measure_report_duration,
14017 {"Measurement Duration", "wlan_mgt.measure.rep.channelnumber",
14018 FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL }},
14020 {&hf_ieee80211_tag_measure_cca_busy_fraction,
14021 {"CCA Busy Fraction", "wlan_mgt.measure.rep.ccabusy",
14022 FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
14024 {&hf_ieee80211_tag_measure_basic_map_field,
14025 {"Map Field", "wlan_mgt.measure.rep.mapfield",
14026 FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
14028 {&hf_ieee80211_tag_measure_map_field_bss,
14029 {"BSS", "wlan_mgt.measure.rep.repmode.mapfield.bss",
14030 FT_BOOLEAN, 8, TFS (&ieee80211_tag_measure_map_field_bss_flag), 0x01, NULL, HFILL }},
14032 {&hf_ieee80211_tag_measure_map_field_odfm,
14033 {"Orthogonal Frequency Division Multiplexing (ODFM) Preamble", "wlan_mgt.measure.rep.repmode.mapfield.bss",
14034 FT_BOOLEAN, 8, TFS (&tfs_detected_not_detected), 0x02, NULL, HFILL }},
14036 {&hf_ieee80211_tag_measure_map_field_unident_signal,
14037 {"Unidentified Signal", "wlan_mgt.measure.rep.repmode.mapfield.unidentsig",
14038 FT_BOOLEAN, 8, TFS (&tfs_detected_not_detected), 0x04, NULL, HFILL }},
14040 {&hf_ieee80211_tag_measure_map_field_radar,
14041 {"Radar", "wlan_mgt.measure.rep.repmode.mapfield.radar",
14042 FT_BOOLEAN, 8, TFS (&tfs_detected_not_detected), 0x08, NULL, HFILL }},
14044 {&hf_ieee80211_tag_measure_map_field_unmeasured,
14045 {"Unmeasured", "wlan_mgt.measure.rep.repmode.mapfield.unmeasured",
14046 FT_BOOLEAN, 8, TFS (&tfs_true_false), 0x10, NULL, HFILL }},
14048 {&hf_ieee80211_tag_measure_map_field_reserved,
14049 {"Reserved", "wlan_mgt.measure.rep.repmode.mapfield.reserved",
14050 FT_UINT8, BASE_HEX, NULL, 0xe0, NULL, HFILL }},
14052 {&hf_ieee80211_tag_measure_rpi_histogram_report,
14053 {"Receive Power Indicator (RPI) Histogram Report", "wlan_mgt.measure.rep.rpi.histogram_report",
14054 FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }},
14056 {&hf_ieee80211_tag_measure_rpi_histogram_report_0,
14057 {"RPI 0 Density", "wlan_mgt.measure.rep.rpi.rpi0density",
14058 FT_UINT8, BASE_HEX, NULL, 0, "Receive Power Indicator (RPI) 0 Density", HFILL }},
14060 {&hf_ieee80211_tag_measure_rpi_histogram_report_1,
14061 {"RPI 1 Density", "wlan_mgt.measure.rep.rpi.rpi1density",
14062 FT_UINT8, BASE_HEX, NULL, 0, "Receive Power Indicator (RPI) 1 Density", HFILL }},
14064 {&hf_ieee80211_tag_measure_rpi_histogram_report_2,
14065 {"RPI 2 Density", "wlan_mgt.measure.rep.rpi.rpi2density",
14066 FT_UINT8, BASE_HEX, NULL, 0, "Receive Power Indicator (RPI) 2 Density", HFILL }},
14068 {&hf_ieee80211_tag_measure_rpi_histogram_report_3,
14069 {"RPI 3 Density", "wlan_mgt.measure.rep.rpi.rpi3density",
14070 FT_UINT8, BASE_HEX, NULL, 0, "Receive Power Indicator (RPI) 3 Density", HFILL }},
14072 {&hf_ieee80211_tag_measure_rpi_histogram_report_4,
14073 {"RPI 4 Density", "wlan_mgt.measure.rep.rpi.rpi4density",
14074 FT_UINT8, BASE_HEX, NULL, 0, "Receive Power Indicator (RPI) 4 Density", HFILL }},
14076 {&hf_ieee80211_tag_measure_rpi_histogram_report_5,
14077 {"RPI 5 Density", "wlan_mgt.measure.rep.rpi.rpi5density",
14078 FT_UINT8, BASE_HEX, NULL, 0, "Receive Power Indicator (RPI) 5 Density", HFILL }},
14080 {&hf_ieee80211_tag_measure_rpi_histogram_report_6,
14081 {"RPI 6 Density", "wlan_mgt.measure.rep.rpi.rpi6density",
14082 FT_UINT8, BASE_HEX, NULL, 0, "Receive Power Indicator (RPI) 6 Density", HFILL }},
14084 {&hf_ieee80211_tag_measure_rpi_histogram_report_7,
14085 {"RPI 7 Density", "wlan_mgt.measure.rep.rpi.rpi7density",
14086 FT_UINT8, BASE_HEX, NULL, 0, "Receive Power Indicator (RPI) 7 Density", HFILL }},
14088 {&hf_ieee80211_tag_measure_report_regulatory_class,
14089 {"Regulatory Class", "wlan_mgt.measure.rep.regclass",
14090 FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
14092 {&hf_ieee80211_tag_measure_report_channel_load,
14093 {"Channel Load", "wlan_mgt.measure.rep.chanload",
14094 FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
14096 {&hf_ieee80211_tag_measure_report_frame_info,
14097 {"Reported Frame Information", "wlan_mgt.measure.rep.frameinfo",
14098 FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
14100 {&hf_ieee80211_tag_measure_report_frame_info_phy_type,
14101 {"Condensed PHY", "wlan_mgt.measure.rep.frameinfo.phytype",
14102 FT_UINT8, BASE_HEX, NULL, 0x7F, NULL, HFILL }},
14104 {&hf_ieee80211_tag_measure_report_frame_info_frame_type,
14105 {"Reported Frame Type", "wlan_mgt.measure.rep.frameinfo.frametype",
14106 FT_UINT8, BASE_HEX, TFS(&ieee80211_tag_measure_report_frame_info_frame_type_flag), 0x80, NULL, HFILL }},
14108 {&hf_ieee80211_tag_measure_report_rcpi,
14109 {"Received Channel Power Indicator (RCPI)", "wlan_mgt.measure.rep.rcpi",
14110 FT_UINT8, BASE_HEX, NULL, 0, "in dBm", HFILL }},
14112 {&hf_ieee80211_tag_measure_report_rsni,
14113 {"Received Signal to Noise Indicator (RSNI)", "wlan_mgt.measure.rep.rsni",
14114 FT_UINT8, BASE_HEX, NULL, 0, "in dB", HFILL }},
14116 {&hf_ieee80211_tag_measure_report_bssid,
14117 {"BSSID Being Reported", "wlan_mgt.measure.rep.bssid",
14118 FT_ETHER, BASE_NONE, NULL, 0, NULL, HFILL }},
14120 {&hf_ieee80211_tag_measure_report_ant_id,
14121 {"Antenna ID", "wlan_mgt.measure.rep.antid",
14122 FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
14124 {&hf_ieee80211_tag_measure_report_anpi,
14125 {"ANPI", "wlan_mgt.measure.rep.anpi",
14126 FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
14128 {&hf_ieee80211_tag_measure_report_ipi_density_0,
14129 {"IPI Density 0", "wlan_mgt.measure.rep.ipi_density0",
14130 FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
14132 {&hf_ieee80211_tag_measure_report_ipi_density_1,
14133 {"IPI Density 1", "wlan_mgt.measure.rep.ipi_density1",
14134 FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
14136 {&hf_ieee80211_tag_measure_report_ipi_density_2,
14137 {"IPI Density 2", "wlan_mgt.measure.rep.ipi_density2",
14138 FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
14140 {&hf_ieee80211_tag_measure_report_ipi_density_3,
14141 {"IPI Density 3", "wlan_mgt.measure.rep.ipi_density3",
14142 FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
14144 {&hf_ieee80211_tag_measure_report_ipi_density_4,
14145 {"IPI Density 4", "wlan_mgt.measure.rep.ipi_density4",
14146 FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
14148 {&hf_ieee80211_tag_measure_report_ipi_density_5,
14149 {"IPI Density 5", "wlan_mgt.measure.rep.ipi_density5",
14150 FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
14152 {&hf_ieee80211_tag_measure_report_ipi_density_6,
14153 {"IPI Density 6", "wlan_mgt.measure.rep.ipi_density6",
14154 FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
14156 {&hf_ieee80211_tag_measure_report_ipi_density_7,
14157 {"IPI Density 7", "wlan_mgt.measure.rep.ipi_density7",
14158 FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
14160 {&hf_ieee80211_tag_measure_report_ipi_density_8,
14161 {"IPI Density 8", "wlan_mgt.measure.rep.ipi_density8",
14162 FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
14164 {&hf_ieee80211_tag_measure_report_ipi_density_9,
14165 {"IPI Density 9", "wlan_mgt.measure.rep.ipi_density9",
14166 FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
14168 {&hf_ieee80211_tag_measure_report_ipi_density_10,
14169 {"IPI Density 10", "wlan_mgt.measure.rep.ipi_density10",
14170 FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
14172 {&hf_ieee80211_tag_measure_report_parent_tsf,
14173 {"Parent Timing Synchronization Function (TSF)", "wlan_mgt.measure.rep.parenttsf",
14174 FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL }},
14176 /* Table 7-35a-Capabilities field */
14177 {&hf_ieee80211_tag_extended_capabilities,
14178 {"Extended Capabilities", "wlan_mgt.extcap",
14179 FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
14181 /* P802.11n/D6.0 */
14182 /* Extended Capability octet 0 */
14183 {&hf_ieee80211_tag_extended_capabilities_b0,
14184 {"20/40 BSS Coexistence Management Support", "wlan_mgt.extcap.infoexchange.b0",
14185 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x0001, "HT Information Exchange Support", HFILL }},
14187 /* P802.11p/D4.0 */
14188 {&hf_ieee80211_tag_extended_capabilities_b1,
14189 {"On-demand beacon", "wlan_mgt.extcap.infoexchange.b1",
14190 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x0002, NULL, HFILL }},
14192 {&hf_ieee80211_tag_extended_capabilities_b2,
14193 {"Extended Channel Switching", "wlan_mgt.extcap.infoexchange.b2",
14194 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x0004, NULL, HFILL }},
14196 {&hf_ieee80211_tag_extended_capabilities_b3,
14197 {"WAVE indication", "wlan_mgt.extcap.infoexchange.b3",
14198 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x0008, NULL, HFILL }},
14199 /*End: P802.11p/D4.0 */
14201 {&hf_ieee80211_tag_extended_capabilities_b4,
14202 {"PSMP Capability", "wlan_mgt.extcap.infoexchange.b4",
14203 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x0010, NULL, HFILL }},
14205 {&hf_ieee80211_tag_extended_capabilities_b6,
14206 {"S-PSMP Support", "wlan_mgt.extcap.infoexchange.b6",
14207 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x0040, NULL, HFILL }},
14209 /* Extended Capability octet 3 */
14210 {&hf_ieee80211_tag_extended_capabilities_b28,
14211 {"Peer U-APSD Buffer STA Support", "wlan_mgt.extcap.infoexchange.b28",
14212 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x0010, NULL, HFILL }},
14214 {&hf_ieee80211_tag_extended_capabilities_b29,
14215 {"TDLS Peer PSM Support", "wlan_mgt.extcap.infoexchange.b29",
14216 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x0020, NULL, HFILL }},
14218 {&hf_ieee80211_tag_extended_capabilities_b30,
14219 {"TDLS channel switching", "wlan_mgt.extcap.infoexchange.b30",
14220 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x0040, NULL, HFILL }},
14222 /* Extended Capability octet 4 */
14223 {&hf_ieee80211_tag_extended_capabilities_b37,
14224 {"TDLS support", "wlan_mgt.extcap.infoexchange.b37",
14225 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x0020, NULL, HFILL }},
14227 {&hf_ieee80211_tag_extended_capabilities_b38,
14228 {"TDLS Prohibited", "wlan_mgt.extcap.infoexchange.b38",
14229 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x0040, NULL, HFILL }},
14231 {&hf_ieee80211_tag_extended_capabilities_b39,
14232 {"TDLS Channel Switching Prohibited", "wlan_mgt.extcap.infoexchange.b39",
14233 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x0080, NULL, HFILL }},
14235 /* Extended Capability octet 5 */
14236 {&hf_ieee80211_tag_extended_capabilities_b40,
14237 {"Reject Unadmitted Frame", "wlan_mgt.extcap.infoexchange.b40",
14238 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x0001, NULL, HFILL }},
14240 {&hf_ieee80211_tag_extended_capabilities_serv_int_granularity,
14241 {"Service Interval Granularity",
14242 "wlan_mgt.extcap.infoexchange.serv_int_granularity",
14243 FT_UINT8, BASE_NONE, VALS(service_interval_granularity_vals), 0x000e,
14246 {&hf_ieee80211_tag_neighbor_report_bssid,
14247 {"BSSID", "wlan_mgt.nreport.bssid",
14248 FT_ETHER, BASE_NONE, NULL, 0, NULL, HFILL }},
14250 {&hf_ieee80211_tag_neighbor_report_bssid_info,
14251 {"BSSID Information", "wlan_mgt.nreport.bssid.info",
14252 FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL }},
14254 {&hf_ieee80211_tag_neighbor_report_bssid_info_reachability,
14255 {"AP Reachability", "wlan_mgt.nreport.bssid.info.reachability",
14256 FT_UINT16, BASE_HEX, NULL, 0x0003, NULL, HFILL }},
14258 {&hf_ieee80211_tag_neighbor_report_bssid_info_security,
14259 {"Security", "wlan_mgt.nreport.bssid.info.security",
14260 FT_UINT16, BASE_HEX, NULL, 0x0004, NULL, HFILL }},
14262 {&hf_ieee80211_tag_neighbor_report_bssid_info_key_scope,
14263 {"Key Scope", "wlan_mgt.nreport.bssid.info.keyscope",
14264 FT_UINT16, BASE_HEX, NULL, 0x0008, NULL, HFILL }},
14266 {&hf_ieee80211_tag_neighbor_report_bssid_info_capability_spec_mng,
14267 {"Capability: Spectrum Management", "wlan_mgt.nreport.bssid.info.capability.specmngt",
14268 FT_UINT16, BASE_HEX, NULL, 0x0010, NULL, HFILL }},
14270 {&hf_ieee80211_tag_neighbor_report_bssid_info_capability_qos,
14271 {"Capability: QoS", "wlan_mgt.nreport.bssid.info.capability.qos",
14272 FT_UINT16, BASE_HEX, NULL, 0x0020, NULL, HFILL }},
14274 {&hf_ieee80211_tag_neighbor_report_bssid_info_capability_apsd,
14275 {"Capability: APSD", "wlan_mgt.nreport.bssid.info.capability.apsd",
14276 FT_UINT16, BASE_HEX, NULL, 0x0040, NULL, HFILL }},
14278 {&hf_ieee80211_tag_neighbor_report_bssid_info_capability_radio_msnt,
14279 {"Capability: Radio Measurement", "wlan_mgt.nreport.bssid.info.capability.radiomsnt",
14280 FT_UINT16, BASE_HEX, NULL, 0x0080, NULL, HFILL }},
14282 {&hf_ieee80211_tag_neighbor_report_bssid_info_capability_dback,
14283 {"Capability: Delayed Block Ack", "wlan_mgt.nreport.bssid.info.capability.dback",
14284 FT_UINT16, BASE_HEX, NULL, 0x0100, NULL, HFILL }},
14286 {&hf_ieee80211_tag_neighbor_report_bssid_info_capability_iback,
14287 {"Capability: Immediate Block Ack", "wlan_mgt.nreport.bssid.info.capability.iback",
14288 FT_UINT16, BASE_HEX, NULL, 0x0200, NULL, HFILL }},
14290 {&hf_ieee80211_tag_neighbor_report_bssid_info_mobility_domain,
14291 {"Mobility Domain", "wlan_mgt.nreport.bssid.info.mobilitydomain",
14292 FT_UINT16, BASE_HEX, NULL, 0x0400, NULL, HFILL }},
14294 {&hf_ieee80211_tag_neighbor_report_bssid_info_high_throughput,
14295 {"High Throughput", "wlan_mgt.nreport.bssid.info.hthoughput",
14296 FT_UINT16, BASE_HEX, NULL, 0x0800, NULL, HFILL }},
14298 {&hf_ieee80211_tag_neighbor_report_bssid_info_reserved,
14299 {"Reserved", "wlan_mgt.nreport.bssid.info.reserved",
14300 FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL }},
14302 {&hf_ieee80211_tag_neighbor_report_reg_class,
14303 {"Regulatory Class", "wlan_mgt.nreport.regclass",
14304 FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
14306 {&hf_ieee80211_tag_neighbor_report_channel_number,
14307 {"Channel Number", "wlan_mgt.nreport.channumber",
14308 FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
14310 {&hf_ieee80211_tag_neighbor_report_phy_type,
14311 {"PHY Type", "wlan_mgt.nreport.phytype",
14312 FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
14314 {&hf_ieee80211_tag_supported_reg_classes_current,
14315 {"Current Regulatory Class", "wlan_mgt.supregclass.current",
14316 FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
14318 {&hf_ieee80211_tag_supported_reg_classes_alternate,
14319 {"Alternate Regulatory Classes", "wlan_mgt.supregclass.alt",
14320 FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL }},
14322 {&hf_ieee80211_marvell_ie_type,
14323 {"Type", "wlan_mgt.marvell.ie.type",
14324 FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
14326 {&hf_ieee80211_marvell_ie_mesh_subtype,
14327 {"Subtype", "wlan_mgt.marvell.ie.subtype",
14328 FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
14330 {&hf_ieee80211_marvell_ie_mesh_version,
14331 {"Version", "wlan_mgt.marvell.ie.version",
14332 FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
14334 {&hf_ieee80211_marvell_ie_mesh_active_proto_id,
14335 {"Path Selection Protocol", "wlan_mgt.marvell.ie.proto_id",
14336 FT_UINT8, BASE_HEX, VALS(mesh_path_selection_codes), 0, NULL, HFILL }},
14338 {&hf_ieee80211_marvell_ie_mesh_active_metric_id,
14339 {"Path Selection Metric", "wlan_mgt.marvell.ie.metric_id",
14340 FT_UINT8, BASE_HEX, VALS(mesh_metric_codes), 0, NULL, HFILL }},
14342 {&hf_ieee80211_marvell_ie_mesh_cap,
14343 {"Mesh Capabilities", "wlan_mgt.marvell.ie.cap",
14344 FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
14346 {&hf_ieee80211_marvell_ie_data,
14347 { "Marvell IE data", "wlan_mgt.marvell.data",
14348 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
14350 {&hf_ieee80211_atheros_ie_type,
14351 {"Type", "wlan_mgt.atheros.ie.type",
14352 FT_UINT8, BASE_HEX, VALS(atheros_ie_type_vals), 0, NULL, HFILL }},
14354 {&hf_ieee80211_atheros_ie_subtype,
14355 {"Subtype", "wlan_mgt.atheros.ie.subtype",
14356 FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
14358 {&hf_ieee80211_atheros_ie_version,
14359 {"Version", "wlan_mgt.atheros.ie.version",
14360 FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
14362 {&hf_ieee80211_atheros_ie_cap_f_turbop,
14363 {"Turbo Prime", "wlan_mgt.ie.atheros.capabilities.turbop",
14364 FT_BOOLEAN, 8, NULL, ATHEROS_IE_CAP_TURBOP, NULL, HFILL }},
14366 {&hf_ieee80211_atheros_ie_cap_f_comp,
14367 {"Compression", "wlan_mgt.ie.atheros.capabilities.comp",
14368 FT_BOOLEAN, 8, NULL, ATHEROS_IE_CAP_COMP, NULL, HFILL }},
14370 {&hf_ieee80211_atheros_ie_cap_f_ff,
14371 {"Fast Frames", "wlan_mgt.ie.atheros.capabilities.ff",
14372 FT_BOOLEAN, 8, NULL, ATHEROS_IE_CAP_FF, NULL, HFILL }},
14374 {&hf_ieee80211_atheros_ie_cap_f_xr,
14375 {"eXtended Range", "wlan_mgt.ie.atheros.capabilities.xr",
14376 FT_BOOLEAN, 8, NULL, ATHEROS_IE_CAP_XR, NULL, HFILL }},
14378 {&hf_ieee80211_atheros_ie_cap_f_ar,
14379 {"Advanced Radar", "wlan_mgt.ie.atheros.capabilities.ar",
14380 FT_BOOLEAN, 8, NULL, ATHEROS_IE_CAP_AR, NULL, HFILL }},
14382 {&hf_ieee80211_atheros_ie_cap_f_burst,
14383 {"Burst", "wlan_mgt.ie.atheros.capabilities.burst",
14384 FT_BOOLEAN, 8, NULL, ATHEROS_IE_CAP_BURST, NULL, HFILL }},
14386 {&hf_ieee80211_atheros_ie_cap_f_wme,
14387 {"CWMin tuning", "wlan_mgt.ie.atheros.capabilities.wme",
14388 FT_BOOLEAN, 8, NULL, ATHEROS_IE_CAP_WME, NULL, HFILL }},
14390 {&hf_ieee80211_atheros_ie_cap_f_boost,
14391 {"Boost", "wlan_mgt.ie.atheros.capabilities.boost",
14392 FT_BOOLEAN, 8, NULL, ATHEROS_IE_CAP_BOOST, NULL, HFILL }},
14394 {&hf_ieee80211_atheros_ie_advcap_cap,
14395 {"Capabilities", "wlan_mgt.atheros.ie.advcap.cap",
14396 FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
14398 {&hf_ieee80211_atheros_ie_advcap_defkey,
14399 {"Default key index", "wlan_mgt.atheros.ie.advcap.defkey",
14400 FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL }},
14402 {&hf_ieee80211_atheros_ie_xr_info,
14403 {"Info", "wlan_mgt.atheros.ie.xr.info",
14404 FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
14406 {&hf_ieee80211_atheros_ie_xr_base_bssid,
14407 {"Base BSS Id", "wlan_mgt.atheros.ie.xr.base_bssid",
14408 FT_ETHER, BASE_NONE, NULL, 0, NULL, HFILL }},
14410 {&hf_ieee80211_atheros_ie_xr_xr_bssid,
14411 {"XR BSS Id", "wlan_mgt.atheros.ie.xr.xr_bssid",
14412 FT_ETHER, BASE_NONE, NULL, 0, NULL, HFILL }},
14414 {&hf_ieee80211_atheros_ie_xr_xr_beacon,
14415 {"XR Beacon Interval", "wlan_mgt.atheros.ie.xr.xr_beacon",
14416 FT_UINT32, BASE_CUSTOM, beacon_interval_base_custom, 0, NULL, HFILL }},
14418 {&hf_ieee80211_atheros_ie_xr_base_cap,
14419 {"Base capabilities", "wlan_mgt.atheros.ie.xr.base_cap",
14420 FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
14422 {&hf_ieee80211_atheros_ie_xr_xr_cap,
14423 {"XR capabilities", "wlan_mgt.atheros.ie.xr.xr_cap",
14424 FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
14426 {&hf_ieee80211_atheros_ie_data,
14427 {"Atheros IE data", "wlan_mgt.atheros.data",
14428 FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }},
14430 {&hf_ieee80211_aironet_ie_type,
14431 {"Aironet IE type", "wlan_mgt.aironet.type",
14432 FT_UINT8, BASE_DEC, VALS(aironet_ie_type_vals), 0, NULL, HFILL }},
14434 {&hf_ieee80211_aironet_ie_version,
14435 {"Aironet IE CCX version?", "wlan_mgt.aironet.version",
14436 FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
14438 {&hf_ieee80211_aironet_ie_data,
14439 { "Aironet IE data", "wlan_mgt.aironet.data",
14440 FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
14442 {&hf_ieee80211_qbss_version,
14443 {"QBSS Version", "wlan_mgt.qbss.version",
14444 FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
14446 {&hf_ieee80211_qbss_scount,
14447 {"Station Count", "wlan_mgt.qbss.scount",
14448 FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }},
14450 {&hf_ieee80211_qbss_cu,
14451 {"Channel Utilization", "wlan_mgt.qbss.cu",
14452 FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
14454 {&hf_ieee80211_qbss_adc,
14455 {"Available Admission Capabilities", "wlan_mgt.qbss.adc",
14456 FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
14458 {&hf_ieee80211_qbss2_cu,
14459 {"Channel Utilization", "wlan_mgt.qbss2.cu",
14460 FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
14462 {&hf_ieee80211_qbss2_gl,
14463 {"G.711 CU Quantum", "wlan_mgt.qbss2.glimit",
14464 FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
14466 {&hf_ieee80211_qbss2_cal,
14467 {"Call Admission Limit", "wlan_mgt.qbss2.cal",
14468 FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
14470 {&hf_ieee80211_qbss2_scount,
14471 {"Station Count", "wlan_mgt.qbss2.scount",
14472 FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }},
14474 {&hf_ieee80211_aironet_ie_qos_unk1,
14475 {"Aironet IE QoS unknown 1", "wlan_mgt.aironet.qos.unk1",
14476 FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
14478 {&hf_ieee80211_aironet_ie_qos_paramset,
14479 {"Aironet IE QoS paramset", "wlan_mgt.aironet.qos.paramset",
14480 FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
14482 {&hf_ieee80211_aironet_ie_qos_val,
14483 {"Aironet IE QoS valueset", "wlan_mgt.aironet.qos.val",
14484 FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }},
14486 {&hf_ieee80211_tsinfo,
14487 {"Traffic Stream (TS) Info", "wlan_mgt.ts_info",
14488 FT_UINT24, BASE_HEX, NULL, 0, "Traffic Stream (TS) Info field", HFILL }},
14490 {&hf_ieee80211_tsinfo_type,
14491 {"Traffic Type", "wlan_mgt.ts_info.type", FT_UINT24, BASE_DEC,
14492 VALS (&tsinfo_type), 0x000001, "Traffic Stream (TS) Info Traffic Type", HFILL }},
14494 {&hf_ieee80211_tsinfo_tsid,
14495 {"Traffic Stream ID (TSID)", "wlan_mgt.ts_info.tsid",
14496 FT_UINT24, BASE_DEC, NULL, 0x00001E, "Traffic Stream ID (TSID) Info TSID", HFILL }},
14498 {&hf_ieee80211_tsinfo_dir,
14499 {"Direction", "wlan_mgt.ts_info.dir", FT_UINT24, BASE_DEC,
14500 VALS (&tsinfo_direction), 0x000060, "Traffic Stream (TS) Info Direction", HFILL }},
14502 {&hf_ieee80211_tsinfo_access,
14503 {"Access Policy", "wlan_mgt.ts_info.dir", FT_UINT24, BASE_DEC,
14504 VALS (&tsinfo_access), 0x000180, "Traffic Stream (TS) Info Access Policy", HFILL }},
14506 {&hf_ieee80211_tsinfo_agg,
14507 {"Aggregation", "wlan_mgt.ts_info.agg", FT_UINT24, BASE_DEC,
14508 NULL, 0x000200, "Traffic Stream (TS) Info Access Policy", HFILL }},
14510 {&hf_ieee80211_tsinfo_apsd,
14511 {"Automatic Power-Save Delivery (APSD)", "wlan_mgt.ts_info.apsd", FT_UINT24, BASE_DEC,
14512 NULL, 0x000400, "Traffic Stream (TS) Info Automatic Power-Save Delivery (APSD)", HFILL }},
14514 {&hf_ieee80211_tsinfo_up,
14515 {"User Priority", "wlan_mgt.ts_info.up", FT_UINT24, BASE_DEC,
14516 VALS (&qos_up), 0x003800, "Traffic Stream (TS) Info User Priority", HFILL }},
14518 {&hf_ieee80211_tsinfo_ack,
14519 {"Ack Policy", "wlan_mgt.ts_info.ack", FT_UINT24, BASE_DEC,
14520 VALS (&ack_policy), 0x00C000, "Traffic Stream (TS) Info Ack Policy", HFILL }},
14522 {&hf_ieee80211_tsinfo_sched,
14523 {"Schedule", "wlan_mgt.ts_info.sched", FT_UINT24, BASE_DEC,
14524 NULL, 0x010000, "Traffic Stream (TS) Info Schedule", HFILL }},
14526 {&hf_ieee80211_tsinfo_rsv,
14527 {"Reserved", "wlan_mgt.ts_info.rsv", FT_UINT24, BASE_HEX,
14528 NULL, 0xFE0000, "Must be Zero", HFILL }},
14530 {&hf_ieee80211_tspec_nor_msdu,
14531 {"Normal MSDU Size", "wlan_mgt.tspec.nor_msdu",
14532 FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }},
14534 {&hf_ieee80211_tspec_max_msdu,
14535 {"Maximum MSDU Size", "wlan_mgt.tspec.max_msdu",
14536 FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }},
14538 {&hf_ieee80211_tspec_min_srv,
14539 {"Minimum Service Interval", "wlan_mgt.tspec.min_srv",
14540 FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
14542 {&hf_ieee80211_tspec_max_srv,
14543 {"Maximum Service Interval", "wlan_mgt.tspec.max_srv",
14544 FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
14546 {&hf_ieee80211_tspec_inact_int,
14547 {"Inactivity Interval", "wlan_mgt.tspec.inact_int",
14548 FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
14550 {&hf_ieee80211_tspec_susp_int,
14551 {"Suspension Interval", "wlan_mgt.tspec.susp_int",
14552 FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
14554 {&hf_ieee80211_tspec_srv_start,
14555 {"Service Start Time", "wlan_mgt.tspec.srv_start",
14556 FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
14558 {&hf_ieee80211_tspec_min_data,
14559 {"Minimum Data Rate", "wlan_mgt.tspec.min_data",
14560 FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
14562 {&hf_ieee80211_tspec_mean_data,
14563 {"Mean Data Rate", "wlan_mgt.tspec.mean_data",
14564 FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
14566 {&hf_ieee80211_tspec_peak_data,
14567 {"Peak Data Rate", "wlan_mgt.tspec.peak_data",
14568 FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
14570 {&hf_ieee80211_tspec_burst_size,
14571 {"Burst Size", "wlan_mgt.tspec.burst_size",
14572 FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
14574 {&hf_ieee80211_tspec_delay_bound,
14575 {"Delay Bound", "wlan_mgt.tspec.delay_bound",
14576 FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
14578 {&hf_ieee80211_tspec_min_phy,
14579 {"Minimum PHY Rate", "wlan_mgt.tspec.min_phy",
14580 FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
14582 {&hf_ieee80211_tspec_surplus,
14583 {"Surplus Bandwidth Allowance", "wlan_mgt.tspec.surplus",
14584 FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }},
14586 {&hf_ieee80211_tspec_medium,
14587 {"Medium Time", "wlan_mgt.tspec.medium",
14588 FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }},
14590 {&hf_ieee80211_ts_delay,
14591 {"Traffic Stream (TS) Delay", "wlan_mgt.ts_delay",
14592 FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
14594 {&hf_ieee80211_tclass_process,
14595 {"Processing", "wlan_mgt.tclas_proc.processing", FT_UINT8, BASE_DEC,
14596 VALS (tclas_process), 0, "TCLAS Processing", HFILL }},
14598 {&hf_ieee80211_sched_info,
14599 {"Schedule Info", "wlan_mgt.sched.sched_info",
14600 FT_UINT16, BASE_HEX, NULL, 0, "Schedule Info field", HFILL }},
14602 {&hf_ieee80211_sched_info_agg,
14603 {"Schedule Aggregation", "wlan_mgt.sched_info.agg", FT_UINT16, BASE_DEC,
14604 NULL, 0x0001, "Traffic Stream (TS) Info Access Policy", HFILL }},
14606 {&hf_ieee80211_sched_info_tsid,
14607 {"Schedule Traffic Stream ID (TSID)", "wlan_mgt.sched_info.tsid",
14608 FT_UINT16, BASE_DEC, NULL, 0x001E, "Traffic Stream ID (TSID) Info TSID", HFILL }},
14610 {&hf_ieee80211_sched_info_dir,
14611 {"Schedule Direction", "wlan_mgt.sched_info.dir", FT_UINT16, BASE_DEC,
14612 VALS (&tsinfo_direction), 0x0060, "Traffic Stream (TS) Info Direction", HFILL }},
14614 {&hf_ieee80211_sched_srv_start,
14615 {"Service Start Time", "wlan_mgt.sched.srv_start",
14616 FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL }},
14618 {&hf_ieee80211_sched_srv_int,
14619 {"Service Interval", "wlan_mgt.sched.srv_int",
14620 FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL }},
14622 {&hf_ieee80211_sched_spec_int,
14623 {"Specification Interval", "wlan_mgt.sched.spec_int",
14624 FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL }},
14626 {&hf_ieee80211_action,
14627 {"Action", "wlan_mgt.fixed.action",
14628 FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
14631 {&hf_ieee80211_aruba,
14632 {"Aruba Type", "wlan_mgt.aruba.type",
14633 FT_UINT16, BASE_DEC, VALS(aruba_mgt_typevals), 0, "Aruba Management", HFILL }},
14635 {&hf_ieee80211_aruba_hb_seq,
14636 {"Aruba Heartbeat Sequence", "wlan_mgt.aruba.heartbeat_sequence",
14637 FT_UINT64, BASE_DEC, NULL, 0, NULL, HFILL }},
14639 {&hf_ieee80211_aruba_mtu,
14640 {"Aruba MTU Size", "wlan_mgt.aruba.mtu_size",
14641 FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }},
14643 /* Start: HT Control (+HTC) */
14644 {&hf_ieee80211_htc,
14645 {"HT Control (+HTC)", "wlan_mgt.htc",
14646 FT_UINT32, BASE_HEX, NULL, 0, "High Throughput Control (+HTC)", HFILL }},
14647 {&hf_ieee80211_htc_lac,
14648 {"Link Adaptation Control (LAC)", "wlan_mgt.htc.lac",
14649 FT_UINT16, BASE_HEX, NULL, 0, "High Throughput Control Link Adaptation Control (LAC)", HFILL }},
14650 {&hf_ieee80211_htc_lac_reserved,
14651 {"Reserved", "wlan_mgt.htc.lac.reserved",
14652 FT_BOOLEAN, 16, NULL, 0x0001, "High Throughput Control Link Adaptation Control Reserved", HFILL }},
14653 {&hf_ieee80211_htc_lac_trq,
14654 {"Training Request (TRQ)", "wlan_mgt.htc.lac.trq",
14655 FT_BOOLEAN, 16, TFS(&htc_lac_trq_flag), 0x0002, "High Throughput Control Link Adaptation Control Training Request (TRQ)", HFILL }},
14656 {&hf_ieee80211_htc_lac_mai_aseli,
14657 {"Antenna Selection Indication (ASELI)", "wlan_mgt.htc.lac.mai.aseli",
14658 FT_UINT16, BASE_HEX, NULL, 0x003C, "High Throughput Control Link Adaptation Control MAI Antenna Selection Indication", HFILL }},
14659 {&hf_ieee80211_htc_lac_mai_mrq,
14660 {"MCS Request (MRQ)", "wlan_mgt.htc.lac.mai.mrq",
14661 FT_BOOLEAN, 16, TFS(&htc_lac_mai_mrq_flag), 0x0004, "High Throughput Control Link Adaptation Control MAI MCS Request", HFILL }},
14662 {&hf_ieee80211_htc_lac_mai_msi,
14663 {"MCS Request Sequence Identifier (MSI)", "wlan_mgt.htc.lac.mai.msi",
14664 FT_UINT16, BASE_HEX, NULL, 0x0038, "High Throughput Control Link Adaptation Control MAI MCS Request Sequence Identifier", HFILL }},
14665 {&hf_ieee80211_htc_lac_mai_reserved,
14666 {"Reserved", "wlan_mgt.htc.lac.mai.reserved",
14667 FT_UINT16, BASE_HEX, NULL, 0x0038, "High Throughput Control Link Adaptation Control MAI Reserved", HFILL }},
14668 {&hf_ieee80211_htc_lac_mfsi,
14669 {"MCS Feedback Sequence Identifier (MFSI)", "wlan_mgt.htc.lac.mfsi",
14670 FT_UINT16, BASE_DEC, NULL, 0x01C0, "High Throughput Control Link Adaptation Control MCS Feedback Sequence Identifier (MSI)", HFILL }},
14671 {&hf_ieee80211_htc_lac_asel_command,
14672 {"Antenna Selection (ASEL) Command", "wlan_mgt.htc.lac.asel.command",
14673 FT_UINT16, BASE_HEX, VALS (&ieee80211_htc_lac_asel_command_flags), 0x0E00, "High Throughput Control Link Adaptation Control Antenna Selection (ASEL) Command", HFILL }},
14674 {&hf_ieee80211_htc_lac_asel_data,
14675 {"Antenna Selection (ASEL) Data", "wlan_mgt.htc.lac.asel.data",
14676 FT_UINT16, BASE_HEX, NULL, 0xF000, "High Throughput Control Link Adaptation Control Antenna Selection (ASEL) Data", HFILL }},
14677 {&hf_ieee80211_htc_lac_mfb,
14678 {"MCS Feedback (MFB)", "wlan_mgt.htc.lac.mfb",
14679 FT_UINT16, BASE_HEX, NULL, 0xFE00, "High Throughput Control Link Adaptation Control MCS Feedback", HFILL }},
14680 {&hf_ieee80211_htc_cal_pos,
14681 {"Calibration Position", "wlan_mgt.htc.cal.pos",
14682 FT_UINT16, BASE_DEC, VALS (&ieee80211_htc_cal_pos_flags), 0x0003, "High Throughput Control Calibration Position", HFILL }},
14683 {&hf_ieee80211_htc_cal_seq,
14684 {"Calibration Sequence Identifier", "wlan_mgt.htc.cal.seq",
14685 FT_UINT16, BASE_DEC, NULL, 0x000C, "High Throughput Control Calibration Sequence Identifier", HFILL }},
14686 {&hf_ieee80211_htc_reserved1,
14687 {"Reserved", "wlan_mgt.htc.reserved1",
14688 FT_UINT16, BASE_DEC, NULL, 0x0030, "High Throughput Control Reserved", HFILL }},
14689 {&hf_ieee80211_htc_csi_steering,
14690 {"CSI/Steering", "wlan_mgt.htc.csi_steering",
14691 FT_UINT16, BASE_DEC, VALS (&ieee80211_htc_csi_steering_flags), 0x00C0, "High Throughput Control CSI/Steering", HFILL }},
14692 {&hf_ieee80211_htc_ndp_announcement,
14693 {"NDP Announcement", "wlan_mgt.htc.ndp_announcement",
14694 FT_BOOLEAN, 16, TFS(&ieee80211_htc_ndp_announcement_flag), 0x0100, "High Throughput Control NDP Announcement", HFILL }},
14695 {&hf_ieee80211_htc_reserved2,
14696 {"Reserved", "wlan_mgt.htc.reserved2",
14697 FT_UINT16, BASE_HEX, NULL, 0x3E00, "High Throughput Control Reserved", HFILL }},
14698 {&hf_ieee80211_htc_ac_constraint,
14699 {"AC Constraint", "wlan_mgt.htc.ac_constraint",
14700 FT_BOOLEAN, 16, NULL, 0x4000, "High Throughput Control AC Constraint", HFILL }},
14701 {&hf_ieee80211_htc_rdg_more_ppdu,
14702 {"RDG/More PPDU", "wlan_mgt.htc.rdg_more_ppdu",
14703 FT_BOOLEAN, 16, NULL, 0x8000, "High Throughput Control RDG/More PPDU", HFILL }},
14704 /* End: HT Control (+HTC) */
14707 {&hf_ieee80211_tag_mobility_domain_mdid,
14708 {"Mobility Domain Identifier", "wlan_mgt.mobility_domain.mdid",
14709 FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL }},
14710 {&hf_ieee80211_tag_mobility_domain_ft_capab,
14711 {"FT Capability and Policy", "wlan_mgt.mobility_domain.ft_capab",
14712 FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
14713 {&hf_ieee80211_tag_mobility_domain_ft_capab_ft_over_ds,
14714 {"Fast BSS Transition over DS",
14715 "wlan_mgt.mobility_domain.ft_capab.ft_over_ds",
14716 FT_UINT8, BASE_HEX, NULL, 0x01, NULL, HFILL }},
14717 {&hf_ieee80211_tag_mobility_domain_ft_capab_resource_req,
14718 {"Resource Request Protocol Capability",
14719 "wlan_mgt.mobility_domain.ft_capab.resource_req",
14720 FT_UINT8, BASE_HEX, NULL, 0x02, NULL, HFILL }},
14723 {&hf_ieee80211_tag_ft_mic_control,
14724 {"MIC Control", "wlan_mgt.ft.mic_control",
14725 FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL }},
14726 {&hf_ieee80211_tag_ft_element_count,
14727 {"Element Count", "wlan_mgt.ft.element_count",
14728 FT_UINT16, BASE_DEC, NULL, 0xff00, NULL, HFILL }},
14729 {&hf_ieee80211_tag_ft_mic,
14730 {"MIC", "wlan_mgt.ft.mic",
14731 FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }},
14732 {&hf_ieee80211_tag_ft_anonce,
14733 {"ANonce", "wlan_mgt.ft.anonce",
14734 FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }},
14735 {&hf_ieee80211_tag_ft_snonce,
14736 {"SNonce", "wlan_mgt.ft.snonce",
14737 FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }},
14738 {&hf_ieee80211_tag_ft_subelem_id,
14739 {"Subelement ID", "wlan_mgt.ft.subelem.id",
14740 FT_UINT8, BASE_DEC, VALS(ft_subelem_id_vals), 0, NULL, HFILL }},
14741 {&hf_ieee80211_tag_ft_subelem_len,
14742 {"Length", "wlan_mgt.ft.subelem.len",
14743 FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
14744 {&hf_ieee80211_tag_ft_subelem_data,
14745 {"Data", "wlan_mgt.ft.subelem.data",
14746 FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }},
14747 {&hf_ieee80211_tag_ft_subelem_r1kh_id,
14748 {"PMK-R1 key holder identifier (R1KH-ID)", "wlan_mgt.ft.subelem.r1kh_id",
14749 FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }},
14750 {&hf_ieee80211_tag_ft_subelem_gtk_key_info,
14751 {"Key Info", "wlan_mgt.ft.subelem.gtk.key_info",
14752 FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL }},
14753 {&hf_ieee80211_tag_ft_subelem_gtk_key_id,
14754 {"Key ID", "wlan_mgt.ft.subelem.gtk.key_id",
14755 FT_UINT16, BASE_DEC, NULL, 0x0003, NULL, HFILL }},
14756 {&hf_ieee80211_tag_ft_subelem_gtk_key_length,
14757 {"Key Length", "wlan_mgt.ft.subelem.gtk.key_length",
14758 FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
14759 {&hf_ieee80211_tag_ft_subelem_gtk_rsc,
14760 {"RSC", "wlan_mgt.ft.subelem.gtk.rsc",
14761 FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }},
14762 {&hf_ieee80211_tag_ft_subelem_gtk_key,
14763 {"GTK", "wlan_mgt.ft.subelem.gtk.key",
14764 FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }},
14765 {&hf_ieee80211_tag_ft_subelem_r0kh_id,
14766 {"PMK-R0 key holder identifier (R0KH-ID)", "wlan_mgt.ft.subelem.r0kh_id",
14767 FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL }},
14768 {&hf_ieee80211_tag_ft_subelem_igtk_key_id,
14769 {"Key ID", "wlan_mgt.ft.subelem.igtk.key_id",
14770 FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }},
14771 {&hf_ieee80211_tag_ft_subelem_igtk_ipn,
14772 {"IPN", "wlan_mgt.ft.subelem.igtk.ipn",
14773 FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }},
14774 {&hf_ieee80211_tag_ft_subelem_igtk_key_length,
14775 {"Key Length", "wlan_mgt.ft.subelem.igtk.key_length",
14776 FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
14777 {&hf_ieee80211_tag_ft_subelem_igtk_key,
14778 {"Wrapped Key (IGTK)", "wlan_mgt.ft.subelem.igtk.key",
14779 FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }},
14782 {&hf_ieee80211_tag_mmie_keyid,
14783 {"KeyID", "wlan_mgt.mmie.keyid",
14784 FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }},
14785 {&hf_ieee80211_tag_mmie_ipn,
14786 {"IPN", "wlan_mgt.mmie.ipn",
14787 FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }},
14788 {&hf_ieee80211_tag_mmie_mic,
14789 {"MIC", "wlan_mgt.mmie.mic",
14790 FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }},
14792 /* Advertisement Protocol */
14793 {&hf_ieee80211_tag_adv_proto_resp_len_limit,
14794 {"Query Response Length Limit", "wlan_mgt.adv_proto.resp_len_limit",
14795 FT_UINT8, BASE_DEC, NULL, 0x7f, NULL, HFILL }},
14796 {&hf_ieee80211_tag_adv_proto_pame_bi,
14797 {"PAME-BI", "wlan_mgt.adv_proto.pame_bi",
14798 FT_UINT8, BASE_DEC, NULL, 0x80,
14799 "Pre-Association Message Xchange BSSID Independent (PAME-BI)", HFILL }},
14800 {&hf_ieee80211_tag_adv_proto_id,
14801 {"Advertisement Protocol ID", "wlan_mgt.adv_proto.id",
14802 FT_UINT8, BASE_DEC, VALS(adv_proto_id_vals), 0, NULL, HFILL }},
14804 /* Timeout Interval */
14805 {&hf_ieee80211_tag_timeout_int_type,
14806 {"Timeout Interval Type", "wlan_mgt.timeout_int.type",
14807 FT_UINT8, BASE_DEC, VALS(timeout_int_types), 0, NULL, HFILL }},
14808 {&hf_ieee80211_tag_timeout_int_value,
14809 {"Timeout Interval Value", "wlan_mgt.timeout_int.value",
14810 FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
14812 /* Link Identifier */
14813 {&hf_ieee80211_tag_link_id_bssid,
14814 {"BSSID", "wlan_mgt.link_id.bssid",
14815 FT_ETHER, BASE_NONE, NULL, 0, NULL, HFILL }},
14816 {&hf_ieee80211_tag_link_id_init_sta,
14817 {"TDLS initiator STA Address", "wlan_mgt.link_id.init_sta",
14818 FT_ETHER, BASE_NONE, NULL, 0, NULL, HFILL }},
14819 {&hf_ieee80211_tag_link_id_resp_sta,
14820 {"TDLS responder STA Address", "wlan_mgt.link_id.resp_sta",
14821 FT_ETHER, BASE_NONE, NULL, 0, NULL, HFILL }},
14823 /* Wakeup Schedule */
14824 {&hf_ieee80211_tag_wakeup_schedule_offset,
14825 {"Offset", "wlan_mgt.wakeup_schedule.offset",
14826 FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
14827 {&hf_ieee80211_tag_wakeup_schedule_interval,
14828 {"Interval", "wlan_mgt.wakeup_schedule.interval",
14829 FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
14830 {&hf_ieee80211_tag_wakeup_schedule_awake_window_slots,
14831 {"Awake Window Slots", "wlan_mgt.wakeup_schedule.awake_window_slots",
14832 FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
14833 {&hf_ieee80211_tag_wakeup_schedule_max_awake_dur,
14834 {"Maximum Awake Window Duration",
14835 "wlan_mgt.wakeup_schedule.max_awake_dur",
14836 FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
14837 {&hf_ieee80211_tag_wakeup_schedule_idle_count,
14838 {"Idle Count", "wlan_mgt.wakeup_schedule.idle_count",
14839 FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }},
14841 /* Channel Switch Timing */
14842 {&hf_ieee80211_tag_channel_switch_timing_switch_time,
14843 {"Switch Time", "wlan_mgt.channel_switch_timing.switch_time",
14844 FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }},
14845 {&hf_ieee80211_tag_channel_switch_timing_switch_timeout,
14846 {"Switch Timeout", "wlan_mgt.channel_switch_timing.switch_timeout",
14847 FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }},
14850 {&hf_ieee80211_tag_pti_control_tid,
14851 {"TID", "wlan_mgt.pti_control.tid",
14852 FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
14853 {&hf_ieee80211_tag_pti_control_sequence_control,
14854 {"Sequence Control", "wlan_mgt.pti_control.sequence_control",
14855 FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL }},
14857 /* PU Buffer Status */
14858 {&hf_ieee80211_tag_pu_buffer_status_ac_bk,
14859 {"AC_BK traffic available", "wlan_mgt.pu_buffer_status.ac_bk",
14860 FT_UINT8, BASE_DEC, NULL, 0x01, NULL, HFILL }},
14861 {&hf_ieee80211_tag_pu_buffer_status_ac_be,
14862 {"AC_BE traffic available", "wlan_mgt.pu_buffer_status.ac_be",
14863 FT_UINT8, BASE_DEC, NULL, 0x02, NULL, HFILL }},
14864 {&hf_ieee80211_tag_pu_buffer_status_ac_vi,
14865 {"AC_VI traffic available", "wlan_mgt.pu_buffer_status.ac_vi",
14866 FT_UINT8, BASE_DEC, NULL, 0x04, NULL, HFILL }},
14867 {&hf_ieee80211_tag_pu_buffer_status_ac_vo,
14868 {"AC_VO traffic available", "wlan_mgt.pu_buffer_status.ac_vo",
14869 FT_UINT8, BASE_DEC, NULL, 0x08, NULL, HFILL }}
14872 static hf_register_info aggregate_fields[] = {
14873 {&hf_ieee80211_amsdu_msdu_header_text,
14874 {"MAC Service Data Unit (MSDU)", "wlan_aggregate.msduheader", FT_UINT16,
14875 BASE_DEC, 0, 0x0000, NULL, HFILL }}
14878 static gint *tree_array[] = {
14886 &ett_fixed_parameters,
14887 &ett_tagged_parameters,
14888 &ett_tag_bmapctl_tree,
14889 &ett_tag_country_fnm_tree,
14890 &ett_tag_country_rcc_tree,
14891 &ett_qos_parameters,
14892 &ett_qos_ps_buf_state,
14893 &ett_wep_parameters,
14894 #ifdef MESH_OVERRIDES
14895 &ett_msh_parameters,
14896 &ett_msh_dest_flags_tree,
14897 #endif /* MESH_OVERRIDES */
14901 &ett_rsn_sub_pcs_tree,
14902 &ett_rsn_akms_tree,
14903 &ett_rsn_sub_akms_tree,
14905 &ett_rsn_pmkid_tree,
14906 &ett_rsn_gmcs_tree,
14909 &ett_ff_ba_param_tree,
14911 &ett_ff_sm_pwr_save,
14912 &ett_ff_psmp_param_set,
14913 &ett_ff_mimo_cntrl,
14915 &ett_ff_chan_switch_announce,
14917 &ett_ff_psmp_sta_info,
14918 &ett_ff_delba_param_tree,
14919 &ett_ff_ba_ssc_tree,
14921 &ett_cntrl_wrapper_fc,
14922 &ett_cntrl_wrapper_payload,
14923 &ett_ht_info_delimiter1_tree,
14924 &ett_ht_info_delimiter2_tree,
14925 &ett_ht_info_delimiter3_tree,
14926 &ett_msdu_aggregation_parent_tree,
14927 &ett_msdu_aggregation_subframe_tree,
14928 &ett_tag_measure_request_mode_tree,
14929 &ett_tag_measure_request_type_tree,
14930 &ett_tag_measure_report_mode_tree,
14931 &ett_tag_measure_report_type_tree,
14932 &ett_tag_measure_report_basic_map_tree,
14933 &ett_tag_measure_report_rpi_tree,
14934 &ett_tag_measure_report_frame_tree,
14936 &ett_tag_supported_channels,
14937 &ett_tag_neighbor_report_bssid_info_tree,
14938 &ett_tag_neighbor_report_bssid_info_capability_tree,
14939 &ett_tag_neighbor_report_sub_tag_tree,
14940 &ett_ampduparam_tree,
14943 &ett_htex_cap_tree,
14946 &ett_hta_cap1_tree,
14947 &ett_hta_cap2_tree,
14959 &ett_chan_noc_tree,
14960 &ett_wave_chnl_tree,
14962 &ett_adv_proto_tuple,
14966 module_t *wlan_module;
14968 memset (&wlan_stats, 0, sizeof wlan_stats);
14970 proto_aggregate = proto_register_protocol("IEEE 802.11 wireless LAN aggregate frame",
14971 "IEEE 802.11 Aggregate Data", "wlan_aggregate");
14972 proto_register_field_array(proto_aggregate, aggregate_fields, array_length(aggregate_fields));
14973 proto_wlan = proto_register_protocol ("IEEE 802.11 wireless LAN",
14974 "IEEE 802.11", "wlan");
14975 proto_register_field_array (proto_wlan, hf, array_length (hf));
14976 proto_wlan_mgt = proto_register_protocol ("IEEE 802.11 wireless LAN management frame",
14977 "802.11 MGT", "wlan_mgt");
14978 proto_register_field_array (proto_wlan_mgt, ff, array_length (ff));
14979 proto_register_subtree_array (tree_array, array_length (tree_array));
14981 register_dissector("wlan", dissect_ieee80211, proto_wlan);
14982 register_dissector("wlan_fixed", dissect_ieee80211_fixed, proto_wlan);
14983 register_dissector("wlan_bsfc", dissect_ieee80211_bsfc, proto_wlan);
14984 register_dissector("wlan_datapad", dissect_ieee80211_datapad, proto_wlan);
14985 register_dissector("wlan_ht", dissect_ieee80211_ht, proto_wlan);
14986 register_init_routine(wlan_defragment_init);
14987 register_init_routine(wlan_retransmit_init);
14989 proto_radio = proto_register_protocol("802.11 radio information", "Radio", "radio");
14991 proto_prism = proto_register_protocol("Prism capture header", "Prism", "prism");
14992 proto_register_field_array(proto_prism, hf_prism, array_length(hf_prism));
14994 proto_wlancap = proto_register_protocol("AVS WLAN Capture header",
14995 "AVS WLANCAP", "wlancap");
14996 proto_register_field_array(proto_wlancap, hf_wlancap, array_length(hf_wlancap));
14997 register_dissector("wlancap", dissect_wlancap, proto_wlancap);
14999 wlan_tap = register_tap("wlan");
15001 /* Register configuration options */
15002 wlan_module = prefs_register_protocol(proto_wlan, init_wepkeys);
15003 prefs_register_bool_preference(wlan_module, "defragment",
15004 "Reassemble fragmented 802.11 datagrams",
15005 "Whether fragmented 802.11 datagrams should be reassembled",
15008 prefs_register_bool_preference(wlan_module, "ignore_draft_ht",
15009 "Ignore vendor-specific HT elements",
15010 "Don't dissect 802.11n draft HT elements (which might contain duplicate information).",
15011 &wlan_ignore_draft_ht);
15013 prefs_register_bool_preference(wlan_module, "retransmitted",
15014 "Call subdissector for retransmitted 802.11 frames",
15015 "Whether retransmitted 802.11 frames should be subdissected",
15016 &wlan_subdissector);
15018 prefs_register_bool_preference(wlan_module, "check_fcs",
15019 "Assume packets have FCS",
15020 "Some 802.11 cards include the FCS at the end of a packet, others do not.",
15023 /* Davide Schiera (2006-11-26): changed "WEP bit" in "Protection bit" */
15024 /* (according to the document IEEE Std 802.11i-2004) */
15025 prefs_register_enum_preference(wlan_module, "ignore_wep",
15026 "Ignore the Protection bit",
15027 "Some 802.11 cards leave the Protection bit set even though the packet is decrypted, "
15028 "and some also leave the IV (initialization vector).",
15029 &wlan_ignore_wep, wlan_ignore_wep_options, TRUE);
15033 prefs_register_obsolete_preference(wlan_module, "wep_keys");
15035 #ifdef HAVE_AIRPDCAP
15036 /* Davide Schiera (2006-11-26): added reference to WPA/WPA2 decryption */
15037 prefs_register_bool_preference(wlan_module, "enable_decryption",
15038 "Enable decryption", "Enable WEP and WPA/WPA2 decryption",
15039 &enable_decryption);
15041 prefs_register_bool_preference(wlan_module, "enable_decryption",
15042 "Enable decryption", "Enable WEP decryption",
15043 &enable_decryption);
15046 #ifdef HAVE_AIRPDCAP
15047 prefs_register_static_text_preference(wlan_module, "info_decryption_key",
15048 "Key examples: 01:02:03:04:05 (40/64-bit WEP),\n"
15049 "010203040506070809101111213 (104/128-bit WEP),\n"
15050 "wpa-pwd:MyPassword[:MyAP] (WPA + plaintext password [+ SSID]),\n"
15051 "wpa-psk:0102030405...6061626364 (WPA + 256-bit key). "
15052 "Invalid keys will be ignored.",
15053 "Valid key formats");
15055 prefs_register_static_text_preference(wlan_module, "info_decryption_key",
15056 "Key examples: 01:02:03:04:05 (40/64-bit WEP),\n"
15057 "010203040506070809101111213 (104/128-bit WEP)",
15058 "Valid key formats");
15061 for (i = 0; i < MAX_ENCRYPTION_KEYS; i++) {
15062 key_name = g_string_new("");
15063 key_title = g_string_new("");
15064 key_desc = g_string_new("");
15065 wep_keystr[i] = NULL;
15066 /* prefs_register_*_preference() expects unique strings, so
15067 * we build them using g_string_printf and just leave them
15069 #ifdef HAVE_AIRPDCAP
15070 g_string_printf(key_name, "wep_key%d", i + 1);
15071 g_string_printf(key_title, "Key #%d", i + 1);
15072 /* Davide Schiera (2006-11-26): modified keys input tooltip */
15073 g_string_printf(key_desc,
15074 "Key #%d string can be:"
15075 " <wep hexadecimal key>;"
15076 " wep:<wep hexadecimal key>;"
15077 " wpa-pwd:<passphrase>[:<ssid>];"
15078 " wpa-psk:<wpa hexadecimal key>", i + 1);
15080 g_string_printf(key_name, "wep_key%d", i + 1);
15081 g_string_printf(key_title, "WEP key #%d", i + 1);
15082 g_string_printf(key_desc, "WEP key #%d can be:"
15083 " <wep hexadecimal key>;"
15084 " wep:<wep hexadecimal key>", i + 1);
15087 prefs_register_string_preference(wlan_module, key_name->str,
15088 key_title->str, key_desc->str, (const char **) &wep_keystr[i]);
15090 g_string_free(key_name, FALSE);
15091 g_string_free(key_title, FALSE);
15092 g_string_free(key_desc, FALSE);
15098 dissect_data_encap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
15102 int tagged_parameter_tree_len;
15103 proto_tree *tagged_tree;
15107 type = tvb_get_guint8(tvb, offset);
15108 proto_tree_add_item(tree, hf_ieee80211_data_encap_payload_type, tvb, offset,
15113 col_set_str(pinfo->cinfo, COL_PROTOCOL, "RRB");
15114 /* TODO: IEEE 802.11r */
15117 col_set_str(pinfo->cinfo, COL_PROTOCOL, "TDLS");
15118 col_clear(pinfo->cinfo, COL_INFO);
15119 offset += add_fixed_field(tree, tvb, offset, FIELD_ACTION);
15120 tagged_parameter_tree_len = tvb_reported_length_remaining(tvb, offset);
15121 if (tagged_parameter_tree_len != 0) {
15122 tagged_tree = get_tagged_parameter_tree(tree, tvb, offset,
15123 tagged_parameter_tree_len);
15124 ieee_80211_add_tagged_parameters(tvb, offset, pinfo, tagged_tree,
15125 tagged_parameter_tree_len);
15132 proto_reg_handoff_ieee80211(void)
15134 dissector_handle_t radio_handle;
15135 dissector_handle_t prism_handle;
15136 dissector_handle_t data_encap_handle;
15139 * Get handles for the LLC, IPX and Ethernet dissectors.
15141 llc_handle = find_dissector("llc");
15142 ipx_handle = find_dissector("ipx");
15143 eth_withoutfcs_handle = find_dissector("eth_withoutfcs");
15144 data_handle = find_dissector("data");
15146 ieee80211_handle = find_dissector("wlan");
15147 dissector_add_uint("wtap_encap", WTAP_ENCAP_IEEE_802_11, ieee80211_handle);
15148 dissector_add_uint("ethertype", ETHERTYPE_CENTRINO_PROMISC, ieee80211_handle);
15150 /* Register handoff to radio-header dissectors */
15151 radio_handle = create_dissector_handle(dissect_radio, proto_radio);
15152 dissector_add_uint("wtap_encap", WTAP_ENCAP_IEEE_802_11_WITH_RADIO, radio_handle);
15154 prism_handle = create_dissector_handle(dissect_prism, proto_prism);
15155 dissector_add_uint("wtap_encap", WTAP_ENCAP_PRISM_HEADER, prism_handle);
15157 wlancap_handle = create_dissector_handle(dissect_wlancap, proto_wlancap);
15158 dissector_add_uint("wtap_encap", WTAP_ENCAP_IEEE_802_11_WLAN_AVS, wlancap_handle);
15160 /* Register handoff to Aruba GRE */
15161 dissector_add_uint("gre.proto", GRE_ARUBA_8200, ieee80211_handle);
15162 dissector_add_uint("gre.proto", GRE_ARUBA_8210, ieee80211_handle);
15163 dissector_add_uint("gre.proto", GRE_ARUBA_8220, ieee80211_handle);
15164 dissector_add_uint("gre.proto", GRE_ARUBA_8230, ieee80211_handle);
15165 dissector_add_uint("gre.proto", GRE_ARUBA_8240, ieee80211_handle);
15166 dissector_add_uint("gre.proto", GRE_ARUBA_8250, ieee80211_handle);
15167 dissector_add_uint("gre.proto", GRE_ARUBA_8260, ieee80211_handle);
15168 dissector_add_uint("gre.proto", GRE_ARUBA_8270, ieee80211_handle);
15169 dissector_add_uint("gre.proto", GRE_ARUBA_8280, ieee80211_handle);
15170 dissector_add_uint("gre.proto", GRE_ARUBA_8290, ieee80211_handle);
15171 dissector_add_uint("gre.proto", GRE_ARUBA_82A0, ieee80211_handle);
15172 dissector_add_uint("gre.proto", GRE_ARUBA_82B0, ieee80211_handle);
15173 dissector_add_uint("gre.proto", GRE_ARUBA_82C0, ieee80211_handle);
15174 dissector_add_uint("gre.proto", GRE_ARUBA_82D0, ieee80211_handle);
15175 dissector_add_uint("gre.proto", GRE_ARUBA_82E0, ieee80211_handle);
15176 dissector_add_uint("gre.proto", GRE_ARUBA_82F0, ieee80211_handle);
15177 dissector_add_uint("gre.proto", GRE_ARUBA_8300, ieee80211_handle);
15178 dissector_add_uint("gre.proto", GRE_ARUBA_8310, ieee80211_handle);
15179 dissector_add_uint("gre.proto", GRE_ARUBA_8320, ieee80211_handle);
15180 dissector_add_uint("gre.proto", GRE_ARUBA_8330, ieee80211_handle);
15181 dissector_add_uint("gre.proto", GRE_ARUBA_8340, ieee80211_handle);
15182 dissector_add_uint("gre.proto", GRE_ARUBA_8350, ieee80211_handle);
15183 dissector_add_uint("gre.proto", GRE_ARUBA_8360, ieee80211_handle);
15184 dissector_add_uint("gre.proto", GRE_ARUBA_8370, ieee80211_handle);
15186 data_encap_handle = create_dissector_handle(dissect_data_encap, proto_wlan);
15187 dissector_add_uint("ethertype", ETHERTYPE_IEEE80211_DATA_ENCAP,
15188 data_encap_handle);
15191 #ifdef HAVE_AIRPDCAP
15192 /* Davide Schiera (2006-11-26): this function will try to decrypt with WEP or */
15193 /* WPA and return a tvb to the caller to add a new tab. It returns the */
15194 /* algorithm used for decryption (WEP, TKIP, CCMP) and the header and */
15195 /* trailer lengths. */
15197 try_decrypt(tvbuff_t *tvb, guint offset, guint len, guint8 *algorithm, guint32 *sec_header, guint32 *sec_trailer) {
15198 const guint8 *enc_data;
15199 guint8 *tmp = NULL;
15200 tvbuff_t *decr_tvb = NULL;
15201 guint32 dec_caplen;
15202 guchar dec_data[AIRPDCAP_MAX_CAPLEN];
15203 AIRPDCAP_KEY_ITEM used_key;
15205 if (!enable_decryption)
15208 /* get the entire packet */
15209 enc_data = tvb_get_ptr(tvb, 0, len+offset);
15211 /* process packet with AirPDcap */
15212 if (AirPDcapPacketProcess(&airpdcap_ctx, enc_data, offset, offset+len, dec_data, &dec_caplen, &used_key, FALSE, TRUE)==AIRPDCAP_RET_SUCCESS)
15214 *algorithm=used_key.KeyType;
15215 switch (*algorithm) {
15216 case AIRPDCAP_KEY_TYPE_WEP:
15217 *sec_header=AIRPDCAP_WEP_HEADER;
15218 *sec_trailer=AIRPDCAP_WEP_TRAILER;
15220 case AIRPDCAP_KEY_TYPE_CCMP:
15221 *sec_header=AIRPDCAP_RSNA_HEADER;
15222 *sec_trailer=AIRPDCAP_CCMP_TRAILER;
15224 case AIRPDCAP_KEY_TYPE_TKIP:
15225 *sec_header=AIRPDCAP_RSNA_HEADER;
15226 *sec_trailer=AIRPDCAP_TKIP_TRAILER;
15232 /* allocate buffer for decrypted payload */
15233 tmp = g_memdup(dec_data+offset, dec_caplen-offset);
15235 len=dec_caplen-offset;
15237 /* decrypt successful, let's set up a new data tvb. */
15238 decr_tvb = tvb_new_child_real_data(tvb, tmp, len, len);
15239 tvb_set_free_cb(decr_tvb, g_free);
15245 /* Davide Schiera ----------------------------------------------------------- */
15248 static tvbuff_t *try_decrypt_wep(tvbuff_t *tvb, guint32 offset, guint32 len) {
15249 const guint8 *enc_data;
15250 guint8 *tmp = NULL;
15252 tvbuff_t *decr_tvb = NULL;
15254 if (! enable_decryption)
15257 enc_data = tvb_get_ptr(tvb, offset, len);
15259 if ((tmp = g_malloc(len)) == NULL)
15260 return NULL; /* krap! */
15262 /* try once with the key index in the packet, then look through our list. */
15263 for (i = 0; i < num_wepkeys; i++) {
15264 /* copy the encrypted data over to the tmp buffer */
15266 printf("trying %d\n", i);
15268 memcpy(tmp, enc_data, len);
15269 if (wep_decrypt(tmp, len, i) == 0) {
15271 /* decrypt successful, let's set up a new data tvb. */
15272 decr_tvb = tvb_new_child_real_data(tvb, tmp, len-8, len-8);
15273 tvb_set_free_cb(decr_tvb, g_free);
15283 printf("de-wep %p\n", decr_tvb);
15291 * Convert a raw WEP key or one prefixed with "wep:" to a byte array.
15292 * Separators are allowed.
15294 /* XXX This is duplicated in epan/airpdcap.c:parse_key_string() */
15296 wep_str_to_bytes(const char *hex_str, GByteArray *bytes) {
15297 char *first_nibble = (char *) hex_str;
15299 if (g_ascii_strncasecmp(hex_str, STRING_KEY_TYPE_WEP ":", 4) == 0) {
15303 return hex_str_to_bytes(first_nibble, bytes, FALSE);
15306 /* Collect our WEP and WPA keys */
15307 #ifdef HAVE_AIRPDCAP
15309 void set_airpdcap_keys(void)
15312 AIRPDCAP_KEY_ITEM key;
15313 PAIRPDCAP_KEYS_COLLECTION keys;
15314 decryption_key_t* dk = NULL;
15315 GByteArray *bytes = NULL;
15317 gchar* tmpk = NULL;
15319 keys=(PAIRPDCAP_KEYS_COLLECTION)g_malloc(sizeof(AIRPDCAP_KEYS_COLLECTION));
15322 for(i = 0; i < MAX_ENCRYPTION_KEYS; i++)
15324 tmpk = g_strdup(wep_keystr[i]);
15326 dk = parse_key_string(tmpk);
15330 if(dk->type == AIRPDCAP_KEY_TYPE_WEP)
15332 key.KeyType = AIRPDCAP_KEY_TYPE_WEP;
15334 bytes = g_byte_array_new();
15335 res = wep_str_to_bytes(dk->key->str, bytes);
15337 if (dk->key->str && res && bytes->len > 0 && bytes->len <= AIRPDCAP_WEP_KEY_MAXLEN)
15340 * WEP key is correct (well, the can be even or odd, so it is not
15341 * a real check, I think... is a check performed somewhere in the
15342 * AirPDcap function??? )
15344 memcpy(key.KeyData.Wep.WepKey, bytes->data, bytes->len);
15345 key.KeyData.Wep.WepKeyLen = bytes->len;
15346 keys->Keys[keys->nKeys] = key;
15350 else if(dk->type == AIRPDCAP_KEY_TYPE_WPA_PWD)
15352 key.KeyType = AIRPDCAP_KEY_TYPE_WPA_PWD;
15354 /* XXX - This just lops the end if the key off if it's too long.
15355 * Should we handle this more gracefully? */
15356 g_strlcpy(key.UserPwd.Passphrase, dk->key->str, AIRPDCAP_WPA_PASSPHRASE_MAX_LEN+1);
15358 key.UserPwd.SsidLen = 0;
15359 if(dk->ssid != NULL && dk->ssid->len <= AIRPDCAP_WPA_SSID_MAX_LEN)
15361 memcpy(key.UserPwd.Ssid, dk->ssid->data, dk->ssid->len);
15362 key.UserPwd.SsidLen = dk->ssid->len;
15365 keys->Keys[keys->nKeys] = key;
15368 else if(dk->type == AIRPDCAP_KEY_TYPE_WPA_PMK)
15370 key.KeyType = AIRPDCAP_KEY_TYPE_WPA_PMK;
15372 bytes = g_byte_array_new();
15373 res = wep_str_to_bytes(dk->key->str, bytes);
15375 /* XXX - Pass the correct array of bytes... */
15376 if (bytes-> len <= AIRPDCAP_WPA_PMK_LEN) {
15377 memcpy(key.KeyData.Wpa.Pmk, bytes->data, bytes->len);
15379 keys->Keys[keys->nKeys] = key;
15387 /* Now set the keys */
15388 AirPDcapSetKeys(&airpdcap_ctx,keys->Keys,keys->nKeys);
15391 g_byte_array_free(bytes, TRUE);
15396 #ifndef HAVE_AIRPDCAP
15397 /* de-weps the block. if successful, buf* will point to the data start. */
15398 static int wep_decrypt(guint8 *buf, guint32 len, int keyidx) {
15399 guint32 i, j, k, crc, keylen;
15400 guint8 s[256], key[128], c_crc[4];
15401 guint8 *dpos, *cpos;
15403 /* Needs to be at least 8 bytes of payload */
15407 /* initialize the first bytes of the key from the IV */
15412 if (keyidx < 0 || keyidx >= num_wepkeys)
15415 keylen = wep_keylens[keyidx];
15419 if (wep_keys[keyidx] == NULL)
15422 keylen+=3; /* add in ICV bytes */
15424 /* copy the rest of the key over from the designated key */
15425 memcpy(key+3, wep_keys[keyidx], wep_keylens[keyidx]);
15428 printf("%d: %02x %02x %02x (%d %d) %02x:%02x:%02x:%02x:%02x\n", len, key[0], key[1], key[2], keyidx, keylen, key[3], key[4], key[5], key[6], key[7]);
15431 /* set up the RC4 state */
15432 for (i = 0; i < 256; i++)
15435 for (i = 0; i < 256; i++) {
15436 j = (j + s[i] + key[i % keylen]) & 0xff;
15440 /* Apply the RC4 to the data, update the CRC32 */
15445 for (k = 0; k < (len -8); k++) {
15447 j = (j+s[i]) & 0xff;
15450 printf("%d -- %02x ", k, *dpos);
15452 *dpos = *cpos++ ^ s[(s[i] + s[j]) & 0xff];
15454 printf("%02x\n", *dpos);
15456 crc = crc32_ccitt_table[(crc ^ *dpos++) & 0xff] ^ (crc >> 8);
15460 /* now let's check the crc */
15462 c_crc[1] = crc >> 8;
15463 c_crc[2] = crc >> 16;
15464 c_crc[3] = crc >> 24;
15466 for (k = 0; k < 4; k++) {
15467 i = (i + 1) & 0xff;
15468 j = (j+s[i]) & 0xff;
15471 printf("-- %02x %02x\n", *dpos, c_crc[k]);
15473 if ((*cpos++ ^ s[(s[i] + s[j]) & 0xff]) != c_crc[k])
15474 return -1; /* ICV mismatch */
15481 static void init_wepkeys(void) {
15482 #ifndef HAVE_AIRPDCAP
15489 for (i = 0; i < num_wepkeys; i++)
15490 g_free(wep_keys[i]);
15493 g_free(wep_keylens);
15498 tmp = getenv("WIRESHARK_WEPKEYNUM");
15503 num_wepkeys = atoi(tmp);
15505 if (num_wepkeys < 1)
15509 /* Figure out how many valid keys we have */
15510 bytes = g_byte_array_new();
15512 for ( i = 0; i < MAX_ENCRYPTION_KEYS; i++) {
15513 g_strstrip(wep_keystr[i]);
15514 res = wep_str_to_bytes(wep_keystr[i], bytes);
15515 if (wep_keystr[i] && res && bytes-> len > 0) {
15520 wep_keys = g_malloc0(num_wepkeys * sizeof(guint8*));
15521 wep_keylens = g_malloc(num_wepkeys * sizeof(int));
15523 for (i = 0, keyidx = 0; i < MAX_ENCRYPTION_KEYS && keyidx < num_wepkeys; i++) {
15524 wep_keys[keyidx] = NULL;
15525 wep_keylens[keyidx] = 0;
15528 buf = ep_strdup_printf("WIRESHARK_WEPKEY%d", i+1);
15531 tmp = wep_keystr[i];
15537 printf("%s -- %s\n", buf, tmp);
15539 printf("%d -- %s\n", i+1, tmp);
15543 g_free(wep_keys[keyidx]);
15545 res = wep_str_to_bytes(tmp, bytes);
15546 if (tmp && res && bytes->len > 0) {
15547 if (bytes->len > 32) {
15550 wep_keys[keyidx] = g_malloc0(32 * sizeof(guint8));
15551 memcpy(wep_keys[keyidx], bytes->data, bytes->len * sizeof(guint8));
15552 wep_keylens[keyidx] = bytes->len;
15555 printf("%d: %d bytes\n", i, bytes->len);
15556 printf("%d: %s\n", i, bytes_to_str(bytes->data, bytes->len));
15560 printf("res: %d bytes->len: %d\n", res, bytes->len);
15562 if (tmp[0] != 'w') /* Assume it begins with "wep:" or "wpa-*:" */
15563 g_warning("Could not parse WEP key %d: %s", i + 1, tmp);
15567 g_byte_array_free(bytes, TRUE);
15569 #else /* HAVE_AIRPDCAP defined */
15572 * XXX - AirPDcap - That God sends it to us beautiful (che dio ce la mandi bona)
15573 * The next lines will add a key to the AirPDcap context. The keystring will be added
15574 * to the old WEP array too, but we don't care, because the packets will come here
15575 * already decrypted... One of these days we will fix this too
15577 set_airpdcap_keys();
15578 #endif /* HAVE_AIRPDCAP */
15581 * This code had been taken from AirSnort crack.c function classify()
15582 * Permission granted by snax <at> shmoo dot com
15583 * weak_iv - determine which key byte an iv is useful in resolving
15584 * parm - p, pointer to the first byte of an IV
15585 * return - n - this IV is weak for byte n of a WEP key
15586 * -1 - this IV is not weak for any key bytes
15588 * This function tests for IVs that are known to satisfy the criteria
15589 * for a weak IV as specified in FMS section 7.1
15593 weak_iv(guchar *iv)
15597 if (iv[1] == 255 && iv[0] > 2 && iv[0] < 16) {
15601 sum = iv[0] + iv[1];
15603 if (iv[2] <= 0x0a) {
15606 else if (iv[2] == 0xff){
15611 if (sum == k && (iv[2] >= 0xf2 && iv[2] <= 0xfe && iv[2] != 0xfd)){
15621 * c-basic-offset: 2
15623 * indent-tabs-mode: nil
15626 * ex: set shiftwidth=2 tabstop=8 expandtab
15627 * :indentSize=2:tabSize=8:noTabs=true: