MSWSP: add two more Property Sets
[wireshark-wip.git] / epan / dissectors / packet-ieee80211.c
blob839a69b21309a84d42952336e0c9d79859ea28fb
1 /* packet-ieee80211.c
2 * Routines for Wireless LAN (IEEE 802.11) dissection
3 * Copyright 2000, Axis Communications AB
5 * $Id$
7 * Wireshark - Network traffic analyzer
8 * By Gerald Combs <gerald@wireshark.org>
9 * Copyright 1998 Gerald Combs
11 * This program is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License
13 * as published by the Free Software Foundation; either version 2
14 * of the License, or (at your option) any later version.
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, write to the Free Software
23 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
25 * Credits:
27 * The following people helped me by pointing out bugs etc. Thank you!
29 * Marco Molteni
30 * Lena-Marie Nilsson
31 * Magnus Hultman-Persson
35 * 09/12/2003 - Added dissection of country information tag
37 * Ritchie<at>tipsybottle.com
39 * 03/22/2004 - Added dissection of RSN IE
40 * Jouni Malinen <jkmaline@cc.hut.fi>
42 * 10/24/2005 - Add dissection for 802.11e
43 * Zhu Yi <yi.zhu@intel.com>
45 * Dutin Johnson - 802.11n and portions of 802.11k and 802.11ma
46 * dustin@dustinj.us & dustin.johnson@cacetech.com
48 * 01/31/2008 - Added dissection of 802.11s
49 * Javier Cardona <javier@cozybit.com>
51 * 04/21/2008 - Added dissection for 802.11p
52 * Arada Systems <http://www.aradasystems.com>
54 * 05/29/2011 - UATification of decryption keys
55 * Michael Mann <mmann78@netscape.net>
57 * 07/30/2011 - Update 802.11s packet dissecting to the ratified standard (v12.0)
58 * Brian Cavagnolo <brian@cozybit.com>
60 * Enhance 802.11 dissector by Alexis La Goutte
64 * Reference :
65 * The 802.11 standard is "free", 6 month after the publication.
67 * IEEE Std 802.11-2012: Revision of IEEE Std 802.11-2007
68 * include 10 amendments (802.11k,r,y,w,n,p,z,v,u,s) 802.11-2007
69 * include 8 amendments (802.11a,b,d,e,g,h,i,j) 802.11-1999
70 * http://standards.ieee.org/getieee802/download/802.11-2012.pdf
72 * WAPI (IE 68)
73 * http://isotc.iso.org/livelink/livelink/fetch/-8913189/8913214/8913250/8913253/JTC001-N-9880.pdf?nodeid=8500308&vernum=-2
77 #include "config.h"
79 #include <string.h>
80 #include <math.h>
82 #include <glib.h>
84 #include <epan/packet.h>
85 #include <epan/exceptions.h>
86 #include <wsutil/pint.h>
87 #include <epan/bitswap.h>
88 #include <epan/addr_resolv.h>
89 #include <epan/strutil.h>
90 #include <epan/prefs.h>
91 #include <epan/reassemble.h>
92 #include "packet-ipx.h"
93 #include "packet-llc.h"
94 #include "packet-ieee80211.h"
95 #include <epan/etypes.h>
96 #include <epan/greproto.h>
97 #include <epan/oui.h>
98 #include <wsutil/crc32.h>
99 #include <epan/crc32-tvb.h>
100 #include <epan/tap.h>
101 #include <epan/wmem/wmem.h>
102 #include <epan/crypt/wep-wpadefs.h>
103 #include <epan/expert.h>
104 #include <epan/uat.h>
106 #include "packet-wps.h"
108 /* Davide Schiera (2006-11-22): including AirPDcap project */
109 #include <epan/crypt/airpdcap_ws.h>
110 /* Davide Schiera (2006-11-22) ---------------------------------------------- */
112 extern value_string_ext eap_type_vals_ext; /* from packet-eap.c */
114 /* To Avoid Compilation warnings/errors because
115 * dissectors such as RIC will use this function recursively
117 static int add_tagged_field(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset, int ftype);
119 #ifndef roundup2
120 #define roundup2(x, y) (((x)+((y)-1))&(~((y)-1))) /* if y is powers of two */
121 #endif
123 /* Defragment fragmented 802.11 datagrams */
124 static gboolean wlan_defragment = TRUE;
126 /* call subdissector for retransmitted frames */
127 static gboolean wlan_subdissector = TRUE;
129 /* Check for the presence of the 802.11 FCS */
130 static gboolean wlan_check_fcs = FALSE;
132 /* Ignore vendor-specific HT elements */
133 static gboolean wlan_ignore_draft_ht = FALSE;
135 /* Ignore the WEP bit; assume packet is decrypted */
136 #define WLAN_IGNORE_WEP_NO 0
137 #define WLAN_IGNORE_WEP_WO_IV 1
138 #define WLAN_IGNORE_WEP_W_IV 2
139 static gint wlan_ignore_wep = WLAN_IGNORE_WEP_NO;
141 /* Table for reassembly of fragments. */
142 static reassembly_table wlan_reassembly_table;
144 /* Statistical data */
145 static struct _wlan_stats wlan_stats;
147 /*-------------------------------------
148 * UAT for WEP decoder
149 *-------------------------------------
151 static uat_wep_key_record_t *uat_wep_key_records = NULL;
152 static uat_t *wep_uat = NULL;
153 static guint num_wepkeys_uat = 0;
155 static void *
156 uat_wep_key_record_copy_cb(void* n, const void* o, size_t siz _U_)
158 uat_wep_key_record_t* new_key = (uat_wep_key_record_t *)n;
159 const uat_wep_key_record_t* old_key = (const uat_wep_key_record_t *)o;
161 if (old_key->string) {
162 new_key->string = g_strdup(old_key->string);
163 } else {
164 new_key->string = NULL;
167 return new_key;
170 static void
171 uat_wep_key_record_update_cb(void* r, const char** err)
173 uat_wep_key_record_t* rec = (uat_wep_key_record_t *)r;
174 decryption_key_t* dk;
176 if (rec->string == NULL) {
177 *err = g_strdup("Key can't be blank");
178 } else {
179 g_strstrip(rec->string);
180 dk = parse_key_string(rec->string, rec->key);
182 if (dk != NULL) {
183 switch (dk->type) {
184 case AIRPDCAP_KEY_TYPE_WEP:
185 case AIRPDCAP_KEY_TYPE_WEP_40:
186 case AIRPDCAP_KEY_TYPE_WEP_104:
187 if (rec->key != AIRPDCAP_KEY_TYPE_WEP) {
188 *err = g_strdup("Invalid key format");
190 break;
191 case AIRPDCAP_KEY_TYPE_WPA_PWD:
192 if (rec->key != AIRPDCAP_KEY_TYPE_WPA_PWD) {
193 *err = g_strdup("Invalid key format");
195 break;
196 case AIRPDCAP_KEY_TYPE_WPA_PSK:
197 if (rec->key != AIRPDCAP_KEY_TYPE_WPA_PSK) {
198 *err = g_strdup("Invalid key format");
200 break;
201 default:
202 *err = g_strdup("Invalid key format");
203 break;
205 } else {
206 *err = g_strdup("Invalid key format");
211 static void
212 uat_wep_key_record_free_cb(void*r)
214 uat_wep_key_record_t* key = (uat_wep_key_record_t *)r;
216 if (key->string) g_free(key->string);
219 UAT_VS_DEF(uat_wep_key_records, key, uat_wep_key_record_t, guint8, 0, STRING_KEY_TYPE_WEP)
220 UAT_CSTRING_CB_DEF(uat_wep_key_records, string, uat_wep_key_record_t)
222 /* Stuff for the WEP decoder */
223 static gboolean enable_decryption = FALSE;
225 /* Davide Schiera (2006-11-26): created function to decrypt WEP and WPA/WPA2 */
226 static tvbuff_t *try_decrypt(tvbuff_t *tvb, guint32 offset, guint32 len, guint8 *algorithm, guint32 *sec_header, guint32 *sec_trailer);
228 static int weak_iv(guchar *iv);
230 typedef struct mimo_control
232 guint8 nc;
233 guint8 nr;
234 gboolean chan_width;
235 guint8 grouping;
236 guint8 coefficient_size;
237 guint8 codebook_info;
238 guint8 remaining_matrix_segment;
239 } mimo_control_t;
241 /* ************************************************************************* */
242 /* Miscellaneous Constants */
243 /* ************************************************************************* */
244 #define SHORT_STR 256
246 /* ************************************************************************* */
247 /* Define some very useful macros that are used to analyze frame types etc. */
248 /* ************************************************************************* */
251 * Fetch the frame control field and swap it if needed. "fcf" and "tvb"
252 * must be valid variables.
254 #define FETCH_FCF(off) (wlan_broken_fc ? \
255 BSWAP16(tvb_get_letohs(tvb, off)) : \
256 tvb_get_letohs(tvb, off))
259 * Extract the protocol version from the frame control field
261 #define FCF_PROT_VERSION(x) ((x) & 0x3)
264 * Extract the frame type from the frame control field.
266 #define FCF_FRAME_TYPE(x) (((x) & 0xC) >> 2)
269 * Extract the frame subtype from the frame control field.
271 #define FCF_FRAME_SUBTYPE(x) (((x) & 0xF0) >> 4)
274 * Convert the frame type and subtype from the frame control field into
275 * one of the MGT_, CTRL_, or DATA_ values.
277 #define COMPOSE_FRAME_TYPE(x) (((x & 0x0C)<< 2)+FCF_FRAME_SUBTYPE(x)) /* Create key to (sub)type */
280 * The subtype field of a data frame is, in effect, composed of 4 flag
281 * bits - CF-Ack, CF-Poll, Null (means the frame doesn't actually have
282 * any data), and QoS.
284 #define DATA_FRAME_IS_CF_ACK(x) ((x) & 0x01)
285 #define DATA_FRAME_IS_CF_POLL(x) ((x) & 0x02)
286 #define DATA_FRAME_IS_NULL(x) ((x) & 0x04)
287 #define DATA_FRAME_IS_QOS(x) ((x) & 0x08)
290 * Extract the flags from the frame control field.
292 #define FCF_FLAGS(x) (((x) & 0xFF00) >> 8)
295 * Bits from the flags field.
297 #define FLAG_TO_DS 0x01
298 #define FLAG_FROM_DS 0x02
299 #define FLAG_MORE_FRAGMENTS 0x04
300 #define FLAG_RETRY 0x08
301 #define FLAG_POWER_MGT 0x10
302 #define FLAG_MORE_DATA 0x20
303 #define FLAG_PROTECTED 0x40
304 #define FLAG_ORDER 0x80
307 * Test bits in the flags field.
310 * XXX - Only HAVE_FRAGMENTS, IS_PROTECTED, and IS_STRICTLY_ORDERED
311 * are in use. Should the rest be removed?
313 #define IS_TO_DS(x) ((x) & FLAG_TO_DS)
314 #define IS_FROM_DS(x) ((x) & FLAG_FROM_DS)
315 #define HAVE_FRAGMENTS(x) ((x) & FLAG_MORE_FRAGMENTS)
316 #define IS_RETRY(x) ((x) & FLAG_RETRY)
317 #define POWER_MGT_STATUS(x) ((x) & FLAG_POWER_MGT)
318 #define HAS_MORE_DATA(x) ((x) & FLAG_MORE_DATA)
319 #define IS_PROTECTED(x) ((x) & FLAG_PROTECTED)
320 #define IS_STRICTLY_ORDERED(x) ((x) & FLAG_ORDER)
323 * Extract subfields from the flags field.
325 #define FLAGS_DS_STATUS(x) ((x) & (FLAG_FROM_DS|FLAG_TO_DS))
328 * Extract an indication of the types of addresses in a data frame from
329 * the frame control field.
331 #define FCF_ADDR_SELECTOR(x) ((x) & ((FLAG_TO_DS|FLAG_FROM_DS) << 8))
333 #define DATA_ADDR_T1 0
334 #define DATA_ADDR_T2 (FLAG_FROM_DS << 8)
335 #define DATA_ADDR_T3 (FLAG_TO_DS << 8)
336 #define DATA_ADDR_T4 ((FLAG_TO_DS|FLAG_FROM_DS) << 8)
339 * Extract the fragment number and sequence number from the sequence
340 * control field.
342 #define SEQCTL_FRAGMENT_NUMBER(x) ((x) & 0x000F)
343 #define SEQCTL_SEQUENCE_NUMBER(x) (((x) & 0xFFF0) >> 4)
346 * Extract subfields from the QoS control field.
348 #define QOS_TID(x) ((x) & 0x000F)
349 #define QOS_PRIORITY(x) ((x) & 0x0007)
350 #define QOS_EOSP(x) (((x) & 0x0010) >> 4) /* end of service period */
351 #define QOS_ACK_POLICY(x) (((x) & 0x0060) >> 5)
352 #define QOS_AMSDU_PRESENT(x) (((x) & 0x0080) >> 6)
353 #define QOS_FIELD_CONTENT(x) (((x) & 0xFF00) >> 8)
354 #define QOS_MESH_CONTROL_PRESENT(x) (((x) & 0x0100) >> 8)
356 #define QOS_FLAG_EOSP 0x0010
359 * Extract subfields from the result of QOS_FIELD_CONTENT().
361 #define QOS_PS_BUF_STATE_INDICATED(x) (((x) & 0x02) >> 1)
362 #define QOS_PS_HIGHEST_PRI_BUF_AC(x) (((x) & 0x0C) >> 2)
363 #define QOS_PS_QAP_BUF_LOAD(x) (((x) & 0xF0) >> 4)
366 * Extract subfields from the HT Control field.
367 * .11n D-1.10 & D-2.0, 7.1.3.5a, 32 bits.
369 #define HTC_LAC(htc) ((htc) & 0xFF)
370 #define HTC_LAC_MAI(htc) (((htc) >> 2) & 0xF)
371 #define HTC_IS_ASELI(htc) (HTC_LAC_MAI(htc) == 0xE)
372 #define HTC_LAC_MAI_MRQ(htc) ((HTC_LAC_MAI(htc)) & 0x1)
373 #define HTC_LAC_MAI_MSI(htc) ((HTC_LAC_MAI(htc) >> 1) & 0x7)
374 #define HTC_LAC_MFSI(htc) (((htc) >> 4) & 0x7)
375 #define HTC_LAC_ASEL_CMD(htc) (((htc) >> 9) & 0x7)
376 #define HTC_LAC_ASEL_DATA(htc) (((htc) >> 12) & 0xF)
377 #define HTC_LAC_MFB(htc) (((htc) >> 9) & 0x7F)
378 #define HTC_CAL_POS(htc) (((htc) >> 16) & 0x3)
379 #define HTC_CAL_SEQ(htc) (((htc) >> 18) & 0x3)
380 #define HTC_CSI_STEERING(htc) (((htc) >> 22) & 0x3)
381 #define HTC_NDP_ANN(htc) (((htc) >> 24) & 0x1)
382 #define HTC_AC_CONSTRAINT(htc) (((htc) >> 30) & 0x1)
383 #define HTC_RDG_MORE_PPDU(htc) (((htc) >> 31) & 0x1)
386 * Extract subfields from the key octet in WEP-encrypted frames.
388 #define KEY_OCTET_WEP_KEY(x) (((x) & 0xC0) >> 6)
390 #define KEY_EXTIV 0x20
391 #define EXTIV_LEN 8
394 * Bits from the Mesh Flags field
396 #define MESH_FLAGS_ADDRESS_EXTENSION 0x3
398 /* ************************************************************************* */
399 /* Constants used to identify cooked frame types */
400 /* ************************************************************************* */
401 #define MGT_FRAME 0x00 /* Frame type is management */
402 #define CONTROL_FRAME 0x01 /* Frame type is control */
403 #define DATA_FRAME 0x02 /* Frame type is Data */
405 #define DATA_SHORT_HDR_LEN 24
406 #define DATA_LONG_HDR_LEN 30
407 #define MGT_FRAME_HDR_LEN 24 /* Length of Management frame-headers */
410 * COMPOSE_FRAME_TYPE() values for management frames.
412 #define MGT_ASSOC_REQ 0x00 /* association request */
413 #define MGT_ASSOC_RESP 0x01 /* association response */
414 #define MGT_REASSOC_REQ 0x02 /* reassociation request */
415 #define MGT_REASSOC_RESP 0x03 /* reassociation response */
416 #define MGT_PROBE_REQ 0x04 /* Probe request */
417 #define MGT_PROBE_RESP 0x05 /* Probe response */
418 #define MGT_MEASUREMENT_PILOT 0x06 /* Measurement Pilot */
419 #define MGT_BEACON 0x08 /* Beacon frame */
420 #define MGT_ATIM 0x09 /* ATIM */
421 #define MGT_DISASS 0x0A /* Disassociation */
422 #define MGT_AUTHENTICATION 0x0B /* Authentication */
423 #define MGT_DEAUTHENTICATION 0x0C /* Deauthentication */
424 #define MGT_ACTION 0x0D /* Action */
425 #define MGT_ACTION_NO_ACK 0x0E /* Action No Ack */
426 #define MGT_ARUBA_WLAN 0x0F /* Aruba WLAN Specific */
429 * COMPOSE_FRAME_TYPE() values for control frames.
431 #define CTRL_VHT_NDP_ANNC 0x15 /* VHT NDP Announcement */
432 #define CTRL_CONTROL_WRAPPER 0x17 /* Control Wrapper */
433 #define CTRL_BLOCK_ACK_REQ 0x18 /* Block ack Request */
434 #define CTRL_BLOCK_ACK 0x19 /* Block ack */
435 #define CTRL_PS_POLL 0x1A /* power-save poll */
436 #define CTRL_RTS 0x1B /* request to send */
437 #define CTRL_CTS 0x1C /* clear to send */
438 #define CTRL_ACKNOWLEDGEMENT 0x1D /* acknowledgement */
439 #define CTRL_CFP_END 0x1E /* contention-free period end */
440 #define CTRL_CFP_ENDACK 0x1F /* contention-free period end/ack */
443 * COMPOSE_FRAME_TYPE() values for data frames.
445 #define DATA 0x20 /* Data */
446 #define DATA_CF_ACK 0x21 /* Data + CF-Ack */
447 #define DATA_CF_POLL 0x22 /* Data + CF-Poll */
448 #define DATA_CF_ACK_POLL 0x23 /* Data + CF-Ack + CF-Poll */
449 #define DATA_NULL_FUNCTION 0x24 /* Null function (no data) */
450 #define DATA_CF_ACK_NOD 0x25 /* CF-Ack (no data) */
451 #define DATA_CF_POLL_NOD 0x26 /* CF-Poll (No data) */
452 #define DATA_CF_ACK_POLL_NOD 0x27 /* CF-Ack + CF-Poll (no data) */
454 #define DATA_QOS_DATA 0x28 /* QoS Data */
455 #define DATA_QOS_DATA_CF_ACK 0x29 /* QoS Data + CF-Ack */
456 #define DATA_QOS_DATA_CF_POLL 0x2A /* QoS Data + CF-Poll */
457 #define DATA_QOS_DATA_CF_ACK_POLL 0x2B /* QoS Data + CF-Ack + CF-Poll */
458 #define DATA_QOS_NULL 0x2C /* QoS Null */
459 #define DATA_QOS_CF_POLL_NOD 0x2E /* QoS CF-Poll (No Data) */
460 #define DATA_QOS_CF_ACK_POLL_NOD 0x2F /* QoS CF-Ack + CF-Poll (No Data) */
463 /* ************************************************************************* */
464 /* Logical field codes (dissector's encoding of fixed fields) */
465 /* ************************************************************************* */
466 enum fixed_field {
467 FIELD_TIMESTAMP, /* 64-bit timestamp */
468 FIELD_BEACON_INTERVAL, /* 16-bit beacon interval */
469 FIELD_CAP_INFO, /* Add capability information tree */
470 FIELD_AUTH_ALG, /* Authentication algorithm used */
471 FIELD_AUTH_TRANS_SEQ, /* Authentication sequence number */
472 FIELD_CURRENT_AP_ADDR,
473 FIELD_LISTEN_IVAL,
474 FIELD_REASON_CODE,
475 FIELD_ASSOC_ID,
476 FIELD_STATUS_CODE,
477 FIELD_CATEGORY_CODE, /* Management action category */
478 FIELD_ACTION_CODE, /* Management action code */
479 FIELD_DIALOG_TOKEN, /* Management action dialog token */
480 FIELD_WME_ACTION_CODE, /* Management notification action code */
481 FIELD_WME_DIALOG_TOKEN, /* Management notification dialog token */
482 FIELD_WME_STATUS_CODE, /* Management notification setup response status code */
483 FIELD_QOS_ACTION_CODE,
484 FIELD_QOS_TS_INFO,
485 FIELD_DLS_ACTION_CODE,
486 FIELD_DST_MAC_ADDR, /* DLS destination MAC address */
487 FIELD_SRC_MAC_ADDR, /* DLS source MAC address */
488 FIELD_DLS_TIMEOUT, /* DLS timeout value */
489 FIELD_SCHEDULE_INFO, /* Schedule Info field */
490 FIELD_ACTION, /* Action field */
491 FIELD_BLOCK_ACK_ACTION_CODE,
492 FIELD_QOS_INFO_AP,
493 FIELD_QOS_INFO_STA,
494 FIELD_BLOCK_ACK_PARAM,
495 FIELD_BLOCK_ACK_TIMEOUT,
496 FIELD_BLOCK_ACK_SSC,
497 FIELD_DELBA_PARAM_SET,
498 FIELD_MAX_REG_PWR,
499 FIELD_MEASUREMENT_PILOT_INT,
500 FIELD_COUNTRY_STR,
501 FIELD_MAX_TX_PWR,
502 FIELD_TX_PWR_USED,
503 FIELD_TRANSCEIVER_NOISE_FLOOR,
504 FIELD_DS_PARAM_SET,
505 FIELD_CHANNEL_WIDTH,
506 FIELD_SM_PWR_CNTRL,
507 FIELD_PCO_PHASE_CNTRL,
508 FIELD_PSMP_PARAM_SET,
509 FIELD_PSMP_STA_INFO,
510 FIELD_MIMO_CNTRL,
511 FIELD_ANT_SELECTION,
512 FIELD_EXTENDED_CHANNEL_SWITCH_ANNOUNCEMENT,
513 FIELD_HT_INFORMATION,
514 FIELD_HT_ACTION_CODE,
515 FIELD_PA_ACTION_CODE,
516 FIELD_FT_ACTION_CODE,
517 FIELD_STA_ADDRESS,
518 FIELD_TARGET_AP_ADDRESS,
519 FIELD_GAS_COMEBACK_DELAY,
520 FIELD_GAS_FRAGMENT_ID,
521 FIELD_SA_QUERY_ACTION_CODE,
522 FIELD_TRANSACTION_ID,
523 FIELD_TDLS_ACTION_CODE,
524 FIELD_TARGET_CHANNEL,
525 FIELD_REGULATORY_CLASS,
526 FIELD_MESH_ACTION,
527 FIELD_MULTIHOP_ACTION,
528 FIELD_MESH_CONTROL,
529 FIELD_SELFPROT_ACTION,
530 FIELD_WNM_ACTION_CODE,
531 FIELD_KEY_DATA_LENGTH,
532 FIELD_WNM_NOTIFICATION_TYPE,
533 FIELD_RM_ACTION_CODE,
534 FIELD_RM_DIALOG_TOKEN,
535 FIELD_RM_REPETITIONS,
536 FIELD_RM_TX_POWER,
537 FIELD_RM_MAX_TX_POWER,
538 FIELD_RM_TPC_REPORT,
539 FIELD_RM_RX_ANTENNA_ID,
540 FIELD_RM_TX_ANTENNA_ID,
541 FIELD_RM_RCPI,
542 FIELD_RM_RSNI,
543 /* add any new fixed field value above this line */
544 MAX_FIELD_NUM
547 /* ************************************************************************* */
548 /* Logical field codes (IEEE 802.11 encoding of tags) */
549 /* ************************************************************************* */
550 #define TAG_SSID 0
551 #define TAG_SUPP_RATES 1
552 #define TAG_FH_PARAMETER 2
553 #define TAG_DS_PARAMETER 3
554 #define TAG_CF_PARAMETER 4
555 #define TAG_TIM 5
556 #define TAG_IBSS_PARAMETER 6
557 #define TAG_COUNTRY_INFO 7
558 #define TAG_FH_HOPPING_PARAMETER 8
559 #define TAG_FH_HOPPING_TABLE 9
560 #define TAG_REQUEST 10
561 #define TAG_QBSS_LOAD 11
562 #define TAG_EDCA_PARAM_SET 12
563 #define TAG_TSPEC 13
564 #define TAG_TCLAS 14
565 #define TAG_SCHEDULE 15
566 #define TAG_CHALLENGE_TEXT 16
568 #define TAG_POWER_CONSTRAINT 32
569 #define TAG_POWER_CAPABILITY 33
570 #define TAG_TPC_REQUEST 34
571 #define TAG_TPC_REPORT 35
572 #define TAG_SUPPORTED_CHANNELS 36
573 #define TAG_CHANNEL_SWITCH_ANN 37
574 #define TAG_MEASURE_REQ 38
575 #define TAG_MEASURE_REP 39
576 #define TAG_QUIET 40
577 #define TAG_IBSS_DFS 41
578 #define TAG_ERP_INFO 42
579 #define TAG_TS_DELAY 43
580 #define TAG_TCLAS_PROCESS 44
581 #define TAG_HT_CAPABILITY 45 /* IEEE Stc 802.11n/D2.0 */
582 #define TAG_QOS_CAPABILITY 46
583 #define TAG_ERP_INFO_OLD 47 /* IEEE Std 802.11g/D4.0 */
584 #define TAG_RSN_IE 48
585 /* Reserved 49 */
586 #define TAG_EXT_SUPP_RATES 50
587 #define TAG_AP_CHANNEL_REPORT 51
588 #define TAG_NEIGHBOR_REPORT 52
589 #define TAG_RCPI 53
590 #define TAG_MOBILITY_DOMAIN 54 /* IEEE Std 802.11r-2008 */
591 #define TAG_FAST_BSS_TRANSITION 55 /* IEEE Std 802.11r-2008 */
592 #define TAG_TIMEOUT_INTERVAL 56 /* IEEE Std 802.11r-2008 */
593 #define TAG_RIC_DATA 57 /* IEEE Std 802.11r-2008 */
594 #define TAG_DSE_REG_LOCATION 58
595 #define TAG_SUPPORTED_REGULATORY_CLASSES 59 /* IEEE Std 802.11w-2009 */
596 #define TAG_EXTENDED_CHANNEL_SWITCH_ANNOUNCEMENT 60 /* IEEE Std 802.11w-2009 */
597 #define TAG_HT_INFO 61 /* IEEE Stc 802.11n/D2.0 */
598 #define TAG_SECONDARY_CHANNEL_OFFSET 62 /* IEEE Stc 802.11n/D1.10/D2.0 */
599 #define TAG_BSS_AVG_ACCESS_DELAY 63
600 #define TAG_ANTENNA 64
601 #define TAG_RSNI 65
602 #define TAG_MEASURE_PILOT_TRANS 66
603 #define TAG_BSS_AVB_ADM_CAPACITY 67
604 #define TAG_IE_68_CONFLICT 68 /* Conflict: WAPI Vs. IEEE */
605 #define TAG_WAPI_PARAM_SET 68
606 #define TAG_BSS_AC_ACCESS_DELAY 68
607 #define TAG_TIME_ADV 69 /* IEEE Std 802.11p-2010 */
608 #define TAG_RM_ENABLED_CAPABILITY 70
609 #define TAG_MULTIPLE_BSSID 71
610 #define TAG_20_40_BSS_CO_EX 72 /* IEEE P802.11n/D6.0 */
611 #define TAG_20_40_BSS_INTOL_CH_REP 73 /* IEEE P802.11n/D6.0 */
612 #define TAG_OVERLAP_BSS_SCAN_PAR 74 /* IEEE P802.11n/D6.0 */
613 #define TAG_RIC_DESCRIPTOR 75 /* IEEE Std 802.11r-2008 */
614 #define TAG_MMIE 76 /* IEEE Std 802.11w-2009 */
615 #define TAG_EVENT_REQUEST 78
616 #define TAG_EVENT_REPORT 79
617 #define TAG_DIAGNOSTIC_REQUEST 80
618 #define TAG_DIAGNOSTIC_REPORT 81
619 #define TAG_LOCATION_PARAMETERS 82
620 #define TAG_NO_BSSID_CAPABILITY 83
621 #define TAG_SSID_LIST 84
622 #define TAG_MULTIPLE_BSSID_INDEX 85
623 #define TAG_FMS_DESCRIPTOR 86
624 #define TAG_FMS_REQUEST 87
625 #define TAG_FMS_RESPONSE 88
626 #define TAG_QOS_TRAFFIC_CAPABILITY 89
627 #define TAG_BSS_MAX_IDLE_PERIOD 90
628 #define TAG_TFS_REQUEST 91
629 #define TAG_TFS_RESPONSE 92
630 #define TAG_WNM_SLEEP_MODE 93
631 #define TAG_TIM_BROADCAST_REQUEST 94
632 #define TAG_TIM_BROADCAST_RESPONSE 95
633 #define TAG_COLLOCATED_INTER_REPORT 96
634 #define TAG_CHANNEL_USAGE 97
635 #define TAG_TIME_ZONE 98 /* IEEE Std 802.11v-2011 */
636 #define TAG_DMS_REQUEST 99
637 #define TAG_DMS_RESPONSE 100
638 #define TAG_LINK_IDENTIFIER 101 /* IEEE Std 802.11z-2010 */
639 #define TAG_WAKEUP_SCHEDULE 102 /* IEEE Std 802.11z-2010 */
640 #define TAG_CHANNEL_SWITCH_TIMING 104 /* IEEE Std 802.11z-2010 */
641 #define TAG_PTI_CONTROL 105 /* IEEE Std 802.11z-2010 */
642 #define TAG_PU_BUFFER_STATUS 106 /* IEEE Std 802.11z-2010 */
643 #define TAG_INTERWORKING 107 /* IEEE Std 802.11u-2011 */
644 #define TAG_ADVERTISEMENT_PROTOCOL 108 /* IEEE Std 802.11u-2011 */
645 #define TAG_EXPIDITED_BANDWIDTH_REQ 109 /* IEEE Std 802.11u-2011 */
646 #define TAG_QOS_MAP_SET 110 /* IEEE Std 802.11u-2011 */
647 #define TAG_ROAMING_CONSORTIUM 111 /* IEEE Std 802.11u-2011 */
648 #define TAG_EMERGENCY_ALERT_ID 112 /* IEEE Std 802.11u-2011 */
649 #define TAG_MESH_CONFIGURATION 113 /* IEEE Std 802.11s-2011 */
650 #define TAG_MESH_ID 114 /* IEEE Std 802.11s-2011 */
651 #define TAG_MESH_LINK_METRIC_REPORT 115
652 #define TAG_CONGESTION_NOTIFICATION 116
653 #define TAG_MESH_PEERING_MGMT 117 /* IEEE Std 802.11s-2011 */
654 #define TAG_MESH_CHANNEL_SWITCH 118
655 #define TAG_MESH_AWAKE_WINDOW 119
656 #define TAG_BEACON_TIMING 120
657 #define TAG_MCCAOP_SETUP_REQUEST 121
658 #define TAG_MCCAOP_SETUP_REPLY 122
659 #define TAG_MCCAOP_ADVERTISSEMENT 123
660 #define TAG_MCCAOP_TEARDOWN 124
661 #define TAG_GANN 125
662 #define TAG_RANN 126 /* IEEE Std 802.11s-2011 */
663 #define TAG_EXTENDED_CAPABILITIES 127 /* IEEE Stc 802.11n/D1.10/D2.0 */
664 #define TAG_AGERE_PROPRIETARY 128
665 #define TAG_MESH_PREQ 130 /* IEEE Std 802.11s-2011 */
666 #define TAG_MESH_PREP 131 /* IEEE Std 802.11s-2011 */
667 #define TAG_MESH_PERR 132 /* IEEE Std 802.11s-2011 */
668 #define TAG_CISCO_CCX1_CKIP 133 /* Cisco Compatible eXtensions v1 */
669 #define TAG_CISCO_CCX2 136 /* Cisco Compatible eXtensions v2 */
670 #define TAG_PXU 137
671 #define TAG_PXUC 138
672 #define TAG_AUTH_MESH_PEERING_EXCH 139
673 #define TAG_MIC 140
674 #define TAG_DESTINATION_URI 141
675 #define TAG_U_APSD_COEX 142
676 #define TAG_CISCO_CCX3 149 /* Cisco Compatible eXtensions v3 */
677 #define TAG_CISCO_VENDOR_SPECIFIC 150 /* Cisco Compatible eXtensions */
678 #define TAG_SYMBOL_PROPRIETARY 173
679 #define TAG_MCCAOP_ADVERTISSEMENT_OV 174
680 #define TAG_VHT_CAPABILITY 191 /* IEEE Std 802.11ac/D3.1 */
681 #define TAG_VHT_OPERATION 192 /* IEEE Std 802.11ac/D3.1 */
682 #define TAG_VHT_TX_PWR_ENVELOPE 195 /* IEEE Std 802.11ac/D5.0 */
683 #define TAG_VENDOR_SPECIFIC_IE 221
685 static const value_string tag_num_vals[] = {
686 { TAG_SSID, "SSID parameter set" },
687 { TAG_SUPP_RATES, "Supported Rates" },
688 { TAG_FH_PARAMETER, "FH Parameter set" },
689 { TAG_DS_PARAMETER, "DS Parameter set" },
690 { TAG_CF_PARAMETER, "CF Parameter set" },
691 { TAG_TIM, "Traffic Indication Map (TIM)" },
692 { TAG_IBSS_PARAMETER, "IBSS Parameter set" },
693 { TAG_COUNTRY_INFO, "Country Information" },
694 { TAG_FH_HOPPING_PARAMETER, "Hopping Pattern Parameters" },
695 { TAG_FH_HOPPING_TABLE, "Hopping Pattern Table" },
696 { TAG_REQUEST, "Request" },
697 { TAG_QBSS_LOAD, "QBSS Load Element" },
698 { TAG_EDCA_PARAM_SET, "EDCA Parameter Set" },
699 { TAG_TSPEC, "Traffic Specification" },
700 { TAG_TCLAS, "Traffic Classification" },
701 { TAG_SCHEDULE, "Schedule" },
702 { TAG_CHALLENGE_TEXT, "Challenge text" },
703 { TAG_POWER_CONSTRAINT, "Power Constraint" },
704 { TAG_POWER_CAPABILITY, "Power Capability" },
705 { TAG_TPC_REQUEST, "TPC Request" },
706 { TAG_TPC_REPORT, "TPC Report" },
707 { TAG_SUPPORTED_CHANNELS, "Supported Channels" },
708 { TAG_CHANNEL_SWITCH_ANN, "Channel Switch Announcement" },
709 { TAG_MEASURE_REQ, "Measurement Request" },
710 { TAG_MEASURE_REP, "Measurement Report" },
711 { TAG_QUIET, "Quiet" },
712 { TAG_IBSS_DFS, "IBSS DFS" },
713 { TAG_ERP_INFO, "ERP Information" },
714 { TAG_TS_DELAY, "TS Delay" },
715 { TAG_TCLAS_PROCESS, "TCLAS Processing" },
716 { TAG_HT_CAPABILITY, "HT Capabilities (802.11n D1.10)" },
717 { TAG_QOS_CAPABILITY, "QoS Capability" },
718 { TAG_ERP_INFO_OLD, "ERP Information" }, /* Reserved... */
719 { TAG_RSN_IE, "RSN Information" },
720 { TAG_EXT_SUPP_RATES, "Extended Supported Rates" },
721 { TAG_AP_CHANNEL_REPORT, "AP Channel Report" },
722 { TAG_NEIGHBOR_REPORT, "Neighbor Report" },
723 { TAG_RCPI, "RCPI" },
724 { TAG_MOBILITY_DOMAIN, "Mobility Domain" },
725 { TAG_FAST_BSS_TRANSITION, "Fast BSS Transition" },
726 { TAG_TIMEOUT_INTERVAL, "Timeout Interval" },
727 { TAG_RIC_DATA, "RIC Data" },
728 { TAG_DSE_REG_LOCATION, "DSE Registered Location" },
729 { TAG_SUPPORTED_REGULATORY_CLASSES, "Supported Regulatory Classes" },
730 { TAG_EXTENDED_CHANNEL_SWITCH_ANNOUNCEMENT, "Extended Channel Switch Announcement" },
731 { TAG_HT_INFO, "HT Information (802.11n D1.10)" },
732 { TAG_SECONDARY_CHANNEL_OFFSET, "Secondary Channel Offset (802.11n D1.10)" },
733 { TAG_BSS_AVG_ACCESS_DELAY, "BSS Average Access Delay" },
734 { TAG_ANTENNA, "Antenna" },
735 { TAG_RSNI, "RSNI" },
736 { TAG_MEASURE_PILOT_TRANS, "Measurement Pilot Transmission" },
737 { TAG_BSS_AVB_ADM_CAPACITY, "BSS Available Admission Capacity" },
738 { TAG_IE_68_CONFLICT, "BSS AC Access Delay/WAPI Parameter Set" },
739 { TAG_TIME_ADV, "Time Advertisement" },
740 { TAG_RM_ENABLED_CAPABILITY, "RM Enabled Capabilities" },
741 { TAG_MULTIPLE_BSSID, "Multiple BSSID" },
742 { TAG_20_40_BSS_CO_EX, "20/40 BSS Coexistence" },
743 { TAG_20_40_BSS_INTOL_CH_REP, "20/40 BSS Intolerant Channel Report" }, /* IEEE P802.11n/D6.0 */
744 { TAG_OVERLAP_BSS_SCAN_PAR, "Overlapping BSS Scan Parameters" }, /* IEEE P802.11n/D6.0 */
745 { TAG_RIC_DESCRIPTOR, "RIC Descriptor" },
746 { TAG_MMIE, "Management MIC" },
747 { TAG_EVENT_REQUEST, "Event Request" },
748 { TAG_EVENT_REPORT, "Event Report" },
749 { TAG_DIAGNOSTIC_REQUEST, "Diagnostic Request" },
750 { TAG_DIAGNOSTIC_REPORT, "Diagnostic Report" },
751 { TAG_LOCATION_PARAMETERS, "Location Parameters" },
752 { TAG_NO_BSSID_CAPABILITY, "Non Transmitted BSSID Capability" },
753 { TAG_SSID_LIST, "SSID List" },
754 { TAG_MULTIPLE_BSSID_INDEX, "Multiple BSSID Index" },
755 { TAG_FMS_DESCRIPTOR, "FMS Descriptor" },
756 { TAG_FMS_REQUEST, "FMS Request" },
757 { TAG_FMS_RESPONSE, "FMS Response" },
758 { TAG_QOS_TRAFFIC_CAPABILITY, "QoS Traffic Capability" },
759 { TAG_BSS_MAX_IDLE_PERIOD, "BSS Max Idle Period" },
760 { TAG_TFS_REQUEST, "TFS Request" },
761 { TAG_TFS_RESPONSE, "TFS Response" },
762 { TAG_WNM_SLEEP_MODE, "WNM-Sleep Mode" },
763 { TAG_TIM_BROADCAST_REQUEST, "TIM Broadcast Request" },
764 { TAG_TIM_BROADCAST_RESPONSE, "TIM Broadcast Response" },
765 { TAG_COLLOCATED_INTER_REPORT, "Collocated Interference Report" },
766 { TAG_CHANNEL_USAGE, "Channel Usage" },
767 { TAG_TIME_ZONE, "Time Zone" },
768 { TAG_DMS_REQUEST, "DMS Request" },
769 { TAG_DMS_RESPONSE, "DMS Response" },
770 { TAG_LINK_IDENTIFIER, "Link Identifier" },
771 { TAG_WAKEUP_SCHEDULE, "Wakeup Schedule" },
772 { TAG_CHANNEL_SWITCH_TIMING, "Channel Switch Timing" },
773 { TAG_PTI_CONTROL, "PTI Control" },
774 { TAG_PU_BUFFER_STATUS, "PU Buffer Status" },
775 { TAG_INTERWORKING, "Interworking" },
776 { TAG_ADVERTISEMENT_PROTOCOL, "Advertisement Protocol"},
777 { TAG_EXPIDITED_BANDWIDTH_REQ, "Expedited Bandwidth Request" },
778 { TAG_QOS_MAP_SET, "QoS Map Set" },
779 { TAG_ROAMING_CONSORTIUM, "Roaming Consortium" },
780 { TAG_EMERGENCY_ALERT_ID, "Emergency Alert Identifier" },
781 { TAG_MESH_CONFIGURATION, "Mesh Configuration" },
782 { TAG_MESH_ID, "Mesh ID" },
783 { TAG_MESH_LINK_METRIC_REPORT, "Mesh Link Metric Report" },
784 { TAG_CONGESTION_NOTIFICATION, "Congestion Notification" },
785 { TAG_MESH_PEERING_MGMT, "Mesh Peering Management" },
786 { TAG_MESH_CHANNEL_SWITCH, "Mesh Channel Switch Parameters" },
787 { TAG_MESH_AWAKE_WINDOW, "Mesh Awake Windows" },
788 { TAG_BEACON_TIMING, "Beacon Timing" },
789 { TAG_MCCAOP_SETUP_REQUEST, "MCCAOP Setup Request" },
790 { TAG_MCCAOP_SETUP_REPLY, "MCCAOP SETUP Reply" },
791 { TAG_MCCAOP_ADVERTISSEMENT, "MCCAOP Advertissement" },
792 { TAG_MCCAOP_TEARDOWN, "MCCAOP Teardown" },
793 { TAG_GANN, "Gate Announcemen" },
794 { TAG_RANN, "Root Announcement" },
795 { TAG_EXTENDED_CAPABILITIES, "Extended Capabilities" },
796 { TAG_AGERE_PROPRIETARY, "Agere Proprietary" },
797 { TAG_MESH_PREQ, "Path Request" },
798 { TAG_MESH_PREP, "Path Reply" },
799 { TAG_MESH_PERR, "Path Error" },
800 { TAG_CISCO_CCX1_CKIP, "Cisco CCX1 CKIP + Device Name" },
801 { TAG_CISCO_CCX2, "Cisco CCX2" },
802 { TAG_PXU, "Proxy Update" },
803 { TAG_PXUC, "Proxy Update Confirmation"},
804 { TAG_AUTH_MESH_PEERING_EXCH, "Auhenticated Mesh Perring Exchange" },
805 { TAG_MIC, "MIC (Message Integrity Code)" },
806 { TAG_DESTINATION_URI, "Destination URI" },
807 { TAG_U_APSD_COEX, "U-APSD Coexistence" },
808 { TAG_CISCO_CCX3, "Cisco Unknown 95" },
809 { TAG_CISCO_VENDOR_SPECIFIC, "Cisco Vendor Specific" },
810 { TAG_SYMBOL_PROPRIETARY, "Symbol Proprietary" },
811 { TAG_MCCAOP_ADVERTISSEMENT_OV, "MCCAOP Advertissement Overviw" },
812 { TAG_VHT_CAPABILITY, "VHT Capabilities (IEEE Std 802.11ac/D3.1)" },
813 { TAG_VHT_OPERATION, "VHT Operation (IEEE Std 802.11ac/D3.1)" },
814 { TAG_VHT_TX_PWR_ENVELOPE, "VHT Tx Power Envelope (IEEE Std 802.11ac/D5.0)" },
815 { TAG_VENDOR_SPECIFIC_IE, "Vendor Specific" },
816 { 0, NULL }
818 static value_string_ext tag_num_vals_ext = VALUE_STRING_EXT_INIT(tag_num_vals);
820 /* WFA vendor specific subtypes */
821 #define WFA_SUBTYPE_P2P 9
822 #define WFA_SUBTYPE_WIFI_DISPLAY 10
823 #define WFA_SUBTYPE_HS20_INDICATION 16
824 #define WFA_SUBTYPE_HS20_ANQP 17
826 static const value_string wfa_subtype_vals[] = {
827 { WFA_SUBTYPE_P2P, "P2P" },
828 { WFA_SUBTYPE_HS20_INDICATION, "Hotspot 2.0 Indication" },
829 { WFA_SUBTYPE_HS20_ANQP, "Hotspot 2.0 ANQP" },
830 { 0, NULL }
833 /* ************************************************************************* */
834 /* Supported Rates (7.3.2.2) */
835 /* ************************************************************************* */
837 static const value_string ieee80211_supported_rates_vals[] = {
838 { 0x02, "1" },
839 { 0x03, "1.5" },
840 { 0x04, "2" },
841 { 0x05, "2.5" },
842 { 0x06, "3" },
843 { 0x09, "4.5" },
844 { 0x0B, "5.5" },
845 { 0x0C, "6" },
846 { 0x12, "9" },
847 { 0x16, "11" },
848 { 0x18, "12" },
849 { 0x1B, "13.5" },
850 { 0x24, "18" },
851 { 0x2C, "22" },
852 { 0x30, "24" },
853 { 0x36, "27" },
854 { 0x42, "33" },
855 { 0x48, "36" },
856 { 0x60, "48" },
857 { 0x6C, "54" },
858 { 0x82, "1(B)" },
859 { 0x83, "1.5(B)" },
860 { 0x84, "2(B)" },
861 { 0x85, "2.5(B)" },
862 { 0x86, "3(B)" },
863 { 0x89, "4.5(B)" },
864 { 0x8B, "5.5(B)" },
865 { 0x8C, "6(B)" },
866 { 0x92, "9(B)" },
867 { 0x96, "11(B)" },
868 { 0x98, "12(B)" },
869 { 0x9B, "13.5(B)" },
870 { 0xA4, "18(B)" },
871 { 0xAC, "22(B)" },
872 { 0xB0, "24(B)" },
873 { 0xB6, "27(B)" },
874 { 0xC2, "33(B)" },
875 { 0xC8, "36(B)" },
876 { 0xE0, "48(B)" },
877 { 0xEC, "54(B)" },
878 { 0xFF, "BSS requires support for mandatory features of HT PHY (IEEE 802.11 - Clause 20)" },
879 { 0, NULL}
881 static value_string_ext ieee80211_supported_rates_vals_ext = VALUE_STRING_EXT_INIT(ieee80211_supported_rates_vals);
883 /* ************************************************************************* */
884 /* 8.4.1.7 Reason Code field */
885 /* ************************************************************************* */
886 static const value_string ieee80211_reason_code[] = {
887 { 1, "Unspecified reason" },
888 { 2, "Previous authentication no longer valid" },
889 { 3, "Deauthenticated because sending STA is leaving (or has left) IBSS or ESS" },
890 { 4, "Disassociated due to inactivity" },
891 { 5, "Disassociated because AP is unable to handle all currently associated STAs" },
892 { 6, "Class 2 frame received from nonauthenticated STA" },
893 { 7, "Class 3 frame received from nonassociated STA" },
894 { 8, "Disassociated because sending STA is leaving (or has left) BSS" },
895 { 9, "STA requesting (re)association is not authenticated with responding STA" },
896 { 10, "Disassociated because the information in the Power Capability element is unacceptable" },
897 { 11, "Disassociated because the information in the Supported Channels element is unacceptable" },
898 { 12, "Reserved" },
899 { 13, "Invalid information element, i.e., an information element defined in this standard for which the content does not meet the specifications in Clause 7" },
900 { 14, "Message integrity code (MIC) failure" },
901 { 15, "4-Way Handshake timeout" },
902 { 16, "Group Key Handshake timeout" },
903 { 17, "Information element in 4-Way Handshake different from (Re)Association Request/Probe Response/Beacon frame" },
904 { 18, "Invalid group cipher" },
905 { 19, "Invalid pairwise cipher" },
906 { 20, "Invalid AKMP" },
907 { 21, "Unsupported RSN information element version" },
908 { 22, "Invalid RSN information element capabilities" },
909 { 23, "IEEE 802.1X authentication failed" },
910 { 24, "Cipher suite rejected because of the security policy" },
911 { 25, "TDLS direct-link teardown due to TDLS peer STA unreachable via the TDLS direct link" },
912 { 26, "TDLS direct-link teardown for unspecified reason" },
913 { 27, "Disassociated because session terminated by SSP request" },
914 { 28, "Disassociated because of lack of SSP roaming agreement" },
915 { 29, "Requested service rejected because of SSP cipher suite or AKM requirement " },
916 { 30, "Requested service not authorized in this location" },
917 { 31, "TS deleted because QoS AP lacks sufficient bandwidth for this QoS STA due to a change in BSS service characteristics or operational mode" },
918 { 32, "Disassociated for unspecified, QoS-related reason" },
919 { 33, "Disassociated because QoS AP lacks sufficient bandwidth for this QoS STA" },
920 { 34, "Disassociated because excessive number of frames need to be acknowledged, but are not acknowledged due to AP transmissions and/or poor channel conditions" },
921 { 35, "Disassociated because STA is transmitting outside the limits of its TXOPs" },
922 { 36, "Requested from peer STA as the STA is leaving the BSS (or resetting)" },
923 { 37, "Requested from peer STA as it does not want to use the mechanism" },
924 { 38, "Requested from peer STA as the STA received frames using the mechanism for which a setup is required" },
925 { 39, "Requested from peer STA due to timeout" },
926 { 45, "Peer STA does not support the requested cipher suite" },
927 { 46, "Disassociated because authorized access limit reached" },
928 { 47, "Disassociated due to external service requirements" },
929 { 48, "Invalid FT Action frame count" },
930 { 49, "Invalid pairwise master key identifier (PMKI)" },
931 { 50, "Invalid MDE" },
932 { 51, "Invalid FTE" },
933 { 52, "SME cancels the mesh peering instance with the reason other than reaching the maximum number of peer mesh STAs" },
934 { 53, "The mesh STA has reached the supported maximum number of peer mesh STAs" },
935 { 54, "The received information violates the Mesh Configuration policy configured in the mesh STA profile" },
936 { 55, "The mesh STA has received a Mesh Peering Close message requesting to close the mesh peering" },
937 { 56, "The mesh STA has re-sent dot11MeshMaxRetries Mesh Peering Open messages, without receiving a Mesh Peering Confirm message" },
938 { 57, "The confirmTimer for the mesh peering instance times out" },
939 { 58, "The mesh STA fails to unwrap the GTK or the values in the wrapped contents do not match" },
940 { 59, "The mesh STA receives inconsistent information about the mesh parameters between Mesh Peering Management frames" },
941 { 60, "The mesh STA fails the authenticated mesh peering exchange because due to failure in selecting either the pairwise ciphersuite or group ciphersuite" },
942 { 61, "The mesh STA does not have proxy information for this external destination" },
943 { 62, "The mesh STA does not have forwarding information for this destination" },
944 { 63, "The mesh STA determines that the link to the next hop of an active path in its forwarding information is no longer usable" },
945 { 64, "The Deauthentication frame was sent because the MAC address of the STA already exists in the mesh BSS. See 11.3.3 (Additional mechanisms for an AP collocated with a mesh STA)" },
946 { 65, "The mesh STA performs channel switch to meet regulatory requirements" },
947 { 66, "The mesh STA performs channel switch with unspecified reason" },
948 { 0, NULL}
950 static value_string_ext ieee80211_reason_code_ext = VALUE_STRING_EXT_INIT(ieee80211_reason_code);
952 /* ************************************************************************* */
953 /* 8.4.1.9 Status Code field */
954 /* ************************************************************************* */
955 static const value_string ieee80211_status_code[] = {
956 { 0, "Successful" },
957 { 1, "Unspecified failure" },
958 { 2, "TDLS wakeup schedule rejected but alternative schedule provided" },
959 { 3, "TDLS wakeup schedule rejected" },
960 { 4, "Reserved" },
961 { 5, "Security disabled" },
962 { 6, "Unacceptable lifetime" },
963 { 7, "Not in same BSS" },
964 { 8, "Reserved" },
965 { 9, "Reserved" },
966 { 10, "Cannot support all requested capabilities in the Capability Information field" },
967 { 11, "Reassociation denied due to inability to confirm that association exists" },
968 { 12, "Association denied due to reason outside the scope of this standard" },
969 { 13, "Responding STA does not support the specified authentication algorithm" },
970 { 14, "Received an Authentication frame with authentication transaction sequence number out of expected sequence" },
971 { 15, "Authentication rejected because of challenge failure" },
972 { 16, "Authentication rejected due to timeout waiting for next frame in sequence" },
973 { 17, "Association denied because AP is unable to handle additional associated STAs" },
974 { 18, "Association denied due to requesting STA not supporting all of the data rates in the BSSBasicRateSet parameter" },
975 { 19, "Association denied due to requesting STA not supporting the short preamble option" },
976 { 20, "Association denied due to requesting STA not supporting the PBCC modulation option" },
977 { 21, "Association denied due to requesting STA not supporting the Channel Agility option" },
978 { 22, "Association request rejected because Spectrum Management capability is required" },
979 { 23, "Association request rejected because the information in the Power Capability element is unacceptable" },
980 { 24, "Association request rejected because the information in the Supported Channels element is unacceptable" },
981 { 25, "Association denied due to requesting STA not supporting the Short Slot Time option" },
982 { 26, "Association denied due to requesting STA not supporting the DSSS-OFDM option" },
983 { 27, "Reserved Association denied because the requesting STA does not support HT features" },
984 { 28, "R0KH unreachable" },
985 { 29, "Association denied because the requesting STA does not support the phased coexistence operation (PCO) transition time required by the AP" },
986 { 30, "Association request rejected temporarily; try again later" },
987 { 31, "Robust Management frame policy violation" },
988 { 32, "Unspecified, QoS-related failure" },
989 { 33, "Association denied because QoS AP has insufficient bandwidth to handle another QoS STA" },
990 { 34, "Association denied due to excessive frame loss rates and/or poor conditions on current operating channel" },
991 { 35, "Association (with QoS BSS) denied because the requesting STA does not support the QoS facility" },
992 { 36, "Reserved" },
993 { 37, "The request has been declined" },
994 { 38, "The request has not been successful as one or more parameters have invalid values" },
995 { 39, "The TS has not been created because the request cannot be honored; however, a suggested TSPEC is provided so that the initiating STA may attempt to set another TS with the suggested changes to the TSPEC" },
996 { 40, "Invalid information element, i.e., an information element defined in this standard for which the content does not meet the specifications in Clause 7" },
997 { 41, "Invalid group cipher" },
998 { 42, "Invalid pairwise cipher" },
999 { 43, "Invalid AKMP" },
1000 { 44, "Unsupported RSN information element version" },
1001 { 45, "Invalid RSN information element capabilities" },
1002 { 46, "Cipher suite rejected because of security policy" },
1003 { 47, "The TS has not been created; however, the HC may be capable of creating a TS, in response to a request, after the time indicated in the TS Delay element" },
1004 { 48, "Direct link is not allowed in the BSS by policy" },
1005 { 49, "The Destination STA is not present within this BSS" },
1006 { 50, "The Destination STA is not a QoS STA" },
1007 { 51, "Association denied because the ListenInterval is too large" },
1008 { 52, "Invalid FT Action frame count" },
1009 { 53, "Invalid pairwise master key identifier (PMKID)" },
1010 { 54, "Invalid MDIE" },
1011 { 55, "Invalid FTIE" },
1012 { 56, "Requested TCLAS processing is not supported by the AP" },
1013 { 57, "The AP has insufficient TCLAS processing resources to satisfy the request" },
1014 { 58, "The TS has not been created because the request cannot be honored; however, the HC suggests the STA transitions to other BSSs to setup the TS" },
1015 { 59, "GAS Advertisement Protocol not supported" },
1016 { 60, "No outstanding GAS request" },
1017 { 61, "GAS Response not received from the Advertisement Server" },
1018 { 62, "STA timed out waiting for GAS Query Response" },
1019 { 63, "GAS Response is larger than query response length limit" },
1020 { 64, "Request refused because home network does not support request" },
1021 { 65, "Advertisement Server in the network is not currently reachable" },
1022 { 66, "Reserved" },
1023 { 67, "Request refused due to permissions received via SSPN interface" },
1024 { 68, "Request refused because AP does not support unauthenticated access" },
1025 { 69, "Reserved" },
1026 { 70, "Reserved" },
1027 { 71, "Reserved" },
1028 { 72, "Invalid contents of RSNIE" },
1029 { 73, "U-APSD Coexistence is not supported" },
1030 { 74, "Requested U-APSD Coexistence mode is not supported" },
1031 { 75, "Requested Interval/Duration value cannot be supported with U-APSD Coexistence" },
1032 { 76, "Authentication is rejected because an Anti-Clogging Token is required" },
1033 { 77, "Authentication is rejected because the offered finite cyclic group is not supported" },
1034 { 78, "The TBTT adjustment request has not been successful because the STA could not find an alternative TBTT" },
1035 { 79, "Transmission failure" },
1036 { 80, "Requested TCLAS Not Supported" },
1037 { 81, "TCLAS Resources Exhausted" },
1038 { 82, "Rejected with Suggested BSS Transition" },
1039 { 83, "Reserved" },
1040 { 92, "(Re)association refused for some external reason" },
1041 { 93, "(Re)association refused because of memory limits at the AP" },
1042 { 94, "(Re)association refused because emergency services are not supported at the AP" },
1043 { 95, "GAS query response not yet received" },
1044 { 96, "Reserved" },
1045 { 97, "Reserved" },
1046 { 98, "Reserved" },
1047 { 99, "Reserved" },
1048 { 100, "The request failed due to a reservation conflict" },
1049 { 101, "The request failed due to exceeded MAF limit" },
1050 { 102, "The request failed due to exceeded MCCA track limit" },
1051 { 0, NULL}
1053 static value_string_ext ieee80211_status_code_ext = VALUE_STRING_EXT_INIT(ieee80211_status_code);
1055 /* ************************************************************************* */
1056 /* Frame types, and their names */
1057 /* ************************************************************************* */
1058 static const value_string frame_type_subtype_vals[] = {
1059 {MGT_ASSOC_REQ, "Association Request"},
1060 {MGT_ASSOC_RESP, "Association Response"},
1061 {MGT_REASSOC_REQ, "Reassociation Request"},
1062 {MGT_REASSOC_RESP, "Reassociation Response"},
1063 {MGT_PROBE_REQ, "Probe Request"},
1064 {MGT_PROBE_RESP, "Probe Response"},
1065 {MGT_MEASUREMENT_PILOT, "Measurement Pilot"},
1066 {MGT_BEACON, "Beacon frame"},
1067 {MGT_ATIM, "ATIM"},
1068 {MGT_DISASS, "Disassociate"},
1069 {MGT_AUTHENTICATION, "Authentication"},
1070 {MGT_DEAUTHENTICATION, "Deauthentication"},
1071 {MGT_ACTION, "Action"},
1072 {MGT_ACTION_NO_ACK, "Action No Ack"},
1073 {MGT_ARUBA_WLAN, "Aruba Management"},
1075 {CTRL_VHT_NDP_ANNC, "VHT NDP Announcement"},
1076 {CTRL_CONTROL_WRAPPER, "Control Wrapper"},
1077 {CTRL_BLOCK_ACK_REQ, "802.11 Block Ack Req"},
1078 {CTRL_BLOCK_ACK, "802.11 Block Ack"},
1079 {CTRL_PS_POLL, "Power-Save poll"},
1080 {CTRL_RTS, "Request-to-send"},
1081 {CTRL_CTS, "Clear-to-send"},
1082 {CTRL_ACKNOWLEDGEMENT, "Acknowledgement"},
1083 {CTRL_CFP_END, "CF-End (Control-frame)"},
1084 {CTRL_CFP_ENDACK, "CF-End + CF-Ack (Control-frame)"},
1086 {DATA, "Data"},
1087 {DATA_CF_ACK, "Data + CF-Ack"},
1088 {DATA_CF_POLL, "Data + CF-Poll"},
1089 {DATA_CF_ACK_POLL, "Data + CF-Ack + CF-Poll"},
1090 {DATA_NULL_FUNCTION, "Null function (No data)"},
1091 {DATA_CF_ACK_NOD, "Acknowledgement (No data)"},
1092 {DATA_CF_POLL_NOD, "CF-Poll (No data)"},
1093 {DATA_CF_ACK_POLL_NOD, "CF-Ack/Poll (No data)"},
1094 {DATA_QOS_DATA, "QoS Data"},
1095 {DATA_QOS_DATA_CF_ACK, "QoS Data + CF-Acknowledgment"},
1096 {DATA_QOS_DATA_CF_POLL, "QoS Data + CF-Poll"},
1097 {DATA_QOS_DATA_CF_ACK_POLL, "QoS Data + CF-Ack + CF-Poll"},
1098 {DATA_QOS_NULL, "QoS Null function (No data)"},
1099 {DATA_QOS_CF_POLL_NOD, "QoS CF-Poll (No Data)"},
1100 {DATA_QOS_CF_ACK_POLL_NOD, "QoS CF-Ack + CF-Poll (No data)"},
1101 {0, NULL}
1103 static value_string_ext frame_type_subtype_vals_ext = VALUE_STRING_EXT_INIT(frame_type_subtype_vals);
1105 /* ************************************************************************* */
1106 /* 802.1D Tag Name (by WME Access Category Names) */
1107 /* ************************************************************************* */
1108 static const value_string ieee80211_qos_tags_acs[] = {
1109 { 0, "Best Effort (Best Effort)" },
1110 { 1, "Background (Background)" },
1111 { 2, "Spare (Background)" },
1112 { 3, "Excellent Effort (Best Effort)" },
1113 { 4, "Controlled Load (Video)" },
1114 { 5, "Video (Video)" },
1115 { 6, "Voice (Voice)" },
1116 { 7, "Netowrk Control (Voice)" },
1117 { 0, NULL }
1120 /* ************************************************************************* */
1121 /* WME Access Category Names (by WME ACI) */
1122 /* ************************************************************************* */
1123 static const value_string wme_acs[] = {
1124 { 0, "Best Effort" },
1125 { 1, "Background" },
1126 { 2, "Video" },
1127 { 3, "Voice" },
1128 { 0, NULL }
1131 /* ************************************************************************* */
1132 /* Aruba Management Type */
1133 /* ************************************************************************* */
1134 static const value_string aruba_mgt_typevals[] = {
1135 { 0x0001, "Hello" },
1136 { 0x0002, "Probe" },
1137 { 0x0003, "MTU" },
1138 { 0x0004, "Ageout" },
1139 { 0x0005, "Heartbeat" },
1140 { 0x0006, "Deauth" },
1141 { 0x0007, "Disassoc" },
1142 { 0x0008, "Probe response" },
1143 { 0x0009, "Tunnel update" },
1144 { 0x000A, "Laser beam active" },
1145 { 0x000B, "Client IP" },
1146 { 0x000C, "Laser beam active v2" },
1147 { 0x000D, "AP statistics" },
1148 { 0, NULL }
1150 static value_string_ext aruba_mgt_typevals_ext = VALUE_STRING_EXT_INIT(aruba_mgt_typevals);
1152 /*** Begin: Action Fixed Parameter ***/
1153 #define CAT_SPECTRUM_MGMT 0
1154 #define CAT_QOS 1
1155 #define CAT_DLS 2
1156 #define CAT_BLOCK_ACK 3
1157 #define CAT_PUBLIC 4
1159 #define CAT_RADIO_MEASUREMENT 5
1160 #define CAT_FAST_BSS_TRANSITION 6
1161 #define CAT_HT 7
1162 #define CAT_SA_QUERY 8
1163 #define CAT_PUBLIC_PROTECTED 9
1164 #define CAT_WNM 10
1165 #define CAT_UNPROTECTED_WNM 11
1166 #define CAT_TDLS 12
1168 /* per 11s draft 12.0 */
1169 #define CAT_MESH 13
1170 #define CAT_MULTIHOP 14
1171 #define CAT_SELF_PROTECTED 15
1173 #define CAT_MGMT_NOTIFICATION 17
1174 #define CAT_VENDOR_SPECIFIC_PROTECTED 126
1175 #define CAT_VENDOR_SPECIFIC 127
1177 #define CAT_MESH_LINK_METRIC 31
1178 #define CAT_MESH_PATH_SELECTION 32
1179 #define CAT_MESH_INTERWORKING 33
1180 #define CAT_MESH_RESOURCE_COORDINATION 34
1181 #define CAT_MESH_SECURITY_ARCHITECTURE 35
1183 #define SM_ACTION_MEASUREMENT_REQUEST 0
1184 #define SM_ACTION_MEASUREMENT_REPORT 1
1185 #define SM_ACTION_TPC_REQUEST 2
1186 #define SM_ACTION_TPC_REPORT 3
1187 #define SM_ACTION_CHAN_SWITCH_ANNC 4
1188 #define SM_ACTION_EXT_CHAN_SWITCH_ANNC 5
1190 #define SM_ACTION_ADDTS_REQUEST 0
1191 #define SM_ACTION_ADDTS_RESPONSE 1
1192 #define SM_ACTION_DELTS 2
1193 #define SM_ACTION_QOS_SCHEDULE 3
1194 #define SM_ACTION_QOS_MAP_CONFIGURE 4
1196 #define SM_ACTION_DLS_REQUEST 0
1197 #define SM_ACTION_DLS_RESPONSE 1
1198 #define SM_ACTION_DLS_TEARDOWN 2
1200 #define BA_ADD_BLOCK_ACK_REQUEST 0
1201 #define BA_ADD_BLOCK_ACK_RESPONSE 1
1202 #define BA_DELETE_BLOCK_ACK 2
1204 #define PA_DSE_ENABLEMENT 1
1205 #define PA_DSE_DEENABLEMENT 2
1206 #define PA_DSE_REG_LOC_ANNOUNCEMENT 3
1207 #define PA_EXT_CHANNEL_SWITCH_ANNOUNCEMENT 4
1208 #define PA_DSE_MEASUREMENT_REQUEST 5
1209 #define PA_DSE_MEASUREMENT_REPORT 6
1210 #define PA_MEASUREMENT_PILOT 7
1211 #define PA_DSE_POWER_CONSTRAINT 8
1212 #define PA_VENDOR_SPECIFIC 9
1213 #define PA_GAS_INITIAL_REQUEST 10
1214 #define PA_GAS_INITIAL_RESPONSE 11
1215 #define PA_GAS_COMEBACK_REQUEST 12
1216 #define PA_GAS_COMEBACK_RESPONSE 13
1217 #define PA_TDLS_DISCOVERY_RESPONSE 14
1219 #define HT_ACTION_NOTIFY_CHAN_WIDTH 0
1220 #define HT_ACTION_SM_PWR_SAVE 1
1221 #define HT_ACTION_PSMP_ACTION 2
1222 #define HT_ACTION_SET_PCO_PHASE 3
1223 #define HT_ACTION_MIMO_CSI 4
1224 #define HT_ACTION_MIMO_BEAMFORMING 5
1225 #define HT_ACTION_MIMO_COMPRESSED_BEAMFORMING 6
1226 #define HT_ACTION_ANT_SEL_FEEDBACK 7
1227 #define HT_ACTION_HT_INFO_EXCHANGE 8
1229 /* IEEE Std 802.11r-2008, 7.4.8, Table 7-57g */
1230 #define FT_ACTION_REQUEST 1
1231 #define FT_ACTION_RESPONSE 2
1232 #define FT_ACTION_CONFIRM 3
1233 #define FT_ACTION_ACK 4
1235 /* SA Query Action frame codes (IEEE 802.11w-2009, 7.4.9) */
1236 #define SA_QUERY_REQUEST 0
1237 #define SA_QUERY_RESPONSE 1
1239 /* IEEE Std 802.11z-2010, 7.4.11, Table 7-57v1 */
1240 #define TDLS_SETUP_REQUEST 0
1241 #define TDLS_SETUP_RESPONSE 1
1242 #define TDLS_SETUP_CONFIRM 2
1243 #define TDLS_TEARDOWN 3
1244 #define TDLS_PEER_TRAFFIC_INDICATION 4
1245 #define TDLS_CHANNEL_SWITCH_REQUEST 5
1246 #define TDLS_CHANNEL_SWITCH_RESPONSE 6
1247 #define TDLS_PEER_PSM_REQUEST 7
1248 #define TDLS_PEER_PSM_RESPONSE 8
1249 #define TDLS_PEER_TRAFFIC_RESPONSE 9
1250 #define TDLS_DISCOVERY_REQUEST 10
1252 /* IEEE Std 802.11-2012, 8.5.7.1, Table 8-206 */
1253 #define RM_ACTION_RADIO_MEASUREMENT_REQUEST 0
1254 #define RM_ACTION_RADIO_MEASUREMENT_REPORT 1
1255 #define RM_ACTION_LINK_MEASUREMENT_REQUEST 2
1256 #define RM_ACTION_LINK_MEASUREMENT_REPORT 3
1257 #define RM_ACTION_NEIGHBOR_REPORT_REQUEST 4
1258 #define RM_ACTION_NEIGHBOR_REPORT_RESPONSE 5
1260 /* 11s draft 12.0, table 7-57v30 */
1261 #define MESH_ACTION_LINK_METRIC_REPORT 0
1262 #define MESH_ACTION_HWMP 1
1263 #define MESH_ACTION_GATE_ANNOUNCE 2
1264 #define MESH_ACTION_CONGESTION_CTL 3
1265 #define MESH_ACTION_MCCA_SETUP_REQUEST 4
1266 #define MESH_ACTION_MCCA_SETUP_REPLY 5
1267 #define MESH_ACTION_MCCA_ADV_REQUEST 6
1268 #define MESH_ACTION_MCCA_ADV 7
1269 #define MESH_ACTION_MCCA_TEARDOWN 8
1270 #define MESH_ACTION_TBTT_ADJ_REQUEST 9
1271 #define MESH_ACTION_TBTT_ADJ_RESPONSE 10
1273 /* 11s draft 12.0, table 7-57v42: Multihop Action field values */
1274 #define MULTIHOP_ACTION_PROXY_UPDATE 0
1275 #define MULTIHOP_ACTION_PROXY_UPDATE_CONF 1
1277 /* 11s draft 12.0, table 7-57v24: Self-protected Action field values */
1278 #define SELFPROT_ACTION_MESH_PEERING_OPEN 1
1279 #define SELFPROT_ACTION_MESH_PEERING_CONFIRM 2
1280 #define SELFPROT_ACTION_MESH_PEERING_CLOSE 3
1281 #define SELFPROT_ACTION_MESH_GROUP_KEY_INFORM 4
1282 #define SELFPROT_ACTION_MESH_GROUP_KEY_ACK 5
1284 /* 11s draft 12.0, table 7-43bj6: Mesh Peering Protocol Identifier field values */
1285 #define MESH_PEERING_PROTO_MGMT 0
1286 #define MESH_PEERING_PROTO_AMPE 1
1287 #define MESH_PEERING_PROTO_VENDOR 255
1289 /* Vendor actions */
1290 /* MARVELL */
1291 #define MRVL_ACTION_MESH_MANAGEMENT 1
1293 #define MRVL_MESH_MGMT_ACTION_RREQ 0
1294 #define MRVL_MESH_MGMT_ACTION_RREP 1
1295 #define MRVL_MESH_MGMT_ACTION_RERR 2
1296 #define MRVL_MESH_MGMT_ACTION_PLDM 3
1298 #define ANQP_INFO_ANQP_QUERY_LIST 256
1299 #define ANQP_INFO_ANQP_CAPAB_LIST 257
1300 #define ANQP_INFO_VENUE_NAME_INFO 258
1301 #define ANQP_INFO_EMERGENCY_CALL_NUMBER_INFO 259
1302 #define ANQP_INFO_NETWORK_AUTH_TYPE_INFO 260
1303 #define ANQP_INFO_ROAMING_CONSORTIUM_LIST 261
1304 #define ANQP_INFO_IP_ADDR_TYPE_AVAILABILITY_INFO 262
1305 #define ANQP_INFO_NAI_REALM_LIST 263
1306 #define ANQP_INFO_3GPP_CELLULAR_NETWORK_INFO 264
1307 #define ANQP_INFO_AP_GEOSPATIAL_LOCATION 265
1308 #define ANQP_INFO_AP_CIVIC_LOCATION 266
1309 #define ANQP_INFO_AP_LOCATION_PUBLIC_ID_URI 267
1310 #define ANQP_INFO_DOMAIN_NAME_LIST 268
1311 #define ANQP_INFO_EMERGENCY_ALERT_ID_URI 269
1312 #define ANQP_INFO_TDLS_CAPAB_INFO 270
1313 #define ANQP_INFO_EMERGENCY_NAI 271
1314 #define ANQP_INFO_ANQP_VENDOR_SPECIFIC_LIST 56797
1316 /* ANQP information ID - IEEE Std 802.11u-2011 - Table 7-43bk */
1317 static const value_string anqp_info_id_vals[] = {
1318 {ANQP_INFO_ANQP_QUERY_LIST, "ANQP Query list"},
1319 {ANQP_INFO_ANQP_CAPAB_LIST, "ANQP Capability list"},
1320 {ANQP_INFO_VENUE_NAME_INFO, "Venue Name information"},
1321 {ANQP_INFO_EMERGENCY_CALL_NUMBER_INFO, "Emergency Call Number information"},
1322 {ANQP_INFO_NETWORK_AUTH_TYPE_INFO,
1323 "Network Authentication Type information"},
1324 {ANQP_INFO_ROAMING_CONSORTIUM_LIST, "Roaming Consortium list"},
1325 {ANQP_INFO_IP_ADDR_TYPE_AVAILABILITY_INFO,
1326 "IP Address Type Availability information"},
1327 {ANQP_INFO_NAI_REALM_LIST, "NAI Realm list"},
1328 {ANQP_INFO_3GPP_CELLULAR_NETWORK_INFO, "3GPP Cellular Network information"},
1329 {ANQP_INFO_AP_GEOSPATIAL_LOCATION, "AP Geospatial Location"},
1330 {ANQP_INFO_AP_CIVIC_LOCATION, "AP Civic Location"},
1331 {ANQP_INFO_AP_LOCATION_PUBLIC_ID_URI, "AP Location Public Identifier URI"},
1332 {ANQP_INFO_DOMAIN_NAME_LIST, "Domain Name list"},
1333 {ANQP_INFO_EMERGENCY_ALERT_ID_URI, "Emergency Alert Identifier URI"},
1334 {ANQP_INFO_TDLS_CAPAB_INFO, "TDLS Capability information"},
1335 {ANQP_INFO_EMERGENCY_NAI, "Emergency NAI"},
1336 {ANQP_INFO_ANQP_VENDOR_SPECIFIC_LIST, "ANQP vendor-specific list"},
1337 {0, NULL}
1339 static value_string_ext anqp_info_id_vals_ext = VALUE_STRING_EXT_INIT(anqp_info_id_vals);
1341 /* IEEE 802.11v - WNM Action field values */
1342 enum wnm_action {
1343 WNM_EVENT_REQ = 0,
1344 WNM_EVENT_REPORT = 1,
1345 WNM_DIAGNOSTIC_REQ = 2,
1346 WNM_DIAGNOSTIC_REPORT = 3,
1347 WNM_LOCATION_CFG_REQ = 4,
1348 WNM_LOCATION_CFG_RESP = 5,
1349 WNM_BSS_TRANS_MGMT_QUERY = 6,
1350 WNM_BSS_TRANS_MGMT_REQ = 7,
1351 WNM_BSS_TRANS_MGMT_RESP = 8,
1352 WNM_FMS_REQ = 9,
1353 WNM_FMS_RESP = 10,
1354 WNM_COLLOCATED_INTERFERENCE_REQ = 11,
1355 WNM_COLLOCATED_INTERFERENCE_REPORT = 12,
1356 WNM_TFS_REQ = 13,
1357 WNM_TFS_RESP = 14,
1358 WNM_TFS_NOTIFY = 15,
1359 WNM_SLEEP_MODE_REQ = 16,
1360 WNM_SLEEP_MODE_RESP = 17,
1361 WNM_TIM_BROADCAST_REQ = 18,
1362 WNM_TIM_BROADCAST_RESP = 19,
1363 WNM_QOS_TRAFFIC_CAPAB_UPDATE = 20,
1364 WNM_CHANNEL_USAGE_REQ = 21,
1365 WNM_CHANNEL_USAGE_RESP = 22,
1366 WNM_DMS_REQ = 23,
1367 WNM_DMS_RESP = 24,
1368 WNM_TIMING_MEASUREMENT_REQ = 25,
1369 WNM_NOTIFICATION_REQ = 26,
1370 WNM_NOTIFICATION_RESP = 27
1373 static const value_string wnm_action_codes[] = {
1374 { WNM_EVENT_REQ, "Event Request" },
1375 { WNM_EVENT_REPORT, "Event Report" },
1376 { WNM_DIAGNOSTIC_REQ, "Diagnostic Request" },
1377 { WNM_DIAGNOSTIC_REPORT, "Diagnostic Report" },
1378 { WNM_LOCATION_CFG_REQ, "Location Configuration Request" },
1379 { WNM_LOCATION_CFG_RESP, "Location Configuration Response" },
1380 { WNM_BSS_TRANS_MGMT_QUERY, "BSS Transition Management Query" },
1381 { WNM_BSS_TRANS_MGMT_REQ, "BSS Transition Management Request" },
1382 { WNM_BSS_TRANS_MGMT_RESP, "BSS Transition Management Response" },
1383 { WNM_FMS_REQ, "FMS Request" },
1384 { WNM_FMS_RESP, "FMS Response" },
1385 { WNM_COLLOCATED_INTERFERENCE_REQ, "Collocated Interference Request" },
1386 { WNM_COLLOCATED_INTERFERENCE_REPORT, "Collocated Interference Report" },
1387 { WNM_TFS_REQ, "TFS Request" },
1388 { WNM_TFS_RESP, "TFS Response" },
1389 { WNM_TFS_NOTIFY, "TFS Notify" },
1390 { WNM_SLEEP_MODE_REQ, "WNM-Sleep Mode Request" },
1391 { WNM_SLEEP_MODE_RESP, "WNM-Sleep Mode Response" },
1392 { WNM_TIM_BROADCAST_REQ, "TIM Broadcast Request" },
1393 { WNM_TIM_BROADCAST_RESP, "TIM Broadcast Response" },
1394 { WNM_QOS_TRAFFIC_CAPAB_UPDATE, "QoS Traffic Capability Update" },
1395 { WNM_CHANNEL_USAGE_REQ, "Channel Usage Request" },
1396 { WNM_CHANNEL_USAGE_RESP, "Channel Usage Response" },
1397 { WNM_DMS_REQ, "DMS Request" },
1398 { WNM_DMS_RESP, "DMS Response" },
1399 { WNM_TIMING_MEASUREMENT_REQ, "Timing Measurement Request" },
1400 { WNM_NOTIFICATION_REQ, "WNM-Notification Request" },
1401 { WNM_NOTIFICATION_RESP, "WNM-Notification Response" },
1402 { 0, NULL }
1404 static value_string_ext wnm_action_codes_ext = VALUE_STRING_EXT_INIT(wnm_action_codes);
1407 static const value_string wnm_notification_types[] = {
1408 { 0, "Firmware Update Notification" },
1409 { 1, "Reserved for use by WFA" },
1410 { 221, "Vendor Specific" },
1411 { 0, NULL }
1414 static value_string_ext wnm_notification_types_ext =
1415 VALUE_STRING_EXT_INIT(wnm_notification_types);
1417 /*** End: Action Fixed Parameter ***/
1419 static const value_string ieee80211_tag_measure_request_type_flags[] = {
1420 {0x00, "Basic Request"},
1421 {0x01, "Clear Channel Assessment (CCA) Request"},
1422 {0x02, "Receive Power Indication (RPI) Histogram Request"},
1423 {0x03, "Channel Load Request"},
1424 {0x04, "Noise Histogram Request"},
1425 {0x05, "Beacon Request"},
1426 {0x06, "Frame Request"},
1427 {0x07, "STA Statistics Request"},
1428 {0x08, "Location Configuration Indication (LCI) Request"},
1429 {0x09, "Transmit Stream Measurement Request"},
1430 {0x0A, "Measurement Pause Request"},
1431 {0x00, NULL}
1433 static value_string_ext ieee80211_tag_measure_request_type_flags_ext =
1434 VALUE_STRING_EXT_INIT(ieee80211_tag_measure_request_type_flags);
1436 static const value_string ieee80211_tag_measure_report_type_flags[] = {
1437 { 0x00, "Basic Report" },
1438 { 0x01, "Clear Channel Assessment (CCA) Report" },
1439 { 0x02, "Receive Power Indication (RPI) Histogram Report" },
1440 { 0x03, "Channel Load Report" },
1441 { 0x04, "Noise Histogram Report" },
1442 { 0x05, "Beacon Report" },
1443 { 0x06, "Frame Report" },
1444 { 0x07, "STA Statistics Report" },
1445 { 0x08, "Location Configuration Information (LCI) Report" },
1446 { 0x09, "Transmit Stream Measurement Report" },
1447 { 0x00, NULL }
1449 static value_string_ext ieee80211_tag_measure_report_type_flags_ext =
1450 VALUE_STRING_EXT_INIT(ieee80211_tag_measure_report_type_flags);
1452 static const true_false_string ieee80211_tag_measure_report_frame_info_frame_type_flag = {
1453 "Measurement Pilot Frame",
1454 "Beacon/Probe Response Frame"
1457 static const true_false_string ieee80211_tag_measure_map_field_bss_flag = {
1458 "At least one MPDU was received by another BSS or IBSS in the measurement period.",
1459 "No MPDUs were received from another BSS or IBSS in the measurement period."
1462 static const value_string ieee80211_tag_measure_request_measurement_mode_flags[] = {
1463 { 0x00, "Passive" },
1464 { 0x01, "Active" },
1465 { 0x02, "Beacon Table" },
1466 { 0x00, NULL }
1469 #define MEASURE_REQ_BEACON_SUB_SSID 0
1470 #define MEASURE_REQ_BEACON_SUB_BRI 1
1471 #define MEASURE_REQ_BEACON_SUB_RD 2
1472 #define MEASURE_REQ_BEACON_SUB_REQUEST 10
1473 #define MEASURE_REQ_BEACON_SUB_APCP 51
1474 #define MEASURE_REQ_BEACON_SUB_VS 221
1476 static const value_string ieee80211_tag_measure_request_beacon_sub_id_flags[] = {
1477 { MEASURE_REQ_BEACON_SUB_SSID, "SSID" },
1478 { MEASURE_REQ_BEACON_SUB_BRI, "Beacon Reporting Information" },
1479 { MEASURE_REQ_BEACON_SUB_RD, "Reporting Detail" },
1480 { MEASURE_REQ_BEACON_SUB_REQUEST, "Request" },
1481 { MEASURE_REQ_BEACON_SUB_APCP, "AP Channel Report" },
1482 { MEASURE_REQ_BEACON_SUB_VS, "Vendor Specific" },
1483 { 0x00, NULL}
1486 static const value_string ieee80211_tag_measure_request_beacon_sub_bri_reporting_condition_flags[] = {
1487 { 0x00, "Report to be issued after each measurement." },
1488 { 0x01, "The measured RCPI level is greater than an absolute threshold." },
1489 { 0x02, "The measured RCPI level is less than an absolute threshold." },
1490 { 0x03, "The measured RSNI level is greater than an absolute threshold." },
1491 { 0x04, "The measured RSNI level is less than an absolute threshold." },
1492 { 0x05, "The measured RCPI level is greater than a threshold defined by an offset from the serving AP's reference RCPI." },
1493 { 0x06, "The measured RCPI level is less than a threshold defined by an offset from the serving AP's reference RCPI." },
1494 { 0x07, "The measured RSNI level is greater than a threshold defined by an offset from the serving AP's reference RSNI." },
1495 { 0x08, "The measured RSNI level is less than a threshold defined by an offset from the serving AP's reference RSNI." },
1496 { 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." },
1497 { 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." },
1498 { 0xfe, "Report not required to be issued" },
1499 { 0x00, NULL }
1502 static const value_string ieee80211_tag_measure_request_beacon_sub_reporting_detail_flags[] = {
1503 { 0, "No fixed length fields or elements" },
1504 { 1, "All fixed length fields and any requested elements in the Request information element if present" },
1505 { 2, "All fixed length fields and elements (default, used when Reporting Detail subelement is not included in Beacon Request" },
1506 { 0x00, NULL }
1509 static const value_string ieee80211_tag_measure_request_group_id_flags[] = {
1510 { 0x00, "STA Counters from dot11CountersTable" },
1511 { 0x01, "STA Counters from dot11MacStatistics group" },
1512 { 0x02, "QoS STA Counters for UP0 from dot11QosCountersTable" },
1513 { 0x03, "QoS STA Counters for UP1 from dot11QosCountersTable" },
1514 { 0x04, "QoS STA Counters for UP2 from dot11QosCountersTable" },
1515 { 0x05, "QoS STA Counters for UP3 from dot11QosCountersTable" },
1516 { 0x06, "QoS STA Counters for UP4 from dot11QosCountersTable" },
1517 { 0x07, "QoS STA Counters for UP5 from dot11QosCountersTable" },
1518 { 0x08, "QoS STA Counters for UP6 from dot11QosCountersTable" },
1519 { 0x09, "QoS STA Counters for UP7 from dot11QosCountersTable" },
1520 { 0x0a, "BSS Average Access Delays" },
1521 { 0x0b, "STA Counters from dot11A-MSDU Group" },
1522 { 0x0c, "STA Counters from dot11A-MPDU Group" },
1523 { 0x0d, "STA Counters from dot11 BAR, Channel Width, PSMP Group" },
1524 { 0x0e, "STA Counters from dot11Protection Group" },
1525 { 0x0f, "STBC Group" },
1526 { 0x00, NULL }
1528 static value_string_ext ieee80211_tag_measure_request_group_id_flags_ext =
1529 VALUE_STRING_EXT_INIT(ieee80211_tag_measure_request_group_id_flags);
1531 static const value_string ieee80211_tclas_process_flag[] = {
1532 {0x00, "Incoming MSDU's higher layer parameters have to match to the parameters in all associated TCLAS elements."},
1533 {0x01, "Incoming MSDU's higher layer parameters have to match to at least one of the associated TCLAS elements."},
1534 {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."},
1535 {0, NULL}
1538 static const value_string frame_type[] = {
1539 {MGT_FRAME, "Management frame"},
1540 {CONTROL_FRAME, "Control frame"},
1541 {DATA_FRAME, "Data frame"},
1542 {0, NULL}
1545 static const value_string tofrom_ds[] = {
1546 {0, "Not leaving DS or network is operating "
1547 "in AD-HOC mode (To DS: 0 From DS: 0)"},
1548 {FLAG_TO_DS, "Frame from STA to DS via an AP (To DS: 1 "
1549 "From DS: 0)"},
1550 {FLAG_FROM_DS, "Frame from DS to a STA via AP(To DS: 0 "
1551 "From DS: 1)"},
1552 {FLAG_TO_DS|FLAG_FROM_DS, "WDS (AP to AP) or Mesh (MP to MP) Frame "
1553 "(To DS: 1 From DS: 1)"},
1554 {0, NULL}
1557 static const true_false_string tods_flag = {
1558 "Frame is entering DS",
1559 "Frame is not entering DS"
1562 static const true_false_string fromds_flag = {
1563 "Frame is exiting DS",
1564 "Frame is not exiting DS"
1567 static const true_false_string more_fragments = {
1568 "More fragments follow",
1569 "This is the last fragment"
1572 static const true_false_string retry_flags = {
1573 "Frame is being retransmitted",
1574 "Frame is not being retransmitted"
1577 static const true_false_string pm_flags = {
1578 "STA will go to sleep",
1579 "STA will stay up"
1582 static const true_false_string md_flags = {
1583 "Data is buffered for STA at AP",
1584 "No data buffered"
1587 static const true_false_string protected_flags = {
1588 "Data is protected",
1589 "Data is not protected"
1592 static const true_false_string order_flags = {
1593 "Strictly ordered",
1594 "Not strictly ordered"
1597 static const true_false_string cf_ess_flags = {
1598 "Transmitter is an AP",
1599 "Transmitter is a STA"
1603 static const true_false_string cf_privacy_flags = {
1604 "AP/STA can support WEP",
1605 "AP/STA cannot support WEP"
1608 static const true_false_string cf_ibss_flags = {
1609 "Transmitter belongs to an IBSS",
1610 "Transmitter belongs to a BSS"
1613 static const true_false_string eosp_flag = {
1614 "End of service period",
1615 "Service period"
1618 static const true_false_string bit4_flag = {
1619 "Bits 8-15 of QoS Control field are Queue Size",
1620 "Bits 8-15 of QoS Control field are TXOP Duration Requested"
1623 static const true_false_string ieee80211_qos_amsdu_present_flag = {
1624 "A-MSDU",
1625 "MSDU"
1628 static const true_false_string csa_txrestrict_flags = {
1629 "Tx Restrict",
1630 "No Tx Restrict"
1633 static const true_false_string csa_initiator_flags = {
1634 "Initiator",
1635 "Non Initiator"
1638 static const true_false_string mesh_config_cap_power_save_level_flags = {
1639 "One of the peer-specific mesh power modes is deep sleep mode",
1640 "No one is in deep sleep mode"
1643 static const value_string sta_cf_pollable[] = {
1644 {0x00, "Station is not CF-Pollable"},
1645 {0x02, "Station is CF-Pollable, not requesting to be placed on the CF-polling list"},
1646 {0x01, "Station is CF-Pollable, requesting to be placed on the CF-polling list"},
1647 {0x03, "Station is CF-Pollable, requesting never to be polled"},
1648 {0x80, "QSTA requesting association in QBSS"},
1649 {0x81, "Reserved"},
1650 {0x82, "Reserved"},
1651 {0x83, "Reserved"},
1652 {0, NULL}
1655 static const value_string ap_cf_pollable[] = {
1656 {0x00, "No point coordinator at AP"},
1657 {0x02, "Point coordinator at AP for delivery only (no polling)"},
1658 {0x01, "Point coordinator at AP for delivery and polling"},
1659 {0x03, "Reserved"},
1660 {0x80, "QAP (HC) does not use CFP for delivery of unicast data type frames"},
1661 {0x82, "QAP (HC) uses CFP for delivery, but does not send CF-Polls to non-QoS STAs"},
1662 {0x81, "QAP (HC) uses CFP for delivery, and sends CF-Polls to non-QoS STAs"},
1663 {0x83, "Reserved"},
1664 {0, NULL}
1668 static const value_string auth_alg[] = {
1669 {0x00, "Open System"},
1670 {0x01, "Shared key"},
1671 {0x02, "Fast BSS Transition"},
1672 {0x80, "Network EAP"}, /* Cisco proprietary? */
1673 {0, NULL}
1676 static const true_false_string ff_block_ack_params_amsdu_permitted_flag = {
1677 "Permitted in QoS Data MPDUs",
1678 "Not Permitted"
1681 static const true_false_string ff_block_ack_params_policy_flag = {
1682 "Immediate Block Ack",
1683 "Delayed Block Ack"
1686 static const value_string ff_channel_width_vals[] = {
1687 {0x00, "20 MHz channel width only"},
1688 {0x01, "Any channel width in the STA's Supported Channel Width Set"},
1689 {0, NULL}
1692 static const true_false_string ff_qos_info_ap_q_ack_flag = {
1693 "Implemented",
1694 "Not Implemented"
1697 static const true_false_string ff_qos_info_ap_queue_req_flag = {
1698 "Can process a nonzero Queue Size subfield in the QoS Control field in QoS data frames",
1699 "Can NOT process a nonzero Queue Size subfield in the QoS Control field in QoS data frames"
1702 static const true_false_string ff_qos_info_ap_txop_request_flag = {
1703 "Can process a nonzero TXOP Duration Requested subfield in the QoS Control field in QoS data frames",
1704 "Can NOT process a nonzero TXOP Duration Requested subfield in the QoS Control field in QoS data frames"
1707 static const true_false_string ff_qos_info_sta_ac_flag = {
1708 "Trigger-enabled and Delivery-enabled",
1709 "Neither Trigger-enabled nor Delivery-enabled"
1712 static const true_false_string ff_qos_info_sta_q_ack_flag = {
1713 "Implemented",
1714 "Not Implemented"
1717 static const value_string ff_qos_info_sta_max_sp_len_flags[] = {
1718 {0x00, "AP may deliver all buffered MSDUs, A-MSDUs and MMPDUs"},
1719 {0x01, "AP may deliver a maximum of two MSDUs and MMPDUs per SP"},
1720 {0x02, "AP may deliver a maximum of four MSDUs and MMPDUs per SP"},
1721 {0x03, "AP may deliver a maximum of six MSDUs and MMPDUs per SP"},
1722 {0, NULL}
1725 static const true_false_string ff_qos_info_sta_more_data_ack_flag = {
1726 "Can process ACK frames with the More Data bit in the Frame Control field set to 1",
1727 "Can NOT process ACK frames with the More Data bit in the Frame Control field set to 1"
1730 static const true_false_string ff_sm_pwr_save_sm_mode_flag = {
1731 "Dynamic SM Power Save mode",
1732 "Static SM Power Save mode"
1735 static const true_false_string ff_pco_phase_cntrl_flag = {
1736 "40 MHz Phase",
1737 "20 MHz Phase"
1740 static const true_false_string ff_psmp_param_set_more_psmp_flag = {
1741 "More PSMP Sequences Follow",
1742 "No PSMP Sequences Follow"
1745 static const value_string ff_mimo_cntrl_nc_index_flags[] = {
1746 {0x00, "1 Column"},
1747 {0x01, "2 Columns"},
1748 {0x02, "3 Columns"},
1749 {0x03, "4 Columns"},
1750 {0, NULL}
1753 static const value_string ff_mimo_cntrl_nr_index_flags[] = {
1754 {0x00, "1 Row"},
1755 {0x01, "2 Rows"},
1756 {0x02, "3 Rows"},
1757 {0x03, "4 Rows"},
1758 {0, NULL}
1761 static const true_false_string ff_mimo_cntrl_channel_width_flag = {
1762 "40 MHz",
1763 "20 MHz"
1766 static const true_false_string ff_ht_info_information_request_flag = {
1767 "Requesting HT Information Exchange management action frame",
1768 "Should not send an HT Information Exchange management action frame"
1771 static const true_false_string ff_ht_info_40_mhz_intolerant_flag = {
1772 "Transmitting station is intolerant of 40 MHz operation",
1773 "Transmitting station permits 40 MHz operation"
1776 static const true_false_string ff_ht_info_sta_chan_width_flag = {
1777 "40 MHz",
1778 "20 MHz"
1781 static const value_string ff_ht_action_flags[] = {
1782 {HT_ACTION_NOTIFY_CHAN_WIDTH, "Notify Channel Width"},
1783 {HT_ACTION_SM_PWR_SAVE, "Spatial Multiplexing (SM) Power Save"},
1784 {HT_ACTION_PSMP_ACTION, "Power Save Multi-Poll (PSMP) action frame"},
1785 {HT_ACTION_SET_PCO_PHASE, "Set PCO Phase"},
1786 {HT_ACTION_MIMO_CSI, "MIMO CSI Matrices"},
1787 {HT_ACTION_MIMO_BEAMFORMING, "MIMO Non-compressed Beamforming"},
1788 {HT_ACTION_MIMO_COMPRESSED_BEAMFORMING, "MIMO Compressed Beamforming"},
1789 {HT_ACTION_ANT_SEL_FEEDBACK, "Antenna Selection Indices Feedback"},
1790 {HT_ACTION_HT_INFO_EXCHANGE, "HT Information Exchange"},
1791 {0x00, NULL}
1794 static const value_string ff_mimo_cntrl_grouping_flags[] = {
1795 {0x00, "No Grouping"},
1796 {0x01, "Carrier Groups of 2"},
1797 {0x02, "Carrier Groups of 4"},
1798 {0x03, "Reserved"},
1799 {0, NULL}
1802 static const value_string ff_mimo_cntrl_coefficient_size_flags[] = {
1803 {0x00, "4 Bits"},
1804 {0x01, "5 Bits"},
1805 {0x02, "6 Bits"},
1806 {0x03, "8 Bits"},
1807 {0, NULL}
1810 static const value_string ff_mimo_cntrl_codebook_info_flags[] = {
1811 {0x00, "1 bit for 'Capital Psi', 3 bits for 'Small Psi'"},
1812 {0x01, "2 bit for 'Capital Psi', 4 bits for 'Small Psi'"},
1813 {0x02, "3 bit for 'Capital Psi', 5 bits for 'Small Psi'"},
1814 {0x03, "4 bit for 'Capital Psi', 6 bits for 'Small Psi'"},
1815 {0, NULL}
1820 static const value_string ff_pa_action_codes[] = {
1821 {PA_DSE_ENABLEMENT, "DSE enablement"},
1822 {PA_DSE_DEENABLEMENT, "DSE deenablement"},
1823 {PA_DSE_REG_LOC_ANNOUNCEMENT, "DSE Registered Location Announcement"},
1824 {PA_EXT_CHANNEL_SWITCH_ANNOUNCEMENT, "Extended Channel Switch Announcement"},
1825 {PA_DSE_MEASUREMENT_REQUEST, "DSE measurement request"},
1826 {PA_DSE_MEASUREMENT_REPORT, "DSE measurement report"},
1827 {PA_MEASUREMENT_PILOT, "Measurement Pilot"},
1828 {PA_DSE_POWER_CONSTRAINT, "DSE power constraint"},
1829 {PA_VENDOR_SPECIFIC, "Vendor Specific"},
1830 {PA_GAS_INITIAL_REQUEST, "GAS Initial Request"},
1831 {PA_GAS_INITIAL_RESPONSE, "GAS Initial Response"},
1832 {PA_GAS_COMEBACK_REQUEST, "GAS Comeback Request"},
1833 {PA_GAS_COMEBACK_RESPONSE, "GAS Comeback Response"},
1834 {PA_TDLS_DISCOVERY_RESPONSE, "TDLS Discovery Response"},
1835 {0x00, NULL}
1837 static value_string_ext ff_pa_action_codes_ext = VALUE_STRING_EXT_INIT(ff_pa_action_codes);
1839 static const value_string category_codes[] = {
1840 {CAT_SPECTRUM_MGMT, "Spectrum Management (SM)"},
1841 {CAT_QOS, "Quality of Service (QoS)"},
1842 {CAT_DLS, "Direct-Link Setup (DLS)"},
1843 {CAT_BLOCK_ACK, "Block Ack"},
1844 {CAT_PUBLIC, "Public Action"},
1845 {CAT_RADIO_MEASUREMENT, "Radio Measurement"},
1846 {CAT_FAST_BSS_TRANSITION, "Fast BSS Transition"},
1847 {CAT_HT, "High Throughput"},
1848 {CAT_SA_QUERY, "SA Query"},
1849 {CAT_PUBLIC_PROTECTED, "Protected Dual of Public Action"},
1850 {CAT_WNM, "WNM"},
1851 {CAT_UNPROTECTED_WNM, "Unprotected WNM"},
1852 {CAT_TDLS, "TDLS"},
1853 {CAT_MESH, "MESH"},
1854 {CAT_MULTIHOP, "Multihop"},
1855 {CAT_SELF_PROTECTED, "Self-protected"},
1856 {CAT_MGMT_NOTIFICATION, "Management Notification"},
1857 {CAT_VENDOR_SPECIFIC_PROTECTED, "Vendor-specific Protected"},
1858 {CAT_VENDOR_SPECIFIC, "Vendor Specific"},
1860 {0x80 | CAT_SPECTRUM_MGMT, "Spectrum Management (SM) (error)"},
1861 {0x80 | CAT_QOS, "Quality of Service (QoS (error))"},
1862 {0x80 | CAT_DLS, "Direct-Link Setup (DLS) (error)"},
1863 {0x80 | CAT_BLOCK_ACK, "Block Ack (error)"},
1864 {0x80 | CAT_PUBLIC, "Public Action (error)"},
1865 {0x80 | CAT_RADIO_MEASUREMENT, "Radio Measurement (error)"},
1866 {0x80 | CAT_FAST_BSS_TRANSITION, "Fast BSS Transition (error)"},
1867 {0x80 | CAT_HT, "High Throughput (error)"},
1868 {0x80 | CAT_SA_QUERY, "SA Query (error)"},
1869 {0x80 | CAT_PUBLIC_PROTECTED, "Protected Dual of Public Action (error)"},
1870 {0x80 | CAT_WNM, "WNM (error)"},
1871 {0x80 | CAT_UNPROTECTED_WNM, "Unprotected WNM (error)"},
1872 {0x80 | CAT_TDLS, "TDLS (error)"},
1873 {0x80 | CAT_MESH, "Mesh (error)"},
1874 {0x80 | CAT_MULTIHOP, "Multihop (error)"},
1875 {0x80 | CAT_SELF_PROTECTED, "Self-protected (error)"},
1876 {0x80 | CAT_MGMT_NOTIFICATION, "Management Notification (error)"},
1877 {0x80 | CAT_VENDOR_SPECIFIC_PROTECTED, "Vendor-specific Protected (error)"},
1878 {0x80 | CAT_VENDOR_SPECIFIC, "Vendor Specific (error)"},
1879 {0, NULL}
1881 static value_string_ext category_codes_ext = VALUE_STRING_EXT_INIT(category_codes);
1883 static const value_string action_codes[] = {
1884 {SM_ACTION_MEASUREMENT_REQUEST, "Measurement Request"},
1885 {SM_ACTION_MEASUREMENT_REPORT, "Measurement Report"},
1886 {SM_ACTION_TPC_REQUEST, "TPC Request"},
1887 {SM_ACTION_TPC_REPORT, "TPC Report"},
1888 {SM_ACTION_CHAN_SWITCH_ANNC, "Channel Switch Announcement"},
1889 {0, NULL}
1892 static const value_string vendor_action_types_mrvl[] = {
1893 {MRVL_ACTION_MESH_MANAGEMENT, "Mesh Management"},
1894 {0, NULL}
1897 static const value_string mesh_mgt_action_codes_mrvl[] = {
1898 {MRVL_MESH_MGMT_ACTION_RREQ, "Route Request"},
1899 {MRVL_MESH_MGMT_ACTION_RREP, "Route Response"},
1900 {MRVL_MESH_MGMT_ACTION_RERR, "Route Error"},
1901 {MRVL_MESH_MGMT_ACTION_PLDM, "Peer Link Down"},
1902 {0, NULL}
1905 static const value_string mesh_path_selection_codes[] = {
1906 {0x0, "Hybrid Wireless Mesh Protocol"},
1907 {0, NULL}
1910 static const value_string mesh_metric_codes[] = {
1911 {0x0, "Airtime Link Metric"},
1912 {0, NULL}
1915 static const value_string wme_action_codes[] = {
1916 {0x00, "Setup request"},
1917 {0x01, "Setup response"},
1918 {0x02, "Teardown"},
1919 {0x00, NULL}
1922 static const value_string wme_status_codes[] = {
1923 {0x00, "Admission accepted"},
1924 {0x01, "Invalid parameters"},
1925 {0x03, "Refused"},
1926 {0x00, NULL}
1929 static const value_string mesh_action[] = {
1930 {MESH_ACTION_LINK_METRIC_REPORT, "Mesh Link Metric Report"},
1931 {MESH_ACTION_HWMP, "HWMP Mesh Path Selection"},
1932 {MESH_ACTION_GATE_ANNOUNCE, "Gate Announcement"},
1933 {MESH_ACTION_CONGESTION_CTL, "Congestion Control Notification"},
1934 {MESH_ACTION_MCCA_SETUP_REQUEST, "MCCA Setup Request"},
1935 {MESH_ACTION_MCCA_SETUP_REPLY, "MCCA Setup Reply"},
1936 {MESH_ACTION_MCCA_ADV_REQUEST, "MCCA Advertisement Request"},
1937 {MESH_ACTION_MCCA_ADV, "MCCA Advertisement"},
1938 {MESH_ACTION_MCCA_TEARDOWN, "MCCA Teardown"},
1939 {MESH_ACTION_TBTT_ADJ_REQUEST, "TBTT Adjustment Request"},
1940 {MESH_ACTION_TBTT_ADJ_RESPONSE, "TBTT Adjustment Response"},
1941 {0, NULL}
1943 static value_string_ext mesh_action_ext = VALUE_STRING_EXT_INIT(mesh_action);
1945 static const value_string multihop_action[] = {
1946 {MULTIHOP_ACTION_PROXY_UPDATE, "Proxy Update"},
1947 {MULTIHOP_ACTION_PROXY_UPDATE_CONF, "Proxy Update Confirmation"},
1948 {0, NULL}
1951 static const value_string selfprot_action[] = {
1952 {SELFPROT_ACTION_MESH_PEERING_OPEN, "Mesh Peering Open"},
1953 {SELFPROT_ACTION_MESH_PEERING_CONFIRM, "Mesh Peering Confirm"},
1954 {SELFPROT_ACTION_MESH_PEERING_CLOSE, "Mesh Peering Close"},
1955 {SELFPROT_ACTION_MESH_GROUP_KEY_INFORM, "Mesh Group Key Inform"},
1956 {SELFPROT_ACTION_MESH_GROUP_KEY_ACK, "Mesh Group Key Ack"},
1957 {0, NULL}
1960 static const value_string mesh_peering_proto_ids[] = {
1961 {MESH_PEERING_PROTO_MGMT, "Mesh peering management protocol"},
1962 {MESH_PEERING_PROTO_AMPE, "Authenticated mesh peering exchange protocol"},
1963 {MESH_PEERING_PROTO_VENDOR, "Vendor specific"},
1964 {0, NULL}
1967 static const true_false_string hwmp_targ_usn_flags = {
1968 "[USN = 1] Target Sequence Number Unknown at Originator",
1969 "[USN = 0] Target Sequence Number Known at Originator"
1972 static const true_false_string hwmp_targ_to_flags = {
1973 "[TO = 1] Only Target Will Respond",
1974 "[TO = 0] Intermediate Nodes May Respond"
1977 static const value_string ack_policy[] = {
1978 {0x00, "Normal Ack"},
1979 {0x01, "No Ack"},
1980 {0x02, "No explicit acknowledgment"},
1981 {0x03, "Block Ack"},
1982 {0x00, NULL}
1985 static const value_string qos_action_codes[] = {
1986 {SM_ACTION_ADDTS_REQUEST, "ADDTS Request"},
1987 {SM_ACTION_ADDTS_RESPONSE, "ADDTS Response"},
1988 {SM_ACTION_DELTS, "DELTS"},
1989 {SM_ACTION_QOS_SCHEDULE, "Schedule"},
1990 {SM_ACTION_QOS_MAP_CONFIGURE, "QoS Map Configure"},
1991 {0, NULL}
1994 static const value_string ba_action_codes[] = {
1995 {BA_ADD_BLOCK_ACK_REQUEST, "Add Block Ack Request"},
1996 {BA_ADD_BLOCK_ACK_RESPONSE, "Add Block Ack Response"},
1997 {BA_DELETE_BLOCK_ACK, "Delete Block Ack"},
1998 {0x00, NULL}
2001 static const value_string dls_action_codes[] = {
2002 {SM_ACTION_DLS_REQUEST, "DLS Request"},
2003 {SM_ACTION_DLS_RESPONSE, "DLS Response"},
2004 {SM_ACTION_DLS_TEARDOWN, "DLS Teardown"},
2005 {0, NULL}
2008 static const value_string tsinfo_type[] = {
2009 {0x0, "Aperiodic or unspecified Traffic"},
2010 {0x1, "Periodic Traffic"},
2011 {0, NULL}
2014 static const value_string tsinfo_direction[] = {
2015 {0x00, "Uplink"},
2016 {0x01, "Downlink"},
2017 {0x02, "Direct link"},
2018 {0x03, "Bidirectional link"},
2019 {0, NULL}
2022 static const value_string tsinfo_access[] = {
2023 {0x00, "Reserved"},
2024 {0x01, "EDCA"},
2025 {0x02, "HCCA"},
2026 {0x03, "HEMM"},
2027 {0, NULL}
2030 static const value_string qos_up[] = {
2031 {0x00, "Best Effort"},
2032 {0x01, "Background"},
2033 {0x02, "Spare"},
2034 {0x03, "Excellent Effort"},
2035 {0x04, "Controlled Load"},
2036 {0x05, "Video"},
2037 {0x06, "Voice"},
2038 {0x07, "Network Control"},
2039 {0, NULL}
2042 static const value_string classifier_type[] = {
2043 {0x00, "Ethernet parameters"},
2044 {0x01, "TCP/UDP IP parameters"},
2045 {0x02, "IEEE 802.1D/Q parameters"},
2046 {0, NULL}
2049 static const true_false_string ieee80211_block_ack_control_ack_policy_flag = {
2050 "Immediate Acknowledgement Required",
2051 "Sender Does Not Require Immediate Acknowledgement"
2054 static const value_string ieee80211_block_ack_request_type_flags[] = {
2055 {0x00, "Basic Block Ack Request"},
2056 {0x01, "Reserved"},
2057 {0x02, "Compressed Block Ack Request"},
2058 {0x03, "Multi-TID Block Ack Request"},
2059 {0x00, NULL}
2062 static const value_string ieee80211_block_ack_type_flags[] = {
2063 {0x00, "Basic Block Ack"},
2064 {0x01, "Reserved"},
2065 {0x02, "Compressed Block"},
2066 {0x03, "Multi-TID Block"},
2067 {0x00, NULL}
2070 static const value_string ft_action_codes[] = {
2071 {FT_ACTION_REQUEST, "FT Request"},
2072 {FT_ACTION_RESPONSE, "FT Response"},
2073 {FT_ACTION_CONFIRM, "FT Confirm"},
2074 {FT_ACTION_ACK, "FT Ack"},
2075 {0, NULL}
2078 static const value_string sa_query_action_codes[] = {
2079 {SA_QUERY_REQUEST, "SA Query Request"},
2080 {SA_QUERY_RESPONSE, "SA Query Response"},
2081 {0, NULL}
2084 static const value_string ieee80211_data_encap_payload_types[] = {
2085 {1, "Remote Request/Response"},
2086 {2, "TDLS"},
2087 {0, NULL}
2090 static const true_false_string qos_info_field_qack_flags = {
2091 "STAs/APs MIB attribute dot11QAckOptionImplemented is true",
2092 "STAs/APs MIB attribute dot11QAckOptionImplemented is false"
2095 static const true_false_string qos_info_field_more_data_ack_flags = {
2096 "STA can process Ack frames with More Data bit and will remain in the awake state.",
2097 "STA cannot process Ack frames with More Data bit in Frame Control field."
2100 static const true_false_string qos_info_field_queue_req_flags = {
2101 "AP can process a nonzero Queue Size subfield in the QoS Control field in QoS data frames",
2102 "AP cannot process Queue Size subfield in QoS data frames."
2105 /* 7.3.1.17 Table 19b-Settings of the Max SP Length subfield */
2106 static const value_string qos_info_field_max_sp_length_flags[] = {
2107 { 0x0, "QAP may deliver all buffered MSDUs and MMPDUs." },
2108 { 0x2, "QAP may deliver a maximum of two MSDUs and MMPDUs per SP." },
2109 { 0x1, "QAP may deliver a maximum of four MSDUs and MMPDUs per SP." },
2110 { 0x3, "QAP may deliver a maximum of six MSDUs and MMPDUs per SP." },
2111 { 0, NULL}
2114 static const true_false_string rsn_preauth_flags = {
2115 "Transmitter supports pre-authentication",
2116 "Transmitter does not support pre-authentication"
2119 static const true_false_string rsn_no_pairwise_flags = {
2120 "Transmitter cannot support WEP default key 0 simultaneously with "
2121 "Pairwise key",
2122 "Transmitter can support WEP default key 0 simultaneously with "
2123 "Pairwise key"
2126 static const value_string rsn_cap_replay_counter[] = {
2127 {0x00, "1 replay counter per PTKSA/GTKSA/STAKeySA"},
2128 {0x01, "2 replay counters per PTKSA/GTKSA/STAKeySA"},
2129 {0x02, "4 replay counters per PTKSA/GTKSA/STAKeySA"},
2130 {0x03, "16 replay counters per PTKSA/GTKSA/STAKeySA"},
2131 {0, NULL}
2134 static const true_false_string ht_ldpc_coding_flag = {
2135 "Transmitter supports receiving LDPC coded packets",
2136 "Transmitter does not support receiving LDPC coded packets"
2139 static const true_false_string ht_chan_width_flag = {
2140 "Transmitter supports 20MHz and 40MHz operation",
2141 "Transmitter only supports 20MHz operation"
2144 static const value_string ht_sm_pwsave_flag[] = {
2145 {0x00, "Static SM Power Save mode"},
2146 {0x01, "Dynamic SM Power Save mode"},
2147 {0x02, "Reserved"},
2148 {0x03, "SM Power Save disabled"},
2149 {0x00, NULL}
2152 static const true_false_string ht_green_flag = {
2153 "Transmitter is able to receive PPDUs with Green Field (GF) preamble",
2154 "Transmitter is not able to receive PPDUs with Green Field (GF) preamble"
2157 static const value_string ht_rx_stbc_flag[] = {
2158 {0x00, "No Rx STBC support"},
2159 {0x01, "Rx support of one spatial stream"},
2160 {0x02, "Rx support of one and two spatial streams"},
2161 {0x03, "Rx support of one, two, and three spatial streams"},
2162 {0x00, NULL}
2165 /* IEEE Stc 802.11ac/D3.1 */
2167 static const value_string vht_max_mpdu_length_flag[] = {
2168 {0x00, "3 895"},
2169 {0x01, "7 991"},
2170 {0x02, "11 454"},
2171 {0x03, "Reserved"},
2172 {0x00, NULL}
2175 static const value_string vht_supported_chan_width_set_flag[] = {
2176 {0x00, "Neither 160MHz nor 80+80 supported"},
2177 {0x01, "160MHz supported"},
2178 {0x02, "160MHz and 80+80 Supported"},
2179 {0x03, "Reserved"},
2180 {0x00, NULL}
2183 static const value_string vht_rx_stbc_flag[] = {
2184 {0x00, "None"},
2185 {0x01, "1 Spatial Stream Supported"},
2186 {0x02, "1 to 2 Spatial Stream Supported"},
2187 {0x03, "1 to 3 Spatial Stream Supported"},
2188 {0x04, "1 to 4 Spatial Stream Supported"},
2189 {0x02, "160MHz and 80+80 Supported"},
2190 {0x05, "Reserved"},
2191 {0x06, "Reserved"},
2192 {0x07, "Reserved"},
2193 {0x00, NULL}
2196 static const value_string num_plus_one_3bit_flag[] = {
2197 {0x00, "1"},
2198 {0x01, "2"},
2199 {0x02, "3"},
2200 {0x03, "4"},
2201 {0x04, "5"},
2202 {0x05, "6"},
2203 {0x06, "7"},
2204 {0x07, "8"},
2205 {0x00, NULL}
2208 static const value_string vht_max_ampdu_flag[] = {
2209 {0x00, "8 191"},
2210 {0x01, "16 383"},
2211 {0x02, "32 767"},
2212 {0x03, "65,535"},
2213 {0x04, "131 071"},
2214 {0x05, "262 143"},
2215 {0x06, "524 287"},
2216 {0x07, "1 048 575"},
2217 {0x00, NULL}
2220 static const value_string vht_link_adapt_flag[] = {
2221 {0x00, "No Feedback"},
2222 {0x01, "Reserved (logically only solicited feedback)"},
2223 {0x02, "Unsolicited feedback only"},
2224 {0x03, "Both (can provide unsolicited feedback and respond to VHT MRQ)"},
2225 {0x00, NULL}
2228 static const value_string vht_supported_mcs_flag[] = {
2229 {0x00, "MCS 0-7"},
2230 {0x01, "MCS 0-8"},
2231 {0x02, "MCS 0-9"},
2232 {0x03, "Not Supported"},
2233 {0x00, NULL}
2236 static const value_string vht_op_channel_width_flag[] = {
2237 {0x00, "20 MHz or 40 MHz"},
2238 {0x01, "80 MHz"},
2239 {0x02, "160 MHz"},
2240 {0x03, "80+80 MHz"},
2241 {0x00, NULL}
2244 static const value_string vht_tpe_pwr_units[] = {
2245 {0x00, "EIRP"},
2246 {0x00, NULL}
2249 static const true_false_string vht_ndp_annc_sta_info_feedback_type = {
2250 "MU feedback requested",
2251 "SU feedback requested"
2254 static const true_false_string ht_delayed_block_ack_flag = {
2255 "Transmitter supports HT-Delayed BlockAck",
2256 "Transmitter does not support HT-Delayed BlockAck"
2259 static const true_false_string ht_max_amsdu_flag = {
2260 "7935 bytes",
2261 "3839 bytes"
2264 static const true_false_string ht_dss_cck_40_flag = {
2265 "Will/Can use DSSS/CCK in 40 MHz",
2266 "Won't/Can't use of DSSS/CCK in 40 MHz"
2269 static const true_false_string ht_psmp_flag = {
2270 "Will/Can support PSMP operation",
2271 "Won't/Can't support PSMP operation"
2274 static const true_false_string ht_40_mhz_intolerant_flag = {
2275 "Use of 40 MHz transmissions restricted/disallowed",
2276 "Use of 40 MHz transmissions unrestricted/allowed"
2279 static const value_string ampduparam_mpdu_start_spacing_flags[] = {
2280 {0x00, "no restriction"},
2281 {0x01, "1/4 [usec]"},
2282 {0x02, "1/2 [usec]"},
2283 {0x03, "1 [usec]"},
2284 {0x04, "2 [usec]"},
2285 {0x05, "4 [usec]"},
2286 {0x06, "8 [usec]"},
2287 {0x07, "16 [usec]"},
2288 {0x00, NULL}
2291 static const true_false_string mcsset_tx_mcs_set_defined_flag = {
2292 "Defined",
2293 "Not Defined",
2296 static const true_false_string mcsset_tx_rx_mcs_set_not_equal_flag = {
2297 "Not Equal",
2298 "Equal",
2301 static const value_string mcsset_tx_max_spatial_streams_flags[] = {
2302 {0x00, "1 spatial stream"},
2303 {0x01, "2 spatial streams"},
2304 {0x02, "3 spatial streams"},
2305 {0x03, "4 spatial streams"},
2306 {0x00, NULL}
2309 static const value_string htex_transtime_flags[] = {
2310 {0x00, "No Transition"},
2311 {0x01, "400 usec"},
2312 {0x02, "1.5 msec"},
2313 {0x03, "5 msec"},
2314 {0x00, NULL}
2317 static const value_string htex_mcs_flags[] = {
2318 {0x00, "STA does not provide MCS feedback"},
2319 {0x01, "Reserved"},
2320 {0x02, "STA provides only unsolicited MCS feedback"},
2321 {0x03, "STA can provide MCS feedback in response to MRQ as well as unsolicited MCS feedback"},
2322 {0x00, NULL}
2325 static const value_string txbf_calib_flag[] = {
2326 {0x00, "incapable"},
2327 {0x01, "Limited involvement, cannot initiate"},
2328 {0x02, "Limited involvement, can initiate"},
2329 {0x03, "Fully capable"},
2330 {0x00, NULL}
2333 static const value_string txbf_feedback_flags[] = {
2334 {0x00, "not supported"},
2335 {0x01, "delayed feedback capable"},
2336 {0x02, "immediate feedback capable"},
2337 {0x03, "delayed and immediate feedback capable"},
2338 {0x00, NULL}
2341 static const value_string txbf_antenna_flags[] = {
2342 {0x00, "1 TX antenna sounding"},
2343 {0x01, "2 TX antenna sounding"},
2344 {0x02, "3 TX antenna sounding"},
2345 {0x03, "4 TX antenna sounding"},
2346 {0x00, NULL}
2349 static const value_string txbf_csi_max_rows_bf_flags[] = {
2350 {0x00, "1 row of CSI"},
2351 {0x01, "2 rows of CSI"},
2352 {0x02, "3 rows of CSI"},
2353 {0x03, "4 rows of CSI"},
2354 {0x00, NULL}
2357 static const value_string txbf_chan_est_flags[] = {
2358 {0x00, "1 space time stream"},
2359 {0x01, "2 space time streams"},
2360 {0x02, "3 space time streams"},
2361 {0x03, "4 space time streams"},
2362 {0x00, NULL}
2365 static const value_string txbf_min_group_flags[] = {
2366 {0x00, "No grouping supported"},
2367 {0x01, "Groups of 1,2 supported"},
2368 {0x02, "Groups of 1,4 supported"},
2369 {0x03, "Groups of 1,2,4 supported"},
2370 {0x00, NULL}
2373 static const value_string hta_ext_chan_offset_flag[] = {
2374 {0x00, "No Extension Channel"},
2375 {0x01, "Extension Channel above control channel"},
2376 {0x02, "Undefined"},
2377 {0x03, "Extension Channel below control channel"},
2378 {0x00, NULL}
2381 static const true_false_string hta_rec_tx_width_flag = {
2382 "Any channel width enabled",
2383 "Use 20MHz channel (control)"
2386 static const true_false_string hta_rifs_mode_flag = {
2387 "Use of RIFS permitted",
2388 "Use of RIFS prohibited"
2391 static const true_false_string hta_controlled_access_flag = {
2392 "Not only PSMP",
2393 "PSMP only"
2396 static const value_string hta_service_interval_flag[] = {
2397 {0x00, "5ms"},
2398 {0x01, "10ms"},
2399 {0x02, "15ms"},
2400 {0x03, "20ms"},
2401 {0x04, "25ms"},
2402 {0x05, "30ms"},
2403 {0x06, "35ms"},
2404 {0x07, "40ms"},
2405 {0x00, NULL}
2408 static const value_string hta_operating_mode_flag[] = {
2409 {0x00, "Pure HT, no protection"},
2410 {0x01, "There may be non-HT devices (control & ext channel)"},
2411 {0x02, "No non-HT is associated, but at least 1 20MHz is. protect on"},
2412 {0x03, "Mixed: no non-HT is associated, protect on"},
2413 {0x00, NULL}
2416 static const true_false_string hta_non_gf_devices_flag = {
2417 "All HT devices associated are GF capable",
2418 "One or More HT devices are not GF capable"
2421 static const true_false_string hta_dual_stbc_protection_flag = {
2422 "Dual CTS protections is used",
2423 "Regular use of RTS/CTS"
2426 static const true_false_string hta_secondary_beacon_flag = {
2427 "Secondary Beacon",
2428 "Primary Beacon"
2431 static const true_false_string hta_lsig_txop_protection_flag = {
2432 "Full Support",
2433 "Not full support"
2436 static const true_false_string hta_pco_active_flag = {
2437 "PCO is activated in the BSS",
2438 "PCO is not activated in the BSS"
2441 static const true_false_string hta_pco_phase_flag = {
2442 "Switch to 20MHz phase/keep 20MHz",
2443 "Switch to 40MHz phase/keep 40MHz"
2446 static const value_string ht_info_secondary_channel_offset_flags[] = {
2447 {0x00, "No secondary channel"},
2448 {0x01, "Secondary channel is above the primary channel"},
2449 {0x02, "Reserved"},
2450 {0x03, "Secondary channel is below the primary channel"},
2451 {0x00, NULL}
2454 static const true_false_string ht_info_channel_width_flag = {
2455 "Channel of any width supported",
2456 "20 MHz channel width only"
2459 static const true_false_string ht_info_rifs_mode_flag = {
2460 "Permitted",
2461 "Prohibited"
2464 static const true_false_string ht_info_psmp_stas_only_flag = {
2465 "Association requests are accepted from only PSMP capable STA",
2466 "Association requests are accepted regardless of PSMP capability"
2469 static const value_string ht_info_service_interval_granularity_flags[] = {
2470 {0x00, "5 ms"},
2471 {0x01, "10 ms"},
2472 {0x02, "15 ms"},
2473 {0x03, "20 ms"},
2474 {0x04, "25 ms"},
2475 {0x05, "30 ms"},
2476 {0x06, "35 ms"},
2477 {0x07, "40 ms"},
2478 {0x00, NULL}
2481 static const value_string ht_info_operating_mode_flags[] = {
2482 {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"},
2483 {0x01, "HT non-member protection mode"},
2484 {0x02, "Only HT STAs in the BSS, however, there exists at least one 20 MHz STA"},
2485 {0x03, "HT mixed mode"},
2486 {0x00, NULL}
2489 static const true_false_string ht_info_non_greenfield_sta_present_flag = {
2490 "One or more associated STAs are not greenfield capable",
2491 "All associated STAs are greenfield capable"
2494 static const true_false_string ht_info_transmit_burst_limit_flag = {
2495 "2.4 GHz - 6.16 ms | All other bands - 3.08 ms",
2496 "No limit"
2499 static const true_false_string ht_info_obss_non_ht_stas_present_flag = {
2500 "Use of protection for non-HT STAs by overlapping BSSs is needed",
2501 "Use of protection for non-HT STAs by overlapping BSSs is not needed"
2504 static const true_false_string ht_info_dual_beacon_flag = {
2505 "AP transmits a secondary beacon",
2506 "No second beacon is transmitted"
2509 static const true_false_string ht_info_dual_cts_protection_flag = {
2510 "Required",
2511 "Not required"
2514 static const true_false_string ht_info_secondary_beacon_flag = {
2515 "Secondary beacon",
2516 "Primary beacon"
2519 static const true_false_string ht_info_lsig_txop_protection_full_support_flag = {
2520 "All HT STAs in the BSS support L-SIG TXOP protection",
2521 "One or more HT STAs in the BSS do not support L-SIG TXOP protection"
2524 static const true_false_string ht_info_pco_phase_flag = {
2525 "Switch to or continue 40 MHz phase",
2526 "Switch to or continue 20 MHz phase"
2529 static const true_false_string htc_lac_trq_flag = {
2530 "Want sounding PPDU",
2531 "Don't want sounding PPDU"
2534 static const true_false_string htc_lac_mai_mrq_flag = {
2535 "MCS feedback requested",
2536 "No MCS feedback requested"
2539 static const value_string ieee80211_htc_lac_asel_command_flags[] = {
2540 {0x00, "Transmit Antenna Selection Sounding Indication (TXASSI)"},
2541 {0x01, "Transmit Antenna Selection Sounding Request (TXASSR)"},
2542 {0x02, "Receive Antenna Selection Sounding Indication (RXASSI)"},
2543 {0x03, "Receive Antenna Selection Sounding Request (RXASSR)"},
2544 {0x04, "Sounding Label"},
2545 {0x05, "No feedback, ASEL training failure"},
2546 {0x06, "Transmit Antenna Selection Sounding Indication (TXASSI) requesting feedback of explicit CSI"},
2547 {0x07, "Reserved"},
2548 {0x00, NULL}
2551 static const value_string ieee80211_htc_cal_pos_flags[] = {
2552 {0x00, "Not a calibration frame"},
2553 {0x01, "Calibration Start"},
2554 {0x02, "Sounding Response"},
2555 {0x03, "Sounding Complete"},
2556 {0x00, NULL}
2559 static const true_false_string ieee80211_htc_ndp_announcement_flag = {
2560 "NDP will follow",
2561 "No NDP will follow"
2564 static const value_string ieee80211_htc_csi_steering_flags[] = {
2565 {0x00, "No feedback required"},
2566 {0x01, "CSI"},
2567 {0x02, "Non-compressed Beamforming Feedback Matrix"},
2568 {0x03, "Compressed Beamforming Feedback Matrix"},
2569 {0x00, NULL}
2572 static const value_string ieee80211_tag_secondary_channel_offset_flags[] = {
2573 {0x00, "No Secondary Channel"},
2574 {0x01, "Above Primary Channel"},
2575 {0x02, "Reserved"},
2576 {0x03, "Below Primary Channel"},
2577 {0x00, NULL}
2580 #define BSS_BITMASK_UP0 0x0001
2581 #define BSS_BITMASK_UP1 0x0002
2582 #define BSS_BITMASK_UP2 0x0004
2583 #define BSS_BITMASK_UP3 0x0008
2584 #define BSS_BITMASK_UP4 0x0010
2585 #define BSS_BITMASK_UP5 0x0020
2586 #define BSS_BITMASK_UP6 0x0040
2587 #define BSS_BITMASK_UP7 0x0080
2588 #define BSS_BITMASK_AC0 0x0100
2589 #define BSS_BITMASK_AC1 0x0200
2590 #define BSS_BITMASK_AC2 0x0400
2591 #define BSS_BITMASK_AC3 0x0800
2592 #define BSS_BITMASK_RSV 0xF000
2594 static const value_string ieee80211_tag_ext_channel_switch_announcement_switch_mode_flags[] = {
2595 {0x00, "Frames may be transmitted before the channel switch has been completed"},
2596 {0x01, "No more frames are to be transmitted until the channel switch has been completed"},
2597 {0x00, NULL}
2600 static const value_string service_interval_granularity_vals[] = {
2601 { 0, "5 ms" },
2602 { 1, "10 ms" },
2603 { 2, "15 ms" },
2604 { 3, "20 ms" },
2605 { 4, "25 ms" },
2606 { 5, "30 ms" },
2607 { 6, "35 ms" },
2608 { 7, "40 ms" },
2609 { 0x00, NULL }
2612 static const value_string wep_type_vals[] = {
2613 { AIRPDCAP_KEY_TYPE_WEP, STRING_KEY_TYPE_WEP },
2614 { AIRPDCAP_KEY_TYPE_WPA_PWD, STRING_KEY_TYPE_WPA_PWD },
2615 { AIRPDCAP_KEY_TYPE_WPA_PSK, STRING_KEY_TYPE_WPA_PSK },
2616 { 0x00, NULL }
2619 static const value_string ieee80211_ht_pren_type_vals[] = {
2620 { 51, "HT Capabilities (802.11n D1.10)" },
2621 { 52, "HT Additional Capabilities (802.11n D1.00)" },
2622 { 0, NULL }
2625 static int proto_wlan = -1;
2626 static int proto_aggregate = -1;
2627 static gboolean ieee80211_tvb_invalid = FALSE;
2629 /* ************************************************************************* */
2630 /* Header field info values for FC-field */
2631 /* ************************************************************************* */
2632 static int hf_ieee80211_fc_field = -1;
2633 static int hf_ieee80211_fc_proto_version = -1;
2634 static int hf_ieee80211_fc_frame_type = -1;
2635 static int hf_ieee80211_fc_frame_subtype = -1;
2636 static int hf_ieee80211_fc_frame_type_subtype = -1;
2638 static int hf_ieee80211_fc_flags = -1;
2639 static int hf_ieee80211_fc_to_ds = -1;
2640 static int hf_ieee80211_fc_from_ds = -1;
2641 static int hf_ieee80211_fc_data_ds = -1;
2643 static int hf_ieee80211_fc_more_frag = -1;
2644 static int hf_ieee80211_fc_retry = -1;
2645 static int hf_ieee80211_fc_pwr_mgt = -1;
2646 static int hf_ieee80211_fc_more_data = -1;
2647 static int hf_ieee80211_fc_protected = -1;
2648 static int hf_ieee80211_fc_order = -1;
2650 typedef struct retransmit_key {
2651 guint8 bssid[6];
2652 guint8 src[6];
2653 guint16 seq_control;
2654 guint fnum;
2655 } retransmit_key;
2657 static GHashTable *fc_analyse_retransmit_table = NULL;
2658 static GHashTable *fc_first_frame_table = NULL;
2660 static int hf_ieee80211_fc_analysis_retransmission = -1;
2661 static int hf_ieee80211_fc_analysis_retransmission_frame = -1;
2663 /* ************************************************************************* */
2664 /* Header values for Duration/ID field */
2665 /* ************************************************************************* */
2666 static int hf_ieee80211_did_duration = -1;
2667 static int hf_ieee80211_assoc_id = -1;
2669 /* ************************************************************************* */
2670 /* Header values for different address-fields (all 4 of them) */
2671 /* ************************************************************************* */
2672 static int hf_ieee80211_addr_da = -1; /* Destination address subfield */
2673 static int hf_ieee80211_addr_da_resolved = -1; /* Dst addr subfield resolved*/
2674 static int hf_ieee80211_addr_sa = -1; /* Source address subfield */
2675 static int hf_ieee80211_addr_sa_resolved = -1; /* Src addr subfield resolved*/
2676 static int hf_ieee80211_addr_ra = -1; /* Receiver address subfield */
2677 static int hf_ieee80211_addr_ra_resolved = -1; /* Rcv addr subfield resolved*/
2678 static int hf_ieee80211_addr_ta = -1; /* Transmitter address subfield */
2679 static int hf_ieee80211_addr_ta_resolved = -1; /* Txm addr subfield resolved*/
2680 static int hf_ieee80211_addr_bssid = -1; /* address is bssid */
2681 static int hf_ieee80211_addr_bssid_resolved = -1; /* bssid resolved*/
2683 static int hf_ieee80211_addr = -1; /* Source or destination address subfield */
2684 static int hf_ieee80211_addr_resolved = -1;/*Src/dst address subfield resolved*/
2686 /* ************************************************************************* */
2687 /* Header values for QoS control field */
2688 /* ************************************************************************* */
2689 static int hf_ieee80211_qos = -1;
2690 static int hf_ieee80211_qos_tid = -1;
2691 static int hf_ieee80211_qos_priority = -1;
2692 static int hf_ieee80211_qos_ack_policy = -1;
2693 static int hf_ieee80211_qos_amsdu_present = -1;
2694 static int hf_ieee80211_qos_eosp = -1;
2695 static int hf_ieee80211_qos_bit4 = -1;
2696 static int hf_ieee80211_qos_txop_limit = -1;
2697 static int hf_ieee80211_qos_ps_buf_state = -1;
2698 static int hf_ieee80211_qos_buf_state_indicated = -1;
2699 static int hf_ieee80211_qos_highest_pri_buf_ac = -1;
2700 static int hf_ieee80211_qos_qap_buf_load = -1;
2701 static int hf_ieee80211_qos_txop_dur_req = -1;
2702 static int hf_ieee80211_qos_queue_size = -1;
2704 /* ************************************************************************* */
2705 /* Header values for HT control field (+HTC) */
2706 /* ************************************************************************* */
2707 /* 802.11nD-1.10 & 802.11nD-2.0 7.1.3.5a */
2708 static int hf_ieee80211_htc = -1;
2709 static int hf_ieee80211_htc_lac = -1;
2710 static int hf_ieee80211_htc_lac_reserved = -1;
2711 static int hf_ieee80211_htc_lac_trq = -1;
2712 static int hf_ieee80211_htc_lac_mai_aseli = -1;
2713 static int hf_ieee80211_htc_lac_mai_mrq = -1;
2714 static int hf_ieee80211_htc_lac_mai_msi = -1;
2715 static int hf_ieee80211_htc_lac_mai_reserved = -1;
2716 static int hf_ieee80211_htc_lac_mfsi = -1;
2717 static int hf_ieee80211_htc_lac_mfb = -1;
2718 static int hf_ieee80211_htc_lac_asel_command = -1;
2719 static int hf_ieee80211_htc_lac_asel_data = -1;
2720 static int hf_ieee80211_htc_cal_pos = -1;
2721 static int hf_ieee80211_htc_cal_seq = -1;
2722 static int hf_ieee80211_htc_reserved1 = -1;
2723 static int hf_ieee80211_htc_csi_steering = -1;
2724 static int hf_ieee80211_htc_ndp_announcement = -1;
2725 static int hf_ieee80211_htc_reserved2 = -1;
2726 static int hf_ieee80211_htc_ac_constraint = -1;
2727 static int hf_ieee80211_htc_rdg_more_ppdu = -1;
2729 /* ************************************************************************* */
2730 /* Header values for sequence number field */
2731 /* ************************************************************************* */
2732 static int hf_ieee80211_frag_number = -1;
2733 static int hf_ieee80211_seq_number = -1;
2735 /* ************************************************************************* */
2736 /* Header values for Frame Check field */
2737 /* ************************************************************************* */
2738 static int hf_ieee80211_fcs = -1;
2739 static int hf_ieee80211_fcs_good = -1;
2740 static int hf_ieee80211_fcs_bad = -1;
2742 /* ************************************************************************* */
2743 /* Header values for reassembly */
2744 /* ************************************************************************* */
2745 static int hf_ieee80211_fragments = -1;
2746 static int hf_ieee80211_fragment = -1;
2747 static int hf_ieee80211_fragment_overlap = -1;
2748 static int hf_ieee80211_fragment_overlap_conflict = -1;
2749 static int hf_ieee80211_fragment_multiple_tails = -1;
2750 static int hf_ieee80211_fragment_too_long_fragment = -1;
2751 static int hf_ieee80211_fragment_error = -1;
2752 static int hf_ieee80211_fragment_count = -1;
2753 static int hf_ieee80211_reassembled_in = -1;
2754 static int hf_ieee80211_reassembled_length = -1;
2756 static int proto_wlan_mgt = -1;
2758 /* ************************************************************************* */
2759 /* Fixed fields found in mgt frames */
2760 /* ************************************************************************* */
2761 static int hf_ieee80211_fixed_parameters = -1; /* Protocol payload for management frames */
2763 static int hf_ieee80211_ff_auth_alg = -1; /* Authentication algorithm field */
2764 static int hf_ieee80211_ff_auth_seq = -1; /* Authentication transaction sequence */
2765 static int hf_ieee80211_ff_current_ap = -1; /* Current AP MAC address */
2766 static int hf_ieee80211_ff_listen_ival = -1; /* Listen interval fixed field */
2767 static int hf_ieee80211_ff_timestamp = -1; /* 64 bit timestamp */
2768 static int hf_ieee80211_ff_beacon_interval = -1; /* 16 bit Beacon interval */
2769 static int hf_ieee80211_ff_assoc_id = -1; /* 16 bit AID field */
2770 static int hf_ieee80211_ff_reason = -1; /* 16 bit reason code */
2771 static int hf_ieee80211_ff_status_code = -1; /* Status code */
2772 static int hf_ieee80211_ff_category_code = -1; /* 8 bit Category code */
2773 static int hf_ieee80211_ff_action_code = -1; /* 8 bit Action code */
2774 static int hf_ieee80211_ff_dialog_token = -1; /* 8 bit Dialog token */
2775 static int hf_ieee80211_ff_wme_action_code = -1; /* Management notification action code */
2776 static int hf_ieee80211_ff_wme_status_code = -1; /* Management notification setup response status code */
2777 static int hf_ieee80211_ff_qos_action_code = -1;
2778 static int hf_ieee80211_ff_dls_action_code = -1;
2779 static int hf_ieee80211_ff_dst_mac_addr = -1; /* DLS destination MAC addressi */
2780 static int hf_ieee80211_ff_src_mac_addr = -1; /* DLS source MAC addressi */
2781 static int hf_ieee80211_ff_dls_timeout = -1; /* DLS timeout value */
2782 static int hf_ieee80211_ff_ft_action_code = -1; /* 8 bit FT Action code */
2783 static int hf_ieee80211_ff_sta_address = -1;
2784 static int hf_ieee80211_ff_target_ap_address = -1;
2785 static int hf_ieee80211_ff_gas_comeback_delay = -1;
2786 static int hf_ieee80211_ff_gas_fragment_id = -1;
2787 static int hf_ieee80211_ff_more_gas_fragments = -1;
2788 static int hf_ieee80211_ff_query_request_length = -1;
2789 static int hf_ieee80211_ff_query_request = -1;
2790 static int hf_ieee80211_ff_query_response_length = -1;
2791 static int hf_ieee80211_ff_query_response = -1;
2792 static int hf_ieee80211_ff_anqp_info_id = -1;
2793 static int hf_ieee80211_ff_anqp_info_length = -1;
2794 static int hf_ieee80211_ff_anqp_info = -1;
2795 static int hf_ieee80211_ff_anqp_query_id = -1;
2796 static int hf_ieee80211_ff_anqp_capability = -1;
2797 static int hf_ieee80211_ff_anqp_capability_vlen = -1;
2798 static int hf_ieee80211_ff_anqp_capability_vendor = -1;
2799 static int hf_ieee80211_ff_venue_info_group = -1;
2800 static int hf_ieee80211_ff_venue_info_type = -1;
2801 static int hf_ieee80211_ff_anqp_venue_length = -1;
2802 static int hf_ieee80211_ff_anqp_venue_language = -1;
2803 static int hf_ieee80211_ff_anqp_venue_name = -1;
2804 static int hf_ieee80211_ff_anqp_nw_auth_type_indicator = -1;
2805 static int hf_ieee80211_ff_anqp_nw_auth_type_url_len = -1;
2806 static int hf_ieee80211_ff_anqp_nw_auth_type_url = -1;
2807 static int hf_ieee80211_ff_anqp_roaming_consortium_oi_len = -1;
2808 static int hf_ieee80211_ff_anqp_roaming_consortium_oi = -1;
2809 static int hf_ieee80211_ff_anqp_ip_addr_avail_ipv6 = -1;
2810 static int hf_ieee80211_ff_anqp_ip_addr_avail_ipv4 = -1;
2811 static int hf_ieee80211_ff_anqp_nai_realm_count = -1;
2812 static int hf_ieee80211_ff_anqp_nai_field_len = -1;
2813 static int hf_ieee80211_ff_anqp_nai_realm_encoding = -1;
2814 static int hf_ieee80211_ff_anqp_nai_realm_length = -1;
2815 static int hf_ieee80211_ff_anqp_nai_realm = -1;
2816 static int hf_ieee80211_ff_anqp_nai_realm_eap_count = -1;
2817 static int hf_ieee80211_ff_anqp_nai_realm_eap_len = -1;
2818 static int hf_ieee80211_ff_anqp_nai_realm_eap_method = -1;
2819 static int hf_ieee80211_ff_anqp_nai_realm_auth_param_count = -1;
2820 static int hf_ieee80211_ff_anqp_nai_realm_auth_param_id = -1;
2821 static int hf_ieee80211_ff_anqp_nai_realm_auth_param_len = -1;
2822 static int hf_ieee80211_ff_anqp_nai_realm_auth_param_value = -1;
2823 static int hf_ieee80211_3gpp_gc_gud = -1;
2824 static int hf_ieee80211_3gpp_gc_udhl = -1;
2825 static int hf_ieee80211_3gpp_gc_iei = -1;
2826 static int hf_ieee80211_3gpp_gc_plmn_len = -1;
2827 static int hf_ieee80211_3gpp_gc_num_plmns = -1;
2828 static int hf_ieee80211_3gpp_gc_plmn = -1;
2829 static int hf_ieee80211_ff_anqp_domain_name_len = -1;
2830 static int hf_ieee80211_ff_anqp_domain_name = -1;
2831 static int hf_ieee80211_ff_tdls_action_code = -1;
2832 static int hf_ieee80211_ff_target_channel = -1;
2833 static int hf_ieee80211_ff_regulatory_class = -1;
2834 static int hf_ieee80211_ff_wnm_action_code = -1;
2835 static int hf_ieee80211_ff_key_data_length = -1;
2836 static int hf_ieee80211_ff_key_data = -1;
2837 static int hf_ieee80211_ff_wnm_notification_type = -1;
2838 static int hf_ieee80211_ff_rm_action_code = -1;
2839 static int hf_ieee80211_ff_rm_dialog_token = -1;
2840 static int hf_ieee80211_ff_rm_repetitions = -1;
2841 static int hf_ieee80211_ff_rm_tx_power = -1;
2842 static int hf_ieee80211_ff_rm_max_tx_power = -1;
2843 static int hf_ieee80211_ff_tpc = -1;
2844 static int hf_ieee80211_ff_tpc_element_id = -1;
2845 static int hf_ieee80211_ff_tpc_length = -1;
2846 static int hf_ieee80211_ff_tpc_tx_power = -1;
2847 static int hf_ieee80211_ff_tpc_link_margin = -1;
2848 static int hf_ieee80211_ff_rm_rx_antenna_id = -1;
2849 static int hf_ieee80211_ff_rm_tx_antenna_id = -1;
2850 static int hf_ieee80211_ff_rm_rcpi = -1;
2851 static int hf_ieee80211_ff_rm_rsni = -1;
2852 static int hf_ieee80211_ff_request_mode_pref_cand = -1;
2853 static int hf_ieee80211_ff_request_mode_abridged = -1;
2854 static int hf_ieee80211_ff_request_mode_disassoc_imminent = -1;
2855 static int hf_ieee80211_ff_request_mode_bss_term_included = -1;
2856 static int hf_ieee80211_ff_request_mode_ess_disassoc_imminent = -1;
2857 static int hf_ieee80211_ff_disassoc_timer = -1;
2858 static int hf_ieee80211_ff_validity_interval = -1;
2859 static int hf_ieee80211_ff_url_len = -1;
2860 static int hf_ieee80211_ff_url = -1;
2862 static int hf_ieee80211_ff_sa_query_action_code = -1;
2863 static int hf_ieee80211_ff_transaction_id = -1;
2865 /* Vendor specific */
2866 static int hf_ieee80211_ff_marvell_action_type = -1;
2867 static int hf_ieee80211_ff_marvell_mesh_mgt_action_code = -1;
2868 static int hf_ieee80211_ff_marvell_mesh_mgt_length = -1; /* Mesh Management length */
2869 static int hf_ieee80211_ff_marvell_mesh_mgt_mode = -1; /* Mesh Management mode */
2870 static int hf_ieee80211_ff_marvell_mesh_mgt_ttl = -1; /* Mesh Management TTL */
2871 static int hf_ieee80211_ff_marvell_mesh_mgt_dstcount = -1; /* Mesh Management dst count */
2872 static int hf_ieee80211_ff_marvell_mesh_mgt_hopcount = -1; /* Mesh Management hop count */
2873 static int hf_ieee80211_ff_marvell_mesh_mgt_rreqid = -1; /* Mesh Management RREQ ID */
2874 static int hf_ieee80211_ff_marvell_mesh_mgt_sa = -1; /* Mesh Management src addr */
2875 static int hf_ieee80211_ff_marvell_mesh_mgt_ssn = -1; /* Mesh Management src sequence number */
2876 static int hf_ieee80211_ff_marvell_mesh_mgt_metric = -1; /* Mesh Management metric */
2877 static int hf_ieee80211_ff_marvell_mesh_mgt_flags = -1; /* Mesh Management RREQ flags */
2878 static int hf_ieee80211_ff_marvell_mesh_mgt_da = -1; /* Mesh Management dst addr */
2879 static int hf_ieee80211_ff_marvell_mesh_mgt_dsn = -1; /* Mesh Management dst sequence number */
2880 static int hf_ieee80211_ff_marvell_mesh_mgt_lifetime = -1; /* Mesh Management lifetime */
2883 static int hf_ieee80211_ff_ba_action = -1;
2885 static int hf_ieee80211_ff_block_ack_params = -1;
2886 static int hf_ieee80211_ff_block_ack_params_amsdu_permitted = -1;
2887 static int hf_ieee80211_ff_block_ack_params_policy = -1;
2888 static int hf_ieee80211_ff_block_ack_params_tid = -1;
2889 static int hf_ieee80211_ff_block_ack_params_buffer_size = -1;
2891 static const int *ieee80211_ff_block_ack_params_fields[] = {
2892 &hf_ieee80211_ff_block_ack_params_amsdu_permitted,
2893 &hf_ieee80211_ff_block_ack_params_policy,
2894 &hf_ieee80211_ff_block_ack_params_tid,
2895 &hf_ieee80211_ff_block_ack_params_buffer_size,
2896 NULL
2899 static int hf_ieee80211_ff_block_ack_timeout = -1;
2901 static int hf_ieee80211_ff_block_ack_ssc = -1;
2902 static int hf_ieee80211_ff_block_ack_ssc_fragment = -1;
2903 static int hf_ieee80211_ff_block_ack_ssc_sequence = -1;
2905 static const int *ieee80211_ff_block_ack_ssc_fields[] = {
2906 &hf_ieee80211_ff_block_ack_ssc_fragment,
2907 &hf_ieee80211_ff_block_ack_ssc_sequence,
2908 NULL
2911 static int hf_ieee80211_ff_delba_param = -1;
2912 static int hf_ieee80211_ff_delba_param_reserved = -1;
2913 static int hf_ieee80211_ff_delba_param_init = -1;
2914 static int hf_ieee80211_ff_delba_param_tid = -1;
2916 static const int *ieee80211_ff_delba_param_fields[] = {
2917 &hf_ieee80211_ff_delba_param_reserved,
2918 &hf_ieee80211_ff_delba_param_init,
2919 &hf_ieee80211_ff_delba_param_tid,
2920 NULL
2923 static int hf_ieee80211_ff_max_reg_pwr = -1;
2924 static int hf_ieee80211_ff_measurement_pilot_int = -1;
2925 static int hf_ieee80211_ff_country_str = -1;
2926 static int hf_ieee80211_ff_max_tx_pwr = -1;
2927 static int hf_ieee80211_ff_tx_pwr_used = -1;
2928 static int hf_ieee80211_ff_transceiver_noise_floor = -1;
2929 static int hf_ieee80211_ff_channel_width = -1;
2931 static int hf_ieee80211_ff_qos_info_ap = -1;
2932 static int hf_ieee80211_ff_qos_info_ap_edca_param_set_counter = -1;
2933 static int hf_ieee80211_ff_qos_info_ap_q_ack = -1;
2934 static int hf_ieee80211_ff_qos_info_ap_queue_req = -1;
2935 static int hf_ieee80211_ff_qos_info_ap_txop_request = -1;
2936 static int hf_ieee80211_ff_qos_info_ap_reserved = -1;
2938 static const int *ieee80211_ff_qos_info_ap_fields[] = {
2939 &hf_ieee80211_ff_qos_info_ap_edca_param_set_counter,
2940 &hf_ieee80211_ff_qos_info_ap_q_ack,
2941 &hf_ieee80211_ff_qos_info_ap_queue_req,
2942 &hf_ieee80211_ff_qos_info_ap_txop_request,
2943 &hf_ieee80211_ff_qos_info_ap_reserved,
2944 NULL
2947 static int hf_ieee80211_ff_qos_info_sta = -1;
2948 static int hf_ieee80211_ff_qos_info_sta_ac_vo = -1;
2949 static int hf_ieee80211_ff_qos_info_sta_ac_vi = -1;
2950 static int hf_ieee80211_ff_qos_info_sta_ac_bk = -1;
2951 static int hf_ieee80211_ff_qos_info_sta_ac_be = -1;
2952 static int hf_ieee80211_ff_qos_info_sta_q_ack = -1;
2953 static int hf_ieee80211_ff_qos_info_sta_max_sp_len = -1;
2954 static int hf_ieee80211_ff_qos_info_sta_more_data_ack = -1;
2956 static const int *ieee80211_ff_qos_info_sta_fields[] = {
2957 &hf_ieee80211_ff_qos_info_sta_ac_vo,
2958 &hf_ieee80211_ff_qos_info_sta_ac_vi,
2959 &hf_ieee80211_ff_qos_info_sta_ac_bk,
2960 &hf_ieee80211_ff_qos_info_sta_ac_be,
2961 &hf_ieee80211_ff_qos_info_sta_q_ack,
2962 &hf_ieee80211_ff_qos_info_sta_max_sp_len,
2963 &hf_ieee80211_ff_qos_info_sta_more_data_ack,
2964 NULL
2967 static int hf_ieee80211_ff_sm_pwr_save = -1;
2968 static int hf_ieee80211_ff_sm_pwr_save_enabled = -1;
2969 static int hf_ieee80211_ff_sm_pwr_save_sm_mode = -1;
2970 static int hf_ieee80211_ff_sm_pwr_save_reserved = -1;
2972 static const int *ieee80211_ff_sw_pwr_save_fields[] = {
2973 &hf_ieee80211_ff_sm_pwr_save_enabled,
2974 &hf_ieee80211_ff_sm_pwr_save_sm_mode,
2975 &hf_ieee80211_ff_sm_pwr_save_reserved,
2976 NULL
2979 static int hf_ieee80211_ff_pco_phase_cntrl = -1;
2981 static int hf_ieee80211_ff_psmp_param_set = -1;
2982 static int hf_ieee80211_ff_psmp_param_set_n_sta = -1;
2983 static int hf_ieee80211_ff_psmp_param_set_more_psmp = -1;
2984 static int hf_ieee80211_ff_psmp_param_set_psmp_sequence_duration = -1;
2986 static const int *ieee80211_ff_psmp_param_set_fields[] = {
2987 &hf_ieee80211_ff_psmp_param_set_n_sta,
2988 &hf_ieee80211_ff_psmp_param_set_more_psmp,
2989 &hf_ieee80211_ff_psmp_param_set_psmp_sequence_duration,
2990 NULL
2993 static int hf_ieee80211_ff_mimo_cntrl = -1;
2994 static int hf_ieee80211_ff_mimo_cntrl_nc_index = -1;
2995 static int hf_ieee80211_ff_mimo_cntrl_nr_index = -1;
2996 static int hf_ieee80211_ff_mimo_cntrl_channel_width = -1;
2997 static int hf_ieee80211_ff_mimo_cntrl_grouping = -1;
2998 static int hf_ieee80211_ff_mimo_cntrl_coefficient_size = -1;
2999 static int hf_ieee80211_ff_mimo_cntrl_codebook_info = -1;
3000 static int hf_ieee80211_ff_mimo_cntrl_remaining_matrix_segment = -1;
3001 static int hf_ieee80211_ff_mimo_cntrl_reserved = -1;
3002 static int hf_ieee80211_ff_mimo_cntrl_sounding_timestamp = -1;
3004 static int hf_ieee80211_ff_ant_selection = -1;
3005 static int hf_ieee80211_ff_ant_selection_0 = -1;
3006 static int hf_ieee80211_ff_ant_selection_1 = -1;
3007 static int hf_ieee80211_ff_ant_selection_2 = -1;
3008 static int hf_ieee80211_ff_ant_selection_3 = -1;
3009 static int hf_ieee80211_ff_ant_selection_4 = -1;
3010 static int hf_ieee80211_ff_ant_selection_5 = -1;
3011 static int hf_ieee80211_ff_ant_selection_6 = -1;
3012 static int hf_ieee80211_ff_ant_selection_7 = -1;
3014 static const int *ieee80211_ff_ant_selection_fields[] = {
3015 &hf_ieee80211_ff_ant_selection_0,
3016 &hf_ieee80211_ff_ant_selection_1,
3017 &hf_ieee80211_ff_ant_selection_2,
3018 &hf_ieee80211_ff_ant_selection_3,
3019 &hf_ieee80211_ff_ant_selection_4,
3020 &hf_ieee80211_ff_ant_selection_5,
3021 &hf_ieee80211_ff_ant_selection_6,
3022 &hf_ieee80211_ff_ant_selection_7,
3023 NULL
3026 static int hf_ieee80211_ff_ext_channel_switch_announcement = -1;
3027 static int hf_ieee80211_ff_ext_channel_switch_announcement_switch_mode = -1;
3028 static int hf_ieee80211_ff_ext_channel_switch_announcement_new_reg_class = -1;
3029 static int hf_ieee80211_ff_ext_channel_switch_announcement_new_chan_number = -1;
3030 static int hf_ieee80211_ff_ext_channel_switch_announcement_switch_count = -1;
3032 static const int *ieee80211_ff_ext_channel_switch_announcement_fields[] = {
3033 &hf_ieee80211_ff_ext_channel_switch_announcement_switch_mode,
3034 &hf_ieee80211_ff_ext_channel_switch_announcement_new_reg_class,
3035 &hf_ieee80211_ff_ext_channel_switch_announcement_new_chan_number,
3036 &hf_ieee80211_ff_ext_channel_switch_announcement_switch_count,
3037 NULL
3040 static int hf_ieee80211_ff_ht_info = -1;
3041 static int hf_ieee80211_ff_ht_info_information_request = -1;
3042 static int hf_ieee80211_ff_ht_info_40_mhz_intolerant = -1;
3043 static int hf_ieee80211_ff_ht_info_sta_chan_width = -1;
3044 static int hf_ieee80211_ff_ht_info_reserved = -1;
3046 static const int *ieee80211_ff_ht_info_fields[] = {
3047 &hf_ieee80211_ff_ht_info_information_request,
3048 &hf_ieee80211_ff_ht_info_40_mhz_intolerant,
3049 &hf_ieee80211_ff_ht_info_sta_chan_width,
3050 &hf_ieee80211_ff_ht_info_reserved,
3051 NULL
3054 static int hf_ieee80211_ff_ht_action = -1;
3056 static int hf_ieee80211_ff_psmp_sta_info = -1;
3057 static int hf_ieee80211_ff_psmp_sta_info_type = -1;
3058 static int hf_ieee80211_ff_psmp_sta_info_dtt_start_offset = -1;
3059 static int hf_ieee80211_ff_psmp_sta_info_dtt_duration = -1;
3060 static int hf_ieee80211_ff_psmp_sta_info_sta_id = -1;
3061 static int hf_ieee80211_ff_psmp_sta_info_utt_start_offset = -1;
3062 static int hf_ieee80211_ff_psmp_sta_info_utt_duration = -1;
3063 static int hf_ieee80211_ff_psmp_sta_info_reserved_small= -1;
3064 static int hf_ieee80211_ff_psmp_sta_info_reserved_large = -1;
3065 static int hf_ieee80211_ff_psmp_sta_info_psmp_multicast_id = -1;
3067 static int hf_ieee80211_ff_mimo_csi_snr = -1;
3069 /*** Begin: 802.11s additions ***/
3070 static int hf_ieee80211_mesh_control_field = -1;
3072 static int hf_ieee80211_ff_mesh_action = -1;
3073 static int hf_ieee80211_ff_multihop_action = -1;
3074 static int hf_ieee80211_ff_mesh_flags = -1;
3075 static int hf_ieee80211_ff_mesh_ttl = -1;
3076 static int hf_ieee80211_ff_mesh_sequence = -1;
3077 static int hf_ieee80211_ff_mesh_addr4 = -1;
3078 static int hf_ieee80211_ff_mesh_addr5 = -1;
3079 static int hf_ieee80211_ff_mesh_addr6 = -1;
3080 static int hf_ieee80211_ff_selfprot_action = -1;
3082 static int hf_ieee80211_mesh_peering_proto = -1;
3083 static int hf_ieee80211_mesh_peering_local_link_id = -1;
3084 static int hf_ieee80211_mesh_peering_peer_link_id = -1;
3086 static int hf_ieee80211_ff_hwmp_flags = -1;
3087 static int hf_ieee80211_ff_hwmp_hopcount = -1;
3088 static int hf_ieee80211_ff_hwmp_ttl = -1;
3089 static int hf_ieee80211_ff_hwmp_pdid = -1;
3090 static int hf_ieee80211_ff_hwmp_orig_sta = -1;
3091 static int hf_ieee80211_ff_hwmp_orig_sn = -1;
3092 static int hf_ieee80211_ff_hwmp_orig_ext = -1;
3093 static int hf_ieee80211_ff_hwmp_lifetime = -1;
3094 static int hf_ieee80211_ff_hwmp_metric = -1;
3095 static int hf_ieee80211_ff_hwmp_targ_count = -1;
3096 static int hf_ieee80211_ff_hwmp_targ_flags = -1;
3097 static int hf_ieee80211_ff_hwmp_targ_to_flags = -1;
3098 static int hf_ieee80211_ff_hwmp_targ_usn_flags = -1;
3099 static int hf_ieee80211_ff_hwmp_targ_sta = -1;
3100 static int hf_ieee80211_ff_hwmp_targ_sn = -1;
3101 static int hf_ieee80211_ff_hwmp_targ_ext = -1;
3102 static int hf_ieee80211_rann_flags = -1;
3103 static int hf_ieee80211_rann_root_sta = -1;
3104 static int hf_ieee80211_rann_sn = -1;
3105 static int hf_ieee80211_rann_interval = -1;
3107 static int hf_ieee80211_mesh_channel_switch_ttl = -1;
3108 static int hf_ieee80211_mesh_channel_switch_flag = -1;
3109 static int hf_ieee80211_mesh_channel_switch_reason_code = -1;
3110 static int hf_ieee80211_mesh_channel_switch_precedence_value = -1;
3111 static int hf_ieee80211_mesh_chswitch_flag_txrestrict = -1;
3112 static int hf_ieee80211_mesh_chswitch_flag_initiator = -1;
3114 static int hf_ieee80211_mesh_config_path_sel_protocol = -1;
3115 static int hf_ieee80211_mesh_config_path_sel_metric = -1;
3116 static int hf_ieee80211_mesh_config_congestion_control = -1;
3117 static int hf_ieee80211_mesh_config_sync_method = -1;
3118 static int hf_ieee80211_mesh_config_auth_protocol = -1;
3119 static int hf_ieee80211_mesh_config_formation_info = -1;
3120 static int hf_ieee80211_mesh_config_capability = -1;
3121 static int hf_ieee80211_mesh_id = -1;
3122 static int hf_ieee80211_mesh_config_cap_accepting = -1;
3123 static int hf_ieee80211_mesh_config_cap_mcca_support = -1;
3124 static int hf_ieee80211_mesh_config_cap_mcca_enabled = -1;
3125 static int hf_ieee80211_mesh_config_cap_forwarding = -1;
3126 static int hf_ieee80211_mesh_config_cap_mbca_enabled = -1;
3127 static int hf_ieee80211_mesh_config_cap_tbtt_adjusting = -1;
3128 static int hf_ieee80211_mesh_config_cap_power_save_level = -1;
3129 static int hf_ieee80211_mesh_form_info_num_of_peerings = -1;
3131 static int hf_ieee80211_ff_public_action = -1;
3133 /* ************************************************************************* */
3134 /* Flags found in the capability field (fixed field) */
3135 /* ************************************************************************* */
3136 static int hf_ieee80211_ff_capture = -1;
3137 static int hf_ieee80211_ff_cf_ess = -1;
3138 static int hf_ieee80211_ff_cf_ibss = -1;
3139 static int hf_ieee80211_ff_cf_sta_poll = -1; /* CF pollable status for a STA */
3140 static int hf_ieee80211_ff_cf_ap_poll = -1; /* CF pollable status for an AP */
3141 static int hf_ieee80211_ff_cf_privacy = -1;
3142 static int hf_ieee80211_ff_cf_preamble = -1;
3143 static int hf_ieee80211_ff_cf_pbcc = -1;
3144 static int hf_ieee80211_ff_cf_agility = -1;
3145 static int hf_ieee80211_ff_short_slot_time = -1;
3146 static int hf_ieee80211_ff_dsss_ofdm = -1;
3147 static int hf_ieee80211_ff_cf_spec_man = -1;
3148 static int hf_ieee80211_ff_cf_apsd = -1;
3149 static int hf_ieee80211_ff_radio_measurement = -1;
3150 static int hf_ieee80211_ff_cf_del_blk_ack = -1;
3151 static int hf_ieee80211_ff_cf_imm_blk_ack = -1;
3153 /* ************************************************************************* */
3154 /* A-MSDU fields */
3155 /* ************************************************************************* */
3156 static int hf_ieee80211_amsdu_subframe = -1;
3157 static int hf_ieee80211_amsdu_length = -1;
3159 /* ************************************************************************* */
3160 /* Tagged value format fields */
3161 /* ************************************************************************* */
3162 static int hf_ieee80211_tagged_parameters = -1; /* Tagged payload item */
3163 static int hf_ieee80211_tag = -1;
3164 static int hf_ieee80211_tag_number = -1;
3165 static int hf_ieee80211_tag_length = -1;
3166 static int hf_ieee80211_tag_interpretation = -1;
3167 static int hf_ieee80211_tag_data = -1;
3168 static int hf_ieee80211_tag_oui = -1;
3169 static int hf_ieee80211_tag_ssid = -1;
3170 static int hf_ieee80211_tag_supp_rates = -1;
3171 static int hf_ieee80211_tag_fh_dwell_time = -1;
3172 static int hf_ieee80211_tag_fh_hop_set = -1;
3173 static int hf_ieee80211_tag_fh_hop_pattern = -1;
3174 static int hf_ieee80211_tag_fh_hop_index = -1;
3175 static int hf_ieee80211_tag_ds_param_channel = -1;
3176 static int hf_ieee80211_tag_cfp_count = -1;
3177 static int hf_ieee80211_tag_cfp_period = -1;
3178 static int hf_ieee80211_tag_cfp_max_duration = -1;
3179 static int hf_ieee80211_tag_cfp_dur_remaining = -1;
3180 static int hf_ieee80211_tim_dtim_count = -1;
3181 static int hf_ieee80211_tim_dtim_period = -1;
3182 static int hf_ieee80211_tim_bmapctl = -1;
3183 static int hf_ieee80211_tim_bmapctl_mcast = -1;
3184 static int hf_ieee80211_tim_bmapctl_offset = -1;
3185 static int hf_ieee80211_tim_partial_virtual_bitmap = -1;
3186 static int hf_ieee80211_tag_ibss_atim_window = -1;
3187 static int hf_ieee80211_tag_country_info_code = -1;
3188 static int hf_ieee80211_tag_country_info_env = -1;
3189 static int hf_ieee80211_tag_country_info_pad = -1;
3190 static int hf_ieee80211_tag_country_info_fnm = -1;
3191 static int hf_ieee80211_tag_country_info_fnm_fcn = -1;
3192 static int hf_ieee80211_tag_country_info_fnm_nc = -1;
3193 static int hf_ieee80211_tag_country_info_fnm_mtpl = -1;
3194 static int hf_ieee80211_tag_country_info_rrc = -1;
3195 static int hf_ieee80211_tag_country_info_rrc_rei = -1;
3196 static int hf_ieee80211_tag_country_info_rrc_rc = -1;
3197 static int hf_ieee80211_tag_country_info_rrc_cc = -1;
3198 static int hf_ieee80211_tag_fh_hopping_parameter_prime_radix = -1;
3199 static int hf_ieee80211_tag_fh_hopping_parameter_nb_channels = -1;
3200 static int hf_ieee80211_tag_fh_hopping_table_flag = -1;
3201 static int hf_ieee80211_tag_fh_hopping_table_number_of_sets = -1;
3202 static int hf_ieee80211_tag_fh_hopping_table_modulus = -1;
3203 static int hf_ieee80211_tag_fh_hopping_table_offset = -1;
3204 static int hf_ieee80211_tag_fh_hopping_random_table = -1;
3205 static int hf_ieee80211_tag_request = -1;
3206 static int hf_ieee80211_tag_challenge_text = -1;
3208 static int hf_ieee80211_wep_iv = -1;
3209 static int hf_ieee80211_wep_iv_weak = -1;
3210 static int hf_ieee80211_tkip_extiv = -1;
3211 static int hf_ieee80211_ccmp_extiv = -1;
3212 static int hf_ieee80211_wep_key = -1;
3213 static int hf_ieee80211_wep_icv = -1;
3215 static int hf_ieee80211_block_ack_request_control = -1;
3216 static int hf_ieee80211_block_ack_control = -1;
3217 static int hf_ieee80211_block_ack_control_ack_policy = -1;
3218 static int hf_ieee80211_block_ack_control_multi_tid = -1;
3219 static int hf_ieee80211_block_ack_control_compressed_bitmap = -1;
3220 static int hf_ieee80211_block_ack_control_reserved = -1;
3222 static int hf_ieee80211_block_ack_control_basic_tid_info = -1;
3223 static int hf_ieee80211_block_ack_control_compressed_tid_info = -1;
3224 static int hf_ieee80211_block_ack_control_multi_tid_info = -1;
3226 static int hf_ieee80211_block_ack_multi_tid_info = -1;
3227 static int hf_ieee80211_block_ack_request_type = -1;
3228 static int hf_ieee80211_block_ack_multi_tid_reserved = -1;
3229 static int hf_ieee80211_block_ack_multi_tid_value = -1;
3230 static int hf_ieee80211_block_ack_type = -1;
3231 static int hf_ieee80211_block_ack_bitmap = -1;
3232 static int hf_ieee80211_block_ack_bitmap_missing_frame = -1;
3234 static int hf_ieee80211_tag_measure_request_measurement_mode = -1;
3235 static int hf_ieee80211_tag_measure_request_bssid = -1;
3237 static int hf_ieee80211_tag_measure_request_subelement_length = -1;
3238 static int hf_ieee80211_tag_measure_request_beacon_sub_id = -1;
3239 static int hf_ieee80211_tag_measure_request_beacon_sub_ssid = -1;
3240 static int hf_ieee80211_tag_measure_request_beacon_sub_bri_reporting_condition = -1;
3241 static int hf_ieee80211_tag_measure_request_beacon_sub_bri_threshold_offset = -1;
3242 static int hf_ieee80211_tag_measure_request_beacon_sub_reporting_detail = -1;
3243 static int hf_ieee80211_tag_measure_request_beacon_sub_request = -1;
3244 static int hf_ieee80211_tag_measure_request_beacon_unknown = -1;
3246 static int hf_ieee80211_tag_measure_request_frame_request_type = -1;
3247 static int hf_ieee80211_tag_measure_request_mac_address = -1;
3248 static int hf_ieee80211_tag_measure_request_peer_mac_address = -1;
3249 static int hf_ieee80211_tag_measure_request_group_id = -1;
3251 static int hf_ieee80211_ht_pren_type = -1;
3252 static int hf_ieee80211_ht_pren_unknown = -1;
3254 static int hf_ieee80211_ht_cap = -1;
3255 static int hf_ieee80211_ht_vs_cap = -1;
3256 static int hf_ieee80211_ht_ldpc_coding = -1;
3257 static int hf_ieee80211_ht_chan_width = -1;
3258 static int hf_ieee80211_ht_sm_pwsave = -1;
3259 static int hf_ieee80211_ht_green = -1;
3260 static int hf_ieee80211_ht_short20 = -1;
3261 static int hf_ieee80211_ht_short40 = -1;
3262 static int hf_ieee80211_ht_tx_stbc = -1;
3263 static int hf_ieee80211_ht_rx_stbc = -1;
3264 static int hf_ieee80211_ht_delayed_block_ack = -1;
3265 static int hf_ieee80211_ht_max_amsdu = -1;
3266 static int hf_ieee80211_ht_dss_cck_40 = -1;
3267 static int hf_ieee80211_ht_psmp = -1;
3268 static int hf_ieee80211_ht_40_mhz_intolerant = -1;
3269 static int hf_ieee80211_ht_l_sig = -1;
3271 static int hf_ieee80211_ampduparam = -1;
3272 static int hf_ieee80211_ampduparam_vs = -1;
3273 static int hf_ieee80211_ampduparam_mpdu = -1;
3274 static int hf_ieee80211_ampduparam_mpdu_start_spacing = -1;
3275 static int hf_ieee80211_ampduparam_reserved = -1;
3277 static int hf_ieee80211_mcsset = -1;
3278 static int hf_ieee80211_mcsset_vs = -1;
3279 static int hf_ieee80211_mcsset_rx_bitmask = -1;
3280 static int hf_ieee80211_mcsset_rx_bitmask_0to7 = -1;
3281 static int hf_ieee80211_mcsset_rx_bitmask_8to15 = -1;
3282 static int hf_ieee80211_mcsset_rx_bitmask_16to23 = -1;
3283 static int hf_ieee80211_mcsset_rx_bitmask_24to31 = -1;
3284 static int hf_ieee80211_mcsset_rx_bitmask_32 = -1;
3285 static int hf_ieee80211_mcsset_rx_bitmask_33to38 = -1;
3286 static int hf_ieee80211_mcsset_rx_bitmask_39to52 = -1;
3287 static int hf_ieee80211_mcsset_rx_bitmask_53to76 = -1;
3288 static int hf_ieee80211_mcsset_highest_data_rate = -1;
3289 static int hf_ieee80211_mcsset_tx_mcs_set_defined = -1;
3290 static int hf_ieee80211_mcsset_tx_rx_mcs_set_not_equal = -1;
3291 static int hf_ieee80211_mcsset_tx_max_spatial_streams = -1;
3292 static int hf_ieee80211_mcsset_tx_unequal_modulation = -1;
3294 static int hf_ieee80211_htex_cap = -1;
3295 static int hf_ieee80211_htex_vs_cap = -1;
3296 static int hf_ieee80211_htex_pco = -1;
3297 static int hf_ieee80211_htex_transtime = -1;
3298 static int hf_ieee80211_htex_mcs = -1;
3299 static int hf_ieee80211_htex_htc_support = -1;
3300 static int hf_ieee80211_htex_rd_responder = -1;
3302 static int hf_ieee80211_txbf = -1;
3303 static int hf_ieee80211_txbf_vs = -1;
3304 static int hf_ieee80211_txbf_cap = -1;
3305 static int hf_ieee80211_txbf_rcv_ssc = -1;
3306 static int hf_ieee80211_txbf_tx_ssc = -1;
3307 static int hf_ieee80211_txbf_rcv_ndp = -1;
3308 static int hf_ieee80211_txbf_tx_ndp = -1;
3309 static int hf_ieee80211_txbf_impl_txbf = -1;
3310 static int hf_ieee80211_txbf_calib = -1;
3311 static int hf_ieee80211_txbf_expl_csi = -1;
3312 static int hf_ieee80211_txbf_expl_uncomp_fm = -1;
3313 static int hf_ieee80211_txbf_expl_comp_fm = -1;
3314 static int hf_ieee80211_txbf_expl_bf_csi = -1;
3315 static int hf_ieee80211_txbf_expl_uncomp_fm_feed = -1;
3316 static int hf_ieee80211_txbf_expl_comp_fm_feed = -1;
3317 static int hf_ieee80211_txbf_csi_num_bf_ant = -1;
3318 static int hf_ieee80211_txbf_min_group = -1;
3319 static int hf_ieee80211_txbf_uncomp_sm_bf_ant = -1;
3320 static int hf_ieee80211_txbf_comp_sm_bf_ant = -1;
3321 static int hf_ieee80211_txbf_csi_max_rows_bf = -1;
3322 static int hf_ieee80211_txbf_chan_est = -1;
3323 static int hf_ieee80211_txbf_resrv = -1;
3325 /*** Begin: 802.11n D1.10 - HT Information IE ***/
3326 static int hf_ieee80211_ht_info_primary_channel = -1;
3328 static int hf_ieee80211_ht_info_delimiter1 = -1;
3329 static int hf_ieee80211_ht_info_secondary_channel_offset = -1;
3330 static int hf_ieee80211_ht_info_channel_width = -1;
3331 static int hf_ieee80211_ht_info_rifs_mode = -1;
3332 static int hf_ieee80211_ht_info_psmp_stas_only = -1;
3333 static int hf_ieee80211_ht_info_service_interval_granularity = -1;
3335 static int hf_ieee80211_ht_info_delimiter2 = -1;
3336 static int hf_ieee80211_ht_info_operating_mode = -1;
3337 static int hf_ieee80211_ht_info_non_greenfield_sta_present = -1;
3338 static int hf_ieee80211_ht_info_transmit_burst_limit = -1;
3339 static int hf_ieee80211_ht_info_obss_non_ht_stas_present = -1;
3340 static int hf_ieee80211_ht_info_reserved_1 = -1;
3342 static int hf_ieee80211_ht_info_delimiter3 = -1;
3343 static int hf_ieee80211_ht_info_reserved_2 = -1;
3344 static int hf_ieee80211_ht_info_dual_beacon = -1;
3345 static int hf_ieee80211_ht_info_dual_cts_protection = -1;
3346 static int hf_ieee80211_ht_info_secondary_beacon = -1;
3347 static int hf_ieee80211_ht_info_lsig_txop_protection_full_support = -1;
3348 static int hf_ieee80211_ht_info_pco_active = -1;
3349 static int hf_ieee80211_ht_info_pco_phase = -1;
3350 static int hf_ieee80211_ht_info_reserved_3 = -1;
3351 /*** End: 802.11n D1.10 - HT Information IE ***/
3353 static int hf_ieee80211_tag_ap_channel_report_regulatory_class = -1;
3354 static int hf_ieee80211_tag_ap_channel_report_channel_list = -1;
3356 static int hf_ieee80211_tag_secondary_channel_offset = -1;
3358 static int hf_ieee80211_tag_bss_ap_avg_access_delay = -1;
3360 static int hf_ieee80211_tag_antenna_id = -1;
3362 static int hf_ieee80211_tag_rsni = -1;
3364 static int hf_ieee80211_tag_bss_avb_adm_cap_bitmask = -1;
3365 static int hf_ieee80211_tag_bss_avb_adm_cap_bitmask_up0 = -1;
3366 static int hf_ieee80211_tag_bss_avb_adm_cap_bitmask_up1 = -1;
3367 static int hf_ieee80211_tag_bss_avb_adm_cap_bitmask_up2 = -1;
3368 static int hf_ieee80211_tag_bss_avb_adm_cap_bitmask_up3 = -1;
3369 static int hf_ieee80211_tag_bss_avb_adm_cap_bitmask_up4 = -1;
3370 static int hf_ieee80211_tag_bss_avb_adm_cap_bitmask_up5 = -1;
3371 static int hf_ieee80211_tag_bss_avb_adm_cap_bitmask_up6 = -1;
3372 static int hf_ieee80211_tag_bss_avb_adm_cap_bitmask_up7 = -1;
3373 static int hf_ieee80211_tag_bss_avb_adm_cap_bitmask_ac0 = -1;
3374 static int hf_ieee80211_tag_bss_avb_adm_cap_bitmask_ac1 = -1;
3375 static int hf_ieee80211_tag_bss_avb_adm_cap_bitmask_ac2 = -1;
3376 static int hf_ieee80211_tag_bss_avb_adm_cap_bitmask_ac3 = -1;
3377 static int hf_ieee80211_tag_bss_avb_adm_cap_bitmask_rsv = -1;
3378 static int hf_ieee80211_tag_bss_avb_adm_cap_up0 = -1;
3379 static int hf_ieee80211_tag_bss_avb_adm_cap_up1 = -1;
3380 static int hf_ieee80211_tag_bss_avb_adm_cap_up2 = -1;
3381 static int hf_ieee80211_tag_bss_avb_adm_cap_up3 = -1;
3382 static int hf_ieee80211_tag_bss_avb_adm_cap_up4 = -1;
3383 static int hf_ieee80211_tag_bss_avb_adm_cap_up5 = -1;
3384 static int hf_ieee80211_tag_bss_avb_adm_cap_up6 = -1;
3385 static int hf_ieee80211_tag_bss_avb_adm_cap_up7 = -1;
3386 static int hf_ieee80211_tag_bss_avb_adm_cap_ac0 = -1;
3387 static int hf_ieee80211_tag_bss_avb_adm_cap_ac1 = -1;
3388 static int hf_ieee80211_tag_bss_avb_adm_cap_ac2 = -1;
3389 static int hf_ieee80211_tag_bss_avb_adm_cap_ac3 = -1;
3391 static int hf_ieee80211_tag_bss_avg_ac_access_delay_be = -1;
3392 static int hf_ieee80211_tag_bss_avg_ac_access_delay_bk = -1;
3393 static int hf_ieee80211_tag_bss_avg_ac_access_delay_vi = -1;
3394 static int hf_ieee80211_tag_bss_avg_ac_access_delay_vo = -1;
3396 static int hf_ieee80211_tag_rm_enabled_capabilities = -1;
3397 static int hf_ieee80211_tag_rm_enabled_capabilities_b0 = -1;
3398 static int hf_ieee80211_tag_rm_enabled_capabilities_b1 = -1;
3399 static int hf_ieee80211_tag_rm_enabled_capabilities_b2 = -1;
3400 static int hf_ieee80211_tag_rm_enabled_capabilities_b3 = -1;
3401 static int hf_ieee80211_tag_rm_enabled_capabilities_b4 = -1;
3402 static int hf_ieee80211_tag_rm_enabled_capabilities_b5 = -1;
3403 static int hf_ieee80211_tag_rm_enabled_capabilities_b6 = -1;
3404 static int hf_ieee80211_tag_rm_enabled_capabilities_b7 = -1;
3405 static int hf_ieee80211_tag_rm_enabled_capabilities_b8 = -1;
3406 static int hf_ieee80211_tag_rm_enabled_capabilities_b9 = -1;
3407 static int hf_ieee80211_tag_rm_enabled_capabilities_b10 = -1;
3408 static int hf_ieee80211_tag_rm_enabled_capabilities_b11 = -1;
3409 static int hf_ieee80211_tag_rm_enabled_capabilities_b12 = -1;
3410 static int hf_ieee80211_tag_rm_enabled_capabilities_b13 = -1;
3411 static int hf_ieee80211_tag_rm_enabled_capabilities_b14 = -1;
3412 static int hf_ieee80211_tag_rm_enabled_capabilities_b15 = -1;
3413 static int hf_ieee80211_tag_rm_enabled_capabilities_b16 = -1;
3414 static int hf_ieee80211_tag_rm_enabled_capabilities_b17 = -1;
3415 static int hf_ieee80211_tag_rm_enabled_capabilities_b18to20 = -1;
3416 static int hf_ieee80211_tag_rm_enabled_capabilities_b21to23 = -1;
3417 static int hf_ieee80211_tag_rm_enabled_capabilities_b24to26 = -1;
3418 static int hf_ieee80211_tag_rm_enabled_capabilities_b27 = -1;
3419 static int hf_ieee80211_tag_rm_enabled_capabilities_b28 = -1;
3420 static int hf_ieee80211_tag_rm_enabled_capabilities_b29 = -1;
3421 static int hf_ieee80211_tag_rm_enabled_capabilities_b30 = -1;
3422 static int hf_ieee80211_tag_rm_enabled_capabilities_b31 = -1;
3423 static int hf_ieee80211_tag_rm_enabled_capabilities_b32 = -1;
3424 static int hf_ieee80211_tag_rm_enabled_capabilities_b33 = -1;
3425 static int hf_ieee80211_tag_rm_enabled_capabilities_o5 = -1;
3427 static int hf_ieee80211_tag_power_constraint_local = -1;
3429 static int hf_ieee80211_tag_power_capability_min = -1;
3430 static int hf_ieee80211_tag_power_capability_max = -1;
3432 static int hf_ieee80211_tag_tpc_report_trsmt_pow = -1;
3433 static int hf_ieee80211_tag_tpc_report_link_mrg = -1;
3435 static int hf_ieee80211_tag_supported_channels = -1;
3436 static int hf_ieee80211_tag_supported_channels_first = -1;
3437 static int hf_ieee80211_tag_supported_channels_range = -1;
3439 static int hf_ieee80211_csa_channel_switch_mode = -1;
3440 static int hf_ieee80211_csa_new_channel_number = -1;
3441 static int hf_ieee80211_csa_channel_switch_count = -1;
3443 static int hf_ieee80211_tag_measure_request_token = -1;
3444 static int hf_ieee80211_tag_measure_request_mode = -1;
3445 static int hf_ieee80211_tag_measure_request_mode_parallel = -1;
3446 static int hf_ieee80211_tag_measure_request_mode_enable = -1;
3447 static int hf_ieee80211_tag_measure_request_mode_request = -1;
3448 static int hf_ieee80211_tag_measure_request_mode_report = -1;
3449 static int hf_ieee80211_tag_measure_request_mode_duration_mandatory = -1;
3450 static int hf_ieee80211_tag_measure_request_mode_reserved = -1;
3451 static int hf_ieee80211_tag_measure_request_type = -1;
3453 static int hf_ieee80211_tag_measure_request_channel_number = -1;
3454 static int hf_ieee80211_tag_measure_request_start_time = -1;
3455 static int hf_ieee80211_tag_measure_request_duration = -1;
3457 static int hf_ieee80211_tag_measure_request_regulatory_class = -1;
3458 static int hf_ieee80211_tag_measure_request_randomization_interval = -1;
3460 static int hf_ieee80211_tag_measure_report_measurement_token = -1;
3461 static int hf_ieee80211_tag_measure_report_mode = -1;
3462 static int hf_ieee80211_tag_measure_report_mode_late = -1;
3463 static int hf_ieee80211_tag_measure_report_mode_incapable = -1;
3464 static int hf_ieee80211_tag_measure_report_mode_refused = -1;
3465 static int hf_ieee80211_tag_measure_report_mode_reserved = -1;
3466 static int hf_ieee80211_tag_measure_report_type = -1;
3467 static int hf_ieee80211_tag_measure_report_channel_number = -1;
3468 static int hf_ieee80211_tag_measure_report_start_time = -1;
3469 static int hf_ieee80211_tag_measure_report_duration = -1;
3471 static int hf_ieee80211_tag_measure_basic_map_field = -1;
3472 static int hf_ieee80211_tag_measure_map_field_bss = -1;
3473 static int hf_ieee80211_tag_measure_map_field_odfm = -1;
3474 static int hf_ieee80211_tag_measure_map_field_unident_signal = -1;
3475 static int hf_ieee80211_tag_measure_map_field_radar = -1;
3476 static int hf_ieee80211_tag_measure_map_field_unmeasured = -1;
3477 static int hf_ieee80211_tag_measure_map_field_reserved = -1;
3479 static int hf_ieee80211_tag_measure_cca_busy_fraction = -1;
3481 static int hf_ieee80211_tag_measure_rpi_histogram_report = -1;
3482 static int hf_ieee80211_tag_measure_rpi_histogram_report_0 = -1;
3483 static int hf_ieee80211_tag_measure_rpi_histogram_report_1 = -1;
3484 static int hf_ieee80211_tag_measure_rpi_histogram_report_2 = -1;
3485 static int hf_ieee80211_tag_measure_rpi_histogram_report_3 = -1;
3486 static int hf_ieee80211_tag_measure_rpi_histogram_report_4 = -1;
3487 static int hf_ieee80211_tag_measure_rpi_histogram_report_5 = -1;
3488 static int hf_ieee80211_tag_measure_rpi_histogram_report_6 = -1;
3489 static int hf_ieee80211_tag_measure_rpi_histogram_report_7 = -1;
3491 static int hf_ieee80211_tag_measure_report_regulatory_class = -1;
3492 static int hf_ieee80211_tag_measure_report_channel_load = -1;
3493 static int hf_ieee80211_tag_measure_report_frame_info = -1;
3494 static int hf_ieee80211_tag_measure_report_frame_info_phy_type = -1;
3495 static int hf_ieee80211_tag_measure_report_frame_info_frame_type = -1;
3496 static int hf_ieee80211_tag_measure_report_rcpi = -1;
3497 static int hf_ieee80211_tag_measure_report_rsni = -1;
3498 static int hf_ieee80211_tag_measure_report_bssid = -1;
3499 static int hf_ieee80211_tag_measure_report_ant_id = -1;
3500 static int hf_ieee80211_tag_measure_report_anpi = -1;
3501 static int hf_ieee80211_tag_measure_report_ipi_density_0 = -1;
3502 static int hf_ieee80211_tag_measure_report_ipi_density_1 = -1;
3503 static int hf_ieee80211_tag_measure_report_ipi_density_2 = -1;
3504 static int hf_ieee80211_tag_measure_report_ipi_density_3 = -1;
3505 static int hf_ieee80211_tag_measure_report_ipi_density_4 = -1;
3506 static int hf_ieee80211_tag_measure_report_ipi_density_5 = -1;
3507 static int hf_ieee80211_tag_measure_report_ipi_density_6 = -1;
3508 static int hf_ieee80211_tag_measure_report_ipi_density_7 = -1;
3509 static int hf_ieee80211_tag_measure_report_ipi_density_8 = -1;
3510 static int hf_ieee80211_tag_measure_report_ipi_density_9 = -1;
3511 static int hf_ieee80211_tag_measure_report_ipi_density_10 = -1;
3512 static int hf_ieee80211_tag_measure_report_parent_tsf = -1;
3514 static int hf_ieee80211_tag_quiet_count = -1;
3515 static int hf_ieee80211_tag_quiet_period = -1;
3516 static int hf_ieee80211_tag_quiet_duration = -1;
3517 static int hf_ieee80211_tag_quiet_offset = -1;
3519 static int hf_ieee80211_tag_dfs_owner = -1;
3520 static int hf_ieee80211_tag_dfs_recovery_interval = -1;
3521 static int hf_ieee80211_tag_dfs_channel_map = -1;
3522 static int hf_ieee80211_tag_dfs_channel_number = -1;
3523 static int hf_ieee80211_tag_dfs_map = -1;
3525 static int hf_ieee80211_tag_erp_info = -1;
3526 static int hf_ieee80211_tag_erp_info_erp_present = -1;
3527 static int hf_ieee80211_tag_erp_info_use_protection = -1;
3528 static int hf_ieee80211_tag_erp_info_barker_preamble_mode = -1;
3529 static int hf_ieee80211_tag_erp_info_reserved = -1;
3531 static int hf_ieee80211_tag_extended_capabilities = -1;
3532 static int hf_ieee80211_tag_extended_capabilities_b0 = -1;
3533 static int hf_ieee80211_tag_extended_capabilities_b1 = -1;
3534 static int hf_ieee80211_tag_extended_capabilities_b2 = -1;
3535 static int hf_ieee80211_tag_extended_capabilities_b3 = -1;
3536 static int hf_ieee80211_tag_extended_capabilities_b4 = -1;
3537 static int hf_ieee80211_tag_extended_capabilities_b5 = -1;
3538 static int hf_ieee80211_tag_extended_capabilities_b6 = -1;
3539 static int hf_ieee80211_tag_extended_capabilities_b7 = -1;
3540 static int hf_ieee80211_tag_extended_capabilities_b8 = -1;
3541 static int hf_ieee80211_tag_extended_capabilities_b9 = -1;
3542 static int hf_ieee80211_tag_extended_capabilities_b10 = -1;
3543 static int hf_ieee80211_tag_extended_capabilities_b11 = -1;
3544 static int hf_ieee80211_tag_extended_capabilities_b12 = -1;
3545 static int hf_ieee80211_tag_extended_capabilities_b13 = -1;
3546 static int hf_ieee80211_tag_extended_capabilities_b14 = -1;
3547 static int hf_ieee80211_tag_extended_capabilities_b15 = -1;
3548 static int hf_ieee80211_tag_extended_capabilities_b16 = -1;
3549 static int hf_ieee80211_tag_extended_capabilities_b17 = -1;
3550 static int hf_ieee80211_tag_extended_capabilities_b18 = -1;
3551 static int hf_ieee80211_tag_extended_capabilities_b19 = -1;
3552 static int hf_ieee80211_tag_extended_capabilities_b20 = -1;
3553 static int hf_ieee80211_tag_extended_capabilities_b21 = -1;
3554 static int hf_ieee80211_tag_extended_capabilities_b22 = -1;
3555 static int hf_ieee80211_tag_extended_capabilities_b23 = -1;
3556 static int hf_ieee80211_tag_extended_capabilities_b24 = -1;
3557 static int hf_ieee80211_tag_extended_capabilities_b25 = -1;
3558 static int hf_ieee80211_tag_extended_capabilities_b26 = -1;
3559 static int hf_ieee80211_tag_extended_capabilities_b27 = -1;
3560 static int hf_ieee80211_tag_extended_capabilities_b28 = -1;
3561 static int hf_ieee80211_tag_extended_capabilities_b29 = -1;
3562 static int hf_ieee80211_tag_extended_capabilities_b30 = -1;
3563 static int hf_ieee80211_tag_extended_capabilities_b31 = -1;
3564 static int hf_ieee80211_tag_extended_capabilities_b32 = -1;
3565 static int hf_ieee80211_tag_extended_capabilities_b33 = -1;
3566 static int hf_ieee80211_tag_extended_capabilities_b34 = -1;
3567 static int hf_ieee80211_tag_extended_capabilities_b35 = -1;
3568 static int hf_ieee80211_tag_extended_capabilities_b36 = -1;
3569 static int hf_ieee80211_tag_extended_capabilities_b37 = -1;
3570 static int hf_ieee80211_tag_extended_capabilities_b38 = -1;
3571 static int hf_ieee80211_tag_extended_capabilities_b39 = -1;
3572 static int hf_ieee80211_tag_extended_capabilities_b40 = -1;
3573 static int hf_ieee80211_tag_extended_capabilities_serv_int_granularity = -1;
3574 static int hf_ieee80211_tag_extended_capabilities_b44 = -1;
3575 static int hf_ieee80211_tag_extended_capabilities_b45 = -1;
3576 static int hf_ieee80211_tag_extended_capabilities_b46 = -1;
3577 static int hf_ieee80211_tag_extended_capabilities_b47 = -1;
3578 static int hf_ieee80211_tag_extended_capabilities_b48 = -1;
3579 static int hf_ieee80211_tag_extended_capabilities_o7 = -1;
3580 static int hf_ieee80211_tag_extended_capabilities_o8 = -1;
3582 static int hf_ieee80211_tag_cisco_ccx1_unknown = -1;
3583 static int hf_ieee80211_tag_cisco_ccx1_name = -1;
3584 static int hf_ieee80211_tag_cisco_ccx1_clients = -1;
3585 static int hf_ieee80211_tag_cisco_ccx1_unknown2 = -1;
3587 static int hf_ieee80211_vht_cap = -1;
3588 static int hf_ieee80211_vht_max_mpdu_length = -1;
3589 static int hf_ieee80211_vht_supported_chan_width_set = -1;
3590 static int hf_ieee80211_vht_rx_ldpc = -1;
3591 static int hf_ieee80211_vht_short_gi_for_80 = -1;
3592 static int hf_ieee80211_vht_short_gi_for_160 = -1;
3593 static int hf_ieee80211_vht_tx_stbc = -1;
3594 static int hf_ieee80211_vht_rx_stbc = -1;
3595 static int hf_ieee80211_vht_su_beamformer_cap = -1;
3596 static int hf_ieee80211_vht_su_beamformee_cap = -1;
3597 static int hf_ieee80211_vht_beamformer_antennas = -1;
3598 static int hf_ieee80211_vht_sounding_dimensions = -1;
3599 static int hf_ieee80211_vht_mu_beamformer_cap = -1;
3600 static int hf_ieee80211_vht_mu_beamformee_cap = -1;
3601 static int hf_ieee80211_vht_txop_ps = -1;
3602 static int hf_ieee80211_vht_var_htc_field = -1;
3603 static int hf_ieee80211_vht_max_ampdu = -1;
3604 static int hf_ieee80211_vht_link_adaptation_cap = -1;
3605 static int hf_ieee80211_vht_rx_pattern = -1;
3606 static int hf_ieee80211_vht_tx_pattern = -1;
3607 static int hf_ieee80211_vht_reserv = -1;
3609 static int hf_ieee80211_vht_mcsset = -1;
3611 static int hf_ieee80211_vht_mcsset_rx_mcs_map = -1;
3612 static int hf_ieee80211_vht_mcsset_rx_max_mcs_for_1_ss = -1;
3613 static int hf_ieee80211_vht_mcsset_rx_max_mcs_for_2_ss = -1;
3614 static int hf_ieee80211_vht_mcsset_rx_max_mcs_for_3_ss = -1;
3615 static int hf_ieee80211_vht_mcsset_rx_max_mcs_for_4_ss = -1;
3616 static int hf_ieee80211_vht_mcsset_rx_max_mcs_for_5_ss = -1;
3617 static int hf_ieee80211_vht_mcsset_rx_max_mcs_for_6_ss = -1;
3618 static int hf_ieee80211_vht_mcsset_rx_max_mcs_for_7_ss = -1;
3619 static int hf_ieee80211_vht_mcsset_rx_max_mcs_for_8_ss = -1;
3621 static int hf_ieee80211_vht_mcsset_rx_highest_long_gi = -1;
3623 static int hf_ieee80211_vht_mcsset_tx_mcs_map = -1;
3624 static int hf_ieee80211_vht_mcsset_tx_max_mcs_for_1_ss = -1;
3625 static int hf_ieee80211_vht_mcsset_tx_max_mcs_for_2_ss = -1;
3626 static int hf_ieee80211_vht_mcsset_tx_max_mcs_for_3_ss = -1;
3627 static int hf_ieee80211_vht_mcsset_tx_max_mcs_for_4_ss = -1;
3628 static int hf_ieee80211_vht_mcsset_tx_max_mcs_for_5_ss = -1;
3629 static int hf_ieee80211_vht_mcsset_tx_max_mcs_for_6_ss = -1;
3630 static int hf_ieee80211_vht_mcsset_tx_max_mcs_for_7_ss = -1;
3631 static int hf_ieee80211_vht_mcsset_tx_max_mcs_for_8_ss = -1;
3633 static int hf_ieee80211_vht_op = -1;
3634 static int hf_ieee80211_vht_op_channel_width = -1;
3635 static int hf_ieee80211_vht_op_channel_center0 = -1;
3636 static int hf_ieee80211_vht_op_channel_center1 = -1;
3638 static int hf_ieee80211_vht_op_basic_mcs_map = -1;
3639 static int hf_ieee80211_vht_op_max_basic_mcs_for_1_ss = -1;
3640 static int hf_ieee80211_vht_op_max_basic_mcs_for_2_ss = -1;
3641 static int hf_ieee80211_vht_op_max_basic_mcs_for_3_ss = -1;
3642 static int hf_ieee80211_vht_op_max_basic_mcs_for_4_ss = -1;
3643 static int hf_ieee80211_vht_op_max_basic_mcs_for_5_ss = -1;
3644 static int hf_ieee80211_vht_op_max_basic_mcs_for_6_ss = -1;
3645 static int hf_ieee80211_vht_op_max_basic_mcs_for_7_ss = -1;
3646 static int hf_ieee80211_vht_op_max_basic_mcs_for_8_ss = -1;
3647 static int hf_ieee80211_vht_mcsset_tx_highest_long_gi = -1;
3649 static int hf_ieee80211_vht_tpe_pwr_info = -1;
3650 static int hf_ieee80211_vht_tpe_pwr_info_count = -1;
3651 static int hf_ieee80211_vht_tpe_pwr_info_unit = -1;
3652 static int hf_ieee80211_vht_tpe_pwr_info_reserved = -1;
3653 static int hf_ieee80211_vht_tpe_pwr_constr_20 = -1;
3654 static int hf_ieee80211_vht_tpe_pwr_constr_40 = -1;
3655 static int hf_ieee80211_vht_tpe_pwr_constr_80 = -1;
3656 static int hf_ieee80211_vht_tpe_pwr_constr_160 = -1;
3658 static int hf_ieee80211_vht_ndp_annc_token = -1;
3659 static int hf_ieee80211_vht_ndp_annc_token_number = -1;
3660 static int hf_ieee80211_vht_ndp_annc_token_reserved = -1;
3661 static int hf_ieee80211_vht_ndp_annc_sta_info = -1;
3662 static int hf_ieee80211_vht_ndp_annc_sta_info_aid12 = -1;
3663 static int hf_ieee80211_vht_ndp_annc_sta_info_feedback_type = -1;
3664 static int hf_ieee80211_vht_ndp_annc_sta_info_nc_index = -1;
3665 static int hf_ieee80211_vht_ndp_annc_sta_info_reserved = -1;
3667 static int hf_ieee80211_tag_neighbor_report_bssid = -1;
3668 static int hf_ieee80211_tag_neighbor_report_bssid_info = -1;
3669 static int hf_ieee80211_tag_neighbor_report_bssid_info_reachability = -1;
3670 static int hf_ieee80211_tag_neighbor_report_bssid_info_security = -1;
3671 static int hf_ieee80211_tag_neighbor_report_bssid_info_key_scope = -1;
3672 /*static int hf_ieee80211_tag_neighbor_report_bssid_info_capability = -1; */ /* TODO Make this the parent tree item */
3673 static int hf_ieee80211_tag_neighbor_report_bssid_info_capability_spec_mng = -1;
3674 static int hf_ieee80211_tag_neighbor_report_bssid_info_capability_qos = -1;
3675 static int hf_ieee80211_tag_neighbor_report_bssid_info_capability_apsd = -1;
3676 static int hf_ieee80211_tag_neighbor_report_bssid_info_capability_radio_msnt = -1;
3677 static int hf_ieee80211_tag_neighbor_report_bssid_info_capability_dback = -1;
3678 static int hf_ieee80211_tag_neighbor_report_bssid_info_capability_iback = -1;
3679 static int hf_ieee80211_tag_neighbor_report_bssid_info_mobility_domain = -1;
3680 static int hf_ieee80211_tag_neighbor_report_bssid_info_high_throughput = -1;
3681 static int hf_ieee80211_tag_neighbor_report_bssid_info_reserved = -1;
3682 static int hf_ieee80211_tag_neighbor_report_reg_class = -1;
3683 static int hf_ieee80211_tag_neighbor_report_channel_number = -1;
3684 static int hf_ieee80211_tag_neighbor_report_phy_type = -1;
3686 static int hf_ieee80211_tag_supported_reg_classes_current = -1;
3687 static int hf_ieee80211_tag_supported_reg_classes_alternate = -1;
3689 /* IEEE Std 802.11r-2008 7.3.2.47 */
3690 static int hf_ieee80211_tag_mobility_domain_mdid = -1;
3691 static int hf_ieee80211_tag_mobility_domain_ft_capab = -1;
3692 static int hf_ieee80211_tag_mobility_domain_ft_capab_ft_over_ds = -1;
3693 static int hf_ieee80211_tag_mobility_domain_ft_capab_resource_req = -1;
3695 /* IEEE Std 802.11r-2008 7.3.2.48 */
3696 static int hf_ieee80211_tag_ft_mic_control = -1;
3697 static int hf_ieee80211_tag_ft_element_count = -1;
3698 static int hf_ieee80211_tag_ft_mic = -1;
3699 static int hf_ieee80211_tag_ft_anonce = -1;
3700 static int hf_ieee80211_tag_ft_snonce = -1;
3701 static int hf_ieee80211_tag_ft_subelem_id = -1;
3702 static int hf_ieee80211_tag_ft_subelem_len = -1;
3703 static int hf_ieee80211_tag_ft_subelem_data = -1;
3704 static int hf_ieee80211_tag_ft_subelem_r1kh_id = -1;
3705 static int hf_ieee80211_tag_ft_subelem_gtk_key_info = -1;
3706 static int hf_ieee80211_tag_ft_subelem_gtk_key_id = -1;
3707 static int hf_ieee80211_tag_ft_subelem_gtk_key_length = -1;
3708 static int hf_ieee80211_tag_ft_subelem_gtk_rsc = -1;
3709 static int hf_ieee80211_tag_ft_subelem_gtk_key = -1;
3710 static int hf_ieee80211_tag_ft_subelem_r0kh_id = -1;
3711 static int hf_ieee80211_tag_ft_subelem_igtk_key_id = -1;
3712 static int hf_ieee80211_tag_ft_subelem_igtk_ipn = -1;
3713 static int hf_ieee80211_tag_ft_subelem_igtk_key_length = -1;
3714 static int hf_ieee80211_tag_ft_subelem_igtk_key = -1;
3716 /* IEEE Std 802.11-2012: 11r 8.4.2.52 */
3717 static int hf_ieee80211_tag_ric_data_id = -1;
3718 static int hf_ieee80211_tag_ric_data_desc_cnt = -1;
3719 static int hf_ieee80211_tag_ric_data_status_code = -1;
3721 /* IEEE Std 802.11-2012: 11r 8.4.2.53 */
3722 static int hf_ieee80211_tag_ric_desc_rsrc_type = -1;
3723 static int hf_ieee80211_tag_ric_desc_var_params = -1;
3725 /* IEEE Std 802.11w-2009 7.3.2.55 */
3726 static int hf_ieee80211_tag_mmie_keyid = -1;
3727 static int hf_ieee80211_tag_mmie_ipn = -1;
3728 static int hf_ieee80211_tag_mmie_mic = -1;
3730 /*WAPI-Specification 7.3.2.25 : WAPI Parameter Set*/
3731 static int hf_ieee80211_tag_wapi_param_set_version = -1;
3733 static int hf_ieee80211_tag_wapi_param_set_akm_suite_count = -1;
3734 static int hf_ieee80211_tag_wapi_param_set_akm_suite_oui = -1;
3735 static int hf_ieee80211_tag_wapi_param_set_akm_suite_type = -1;
3737 static int hf_ieee80211_tag_wapi_param_set_ucast_cipher_suite_count = -1;
3738 static int hf_ieee80211_tag_wapi_param_set_ucast_cipher_suite_oui = -1;
3739 static int hf_ieee80211_tag_wapi_param_set_ucast_cipher_suite_type = -1;
3741 static int hf_ieee80211_tag_wapi_param_set_mcast_cipher_suite_oui = -1;
3742 static int hf_ieee80211_tag_wapi_param_set_mcast_cipher_suite_type = -1;
3744 static int hf_ieee80211_tag_wapi_param_set_capab = -1;
3745 static int hf_ieee80211_tag_wapi_param_set_capab_preauth = -1;
3746 static int hf_ieee80211_tag_wapi_param_set_capab_rsvd = -1;
3747 static int hf_ieee80211_tag_wapi_param_set_bkid_count = -1;
3748 static int hf_ieee80211_tag_wapi_param_set_bkid_list = -1;
3750 /* IEEE Std 802.11v-2011 7.3.2.61 */
3751 static int hf_ieee80211_tag_time_adv_timing_capab = -1;
3752 static int hf_ieee80211_tag_time_adv_time_value = -1;
3753 static int hf_ieee80211_tag_time_adv_time_value_year = -1;
3754 static int hf_ieee80211_tag_time_adv_time_value_month = -1;
3755 static int hf_ieee80211_tag_time_adv_time_value_day = -1;
3756 static int hf_ieee80211_tag_time_adv_time_value_hours = -1;
3757 static int hf_ieee80211_tag_time_adv_time_value_minutes = -1;
3758 static int hf_ieee80211_tag_time_adv_time_value_seconds = -1;
3759 static int hf_ieee80211_tag_time_adv_time_value_milliseconds = -1;
3760 static int hf_ieee80211_tag_time_adv_time_value_reserved = -1;
3761 static int hf_ieee80211_tag_time_adv_time_error = -1;
3762 static int hf_ieee80211_tag_time_adv_time_update_counter = -1;
3764 /* IEEE Std 802.11-2012 8.4.2.81 */
3765 static int hf_ieee80211_tag_bss_max_idle_period = -1;
3766 static int hf_ieee80211_tag_bss_max_idle_options_protected = -1;
3768 /* IEEE Std 802.11-2012 8.4.2.82 */
3769 static int hf_ieee80211_tag_tfs_request_id = -1;
3770 static int hf_ieee80211_tag_tfs_request_ac_delete_after_match = -1;
3771 static int hf_ieee80211_tag_tfs_request_ac_notify = -1;
3772 static int hf_ieee80211_tag_tfs_request_subelem_id = -1;
3773 static int hf_ieee80211_tag_tfs_request_subelem_len = -1;
3774 static int hf_ieee80211_tag_tfs_request_subelem = -1;
3776 /* IEEE Std 802.11-2012 8.4.2.83 */
3777 static int hf_ieee80211_tag_tfs_response_subelem_id = -1;
3778 static int hf_ieee80211_tag_tfs_response_subelem_len = -1;
3779 static int hf_ieee80211_tag_tfs_response_subelem = -1;
3780 static int hf_ieee80211_tag_tfs_response_status = -1;
3781 static int hf_ieee80211_tag_tfs_response_id = -1;
3783 /* IEEE Std 802.11-2012 8.4.2.84 */
3784 static int hf_ieee80211_tag_wnm_sleep_mode_action_type = -1;
3785 static int hf_ieee80211_tag_wnm_sleep_mode_response_status = -1;
3786 static int hf_ieee80211_tag_wnm_sleep_mode_interval = -1;
3788 /* IEEE Std 802.11v-2011 7.3.2.87 */
3789 static int hf_ieee80211_tag_time_zone = -1;
3791 /* IEEE Std 802.11u-2011 7.3.2.92 */
3792 static int hf_ieee80211_tag_interworking_access_network_type = -1;
3793 static int hf_ieee80211_tag_interworking_internet = -1;
3794 static int hf_ieee80211_tag_interworking_asra = -1;
3795 static int hf_ieee80211_tag_interworking_esr = -1;
3796 static int hf_ieee80211_tag_interworking_uesa = -1;
3797 static int hf_ieee80211_tag_interworking_hessid = -1;
3799 /* IEEE Std 802.11-2012, 8.4.2.97 */
3800 static int hf_ieee80211_tag_qos_map_set_dscp_exc = -1;
3801 static int hf_ieee80211_tag_qos_map_set_dscp_exc_val = -1;
3802 static int hf_ieee80211_tag_qos_map_set_dscp_exc_up = -1;
3803 static int hf_ieee80211_tag_qos_map_set_range = -1;
3804 static int hf_ieee80211_tag_qos_map_set_low = -1;
3805 static int hf_ieee80211_tag_qos_map_set_high = -1;
3807 /* IEEE Std 802.11u-2011 7.3.2.93 */
3808 static int hf_ieee80211_tag_adv_proto_resp_len_limit = -1;
3809 static int hf_ieee80211_tag_adv_proto_pame_bi = -1;
3810 static int hf_ieee80211_tag_adv_proto_id = -1;
3812 /* IEEE Std 802.11u-2011 7.3.2.96 */
3813 static int hf_ieee80211_tag_roaming_consortium_num_anqp_oi = -1;
3814 static int hf_ieee80211_tag_roaming_consortium_oi1_len = -1;
3815 static int hf_ieee80211_tag_roaming_consortium_oi2_len = -1;
3816 static int hf_ieee80211_tag_roaming_consortium_oi1 = -1;
3817 static int hf_ieee80211_tag_roaming_consortium_oi2 = -1;
3818 static int hf_ieee80211_tag_roaming_consortium_oi3 = -1;
3820 /* 802.11n 7.3.2.48 */
3821 static int hf_ieee80211_hta_cc = -1;
3822 static int hf_ieee80211_hta_cap = -1;
3823 static int hf_ieee80211_hta_ext_chan_offset = -1;
3824 static int hf_ieee80211_hta_rec_tx_width = -1;
3825 static int hf_ieee80211_hta_rifs_mode = -1;
3826 static int hf_ieee80211_hta_controlled_access = -1;
3827 static int hf_ieee80211_hta_service_interval = -1;
3828 static int hf_ieee80211_hta_operating_mode = -1;
3829 static int hf_ieee80211_hta_non_gf_devices = -1;
3830 static int hf_ieee80211_hta_basic_stbc_mcs = -1;
3831 static int hf_ieee80211_hta_dual_stbc_protection = -1;
3832 static int hf_ieee80211_hta_secondary_beacon = -1;
3833 static int hf_ieee80211_hta_lsig_txop_protection = -1;
3834 static int hf_ieee80211_hta_pco_active = -1;
3835 static int hf_ieee80211_hta_pco_phase = -1;
3837 static int hf_ieee80211_antsel = -1;
3838 static int hf_ieee80211_antsel_vs = -1;
3839 static int hf_ieee80211_antsel_b0 = -1;
3840 static int hf_ieee80211_antsel_b1 = -1;
3841 static int hf_ieee80211_antsel_b2 = -1;
3842 static int hf_ieee80211_antsel_b3 = -1;
3843 static int hf_ieee80211_antsel_b4 = -1;
3844 static int hf_ieee80211_antsel_b5 = -1;
3845 static int hf_ieee80211_antsel_b6 = -1;
3846 static int hf_ieee80211_antsel_b7 = -1;
3848 static int hf_ieee80211_rsn_version = -1;
3849 static int hf_ieee80211_rsn_gcs = -1;
3850 static int hf_ieee80211_rsn_gcs_oui = -1;
3851 static int hf_ieee80211_rsn_gcs_type = -1;
3852 static int hf_ieee80211_rsn_gcs_80211_type = -1;
3853 static int hf_ieee80211_rsn_pcs_count = -1;
3854 static int hf_ieee80211_rsn_pcs_list = -1;
3855 static int hf_ieee80211_rsn_pcs = -1;
3856 static int hf_ieee80211_rsn_pcs_oui = -1;
3857 static int hf_ieee80211_rsn_pcs_80211_type = -1;
3858 static int hf_ieee80211_rsn_pcs_type = -1;
3859 static int hf_ieee80211_rsn_akms_count = -1;
3860 static int hf_ieee80211_rsn_akms_list = -1;
3861 static int hf_ieee80211_rsn_akms = -1;
3862 static int hf_ieee80211_rsn_akms_oui = -1;
3863 static int hf_ieee80211_rsn_akms_80211_type = -1;
3864 static int hf_ieee80211_rsn_akms_type = -1;
3865 static int hf_ieee80211_rsn_cap = -1;
3866 static int hf_ieee80211_rsn_cap_preauth = -1;
3867 static int hf_ieee80211_rsn_cap_no_pairwise = -1;
3868 static int hf_ieee80211_rsn_cap_ptksa_replay_counter = -1;
3869 static int hf_ieee80211_rsn_cap_gtksa_replay_counter = -1;
3870 static int hf_ieee80211_rsn_cap_mfpr = -1;
3871 static int hf_ieee80211_rsn_cap_mfpc = -1;
3872 static int hf_ieee80211_rsn_cap_peerkey = -1;
3873 static int hf_ieee80211_rsn_pmkid_count = -1;
3874 static int hf_ieee80211_rsn_pmkid_list = -1;
3875 static int hf_ieee80211_rsn_pmkid = -1;
3876 static int hf_ieee80211_rsn_gmcs = -1;
3877 static int hf_ieee80211_rsn_gmcs_oui = -1;
3878 static int hf_ieee80211_rsn_gmcs_type = -1;
3879 static int hf_ieee80211_rsn_gmcs_80211_type = -1;
3881 static int hf_ieee80211_wfa_ie_type = -1;
3882 static int hf_ieee80211_wfa_ie_wpa_version = -1;
3883 static int hf_ieee80211_wfa_ie_wpa_mcs = -1;
3884 static int hf_ieee80211_wfa_ie_wpa_mcs_oui = -1;
3885 static int hf_ieee80211_wfa_ie_wpa_mcs_type = -1;
3886 static int hf_ieee80211_wfa_ie_wpa_mcs_wfa_type = -1;
3887 static int hf_ieee80211_wfa_ie_wpa_ucs_count = -1;
3888 static int hf_ieee80211_wfa_ie_wpa_ucs_list = -1;
3889 static int hf_ieee80211_wfa_ie_wpa_ucs = -1;
3890 static int hf_ieee80211_wfa_ie_wpa_ucs_oui = -1;
3891 static int hf_ieee80211_wfa_ie_wpa_ucs_wfa_type = -1;
3892 static int hf_ieee80211_wfa_ie_wpa_ucs_type = -1;
3893 static int hf_ieee80211_wfa_ie_wpa_akms_count = -1;
3894 static int hf_ieee80211_wfa_ie_wpa_akms_list = -1;
3895 static int hf_ieee80211_wfa_ie_wpa_akms = -1;
3896 static int hf_ieee80211_wfa_ie_wpa_akms_oui = -1;
3897 static int hf_ieee80211_wfa_ie_wpa_akms_wfa_type = -1;
3898 static int hf_ieee80211_wfa_ie_wpa_akms_type = -1;
3899 static int hf_ieee80211_wfa_ie_wme_subtype = -1;
3900 static int hf_ieee80211_wfa_ie_wme_version = -1;
3901 static int hf_ieee80211_wfa_ie_wme_qos_info = -1;
3902 static int hf_ieee80211_wfa_ie_wme_qos_info_sta_max_sp_length = -1;
3903 static int hf_ieee80211_wfa_ie_wme_qos_info_sta_ac_be = -1;
3904 static int hf_ieee80211_wfa_ie_wme_qos_info_sta_ac_bk = -1;
3905 static int hf_ieee80211_wfa_ie_wme_qos_info_sta_ac_vi = -1;
3906 static int hf_ieee80211_wfa_ie_wme_qos_info_sta_ac_vo = -1;
3907 static int hf_ieee80211_wfa_ie_wme_qos_info_sta_reserved = -1;
3908 static int hf_ieee80211_wfa_ie_wme_qos_info_ap_u_apsd = -1;
3909 static int hf_ieee80211_wfa_ie_wme_qos_info_ap_parameter_set_count = -1;
3910 static int hf_ieee80211_wfa_ie_wme_qos_info_ap_reserved = -1;
3911 static int hf_ieee80211_wfa_ie_wme_reserved = -1;
3912 static int hf_ieee80211_wfa_ie_wme_ac_parameters = -1;
3913 static int hf_ieee80211_wfa_ie_wme_acp_aci_aifsn = -1;
3914 static int hf_ieee80211_wfa_ie_wme_acp_aci = -1;
3915 static int hf_ieee80211_wfa_ie_wme_acp_acm = -1;
3916 static int hf_ieee80211_wfa_ie_wme_acp_aifsn = -1;
3917 static int hf_ieee80211_wfa_ie_wme_acp_reserved = -1;
3918 static int hf_ieee80211_wfa_ie_wme_acp_ecw = -1;
3919 static int hf_ieee80211_wfa_ie_wme_acp_ecw_max = -1;
3920 static int hf_ieee80211_wfa_ie_wme_acp_ecw_min = -1;
3921 static int hf_ieee80211_wfa_ie_wme_acp_txop_limit = -1;
3922 static int hf_ieee80211_wfa_ie_wme_tspec_tsinfo = -1;
3923 static int hf_ieee80211_wfa_ie_wme_tspec_tsinfo_tid = -1;
3924 static int hf_ieee80211_wfa_ie_wme_tspec_tsinfo_direction = -1;
3925 static int hf_ieee80211_wfa_ie_wme_tspec_tsinfo_psb = -1;
3926 static int hf_ieee80211_wfa_ie_wme_tspec_tsinfo_up = -1;
3927 static int hf_ieee80211_wfa_ie_wme_tspec_tsinfo_reserved = -1;
3928 static int hf_ieee80211_wfa_ie_wme_tspec_nor_msdu = -1;
3929 static int hf_ieee80211_wfa_ie_wme_tspec_max_msdu = -1;
3930 static int hf_ieee80211_wfa_ie_wme_tspec_min_srv = -1;
3931 static int hf_ieee80211_wfa_ie_wme_tspec_max_srv = -1;
3932 static int hf_ieee80211_wfa_ie_wme_tspec_inact_int = -1;
3933 static int hf_ieee80211_wfa_ie_wme_tspec_susp_int = -1;
3934 static int hf_ieee80211_wfa_ie_wme_tspec_srv_start = -1;
3935 static int hf_ieee80211_wfa_ie_wme_tspec_min_data = -1;
3936 static int hf_ieee80211_wfa_ie_wme_tspec_mean_data = -1;
3937 static int hf_ieee80211_wfa_ie_wme_tspec_peak_data = -1;
3938 static int hf_ieee80211_wfa_ie_wme_tspec_burst_size = -1;
3939 static int hf_ieee80211_wfa_ie_wme_tspec_delay_bound = -1;
3940 static int hf_ieee80211_wfa_ie_wme_tspec_min_phy = -1;
3941 static int hf_ieee80211_wfa_ie_wme_tspec_surplus = -1;
3942 static int hf_ieee80211_wfa_ie_wme_tspec_medium = -1;
3944 static int hf_ieee80211_aironet_ie_type = -1;
3945 static int hf_ieee80211_aironet_ie_version = -1;
3946 static int hf_ieee80211_aironet_ie_data = -1;
3947 static int hf_ieee80211_aironet_ie_qos_reserved = -1;
3948 static int hf_ieee80211_aironet_ie_qos_paramset = -1;
3949 static int hf_ieee80211_aironet_ie_qos_val = -1;
3950 static int hf_ieee80211_aironet_ie_clientmfp = -1;
3952 static int hf_ieee80211_vs_nintendo_type = -1;
3953 static int hf_ieee80211_vs_nintendo_length = -1;
3954 static int hf_ieee80211_vs_nintendo_servicelist = -1;
3955 static int hf_ieee80211_vs_nintendo_service = -1;
3956 static int hf_ieee80211_vs_nintendo_consoleid = -1;
3957 static int hf_ieee80211_vs_nintendo_unknown = -1;
3959 static int hf_ieee80211_vs_aruba_subtype = -1;
3960 static int hf_ieee80211_vs_aruba_apname = -1;
3961 static int hf_ieee80211_vs_aruba_data = -1;
3963 static int hf_ieee80211_rsn_ie_pmkid = -1;
3964 static int hf_ieee80211_rsn_ie_unknown = -1;
3966 static int hf_ieee80211_marvell_ie_type = -1;
3967 static int hf_ieee80211_marvell_ie_mesh_subtype = -1;
3968 static int hf_ieee80211_marvell_ie_mesh_version = -1;
3969 static int hf_ieee80211_marvell_ie_mesh_active_proto_id = -1;
3970 static int hf_ieee80211_marvell_ie_mesh_active_metric_id = -1;
3971 static int hf_ieee80211_marvell_ie_mesh_cap = -1;
3972 static int hf_ieee80211_marvell_ie_data = -1;
3974 static int hf_ieee80211_atheros_ie_type = -1;
3975 static int hf_ieee80211_atheros_ie_subtype = -1;
3976 static int hf_ieee80211_atheros_ie_version = -1;
3977 static int hf_ieee80211_atheros_ie_cap_f_turbop = -1;
3978 static int hf_ieee80211_atheros_ie_cap_f_comp = -1;
3979 static int hf_ieee80211_atheros_ie_cap_f_ff = -1;
3980 static int hf_ieee80211_atheros_ie_cap_f_xr = -1;
3981 static int hf_ieee80211_atheros_ie_cap_f_ar = -1;
3982 static int hf_ieee80211_atheros_ie_cap_f_burst = -1;
3983 static int hf_ieee80211_atheros_ie_cap_f_wme = -1;
3984 static int hf_ieee80211_atheros_ie_cap_f_boost = -1;
3985 static int hf_ieee80211_atheros_ie_advcap_cap = -1;
3986 static int hf_ieee80211_atheros_ie_advcap_defkey = -1;
3987 static int hf_ieee80211_atheros_ie_xr_info = -1;
3988 static int hf_ieee80211_atheros_ie_xr_base_bssid = -1;
3989 static int hf_ieee80211_atheros_ie_xr_xr_bssid = -1;
3990 static int hf_ieee80211_atheros_ie_xr_xr_beacon = -1;
3991 static int hf_ieee80211_atheros_ie_xr_base_cap = -1;
3992 static int hf_ieee80211_atheros_ie_xr_xr_cap = -1;
3993 static int hf_ieee80211_atheros_ie_data = -1;
3995 /*QBSS - Version 1,2,802.11e*/
3997 static int hf_ieee80211_qbss2_cal = -1;
3998 static int hf_ieee80211_qbss2_gl = -1;
3999 static int hf_ieee80211_qbss_cu = -1;
4000 static int hf_ieee80211_qbss2_cu = -1;
4001 static int hf_ieee80211_qbss_scount = -1;
4002 static int hf_ieee80211_qbss2_scount = -1;
4003 static int hf_ieee80211_qbss_version = -1;
4004 static int hf_ieee80211_qbss_adc = -1;
4006 static int hf_ieee80211_tsinfo = -1;
4007 static int hf_ieee80211_tsinfo_type = -1;
4008 static int hf_ieee80211_tsinfo_tsid = -1;
4009 static int hf_ieee80211_tsinfo_dir = -1;
4010 static int hf_ieee80211_tsinfo_access = -1;
4011 static int hf_ieee80211_tsinfo_agg = -1;
4012 static int hf_ieee80211_tsinfo_apsd = -1;
4013 static int hf_ieee80211_tsinfo_up = -1;
4014 static int hf_ieee80211_tsinfo_ack = -1;
4015 static int hf_ieee80211_tsinfo_sched = -1;
4016 static int hf_ieee80211_tsinfo_rsv = -1;
4018 static const int *ieee80211_tsinfo_fields[] = {
4019 &hf_ieee80211_tsinfo_type,
4020 &hf_ieee80211_tsinfo_tsid,
4021 &hf_ieee80211_tsinfo_dir,
4022 &hf_ieee80211_tsinfo_access,
4023 &hf_ieee80211_tsinfo_agg,
4024 &hf_ieee80211_tsinfo_apsd,
4025 &hf_ieee80211_tsinfo_up,
4026 &hf_ieee80211_tsinfo_ack,
4027 &hf_ieee80211_tsinfo_sched,
4028 &hf_ieee80211_tsinfo_rsv,
4029 NULL
4032 static int hf_ieee80211_tspec_nor_msdu = -1;
4033 static int hf_ieee80211_tspec_max_msdu = -1;
4034 static int hf_ieee80211_tspec_min_srv = -1;
4035 static int hf_ieee80211_tspec_max_srv = -1;
4036 static int hf_ieee80211_tspec_inact_int = -1;
4037 static int hf_ieee80211_tspec_susp_int = -1;
4038 static int hf_ieee80211_tspec_srv_start = -1;
4039 static int hf_ieee80211_tspec_min_data = -1;
4040 static int hf_ieee80211_tspec_mean_data = -1;
4041 static int hf_ieee80211_tspec_peak_data = -1;
4042 static int hf_ieee80211_tspec_burst_size = -1;
4043 static int hf_ieee80211_tspec_delay_bound = -1;
4044 static int hf_ieee80211_tspec_min_phy = -1;
4045 static int hf_ieee80211_tspec_surplus = -1;
4046 static int hf_ieee80211_tspec_medium = -1;
4047 static int hf_ieee80211_ts_delay = -1;
4048 static int hf_ieee80211_tclas_process = -1;
4049 static int hf_ieee80211_tag_qos_cap_qos_info = -1;
4050 static int hf_ieee80211_qos_info_field_vo_uapsd = -1;
4051 static int hf_ieee80211_qos_info_field_vi_uapsd = -1;
4052 static int hf_ieee80211_qos_info_field_bk_uapsd = -1;
4053 static int hf_ieee80211_qos_info_field_be_uapsd = -1;
4054 static int hf_ieee80211_qos_info_field_qack = -1;
4055 static int hf_ieee80211_qos_info_field_max_sp_length = -1;
4056 static int hf_ieee80211_qos_info_field_more_data_ack = -1;
4057 static int hf_ieee80211_qos_info_field_edca_upd_cnt = -1;
4058 static int hf_ieee80211_qos_info_field_queue_req = -1;
4059 static int hf_ieee80211_qos_info_field_txop_req = -1;
4060 static int hf_ieee80211_qos_info_field_reserved = -1;
4061 static int hf_ieee80211_tag_ext_supp_rates = -1;
4062 static int hf_ieee80211_sched_info = -1;
4063 static int hf_ieee80211_sched_info_agg = -1;
4064 static int hf_ieee80211_sched_info_tsid = -1;
4065 static int hf_ieee80211_sched_info_dir = -1;
4066 static int hf_ieee80211_sched_srv_start = -1;
4067 static int hf_ieee80211_sched_srv_int = -1;
4068 static int hf_ieee80211_sched_spec_int = -1;
4069 static int hf_ieee80211_tclas_up = -1;
4070 static int hf_ieee80211_tclas_class_type = -1;
4071 static int hf_ieee80211_tclas_class_mask = -1;
4072 static int hf_ieee80211_tclas_class_mask0_src_addr = -1;
4073 static int hf_ieee80211_tclas_class_mask0_dst_addr = -1;
4074 static int hf_ieee80211_tclas_class_mask0_type = -1;
4075 static int hf_ieee80211_tclas_class_mask1_ver = -1;
4076 static int hf_ieee80211_tclas_class_mask1_src_ip = -1;
4077 static int hf_ieee80211_tclas_class_mask1_dst_ip = -1;
4078 static int hf_ieee80211_tclas_class_mask1_src_port = -1;
4079 static int hf_ieee80211_tclas_class_mask1_dst_port = -1;
4080 static int hf_ieee80211_tclas_class_mask1_ipv4_dscp = -1;
4081 static int hf_ieee80211_tclas_class_mask1_ipv4_proto = -1;
4082 static int hf_ieee80211_tclas_class_mask1_ipv6_flow = -1;
4083 static int hf_ieee80211_tclas_class_mask2_tci = -1;
4084 static int hf_ieee80211_tclas_src_mac_addr = -1;
4085 static int hf_ieee80211_tclas_dst_mac_addr = -1;
4086 static int hf_ieee80211_tclas_ether_type = -1;
4087 static int hf_ieee80211_tclas_version = -1;
4088 static int hf_ieee80211_tclas_ipv4_src = -1;
4089 static int hf_ieee80211_tclas_ipv4_dst = -1;
4090 static int hf_ieee80211_tclas_src_port = -1;
4091 static int hf_ieee80211_tclas_dst_port = -1;
4092 static int hf_ieee80211_tclas_dscp = -1;
4093 static int hf_ieee80211_tclas_protocol = -1;
4094 static int hf_ieee80211_tclas_ipv6_src = -1;
4095 static int hf_ieee80211_tclas_ipv6_dst = -1;
4096 static int hf_ieee80211_tclas_flow = -1;
4097 static int hf_ieee80211_tclas_tag_type = -1;
4099 static int hf_ieee80211_aruba = -1;
4100 static int hf_ieee80211_aruba_hb_seq = -1;
4101 static int hf_ieee80211_aruba_mtu = -1;
4103 static int hf_ieee80211_tag_vendor_oui_type = -1;
4104 static int hf_ieee80211_tag_vendor_data = -1;
4106 /* IEEE Std 802.11z-2010 7.3.2.62 */
4107 static int hf_ieee80211_tag_link_id_bssid = -1;
4108 static int hf_ieee80211_tag_link_id_init_sta = -1;
4109 static int hf_ieee80211_tag_link_id_resp_sta = -1;
4111 /* IEEE Std 802.11z-2010 7.3.2.63 */
4112 static int hf_ieee80211_tag_wakeup_schedule_offset = -1;
4113 static int hf_ieee80211_tag_wakeup_schedule_interval = -1;
4114 static int hf_ieee80211_tag_wakeup_schedule_awake_window_slots = -1;
4115 static int hf_ieee80211_tag_wakeup_schedule_max_awake_dur = -1;
4116 static int hf_ieee80211_tag_wakeup_schedule_idle_count = -1;
4118 /* IEEE Std 802.11z-2010 7.3.2.64 */
4119 static int hf_ieee80211_tag_channel_switch_timing_switch_time = -1;
4120 static int hf_ieee80211_tag_channel_switch_timing_switch_timeout = -1;
4122 /* IEEE Std 802.11z-2010 7.3.2.65 */
4123 static int hf_ieee80211_tag_pti_control_tid = -1;
4124 static int hf_ieee80211_tag_pti_control_sequence_control = -1;
4126 /* IEEE Std 802.11z-2010 7.3.2.66 */
4127 static int hf_ieee80211_tag_pu_buffer_status_ac_bk = -1;
4128 static int hf_ieee80211_tag_pu_buffer_status_ac_be = -1;
4129 static int hf_ieee80211_tag_pu_buffer_status_ac_vi = -1;
4130 static int hf_ieee80211_tag_pu_buffer_status_ac_vo = -1;
4132 /* IEEE Std 802.11r-2008 7.3.2.49 */
4133 static int hf_ieee80211_tag_timeout_int_type = -1;
4134 static int hf_ieee80211_tag_timeout_int_value = -1;
4136 /* Ethertype 89-0d */
4137 static int hf_ieee80211_data_encap_payload_type = -1;
4139 static int hf_ieee80211_anqp_wfa_subtype = -1;
4141 /* Hotspot 2.0 */
4142 static int hf_hs20_indication_dgaf_disabled = -1;
4144 static int hf_hs20_anqp_subtype = -1;
4145 static int hf_hs20_anqp_reserved = -1;
4146 static int hf_hs20_anqp_payload = -1;
4147 static int hf_hs20_anqp_hs_query_list = -1;
4148 static int hf_hs20_anqp_hs_capability_list = -1;
4149 static int hf_hs20_anqp_ofn_length = -1;
4150 static int hf_hs20_anqp_ofn_language = -1;
4151 static int hf_hs20_anqp_ofn_name = -1;
4152 static int hf_hs20_anqp_wan_metrics_link_status = -1;
4153 static int hf_hs20_anqp_wan_metrics_symmetric_link = -1;
4154 static int hf_hs20_anqp_wan_metrics_at_capacity = -1;
4155 static int hf_hs20_anqp_wan_metrics_reserved = -1;
4156 static int hf_hs20_anqp_wan_metrics_downlink_speed = -1;
4157 static int hf_hs20_anqp_wan_metrics_uplink_speed = -1;
4158 static int hf_hs20_anqp_wan_metrics_downlink_load = -1;
4159 static int hf_hs20_anqp_wan_metrics_uplink_load = -1;
4160 static int hf_hs20_anqp_wan_metrics_lmd = -1;
4161 static int hf_hs20_anqp_cc_proto_ip_proto = -1;
4162 static int hf_hs20_anqp_cc_proto_port_num = -1;
4163 static int hf_hs20_anqp_cc_proto_status = -1;
4164 static int hf_hs20_anqp_nai_hrq_count = -1;
4165 static int hf_hs20_anqp_nai_hrq_encoding_type = -1;
4166 static int hf_hs20_anqp_nai_hrq_length = -1;
4167 static int hf_hs20_anqp_nai_hrq_realm_name = -1;
4168 static int hf_hs20_anqp_oper_class_indic = -1;
4170 /* ************************************************************************* */
4171 /* Protocol trees */
4172 /* ************************************************************************* */
4173 static gint ett_80211 = -1;
4174 static gint ett_proto_flags = -1;
4175 static gint ett_cap_tree = -1;
4176 static gint ett_fc_tree = -1;
4177 static gint ett_cntrl_wrapper_fc = -1;
4178 static gint ett_cntrl_wrapper_payload = -1;
4179 static gint ett_fragments = -1;
4180 static gint ett_fragment = -1;
4181 static gint ett_block_ack = -1;
4182 static gint ett_block_ack_bitmap = -1;
4183 static gint ett_ath_cap_tree = -1;
4186 static gint ett_80211_mgt = -1;
4187 static gint ett_fixed_parameters = -1;
4188 static gint ett_tagged_parameters = -1;
4189 static gint ett_tag_bmapctl_tree = -1;
4190 static gint ett_tag_country_fnm_tree = -1;
4191 static gint ett_tag_country_rcc_tree = -1;
4192 static gint ett_qos_parameters = -1;
4193 static gint ett_qos_ps_buf_state = -1;
4194 static gint ett_qos_info_field_tree = -1;
4195 static gint ett_wep_parameters = -1;
4196 static gint ett_msh_control = -1;
4197 static gint ett_hwmp_targ_flags_tree = -1;
4198 static gint ett_mesh_chswitch_flag_tree = -1;
4199 static gint ett_mesh_config_cap_tree = -1;
4200 static gint ett_mesh_formation_info_tree = -1;
4202 static gint ett_rsn_gcs_tree = -1;
4203 static gint ett_rsn_pcs_tree = -1;
4204 static gint ett_rsn_sub_pcs_tree = -1;
4205 static gint ett_rsn_akms_tree = -1;
4206 static gint ett_rsn_sub_akms_tree = -1;
4207 static gint ett_rsn_cap_tree = -1;
4208 static gint ett_rsn_pmkid_tree = -1;
4209 static gint ett_rsn_gmcs_tree = -1;
4211 static gint ett_wpa_mcs_tree = -1;
4212 static gint ett_wpa_ucs_tree = -1;
4213 static gint ett_wpa_sub_ucs_tree = -1;
4214 static gint ett_wpa_akms_tree = -1;
4215 static gint ett_wpa_sub_akms_tree = -1;
4216 static gint ett_wme_ac = -1;
4217 static gint ett_wme_aci_aifsn = -1;
4218 static gint ett_wme_ecw = -1;
4219 static gint ett_wme_qos_info = -1;
4221 static gint ett_ht_cap_tree = -1;
4222 static gint ett_ampduparam_tree = -1;
4223 static gint ett_mcsset_tree = -1;
4224 static gint ett_mcsbit_tree = -1;
4225 static gint ett_htex_cap_tree = -1;
4226 static gint ett_txbf_tree = -1;
4227 static gint ett_antsel_tree = -1;
4228 static gint ett_hta_cap_tree = -1;
4229 static gint ett_hta_cap1_tree = -1;
4230 static gint ett_hta_cap2_tree = -1;
4231 static gint ett_htc_tree = -1;
4233 static gint ett_vht_cap_tree = -1;
4234 static gint ett_vht_mcsset_tree = -1;
4235 static gint ett_vht_rx_mcsbit_tree = -1;
4236 static gint ett_vht_tx_mcsbit_tree = -1;
4237 static gint ett_vht_basic_mcsbit_tree = -1;
4238 static gint ett_vht_tpe_info_tree = -1;
4240 static gint ett_vht_op_tree = -1;
4242 static gint ett_vht_ndp_annc_token_tree = -1;
4243 static gint ett_vht_ndp_annc_sta_info_tree = -1;
4245 static gint ett_ht_info_delimiter1_tree = -1;
4246 static gint ett_ht_info_delimiter2_tree = -1;
4247 static gint ett_ht_info_delimiter3_tree = -1;
4249 static gint ett_tag_measure_request_mode_tree = -1;
4250 static gint ett_tag_measure_request_type_tree = -1;
4251 static gint ett_tag_measure_report_mode_tree = -1;
4252 static gint ett_tag_measure_report_type_tree = -1;
4253 static gint ett_tag_measure_report_basic_map_tree = -1;
4254 static gint ett_tag_measure_report_rpi_tree = -1;
4255 static gint ett_tag_measure_report_frame_tree = -1;
4256 static gint ett_tag_bss_bitmask_tree = -1;
4257 static gint ett_tag_dfs_map_tree = -1;
4258 static gint ett_tag_erp_info_tree = -1;
4259 static gint ett_tag_ex_cap1 = -1;
4260 static gint ett_tag_ex_cap2 = -1;
4261 static gint ett_tag_ex_cap3 = -1;
4262 static gint ett_tag_ex_cap4 = -1;
4263 static gint ett_tag_ex_cap5 = -1;
4264 static gint ett_tag_ex_cap6 = -1;
4265 static gint ett_tag_ex_cap7 = -1;
4266 static gint ett_tag_ex_cap8 = -1;
4268 static gint ett_tag_rm_cap1 = -1;
4269 static gint ett_tag_rm_cap2 = -1;
4270 static gint ett_tag_rm_cap3 = -1;
4271 static gint ett_tag_rm_cap4 = -1;
4272 static gint ett_tag_rm_cap5 = -1;
4273 static gint ett_tag_tclas_mask_tree = -1;
4275 static gint ett_tag_supported_channels = -1;
4277 static gint ett_tag_neighbor_report_bssid_info_tree = -1;
4278 static gint ett_tag_neighbor_report_bssid_info_capability_tree = -1;
4279 static gint ett_tag_neighbor_report_sub_tag_tree = -1;
4281 static gint ett_tag_wapi_param_set_akm_tree = -1;
4282 static gint ett_tag_wapi_param_set_ucast_tree = -1;
4283 static gint ett_tag_wapi_param_set_mcast_tree = -1;
4284 static gint ett_tag_wapi_param_set_preauth_tree = -1;
4286 static gint ett_tag_time_adv_tree = -1;
4288 static gint ett_ff_ba_param_tree = -1;
4289 static gint ett_ff_ba_ssc_tree = -1;
4290 static gint ett_ff_delba_param_tree = -1;
4291 static gint ett_ff_qos_info = -1;
4292 static gint ett_ff_sm_pwr_save = -1;
4293 static gint ett_ff_psmp_param_set = -1;
4294 static gint ett_ff_mimo_cntrl = -1;
4295 static gint ett_ff_ant_sel = -1;
4296 static gint ett_mimo_report = -1;
4297 static gint ett_ff_chan_switch_announce = -1;
4298 static gint ett_ff_ht_info = -1;
4299 static gint ett_ff_psmp_sta_info = -1;
4301 static gint ett_tpc = -1;
4303 static gint ett_msdu_aggregation_parent_tree = -1;
4304 static gint ett_msdu_aggregation_subframe_tree = -1;
4306 static gint ett_80211_mgt_ie = -1;
4307 static gint ett_tsinfo_tree = -1;
4308 static gint ett_sched_tree = -1;
4310 static gint ett_fcs = -1;
4312 static gint ett_adv_proto = -1;
4313 static gint ett_adv_proto_tuple = -1;
4314 static gint ett_gas_query = -1;
4315 static gint ett_gas_anqp = -1;
4316 static gint ett_nai_realm = -1;
4317 static gint ett_nai_realm_eap = -1;
4318 static gint ett_tag_ric_data_desc_ie = -1;
4319 static gint ett_anqp_vendor_capab = -1;
4321 static gint ett_hs20_cc_proto_port_tuple = -1;
4323 static gint ett_ssid_list = -1;
4325 static gint ett_nintendo = -1;
4327 static gint ett_qos_map_set_exception = -1;
4328 static gint ett_qos_map_set_range = -1;
4330 static expert_field ei_ieee80211_bad_length = EI_INIT;
4331 static expert_field ei_ieee80211_inv_val = EI_INIT;
4332 static expert_field ei_ieee80211_vht_tpe_pwr_info_count = EI_INIT;
4333 static expert_field ei_ieee80211_ff_query_response_length = EI_INIT;
4334 static expert_field ei_ieee80211_ff_anqp_nai_realm_eap_len = EI_INIT;
4335 static expert_field ei_hs20_anqp_nai_hrq_length = EI_INIT;
4336 static expert_field ei_ieee80211_extra_data = EI_INIT;
4337 static expert_field ei_ieee80211_tag_data = EI_INIT;
4338 static expert_field ei_ieee80211_tdls_setup_confirm_malformed = EI_INIT;
4339 static expert_field ei_ieee80211_ff_anqp_nai_field_len = EI_INIT;
4340 static expert_field ei_ieee80211_rsn_pcs_count = EI_INIT;
4341 static expert_field ei_ieee80211_tag_measure_request_beacon_unknown = EI_INIT;
4342 static expert_field ei_ieee80211_tag_number = EI_INIT;
4343 static expert_field ei_ieee80211_ff_anqp_info_length = EI_INIT;
4344 static expert_field ei_hs20_anqp_ofn_length = EI_INIT;
4345 static expert_field ei_ieee80211_tdls_setup_response_malformed = EI_INIT;
4346 static expert_field ei_ieee80211_ff_anqp_capability = EI_INIT;
4347 static expert_field ei_ieee80211_not_enough_room_for_anqp_header = EI_INIT;
4348 static expert_field ei_ieee80211_ff_query_request_length = EI_INIT;
4349 static expert_field ei_ieee80211_wfa_ie_wme_qos_info_bad_ftype = EI_INIT;
4350 static expert_field ei_ieee80211_pmkid_count_too_large = EI_INIT;
4351 static expert_field ei_ieee80211_ff_anqp_venue_length = EI_INIT;
4352 static expert_field ei_ieee80211_ff_anqp_roaming_consortium_oi_len = EI_INIT;
4353 static expert_field ei_ieee80211_tag_length = EI_INIT;
4354 static expert_field ei_ieee80211_missing_data = EI_INIT;
4355 static expert_field ei_ieee80211_rsn_pmkid_count = EI_INIT;
4356 static expert_field ei_ieee80211_fc_retry = EI_INIT;
4357 static expert_field ei_ieee80211_tag_wnm_sleep_mode_no_key_data = EI_INIT;
4359 static const fragment_items frag_items = {
4360 &ett_fragment,
4361 &ett_fragments,
4362 &hf_ieee80211_fragments,
4363 &hf_ieee80211_fragment,
4364 &hf_ieee80211_fragment_overlap,
4365 &hf_ieee80211_fragment_overlap_conflict,
4366 &hf_ieee80211_fragment_multiple_tails,
4367 &hf_ieee80211_fragment_too_long_fragment,
4368 &hf_ieee80211_fragment_error,
4369 &hf_ieee80211_fragment_count,
4370 &hf_ieee80211_reassembled_in,
4371 &hf_ieee80211_reassembled_length,
4372 /* Reassembled data field */
4373 NULL,
4374 "fragments"
4377 static const enum_val_t wlan_ignore_wep_options[] = {
4378 { "no", "No", WLAN_IGNORE_WEP_NO },
4379 { "without_iv", "Yes - without IV", WLAN_IGNORE_WEP_WO_IV },
4380 { "with_iv", "Yes - with IV", WLAN_IGNORE_WEP_W_IV },
4381 { NULL, NULL, 0 }
4384 static dissector_handle_t ieee80211_handle;
4385 static dissector_handle_t llc_handle;
4386 static dissector_handle_t ipx_handle;
4387 static dissector_handle_t eth_withoutfcs_handle;
4388 static dissector_handle_t data_handle;
4390 static int wlan_tap = -1;
4392 static const value_string access_network_type_vals[] = {
4393 { 0, "Private network" },
4394 { 1, "Private network with guest access" },
4395 { 2, "Chargeable public network" },
4396 { 3, "Free public network" },
4397 { 4, "Personal device network" },
4398 { 5, "Emergency services only network" },
4399 { 14, "Test or experimental" },
4400 { 15, "Wildcard" },
4401 { 0, NULL }
4404 static const value_string adv_proto_id_vals[] = {
4405 { 0, "Access Network Query Protocol"},
4406 { 1, "MIH Information Service"},
4407 { 2, "MIH Command and Event Services Capability Discovery"},
4408 { 3, "Emergency Alert System (EAS)"},
4409 { 4, "Location-to-Service Translation Protocol"},
4410 {221, "Vendor Specific"},
4411 {0, NULL}
4414 static const value_string timeout_int_types[] = {
4415 {1, "Reassociation deadline interval (TUs)"},
4416 {2, "Key lifetime interval (seconds)"},
4417 {3, "Association Comeback time (TUs)"},
4418 {0, NULL}
4421 static const value_string tdls_action_codes[] = {
4422 {TDLS_SETUP_REQUEST, "TDLS Setup Request"},
4423 {TDLS_SETUP_RESPONSE, "TDLS Setup Response"},
4424 {TDLS_SETUP_CONFIRM, "TDLS Setup Confirm"},
4425 {TDLS_TEARDOWN, "TDLS Teardown"},
4426 {TDLS_PEER_TRAFFIC_INDICATION, "TDLS Peer Traffic Indication"},
4427 {TDLS_CHANNEL_SWITCH_REQUEST, "TDLS Channel Switch Request"},
4428 {TDLS_CHANNEL_SWITCH_RESPONSE, "TDLS Channel Switch Response"},
4429 {TDLS_PEER_PSM_REQUEST, "TDLS Peer PSM Request"},
4430 {TDLS_PEER_PSM_RESPONSE, "TDLS Peer PSM Response"},
4431 {TDLS_PEER_TRAFFIC_RESPONSE, "TDLS Peer Traffic Response"},
4432 {TDLS_DISCOVERY_REQUEST, "TDLS Discovery Request"},
4433 {0, NULL}
4435 static value_string_ext tdls_action_codes_ext = VALUE_STRING_EXT_INIT(tdls_action_codes);
4437 static const value_string rm_action_codes[] = {
4438 {RM_ACTION_RADIO_MEASUREMENT_REQUEST, "Radio Measurement Request"},
4439 {RM_ACTION_RADIO_MEASUREMENT_REPORT, "Radio Measurement Report"},
4440 {RM_ACTION_LINK_MEASUREMENT_REQUEST, "Link Measurement Request"},
4441 {RM_ACTION_LINK_MEASUREMENT_REPORT, "Link Measurement Report"},
4442 {RM_ACTION_NEIGHBOR_REPORT_REQUEST, "Neighbor Report Request"},
4443 {RM_ACTION_NEIGHBOR_REPORT_RESPONSE, "Neighbor Report Response"},
4444 {0, NULL}
4446 static value_string_ext rm_action_codes_ext = VALUE_STRING_EXT_INIT(rm_action_codes);
4448 AIRPDCAP_CONTEXT airpdcap_ctx;
4450 #define PSMP_STA_INFO_BROADCAST 0
4451 #define PSMP_STA_INFO_MULTICAST 1
4452 #define PSMP_STA_INFO_INDIVIDUALLY_ADDRESSED 2
4454 #define PSMP_STA_INFO_FLAG_TYPE 0x00000003
4455 #define PSMP_STA_INFO_FLAG_DTT_START 0x00001FFC
4456 #define PSMP_STA_INFO_FLAG_DTT_DURATION 0x001FE000
4458 #define PSMP_STA_INFO_FLAG_STA_ID 0x001FFFE0
4460 #define PSMP_STA_INFO_FLAG_UTT_START 0x0000FFE0
4461 #define PSMP_STA_INFO_FLAG_UTT_DURATION 0x03FF0000
4463 #define PSMP_STA_INFO_FLAG_IA_RESERVED 0xFC000000
4465 static const value_string ff_psmp_sta_info_flags[] = {
4466 { PSMP_STA_INFO_BROADCAST, "Broadcast"},
4467 { PSMP_STA_INFO_MULTICAST, "Multicast"},
4468 { PSMP_STA_INFO_INDIVIDUALLY_ADDRESSED, "Individually Addressed"},
4469 {0, NULL}
4472 static void
4473 beacon_interval_base_custom(gchar *result, guint32 beacon_interval)
4475 double temp_double;
4477 temp_double = (double)beacon_interval;
4478 g_snprintf(result, ITEM_LABEL_LENGTH, "%f [Seconds]", (temp_double * 1024 / 1000000));
4481 /* ************************************************************************* */
4482 /* Return the length of the current header (in bytes) */
4483 /* ************************************************************************* */
4484 static int
4485 find_header_length (guint16 fcf, guint16 ctrl_fcf, gboolean is_ht)
4487 int len;
4488 guint16 cw_fcf;
4490 switch (FCF_FRAME_TYPE (fcf)) {
4492 case MGT_FRAME:
4493 if (is_ht && IS_STRICTLY_ORDERED(FCF_FLAGS(fcf)))
4494 return MGT_FRAME_HDR_LEN + 4;
4496 return MGT_FRAME_HDR_LEN;
4498 case CONTROL_FRAME:
4499 if (COMPOSE_FRAME_TYPE(fcf) == CTRL_CONTROL_WRAPPER) {
4500 len = 6;
4501 cw_fcf = ctrl_fcf;
4502 } else {
4503 len = 0;
4504 cw_fcf = fcf;
4506 switch (COMPOSE_FRAME_TYPE (cw_fcf)) {
4508 case CTRL_CTS:
4509 case CTRL_ACKNOWLEDGEMENT:
4510 return len + 10;
4512 case CTRL_VHT_NDP_ANNC:
4513 len += 17;
4514 /* TODO: for now we only consider a single STA, add support for more */
4515 len += 2;
4516 return len;
4518 case CTRL_RTS:
4519 case CTRL_PS_POLL:
4520 case CTRL_CFP_END:
4521 case CTRL_CFP_ENDACK:
4522 case CTRL_BLOCK_ACK_REQ:
4523 case CTRL_BLOCK_ACK:
4524 return len + 16;
4526 return len + 4; /* XXX */
4528 case DATA_FRAME:
4529 len = (FCF_ADDR_SELECTOR(fcf) ==
4530 DATA_ADDR_T4) ? DATA_LONG_HDR_LEN : DATA_SHORT_HDR_LEN;
4532 if (DATA_FRAME_IS_QOS(COMPOSE_FRAME_TYPE(fcf))) {
4533 len += 2;
4534 if (is_ht && IS_STRICTLY_ORDERED(FCF_FLAGS(fcf))) {
4535 len += 4;
4539 return len;
4541 default:
4542 return 4; /* XXX */
4546 /* ************************************************************************* */
4547 /* Mesh Control field helper functions
4549 * Per IEEE 802.11s Draft 12.0 section 7.2.2.1:
4551 * The frame body consists of either:
4552 * The MSDU (or a fragment thereof), the Mesh Control field (if and only if the
4553 * frame is transmitted by a mesh STA and the Mesh Control Present subfield of
4554 * the QoS Control field is 1)...
4556 * We need a stateful sniffer for that. For now, use heuristics.
4558 * Notably, only mesh data frames contain the Mesh Control field in the header.
4559 * Other frames that contain mesh control (i.e., multihop action frames) have
4560 * it deeper in the frame body where it can be definitively identified.
4561 * Further, mesh data frames always have to-ds and from-ds either 11 or 01. We
4562 * use these facts to make our heuristics more reliable.
4563 * ************************************************************************* */
4564 static int
4565 has_mesh_control(guint16 fcf, guint16 qos_ctl, guint8 mesh_flags)
4567 /* assume mesh control present if the QOS field's Mesh Control Present bit is
4568 * set, all reserved bits in the mesh_flags field are zero, and the address
4569 * extension mode is not a reserved value.
4571 return (((FCF_ADDR_SELECTOR(fcf) == DATA_ADDR_T4) || (FCF_ADDR_SELECTOR(fcf) == DATA_ADDR_T2)) &&
4572 (QOS_MESH_CONTROL_PRESENT(qos_ctl)) &&
4573 ((mesh_flags & ~MESH_FLAGS_ADDRESS_EXTENSION) == 0) &&
4574 ((mesh_flags & MESH_FLAGS_ADDRESS_EXTENSION) != MESH_FLAGS_ADDRESS_EXTENSION));
4577 static int
4578 find_mesh_control_length(guint8 mesh_flags)
4580 return 6 + 6*(mesh_flags & MESH_FLAGS_ADDRESS_EXTENSION);
4583 static mimo_control_t
4584 get_mimo_control (tvbuff_t *tvb, int offset)
4586 guint16 mimo;
4587 mimo_control_t output;
4589 mimo = tvb_get_letohs (tvb, offset);
4591 output.nc = (mimo & 0x0003) + 1;
4592 output.nr = ((mimo & 0x000C) >> 2) + 1;
4593 output.chan_width = (mimo & 0x0010) >> 4;
4594 output.coefficient_size = 4; /* XXX - Is this a good default? */
4596 switch ((mimo & 0x0060) >> 5)
4598 case 0:
4599 output.grouping = 1;
4600 break;
4602 case 1:
4603 output.grouping = 2;
4604 break;
4606 case 2:
4607 output.grouping = 4;
4608 break;
4610 default:
4611 output.grouping = 1;
4612 break;
4615 switch ((mimo & 0x0180) >> 7)
4617 case 0:
4618 output.coefficient_size = 4;
4619 break;
4621 case 1:
4622 output.coefficient_size = 5;
4623 break;
4625 case 2:
4626 output.coefficient_size = 6;
4627 break;
4629 case 3:
4630 output.coefficient_size = 8;
4631 break;
4634 output.codebook_info = (mimo & 0x0600) >> 9;
4635 output.remaining_matrix_segment = (mimo & 0x3800) >> 11;
4637 return output;
4640 static int
4641 get_mimo_na (guint8 nr, guint8 nc)
4643 if ((nr == 2) && (nc == 1)) {
4644 return 2;
4645 } else if ((nr == 2) && (nc == 2)) {
4646 return 2;
4647 } else if ((nr == 3) && (nc == 1)) {
4648 return 4;
4649 } else if ((nr == 3) && (nc == 2)) {
4650 return 6;
4651 } else if ((nr == 3) && (nc == 3)) {
4652 return 6;
4653 } else if ((nr == 4) && (nc == 1)) {
4654 return 6;
4655 } else if ((nr == 4) && (nc == 2)) {
4656 return 10;
4657 } else if ((nr == 4) && (nc == 3)) {
4658 return 12;
4659 } else if ((nr == 4) && (nc == 4)) {
4660 return 12;
4661 } else{
4662 return 0;
4666 static int
4667 get_mimo_ns (gboolean chan_width, guint8 output_grouping)
4669 int ns = 0;
4671 if (chan_width)
4673 switch (output_grouping)
4675 case 1:
4676 ns = 114;
4677 break;
4679 case 2:
4680 ns = 58;
4681 break;
4683 case 4:
4684 ns = 30;
4685 break;
4687 default:
4688 ns = 0;
4690 } else {
4691 switch (output_grouping)
4693 case 1:
4694 ns = 56;
4695 break;
4697 case 2:
4698 ns = 30;
4699 break;
4701 case 4:
4702 ns = 16;
4703 break;
4705 default:
4706 ns = 0;
4710 return ns;
4713 static int
4714 add_mimo_csi_matrices_report (proto_tree *tree, tvbuff_t *tvb, int offset, mimo_control_t mimo_cntrl)
4716 proto_item *snr_item;
4717 proto_tree *snr_tree;
4718 int csi_matrix_size, start_offset;
4719 int ns, i;
4721 start_offset = offset;
4722 snr_item = proto_tree_add_text(tree, tvb, offset, mimo_cntrl.nc, "Signal to Noise Ratio");
4723 snr_tree = proto_item_add_subtree (snr_item, ett_mimo_report);
4725 for (i = 1; i <= mimo_cntrl.nr; i++)
4727 guint8 snr;
4729 snr = tvb_get_guint8(tvb, offset);
4730 proto_tree_add_uint_format(snr_tree, hf_ieee80211_ff_mimo_csi_snr, tvb, offset, 1,
4731 snr, "Channel %d - Signal to Noise Ratio: 0x%02X", i, snr);
4732 offset += 1;
4735 ns = get_mimo_ns(mimo_cntrl.chan_width, mimo_cntrl.grouping);
4736 csi_matrix_size = ns*(3+(2*mimo_cntrl.nc*mimo_cntrl.nr*mimo_cntrl.coefficient_size));
4737 csi_matrix_size = roundup2(csi_matrix_size, 8) / 8;
4738 proto_tree_add_text(tree, tvb, offset, csi_matrix_size, "CSI Matrices");
4739 offset += csi_matrix_size;
4740 return offset - start_offset;
4743 static int
4744 add_mimo_beamforming_feedback_report (proto_tree *tree, tvbuff_t *tvb, int offset, mimo_control_t mimo_cntrl)
4746 proto_item *snr_item;
4747 proto_tree *snr_tree;
4748 int csi_matrix_size, start_offset;
4749 int ns, i;
4751 start_offset = offset;
4752 snr_item = proto_tree_add_text(tree, tvb, offset, mimo_cntrl.nc, "Signal to Noise Ratio");
4753 snr_tree = proto_item_add_subtree (snr_item, ett_mimo_report);
4755 for (i = 1; i <= mimo_cntrl.nc; i++)
4757 guint8 snr;
4759 snr = tvb_get_guint8(tvb, offset);
4760 proto_tree_add_uint_format(snr_tree, hf_ieee80211_ff_mimo_csi_snr, tvb, offset, 1,
4761 snr, "Stream %d - Signal to Noise Ratio: 0x%02X", i, snr);
4762 offset += 1;
4765 ns = get_mimo_ns(mimo_cntrl.chan_width, mimo_cntrl.grouping);
4766 csi_matrix_size = ns*(2*mimo_cntrl.nc*mimo_cntrl.nr*mimo_cntrl.coefficient_size);
4767 csi_matrix_size = roundup2(csi_matrix_size, 8) / 8;
4768 proto_tree_add_text(tree, tvb, offset, csi_matrix_size, "Beamforming Feedback Matrices");
4769 offset += csi_matrix_size;
4770 return offset - start_offset;
4773 static int
4774 add_mimo_compressed_beamforming_feedback_report (proto_tree *tree, tvbuff_t *tvb, int offset, mimo_control_t mimo_cntrl)
4776 proto_item *snr_item;
4777 proto_tree *snr_tree;
4778 int csi_matrix_size, start_offset;
4779 int ns, na, i;
4781 start_offset = offset;
4782 snr_item = proto_tree_add_text(tree, tvb, offset, mimo_cntrl.nc, "Signal to Noise Ratio");
4783 snr_tree = proto_item_add_subtree (snr_item, ett_mimo_report);
4785 for (i = 1; i <= mimo_cntrl.nc; i++)
4787 guint8 snr;
4789 snr = tvb_get_guint8(tvb, offset);
4790 proto_tree_add_uint_format(snr_tree, hf_ieee80211_ff_mimo_csi_snr, tvb, offset, 1,
4791 snr, "Stream %d - Signal to Noise Ratio: 0x%02X", i, snr);
4792 offset += 1;
4795 na = get_mimo_na(mimo_cntrl.nr, mimo_cntrl.nc);
4796 ns = get_mimo_ns(mimo_cntrl.chan_width, mimo_cntrl.grouping);
4797 csi_matrix_size = ns*(na*((mimo_cntrl.codebook_info+1)*2 + 2)/2);
4798 csi_matrix_size = roundup2(csi_matrix_size, 8) / 8;
4799 proto_tree_add_text(tree, tvb, offset, csi_matrix_size, "Compressed Beamforming Feedback Matrices");
4800 offset += csi_matrix_size;
4801 return offset - start_offset;
4804 /* ************************************************************************* */
4805 /* This is the capture function used to update packet counts */
4806 /* ************************************************************************* */
4807 static void
4808 capture_ieee80211_common (const guchar * pd, int offset, int len,
4809 packet_counts * ld, gboolean fixed_length_header,
4810 gboolean datapad, gboolean is_ht)
4812 guint16 fcf, hdr_length;
4814 if (!BYTES_ARE_IN_FRAME(offset, len, 2)) {
4815 ld->other += 1;
4816 return;
4819 fcf = pletohs (&pd[offset]);
4821 if (IS_PROTECTED(FCF_FLAGS(fcf)) && (wlan_ignore_wep == WLAN_IGNORE_WEP_NO)) {
4822 ld->other += 1;
4823 return;
4826 switch (COMPOSE_FRAME_TYPE (fcf)) {
4828 case DATA: /* We got a data frame */
4829 case DATA_CF_ACK: /* Data with ACK */
4830 case DATA_CF_POLL:
4831 case DATA_CF_ACK_POLL:
4832 case DATA_QOS_DATA:
4834 if (fixed_length_header) {
4835 hdr_length = DATA_LONG_HDR_LEN;
4836 } else {
4837 hdr_length = find_header_length (fcf, 0, is_ht);
4838 /* adjust the header length depending on the Mesh Control field */
4839 if ((FCF_FRAME_TYPE(fcf) == DATA_FRAME) &&
4840 DATA_FRAME_IS_QOS(COMPOSE_FRAME_TYPE(fcf))) {
4842 guint8 mesh_flags = pd[hdr_length];
4843 guint16 qosoff = hdr_length - 2;
4844 qosoff -= (is_ht ? 4 : 0);
4845 if (has_mesh_control(fcf, pletohs(&pd[qosoff]), mesh_flags)) {
4846 hdr_length += find_mesh_control_length(mesh_flags);
4849 if (datapad)
4850 hdr_length = roundup2(hdr_length, 4);
4852 /* I guess some bridges take Netware Ethernet_802_3 frames,
4853 which are 802.3 frames (with a length field rather than
4854 a type field, but with no 802.2 header in the payload),
4855 and just stick the payload into an 802.11 frame. I've seen
4856 captures that show frames of that sort.
4858 We also handle some odd form of encapsulation in which a
4859 complete Ethernet frame is encapsulated within an 802.11
4860 data frame, with no 802.2 header. This has been seen
4861 from some hardware.
4863 On top of that, at least at some point it appeared that
4864 the OLPC XO sent out frames with two bytes of 0 between
4865 the "end" of the 802.11 header and the beginning of
4866 the payload.
4868 So, if the packet doesn't start with 0xaa 0xaa:
4870 we first use the same scheme that linux-wlan-ng does to detect
4871 those encapsulated Ethernet frames, namely looking to see whether
4872 the frame either starts with 6 octets that match the destination
4873 address from the 802.11 header or has 6 octets that match the
4874 source address from the 802.11 header following the first 6 octets,
4875 and, if so, treat it as an encapsulated Ethernet frame;
4877 otherwise, we use the same scheme that we use in the Ethernet
4878 dissector to recognize Netware 802.3 frames, namely checking
4879 whether the packet starts with 0xff 0xff and, if so, treat it
4880 as an encapsulated IPX frame, and then check whether the
4881 packet starts with 0x00 0x00 and, if so, treat it as an OLPC
4882 frame. */
4883 if (!BYTES_ARE_IN_FRAME(offset+hdr_length, len, 2)) {
4884 ld->other += 1;
4885 return;
4887 if ((pd[offset+hdr_length] != 0xaa) && (pd[offset+hdr_length+1] != 0xaa)) {
4888 #if 0
4889 /* XXX - this requires us to parse the header to find the source
4890 and destination addresses. */
4891 if (BYTES_ARE_IN_FRAME(offset+hdr_length, len, 12)) {
4892 /* We have two MAC addresses after the header. */
4893 if ((memcmp(&pd[offset+hdr_length+6], pinfo->dl_src.data, 6) == 0) ||
4894 (memcmp(&pd[offset+hdr_length+6], pinfo->dl_dst.data, 6) == 0)) {
4895 capture_eth (pd, offset + hdr_length, len, ld);
4896 return;
4899 #endif
4900 if ((pd[offset+hdr_length] == 0xff) && (pd[offset+hdr_length+1] == 0xff))
4901 capture_ipx (ld);
4902 else if ((pd[offset+hdr_length] == 0x00) && (pd[offset+hdr_length+1] == 0x00))
4903 capture_llc (pd, offset + hdr_length + 2, len, ld);
4905 else {
4906 capture_llc (pd, offset + hdr_length, len, ld);
4908 break;
4911 default:
4912 ld->other += 1;
4913 break;
4918 * Handle 802.11 with a variable-length link-layer header.
4920 void
4921 capture_ieee80211 (const guchar * pd, int offset, int len, packet_counts * ld)
4923 capture_ieee80211_common (pd, offset, len, ld, FALSE, FALSE, FALSE);
4927 * Handle 802.11 with a variable-length link-layer header and data padding.
4929 void
4930 capture_ieee80211_datapad (const guchar * pd, int offset, int len,
4931 packet_counts * ld)
4933 capture_ieee80211_common (pd, offset, len, ld, FALSE, TRUE, FALSE);
4937 * Handle 802.11 with a fixed-length link-layer header (padded to the
4938 * maximum length).
4940 void
4941 capture_ieee80211_fixed (const guchar * pd, int offset, int len, packet_counts * ld)
4943 capture_ieee80211_common (pd, offset, len, ld, TRUE, FALSE, FALSE);
4947 * Handle an HT 802.11 with a variable-length link-layer header.
4949 void
4950 capture_ieee80211_ht (const guchar * pd, int offset, int len, packet_counts * ld)
4952 capture_ieee80211_common (pd, offset, len, ld, FALSE, FALSE, TRUE);
4956 /* ************************************************************************* */
4957 /* Add the subtree used to store the fixed parameters */
4958 /* ************************************************************************* */
4959 static proto_tree *
4960 get_fixed_parameter_tree (proto_tree * tree, tvbuff_t *tvb, int start, int size)
4962 proto_item *fixed_fields;
4964 fixed_fields = proto_tree_add_item (tree, hf_ieee80211_fixed_parameters, tvb, start, size, ENC_NA);
4965 proto_item_append_text(fixed_fields, " (%d bytes)",size);
4967 return proto_item_add_subtree (fixed_fields, ett_fixed_parameters);
4971 /* ************************************************************************* */
4972 /* Add the subtree used to store tagged parameters */
4973 /* ************************************************************************* */
4974 static proto_tree *
4975 get_tagged_parameter_tree (proto_tree * tree, tvbuff_t *tvb, int start, int size)
4977 proto_item *tagged_fields;
4979 tagged_fields = proto_tree_add_item(tree, hf_ieee80211_tagged_parameters, tvb, start, -1, ENC_NA);
4980 proto_item_append_text(tagged_fields, " (%d bytes)",size);
4982 return proto_item_add_subtree (tagged_fields, ett_tagged_parameters);
4986 static int
4987 dissect_vendor_action_marvell(proto_tree *tree, tvbuff_t *tvb, int offset)
4989 guint8 octet;
4991 octet = tvb_get_guint8(tvb, offset);
4992 proto_tree_add_item (tree, hf_ieee80211_ff_marvell_action_type, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4993 offset += 1;
4994 switch (octet)
4996 case MRVL_ACTION_MESH_MANAGEMENT:
4997 octet = tvb_get_guint8(tvb, offset);
4998 proto_tree_add_item (tree, hf_ieee80211_ff_marvell_mesh_mgt_action_code, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4999 offset += 1;
5000 switch (octet)
5002 case MRVL_MESH_MGMT_ACTION_RREQ:
5003 proto_tree_add_item (tree, hf_ieee80211_ff_marvell_mesh_mgt_length, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5004 offset += 1;
5005 proto_tree_add_item (tree, hf_ieee80211_ff_marvell_mesh_mgt_mode, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5006 offset += 1;
5007 proto_tree_add_item (tree, hf_ieee80211_ff_marvell_mesh_mgt_hopcount, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5008 offset += 1;
5009 proto_tree_add_item (tree, hf_ieee80211_ff_marvell_mesh_mgt_ttl, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5010 offset += 1;
5011 proto_tree_add_item (tree, hf_ieee80211_ff_marvell_mesh_mgt_rreqid, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5012 offset += 4;
5013 proto_tree_add_item (tree, hf_ieee80211_ff_marvell_mesh_mgt_sa, tvb, offset, 6, ENC_NA);
5014 offset += 6;
5015 proto_tree_add_item (tree, hf_ieee80211_ff_marvell_mesh_mgt_ssn, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5016 offset += 4;
5017 proto_tree_add_item (tree, hf_ieee80211_ff_marvell_mesh_mgt_lifetime, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5018 offset += 4;
5019 proto_tree_add_item (tree, hf_ieee80211_ff_marvell_mesh_mgt_metric, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5020 offset += 4;
5021 proto_tree_add_item (tree, hf_ieee80211_ff_marvell_mesh_mgt_dstcount, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5022 offset += 1;
5023 proto_tree_add_item (tree, hf_ieee80211_ff_marvell_mesh_mgt_flags, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5024 offset += 1;
5025 proto_tree_add_item (tree, hf_ieee80211_ff_marvell_mesh_mgt_da, tvb, offset, 6, ENC_NA);
5026 offset += 6;
5027 proto_tree_add_item (tree, hf_ieee80211_ff_marvell_mesh_mgt_dsn, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5028 offset += 4;
5029 break;
5030 case MRVL_MESH_MGMT_ACTION_RREP:
5031 proto_tree_add_item (tree, hf_ieee80211_ff_marvell_mesh_mgt_length, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5032 offset += 1;
5033 proto_tree_add_item (tree, hf_ieee80211_ff_marvell_mesh_mgt_mode, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5034 offset += 1;
5035 proto_tree_add_item (tree, hf_ieee80211_ff_marvell_mesh_mgt_hopcount, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5036 offset += 1;
5037 proto_tree_add_item (tree, hf_ieee80211_ff_marvell_mesh_mgt_ttl, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5038 offset += 1;
5039 proto_tree_add_item (tree, hf_ieee80211_ff_marvell_mesh_mgt_da, tvb, offset, 6, ENC_NA);
5040 offset += 6;
5041 proto_tree_add_item (tree, hf_ieee80211_ff_marvell_mesh_mgt_dsn, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5042 offset += 4;
5043 proto_tree_add_item (tree, hf_ieee80211_ff_marvell_mesh_mgt_lifetime, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5044 offset += 4;
5045 proto_tree_add_item (tree, hf_ieee80211_ff_marvell_mesh_mgt_metric, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5046 offset += 4;
5047 proto_tree_add_item (tree, hf_ieee80211_ff_marvell_mesh_mgt_sa, tvb, offset, 6, ENC_NA);
5048 offset += 6;
5049 proto_tree_add_item (tree, hf_ieee80211_ff_marvell_mesh_mgt_ssn, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5050 offset += 4;
5051 break;
5052 case MRVL_MESH_MGMT_ACTION_RERR:
5053 proto_tree_add_item (tree, hf_ieee80211_ff_marvell_mesh_mgt_length, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5054 offset += 1;
5055 proto_tree_add_item (tree, hf_ieee80211_ff_marvell_mesh_mgt_mode, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5056 offset += 1;
5057 proto_tree_add_item (tree, hf_ieee80211_ff_marvell_mesh_mgt_dstcount, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5058 offset += 1;
5059 proto_tree_add_item (tree, hf_ieee80211_ff_marvell_mesh_mgt_da, tvb, offset, 6, ENC_NA);
5060 offset += 6;
5061 proto_tree_add_item (tree, hf_ieee80211_ff_marvell_mesh_mgt_dsn, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5062 offset += 4;
5063 break;
5064 default:
5065 break;
5067 break;
5068 default:
5069 break;
5072 return offset;
5075 static guint
5076 dissect_advertisement_protocol(packet_info *pinfo, proto_tree *tree,
5077 tvbuff_t *tvb, int offset, gboolean *anqp)
5079 guint8 tag_no, tag_len, left;
5080 proto_item *item = NULL, *adv_item;
5081 proto_tree *adv_tree, *adv_tuple_tree;
5083 if (anqp)
5084 *anqp = FALSE;
5085 tag_no = tvb_get_guint8(tvb, offset);
5086 if (anqp)
5087 item = proto_tree_add_item(tree, hf_ieee80211_tag_number, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5089 tag_len = tvb_get_guint8(tvb, offset + 1);
5090 if (tag_no != TAG_ADVERTISEMENT_PROTOCOL) {
5091 expert_add_info_format(pinfo, item, &ei_ieee80211_tag_number,
5092 "Unexpected IE %d (expected Advertisement "
5093 "Protocol)", tag_no);
5094 return 2 + tag_len;
5096 if (anqp)
5097 item = proto_tree_add_uint(tree, hf_ieee80211_tag_length, tvb, offset + 1, 1, tag_len);
5098 if (tag_len < 2) {
5099 if (!anqp)
5100 item = proto_tree_add_uint(tree, hf_ieee80211_tag_length, tvb, offset + 1, 1, tag_len);
5101 expert_add_info_format(pinfo, item, &ei_ieee80211_tag_length,
5102 "Advertisement Protocol: IE must be at least 2 "
5103 "octets long");
5104 return 2 + tag_len;
5107 left = tag_len;
5108 offset += 2;
5109 adv_item = proto_tree_add_text(tree, tvb, offset, left,
5110 "Advertisement Protocol element");
5111 adv_tree = proto_item_add_subtree(adv_item, ett_adv_proto);
5113 while (left >= 2) {
5114 guint8 id;
5116 id = tvb_get_guint8(tvb, offset + 1);
5117 if (id == 0)
5118 proto_item_append_text(adv_item, ": ANQP");
5119 item = proto_tree_add_text(adv_tree, tvb, offset, 2,
5120 "Advertisement Protocol Tuple: %s",
5121 val_to_str(id, adv_proto_id_vals,
5122 "Unknown (%d)"));
5123 adv_tuple_tree = proto_item_add_subtree(item, ett_adv_proto_tuple);
5125 proto_tree_add_item(adv_tuple_tree,
5126 hf_ieee80211_tag_adv_proto_resp_len_limit, tvb,
5127 offset, 1, ENC_BIG_ENDIAN);
5128 proto_tree_add_item(adv_tuple_tree,
5129 hf_ieee80211_tag_adv_proto_pame_bi, tvb,
5130 offset, 1, ENC_BIG_ENDIAN);
5131 offset += 1;
5132 left--;
5133 proto_tree_add_item(adv_tuple_tree, hf_ieee80211_tag_adv_proto_id, tvb,
5134 offset, 1, ENC_BIG_ENDIAN);
5135 offset += 1;
5136 left--;
5138 if ((id == 0) && anqp)
5139 *anqp = TRUE;
5141 if (id == 221) {
5142 /* Vendor specific */
5143 guint8 len = tvb_get_guint8(tvb, offset);
5144 offset += 1;
5145 left -= 1;
5146 if (len > left) {
5147 expert_add_info_format(pinfo, item, &ei_ieee80211_tag_length,
5148 "Vendor specific info length error");
5149 return 2 + tag_len;
5151 proto_tree_add_text(adv_tuple_tree, tvb, offset, len,
5152 "Vendor Specific Advertisement Protocol info");
5153 offset += len;
5154 left -= len;
5158 if (left) {
5159 expert_add_info_format(pinfo, item, &ei_ieee80211_extra_data,
5160 "Unexpected extra data in the end");
5163 return 2 + tag_len;
5166 static void
5167 dissect_anqp_query_list(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset, int end)
5169 while (offset + 2 <= end) {
5170 proto_tree_add_item(tree, hf_ieee80211_ff_anqp_query_id,
5171 tvb, offset, 2, ENC_LITTLE_ENDIAN);
5172 offset += 2;
5174 if (offset != end) {
5175 expert_add_info_format(pinfo, tree, &ei_ieee80211_ff_anqp_info_length,
5176 "Unexpected ANQP Query list format");
5180 static void dissect_hs20_anqp_hs_capability_list(proto_tree *tree,
5181 tvbuff_t *tvb,
5182 int offset, int end)
5184 while (offset < end) {
5185 proto_tree_add_item(tree, hf_hs20_anqp_hs_capability_list,
5186 tvb, offset, 1, ENC_LITTLE_ENDIAN);
5187 offset++;
5191 static void
5192 dissect_anqp_capab_list(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset, int end)
5194 guint16 id, len;
5195 proto_item *item;
5196 proto_tree *vtree;
5197 guint32 oui;
5198 guint8 subtype;
5200 while (offset + 2 <= end) {
5201 id = tvb_get_letohs(tvb, offset);
5202 item = proto_tree_add_item(tree, hf_ieee80211_ff_anqp_capability,
5203 tvb, offset, 2, ENC_LITTLE_ENDIAN);
5204 offset += 2;
5205 if (id == ANQP_INFO_ANQP_VENDOR_SPECIFIC_LIST) {
5206 vtree = proto_item_add_subtree(item, ett_anqp_vendor_capab);
5207 len = tvb_get_letohs(tvb, offset);
5208 proto_tree_add_item(vtree, hf_ieee80211_ff_anqp_capability_vlen,
5209 tvb, offset, 2, ENC_LITTLE_ENDIAN);
5210 offset += 2;
5211 if ((len < 3) || ((offset + len) > end)) {
5212 expert_add_info(pinfo, tree, &ei_ieee80211_ff_anqp_capability);
5213 return;
5215 oui = tvb_get_ntoh24(tvb, offset);
5216 proto_tree_add_item(vtree, hf_ieee80211_tag_oui, tvb, offset, 3, ENC_NA);
5217 offset += 3;
5218 len -= 3;
5220 switch (oui) {
5221 case OUI_WFA:
5222 if (len == 0)
5223 break;
5224 subtype = tvb_get_guint8(tvb, offset);
5225 proto_item_append_text(vtree, " - WFA - %s",
5226 val_to_str(subtype, wfa_subtype_vals,
5227 "Unknown (%u)"));
5228 proto_tree_add_item(vtree, hf_ieee80211_anqp_wfa_subtype,
5229 tvb, offset, 1, ENC_NA);
5230 offset++;
5231 len--;
5232 switch (subtype) {
5233 case WFA_SUBTYPE_HS20_ANQP:
5234 dissect_hs20_anqp_hs_capability_list(vtree, tvb, offset, end);
5235 break;
5236 default:
5237 proto_tree_add_item(vtree, hf_ieee80211_ff_anqp_capability_vendor,
5238 tvb, offset, len, ENC_NA);
5239 break;
5241 break;
5242 default:
5243 proto_tree_add_item(vtree, hf_ieee80211_ff_anqp_capability_vendor,
5244 tvb, offset, len, ENC_NA);
5245 break;
5248 offset += len;
5251 if (offset != end) {
5252 expert_add_info_format(pinfo, tree, &ei_ieee80211_ff_anqp_info_length,
5253 "Unexpected ANQP Capability list format");
5257 static const value_string venue_group_vals[] = {
5258 { 0, "Unspecified" },
5259 { 1, "Assembly" },
5260 { 2, "Business" },
5261 { 3, "Educational" },
5262 { 4, "Factory and Industrial" },
5263 { 5, "Institutional" },
5264 { 6, "Mercantile" },
5265 { 7, "Residential" },
5266 { 8, "Storage" },
5267 { 9, "Utility and Miscellaneous" },
5268 { 10, "Vehicular" },
5269 { 11, "Outdoor" },
5270 { 0, NULL }
5272 static value_string_ext venue_group_vals_ext = VALUE_STRING_EXT_INIT(venue_group_vals);
5274 static void
5275 dissect_venue_info(proto_tree *tree, tvbuff_t *tvb, int offset)
5277 proto_tree_add_item(tree, hf_ieee80211_ff_venue_info_group,
5278 tvb, offset, 1, ENC_BIG_ENDIAN);
5279 proto_tree_add_item(tree, hf_ieee80211_ff_venue_info_type,
5280 tvb, offset + 1, 1, ENC_BIG_ENDIAN);
5283 static void
5284 dissect_venue_name_info(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset, int end)
5286 proto_item *item;
5288 dissect_venue_info(tree, tvb, offset);
5289 offset += 2;
5290 while (offset + 4 <= end) {
5291 guint8 vlen = tvb_get_guint8(tvb, offset);
5292 item = proto_tree_add_item(tree, hf_ieee80211_ff_anqp_venue_length,
5293 tvb, offset, 1, ENC_BIG_ENDIAN);
5294 offset += 1;
5295 if ((vlen > (end - offset)) || (vlen < 3)) {
5296 expert_add_info(pinfo, item, &ei_ieee80211_ff_anqp_venue_length);
5297 break;
5299 proto_tree_add_item(tree, hf_ieee80211_ff_anqp_venue_language,
5300 tvb, offset, 3, ENC_ASCII|ENC_NA);
5301 proto_tree_add_item(tree, hf_ieee80211_ff_anqp_venue_name,
5302 tvb, offset + 3, vlen - 3, ENC_UTF_8|ENC_NA);
5303 offset += vlen;
5307 static const value_string nw_auth_type_vals[] = {
5308 { 0, "Acceptance of terms and conditions" },
5309 { 1, "On-line enrollment supported" },
5310 { 2, "http/https redirection" },
5311 { 3, "DNS redirection" },
5312 { 0, NULL }
5315 static void
5316 dissect_network_auth_type(proto_tree *tree, tvbuff_t *tvb, int offset, int end)
5318 while (offset + 3 <= end) {
5319 guint16 len;
5320 proto_tree_add_item(tree, hf_ieee80211_ff_anqp_nw_auth_type_indicator,
5321 tvb, offset, 1, ENC_BIG_ENDIAN);
5322 offset += 1;
5323 len = tvb_get_letohs(tvb, offset);
5324 proto_tree_add_item(tree, hf_ieee80211_ff_anqp_nw_auth_type_url_len,
5325 tvb, offset, 2, ENC_LITTLE_ENDIAN);
5326 offset += 2;
5327 if (len)
5328 proto_tree_add_item(tree, hf_ieee80211_ff_anqp_nw_auth_type_url,
5329 tvb, offset, len, ENC_ASCII|ENC_NA);
5330 offset += len;
5334 static void
5335 add_manuf(proto_item *item, tvbuff_t *tvb, int offset)
5337 const gchar *manuf_name;
5339 manuf_name = tvb_get_manuf_name_if_known(tvb, offset);
5340 if (manuf_name == NULL)
5341 return;
5342 proto_item_append_text(item, " - %s", manuf_name);
5345 static void
5346 dissect_roaming_consortium_list(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset,
5347 int end)
5349 proto_item *item;
5350 guint8 len;
5352 while (offset < end) {
5353 len = tvb_get_guint8(tvb, offset);
5354 item = proto_tree_add_item(tree,
5355 hf_ieee80211_ff_anqp_roaming_consortium_oi_len,
5356 tvb, offset, 1, ENC_BIG_ENDIAN);
5357 offset += 1;
5358 if ((len > (end - offset)) || (len < 3)) {
5359 expert_add_info(pinfo, item, &ei_ieee80211_ff_anqp_roaming_consortium_oi_len);
5360 break;
5362 item = proto_tree_add_item(tree,
5363 hf_ieee80211_ff_anqp_roaming_consortium_oi,
5364 tvb, offset, len, ENC_NA);
5365 add_manuf(item, tvb, offset);
5366 offset += len;
5370 static const value_string ip_addr_avail_ipv6_vals[] = {
5371 { 0, "Address type not available" },
5372 { 1, "Address type available" },
5373 { 2, "Availability of the address type not known" },
5374 { 0, NULL }
5377 static const value_string ip_addr_avail_ipv4_vals[] = {
5378 { 0, "Address type not available" },
5379 { 1, "Public IPv4 address available" },
5380 { 2, "Port-restricted IPv4 address available" },
5381 { 3, "Single NATed private IPv4 address available" },
5382 { 4, "Double NATed private IPv4 address available" },
5383 { 5, "Port-restricted IPv4 address and single NATed IPv4 address available" },
5384 { 6, "Port-restricted IPv4 address and double NATed IPv4 address available" },
5385 { 7, "Availability of the address type is not known" },
5386 { 0, NULL }
5389 static void
5390 dissect_ip_addr_type_availability_info(proto_tree *tree, tvbuff_t *tvb,
5391 int offset)
5393 proto_tree_add_item(tree, hf_ieee80211_ff_anqp_ip_addr_avail_ipv6,
5394 tvb, offset, 1, ENC_BIG_ENDIAN);
5395 proto_tree_add_item(tree, hf_ieee80211_ff_anqp_ip_addr_avail_ipv4,
5396 tvb, offset, 1, ENC_BIG_ENDIAN);
5399 static const value_string nai_realm_encoding_vals[] = {
5400 { 0, "Formatted in accordance with RFC 4282" },
5401 { 1, "UTF-8 formatted that is not formatted in accordance with RFC 4282" },
5402 { 0, NULL }
5405 static const value_string nai_realm_auth_param_id_vals[] = {
5406 { 1, "Expanded EAP Method" },
5407 { 2, "Non-EAP Inner Authentication Type" },
5408 { 3, "Inner Authentication EAP Method Type" },
5409 { 4, "Expanded Inner EAP Method" },
5410 { 5, "Credential Type" },
5411 { 6, "Tunneled EAP Method Credential Type" },
5412 { 221, "Vendor Specific" },
5413 { 0, NULL }
5416 static void
5417 dissect_nai_realm_list(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset, int end)
5419 guint16 count, len;
5420 proto_item *item, *r_item;
5421 int f_end, eap_end;
5422 guint8 nai_len, eap_count, eap_len, auth_param_count, auth_param_len;
5423 guint8 auth_param_id;
5424 proto_tree *realm_tree, *eap_tree;
5425 guint8 *realm;
5427 count = tvb_get_letohs(tvb, offset);
5428 proto_tree_add_item(tree, hf_ieee80211_ff_anqp_nai_realm_count,
5429 tvb, offset, 2, ENC_LITTLE_ENDIAN);
5430 offset += 2;
5431 while (count > 0) {
5432 len = tvb_get_letohs(tvb, offset);
5433 r_item = proto_tree_add_text(tree, tvb, offset, 2 + len, "NAI Realm Data");
5434 realm_tree = proto_item_add_subtree(r_item, ett_nai_realm);
5436 item = proto_tree_add_item(realm_tree, hf_ieee80211_ff_anqp_nai_field_len,
5437 tvb, offset, 2, ENC_LITTLE_ENDIAN);
5438 offset += 2;
5439 if (offset + len > end) {
5440 expert_add_info_format(pinfo, item, &ei_ieee80211_ff_anqp_nai_field_len,
5441 "Invalid NAI Realm List");
5442 break;
5444 f_end = offset + len;
5445 proto_tree_add_item(realm_tree, hf_ieee80211_ff_anqp_nai_realm_encoding,
5446 tvb, offset, 1, ENC_LITTLE_ENDIAN);
5447 offset += 1;
5448 nai_len = tvb_get_guint8(tvb, offset);
5449 item = proto_tree_add_item(realm_tree,
5450 hf_ieee80211_ff_anqp_nai_realm_length,
5451 tvb, offset, 1, ENC_LITTLE_ENDIAN);
5452 offset += 1;
5453 if (offset + nai_len > f_end) {
5454 expert_add_info_format(pinfo, item, &ei_ieee80211_ff_anqp_nai_field_len,
5455 "Invalid NAI Realm Data");
5456 break;
5458 proto_tree_add_item(realm_tree, hf_ieee80211_ff_anqp_nai_realm,
5459 tvb, offset, nai_len, ENC_ASCII|ENC_NA);
5460 realm = tvb_get_string(wmem_packet_scope(), tvb, offset, nai_len);
5461 if (realm) {
5462 proto_item_append_text(r_item, " (%s)", realm);
5464 offset += nai_len;
5465 eap_count = tvb_get_guint8(tvb, offset);
5466 proto_tree_add_item(realm_tree, hf_ieee80211_ff_anqp_nai_realm_eap_count,
5467 tvb, offset, 1, ENC_LITTLE_ENDIAN);
5468 offset += 1;
5470 while (eap_count > 0) {
5471 eap_len = tvb_get_guint8(tvb, offset);
5472 eap_end = offset + 1 + eap_len;
5473 item = proto_tree_add_text(realm_tree, tvb, offset, 1 + eap_len,
5474 "EAP Method");
5475 eap_tree = proto_item_add_subtree(item, ett_nai_realm_eap);
5477 item = proto_tree_add_item(eap_tree,
5478 hf_ieee80211_ff_anqp_nai_realm_eap_len,
5479 tvb, offset, 1, ENC_LITTLE_ENDIAN);
5480 offset += 1;
5481 if (offset + eap_len > f_end) {
5482 expert_add_info(pinfo, item, &ei_ieee80211_ff_anqp_nai_realm_eap_len);
5483 break;
5486 proto_item_append_text(eap_tree, ": %s",
5487 val_to_str_ext(tvb_get_guint8(tvb, offset),
5488 &eap_type_vals_ext, "Unknown (%d)"));
5489 proto_tree_add_item(eap_tree, hf_ieee80211_ff_anqp_nai_realm_eap_method,
5490 tvb, offset, 1, ENC_LITTLE_ENDIAN);
5491 offset += 1;
5492 auth_param_count = tvb_get_guint8(tvb, offset);
5493 proto_tree_add_item(eap_tree,
5494 hf_ieee80211_ff_anqp_nai_realm_auth_param_count,
5495 tvb, offset, 1, ENC_LITTLE_ENDIAN);
5496 offset += 1;
5498 while (auth_param_count > 0) {
5499 auth_param_id = tvb_get_guint8(tvb, offset);
5500 proto_tree_add_item(eap_tree,
5501 hf_ieee80211_ff_anqp_nai_realm_auth_param_id,
5502 tvb, offset, 1, ENC_LITTLE_ENDIAN);
5503 offset += 1;
5504 auth_param_len = tvb_get_guint8(tvb, offset);
5505 proto_tree_add_item(eap_tree,
5506 hf_ieee80211_ff_anqp_nai_realm_auth_param_len,
5507 tvb, offset, 1, ENC_LITTLE_ENDIAN);
5508 offset += 1;
5509 item = proto_tree_add_item(
5510 eap_tree, hf_ieee80211_ff_anqp_nai_realm_auth_param_value,
5511 tvb, offset, auth_param_len, ENC_NA);
5512 if ((auth_param_id == 3) && (auth_param_len == 1)) {
5513 guint8 inner_method = tvb_get_guint8(tvb, offset);
5514 const char *str;
5515 str = val_to_str_ext(inner_method, &eap_type_vals_ext, "Unknown (%d)");
5517 proto_item_append_text(eap_tree, " / %s", str);
5518 proto_item_append_text(item, " - %s", str);
5520 offset += auth_param_len;
5522 auth_param_count--;
5525 offset = eap_end;
5526 eap_count--;
5529 offset = f_end;
5530 count--;
5534 static void
5535 dissect_3gpp_cellular_network_info(proto_tree *tree, tvbuff_t *tvb, int offset)
5537 guint8 iei, num;
5538 proto_item *item;
5540 /* See Annex A of 3GPP TS 24.234 v8.1.0 for description */
5541 proto_tree_add_item(tree, hf_ieee80211_3gpp_gc_gud, tvb, offset, 1, ENC_BIG_ENDIAN);
5542 offset += 1;
5543 proto_tree_add_item(tree, hf_ieee80211_3gpp_gc_udhl, tvb, offset, 1, ENC_BIG_ENDIAN);
5544 offset += 1;
5545 iei = tvb_get_guint8(tvb, offset);
5546 item = proto_tree_add_item(tree, hf_ieee80211_3gpp_gc_iei, tvb, offset, 1, ENC_BIG_ENDIAN);
5547 if (iei == 0)
5548 proto_item_append_text(item, " (PLMN List)");
5549 else
5550 return;
5551 offset += 1;
5552 proto_tree_add_item(tree, hf_ieee80211_3gpp_gc_plmn_len, tvb, offset, 1, ENC_BIG_ENDIAN);
5553 offset += 1;
5554 num = tvb_get_guint8(tvb, offset);
5555 proto_tree_add_item(tree, hf_ieee80211_3gpp_gc_num_plmns, tvb, offset, 1, ENC_BIG_ENDIAN);
5556 offset += 1;
5557 while (num > 0) {
5558 guint8 o1, o2, o3;
5559 if (tvb_reported_length_remaining(tvb, offset) < 3)
5560 break;
5561 num--;
5562 o1 = tvb_get_guint8(tvb, offset);
5563 o2 = tvb_get_guint8(tvb, offset + 1);
5564 o3 = tvb_get_guint8(tvb, offset + 2);
5565 proto_tree_add_string_format_value(tree, hf_ieee80211_3gpp_gc_plmn, tvb, offset, 3,
5566 "", "MCC %d%d%d MNC %d%d%c",
5567 o1 & 0x0f, (o1 & 0xf0) >> 4, o2 & 0x0f,
5568 o3 & 0x0f, (o3 & 0xf0) >> 4,
5569 ((o2 & 0xf0) == 0xf0) ? ' ' :
5570 ('0' + ((o2 & 0xf0) >> 4)));
5571 offset += 3;
5575 static void
5576 dissect_domain_name_list(proto_tree *tree, tvbuff_t *tvb, int offset, int end)
5578 guint8 len;
5580 while (offset < end) {
5581 len = tvb_get_guint8(tvb, offset);
5582 proto_tree_add_item(tree, hf_ieee80211_ff_anqp_domain_name_len,
5583 tvb, offset, 1, ENC_BIG_ENDIAN);
5584 offset += 1;
5585 proto_tree_add_item(tree, hf_ieee80211_ff_anqp_domain_name,
5586 tvb, offset, len, ENC_ASCII|ENC_NA);
5587 offset += len;
5591 #define HS20_ANQP_HS_QUERY_LIST 1
5592 #define HS20_ANQP_HS_CAPABILITY_LIST 2
5593 #define HS20_ANQP_OPERATOR_FRIENDLY_NAME 3
5594 #define HS20_ANQP_WAN_METRICS 4
5595 #define HS20_ANQP_CONNECTION_CAPABILITY 5
5596 #define HS20_ANQP_NAI_HOME_REALM_QUERY 6
5597 #define HS20_ANQP_OPERATING_CLASS_INDICATION 7
5599 static const value_string hs20_anqp_subtype_vals[] = {
5600 { HS20_ANQP_HS_QUERY_LIST, "HS Query list" },
5601 { HS20_ANQP_HS_CAPABILITY_LIST, "HS Capability List" },
5602 { HS20_ANQP_OPERATOR_FRIENDLY_NAME, "Operator Friendly Name" },
5603 { HS20_ANQP_WAN_METRICS, "WAN Metrics" },
5604 { HS20_ANQP_CONNECTION_CAPABILITY, "Connection Capability" },
5605 { HS20_ANQP_NAI_HOME_REALM_QUERY, "NAI Home Realm Query" },
5606 { HS20_ANQP_OPERATING_CLASS_INDICATION, "Operating Class Indication" },
5607 { 0, NULL }
5610 static void dissect_hs20_anqp_hs_query_list(proto_tree *tree, tvbuff_t *tvb,
5611 int offset, int end)
5613 while (offset < end) {
5614 proto_tree_add_item(tree, hf_hs20_anqp_hs_query_list,
5615 tvb, offset, 1, ENC_LITTLE_ENDIAN);
5616 offset++;
5620 static void dissect_hs20_anqp_operator_friendly_name(proto_tree *tree,
5621 tvbuff_t *tvb, packet_info *pinfo,
5622 int offset, int end)
5624 while (offset + 4 <= end) {
5625 guint8 vlen = tvb_get_guint8(tvb, offset);
5626 proto_item *item = proto_tree_add_item(tree, hf_hs20_anqp_ofn_length,
5627 tvb, offset, 1, ENC_LITTLE_ENDIAN);
5628 offset++;
5629 if (vlen > end - offset || vlen < 3) {
5630 expert_add_info(pinfo, item, &ei_hs20_anqp_ofn_length);
5631 break;
5633 proto_tree_add_item(tree, hf_hs20_anqp_ofn_language,
5634 tvb, offset, 3, ENC_ASCII|ENC_NA);
5635 proto_tree_add_item(tree, hf_hs20_anqp_ofn_name,
5636 tvb, offset + 3, vlen - 3, ENC_UTF_8|ENC_NA);
5637 offset += vlen;
5641 static const value_string hs20_wm_link_status_vals[] = {
5642 { 0, "Reserved" },
5643 { 1, "Link up" },
5644 { 2, "Link down" },
5645 { 3, "Link in test state" },
5646 { 0, NULL }
5649 static void dissect_hs20_anqp_wan_metrics(proto_tree *tree, tvbuff_t *tvb,
5650 int offset, gboolean request)
5652 if (request)
5653 return;
5655 proto_tree_add_item(tree, hf_hs20_anqp_wan_metrics_link_status,
5656 tvb, offset, 1, ENC_LITTLE_ENDIAN);
5657 proto_tree_add_item(tree, hf_hs20_anqp_wan_metrics_symmetric_link,
5658 tvb, offset, 1, ENC_LITTLE_ENDIAN);
5659 proto_tree_add_item(tree, hf_hs20_anqp_wan_metrics_at_capacity,
5660 tvb, offset, 1, ENC_LITTLE_ENDIAN);
5661 proto_tree_add_item(tree, hf_hs20_anqp_wan_metrics_reserved,
5662 tvb, offset, 1, ENC_LITTLE_ENDIAN);
5663 offset++;
5665 proto_tree_add_item(tree, hf_hs20_anqp_wan_metrics_downlink_speed,
5666 tvb, offset, 4, ENC_LITTLE_ENDIAN);
5667 offset += 4;
5669 proto_tree_add_item(tree, hf_hs20_anqp_wan_metrics_uplink_speed,
5670 tvb, offset, 4, ENC_LITTLE_ENDIAN);
5671 offset += 4;
5673 proto_tree_add_item(tree, hf_hs20_anqp_wan_metrics_downlink_load,
5674 tvb, offset, 1, ENC_LITTLE_ENDIAN);
5675 offset++;
5677 proto_tree_add_item(tree, hf_hs20_anqp_wan_metrics_uplink_load,
5678 tvb, offset, 1, ENC_LITTLE_ENDIAN);
5679 offset++;
5681 proto_tree_add_item(tree, hf_hs20_anqp_wan_metrics_lmd,
5682 tvb, offset, 2, ENC_LITTLE_ENDIAN);
5685 static const value_string hs20_cc_status_vals[] = {
5686 { 0, "Closed" },
5687 { 1, "Open" },
5688 { 2, "Unknown" },
5689 { 0, NULL }
5692 static void
5693 dissect_hs20_anqp_connection_capability(proto_tree *tree, tvbuff_t *tvb,
5694 int offset, int end)
5696 proto_item *item;
5697 proto_tree *tuple;
5698 while (offset + 4 <= end) {
5699 guint8 ip_proto, status;
5700 guint16 port_num;
5702 ip_proto = tvb_get_guint8(tvb, offset);
5703 port_num = tvb_get_letohs(tvb, offset + 1);
5704 status = tvb_get_guint8(tvb, offset + 3);
5706 item = proto_tree_add_text(tree, tvb, offset, 4, "ProtoPort Tuple - "
5707 "ip_proto=%u port_num=%u status=%s",
5708 ip_proto, port_num,
5709 val_to_str(status, hs20_cc_status_vals,
5710 "Unknown (%u)"));
5711 tuple = proto_item_add_subtree(item, ett_hs20_cc_proto_port_tuple);
5712 proto_tree_add_item(tuple, hf_hs20_anqp_cc_proto_ip_proto,
5713 tvb, offset, 1, ENC_LITTLE_ENDIAN);
5714 offset++;
5715 proto_tree_add_item(tuple, hf_hs20_anqp_cc_proto_port_num,
5716 tvb, offset, 2, ENC_LITTLE_ENDIAN);
5717 offset += 2;
5718 proto_tree_add_item(tuple, hf_hs20_anqp_cc_proto_status,
5719 tvb, offset, 1, ENC_LITTLE_ENDIAN);
5720 offset++;
5724 static void
5725 dissect_hs20_anqp_nai_home_realm_query(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo,
5726 int offset, int end)
5728 guint8 len;
5729 proto_item *item;
5731 proto_tree_add_item(tree, hf_hs20_anqp_nai_hrq_count,
5732 tvb, offset, 1, ENC_LITTLE_ENDIAN);
5733 offset++;
5735 while (offset + 2 <= end) {
5736 proto_tree_add_item(tree, hf_hs20_anqp_nai_hrq_encoding_type,
5737 tvb, offset, 1, ENC_LITTLE_ENDIAN);
5738 offset++;
5739 len = tvb_get_guint8(tvb, offset);
5740 item = proto_tree_add_item(tree, hf_hs20_anqp_nai_hrq_length,
5741 tvb, offset, 1, ENC_LITTLE_ENDIAN);
5742 offset++;
5743 if (offset + len > end) {
5744 expert_add_info(pinfo, item, &ei_hs20_anqp_nai_hrq_length);
5745 break;
5747 proto_tree_add_item(tree, hf_hs20_anqp_nai_hrq_realm_name,
5748 tvb, offset, len, ENC_ASCII|ENC_NA);
5749 offset += len;
5753 static void dissect_hs20_anqp_oper_class_indic(proto_tree *tree, tvbuff_t *tvb,
5754 int offset, int end)
5756 while (offset < end) {
5757 proto_tree_add_item(tree, hf_hs20_anqp_oper_class_indic,
5758 tvb, offset, 1, ENC_LITTLE_ENDIAN);
5759 offset++;
5763 static void dissect_hs20_anqp(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset,
5764 int end, gboolean request, int idx)
5766 guint8 subtype;
5768 subtype = tvb_get_guint8(tvb, offset);
5769 proto_item_append_text(tree, " - HS 2.0 %s",
5770 val_to_str(subtype, hs20_anqp_subtype_vals,
5771 "Unknown (%u)"));
5772 if (idx == 0) {
5773 col_append_fstr(pinfo->cinfo, COL_INFO, " HS 2.0 %s",
5774 val_to_str(subtype, hs20_anqp_subtype_vals,
5775 "Unknown (%u)"));
5776 } else if (idx == 1) {
5777 col_append_str(pinfo->cinfo, COL_INFO, ", ..");
5779 proto_tree_add_item(tree, hf_hs20_anqp_subtype, tvb, offset, 1,
5780 ENC_LITTLE_ENDIAN);
5781 offset++;
5783 proto_tree_add_item(tree, hf_hs20_anqp_reserved, tvb, offset, 1,
5784 ENC_LITTLE_ENDIAN);
5785 offset++;
5787 switch (subtype) {
5788 case HS20_ANQP_HS_QUERY_LIST:
5789 dissect_hs20_anqp_hs_query_list(tree, tvb, offset, end);
5790 break;
5791 case HS20_ANQP_HS_CAPABILITY_LIST:
5792 dissect_hs20_anqp_hs_capability_list(tree, tvb, offset, end);
5793 break;
5794 case HS20_ANQP_OPERATOR_FRIENDLY_NAME:
5795 dissect_hs20_anqp_operator_friendly_name(tree, tvb, pinfo, offset, end);
5796 break;
5797 case HS20_ANQP_WAN_METRICS:
5798 dissect_hs20_anqp_wan_metrics(tree, tvb, offset, request);
5799 break;
5800 case HS20_ANQP_CONNECTION_CAPABILITY:
5801 dissect_hs20_anqp_connection_capability(tree, tvb, offset, end);
5802 break;
5803 case HS20_ANQP_NAI_HOME_REALM_QUERY:
5804 dissect_hs20_anqp_nai_home_realm_query(tree, tvb, pinfo, offset, end);
5805 break;
5806 case HS20_ANQP_OPERATING_CLASS_INDICATION:
5807 dissect_hs20_anqp_oper_class_indic(tree, tvb, offset, end);
5808 break;
5809 default:
5810 if (offset == end)
5811 break;
5812 proto_tree_add_item(tree, hf_hs20_anqp_payload, tvb, offset,
5813 end - offset, ENC_NA);
5814 break;
5818 static int
5819 dissect_anqp_info(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset,
5820 gboolean request, int idx)
5822 guint16 id, len;
5823 guint32 oui;
5824 proto_item *item;
5826 item = proto_tree_add_item(tree, hf_ieee80211_ff_anqp_info_id,
5827 tvb, offset, 2, ENC_LITTLE_ENDIAN);
5828 id = tvb_get_letohs(tvb, offset);
5829 if (id != ANQP_INFO_ANQP_VENDOR_SPECIFIC_LIST) {
5830 if (idx == 0) {
5831 proto_item_append_text(tree, " - %s",
5832 val_to_str_ext(id, &anqp_info_id_vals_ext, "Unknown (%u)"));
5833 col_append_fstr(pinfo->cinfo, COL_INFO, " %s",
5834 val_to_str_ext(id, &anqp_info_id_vals_ext, "Unknown (%u)"));
5835 } else if (idx == 1) {
5836 proto_item_append_text(tree, ", ..");
5837 col_append_str(pinfo->cinfo, COL_INFO, ", ..");
5840 tree = proto_item_add_subtree(item, ett_gas_anqp);
5841 offset += 2;
5842 proto_tree_add_item(tree, hf_ieee80211_ff_anqp_info_length,
5843 tvb, offset, 2, ENC_LITTLE_ENDIAN);
5844 len = tvb_get_letohs(tvb, offset);
5845 offset += 2;
5846 if (tvb_reported_length_remaining(tvb, offset) < len) {
5847 expert_add_info(pinfo, tree, &ei_ieee80211_ff_anqp_info_length);
5848 return 4 + len;
5850 switch (id)
5852 case ANQP_INFO_ANQP_QUERY_LIST:
5853 dissect_anqp_query_list(tree, tvb, pinfo, offset, offset + len);
5854 break;
5855 case ANQP_INFO_ANQP_CAPAB_LIST:
5856 dissect_anqp_capab_list(tree, tvb, pinfo, offset, offset + len);
5857 break;
5858 case ANQP_INFO_VENUE_NAME_INFO:
5859 dissect_venue_name_info(tree, tvb, pinfo, offset, offset + len);
5860 break;
5861 case ANQP_INFO_NETWORK_AUTH_TYPE_INFO:
5862 dissect_network_auth_type(tree, tvb, offset, offset + len);
5863 break;
5864 case ANQP_INFO_ROAMING_CONSORTIUM_LIST:
5865 dissect_roaming_consortium_list(tree, tvb, pinfo, offset, offset + len);
5866 break;
5867 case ANQP_INFO_IP_ADDR_TYPE_AVAILABILITY_INFO:
5868 dissect_ip_addr_type_availability_info(tree, tvb, offset);
5869 break;
5870 case ANQP_INFO_NAI_REALM_LIST:
5871 dissect_nai_realm_list(tree, tvb, pinfo, offset, offset + len);
5872 break;
5873 case ANQP_INFO_3GPP_CELLULAR_NETWORK_INFO:
5874 dissect_3gpp_cellular_network_info(tree, tvb, offset);
5875 break;
5876 case ANQP_INFO_DOMAIN_NAME_LIST:
5877 dissect_domain_name_list(tree, tvb, offset, offset + len);
5878 break;
5879 case ANQP_INFO_ANQP_VENDOR_SPECIFIC_LIST:
5880 oui = tvb_get_ntoh24(tvb, offset);
5881 proto_tree_add_item(tree, hf_ieee80211_tag_oui, tvb, offset, 3, ENC_NA);
5882 offset += 3;
5884 switch (oui) {
5885 case OUI_WFA:
5886 proto_tree_add_item(tree, hf_ieee80211_anqp_wfa_subtype, tvb, offset, 1,
5887 ENC_NA);
5888 switch (tvb_get_guint8(tvb, offset)) {
5889 case WFA_SUBTYPE_P2P:
5890 dissect_wifi_p2p_anqp(pinfo, tree, tvb, offset + 1, request);
5891 break;
5892 case WFA_SUBTYPE_HS20_ANQP:
5893 dissect_hs20_anqp(tree, tvb, pinfo, offset + 1, offset + len - 3, request,
5894 idx);
5895 break;
5897 break;
5898 default:
5899 proto_tree_add_item(tree, hf_ieee80211_ff_anqp_info,
5900 tvb, offset, len, ENC_NA);
5901 break;
5903 break;
5904 default:
5905 proto_tree_add_item(tree, hf_ieee80211_ff_anqp_info,
5906 tvb, offset, len, ENC_NA);
5907 break;
5910 return 4 + len;
5913 static void
5914 dissect_anqp(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset, gboolean request)
5916 int idx = 0;
5918 proto_item_append_text(tree, ": ANQP ");
5919 proto_item_append_text(tree, request ? "Request" : "Response");
5920 if (tvb_reported_length_remaining(tvb, offset) < 4) {
5921 expert_add_info_format(pinfo, tree, &ei_ieee80211_not_enough_room_for_anqp_header,
5922 "Not enough room for ANQP header");
5923 return;
5925 col_append_fstr(pinfo->cinfo, COL_INFO, ", ANQP %s",
5926 request ? "Req" : "Resp");
5927 while (tvb_reported_length_remaining(tvb, offset) > 0) {
5928 offset += dissect_anqp_info(tree, tvb, pinfo, offset, request, idx);
5929 idx += 1;
5933 static guint
5934 dissect_gas_initial_request(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset,
5935 gboolean anqp)
5937 guint16 req_len;
5938 int start = offset;
5939 proto_item *item;
5940 proto_tree *query;
5942 /* Query Request Length (2 octets) */
5943 req_len = tvb_get_letohs(tvb, offset);
5945 item = proto_tree_add_text(tree, tvb, offset, 2 + req_len, "Query Request");
5946 if (tvb_reported_length_remaining(tvb, offset) < 2 + req_len) {
5947 expert_add_info(pinfo, tree, &ei_ieee80211_ff_query_request_length);
5948 return tvb_reported_length_remaining(tvb, offset);
5950 query = proto_item_add_subtree(item, ett_gas_query);
5952 proto_tree_add_item(query, hf_ieee80211_ff_query_request_length,
5953 tvb, offset, 2, ENC_LITTLE_ENDIAN);
5954 offset += 2;
5956 * Query Request (GAS query; formatted per protocol specified in the
5957 * Advertisement Protocol IE)
5959 if (anqp)
5960 dissect_anqp(query, tvb, pinfo, offset, TRUE);
5961 else
5962 proto_tree_add_item(query, hf_ieee80211_ff_query_request,
5963 tvb, offset, req_len, ENC_NA);
5964 offset += req_len;
5966 return offset - start;
5969 static guint
5970 dissect_gas_initial_response(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset,
5971 gboolean anqp)
5973 guint16 resp_len;
5974 int start = offset;
5975 proto_item *item;
5976 proto_tree *query;
5978 /* Query Response Length (2 octets) */
5979 resp_len = tvb_get_letohs(tvb, offset);
5981 item = proto_tree_add_text(tree, tvb, offset, 2 + resp_len,
5982 "Query Response");
5983 if (tvb_reported_length_remaining(tvb, offset) < 2 + resp_len) {
5984 expert_add_info(pinfo, tree, &ei_ieee80211_ff_query_response_length);
5985 return tvb_reported_length_remaining(tvb, offset);
5987 query = proto_item_add_subtree(item, ett_gas_query);
5989 proto_tree_add_item(query, hf_ieee80211_ff_query_response_length,
5990 tvb, offset, 2, ENC_LITTLE_ENDIAN);
5991 offset += 2;
5992 /* Query Response (optional) */
5993 if (resp_len) {
5994 if (anqp)
5995 dissect_anqp(query, tvb, pinfo, offset, FALSE);
5996 else
5997 proto_tree_add_item(query, hf_ieee80211_ff_query_response,
5998 tvb, offset, resp_len, ENC_NA);
5999 offset += resp_len;
6002 return offset - start;
6005 static reassembly_table gas_reassembly_table;
6007 static void
6008 ieee80211_gas_reassembly_init(void)
6010 reassembly_table_init(&gas_reassembly_table,
6011 &addresses_reassembly_table_functions);
6014 static gint ett_gas_resp_fragment = -1;
6015 static gint ett_gas_resp_fragments = -1;
6017 static int hf_ieee80211_gas_resp_fragments = -1;
6018 static int hf_ieee80211_gas_resp_fragment = -1;
6019 static int hf_ieee80211_gas_resp_fragment_overlap = -1;
6020 static int hf_ieee80211_gas_resp_fragment_overlap_conflict = -1;
6021 static int hf_ieee80211_gas_resp_fragment_multiple_tails = -1;
6022 static int hf_ieee80211_gas_resp_fragment_too_long_fragment = -1;
6023 static int hf_ieee80211_gas_resp_fragment_error = -1;
6024 static int hf_ieee80211_gas_resp_fragment_count = -1;
6025 static int hf_ieee80211_gas_resp_reassembled_in = -1;
6026 static int hf_ieee80211_gas_resp_reassembled_length = -1;
6028 static const fragment_items gas_resp_frag_items = {
6029 &ett_gas_resp_fragment,
6030 &ett_gas_resp_fragments,
6031 &hf_ieee80211_gas_resp_fragments,
6032 &hf_ieee80211_gas_resp_fragment,
6033 &hf_ieee80211_gas_resp_fragment_overlap,
6034 &hf_ieee80211_gas_resp_fragment_overlap_conflict,
6035 &hf_ieee80211_gas_resp_fragment_multiple_tails,
6036 &hf_ieee80211_gas_resp_fragment_too_long_fragment,
6037 &hf_ieee80211_gas_resp_fragment_error,
6038 &hf_ieee80211_gas_resp_fragment_count,
6039 &hf_ieee80211_gas_resp_reassembled_in,
6040 &hf_ieee80211_gas_resp_reassembled_length,
6041 /* Reassembled data field */
6042 NULL,
6043 "GAS Response fragments"
6046 static guint
6047 dissect_gas_comeback_response(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset,
6048 gboolean anqp, guint8 frag, gboolean more,
6049 guint8 dialog_token)
6051 guint16 resp_len;
6052 int start = offset;
6053 proto_item *item;
6054 proto_tree *query;
6056 /* Query Response Length (2 octets) */
6057 resp_len = tvb_get_letohs(tvb, offset);
6059 item = proto_tree_add_text(tree, tvb, offset, 2 + resp_len,
6060 "Query Response");
6061 if (tvb_reported_length_remaining(tvb, offset) < 2 + resp_len) {
6062 expert_add_info(pinfo, tree, &ei_ieee80211_ff_query_response_length);
6063 return tvb_reported_length_remaining(tvb, offset);
6065 query = proto_item_add_subtree(item, ett_gas_query);
6067 proto_tree_add_item(query, hf_ieee80211_ff_query_response_length,
6068 tvb, offset, 2, ENC_LITTLE_ENDIAN);
6069 offset += 2;
6070 /* Query Response (optional) */
6071 if (resp_len) {
6072 if (anqp && (frag == 0) && !more)
6073 dissect_anqp(query, tvb, pinfo, offset, FALSE);
6074 else {
6075 fragment_head *frag_msg;
6076 gboolean save_fragmented;
6077 tvbuff_t *new_tvb;
6079 save_fragmented = pinfo->fragmented;
6080 pinfo->fragmented = TRUE;
6081 frag_msg = fragment_add_seq_check(&gas_reassembly_table, tvb, offset,
6082 pinfo, dialog_token, NULL,
6083 frag, resp_len, more);
6084 new_tvb = process_reassembled_data(tvb, offset, pinfo,
6085 "Reassembled GAS Query Response",
6086 frag_msg, &gas_resp_frag_items,
6087 NULL, tree);
6088 if (new_tvb) {
6089 if (anqp)
6090 dissect_anqp(query, new_tvb, pinfo, 0, FALSE);
6091 else
6092 proto_tree_add_item(query, hf_ieee80211_ff_query_response,
6093 new_tvb, 0,
6094 tvb_reported_length_remaining(new_tvb, 0),
6095 ENC_NA);
6098 /* The old tvb cannot be used anymore */
6099 ieee80211_tvb_invalid = TRUE;
6101 pinfo->fragmented = save_fragmented;
6103 offset += resp_len;
6106 return offset - start;
6109 /* ************************************************************************* */
6110 /* Dissect and add fixed mgmt fields to protocol tree */
6111 /* ************************************************************************* */
6113 static guint
6114 add_fixed_field(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset,
6115 enum fixed_field lfcode);
6117 static guint64 last_timestamp;
6119 static guint
6120 add_ff_timestamp(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
6122 last_timestamp = tvb_get_letoh64(tvb, offset);
6123 proto_tree_add_item(tree, hf_ieee80211_ff_timestamp, tvb, offset, 8,
6124 ENC_LITTLE_ENDIAN);
6125 return 8;
6128 static guint
6129 add_ff_beacon_interval(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset)
6131 proto_tree_add_item(tree, hf_ieee80211_ff_beacon_interval, tvb, offset, 2,
6132 ENC_LITTLE_ENDIAN);
6133 col_append_fstr(pinfo->cinfo, COL_INFO, ", BI=%d",
6134 tvb_get_letohs(tvb, offset));
6135 return 2;
6138 static guint
6139 add_ff_cap_info(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
6141 proto_item *cap_item;
6142 proto_tree *cap_tree;
6144 cap_item = proto_tree_add_item(tree, hf_ieee80211_ff_capture, tvb, offset, 2,
6145 ENC_LITTLE_ENDIAN);
6146 cap_tree = proto_item_add_subtree(cap_item, ett_cap_tree);
6148 proto_tree_add_item(cap_tree, hf_ieee80211_ff_cf_ess, tvb, offset, 2,
6149 ENC_LITTLE_ENDIAN);
6150 proto_tree_add_item(cap_tree, hf_ieee80211_ff_cf_ibss, tvb, offset, 2,
6151 ENC_LITTLE_ENDIAN);
6152 if ((tvb_get_letohs(tvb, offset) & 0x0001) != 0) {
6153 /* This is an AP */
6154 proto_tree_add_item(cap_tree, hf_ieee80211_ff_cf_ap_poll, tvb, offset, 2,
6155 ENC_LITTLE_ENDIAN);
6156 } else {
6157 /* This is a STA */
6158 proto_tree_add_item(cap_tree, hf_ieee80211_ff_cf_sta_poll, tvb, offset, 2,
6159 ENC_LITTLE_ENDIAN);
6162 proto_tree_add_item(cap_tree, hf_ieee80211_ff_cf_privacy, tvb, offset, 2,
6163 ENC_LITTLE_ENDIAN);
6164 proto_tree_add_item(cap_tree, hf_ieee80211_ff_cf_preamble, tvb, offset, 2,
6165 ENC_LITTLE_ENDIAN);
6166 proto_tree_add_item(cap_tree, hf_ieee80211_ff_cf_pbcc, tvb, offset, 2,
6167 ENC_LITTLE_ENDIAN);
6168 proto_tree_add_item(cap_tree, hf_ieee80211_ff_cf_agility, tvb, offset, 2,
6169 ENC_LITTLE_ENDIAN);
6170 proto_tree_add_item(cap_tree, hf_ieee80211_ff_cf_spec_man, tvb, offset, 2,
6171 ENC_LITTLE_ENDIAN);
6172 proto_tree_add_item(cap_tree, hf_ieee80211_ff_short_slot_time, tvb, offset,
6173 2, ENC_LITTLE_ENDIAN);
6174 proto_tree_add_item(cap_tree, hf_ieee80211_ff_cf_apsd, tvb, offset, 2,
6175 ENC_LITTLE_ENDIAN);
6176 proto_tree_add_item(cap_tree, hf_ieee80211_ff_radio_measurement, tvb, offset, 2,
6177 ENC_LITTLE_ENDIAN);
6178 proto_tree_add_item(cap_tree, hf_ieee80211_ff_dsss_ofdm, tvb, offset, 2,
6179 ENC_LITTLE_ENDIAN);
6180 proto_tree_add_item(cap_tree, hf_ieee80211_ff_cf_del_blk_ack, tvb, offset, 2,
6181 ENC_LITTLE_ENDIAN);
6182 proto_tree_add_item(cap_tree, hf_ieee80211_ff_cf_imm_blk_ack, tvb, offset, 2,
6183 ENC_LITTLE_ENDIAN);
6184 return 2;
6187 static guint
6188 add_ff_auth_alg(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
6190 proto_tree_add_item(tree, hf_ieee80211_ff_auth_alg, tvb, offset, 2,
6191 ENC_LITTLE_ENDIAN);
6192 return 2;
6195 static guint
6196 add_ff_auth_trans_seq(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
6198 proto_tree_add_item(tree, hf_ieee80211_ff_auth_seq, tvb, offset, 2,
6199 ENC_LITTLE_ENDIAN);
6200 return 2;
6203 static guint
6204 add_ff_current_ap_addr(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
6206 proto_tree_add_item(tree, hf_ieee80211_ff_current_ap, tvb, offset, 6,
6207 ENC_NA);
6208 return 6;
6211 static guint
6212 add_ff_listen_ival(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
6214 proto_tree_add_item(tree, hf_ieee80211_ff_listen_ival, tvb, offset, 2,
6215 ENC_LITTLE_ENDIAN);
6216 return 2;
6219 static guint
6220 add_ff_reason_code(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
6222 proto_tree_add_item(tree, hf_ieee80211_ff_reason, tvb, offset, 2,
6223 ENC_LITTLE_ENDIAN);
6224 return 2;
6227 static guint
6228 add_ff_assoc_id(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
6230 proto_tree_add_item(tree, hf_ieee80211_ff_assoc_id, tvb, offset, 2,
6231 ENC_LITTLE_ENDIAN);
6232 return 2;
6235 static guint
6236 add_ff_status_code(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
6238 proto_tree_add_item(tree, hf_ieee80211_ff_status_code, tvb, offset, 2,
6239 ENC_LITTLE_ENDIAN);
6240 return 2;
6243 static guint
6244 add_ff_category_code(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
6246 proto_tree_add_item(tree, hf_ieee80211_ff_category_code, tvb, offset, 1,
6247 ENC_LITTLE_ENDIAN);
6248 return 1;
6251 static guint
6252 add_ff_action_code(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
6254 proto_tree_add_item(tree, hf_ieee80211_ff_action_code, tvb, offset, 1,
6255 ENC_LITTLE_ENDIAN);
6256 return 1;
6259 static guint
6260 add_ff_dialog_token(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
6262 proto_tree_add_item(tree, hf_ieee80211_ff_dialog_token, tvb, offset, 1,
6263 ENC_LITTLE_ENDIAN);
6264 return 1;
6267 static guint
6268 add_ff_wme_action_code(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
6270 proto_tree_add_item(tree, hf_ieee80211_ff_wme_action_code, tvb, offset, 1,
6271 ENC_LITTLE_ENDIAN);
6272 return 1;
6275 static guint
6276 add_ff_wme_status_code(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
6278 proto_tree_add_item(tree, hf_ieee80211_ff_wme_status_code, tvb, offset, 1,
6279 ENC_LITTLE_ENDIAN);
6280 return 1;
6283 static guint
6284 add_ff_qos_action_code(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
6286 proto_tree_add_item(tree, hf_ieee80211_ff_qos_action_code, tvb, offset, 1,
6287 ENC_LITTLE_ENDIAN);
6288 return 1;
6291 static guint
6292 add_ff_block_ack_action_code(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
6294 proto_tree_add_item(tree, hf_ieee80211_ff_ba_action, tvb, offset, 1,
6295 ENC_LITTLE_ENDIAN);
6296 return 1;
6299 static guint
6300 add_ff_block_ack_param(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
6302 proto_tree_add_bitmask(tree, tvb, offset, hf_ieee80211_ff_block_ack_params,
6303 ett_ff_ba_param_tree,
6304 ieee80211_ff_block_ack_params_fields,
6305 ENC_LITTLE_ENDIAN);
6306 return 2;
6309 static guint
6310 add_ff_block_ack_timeout(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
6312 proto_tree_add_item(tree, hf_ieee80211_ff_block_ack_timeout, tvb, offset, 2,
6313 ENC_LITTLE_ENDIAN);
6314 return 2;
6317 static guint
6318 add_ff_block_ack_ssc(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
6320 proto_tree_add_bitmask(tree, tvb, offset, hf_ieee80211_ff_block_ack_ssc,
6321 ett_ff_ba_ssc_tree, ieee80211_ff_block_ack_ssc_fields,
6322 ENC_LITTLE_ENDIAN);
6323 return 2;
6326 static guint
6327 add_ff_qos_ts_info(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
6329 proto_tree_add_bitmask(tree, tvb, offset, hf_ieee80211_tsinfo,
6330 ett_tsinfo_tree, ieee80211_tsinfo_fields,
6331 ENC_LITTLE_ENDIAN);
6332 return 3;
6335 static guint
6336 add_ff_mesh_action(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
6338 proto_tree_add_item(tree, hf_ieee80211_ff_mesh_action, tvb, offset, 1,
6339 ENC_LITTLE_ENDIAN);
6340 return 1;
6343 static guint
6344 add_ff_multihop_action(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
6346 proto_tree_add_item(tree, hf_ieee80211_ff_multihop_action, tvb, offset, 1,
6347 ENC_LITTLE_ENDIAN);
6348 return 1;
6351 static guint
6352 add_ff_mesh_control(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
6354 int start = offset;
6355 guint8 flags;
6357 proto_tree_add_item(tree, hf_ieee80211_ff_mesh_flags, tvb, offset, 1,
6358 ENC_LITTLE_ENDIAN);
6359 flags = tvb_get_guint8(tvb, offset);
6360 offset += 1;
6361 proto_tree_add_item(tree, hf_ieee80211_ff_mesh_ttl, tvb, offset, 1,
6362 ENC_LITTLE_ENDIAN);
6363 offset += 1;
6364 proto_tree_add_item(tree, hf_ieee80211_ff_mesh_sequence, tvb, offset, 4,
6365 ENC_LITTLE_ENDIAN);
6366 offset += 4;
6368 switch (flags & 0x03) {
6369 case 1:
6370 proto_tree_add_item(tree, hf_ieee80211_ff_mesh_addr4, tvb, offset, 6,
6371 ENC_NA);
6372 offset += 6;
6373 break;
6374 case 2:
6375 proto_tree_add_item(tree, hf_ieee80211_ff_mesh_addr5, tvb, offset, 6,
6376 ENC_NA);
6377 offset += 6;
6378 proto_tree_add_item(tree, hf_ieee80211_ff_mesh_addr6, tvb, offset, 6,
6379 ENC_NA);
6380 offset += 6;
6381 break;
6382 case 3:
6383 proto_item_append_text(tree, "Unknown Address Extension Mode");
6384 break;
6385 default:
6386 /* no default action */
6387 break;
6390 return offset - start;
6393 static guint
6394 add_ff_selfprot_action(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
6396 proto_tree_add_item(tree, hf_ieee80211_ff_selfprot_action, tvb, offset, 1,
6397 ENC_LITTLE_ENDIAN);
6398 return 1;
6401 static guint
6402 add_ff_dls_action_code(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
6404 proto_tree_add_item(tree, hf_ieee80211_ff_dls_action_code, tvb, offset, 1,
6405 ENC_LITTLE_ENDIAN);
6406 return 1;
6409 static guint
6410 add_ff_dst_mac_addr(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
6412 proto_tree_add_item(tree, hf_ieee80211_ff_dst_mac_addr, tvb, offset, 6,
6413 ENC_NA);
6414 return 6;
6417 static guint
6418 add_ff_src_mac_addr(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
6420 proto_tree_add_item(tree, hf_ieee80211_ff_src_mac_addr, tvb, offset, 6,
6421 ENC_NA);
6422 return 6;
6425 static guint
6426 add_ff_dls_timeout(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
6428 proto_tree_add_item(tree, hf_ieee80211_ff_dls_timeout, tvb, offset, 2,
6429 ENC_LITTLE_ENDIAN);
6430 return 2;
6433 static guint
6434 add_ff_delba_param_set(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
6436 proto_tree_add_bitmask(tree, tvb, offset, hf_ieee80211_ff_delba_param,
6437 ett_ff_ba_param_tree, ieee80211_ff_delba_param_fields,
6438 ENC_LITTLE_ENDIAN);
6439 return 2;
6442 static guint
6443 add_ff_max_reg_pwr(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
6445 proto_tree_add_item(tree, hf_ieee80211_ff_max_reg_pwr, tvb, offset, 2,
6446 ENC_LITTLE_ENDIAN);
6447 return 2;
6450 static guint
6451 add_ff_measurement_pilot_int(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
6453 proto_tree_add_item(tree, hf_ieee80211_ff_measurement_pilot_int, tvb, offset,
6454 2, ENC_LITTLE_ENDIAN);
6455 return 2;
6458 static guint
6459 add_ff_country_str(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
6461 proto_tree_add_item(tree, hf_ieee80211_ff_country_str, tvb, offset, 3,
6462 ENC_ASCII|ENC_NA);
6463 return 3;
6466 static guint
6467 add_ff_max_tx_pwr(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
6469 proto_tree_add_item(tree, hf_ieee80211_ff_max_tx_pwr, tvb, offset, 1,
6470 ENC_LITTLE_ENDIAN);
6471 return 1;
6474 static guint
6475 add_ff_tx_pwr_used(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
6477 proto_tree_add_item(tree, hf_ieee80211_ff_tx_pwr_used, tvb, offset, 1,
6478 ENC_LITTLE_ENDIAN);
6479 return 1;
6482 static guint
6483 add_ff_transceiver_noise_floor(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
6485 proto_tree_add_item(tree, hf_ieee80211_ff_transceiver_noise_floor, tvb,
6486 offset, 1, ENC_LITTLE_ENDIAN);
6487 return 1;
6490 static guint
6491 add_ff_channel_width(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
6493 proto_tree_add_item(tree, hf_ieee80211_ff_channel_width, tvb, offset, 1,
6494 ENC_LITTLE_ENDIAN);
6495 return 1;
6498 static guint
6499 add_ff_qos_info_ap(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
6501 proto_tree_add_bitmask(tree, tvb, offset, hf_ieee80211_ff_qos_info_ap,
6502 ett_ff_qos_info, ieee80211_ff_qos_info_ap_fields,
6503 ENC_LITTLE_ENDIAN);
6504 return 1;
6507 static guint
6508 add_ff_qos_info_sta(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
6510 proto_tree_add_bitmask(tree, tvb, offset, hf_ieee80211_ff_qos_info_sta,
6511 ett_ff_qos_info, ieee80211_ff_qos_info_sta_fields,
6512 ENC_LITTLE_ENDIAN);
6513 return 1;
6516 static guint
6517 add_ff_sm_pwr_cntrl(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
6519 proto_tree_add_bitmask(tree, tvb, offset, hf_ieee80211_ff_sm_pwr_save,
6520 ett_ff_sm_pwr_save, ieee80211_ff_sw_pwr_save_fields,
6521 ENC_LITTLE_ENDIAN);
6522 return 1;
6525 static guint
6526 add_ff_pco_phase_cntrl(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
6528 proto_tree_add_item(tree, hf_ieee80211_ff_pco_phase_cntrl, tvb, offset, 1,
6529 ENC_LITTLE_ENDIAN);
6530 return 1;
6533 static guint
6534 add_ff_psmp_param_set(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
6536 proto_tree_add_bitmask(tree, tvb, offset, hf_ieee80211_ff_psmp_param_set,
6537 ett_ff_psmp_param_set,
6538 ieee80211_ff_psmp_param_set_fields,
6539 ENC_LITTLE_ENDIAN);
6540 return 2;
6543 static guint
6544 add_ff_mimo_cntrl(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
6546 proto_item *mimo_item;
6547 proto_tree *mimo_tree;
6549 mimo_item = proto_tree_add_item(tree, hf_ieee80211_ff_mimo_cntrl, tvb,
6550 offset, 6, ENC_NA);
6551 mimo_tree = proto_item_add_subtree(mimo_item, ett_ff_mimo_cntrl);
6553 proto_tree_add_item(mimo_tree, hf_ieee80211_ff_mimo_cntrl_nc_index, tvb,
6554 offset, 1, ENC_LITTLE_ENDIAN);
6555 proto_tree_add_item(mimo_tree, hf_ieee80211_ff_mimo_cntrl_nr_index, tvb,
6556 offset, 1, ENC_LITTLE_ENDIAN);
6557 proto_tree_add_item(mimo_tree, hf_ieee80211_ff_mimo_cntrl_channel_width, tvb,
6558 offset, 1, ENC_LITTLE_ENDIAN);
6559 proto_tree_add_item(mimo_tree, hf_ieee80211_ff_mimo_cntrl_grouping, tvb,
6560 offset, 1, ENC_LITTLE_ENDIAN);
6561 proto_tree_add_item(mimo_tree, hf_ieee80211_ff_mimo_cntrl_coefficient_size,
6562 tvb, offset, 2, ENC_LITTLE_ENDIAN);
6563 proto_tree_add_item(mimo_tree, hf_ieee80211_ff_mimo_cntrl_codebook_info, tvb,
6564 offset, 1, ENC_LITTLE_ENDIAN);
6565 proto_tree_add_item(mimo_tree,
6566 hf_ieee80211_ff_mimo_cntrl_remaining_matrix_segment, tvb,
6567 offset, 1, ENC_LITTLE_ENDIAN);
6568 proto_tree_add_item(mimo_tree, hf_ieee80211_ff_mimo_cntrl_reserved, tvb,
6569 offset, 1, ENC_LITTLE_ENDIAN);
6571 offset += 2;
6572 proto_tree_add_item(mimo_tree, hf_ieee80211_ff_mimo_cntrl_sounding_timestamp,
6573 tvb, offset, 4, ENC_LITTLE_ENDIAN);
6575 return 6;
6578 static guint
6579 add_ff_ant_selection(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
6581 proto_tree_add_bitmask(tree, tvb, offset, hf_ieee80211_ff_ant_selection,
6582 ett_ff_ant_sel, ieee80211_ff_ant_selection_fields,
6583 ENC_LITTLE_ENDIAN);
6584 return 1;
6587 static guint
6588 add_ff_extended_channel_switch_announcement(proto_tree *tree, tvbuff_t *tvb,
6589 packet_info *pinfo _U_, int offset)
6591 proto_tree_add_bitmask(tree, tvb, offset,
6592 hf_ieee80211_ff_ext_channel_switch_announcement,
6593 ett_ff_chan_switch_announce,
6594 ieee80211_ff_ext_channel_switch_announcement_fields,
6595 ENC_LITTLE_ENDIAN);
6596 return 4;
6599 static guint
6600 add_ff_ht_information(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
6602 proto_tree_add_bitmask(tree, tvb, offset, hf_ieee80211_ff_ht_info,
6603 ett_ff_ht_info, ieee80211_ff_ht_info_fields,
6604 ENC_LITTLE_ENDIAN);
6605 return 1;
6608 static guint
6609 add_ff_ht_action_code(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
6611 proto_tree_add_item(tree, hf_ieee80211_ff_ht_action, tvb, offset, 1,
6612 ENC_LITTLE_ENDIAN);
6613 return 1;
6616 static guint
6617 add_ff_psmp_sta_info(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
6619 proto_item *psmp_item;
6620 proto_tree *psmp_tree;
6622 psmp_item = proto_tree_add_item(tree, hf_ieee80211_ff_psmp_sta_info, tvb,
6623 offset, 8, ENC_LITTLE_ENDIAN);
6624 psmp_tree = proto_item_add_subtree(psmp_item, ett_ff_psmp_sta_info);
6626 proto_tree_add_item(psmp_item, hf_ieee80211_ff_psmp_sta_info_type, tvb,
6627 offset, 4, ENC_LITTLE_ENDIAN);
6629 switch (tvb_get_letohl(tvb, offset) & PSMP_STA_INFO_FLAG_TYPE) {
6630 case PSMP_STA_INFO_BROADCAST:
6631 proto_tree_add_item(psmp_tree,
6632 hf_ieee80211_ff_psmp_sta_info_dtt_start_offset, tvb,
6633 offset, 4, ENC_LITTLE_ENDIAN);
6634 proto_tree_add_item(psmp_tree, hf_ieee80211_ff_psmp_sta_info_dtt_duration,
6635 tvb, offset, 4, ENC_LITTLE_ENDIAN);
6636 /* Missing 64 bit bitmask... */
6637 proto_tree_add_uint64(psmp_tree,
6638 hf_ieee80211_ff_psmp_sta_info_reserved_large,
6639 tvb, offset, 8,
6640 (tvb_get_letoh64(tvb, offset) &
6641 G_GINT64_CONSTANT(0xFFFFFFFFFFE00000)) >> 21);
6642 break;
6643 case PSMP_STA_INFO_MULTICAST:
6644 proto_tree_add_item(psmp_tree,
6645 hf_ieee80211_ff_psmp_sta_info_dtt_start_offset, tvb,
6646 offset, 4, ENC_LITTLE_ENDIAN);
6647 proto_tree_add_item(psmp_tree, hf_ieee80211_ff_psmp_sta_info_dtt_duration,
6648 tvb, offset, 4, ENC_LITTLE_ENDIAN);
6649 /* Missing 64 bit bitmask... */
6650 proto_tree_add_uint64(psmp_tree,
6651 hf_ieee80211_ff_psmp_sta_info_psmp_multicast_id,
6652 tvb, offset, 6,
6653 (tvb_get_letoh64(tvb, offset) &
6654 G_GINT64_CONSTANT(0xFFFFFFFFFFE00000)) >> 21);
6655 break;
6656 case PSMP_STA_INFO_INDIVIDUALLY_ADDRESSED:
6657 proto_tree_add_item(psmp_tree,
6658 hf_ieee80211_ff_psmp_sta_info_dtt_start_offset, tvb,
6659 offset, 4, ENC_LITTLE_ENDIAN);
6660 proto_tree_add_item(psmp_tree, hf_ieee80211_ff_psmp_sta_info_dtt_duration,
6661 tvb, offset, 4, ENC_LITTLE_ENDIAN);
6662 offset += 2;
6663 proto_tree_add_item(psmp_tree, hf_ieee80211_ff_psmp_sta_info_sta_id, tvb,
6664 offset, 4, ENC_LITTLE_ENDIAN);
6665 offset += 2;
6667 proto_tree_add_item(psmp_tree,
6668 hf_ieee80211_ff_psmp_sta_info_utt_start_offset,
6669 tvb, offset, 4, ENC_LITTLE_ENDIAN);
6670 proto_tree_add_item(psmp_tree, hf_ieee80211_ff_psmp_sta_info_utt_duration,
6671 tvb, offset, 4, ENC_LITTLE_ENDIAN);
6672 proto_tree_add_item(psmp_tree,
6673 hf_ieee80211_ff_psmp_sta_info_reserved_small, tvb,
6674 offset, 4, ENC_LITTLE_ENDIAN);
6675 break;
6678 return 8;
6681 static guint
6682 add_ff_schedule_info(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
6684 proto_item *sched_item;
6685 proto_tree *sched_tree;
6687 sched_item = proto_tree_add_item(tree, hf_ieee80211_sched_info, tvb, offset,
6688 2, ENC_LITTLE_ENDIAN);
6689 sched_tree = proto_item_add_subtree(sched_item, ett_sched_tree);
6691 proto_tree_add_item(sched_tree, hf_ieee80211_sched_info_agg, tvb, offset, 2,
6692 ENC_LITTLE_ENDIAN);
6693 if (tvb_get_letohs(tvb, offset) & 0x0001) {
6694 proto_tree_add_item(sched_tree, hf_ieee80211_sched_info_tsid, tvb, offset,
6695 2, ENC_LITTLE_ENDIAN);
6696 proto_tree_add_item(sched_tree, hf_ieee80211_sched_info_dir, tvb, offset,
6697 2, ENC_LITTLE_ENDIAN);
6700 return 2;
6703 static guint
6704 add_ff_pa_action_code(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
6706 proto_tree_add_item(tree, hf_ieee80211_ff_public_action, tvb, offset, 1,
6707 ENC_BIG_ENDIAN);
6708 return 1;
6711 static guint
6712 add_ff_action_spectrum_mgmt(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset)
6714 switch (tvb_get_guint8(tvb, offset + 1)) {
6715 case SM_ACTION_MEASUREMENT_REQUEST:
6716 case SM_ACTION_MEASUREMENT_REPORT:
6717 case SM_ACTION_TPC_REQUEST:
6718 case SM_ACTION_TPC_REPORT:
6719 add_fixed_field(tree, tvb, pinfo, offset, FIELD_CATEGORY_CODE);
6720 add_fixed_field(tree, tvb, pinfo, offset + 1, FIELD_ACTION_CODE);
6721 add_fixed_field(tree, tvb, pinfo, offset + 2, FIELD_DIALOG_TOKEN);
6722 return 3;
6723 case SM_ACTION_CHAN_SWITCH_ANNC:
6724 case SM_ACTION_EXT_CHAN_SWITCH_ANNC:
6725 add_fixed_field(tree, tvb, pinfo, offset, FIELD_CATEGORY_CODE);
6726 add_fixed_field(tree, tvb, pinfo, offset + 1, FIELD_ACTION_CODE);
6727 return 2;
6728 default:
6729 add_fixed_field(tree, tvb, pinfo, offset, FIELD_CATEGORY_CODE);
6730 add_fixed_field(tree, tvb, pinfo, offset + 1, FIELD_ACTION_CODE);
6731 return 2;
6735 static guint
6736 add_ff_action_qos(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset)
6738 switch (tvb_get_guint8(tvb, offset + 1)) {
6739 case SM_ACTION_ADDTS_REQUEST:
6740 add_fixed_field(tree, tvb, pinfo, offset, FIELD_CATEGORY_CODE);
6741 add_fixed_field(tree, tvb, pinfo, offset + 1, FIELD_QOS_ACTION_CODE);
6742 add_fixed_field(tree, tvb, pinfo, offset + 2, FIELD_DIALOG_TOKEN);
6743 return 3;
6744 case SM_ACTION_ADDTS_RESPONSE:
6745 add_fixed_field(tree, tvb, pinfo, offset, FIELD_CATEGORY_CODE);
6746 add_fixed_field(tree, tvb, pinfo, offset + 1, FIELD_QOS_ACTION_CODE);
6747 add_fixed_field(tree, tvb, pinfo, offset + 2, FIELD_DIALOG_TOKEN);
6748 add_fixed_field(tree, tvb, pinfo, offset + 3, FIELD_STATUS_CODE);
6749 return 5;
6750 case SM_ACTION_DELTS:
6751 add_fixed_field(tree, tvb, pinfo, offset, FIELD_CATEGORY_CODE);
6752 add_fixed_field(tree, tvb, pinfo, offset + 1, FIELD_QOS_ACTION_CODE);
6753 add_fixed_field(tree, tvb, pinfo, offset + 2, FIELD_QOS_TS_INFO);
6754 add_fixed_field(tree, tvb, pinfo, offset + 5, FIELD_REASON_CODE);
6755 return 7;
6756 case SM_ACTION_QOS_SCHEDULE:
6757 add_fixed_field(tree, tvb, pinfo, offset, FIELD_CATEGORY_CODE);
6758 add_fixed_field(tree, tvb, pinfo, offset + 1, FIELD_QOS_ACTION_CODE);
6759 return 2;
6760 case SM_ACTION_QOS_MAP_CONFIGURE:
6761 add_fixed_field(tree, tvb, pinfo, offset, FIELD_CATEGORY_CODE);
6762 add_fixed_field(tree, tvb, pinfo, offset + 1, FIELD_QOS_ACTION_CODE);
6763 return 2;
6764 default:
6765 add_fixed_field(tree, tvb, pinfo, offset, FIELD_CATEGORY_CODE);
6766 return 2;
6770 static guint
6771 add_ff_action_dls(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset)
6773 switch (tvb_get_guint8(tvb, offset + 1)) {
6774 case SM_ACTION_DLS_REQUEST:
6775 add_fixed_field(tree, tvb, pinfo, offset, FIELD_CATEGORY_CODE);
6776 add_fixed_field(tree, tvb, pinfo, offset + 1, FIELD_DLS_ACTION_CODE);
6777 add_fixed_field(tree, tvb, pinfo, offset + 2, FIELD_DST_MAC_ADDR);
6778 add_fixed_field(tree, tvb, pinfo, offset + 8, FIELD_SRC_MAC_ADDR);
6779 add_fixed_field(tree, tvb, pinfo, offset + 14, FIELD_CAP_INFO);
6780 add_fixed_field(tree, tvb, pinfo, offset + 16, FIELD_DLS_TIMEOUT);
6781 return 18;
6782 case SM_ACTION_DLS_RESPONSE:
6783 add_fixed_field(tree, tvb, pinfo, offset, FIELD_CATEGORY_CODE);
6784 add_fixed_field(tree, tvb, pinfo, offset + 1, FIELD_DLS_ACTION_CODE);
6785 add_fixed_field(tree, tvb, pinfo, offset + 2, FIELD_STATUS_CODE);
6786 add_fixed_field(tree, tvb, pinfo, offset + 4, FIELD_DST_MAC_ADDR);
6787 add_fixed_field(tree, tvb, pinfo, offset + 10, FIELD_SRC_MAC_ADDR);
6788 if (!hf_ieee80211_ff_status_code) {
6789 add_fixed_field(tree, tvb, pinfo, offset + 16, FIELD_CAP_INFO);
6791 return 16;
6792 case SM_ACTION_DLS_TEARDOWN:
6793 add_fixed_field(tree, tvb, pinfo, offset, FIELD_CATEGORY_CODE);
6794 add_fixed_field(tree, tvb, pinfo, offset + 1, FIELD_DLS_ACTION_CODE);
6795 add_fixed_field(tree, tvb, pinfo, offset + 2, FIELD_DST_MAC_ADDR);
6796 add_fixed_field(tree, tvb, pinfo, offset + 8, FIELD_SRC_MAC_ADDR);
6797 add_fixed_field(tree, tvb, pinfo, offset + 14, FIELD_REASON_CODE);
6798 return 16;
6799 default:
6800 add_fixed_field(tree, tvb, pinfo, offset, FIELD_CATEGORY_CODE);
6801 return 2;
6805 static guint
6806 add_ff_action_block_ack(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset)
6808 guint start = offset;
6810 switch (tvb_get_guint8(tvb, offset + 1)) {
6811 case BA_ADD_BLOCK_ACK_REQUEST:
6812 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_CATEGORY_CODE);
6813 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_BLOCK_ACK_ACTION_CODE);
6814 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_DIALOG_TOKEN);
6815 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_BLOCK_ACK_PARAM);
6816 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_BLOCK_ACK_TIMEOUT);
6817 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_BLOCK_ACK_SSC);
6818 break;
6819 case BA_ADD_BLOCK_ACK_RESPONSE:
6820 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_CATEGORY_CODE);
6821 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_BLOCK_ACK_ACTION_CODE);
6822 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_DIALOG_TOKEN);
6823 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_STATUS_CODE);
6824 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_BLOCK_ACK_PARAM);
6825 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_BLOCK_ACK_TIMEOUT);
6826 break;
6827 case BA_DELETE_BLOCK_ACK:
6828 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_CATEGORY_CODE);
6829 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_BLOCK_ACK_ACTION_CODE);
6830 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_DELBA_PARAM_SET);
6831 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_REASON_CODE);
6832 break;
6835 return offset - start; /* Size of fixed fields */
6838 static guint
6839 add_ff_action_public(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset)
6841 guint start = offset;
6842 guint32 oui;
6843 guint8 code;
6844 guint8 subtype;
6845 gboolean anqp;
6846 guint8 dialog_token;
6847 guint8 frag;
6848 gboolean more;
6850 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_CATEGORY_CODE);
6851 code = tvb_get_guint8(tvb, offset);
6852 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_PA_ACTION_CODE);
6854 switch (code) {
6855 case PA_EXT_CHANNEL_SWITCH_ANNOUNCEMENT:
6856 offset += add_ff_extended_channel_switch_announcement(tree, tvb, pinfo, offset);
6857 break;
6858 case PA_VENDOR_SPECIFIC:
6859 oui = tvb_get_ntoh24(tvb, offset);
6860 proto_tree_add_item(tree, hf_ieee80211_tag_oui, tvb, offset, 3, ENC_NA);
6861 offset += 3;
6862 switch (oui) {
6863 case OUI_WFA:
6864 subtype = tvb_get_guint8(tvb, offset);
6865 proto_tree_add_text(tree, tvb, offset, 1, "Subtype %u", subtype);
6866 offset += 1;
6867 if (subtype == WFA_SUBTYPE_P2P) {
6868 offset = dissect_wifi_p2p_public_action(pinfo, tree, tvb, offset);
6870 break;
6871 default:
6872 /* Don't know how to handle this vendor */
6873 break;
6875 break;
6876 case PA_GAS_INITIAL_REQUEST:
6877 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_DIALOG_TOKEN);
6878 offset += dissect_advertisement_protocol(pinfo, tree, tvb, offset,
6879 &anqp);
6880 offset += dissect_gas_initial_request(tree, tvb, pinfo, offset, anqp);
6881 break;
6882 case PA_GAS_INITIAL_RESPONSE:
6883 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_DIALOG_TOKEN);
6884 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_STATUS_CODE);
6885 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_GAS_COMEBACK_DELAY);
6886 offset += dissect_advertisement_protocol(pinfo, tree, tvb, offset,
6887 &anqp);
6888 offset += dissect_gas_initial_response(tree, tvb, pinfo, offset, anqp);
6889 break;
6890 case PA_GAS_COMEBACK_REQUEST:
6891 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_DIALOG_TOKEN);
6892 break;
6893 case PA_GAS_COMEBACK_RESPONSE:
6894 dialog_token = tvb_get_guint8(tvb, offset);
6895 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_DIALOG_TOKEN);
6896 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_STATUS_CODE);
6897 frag = tvb_get_guint8(tvb, offset) & 0x7f;
6898 more = (tvb_get_guint8(tvb, offset) & 0x80) != 0;
6899 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_GAS_FRAGMENT_ID);
6900 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_GAS_COMEBACK_DELAY);
6901 offset += dissect_advertisement_protocol(pinfo, tree, tvb, offset,
6902 &anqp);
6903 offset += dissect_gas_comeback_response(tree, tvb, pinfo, offset, anqp, frag,
6904 more, dialog_token);
6905 break;
6906 case PA_TDLS_DISCOVERY_RESPONSE:
6907 col_set_str(pinfo->cinfo, COL_PROTOCOL, "TDLS");
6908 col_set_str(pinfo->cinfo, COL_INFO, "TDLS Discovery Response");
6909 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_DIALOG_TOKEN);
6910 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_CAP_INFO);
6911 break;
6914 return offset - start; /* Size of fixed fields */
6917 static guint
6918 add_ff_action_radio_measurement(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset)
6920 guint start = offset;
6921 guint8 code;
6923 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_CATEGORY_CODE);
6924 code = tvb_get_guint8(tvb, offset);
6925 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_RM_ACTION_CODE);
6927 switch (code) {
6928 case RM_ACTION_RADIO_MEASUREMENT_REQUEST:
6929 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_RM_DIALOG_TOKEN);
6930 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_RM_REPETITIONS);
6931 /* Followed by Measurement Request Elements */
6932 break;
6933 case RM_ACTION_RADIO_MEASUREMENT_REPORT:
6934 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_RM_DIALOG_TOKEN);
6935 /* Followed by Measurement Report Elements */
6936 break;
6937 case RM_ACTION_LINK_MEASUREMENT_REQUEST:
6938 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_RM_DIALOG_TOKEN);
6939 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_RM_TX_POWER);
6940 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_RM_MAX_TX_POWER);
6941 /* Followed by Optional Subelements */
6942 break;
6943 case RM_ACTION_LINK_MEASUREMENT_REPORT:
6944 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_RM_DIALOG_TOKEN);
6945 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_RM_TPC_REPORT);
6946 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_RM_RX_ANTENNA_ID);
6947 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_RM_TX_ANTENNA_ID);
6948 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_RM_RCPI);
6949 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_RM_RSNI);
6950 /* Followed by Optional Subelements */
6951 break;
6952 case RM_ACTION_NEIGHBOR_REPORT_REQUEST:
6953 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_RM_DIALOG_TOKEN);
6954 /* Followed by Optional Subelements */
6955 break;
6956 case RM_ACTION_NEIGHBOR_REPORT_RESPONSE:
6957 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_RM_DIALOG_TOKEN);
6958 /* Followed by Neighbor Report Elements */
6959 break;
6962 return offset - start; /* Size of fixed fields */
6965 static guint
6966 add_ff_action_fast_bss_transition(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset)
6968 guint start = offset;
6969 guint8 code;
6971 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_CATEGORY_CODE);
6972 code = tvb_get_guint8(tvb, offset);
6973 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_FT_ACTION_CODE);
6975 switch (code) {
6976 case FT_ACTION_REQUEST:
6977 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_STA_ADDRESS);
6978 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_TARGET_AP_ADDRESS);
6979 /* Followed by FT Request frame body (IEs) */
6980 break;
6981 case FT_ACTION_RESPONSE:
6982 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_STA_ADDRESS);
6983 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_TARGET_AP_ADDRESS);
6984 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_STATUS_CODE);
6985 /* Followed by FT Response frame body (IEs) */
6986 break;
6987 case FT_ACTION_CONFIRM:
6988 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_STA_ADDRESS);
6989 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_TARGET_AP_ADDRESS);
6990 /* Followed by FT Confirm frame body (IEs) */
6991 break;
6992 case FT_ACTION_ACK:
6993 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_STA_ADDRESS);
6994 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_TARGET_AP_ADDRESS);
6995 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_STATUS_CODE);
6996 /* Followed by FT Ack frame body (IEs) */
6997 break;
7000 return offset - start; /* Size of fixed fields */
7003 static guint
7004 add_ff_action_sa_query(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset)
7006 guint start = offset;
7007 guint8 code;
7009 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_CATEGORY_CODE);
7010 code = tvb_get_guint8(tvb, offset);
7011 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_SA_QUERY_ACTION_CODE);
7013 switch (code) {
7014 case SA_QUERY_REQUEST:
7015 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_TRANSACTION_ID);
7016 break;
7017 case SA_QUERY_RESPONSE:
7018 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_TRANSACTION_ID);
7019 break;
7022 return offset - start; /* Size of fixed fields */
7025 static guint
7026 add_ff_action_mesh(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset)
7028 guint length;
7030 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_CATEGORY_CODE);
7031 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_MESH_ACTION);
7032 /* The only fixed fields are the category and mesh action. The rest are IEs.
7034 length = 2;
7035 if (tvb_get_guint8(tvb, 1) == MESH_ACTION_TBTT_ADJ_RESPONSE) {
7036 /* ..except for the TBTT Adjustment Response, which has a status code field
7038 length += add_fixed_field(tree, tvb, pinfo, offset, FIELD_STATUS_CODE);
7040 return length;
7043 static guint
7044 add_ff_action_multihop(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset)
7046 guint start = offset;
7048 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_CATEGORY_CODE);
7049 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_MULTIHOP_ACTION);
7050 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_MESH_CONTROL);
7051 return offset - start;
7054 static guint
7055 add_ff_action_self_protected(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset)
7057 guint start = offset;
7059 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_CATEGORY_CODE);
7060 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_SELFPROT_ACTION);
7062 switch (tvb_get_guint8(tvb, start + 1)) {
7063 case SELFPROT_ACTION_MESH_PEERING_OPEN:
7064 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_CAP_INFO);
7065 break;
7066 case SELFPROT_ACTION_MESH_PEERING_CONFIRM:
7067 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_CAP_INFO);
7068 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_ASSOC_ID);
7069 break;
7072 return offset - start;
7075 static guint
7076 wnm_bss_trans_mgmt_req(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset)
7078 int start = offset;
7079 guint8 mode;
7080 gint left;
7082 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_DIALOG_TOKEN);
7084 mode = tvb_get_guint8(tvb, offset);
7085 proto_tree_add_item(tree, hf_ieee80211_ff_request_mode_pref_cand,
7086 tvb, offset, 1, ENC_LITTLE_ENDIAN);
7087 proto_tree_add_item(tree, hf_ieee80211_ff_request_mode_abridged,
7088 tvb, offset, 1, ENC_LITTLE_ENDIAN);
7089 proto_tree_add_item(tree, hf_ieee80211_ff_request_mode_disassoc_imminent,
7090 tvb, offset, 1, ENC_LITTLE_ENDIAN);
7091 proto_tree_add_item(tree, hf_ieee80211_ff_request_mode_bss_term_included,
7092 tvb, offset, 1, ENC_LITTLE_ENDIAN);
7093 proto_tree_add_item(tree, hf_ieee80211_ff_request_mode_ess_disassoc_imminent,
7094 tvb, offset, 1, ENC_LITTLE_ENDIAN);
7095 offset += 1;
7097 proto_tree_add_item(tree, hf_ieee80211_ff_disassoc_timer, tvb, offset, 2,
7098 ENC_LITTLE_ENDIAN);
7099 offset += 2;
7101 proto_tree_add_item(tree, hf_ieee80211_ff_validity_interval, tvb, offset, 1,
7102 ENC_LITTLE_ENDIAN);
7103 offset += 1;
7105 if (mode & 0x08) {
7106 proto_tree_add_text(tree, tvb, offset, 8, "BSS Termination Duration");
7107 offset += 8;
7110 if (mode & 0x10) {
7111 guint8 url_len;
7112 url_len = tvb_get_guint8(tvb, offset);
7113 proto_tree_add_item(tree, hf_ieee80211_ff_url_len, tvb, offset, 1,
7114 ENC_LITTLE_ENDIAN);
7115 offset += 1;
7116 proto_tree_add_item(tree, hf_ieee80211_ff_url, tvb, offset, url_len,
7117 ENC_ASCII|ENC_NA);
7118 offset += url_len;
7121 left = tvb_reported_length_remaining(tvb, offset);
7122 if (left > 0) {
7123 proto_tree_add_text(tree, tvb, offset, left,
7124 "BSS Transition Candidate List Entries");
7125 offset += left;
7128 return offset - start;
7131 static guint
7132 wnm_sleep_mode_req(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset)
7134 int start = offset;
7135 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_DIALOG_TOKEN);
7136 return offset - start;
7139 static guint
7140 wnm_sleep_mode_resp(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset)
7142 int start = offset;
7143 guint16 key_data_len;
7144 gint left;
7146 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_DIALOG_TOKEN);
7147 key_data_len = tvb_get_letohs(tvb, offset);
7148 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_KEY_DATA_LENGTH);
7149 left = tvb_reported_length_remaining(tvb, offset);
7150 if (left < key_data_len) {
7151 expert_add_info(pinfo, tree, &ei_ieee80211_tag_wnm_sleep_mode_no_key_data);
7152 return offset - start;
7154 proto_tree_add_item(tree, hf_ieee80211_ff_key_data, tvb, offset,
7155 key_data_len, ENC_NA);
7156 offset += key_data_len;
7157 return offset - start;
7160 static guint
7161 wnm_tfs_req(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset)
7163 int start = offset;
7164 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_DIALOG_TOKEN);
7165 return offset - start;
7168 static guint
7169 wnm_tfs_resp(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset)
7171 int start = offset;
7172 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_DIALOG_TOKEN);
7173 return offset - start;
7176 static guint
7177 wnm_notification_req(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset)
7179 int start = offset;
7180 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_DIALOG_TOKEN);
7181 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_WNM_NOTIFICATION_TYPE);
7182 return offset - start;
7185 static guint
7186 add_ff_action_wnm(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset)
7188 guint8 code;
7189 guint start = offset;
7191 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_CATEGORY_CODE);
7192 code = tvb_get_guint8(tvb, offset);
7193 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_WNM_ACTION_CODE);
7194 switch (code) {
7195 case WNM_BSS_TRANS_MGMT_REQ:
7196 offset += wnm_bss_trans_mgmt_req(tree, tvb, pinfo, offset);
7197 break;
7198 case WNM_TFS_REQ:
7199 offset += wnm_tfs_req(tree, tvb, pinfo, offset);
7200 break;
7201 case WNM_TFS_RESP:
7202 offset += wnm_tfs_resp(tree, tvb, pinfo, offset);
7203 break;
7204 case WNM_SLEEP_MODE_REQ:
7205 offset += wnm_sleep_mode_req(tree, tvb, pinfo, offset);
7206 break;
7207 case WNM_SLEEP_MODE_RESP:
7208 offset += wnm_sleep_mode_resp(tree, tvb, pinfo, offset);
7209 break;
7210 case WNM_NOTIFICATION_REQ:
7211 offset += wnm_notification_req(tree, tvb, pinfo, offset);
7212 break;
7215 return offset - start; /* Size of fixed fields */
7218 static guint
7219 add_ff_action_tdls(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset)
7221 guint8 code;
7222 guint16 status;
7223 guint start = offset;
7225 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_CATEGORY_CODE);
7226 code = tvb_get_guint8(tvb, offset);
7227 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_TDLS_ACTION_CODE);
7228 switch (code) {
7229 case TDLS_SETUP_REQUEST:
7230 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_DIALOG_TOKEN);
7231 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_CAP_INFO);
7232 break;
7233 case TDLS_SETUP_RESPONSE:
7234 status = tvb_get_letohs(tvb, offset);
7235 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_STATUS_CODE);
7236 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_DIALOG_TOKEN);
7237 if (tvb_reported_length_remaining(tvb, offset) < 2) {
7238 if (status == 0) {
7239 expert_add_info(pinfo, tree, &ei_ieee80211_tdls_setup_response_malformed);
7241 break;
7243 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_CAP_INFO);
7244 break;
7245 case TDLS_SETUP_CONFIRM:
7246 status = tvb_get_letohs(tvb, offset);
7247 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_STATUS_CODE);
7248 if (tvb_reported_length_remaining(tvb, offset) < 1) {
7249 if (status == 0) {
7250 expert_add_info(pinfo, tree, &ei_ieee80211_tdls_setup_confirm_malformed);
7252 break;
7254 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_DIALOG_TOKEN);
7255 break;
7256 case TDLS_TEARDOWN:
7257 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_REASON_CODE);
7258 break;
7259 case TDLS_PEER_TRAFFIC_INDICATION:
7260 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_DIALOG_TOKEN);
7261 break;
7262 case TDLS_CHANNEL_SWITCH_REQUEST:
7263 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_TARGET_CHANNEL);
7264 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_REGULATORY_CLASS);
7265 break;
7266 case TDLS_CHANNEL_SWITCH_RESPONSE:
7267 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_STATUS_CODE);
7268 break;
7269 case TDLS_PEER_PSM_REQUEST:
7270 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_DIALOG_TOKEN);
7271 break;
7272 case TDLS_PEER_PSM_RESPONSE:
7273 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_DIALOG_TOKEN);
7274 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_STATUS_CODE);
7275 break;
7276 case TDLS_PEER_TRAFFIC_RESPONSE:
7277 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_DIALOG_TOKEN);
7278 break;
7279 case TDLS_DISCOVERY_REQUEST:
7280 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_DIALOG_TOKEN);
7281 break;
7284 return offset - start; /* Size of fixed fields */
7287 static guint
7288 add_ff_action_mgmt_notification(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset)
7290 guint start = offset;
7292 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_CATEGORY_CODE);
7293 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_WME_ACTION_CODE);
7294 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_DIALOG_TOKEN);
7295 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_WME_STATUS_CODE);
7297 return offset - start; /* Size of fixed fields */
7300 static guint
7301 add_ff_action_vendor_specific(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset)
7303 guint start = offset;
7304 guint32 oui;
7305 guint8 subtype;
7307 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_CATEGORY_CODE);
7308 oui = tvb_get_ntoh24(tvb, offset);
7309 proto_tree_add_item(tree, hf_ieee80211_tag_oui, tvb, offset, 3, ENC_NA);
7310 offset += 3;
7311 switch (oui) {
7312 case OUI_MARVELL:
7313 offset = dissect_vendor_action_marvell(tree, tvb, offset);
7314 break;
7315 case OUI_WFA:
7316 subtype = tvb_get_guint8(tvb, offset);
7317 proto_tree_add_text(tree, tvb, offset, 1, "Subtype %u", subtype);
7318 offset += 1;
7319 if (subtype == WFA_SUBTYPE_P2P) {
7320 offset = dissect_wifi_p2p_action(tree, tvb, offset);
7322 break;
7323 default:
7324 /* Don't know how to handle this vendor */
7325 break;
7328 return offset - start; /* Size of fixed fields */
7331 static guint
7332 add_ff_action_ht(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset)
7334 guint start = offset;
7335 guint8 n_sta, i;
7336 mimo_control_t mimo_cntrl;
7338 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_CATEGORY_CODE);
7339 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_HT_ACTION_CODE);
7341 switch (tvb_get_guint8(tvb, offset - 1)) {
7342 case HT_ACTION_NOTIFY_CHAN_WIDTH:
7343 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_CHANNEL_WIDTH);
7344 break;
7345 case HT_ACTION_SM_PWR_SAVE:
7346 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_SM_PWR_CNTRL);
7347 break;
7348 case HT_ACTION_PSMP_ACTION:
7349 n_sta = tvb_get_guint8(tvb, offset);
7350 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_PSMP_PARAM_SET);
7351 for (i = 0; i < (n_sta & 0x0F); i++) {
7352 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_PSMP_STA_INFO);
7354 break;
7355 case HT_ACTION_SET_PCO_PHASE:
7356 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_PCO_PHASE_CNTRL);
7357 break;
7358 case HT_ACTION_MIMO_CSI:
7359 mimo_cntrl = get_mimo_control(tvb, offset);
7360 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_MIMO_CNTRL);
7361 offset += add_mimo_csi_matrices_report(tree, tvb, offset, mimo_cntrl);
7362 break;
7363 case HT_ACTION_MIMO_BEAMFORMING:
7364 mimo_cntrl = get_mimo_control(tvb, offset);
7365 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_MIMO_CNTRL);
7366 offset += add_mimo_beamforming_feedback_report(tree, tvb, offset,
7367 mimo_cntrl);
7368 break;
7369 case HT_ACTION_MIMO_COMPRESSED_BEAMFORMING:
7370 mimo_cntrl = get_mimo_control(tvb, offset);
7371 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_MIMO_CNTRL);
7372 offset += add_mimo_compressed_beamforming_feedback_report(tree, tvb,
7373 offset,
7374 mimo_cntrl);
7375 break;
7376 case HT_ACTION_ANT_SEL_FEEDBACK:
7377 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_ANT_SELECTION);
7378 break;
7379 case HT_ACTION_HT_INFO_EXCHANGE:
7380 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_HT_INFORMATION);
7381 break;
7384 return offset - start;
7387 static guint
7388 add_ff_action(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset)
7390 switch (tvb_get_guint8(tvb, offset) & 0x7f) {
7391 case CAT_SPECTRUM_MGMT:
7392 return add_ff_action_spectrum_mgmt(tree, tvb, pinfo, offset);
7393 case CAT_QOS:
7394 return add_ff_action_qos(tree, tvb, pinfo, offset);
7395 case CAT_DLS:
7396 return add_ff_action_dls(tree, tvb, pinfo, offset);
7397 case CAT_BLOCK_ACK:
7398 return add_ff_action_block_ack(tree, tvb, pinfo, offset);
7399 case CAT_PUBLIC:
7400 return add_ff_action_public(tree, tvb, pinfo, offset);
7401 case CAT_RADIO_MEASUREMENT:
7402 return add_ff_action_radio_measurement(tree, tvb, pinfo, offset);
7403 case CAT_FAST_BSS_TRANSITION:
7404 return add_ff_action_fast_bss_transition(tree, tvb, pinfo, offset);
7405 case CAT_SA_QUERY:
7406 return add_ff_action_sa_query(tree, tvb, pinfo, offset);
7407 case CAT_MESH:
7408 return add_ff_action_mesh(tree, tvb, pinfo, offset);
7409 case CAT_MULTIHOP:
7410 return add_ff_action_multihop(tree, tvb, pinfo, offset);
7411 case CAT_SELF_PROTECTED:
7412 return add_ff_action_self_protected(tree, tvb, pinfo, offset);
7413 case CAT_WNM:
7414 return add_ff_action_wnm(tree, tvb, pinfo, offset);
7415 case CAT_TDLS:
7416 return add_ff_action_tdls(tree, tvb, pinfo, offset);
7417 case CAT_MGMT_NOTIFICATION: /* Management notification frame */
7418 return add_ff_action_mgmt_notification(tree, tvb, pinfo, offset);
7419 case CAT_VENDOR_SPECIFIC: /* Vendor Specific Category */
7420 return add_ff_action_vendor_specific(tree, tvb, pinfo, offset);
7421 case CAT_HT:
7422 return add_ff_action_ht(tree, tvb, pinfo, offset);
7423 default:
7424 add_fixed_field(tree, tvb, pinfo, offset, FIELD_CATEGORY_CODE);
7425 return 1;
7429 static guint
7430 add_ff_ft_action_code(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
7432 proto_tree_add_item(tree, hf_ieee80211_ff_ft_action_code, tvb, offset, 1,
7433 ENC_BIG_ENDIAN);
7434 return 1;
7437 static guint
7438 add_ff_sta_address(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
7440 proto_tree_add_item(tree, hf_ieee80211_ff_sta_address, tvb, offset, 6,
7441 ENC_NA);
7442 return 6;
7445 static guint
7446 add_ff_target_ap_address(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
7448 proto_tree_add_item(tree, hf_ieee80211_ff_target_ap_address, tvb, offset, 6,
7449 ENC_NA);
7450 return 6;
7453 static guint
7454 add_ff_gas_comeback_delay(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
7456 proto_tree_add_item(tree, hf_ieee80211_ff_gas_comeback_delay, tvb, offset, 2,
7457 ENC_LITTLE_ENDIAN);
7458 return 2;
7461 static guint
7462 add_ff_gas_fragment_id(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
7464 proto_tree_add_item(tree, hf_ieee80211_ff_gas_fragment_id, tvb, offset, 1,
7465 ENC_BIG_ENDIAN);
7466 proto_tree_add_item(tree, hf_ieee80211_ff_more_gas_fragments, tvb, offset, 1,
7467 ENC_BIG_ENDIAN);
7468 return 1;
7471 static guint
7472 add_ff_sa_query_action_code(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
7474 proto_tree_add_item(tree, hf_ieee80211_ff_sa_query_action_code, tvb, offset,
7475 1, ENC_BIG_ENDIAN);
7476 return 1;
7479 static guint
7480 add_ff_transaction_id(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
7482 proto_tree_add_item(tree, hf_ieee80211_ff_transaction_id, tvb, offset, 2,
7483 ENC_LITTLE_ENDIAN);
7484 return 2;
7487 static guint
7488 add_ff_tdls_action_code(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset)
7490 guint8 code;
7491 code = tvb_get_guint8(tvb, offset);
7492 col_set_str(pinfo->cinfo, COL_INFO,
7493 val_to_str_ext_const(code, &tdls_action_codes_ext,
7494 "Unknown TDLS Action"));
7495 proto_tree_add_item(tree, hf_ieee80211_ff_tdls_action_code, tvb, offset, 1,
7496 ENC_BIG_ENDIAN);
7497 return 1;
7500 static guint
7501 add_ff_target_channel(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
7503 proto_tree_add_item(tree, hf_ieee80211_ff_target_channel, tvb, offset, 1,
7504 ENC_BIG_ENDIAN);
7505 return 1;
7508 static guint
7509 add_ff_regulatory_class(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
7511 proto_tree_add_item(tree, hf_ieee80211_ff_regulatory_class, tvb, offset, 1,
7512 ENC_BIG_ENDIAN);
7513 return 1;
7516 static guint
7517 add_ff_wnm_action_code(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset)
7519 guint8 code;
7521 code = tvb_get_guint8(tvb, offset);
7522 col_set_str(pinfo->cinfo, COL_INFO,
7523 val_to_str_ext_const(code, &wnm_action_codes_ext, "Unknown WNM Action"));
7524 proto_tree_add_item(tree, hf_ieee80211_ff_wnm_action_code, tvb, offset, 1, ENC_BIG_ENDIAN);
7525 return 1;
7528 static guint
7529 add_ff_key_data_length(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
7531 proto_tree_add_item(tree, hf_ieee80211_ff_key_data_length, tvb, offset, 2,
7532 ENC_LITTLE_ENDIAN);
7533 return 2;
7536 struct ieee80211_fixed_field_dissector {
7537 enum fixed_field lfcode;
7538 guint (*dissector)(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset);
7541 static guint
7542 add_ff_wnm_notification_type(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
7544 proto_tree_add_item(tree, hf_ieee80211_ff_wnm_notification_type,
7545 tvb, offset, 1, ENC_NA);
7546 return 1;
7549 /* Action frame: Radio Measurement actions */
7550 static guint
7551 add_ff_rm_action_code(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
7553 proto_tree_add_item(tree, hf_ieee80211_ff_rm_action_code, tvb, offset, 1, ENC_NA);
7554 return 1;
7557 static guint
7558 add_ff_rm_dialog_token(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
7560 proto_tree_add_item(tree, hf_ieee80211_ff_rm_dialog_token, tvb, offset, 1, ENC_NA);
7561 return 1;
7564 /* Radio Measurement Request frame, Action fields */
7565 static guint
7566 add_ff_rm_repetitions(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
7568 /* Note: 65535 means repeated until cancelled or superseded */
7569 proto_tree_add_item(tree, hf_ieee80211_ff_rm_repetitions, tvb, offset, 2,
7570 ENC_BIG_ENDIAN);
7571 return 2;
7574 /* Link Measurement Request frame, Action fields*/
7575 static guint
7576 add_ff_rm_tx_power(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
7578 /* In dBm, see 8.4.1.20 */
7579 proto_tree_add_item(tree, hf_ieee80211_ff_rm_tx_power, tvb, offset, 1, ENC_NA);
7580 return 1;
7583 static guint
7584 add_ff_rm_max_tx_power(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
7586 /* In dBm, see 8.4.1.19 */
7587 proto_tree_add_item(tree, hf_ieee80211_ff_rm_max_tx_power, tvb, offset, 1, ENC_NA);
7588 return 1;
7591 /* Link Measurement Report frame, Action fields */
7592 static guint
7593 add_ff_rm_tpc_report(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
7595 proto_tree *tpc_tree;
7596 proto_item *tpc_item;
7598 /* 8.4.2.19 TPC Report element */
7599 tpc_item = proto_tree_add_item(tree, hf_ieee80211_ff_tpc, tvb, offset, 4, ENC_NA);
7600 tpc_tree = proto_item_add_subtree(tpc_item, ett_tpc);
7601 proto_tree_add_item(tpc_tree, hf_ieee80211_ff_tpc_element_id, tvb, offset, 1, ENC_NA);
7602 proto_tree_add_item(tpc_tree, hf_ieee80211_ff_tpc_length, tvb, offset + 1, 1, ENC_NA);
7603 proto_tree_add_item(tpc_tree, hf_ieee80211_ff_tpc_tx_power, tvb, offset + 2, 1, ENC_NA);
7604 proto_tree_add_item(tpc_tree, hf_ieee80211_ff_tpc_link_margin, tvb, offset + 3, 1, ENC_NA);
7605 return 4;
7608 static guint
7609 add_ff_rm_rx_antenna_id(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
7611 /* 8.4.2.42: 0 means unknown, 1-254 is valid, 255 means multiple antennas */
7612 proto_tree_add_item(tree, hf_ieee80211_ff_rm_rx_antenna_id, tvb, offset, 1, ENC_NA);
7613 return 1;
7616 static guint
7617 add_ff_rm_tx_antenna_id(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
7619 /* 8.4.2.42: 0 means unknown, 1-254 is valid, 255 means multiple antennas */
7620 proto_tree_add_item(tree, hf_ieee80211_ff_rm_tx_antenna_id, tvb, offset, 1, ENC_NA);
7621 return 1;
7624 static guint
7625 add_ff_rm_rcpi(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
7627 /* 8.4.2.40: RCPI as specified for certain PHYs */
7628 proto_tree_add_item(tree, hf_ieee80211_ff_rm_rcpi, tvb, offset, 1, ENC_NA);
7629 return 1;
7632 static guint
7633 add_ff_rm_rsni(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
7635 /* 8.4.2.43: RSNI in steps of 0.5 dB, calculated as:
7636 * RSNI = (10 * log10((RCPI_{power} - ANPI_{power}) / ANPI_{power}) + 20)*2 */
7637 proto_tree_add_item(tree, hf_ieee80211_ff_rm_rsni, tvb, offset, 1, ENC_NA);
7638 return 1;
7641 #define FF_FIELD(f, func) { FIELD_ ## f, add_ff_ ## func }
7643 static const struct ieee80211_fixed_field_dissector ff_dissectors[] = {
7644 FF_FIELD(TIMESTAMP , timestamp),
7645 FF_FIELD(BEACON_INTERVAL , beacon_interval),
7646 FF_FIELD(CAP_INFO , cap_info),
7647 FF_FIELD(AUTH_ALG , auth_alg),
7648 FF_FIELD(AUTH_TRANS_SEQ , auth_trans_seq),
7649 FF_FIELD(CURRENT_AP_ADDR , current_ap_addr),
7650 FF_FIELD(LISTEN_IVAL , listen_ival),
7651 FF_FIELD(REASON_CODE , reason_code),
7652 FF_FIELD(ASSOC_ID , assoc_id),
7653 FF_FIELD(STATUS_CODE , status_code),
7654 FF_FIELD(CATEGORY_CODE , category_code),
7655 FF_FIELD(ACTION_CODE , action_code),
7656 FF_FIELD(DIALOG_TOKEN , dialog_token),
7657 FF_FIELD(WME_ACTION_CODE , wme_action_code),
7658 FF_FIELD(WME_STATUS_CODE , wme_status_code),
7659 FF_FIELD(QOS_ACTION_CODE , qos_action_code),
7660 FF_FIELD(BLOCK_ACK_ACTION_CODE , block_ack_action_code),
7661 FF_FIELD(BLOCK_ACK_PARAM , block_ack_param),
7662 FF_FIELD(BLOCK_ACK_TIMEOUT , block_ack_timeout),
7663 FF_FIELD(BLOCK_ACK_SSC , block_ack_ssc),
7664 FF_FIELD(QOS_TS_INFO , qos_ts_info),
7665 FF_FIELD(MESH_ACTION , mesh_action),
7666 FF_FIELD(MULTIHOP_ACTION , multihop_action),
7667 FF_FIELD(MESH_CONTROL , mesh_control),
7668 FF_FIELD(SELFPROT_ACTION , selfprot_action),
7669 FF_FIELD(DLS_ACTION_CODE , dls_action_code),
7670 FF_FIELD(DST_MAC_ADDR , dst_mac_addr),
7671 FF_FIELD(SRC_MAC_ADDR , src_mac_addr),
7672 FF_FIELD(DLS_TIMEOUT , dls_timeout),
7673 FF_FIELD(DELBA_PARAM_SET , delba_param_set),
7674 FF_FIELD(MAX_REG_PWR , max_reg_pwr),
7675 FF_FIELD(MEASUREMENT_PILOT_INT , measurement_pilot_int),
7676 FF_FIELD(COUNTRY_STR , country_str),
7677 FF_FIELD(MAX_TX_PWR , max_tx_pwr),
7678 FF_FIELD(TX_PWR_USED , tx_pwr_used),
7679 FF_FIELD(TRANSCEIVER_NOISE_FLOOR , transceiver_noise_floor),
7680 FF_FIELD(CHANNEL_WIDTH , channel_width),
7681 FF_FIELD(QOS_INFO_AP , qos_info_ap),
7682 FF_FIELD(QOS_INFO_STA , qos_info_sta),
7683 FF_FIELD(SM_PWR_CNTRL , sm_pwr_cntrl),
7684 FF_FIELD(PCO_PHASE_CNTRL , pco_phase_cntrl),
7685 FF_FIELD(PSMP_PARAM_SET , psmp_param_set),
7686 FF_FIELD(MIMO_CNTRL , mimo_cntrl),
7687 FF_FIELD(ANT_SELECTION , ant_selection),
7688 FF_FIELD(EXTENDED_CHANNEL_SWITCH_ANNOUNCEMENT , extended_channel_switch_announcement) ,
7689 FF_FIELD(HT_INFORMATION , ht_information),
7690 FF_FIELD(HT_ACTION_CODE , ht_action_code),
7691 FF_FIELD(PSMP_STA_INFO , psmp_sta_info),
7692 FF_FIELD(SCHEDULE_INFO , schedule_info),
7693 FF_FIELD(PA_ACTION_CODE , pa_action_code),
7694 FF_FIELD(ACTION , action),
7695 FF_FIELD(FT_ACTION_CODE , ft_action_code),
7696 FF_FIELD(STA_ADDRESS , sta_address),
7697 FF_FIELD(TARGET_AP_ADDRESS , target_ap_address),
7698 FF_FIELD(GAS_COMEBACK_DELAY , gas_comeback_delay),
7699 FF_FIELD(GAS_FRAGMENT_ID , gas_fragment_id),
7700 FF_FIELD(SA_QUERY_ACTION_CODE , sa_query_action_code),
7701 FF_FIELD(TRANSACTION_ID , transaction_id),
7702 FF_FIELD(TDLS_ACTION_CODE , tdls_action_code),
7703 FF_FIELD(TARGET_CHANNEL , target_channel),
7704 FF_FIELD(REGULATORY_CLASS , regulatory_class),
7705 FF_FIELD(WNM_ACTION_CODE , wnm_action_code),
7706 FF_FIELD(KEY_DATA_LENGTH , key_data_length),
7707 FF_FIELD(WNM_NOTIFICATION_TYPE , wnm_notification_type),
7708 FF_FIELD(RM_ACTION_CODE , rm_action_code),
7709 FF_FIELD(RM_DIALOG_TOKEN , rm_dialog_token),
7710 FF_FIELD(RM_REPETITIONS , rm_repetitions),
7711 FF_FIELD(RM_TX_POWER , rm_tx_power),
7712 FF_FIELD(RM_MAX_TX_POWER , rm_max_tx_power),
7713 FF_FIELD(RM_TPC_REPORT , rm_tpc_report),
7714 FF_FIELD(RM_RX_ANTENNA_ID , rm_rx_antenna_id),
7715 FF_FIELD(RM_TX_ANTENNA_ID , rm_tx_antenna_id),
7716 FF_FIELD(RM_RCPI , rm_rcpi),
7717 FF_FIELD(RM_RSNI , rm_rsni),
7719 { (enum fixed_field)-1 , NULL }
7722 #undef FF_FIELD
7724 static guint
7725 add_fixed_field(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset,
7726 enum fixed_field lfcode)
7728 int i;
7729 for (i = 0; ff_dissectors[i].dissector; i++) {
7730 if (ff_dissectors[i].lfcode == lfcode) {
7731 return ff_dissectors[i].dissector(tree, tvb, pinfo, offset);
7734 return 0;
7737 static const value_string ieee80211_rsn_cipher_vals[] = {
7738 {0, "NONE"},
7739 {1, "WEP (40-bit)"},
7740 {2, "TKIP"},
7741 {3, "AES (OCB)"},
7742 {4, "AES (CCM)"},
7743 {5, "WEP (104-bit)"},
7744 {6, "BIP"},
7745 {7, "Group addressed traffic not allowed"},
7746 {0, NULL}
7749 static const value_string ieee80211_rsn_keymgmt_vals[] = {
7750 {0, "NONE"},
7751 {1, "WPA"},
7752 {2, "PSK"},
7753 {3, "FT over IEEE 802.1X"},
7754 {4, "FT using PSK"},
7755 {5, "WPA (SHA256)"},
7756 {6, "PSK (SHA256)"},
7757 {7, "TDLS / TPK Handshake"},
7758 {0, NULL}
7761 static void
7762 oui_base_custom(gchar *result, guint32 oui)
7764 guint8 p_oui[3];
7765 const gchar *manuf_name;
7767 p_oui[0] = oui >> 16 & 0xFF;
7768 p_oui[1] = oui >> 8 & 0xFF;
7769 p_oui[2] = oui & 0xFF;
7771 /* Attempt an OUI lookup. */
7772 manuf_name = get_manuf_name_if_known(p_oui);
7773 if (manuf_name == NULL) {
7774 /* Could not find an OUI. */
7775 g_snprintf(result, ITEM_LABEL_LENGTH, "%.2x-%.2x-%.2x", p_oui[0], p_oui[1], p_oui[2]);
7777 else {
7778 /* Found an address string. */
7779 g_snprintf(result, ITEM_LABEL_LENGTH, "%.2x-%.2x-%.2x (%s)", p_oui[0], p_oui[1], p_oui[2], manuf_name);
7783 static void
7784 rsn_gcs_base_custom(gchar *result, guint32 gcs)
7786 gchar oui_result[SHORT_STR];
7788 oui_result[0] = '\0';
7789 oui_base_custom(oui_result, gcs >> 8);
7790 g_snprintf(result, ITEM_LABEL_LENGTH, "%s %s", oui_result,
7791 val_to_str(gcs & 0xFF, ieee80211_rsn_cipher_vals, "Unknown %d"));
7794 static void
7795 rsn_pcs_base_custom(gchar *result, guint32 pcs)
7797 gchar oui_result[SHORT_STR];
7799 oui_result[0] = '\0';
7800 oui_base_custom(oui_result, pcs >> 8);
7801 g_snprintf(result, ITEM_LABEL_LENGTH, "%s %s", oui_result,
7802 val_to_str(pcs & 0xFF, ieee80211_rsn_cipher_vals, "Unknown %d"));
7805 static void
7806 rsn_akms_base_custom(gchar *result, guint32 akms)
7808 gchar oui_result[SHORT_STR];
7810 oui_result[0] = '\0';
7811 oui_base_custom(oui_result, akms >> 8);
7812 g_snprintf(result, ITEM_LABEL_LENGTH, "%s %s", oui_result,
7813 val_to_str(akms & 0xFF, ieee80211_rsn_keymgmt_vals, "Unknown %d"));
7816 static gchar *
7817 rsn_pcs_return(guint32 pcs)
7819 gchar *result;
7821 result = (gchar *)wmem_alloc(wmem_packet_scope(), SHORT_STR);
7822 result[0] = '\0';
7823 rsn_pcs_base_custom(result, pcs);
7825 return result;
7828 static gchar *
7829 rsn_akms_return(guint32 akms)
7831 gchar *result;
7833 result = (gchar *)wmem_alloc(wmem_packet_scope(), SHORT_STR);
7834 result[0] = '\0';
7835 rsn_akms_base_custom(result, akms);
7837 return result;
7840 static void
7841 rsn_gmcs_base_custom(gchar *result, guint32 gmcs)
7843 gchar oui_result[SHORT_STR];
7845 oui_result[0] = '\0';
7846 oui_base_custom(oui_result, gmcs >> 8);
7847 g_snprintf(result, ITEM_LABEL_LENGTH, "%s %s", oui_result,
7848 val_to_str(gmcs & 0xFF, ieee80211_rsn_cipher_vals, "Unknown %d"));
7851 static void
7852 rsni_base_custom(gchar *result, guint32 rsni)
7854 double temp_double;
7856 temp_double = (double)rsni;
7857 g_snprintf(result, ITEM_LABEL_LENGTH, "%f dB", (temp_double / 2));
7860 static void
7861 vht_tpe_custom(gchar *result, guint8 txpwr)
7864 gint8 txpwr_db;
7866 txpwr_db = (gint8)(txpwr);
7867 g_snprintf(result, ITEM_LABEL_LENGTH, "%3.1f dBm", (txpwr_db/2.0));
7871 /* WPA / WME */
7872 static const value_string ieee802111_wfa_ie_type_vals[] = {
7873 { 1, "WPA Information Element" },
7874 { 2, "WMM/WME" },
7875 { 4, "WPS" },
7876 { 0, NULL }
7879 static const value_string ieee80211_wfa_ie_wpa_cipher_vals[] = {
7880 { 0, "NONE" },
7881 { 1, "WEP (40-bit)" },
7882 { 2, "TKIP" },
7883 { 3, "AES (OCB)" },
7884 { 4, "AES (CCM)" },
7885 { 5, "WEP (104-bit)" },
7886 { 6, "BIP" },
7887 { 7, "Group addressed traffic not allowed" },
7888 { 0, NULL }
7891 static const value_string ieee80211_wfa_ie_wpa_keymgmt_vals[] = {
7892 { 0, "NONE" },
7893 { 1, "WPA" },
7894 { 2, "PSK" },
7895 { 3, "FT over IEEE 802.1X" },
7896 { 4, "FT using PSK" },
7897 { 5, "WPA (SHA256)" },
7898 { 6, "PSK (SHA256)" },
7899 { 7, "TDLS / TPK Handshake" },
7900 { 0, NULL }
7903 static const value_string ieee80211_wfa_ie_wme_acs_vals[] = {
7904 { 0, "Best Effort" },
7905 { 1, "Background" },
7906 { 2, "Video" },
7907 { 3, "Voice" },
7908 { 0, NULL }
7911 static const value_string ieee80211_wfa_ie_wme_tspec_tsinfo_direction_vals[] = {
7912 { 0, "Uplink" },
7913 { 1, "Downlink" },
7914 { 2, "Direct link" },
7915 { 3, "Bidirectional link" },
7916 { 0, NULL }
7919 static const value_string ieee80211_wfa_ie_wme_tspec_tsinfo_psb_vals[] = {
7920 { 0, "Legacy" },
7921 { 1, "U-APSD" },
7922 { 0, NULL }
7925 static const value_string ieee80211_wfa_ie_wme_tspec_tsinfo_up_vals[] = {
7926 { 0, "Best Effort" },
7927 { 1, "Background" },
7928 { 2, "Spare" },
7929 { 3, "Excellent Effort" },
7930 { 4, "Controlled Load" },
7931 { 5, "Video" },
7932 { 6, "Voice" },
7933 { 7, "Network Control" },
7934 { 0, NULL }
7937 static const value_string ieee802111_wfa_ie_wme_qos_info_sta_max_sp_length_vals[] = {
7938 { 0, "WMM AP may deliver all buffered frames (MSDUs and MMPDUs)" },
7939 { 1, "WMM AP may deliver a maximum of 2 buffered frames (MSDUs and MMPDUs) per USP" },
7940 { 2, "WMM AP may deliver a maximum of 4 buffered frames (MSDUs and MMPDUs) per USP" },
7941 { 3, "WMM AP may deliver a maximum of 6 buffered frames (MSDUs and MMPDUs) per USP" },
7942 { 0, NULL}
7944 static const true_false_string ieee802111_wfa_ie_wme_qos_info_sta_ac_tfs = {
7945 "WMM delivery and trigger enabled",
7946 "non-WMM PS"
7949 static void
7950 wpa_mcs_base_custom(gchar *result, guint32 mcs)
7952 gchar oui_result[SHORT_STR];
7954 oui_result[0] = '\0';
7955 oui_base_custom(oui_result, mcs >> 8);
7956 g_snprintf(result, ITEM_LABEL_LENGTH, "%s %s", oui_result,
7957 val_to_str(mcs & 0xFF, ieee80211_wfa_ie_wpa_cipher_vals, "Unknown %d"));
7960 static void
7961 wpa_ucs_base_custom(gchar *result, guint32 ucs)
7963 gchar oui_result[SHORT_STR];
7965 oui_result[0] = '\0';
7966 oui_base_custom(oui_result, ucs >> 8);
7967 g_snprintf(result, ITEM_LABEL_LENGTH, "%s %s", oui_result,
7968 val_to_str(ucs & 0xFF, ieee80211_wfa_ie_wpa_cipher_vals, "Unknown %d"));
7971 static void
7972 wpa_akms_base_custom(gchar *result, guint32 akms)
7974 gchar oui_result[SHORT_STR];
7976 oui_result[0] = '\0';
7977 oui_base_custom(oui_result, akms >> 8);
7978 g_snprintf(result, ITEM_LABEL_LENGTH, "%s %s", oui_result,
7979 val_to_str(akms & 0xFF, ieee80211_wfa_ie_wpa_keymgmt_vals, "Unknown %d"));
7982 static gchar *
7983 wpa_ucs_return(guint32 ucs)
7985 gchar *result;
7987 result = (gchar *)wmem_alloc(wmem_packet_scope(), SHORT_STR);
7988 result[0] = '\0';
7989 wpa_ucs_base_custom(result, ucs);
7991 return result;
7994 static gchar *
7995 wpa_akms_return(guint32 akms)
7997 gchar *result;
7999 result = (gchar *)wmem_alloc(wmem_packet_scope(), SHORT_STR);
8000 result[0] = '\0';
8001 wpa_akms_base_custom(result, akms);
8003 return result;
8006 /* For each Field */
8007 static const value_string ieee80211_wapi_suite_type[] = {
8008 {0, "Reserved"},
8009 {1, "WAI Certificate Authentication and Key Management"},
8010 {2, "WAI Preshared Key Authentication and Key Management"},
8011 {0, NULL},
8013 /* For Summary Tag Information */
8014 static const value_string ieee80211_wapi_suite_type_short[] = {
8015 {0, "Reserved"},
8016 {1, "WAI-CERT"},
8017 {2, "WAI-PSK"},
8018 {0, NULL},
8021 static const value_string ieee80211_wapi_cipher_type[] = {
8022 {0, "Reserved"},
8023 {1, "WPI-SMS4"},
8024 {0, NULL},
8027 static const value_string ieee802111_wfa_ie_wme_type[] = {
8028 { 0, "Information Element" },
8029 { 1, "Parameter Element" },
8030 { 2, "TSPEC Element" },
8031 { 0, NULL}
8034 static const value_string ft_subelem_id_vals[] = {
8035 {0, "Reserved"},
8036 {1, "PMK-R1 key holder identifier (R1KH-ID)"},
8037 {2, "GTK subelement"},
8038 {3, "PMK-R0 key holder identifier (R0KH-ID)"},
8039 {4, "IGTK"},
8040 {0, NULL}
8043 static int
8044 dissect_qos_info(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset, int ftype)
8046 proto_tree *qos_info_tree;
8047 proto_item *qos_info_item;
8049 qos_info_item = proto_tree_add_item(tree, hf_ieee80211_wfa_ie_wme_qos_info, tvb, offset, 1, ENC_NA);
8050 qos_info_tree = proto_item_add_subtree(qos_info_item, ett_wme_qos_info);
8052 switch (ftype) {
8053 case MGT_ASSOC_REQ:
8054 case MGT_PROBE_REQ:
8055 case MGT_REASSOC_REQ:
8057 /* To AP so decode as per WMM standard Figure 7 QoS Info field when sent from WMM STA*/
8058 proto_tree_add_item(qos_info_tree, hf_ieee80211_wfa_ie_wme_qos_info_sta_max_sp_length, tvb, offset, 1, ENC_NA);
8059 proto_tree_add_item(qos_info_tree, hf_ieee80211_wfa_ie_wme_qos_info_sta_ac_be, tvb, offset, 1, ENC_NA);
8060 proto_tree_add_item(qos_info_tree, hf_ieee80211_wfa_ie_wme_qos_info_sta_ac_bk, tvb, offset, 1, ENC_NA);
8061 proto_tree_add_item(qos_info_tree, hf_ieee80211_wfa_ie_wme_qos_info_sta_ac_vi, tvb, offset, 1, ENC_NA);
8062 proto_tree_add_item(qos_info_tree, hf_ieee80211_wfa_ie_wme_qos_info_sta_ac_vo, tvb, offset, 1, ENC_NA);
8063 proto_tree_add_item(qos_info_tree, hf_ieee80211_wfa_ie_wme_qos_info_sta_reserved, tvb, offset, 1, ENC_NA);
8064 break;
8066 case MGT_BEACON:
8067 case MGT_PROBE_RESP:
8068 case MGT_ASSOC_RESP:
8069 case MGT_REASSOC_RESP:
8071 /* From AP so decode as per WMM standard Figure 6 QoS Info field when sent from WMM AP */
8072 proto_tree_add_item(qos_info_tree, hf_ieee80211_wfa_ie_wme_qos_info_ap_u_apsd, tvb, offset, 1, ENC_NA);
8073 proto_tree_add_item(qos_info_tree, hf_ieee80211_wfa_ie_wme_qos_info_ap_parameter_set_count, tvb, offset, 1, ENC_NA);
8074 proto_tree_add_item(qos_info_tree, hf_ieee80211_wfa_ie_wme_qos_info_ap_reserved, tvb, offset, 1, ENC_NA);
8075 break;
8077 default:
8078 expert_add_info_format(pinfo, qos_info_item, &ei_ieee80211_wfa_ie_wme_qos_info_bad_ftype, "Could not deduce direction to decode correctly, ftype %u", ftype);
8079 break;
8082 offset += 1;
8083 return offset;
8086 static int
8087 dissect_vendor_ie_wpawme(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset, guint32 tag_len, int ftype)
8089 guint8 type;
8091 proto_tree_add_item(tree, hf_ieee80211_wfa_ie_type, tvb, offset, 1, ENC_NA);
8092 type = tvb_get_guint8(tvb, offset);
8093 proto_item_append_text(tree, ": %s", val_to_str(type, ieee802111_wfa_ie_type_vals, "Unknown %d"));
8094 offset += 1;
8096 switch (type) {
8097 case 1: /* Wi-Fi Protected Access (WPA) */
8099 proto_item *wpa_mcs_item, *wpa_ucs_item, *wpa_akms_item;
8100 proto_item *wpa_sub_ucs_item, *wpa_sub_akms_item;
8101 proto_tree *wpa_mcs_tree, *wpa_ucs_tree, *wpa_akms_tree;
8102 proto_tree *wpa_sub_ucs_tree, *wpa_sub_akms_tree;
8103 guint16 ucs_count, akms_count;
8104 guint ii;
8106 proto_tree_add_item(tree, hf_ieee80211_wfa_ie_wpa_version, tvb, offset, 2, ENC_LITTLE_ENDIAN);
8107 offset += 2;
8109 /* Multicast Cipher Suite */
8110 wpa_mcs_item = proto_tree_add_item(tree, hf_ieee80211_wfa_ie_wpa_mcs, tvb, offset, 4, ENC_BIG_ENDIAN);
8111 wpa_mcs_tree = proto_item_add_subtree(wpa_mcs_item, ett_wpa_mcs_tree);
8112 proto_tree_add_item(wpa_mcs_tree, hf_ieee80211_wfa_ie_wpa_mcs_oui, tvb, offset, 3, ENC_BIG_ENDIAN);
8114 /* Check if OUI is 00:50:F2 (WFA) */
8115 if (tvb_get_ntoh24(tvb, offset) == OUI_WPAWME)
8117 proto_tree_add_item(wpa_mcs_tree, hf_ieee80211_wfa_ie_wpa_mcs_wfa_type, tvb, offset + 3, 1, ENC_BIG_ENDIAN);
8118 } else {
8119 proto_tree_add_item(wpa_mcs_tree, hf_ieee80211_wfa_ie_wpa_mcs_type, tvb, offset + 3, 1, ENC_BIG_ENDIAN);
8121 offset += 4;
8123 /* Unicast Cipher Suites */
8124 proto_tree_add_item(tree, hf_ieee80211_wfa_ie_wpa_ucs_count, tvb, offset, 2, ENC_LITTLE_ENDIAN);
8125 ucs_count = tvb_get_letohs(tvb, offset);
8126 offset += 2;
8128 wpa_ucs_item = proto_tree_add_item(tree, hf_ieee80211_wfa_ie_wpa_ucs_list, tvb, offset, ucs_count * 4, ENC_NA);
8129 wpa_ucs_tree = proto_item_add_subtree(wpa_ucs_item, ett_wpa_ucs_tree);
8130 for (ii = 0; ii < ucs_count; ii++)
8132 wpa_sub_ucs_item = proto_tree_add_item(wpa_ucs_tree, hf_ieee80211_wfa_ie_wpa_ucs, tvb, offset, 4, ENC_BIG_ENDIAN);
8133 wpa_sub_ucs_tree = proto_item_add_subtree(wpa_sub_ucs_item, ett_wpa_sub_ucs_tree);
8134 proto_tree_add_item(wpa_sub_ucs_tree, hf_ieee80211_wfa_ie_wpa_ucs_oui, tvb, offset, 3, ENC_BIG_ENDIAN);
8136 /* Check if OUI is 00:50:F2 (WFA) */
8137 if (tvb_get_ntoh24(tvb, offset) == OUI_WPAWME)
8139 proto_tree_add_item(wpa_sub_ucs_tree, hf_ieee80211_wfa_ie_wpa_ucs_wfa_type, tvb, offset+3, 1, ENC_BIG_ENDIAN);
8140 proto_item_append_text(wpa_ucs_item, " %s", wpa_ucs_return(tvb_get_ntohl(tvb, offset)));
8141 } else {
8142 proto_tree_add_item(wpa_sub_ucs_tree, hf_ieee80211_wfa_ie_wpa_ucs_type, tvb, offset+3, 1, ENC_BIG_ENDIAN);
8144 offset += 4;
8147 /* Authenticated Key Management Suites */
8148 proto_tree_add_item(tree, hf_ieee80211_wfa_ie_wpa_akms_count, tvb, offset, 2, ENC_LITTLE_ENDIAN);
8149 akms_count = tvb_get_letohs(tvb, offset);
8150 offset += 2;
8152 wpa_akms_item = proto_tree_add_item(tree, hf_ieee80211_wfa_ie_wpa_akms_list, tvb, offset, akms_count * 4, ENC_NA);
8153 wpa_akms_tree = proto_item_add_subtree(wpa_akms_item, ett_wpa_akms_tree);
8154 for (ii = 0; ii < akms_count; ii++)
8156 wpa_sub_akms_item = proto_tree_add_item(wpa_akms_tree, hf_ieee80211_wfa_ie_wpa_akms, tvb, offset, 4, ENC_BIG_ENDIAN);
8157 wpa_sub_akms_tree = proto_item_add_subtree(wpa_sub_akms_item, ett_wpa_sub_akms_tree);
8158 proto_tree_add_item(wpa_sub_akms_tree, hf_ieee80211_wfa_ie_wpa_akms_oui, tvb, offset, 3, ENC_BIG_ENDIAN);
8160 /* Check if OUI is 00:50:F2 (WFA) */
8161 if (tvb_get_ntoh24(tvb, offset) == OUI_WPAWME)
8163 proto_tree_add_item(wpa_sub_akms_tree, hf_ieee80211_wfa_ie_wpa_akms_wfa_type, tvb, offset+3, 1, ENC_BIG_ENDIAN);
8164 proto_item_append_text(wpa_akms_item, " %s", wpa_akms_return(tvb_get_ntohl(tvb, offset)));
8165 } else {
8166 proto_tree_add_item(wpa_sub_akms_tree, hf_ieee80211_wfa_ie_wpa_akms_type, tvb, offset+3, 1, ENC_BIG_ENDIAN);
8168 offset += 4;
8170 break;
8172 case 2: /* Wireless Multimedia Enhancements (WME) */
8174 guint8 subtype;
8176 proto_tree_add_item(tree, hf_ieee80211_wfa_ie_wme_subtype, tvb, offset, 1, ENC_NA);
8177 subtype = tvb_get_guint8(tvb, offset);
8178 proto_item_append_text(tree, ": %s", val_to_str(subtype, ieee802111_wfa_ie_wme_type, "Unknown %d"));
8179 offset += 1;
8180 proto_tree_add_item(tree, hf_ieee80211_wfa_ie_wme_version, tvb, offset, 1, ENC_NA);
8181 offset += 1;
8182 switch (subtype) {
8183 case 0: /* WME Information Element */
8185 /* WME QoS Info Field */
8186 offset = dissect_qos_info(tree, tvb, pinfo, offset, ftype);
8187 break;
8189 case 1: /* WME Parameter Element */
8191 int i;
8192 /* WME QoS Info Field */
8193 offset = dissect_qos_info(tree, tvb, pinfo, offset, ftype);
8194 proto_tree_add_item(tree, hf_ieee80211_wfa_ie_wme_reserved, tvb, offset, 1, ENC_NA);
8195 offset += 1;
8196 /* AC Parameters */
8197 for (i = 0; i < 4; i++)
8199 proto_item *ac_item, *aci_aifsn_item, *ecw_item;
8200 proto_tree *ac_tree, *aci_aifsn_tree, *ecw_tree;
8201 guint8 aci_aifsn, ecw;
8203 ac_item = proto_tree_add_item(tree, hf_ieee80211_wfa_ie_wme_ac_parameters, tvb, offset, 4, ENC_NA);
8204 ac_tree = proto_item_add_subtree(ac_item, ett_wme_ac);
8206 /* ACI/AIFSN Field */
8207 aci_aifsn_item = proto_tree_add_item(ac_tree, hf_ieee80211_wfa_ie_wme_acp_aci_aifsn, tvb, offset, 1, ENC_NA);
8208 aci_aifsn_tree = proto_item_add_subtree(aci_aifsn_item, ett_wme_aci_aifsn);
8209 proto_tree_add_item(aci_aifsn_tree, hf_ieee80211_wfa_ie_wme_acp_aci, tvb, offset, 1, ENC_NA);
8210 proto_tree_add_item(aci_aifsn_tree, hf_ieee80211_wfa_ie_wme_acp_acm, tvb, offset, 1, ENC_NA);
8211 proto_tree_add_item(aci_aifsn_tree, hf_ieee80211_wfa_ie_wme_acp_aifsn, tvb, offset, 1, ENC_NA);
8212 proto_tree_add_item(aci_aifsn_tree, hf_ieee80211_wfa_ie_wme_acp_reserved, tvb, offset, 1, ENC_NA);
8213 aci_aifsn = tvb_get_guint8(tvb, offset);
8214 proto_item_append_text(ac_item, " ACI %u (%s), ACM %s, AIFSN %u",
8215 (aci_aifsn & 0x60) >> 5, try_val_to_str((aci_aifsn & 0x60) >> 5, ieee80211_wfa_ie_wme_acs_vals),
8216 (aci_aifsn & 0x10) ? "yes" : "no ", aci_aifsn & 0x0f);
8217 offset += 1;
8219 /* ECWmin/ECWmax field */
8220 ecw_item = proto_tree_add_item(ac_tree, hf_ieee80211_wfa_ie_wme_acp_ecw, tvb, offset, 1, ENC_NA);
8221 ecw_tree = proto_item_add_subtree(ecw_item, ett_wme_ecw);
8222 proto_tree_add_item(ecw_tree, hf_ieee80211_wfa_ie_wme_acp_ecw_max, tvb, offset, 1, ENC_NA);
8223 proto_tree_add_item(ecw_tree, hf_ieee80211_wfa_ie_wme_acp_ecw_min, tvb, offset, 1, ENC_NA);
8224 ecw = tvb_get_guint8(tvb, offset);
8225 proto_item_append_text(ac_item, ", ECWmin %u ,ECWmax %u", ecw & 0x0f, (ecw & 0xf0) >> 4);
8226 offset += 1;
8228 /* TXOP Limit */
8229 proto_tree_add_item(ac_tree, hf_ieee80211_wfa_ie_wme_acp_txop_limit, tvb, offset, 2, ENC_LITTLE_ENDIAN);
8230 proto_item_append_text(ac_item, ", TXOP %u", tvb_get_letohs(tvb, offset));
8231 offset += 2;
8233 break;
8235 case 2: /* WME TSPEC Element */
8238 proto_item *tsinfo_item;
8239 proto_tree *tsinfo_tree;
8241 tsinfo_item = proto_tree_add_item(tree, hf_ieee80211_wfa_ie_wme_tspec_tsinfo, tvb, offset, 3, ENC_LITTLE_ENDIAN);
8242 tsinfo_tree = proto_item_add_subtree(tsinfo_item, ett_tsinfo_tree);
8244 proto_tree_add_item(tsinfo_tree, hf_ieee80211_wfa_ie_wme_tspec_tsinfo_tid, tvb, offset, 3, ENC_LITTLE_ENDIAN);
8245 proto_tree_add_item(tsinfo_tree, hf_ieee80211_wfa_ie_wme_tspec_tsinfo_direction, tvb, offset, 3, ENC_LITTLE_ENDIAN);
8246 proto_tree_add_item(tsinfo_tree, hf_ieee80211_wfa_ie_wme_tspec_tsinfo_psb, tvb, offset, 3, ENC_LITTLE_ENDIAN);
8247 proto_tree_add_item(tsinfo_tree, hf_ieee80211_wfa_ie_wme_tspec_tsinfo_up, tvb, offset, 3, ENC_LITTLE_ENDIAN);
8248 proto_tree_add_item(tsinfo_tree, hf_ieee80211_wfa_ie_wme_tspec_tsinfo_reserved, tvb, offset, 3, ENC_LITTLE_ENDIAN);
8249 offset += 3;
8251 proto_tree_add_item(tree, hf_ieee80211_wfa_ie_wme_tspec_nor_msdu, tvb, offset, 2, ENC_LITTLE_ENDIAN);
8252 offset += 2;
8254 proto_tree_add_item(tree, hf_ieee80211_wfa_ie_wme_tspec_max_msdu, tvb, offset, 2, ENC_LITTLE_ENDIAN);
8255 offset += 2;
8257 proto_tree_add_item(tree, hf_ieee80211_wfa_ie_wme_tspec_min_srv, tvb, offset, 4, ENC_LITTLE_ENDIAN);
8258 offset += 4;
8260 proto_tree_add_item(tree, hf_ieee80211_wfa_ie_wme_tspec_max_srv, tvb, offset, 4, ENC_LITTLE_ENDIAN);
8261 offset += 4;
8263 proto_tree_add_item(tree, hf_ieee80211_wfa_ie_wme_tspec_inact_int, tvb, offset, 4, ENC_LITTLE_ENDIAN);
8264 offset += 4;
8266 proto_tree_add_item(tree, hf_ieee80211_wfa_ie_wme_tspec_susp_int, tvb, offset, 4, ENC_LITTLE_ENDIAN);
8267 offset += 4;
8269 proto_tree_add_item(tree, hf_ieee80211_wfa_ie_wme_tspec_srv_start, tvb, offset, 4, ENC_LITTLE_ENDIAN);
8270 offset += 4;
8272 proto_tree_add_item(tree, hf_ieee80211_wfa_ie_wme_tspec_min_data, tvb, offset, 4, ENC_LITTLE_ENDIAN);
8273 offset += 4;
8275 proto_tree_add_item(tree, hf_ieee80211_wfa_ie_wme_tspec_mean_data, tvb, offset, 4, ENC_LITTLE_ENDIAN);
8276 offset += 4;
8278 proto_tree_add_item(tree, hf_ieee80211_wfa_ie_wme_tspec_peak_data, tvb, offset, 4, ENC_LITTLE_ENDIAN);
8279 offset += 4;
8281 proto_tree_add_item(tree, hf_ieee80211_wfa_ie_wme_tspec_burst_size, tvb, offset, 4, ENC_LITTLE_ENDIAN);
8282 offset += 4;
8284 proto_tree_add_item(tree, hf_ieee80211_wfa_ie_wme_tspec_delay_bound, tvb, offset, 4, ENC_LITTLE_ENDIAN);
8285 offset += 4;
8287 proto_tree_add_item(tree, hf_ieee80211_wfa_ie_wme_tspec_min_phy, tvb, offset, 4, ENC_LITTLE_ENDIAN);
8288 offset += 4;
8290 proto_tree_add_item(tree, hf_ieee80211_wfa_ie_wme_tspec_surplus, tvb, offset, 2, ENC_LITTLE_ENDIAN);
8291 offset += 2;
8293 proto_tree_add_item(tree, hf_ieee80211_wfa_ie_wme_tspec_medium, tvb, offset, 2, ENC_LITTLE_ENDIAN);
8294 offset += 2;
8296 break;
8298 default:
8299 /* No default Action */
8300 break;
8301 } /* End switch (subtype) */
8302 break;
8304 case 4: /* WPS: Wifi Protected Setup */
8306 dissect_wps_tlvs(tree, tvb, offset, tag_len-1, NULL);
8308 break;
8309 default:
8310 /* No default Action...*/
8311 break;
8312 } /* End switch (type) */
8314 return offset;
8317 static void dissect_hs20_indication(proto_tree *tree, tvbuff_t *tvb,
8318 int offset)
8320 proto_tree_add_item(tree, hf_hs20_indication_dgaf_disabled, tvb, offset, 1,
8321 ENC_LITTLE_ENDIAN);
8324 static void
8325 dissect_vendor_ie_wfa(packet_info *pinfo, proto_item *item, tvbuff_t *tag_tvb)
8327 gint tag_len = tvb_length(tag_tvb);
8329 if (tag_len < 4)
8330 return;
8332 switch (tvb_get_guint8(tag_tvb, 3)) {
8333 case WFA_SUBTYPE_P2P:
8334 dissect_wifi_p2p_ie(pinfo, item, tag_tvb, 4, tag_len - 4);
8335 proto_item_append_text(item, ": P2P");
8336 break;
8337 case WFA_SUBTYPE_WIFI_DISPLAY:
8338 dissect_wifi_display_ie(pinfo, item, tag_tvb, 4, tag_len - 4);
8339 proto_item_append_text(item, ": Wi-Fi Display");
8340 break;
8341 case WFA_SUBTYPE_HS20_INDICATION:
8342 dissect_hs20_indication(item, tag_tvb, 4);
8343 proto_item_append_text(item, ": Hotspot 2.0 Indication");
8344 break;
8348 static void
8349 dissect_vendor_ie_rsn(proto_item * item, proto_tree * tree, tvbuff_t * tvb, int offset, guint32 tag_len)
8352 switch(tvb_get_guint8(tvb, offset)){
8353 case 4:
8355 /* IEEE 802.11i / Key Data Encapsulation / Data Type=4 - PMKID.
8356 * This is only used within EAPOL-Key frame Key Data. */
8357 proto_tree_add_item(tree, hf_ieee80211_rsn_ie_pmkid, tvb, offset, 16, ENC_NA);
8359 break;
8360 default:
8361 proto_tree_add_item(tree, hf_ieee80211_rsn_ie_unknown, tvb, offset, tag_len, ENC_NA);
8362 break;
8365 proto_item_append_text(item, ": RSN");
8369 typedef enum {
8370 MARVELL_IE_MESH = 4
8371 } marvell_ie_type_t;
8373 static void
8374 dissect_vendor_ie_marvell(proto_item *item _U_, proto_tree *ietree,
8375 tvbuff_t *tvb, int offset, guint32 tag_len)
8377 guint8 type;
8379 type = tvb_get_guint8(tvb, offset);
8380 proto_tree_add_item (ietree, hf_ieee80211_marvell_ie_type, tvb, offset, 1, ENC_LITTLE_ENDIAN);
8381 offset += 1;
8383 switch (type) {
8384 case MARVELL_IE_MESH:
8385 proto_tree_add_item (ietree, hf_ieee80211_marvell_ie_mesh_subtype, tvb,
8386 offset++, 1, ENC_LITTLE_ENDIAN);
8387 proto_tree_add_item (ietree, hf_ieee80211_marvell_ie_mesh_version, tvb,
8388 offset++, 1, ENC_LITTLE_ENDIAN);
8389 proto_tree_add_item (ietree, hf_ieee80211_marvell_ie_mesh_active_proto_id, tvb,
8390 offset++, 1, ENC_LITTLE_ENDIAN);
8391 proto_tree_add_item (ietree, hf_ieee80211_marvell_ie_mesh_active_metric_id, tvb,
8392 offset++, 1, ENC_LITTLE_ENDIAN);
8393 proto_tree_add_item (ietree, hf_ieee80211_marvell_ie_mesh_cap, tvb,
8394 offset++, 1, ENC_LITTLE_ENDIAN);
8395 break;
8397 default:
8398 proto_tree_add_item(ietree, hf_ieee80211_marvell_ie_data, tvb, offset,
8399 tag_len - 1, ENC_NA);
8400 break;
8404 typedef enum {
8405 ATHEROS_IE_ADVCAP = 1,
8406 ATHEROS_IE_XR = 3
8407 } atheros_ie_type_t;
8409 typedef enum {
8410 ATHEROS_IE_ADVCAP_S = 1
8411 } atheros_ie_advcap_subtype_t;
8413 typedef enum {
8414 ATHEROS_IE_XR_S = 1
8415 } atheros_ie_xr_subtype_t;
8417 typedef enum {
8418 ATHEROS_IE_CAP_TURBOP = 0x01,
8419 ATHEROS_IE_CAP_COMP = 0x02,
8420 ATHEROS_IE_CAP_FF = 0x04,
8421 ATHEROS_IE_CAP_XR = 0x08,
8422 ATHEROS_IE_CAP_AR = 0x10,
8423 ATHEROS_IE_CAP_BURST = 0x20,
8424 ATHEROS_IE_CAP_WME = 0x40,
8425 ATHEROS_IE_CAP_BOOST = 0x80
8426 } atheros_ie_cap_t;
8428 static const value_string atheros_ie_type_vals[] = {
8429 { ATHEROS_IE_ADVCAP, "Advanced Capability"},
8430 { ATHEROS_IE_XR, "eXtended Range"},
8431 { 0, NULL }
8434 static void
8435 dissect_vendor_ie_atheros_cap(proto_item *item _U_, tvbuff_t *tvb, int offset)
8437 proto_tree *cap_tree;
8439 cap_tree = proto_item_add_subtree(item, ett_ath_cap_tree);
8441 proto_tree_add_item(cap_tree, hf_ieee80211_atheros_ie_cap_f_turbop, tvb, offset, 1, ENC_NA);
8442 proto_tree_add_item(cap_tree, hf_ieee80211_atheros_ie_cap_f_comp, tvb, offset, 1, ENC_NA);
8443 proto_tree_add_item(cap_tree, hf_ieee80211_atheros_ie_cap_f_ff, tvb, offset, 1, ENC_NA);
8444 proto_tree_add_item(cap_tree, hf_ieee80211_atheros_ie_cap_f_xr, tvb, offset, 1, ENC_NA);
8445 proto_tree_add_item(cap_tree, hf_ieee80211_atheros_ie_cap_f_ar, tvb, offset, 1, ENC_NA);
8446 proto_tree_add_item(cap_tree, hf_ieee80211_atheros_ie_cap_f_burst, tvb, offset, 1, ENC_NA);
8447 proto_tree_add_item(cap_tree, hf_ieee80211_atheros_ie_cap_f_wme, tvb, offset, 1, ENC_NA);
8448 proto_tree_add_item(cap_tree, hf_ieee80211_atheros_ie_cap_f_boost, tvb, offset, 1, ENC_NA);
8452 static void
8453 dissect_vendor_ie_atheros(proto_item *item _U_, proto_tree *ietree,
8454 tvbuff_t *tvb, int offset, guint tag_len,
8455 packet_info *pinfo, proto_item *ti_len)
8457 guint8 type;
8458 guint8 subtype;
8459 guint8 version;
8460 proto_item *cap_item;
8462 if (tag_len <= 3) {
8463 expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length, "Tag length %u too short, must be >= 6", tag_len+3); /* Add length of OUI to tag_length */
8464 return;
8466 proto_tree_add_item(ietree, hf_ieee80211_atheros_ie_type, tvb, offset, 1, ENC_NA);
8467 type = tvb_get_guint8(tvb, offset);
8468 proto_item_append_text(item, ": %s", val_to_str_const(type, atheros_ie_type_vals, "Unknown"));
8469 offset += 1;
8470 tag_len -= 1;
8472 proto_tree_add_item(ietree, hf_ieee80211_atheros_ie_subtype, tvb, offset, 1, ENC_NA);
8473 subtype = tvb_get_guint8(tvb, offset);
8474 offset += 1;
8475 tag_len -= 1;
8477 proto_tree_add_item(ietree, hf_ieee80211_atheros_ie_version, tvb, offset, 1, ENC_NA);
8478 version = tvb_get_guint8(tvb, offset);
8479 offset += 1;
8480 tag_len -= 1;
8482 if (version == 0)
8484 switch (type) {
8485 case ATHEROS_IE_ADVCAP:
8487 switch (subtype) {
8488 case ATHEROS_IE_ADVCAP_S:
8490 cap_item = proto_tree_add_item(ietree, hf_ieee80211_atheros_ie_advcap_cap, tvb, offset, 1, ENC_NA);
8491 dissect_vendor_ie_atheros_cap(cap_item, tvb, offset);
8492 offset += 1;
8493 tag_len -= 1;
8495 proto_tree_add_item(ietree, hf_ieee80211_atheros_ie_advcap_defkey, tvb, offset, 2, ENC_LITTLE_ENDIAN);
8496 offset += 2;
8497 tag_len -= 2;
8498 break;
8500 default:
8501 /* No default Action */
8502 break;
8503 } /* End switch (subtype) */
8504 break;
8506 case ATHEROS_IE_XR:
8508 switch (subtype) {
8509 case ATHEROS_IE_XR_S:
8511 proto_tree_add_item(ietree, hf_ieee80211_atheros_ie_xr_info, tvb, offset, 1, ENC_NA);
8512 offset += 1;
8513 tag_len -= 1;
8515 proto_tree_add_item(ietree, hf_ieee80211_atheros_ie_xr_base_bssid, tvb, offset, 6, ENC_NA);
8516 offset += 6;
8517 tag_len -= 6;
8519 proto_tree_add_item(ietree, hf_ieee80211_atheros_ie_xr_xr_bssid, tvb, offset, 6, ENC_NA);
8520 offset += 6;
8521 tag_len -= 6;
8523 proto_tree_add_item(ietree, hf_ieee80211_atheros_ie_xr_xr_beacon, tvb, offset, 2, ENC_LITTLE_ENDIAN);
8524 offset += 2;
8525 tag_len -= 2;
8527 cap_item = proto_tree_add_item(ietree, hf_ieee80211_atheros_ie_xr_base_cap, tvb, offset, 1, ENC_NA);
8528 dissect_vendor_ie_atheros_cap(cap_item, tvb, offset);
8529 offset += 1;
8530 tag_len -= 1;
8532 cap_item = proto_tree_add_item(ietree, hf_ieee80211_atheros_ie_xr_xr_cap, tvb, offset, 1, ENC_NA);
8533 dissect_vendor_ie_atheros_cap(cap_item, tvb, offset);
8534 offset += 1;
8535 tag_len -= 1;
8536 break;
8538 default:
8539 /* No default Action */
8540 break;
8541 } /* End switch (subtype) */
8542 break;
8543 default:
8544 /* No default Action */
8545 break;
8546 } /* End switch (type) */
8550 if (tag_len > 0) {
8551 proto_tree_add_item(ietree, hf_ieee80211_atheros_ie_data, tvb, offset, tag_len, ENC_NA);
8555 typedef enum {
8556 AIRONET_IE_UNKNOWN0 = 0,
8557 AIRONET_IE_UNKNOWN1 = 1,
8558 AIRONET_IE_VERSION = 3,
8559 AIRONET_IE_QOS,
8560 AIRONET_IE_UNKNOWN11 = 11,
8561 AIRONET_IE_QBSS_V2 = 14,
8562 AIRONET_IE_CLIENT_MFP = 20
8563 } aironet_ie_type_t;
8565 static const value_string aironet_ie_type_vals[] = {
8566 { AIRONET_IE_UNKNOWN0, "Unknown (0)"},
8567 { AIRONET_IE_UNKNOWN1, "Unknown (1)"},
8568 { AIRONET_IE_VERSION, "CCX version"},
8569 { AIRONET_IE_QOS, "Qos"},
8570 { AIRONET_IE_UNKNOWN11, "Unknown (11)"},
8571 { AIRONET_IE_QBSS_V2, "QBSS V2 - CCA"},
8572 { AIRONET_IE_CLIENT_MFP, "Client MFP"},
8573 { 0, NULL }
8576 static void
8577 dissect_vendor_ie_aironet(proto_item *aironet_item, proto_tree *ietree,
8578 tvbuff_t *tvb, int offset, guint32 tag_len)
8580 guint8 type;
8581 int i;
8582 gboolean dont_change = FALSE; /* Don't change the IE item text to default */
8584 type = tvb_get_guint8(tvb, offset);
8585 proto_tree_add_item (ietree, hf_ieee80211_aironet_ie_type, tvb, offset, 1, ENC_LITTLE_ENDIAN);
8586 offset += 1;
8588 switch (type) {
8589 case AIRONET_IE_VERSION:
8590 proto_tree_add_item (ietree, hf_ieee80211_aironet_ie_version, tvb, offset, 1, ENC_LITTLE_ENDIAN);
8591 proto_item_append_text(aironet_item, ": Aironet CCX version = %d",
8592 tvb_get_guint8(tvb, offset));
8593 dont_change = TRUE;
8594 break;
8595 case AIRONET_IE_QOS:
8596 proto_tree_add_item (ietree, hf_ieee80211_aironet_ie_qos_reserved, tvb, offset, 1, ENC_LITTLE_ENDIAN);
8597 offset += 1;
8598 proto_tree_add_item (ietree, hf_ieee80211_aironet_ie_qos_paramset, tvb, offset, 1, ENC_LITTLE_ENDIAN);
8599 offset += 1;
8601 /* XXX: just copied over from WME. Maybe "Best Effort" and "Background"
8602 * need to be swapped. Also, the "TXOP" may be TXOP - or not.
8604 for (i = 0; i < 4; i++) {
8605 guint8 byte1, byte2;
8606 guint16 txop;
8607 byte1 = tvb_get_guint8(tvb, offset);
8608 byte2 = tvb_get_guint8(tvb, offset + 1);
8609 txop = tvb_get_letohs(tvb, offset + 2);
8610 proto_tree_add_bytes_format(ietree, hf_ieee80211_aironet_ie_qos_val, tvb, offset, 4, NULL,
8611 "CCX QoS Parameters: ACI %u (%s), Admission Control %sMandatory, AIFSN %u, ECWmin %u, ECWmax %u, TXOP %u",
8612 (byte1 & 0x60) >> 5, val_to_str((byte1 & 0x60) >> 5, wme_acs, "(Unknown: %d)"),
8613 (byte1 & 0x10) ? "" : "not ", byte1 & 0x0f,
8614 byte2 & 0x0f, (byte2 & 0xf0) >> 4,
8615 txop);
8616 offset += 4;
8618 break;
8619 case AIRONET_IE_QBSS_V2:
8620 /* Extract Values */
8621 proto_tree_add_item (ietree, hf_ieee80211_qbss2_scount, tvb, offset, 2, ENC_LITTLE_ENDIAN);
8622 proto_tree_add_item (ietree, hf_ieee80211_qbss2_cu, tvb, offset + 2, 1, ENC_BIG_ENDIAN);
8623 proto_tree_add_item (ietree, hf_ieee80211_qbss2_cal, tvb, offset + 3, 1, ENC_BIG_ENDIAN);
8624 proto_tree_add_item (ietree, hf_ieee80211_qbss2_gl, tvb, offset + 4, 1, ENC_BIG_ENDIAN);
8625 break;
8626 case AIRONET_IE_CLIENT_MFP:
8627 proto_tree_add_item (ietree, hf_ieee80211_aironet_ie_clientmfp, tvb, offset, 1, ENC_LITTLE_ENDIAN);
8628 break;
8629 default:
8630 proto_tree_add_item(ietree, hf_ieee80211_aironet_ie_data, tvb, offset,
8631 tag_len - 1, ENC_NA);
8632 break;
8634 if (!dont_change) {
8635 proto_item_append_text(aironet_item, ": Aironet %s",
8636 val_to_str_const(type, aironet_ie_type_vals, "Unknown"));
8640 #define ARUBA_APNAME 3
8641 static const value_string ieee80211_vs_aruba_subtype_vals[] = {
8642 { ARUBA_APNAME, "AP Name"},
8643 { 0, NULL }
8645 static void
8646 dissect_vendor_ie_aruba(proto_item *item, proto_tree *ietree,
8647 tvbuff_t *tvb, int offset, guint32 tag_len)
8649 guint8 type;
8651 offset += 1; /* VS OUI Type */
8652 tag_len -= 1;
8654 type = tvb_get_guint8(tvb, offset);
8655 proto_tree_add_item (ietree, hf_ieee80211_vs_aruba_subtype, tvb, offset, 1, ENC_NA);
8656 proto_item_append_text(item, ": %s", val_to_str_const(type, ieee80211_vs_aruba_subtype_vals, "Unknown"));
8657 offset += 1;
8658 tag_len -= 1;
8660 switch (type) {
8661 case ARUBA_APNAME:
8662 offset += 1;
8663 tag_len -= 1;
8665 proto_tree_add_item (ietree, hf_ieee80211_vs_aruba_apname, tvb,
8666 offset, tag_len, ENC_ASCII|ENC_NA);
8667 proto_item_append_text(item, " (%s)", tvb_get_string(wmem_packet_scope(), tvb, offset, tag_len));
8668 break;
8670 default:
8671 proto_tree_add_item(ietree, hf_ieee80211_vs_aruba_data, tvb, offset,
8672 tag_len, ENC_NA);
8673 proto_item_append_text(item, " (Data: %s)", tvb_bytes_to_str(tvb, offset, tag_len));
8674 break;
8678 enum vs_nintendo_type {
8679 NINTENDO_SERVICES = 0x11,
8680 NINTENDO_CONSOLEID = 0xF0
8683 static const value_string ieee80211_vs_nintendo_type_vals[] = {
8684 { NINTENDO_SERVICES, "Services"},
8685 { NINTENDO_CONSOLEID, "ConsoleID"},
8686 { 0, NULL }
8689 static proto_tree*
8690 dissect_vendor_ie_nintendo_tlv(const int hfindex, proto_tree *ietree,
8691 tvbuff_t *tvb, int offset, guint32 sublen)
8693 proto_item *nintendo_item;
8694 proto_tree *nintendo_tree;
8696 nintendo_item = proto_tree_add_item(ietree, hfindex, tvb, offset, sublen, ENC_NA);
8697 nintendo_tree = proto_item_add_subtree(nintendo_item, ett_nintendo);
8699 proto_tree_add_item(nintendo_tree, hf_ieee80211_vs_nintendo_type, tvb, offset, 1, ENC_NA);
8700 proto_tree_add_item(nintendo_tree, hf_ieee80211_vs_nintendo_length, tvb, offset + 1, 1, ENC_NA);
8702 return nintendo_tree;
8705 static void
8706 dissect_vendor_ie_nintendo(proto_item *item _U_, proto_tree *ietree,
8707 tvbuff_t *tvb, int offset, guint32 tag_len)
8709 proto_tree *nintendo_tree;
8711 guint8 subtype;
8712 guint8 sublength;
8713 guint32 length = tag_len;
8715 /* Skip OUI type for now - the code is for type 1 (StreetPass) only */
8716 /* http://3dbrew.org/wiki/StreetPass */
8717 offset += 1;
8718 length -= 1;
8720 while(length > 0 && length < 256) { /* otherwise we are < 0 but on unsigned */
8721 subtype = tvb_get_guint8(tvb, offset);
8722 sublength = tvb_get_guint8(tvb, offset + 1);
8724 switch(subtype) {
8725 case NINTENDO_SERVICES:
8726 nintendo_tree = dissect_vendor_ie_nintendo_tlv(hf_ieee80211_vs_nintendo_servicelist, ietree, tvb, offset, sublength + 2);
8727 offset += 2;
8728 length -= 2;
8730 while (sublength > 4) {
8732 proto_tree_add_item(nintendo_tree, hf_ieee80211_vs_nintendo_service, tvb, offset, 5, ENC_NA);
8733 offset += 5;
8734 length -= 5;
8735 sublength -= 5;
8737 break;
8738 case NINTENDO_CONSOLEID:
8739 nintendo_tree = dissect_vendor_ie_nintendo_tlv(hf_ieee80211_vs_nintendo_consoleid, ietree, tvb, offset, sublength + 2);
8740 offset += + 2;
8741 length -= + 2;
8743 proto_tree_add_item(nintendo_tree, hf_ieee80211_vs_nintendo_consoleid, tvb, offset, sublength, ENC_NA);
8744 offset += sublength;
8745 length -= sublength;
8746 break;
8747 default:
8748 nintendo_tree = dissect_vendor_ie_nintendo_tlv(hf_ieee80211_vs_nintendo_unknown, ietree, tvb, offset, sublength + 2);
8749 offset += + 2;
8750 length -= + 2;
8752 proto_tree_add_item(nintendo_tree, hf_ieee80211_vs_nintendo_unknown, tvb, offset, sublength, ENC_NA);
8753 offset += sublength;
8754 length -= sublength;
8755 break;
8760 /* 802.11e 7.3.2.33 QoS Capability element */
8761 static int
8762 dissect_qos_capability(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset, int ftype)
8764 proto_item *cap_info_item;
8765 proto_tree *cap_info_tree;
8767 cap_info_item = proto_tree_add_item(tree, hf_ieee80211_tag_qos_cap_qos_info, tvb, offset, 1, ENC_NA);
8768 cap_info_tree = proto_item_add_subtree(cap_info_item, ett_qos_info_field_tree);
8769 switch (ftype) {
8770 case MGT_ASSOC_REQ:
8771 case MGT_PROBE_REQ:
8772 case MGT_REASSOC_REQ:
8774 /* To AP so decode as STA: Figure 33h-QoS Info field when set by a non-AP QSTA */
8775 proto_tree_add_item(cap_info_tree, hf_ieee80211_qos_info_field_vo_uapsd, tvb, offset, 1, ENC_LITTLE_ENDIAN);
8776 proto_tree_add_item(cap_info_tree, hf_ieee80211_qos_info_field_vi_uapsd, tvb, offset, 1, ENC_LITTLE_ENDIAN);
8777 proto_tree_add_item(cap_info_tree, hf_ieee80211_qos_info_field_bk_uapsd, tvb, offset, 1, ENC_LITTLE_ENDIAN);
8778 proto_tree_add_item(cap_info_tree, hf_ieee80211_qos_info_field_be_uapsd, tvb, offset, 1, ENC_LITTLE_ENDIAN);
8779 proto_tree_add_item(cap_info_tree, hf_ieee80211_qos_info_field_qack, tvb, offset, 1, ENC_LITTLE_ENDIAN);
8780 proto_tree_add_item(cap_info_tree, hf_ieee80211_qos_info_field_max_sp_length, tvb, offset, 1, ENC_LITTLE_ENDIAN);
8781 proto_tree_add_item(cap_info_tree, hf_ieee80211_qos_info_field_more_data_ack, tvb, offset, 1, ENC_LITTLE_ENDIAN);
8782 break;
8784 case MGT_BEACON:
8785 case MGT_PROBE_RESP:
8786 case MGT_ASSOC_RESP:
8787 case MGT_REASSOC_RESP:
8789 /* From AP so decode as AP: Figure 33g-QoS Info field when sent by a QAP */
8790 proto_tree_add_item(cap_info_tree, hf_ieee80211_qos_info_field_edca_upd_cnt, tvb, offset, 1, ENC_LITTLE_ENDIAN);
8791 proto_tree_add_item(cap_info_tree, hf_ieee80211_qos_info_field_qack, tvb, offset, 1, ENC_LITTLE_ENDIAN);
8792 proto_tree_add_item(cap_info_tree, hf_ieee80211_qos_info_field_queue_req, tvb, offset, 1, ENC_LITTLE_ENDIAN);
8793 proto_tree_add_item(cap_info_tree, hf_ieee80211_qos_info_field_txop_req, tvb, offset, 1, ENC_LITTLE_ENDIAN);
8794 proto_tree_add_item(cap_info_tree, hf_ieee80211_qos_info_field_reserved, tvb, offset, 1, ENC_LITTLE_ENDIAN);
8795 break;
8797 default:
8798 expert_add_info_format(pinfo, cap_info_item, &ei_ieee80211_wfa_ie_wme_qos_info_bad_ftype, "Could not deduce direction to decode correctly, ftype %u", ftype);
8799 break;
8802 return offset + 1;
8805 /* 7.3.2.25 RSN information element */
8806 static int
8807 dissect_rsn_ie(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb,
8808 int offset, guint32 tag_len)
8810 proto_item *rsn_gcs_item, *rsn_pcs_item, *rsn_akms_item, *rsn_cap_item, *rsn_pmkid_item, *rsn_gmcs_item;
8811 proto_item *rsn_sub_pcs_item, *rsn_sub_akms_item;
8812 proto_item *rsn_pcs_count, *rsn_akms_count, *rsn_pmkid_count;
8813 proto_tree *rsn_gcs_tree, *rsn_pcs_tree, *rsn_akms_tree, *rsn_cap_tree, *rsn_pmkid_tree, *rsn_gmcs_tree;
8814 proto_tree *rsn_sub_pcs_tree, *rsn_sub_akms_tree;
8815 guint16 pcs_count, akms_count, pmkid_count;
8816 guint ii;
8817 int tag_end = offset + tag_len;
8819 proto_tree_add_item(tree, hf_ieee80211_rsn_version, tvb, offset, 2, ENC_LITTLE_ENDIAN);
8820 offset += 2;
8822 /* 7.3.2.25.1 Group Cipher suites */
8823 rsn_gcs_item = proto_tree_add_item(tree, hf_ieee80211_rsn_gcs, tvb, offset, 4, ENC_BIG_ENDIAN);
8824 rsn_gcs_tree = proto_item_add_subtree(rsn_gcs_item, ett_rsn_gcs_tree);
8825 proto_tree_add_item(rsn_gcs_tree, hf_ieee80211_rsn_gcs_oui, tvb, offset, 3, ENC_BIG_ENDIAN);
8827 /* Check if OUI is 00:0F:AC (ieee80211) */
8828 if (tvb_get_ntoh24(tvb, offset) == OUI_RSN)
8830 proto_tree_add_item(rsn_gcs_tree, hf_ieee80211_rsn_gcs_80211_type, tvb, offset + 3, 1, ENC_BIG_ENDIAN);
8831 } else {
8832 proto_tree_add_item(rsn_gcs_tree, hf_ieee80211_rsn_gcs_type, tvb, offset + 3, 1, ENC_BIG_ENDIAN);
8834 offset += 4;
8836 /* 7.3.2.25.2 Pairwise Cipher suites */
8837 rsn_pcs_count = proto_tree_add_item(tree, hf_ieee80211_rsn_pcs_count, tvb, offset, 2, ENC_LITTLE_ENDIAN);
8838 pcs_count = tvb_get_letohs(tvb, offset);
8839 offset += 2;
8841 if (offset + (pcs_count * 4) > tag_end)
8843 expert_add_info_format(pinfo, rsn_pcs_count, &ei_ieee80211_rsn_pcs_count,
8844 "Pairwise Cipher Suite Count too large, 4*%u > %d", pcs_count, tag_end - offset);
8845 pcs_count = (tag_end - offset) / 4;
8848 rsn_pcs_item = proto_tree_add_item(tree, hf_ieee80211_rsn_pcs_list, tvb, offset, pcs_count * 4, ENC_NA);
8849 rsn_pcs_tree = proto_item_add_subtree(rsn_pcs_item, ett_rsn_pcs_tree);
8850 for (ii = 0; ii < pcs_count; ii++)
8852 rsn_sub_pcs_item = proto_tree_add_item(rsn_pcs_tree, hf_ieee80211_rsn_pcs, tvb, offset, 4, ENC_BIG_ENDIAN);
8853 rsn_sub_pcs_tree = proto_item_add_subtree(rsn_sub_pcs_item, ett_rsn_sub_pcs_tree);
8854 proto_tree_add_item(rsn_sub_pcs_tree, hf_ieee80211_rsn_pcs_oui, tvb, offset, 3, ENC_BIG_ENDIAN);
8856 /* Check if OUI is 00:0F:AC (ieee80211) */
8857 if (tvb_get_ntoh24(tvb, offset) == OUI_RSN)
8859 proto_tree_add_item(rsn_sub_pcs_tree, hf_ieee80211_rsn_pcs_80211_type, tvb, offset+3, 1, ENC_BIG_ENDIAN);
8860 proto_item_append_text(rsn_pcs_item, " %s", rsn_pcs_return(tvb_get_ntohl(tvb, offset)));
8861 } else {
8862 proto_tree_add_item(rsn_sub_pcs_tree, hf_ieee80211_rsn_pcs_type, tvb, offset+3, 1, ENC_BIG_ENDIAN);
8864 offset += 4;
8867 if (offset >= tag_end)
8869 return offset;
8872 /* 7.3.2.25.2 AKM suites */
8873 rsn_akms_count = proto_tree_add_item(tree, hf_ieee80211_rsn_akms_count, tvb, offset, 2, ENC_LITTLE_ENDIAN);
8874 akms_count = tvb_get_letohs(tvb, offset);
8875 offset += 2;
8877 if (offset + (akms_count * 4) > tag_end)
8879 expert_add_info_format(pinfo, rsn_akms_count, &ei_ieee80211_rsn_pmkid_count,
8880 "Auth Key Management (AKM) Suite Count too large, 4*%u > %d", akms_count, tag_end - offset);
8881 akms_count = (tag_end - offset) / 4;
8884 rsn_akms_item = proto_tree_add_item(tree, hf_ieee80211_rsn_akms_list, tvb, offset, akms_count * 4, ENC_NA);
8885 rsn_akms_tree = proto_item_add_subtree(rsn_akms_item, ett_rsn_akms_tree);
8886 for (ii = 0; ii < akms_count; ii++)
8888 rsn_sub_akms_item = proto_tree_add_item(rsn_akms_tree, hf_ieee80211_rsn_akms, tvb, offset, 4, ENC_BIG_ENDIAN);
8889 rsn_sub_akms_tree = proto_item_add_subtree(rsn_sub_akms_item, ett_rsn_sub_akms_tree);
8890 proto_tree_add_item(rsn_sub_akms_tree, hf_ieee80211_rsn_akms_oui, tvb, offset, 3, ENC_BIG_ENDIAN);
8892 /* Check if OUI is 00:0F:AC (ieee80211) */
8893 if (tvb_get_ntoh24(tvb, offset) == OUI_RSN)
8895 proto_tree_add_item(rsn_sub_akms_tree, hf_ieee80211_rsn_akms_80211_type, tvb, offset+3, 1, ENC_BIG_ENDIAN);
8896 proto_item_append_text(rsn_akms_item, " %s", rsn_akms_return(tvb_get_ntohl(tvb, offset)));
8897 } else {
8898 proto_tree_add_item(rsn_sub_akms_tree, hf_ieee80211_rsn_akms_type, tvb, offset+3, 1, ENC_BIG_ENDIAN);
8900 offset += 4;
8903 /* 7.3.2.25.3 RSN capabilities */
8904 rsn_cap_item = proto_tree_add_item(tree, hf_ieee80211_rsn_cap, tvb, offset, 2, ENC_LITTLE_ENDIAN);
8905 rsn_cap_tree = proto_item_add_subtree(rsn_cap_item, ett_rsn_cap_tree);
8907 proto_tree_add_item(rsn_cap_tree, hf_ieee80211_rsn_cap_preauth, tvb, offset, 2, ENC_LITTLE_ENDIAN);
8908 proto_tree_add_item(rsn_cap_tree, hf_ieee80211_rsn_cap_no_pairwise, tvb, offset, 2, ENC_LITTLE_ENDIAN);
8909 proto_tree_add_item(rsn_cap_tree, hf_ieee80211_rsn_cap_ptksa_replay_counter, tvb, offset, 2, ENC_LITTLE_ENDIAN);
8910 proto_tree_add_item(rsn_cap_tree, hf_ieee80211_rsn_cap_gtksa_replay_counter, tvb, offset, 2, ENC_LITTLE_ENDIAN);
8911 proto_tree_add_item(rsn_cap_tree, hf_ieee80211_rsn_cap_mfpr, tvb, offset, 2, ENC_LITTLE_ENDIAN);
8912 proto_tree_add_item(rsn_cap_tree, hf_ieee80211_rsn_cap_mfpc, tvb, offset, 2, ENC_LITTLE_ENDIAN);
8913 proto_tree_add_item(rsn_cap_tree, hf_ieee80211_rsn_cap_peerkey, tvb, offset, 2, ENC_LITTLE_ENDIAN);
8914 offset += 2;
8915 if (offset >= tag_end)
8917 return offset;
8919 /* 7.3.2.25.4 PMKID */
8920 rsn_pmkid_count = proto_tree_add_item(tree, hf_ieee80211_rsn_pmkid_count, tvb, offset, 2, ENC_LITTLE_ENDIAN);
8921 pmkid_count = tvb_get_letohs(tvb, offset);
8922 offset += 2;
8924 if (offset + (pmkid_count * 16) > tag_end)
8926 expert_add_info_format(pinfo, rsn_pmkid_count, &ei_ieee80211_pmkid_count_too_large,
8927 "PMKID Count too large, 16*%u > %d", pmkid_count, tag_end - offset);
8928 pmkid_count = (tag_end - offset) / 16;
8931 rsn_pmkid_item = proto_tree_add_item(tree, hf_ieee80211_rsn_pmkid_list, tvb, offset, pmkid_count * 16, ENC_NA);
8932 rsn_pmkid_tree = proto_item_add_subtree(rsn_pmkid_item, ett_rsn_pmkid_tree);
8933 for (ii = 0; ii < pmkid_count; ii++)
8935 proto_tree_add_item(rsn_pmkid_tree, hf_ieee80211_rsn_pmkid, tvb, offset, 16, ENC_NA);
8936 offset += 16;
8939 if (offset >= tag_end)
8941 return offset;
8943 /* Group Management Cipher Suite (802.11w)*/
8944 rsn_gmcs_item = proto_tree_add_item(tree, hf_ieee80211_rsn_gmcs, tvb, offset, 4, ENC_BIG_ENDIAN);
8945 rsn_gmcs_tree = proto_item_add_subtree(rsn_gmcs_item, ett_rsn_gmcs_tree);
8946 proto_tree_add_item(rsn_gmcs_tree, hf_ieee80211_rsn_gmcs_oui, tvb, offset, 3, ENC_BIG_ENDIAN);
8947 /* Check if OUI is 00:0F:AC (ieee80211) */
8948 if (tvb_get_ntoh24(tvb, offset) == OUI_RSN)
8950 proto_tree_add_item(rsn_gmcs_tree, hf_ieee80211_rsn_gmcs_80211_type, tvb, offset + 3, 1, ENC_BIG_ENDIAN);
8951 } else {
8952 proto_tree_add_item(rsn_gmcs_tree, hf_ieee80211_rsn_gmcs_type, tvb, offset + 3, 1, ENC_BIG_ENDIAN);
8954 offset += 4;
8956 return offset;
8958 static int
8959 dissect_extended_capabilities_ie(packet_info *pinfo, proto_tree *tree,
8960 proto_item *ti, proto_item *ti_len,
8961 guint32 tag_len, tvbuff_t *tvb,
8962 int offset, int tag_end)
8964 proto_item *ti_ex_cap;
8965 proto_tree *ex_cap_tree;
8967 if (tag_len < 1)
8969 expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length, "Tag length %u too short, must be greater than 0", tag_len);
8970 return offset;
8972 proto_item_append_text(ti, " (%u octet%s)", tag_len, plurality(tag_len, "", "s"));
8974 /* Extended Capability octet 1 */
8975 ti_ex_cap = proto_tree_add_item(tree, hf_ieee80211_tag_extended_capabilities, tvb, offset, 1, ENC_NA);
8976 proto_item_append_text(ti_ex_cap, " (octet 1)");
8977 ex_cap_tree = proto_item_add_subtree (ti_ex_cap, ett_tag_ex_cap1);
8978 proto_tree_add_item(ex_cap_tree, hf_ieee80211_tag_extended_capabilities_b0, tvb, offset, 1, ENC_NA);
8979 proto_tree_add_item(ex_cap_tree, hf_ieee80211_tag_extended_capabilities_b1, tvb, offset, 1, ENC_NA);
8980 proto_tree_add_item(ex_cap_tree, hf_ieee80211_tag_extended_capabilities_b2, tvb, offset, 1, ENC_NA);
8981 proto_tree_add_item(ex_cap_tree, hf_ieee80211_tag_extended_capabilities_b3, tvb, offset, 1, ENC_NA);
8982 proto_tree_add_item(ex_cap_tree, hf_ieee80211_tag_extended_capabilities_b4, tvb, offset, 1, ENC_NA);
8983 proto_tree_add_item(ex_cap_tree, hf_ieee80211_tag_extended_capabilities_b5, tvb, offset, 1, ENC_NA);
8984 proto_tree_add_item(ex_cap_tree, hf_ieee80211_tag_extended_capabilities_b6, tvb, offset, 1, ENC_NA);
8985 proto_tree_add_item(ex_cap_tree, hf_ieee80211_tag_extended_capabilities_b7, tvb, offset, 1, ENC_NA);
8986 offset += 1;
8988 /* Extended Capability octet 2 */
8989 if (offset >= tag_end) {
8990 return offset;
8992 ti_ex_cap = proto_tree_add_item(tree, hf_ieee80211_tag_extended_capabilities, tvb, offset, 1, ENC_NA);
8993 proto_item_append_text(ti_ex_cap, " (octet 2)");
8994 ex_cap_tree = proto_item_add_subtree (ti_ex_cap, ett_tag_ex_cap2);
8995 proto_tree_add_item(ex_cap_tree, hf_ieee80211_tag_extended_capabilities_b8, tvb, offset, 1, ENC_NA);
8996 proto_tree_add_item(ex_cap_tree, hf_ieee80211_tag_extended_capabilities_b9, tvb, offset, 1, ENC_NA);
8997 proto_tree_add_item(ex_cap_tree, hf_ieee80211_tag_extended_capabilities_b10, tvb, offset, 1, ENC_NA);
8998 proto_tree_add_item(ex_cap_tree, hf_ieee80211_tag_extended_capabilities_b11, tvb, offset, 1, ENC_NA);
8999 proto_tree_add_item(ex_cap_tree, hf_ieee80211_tag_extended_capabilities_b12, tvb, offset, 1, ENC_NA);
9000 proto_tree_add_item(ex_cap_tree, hf_ieee80211_tag_extended_capabilities_b13, tvb, offset, 1, ENC_NA);
9001 proto_tree_add_item(ex_cap_tree, hf_ieee80211_tag_extended_capabilities_b14, tvb, offset, 1, ENC_NA);
9002 proto_tree_add_item(ex_cap_tree, hf_ieee80211_tag_extended_capabilities_b15, tvb, offset, 1, ENC_NA);
9003 offset += 1;
9005 /* Extended Capability octet 3 */
9006 if (offset >= tag_end) {
9007 return offset;
9009 ti_ex_cap = proto_tree_add_item(tree, hf_ieee80211_tag_extended_capabilities, tvb, offset, 1, ENC_NA);
9010 proto_item_append_text(ti_ex_cap, " (octet 3)");
9011 ex_cap_tree = proto_item_add_subtree (ti_ex_cap, ett_tag_ex_cap3);
9012 proto_tree_add_item(ex_cap_tree, hf_ieee80211_tag_extended_capabilities_b16, tvb, offset, 1, ENC_NA);
9013 proto_tree_add_item(ex_cap_tree, hf_ieee80211_tag_extended_capabilities_b17, tvb, offset, 1, ENC_NA);
9014 proto_tree_add_item(ex_cap_tree, hf_ieee80211_tag_extended_capabilities_b18, tvb, offset, 1, ENC_NA);
9015 proto_tree_add_item(ex_cap_tree, hf_ieee80211_tag_extended_capabilities_b19, tvb, offset, 1, ENC_NA);
9016 proto_tree_add_item(ex_cap_tree, hf_ieee80211_tag_extended_capabilities_b20, tvb, offset, 1, ENC_NA);
9017 proto_tree_add_item(ex_cap_tree, hf_ieee80211_tag_extended_capabilities_b21, tvb, offset, 1, ENC_NA);
9018 proto_tree_add_item(ex_cap_tree, hf_ieee80211_tag_extended_capabilities_b22, tvb, offset, 1, ENC_NA);
9019 proto_tree_add_item(ex_cap_tree, hf_ieee80211_tag_extended_capabilities_b23, tvb, offset, 1, ENC_NA);
9020 offset += 1;
9022 /* Extended Capability octet 4 */
9023 if (offset >= tag_end) {
9024 return offset;
9026 ti_ex_cap = proto_tree_add_item(tree, hf_ieee80211_tag_extended_capabilities, tvb, offset, 1, ENC_NA);
9027 proto_item_append_text(ti_ex_cap, " (octet 4)");
9028 ex_cap_tree = proto_item_add_subtree(ti_ex_cap, ett_tag_ex_cap4);
9029 proto_tree_add_item(ex_cap_tree, hf_ieee80211_tag_extended_capabilities_b24, tvb, offset, 1, ENC_NA);
9030 proto_tree_add_item(ex_cap_tree, hf_ieee80211_tag_extended_capabilities_b25, tvb, offset, 1, ENC_NA);
9031 proto_tree_add_item(ex_cap_tree, hf_ieee80211_tag_extended_capabilities_b26, tvb, offset, 1, ENC_NA);
9032 proto_tree_add_item(ex_cap_tree, hf_ieee80211_tag_extended_capabilities_b27, tvb, offset, 1, ENC_NA);
9033 proto_tree_add_item(ex_cap_tree, hf_ieee80211_tag_extended_capabilities_b28, tvb, offset, 1, ENC_NA);
9034 proto_tree_add_item(ex_cap_tree, hf_ieee80211_tag_extended_capabilities_b29, tvb, offset, 1, ENC_NA);
9035 proto_tree_add_item(ex_cap_tree, hf_ieee80211_tag_extended_capabilities_b30, tvb, offset, 1, ENC_NA);
9036 proto_tree_add_item(ex_cap_tree, hf_ieee80211_tag_extended_capabilities_b31, tvb, offset, 1, ENC_NA);
9037 offset += 1;
9039 /* Extended Capability octet 5 */
9040 if (offset >= tag_end) {
9041 return offset;
9043 ti_ex_cap = proto_tree_add_item(tree, hf_ieee80211_tag_extended_capabilities, tvb, offset, 1, ENC_NA);
9044 proto_item_append_text(ti_ex_cap, " (octet 5)");
9045 ex_cap_tree = proto_item_add_subtree(ti_ex_cap, ett_tag_ex_cap5);
9046 proto_tree_add_item(ex_cap_tree, hf_ieee80211_tag_extended_capabilities_b32, tvb, offset, 1, ENC_NA);
9047 proto_tree_add_item(ex_cap_tree, hf_ieee80211_tag_extended_capabilities_b33, tvb, offset, 1, ENC_NA);
9048 proto_tree_add_item(ex_cap_tree, hf_ieee80211_tag_extended_capabilities_b34, tvb, offset, 1, ENC_NA);
9049 proto_tree_add_item(ex_cap_tree, hf_ieee80211_tag_extended_capabilities_b35, tvb, offset, 1, ENC_NA);
9050 proto_tree_add_item(ex_cap_tree, hf_ieee80211_tag_extended_capabilities_b36, tvb, offset, 1, ENC_NA);
9051 proto_tree_add_item(ex_cap_tree, hf_ieee80211_tag_extended_capabilities_b37, tvb, offset, 1, ENC_NA);
9052 proto_tree_add_item(ex_cap_tree, hf_ieee80211_tag_extended_capabilities_b38, tvb, offset, 1, ENC_NA);
9053 proto_tree_add_item(ex_cap_tree, hf_ieee80211_tag_extended_capabilities_b39, tvb, offset, 1, ENC_NA);
9054 offset += 1;
9056 /* Extended Capability octet 6 */
9057 if (offset >= tag_end) {
9058 return offset;
9060 ti_ex_cap = proto_tree_add_item(tree, hf_ieee80211_tag_extended_capabilities, tvb, offset, 1, ENC_NA);
9061 proto_item_append_text(ti_ex_cap, " (octet 6)");
9062 ex_cap_tree = proto_item_add_subtree(ti_ex_cap, ett_tag_ex_cap6);
9063 proto_tree_add_item(ex_cap_tree, hf_ieee80211_tag_extended_capabilities_b40, tvb, offset, 1, ENC_NA);
9064 proto_tree_add_item(ex_cap_tree, hf_ieee80211_tag_extended_capabilities_serv_int_granularity, tvb, offset, 1, ENC_NA);
9065 proto_tree_add_item(ex_cap_tree, hf_ieee80211_tag_extended_capabilities_b44, tvb, offset, 1, ENC_NA);
9066 proto_tree_add_item(ex_cap_tree, hf_ieee80211_tag_extended_capabilities_b45, tvb, offset, 1, ENC_NA);
9067 proto_tree_add_item(ex_cap_tree, hf_ieee80211_tag_extended_capabilities_b46, tvb, offset, 1, ENC_NA);
9068 proto_tree_add_item(ex_cap_tree, hf_ieee80211_tag_extended_capabilities_b47, tvb, offset, 1, ENC_NA);
9069 offset += 1;
9072 /* Extended Capability octet 7 */
9073 if (offset >= tag_end) {
9074 return offset;
9076 ti_ex_cap = proto_tree_add_item(tree, hf_ieee80211_tag_extended_capabilities, tvb, offset, 1, ENC_NA);
9077 proto_item_append_text(ti_ex_cap, " (octet 7)");
9078 ex_cap_tree = proto_item_add_subtree(ti_ex_cap, ett_tag_ex_cap7);
9079 proto_tree_add_item(ex_cap_tree, hf_ieee80211_tag_extended_capabilities_b48, tvb, offset, 1, ENC_NA);
9080 proto_tree_add_item(ex_cap_tree, hf_ieee80211_tag_extended_capabilities_o7, tvb, offset, 1, ENC_NA);
9081 offset += 1;
9083 /* Extended Capability octet 8 */
9084 if (offset >= tag_end) {
9085 return offset;
9087 ti_ex_cap = proto_tree_add_item(tree, hf_ieee80211_tag_extended_capabilities, tvb, offset, 1, ENC_NA);
9088 proto_item_append_text(ti_ex_cap, " (octet 8)");
9089 ex_cap_tree = proto_item_add_subtree(ti_ex_cap, ett_tag_ex_cap8);
9090 proto_tree_add_item(ex_cap_tree, hf_ieee80211_tag_extended_capabilities_o8, tvb, offset, 1, ENC_NA);
9091 offset += 1;
9093 return offset;
9095 static int
9096 dissect_vht_mcs_set(proto_tree *tree, tvbuff_t *tvb, int offset)
9098 proto_item *ti;
9099 proto_tree *mcs_tree, *rx_mcs_tree, *tx_mcs_tree;
9101 /* 8 byte Supported MCS set */
9102 ti = proto_tree_add_item(tree, hf_ieee80211_vht_mcsset, tvb, offset, 8, ENC_NA);
9104 mcs_tree = proto_item_add_subtree(ti, ett_vht_mcsset_tree);
9106 ti = proto_tree_add_item(mcs_tree, hf_ieee80211_vht_mcsset_rx_mcs_map, tvb, offset, 2, ENC_LITTLE_ENDIAN);
9107 rx_mcs_tree = proto_item_add_subtree(ti, ett_vht_rx_mcsbit_tree);
9109 /* B0 - B15 */
9110 proto_tree_add_item(rx_mcs_tree, hf_ieee80211_vht_mcsset_rx_max_mcs_for_1_ss, tvb, offset, 2, ENC_LITTLE_ENDIAN);
9111 proto_tree_add_item(rx_mcs_tree, hf_ieee80211_vht_mcsset_rx_max_mcs_for_2_ss, tvb, offset, 2, ENC_LITTLE_ENDIAN);
9112 proto_tree_add_item(rx_mcs_tree, hf_ieee80211_vht_mcsset_rx_max_mcs_for_3_ss, tvb, offset, 2, ENC_LITTLE_ENDIAN);
9113 proto_tree_add_item(rx_mcs_tree, hf_ieee80211_vht_mcsset_rx_max_mcs_for_4_ss, tvb, offset, 2, ENC_LITTLE_ENDIAN);
9114 proto_tree_add_item(rx_mcs_tree, hf_ieee80211_vht_mcsset_rx_max_mcs_for_5_ss, tvb, offset, 2, ENC_LITTLE_ENDIAN);
9115 proto_tree_add_item(rx_mcs_tree, hf_ieee80211_vht_mcsset_rx_max_mcs_for_6_ss, tvb, offset, 2, ENC_LITTLE_ENDIAN);
9116 proto_tree_add_item(rx_mcs_tree, hf_ieee80211_vht_mcsset_rx_max_mcs_for_7_ss, tvb, offset, 2, ENC_LITTLE_ENDIAN);
9117 proto_tree_add_item(rx_mcs_tree, hf_ieee80211_vht_mcsset_rx_max_mcs_for_8_ss, tvb, offset, 2, ENC_LITTLE_ENDIAN);
9119 offset += 2;
9120 /* B16 - B28 13 bits*/
9121 proto_tree_add_item(mcs_tree, hf_ieee80211_vht_mcsset_rx_highest_long_gi, tvb, offset, 2, ENC_LITTLE_ENDIAN);
9123 /* B29 - B31 2 reserved bits*/
9125 offset += 2;
9126 /* B32 - B47 */
9128 ti = proto_tree_add_item(mcs_tree, hf_ieee80211_vht_mcsset_tx_mcs_map, tvb, offset, 2, ENC_LITTLE_ENDIAN);
9129 tx_mcs_tree = proto_item_add_subtree(ti, ett_vht_tx_mcsbit_tree);
9130 proto_tree_add_item(tx_mcs_tree, hf_ieee80211_vht_mcsset_tx_max_mcs_for_1_ss, tvb, offset, 2, ENC_LITTLE_ENDIAN);
9131 proto_tree_add_item(tx_mcs_tree, hf_ieee80211_vht_mcsset_tx_max_mcs_for_2_ss, tvb, offset, 2, ENC_LITTLE_ENDIAN);
9132 proto_tree_add_item(tx_mcs_tree, hf_ieee80211_vht_mcsset_tx_max_mcs_for_3_ss, tvb, offset, 2, ENC_LITTLE_ENDIAN);
9133 proto_tree_add_item(tx_mcs_tree, hf_ieee80211_vht_mcsset_tx_max_mcs_for_4_ss, tvb, offset, 2, ENC_LITTLE_ENDIAN);
9134 proto_tree_add_item(tx_mcs_tree, hf_ieee80211_vht_mcsset_tx_max_mcs_for_5_ss, tvb, offset, 2, ENC_LITTLE_ENDIAN);
9135 proto_tree_add_item(tx_mcs_tree, hf_ieee80211_vht_mcsset_tx_max_mcs_for_6_ss, tvb, offset, 2, ENC_LITTLE_ENDIAN);
9136 proto_tree_add_item(tx_mcs_tree, hf_ieee80211_vht_mcsset_tx_max_mcs_for_7_ss, tvb, offset, 2, ENC_LITTLE_ENDIAN);
9137 proto_tree_add_item(tx_mcs_tree, hf_ieee80211_vht_mcsset_tx_max_mcs_for_8_ss, tvb, offset, 2, ENC_LITTLE_ENDIAN);
9139 offset += 2;
9140 /* B48 - B60 13 bits */
9141 proto_tree_add_item(mcs_tree, hf_ieee80211_vht_mcsset_tx_highest_long_gi, tvb, offset, 2, ENC_LITTLE_ENDIAN);
9142 /* B61 - B63 2 reserved bits*/
9144 offset += 2;
9145 return offset;
9148 static int
9149 dissect_vht_capability_ie(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset,
9150 guint32 tag_len, proto_item *ti_len)
9152 proto_item *cap_item;
9153 proto_tree *cap_tree;
9155 if (tag_len != 12) {
9156 expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length,
9157 "VHT Capabilities IE length %u wrong, must be = 12", tag_len);
9158 return offset;
9161 /* 4 byte VHT Capabilities Info*/
9162 cap_item = proto_tree_add_item(tree, hf_ieee80211_vht_cap, tvb, offset, 4, ENC_LITTLE_ENDIAN);
9164 cap_tree = proto_item_add_subtree(cap_item, ett_vht_cap_tree);
9166 /* B0 - B1 2 bits */
9167 proto_tree_add_item(cap_tree, hf_ieee80211_vht_max_mpdu_length, tvb, offset, 4, ENC_LITTLE_ENDIAN);
9168 /* B2 - B3 2 bits*/
9169 proto_tree_add_item(cap_tree, hf_ieee80211_vht_supported_chan_width_set, tvb, offset, 4, ENC_LITTLE_ENDIAN);
9171 /* B4 - B7 4x 1 bit fields */
9172 proto_tree_add_item(cap_tree, hf_ieee80211_vht_rx_ldpc, tvb, offset, 4, ENC_LITTLE_ENDIAN);
9173 proto_tree_add_item(cap_tree, hf_ieee80211_vht_short_gi_for_80, tvb, offset, 4, ENC_LITTLE_ENDIAN);
9174 proto_tree_add_item(cap_tree, hf_ieee80211_vht_short_gi_for_160, tvb, offset, 4, ENC_LITTLE_ENDIAN);
9175 proto_tree_add_item(cap_tree, hf_ieee80211_vht_tx_stbc, tvb, offset, 4, ENC_LITTLE_ENDIAN);
9177 /* End of first byte */
9179 /* B8 - B10 3 bit field */
9180 proto_tree_add_item(cap_tree, hf_ieee80211_vht_rx_stbc, tvb, offset, 4, ENC_LITTLE_ENDIAN);
9182 /* B11 - B12 2x 1 bit fields */
9183 proto_tree_add_item(cap_tree, hf_ieee80211_vht_su_beamformer_cap, tvb, offset, 4, ENC_LITTLE_ENDIAN);
9184 proto_tree_add_item(cap_tree, hf_ieee80211_vht_su_beamformee_cap, tvb, offset, 4, ENC_LITTLE_ENDIAN);
9186 /* B13 - B15 3 bit field */
9187 proto_tree_add_item(cap_tree, hf_ieee80211_vht_beamformer_antennas, tvb, offset, 4, ENC_LITTLE_ENDIAN);
9189 /* End of second byte */
9191 /* B16 - B18 */
9192 proto_tree_add_item(cap_tree, hf_ieee80211_vht_sounding_dimensions, tvb, offset, 4, ENC_LITTLE_ENDIAN);
9193 /* B19 */
9194 proto_tree_add_item(cap_tree, hf_ieee80211_vht_mu_beamformer_cap, tvb, offset, 4, ENC_LITTLE_ENDIAN);
9196 /* B20 - B22 2x 1 bit fields */
9197 proto_tree_add_item(cap_tree, hf_ieee80211_vht_mu_beamformee_cap, tvb, offset, 4, ENC_LITTLE_ENDIAN);
9198 proto_tree_add_item(cap_tree, hf_ieee80211_vht_txop_ps, tvb, offset, 4, ENC_LITTLE_ENDIAN);
9199 proto_tree_add_item(cap_tree, hf_ieee80211_vht_var_htc_field, tvb, offset, 4, ENC_LITTLE_ENDIAN);
9201 /* B23 - B25 3 bit field which takes us 2 bits into next byte */
9202 proto_tree_add_item(cap_tree, hf_ieee80211_vht_max_ampdu, tvb, offset, 4, ENC_LITTLE_ENDIAN);
9204 /* B26 - B27 2 bit field */
9205 proto_tree_add_item(cap_tree, hf_ieee80211_vht_link_adaptation_cap, tvb, offset, 4, ENC_LITTLE_ENDIAN);
9207 /* B28 - B29 2x 1 bit fields */
9208 proto_tree_add_item(cap_tree, hf_ieee80211_vht_rx_pattern, tvb, offset, 4, ENC_LITTLE_ENDIAN);
9209 proto_tree_add_item(cap_tree, hf_ieee80211_vht_tx_pattern, tvb, offset, 4, ENC_LITTLE_ENDIAN);
9211 /* B30 - B31 Reserved */
9212 proto_tree_add_item(cap_tree, hf_ieee80211_vht_reserv, tvb, offset, 4, ENC_LITTLE_ENDIAN);
9214 offset += 4;
9216 /* 8 byte MCS set */
9217 offset = dissect_vht_mcs_set(tree, tvb, offset);
9219 return offset;
9222 static int
9223 dissect_vht_operation_ie(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset,
9224 guint32 tag_len, proto_item *ti_len)
9226 proto_item *op_item, *ti;
9227 proto_tree *op_tree, *basic_mcs_tree;
9229 if (tag_len != 5) {
9230 expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length,
9231 "VHT Operation IE length %u wrong, must be = 5", tag_len);
9232 return offset;
9235 /* 3 byte VHT Operation Info*/
9236 op_item = proto_tree_add_item(tree, hf_ieee80211_vht_op, tvb, offset, 3, ENC_NA);
9237 op_tree = proto_item_add_subtree(op_item, ett_vht_op_tree);
9238 proto_tree_add_item(op_tree, hf_ieee80211_vht_op_channel_width, tvb, offset, 1, ENC_LITTLE_ENDIAN);
9239 proto_tree_add_item(op_tree, hf_ieee80211_vht_op_channel_center0, tvb, offset+1, 1, ENC_LITTLE_ENDIAN);
9240 proto_tree_add_item(op_tree, hf_ieee80211_vht_op_channel_center1, tvb, offset+2, 1, ENC_LITTLE_ENDIAN);
9242 offset += 3;
9243 /* VHT Basic MCS Set */
9244 ti = proto_tree_add_item(tree, hf_ieee80211_vht_op_basic_mcs_map, tvb, offset, 2, ENC_LITTLE_ENDIAN);
9245 basic_mcs_tree = proto_item_add_subtree(ti, ett_vht_basic_mcsbit_tree);
9246 proto_tree_add_item(basic_mcs_tree, hf_ieee80211_vht_op_max_basic_mcs_for_1_ss, tvb, offset, 2, ENC_LITTLE_ENDIAN);
9247 proto_tree_add_item(basic_mcs_tree, hf_ieee80211_vht_op_max_basic_mcs_for_2_ss, tvb, offset, 2, ENC_LITTLE_ENDIAN);
9248 proto_tree_add_item(basic_mcs_tree, hf_ieee80211_vht_op_max_basic_mcs_for_3_ss, tvb, offset, 2, ENC_LITTLE_ENDIAN);
9249 proto_tree_add_item(basic_mcs_tree, hf_ieee80211_vht_op_max_basic_mcs_for_4_ss, tvb, offset, 2, ENC_LITTLE_ENDIAN);
9250 proto_tree_add_item(basic_mcs_tree, hf_ieee80211_vht_op_max_basic_mcs_for_5_ss, tvb, offset, 2, ENC_LITTLE_ENDIAN);
9251 proto_tree_add_item(basic_mcs_tree, hf_ieee80211_vht_op_max_basic_mcs_for_6_ss, tvb, offset, 2, ENC_LITTLE_ENDIAN);
9252 proto_tree_add_item(basic_mcs_tree, hf_ieee80211_vht_op_max_basic_mcs_for_7_ss, tvb, offset, 2, ENC_LITTLE_ENDIAN);
9253 proto_tree_add_item(basic_mcs_tree, hf_ieee80211_vht_op_max_basic_mcs_for_8_ss, tvb, offset, 2, ENC_LITTLE_ENDIAN);
9255 offset += 2;
9257 return offset;
9260 static int
9261 dissect_vht_tx_pwr_envelope(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset,
9262 guint32 tag_len, proto_item *ti_len)
9264 proto_item *tx_pwr_item, *ti;
9265 proto_tree *tx_pwr_info_tree;
9266 guint8 opt_ie_cnt=0;
9267 guint8 i;
9269 if (tag_len < 2 && tag_len <= 5) {
9270 expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length,
9271 "VHT TX PWR Envelope IE length %u wrong, must be >= 2 and <= 5", tag_len);
9272 return offset;
9275 tx_pwr_item = proto_tree_add_item(tree, hf_ieee80211_vht_tpe_pwr_info, tvb, offset, 1, ENC_NA);
9276 tx_pwr_info_tree = proto_item_add_subtree(tx_pwr_item, ett_vht_tpe_info_tree);
9278 ti = proto_tree_add_item(tx_pwr_info_tree, hf_ieee80211_vht_tpe_pwr_info_count, tvb, offset, 1, ENC_LITTLE_ENDIAN);
9279 proto_tree_add_item(tx_pwr_info_tree, hf_ieee80211_vht_tpe_pwr_info_unit, tvb, offset, 1, ENC_LITTLE_ENDIAN);
9280 proto_tree_add_item(tx_pwr_info_tree, hf_ieee80211_vht_tpe_pwr_info_reserved, tvb, offset, 1, ENC_LITTLE_ENDIAN);
9282 opt_ie_cnt = tvb_get_guint8(tvb, offset) & 0x07;
9284 offset += 1;
9286 /* Power Constraint info is mandatory only for 20MHz, others are optional*/
9287 /* Power is expressed in terms of 0.5dBm from -64 to 63 and is encoded
9288 * as 8-bit 2's compliment */
9289 for (i = 0; i <= opt_ie_cnt; i++) {
9290 switch(i) {
9291 case 0:
9292 proto_tree_add_item(tree, hf_ieee80211_vht_tpe_pwr_constr_20, tvb, offset, 1, ENC_NA);
9293 offset += 1;
9294 break;
9295 case 1:
9296 proto_tree_add_item(tree, hf_ieee80211_vht_tpe_pwr_constr_40, tvb, offset, 1, ENC_NA);
9297 offset += 1;
9298 break;
9299 case 2:
9300 proto_tree_add_item(tree, hf_ieee80211_vht_tpe_pwr_constr_80, tvb, offset, 1, ENC_NA);
9301 offset += 1;
9302 break;
9303 case 3:
9304 proto_tree_add_item(tree, hf_ieee80211_vht_tpe_pwr_constr_160, tvb, offset, 1, ENC_NA);
9305 offset += 1;
9306 break;
9307 default:
9308 expert_add_info(pinfo, ti, &ei_ieee80211_vht_tpe_pwr_info_count);
9309 offset += 1;
9310 break;
9314 return offset;
9317 static void
9318 dissect_mobility_domain(proto_tree *tree, tvbuff_t *tvb, int offset,
9319 guint32 tag_len)
9321 if (tag_len < 3) {
9322 proto_tree_add_string(tree, hf_ieee80211_tag_interpretation, tvb, offset, tag_len,
9323 "MDIE content length must be at least 3 bytes");
9324 return;
9327 proto_tree_add_item(tree, hf_ieee80211_tag_mobility_domain_mdid,
9328 tvb, offset, 2, ENC_LITTLE_ENDIAN);
9329 proto_tree_add_item(tree, hf_ieee80211_tag_mobility_domain_ft_capab,
9330 tvb, offset + 2, 1, ENC_BIG_ENDIAN);
9331 proto_tree_add_item(tree, hf_ieee80211_tag_mobility_domain_ft_capab_ft_over_ds,
9332 tvb, offset + 2, 1, ENC_BIG_ENDIAN);
9333 proto_tree_add_item(tree, hf_ieee80211_tag_mobility_domain_ft_capab_resource_req,
9334 tvb, offset + 2, 1, ENC_BIG_ENDIAN);
9337 static void
9338 dissect_fast_bss_transition(proto_tree *tree, tvbuff_t *tvb, int offset,
9339 guint32 tag_len)
9341 int end = offset + tag_len;
9342 if (tag_len < 82) {
9343 proto_tree_add_string(tree, hf_ieee80211_tag_interpretation, tvb, offset, tag_len,
9344 "FTIE content length must be at least 82 bytes");
9345 return;
9348 proto_tree_add_item(tree, hf_ieee80211_tag_ft_mic_control,
9349 tvb, offset, 2, ENC_LITTLE_ENDIAN);
9350 proto_tree_add_item(tree, hf_ieee80211_tag_ft_element_count,
9351 tvb, offset, 2, ENC_LITTLE_ENDIAN);
9352 offset += 2;
9353 proto_tree_add_item(tree, hf_ieee80211_tag_ft_mic,
9354 tvb, offset, 16, ENC_NA);
9355 offset += 16;
9356 proto_tree_add_item(tree, hf_ieee80211_tag_ft_anonce,
9357 tvb, offset, 32, ENC_NA);
9358 offset += 32;
9359 proto_tree_add_item(tree, hf_ieee80211_tag_ft_snonce,
9360 tvb, offset, 32, ENC_NA);
9361 offset += 32;
9363 while (offset + 2 <= end) {
9364 guint8 id, len;
9365 int s_end;
9366 proto_tree_add_item(tree, hf_ieee80211_tag_ft_subelem_id,
9367 tvb, offset, 1, ENC_BIG_ENDIAN);
9368 id = tvb_get_guint8(tvb, offset);
9369 offset += 1;
9371 proto_tree_add_item(tree, hf_ieee80211_tag_ft_subelem_len,
9372 tvb, offset, 1, ENC_BIG_ENDIAN);
9373 len = tvb_get_guint8(tvb, offset);
9374 offset += 1;
9376 if (offset + len > end) {
9377 proto_tree_add_string(tree, hf_ieee80211_tag_interpretation, tvb, offset,
9378 end - offset, "Invalid FTIE subelement");
9379 return;
9382 s_end = offset + len;
9383 switch (id) {
9384 case 1:
9385 proto_tree_add_item(tree, hf_ieee80211_tag_ft_subelem_r1kh_id,
9386 tvb, offset, len, ENC_NA);
9387 break;
9388 case 2:
9389 proto_tree_add_item(tree, hf_ieee80211_tag_ft_subelem_gtk_key_info,
9390 tvb, offset, 2, ENC_LITTLE_ENDIAN);
9391 proto_tree_add_item(tree, hf_ieee80211_tag_ft_subelem_gtk_key_id,
9392 tvb, offset, 2, ENC_LITTLE_ENDIAN);
9393 offset += 2;
9394 if (offset > s_end)
9395 break;
9396 proto_tree_add_item(tree, hf_ieee80211_tag_ft_subelem_gtk_key_length,
9397 tvb, offset, 1, ENC_BIG_ENDIAN);
9398 offset += 1;
9399 if (offset > s_end)
9400 break;
9401 proto_tree_add_item(tree, hf_ieee80211_tag_ft_subelem_gtk_rsc,
9402 tvb, offset, 8, ENC_NA);
9403 offset += 8;
9404 if (offset > s_end)
9405 break;
9406 proto_tree_add_item(tree, hf_ieee80211_tag_ft_subelem_gtk_key,
9407 tvb, offset, s_end - offset, ENC_NA);
9408 break;
9409 case 3:
9410 proto_tree_add_item(tree, hf_ieee80211_tag_ft_subelem_r0kh_id,
9411 tvb, offset, len, ENC_ASCII|ENC_NA);
9412 break;
9413 case 4:
9414 proto_tree_add_item(tree, hf_ieee80211_tag_ft_subelem_igtk_key_id,
9415 tvb, offset, 2, ENC_LITTLE_ENDIAN);
9416 offset += 2;
9417 if (offset > s_end)
9418 break;
9419 proto_tree_add_item(tree, hf_ieee80211_tag_ft_subelem_igtk_ipn,
9420 tvb, offset, 6, ENC_NA);
9421 offset += 6;
9422 if (offset > s_end)
9423 break;
9424 proto_tree_add_item(tree, hf_ieee80211_tag_ft_subelem_igtk_key_length,
9425 tvb, offset, 1, ENC_BIG_ENDIAN);
9426 offset += 1;
9427 if (offset > s_end)
9428 break;
9429 proto_tree_add_item(tree, hf_ieee80211_tag_ft_subelem_igtk_key,
9430 tvb, offset, 24, ENC_NA);
9431 break;
9432 default:
9433 proto_tree_add_item(tree, hf_ieee80211_tag_ft_subelem_data,
9434 tvb, offset, len, ENC_NA);
9435 break;
9437 offset = s_end;
9441 static void
9442 dissect_mmie(proto_tree *tree, tvbuff_t *tvb, int offset, guint32 tag_len)
9444 if (tag_len < 16) {
9445 proto_tree_add_string(tree, hf_ieee80211_tag_interpretation, tvb, offset, tag_len,
9446 "MMIE content length must be at least 16 bytes");
9447 return;
9450 proto_tree_add_item(tree, hf_ieee80211_tag_mmie_keyid, tvb, offset, 2, ENC_LITTLE_ENDIAN);
9451 proto_tree_add_item(tree, hf_ieee80211_tag_mmie_ipn, tvb, offset + 2, 6,
9452 ENC_NA);
9453 proto_tree_add_item(tree, hf_ieee80211_tag_mmie_mic, tvb, offset + 8, 8,
9454 ENC_NA);
9457 static void
9458 dissect_ssid_list(proto_tree *tree, tvbuff_t *tvb, int offset, guint32 tag_len)
9460 int end = offset + tag_len;
9461 proto_item *ssid;
9462 proto_tree *entry;
9463 gboolean first = TRUE;
9465 while (offset + 1 <= end) {
9466 guint8 len = tvb_get_guint8(tvb, offset + 1);
9467 guint8 *str;
9469 if (offset + 2 + len > end)
9470 break;
9472 str = tvb_get_string(wmem_packet_scope(), tvb, offset + 2, len);
9473 proto_item_append_text(tree, "%c %s", (first ? ':' : ','), str);
9474 first = FALSE;
9475 ssid = proto_tree_add_text(tree, tvb, offset, 2 + len, "SSID: %s", str);
9476 entry = proto_item_add_subtree(ssid, ett_ssid_list);
9477 proto_tree_add_item(entry, hf_ieee80211_tag_number, tvb, offset, 1,
9478 ENC_BIG_ENDIAN);
9479 offset++;
9480 proto_tree_add_uint(entry, hf_ieee80211_tag_length, tvb, offset, 1, len);
9481 offset++;
9482 proto_tree_add_item(entry, hf_ieee80211_tag_ssid, tvb, offset, len,
9483 ENC_ASCII|ENC_NA);
9484 offset += len;
9488 static void
9489 dissect_link_identifier(proto_tree *tree, tvbuff_t *tvb, int offset,
9490 guint32 tag_len)
9492 if (tag_len < 18) {
9493 proto_tree_add_string(tree, hf_ieee80211_tag_interpretation, tvb, offset, tag_len,
9494 "Link Identifier content length must be at least "
9495 "18 bytes");
9496 return;
9499 proto_tree_add_item(tree, hf_ieee80211_tag_link_id_bssid, tvb,
9500 offset, 6, ENC_NA);
9501 proto_tree_add_item(tree, hf_ieee80211_tag_link_id_init_sta, tvb,
9502 offset + 6, 6, ENC_NA);
9503 proto_tree_add_item(tree, hf_ieee80211_tag_link_id_resp_sta, tvb,
9504 offset + 12, 6, ENC_NA);
9507 static void
9508 dissect_wakeup_schedule(proto_tree *tree, tvbuff_t *tvb, int offset,
9509 guint32 tag_len)
9511 if (tag_len < 18) {
9512 proto_tree_add_string(tree, hf_ieee80211_tag_interpretation, tvb, offset, tag_len,
9513 "Wakeup Schedule content length must be at least "
9514 "18 bytes");
9515 return;
9518 proto_tree_add_item(tree, hf_ieee80211_tag_wakeup_schedule_offset, tvb,
9519 offset, 4, ENC_LITTLE_ENDIAN);
9520 offset += 4;
9522 proto_tree_add_item(tree, hf_ieee80211_tag_wakeup_schedule_interval, tvb,
9523 offset, 4, ENC_LITTLE_ENDIAN);
9524 offset += 4;
9526 proto_tree_add_item(tree,
9527 hf_ieee80211_tag_wakeup_schedule_awake_window_slots, tvb,
9528 offset, 4, ENC_LITTLE_ENDIAN);
9529 offset += 4;
9531 proto_tree_add_item(tree, hf_ieee80211_tag_wakeup_schedule_max_awake_dur,
9532 tvb, offset, 4, ENC_LITTLE_ENDIAN);
9533 offset += 4;
9535 proto_tree_add_item(tree, hf_ieee80211_tag_wakeup_schedule_idle_count, tvb,
9536 offset, 2, ENC_LITTLE_ENDIAN);
9539 static void
9540 dissect_channel_switch_timing(proto_tree *tree, tvbuff_t *tvb, int offset,
9541 guint32 tag_len)
9543 if (tag_len < 4) {
9544 proto_tree_add_string(tree, hf_ieee80211_tag_interpretation, tvb, offset, tag_len,
9545 "Channel Switch Timing content length must be at "
9546 "least 4 bytes");
9547 return;
9550 proto_tree_add_item(tree, hf_ieee80211_tag_channel_switch_timing_switch_time,
9551 tvb, offset, 2, ENC_LITTLE_ENDIAN);
9552 offset += 2;
9554 proto_tree_add_item(tree,
9555 hf_ieee80211_tag_channel_switch_timing_switch_timeout,
9556 tvb, offset, 2, ENC_LITTLE_ENDIAN);
9559 static void
9560 dissect_pti_control(proto_tree *tree, tvbuff_t *tvb, int offset,
9561 guint32 tag_len)
9563 if (tag_len < 3) {
9564 proto_tree_add_string(tree, hf_ieee80211_tag_interpretation, tvb, offset, tag_len,
9565 "PTI Control content length must be at least "
9566 "3 bytes");
9567 return;
9570 proto_tree_add_item(tree, hf_ieee80211_tag_pti_control_tid, tvb,
9571 offset, 1, ENC_BIG_ENDIAN);
9572 offset += 1;
9574 proto_tree_add_item(tree, hf_ieee80211_tag_pti_control_sequence_control, tvb,
9575 offset, 2, ENC_LITTLE_ENDIAN);
9578 static void
9579 dissect_pu_buffer_status(proto_tree *tree, tvbuff_t *tvb, int offset,
9580 guint32 tag_len)
9582 if (tag_len < 1) {
9583 proto_tree_add_string(tree, hf_ieee80211_tag_interpretation, tvb, offset, tag_len,
9584 "PU Buffer Status content length must be at least "
9585 "1 byte");
9586 return;
9589 proto_tree_add_item(tree, hf_ieee80211_tag_pu_buffer_status_ac_bk, tvb,
9590 offset, 1, ENC_BIG_ENDIAN);
9591 proto_tree_add_item(tree, hf_ieee80211_tag_pu_buffer_status_ac_be, tvb,
9592 offset, 1, ENC_BIG_ENDIAN);
9593 proto_tree_add_item(tree, hf_ieee80211_tag_pu_buffer_status_ac_vi, tvb,
9594 offset, 1, ENC_BIG_ENDIAN);
9595 proto_tree_add_item(tree, hf_ieee80211_tag_pu_buffer_status_ac_vo, tvb,
9596 offset, 1, ENC_BIG_ENDIAN);
9599 static void
9600 dissect_timeout_interval(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset,
9601 guint32 tag_len)
9603 proto_item *pi;
9605 pi = proto_tree_add_item(tree, hf_ieee80211_tag_timeout_int_type, tvb,
9606 offset, 1, ENC_BIG_ENDIAN);
9607 if (tag_len < 5) {
9608 expert_add_info_format(pinfo, pi, &ei_ieee80211_tag_length,
9609 "Timeout Interval content length must be at least "
9610 "5 bytes");
9611 return;
9614 proto_tree_add_item(tree, hf_ieee80211_tag_timeout_int_value, tvb,
9615 offset + 1, 4, ENC_LITTLE_ENDIAN);
9618 static int
9619 dissect_ric_data(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset,
9620 guint32 tag_len, proto_item *ti, proto_item *ti_len, int ftype)
9623 proto_tree *sub_tree;
9624 guint8 desc_cnt = 0;
9625 guint32 next_ie;
9626 int offset_r = 0;
9628 if (tag_len != 4) {
9629 expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length,
9630 "RIC Data Length must be 4 bytes");
9631 return 0;
9634 proto_tree_add_item(tree, hf_ieee80211_tag_ric_data_id, tvb,
9635 offset, 1, ENC_LITTLE_ENDIAN);
9636 offset += 1;
9638 desc_cnt = tvb_get_guint8(tvb,offset);
9639 proto_tree_add_item(tree, hf_ieee80211_tag_ric_data_desc_cnt, tvb,
9640 offset, 1, ENC_LITTLE_ENDIAN);
9641 offset += 1;
9643 proto_tree_add_item(tree, hf_ieee80211_tag_ric_data_status_code, tvb,
9644 offset, 2, ENC_LITTLE_ENDIAN);
9645 offset += 2;
9647 /* Our Design is such that all the Resource request IE's part of the RIC
9648 * must be in the sub tree of RIC for better readability
9649 * Even omnipeek does the same way.
9651 sub_tree = proto_item_add_subtree(tree, ett_tag_ric_data_desc_ie);
9653 proto_item_append_text(ti, " :Resource Descriptor List");
9654 if (desc_cnt == 0) {
9655 proto_item_append_text(ti, " :0 (Weird?)");
9658 while ( desc_cnt !=0 ) {
9660 next_ie = tvb_get_guint8(tvb,offset);
9661 proto_item_append_text(ti, " :(%d:%s)", desc_cnt,val_to_str_ext(next_ie, &tag_num_vals_ext, "Reserved (%d)"));
9662 /* Recursive call to avoid duplication of code*/
9663 offset_r = add_tagged_field(pinfo, sub_tree, tvb, offset, ftype);
9664 if (offset_r == 0 )/* should never happen, returns a min of 2*/
9665 break;
9666 /* This will ensure that the IE after RIC is processed
9667 * only once. This gives us a good looking RIC IE :-)
9669 tag_len += offset_r;
9670 desc_cnt--;
9673 return tag_len;
9676 static int
9677 dissect_ric_descriptor(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset,
9678 guint32 tag_len, proto_item *ti, proto_item *ti_len)
9681 guint8 rsrc_type = 0;
9683 if (tag_len < 1) {
9684 expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length,
9685 "RIC Data Length must be at least 1 byte");
9686 return 0;
9689 rsrc_type = tvb_get_guint8(tvb,offset);
9690 proto_tree_add_item(tree, hf_ieee80211_tag_ric_desc_rsrc_type, tvb,
9691 offset, 1, ENC_LITTLE_ENDIAN);
9692 offset += 1;
9694 if (rsrc_type == 1) {
9695 /* Block ACK params
9696 * 802.11-2012: 8.4.2.53 RIC Descriptor element
9697 * Block Ack parameter set as defined in 8.4.1.14,
9698 * Block Ack timeout value as defined in 8.4.1.15, and
9699 * Block Ack starting sequence control as defined in 8.3.1.8
9701 /* TODO: Still figuring out how to parse these ones,
9702 * need a sample capture with at least HEX Dump
9704 proto_item_append_text(ti, " :RIC Descriptors: Block ACK Params");
9705 proto_tree_add_item(tree, hf_ieee80211_tag_ric_desc_var_params, tvb,
9706 offset, tag_len-1, ENC_NA);
9707 offset += tag_len -1;
9708 }else {
9709 /* 0,2-255 are reserved*/
9710 proto_item_append_text(ti, " :RIC Descriptors: 0(Reserved)");
9712 return offset;
9714 static int
9715 dissect_mcs_set(proto_tree *tree, tvbuff_t *tvb, int offset, gboolean basic, gboolean vs)
9717 proto_item *ti;
9718 proto_tree *mcs_tree, *bit_tree;
9720 /* 16 byte Supported MCS set */
9721 if (vs)
9723 ti = proto_tree_add_string(tree, hf_ieee80211_mcsset_vs, tvb, offset, 16,
9724 basic ? "Basic MCS Set" : "MCS Set");
9725 } else
9727 ti = proto_tree_add_string(tree, hf_ieee80211_mcsset, tvb, offset, 16,
9728 basic ? "Basic MCS Set" : "MCS Set");
9730 mcs_tree = proto_item_add_subtree(ti, ett_mcsset_tree);
9732 /* Rx MCS Bitmask */
9733 ti = proto_tree_add_item(mcs_tree, hf_ieee80211_mcsset_rx_bitmask, tvb, offset, 10, ENC_NA);
9734 bit_tree = proto_item_add_subtree(ti, ett_mcsbit_tree);
9736 /* Bits 0 - 31 */
9737 proto_tree_add_item(bit_tree, hf_ieee80211_mcsset_rx_bitmask_0to7, tvb, offset, 4, ENC_LITTLE_ENDIAN);
9738 proto_tree_add_item(bit_tree, hf_ieee80211_mcsset_rx_bitmask_8to15, tvb, offset, 4, ENC_LITTLE_ENDIAN);
9739 proto_tree_add_item(bit_tree, hf_ieee80211_mcsset_rx_bitmask_16to23, tvb, offset, 4, ENC_LITTLE_ENDIAN);
9740 proto_tree_add_item(bit_tree, hf_ieee80211_mcsset_rx_bitmask_24to31, tvb, offset, 4, ENC_LITTLE_ENDIAN);
9741 offset += 4;
9743 /* Bits 32 - 52 */
9744 proto_tree_add_item(bit_tree, hf_ieee80211_mcsset_rx_bitmask_32, tvb, offset , 4, ENC_LITTLE_ENDIAN);
9745 proto_tree_add_item(bit_tree, hf_ieee80211_mcsset_rx_bitmask_33to38, tvb, offset, 4, ENC_LITTLE_ENDIAN);
9746 proto_tree_add_item(bit_tree, hf_ieee80211_mcsset_rx_bitmask_39to52, tvb, offset, 4, ENC_LITTLE_ENDIAN);
9747 offset += 2;
9749 /* Bits 53 - 76 */
9750 proto_tree_add_item(bit_tree, hf_ieee80211_mcsset_rx_bitmask_53to76, tvb, offset, 4, ENC_LITTLE_ENDIAN);
9751 offset += 4;
9753 proto_tree_add_item(mcs_tree, hf_ieee80211_mcsset_highest_data_rate, tvb, offset, 2, ENC_LITTLE_ENDIAN);
9754 offset += 2;
9756 proto_tree_add_item(mcs_tree, hf_ieee80211_mcsset_tx_mcs_set_defined, tvb, offset, 1,
9757 ENC_LITTLE_ENDIAN);
9758 proto_tree_add_item(mcs_tree, hf_ieee80211_mcsset_tx_rx_mcs_set_not_equal, tvb, offset, 1,
9759 ENC_LITTLE_ENDIAN);
9760 proto_tree_add_item(mcs_tree, hf_ieee80211_mcsset_tx_max_spatial_streams, tvb, offset, 1,
9761 ENC_LITTLE_ENDIAN);
9762 proto_tree_add_item(mcs_tree, hf_ieee80211_mcsset_tx_unequal_modulation, tvb, offset, 1,
9763 ENC_LITTLE_ENDIAN);
9764 offset += 1;
9766 offset += 3;
9767 return offset;
9770 /* 802.11n D1.10 - HT Information IE */
9771 static int
9772 dissect_ht_info_ie_1_1(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset,
9773 guint32 tag_len, proto_item *ti_len)
9775 proto_item *cap_item;
9776 proto_tree *cap_tree;
9778 cap_tree = tree;
9780 if (tag_len < 22) {
9781 expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length,
9782 "HT Information IE content length %u wrong, must be at least 22 bytes", tag_len);
9783 return offset;
9787 proto_tree_add_item(cap_tree, hf_ieee80211_ht_info_primary_channel, tvb, offset, 1, ENC_LITTLE_ENDIAN);
9788 offset += 1;
9790 cap_item = proto_tree_add_item(tree, hf_ieee80211_ht_info_delimiter1, tvb,
9791 offset, 1, ENC_LITTLE_ENDIAN);
9792 cap_tree = proto_item_add_subtree(cap_item, ett_ht_info_delimiter1_tree);
9793 proto_tree_add_item(cap_tree, hf_ieee80211_ht_info_secondary_channel_offset, tvb,
9794 offset, 1, ENC_LITTLE_ENDIAN);
9795 proto_tree_add_item(cap_tree, hf_ieee80211_ht_info_channel_width, tvb,
9796 offset, 1, ENC_LITTLE_ENDIAN);
9797 proto_tree_add_item(cap_tree, hf_ieee80211_ht_info_rifs_mode, tvb,
9798 offset, 1, ENC_LITTLE_ENDIAN);
9799 proto_tree_add_item(cap_tree, hf_ieee80211_ht_info_psmp_stas_only, tvb,
9800 offset, 1, ENC_LITTLE_ENDIAN);
9801 proto_tree_add_item(cap_tree, hf_ieee80211_ht_info_service_interval_granularity, tvb,
9802 offset, 1, ENC_LITTLE_ENDIAN);
9803 offset += 1;
9805 cap_item = proto_tree_add_item(tree, hf_ieee80211_ht_info_delimiter2, tvb,
9806 offset, 2, ENC_LITTLE_ENDIAN);
9807 cap_tree = proto_item_add_subtree(cap_item, ett_ht_info_delimiter2_tree);
9808 proto_tree_add_item(cap_tree, hf_ieee80211_ht_info_operating_mode, tvb,
9809 offset, 1, ENC_LITTLE_ENDIAN);
9810 proto_tree_add_item(cap_tree, hf_ieee80211_ht_info_non_greenfield_sta_present, tvb,
9811 offset, 1, ENC_LITTLE_ENDIAN);
9812 proto_tree_add_item(cap_tree, hf_ieee80211_ht_info_transmit_burst_limit, tvb,
9813 offset, 1, ENC_LITTLE_ENDIAN);
9814 proto_tree_add_item(cap_tree, hf_ieee80211_ht_info_obss_non_ht_stas_present, tvb,
9815 offset, 1, ENC_LITTLE_ENDIAN);
9816 proto_tree_add_item(cap_tree, hf_ieee80211_ht_info_reserved_1, tvb,
9817 offset, 2, ENC_LITTLE_ENDIAN);
9818 offset += 2;
9820 cap_item = proto_tree_add_item(tree, hf_ieee80211_ht_info_delimiter3, tvb,
9821 offset, 2, ENC_LITTLE_ENDIAN);
9822 cap_tree = proto_item_add_subtree(cap_item, ett_ht_info_delimiter3_tree);
9823 proto_tree_add_item(cap_tree, hf_ieee80211_ht_info_reserved_2, tvb,
9824 offset, 1, ENC_LITTLE_ENDIAN);
9825 proto_tree_add_item(cap_tree, hf_ieee80211_ht_info_dual_beacon, tvb,
9826 offset, 1, ENC_LITTLE_ENDIAN);
9827 proto_tree_add_item(cap_tree, hf_ieee80211_ht_info_dual_cts_protection, tvb,
9828 offset, 1, ENC_LITTLE_ENDIAN);
9829 offset += 1;
9830 proto_tree_add_item(cap_tree, hf_ieee80211_ht_info_secondary_beacon, tvb,
9831 offset, 1, ENC_LITTLE_ENDIAN);
9832 proto_tree_add_item(cap_tree, hf_ieee80211_ht_info_lsig_txop_protection_full_support, tvb,
9833 offset, 1, ENC_LITTLE_ENDIAN);
9834 proto_tree_add_item(cap_tree, hf_ieee80211_ht_info_pco_active, tvb,
9835 offset, 1, ENC_LITTLE_ENDIAN);
9836 proto_tree_add_item(cap_tree, hf_ieee80211_ht_info_pco_phase, tvb,
9837 offset, 1, ENC_LITTLE_ENDIAN);
9838 proto_tree_add_item(cap_tree, hf_ieee80211_ht_info_reserved_3, tvb,
9839 offset, 1, ENC_LITTLE_ENDIAN);
9840 offset += 1;
9842 offset = dissect_mcs_set(tree, tvb, offset, TRUE, FALSE);
9844 return offset;
9848 static int
9849 dissect_wapi_param_set(tvbuff_t *tvb, packet_info *pinfo,
9850 proto_tree *tree, int offset, guint32 tag_len, proto_item *ti_len,
9851 proto_item *ti, int ftype)
9853 /* Parse the WAPI Parameter Set IE Here*/
9854 proto_item *item;
9855 proto_tree *subtree;
9856 guint16 loop_cnt, version = 1, akm_cnt = 1, ucast_cnt = 1, bkid_cnt = 1;
9857 guint8 akm_suite_type = 0, ucast_cipher_type = 0, mcast_cipher_type = 0;
9859 version = tvb_get_letohs(tvb, offset);
9860 proto_tree_add_item(tree, hf_ieee80211_tag_wapi_param_set_version, tvb, offset, 2, ENC_LITTLE_ENDIAN);
9861 offset += 2;
9863 /*MIN: 2 + (2+4)+ (2+4) + 4 + 2 + 0 (BKID CNT and LIST) =20*/
9864 if (tag_len < 20) {
9865 expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length,
9866 "tag_len is %d, its neither WAPI not BSS-AC-Access-Delay", tag_len);
9867 return offset;
9870 if (version != 1) {
9871 expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length,
9872 "Version of WAPI protocol is %d, must be = 1", version);
9873 return offset;
9876 /* AKM Suites: list can't be 0*/
9877 akm_cnt = tvb_get_letohs(tvb, offset);
9878 item = proto_tree_add_item(tree, hf_ieee80211_tag_wapi_param_set_akm_suite_count, tvb, offset, 2, ENC_LITTLE_ENDIAN);
9879 offset += 2;
9880 if (akm_cnt != 0) {
9881 proto_item_append_text(ti, " : AKM Suite List:");
9882 for (loop_cnt = 0; loop_cnt < akm_cnt; loop_cnt++) {
9883 subtree = proto_item_add_subtree(item, ett_tag_wapi_param_set_akm_tree);
9884 proto_tree_add_item(subtree, hf_ieee80211_tag_wapi_param_set_akm_suite_oui, tvb, offset, 3, ENC_NA);
9885 offset += 3;
9886 akm_suite_type = tvb_get_guint8(tvb,offset);
9887 proto_tree_add_item(subtree, hf_ieee80211_tag_wapi_param_set_akm_suite_type, tvb, offset, 1, ENC_LITTLE_ENDIAN);
9888 offset += 1;
9889 proto_item_append_text(ti, " (%d,%s)", loop_cnt+1,val_to_str(akm_suite_type,
9890 ieee80211_wapi_suite_type_short,"Reserved: %d"));
9892 proto_item_append_text(ti, " /");
9893 } else {
9894 expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length, "Number of AKM suites is 0, must be min 1");
9895 return offset;
9898 /* Unicast Cipher Suites: list can't be 0*/
9899 ucast_cnt = tvb_get_letohs(tvb, offset);
9900 item = proto_tree_add_item(tree, hf_ieee80211_tag_wapi_param_set_ucast_cipher_suite_count,
9901 tvb, offset, 2, ENC_LITTLE_ENDIAN);
9902 offset += 2;
9903 if (ucast_cnt != 0) {
9904 proto_item_append_text(ti, " Unicast Cipher List:");
9905 for (loop_cnt = 0; loop_cnt < ucast_cnt; loop_cnt++) {
9906 subtree = proto_item_add_subtree(item, ett_tag_wapi_param_set_ucast_tree);
9907 proto_tree_add_item(subtree, hf_ieee80211_tag_wapi_param_set_ucast_cipher_suite_oui, tvb, offset, 3, ENC_NA);
9908 offset += 3;
9909 ucast_cipher_type = tvb_get_guint8(tvb,offset);
9910 proto_tree_add_item(subtree, hf_ieee80211_tag_wapi_param_set_ucast_cipher_suite_type, tvb, offset, 1, ENC_LITTLE_ENDIAN);
9911 offset += 1;
9912 proto_item_append_text(ti, " (%d,%s)", loop_cnt+1, val_to_str(ucast_cipher_type,ieee80211_wapi_cipher_type,"Reserved: %d"));
9914 proto_item_append_text(ti, " /");
9915 } else {
9916 expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length, "Number of Unicast Cipher suites is 0, must be min 1");
9917 return offset;
9921 /* Multicast Cipher Suites*/
9922 proto_tree_add_item(tree, hf_ieee80211_tag_wapi_param_set_mcast_cipher_suite_oui, tvb, offset, 3, ENC_NA);
9923 offset += 3;
9924 mcast_cipher_type = tvb_get_guint8(tvb,offset);
9925 proto_tree_add_item(tree, hf_ieee80211_tag_wapi_param_set_mcast_cipher_suite_type, tvb, offset, 1, ENC_LITTLE_ENDIAN);
9926 offset += 1;
9927 proto_item_append_text(ti, " Multicast Cipher: %s", val_to_str(mcast_cipher_type,ieee80211_wapi_cipher_type,"Reserved: %d"));
9929 /* WAPI capability*/
9930 item = proto_tree_add_item(tree, hf_ieee80211_tag_wapi_param_set_capab, tvb, offset, 2, ENC_LITTLE_ENDIAN);
9931 subtree = proto_item_add_subtree(item, ett_tag_wapi_param_set_preauth_tree);
9932 proto_tree_add_item(subtree, hf_ieee80211_tag_wapi_param_set_capab_preauth, tvb, offset, 2, ENC_LITTLE_ENDIAN);
9933 proto_tree_add_item(subtree, hf_ieee80211_tag_wapi_param_set_capab_rsvd, tvb, offset, 2, ENC_LITTLE_ENDIAN);
9935 offset += 2;
9936 /* BKID List: The list can be 0
9937 * Applicable only for assoc/re-assoc
9939 if (ftype == MGT_ASSOC_REQ || ftype == MGT_REASSOC_REQ ) {
9940 bkid_cnt = tvb_get_letohs(tvb, offset);
9941 proto_tree_add_item(tree, hf_ieee80211_tag_wapi_param_set_bkid_count, tvb, offset, 2, ENC_LITTLE_ENDIAN);
9942 offset += 2;
9943 if (bkid_cnt != 0) {
9944 for (loop_cnt = 0; loop_cnt < bkid_cnt; loop_cnt++) {
9945 proto_tree_add_item(tree, hf_ieee80211_tag_wapi_param_set_bkid_list, tvb, offset, 16, ENC_NA);
9946 offset += 16;
9950 return offset;
9953 static int dissect_bss_max_idle_period(proto_tree *tree, tvbuff_t *tvb,
9954 int offset)
9956 proto_tree_add_item(tree, hf_ieee80211_tag_bss_max_idle_period,
9957 tvb, offset, 2, ENC_LITTLE_ENDIAN);
9958 offset += 2;
9959 proto_tree_add_item(tree, hf_ieee80211_tag_bss_max_idle_options_protected,
9960 tvb, offset, 1, ENC_LITTLE_ENDIAN);
9961 offset++;
9962 return offset;
9965 static int add_tagged_field(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb,
9966 int offset, int ftype);
9968 enum tfs_request_subelem_id {
9969 TFS_REQ_SUBELEM_TFS = 1,
9970 TFS_REQ_SUBELEM_VENDOR_SPECIFIC = 221
9973 static const value_string tfs_request_subelem_ids[] = {
9974 { TFS_REQ_SUBELEM_TFS, "TFS subelement" },
9975 { TFS_REQ_SUBELEM_VENDOR_SPECIFIC, "Vendor Specific subelement" },
9976 { 0, NULL }
9979 static int dissect_tfs_request(packet_info *pinfo, proto_tree *tree,
9980 tvbuff_t *tvb, int offset, guint32 tag_len,
9981 int ftype)
9983 int end = offset + tag_len;
9985 proto_tree_add_item(tree, hf_ieee80211_tag_tfs_request_id,
9986 tvb, offset, 1, ENC_LITTLE_ENDIAN);
9987 offset++;
9988 proto_tree_add_item(tree, hf_ieee80211_tag_tfs_request_ac_delete_after_match,
9989 tvb, offset, 1, ENC_LITTLE_ENDIAN);
9990 proto_tree_add_item(tree, hf_ieee80211_tag_tfs_request_ac_notify,
9991 tvb, offset, 1, ENC_LITTLE_ENDIAN);
9992 offset++;
9993 if (offset + 1 >= end) {
9994 expert_add_info_format(pinfo, tree, &ei_ieee80211_missing_data,
9995 "No TFS Request subelements in TFS Request");
9996 return end;
9999 while (offset + 1 < end) {
10000 guint8 id, len;
10001 int s_offset, s_end;
10003 id = tvb_get_guint8(tvb, offset);
10004 proto_tree_add_item(tree, hf_ieee80211_tag_tfs_request_subelem_id,
10005 tvb, offset, 1, ENC_LITTLE_ENDIAN);
10006 offset++;
10007 len = tvb_get_guint8(tvb, offset);
10008 proto_tree_add_item(tree, hf_ieee80211_tag_tfs_request_subelem_len,
10009 tvb, offset, 1, ENC_LITTLE_ENDIAN);
10010 offset++;
10011 if (offset + len > end) {
10012 expert_add_info_format(pinfo, tree, &ei_ieee80211_tag_length,
10013 "Not enough data for TFS Request subelement");
10014 return end;
10016 switch (id) {
10017 case TFS_REQ_SUBELEM_TFS:
10018 s_offset = offset;
10019 s_end = offset + len;
10020 while (s_offset < s_end) {
10021 int tlen = add_tagged_field(pinfo, tree, tvb, s_offset, ftype);
10022 s_offset += tlen;
10024 break;
10025 default:
10026 proto_tree_add_item(tree, hf_ieee80211_tag_tfs_request_subelem,
10027 tvb, offset, len, ENC_NA);
10028 break;
10030 offset += len;
10033 if (offset < end) {
10034 proto_tree_add_text(tree, tvb, offset, end - offset,
10035 "Unexpected extra data");
10036 expert_add_info_format(pinfo, tree, &ei_ieee80211_extra_data,
10037 "Extra data after TFS Subelements");
10040 return end;
10043 enum tfs_response_subelem_id {
10044 TFS_RESP_SUBELEM_TFS_STATUS = 1,
10045 TFS_RESP_SUBELEM_TFS = 2,
10046 TFS_RESP_SUBELEM_VENDOR_SPECIFIC = 221
10049 static const value_string tfs_response_subelem_ids[] = {
10050 { TFS_RESP_SUBELEM_TFS_STATUS, "TFS Status subelement" },
10051 { TFS_RESP_SUBELEM_TFS, "TFS subelement" },
10052 { TFS_RESP_SUBELEM_VENDOR_SPECIFIC, "Vendor Specific subelement" },
10053 { 0, NULL }
10056 static int dissect_tfs_response(packet_info *pinfo, proto_tree *tree,
10057 tvbuff_t *tvb, int offset, guint32 tag_len,
10058 int ftype)
10060 int end = offset + tag_len;
10062 while (offset + 3 <= end) {
10063 guint8 id, len;
10064 int s_offset, s_end;
10066 id = tvb_get_guint8(tvb, offset);
10067 proto_tree_add_item(tree, hf_ieee80211_tag_tfs_response_subelem_id,
10068 tvb, offset, 1, ENC_LITTLE_ENDIAN);
10069 offset++;
10070 len = tvb_get_guint8(tvb, offset);
10071 proto_tree_add_item(tree, hf_ieee80211_tag_tfs_response_subelem_len,
10072 tvb, offset, 1, ENC_LITTLE_ENDIAN);
10073 offset++;
10074 if (offset + len > end) {
10075 expert_add_info_format(pinfo, tree, &ei_ieee80211_tag_length,
10076 "Not enough data for TFS Request subelement");
10077 return end;
10079 switch (id) {
10080 case TFS_RESP_SUBELEM_TFS_STATUS:
10081 proto_tree_add_item(tree, hf_ieee80211_tag_tfs_response_status,
10082 tvb, offset, 1, ENC_LITTLE_ENDIAN);
10083 proto_tree_add_item(tree, hf_ieee80211_tag_tfs_response_id,
10084 tvb, offset + 1, 1, ENC_LITTLE_ENDIAN);
10085 break;
10086 case TFS_RESP_SUBELEM_TFS:
10087 s_offset = offset;
10088 s_end = offset + len;
10089 while (s_offset < s_end) {
10090 int tlen = add_tagged_field(pinfo, tree, tvb, s_offset, ftype);
10091 s_offset += tlen;
10093 break;
10094 default:
10095 proto_tree_add_item(tree, hf_ieee80211_tag_tfs_response_subelem,
10096 tvb, offset, len, ENC_NA);
10097 break;
10100 offset += len;
10103 if (offset < end) {
10104 proto_tree_add_text(tree, tvb, offset, end - offset,
10105 "Unexpected extra data");
10106 expert_add_info_format(pinfo, tree, &ei_ieee80211_extra_data,
10107 "Extra data after TFS Status subelements");
10110 return end;
10113 static const value_string wnm_sleep_mode_action_types[] = {
10114 { 0, "Enter WNM-Sleep Mode" },
10115 { 1, "Exit WNM-Sleep Mode" },
10116 { 0, NULL }
10119 static const value_string wnm_sleep_mode_response_status_vals[] = {
10120 { 0, "Enter/Exit WNM-Sleep Mode Accept" },
10121 { 1, "Exit WNM-Sleep Mode Accept, GTK/IGTK update required" },
10122 { 2, "Denied. The AP is unable to perform the requested action." },
10123 { 3, "Denied temporarily. The AP is unable to perform the requested action "
10124 "at the current time. The request can be submitted again at a later time."
10126 { 4, "Denied. Due to the pending key expiration." },
10127 { 5, "Denied. The requested action was not granted due to other WNM services "
10128 "in use by the requesting STA." },
10129 { 0, NULL }
10132 static int dissect_wnm_sleep_mode(proto_tree *tree, tvbuff_t *tvb, int offset)
10134 proto_tree_add_item(tree, hf_ieee80211_tag_wnm_sleep_mode_action_type,
10135 tvb, offset, 1, ENC_LITTLE_ENDIAN);
10136 offset++;
10137 proto_tree_add_item(tree, hf_ieee80211_tag_wnm_sleep_mode_response_status,
10138 tvb, offset, 1, ENC_LITTLE_ENDIAN);
10139 offset++;
10140 proto_tree_add_item(tree, hf_ieee80211_tag_wnm_sleep_mode_interval,
10141 tvb, offset, 2, ENC_LITTLE_ENDIAN);
10142 offset += 2;
10143 return offset;
10146 static const value_string time_adv_timing_capab_vals[] = {
10147 { 0, "No standardized external time source" },
10148 { 1, "Timestamp offset based on UTC" },
10149 { 2, "UTC time at which the TSF timer is 0" },
10150 { 0, NULL }
10153 static int
10154 dissect_time_adv(proto_tree *tree, tvbuff_t *tvb, int offset)
10156 guint8 capab;
10157 proto_item *item;
10158 proto_tree *subtree;
10159 struct tm tm, *now;
10160 time_t t;
10162 capab = tvb_get_guint8(tvb, offset);
10163 proto_tree_add_item(tree, hf_ieee80211_tag_time_adv_timing_capab,
10164 tvb, offset, 1, ENC_LITTLE_ENDIAN);
10165 offset += 1;
10167 switch (capab) {
10168 case 1:
10169 proto_tree_add_item(tree, hf_ieee80211_tag_time_adv_time_value,
10170 tvb, offset, 10, ENC_NA);
10171 offset += 10;
10173 proto_tree_add_item(tree, hf_ieee80211_tag_time_adv_time_error,
10174 tvb, offset, 5, ENC_NA);
10175 offset += 5;
10176 break;
10177 case 2:
10178 item = proto_tree_add_item(tree, hf_ieee80211_tag_time_adv_time_value,
10179 tvb, offset, 10, ENC_NA);
10180 subtree = proto_item_add_subtree(item, ett_tag_time_adv_tree);
10181 memset(&tm, 0, sizeof(tm));
10182 tm.tm_year = tvb_get_letohs(tvb, offset) - 1900;
10183 proto_tree_add_item(subtree, hf_ieee80211_tag_time_adv_time_value_year,
10184 tvb, offset, 2, ENC_LITTLE_ENDIAN);
10185 offset += 2;
10186 tm.tm_mon = tvb_get_guint8(tvb, offset) - 1;
10187 proto_tree_add_item(subtree, hf_ieee80211_tag_time_adv_time_value_month,
10188 tvb, offset, 1, ENC_LITTLE_ENDIAN);
10189 offset += 1;
10190 tm.tm_mday = tvb_get_guint8(tvb, offset);
10191 proto_tree_add_item(subtree, hf_ieee80211_tag_time_adv_time_value_day,
10192 tvb, offset, 1, ENC_LITTLE_ENDIAN);
10193 offset += 1;
10194 tm.tm_hour = tvb_get_guint8(tvb, offset);
10195 proto_tree_add_item(subtree, hf_ieee80211_tag_time_adv_time_value_hours,
10196 tvb, offset, 1, ENC_LITTLE_ENDIAN);
10197 offset += 1;
10198 tm.tm_min = tvb_get_guint8(tvb, offset);
10199 proto_tree_add_item(subtree, hf_ieee80211_tag_time_adv_time_value_minutes,
10200 tvb, offset, 1, ENC_LITTLE_ENDIAN);
10201 offset += 1;
10202 tm.tm_sec = tvb_get_guint8(tvb, offset);
10203 proto_tree_add_item(subtree, hf_ieee80211_tag_time_adv_time_value_seconds,
10204 tvb, offset, 1, ENC_LITTLE_ENDIAN);
10205 offset += 1;
10206 proto_tree_add_item(subtree,
10207 hf_ieee80211_tag_time_adv_time_value_milliseconds,
10208 tvb, offset, 2, ENC_LITTLE_ENDIAN);
10209 offset += 2;
10210 proto_tree_add_item(subtree, hf_ieee80211_tag_time_adv_time_value_reserved,
10211 tvb, offset, 1, ENC_LITTLE_ENDIAN);
10212 offset += 1;
10214 tm.tm_isdst = -1;
10215 t = mktime(&tm);
10216 if (t != -1) {
10217 t += (time_t)(last_timestamp / 1000000);
10218 now = localtime(&t);
10219 if (now)
10220 proto_item_append_text(item,
10221 ": current time=%u-%02u-%02u %02u:%02u:%02u",
10222 now->tm_year + 1900, now->tm_mon + 1,
10223 now->tm_mday, now->tm_hour, now->tm_min,
10224 now->tm_sec);
10227 proto_tree_add_item(tree, hf_ieee80211_tag_time_adv_time_error,
10228 tvb, offset, 5, ENC_NA);
10229 offset += 5;
10231 proto_tree_add_item(tree, hf_ieee80211_tag_time_adv_time_update_counter,
10232 tvb, offset, 1, ENC_LITTLE_ENDIAN);
10233 offset += 1;
10234 break;
10237 return offset;
10240 static int
10241 dissect_time_zone(proto_tree *tree, tvbuff_t *tvb, int offset,
10242 guint32 tag_len)
10244 proto_tree_add_item(tree, hf_ieee80211_tag_time_zone, tvb, offset, tag_len,
10245 ENC_ASCII|ENC_NA);
10246 return offset + tag_len;
10249 static int
10250 dissect_ap_channel_report(tvbuff_t *tvb, packet_info *pinfo,
10251 proto_tree *tree, int offset, guint32 tag_len, proto_item *ti_len,
10252 int tag_end, proto_item *ti)
10254 if (tag_len < 1) {
10255 expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length,
10256 "AP Channel Report length %u wrong, must be > 1", tag_len);
10257 return offset;
10260 proto_tree_add_item(tree, hf_ieee80211_tag_ap_channel_report_regulatory_class, tvb,
10261 offset, 1, ENC_LITTLE_ENDIAN);
10262 proto_item_append_text(ti, ": Regulatory Class %u, Channel List :", tvb_get_guint8(tvb, offset));
10263 offset += 1;
10265 while (offset < tag_end)
10267 proto_tree_add_item(tree, hf_ieee80211_tag_ap_channel_report_channel_list, tvb, offset, 1, ENC_NA);
10268 proto_item_append_text(ti, " %u,", tvb_get_guint8(tvb, offset));
10269 offset += 1;
10271 return offset;
10273 static int
10274 dissect_secondary_channel_offset_ie(tvbuff_t *tvb, packet_info *pinfo,
10275 proto_tree *tree, int offset, guint32 tag_len, proto_item *ti_len)
10278 if (tag_len != 1) {
10279 expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length,
10280 "Secondary Channel Offset length %u wrong, must be = 1", tag_len);
10281 return offset;
10284 proto_tree_add_item(tree, hf_ieee80211_tag_secondary_channel_offset, tvb,
10285 offset, 1, ENC_LITTLE_ENDIAN);
10287 offset += 1;
10289 return offset;
10292 static int
10293 dissect_bss_avg_access_delay_ie(tvbuff_t *tvb, packet_info *pinfo,
10294 proto_tree *tree, int offset, guint32 tag_len, proto_item *ti_len)
10297 if (tag_len != 1) {
10298 expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length,
10299 "BSS Average Access Delay length %u wrong, must be = 1", tag_len);
10300 return offset;
10303 proto_tree_add_item(tree, hf_ieee80211_tag_bss_ap_avg_access_delay, tvb,
10304 offset, 1, ENC_LITTLE_ENDIAN);
10306 offset += 1;
10308 return offset;
10311 static int
10312 dissect_antenna_ie(tvbuff_t *tvb, packet_info *pinfo,
10313 proto_tree *tree, int offset, guint32 tag_len, proto_item *ti_len)
10316 if (tag_len != 1) {
10317 expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length,
10318 "Antenna length %u wrong, must be = 1", tag_len);
10319 return offset;
10322 proto_tree_add_item(tree, hf_ieee80211_tag_antenna_id, tvb,
10323 offset, 1, ENC_LITTLE_ENDIAN);
10325 offset += 1;
10327 return offset;
10330 static int
10331 dissect_rsni_ie(tvbuff_t *tvb, packet_info *pinfo,
10332 proto_tree *tree, int offset, guint32 tag_len, proto_item *ti_len)
10335 if (tag_len != 1) {
10336 expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length,
10337 "RSNI length %u wrong, must be = 1", tag_len);
10338 return offset;
10341 proto_tree_add_item(tree, hf_ieee80211_tag_rsni, tvb,
10342 offset, 1, ENC_LITTLE_ENDIAN);
10344 offset += 1;
10346 return offset;
10349 static int
10350 dissect_bss_available_admission_capacity_ie(tvbuff_t *tvb, packet_info *pinfo,
10351 proto_tree *tree, int offset, guint32 tag_len, proto_item *ti_len)
10353 proto_item *ti;
10354 proto_tree *btree;
10355 guint16 bitmask;
10356 if (tag_len < 2) {
10357 expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length,
10358 "BSS Available Admission Capacity length %u wrong, must > = 2", tag_len);
10359 return offset;
10362 ti = proto_tree_add_item(tree, hf_ieee80211_tag_bss_avb_adm_cap_bitmask, tvb,
10363 offset, 2, ENC_LITTLE_ENDIAN);
10364 btree = proto_item_add_subtree(ti, ett_tag_bss_bitmask_tree);
10365 proto_tree_add_item(btree, hf_ieee80211_tag_bss_avb_adm_cap_bitmask_up0, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10366 proto_tree_add_item(btree, hf_ieee80211_tag_bss_avb_adm_cap_bitmask_up1, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10367 proto_tree_add_item(btree, hf_ieee80211_tag_bss_avb_adm_cap_bitmask_up2, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10368 proto_tree_add_item(btree, hf_ieee80211_tag_bss_avb_adm_cap_bitmask_up3, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10369 proto_tree_add_item(btree, hf_ieee80211_tag_bss_avb_adm_cap_bitmask_up4, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10370 proto_tree_add_item(btree, hf_ieee80211_tag_bss_avb_adm_cap_bitmask_up5, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10371 proto_tree_add_item(btree, hf_ieee80211_tag_bss_avb_adm_cap_bitmask_up6, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10372 proto_tree_add_item(btree, hf_ieee80211_tag_bss_avb_adm_cap_bitmask_up7, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10373 proto_tree_add_item(btree, hf_ieee80211_tag_bss_avb_adm_cap_bitmask_ac0, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10374 proto_tree_add_item(btree, hf_ieee80211_tag_bss_avb_adm_cap_bitmask_ac1, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10375 proto_tree_add_item(btree, hf_ieee80211_tag_bss_avb_adm_cap_bitmask_ac2, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10376 proto_tree_add_item(btree, hf_ieee80211_tag_bss_avb_adm_cap_bitmask_ac3, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10377 proto_tree_add_item(btree, hf_ieee80211_tag_bss_avb_adm_cap_bitmask_rsv, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10378 bitmask = tvb_get_letohs(tvb, offset);
10379 offset += 2;
10381 if(bitmask & BSS_BITMASK_UP0)
10383 proto_tree_add_item(tree, hf_ieee80211_tag_bss_avb_adm_cap_up0, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10384 offset += 2;
10386 if(bitmask & BSS_BITMASK_UP1)
10388 proto_tree_add_item(tree, hf_ieee80211_tag_bss_avb_adm_cap_up1, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10389 offset += 2;
10391 if(bitmask & BSS_BITMASK_UP2)
10393 proto_tree_add_item(tree, hf_ieee80211_tag_bss_avb_adm_cap_up2, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10394 offset += 2;
10396 if(bitmask & BSS_BITMASK_UP3)
10398 proto_tree_add_item(tree, hf_ieee80211_tag_bss_avb_adm_cap_up3, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10399 offset += 2;
10401 if(bitmask & BSS_BITMASK_UP4)
10403 proto_tree_add_item(tree, hf_ieee80211_tag_bss_avb_adm_cap_up4, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10404 offset += 2;
10406 if(bitmask & BSS_BITMASK_UP5)
10408 proto_tree_add_item(tree, hf_ieee80211_tag_bss_avb_adm_cap_up5, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10409 offset += 2;
10411 if(bitmask & BSS_BITMASK_UP6)
10413 proto_tree_add_item(tree, hf_ieee80211_tag_bss_avb_adm_cap_up6, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10414 offset += 2;
10416 if(bitmask & BSS_BITMASK_UP7)
10418 proto_tree_add_item(tree, hf_ieee80211_tag_bss_avb_adm_cap_up7, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10419 offset += 2;
10421 if(bitmask & BSS_BITMASK_AC0)
10423 proto_tree_add_item(tree, hf_ieee80211_tag_bss_avb_adm_cap_ac0, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10424 offset += 2;
10426 if(bitmask & BSS_BITMASK_AC1)
10428 proto_tree_add_item(tree, hf_ieee80211_tag_bss_avb_adm_cap_ac1, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10429 offset += 2;
10431 if(bitmask & BSS_BITMASK_AC2)
10433 proto_tree_add_item(tree, hf_ieee80211_tag_bss_avb_adm_cap_ac2, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10434 offset += 2;
10436 if(bitmask & BSS_BITMASK_AC3)
10438 proto_tree_add_item(tree, hf_ieee80211_tag_bss_avb_adm_cap_ac3, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10439 offset += 2;
10441 return offset;
10444 static int
10445 dissect_bss_ac_access_delay_ie(tvbuff_t *tvb, packet_info *pinfo,
10446 proto_tree *tree, int offset, guint32 tag_len, proto_item *ti_len)
10449 if (tag_len == 4) {
10450 expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length,
10451 "BSS AC Access Delay length %u wrong, must = 4", tag_len);
10452 return offset;
10455 /* TODO: Display the scaled representation of the average
10456 medium access delay (a big (precalculed) value_string ?)
10457 See 8.4.2.46 BSS AC Access Delay element ... */
10459 proto_tree_add_item(tree, hf_ieee80211_tag_bss_avg_ac_access_delay_be, tvb, offset, 1, ENC_LITTLE_ENDIAN);
10460 offset += 1;
10461 proto_tree_add_item(tree, hf_ieee80211_tag_bss_avg_ac_access_delay_bk, tvb, offset, 1, ENC_LITTLE_ENDIAN);
10462 offset += 1;
10463 proto_tree_add_item(tree, hf_ieee80211_tag_bss_avg_ac_access_delay_vi, tvb, offset, 1, ENC_LITTLE_ENDIAN);
10464 offset += 1;
10465 proto_tree_add_item(tree, hf_ieee80211_tag_bss_avg_ac_access_delay_vo, tvb, offset, 1, ENC_LITTLE_ENDIAN);
10466 offset += 1;
10468 return offset;
10471 static int
10472 dissect_rm_enabled_capabilities_ie(packet_info *pinfo, proto_tree *tree,
10473 proto_item *ti, proto_item *ti_len,
10474 guint32 tag_len, tvbuff_t *tvb,
10475 int offset, int tag_end _U_)
10477 proto_item *ti_ex_cap;
10478 proto_tree *ex_cap_tree;
10480 if (tag_len != 5)
10482 expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length, "RM Enabled Capabilities length %u wrong, must = 4", tag_len);
10483 return offset;
10485 proto_item_append_text(ti, " (%d octets)", tag_len);
10487 /* RM Enabled Capability octet 1 */
10488 ti_ex_cap = proto_tree_add_item(tree, hf_ieee80211_tag_rm_enabled_capabilities, tvb, offset, 1, ENC_NA);
10489 proto_item_append_text(ti_ex_cap, " (octet 1)");
10490 ex_cap_tree = proto_item_add_subtree (ti_ex_cap, ett_tag_rm_cap1);
10491 proto_tree_add_item(ex_cap_tree, hf_ieee80211_tag_rm_enabled_capabilities_b0, tvb, offset, 1, ENC_NA);
10492 proto_tree_add_item(ex_cap_tree, hf_ieee80211_tag_rm_enabled_capabilities_b1, tvb, offset, 1, ENC_NA);
10493 proto_tree_add_item(ex_cap_tree, hf_ieee80211_tag_rm_enabled_capabilities_b2, tvb, offset, 1, ENC_NA);
10494 proto_tree_add_item(ex_cap_tree, hf_ieee80211_tag_rm_enabled_capabilities_b3, tvb, offset, 1, ENC_NA);
10495 proto_tree_add_item(ex_cap_tree, hf_ieee80211_tag_rm_enabled_capabilities_b4, tvb, offset, 1, ENC_NA);
10496 proto_tree_add_item(ex_cap_tree, hf_ieee80211_tag_rm_enabled_capabilities_b5, tvb, offset, 1, ENC_NA);
10497 proto_tree_add_item(ex_cap_tree, hf_ieee80211_tag_rm_enabled_capabilities_b6, tvb, offset, 1, ENC_NA);
10498 proto_tree_add_item(ex_cap_tree, hf_ieee80211_tag_rm_enabled_capabilities_b7, tvb, offset, 1, ENC_NA);
10499 offset += 1;
10501 /* RM Enabled Capability octet 2 */
10502 ti_ex_cap = proto_tree_add_item(tree, hf_ieee80211_tag_rm_enabled_capabilities, tvb, offset, 1, ENC_NA);
10503 proto_item_append_text(ti_ex_cap, " (octet 2)");
10504 ex_cap_tree = proto_item_add_subtree (ti_ex_cap, ett_tag_rm_cap2);
10505 proto_tree_add_item(ex_cap_tree, hf_ieee80211_tag_rm_enabled_capabilities_b8, tvb, offset, 1, ENC_NA);
10506 proto_tree_add_item(ex_cap_tree, hf_ieee80211_tag_rm_enabled_capabilities_b9, tvb, offset, 1, ENC_NA);
10507 proto_tree_add_item(ex_cap_tree, hf_ieee80211_tag_rm_enabled_capabilities_b10, tvb, offset, 1, ENC_NA);
10508 proto_tree_add_item(ex_cap_tree, hf_ieee80211_tag_rm_enabled_capabilities_b11, tvb, offset, 1, ENC_NA);
10509 proto_tree_add_item(ex_cap_tree, hf_ieee80211_tag_rm_enabled_capabilities_b12, tvb, offset, 1, ENC_NA);
10510 proto_tree_add_item(ex_cap_tree, hf_ieee80211_tag_rm_enabled_capabilities_b13, tvb, offset, 1, ENC_NA);
10511 proto_tree_add_item(ex_cap_tree, hf_ieee80211_tag_rm_enabled_capabilities_b14, tvb, offset, 1, ENC_NA);
10512 proto_tree_add_item(ex_cap_tree, hf_ieee80211_tag_rm_enabled_capabilities_b15, tvb, offset, 1, ENC_NA);
10513 offset += 1;
10515 /* RM Enabled Capability octet 3 */
10516 ti_ex_cap = proto_tree_add_item(tree, hf_ieee80211_tag_rm_enabled_capabilities, tvb, offset, 1, ENC_NA);
10517 proto_item_append_text(ti_ex_cap, " (octet 3)");
10518 ex_cap_tree = proto_item_add_subtree (ti_ex_cap, ett_tag_rm_cap3);
10519 proto_tree_add_item(ex_cap_tree, hf_ieee80211_tag_rm_enabled_capabilities_b16, tvb, offset, 1, ENC_NA);
10520 proto_tree_add_item(ex_cap_tree, hf_ieee80211_tag_rm_enabled_capabilities_b17, tvb, offset, 1, ENC_NA);
10521 proto_tree_add_item(ex_cap_tree, hf_ieee80211_tag_rm_enabled_capabilities_b18to20, tvb, offset, 1, ENC_NA);
10522 proto_tree_add_item(ex_cap_tree, hf_ieee80211_tag_rm_enabled_capabilities_b21to23, tvb, offset, 1, ENC_NA);
10523 offset += 1;
10525 /* RM Enabled Capability octet 4 */
10526 ti_ex_cap = proto_tree_add_item(tree, hf_ieee80211_tag_rm_enabled_capabilities, tvb, offset, 1, ENC_NA);
10527 proto_item_append_text(ti_ex_cap, " (octet 4)");
10528 ex_cap_tree = proto_item_add_subtree (ti_ex_cap, ett_tag_rm_cap4);
10529 proto_tree_add_item(ex_cap_tree, hf_ieee80211_tag_rm_enabled_capabilities_b24to26, tvb, offset, 1, ENC_NA);
10530 proto_tree_add_item(ex_cap_tree, hf_ieee80211_tag_rm_enabled_capabilities_b27, tvb, offset, 1, ENC_NA);
10531 proto_tree_add_item(ex_cap_tree, hf_ieee80211_tag_rm_enabled_capabilities_b28, tvb, offset, 1, ENC_NA);
10532 proto_tree_add_item(ex_cap_tree, hf_ieee80211_tag_rm_enabled_capabilities_b29, tvb, offset, 1, ENC_NA);
10533 proto_tree_add_item(ex_cap_tree, hf_ieee80211_tag_rm_enabled_capabilities_b30, tvb, offset, 1, ENC_NA);
10534 proto_tree_add_item(ex_cap_tree, hf_ieee80211_tag_rm_enabled_capabilities_b31, tvb, offset, 1, ENC_NA);
10535 offset += 1;
10537 /* RM Enabled Capability octet 5 */
10538 ti_ex_cap = proto_tree_add_item(tree, hf_ieee80211_tag_rm_enabled_capabilities, tvb, offset, 1, ENC_NA);
10539 proto_item_append_text(ti_ex_cap, " (octet 5)");
10540 ex_cap_tree = proto_item_add_subtree (ti_ex_cap, ett_tag_rm_cap5);
10541 proto_tree_add_item(ex_cap_tree, hf_ieee80211_tag_rm_enabled_capabilities_b32, tvb, offset, 1, ENC_NA);
10542 proto_tree_add_item(ex_cap_tree, hf_ieee80211_tag_rm_enabled_capabilities_b33, tvb, offset, 1, ENC_NA);
10543 proto_tree_add_item(ex_cap_tree, hf_ieee80211_tag_rm_enabled_capabilities_o5, tvb, offset, 1, ENC_NA);
10544 offset += 1;
10546 return offset;
10549 static int
10550 dissect_ht_capability_ie(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset,
10551 guint32 tag_len, proto_item *ti_len, gboolean vs)
10553 proto_item *cap_item, *ti;
10554 proto_tree *cap_tree;
10556 if (tag_len != 26) {
10557 expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length,
10558 "HT Capabilities IE length %u wrong, must be = 26", tag_len);
10559 return offset;
10562 if (wlan_ignore_draft_ht && vs)
10563 return offset;
10565 /* 2 byte HT Capabilities Info*/
10566 if (vs)
10568 cap_item = proto_tree_add_item(tree, hf_ieee80211_ht_vs_cap, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10570 else
10572 cap_item = proto_tree_add_item(tree, hf_ieee80211_ht_cap, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10574 cap_tree = proto_item_add_subtree(cap_item, ett_ht_cap_tree);
10575 proto_tree_add_item(cap_tree, hf_ieee80211_ht_ldpc_coding, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10576 proto_tree_add_item(cap_tree, hf_ieee80211_ht_chan_width, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10577 proto_tree_add_item(cap_tree, hf_ieee80211_ht_sm_pwsave, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10578 proto_tree_add_item(cap_tree, hf_ieee80211_ht_green, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10579 proto_tree_add_item(cap_tree, hf_ieee80211_ht_short20, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10580 proto_tree_add_item(cap_tree, hf_ieee80211_ht_short40, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10581 proto_tree_add_item(cap_tree, hf_ieee80211_ht_tx_stbc, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10583 proto_tree_add_item(cap_tree, hf_ieee80211_ht_rx_stbc, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10584 proto_tree_add_item(cap_tree, hf_ieee80211_ht_delayed_block_ack, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10585 proto_tree_add_item(cap_tree, hf_ieee80211_ht_max_amsdu, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10586 proto_tree_add_item(cap_tree, hf_ieee80211_ht_dss_cck_40, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10587 proto_tree_add_item(cap_tree, hf_ieee80211_ht_psmp, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10588 proto_tree_add_item(cap_tree, hf_ieee80211_ht_40_mhz_intolerant, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10589 proto_tree_add_item(cap_tree, hf_ieee80211_ht_l_sig, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10590 offset += 2;
10592 /* 1 byte A-MPDU Parameters */
10593 if (vs)
10595 cap_item = proto_tree_add_item(tree, hf_ieee80211_ampduparam_vs, tvb, offset, 1, ENC_LITTLE_ENDIAN);
10596 } else
10598 cap_item = proto_tree_add_item(tree, hf_ieee80211_ampduparam, tvb, offset, 1, ENC_LITTLE_ENDIAN);
10600 cap_tree = proto_item_add_subtree(cap_item, ett_ampduparam_tree);
10601 ti = proto_tree_add_item(cap_tree, hf_ieee80211_ampduparam_mpdu, tvb, offset, 1, ENC_LITTLE_ENDIAN);
10602 proto_item_append_text(ti, " (%04.0f[Bytes])",pow(2,13+(tvb_get_guint8(tvb, offset) & 0x3))-1);
10603 proto_tree_add_item(cap_tree, hf_ieee80211_ampduparam_mpdu_start_spacing, tvb, offset, 1, ENC_LITTLE_ENDIAN);
10604 proto_tree_add_item(cap_tree, hf_ieee80211_ampduparam_reserved, tvb, offset, 1, ENC_LITTLE_ENDIAN);
10605 offset += 1;
10607 /* 16 byte MCS set */
10608 offset = dissect_mcs_set(tree, tvb, offset, FALSE, vs);
10611 /* 2 byte HT Extended Capabilities */
10612 if (vs)
10614 cap_item = proto_tree_add_item(tree, hf_ieee80211_htex_vs_cap, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10615 } else {
10616 cap_item = proto_tree_add_item(tree, hf_ieee80211_htex_cap, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10618 cap_tree = proto_item_add_subtree(cap_item, ett_htex_cap_tree);
10619 proto_tree_add_item(cap_tree, hf_ieee80211_htex_pco, tvb, offset, 1, ENC_LITTLE_ENDIAN);
10620 proto_tree_add_item(cap_tree, hf_ieee80211_htex_transtime, tvb, offset, 1, ENC_LITTLE_ENDIAN);
10621 offset += 1;
10622 proto_tree_add_item(cap_tree, hf_ieee80211_htex_mcs, tvb, offset, 1, ENC_LITTLE_ENDIAN);
10623 proto_tree_add_item(cap_tree, hf_ieee80211_htex_htc_support, tvb, offset, 1, ENC_LITTLE_ENDIAN);
10624 proto_tree_add_item(cap_tree, hf_ieee80211_htex_rd_responder, tvb, offset, 1, ENC_LITTLE_ENDIAN);
10625 offset += 1;
10628 /* 4 byte TxBF capabilities */
10629 if (vs)
10631 cap_item = proto_tree_add_item(tree, hf_ieee80211_txbf_vs, tvb, offset, 4, ENC_LITTLE_ENDIAN);
10632 } else {
10633 cap_item = proto_tree_add_item(tree, hf_ieee80211_txbf, tvb, offset, 4, ENC_LITTLE_ENDIAN);
10635 cap_tree = proto_item_add_subtree(cap_item, ett_txbf_tree);
10636 proto_tree_add_item(cap_tree, hf_ieee80211_txbf_cap, tvb, offset, 1, ENC_LITTLE_ENDIAN);
10637 proto_tree_add_item(cap_tree, hf_ieee80211_txbf_rcv_ssc, tvb, offset, 1, ENC_LITTLE_ENDIAN);
10638 proto_tree_add_item(cap_tree, hf_ieee80211_txbf_tx_ssc, tvb, offset, 1, ENC_LITTLE_ENDIAN);
10639 proto_tree_add_item(cap_tree, hf_ieee80211_txbf_rcv_ndp, tvb, offset, 1, ENC_LITTLE_ENDIAN);
10640 proto_tree_add_item(cap_tree, hf_ieee80211_txbf_tx_ndp, tvb, offset, 1, ENC_LITTLE_ENDIAN);
10641 proto_tree_add_item(cap_tree, hf_ieee80211_txbf_impl_txbf, tvb, offset, 1, ENC_LITTLE_ENDIAN);
10642 proto_tree_add_item(cap_tree, hf_ieee80211_txbf_calib, tvb, offset, 1, ENC_LITTLE_ENDIAN);
10643 offset += 1;
10645 proto_tree_add_item(cap_tree, hf_ieee80211_txbf_expl_csi, tvb, offset, 1, ENC_LITTLE_ENDIAN);
10646 proto_tree_add_item(cap_tree, hf_ieee80211_txbf_expl_uncomp_fm, tvb, offset, 1, ENC_LITTLE_ENDIAN);
10647 proto_tree_add_item(cap_tree, hf_ieee80211_txbf_expl_comp_fm, tvb, offset, 1, ENC_LITTLE_ENDIAN);
10648 proto_tree_add_item(cap_tree, hf_ieee80211_txbf_expl_bf_csi, tvb, offset, 1, ENC_LITTLE_ENDIAN);
10649 proto_tree_add_item(cap_tree, hf_ieee80211_txbf_expl_uncomp_fm_feed, tvb, offset, 1, ENC_LITTLE_ENDIAN);
10650 proto_tree_add_item(cap_tree, hf_ieee80211_txbf_expl_comp_fm_feed, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10651 offset += 1;
10653 proto_tree_add_item(cap_tree, hf_ieee80211_txbf_min_group, tvb, offset, 1, ENC_LITTLE_ENDIAN);
10654 proto_tree_add_item(cap_tree, hf_ieee80211_txbf_csi_num_bf_ant, tvb, offset, 1, ENC_LITTLE_ENDIAN);
10655 proto_tree_add_item(cap_tree, hf_ieee80211_txbf_uncomp_sm_bf_ant, tvb, offset, 1, ENC_LITTLE_ENDIAN);
10656 proto_tree_add_item(cap_tree, hf_ieee80211_txbf_comp_sm_bf_ant, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10657 offset += 1;
10659 proto_tree_add_item(cap_tree, hf_ieee80211_txbf_csi_max_rows_bf, tvb, offset, 1, ENC_LITTLE_ENDIAN);
10660 proto_tree_add_item(cap_tree, hf_ieee80211_txbf_chan_est, tvb, offset, 1, ENC_LITTLE_ENDIAN);
10661 proto_tree_add_item(cap_tree, hf_ieee80211_txbf_resrv, tvb, offset, 1, ENC_LITTLE_ENDIAN);
10662 offset += 1;
10664 /* 1 byte Antenna Selection (ASEL) capabilities */
10665 if (vs)
10667 cap_item = proto_tree_add_item(tree, hf_ieee80211_antsel_vs, tvb, offset, 1, ENC_LITTLE_ENDIAN);
10669 else
10671 cap_item = proto_tree_add_item(tree, hf_ieee80211_antsel, tvb, offset, 1, ENC_LITTLE_ENDIAN);
10673 cap_tree = proto_item_add_subtree(cap_item, ett_antsel_tree);
10674 proto_tree_add_item(cap_tree, hf_ieee80211_antsel_b0, tvb, offset, 1, ENC_LITTLE_ENDIAN);
10675 proto_tree_add_item(cap_tree, hf_ieee80211_antsel_b1, tvb, offset, 1, ENC_LITTLE_ENDIAN);
10676 proto_tree_add_item(cap_tree, hf_ieee80211_antsel_b2, tvb, offset, 1, ENC_LITTLE_ENDIAN);
10677 proto_tree_add_item(cap_tree, hf_ieee80211_antsel_b3, tvb, offset, 1, ENC_LITTLE_ENDIAN);
10678 proto_tree_add_item(cap_tree, hf_ieee80211_antsel_b4, tvb, offset, 1, ENC_LITTLE_ENDIAN);
10679 proto_tree_add_item(cap_tree, hf_ieee80211_antsel_b5, tvb, offset, 1, ENC_LITTLE_ENDIAN);
10680 proto_tree_add_item(cap_tree, hf_ieee80211_antsel_b6, tvb, offset, 1, ENC_LITTLE_ENDIAN);
10681 proto_tree_add_item(cap_tree, hf_ieee80211_antsel_b7, tvb, offset, 1, ENC_LITTLE_ENDIAN);
10683 offset += 1;
10685 return offset;
10688 static int
10689 dissect_ht_info_ie_1_0(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset,
10690 guint32 tag_len, proto_item *ti_len)
10692 proto_item *cap_item;
10693 proto_tree *cap_tree;
10695 if (tag_len != 22) {
10696 expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length,
10697 "Tag length %u wrong, must be = 22", tag_len);
10698 return offset;
10701 if (wlan_ignore_draft_ht)
10702 return offset;
10704 /* 1 HT Control Channel */
10705 proto_tree_add_item(tree, hf_ieee80211_hta_cc, tvb, offset, 1, ENC_LITTLE_ENDIAN);
10706 offset += 1;
10708 /* 1 byte HT additional capabilities */
10709 cap_item = proto_tree_add_item(tree, hf_ieee80211_hta_cap, tvb, offset, 1,
10710 ENC_LITTLE_ENDIAN);
10711 cap_tree = proto_item_add_subtree(cap_item, ett_hta_cap_tree);
10713 proto_tree_add_item(cap_tree, hf_ieee80211_hta_ext_chan_offset, tvb, offset, 1,
10714 ENC_LITTLE_ENDIAN);
10715 proto_tree_add_item(cap_tree, hf_ieee80211_hta_rec_tx_width, tvb, offset, 1,
10716 ENC_LITTLE_ENDIAN);
10717 proto_tree_add_item(cap_tree, hf_ieee80211_hta_rifs_mode, tvb, offset, 1,
10718 ENC_LITTLE_ENDIAN);
10719 proto_tree_add_item(cap_tree, hf_ieee80211_hta_controlled_access, tvb, offset, 1,
10720 ENC_LITTLE_ENDIAN);
10721 proto_tree_add_item(cap_tree, hf_ieee80211_hta_service_interval, tvb, offset, 1,
10722 ENC_LITTLE_ENDIAN);
10723 offset += 1;
10725 /* 2 byte HT additional capabilities */
10726 cap_item = proto_tree_add_item(tree, hf_ieee80211_hta_cap, tvb, offset, 2,
10727 ENC_LITTLE_ENDIAN);
10728 cap_tree = proto_item_add_subtree(cap_item, ett_hta_cap1_tree);
10730 proto_tree_add_item(cap_tree, hf_ieee80211_hta_operating_mode, tvb, offset, 2,
10731 ENC_LITTLE_ENDIAN);
10732 proto_tree_add_item(cap_tree, hf_ieee80211_hta_non_gf_devices, tvb, offset, 2,
10733 ENC_LITTLE_ENDIAN);
10735 offset += 2;
10737 /* 2 byte HT additional capabilities */
10738 cap_item = proto_tree_add_item(tree, hf_ieee80211_hta_cap, tvb, offset, 2,
10739 ENC_LITTLE_ENDIAN);
10740 cap_tree = proto_item_add_subtree(cap_item, ett_hta_cap2_tree);
10742 proto_tree_add_item(cap_tree, hf_ieee80211_hta_basic_stbc_mcs, tvb, offset, 2,
10743 ENC_LITTLE_ENDIAN);
10744 proto_tree_add_item(cap_tree, hf_ieee80211_hta_dual_stbc_protection, tvb, offset, 2,
10745 ENC_LITTLE_ENDIAN);
10746 proto_tree_add_item(cap_tree, hf_ieee80211_hta_secondary_beacon, tvb, offset, 2,
10747 ENC_LITTLE_ENDIAN);
10748 proto_tree_add_item(cap_tree, hf_ieee80211_hta_lsig_txop_protection, tvb, offset, 2,
10749 ENC_LITTLE_ENDIAN);
10750 proto_tree_add_item(cap_tree, hf_ieee80211_hta_pco_active, tvb, offset, 2,
10751 ENC_LITTLE_ENDIAN);
10752 proto_tree_add_item(cap_tree, hf_ieee80211_hta_pco_phase, tvb, offset, 2,
10753 ENC_LITTLE_ENDIAN);
10754 offset += 2;
10756 /* 16 byte Supported MCS set */
10757 offset = dissect_mcs_set(tree, tvb, offset, FALSE, TRUE);
10759 return offset;
10762 /* 802.11n-D1.10 and 802.11n-D2.0, 7.1.3.5a */
10765 * 7.1.3.1.10 says:
10766 * "The Order field is 1 bit in length and is set to 1 in any non-QoS Data
10767 * frame that contains an MSDU, or fragment thereof, which is being
10768 * transferred using the StrictlyOrdered service class. The presence of the
10769 * HT Control field in frames is indicated by setting the Order field to 1
10770 * in any Data type or Management type frame that is transmitted with a
10771 * value of HT_GF or HT_MM for the FORMAT parameter of the TXVECTOR except
10772 * a non-QoS Data frame or a Control Wrapper frame. The Order field is set
10773 * to 0 in all other frames. All non-HT QoS STAs set the Order field to 0."
10775 * ...so does this mean that we can check for the presence of +HTC by
10776 * looking for QoS frames with the Order bit set, or do we need extra
10777 * information from the PHY (which would be monumentally silly)?
10779 * At any rate, it doesn't look like any equipment we have produces
10780 * +HTC frames, so the code is completely untested.
10783 static void
10784 dissect_ht_control(proto_tree *tree, tvbuff_t *tvb, int offset)
10786 proto_item *ti;
10787 proto_tree *htc_tree, *lac_subtree;
10788 guint16 htc;
10790 htc = tvb_get_letohs(tvb, offset);
10792 ti = proto_tree_add_item(tree, hf_ieee80211_htc, tvb, offset, 4, ENC_LITTLE_ENDIAN);
10793 htc_tree = proto_item_add_subtree(ti, ett_htc_tree);
10795 /* Start: Link Adaptation Control */
10796 ti = proto_tree_add_item(htc_tree, hf_ieee80211_htc_lac, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10797 lac_subtree = proto_item_add_subtree(ti, ett_htc_tree);
10798 proto_tree_add_item(lac_subtree, hf_ieee80211_htc_lac_reserved, tvb, offset, 1, ENC_LITTLE_ENDIAN);
10799 proto_tree_add_item(lac_subtree, hf_ieee80211_htc_lac_trq, tvb, offset, 1, ENC_LITTLE_ENDIAN);
10801 if (HTC_IS_ASELI(htc)) {
10802 proto_tree_add_item(lac_subtree, hf_ieee80211_htc_lac_mai_aseli, tvb, offset, 1, ENC_LITTLE_ENDIAN);
10803 } else {
10804 proto_tree_add_item(lac_subtree, hf_ieee80211_htc_lac_mai_mrq, tvb, offset, 1, ENC_LITTLE_ENDIAN);
10805 if (HTC_LAC_MAI_MRQ(htc)) {
10806 proto_tree_add_item(lac_subtree, hf_ieee80211_htc_lac_mai_msi, tvb, offset, 1, ENC_LITTLE_ENDIAN);
10807 } else {
10808 proto_tree_add_item(lac_subtree, hf_ieee80211_htc_lac_mai_reserved, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10812 proto_tree_add_item(lac_subtree, hf_ieee80211_htc_lac_mfsi, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10814 if (HTC_IS_ASELI(htc)) {
10815 proto_tree_add_item(lac_subtree, hf_ieee80211_htc_lac_asel_command, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10816 proto_tree_add_item(lac_subtree, hf_ieee80211_htc_lac_asel_data, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10817 } else {
10818 proto_tree_add_item(lac_subtree, hf_ieee80211_htc_lac_mfb, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10820 offset += 2;
10821 /* End: Link Adaptation Control */
10823 proto_tree_add_item(htc_tree, hf_ieee80211_htc_cal_pos, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10824 proto_tree_add_item(htc_tree, hf_ieee80211_htc_cal_seq, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10825 proto_tree_add_item(htc_tree, hf_ieee80211_htc_reserved1, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10826 proto_tree_add_item(htc_tree, hf_ieee80211_htc_csi_steering, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10828 proto_tree_add_item(htc_tree, hf_ieee80211_htc_ndp_announcement, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10829 proto_tree_add_item(htc_tree, hf_ieee80211_htc_reserved2, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10830 proto_tree_add_item(htc_tree, hf_ieee80211_htc_ac_constraint, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10831 proto_tree_add_item(htc_tree, hf_ieee80211_htc_rdg_more_ppdu, tvb, offset, 2, ENC_LITTLE_ENDIAN);
10833 /* offset += 2; */
10836 static void
10837 dissect_frame_control(proto_tree *tree, tvbuff_t *tvb, gboolean wlan_broken_fc,
10838 guint32 offset, packet_info *pinfo)
10840 guint16 fcf, flags, frame_type_subtype;
10841 proto_tree *fc_tree, *flag_tree;
10842 proto_item *fc_item, *flag_item, *hidden_item, *ti;
10844 fcf = FETCH_FCF(offset);
10846 flags = FCF_FLAGS(fcf);
10847 frame_type_subtype = COMPOSE_FRAME_TYPE(fcf);
10849 /* Swap offset... */
10850 if(wlan_broken_fc)
10852 offset += 1;
10855 proto_tree_add_uint(tree, hf_ieee80211_fc_frame_type_subtype, tvb, offset, 1, frame_type_subtype);
10857 fc_item = proto_tree_add_item(tree, hf_ieee80211_fc_field, tvb, offset, 2, ENC_BIG_ENDIAN);
10859 fc_tree = proto_item_add_subtree(fc_item, ett_fc_tree);
10861 proto_tree_add_item(fc_tree, hf_ieee80211_fc_proto_version, tvb, offset, 1, ENC_NA);
10862 proto_tree_add_item(fc_tree, hf_ieee80211_fc_frame_type, tvb, offset, 1, ENC_NA);
10863 proto_tree_add_item(fc_tree, hf_ieee80211_fc_frame_subtype, tvb, offset, 1, ENC_NA);
10864 offset += 1;
10866 /* Reswap offset...*/
10867 if(wlan_broken_fc)
10869 offset -= 1;
10870 proto_item_append_text(fc_item, "(Swapped)");
10873 /* Flags */
10874 flag_item = proto_tree_add_item(fc_tree, hf_ieee80211_fc_flags, tvb, offset, 1, ENC_NA);
10875 flag_tree = proto_item_add_subtree (flag_item, ett_proto_flags);
10876 proto_tree_add_item (flag_tree, hf_ieee80211_fc_data_ds, tvb, offset, 1, ENC_NA);
10877 hidden_item = proto_tree_add_item(flag_tree, hf_ieee80211_fc_to_ds, tvb, offset, 1, ENC_NA);
10878 PROTO_ITEM_SET_HIDDEN(hidden_item);
10879 hidden_item = proto_tree_add_item(flag_tree, hf_ieee80211_fc_from_ds, tvb, offset, 1, ENC_NA);
10880 PROTO_ITEM_SET_HIDDEN(hidden_item);
10881 proto_tree_add_item(flag_tree, hf_ieee80211_fc_more_frag, tvb, offset, 1,ENC_NA);
10882 ti = proto_tree_add_item(flag_tree, hf_ieee80211_fc_retry, tvb, offset, 1, ENC_NA);
10883 if( IS_RETRY(flags) )
10885 expert_add_info(pinfo, ti, &ei_ieee80211_fc_retry);
10887 proto_tree_add_item(flag_tree, hf_ieee80211_fc_pwr_mgt, tvb, offset, 1, ENC_NA);
10888 proto_tree_add_item(flag_tree, hf_ieee80211_fc_more_data, tvb, offset, 1, ENC_NA);
10889 proto_tree_add_item(flag_tree, hf_ieee80211_fc_protected, tvb, offset, 1,ENC_NA);
10890 proto_tree_add_item(flag_tree, hf_ieee80211_fc_order, tvb, offset, 1, ENC_NA);
10893 static void
10894 dissect_durid(proto_tree *hdr_tree, tvbuff_t *tvb, guint16 fts, gint offset)
10896 guint16 durid = tvb_get_letohs(tvb, offset);
10898 if (durid < 0x8000) {
10899 proto_tree_add_uint_format_value(hdr_tree, hf_ieee80211_did_duration, tvb,
10900 offset, 2, durid, "%u microseconds", durid);
10901 } else if (((durid & 0xC000) == 0xC000) &&
10902 ((durid & 0x3FFF) > 0) && ((durid & 0x3FFF) <= 2007) &&
10903 (fts == CTRL_PS_POLL)) {
10904 proto_tree_add_item(hdr_tree, hf_ieee80211_assoc_id, tvb, 2, offset,
10905 ENC_LITTLE_ENDIAN);
10906 } else if (durid == 0x8000) {
10907 proto_tree_add_uint_format(hdr_tree, hf_ieee80211_did_duration, tvb,
10908 offset, 2, durid, "Duration/ID: %u", durid);
10909 } else {
10910 proto_tree_add_uint_format(hdr_tree, hf_ieee80211_did_duration, tvb,
10911 offset, 2, durid, "Duration/ID: %u (reserved)", durid & 0x3FFF);
10916 static void
10917 dissect_vendor_ie_ht(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
10918 guint offset, proto_item *item, proto_item *ti_len, gint tag_len)
10921 guint8 type;
10923 proto_tree_add_item(tree, hf_ieee80211_ht_pren_type, tvb, offset, 1, ENC_NA);
10924 type = tvb_get_guint8(tvb, offset);
10925 offset += 1;
10926 tag_len -= 1;
10929 switch(type){
10930 case 51:
10931 dissect_ht_capability_ie(tvb, pinfo, tree, offset, tag_len, ti_len, TRUE);
10932 proto_item_append_text(item, ": HT Capabilities (802.11n D1.10)");
10933 break;
10935 case 52:
10936 dissect_ht_info_ie_1_0(tvb, pinfo, tree, offset, tag_len, ti_len);
10937 proto_item_append_text(item, ": HT Additional Capabilities (802.11n D1.00)");
10938 break;
10940 default:
10941 proto_tree_add_item(tree, hf_ieee80211_ht_pren_unknown, tvb, offset, tag_len, ENC_NA);
10942 break;
10947 static guint
10948 dissect_interworking(packet_info *pinfo, proto_tree *tree, proto_item *item,
10949 tvbuff_t *tvb, int offset)
10951 guint8 len;
10953 offset += 1;
10954 len = tvb_get_guint8(tvb, offset);
10955 offset += 1;
10957 if ((tvb_reported_length_remaining(tvb, offset) < len) || (len == 0)) {
10958 expert_add_info_format(pinfo, item, &ei_ieee80211_tag_length,
10959 "Truncated Interworking element");
10960 return offset;
10963 proto_tree_add_item(tree, hf_ieee80211_tag_interworking_access_network_type,
10964 tvb, offset, 1, ENC_BIG_ENDIAN);
10965 proto_tree_add_item(tree, hf_ieee80211_tag_interworking_internet,
10966 tvb, offset, 1, ENC_BIG_ENDIAN);
10967 proto_tree_add_item(tree, hf_ieee80211_tag_interworking_asra,
10968 tvb, offset, 1, ENC_BIG_ENDIAN);
10969 proto_tree_add_item(tree, hf_ieee80211_tag_interworking_esr,
10970 tvb, offset, 1, ENC_BIG_ENDIAN);
10971 proto_tree_add_item(tree, hf_ieee80211_tag_interworking_uesa,
10972 tvb, offset, 1, ENC_BIG_ENDIAN);
10973 offset += 1;
10975 if ((len == (1 + 2)) || (len == (1 + 2 + 6))) {
10976 dissect_venue_info(tree, tvb, offset);
10977 offset += 2;
10980 if ((len == (1 + 6)) || (len == (1 + 2 + 6))) {
10981 proto_tree_add_item(tree, hf_ieee80211_tag_interworking_hessid,
10982 tvb, offset, 6, ENC_NA);
10983 offset += 6;
10986 if ((len != 1) && (len != (1 + 2)) && (len != (1 + 6)) && (len != (1 + 2 + 6))) {
10987 expert_add_info_format(pinfo, item, &ei_ieee80211_tag_length,
10988 "Invalid Interworking element length");
10991 return offset;
10994 static guint
10995 dissect_qos_map_set(packet_info *pinfo, proto_tree *tree, proto_item *item,
10996 tvbuff_t *tvb, int offset)
10998 guint8 len, left;
10999 guint8 val, val2;
11000 int i;
11001 proto_item *dscp_item;
11002 proto_tree *dscp_tree;
11004 offset++;
11005 len = tvb_get_guint8(tvb, offset);
11006 offset++;
11008 if (tvb_reported_length_remaining(tvb, offset) < len || len < 16 || len & 1) {
11009 expert_add_info_format(pinfo, item, &ei_ieee80211_bad_length,
11010 "Truncated QoS Map Set element");
11011 return 2 + len;
11014 left = len - 16;
11015 while (left >= 2) {
11016 dscp_item = proto_tree_add_item(tree, hf_ieee80211_tag_qos_map_set_dscp_exc,
11017 tvb, offset, 2, ENC_NA);
11018 dscp_tree = proto_item_add_subtree(dscp_item, ett_qos_map_set_exception);
11020 item = proto_tree_add_item(dscp_tree,
11021 hf_ieee80211_tag_qos_map_set_dscp_exc_val,
11022 tvb, offset, 1, ENC_NA);
11023 val = tvb_get_guint8(tvb, offset);
11024 if (val > 63 && val != 255) {
11025 expert_add_info_format(pinfo, item, &ei_ieee80211_inv_val,
11026 "Invalid DSCP Value");
11028 offset++;
11030 item = proto_tree_add_item(dscp_tree,
11031 hf_ieee80211_tag_qos_map_set_dscp_exc_up,
11032 tvb, offset, 1, ENC_NA);
11033 val2 = tvb_get_guint8(tvb, offset);
11034 if (val2 > 7) {
11035 expert_add_info_format(pinfo, item, &ei_ieee80211_inv_val,
11036 "Invalid User Priority");
11038 offset++;
11040 proto_item_append_text(dscp_item, " (0x%02x: UP %u)", val, val2);
11042 left -= 2;
11045 for (i = 0; i < 8; i++) {
11046 dscp_item = proto_tree_add_item(tree, hf_ieee80211_tag_qos_map_set_range,
11047 tvb, offset, 2, ENC_NA);
11048 dscp_tree = proto_item_add_subtree(dscp_item, ett_qos_map_set_exception);
11050 item = proto_tree_add_item(dscp_tree, hf_ieee80211_tag_qos_map_set_low,
11051 tvb, offset, 1, ENC_NA);
11052 val = tvb_get_guint8(tvb, offset);
11053 if (val > 63 && val != 255) {
11054 expert_add_info_format(pinfo, item, &ei_ieee80211_inv_val,
11055 "Invalid DSCP Value");
11057 offset++;
11059 item = proto_tree_add_item(dscp_tree, hf_ieee80211_tag_qos_map_set_high,
11060 tvb, offset, 1, ENC_NA);
11061 val2 = tvb_get_guint8(tvb, offset);
11062 if ((val2 > 63 && val2 != 255) || val2 < val ||
11063 (val == 255 && val2 != 255) || (val != 255 && val2 == 255)) {
11064 expert_add_info_format(pinfo, item, &ei_ieee80211_inv_val,
11065 "Invalid DSCP Value");
11067 offset++;
11069 if (val == 255 && val2 == 255) {
11070 proto_item_append_text(dscp_item, " (UP %u not in use)", i + 1);
11071 } else {
11072 proto_item_append_text(dscp_item, " (0x%02x-0x%02x: UP %u)",
11073 val, val2, i + 1);
11077 return 2 + len;
11080 static guint
11081 dissect_roaming_consortium(packet_info *pinfo, proto_tree *tree,
11082 proto_item *item, tvbuff_t *tvb, int offset)
11084 guint8 len, oi_lens, oi1_len, oi2_len;
11085 int end;
11087 offset += 1;
11088 len = tvb_get_guint8(tvb, offset);
11089 offset += 1;
11090 end = offset + len;
11092 if ((tvb_reported_length_remaining(tvb, offset) < len) || (len < 2)) {
11093 expert_add_info_format(pinfo, item, &ei_ieee80211_tag_length,
11094 "Truncated Roaming Consortium element");
11095 return 2 + len;
11098 proto_tree_add_item(tree, hf_ieee80211_tag_roaming_consortium_num_anqp_oi,
11099 tvb, offset, 1, ENC_BIG_ENDIAN);
11100 offset += 1;
11102 oi_lens = tvb_get_guint8(tvb, offset);
11103 oi1_len = oi_lens & 0x0f;
11104 oi2_len = (oi_lens & 0xf0) >> 4;
11105 proto_tree_add_item(tree, hf_ieee80211_tag_roaming_consortium_oi1_len,
11106 tvb, offset, 1, ENC_BIG_ENDIAN);
11107 proto_tree_add_item(tree, hf_ieee80211_tag_roaming_consortium_oi2_len,
11108 tvb, offset, 1, ENC_BIG_ENDIAN);
11109 offset += 1;
11111 if (offset + oi1_len > end) {
11112 expert_add_info_format(pinfo, item, &ei_ieee80211_tag_length,
11113 "Truncated Roaming Consortium element");
11114 return 2 + len;
11117 item = proto_tree_add_item(tree, hf_ieee80211_tag_roaming_consortium_oi1,
11118 tvb, offset, oi1_len, ENC_NA);
11119 add_manuf(item, tvb, offset);
11120 offset += oi1_len;
11122 if (offset + oi2_len > end) {
11123 expert_add_info_format(pinfo, item, &ei_ieee80211_tag_length,
11124 "Truncated Roaming Consortium element");
11125 return 2 + len;
11128 if (oi2_len > 0) {
11129 proto_tree_add_item(tree, hf_ieee80211_tag_roaming_consortium_oi2,
11130 tvb, offset, oi2_len, ENC_NA);
11131 offset += oi2_len;
11134 if (end > offset) {
11135 proto_tree_add_item(tree, hf_ieee80211_tag_roaming_consortium_oi3,
11136 tvb, offset, end - offset, ENC_NA);
11139 return 2 + len;
11143 /* ************************************************************************* */
11144 /* Dissect and add tagged (optional) fields to proto tree */
11145 /* ************************************************************************* */
11147 static int beacon_padding = 0; /* beacon padding bug */
11149 static int
11150 ieee80211_tag_ssid(packet_info *pinfo, proto_tree *tree,
11151 proto_item *ti, proto_item *ti_len,
11152 guint32 tag_len, tvbuff_t *tvb, int offset)
11154 /* 7.3.2.1 SSID element (0) */
11155 gchar *ssid; /* The SSID may consist of arbitrary bytes */
11156 const gchar *ssid_end;
11157 gint ssid_len = tag_len;
11159 if (beacon_padding != 0) /* padding bug */
11160 return offset;
11162 if (ssid_len > MAX_SSID_LEN) {
11163 expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length,
11164 "SSID length (%u) greater than maximum (%u)",
11165 ssid_len, MAX_SSID_LEN);
11166 ssid_len = MAX_SSID_LEN;
11169 ssid = tvb_get_string(wmem_packet_scope(), tvb, offset + 2, ssid_len);
11170 if (ssid_len == (gint)tag_len) {
11171 AirPDcapSetLastSSID(&airpdcap_ctx, (CHAR *) ssid, ssid_len);
11173 g_utf8_validate(ssid, ssid_len, &ssid_end);
11174 ssid[ssid_end - ssid] = '\0';
11175 if ((gint)(ssid_end - ssid) == ssid_len) {
11176 proto_tree_add_item(tree, hf_ieee80211_tag_ssid, tvb, offset + 2, tag_len,
11177 ENC_ASCII|ENC_NA);
11178 } else {
11179 wmem_strbuf_t *ssid_sb = wmem_strbuf_new(wmem_packet_scope(), ssid);
11180 ssid_len = (gint)(ssid_end - ssid);
11181 wmem_strbuf_append(ssid_sb, " [truncated]");
11182 proto_tree_add_string_format_value(tree, hf_ieee80211_tag_ssid, tvb, offset + 2, tag_len,
11183 ssid, "%s", wmem_strbuf_get_str(ssid_sb));
11184 ssid = (gchar*)wmem_strbuf_get_str(ssid_sb);
11187 if (ssid_len > 0) {
11188 proto_item_append_text(ti, ": %s", ssid);
11190 col_append_fstr(pinfo->cinfo, COL_INFO, ", SSID=%s", ssid);
11192 /* Wlan Stats */
11193 memcpy(wlan_stats.ssid, ssid, MIN(ssid_len, MAX_SSID_LEN));
11194 wlan_stats.ssid_len = ssid_len;
11195 } else {
11196 proto_item_append_text(ti, ": Broadcast");
11198 col_append_str(pinfo->cinfo, COL_INFO, ", SSID=Broadcast");
11201 beacon_padding += 1; /* padding bug */
11203 return offset + 2 + tag_len;
11206 static int
11207 ieee80211_tag_supp_rates(packet_info *pinfo, proto_tree *tree,
11208 proto_item *ti, proto_item *ti_len,
11209 guint32 tag_len, tvbuff_t *tvb,
11210 int offset, int tag_end)
11212 /* 7.3.2.2 Supported Rates element (1) */
11213 if (tag_len < 1) {
11214 expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length,
11215 "Tag length %u too short, must be greater than 0",
11216 tag_len);
11217 return offset;
11220 offset += 2;
11222 while (offset < tag_end) {
11223 proto_tree_add_item(tree, hf_ieee80211_tag_supp_rates, tvb, offset, 1,
11224 ENC_BIG_ENDIAN);
11225 proto_item_append_text(ti, " %s,",
11226 val_to_str_ext_const(tvb_get_guint8(tvb, offset),
11227 &ieee80211_supported_rates_vals_ext,
11228 "Unknown Rate"));
11229 offset += 1;
11232 proto_item_append_text(ti, " [Mbit/sec]");
11234 return offset;
11237 static int
11238 ieee80211_tag_fh_parameter(packet_info *pinfo, proto_tree *tree,
11239 proto_item *ti_len, guint32 tag_len,
11240 tvbuff_t *tvb, int offset)
11242 /* 7.3.2.3 FH Parameter Set element (2) */
11243 if (tag_len < 5) {
11244 expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length,
11245 "Tag length %u too short, must be >= 5", tag_len);
11246 return offset;
11249 offset += 2;
11251 proto_tree_add_item(tree, hf_ieee80211_tag_fh_dwell_time,
11252 tvb, offset, 2, ENC_LITTLE_ENDIAN);
11253 offset += 2;
11255 proto_tree_add_item(tree, hf_ieee80211_tag_fh_hop_set,
11256 tvb, offset, 1, ENC_LITTLE_ENDIAN);
11257 offset += 1;
11259 proto_tree_add_item(tree, hf_ieee80211_tag_fh_hop_pattern,
11260 tvb, offset, 1, ENC_LITTLE_ENDIAN);
11261 offset += 1;
11263 proto_tree_add_item(tree, hf_ieee80211_tag_fh_hop_index,
11264 tvb, offset, 1, ENC_LITTLE_ENDIAN);
11265 offset += 1;
11267 return offset;
11270 static int
11271 ieee80211_tag_ds_parameter(packet_info *pinfo, proto_tree *tree,
11272 proto_item *ti, proto_item *ti_len,
11273 guint32 tag_len, tvbuff_t *tvb,
11274 int offset)
11276 /* 7.3.2.4 DS Parameter Set element (3) */
11277 if (tag_len != 1) {
11278 expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length,
11279 "Tag length %u wrong, must be = 1", tag_len);
11280 return offset;
11283 offset += 2;
11285 proto_tree_add_item(tree, hf_ieee80211_tag_ds_param_channel,
11286 tvb, offset, 1, ENC_BIG_ENDIAN);
11288 proto_item_append_text(ti, ": Current Channel: %u",
11289 tvb_get_guint8(tvb, offset));
11291 wlan_stats.channel = tvb_get_guint8(tvb, offset);
11292 offset += 1;
11294 return offset;
11297 static int
11298 ieee80211_tag_cf_parameter(packet_info *pinfo, proto_tree *tree,
11299 proto_item *ti, proto_item *ti_len,
11300 guint32 tag_len, tvbuff_t *tvb,
11301 int offset)
11303 /* 7.3.2.5 CF Parameter Set element (4) */
11304 if (tag_len != 6) {
11305 expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length,
11306 "Tag length %u wrong, must be = 6", tag_len);
11307 return offset;
11310 offset += 2;
11312 proto_tree_add_item(tree, hf_ieee80211_tag_cfp_count,
11313 tvb, offset, 1, ENC_BIG_ENDIAN);
11314 proto_item_append_text(ti, ": CFP count %u", tvb_get_guint8(tvb, offset));
11315 offset += 1;
11317 proto_tree_add_item(tree, hf_ieee80211_tag_cfp_period,
11318 tvb, offset, 1, ENC_BIG_ENDIAN);
11319 proto_item_append_text(ti, ": CFP Period %u", tvb_get_guint8(tvb, offset));
11320 offset += 1;
11322 proto_tree_add_item(tree, hf_ieee80211_tag_cfp_max_duration,
11323 tvb, offset, 2, ENC_LITTLE_ENDIAN);
11324 proto_item_append_text(ti, ": CFP Max Duration %u",
11325 tvb_get_letohs(tvb, offset));
11326 offset += 2;
11328 proto_tree_add_item(tree, hf_ieee80211_tag_cfp_dur_remaining,
11329 tvb, offset, 2, ENC_LITTLE_ENDIAN);
11330 proto_item_append_text(ti, ": CFP Dur Remaining %u",
11331 tvb_get_letohs(tvb, offset));
11332 offset += 1;
11334 return offset;
11337 static int
11338 ieee80211_tag_tim(packet_info *pinfo, proto_tree *tree,
11339 proto_item *ti, proto_item *ti_len,
11340 guint32 tag_len, tvbuff_t *tvb, int offset)
11342 proto_tree *bmapctl_tree;
11343 proto_item *bmapctl_item;
11345 /* 7.3.2.6 TIM (5) */
11346 if (tag_len < 4) {
11347 expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length,
11348 "Tag length %u too short, must be >= 4", tag_len);
11349 return offset;
11352 offset += 2;
11354 proto_tree_add_item(tree, hf_ieee80211_tim_dtim_count,
11355 tvb, offset, 1, ENC_LITTLE_ENDIAN);
11356 proto_item_append_text(ti, ": DTIM %u of", tvb_get_guint8(tvb, offset));
11357 offset += 1;
11359 proto_tree_add_item(tree, hf_ieee80211_tim_dtim_period,
11360 tvb, offset, 1, ENC_LITTLE_ENDIAN);
11361 proto_item_append_text(ti, " %u bitmap", tvb_get_guint8(tvb, offset + 1));
11362 offset += 1;
11364 bmapctl_item = proto_tree_add_item(tree, hf_ieee80211_tim_bmapctl,
11365 tvb, offset, 1, ENC_LITTLE_ENDIAN);
11366 bmapctl_tree = proto_item_add_subtree(bmapctl_item, ett_tag_bmapctl_tree);
11367 proto_tree_add_item(bmapctl_tree, hf_ieee80211_tim_bmapctl_mcast,
11368 tvb, offset, 1, ENC_LITTLE_ENDIAN);
11369 proto_tree_add_item(bmapctl_tree, hf_ieee80211_tim_bmapctl_offset,
11370 tvb, offset, 1, ENC_LITTLE_ENDIAN);
11371 offset += 1;
11373 proto_tree_add_item(tree, hf_ieee80211_tim_partial_virtual_bitmap,
11374 tvb, offset, tag_len - 3, ENC_NA);
11375 offset += tag_len - 3;
11377 return offset;
11380 static int
11381 ieee80211_tag_ibss_parameter(packet_info *pinfo, proto_tree *tree,
11382 proto_item *ti, proto_item *ti_len,
11383 guint32 tag_len, tvbuff_t *tvb,
11384 int offset)
11386 /* 7.3.2.7 IBSS Parameter Set element (6) */
11388 if (tag_len != 2) {
11389 expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length,
11390 "Tag length %u wrong, must be = 2", tag_len);
11391 return offset;
11394 offset += 2;
11396 proto_tree_add_item(tree, hf_ieee80211_tag_ibss_atim_window,
11397 tvb, offset, 2, ENC_LITTLE_ENDIAN);
11398 proto_item_append_text(ti, ": ATIM window 0x%x",
11399 tvb_get_letohs(tvb, offset));
11400 offset += 2;
11402 return offset;
11405 static const value_string environment_vals[] = {
11406 { 0x20, "Any" },
11407 { 0x4f, "Outdoor" },
11408 { 0x49, "Indoor" },
11409 { 0, NULL }
11412 static int
11413 ieee80211_tag_country_info(packet_info *pinfo, proto_tree *tree,
11414 proto_item *ti, proto_item *ti_len,
11415 guint32 tag_len, tvbuff_t *tvb,
11416 int offset, int tag_end)
11418 /* 7.3.2.9 Country information element (7) */
11419 proto_tree *sub_tree;
11420 proto_item *sub_item;
11422 if (tag_len < 6) {
11423 expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length,
11424 "Tag length %u too short, must be >= 6", tag_len);
11425 return offset;
11428 offset += 2;
11430 proto_tree_add_item(tree, hf_ieee80211_tag_country_info_code,
11431 tvb, offset, 2, ENC_ASCII|ENC_NA);
11432 proto_item_append_text(ti, ": Country Code %s",
11433 tvb_get_string(wmem_packet_scope(), tvb, offset, 2));
11434 offset += 2;
11436 proto_tree_add_item(tree, hf_ieee80211_tag_country_info_env,
11437 tvb, offset, 1, ENC_BIG_ENDIAN);
11438 proto_item_append_text(ti, ", Environment %s",
11439 val_to_str(tvb_get_guint8(tvb, offset),
11440 environment_vals,"Unknown (0x%02x)"));
11441 offset += 1;
11443 while (offset < tag_end) {
11444 /* Padding ? */
11445 if ((tag_end - offset) < 3) {
11446 proto_tree_add_item(tree, hf_ieee80211_tag_country_info_pad,
11447 tvb, offset, 1, ENC_NA);
11448 offset += 1;
11449 continue;
11451 if (tvb_get_guint8(tvb, offset) <= 200) { /* 802.11d */
11452 sub_item = proto_tree_add_item(tree, hf_ieee80211_tag_country_info_fnm,
11453 tvb, offset, 3, ENC_NA);
11454 sub_tree = proto_item_add_subtree(sub_item, ett_tag_country_fnm_tree);
11456 proto_tree_add_item(sub_tree, hf_ieee80211_tag_country_info_fnm_fcn,
11457 tvb, offset, 1, ENC_BIG_ENDIAN);
11458 proto_item_append_text(sub_item, ": First Channel Number: %d",
11459 tvb_get_guint8(tvb, offset));
11460 offset += 1;
11461 proto_tree_add_item(sub_tree, hf_ieee80211_tag_country_info_fnm_nc,
11462 tvb, offset, 1, ENC_BIG_ENDIAN);
11463 proto_item_append_text(sub_item, ", Number of Channels: %d",
11464 tvb_get_guint8(tvb, offset));
11465 offset += 1;
11466 proto_tree_add_item(sub_tree, hf_ieee80211_tag_country_info_fnm_mtpl,
11467 tvb, offset, 1, ENC_BIG_ENDIAN);
11468 proto_item_append_text(sub_item,
11469 ", Maximum Transmit Power Level: %d dBm",
11470 tvb_get_guint8(tvb, offset));
11471 offset += 1;
11472 } else { /* 802.11j */
11473 sub_item = proto_tree_add_item(tree, hf_ieee80211_tag_country_info_rrc,
11474 tvb, offset, 3, ENC_NA);
11475 sub_tree = proto_item_add_subtree(sub_item, ett_tag_country_rcc_tree);
11477 proto_tree_add_item(sub_tree, hf_ieee80211_tag_country_info_rrc_rei,
11478 tvb, offset, 1, ENC_BIG_ENDIAN);
11479 proto_item_append_text(sub_item,
11480 ": Regulatory Extension Identifier: %d",
11481 tvb_get_guint8(tvb, offset));
11482 offset += 1;
11483 proto_tree_add_item(sub_tree, hf_ieee80211_tag_country_info_rrc_rc,
11484 tvb, offset, 1, ENC_BIG_ENDIAN);
11485 proto_item_append_text(sub_item, ", Regulatory Class: %d",
11486 tvb_get_guint8(tvb, offset));
11487 offset += 1;
11488 proto_tree_add_item(sub_tree, hf_ieee80211_tag_country_info_rrc_cc,
11489 tvb, offset, 1, ENC_BIG_ENDIAN);
11490 proto_item_append_text(sub_item, ", Coverage Class: %d",
11491 tvb_get_guint8(tvb, offset));
11492 offset += 1;
11496 return offset;
11499 static int
11500 ieee80211_tag_fh_hopping_parameter(packet_info *pinfo,
11501 proto_tree *tree,
11502 proto_item *ti,
11503 proto_item *ti_len,
11504 guint32 tag_len, tvbuff_t *tvb,
11505 int offset)
11507 /* 7.3.2.10 Hopping Pattern Parameters information element (8) */
11508 if (tag_len < 2) {
11509 expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length,
11510 "Tag length %u too short, must be >= 2", tag_len);
11511 return offset;
11514 offset += 2;
11516 proto_tree_add_item(tree, hf_ieee80211_tag_fh_hopping_parameter_prime_radix,
11517 tvb, offset, 1, ENC_BIG_ENDIAN);
11518 proto_item_append_text(ti, ": Prime Radix: %u", tvb_get_guint8(tvb, offset));
11519 offset += 1;
11521 proto_tree_add_item(tree, hf_ieee80211_tag_fh_hopping_parameter_nb_channels,
11522 tvb, offset, 1, ENC_BIG_ENDIAN);
11523 proto_item_append_text(ti, ", Number of Channels: %u",
11524 tvb_get_guint8(tvb, offset));
11525 offset += 1;
11527 return offset;
11530 static int
11531 ieee80211_tag_fh_hopping_table(packet_info *pinfo, proto_tree *tree,
11532 proto_item *ti_len,
11533 guint32 tag_len, tvbuff_t *tvb,
11534 int offset, int tag_end)
11536 /* 7.3.2.11 Hopping Pattern Table information element (9) */
11537 if (tag_len < 4) {
11538 expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length,
11539 "Tag length %u too short, must be >= 4", tag_len);
11540 return offset;
11543 offset += 2;
11545 proto_tree_add_item(tree, hf_ieee80211_tag_fh_hopping_table_flag,
11546 tvb, offset, 1, ENC_BIG_ENDIAN);
11547 offset += 1;
11549 proto_tree_add_item(tree, hf_ieee80211_tag_fh_hopping_table_number_of_sets,
11550 tvb, offset, 1, ENC_BIG_ENDIAN);
11551 offset += 1;
11553 proto_tree_add_item(tree, hf_ieee80211_tag_fh_hopping_table_modulus,
11554 tvb, offset, 1, ENC_BIG_ENDIAN);
11555 offset += 1;
11557 proto_tree_add_item(tree, hf_ieee80211_tag_fh_hopping_table_offset,
11558 tvb, offset, 1, ENC_BIG_ENDIAN);
11559 offset += 1;
11561 while (offset < tag_end) {
11562 proto_tree_add_item(tree, hf_ieee80211_tag_fh_hopping_random_table,
11563 tvb, offset, 2, ENC_BIG_ENDIAN);
11564 offset += 2;
11567 return offset;
11570 static int
11571 add_tagged_field(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset, int ftype)
11573 guint32 oui;
11574 tvbuff_t *tag_tvb;
11575 const guint8 *tag_data_ptr;
11576 guint32 tag_no, tag_len;
11577 int n, ret;
11578 char print_buff[SHORT_STR];
11579 proto_tree *orig_tree = tree;
11580 proto_item *ti = NULL;
11581 proto_item *ti_len, *ti_tag;
11582 int tag_end;
11584 tag_no = tvb_get_guint8(tvb, offset);
11585 tag_len = tvb_get_guint8(tvb, offset + 1);
11586 tag_end = offset + 2 + tag_len;
11588 if (tree) {
11589 ti = proto_tree_add_item(orig_tree, hf_ieee80211_tag, tvb, offset, 2 + tag_len , ENC_NA);
11590 proto_item_append_text(ti, ": %s", val_to_str_ext(tag_no, &tag_num_vals_ext, "Reserved (%d)"));
11592 tree = proto_item_add_subtree(ti, ett_80211_mgt_ie);
11596 ti_tag = proto_tree_add_item(tree, hf_ieee80211_tag_number, tvb, offset, 1, ENC_BIG_ENDIAN);
11598 ti_len = proto_tree_add_uint(tree, hf_ieee80211_tag_length, tvb, offset + 1, 1, tag_len);
11600 switch (tag_no) {
11601 case TAG_SSID:
11602 offset += ieee80211_tag_ssid(pinfo, tree, ti, ti_len, tag_len, tvb,
11603 offset);
11604 break;
11605 case TAG_SUPP_RATES:
11606 offset += ieee80211_tag_supp_rates(pinfo, tree, ti, ti_len, tag_len, tvb,
11607 offset, tag_end);
11608 break;
11609 case TAG_FH_PARAMETER:
11610 offset += ieee80211_tag_fh_parameter(pinfo, tree, ti_len, tag_len, tvb,
11611 offset);
11612 break;
11613 case TAG_DS_PARAMETER:
11614 offset += ieee80211_tag_ds_parameter(pinfo, tree, ti, ti_len, tag_len, tvb,
11615 offset);
11616 break;
11617 case TAG_CF_PARAMETER:
11618 offset += ieee80211_tag_cf_parameter(pinfo, tree, ti, ti_len, tag_len, tvb,
11619 offset);
11620 break;
11621 case TAG_TIM:
11622 offset += ieee80211_tag_tim(pinfo, tree, ti, ti_len, tag_len, tvb, offset);
11623 break;
11624 case TAG_IBSS_PARAMETER:
11625 offset += ieee80211_tag_ibss_parameter(pinfo, tree, ti, ti_len, tag_len,
11626 tvb, offset);
11627 break;
11628 case TAG_COUNTRY_INFO:
11629 offset += ieee80211_tag_country_info(pinfo, tree, ti, ti_len, tag_len, tvb,
11630 offset, tag_end);
11631 break;
11632 case TAG_FH_HOPPING_PARAMETER:
11633 offset += ieee80211_tag_fh_hopping_parameter(pinfo, tree, ti, ti_len,
11634 tag_len, tvb, offset);
11635 break;
11636 case TAG_FH_HOPPING_TABLE:
11637 offset += ieee80211_tag_fh_hopping_table(pinfo, tree, ti_len, tag_len,
11638 tvb, offset, tag_end);
11639 break;
11641 case TAG_REQUEST: /* 7.3.2.12 Request information element (10) */
11642 while (offset < tag_end)
11644 proto_tree_add_item(tree, hf_ieee80211_tag_request, tvb, offset, 1, ENC_BIG_ENDIAN);
11645 offset += 1;
11647 break;
11649 case TAG_QBSS_LOAD: /* 7.3.2.28 BSS Load element (11) */
11650 if ((tag_len < 4) || (tag_len > 5))
11652 expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length, "Tag Length %u wrong, must be = 4 or 5", tag_len);
11653 break;
11656 if (tag_len == 4)
11658 /* QBSS Version 1 */
11659 proto_item_append_text(ti, " Cisco QBSS Version 1 - non CCA");
11661 /* Extract Values */
11662 proto_tree_add_uint(tree, hf_ieee80211_qbss_version, tvb, offset + 2, tag_len, 1);
11663 proto_tree_add_item(tree, hf_ieee80211_qbss_scount, tvb, offset + 2, 2, ENC_LITTLE_ENDIAN);
11664 proto_tree_add_item(tree, hf_ieee80211_qbss_cu, tvb, offset + 4, 1, ENC_BIG_ENDIAN);
11665 proto_tree_add_item(tree, hf_ieee80211_qbss_adc, tvb, offset + 5, 1, ENC_BIG_ENDIAN);
11667 else if (tag_len == 5)
11669 /* QBSS Version 2 */
11670 proto_item_append_text(ti, " 802.11e CCA Version");
11672 /* Extract Values */
11673 proto_tree_add_uint(tree, hf_ieee80211_qbss_version, tvb, offset + 2, tag_len, 2);
11674 proto_tree_add_item(tree, hf_ieee80211_qbss_scount, tvb, offset + 2, 2, ENC_LITTLE_ENDIAN);
11675 proto_tree_add_item(tree, hf_ieee80211_qbss_cu, tvb, offset + 4, 1, ENC_BIG_ENDIAN);
11676 proto_tree_add_item(tree, hf_ieee80211_qbss_adc, tvb, offset + 5, 2, ENC_LITTLE_ENDIAN);
11678 break;
11680 case TAG_TSPEC: /* 7.3.2.30 TSPEC element (13) */
11681 if (tag_len != 55)
11683 expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length, "Tag Length %u wrong, must be = 55", tag_len);
11684 break;
11686 offset += 2;
11688 add_fixed_field(tree, tvb, pinfo, offset, FIELD_QOS_TS_INFO);
11689 offset += 3;
11691 proto_tree_add_item(tree, hf_ieee80211_tspec_nor_msdu, tvb, offset, 2, ENC_LITTLE_ENDIAN);
11692 offset += 2;
11694 proto_tree_add_item(tree, hf_ieee80211_tspec_max_msdu, tvb, offset, 2, ENC_LITTLE_ENDIAN);
11695 offset += 2;
11697 proto_tree_add_item(tree, hf_ieee80211_tspec_min_srv, tvb, offset, 4, ENC_LITTLE_ENDIAN);
11698 offset += 4;
11700 proto_tree_add_item(tree, hf_ieee80211_tspec_max_srv, tvb, offset, 4, ENC_LITTLE_ENDIAN);
11701 offset += 4;
11703 proto_tree_add_item(tree, hf_ieee80211_tspec_inact_int, tvb, offset, 4, ENC_LITTLE_ENDIAN);
11704 offset += 4;
11706 proto_tree_add_item(tree, hf_ieee80211_tspec_susp_int, tvb, offset, 4, ENC_LITTLE_ENDIAN);
11707 offset += 4;
11709 proto_tree_add_item(tree, hf_ieee80211_tspec_srv_start, tvb, offset, 4, ENC_LITTLE_ENDIAN);
11710 offset += 4;
11712 proto_tree_add_item(tree, hf_ieee80211_tspec_min_data, tvb, offset, 4, ENC_LITTLE_ENDIAN);
11713 offset += 4;
11715 proto_tree_add_item(tree, hf_ieee80211_tspec_mean_data, tvb, offset, 4, ENC_LITTLE_ENDIAN);
11716 offset += 4;
11718 proto_tree_add_item(tree, hf_ieee80211_tspec_peak_data, tvb, offset, 4, ENC_LITTLE_ENDIAN);
11719 offset += 4;
11721 proto_tree_add_item(tree, hf_ieee80211_tspec_burst_size, tvb, offset, 4, ENC_LITTLE_ENDIAN);
11722 offset += 4;
11724 proto_tree_add_item(tree, hf_ieee80211_tspec_delay_bound, tvb, offset, 4, ENC_LITTLE_ENDIAN);
11725 offset += 4;
11727 proto_tree_add_item(tree, hf_ieee80211_tspec_min_phy, tvb, offset, 4, ENC_LITTLE_ENDIAN);
11728 offset += 4;
11730 proto_tree_add_item(tree, hf_ieee80211_tspec_surplus, tvb, offset, 2, ENC_LITTLE_ENDIAN);
11731 offset += 2;
11733 proto_tree_add_item(tree, hf_ieee80211_tspec_medium, tvb, offset, 2, ENC_LITTLE_ENDIAN);
11734 offset += 2;
11736 break;
11738 case TAG_TCLAS: /* 7.3.2.31 TCLAS element (14) */
11739 if (tag_len < 6)
11741 expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length, "Tag length %u too short, must be >= 6", tag_len);
11742 break;
11745 guint8 type;
11746 guint8 version;
11747 proto_item *class_mask;
11748 proto_tree *mask_tree;
11750 offset += 2;
11751 proto_tree_add_item(tree, hf_ieee80211_tclas_up, tvb, offset, 1, ENC_LITTLE_ENDIAN);
11752 offset += 1;
11754 type = tvb_get_guint8(tvb, offset);
11755 proto_tree_add_item(tree, hf_ieee80211_tclas_class_type, tvb, offset, 1, ENC_LITTLE_ENDIAN);
11756 offset += 1;
11758 class_mask = proto_tree_add_item(tree, hf_ieee80211_tclas_class_mask,
11759 tvb, offset, 1, ENC_LITTLE_ENDIAN);
11760 offset += 1;
11762 switch (type)
11764 case 0:
11765 offset--;
11766 mask_tree = proto_item_add_subtree(class_mask,
11767 ett_tag_tclas_mask_tree);
11768 proto_tree_add_item(mask_tree,
11769 hf_ieee80211_tclas_class_mask0_src_addr,
11770 tvb, offset, 1, ENC_LITTLE_ENDIAN);
11771 proto_tree_add_item(mask_tree,
11772 hf_ieee80211_tclas_class_mask0_dst_addr,
11773 tvb, offset, 1, ENC_LITTLE_ENDIAN);
11774 proto_tree_add_item(mask_tree,
11775 hf_ieee80211_tclas_class_mask0_type,
11776 tvb, offset, 1, ENC_LITTLE_ENDIAN);
11777 offset++;
11779 proto_tree_add_item(tree, hf_ieee80211_tclas_src_mac_addr, tvb, offset, 6, ENC_NA);
11780 offset += 6;
11782 proto_tree_add_item(tree, hf_ieee80211_tclas_dst_mac_addr, tvb, offset, 6, ENC_NA);
11783 offset += 6;
11785 proto_tree_add_item(tree, hf_ieee80211_tclas_ether_type, tvb, offset, 2, ENC_LITTLE_ENDIAN);
11786 offset += 2;
11787 break;
11789 case 1:
11790 version = tvb_get_guint8(tvb, offset);
11791 offset--;
11793 mask_tree = proto_item_add_subtree(class_mask,
11794 ett_tag_tclas_mask_tree);
11795 proto_tree_add_item(mask_tree,
11796 hf_ieee80211_tclas_class_mask1_ver,
11797 tvb, offset, 1, ENC_LITTLE_ENDIAN);
11798 proto_tree_add_item(mask_tree,
11799 hf_ieee80211_tclas_class_mask1_src_ip,
11800 tvb, offset, 1, ENC_LITTLE_ENDIAN);
11801 proto_tree_add_item(mask_tree,
11802 hf_ieee80211_tclas_class_mask1_dst_ip,
11803 tvb, offset, 1, ENC_LITTLE_ENDIAN);
11804 proto_tree_add_item(mask_tree,
11805 hf_ieee80211_tclas_class_mask1_src_port,
11806 tvb, offset, 1, ENC_LITTLE_ENDIAN);
11807 proto_tree_add_item(mask_tree,
11808 hf_ieee80211_tclas_class_mask1_dst_port,
11809 tvb, offset, 1, ENC_LITTLE_ENDIAN);
11810 if (version == 4) {
11811 proto_tree_add_item(mask_tree,
11812 hf_ieee80211_tclas_class_mask1_ipv4_dscp,
11813 tvb, offset, 1, ENC_LITTLE_ENDIAN);
11814 proto_tree_add_item(mask_tree,
11815 hf_ieee80211_tclas_class_mask1_ipv4_proto,
11816 tvb, offset, 1, ENC_LITTLE_ENDIAN);
11817 } else {
11818 proto_tree_add_item(mask_tree,
11819 hf_ieee80211_tclas_class_mask1_ipv6_flow,
11820 tvb, offset, 1, ENC_LITTLE_ENDIAN);
11822 offset += 1;
11824 proto_tree_add_item(tree, hf_ieee80211_tclas_version, tvb, offset, 1, ENC_LITTLE_ENDIAN);
11825 offset += 1;
11826 if (version == 4)
11828 proto_tree_add_item(tree, hf_ieee80211_tclas_ipv4_src, tvb, offset, 4, ENC_BIG_ENDIAN);
11829 offset += 4;
11830 proto_tree_add_item(tree, hf_ieee80211_tclas_ipv4_dst, tvb, offset, 4, ENC_BIG_ENDIAN);
11831 offset += 4;
11832 proto_tree_add_item(tree, hf_ieee80211_tclas_src_port, tvb, offset, 2, ENC_BIG_ENDIAN);
11833 offset += 2;
11834 proto_tree_add_item(tree, hf_ieee80211_tclas_dst_port, tvb, offset, 2, ENC_BIG_ENDIAN);
11835 offset += 2;
11836 proto_tree_add_item(tree, hf_ieee80211_tclas_dscp, tvb, offset, 1, ENC_BIG_ENDIAN);
11837 offset += 1;
11838 proto_tree_add_item(tree, hf_ieee80211_tclas_protocol, tvb, offset, 1, ENC_BIG_ENDIAN);
11839 offset += 1;
11841 else if (version == 6)
11843 proto_tree_add_item(tree, hf_ieee80211_tclas_ipv6_src, tvb, offset, 16, ENC_NA);
11844 offset += 16;
11845 proto_tree_add_item(tree, hf_ieee80211_tclas_ipv6_dst, tvb, offset, 16, ENC_NA);
11846 offset += 16;
11847 proto_tree_add_item(tree, hf_ieee80211_tclas_src_port, tvb, offset, 2, ENC_BIG_ENDIAN);
11848 offset += 2;
11849 proto_tree_add_item(tree, hf_ieee80211_tclas_dst_port, tvb, offset, 2, ENC_BIG_ENDIAN);
11850 offset += 2;
11851 proto_tree_add_item(tree, hf_ieee80211_tclas_flow, tvb, offset, 3, ENC_BIG_ENDIAN);
11852 offset += 3;
11854 break;
11856 case 2:
11857 offset--;
11858 mask_tree = proto_item_add_subtree(class_mask,
11859 ett_tag_tclas_mask_tree);
11860 proto_tree_add_item(mask_tree,
11861 hf_ieee80211_tclas_class_mask2_tci,
11862 tvb, offset, 1, ENC_LITTLE_ENDIAN);
11863 offset++;
11865 proto_tree_add_item(tree, hf_ieee80211_tclas_tag_type, tvb, offset, 2, ENC_LITTLE_ENDIAN);
11866 offset += 2;
11867 break;
11869 default:
11870 break;
11873 break;
11875 case TAG_SCHEDULE: /* 7.3.2.34 Schedule element (15) */
11876 if (tag_len != 14)
11878 expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length, "Tag Length %u wrong, must be = 14", tag_len);
11879 break;
11881 offset += 2;
11883 add_fixed_field(tree, tvb, pinfo, offset, FIELD_SCHEDULE_INFO);
11884 offset += 2;
11886 proto_tree_add_item(tree, hf_ieee80211_sched_srv_start, tvb, offset, 4, ENC_LITTLE_ENDIAN);
11887 offset += 4;
11889 proto_tree_add_item(tree, hf_ieee80211_sched_srv_int, tvb, offset, 4, ENC_LITTLE_ENDIAN);
11890 offset += 4;
11892 proto_tree_add_item(tree, hf_ieee80211_sched_spec_int, tvb, offset, 2, ENC_LITTLE_ENDIAN);
11893 offset += 2;
11894 break;
11896 case TAG_CHALLENGE_TEXT: /* 7.3.2.8 Challenge Text element (16) */
11897 offset += 2;
11898 proto_tree_add_item(tree, hf_ieee80211_tag_challenge_text, tvb, offset, tag_len, ENC_NA);
11899 break;
11901 case TAG_POWER_CONSTRAINT: /* 7.3.2.15 Power Constraint element (32) */
11903 if (tag_len != 1)
11905 expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length, "Tag Length %u wrong, must be = 1", tag_len);
11906 break;
11908 offset += 2;
11910 proto_tree_add_item(tree, hf_ieee80211_tag_power_constraint_local, tvb, offset, 1, ENC_LITTLE_ENDIAN);
11911 proto_item_append_text(ti, ": %d", tvb_get_guint8(tvb, offset));
11912 offset += 1;
11914 break;
11917 case TAG_POWER_CAPABILITY: /* 7.3.2.16 Power Capability element (33) */
11919 if (tag_len != 2)
11921 expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length, "Tag Length %u wrong, must be = 2", tag_len);
11922 break;
11924 offset += 2;
11926 proto_tree_add_item(tree, hf_ieee80211_tag_power_capability_min, tvb, offset, 1, ENC_LITTLE_ENDIAN);
11927 proto_item_append_text(ti, " Min: %d", tvb_get_guint8(tvb, offset));
11928 offset += 1;
11930 proto_tree_add_item(tree, hf_ieee80211_tag_power_capability_max, tvb, offset, 1, ENC_LITTLE_ENDIAN);
11931 proto_item_append_text(ti, ", Max :%d", tvb_get_guint8(tvb, offset));
11932 offset += 1;
11933 break;
11936 case TAG_TPC_REQUEST: /* 7.3.2.18 TPC Request element (34) */
11938 if (tag_len != 0)
11940 expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length, "Tag Length %u wrong, must be = 0", tag_len);
11941 break;
11943 offset += 2;
11945 /* No Data */
11946 break;
11949 case TAG_TPC_REPORT: /* 7.3.2.18 TPC Report element (35) */
11951 if (tag_len != 2)
11953 expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length, "Tag Length %u wrong, must be = 2", tag_len);
11954 break;
11956 offset += 2;
11958 proto_tree_add_item(tree, hf_ieee80211_tag_tpc_report_trsmt_pow, tvb, offset, 1, ENC_LITTLE_ENDIAN);
11959 proto_item_append_text(ti, " Transmit Power: %d", tvb_get_guint8(tvb, offset));
11960 offset += 1;
11962 proto_tree_add_item(tree, hf_ieee80211_tag_tpc_report_link_mrg, tvb, offset, 1, ENC_LITTLE_ENDIAN);
11963 proto_item_append_text(ti, ", Link Margin: %d", tvb_get_guint8(tvb, offset));
11964 offset += 1;
11966 break;
11969 case TAG_SUPPORTED_CHANNELS: /* 7.3.2.19 Supported Channels element (36) */
11971 proto_item *chan_item;
11972 proto_tree *chan_tree;
11973 guint i = 1;
11975 offset += 2;
11976 if (tag_len % 2 == 1) {
11977 expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length, "Tag length %u must be even", tag_len);
11978 break;
11980 while (offset < tag_end)
11982 chan_item = proto_tree_add_item(tree, hf_ieee80211_tag_supported_channels, tvb, offset, 2, ENC_NA);
11983 proto_item_append_text(chan_item, " #%d", i);
11984 i += 1;
11986 chan_tree = proto_item_add_subtree(chan_item , ett_tag_supported_channels);
11988 proto_tree_add_item(chan_tree, hf_ieee80211_tag_supported_channels_first, tvb, offset, 1, ENC_LITTLE_ENDIAN);
11989 proto_item_append_text(chan_item, " First: %d", tvb_get_guint8(tvb, offset));
11990 offset += 1;
11992 proto_tree_add_item(chan_tree, hf_ieee80211_tag_supported_channels_range, tvb, offset, 1, ENC_LITTLE_ENDIAN);
11993 proto_item_append_text(chan_item, ", Range: %d ", tvb_get_guint8(tvb, offset));
11994 offset += 1;
11997 break;
11999 case TAG_CHANNEL_SWITCH_ANN: /* 7.3.2.20 Channel Switch Announcement element (37) */
12001 if (tag_len != 3)
12003 expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length, "Tag Length %u wrong, must be = 3", tag_len);
12004 break;
12006 offset += 2;
12008 proto_tree_add_item(tree, hf_ieee80211_csa_channel_switch_mode, tvb, offset, 1, ENC_LITTLE_ENDIAN);
12009 proto_item_append_text(ti, " Mode: %d", tvb_get_guint8(tvb, offset));
12010 offset += 1;
12012 proto_tree_add_item(tree, hf_ieee80211_csa_new_channel_number, tvb, offset, 1, ENC_LITTLE_ENDIAN);
12013 proto_item_append_text(ti, ", Number: %d ", tvb_get_guint8(tvb, offset));
12014 offset += 1;
12016 proto_tree_add_item(tree, hf_ieee80211_csa_channel_switch_count, tvb, offset, 1, ENC_LITTLE_ENDIAN);
12017 proto_item_append_text(ti, ", Count: %d ", tvb_get_guint8(tvb, offset));
12018 offset += 1;
12020 break;
12023 case TAG_MEASURE_REQ: /* 7.3.2.21 Measurement Request element (38) with update from 802.11k-2008 */
12024 if (tag_len < 3)
12026 expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length, "Tag length %u too short, must be >= 3", tag_len);
12027 break;
12030 guint8 request_type;
12031 proto_item *parent_item;
12032 proto_tree *sub_tree;
12034 offset += 2;
12036 proto_tree_add_item(tree, hf_ieee80211_tag_measure_request_token, tvb, offset, 1, ENC_NA);
12037 offset += 1;
12039 parent_item = proto_tree_add_item(tree, hf_ieee80211_tag_measure_request_mode, tvb, offset, 1, ENC_NA);
12040 sub_tree = proto_item_add_subtree(parent_item, ett_tag_measure_request_mode_tree);
12041 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_request_mode_parallel, tvb, offset, 1, ENC_NA);
12042 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_request_mode_enable, tvb, offset, 1, ENC_NA);
12043 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_request_mode_request, tvb, offset, 1, ENC_NA);
12044 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_request_mode_report, tvb, offset, 1, ENC_NA);
12045 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_request_mode_duration_mandatory, tvb, offset, 1, ENC_NA);
12046 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_request_mode_reserved, tvb, offset, 1, ENC_NA);
12047 offset += 1;
12050 parent_item = proto_tree_add_item(tree, hf_ieee80211_tag_measure_request_type, tvb, offset, 1, ENC_NA);
12051 sub_tree = proto_item_add_subtree(parent_item, ett_tag_measure_request_type_tree);
12052 request_type = tvb_get_guint8 (tvb, offset);
12053 offset += 1;
12055 switch (request_type) {
12056 case 0: /* Basic Request */
12057 case 1: /* Clear channel assessment (CCA) request */
12058 case 2: /* Receive power indication (RPI) histogram request */
12061 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_request_channel_number, tvb, offset, 1, ENC_NA);
12062 offset += 1;
12064 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_request_start_time, tvb, offset, 8, ENC_LITTLE_ENDIAN);
12065 offset += 8;
12067 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_request_duration, tvb, offset, 2, ENC_LITTLE_ENDIAN);
12068 offset += 2;
12069 break;
12071 case 3: /* Channel Load Request */
12072 case 4: /* Noise Histogram Request */
12074 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_request_regulatory_class, tvb, offset, 1, ENC_NA);
12075 offset += 1;
12077 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_request_channel_number, tvb, offset, 1, ENC_NA);
12078 offset += 1;
12080 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_request_randomization_interval, tvb, offset, 2, ENC_LITTLE_ENDIAN);
12081 offset += 2;
12083 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_request_duration, tvb, offset, 2, ENC_LITTLE_ENDIAN);
12084 offset += 2;
12085 /* TODO Add Optional Subelements */
12086 break;
12088 case 5: /* Beacon Request */
12090 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_request_regulatory_class, tvb, offset, 1, ENC_NA);
12091 offset += 1;
12093 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_request_channel_number, tvb, offset, 1, ENC_NA);
12094 offset += 1;
12096 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_request_randomization_interval, tvb, offset, 2, ENC_LITTLE_ENDIAN);
12097 offset += 2;
12099 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_request_duration, tvb, offset, 2, ENC_LITTLE_ENDIAN);
12100 offset += 2;
12102 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_request_measurement_mode, tvb, offset, 1, ENC_NA);
12103 offset += 1;
12105 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_request_bssid, tvb, offset, 6, ENC_NA);
12106 offset += 6;
12108 while (offset < tag_end)
12110 guint8 sub_id, sub_length, sub_tag_end;
12111 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_request_beacon_sub_id, tvb, offset, 1, ENC_NA);
12112 sub_id = tvb_get_guint8(tvb, offset);
12113 offset += 1;
12115 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_request_subelement_length, tvb, offset, 1, ENC_NA);
12116 sub_length = tvb_get_guint8(tvb, offset);
12117 offset += 1;
12118 sub_tag_end = offset + sub_length;
12120 switch (sub_id) {
12121 case MEASURE_REQ_BEACON_SUB_SSID: /* SSID (0) */
12122 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_request_beacon_sub_ssid, tvb, offset, sub_length, ENC_ASCII|ENC_NA);
12123 offset += sub_length;
12124 break;
12125 case MEASURE_REQ_BEACON_SUB_BRI: /* Beacon Reporting Information (1) */
12126 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_request_beacon_sub_bri_reporting_condition, tvb, offset, 1, ENC_BIG_ENDIAN);
12127 offset += 1;
12128 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_request_beacon_sub_bri_threshold_offset, tvb, offset, 1, ENC_BIG_ENDIAN);
12129 offset += 1;
12130 break;
12131 case MEASURE_REQ_BEACON_SUB_RD: /* Reporting Detail (2) */
12132 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_request_beacon_sub_reporting_detail, tvb, offset, 1, ENC_BIG_ENDIAN);
12133 offset += 1;
12134 break;
12135 case MEASURE_REQ_BEACON_SUB_REQUEST: /* Request (10) */
12136 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_request_beacon_sub_request, tvb, offset, 1, ENC_BIG_ENDIAN);
12137 offset += 1;
12138 break;
12139 case MEASURE_REQ_BEACON_SUB_APCP: /* Request (51) */
12140 /* TODO */
12141 break;
12142 default:
12143 /* no default action */
12144 break;
12146 if (offset < sub_tag_end)
12148 proto_item *tix;
12149 tix = proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_request_beacon_unknown, tvb, offset, sub_tag_end - offset, ENC_NA);
12150 expert_add_info(pinfo, tix, &ei_ieee80211_tag_measure_request_beacon_unknown);
12151 offset = sub_tag_end;
12155 break;
12157 case 6: /* Frame Request */
12159 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_request_regulatory_class, tvb, offset, 1, ENC_NA);
12160 offset += 1;
12162 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_request_channel_number, tvb, offset, 1, ENC_NA);
12163 offset += 1;
12165 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_request_randomization_interval, tvb, offset, 2, ENC_LITTLE_ENDIAN);
12166 offset += 2;
12168 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_request_duration, tvb, offset, 2, ENC_LITTLE_ENDIAN);
12169 offset += 2;
12171 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_request_frame_request_type, tvb, offset, 1, ENC_NA);
12172 offset += 1;
12174 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_request_mac_address, tvb, offset, 6, ENC_NA);
12175 offset += 6;
12177 /* TODO Add Optional Subelements */
12178 break;
12180 case 7: /* BSTA Statistics Request */
12182 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_request_peer_mac_address, tvb, offset, 6, ENC_NA);
12183 offset += 6;
12185 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_request_randomization_interval, tvb, offset, 2, ENC_LITTLE_ENDIAN);
12186 offset += 2;
12188 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_request_duration, tvb, offset, 2, ENC_LITTLE_ENDIAN);
12189 offset += 2;
12191 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_request_group_id, tvb, offset, 1, ENC_NA);
12192 offset += 1;
12194 /* TODO Add Optional Subelements */
12195 break;
12197 case 8: /* Location Configuration Indication (LCI) Request */
12198 /* TODO */
12199 case 9: /* Transmit Stream Measurement Request */
12200 /* TODO */
12201 case 255: /* Measurement Pause Request*/
12202 /* TODO */
12203 default: /* unknown */
12204 break;
12208 break;
12209 case TAG_MEASURE_REP: /* 7.3.2.22 Measurement Report element (39) with update from 802.11k-2008 */
12210 if (tag_len < 3)
12212 expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length, "Tag length %u too short, must be >= 3", tag_len);
12213 break;
12216 proto_item *parent_item;
12217 proto_tree *sub_tree;
12218 guint8 report_type;
12220 offset += 2;
12221 proto_tree_add_item(tree, hf_ieee80211_tag_measure_report_measurement_token, tvb, offset, 1, ENC_NA);
12222 offset += 1;
12224 parent_item = proto_tree_add_item(tree, hf_ieee80211_tag_measure_report_mode, tvb, offset, 1, ENC_NA);
12225 sub_tree = proto_item_add_subtree(parent_item, ett_tag_measure_report_mode_tree);
12226 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_report_mode_late, tvb, offset, 1, ENC_NA);
12227 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_report_mode_incapable, tvb, offset, 1, ENC_NA);
12228 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_report_mode_refused, tvb, offset, 1, ENC_NA);
12229 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_report_mode_reserved, tvb, offset, 1, ENC_NA);
12230 offset += 1;
12232 report_type = tvb_get_guint8(tvb, offset);
12233 parent_item = proto_tree_add_item(tree, hf_ieee80211_tag_measure_report_type, tvb, offset, 1, ENC_LITTLE_ENDIAN);
12234 sub_tree = proto_item_add_subtree(parent_item, ett_tag_measure_report_type_tree);
12235 offset += 1;
12237 if (tag_len == 3)
12238 break;
12239 switch (report_type) {
12240 case 0: /* Basic Report */
12242 proto_tree *sub_tree_map_field;
12244 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_report_channel_number, tvb, offset, 1, ENC_NA);
12245 offset += 1;
12247 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_report_start_time, tvb, offset, 8, ENC_LITTLE_ENDIAN);
12248 offset += 8;
12250 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_report_duration, tvb, offset, 2, ENC_LITTLE_ENDIAN);
12251 offset += 2;
12254 parent_item = proto_tree_add_item(tree, hf_ieee80211_tag_measure_basic_map_field, tvb, offset, 1, ENC_NA);
12255 sub_tree_map_field = proto_item_add_subtree(parent_item, ett_tag_measure_report_basic_map_tree);
12256 proto_tree_add_item(sub_tree_map_field, hf_ieee80211_tag_measure_map_field_bss, tvb, offset, 1, ENC_NA);
12257 proto_tree_add_item(sub_tree_map_field, hf_ieee80211_tag_measure_map_field_odfm, tvb, offset, 1, ENC_NA);
12258 proto_tree_add_item(sub_tree_map_field, hf_ieee80211_tag_measure_map_field_unident_signal, tvb, offset, 1, ENC_NA);
12259 proto_tree_add_item(sub_tree_map_field, hf_ieee80211_tag_measure_map_field_radar, tvb, offset, 1, ENC_NA);
12260 proto_tree_add_item(sub_tree_map_field, hf_ieee80211_tag_measure_map_field_unmeasured, tvb, offset, 1, ENC_NA);
12261 proto_tree_add_item(sub_tree_map_field, hf_ieee80211_tag_measure_map_field_reserved, tvb, offset, 1, ENC_NA);
12262 break;
12264 case 1: /* Clear channel assessment (CCA) report */
12265 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_report_channel_number, tvb, offset, 1, ENC_NA);
12266 offset += 1;
12268 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_report_start_time, tvb, offset, 8, ENC_LITTLE_ENDIAN);
12269 offset += 8;
12271 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_report_duration, tvb, offset, 2, ENC_LITTLE_ENDIAN);
12272 offset += 2;
12274 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_cca_busy_fraction, tvb, offset, 1, ENC_NA);
12275 offset += 1;
12276 break;
12277 case 2: /* Receive power indication (RPI) histogram report */
12278 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_report_channel_number, tvb, offset, 1, ENC_NA);
12279 offset += 1;
12281 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_report_start_time, tvb, offset, 8, ENC_LITTLE_ENDIAN);
12282 offset += 8;
12284 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_report_duration, tvb, offset, 2, ENC_LITTLE_ENDIAN);
12285 offset += 2;
12287 parent_item = proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_rpi_histogram_report, tvb, offset, 8, ENC_NA);
12288 sub_tree = proto_item_add_subtree(parent_item, ett_tag_measure_report_rpi_tree);
12290 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_rpi_histogram_report_0, tvb, offset, 1, ENC_NA);
12291 offset += 1;
12293 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_rpi_histogram_report_1, tvb, offset, 1, ENC_NA);
12294 offset += 1;
12296 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_rpi_histogram_report_2, tvb, offset, 1, ENC_NA);
12297 offset += 1;
12299 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_rpi_histogram_report_3, tvb, offset, 1, ENC_NA);
12300 offset += 1;
12302 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_rpi_histogram_report_4, tvb, offset, 1, ENC_NA);
12303 offset += 1;
12305 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_rpi_histogram_report_5, tvb, offset, 1, ENC_NA);
12306 offset += 1;
12308 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_rpi_histogram_report_6, tvb, offset, 1, ENC_NA);
12309 offset += 1;
12311 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_rpi_histogram_report_7, tvb, offset, 1, ENC_NA);
12312 offset += 1;
12313 break;
12314 case 3: /* Channel Load Report */
12316 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_report_regulatory_class, tvb, offset, 1, ENC_NA);
12317 offset += 1;
12319 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_report_channel_number, tvb, offset, 1, ENC_NA);
12320 offset += 1;
12322 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_report_start_time, tvb, offset, 8, ENC_LITTLE_ENDIAN);
12323 offset += 8;
12325 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_report_duration, tvb, offset, 2, ENC_LITTLE_ENDIAN);
12326 offset += 2;
12328 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_report_channel_load, tvb, offset, 1, ENC_NA);
12329 offset += 1;
12331 /* TODO Add Optional Subelements */
12332 break;
12334 case 4: /* Noise Histogram Report */
12335 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_report_regulatory_class, tvb, offset, 1, ENC_NA);
12336 offset += 1;
12338 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_report_channel_number, tvb, offset, 1, ENC_NA);
12339 offset += 1;
12341 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_report_start_time, tvb, offset, 8, ENC_LITTLE_ENDIAN);
12342 offset += 8;
12344 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_report_duration, tvb, offset, 2, ENC_LITTLE_ENDIAN);
12345 offset += 2;
12347 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_report_ant_id, tvb, offset, 1, ENC_NA);
12348 offset += 1;
12350 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_report_anpi, tvb, offset, 1, ENC_NA);
12351 offset += 1;
12353 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_report_ipi_density_0, tvb, offset, 1, ENC_NA);
12354 offset += 1;
12356 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_report_ipi_density_1, tvb, offset, 1, ENC_NA);
12357 offset += 1;
12359 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_report_ipi_density_2, tvb, offset, 1, ENC_NA);
12360 offset += 1;
12362 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_report_ipi_density_3, tvb, offset, 1, ENC_NA);
12363 offset += 1;
12365 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_report_ipi_density_4, tvb, offset, 1, ENC_NA);
12366 offset += 1;
12368 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_report_ipi_density_5, tvb, offset, 1, ENC_NA);
12369 offset += 1;
12371 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_report_ipi_density_6, tvb, offset, 1, ENC_NA);
12372 offset += 1;
12374 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_report_ipi_density_7, tvb, offset, 1, ENC_NA);
12375 offset += 1;
12377 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_report_ipi_density_8, tvb, offset, 1, ENC_NA);
12378 offset += 1;
12380 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_report_ipi_density_9, tvb, offset, 1, ENC_NA);
12381 offset += 1;
12383 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_report_ipi_density_10, tvb, offset, 1, ENC_NA);
12384 offset += 1;
12386 /* TODO Add Optional Subelements */
12387 break;
12388 case 5: /* Beacon Report */
12390 proto_tree *sub_tree_frame_info;
12392 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_report_regulatory_class, tvb, offset, 1, ENC_NA);
12393 offset += 1;
12395 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_report_channel_number, tvb, offset, 1, ENC_NA);
12396 offset += 1;
12398 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_report_start_time, tvb, offset, 8, ENC_LITTLE_ENDIAN);
12399 offset += 8;
12401 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_report_duration, tvb, offset, 2, ENC_LITTLE_ENDIAN);
12402 offset += 2;
12404 parent_item = proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_report_frame_info, tvb, offset, 1, ENC_NA);
12405 sub_tree_frame_info = proto_item_add_subtree(parent_item, ett_tag_measure_report_frame_tree);
12406 proto_tree_add_item(sub_tree_frame_info, hf_ieee80211_tag_measure_report_frame_info_phy_type, tvb, offset, 1, ENC_NA);
12407 proto_tree_add_item(sub_tree_frame_info, hf_ieee80211_tag_measure_report_frame_info_frame_type, tvb, offset, 1, ENC_NA);
12408 offset += 1;
12410 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_report_rcpi, tvb, offset, 1, ENC_NA);
12411 offset += 1;
12413 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_report_rsni, tvb, offset, 1, ENC_NA);
12414 offset += 1;
12416 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_report_bssid, tvb, offset, 6, ENC_NA);
12417 offset += 6;
12419 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_report_ant_id, tvb, offset, 1, ENC_NA);
12420 offset += 1;
12422 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_report_parent_tsf, tvb, offset, 4, ENC_LITTLE_ENDIAN);
12423 offset += 4;
12424 /* TODO Add Optional Subelements */
12425 break;
12427 case 6: /* Frame Report */
12428 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_report_regulatory_class, tvb, offset, 1, ENC_NA);
12429 offset += 1;
12431 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_report_channel_number, tvb, offset, 1, ENC_NA);
12432 offset += 1;
12434 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_report_start_time, tvb, offset, 8, ENC_LITTLE_ENDIAN);
12435 offset += 8;
12437 proto_tree_add_item(sub_tree, hf_ieee80211_tag_measure_report_duration, tvb, offset, 2, ENC_LITTLE_ENDIAN);
12438 offset += 2;
12440 /* TODO Add Optional Subelements */
12441 break;
12442 case 7: /* BSTA Statistics Report */
12443 /* TODO */
12444 case 8: /* Location Configuration Information Report element */
12445 /* TODO */
12446 case 9: /* Transmit Stream Measurement Report */
12447 /* TODO */
12448 default: /* unknown */
12449 break;
12453 case TAG_QUIET: /* 7.3.2.23 Quiet element (40) */
12454 if (tag_len != 6)
12456 expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length, "Tag Length %u wrong, must be = 6", tag_len);
12457 break;
12459 offset += 2;
12461 proto_tree_add_item(tree, hf_ieee80211_tag_quiet_count, tvb, offset, 1, ENC_NA);
12462 proto_item_append_text(ti, " Count: %d", tvb_get_guint8(tvb, offset));
12463 offset += 1;
12465 proto_tree_add_item(tree, hf_ieee80211_tag_quiet_period, tvb, offset, 1, ENC_NA);
12466 proto_item_append_text(ti, " Period: %d", tvb_get_guint8(tvb, offset));
12467 offset += 1;
12469 proto_tree_add_item(tree, hf_ieee80211_tag_quiet_duration, tvb, offset, 2, ENC_LITTLE_ENDIAN);
12470 proto_item_append_text(ti, " Duration: %d", tvb_get_letohs(tvb, offset));
12471 offset += 2;
12473 proto_tree_add_item(tree, hf_ieee80211_tag_quiet_offset, tvb, offset, 2, ENC_LITTLE_ENDIAN);
12474 proto_item_append_text(ti, " Offset: %d", tvb_get_letohs(tvb, offset));
12475 offset += 2;
12476 break;
12479 case TAG_IBSS_DFS: /* 7.3.2.24 IBSS DFS element (41) */
12480 if (tag_len < 7)
12482 expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length, "Tag Length %u wrong, must be >= 7", tag_len);
12483 break;
12486 proto_item *ti_sup_map;
12487 proto_tree *sub_map_tree;
12488 offset += 2;
12490 proto_tree_add_item(tree, hf_ieee80211_tag_dfs_owner, tvb, offset, 6, ENC_NA);
12491 proto_item_append_text(ti, " Owner: %s", tvb_ether_to_str(tvb, offset));
12492 offset += 6;
12494 proto_tree_add_item(tree, hf_ieee80211_tag_dfs_recovery_interval, tvb, offset, 1, ENC_NA);
12495 offset += 1;
12497 while (offset < tag_end)
12499 ti_sup_map = proto_tree_add_item(tree, hf_ieee80211_tag_dfs_channel_map, tvb, offset, 2, ENC_NA);
12500 sub_map_tree = proto_item_add_subtree(ti_sup_map, ett_tag_dfs_map_tree);
12501 proto_tree_add_item(sub_map_tree, hf_ieee80211_tag_dfs_channel_number, tvb, offset, 1, ENC_NA);
12502 proto_tree_add_item(sub_map_tree, hf_ieee80211_tag_dfs_map, tvb, offset, 1, ENC_NA);
12503 offset += 2;
12505 break;
12507 case TAG_ERP_INFO: /* 7.3.2.13 ERP Information element (42) */
12508 case TAG_ERP_INFO_OLD:
12509 if (tag_len != 1)
12511 expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length, "Tag Length %u wrong, must be = 1", tag_len);
12512 break;
12515 proto_item *ti_erp;
12516 proto_tree *erp_tree;
12518 offset += 2;
12520 ti_erp = proto_tree_add_item(tree, hf_ieee80211_tag_erp_info, tvb, offset, 1, ENC_NA);
12521 erp_tree = proto_item_add_subtree(ti_erp, ett_tag_erp_info_tree);
12522 proto_tree_add_item(erp_tree, hf_ieee80211_tag_erp_info_erp_present, tvb, offset, 1, ENC_NA);
12523 proto_tree_add_item(erp_tree, hf_ieee80211_tag_erp_info_use_protection, tvb, offset, 1, ENC_NA);
12524 proto_tree_add_item(erp_tree, hf_ieee80211_tag_erp_info_barker_preamble_mode, tvb, offset, 1, ENC_NA);
12525 proto_tree_add_item(erp_tree, hf_ieee80211_tag_erp_info_reserved, tvb, offset, 1, ENC_NA);
12526 offset += 1;
12527 break;
12530 case TAG_TS_DELAY: /* 7.3.2.32 TS Delay element (43) */
12531 if (tag_len != 4)
12533 expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length, "Tag Length %u wrong, must be = 4", tag_len);
12534 break;
12536 offset += 2;
12538 proto_tree_add_item(tree, hf_ieee80211_ts_delay, tvb, offset, 4, ENC_LITTLE_ENDIAN);
12539 proto_item_append_text(ti, " : %d", tvb_get_ntohl(tvb, offset));
12540 offset += 4;
12541 break;
12543 case TAG_TCLAS_PROCESS: /* 7.3.2.33 TCLAS Processing element (44) */
12544 if (tag_len != 1)
12546 expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length, "Tag Length %u wrong, must be = 1", tag_len);
12547 break;
12549 offset += 2;
12551 proto_tree_add_item(tree, hf_ieee80211_tclas_process, tvb, offset, 1, ENC_LITTLE_ENDIAN);
12552 proto_item_append_text(ti, " : %s", val_to_str(tvb_get_guint8(tvb, offset), ieee80211_tclas_process_flag, "Unknown %d"));
12553 offset += 1;
12554 break;
12556 case TAG_QOS_CAPABILITY: /* 7.3.2.35 QoS Capability element (46) */
12557 if (tag_len != 1)
12559 expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length, "Tag Length %u wrong, must be = 1", tag_len);
12560 break;
12563 /* proto_item *ti_cap;
12564 proto_tree *cap_tree; */
12565 offset += 2;
12566 offset = dissect_qos_capability(tree, tvb, pinfo, offset, ftype);
12568 break;
12570 case TAG_RSN_IE: /* 7.3.2.25 RSN information element (48) */
12571 if (tag_len < 18)
12573 expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length, "Tag Length %u wrong, must be >= 18", tag_len);
12574 break;
12576 offset += 2;
12578 offset = dissect_rsn_ie(pinfo, tree, tvb, offset, tag_len);
12579 break;
12581 case TAG_EXT_SUPP_RATES: /* 7.3.2.14 Extended Supported Rates element (50) */
12582 if (tag_len < 1)
12584 expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length, "Tag length %u too short, must be greater than 0", tag_len);
12585 break;
12587 offset += 2;
12589 while (offset < tag_end)
12591 proto_tree_add_item(tree, hf_ieee80211_tag_ext_supp_rates, tvb, offset, 1, ENC_NA);
12592 proto_item_append_text(ti, " %s,", val_to_str_ext_const(tvb_get_guint8(tvb, offset), &ieee80211_supported_rates_vals_ext, "Unknown Rate"));
12593 offset += 1;
12595 proto_item_append_text(ti, " [Mbit/sec]");
12596 break;
12598 case TAG_EXTENDED_CAPABILITIES: /* 7.3.2.27 Extended Capabilities information element (127) */
12599 dissect_extended_capabilities_ie(pinfo, tree, ti, ti_len, tag_len, tvb, offset+2, tag_end);
12600 break;
12602 case TAG_CISCO_CCX1_CKIP: /* Cisco CCX1 CKIP + Device Name (133) */
12603 /* From WCS manual:
12604 * If Aironet IE support is enabled, the access point sends an Aironet
12605 * IE 0x85 (which contains the access point name, load, number of
12606 * associated clients, and so on) in the beacon and probe responses of
12607 * this WLAN, and the controller sends Aironet IEs 0x85 and 0x95
12608 * (which contains the management IP address of the controller and
12609 * the IP address of the access point) in the reassociation response
12610 * if it receives Aironet IE 0x85 in the reassociation request.
12613 if (tag_len < 26)
12615 expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length, "Tag Length %u too short, must be >= 26", tag_len);
12616 break;
12618 offset += 2;
12619 proto_tree_add_item(tree, hf_ieee80211_tag_cisco_ccx1_unknown, tvb, offset, 10, ENC_NA);
12620 offset += 10;
12622 /* The Name of the sending device starts at offset 10 and is up to
12623 15 or 16 bytes in length, \0 padded */
12624 proto_tree_add_item(tree, hf_ieee80211_tag_cisco_ccx1_name, tvb, offset, 16, ENC_ASCII|ENC_NA);
12625 offset += 16;
12627 /* Total number off associated clients and repeater access points */
12628 proto_tree_add_item(tree, hf_ieee80211_tag_cisco_ccx1_clients, tvb, offset, 1, ENC_NA);
12629 offset += 1;
12630 proto_tree_add_item(tree, hf_ieee80211_tag_cisco_ccx1_unknown2, tvb, offset, 3, ENC_NA);
12631 offset += 3;
12632 break;
12634 case TAG_VHT_CAPABILITY:
12635 dissect_vht_capability_ie(tvb, pinfo, tree, offset+2, tag_len, ti_len);
12636 break;
12638 case TAG_VHT_OPERATION:
12639 dissect_vht_operation_ie(tvb, pinfo, tree, offset+2, tag_len, ti_len);
12640 break;
12642 case TAG_VHT_TX_PWR_ENVELOPE:
12643 dissect_vht_tx_pwr_envelope(tvb, pinfo, tree, offset+2, tag_len, ti_len);
12644 break;
12646 case TAG_VENDOR_SPECIFIC_IE: /* 7.3.2.26 Vendor Specific information element (221) */
12647 case TAG_CISCO_VENDOR_SPECIFIC: /* This Cisco proprietary IE seems to mimic 221 */
12648 case TAG_SYMBOL_PROPRIETARY: /* This Symbol proprietary IE seems to mimic 221 */
12649 if (tag_len < 3)
12651 expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length, "Tag Length %u wrong, must be >= 3", tag_len);
12652 break;
12655 guint32 tag_vs_len = tag_len;
12657 offset += 2;
12658 oui = tvb_get_ntoh24(tvb, offset);
12659 tag_tvb = tvb_new_subset(tvb, offset, tag_len, tag_len);
12660 proto_tree_add_item(tree, hf_ieee80211_tag_oui, tvb, offset, 3, ENC_NA);
12661 proto_item_append_text(ti, ": %s", uint_get_manuf_name(oui));
12662 offset += 3;
12663 tag_vs_len -= 3;
12665 if (tag_len > 0) {
12666 proto_tree_add_item(ti, hf_ieee80211_tag_vendor_oui_type, tvb, offset, 1, ENC_BIG_ENDIAN);
12669 switch (oui) {
12670 /* 802.11 specific vendor ids */
12671 case OUI_WPAWME:
12672 offset = dissect_vendor_ie_wpawme(tree, tvb, pinfo, offset, tag_vs_len, ftype);
12673 break;
12674 case OUI_RSN:
12675 dissect_vendor_ie_rsn(ti, tree, tvb, offset, tag_vs_len);
12676 break;
12677 case OUI_PRE11N:
12678 dissect_vendor_ie_ht(tvb, pinfo, tree, offset, ti, ti_len, tag_vs_len);
12679 break;
12680 case OUI_WFA:
12681 dissect_vendor_ie_wfa(pinfo, ti, tag_tvb);
12682 break;
12684 /* Normal IEEE vendor ids (from oui.h) */
12685 case OUI_CISCOWL: /* Cisco Wireless (Aironet) */
12686 dissect_vendor_ie_aironet(ti, tree, tvb, offset, tag_vs_len);
12687 break;
12688 case OUI_MARVELL:
12689 dissect_vendor_ie_marvell(ti, tree, tvb, offset, tag_vs_len);
12690 break;
12691 case OUI_ATHEROS:
12692 dissect_vendor_ie_atheros(ti, tree, tvb, offset, tag_vs_len, pinfo, ti_len);
12693 break;
12694 case OUI_ARUBA:
12695 dissect_vendor_ie_aruba(ti, tree, tvb, offset, tag_vs_len);
12696 break;
12697 case OUI_NINTENDO:
12698 dissect_vendor_ie_nintendo(ti, tree, tvb, offset, tag_vs_len);
12699 break;
12700 default:
12701 proto_tree_add_item(tree, hf_ieee80211_tag_vendor_data, tvb, offset, tag_vs_len, ENC_NA);
12702 break;
12706 break;
12708 case TAG_MOBILITY_DOMAIN:
12709 dissect_mobility_domain(tree, tvb, offset + 2, tag_len);
12710 break;
12712 case TAG_FAST_BSS_TRANSITION:
12713 dissect_fast_bss_transition(tree, tvb, offset + 2, tag_len);
12714 break;
12716 case TAG_MMIE:
12717 dissect_mmie(tree, tvb, offset + 2, tag_len);
12718 break;
12720 case TAG_SSID_LIST:
12721 dissect_ssid_list(tree, tvb, offset + 2, tag_len);
12722 break;
12724 case TAG_TIME_ZONE:
12725 dissect_time_zone(tree, tvb, offset + 2, tag_len);
12726 break;
12728 case TAG_TIMEOUT_INTERVAL:
12729 dissect_timeout_interval(tree, tvb, pinfo, offset + 2, tag_len);
12730 break;
12732 case TAG_RIC_DATA: /* RIC Data (RDE) (57) */
12733 /* Assigning the return value will ensure that the IE after RIC is processed
12734 * only once. This gives us a good looking RIC IE :-)
12736 tag_len = dissect_ric_data(pinfo, tree, tvb, offset + 2, tag_len, ti, ti_len, ftype);
12737 break;
12739 case TAG_LINK_IDENTIFIER:
12740 dissect_link_identifier(tree, tvb, offset + 2, tag_len);
12741 break;
12743 case TAG_WAKEUP_SCHEDULE:
12744 dissect_wakeup_schedule(tree, tvb, offset + 2, tag_len);
12745 break;
12747 case TAG_CHANNEL_SWITCH_TIMING:
12748 dissect_channel_switch_timing(tree, tvb, offset + 2, tag_len);
12749 break;
12751 case TAG_PTI_CONTROL:
12752 dissect_pti_control(tree, tvb, offset + 2, tag_len);
12753 break;
12755 case TAG_PU_BUFFER_STATUS:
12756 dissect_pu_buffer_status(tree, tvb, offset + 2, tag_len);
12757 break;
12759 case TAG_HT_CAPABILITY:
12760 dissect_ht_capability_ie(tvb, pinfo, tree, offset+2, tag_len, ti_len, FALSE);
12761 break;
12763 case TAG_HT_INFO:
12764 dissect_ht_info_ie_1_1(tvb, pinfo, tree, offset + 2, tag_len, ti_len);
12765 break;
12767 case TAG_SECONDARY_CHANNEL_OFFSET:
12768 dissect_secondary_channel_offset_ie(tvb, pinfo, tree, offset + 2, tag_len, ti_len);
12769 break;
12771 case TAG_BSS_AVG_ACCESS_DELAY: /* BSS Average Access Delay element (63) */
12772 dissect_bss_avg_access_delay_ie(tvb, pinfo, tree, offset + 2, tag_len, ti_len);
12773 break;
12775 case TAG_ANTENNA: /* Antenna element (64) */
12776 dissect_antenna_ie(tvb, pinfo, tree, offset + 2, tag_len, ti_len);
12777 break;
12779 case TAG_RSNI: /* RSNI element (65) */
12780 dissect_rsni_ie(tvb, pinfo, tree, offset + 2, tag_len, ti_len);
12781 break;
12783 case TAG_BSS_AVB_ADM_CAPACITY:
12784 dissect_bss_available_admission_capacity_ie(tvb, pinfo, tree, offset + 2, tag_len, ti_len);
12785 break;
12787 case TAG_IE_68_CONFLICT: /* Conflict: WAPI Vs. IEEE */
12788 if (tag_len >= 20) { /* It Might be WAPI*/
12789 dissect_wapi_param_set(tvb, pinfo, tree, offset + 2,tag_len, ti_len, ti, ftype);
12791 else { /* BSS AC Access Delay (68) */
12792 dissect_bss_ac_access_delay_ie(tvb, pinfo, tree, offset + 2, tag_len, ti_len);
12794 break;
12796 case TAG_BSS_MAX_IDLE_PERIOD:
12797 dissect_bss_max_idle_period(tree, tvb, offset + 2);
12798 break;
12800 case TAG_TFS_REQUEST:
12801 dissect_tfs_request(pinfo, tree, tvb, offset + 2, tag_len, ftype);
12802 break;
12804 case TAG_TFS_RESPONSE:
12805 dissect_tfs_response(pinfo, tree, tvb, offset + 2, tag_len, ftype);
12806 break;
12808 case TAG_WNM_SLEEP_MODE:
12809 dissect_wnm_sleep_mode(tree, tvb, offset + 2);
12810 break;
12812 case TAG_TIME_ADV:
12813 dissect_time_adv(tree, tvb, offset + 2);
12814 break;
12816 case TAG_RM_ENABLED_CAPABILITY: /* RM Enabled Capabilities (70) */
12817 dissect_rm_enabled_capabilities_ie(pinfo, tree, ti, ti_len, tag_len, tvb, offset+2, tag_end);
12818 break;
12820 case TAG_RIC_DESCRIPTOR: /* RIC Descriptor (75) */
12821 dissect_ric_descriptor(pinfo, tree, tvb, offset + 2, tag_len, ti, ti_len);
12822 break;
12824 case TAG_MESH_PEERING_MGMT:
12826 guint start = offset + 2;
12827 offset += 2;
12828 proto_tree_add_item (tree, hf_ieee80211_mesh_peering_proto, tvb, offset, 2, ENC_LITTLE_ENDIAN);
12829 offset += 2;
12830 proto_tree_add_item (tree, hf_ieee80211_mesh_peering_local_link_id, tvb, offset, 2, ENC_LITTLE_ENDIAN);
12831 offset += 2;
12832 switch (tvb_get_guint8(tvb, 1))
12833 { /* Self-protected action field */
12834 case SELFPROT_ACTION_MESH_PEERING_OPEN:
12835 break;
12837 case SELFPROT_ACTION_MESH_PEERING_CONFIRM:
12838 proto_tree_add_item (tree, hf_ieee80211_mesh_peering_peer_link_id, tvb, offset, 2, ENC_LITTLE_ENDIAN);
12839 offset += 2;
12840 break;
12842 case SELFPROT_ACTION_MESH_PEERING_CLOSE:
12843 if ((tag_len == 8) || (tag_len == 24))
12845 proto_tree_add_item (tree, hf_ieee80211_mesh_peering_peer_link_id, tvb, offset, 2, ENC_LITTLE_ENDIAN);
12846 offset += 2;
12848 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_REASON_CODE);
12849 break;
12851 /* unexpected values */
12852 default:
12853 proto_tree_add_text (tree, tvb, offset, tag_len, "Unexpected Self-protected action");
12854 offset += tag_len;
12855 break;
12857 if (tag_len - (offset - start) == 16)
12859 proto_tree_add_item(tree, hf_ieee80211_rsn_pmkid, tvb, offset, 16, ENC_NA);
12860 offset += 16;
12862 break;
12865 case TAG_MESH_CONFIGURATION:
12867 proto_item *item;
12868 proto_tree *subtree;
12869 offset += 2;
12870 proto_tree_add_item (tree, hf_ieee80211_mesh_config_path_sel_protocol, tvb, offset, 1, ENC_LITTLE_ENDIAN);
12871 proto_tree_add_item (tree, hf_ieee80211_mesh_config_path_sel_metric, tvb, offset + 1, 1, ENC_LITTLE_ENDIAN);
12872 proto_tree_add_item (tree, hf_ieee80211_mesh_config_congestion_control, tvb, offset + 2, 1, ENC_LITTLE_ENDIAN);
12873 proto_tree_add_item (tree, hf_ieee80211_mesh_config_sync_method, tvb, offset + 3, 1, ENC_LITTLE_ENDIAN);
12874 proto_tree_add_item (tree, hf_ieee80211_mesh_config_auth_protocol, tvb, offset + 4, 1, ENC_LITTLE_ENDIAN);
12875 item = proto_tree_add_item (tree, hf_ieee80211_mesh_config_formation_info, tvb, offset + 5, 1, ENC_LITTLE_ENDIAN);
12876 subtree = proto_item_add_subtree(item, ett_mesh_formation_info_tree);
12877 proto_tree_add_item (subtree, hf_ieee80211_mesh_form_info_num_of_peerings, tvb, offset + 5, 1, ENC_LITTLE_ENDIAN);
12878 item = proto_tree_add_item (tree, hf_ieee80211_mesh_config_capability, tvb, offset + 6, 1, ENC_LITTLE_ENDIAN);
12879 subtree = proto_item_add_subtree(item, ett_mesh_config_cap_tree);
12880 proto_tree_add_item (subtree, hf_ieee80211_mesh_config_cap_accepting, tvb, offset + 6, 1, ENC_LITTLE_ENDIAN);
12881 proto_tree_add_item (subtree, hf_ieee80211_mesh_config_cap_mcca_support, tvb, offset + 6, 1, ENC_LITTLE_ENDIAN);
12882 proto_tree_add_item (subtree, hf_ieee80211_mesh_config_cap_mcca_enabled, tvb, offset + 6, 1, ENC_LITTLE_ENDIAN);
12883 proto_tree_add_item (subtree, hf_ieee80211_mesh_config_cap_forwarding, tvb, offset + 6, 1, ENC_LITTLE_ENDIAN);
12884 proto_tree_add_item (subtree, hf_ieee80211_mesh_config_cap_mbca_enabled, tvb, offset + 6, 1, ENC_LITTLE_ENDIAN);
12885 proto_tree_add_item (subtree, hf_ieee80211_mesh_config_cap_tbtt_adjusting, tvb, offset + 6, 1, ENC_LITTLE_ENDIAN);
12886 proto_tree_add_item (subtree, hf_ieee80211_mesh_config_cap_power_save_level, tvb, offset + 6, 1, ENC_LITTLE_ENDIAN);
12887 break;
12890 case TAG_MESH_ID:
12892 offset += 2;
12894 proto_tree_add_item(tree, hf_ieee80211_mesh_id, tvb, offset, tag_len, ENC_ASCII|ENC_NA);
12895 if (tag_len > 0) {
12896 col_append_fstr(pinfo->cinfo, COL_INFO, ", MESHID=%s", tvb_get_string(wmem_packet_scope(), tvb, offset, tag_len));
12897 proto_item_append_text(ti, ": %s", tvb_get_string(wmem_packet_scope(), tvb, offset, tag_len));
12900 break;
12903 case TAG_MESH_PREQ:
12905 guint8 flags = tvb_get_guint8(tvb, offset + 2);
12906 guint8 targs, i;
12907 proto_item *item;
12908 proto_tree *subtree;
12910 offset += 2;
12911 proto_tree_add_item (tree, hf_ieee80211_ff_hwmp_flags, tvb, offset, 1, ENC_LITTLE_ENDIAN);
12912 offset += 1;
12913 proto_tree_add_item (tree, hf_ieee80211_ff_hwmp_hopcount, tvb, offset, 1, ENC_LITTLE_ENDIAN);
12914 offset += 1;
12915 proto_tree_add_item (tree, hf_ieee80211_ff_hwmp_ttl, tvb, offset, 1, ENC_LITTLE_ENDIAN);
12916 offset += 1;
12917 proto_tree_add_item (tree, hf_ieee80211_ff_hwmp_pdid, tvb, offset, 4, ENC_LITTLE_ENDIAN);
12918 offset += 4;
12919 proto_tree_add_item (tree, hf_ieee80211_ff_hwmp_orig_sta, tvb, offset, 6, ENC_NA);
12920 offset += 6;
12921 proto_tree_add_item (tree, hf_ieee80211_ff_hwmp_orig_sn, tvb, offset, 4, ENC_LITTLE_ENDIAN);
12922 offset += 4;
12924 if (flags & (1<<6)) {
12925 proto_tree_add_item (tree, hf_ieee80211_ff_hwmp_orig_ext, tvb, offset, 6, ENC_NA);
12926 offset += 6;
12928 proto_tree_add_item (tree, hf_ieee80211_ff_hwmp_lifetime, tvb, offset, 4, ENC_LITTLE_ENDIAN);
12929 offset += 4;
12930 proto_tree_add_item (tree, hf_ieee80211_ff_hwmp_metric, tvb, offset, 4, ENC_LITTLE_ENDIAN);
12931 offset += 4;
12932 proto_tree_add_item (tree, hf_ieee80211_ff_hwmp_targ_count, tvb, offset, 1, ENC_LITTLE_ENDIAN);
12933 targs = tvb_get_guint8 (tvb, offset);
12934 offset += 1;
12935 for (i = 0; i < targs; i++) {
12936 item = proto_tree_add_item (tree, hf_ieee80211_ff_hwmp_targ_flags, tvb, offset, 1, ENC_LITTLE_ENDIAN);
12937 subtree = proto_item_add_subtree(item, ett_hwmp_targ_flags_tree);
12938 proto_tree_add_boolean(subtree, hf_ieee80211_ff_hwmp_targ_to_flags, tvb, offset, 1, flags);
12939 proto_tree_add_boolean(subtree, hf_ieee80211_ff_hwmp_targ_usn_flags, tvb, offset, 1, flags);
12940 offset += 1;
12941 proto_tree_add_item (tree, hf_ieee80211_ff_hwmp_targ_sta, tvb, offset, 6, ENC_NA);
12942 offset += 6;
12943 proto_tree_add_item (tree, hf_ieee80211_ff_hwmp_targ_sn, tvb, offset, 4, ENC_LITTLE_ENDIAN);
12944 offset += 4;
12946 break;
12949 case TAG_MESH_PREP:
12951 guint8 flags = tvb_get_guint8(tvb, offset + 2);
12952 offset += 2;
12953 proto_tree_add_item (tree, hf_ieee80211_ff_hwmp_flags, tvb, offset, 1, ENC_LITTLE_ENDIAN);
12954 offset += 1;
12955 proto_tree_add_item (tree, hf_ieee80211_ff_hwmp_hopcount, tvb, offset, 1, ENC_LITTLE_ENDIAN);
12956 offset += 1;
12957 proto_tree_add_item (tree, hf_ieee80211_ff_hwmp_ttl, tvb, offset , 1, ENC_LITTLE_ENDIAN);
12958 offset += 1;
12959 proto_tree_add_item (tree, hf_ieee80211_ff_hwmp_targ_sta, tvb, offset, 6, ENC_NA);
12960 offset += 6;
12961 proto_tree_add_item (tree, hf_ieee80211_ff_hwmp_targ_sn, tvb, offset, 4, ENC_LITTLE_ENDIAN);
12962 offset += 4;
12963 if (flags & (1<<6)) {
12964 proto_tree_add_item (tree, hf_ieee80211_ff_hwmp_targ_ext, tvb, offset, 6, ENC_NA);
12965 offset += 6;
12967 proto_tree_add_item (tree, hf_ieee80211_ff_hwmp_lifetime, tvb, offset, 4, ENC_LITTLE_ENDIAN);
12968 offset += 4;
12969 proto_tree_add_item (tree, hf_ieee80211_ff_hwmp_metric, tvb, offset, 4, ENC_LITTLE_ENDIAN);
12970 offset += 4;
12971 proto_tree_add_item (tree, hf_ieee80211_ff_hwmp_orig_sta, tvb, offset, 6, ENC_NA);
12972 offset += 6;
12973 proto_tree_add_item (tree, hf_ieee80211_ff_hwmp_orig_sn, tvb, offset, 4, ENC_LITTLE_ENDIAN);
12974 offset += 4;
12975 break;
12978 case TAG_MESH_PERR:
12980 guint8 targs, i;
12982 offset += 2;
12983 proto_tree_add_item (tree, hf_ieee80211_ff_hwmp_ttl, tvb, offset, 1, ENC_LITTLE_ENDIAN);
12984 offset += 1;
12985 proto_tree_add_item (tree, hf_ieee80211_ff_hwmp_targ_count, tvb, offset, 1, ENC_BIG_ENDIAN);
12986 targs = tvb_get_guint8 (tvb, offset);
12987 offset += 1;
12988 for (i = 0; i < targs; i++) {
12989 guint8 flags = tvb_get_guint8(tvb, offset);
12991 proto_tree_add_item (tree, hf_ieee80211_ff_hwmp_targ_flags, tvb, offset, 1, ENC_LITTLE_ENDIAN);
12992 offset += 1;
12993 proto_tree_add_item (tree, hf_ieee80211_ff_hwmp_targ_sta, tvb, offset, 6, ENC_NA);
12994 offset += 6;
12995 proto_tree_add_item (tree, hf_ieee80211_ff_hwmp_targ_sn, tvb, offset, 4, ENC_LITTLE_ENDIAN);
12996 offset += 4;
12997 if (flags & (1<<6)) {
12998 proto_tree_add_item (tree, hf_ieee80211_ff_hwmp_targ_ext, tvb, offset, 6, ENC_NA);
12999 offset += 6;
13001 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_REASON_CODE);
13003 break;
13006 case TAG_RANN:
13008 offset += 2;
13009 proto_tree_add_item (tree, hf_ieee80211_rann_flags, tvb, offset, 1, ENC_BIG_ENDIAN);
13010 offset += 1;
13011 proto_tree_add_item (tree, hf_ieee80211_ff_hwmp_hopcount, tvb, offset, 1, ENC_BIG_ENDIAN);
13012 offset += 1;
13013 proto_tree_add_item (tree, hf_ieee80211_ff_hwmp_ttl, tvb, offset, 1, ENC_BIG_ENDIAN);
13014 offset += 1;
13015 proto_tree_add_item (tree, hf_ieee80211_rann_root_sta, tvb, offset, 6, ENC_NA);
13016 offset += 6;
13017 proto_tree_add_item (tree, hf_ieee80211_rann_sn, tvb, offset, 4, ENC_LITTLE_ENDIAN);
13018 offset += 4;
13019 proto_tree_add_item (tree, hf_ieee80211_rann_interval, tvb, offset, 4, ENC_LITTLE_ENDIAN);
13020 offset += 4;
13021 proto_tree_add_item (tree, hf_ieee80211_ff_hwmp_metric, tvb, offset, 4, ENC_LITTLE_ENDIAN);
13022 offset += 4;
13023 break;
13025 break;
13027 case TAG_MESH_CHANNEL_SWITCH: /* Mesh Channel Switch Parameters (118) */
13029 proto_item *item;
13030 proto_tree *subtree;
13031 if (tag_len != 6)
13033 expert_add_info_format(pinfo, ti_len, &ei_ieee80211_tag_length, "Tag Length %u wrong, must be = 6", tag_len);
13034 break;
13036 offset += 2;
13038 proto_tree_add_item(tree, hf_ieee80211_mesh_channel_switch_ttl, tvb, offset, 1, ENC_LITTLE_ENDIAN);
13039 proto_item_append_text(ti, " TTL: %d", tvb_get_guint8(tvb, offset));
13040 offset += 1;
13042 item = proto_tree_add_item(tree, hf_ieee80211_mesh_channel_switch_flag, tvb, offset, 1, ENC_LITTLE_ENDIAN);
13043 subtree = proto_item_add_subtree(item, ett_mesh_chswitch_flag_tree);
13044 proto_tree_add_item(subtree, hf_ieee80211_mesh_chswitch_flag_initiator, tvb, offset, 1, ENC_LITTLE_ENDIAN);
13045 proto_tree_add_item(subtree, hf_ieee80211_mesh_chswitch_flag_txrestrict, tvb, offset, 1, ENC_LITTLE_ENDIAN);
13046 offset += 1;
13048 proto_tree_add_item(tree, hf_ieee80211_mesh_channel_switch_reason_code, tvb, offset, 2, ENC_LITTLE_ENDIAN);
13049 offset += 2;
13051 proto_tree_add_item(tree, hf_ieee80211_mesh_channel_switch_precedence_value, tvb, offset, 2, ENC_LITTLE_ENDIAN);
13052 offset += 2;
13053 break;
13056 case TAG_INTERWORKING:
13057 dissect_interworking(pinfo, tree, ti, tvb, offset);
13058 break;
13059 case TAG_ADVERTISEMENT_PROTOCOL:
13061 dissect_advertisement_protocol(pinfo, tree, tvb, offset, NULL);
13062 break;
13064 case TAG_QOS_MAP_SET:
13065 dissect_qos_map_set(pinfo, tree, ti, tvb, offset);
13066 break;
13067 case TAG_ROAMING_CONSORTIUM:
13068 dissect_roaming_consortium(pinfo, tree, ti, tvb, offset);
13069 break;
13070 case TAG_AP_CHANNEL_REPORT: /* 7.3.2.36 AP Channel Report element */
13071 dissect_ap_channel_report(tvb, pinfo, tree, offset + 2, tag_len, ti_len, tag_end, ti);
13072 break;
13073 case TAG_NEIGHBOR_REPORT:
13075 #define SUB_TAG_TSF_INFO 0x01
13076 #define SUB_TAG_MEASUREMENT_PILOT_INFO 0x02
13077 #define SUB_TAG_HT_CAPABILITIES 0x03
13078 #define SUB_TAG_HT_INFO 0x04
13079 #define SUB_TAG_SEC_CHANNEL_OFFSET 0x05
13080 #define SUB_TAG_VENDOR_SPECIFIC 0xDD
13083 guint tag_offset;
13084 guint8 sub_tag_id;
13085 guint32 bssid_info, sub_tag_length;
13086 proto_item *parent_item;
13087 proto_tree *bssid_info_subtree, *sub_tag_tree;
13088 tvbuff_t *volatile sub_tag_tvb = NULL;
13090 if (tag_len < 13)
13092 proto_tree_add_text (tree, tvb, offset + 2, tag_len,
13093 "Neighbor Report: Error: Tag length must be at least 13 bytes long");
13094 break;
13096 offset += 2;
13097 tag_offset = offset;
13099 proto_tree_add_item(tree, hf_ieee80211_tag_neighbor_report_bssid, tvb, offset, 6, ENC_NA);
13101 /*** Begin: BSSID Information ***/
13102 offset += 6;
13103 bssid_info = tvb_get_letohl (tvb, offset);
13104 parent_item = proto_tree_add_item(tree, hf_ieee80211_tag_neighbor_report_bssid_info, tvb, offset, 4, ENC_LITTLE_ENDIAN);
13105 bssid_info_subtree = proto_item_add_subtree(parent_item, ett_tag_neighbor_report_bssid_info_tree);
13107 proto_tree_add_uint(bssid_info_subtree, hf_ieee80211_tag_neighbor_report_bssid_info_reachability, tvb, offset, 1, bssid_info);
13108 proto_tree_add_uint(bssid_info_subtree, hf_ieee80211_tag_neighbor_report_bssid_info_security, tvb, offset, 1, bssid_info);
13109 proto_tree_add_uint(bssid_info_subtree, hf_ieee80211_tag_neighbor_report_bssid_info_key_scope, tvb, offset, 1, bssid_info);
13110 proto_tree_add_uint(bssid_info_subtree, hf_ieee80211_tag_neighbor_report_bssid_info_capability_spec_mng, tvb, offset, 1, bssid_info);
13111 proto_tree_add_uint(bssid_info_subtree, hf_ieee80211_tag_neighbor_report_bssid_info_capability_qos, tvb, offset, 1, bssid_info);
13112 proto_tree_add_uint(bssid_info_subtree, hf_ieee80211_tag_neighbor_report_bssid_info_capability_apsd, tvb, offset, 1, bssid_info);
13113 proto_tree_add_uint(bssid_info_subtree, hf_ieee80211_tag_neighbor_report_bssid_info_capability_radio_msnt, tvb, offset, 1, bssid_info);
13114 proto_tree_add_uint(bssid_info_subtree, hf_ieee80211_tag_neighbor_report_bssid_info_capability_dback, tvb, offset+1, 1, bssid_info);
13115 proto_tree_add_uint(bssid_info_subtree, hf_ieee80211_tag_neighbor_report_bssid_info_capability_iback, tvb, offset+1, 1, bssid_info);
13116 proto_tree_add_uint(bssid_info_subtree, hf_ieee80211_tag_neighbor_report_bssid_info_mobility_domain, tvb, offset+1, 1, bssid_info);
13117 proto_tree_add_uint(bssid_info_subtree, hf_ieee80211_tag_neighbor_report_bssid_info_high_throughput, tvb, offset+1, 1, bssid_info);
13118 proto_tree_add_uint(bssid_info_subtree, hf_ieee80211_tag_neighbor_report_bssid_info_reserved, tvb, offset+1, 3, (bssid_info & 0xfffff000) >> 12);
13119 /*** End: BSSID Information ***/
13121 offset += 4;
13122 proto_tree_add_item(tree, hf_ieee80211_tag_neighbor_report_reg_class, tvb, offset, 1, ENC_LITTLE_ENDIAN);
13124 offset += 1;
13125 proto_tree_add_item(tree, hf_ieee80211_tag_neighbor_report_channel_number, tvb, offset, 1, ENC_LITTLE_ENDIAN);
13127 offset += 1;
13128 proto_tree_add_item(tree, hf_ieee80211_tag_neighbor_report_phy_type, tvb, offset, 1, ENC_LITTLE_ENDIAN);
13130 offset += 1;
13131 sub_tag_id = tvb_get_guint8 (tvb, offset);
13132 offset += 1;
13133 sub_tag_length = tvb_get_guint8 (tvb, offset);
13135 offset += 1;
13136 sub_tag_tvb = tvb_new_subset(tvb, offset, sub_tag_length, -1);
13138 switch (sub_tag_id) {
13139 case SUB_TAG_TSF_INFO:
13140 /* TODO */
13141 break;
13142 case SUB_TAG_MEASUREMENT_PILOT_INFO:
13143 /* TODO */
13144 break;
13145 case SUB_TAG_HT_CAPABILITIES:
13146 parent_item = proto_tree_add_text (tree, tvb, offset, sub_tag_length, "HT Capabilities");
13147 sub_tag_tree = proto_item_add_subtree(parent_item, ett_tag_neighbor_report_sub_tag_tree);
13148 dissect_ht_capability_ie(sub_tag_tvb, pinfo, sub_tag_tree, 0, sub_tag_length, ti_len, FALSE);
13149 break;
13150 case SUB_TAG_HT_INFO:
13151 parent_item = proto_tree_add_text (tree, tvb, offset, sub_tag_length, "HT Information");
13152 sub_tag_tree = proto_item_add_subtree(parent_item, ett_tag_neighbor_report_sub_tag_tree);
13153 dissect_ht_info_ie_1_1(sub_tag_tvb, pinfo, sub_tag_tree, 0, sub_tag_length, ti_len);
13154 break;
13155 case SUB_TAG_SEC_CHANNEL_OFFSET:
13156 parent_item = proto_tree_add_text (tree, tvb, offset, sub_tag_length, "Secondary Channel Offset");
13157 sub_tag_tree = proto_item_add_subtree(parent_item, ett_tag_neighbor_report_sub_tag_tree);
13158 dissect_secondary_channel_offset_ie(sub_tag_tvb, pinfo, sub_tag_tree, 0, sub_tag_length, ti_len);
13159 break;
13160 case SUB_TAG_VENDOR_SPECIFIC:
13161 default:
13162 break;
13165 offset += sub_tag_length;
13167 if (tag_len > (offset - tag_offset))
13169 proto_tree_add_text (tree, tvb, offset, tag_len - (offset - tag_offset), "Unknown Data");
13170 break;
13172 break;
13175 case TAG_EXTENDED_CHANNEL_SWITCH_ANNOUNCEMENT:
13177 guint tag_offset;
13179 if (tag_len != 4)
13181 proto_tree_add_text (tree, tvb, offset + 2, tag_len,
13182 "Extended Channel Switch Announcement: Error: Tag length must be exactly 4 bytes long");
13183 break;
13186 offset += 2;
13187 tag_offset = offset;
13189 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_EXTENDED_CHANNEL_SWITCH_ANNOUNCEMENT);
13191 if (tag_len > (offset - tag_offset))
13193 proto_tree_add_text (tree, tvb, offset, tag_len - (offset - tag_offset), "Unknown Data");
13194 break;
13196 break;
13198 case TAG_SUPPORTED_REGULATORY_CLASSES:
13200 guint8 current_field;
13201 guint i;
13203 if (tag_len < 2) {
13204 proto_tree_add_text (tree, tvb, offset + 2, tag_len,
13205 "Supported Regulatory Classes: Error: Tag length must be at least 2 bytes long");
13206 break;
13207 } else if (tag_len > 32) {
13208 proto_tree_add_text (tree, tvb, offset + 2, tag_len,
13209 "Supported Regulatory Classes: Error: Tag length must be no more than 32 bytes long");
13210 break;
13213 offset += 2;
13215 current_field = tvb_get_guint8 (tvb, offset);
13216 proto_tree_add_uint(tree, hf_ieee80211_tag_supported_reg_classes_current, tvb, offset, 1, current_field);
13218 offset += 1;
13219 /* Partially taken from the ssid section */
13220 tag_data_ptr = tvb_get_ptr (tvb, offset, tag_len);
13221 for (i = 0, n = 0; (i < tag_len) && (n < SHORT_STR); i++) {
13222 ret = g_snprintf (print_buff + n, SHORT_STR - n, (i == tag_len-1)?"%d":"%d, ", tag_data_ptr[i]);
13223 if (ret >= SHORT_STR - n) {
13224 /* ret >= <buf_size> means buffer truncated */
13225 break;
13227 n += ret;
13229 proto_tree_add_string (tree, hf_ieee80211_tag_supported_reg_classes_alternate, tvb, offset, tag_len, print_buff);
13231 break;
13233 default:
13234 proto_tree_add_item(tree, hf_ieee80211_tag_data, tvb, offset + 1 + 1, tag_len, ENC_NA);
13235 expert_add_info_format(pinfo, ti_tag, &ei_ieee80211_tag_data,
13236 "Dissector for 802.11 IE Tag"
13237 " (%s) code not implemented, Contact"
13238 " Wireshark developers if you want this supported", val_to_str_ext(tag_no,
13239 &tag_num_vals_ext, "(%d)"));
13240 proto_item_append_text(ti, ": Undecoded");
13241 break;
13243 if (offset < tag_end) {
13244 /* TODO: add Expert info to indicate there is unknown data ! but all tagged option don't yet return offset.
13245 For the moment, this code only remove Clang Warnings about not used offset... */
13247 return tag_len + 1 + 1;
13250 void
13251 ieee_80211_add_tagged_parameters (tvbuff_t *tvb, int offset, packet_info *pinfo,
13252 proto_tree *tree, int tagged_parameters_len, int ftype)
13254 int next_len;
13256 beacon_padding = 0; /* this is for the beacon padding confused with ssid fix */
13257 while (tagged_parameters_len > 0) {
13258 if ((next_len=add_tagged_field (pinfo, tree, tvb, offset, ftype))==0)
13259 break;
13260 if (next_len > tagged_parameters_len) {
13261 /* XXX - flag this as an error? */
13262 next_len = tagged_parameters_len;
13264 offset += next_len;
13265 tagged_parameters_len -= next_len;
13269 /* ************************************************************************* */
13270 /* Dissect 802.11 management frame */
13271 /* ************************************************************************* */
13272 static void
13273 dissect_ieee80211_mgt (guint16 fcf, tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
13275 proto_item *ti;
13276 proto_tree *mgt_tree;
13277 proto_tree *fixed_tree;
13278 proto_tree *tagged_tree;
13279 int offset = 0;
13280 int tagged_parameter_tree_len;
13282 ieee80211_tvb_invalid = FALSE;
13284 CHECK_DISPLAY_AS_X(data_handle,proto_wlan_mgt, tvb, pinfo, tree);
13286 ti = proto_tree_add_item (tree, proto_wlan_mgt, tvb, 0, -1, ENC_NA);
13287 mgt_tree = proto_item_add_subtree (ti, ett_80211_mgt);
13289 switch (COMPOSE_FRAME_TYPE(fcf))
13292 case MGT_ASSOC_REQ:
13293 fixed_tree = get_fixed_parameter_tree (mgt_tree, tvb, 0, 4);
13294 add_fixed_field(fixed_tree, tvb, pinfo, 0, FIELD_CAP_INFO);
13295 add_fixed_field(fixed_tree, tvb, pinfo, 2, FIELD_LISTEN_IVAL);
13296 offset = 4; /* Size of fixed fields */
13298 tagged_parameter_tree_len =
13299 tvb_reported_length_remaining(tvb, offset);
13300 tagged_tree = get_tagged_parameter_tree (mgt_tree, tvb, offset,
13301 tagged_parameter_tree_len);
13302 ieee_80211_add_tagged_parameters (tvb, offset, pinfo, tagged_tree,
13303 tagged_parameter_tree_len, MGT_ASSOC_REQ);
13304 break;
13307 case MGT_ASSOC_RESP:
13308 fixed_tree = get_fixed_parameter_tree (mgt_tree, tvb, 0, 6);
13309 add_fixed_field(fixed_tree, tvb, pinfo, 0, FIELD_CAP_INFO);
13310 add_fixed_field(fixed_tree, tvb, pinfo, 2, FIELD_STATUS_CODE);
13311 add_fixed_field(fixed_tree, tvb, pinfo, 4, FIELD_ASSOC_ID);
13312 offset = 6; /* Size of fixed fields */
13314 tagged_parameter_tree_len =
13315 tvb_reported_length_remaining(tvb, offset);
13316 tagged_tree = get_tagged_parameter_tree (mgt_tree, tvb, offset,
13317 tagged_parameter_tree_len);
13318 ieee_80211_add_tagged_parameters (tvb, offset, pinfo, tagged_tree,
13319 tagged_parameter_tree_len, MGT_ASSOC_RESP);
13320 break;
13323 case MGT_REASSOC_REQ:
13324 fixed_tree = get_fixed_parameter_tree (mgt_tree, tvb, 0, 10);
13325 add_fixed_field(fixed_tree, tvb, pinfo, 0, FIELD_CAP_INFO);
13326 add_fixed_field(fixed_tree, tvb, pinfo, 2, FIELD_LISTEN_IVAL);
13327 add_fixed_field(fixed_tree, tvb, pinfo, 4, FIELD_CURRENT_AP_ADDR);
13328 offset = 10; /* Size of fixed fields */
13330 tagged_parameter_tree_len =
13331 tvb_reported_length_remaining(tvb, offset);
13332 tagged_tree = get_tagged_parameter_tree (mgt_tree, tvb, offset,
13333 tagged_parameter_tree_len);
13334 ieee_80211_add_tagged_parameters (tvb, offset, pinfo, tagged_tree,
13335 tagged_parameter_tree_len, MGT_REASSOC_REQ);
13336 break;
13338 case MGT_REASSOC_RESP:
13339 fixed_tree = get_fixed_parameter_tree (mgt_tree, tvb, 0, 6);
13340 add_fixed_field(fixed_tree, tvb, pinfo, 0, FIELD_CAP_INFO);
13341 add_fixed_field(fixed_tree, tvb, pinfo, 2, FIELD_STATUS_CODE);
13342 add_fixed_field(fixed_tree, tvb, pinfo, 4, FIELD_ASSOC_ID);
13343 offset = 6; /* Size of fixed fields */
13345 tagged_parameter_tree_len =
13346 tvb_reported_length_remaining(tvb, offset);
13347 tagged_tree = get_tagged_parameter_tree (mgt_tree, tvb, offset,
13348 tagged_parameter_tree_len);
13349 ieee_80211_add_tagged_parameters (tvb, offset, pinfo, tagged_tree,
13350 tagged_parameter_tree_len, MGT_REASSOC_RESP);
13351 break;
13354 case MGT_PROBE_REQ:
13355 offset = 0;
13356 tagged_parameter_tree_len =
13357 tvb_reported_length_remaining(tvb, offset);
13358 tagged_tree = get_tagged_parameter_tree (mgt_tree, tvb, offset,
13359 tagged_parameter_tree_len);
13360 ieee_80211_add_tagged_parameters (tvb, offset, pinfo, tagged_tree,
13361 tagged_parameter_tree_len, MGT_PROBE_REQ);
13362 break;
13364 case MGT_PROBE_RESP:
13366 fixed_tree = get_fixed_parameter_tree (mgt_tree, tvb, 0, 12);
13367 add_fixed_field(fixed_tree, tvb, pinfo, 0, FIELD_TIMESTAMP);
13368 add_fixed_field(fixed_tree, tvb, pinfo, 8, FIELD_BEACON_INTERVAL);
13369 add_fixed_field(fixed_tree, tvb, pinfo, 10, FIELD_CAP_INFO);
13370 offset = 12; /* Size of fixed fields */
13372 tagged_parameter_tree_len = tvb_reported_length_remaining(tvb, offset);
13373 tagged_tree = get_tagged_parameter_tree (mgt_tree, tvb, offset, tagged_parameter_tree_len);
13374 ieee_80211_add_tagged_parameters (tvb, offset, pinfo, tagged_tree, tagged_parameter_tree_len, MGT_PROBE_RESP);
13375 break;
13377 case MGT_MEASUREMENT_PILOT:
13379 fixed_tree = get_fixed_parameter_tree (mgt_tree, tvb, 0, 12);
13380 offset += add_fixed_field(fixed_tree, tvb, pinfo, offset, FIELD_TIMESTAMP);
13381 offset += add_fixed_field(fixed_tree, tvb, pinfo, offset, FIELD_MEASUREMENT_PILOT_INT);
13382 offset += add_fixed_field(fixed_tree, tvb, pinfo, offset, FIELD_BEACON_INTERVAL);
13383 offset += add_fixed_field(fixed_tree, tvb, pinfo, offset, FIELD_CAP_INFO);
13384 offset += add_fixed_field(fixed_tree, tvb, pinfo, offset, FIELD_COUNTRY_STR);
13385 offset += add_fixed_field(fixed_tree, tvb, pinfo, offset, FIELD_MAX_REG_PWR);
13386 offset += add_fixed_field(fixed_tree, tvb, pinfo, offset, FIELD_MAX_TX_PWR);
13387 offset += add_fixed_field(fixed_tree, tvb, pinfo, offset, FIELD_TX_PWR_USED);
13388 offset += add_fixed_field(fixed_tree, tvb, pinfo, offset, FIELD_TRANSCEIVER_NOISE_FLOOR);
13389 /* TODO DS Parameter Set ??? */
13391 tagged_parameter_tree_len = tvb_reported_length_remaining(tvb, offset);
13392 tagged_tree = get_tagged_parameter_tree (mgt_tree, tvb, offset, tagged_parameter_tree_len);
13393 ieee_80211_add_tagged_parameters (tvb, offset, pinfo, tagged_tree, tagged_parameter_tree_len, MGT_MEASUREMENT_PILOT);
13394 break;
13396 case MGT_BEACON: /* Dissect protocol payload fields */
13397 fixed_tree = get_fixed_parameter_tree (mgt_tree, tvb, 0, 12);
13398 add_fixed_field(fixed_tree, tvb, pinfo, 0, FIELD_TIMESTAMP);
13399 add_fixed_field(fixed_tree, tvb, pinfo, 8, FIELD_BEACON_INTERVAL);
13400 add_fixed_field(fixed_tree, tvb, pinfo, 10, FIELD_CAP_INFO);
13401 offset = 12; /* Size of fixed fields */
13403 tagged_parameter_tree_len =
13404 tvb_reported_length_remaining(tvb, offset);
13405 tagged_tree = get_tagged_parameter_tree (mgt_tree, tvb, offset,
13406 tagged_parameter_tree_len);
13407 ieee_80211_add_tagged_parameters (tvb, offset, pinfo, tagged_tree,
13408 tagged_parameter_tree_len, MGT_BEACON);
13409 break;
13411 case MGT_ATIM:
13412 break;
13414 case MGT_DISASS:
13415 fixed_tree = get_fixed_parameter_tree (mgt_tree, tvb, 0, 2);
13416 add_fixed_field(fixed_tree, tvb, pinfo, 0, FIELD_REASON_CODE);
13417 offset = 2; /* Size of fixed fields */
13418 tagged_parameter_tree_len = tvb_reported_length_remaining(tvb, offset);
13419 if (tagged_parameter_tree_len > 0) {
13420 tagged_tree = get_tagged_parameter_tree(mgt_tree, tvb, offset,
13421 tagged_parameter_tree_len);
13422 ieee_80211_add_tagged_parameters(tvb, offset, pinfo, tagged_tree,
13423 tagged_parameter_tree_len, MGT_DISASS);
13425 break;
13427 case MGT_AUTHENTICATION:
13428 fixed_tree = get_fixed_parameter_tree (mgt_tree, tvb, 0, 6);
13429 add_fixed_field(fixed_tree, tvb, pinfo, 0, FIELD_AUTH_ALG);
13430 add_fixed_field(fixed_tree, tvb, pinfo, 2, FIELD_AUTH_TRANS_SEQ);
13431 add_fixed_field(fixed_tree, tvb, pinfo, 4, FIELD_STATUS_CODE);
13432 offset = 6; /* Size of fixed fields */
13434 tagged_parameter_tree_len =
13435 tvb_reported_length_remaining(tvb, offset);
13436 if (tagged_parameter_tree_len > 0)
13438 tagged_tree = get_tagged_parameter_tree (mgt_tree,
13439 tvb,
13440 offset,
13441 tagged_parameter_tree_len);
13442 ieee_80211_add_tagged_parameters (tvb, offset, pinfo, tagged_tree,
13443 tagged_parameter_tree_len, MGT_AUTHENTICATION);
13445 break;
13447 case MGT_DEAUTHENTICATION:
13448 fixed_tree = get_fixed_parameter_tree (mgt_tree, tvb, 0, 2);
13449 add_fixed_field(fixed_tree, tvb, pinfo, 0, FIELD_REASON_CODE);
13450 offset = 2; /* Size of fixed fields */
13451 tagged_parameter_tree_len = tvb_reported_length_remaining(tvb, offset);
13452 if (tagged_parameter_tree_len > 0) {
13453 tagged_tree = get_tagged_parameter_tree(mgt_tree, tvb, offset,
13454 tagged_parameter_tree_len);
13455 ieee_80211_add_tagged_parameters(tvb, offset, pinfo, tagged_tree,
13456 tagged_parameter_tree_len, MGT_DEAUTHENTICATION);
13458 break;
13460 case MGT_ACTION:
13462 proto_item *lcl_fixed_hdr;
13463 proto_tree *lcl_fixed_tree;
13464 lcl_fixed_hdr = proto_tree_add_text(mgt_tree, tvb, 0, 0, "Fixed parameters");
13465 lcl_fixed_tree = proto_item_add_subtree (lcl_fixed_hdr, ett_fixed_parameters);
13467 offset += add_fixed_field(lcl_fixed_tree, tvb, pinfo, 0, FIELD_ACTION);
13469 proto_item_set_len(lcl_fixed_hdr, offset);
13470 if (ieee80211_tvb_invalid)
13471 break; /* Buffer not available for further processing */
13472 tagged_parameter_tree_len = tvb_reported_length_remaining(tvb, offset);
13473 if (tagged_parameter_tree_len > 0)
13475 tagged_tree = get_tagged_parameter_tree (mgt_tree, tvb, offset,
13476 tagged_parameter_tree_len);
13477 ieee_80211_add_tagged_parameters (tvb, offset, pinfo, tagged_tree,
13478 tagged_parameter_tree_len, MGT_ACTION);
13480 break;
13482 case MGT_ACTION_NO_ACK:
13484 proto_item *lcl_fixed_hdr;
13485 proto_tree *lcl_fixed_tree;
13486 lcl_fixed_hdr = proto_tree_add_text(mgt_tree, tvb, 0, 0, "Fixed parameters");
13487 lcl_fixed_tree = proto_item_add_subtree (lcl_fixed_hdr, ett_fixed_parameters);
13489 offset += add_fixed_field(lcl_fixed_tree, tvb, pinfo, 0, FIELD_ACTION);
13491 proto_item_set_len(lcl_fixed_hdr, offset);
13492 if (ieee80211_tvb_invalid)
13493 break; /* Buffer not available for further processing */
13494 tagged_parameter_tree_len = tvb_reported_length_remaining(tvb, offset);
13495 if (tagged_parameter_tree_len > 0)
13497 tagged_tree = get_tagged_parameter_tree (mgt_tree, tvb, offset,
13498 tagged_parameter_tree_len);
13499 ieee_80211_add_tagged_parameters (tvb, offset, pinfo, tagged_tree,
13500 tagged_parameter_tree_len, MGT_ACTION_NO_ACK);
13502 break;
13504 case MGT_ARUBA_WLAN:
13506 proto_item *aruba_hdr;
13507 proto_tree *aruba_tree;
13508 guint16 type;
13509 type = tvb_get_ntohs(tvb, offset);
13511 aruba_hdr = proto_tree_add_text(mgt_tree, tvb, 0, 0, "Aruba Management");
13512 aruba_tree = proto_item_add_subtree(aruba_hdr, ett_fixed_parameters);
13514 proto_tree_add_item(aruba_tree, hf_ieee80211_aruba, tvb, offset, 2, ENC_BIG_ENDIAN);
13515 offset += 2;
13516 /* HeartBeat Sequence */
13517 if (type == 0x0005)
13519 proto_tree_add_item(aruba_tree, hf_ieee80211_aruba_hb_seq, tvb, offset, 8, ENC_BIG_ENDIAN);
13521 /* MTU Size */
13522 if (type == 0x0003)
13524 proto_tree_add_item(aruba_tree, hf_ieee80211_aruba_mtu, tvb, offset, 2, ENC_BIG_ENDIAN);
13526 break;
13531 static void
13532 set_src_addr_cols(packet_info *pinfo, const guint8 *addr, const char *type)
13534 col_add_fstr(pinfo->cinfo, COL_RES_DL_SRC, "%s (%s)",
13535 get_ether_name(addr), type);
13536 col_add_str(pinfo->cinfo, COL_UNRES_DL_SRC, ether_to_str(addr));
13539 static void
13540 set_dst_addr_cols(packet_info *pinfo, const guint8 *addr, const char *type)
13542 col_add_fstr(pinfo->cinfo, COL_RES_DL_DST, "%s (%s)",
13543 get_ether_name(addr), type);
13544 col_add_str(pinfo->cinfo, COL_UNRES_DL_DST, ether_to_str(addr));
13547 static guint32
13548 crc32_802_tvb_padded(tvbuff_t *tvb, guint hdr_len, guint hdr_size, guint len)
13550 guint32 c_crc;
13552 c_crc = crc32_ccitt_tvb(tvb, hdr_len);
13553 c_crc = crc32_ccitt_seed(tvb_get_ptr(tvb, hdr_size, len), len, ~c_crc);
13555 /* Byte reverse. */
13556 c_crc = ((unsigned char)(c_crc>>0)<<24) |
13557 ((unsigned char)(c_crc>>8)<<16) |
13558 ((unsigned char)(c_crc>>16)<<8) |
13559 ((unsigned char)(c_crc>>24)<<0);
13561 return (c_crc);
13564 typedef enum {
13565 ENCAP_802_2,
13566 ENCAP_IPX,
13567 ENCAP_ETHERNET
13568 } encap_t;
13571 /* ************************************************************************* */
13572 /* Dissect 802.11 frame */
13573 /* ************************************************************************* */
13576 * The 802.11n specification makes some fairly significant changes to the
13577 * layout of the MAC header. The first two bits of the MAC header are the
13578 * protocol version. You'd think that the 802.11 committee would have
13579 * bumped the version to indicate a different MAC layout, but NOOOO -- we
13580 * have to go digging for bits in various locations instead.
13583 static void
13584 dissect_ieee80211_common (tvbuff_t *tvb, packet_info *pinfo,
13585 proto_tree *tree, gboolean fixed_length_header, gint fcs_len,
13586 gboolean wlan_broken_fc, gboolean datapad,
13587 gboolean is_ht)
13589 guint16 fcf, flags, frame_type_subtype, ctrl_fcf, ctrl_type_subtype;
13590 guint16 seq_control;
13591 guint32 seq_number, frag_number;
13592 gboolean more_frags;
13593 const guint8 *src = NULL;
13594 const guint8 *dst = NULL;
13595 const guint8 *bssid = NULL;
13596 proto_item *ti = NULL;
13597 proto_item *fcs_item = NULL;
13598 proto_item *cw_item = NULL;
13599 proto_item *hidden_item;
13600 proto_tree *fcs_tree = NULL;
13601 proto_tree *cw_tree = NULL;
13602 guint16 hdr_len, ohdr_len;
13603 guint16 htc_len = 0;
13604 gboolean has_fcs, fcs_good, fcs_bad;
13605 gint len, reported_len, ivlen;
13606 gboolean is_amsdu = 0;
13607 gboolean save_fragmented;
13608 guint32 addr_type;
13609 guint8 octet1, octet2;
13610 char out_buff[SHORT_STR];
13611 gint is_iv_bad;
13612 guchar iv_buff[4];
13613 const char *addr1_str = NULL;
13614 int addr1_hf = -1, addr1_hf_resolved = -1;
13615 guint offset;
13616 const gchar *fts_str;
13617 gchar flag_str[] = "opmPRMFTC";
13618 gint ii;
13619 guint16 qosoff = 0;
13620 guint16 qos_control = 0;
13621 gint meshctl_len = 0;
13622 guint8 mesh_flags;
13623 guint16 meshoff = 0;
13624 static wlan_hdr whdrs[4];
13625 gboolean retransmitted;
13627 volatile encap_t encap_type;
13628 proto_tree *volatile hdr_tree = NULL;
13629 tvbuff_t *volatile next_tvb = NULL;
13630 wlan_hdr *volatile whdr;
13632 whdr= &whdrs[0];
13634 col_set_str (pinfo->cinfo, COL_PROTOCOL, "802.11");
13635 col_clear(pinfo->cinfo, COL_INFO);
13637 fcf = FETCH_FCF(0);
13638 frame_type_subtype = COMPOSE_FRAME_TYPE(fcf);
13639 if (frame_type_subtype == CTRL_CONTROL_WRAPPER)
13640 ctrl_fcf = FETCH_FCF(10);
13641 else
13642 ctrl_fcf = 0;
13644 if (fixed_length_header)
13645 hdr_len = DATA_LONG_HDR_LEN;
13646 else
13647 hdr_len = find_header_length (fcf, ctrl_fcf, is_ht);
13649 fts_str = val_to_str_ext_const(frame_type_subtype, &frame_type_subtype_vals_ext,
13650 "Unrecognized (Reserved frame)");
13651 col_set_str (pinfo->cinfo, COL_INFO, fts_str);
13654 flags = FCF_FLAGS (fcf);
13655 more_frags = HAVE_FRAGMENTS (flags);
13657 for (ii = 0; ii < 8; ii++) {
13658 if (! (flags & 0x80 >> ii)) {
13659 flag_str[ii] = '.';
13663 if (is_ht && IS_STRICTLY_ORDERED(flags) &&
13664 ((FCF_FRAME_TYPE(fcf) == MGT_FRAME) ||
13665 ((FCF_FRAME_TYPE(fcf) == DATA_FRAME) && DATA_FRAME_IS_QOS(frame_type_subtype)))) {
13666 htc_len = 4;
13669 /* adjust the header length depending on the Mesh Control field */
13670 if ((FCF_FRAME_TYPE(fcf) == DATA_FRAME) &&
13671 DATA_FRAME_IS_QOS(frame_type_subtype)) {
13672 qosoff = hdr_len - htc_len - 2;
13673 qos_control = tvb_get_letohs(tvb, qosoff);
13674 if (tvb_length(tvb) > hdr_len) {
13675 meshoff = hdr_len;
13676 mesh_flags = tvb_get_guint8 (tvb, hdr_len);
13677 if (has_mesh_control(fcf, qos_control, mesh_flags)) {
13678 meshctl_len = find_mesh_control_length(mesh_flags);
13679 hdr_len += meshctl_len;
13685 * Some portions of this code calculate offsets relative to the end of the
13686 * header. But when the header has been padded to align the data this must
13687 * be done relative to true header size, not the padded/aligned value. To
13688 * simplify this work we stash the original header size in ohdr_len instead
13689 * of recalculating it every time we need it.
13691 ohdr_len = hdr_len;
13692 if (datapad)
13693 hdr_len = roundup2(hdr_len, 4);
13695 /* Add the FC and duration/id to the current tree */
13696 if (tree)
13698 ti = proto_tree_add_protocol_format (tree, proto_wlan, tvb, 0, hdr_len,
13699 "IEEE 802.11 %s", fts_str);
13700 hdr_tree = proto_item_add_subtree (ti, ett_80211);
13702 dissect_frame_control(hdr_tree, tvb, wlan_broken_fc, 0, pinfo);
13703 dissect_durid(hdr_tree, tvb, frame_type_subtype, 2);
13707 * Decode the part of the frame header that isn't the same for all
13708 * frame types.
13710 seq_control = 0;
13711 frag_number = 0;
13712 seq_number = 0;
13714 switch (FCF_FRAME_TYPE (fcf))
13717 case MGT_FRAME:
13719 * All management frame types have the same header.
13721 TVB_SET_ADDRESS_HF(&pinfo->dl_src, AT_ETHER, tvb, 10, 6, hf_ieee80211_addr_sa);
13722 COPY_ADDRESS_SHALLOW(&pinfo->src, &pinfo->dl_src);
13723 TVB_SET_ADDRESS_HF(&pinfo->dl_dst, AT_ETHER, tvb, 4, 6, hf_ieee80211_addr_da);
13724 COPY_ADDRESS_SHALLOW(&pinfo->dst, &pinfo->dl_dst);
13726 /* for tap */
13727 TVB_SET_ADDRESS_HF(&whdr->bssid, AT_ETHER, tvb, 16, 6, hf_ieee80211_addr_bssid);
13728 COPY_ADDRESS_SHALLOW(&whdr->src, &pinfo->dl_src);
13729 COPY_ADDRESS_SHALLOW(&whdr->dst, &pinfo->dl_dst);
13730 whdr->type = frame_type_subtype;
13732 seq_control = tvb_get_letohs(tvb, 22);
13733 frag_number = SEQCTL_FRAGMENT_NUMBER(seq_control);
13734 seq_number = SEQCTL_SEQUENCE_NUMBER(seq_control);
13736 col_append_fstr(pinfo->cinfo, COL_INFO,
13737 ", SN=%d", seq_number);
13739 col_append_fstr(pinfo->cinfo, COL_INFO,
13740 ", FN=%d",frag_number);
13742 if (tree)
13744 proto_tree_add_item (hdr_tree, hf_ieee80211_addr_ra, tvb, 4, 6, ENC_NA);
13745 hidden_item = proto_tree_add_string (hdr_tree, hf_ieee80211_addr_ra_resolved, tvb, 4, 6,
13746 get_ether_name(tvb_get_ptr(tvb, 4, 6)));
13747 PROTO_ITEM_SET_HIDDEN(hidden_item);
13748 proto_tree_add_item (hdr_tree, hf_ieee80211_addr_da, tvb, 4, 6, ENC_NA);
13749 hidden_item = proto_tree_add_string (hdr_tree, hf_ieee80211_addr_da_resolved, tvb, 4, 6,
13750 get_ether_name(tvb_get_ptr(tvb, 4, 6)));
13751 PROTO_ITEM_SET_HIDDEN(hidden_item);
13752 proto_tree_add_item (hdr_tree, hf_ieee80211_addr_ta, tvb, 10, 6, ENC_NA);
13753 hidden_item = proto_tree_add_string (hdr_tree, hf_ieee80211_addr_ta_resolved, tvb, 10, 6,
13754 get_ether_name(tvb_get_ptr(tvb, 10, 6)));
13755 PROTO_ITEM_SET_HIDDEN(hidden_item);
13756 proto_tree_add_item (hdr_tree, hf_ieee80211_addr_sa, tvb, 10, 6, ENC_NA);
13757 hidden_item = proto_tree_add_string (hdr_tree, hf_ieee80211_addr_sa_resolved, tvb, 10, 6,
13758 get_ether_name(tvb_get_ptr(tvb, 10, 6)));
13759 PROTO_ITEM_SET_HIDDEN(hidden_item);
13760 proto_tree_add_item (hdr_tree, hf_ieee80211_addr_bssid, tvb, 16, 6, ENC_NA);
13761 hidden_item = proto_tree_add_string (hdr_tree, hf_ieee80211_addr_bssid_resolved, tvb, 16, 6,
13762 get_ether_name(tvb_get_ptr(tvb, 16, 6)));
13763 PROTO_ITEM_SET_HIDDEN(hidden_item);
13765 /* add items for wlan.addr filter */
13766 hidden_item = proto_tree_add_item (hdr_tree, hf_ieee80211_addr, tvb, 4, 6, ENC_NA);
13767 PROTO_ITEM_SET_HIDDEN(hidden_item);
13768 hidden_item = proto_tree_add_string (hdr_tree, hf_ieee80211_addr_resolved, tvb, 4, 6,
13769 get_ether_name(tvb_get_ptr(tvb, 4, 6)));
13770 PROTO_ITEM_SET_HIDDEN(hidden_item);
13771 hidden_item = proto_tree_add_item (hdr_tree, hf_ieee80211_addr, tvb, 10, 6, ENC_NA);
13772 PROTO_ITEM_SET_HIDDEN(hidden_item);
13773 hidden_item = proto_tree_add_string (hdr_tree, hf_ieee80211_addr_resolved, tvb, 10, 6,
13774 get_ether_name(tvb_get_ptr(tvb, 10, 6)));
13775 PROTO_ITEM_SET_HIDDEN(hidden_item);
13776 hidden_item = proto_tree_add_item (hdr_tree, hf_ieee80211_addr, tvb, 16, 6, ENC_NA);
13777 PROTO_ITEM_SET_HIDDEN(hidden_item);
13778 hidden_item = proto_tree_add_string (hdr_tree, hf_ieee80211_addr_resolved, tvb, 16, 6,
13779 get_ether_name(tvb_get_ptr(tvb, 16, 6)));
13780 PROTO_ITEM_SET_HIDDEN(hidden_item);
13782 proto_tree_add_uint (hdr_tree, hf_ieee80211_frag_number, tvb, 22, 2, frag_number);
13783 proto_tree_add_uint (hdr_tree, hf_ieee80211_seq_number, tvb, 22, 2, seq_number);
13785 break;
13787 case CONTROL_FRAME:
13790 * Control Wrapper frames insert themselves between address 1
13791 * and address 2 in a normal control frame. Process address 1
13792 * first, then handle the rest of the frame in dissect_control.
13794 if (frame_type_subtype == CTRL_CONTROL_WRAPPER) {
13795 offset = 10; /* FC + D/ID + Address 1 + CFC + HTC */
13796 ctrl_fcf = FETCH_FCF(10);
13797 ctrl_type_subtype = COMPOSE_FRAME_TYPE(ctrl_fcf);
13798 } else {
13799 offset = 10; /* FC + D/ID + Address 1 */
13800 ctrl_type_subtype = frame_type_subtype;
13803 switch (ctrl_type_subtype)
13805 case CTRL_PS_POLL:
13806 addr1_str = "BSSID";
13807 addr1_hf = hf_ieee80211_addr_bssid;
13808 addr1_hf_resolved = hf_ieee80211_addr_bssid_resolved;
13810 break;
13811 case CTRL_VHT_NDP_ANNC:
13812 case CTRL_RTS:
13813 case CTRL_CTS:
13814 case CTRL_ACKNOWLEDGEMENT:
13815 case CTRL_CFP_END:
13816 case CTRL_CFP_ENDACK:
13817 case CTRL_BLOCK_ACK_REQ:
13818 case CTRL_BLOCK_ACK:
13819 addr1_str = "RA";
13820 addr1_hf = hf_ieee80211_addr_ra;
13821 addr1_hf_resolved = hf_ieee80211_addr_ra_resolved;
13822 break;
13823 default:
13824 break;
13827 if (!addr1_str) /* XXX - Should we throw some sort of error? */
13828 break;
13830 /* Add address 1 */
13831 dst = tvb_get_ptr(tvb, 4, 6);
13832 set_dst_addr_cols(pinfo, dst, addr1_str);
13833 if (tree) {
13834 proto_tree_add_item(hdr_tree, addr1_hf, tvb, 4, 6, ENC_BIG_ENDIAN);
13835 hidden_item = proto_tree_add_string (hdr_tree, addr1_hf_resolved, tvb, 4, 6,
13836 get_ether_name(tvb_get_ptr(tvb, 4, 6)));
13837 PROTO_ITEM_SET_HIDDEN(hidden_item);
13838 hidden_item = proto_tree_add_item (hdr_tree, hf_ieee80211_addr, tvb, 4, 6, ENC_NA);
13839 PROTO_ITEM_SET_HIDDEN(hidden_item);
13840 hidden_item = proto_tree_add_string (hdr_tree, hf_ieee80211_addr_resolved, tvb, 4, 6,
13841 get_ether_name(dst));
13842 PROTO_ITEM_SET_HIDDEN(hidden_item);
13846 * Start shoving in other fields if needed.
13847 * XXX - Should we look for is_ht as well?
13849 if ((frame_type_subtype == CTRL_CONTROL_WRAPPER) && tree) {
13850 cw_item = proto_tree_add_text(hdr_tree, tvb, offset, 2,
13851 "Contained Frame Control");
13852 cw_tree = proto_item_add_subtree (cw_item, ett_cntrl_wrapper_fc);
13853 dissect_frame_control(cw_tree, tvb, FALSE, offset, pinfo);
13854 dissect_ht_control(hdr_tree, tvb, offset + 2);
13855 offset += 6;
13856 cw_item = proto_tree_add_text(hdr_tree, tvb, offset, 2,
13857 "Carried Frame");
13858 hdr_tree = proto_item_add_subtree (cw_item, ett_cntrl_wrapper_fc);
13861 switch (ctrl_type_subtype)
13863 case CTRL_PS_POLL:
13864 case CTRL_CFP_END:
13865 case CTRL_CFP_ENDACK:
13867 src = tvb_get_ptr (tvb, offset, 6);
13868 set_src_addr_cols(pinfo, src, "BSSID");
13869 if (tree) {
13870 proto_tree_add_item(hdr_tree, hf_ieee80211_addr_ta, tvb, offset, 6, ENC_NA);
13871 hidden_item = proto_tree_add_string (hdr_tree, hf_ieee80211_addr_ta_resolved, tvb, offset, 6,
13872 get_ether_name(tvb_get_ptr(tvb, offset, 6)));
13873 PROTO_ITEM_SET_HIDDEN(hidden_item);
13874 hidden_item = proto_tree_add_item (hdr_tree, hf_ieee80211_addr, tvb, offset, 6, ENC_NA);
13875 PROTO_ITEM_SET_HIDDEN(hidden_item);
13876 hidden_item = proto_tree_add_string (hdr_tree, hf_ieee80211_addr_resolved, tvb, offset, 6,
13877 get_ether_name(src));
13878 PROTO_ITEM_SET_HIDDEN(hidden_item);
13880 break;
13883 case CTRL_VHT_NDP_ANNC:
13885 src = tvb_get_ptr (tvb, offset, 6);
13886 set_src_addr_cols(pinfo, src, "TA");
13887 if (tree) {
13888 guint16 sta_info;
13889 proto_tree *dialog_token_tree;
13890 proto_item *dialog_token_item;
13891 proto_tree *sta_info_tree;
13892 proto_item *sta_info_item;
13894 proto_tree_add_item(hdr_tree, hf_ieee80211_addr_ta, tvb, offset, 6, ENC_NA);
13895 hidden_item = proto_tree_add_string (hdr_tree, hf_ieee80211_addr_ta_resolved, tvb, offset, 6,
13896 get_ether_name(tvb_get_ptr(tvb, offset, 6)));
13897 PROTO_ITEM_SET_HIDDEN(hidden_item);
13898 hidden_item = proto_tree_add_item (hdr_tree, hf_ieee80211_addr, tvb, offset, 6, ENC_NA);
13899 PROTO_ITEM_SET_HIDDEN(hidden_item);
13900 hidden_item = proto_tree_add_string (hdr_tree, hf_ieee80211_addr_resolved, tvb, offset, 6,
13901 get_ether_name(src));
13902 PROTO_ITEM_SET_HIDDEN(hidden_item);
13903 offset += 6;
13905 dialog_token_item = proto_tree_add_item(hdr_tree, hf_ieee80211_vht_ndp_annc_token,
13906 tvb, offset, 1, ENC_NA);
13907 dialog_token_tree = proto_item_add_subtree(dialog_token_item, ett_vht_ndp_annc_token_tree);
13908 proto_tree_add_item(dialog_token_tree, hf_ieee80211_vht_ndp_annc_token_number,
13909 tvb, offset, 1, ENC_NA);
13910 proto_tree_add_item(dialog_token_tree, hf_ieee80211_vht_ndp_annc_token_reserved,
13911 tvb, offset, 1, ENC_NA);
13912 offset++;
13914 while (tvb_length_remaining(tvb, offset) > 0) {
13915 sta_info_item = proto_tree_add_item(hdr_tree, hf_ieee80211_vht_ndp_annc_sta_info,
13916 tvb, offset, 2, ENC_NA);
13917 sta_info_tree = proto_item_add_subtree(sta_info_item, ett_vht_ndp_annc_sta_info_tree);
13918 proto_tree_add_item(sta_info_tree, hf_ieee80211_vht_ndp_annc_sta_info_aid12,
13919 tvb, offset, 2, ENC_NA);
13920 proto_tree_add_item(sta_info_tree, hf_ieee80211_vht_ndp_annc_sta_info_feedback_type,
13921 tvb, offset, 2, ENC_NA);
13923 sta_info = tvb_get_letohs(tvb, offset);
13925 if (sta_info & 0x0010)
13926 proto_tree_add_uint(sta_info_tree,
13927 hf_ieee80211_vht_ndp_annc_sta_info_nc_index,
13928 tvb, offset, 2, sta_info);
13929 else
13930 proto_tree_add_item(sta_info_tree, hf_ieee80211_vht_ndp_annc_sta_info_reserved,
13931 tvb, offset, 2, ENC_NA);
13932 offset += 2;
13935 break;
13938 case CTRL_RTS:
13940 src = tvb_get_ptr (tvb, offset, 6);
13941 set_src_addr_cols(pinfo, src, "TA");
13942 if (tree) {
13943 proto_tree_add_item(hdr_tree, hf_ieee80211_addr_ta, tvb, offset, 6, ENC_NA);
13944 hidden_item = proto_tree_add_string (hdr_tree, hf_ieee80211_addr_ta_resolved, tvb, offset, 6,
13945 get_ether_name(tvb_get_ptr(tvb, offset, 6)));
13946 PROTO_ITEM_SET_HIDDEN(hidden_item);
13947 hidden_item = proto_tree_add_item (hdr_tree, hf_ieee80211_addr, tvb, offset, 6, ENC_NA);
13948 PROTO_ITEM_SET_HIDDEN(hidden_item);
13949 hidden_item = proto_tree_add_string (hdr_tree, hf_ieee80211_addr_resolved, tvb, offset, 6,
13950 get_ether_name(src));
13951 PROTO_ITEM_SET_HIDDEN(hidden_item);
13953 break;
13956 case CTRL_CONTROL_WRAPPER:
13958 /* XXX - We shouldn't see this. Should we throw an error? */
13959 break;
13962 case CTRL_BLOCK_ACK_REQ:
13964 src = tvb_get_ptr (tvb, offset, 6);
13965 set_src_addr_cols(pinfo, src, "TA");
13967 if (tree)
13969 guint16 bar_control;
13970 guint8 block_ack_type;
13971 proto_item *bar_parent_item;
13972 proto_tree *bar_sub_tree;
13974 proto_tree_add_item(hdr_tree, hf_ieee80211_addr_ta, tvb, offset, 6, ENC_NA);
13975 hidden_item = proto_tree_add_string (hdr_tree, hf_ieee80211_addr_ta_resolved, tvb, offset, 6,
13976 get_ether_name(tvb_get_ptr(tvb, offset, 6)));
13977 PROTO_ITEM_SET_HIDDEN(hidden_item);
13978 hidden_item = proto_tree_add_item (hdr_tree, hf_ieee80211_addr, tvb, offset, 6, ENC_NA);
13979 PROTO_ITEM_SET_HIDDEN(hidden_item);
13980 hidden_item = proto_tree_add_string (hdr_tree, hf_ieee80211_addr_resolved, tvb, offset, 6,
13981 get_ether_name(src));
13982 PROTO_ITEM_SET_HIDDEN(hidden_item);
13983 offset += 6;
13985 bar_control = tvb_get_letohs(tvb, offset);
13986 block_ack_type = (bar_control & 0x0006) >> 1;
13987 proto_tree_add_item(hdr_tree, hf_ieee80211_block_ack_request_type, tvb,
13988 offset, 2, ENC_LITTLE_ENDIAN);
13989 bar_parent_item = proto_tree_add_item(hdr_tree,
13990 hf_ieee80211_block_ack_request_control, tvb, offset, 2, ENC_LITTLE_ENDIAN);
13991 bar_sub_tree = proto_item_add_subtree(bar_parent_item,
13992 ett_block_ack);
13993 proto_tree_add_item(bar_sub_tree,
13994 hf_ieee80211_block_ack_control_ack_policy, tvb, offset, 2, ENC_LITTLE_ENDIAN);
13995 proto_tree_add_item(bar_sub_tree, hf_ieee80211_block_ack_control_multi_tid,
13996 tvb, offset, 2, ENC_LITTLE_ENDIAN);
13997 proto_tree_add_item(bar_sub_tree,
13998 hf_ieee80211_block_ack_control_compressed_bitmap, tvb, offset, 2,
13999 ENC_LITTLE_ENDIAN);
14000 proto_tree_add_item(bar_sub_tree, hf_ieee80211_block_ack_control_reserved,
14001 tvb, offset, 2, ENC_LITTLE_ENDIAN);
14003 switch (block_ack_type)
14005 case 0: /*Basic BlockAckReq */
14007 proto_tree_add_item(bar_sub_tree,
14008 hf_ieee80211_block_ack_control_basic_tid_info, tvb, offset, 2, ENC_LITTLE_ENDIAN);
14009 offset += 2;
14011 /*offset +=*/ add_fixed_field(hdr_tree, tvb, pinfo, offset,
14012 FIELD_BLOCK_ACK_SSC);
14013 break;
14015 case 2: /* Compressed BlockAckReq */
14017 proto_tree_add_item(bar_sub_tree,
14018 hf_ieee80211_block_ack_control_compressed_tid_info, tvb, offset, 2, ENC_LITTLE_ENDIAN);
14019 offset += 2;
14021 /*offset +=*/ add_fixed_field(hdr_tree, tvb, pinfo, offset,
14022 FIELD_BLOCK_ACK_SSC);
14023 break;
14025 case 3: /* Multi-TID BlockAckReq */
14027 guint8 tid_count;
14028 guint iii;
14029 proto_tree *bar_mtid_tree, *bar_mtid_sub_tree;
14031 tid_count = ((bar_control & 0xF000) >> 12) + 1;
14032 proto_tree_add_uint(bar_sub_tree, hf_ieee80211_block_ack_control_multi_tid_info, tvb, offset, 2, tid_count);
14033 offset += 2;
14035 bar_parent_item = proto_tree_add_text (hdr_tree, tvb, offset, tid_count*4, "Per TID Info");
14036 bar_mtid_tree = proto_item_add_subtree(bar_parent_item, ett_block_ack);
14037 for (iii = 0; iii < tid_count; iii++) {
14038 bar_parent_item = proto_tree_add_uint(bar_mtid_tree, hf_ieee80211_block_ack_multi_tid_info, tvb, offset, 4, iii);
14039 bar_mtid_sub_tree = proto_item_add_subtree(bar_parent_item, ett_block_ack);
14041 proto_tree_add_item(bar_mtid_sub_tree, hf_ieee80211_block_ack_multi_tid_reserved, tvb, offset, 2, ENC_LITTLE_ENDIAN);
14042 proto_tree_add_item(bar_mtid_sub_tree, hf_ieee80211_block_ack_multi_tid_value, tvb, offset, 2, ENC_LITTLE_ENDIAN);
14043 offset += 2;
14045 offset += add_fixed_field(bar_mtid_sub_tree, tvb, pinfo, offset, FIELD_BLOCK_ACK_SSC);
14047 break;
14051 break;
14054 case CTRL_BLOCK_ACK:
14056 src = tvb_get_ptr (tvb, offset, 6);
14057 set_src_addr_cols(pinfo, src, "TA");
14059 if (tree)
14061 guint16 ba_control;
14062 guint8 block_ack_type;
14063 proto_item *ba_parent_item;
14064 proto_tree *ba_sub_tree;
14066 proto_tree_add_item(hdr_tree, hf_ieee80211_addr_ta, tvb, offset, 6, ENC_NA);
14067 hidden_item = proto_tree_add_string (hdr_tree, hf_ieee80211_addr_ta_resolved, tvb, offset, 6,
14068 get_ether_name(tvb_get_ptr(tvb, offset, 6)));
14069 PROTO_ITEM_SET_HIDDEN(hidden_item);
14070 hidden_item = proto_tree_add_item (hdr_tree, hf_ieee80211_addr, tvb, offset, 6, ENC_NA);
14071 PROTO_ITEM_SET_HIDDEN(hidden_item);
14072 hidden_item = proto_tree_add_string (hdr_tree, hf_ieee80211_addr_resolved, tvb, offset, 6,
14073 get_ether_name(src));
14074 PROTO_ITEM_SET_HIDDEN(hidden_item);
14075 offset += 6;
14077 ba_control = tvb_get_letohs(tvb, offset);
14078 block_ack_type = (ba_control & 0x0006) >> 1;
14079 proto_tree_add_item(hdr_tree, hf_ieee80211_block_ack_type, tvb, offset, 2, ENC_LITTLE_ENDIAN);
14080 ba_parent_item = proto_tree_add_item(hdr_tree,
14081 hf_ieee80211_block_ack_control, tvb, offset, 2, ENC_LITTLE_ENDIAN);
14082 ba_sub_tree = proto_item_add_subtree(ba_parent_item, ett_block_ack);
14083 proto_tree_add_item(ba_sub_tree, hf_ieee80211_block_ack_control_ack_policy,
14084 tvb, offset, 2, ENC_LITTLE_ENDIAN);
14085 proto_tree_add_item(ba_sub_tree, hf_ieee80211_block_ack_control_multi_tid,
14086 tvb, offset, 2, ENC_LITTLE_ENDIAN);
14087 proto_tree_add_item(ba_sub_tree,
14088 hf_ieee80211_block_ack_control_compressed_bitmap, tvb, offset, 2,
14089 ENC_LITTLE_ENDIAN);
14090 proto_tree_add_item(ba_sub_tree, hf_ieee80211_block_ack_control_reserved, tvb,
14091 offset, 2, ENC_LITTLE_ENDIAN);
14093 switch (block_ack_type)
14095 case 0: /*Basic BlockAck */
14097 proto_tree_add_item(ba_sub_tree,
14098 hf_ieee80211_block_ack_control_basic_tid_info, tvb, offset, 2, ENC_LITTLE_ENDIAN);
14099 offset += 2;
14101 offset += add_fixed_field(hdr_tree, tvb, pinfo, offset, FIELD_BLOCK_ACK_SSC);
14102 proto_tree_add_item(hdr_tree, hf_ieee80211_block_ack_bitmap, tvb, offset, 128, ENC_NA);
14103 /*offset += 128;*/
14104 break;
14106 case 2: /* Compressed BlockAck */
14108 guint16 ssn;
14109 guint64 bmap;
14110 int f;
14111 proto_item *ba_bitmap_item;
14112 proto_tree *ba_bitmap_tree;
14114 proto_tree_add_item(ba_sub_tree, hf_ieee80211_block_ack_control_basic_tid_info, tvb, offset, 2, ENC_LITTLE_ENDIAN);
14115 offset += 2;
14117 ssn = tvb_get_letohs(tvb, offset);
14118 ssn >>= 4;
14119 offset += add_fixed_field(hdr_tree, tvb, pinfo, offset, FIELD_BLOCK_ACK_SSC);
14120 bmap = tvb_get_letoh64(tvb, offset);
14121 ba_bitmap_item = proto_tree_add_item(hdr_tree, hf_ieee80211_block_ack_bitmap, tvb, offset, 8, ENC_NA);
14122 ba_bitmap_tree = proto_item_add_subtree(ba_bitmap_item, ett_block_ack_bitmap);
14123 for (f = 0; f < 64; f++) {
14124 if (bmap & (G_GINT64_CONSTANT(1) << f))
14125 continue;
14126 proto_tree_add_uint_format_value(ba_bitmap_tree, hf_ieee80211_block_ack_bitmap_missing_frame,
14127 tvb, offset + (f/8), 1, ssn + f, "%u", ssn + f);
14129 /*offset += 8;*/
14130 break;
14132 case 3: /* Multi-TID BlockAck */
14134 guint8 tid_count;
14135 guint iii;
14136 proto_tree *ba_mtid_tree, *ba_mtid_sub_tree;
14138 tid_count = ((ba_control & 0xF000) >> 12) + 1;
14139 proto_tree_add_uint(ba_sub_tree,
14140 hf_ieee80211_block_ack_control_compressed_tid_info, tvb, offset, 2, tid_count);
14141 offset += 2;
14143 ba_parent_item = proto_tree_add_text (hdr_tree, tvb, offset, tid_count*4, "Per TID Info");
14144 ba_mtid_tree = proto_item_add_subtree(ba_parent_item, ett_block_ack);
14145 for (iii = 0; iii < tid_count; iii++) {
14146 ba_parent_item = proto_tree_add_uint(ba_mtid_tree, hf_ieee80211_block_ack_multi_tid_info, tvb, offset, 4, iii);
14147 ba_mtid_sub_tree = proto_item_add_subtree(ba_parent_item, ett_block_ack);
14149 proto_tree_add_item(ba_mtid_sub_tree, hf_ieee80211_block_ack_multi_tid_reserved, tvb, offset, 2, ENC_LITTLE_ENDIAN);
14150 proto_tree_add_item(ba_mtid_sub_tree, hf_ieee80211_block_ack_multi_tid_value, tvb, offset, 2, ENC_LITTLE_ENDIAN);
14151 offset += 2;
14153 offset += add_fixed_field(ba_mtid_sub_tree, tvb, pinfo, offset, FIELD_BLOCK_ACK_SSC);
14154 proto_tree_add_item(ba_mtid_sub_tree, hf_ieee80211_block_ack_bitmap, tvb, offset, 8, ENC_NA);
14155 offset += 8;
14157 break;
14161 break;
14164 break;
14167 case DATA_FRAME:
14169 guint32 src_offset, dst_offset, bssid_offset;
14170 addr_type = FCF_ADDR_SELECTOR (fcf);
14172 /* In order to show src/dst address we must always do the following */
14173 switch (addr_type)
14176 case DATA_ADDR_T1:
14177 src_offset = 10;
14178 dst_offset = 4;
14179 bssid_offset = 16;
14180 break;
14182 case DATA_ADDR_T2:
14183 src_offset = 16;
14184 dst_offset = 4;
14185 bssid_offset = 10;
14186 break;
14188 case DATA_ADDR_T3:
14189 src_offset = 10;
14190 dst_offset = 16;
14191 bssid_offset = 4;
14192 break;
14194 case DATA_ADDR_T4:
14195 src_offset = 24;
14196 dst_offset = 16;
14197 bssid_offset = 16;
14198 break;
14199 default:
14200 /* Should never happen? */
14201 src_offset = 0;
14202 dst_offset = 0;
14203 bssid_offset = 0;
14204 break;
14207 TVB_SET_ADDRESS_HF(&pinfo->dl_src, AT_ETHER, tvb, src_offset, 6, hf_ieee80211_addr_sa);
14208 COPY_ADDRESS_SHALLOW(&pinfo->src, &pinfo->dl_src);
14209 TVB_SET_ADDRESS_HF(&pinfo->dl_dst, AT_ETHER, tvb, dst_offset, 6, hf_ieee80211_addr_da);
14210 COPY_ADDRESS_SHALLOW(&pinfo->dst, &pinfo->dl_dst);
14212 /* for tap */
14214 TVB_SET_ADDRESS_HF(&whdr->bssid, AT_ETHER, tvb, bssid_offset, 6, hf_ieee80211_addr_bssid);
14215 COPY_ADDRESS_SHALLOW(&whdr->src, &pinfo->dl_src);
14216 COPY_ADDRESS_SHALLOW(&whdr->dst, &pinfo->dl_dst);
14217 whdr->type = frame_type_subtype;
14219 seq_control = tvb_get_letohs(tvb, 22);
14220 frag_number = SEQCTL_FRAGMENT_NUMBER(seq_control);
14221 seq_number = SEQCTL_SEQUENCE_NUMBER(seq_control);
14223 col_append_fstr(pinfo->cinfo, COL_INFO,
14224 ", SN=%d, FN=%d", seq_number,frag_number);
14226 /* Now if we have a tree we start adding stuff */
14227 if (tree)
14230 switch (addr_type)
14232 /* XXX - using the offsets set above, could all of these cases be collapsed into one? */
14233 case DATA_ADDR_T1:
14234 proto_tree_add_item (hdr_tree, hf_ieee80211_addr_ra, tvb, 4, 6, ENC_NA);
14235 hidden_item = proto_tree_add_string (hdr_tree, hf_ieee80211_addr_ra_resolved, tvb, 4, 6,
14236 get_ether_name(tvb_get_ptr(tvb, 4, 6)));
14237 PROTO_ITEM_SET_HIDDEN(hidden_item);
14238 proto_tree_add_item (hdr_tree, hf_ieee80211_addr_da, tvb, 4, 6, ENC_NA);
14239 hidden_item = proto_tree_add_string (hdr_tree, hf_ieee80211_addr_da_resolved, tvb, 4, 6,
14240 get_ether_name(tvb_get_ptr(tvb, 4, 6)));
14241 PROTO_ITEM_SET_HIDDEN(hidden_item);
14242 proto_tree_add_item (hdr_tree, hf_ieee80211_addr_ta, tvb, 10, 6, ENC_NA);
14243 hidden_item = proto_tree_add_string (hdr_tree, hf_ieee80211_addr_ta_resolved, tvb, 10, 6,
14244 get_ether_name(tvb_get_ptr(tvb, 10, 6)));
14245 PROTO_ITEM_SET_HIDDEN(hidden_item);
14246 proto_tree_add_item (hdr_tree, hf_ieee80211_addr_sa, tvb, 10, 6, ENC_NA);
14247 hidden_item = proto_tree_add_string (hdr_tree, hf_ieee80211_addr_sa_resolved, tvb, 10, 6,
14248 get_ether_name(tvb_get_ptr(tvb, 10, 6)));
14249 PROTO_ITEM_SET_HIDDEN(hidden_item);
14250 proto_tree_add_item (hdr_tree, hf_ieee80211_addr_bssid, tvb, 16, 6, ENC_NA);
14251 hidden_item = proto_tree_add_string (hdr_tree, hf_ieee80211_addr_bssid_resolved, tvb, 16, 6,
14252 get_ether_name(tvb_get_ptr(tvb, 16, 6)));
14253 PROTO_ITEM_SET_HIDDEN(hidden_item);
14254 proto_tree_add_uint (hdr_tree, hf_ieee80211_frag_number, tvb, 22, 2, frag_number);
14255 proto_tree_add_uint (hdr_tree, hf_ieee80211_seq_number, tvb, 22, 2, seq_number);
14257 /* add items for wlan.addr filter */
14258 hidden_item = proto_tree_add_item (hdr_tree, hf_ieee80211_addr, tvb, 4, 6, ENC_NA);
14259 PROTO_ITEM_SET_HIDDEN(hidden_item);
14260 hidden_item = proto_tree_add_string (hdr_tree, hf_ieee80211_addr_resolved, tvb, 4, 6,
14261 get_ether_name(tvb_get_ptr(tvb, 4, 6)));
14262 PROTO_ITEM_SET_HIDDEN(hidden_item);
14263 hidden_item = proto_tree_add_item (hdr_tree, hf_ieee80211_addr, tvb, 10, 6, ENC_NA);
14264 PROTO_ITEM_SET_HIDDEN(hidden_item);
14265 hidden_item = proto_tree_add_string (hdr_tree, hf_ieee80211_addr_resolved, tvb, 10, 6,
14266 get_ether_name(tvb_get_ptr(tvb, 10, 6)));
14267 PROTO_ITEM_SET_HIDDEN(hidden_item);
14268 hidden_item = proto_tree_add_item (hdr_tree, hf_ieee80211_addr, tvb, 16, 6, ENC_NA);
14269 PROTO_ITEM_SET_HIDDEN(hidden_item);
14270 hidden_item = proto_tree_add_string (hdr_tree, hf_ieee80211_addr_resolved, tvb, 16, 6,
14271 get_ether_name(tvb_get_ptr(tvb, 16, 6)));
14272 PROTO_ITEM_SET_HIDDEN(hidden_item);
14273 break;
14275 case DATA_ADDR_T2:
14276 proto_tree_add_item (hdr_tree, hf_ieee80211_addr_ra, tvb, 4, 6, ENC_NA);
14277 hidden_item = proto_tree_add_string (hdr_tree, hf_ieee80211_addr_ra_resolved, tvb, 4, 6,
14278 get_ether_name(tvb_get_ptr(tvb, 4, 6)));
14279 PROTO_ITEM_SET_HIDDEN(hidden_item);
14280 proto_tree_add_item (hdr_tree, hf_ieee80211_addr_da, tvb, 4, 6, ENC_NA);
14281 hidden_item = proto_tree_add_string (hdr_tree, hf_ieee80211_addr_da_resolved, tvb, 4, 6,
14282 get_ether_name(tvb_get_ptr(tvb, 4, 6)));
14283 PROTO_ITEM_SET_HIDDEN(hidden_item);
14284 proto_tree_add_item (hdr_tree, hf_ieee80211_addr_ta, tvb, 10, 6, ENC_NA);
14285 hidden_item = proto_tree_add_string (hdr_tree, hf_ieee80211_addr_ta_resolved, tvb, 10, 6,
14286 get_ether_name(tvb_get_ptr(tvb, 10, 6)));
14287 PROTO_ITEM_SET_HIDDEN(hidden_item);
14288 proto_tree_add_item (hdr_tree, hf_ieee80211_addr_bssid, tvb, 10, 6, ENC_NA);
14289 hidden_item = proto_tree_add_string (hdr_tree, hf_ieee80211_addr_bssid_resolved, tvb, 10, 6,
14290 get_ether_name(tvb_get_ptr(tvb, 10, 6)));
14291 PROTO_ITEM_SET_HIDDEN(hidden_item);
14292 proto_tree_add_item (hdr_tree, hf_ieee80211_addr_sa, tvb, 16, 6, ENC_NA);
14293 hidden_item = proto_tree_add_string (hdr_tree, hf_ieee80211_addr_sa_resolved, tvb, 16, 6,
14294 get_ether_name(tvb_get_ptr(tvb, 16, 6)));
14295 PROTO_ITEM_SET_HIDDEN(hidden_item);
14296 proto_tree_add_uint (hdr_tree, hf_ieee80211_frag_number, tvb, 22, 2, frag_number);
14297 proto_tree_add_uint (hdr_tree, hf_ieee80211_seq_number, tvb, 22, 2, seq_number);
14299 /* add items for wlan.addr filter */
14300 hidden_item = proto_tree_add_item (hdr_tree, hf_ieee80211_addr, tvb, 4, 6, ENC_NA);
14301 PROTO_ITEM_SET_HIDDEN(hidden_item);
14302 hidden_item = proto_tree_add_string (hdr_tree, hf_ieee80211_addr_resolved, tvb, 4, 6,
14303 get_ether_name(tvb_get_ptr(tvb, 4, 6)));
14304 PROTO_ITEM_SET_HIDDEN(hidden_item);
14305 hidden_item = proto_tree_add_item (hdr_tree, hf_ieee80211_addr, tvb, 10, 6, ENC_NA);
14306 PROTO_ITEM_SET_HIDDEN(hidden_item);
14307 hidden_item = proto_tree_add_string (hdr_tree, hf_ieee80211_addr_resolved, tvb, 10, 6,
14308 get_ether_name(tvb_get_ptr(tvb, 10, 6)));
14309 PROTO_ITEM_SET_HIDDEN(hidden_item);
14310 hidden_item = proto_tree_add_item (hdr_tree, hf_ieee80211_addr, tvb, 16, 6, ENC_NA);
14311 PROTO_ITEM_SET_HIDDEN(hidden_item);
14312 hidden_item = proto_tree_add_string (hdr_tree, hf_ieee80211_addr_resolved, tvb, 16, 6,
14313 get_ether_name(tvb_get_ptr(tvb, 16, 6)));
14314 PROTO_ITEM_SET_HIDDEN(hidden_item);
14315 break;
14317 case DATA_ADDR_T3:
14318 proto_tree_add_item (hdr_tree, hf_ieee80211_addr_ra, tvb, 4, 6, ENC_NA);
14319 hidden_item = proto_tree_add_string (hdr_tree, hf_ieee80211_addr_ra_resolved, tvb, 4, 6,
14320 get_ether_name(tvb_get_ptr(tvb, 4, 6)));
14321 PROTO_ITEM_SET_HIDDEN(hidden_item);
14322 proto_tree_add_item (hdr_tree, hf_ieee80211_addr_bssid, tvb, 4, 6, ENC_NA);
14323 hidden_item = proto_tree_add_string (hdr_tree, hf_ieee80211_addr_bssid_resolved, tvb, 4, 6,
14324 get_ether_name(tvb_get_ptr(tvb, 4, 6)));
14325 PROTO_ITEM_SET_HIDDEN(hidden_item);
14326 proto_tree_add_item (hdr_tree, hf_ieee80211_addr_ta, tvb, 10, 6, ENC_NA);
14327 hidden_item = proto_tree_add_string (hdr_tree, hf_ieee80211_addr_ta_resolved, tvb, 10, 6,
14328 get_ether_name(tvb_get_ptr(tvb, 10, 6)));
14329 PROTO_ITEM_SET_HIDDEN(hidden_item);
14330 proto_tree_add_item (hdr_tree, hf_ieee80211_addr_sa, tvb, 10, 6, ENC_NA);
14331 hidden_item = proto_tree_add_string (hdr_tree, hf_ieee80211_addr_sa_resolved, tvb, 10, 6,
14332 get_ether_name(tvb_get_ptr(tvb, 10, 6)));
14333 PROTO_ITEM_SET_HIDDEN(hidden_item);
14334 proto_tree_add_item (hdr_tree, hf_ieee80211_addr_da, tvb, 16, 6, ENC_NA);
14335 hidden_item = proto_tree_add_string (hdr_tree, hf_ieee80211_addr_da_resolved, tvb, 16, 6,
14336 get_ether_name(tvb_get_ptr(tvb, 16, 6)));
14337 PROTO_ITEM_SET_HIDDEN(hidden_item);
14338 proto_tree_add_uint (hdr_tree, hf_ieee80211_frag_number, tvb, 22, 2, frag_number);
14339 proto_tree_add_uint (hdr_tree, hf_ieee80211_seq_number, tvb, 22, 2, seq_number);
14341 /* add items for wlan.addr filter */
14342 hidden_item = proto_tree_add_item (hdr_tree, hf_ieee80211_addr, tvb, 4, 6, ENC_NA);
14343 PROTO_ITEM_SET_HIDDEN(hidden_item);
14344 hidden_item = proto_tree_add_string (hdr_tree, hf_ieee80211_addr_resolved, tvb, 4, 6,
14345 get_ether_name(tvb_get_ptr(tvb, 4, 6)));
14346 PROTO_ITEM_SET_HIDDEN(hidden_item);
14347 hidden_item = proto_tree_add_item (hdr_tree, hf_ieee80211_addr, tvb, 10, 6, ENC_NA);
14348 PROTO_ITEM_SET_HIDDEN(hidden_item);
14349 hidden_item = proto_tree_add_string (hdr_tree, hf_ieee80211_addr_resolved, tvb, 10, 6,
14350 get_ether_name(tvb_get_ptr(tvb, 10, 6)));
14351 PROTO_ITEM_SET_HIDDEN(hidden_item);
14352 hidden_item = proto_tree_add_item (hdr_tree, hf_ieee80211_addr, tvb, 16, 6, ENC_NA);
14353 PROTO_ITEM_SET_HIDDEN(hidden_item);
14354 hidden_item = proto_tree_add_string (hdr_tree, hf_ieee80211_addr_resolved, tvb, 16, 6,
14355 get_ether_name(tvb_get_ptr(tvb, 16, 6)));
14356 PROTO_ITEM_SET_HIDDEN(hidden_item);
14357 break;
14359 case DATA_ADDR_T4:
14360 proto_tree_add_item (hdr_tree, hf_ieee80211_addr_ra, tvb, 4, 6, ENC_NA);
14361 hidden_item = proto_tree_add_string (hdr_tree, hf_ieee80211_addr_ra_resolved, tvb, 4, 6,
14362 get_ether_name(tvb_get_ptr(tvb, 4, 6)));
14363 PROTO_ITEM_SET_HIDDEN(hidden_item);
14364 proto_tree_add_item (hdr_tree, hf_ieee80211_addr_ta, tvb, 10, 6, ENC_NA);
14365 hidden_item = proto_tree_add_string (hdr_tree, hf_ieee80211_addr_ta_resolved, tvb, 10, 6,
14366 get_ether_name(tvb_get_ptr(tvb, 10, 6)));
14367 PROTO_ITEM_SET_HIDDEN(hidden_item);
14368 proto_tree_add_item (hdr_tree, hf_ieee80211_addr_da, tvb, 16, 6, ENC_NA);
14369 hidden_item = proto_tree_add_string (hdr_tree, hf_ieee80211_addr_da_resolved, tvb, 16, 6,
14370 get_ether_name(tvb_get_ptr(tvb, 16, 6)));
14371 PROTO_ITEM_SET_HIDDEN(hidden_item);
14372 proto_tree_add_uint (hdr_tree, hf_ieee80211_frag_number, tvb, 22, 2, frag_number);
14373 proto_tree_add_uint (hdr_tree, hf_ieee80211_seq_number, tvb, 22, 2, seq_number);
14374 proto_tree_add_item (hdr_tree, hf_ieee80211_addr_sa, tvb, 24, 6, ENC_NA);
14375 hidden_item = proto_tree_add_string (hdr_tree, hf_ieee80211_addr_sa_resolved, tvb, 24, 6,
14376 get_ether_name(tvb_get_ptr(tvb, 24, 6)));
14377 PROTO_ITEM_SET_HIDDEN(hidden_item);
14379 /* add items for wlan.addr filter */
14380 hidden_item = proto_tree_add_item (hdr_tree, hf_ieee80211_addr, tvb, 4, 6, ENC_NA);
14381 PROTO_ITEM_SET_HIDDEN(hidden_item);
14382 hidden_item = proto_tree_add_string (hdr_tree, hf_ieee80211_addr_resolved, tvb, 4, 6,
14383 get_ether_name(tvb_get_ptr(tvb, 4, 6)));
14384 PROTO_ITEM_SET_HIDDEN(hidden_item);
14385 hidden_item = proto_tree_add_item (hdr_tree, hf_ieee80211_addr, tvb, 10, 6, ENC_NA);
14386 PROTO_ITEM_SET_HIDDEN(hidden_item);
14387 hidden_item = proto_tree_add_string (hdr_tree, hf_ieee80211_addr_resolved, tvb, 10, 6,
14388 get_ether_name(tvb_get_ptr(tvb, 10, 6)));
14389 PROTO_ITEM_SET_HIDDEN(hidden_item);
14390 hidden_item = proto_tree_add_item (hdr_tree, hf_ieee80211_addr, tvb, 16, 6, ENC_NA);
14391 PROTO_ITEM_SET_HIDDEN(hidden_item);
14392 hidden_item = proto_tree_add_string (hdr_tree, hf_ieee80211_addr_resolved, tvb, 16, 6,
14393 get_ether_name(tvb_get_ptr(tvb, 16, 6)));
14394 PROTO_ITEM_SET_HIDDEN(hidden_item);
14395 hidden_item = proto_tree_add_item (hdr_tree, hf_ieee80211_addr, tvb, 24, 6, ENC_NA);
14396 PROTO_ITEM_SET_HIDDEN(hidden_item);
14397 hidden_item = proto_tree_add_string (hdr_tree, hf_ieee80211_addr_resolved, tvb, 24, 6,
14398 get_ether_name(tvb_get_ptr(tvb, 24, 6)));
14399 PROTO_ITEM_SET_HIDDEN(hidden_item);
14400 break;
14404 break;
14408 len = tvb_length_remaining(tvb, hdr_len);
14409 reported_len = tvb_reported_length_remaining(tvb, hdr_len);
14411 switch (fcs_len)
14413 case 0: /* Definitely has no FCS */
14414 has_fcs = FALSE;
14415 break;
14417 case 4: /* Definitely has an FCS */
14418 has_fcs = TRUE;
14419 break;
14421 case -2: /* Data frames have no FCS, other frames have an FCS */
14422 if (FCF_FRAME_TYPE (fcf) == DATA_FRAME)
14423 has_fcs = FALSE;
14424 else
14425 has_fcs = TRUE;
14426 break;
14428 default: /* Don't know - use "wlan_check_fcs" */
14429 has_fcs = wlan_check_fcs;
14430 break;
14432 if (has_fcs)
14435 * Well, this packet should, in theory, have an FCS.
14436 * Do we have the entire packet, and does it have enough data for
14437 * the FCS?
14439 if (reported_len < 4)
14442 * The packet is claimed not to even have enough data for a 4-byte
14443 * FCS.
14444 * Pretend it doesn't have an FCS.
14448 else if (len < reported_len)
14451 * The packet is claimed to have enough data for a 4-byte FCS, but
14452 * we didn't capture all of the packet.
14453 * Slice off the 4-byte FCS from the reported length, and trim the
14454 * captured length so it's no more than the reported length; that
14455 * will slice off what of the FCS, if any, is in the captured
14456 * length.
14458 reported_len -= 4;
14459 if (len > reported_len)
14460 len = reported_len;
14462 else
14465 * We have the entire packet, and it includes a 4-byte FCS.
14466 * Slice it off, and put it into the tree.
14468 len -= 4;
14469 reported_len -= 4;
14470 if (tree)
14472 guint32 sent_fcs = tvb_get_ntohl(tvb, hdr_len + len);
14473 guint32 fcs;
14475 if (datapad)
14476 fcs = crc32_802_tvb_padded(tvb, ohdr_len, hdr_len, len);
14477 else
14478 fcs = crc32_802_tvb(tvb, hdr_len + len);
14479 if (fcs == sent_fcs) {
14480 fcs_good = TRUE;
14481 fcs_bad = FALSE;
14482 } else {
14483 fcs_good = FALSE;
14484 fcs_bad = TRUE;
14487 fcs_item = proto_tree_add_item(hdr_tree, hf_ieee80211_fcs, tvb,
14488 hdr_len + len, 4, ENC_LITTLE_ENDIAN);
14489 if (fcs_good) {
14490 proto_item_append_text(fcs_item, " [correct]");
14491 } else {
14492 proto_item_append_text(fcs_item, " [incorrect, should be 0x%08x]", fcs);
14493 flag_str[8] = '.';
14496 proto_tree_set_appendix(hdr_tree, tvb, hdr_len + len, 4);
14498 fcs_tree = proto_item_add_subtree(fcs_item, ett_fcs);
14500 fcs_item = proto_tree_add_boolean(fcs_tree,
14501 hf_ieee80211_fcs_good, tvb,
14502 hdr_len + len, 4,
14503 fcs_good);
14504 PROTO_ITEM_SET_GENERATED(fcs_item);
14506 fcs_item = proto_tree_add_boolean(fcs_tree,
14507 hf_ieee80211_fcs_bad, tvb,
14508 hdr_len + len, 4,
14509 fcs_bad);
14510 PROTO_ITEM_SET_GENERATED(fcs_item);
14513 } else {
14514 flag_str[8] = '\0';
14517 proto_item_append_text(ti, ", Flags: %s", flag_str);
14518 col_append_fstr (pinfo->cinfo, COL_INFO, ", Flags=%s", flag_str);
14522 * Only management and data frames have a body, so we don't have
14523 * anything more to do for other types of frames.
14525 switch (FCF_FRAME_TYPE (fcf))
14528 case MGT_FRAME:
14529 if (htc_len == 4) {
14530 dissect_ht_control(hdr_tree, tvb, ohdr_len - 4);
14532 break;
14534 case DATA_FRAME:
14535 if (tree && DATA_FRAME_IS_QOS(frame_type_subtype))
14537 proto_item *qos_fields, *qos_ti;
14538 proto_tree *qos_tree;
14540 guint16 qos_eosp;
14541 guint16 qos_field_content;
14543 qos_fields = proto_tree_add_item(hdr_tree, hf_ieee80211_qos, tvb, qosoff, 2, ENC_LITTLE_ENDIAN);
14544 qos_tree = proto_item_add_subtree (qos_fields, ett_qos_parameters);
14546 qos_eosp = QOS_EOSP(qos_control);
14547 qos_field_content = QOS_FIELD_CONTENT(qos_control);
14549 proto_tree_add_item(qos_tree, hf_ieee80211_qos_tid, tvb, qosoff, 2, ENC_LITTLE_ENDIAN);
14551 qos_ti = proto_tree_add_item(qos_tree, hf_ieee80211_qos_priority, tvb, qosoff, 2, ENC_LITTLE_ENDIAN);
14552 PROTO_ITEM_SET_GENERATED(qos_ti);
14554 if (flags & FLAG_FROM_DS) {
14555 proto_tree_add_item(qos_tree, hf_ieee80211_qos_eosp, tvb, qosoff, 2, ENC_LITTLE_ENDIAN);
14556 } else {
14557 proto_tree_add_item(qos_tree, hf_ieee80211_qos_bit4, tvb, qosoff, 2, ENC_LITTLE_ENDIAN);
14560 proto_tree_add_item(qos_tree, hf_ieee80211_qos_ack_policy, tvb, qosoff, 2, ENC_LITTLE_ENDIAN);
14562 if (flags & FLAG_FROM_DS) {
14563 if (!DATA_FRAME_IS_NULL(frame_type_subtype)) {
14564 proto_tree_add_item(qos_tree, hf_ieee80211_qos_amsdu_present, tvb, qosoff, 2, ENC_LITTLE_ENDIAN);
14565 is_amsdu = QOS_AMSDU_PRESENT(qos_control);
14567 if (DATA_FRAME_IS_CF_POLL(frame_type_subtype)) {
14568 /* txop limit */
14569 qos_ti = proto_tree_add_item(qos_tree, hf_ieee80211_qos_txop_limit, tvb, qosoff, 2, ENC_LITTLE_ENDIAN);
14570 if (qos_field_content == 0) {
14571 proto_item_append_text(qos_ti, " (transmit one frame immediately)");
14573 } else {
14574 /* qap ps buffer state */
14575 proto_item *qos_ps_buf_state_fields;
14576 proto_tree *qos_ps_buf_state_tree;
14578 qos_ps_buf_state_fields = proto_tree_add_item(qos_tree, hf_ieee80211_qos_ps_buf_state, tvb, qosoff, 2, ENC_LITTLE_ENDIAN);
14579 qos_ps_buf_state_tree = proto_item_add_subtree (qos_ps_buf_state_fields, ett_qos_ps_buf_state);
14581 proto_tree_add_item(qos_ps_buf_state_tree, hf_ieee80211_qos_buf_state_indicated, tvb, qosoff, 2, ENC_LITTLE_ENDIAN);
14583 if (QOS_PS_BUF_STATE_INDICATED(qos_field_content)) {
14584 proto_tree_add_item(qos_ps_buf_state_tree, hf_ieee80211_qos_highest_pri_buf_ac, tvb, qosoff, 2, ENC_LITTLE_ENDIAN);
14585 qos_ti = proto_tree_add_item(qos_ps_buf_state_tree, hf_ieee80211_qos_qap_buf_load, tvb, qosoff, 2, ENC_LITTLE_ENDIAN);
14586 switch (QOS_PS_QAP_BUF_LOAD(qos_field_content)) {
14588 case 0:
14589 proto_item_append_text(qos_ti, " (no buffered traffic)");
14590 break;
14592 default:
14593 proto_item_append_text(qos_ti, " (%d octets)", QOS_PS_QAP_BUF_LOAD(qos_field_content)*4096);
14594 break;
14596 case 15:
14597 proto_item_append_text(qos_ti, " (greater than 57344 octets)");
14598 break;
14603 } else {
14604 if (!DATA_FRAME_IS_NULL(frame_type_subtype)) {
14605 proto_tree_add_item(qos_tree, hf_ieee80211_qos_amsdu_present, tvb, qosoff, 2, ENC_LITTLE_ENDIAN);
14606 is_amsdu = QOS_AMSDU_PRESENT(qos_control);
14608 if (qos_eosp) {
14609 /* queue size */
14610 qos_ti = proto_tree_add_item(qos_tree, hf_ieee80211_qos_queue_size, tvb, qosoff, 2, ENC_LITTLE_ENDIAN);
14611 switch (qos_field_content) {
14612 case 0:
14613 proto_item_append_text(qos_ti, " (no buffered traffic in the queue)");
14614 break;
14616 default:
14617 proto_item_append_text(qos_ti, " (%u bytes)", qos_field_content*256);
14618 break;
14620 case 254:
14621 proto_item_append_text(qos_ti, " (more than 64768 octets)");
14622 break;
14624 case 255:
14625 proto_item_append_text(qos_ti, " (unspecified or unknown)");
14626 break;
14628 } else {
14629 /* txop duration requested */
14630 qos_ti = proto_tree_add_item(qos_tree, hf_ieee80211_qos_txop_dur_req,
14631 tvb, qosoff, 2, ENC_LITTLE_ENDIAN);
14632 if (qos_field_content == 0) {
14633 proto_item_append_text(qos_ti, " (no TXOP requested)");
14638 /* Do we have +HTC? */
14639 if (htc_len == 4) {
14640 dissect_ht_control(hdr_tree, tvb, ohdr_len - 4);
14643 if (meshctl_len != 0) {
14644 proto_item *msh_fields;
14645 proto_tree *msh_tree;
14647 msh_fields = proto_tree_add_item(hdr_tree, hf_ieee80211_mesh_control_field, tvb, meshoff, meshctl_len, ENC_NA);
14648 msh_tree = proto_item_add_subtree (msh_fields, ett_msh_control);
14649 add_fixed_field(msh_tree, tvb, pinfo, meshoff, FIELD_MESH_CONTROL);
14652 } /* end of qos control field */
14653 /* Davide Schiera (2006-11-21): process handshake packet with AirPDcap */
14654 /* the processing will take care of 4-way handshake sessions for WPA */
14655 /* and WPA2 decryption */
14656 if (enable_decryption && !pinfo->fd->flags.visited) {
14657 const guint8 *enc_data = tvb_get_ptr(tvb, 0, hdr_len+reported_len);
14658 AirPDcapPacketProcess(&airpdcap_ctx, enc_data, hdr_len, hdr_len+reported_len, NULL, 0, NULL, TRUE, FALSE);
14660 /* Davide Schiera -------------------------------------------------------- */
14663 * No-data frames don't have a body.
14665 if (DATA_FRAME_IS_NULL(frame_type_subtype))
14666 return;
14668 if (!wlan_subdissector) {
14669 guint fnum = 0;
14671 /* key: bssid:src
14672 * data: last seq_control seen and frame number
14674 retransmitted = FALSE;
14675 if (!pinfo->fd->flags.visited) {
14676 retransmit_key key;
14677 retransmit_key *result;
14679 memcpy(key.bssid, bssid, 6);
14680 memcpy(key.src, src, 6);
14681 key.seq_control = 0;
14682 result = (retransmit_key *)g_hash_table_lookup(fc_analyse_retransmit_table, &key);
14683 if (result && (result->seq_control == seq_control)) {
14684 /* keep a pointer to the first seen frame, could be done with proto data? */
14685 fnum = result->fnum;
14686 g_hash_table_insert(fc_first_frame_table, GINT_TO_POINTER(pinfo->fd->num),
14687 GINT_TO_POINTER(fnum));
14688 retransmitted = TRUE;
14689 } else {
14690 /* first time or new seq*/
14691 if (!result) {
14692 result = wmem_new(wmem_file_scope(), retransmit_key);
14693 *result = key;
14694 g_hash_table_insert(fc_analyse_retransmit_table, result, result);
14696 result->seq_control = seq_control;
14697 result->fnum = pinfo->fd->num;
14700 else if ((fnum = GPOINTER_TO_UINT(g_hash_table_lookup(fc_first_frame_table, GINT_TO_POINTER(pinfo->fd->num))))) {
14701 retransmitted = TRUE;
14704 if (retransmitted) {
14705 col_append_str(pinfo->cinfo, COL_INFO, " [retransmitted]");
14706 if (tree) {
14707 proto_item *item;
14709 item=proto_tree_add_none_format(hdr_tree, hf_ieee80211_fc_analysis_retransmission, tvb, 0, 0,
14710 "Retransmitted frame");
14711 PROTO_ITEM_SET_GENERATED(item);
14712 item=proto_tree_add_uint(hdr_tree, hf_ieee80211_fc_analysis_retransmission_frame,tvb, 0, 0, fnum);
14713 PROTO_ITEM_SET_GENERATED(item);
14715 next_tvb = tvb_new_subset (tvb, hdr_len, len, reported_len);
14716 call_dissector(data_handle, next_tvb, pinfo, tree);
14717 goto end_of_wlan;
14721 break;
14723 case CONTROL_FRAME:
14724 return;
14726 default:
14727 return;
14730 if (IS_PROTECTED(FCF_FLAGS(fcf))
14731 && !pinfo->pseudo_header->ieee_802_11.decrypted
14732 && (wlan_ignore_wep != WLAN_IGNORE_WEP_WO_IV)) {
14734 * It's a WEP or WPA encrypted frame, and it hasn't already been
14735 * decrypted; dissect the protections parameters and decrypt the data,
14736 * if we have a matching key. Otherwise display it as data.
14739 gboolean can_decrypt = FALSE;
14740 proto_tree *wep_tree = NULL;
14741 guint32 iv;
14742 guint8 key, keybyte;
14744 /* Davide Schiera (2006-11-27): define algorithms constants and macros */
14745 #define PROTECTION_ALG_WEP AIRPDCAP_KEY_TYPE_WEP
14746 #define PROTECTION_ALG_TKIP AIRPDCAP_KEY_TYPE_TKIP
14747 #define PROTECTION_ALG_CCMP AIRPDCAP_KEY_TYPE_CCMP
14748 #define PROTECTION_ALG_RSNA PROTECTION_ALG_CCMP | PROTECTION_ALG_TKIP
14749 guint8 algorithm=G_MAXUINT8;
14750 /* Davide Schiera (2006-11-27): added macros to check the algorithm */
14751 /* used could be TKIP or CCMP */
14752 #define IS_TKIP(tvb, hdr_len) (tvb_get_guint8(tvb, hdr_len + 1) == \
14753 ((tvb_get_guint8(tvb, hdr_len) | 0x20) & 0x7f))
14754 #define IS_CCMP(tvb, hdr_len) (tvb_get_guint8(tvb, hdr_len + 2) == 0)
14755 /* Davide Schiera ----------------------------------------------------- */
14757 /* Davide Schiera (2006-11-21): recorded original lengths to pass them */
14758 /* to the packets process function */
14759 guint32 sec_header=0;
14760 guint32 sec_trailer=0;
14762 next_tvb = try_decrypt(tvb, hdr_len, reported_len, &algorithm, &sec_header, &sec_trailer);
14763 /* Davide Schiera ----------------------------------------------------- */
14765 keybyte = tvb_get_guint8(tvb, hdr_len + 3);
14766 key = KEY_OCTET_WEP_KEY(keybyte);
14767 if ((keybyte & KEY_EXTIV) && (len >= EXTIV_LEN)) {
14768 /* Extended IV; this frame is likely encrypted with TKIP or CCMP */
14769 if (tree) {
14770 proto_item *extiv_fields;
14772 /* Davide Schiera (2006-11-27): differentiated CCMP and TKIP if */
14773 /* it's possible */
14774 if (algorithm==PROTECTION_ALG_TKIP)
14775 extiv_fields = proto_tree_add_text(hdr_tree, tvb, hdr_len, 8,
14776 "TKIP parameters");
14777 else if (algorithm==PROTECTION_ALG_CCMP)
14778 extiv_fields = proto_tree_add_text(hdr_tree, tvb, hdr_len, 8,
14779 "CCMP parameters");
14780 else {
14781 /* Davide Schiera -------------------------------------------- */
14782 /* Davide Schiera (2006-11-27): differentiated CCMP and TKIP if*/
14783 /* it's possible */
14784 if (IS_TKIP(tvb, hdr_len)) {
14785 algorithm=PROTECTION_ALG_TKIP;
14786 extiv_fields = proto_tree_add_text(hdr_tree, tvb, hdr_len, 8,
14787 "TKIP parameters");
14788 } else if (IS_CCMP(tvb, hdr_len)) {
14789 algorithm=PROTECTION_ALG_CCMP;
14790 extiv_fields = proto_tree_add_text(hdr_tree, tvb, hdr_len, 8,
14791 "CCMP parameters");
14792 } else
14793 extiv_fields = proto_tree_add_text(hdr_tree, tvb, hdr_len, 8,
14794 "TKIP/CCMP parameters");
14796 proto_item_set_len (ti, hdr_len + 8);
14798 wep_tree = proto_item_add_subtree (extiv_fields, ett_wep_parameters);
14800 if (algorithm==PROTECTION_ALG_TKIP) {
14801 g_snprintf(out_buff, SHORT_STR, "0x%08X%02X%02X",
14802 tvb_get_letohl(tvb, hdr_len + 4),
14803 tvb_get_guint8(tvb, hdr_len),
14804 tvb_get_guint8(tvb, hdr_len + 2));
14805 proto_tree_add_string(wep_tree, hf_ieee80211_tkip_extiv, tvb, hdr_len,
14806 EXTIV_LEN, out_buff);
14807 } else if (algorithm==PROTECTION_ALG_CCMP) {
14808 g_snprintf(out_buff, SHORT_STR, "0x%08X%02X%02X",
14809 tvb_get_letohl(tvb, hdr_len + 4),
14810 tvb_get_guint8(tvb, hdr_len + 1),
14811 tvb_get_guint8(tvb, hdr_len));
14812 proto_tree_add_string(wep_tree, hf_ieee80211_ccmp_extiv, tvb, hdr_len,
14813 EXTIV_LEN, out_buff);
14816 proto_tree_add_uint(wep_tree, hf_ieee80211_wep_key, tvb, hdr_len + 3, 1, key);
14819 /* Subtract out the length of the IV. */
14820 len -= EXTIV_LEN;
14821 reported_len -= EXTIV_LEN;
14822 ivlen = EXTIV_LEN;
14823 /* It is unknown whether this is TKIP or CCMP, so let's not even try to
14824 * parse TKIP Michael MIC+ICV or CCMP MIC. */
14826 /* Davide Schiera (2006-11-21): enable TKIP and CCMP decryption */
14827 /* checking for the trailer */
14828 if (next_tvb!=NULL) {
14829 if (reported_len < (gint) sec_trailer) {
14830 /* There is no space for a trailer, ignore it and don't decrypt */
14832 } else if (len < reported_len) {
14833 /* There is space for a trailer, but we haven't capture all the */
14834 /* packet. Slice off the trailer, but don't try to decrypt */
14835 reported_len -= sec_trailer;
14836 if (len > reported_len)
14837 len = reported_len;
14838 } else {
14839 /* Ok, we have a trailer and the whole packet. Decrypt it! */
14840 /* TODO: At the moment we won't add the trailer to the tree, */
14841 /* so don't remove the trailer from the packet */
14842 len -= sec_trailer;
14843 reported_len -= sec_trailer;
14844 can_decrypt = TRUE;
14847 /* Davide Schiera -------------------------------------------------- */
14848 } else {
14849 /* No Ext. IV - WEP packet */
14851 * XXX - pass the IV and key to "try_decrypt_wep()", and have it pass
14852 * them to "wep_decrypt()", rather than having "wep_decrypt()" extract
14853 * them itself.
14855 * Also, just pass the data *following* the WEP parameters as the
14856 * buffer to decrypt.
14858 iv = tvb_get_ntoh24(tvb, hdr_len);
14859 if (tree) {
14860 proto_item *wep_fields;
14862 wep_fields = proto_tree_add_text(hdr_tree, tvb, hdr_len, 4,
14863 "WEP parameters");
14865 wep_tree = proto_item_add_subtree (wep_fields, ett_wep_parameters);
14866 proto_tree_add_uint (wep_tree, hf_ieee80211_wep_iv, tvb, hdr_len, 3, iv);
14867 tvb_memcpy(tvb, iv_buff, hdr_len, 3);
14868 is_iv_bad = weak_iv(iv_buff);
14869 if (is_iv_bad != -1) {
14870 proto_tree_add_boolean_format (wep_tree, hf_ieee80211_wep_iv_weak,
14871 tvb, 0, 0, TRUE,
14872 "Weak IV for key byte %d",
14873 is_iv_bad);
14876 if (tree)
14877 proto_tree_add_uint (wep_tree, hf_ieee80211_wep_key, tvb, hdr_len + 3, 1, key);
14879 /* Subtract out the length of the IV. */
14880 len -= 4;
14881 reported_len -= 4;
14882 ivlen = 4;
14884 /* Davide Schiera (2006-11-27): Even if the decryption was not */
14885 /* successful, set the algorithm */
14886 algorithm=PROTECTION_ALG_WEP;
14889 * Well, this packet should, in theory, have an ICV.
14890 * Do we have the entire packet, and does it have enough data for
14891 * the ICV?
14893 if (reported_len < 4) {
14895 * The packet is claimed not to even have enough data for a
14896 * 4-byte ICV.
14897 * Pretend it doesn't have an ICV.
14900 } else if (len < reported_len) {
14902 * The packet is claimed to have enough data for a 4-byte ICV,
14903 * but we didn't capture all of the packet.
14904 * Slice off the 4-byte ICV from the reported length, and trim
14905 * the captured length so it's no more than the reported length;
14906 * that will slice off what of the ICV, if any, is in the
14907 * captured length.
14909 reported_len -= 4;
14910 if (len > reported_len)
14911 len = reported_len;
14912 } else {
14914 * We have the entire packet, and it includes a 4-byte ICV.
14915 * Slice it off, and put it into the tree.
14917 * We only support decrypting if we have the the ICV.
14919 * XXX - the ICV is encrypted; we're putting the encrypted
14920 * value, not the decrypted value, into the tree.
14922 len -= 4;
14923 reported_len -= 4;
14924 can_decrypt = TRUE;
14928 if (algorithm == PROTECTION_ALG_WEP) {
14929 g_strlcpy (wlan_stats.protection, "WEP", MAX_PROTECT_LEN);
14930 } else if (algorithm == PROTECTION_ALG_TKIP) {
14931 g_strlcpy (wlan_stats.protection, "TKIP", MAX_PROTECT_LEN);
14932 } else if (algorithm == PROTECTION_ALG_CCMP) {
14933 g_strlcpy (wlan_stats.protection, "CCMP", MAX_PROTECT_LEN);
14934 } else {
14935 g_strlcpy (wlan_stats.protection, "Unknown", MAX_PROTECT_LEN);
14938 /* Davide Schiera (2006-11-26): decrypted before parsing header and */
14939 /* protection header */
14940 if (!can_decrypt || (next_tvb == NULL)) {
14942 * WEP decode impossible or failed, treat payload as raw data
14943 * and don't attempt fragment reassembly or further dissection.
14945 next_tvb = tvb_new_subset(tvb, hdr_len + ivlen, len, reported_len);
14947 if (tree) {
14948 /* Davide Schiera (2006-11-21): added WEP or WPA separation */
14949 if (algorithm == PROTECTION_ALG_WEP) {
14950 if (can_decrypt)
14951 proto_tree_add_uint_format_value(wep_tree, hf_ieee80211_wep_icv, tvb,
14952 hdr_len + ivlen + len, 4,
14953 tvb_get_ntohl(tvb, hdr_len + ivlen + len),
14954 "0x%08x (not verified)",
14955 tvb_get_ntohl(tvb, hdr_len + ivlen + len));
14956 } else if (algorithm == PROTECTION_ALG_CCMP) {
14957 } else if (algorithm == PROTECTION_ALG_TKIP) {
14960 /* Davide Schiera (2006-11-21) ---------------------------------- */
14962 if ((pinfo->ethertype != ETHERTYPE_CENTRINO_PROMISC) && (wlan_ignore_wep == WLAN_IGNORE_WEP_NO)) {
14963 /* Some wireless drivers (such as Centrino) WEP payload already decrypted */
14964 call_dissector(data_handle, next_tvb, pinfo, tree);
14965 goto end_of_wlan;
14967 } else {
14968 /* Davide Schiera (2006-11-21): added WEP or WPA separation */
14969 if (algorithm == PROTECTION_ALG_WEP) {
14970 if (tree)
14971 proto_tree_add_uint_format_value(wep_tree, hf_ieee80211_wep_icv, tvb,
14972 hdr_len + ivlen + len, 4,
14973 tvb_get_ntohl(tvb, hdr_len + ivlen + len),
14974 "0x%08x (correct)",
14975 tvb_get_ntohl(tvb, hdr_len + ivlen + len));
14977 add_new_data_source(pinfo, next_tvb, "Decrypted WEP data");
14978 } else if (algorithm==PROTECTION_ALG_CCMP) {
14979 add_new_data_source(pinfo, next_tvb, "Decrypted CCMP data");
14980 } else if (algorithm==PROTECTION_ALG_TKIP) {
14981 add_new_data_source(pinfo, next_tvb, "Decrypted TKIP data");
14983 /* Davide Schiera (2006-11-21) ------------------------------------- */
14984 /* Davide Schiera (2006-11-27): undefine macros and definitions */
14985 #undef IS_TKIP
14986 #undef IS_CCMP
14987 #undef PROTECTION_ALG_CCMP
14988 #undef PROTECTION_ALG_TKIP
14989 #undef PROTECTION_ALG_WEP
14990 /* Davide Schiera -------------------------------------------------- */
14994 * WEP decryption successful!
14996 * Use the tvbuff we got back from the decryption; the data starts at
14997 * the beginning. The lengths are already correct for the decoded WEP
14998 * payload.
15000 hdr_len = 0;
15002 } else {
15004 * Not a WEP-encrypted frame; just use the data from the tvbuff
15005 * handed to us.
15007 * The payload starts at "hdr_len" (i.e., just past the 802.11
15008 * MAC header), the length of data in the tvbuff following the
15009 * 802.11 header is "len", and the length of data in the packet
15010 * following the 802.11 header is "reported_len".
15012 next_tvb = tvb;
15016 * Do defragmentation if "wlan_defragment" is true, and we have more
15017 * fragments or this isn't the first fragment.
15019 * We have to do some special handling to catch frames that
15020 * have the "More Fragments" indicator not set but that
15021 * don't show up as reassembled and don't have any other
15022 * fragments present. Some networking interfaces appear
15023 * to do reassembly even when you're capturing raw packets
15024 * *and* show the reassembled packet without the "More
15025 * Fragments" indicator set *but* with a non-zero fragment
15026 * number.
15028 * "fragment_add_seq_802_11()" handles that; we want to call it
15029 * even if we have a short frame, so that it does those checks - if
15030 * the frame is short, it doesn't do reassembly on it.
15032 * (This could get some false positives if we really *did* only
15033 * capture the last fragment of a fragmented packet, but that's
15034 * life.)
15036 save_fragmented = pinfo->fragmented;
15037 if (wlan_defragment && (more_frags || (frag_number != 0))) {
15038 fragment_head *fd_head;
15041 * If we've already seen this frame, look it up in the
15042 * table of reassembled packets, otherwise add it to
15043 * whatever reassembly is in progress, if any, and see
15044 * if it's done.
15046 if (reported_len < 0)
15047 THROW(ReportedBoundsError);
15048 fd_head = fragment_add_seq_802_11(&wlan_reassembly_table,
15049 next_tvb, hdr_len, pinfo, seq_number, NULL,
15050 frag_number,
15051 reported_len,
15052 more_frags);
15053 next_tvb = process_reassembled_data(tvb, hdr_len, pinfo,
15054 "Reassembled 802.11", fd_head,
15055 &frag_items, NULL, hdr_tree);
15056 } else {
15058 * If this is the first fragment, dissect its contents, otherwise
15059 * just show it as a fragment.
15061 if (frag_number != 0) {
15062 /* Not the first fragment - don't dissect it. */
15063 next_tvb = NULL;
15064 } else {
15065 /* First fragment, or not fragmented. Dissect what we have here. */
15067 /* Get a tvbuff for the payload. */
15068 next_tvb = tvb_new_subset (next_tvb, hdr_len, len, reported_len);
15071 * If this is the first fragment, but not the only fragment,
15072 * tell the next protocol that.
15074 if (more_frags)
15075 pinfo->fragmented = TRUE;
15076 else
15077 pinfo->fragmented = FALSE;
15081 if (next_tvb == NULL) {
15082 /* Just show this as an incomplete fragment. */
15083 col_set_str(pinfo->cinfo, COL_INFO, "Fragmented IEEE 802.11 frame");
15084 next_tvb = tvb_new_subset (tvb, hdr_len, len, reported_len);
15085 call_dissector(data_handle, next_tvb, pinfo, tree);
15086 pinfo->fragmented = save_fragmented;
15087 goto end_of_wlan;
15090 switch (FCF_FRAME_TYPE (fcf))
15093 case MGT_FRAME:
15094 dissect_ieee80211_mgt (fcf, next_tvb, pinfo, tree);
15095 break;
15097 case DATA_FRAME:
15098 if (is_amsdu && (tvb_reported_length_remaining(next_tvb, 0) > 4)) {
15099 proto_item *parent_item;
15100 proto_tree *mpdu_tree;
15101 guint32 msdu_offset = 0;
15102 guint i = 1;
15104 parent_item = proto_tree_add_protocol_format(tree, proto_aggregate, next_tvb, 0,
15105 tvb_reported_length_remaining(next_tvb, 0), "IEEE 802.11 Aggregate MSDU");
15106 mpdu_tree = proto_item_add_subtree(parent_item, ett_msdu_aggregation_parent_tree);
15108 do {
15109 tvbuff_t *volatile msdu_tvb;
15110 guint16 msdu_length;
15111 proto_tree *subframe_tree;
15113 msdu_length = tvb_get_ntohs (next_tvb, msdu_offset+12);
15115 parent_item = proto_tree_add_item(mpdu_tree, hf_ieee80211_amsdu_subframe, next_tvb,
15116 msdu_offset, roundup2(msdu_offset+14+msdu_length, 4), ENC_NA);
15117 proto_item_append_text(parent_item, " #%u", i);
15118 subframe_tree = proto_item_add_subtree(parent_item, ett_msdu_aggregation_subframe_tree);
15119 i += 1;
15121 proto_tree_add_item(subframe_tree, hf_ieee80211_addr_da, next_tvb, msdu_offset, 6, ENC_NA);
15122 hidden_item = proto_tree_add_string (hdr_tree, hf_ieee80211_addr_da_resolved, tvb, msdu_offset, 6,
15123 get_ether_name(tvb_get_ptr(tvb, msdu_offset, 6)));
15124 PROTO_ITEM_SET_HIDDEN(hidden_item);
15125 proto_tree_add_item(subframe_tree, hf_ieee80211_addr_sa, next_tvb, msdu_offset+6, 6, ENC_NA);
15126 hidden_item = proto_tree_add_string (hdr_tree, hf_ieee80211_addr_sa_resolved, tvb, msdu_offset+6, 6,
15127 get_ether_name(tvb_get_ptr(tvb, msdu_offset+6, 6)));
15128 PROTO_ITEM_SET_HIDDEN(hidden_item);
15129 proto_tree_add_item(subframe_tree, hf_ieee80211_amsdu_length, next_tvb, msdu_offset+12, 2, ENC_BIG_ENDIAN);
15131 msdu_offset += 14;
15132 msdu_tvb = tvb_new_subset(next_tvb, msdu_offset, msdu_length, -1);
15133 call_dissector(llc_handle, msdu_tvb, pinfo, subframe_tree);
15134 msdu_offset = roundup2(msdu_offset+msdu_length, 4);
15135 } while (tvb_reported_length_remaining(next_tvb, msdu_offset) > 14);
15137 break;
15139 /* I guess some bridges take Netware Ethernet_802_3 frames,
15140 which are 802.3 frames (with a length field rather than
15141 a type field, but with no 802.2 header in the payload),
15142 and just stick the payload into an 802.11 frame. I've seen
15143 captures that show frames of that sort.
15145 We also handle some odd form of encapsulation in which a
15146 complete Ethernet frame is encapsulated within an 802.11
15147 data frame, with no 802.2 header. This has been seen
15148 from some hardware.
15150 On top of that, at least at some point it appeared that
15151 the OLPC XO sent out frames with two bytes of 0 between
15152 the "end" of the 802.11 header and the beginning of
15153 the payload.
15155 So, if the packet doesn't start with 0xaa 0xaa:
15157 we first use the same scheme that linux-wlan-ng does to detect
15158 those encapsulated Ethernet frames, namely looking to see whether
15159 the frame either starts with 6 octets that match the destination
15160 address from the 802.11 header or has 6 octets that match the
15161 source address from the 802.11 header following the first 6 octets,
15162 and, if so, treat it as an encapsulated Ethernet frame;
15164 otherwise, we use the same scheme that we use in the Ethernet
15165 dissector to recognize Netware 802.3 frames, namely checking
15166 whether the packet starts with 0xff 0xff and, if so, treat it
15167 as an encapsulated IPX frame, and then check whether the
15168 packet starts with 0x00 0x00 and, if so, treat it as an OLPC
15169 frame. */
15170 encap_type = ENCAP_802_2;
15171 if (tvb_bytes_exist(next_tvb, 0, 2)) {
15172 octet1 = tvb_get_guint8(next_tvb, 0);
15173 octet2 = tvb_get_guint8(next_tvb, 1);
15174 if ((octet1 != 0xaa) || (octet2 != 0xaa)) {
15175 if ((tvb_memeql(next_tvb, 6, (const guint8 *)pinfo->dl_src.data, 6) == 0) ||
15176 (tvb_memeql(next_tvb, 0, (const guint8 *)pinfo->dl_dst.data, 6) == 0))
15177 encap_type = ENCAP_ETHERNET;
15178 else if ((octet1 == 0xff) && (octet2 == 0xff))
15179 encap_type = ENCAP_IPX;
15180 else if ((octet1 == 0x00) && (octet2 == 0x00)) {
15181 proto_tree_add_text(tree, next_tvb, 0, 2, "Mysterious OLPC stuff");
15182 next_tvb = tvb_new_subset_remaining (next_tvb, 2);
15187 switch (encap_type) {
15189 case ENCAP_802_2:
15190 call_dissector(llc_handle, next_tvb, pinfo, tree);
15191 break;
15193 case ENCAP_ETHERNET:
15194 call_dissector(eth_withoutfcs_handle, next_tvb, pinfo, tree);
15195 break;
15197 case ENCAP_IPX:
15198 call_dissector(ipx_handle, next_tvb, pinfo, tree);
15199 break;
15201 break;
15203 pinfo->fragmented = save_fragmented;
15205 end_of_wlan:
15206 whdr->stats = wlan_stats;
15207 tap_queue_packet(wlan_tap, pinfo, whdr);
15208 memset (&wlan_stats, 0, sizeof wlan_stats);
15212 * Dissect 802.11 with a variable-length link-layer header.
15214 static void
15215 dissect_ieee80211 (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
15217 dissect_ieee80211_common (tvb, pinfo, tree, FALSE,
15218 pinfo->pseudo_header->ieee_802_11.fcs_len, FALSE, FALSE, FALSE);
15222 * Dissect 802.11 with a variable-length link-layer header and data padding.
15224 static void
15225 dissect_ieee80211_datapad (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
15227 dissect_ieee80211_common (tvb, pinfo, tree, FALSE,
15228 pinfo->pseudo_header->ieee_802_11.fcs_len, FALSE, TRUE, FALSE);
15232 * Dissect 802.11 with a variable-length link-layer header and a byte-swapped
15233 * control field (some hardware sends out LWAPP-encapsulated 802.11
15234 * packets with the control field byte swapped).
15236 static void
15237 dissect_ieee80211_bsfc (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
15239 dissect_ieee80211_common (tvb, pinfo, tree, FALSE, 0, TRUE, FALSE, FALSE);
15243 * Dissect 802.11 with a fixed-length link-layer header (padded to the
15244 * maximum length).
15246 static void
15247 dissect_ieee80211_fixed (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
15249 dissect_ieee80211_common (tvb, pinfo, tree, TRUE, 0, FALSE, FALSE, FALSE);
15253 * Dissect an HT 802.11 frame with a variable-length link-layer header.
15254 * XXX - Can we tell if a frame is +HTC just by looking at the MAC header?
15255 * If so, we can dispense with this.
15257 static void
15258 dissect_ieee80211_ht (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
15260 dissect_ieee80211_common (tvb, pinfo, tree, FALSE,
15261 pinfo->pseudo_header->ieee_802_11.fcs_len, FALSE, FALSE, TRUE);
15264 static void
15265 wlan_defragment_init(void)
15267 reassembly_table_init(&wlan_reassembly_table,
15268 &addresses_reassembly_table_functions);
15271 /* ------------- */
15272 static guint
15273 retransmit_hash(gconstpointer k)
15275 const retransmit_key *key = (const retransmit_key *)k;
15276 guint hash_val;
15277 int i;
15279 hash_val = 0;
15280 for (i = 0; i < 6; i++)
15281 hash_val += key->bssid[i];
15283 for (i = 0; i < 6; i++)
15284 hash_val += key->src[i];
15286 return hash_val;
15289 static gint
15290 retransmit_equal(gconstpointer k1, gconstpointer k2)
15292 const retransmit_key *key1 = (const retransmit_key *)k1;
15293 const retransmit_key *key2 = (const retransmit_key *)k2;
15295 return ((!memcmp(key1->bssid, key2->bssid, 6) && !memcmp(key1->src, key2->src, 6)) ? TRUE:FALSE);
15298 static guint
15299 frame_hash(gconstpointer k)
15301 guint32 frame = GPOINTER_TO_UINT(k);
15303 return frame;
15306 static gint
15307 frame_equal(gconstpointer k1, gconstpointer k2)
15309 guint32 frame1 = GPOINTER_TO_UINT(k1);
15310 guint32 frame2 = GPOINTER_TO_UINT(k2);
15312 return frame1==frame2;
15315 /* Davide Schiera (2006-11-26): this function will try to decrypt with WEP or */
15316 /* WPA and return a tvb to the caller to add a new tab. It returns the */
15317 /* algorithm used for decryption (WEP, TKIP, CCMP) and the header and */
15318 /* trailer lengths. */
15319 static tvbuff_t *
15320 try_decrypt(tvbuff_t *tvb, guint offset, guint len, guint8 *algorithm, guint32 *sec_header, guint32 *sec_trailer)
15322 const guint8 *enc_data;
15323 tvbuff_t *decr_tvb = NULL;
15324 guint32 dec_caplen;
15325 guchar dec_data[AIRPDCAP_MAX_CAPLEN];
15326 AIRPDCAP_KEY_ITEM used_key;
15328 if (!enable_decryption)
15329 return NULL;
15331 /* get the entire packet */
15332 enc_data = tvb_get_ptr(tvb, 0, len+offset);
15334 /* process packet with AirPDcap */
15335 if (AirPDcapPacketProcess(&airpdcap_ctx, enc_data, offset, offset+len, dec_data, &dec_caplen,
15336 &used_key, FALSE, TRUE)==AIRPDCAP_RET_SUCCESS)
15338 guint8 *tmp;
15339 *algorithm=used_key.KeyType;
15340 switch (*algorithm) {
15341 case AIRPDCAP_KEY_TYPE_WEP:
15342 *sec_header=AIRPDCAP_WEP_HEADER;
15343 *sec_trailer=AIRPDCAP_WEP_TRAILER;
15344 break;
15345 case AIRPDCAP_KEY_TYPE_CCMP:
15346 *sec_header=AIRPDCAP_RSNA_HEADER;
15347 *sec_trailer=AIRPDCAP_CCMP_TRAILER;
15348 break;
15349 case AIRPDCAP_KEY_TYPE_TKIP:
15350 *sec_header=AIRPDCAP_RSNA_HEADER;
15351 *sec_trailer=AIRPDCAP_TKIP_TRAILER;
15352 break;
15353 default:
15354 return NULL;
15357 /* allocate buffer for decrypted payload */
15358 tmp = (guint8 *)g_memdup(dec_data+offset, dec_caplen-offset);
15360 len = dec_caplen-offset;
15362 /* decrypt successful, let's set up a new data tvb. */
15363 decr_tvb = tvb_new_child_real_data(tvb, tmp, len, len);
15364 tvb_set_free_cb(decr_tvb, g_free);
15367 return decr_tvb;
15369 /* Davide Schiera ----------------------------------------------------------- */
15372 /* Collect our WEP and WPA keys */
15373 static void
15374 set_airpdcap_keys(void)
15376 PAIRPDCAP_KEYS_COLLECTION keys;
15377 GByteArray *bytes = NULL;
15378 guint i;
15380 keys = (PAIRPDCAP_KEYS_COLLECTION)se_alloc(sizeof(AIRPDCAP_KEYS_COLLECTION));
15381 keys->nKeys = 0;
15383 for (i = 0; (uat_wep_key_records != NULL) && (i < num_wepkeys_uat) && (i < MAX_ENCRYPTION_KEYS); i++)
15385 decryption_key_t *dk;
15386 dk = parse_key_string(uat_wep_key_records[i].string, uat_wep_key_records[i].key);
15388 if (dk != NULL)
15390 AIRPDCAP_KEY_ITEM key;
15391 if (dk->type == AIRPDCAP_KEY_TYPE_WEP)
15393 gboolean res;
15394 key.KeyType = AIRPDCAP_KEY_TYPE_WEP;
15396 bytes = g_byte_array_new();
15397 res = hex_str_to_bytes(dk->key->str, bytes, FALSE);
15399 if (dk->key->str && res && (bytes->len > 0) && (bytes->len <= AIRPDCAP_WEP_KEY_MAXLEN))
15402 * WEP key is correct (well, the can be even or odd, so it is not
15403 * a real check, I think... is a check performed somewhere in the
15404 * AirPDcap function???)
15406 memcpy(key.KeyData.Wep.WepKey, bytes->data, bytes->len);
15407 key.KeyData.Wep.WepKeyLen = bytes->len;
15408 keys->Keys[keys->nKeys] = key;
15409 keys->nKeys += 1;
15412 else if (dk->type == AIRPDCAP_KEY_TYPE_WPA_PWD)
15414 key.KeyType = AIRPDCAP_KEY_TYPE_WPA_PWD;
15416 /* XXX - This just lops the end if the key off if it's too long.
15417 * Should we handle this more gracefully? */
15418 g_strlcpy(key.UserPwd.Passphrase, dk->key->str, AIRPDCAP_WPA_PASSPHRASE_MAX_LEN+1);
15420 key.UserPwd.SsidLen = 0;
15421 if ((dk->ssid != NULL) && (dk->ssid->len <= AIRPDCAP_WPA_SSID_MAX_LEN))
15423 memcpy(key.UserPwd.Ssid, dk->ssid->data, dk->ssid->len);
15424 key.UserPwd.SsidLen = dk->ssid->len;
15427 keys->Keys[keys->nKeys] = key;
15428 keys->nKeys += 1;
15430 else if (dk->type == AIRPDCAP_KEY_TYPE_WPA_PSK)
15432 key.KeyType = AIRPDCAP_KEY_TYPE_WPA_PSK;
15434 bytes = g_byte_array_new();
15435 hex_str_to_bytes(dk->key->str, bytes, FALSE);
15437 /* XXX - Pass the correct array of bytes... */
15438 if (bytes->len <= AIRPDCAP_WPA_PSK_LEN) {
15439 memcpy(key.KeyData.Wpa.Psk, bytes->data, bytes->len);
15441 keys->Keys[keys->nKeys] = key;
15442 keys->nKeys += 1;
15448 /* Now set the keys */
15449 AirPDcapSetKeys(&airpdcap_ctx, keys->Keys, keys->nKeys);
15450 if (bytes)
15451 g_byte_array_free(bytes, TRUE);
15455 static void
15456 init_wepkeys(void)
15460 * XXX - AirPDcap - That God sends it to us beautiful (che dio ce la mandi bona)
15461 * The next lines will add a key to the AirPDcap context. The keystring will be added
15462 * to the old WEP array too, but we don't care, because the packets will come here
15463 * already decrypted... One of these days we will fix this too
15465 set_airpdcap_keys();
15469 * This code had been taken from AirSnort crack.c function classify()
15470 * Permission granted by snax <at> shmoo dot com
15471 * weak_iv - determine which key byte an iv is useful in resolving
15472 * parm - p, pointer to the first byte of an IV
15473 * return - n - this IV is weak for byte n of a WEP key
15474 * -1 - this IV is not weak for any key bytes
15476 * This function tests for IVs that are known to satisfy the criteria
15477 * for a weak IV as specified in FMS section 7.1
15480 static int
15481 weak_iv(guchar *iv)
15483 guchar sum, k;
15485 if ((iv[1] == 255) && (iv[0] > 2) && (iv[0] < 16)) {
15486 return iv[0] -3;
15489 sum = iv[0] + iv[1];
15490 if (sum == 1) {
15491 if (iv[2] <= 0x0a) {
15492 return iv[2] +2;
15494 else if (iv[2] == 0xff) {
15495 return 0;
15498 k = 0xfe - iv[2];
15499 if ((sum == k) && ((iv[2] >= 0xf2) && (iv[2] <= 0xfe) && (iv[2] != 0xfd))) {
15500 return k;
15502 return -1;
15505 static void
15506 wlan_retransmit_init(void)
15508 if (fc_analyse_retransmit_table) {
15509 g_hash_table_destroy(fc_analyse_retransmit_table);
15510 fc_analyse_retransmit_table = NULL;
15513 if (fc_first_frame_table) {
15514 g_hash_table_destroy(fc_first_frame_table);
15515 fc_first_frame_table = NULL;
15518 if (wlan_subdissector)
15519 return;
15521 fc_analyse_retransmit_table= g_hash_table_new(retransmit_hash, retransmit_equal);
15522 fc_first_frame_table = g_hash_table_new(frame_hash, frame_equal);
15526 static void
15527 dissect_data_encap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
15529 int offset = 0;
15530 guint8 type;
15531 int tagged_parameter_tree_len;
15532 proto_tree *tagged_tree;
15534 type = tvb_get_guint8(tvb, offset);
15535 proto_tree_add_item(tree, hf_ieee80211_data_encap_payload_type, tvb, offset,
15536 1, ENC_BIG_ENDIAN);
15537 offset += 1;
15538 switch (type) {
15539 case 1:
15540 col_set_str(pinfo->cinfo, COL_PROTOCOL, "RRB");
15541 /* TODO: IEEE 802.11r */
15542 break;
15543 case 2:
15544 col_set_str(pinfo->cinfo, COL_PROTOCOL, "TDLS");
15545 col_clear(pinfo->cinfo, COL_INFO);
15546 offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_ACTION);
15547 tagged_parameter_tree_len = tvb_reported_length_remaining(tvb, offset);
15548 if (tagged_parameter_tree_len > 0) {
15549 tagged_tree = get_tagged_parameter_tree(tree, tvb, offset,
15550 tagged_parameter_tree_len);
15551 ieee_80211_add_tagged_parameters(tvb, offset, pinfo, tagged_tree,
15552 tagged_parameter_tree_len, -1);
15554 break;
15558 void
15559 proto_register_ieee80211 (void)
15562 static hf_register_info hf[] = {
15563 {&hf_ieee80211_fc_field,
15564 {"Frame Control Field", "wlan.fc",
15565 FT_UINT16, BASE_HEX, NULL, 0,
15566 "MAC Frame control", HFILL }},
15568 {&hf_ieee80211_fc_proto_version,
15569 {"Version", "wlan.fc.version",
15570 FT_UINT8, BASE_DEC, NULL, 0x03,
15571 "MAC Protocol version", HFILL }}, /* 0 */
15573 {&hf_ieee80211_fc_frame_type,
15574 {"Type", "wlan.fc.type",
15575 FT_UINT8, BASE_DEC, VALS(frame_type), 0x0C,
15576 "Frame type", HFILL }},
15578 {&hf_ieee80211_fc_frame_subtype,
15579 {"Subtype", "wlan.fc.subtype",
15580 FT_UINT8, BASE_DEC, NULL, 0xF0,
15581 "Frame subtype", HFILL }}, /* 2 */
15583 {&hf_ieee80211_fc_frame_type_subtype,
15584 {"Type/Subtype", "wlan.fc.type_subtype",
15585 FT_UINT8, BASE_HEX|BASE_EXT_STRING, &frame_type_subtype_vals_ext, 0x0,
15586 "Type and subtype combined (first byte: type, second byte: subtype)", HFILL }},
15588 {&hf_ieee80211_fc_flags,
15589 {"Flags", "wlan.flags",
15590 FT_UINT8, BASE_HEX, NULL, 0,
15591 NULL, HFILL }},
15593 {&hf_ieee80211_fc_data_ds,
15594 {"DS status", "wlan.fc.ds",
15595 FT_UINT8, BASE_HEX, VALS(tofrom_ds), (FLAG_FROM_DS|FLAG_TO_DS),
15596 "Data-frame DS-traversal status", HFILL }}, /* 3 */
15598 {&hf_ieee80211_fc_to_ds,
15599 {"To DS", "wlan.fc.tods",
15600 FT_BOOLEAN, 8, TFS (&tods_flag), FLAG_TO_DS,
15601 "To DS flag", HFILL }}, /* 4 */
15603 {&hf_ieee80211_fc_from_ds,
15604 {"From DS", "wlan.fc.fromds",
15605 FT_BOOLEAN, 8, TFS (&fromds_flag), FLAG_FROM_DS,
15606 "From DS flag", HFILL }}, /* 5 */
15608 {&hf_ieee80211_fc_more_frag,
15609 {"More Fragments", "wlan.fc.frag",
15610 FT_BOOLEAN, 8, TFS (&more_fragments), FLAG_MORE_FRAGMENTS,
15611 "More Fragments flag", HFILL }}, /* 6 */
15613 {&hf_ieee80211_fc_retry,
15614 {"Retry", "wlan.fc.retry",
15615 FT_BOOLEAN, 8, TFS (&retry_flags), FLAG_RETRY,
15616 "Retransmission flag", HFILL }},
15618 { &hf_ieee80211_fc_analysis_retransmission,
15619 {"Retransmission", "wlan.analysis.retransmission",
15620 FT_NONE, BASE_NONE, NULL, 0x0,
15621 "This frame is a suspected wireless retransmission", HFILL }},
15623 { &hf_ieee80211_fc_analysis_retransmission_frame,
15624 {"Retransmission of frame", "wlan.analysis.retransmission_frame",
15625 FT_FRAMENUM, BASE_NONE, NULL, 0x0,
15626 "This is a retransmission of frame #", HFILL }},
15628 {&hf_ieee80211_fc_pwr_mgt,
15629 {"PWR MGT", "wlan.fc.pwrmgt",
15630 FT_BOOLEAN, 8, TFS (&pm_flags), FLAG_POWER_MGT,
15631 "Power management status", HFILL }},
15633 {&hf_ieee80211_fc_more_data,
15634 {"More Data", "wlan.fc.moredata",
15635 FT_BOOLEAN, 8, TFS (&md_flags), FLAG_MORE_DATA,
15636 "More data flag", HFILL }},
15638 {&hf_ieee80211_fc_protected,
15639 {"Protected flag", "wlan.fc.protected",
15640 FT_BOOLEAN, 8, TFS (&protected_flags), FLAG_PROTECTED,
15641 NULL, HFILL }},
15643 {&hf_ieee80211_fc_order,
15644 {"Order flag", "wlan.fc.order",
15645 FT_BOOLEAN, 8, TFS (&order_flags), FLAG_ORDER,
15646 "Strictly ordered flag", HFILL }},
15648 {&hf_ieee80211_assoc_id,
15649 {"Association ID","wlan.aid"
15650 ,FT_UINT16, BASE_DEC, NULL, 0x3FFF,
15651 "Association-ID field", HFILL }},
15653 {&hf_ieee80211_did_duration,
15654 {"Duration", "wlan.duration",
15655 FT_UINT16, BASE_DEC, NULL, 0x7FFF,
15656 "Duration field", HFILL }},
15658 {&hf_ieee80211_addr_da,
15659 {"Destination address", "wlan.da",
15660 FT_ETHER, BASE_NONE, NULL, 0,
15661 "Destination Hardware Address", HFILL }},
15663 { &hf_ieee80211_addr_da_resolved,
15664 {"Destination address (resolved)", "wlan.da_resolved", FT_STRING,
15665 BASE_NONE, NULL, 0x0, "Destination Hardware Address (resolved)",
15666 HFILL }},
15668 {&hf_ieee80211_addr_sa,
15669 {"Source address", "wlan.sa",
15670 FT_ETHER, BASE_NONE, NULL, 0,
15671 "Source Hardware Address", HFILL }},
15673 { &hf_ieee80211_addr_sa_resolved,
15674 {"Source address (resolved)", "wlan.sa_resolved", FT_STRING, BASE_NONE,
15675 NULL, 0x0, "Source Hardware Address (resolved)", HFILL }},
15677 { &hf_ieee80211_addr,
15678 {"Hardware address", "wlan.addr",
15679 FT_ETHER, BASE_NONE, NULL, 0,
15680 "SA, DA, BSSID, RA or TA Hardware Address", HFILL }},
15682 { &hf_ieee80211_addr_resolved,
15683 { "Hardware address (resolved)", "wlan.addr_resolved", FT_STRING,
15684 BASE_NONE, NULL, 0x0,
15685 "SA, DA, BSSID, RA or TA Hardware Address (resolved)", HFILL }},
15687 {&hf_ieee80211_addr_ra,
15688 {"Receiver address", "wlan.ra",
15689 FT_ETHER, BASE_NONE, NULL, 0,
15690 "Receiving Station Hardware Address", HFILL }},
15692 { &hf_ieee80211_addr_ra_resolved,
15693 {"Receiver address (resolved)", "wlan.ra_resolved", FT_STRING, BASE_NONE,
15694 NULL, 0x0, "Receiving Station Hardware Address (resolved)", HFILL }},
15696 {&hf_ieee80211_addr_ta,
15697 {"Transmitter address", "wlan.ta",
15698 FT_ETHER, BASE_NONE, NULL, 0,
15699 "Transmitting Station Hardware Address", HFILL }},
15701 { &hf_ieee80211_addr_ta_resolved,
15702 {"Transmitter address (resolved)", "wlan.ta_resolved", FT_STRING,
15703 BASE_NONE, NULL, 0x0,
15704 "Transmitting Station Hardware Address (resolved)", HFILL }},
15706 {&hf_ieee80211_addr_bssid,
15707 {"BSS Id", "wlan.bssid",
15708 FT_ETHER, BASE_NONE, NULL, 0,
15709 "Basic Service Set ID", HFILL }},
15711 { &hf_ieee80211_addr_bssid_resolved,
15712 {"BSS Id (resolved)", "wlan.bssid_resolved", FT_STRING, BASE_NONE, NULL,
15713 0x0, "Basic Service Set ID (resolved)", HFILL }},
15715 {&hf_ieee80211_frag_number,
15716 {"Fragment number", "wlan.frag",
15717 FT_UINT16, BASE_DEC, NULL, 0,
15718 NULL, HFILL }},
15720 {&hf_ieee80211_seq_number,
15721 {"Sequence number", "wlan.seq",
15722 FT_UINT16, BASE_DEC, NULL, 0,
15723 NULL, HFILL }},
15725 {&hf_ieee80211_mesh_control_field,
15726 {"Mesh Control Field", "wlan.mesh.control_field",
15727 FT_NONE, BASE_NONE, NULL, 0,
15728 NULL, HFILL }},
15730 {&hf_ieee80211_qos,
15731 {"Qos Control", "wlan.qos",
15732 FT_UINT16, BASE_HEX, NULL, 0,
15733 NULL, HFILL }},
15735 {&hf_ieee80211_qos_tid,
15736 {"TID", "wlan.qos.tid",
15737 FT_UINT16, BASE_DEC, NULL, 0x000F,
15738 NULL, HFILL }},
15740 {&hf_ieee80211_qos_priority,
15741 {"Priority", "wlan.qos.priority",
15742 FT_UINT16, BASE_DEC, VALS(ieee80211_qos_tags_acs), 0x0007,
15743 "802.1D Tag", HFILL }},
15745 {&hf_ieee80211_qos_eosp,
15746 {"EOSP", "wlan.qos.eosp",
15747 FT_BOOLEAN, 16, TFS (&eosp_flag), QOS_FLAG_EOSP,
15748 "EOSP Field", HFILL }},
15750 {&hf_ieee80211_qos_bit4,
15751 {"QoS bit 4", "wlan.qos.bit4",
15752 FT_BOOLEAN, 16, TFS (&bit4_flag), QOS_FLAG_EOSP,
15753 NULL, HFILL }},
15755 {&hf_ieee80211_qos_ack_policy,
15756 {"Ack Policy", "wlan.qos.ack",
15757 FT_UINT16, BASE_HEX, VALS(ack_policy), 0x0060,
15758 NULL, HFILL }},
15760 {&hf_ieee80211_qos_amsdu_present,
15761 {"Payload Type", "wlan.qos.amsdupresent",
15762 FT_BOOLEAN, 16,
15763 TFS(&ieee80211_qos_amsdu_present_flag), 0x0080, NULL, HFILL }},
15765 {&hf_ieee80211_qos_txop_limit,
15766 {"TXOP Limit", "wlan.qos.txop_limit",
15767 FT_UINT16, BASE_DEC, NULL, 0xFF00,
15768 NULL, HFILL }},
15770 {&hf_ieee80211_qos_ps_buf_state,
15771 {"QAP PS Buffer State", "wlan.qos.ps_buf_state",
15772 FT_UINT16, BASE_HEX, NULL, 0xFF00,
15773 NULL, HFILL }},
15775 {&hf_ieee80211_qos_buf_state_indicated,
15776 {"Buffer State Indicated", "wlan.qos.buf_state_indicated",
15777 FT_BOOLEAN, 16, TFS(&tfs_yes_no), 0x0200,
15778 NULL, HFILL }},
15780 {&hf_ieee80211_qos_highest_pri_buf_ac,
15781 {"Highest-Priority Buffered AC", "wlan.qos.highest_pri_buf_ac",
15782 FT_UINT16, BASE_DEC, VALS(wme_acs), 0x0C00,
15783 NULL, HFILL }},
15785 {&hf_ieee80211_qos_qap_buf_load,
15786 {"QAP Buffered Load", "wlan.qos.qap_buf_load",
15787 FT_UINT16, BASE_DEC, NULL, 0xF000,
15788 NULL, HFILL }},
15790 {&hf_ieee80211_qos_txop_dur_req,
15791 {"TXOP Duration Requested", "wlan.qos.txop_dur_req",
15792 FT_UINT16, BASE_DEC, NULL, 0xFF00,
15793 NULL, HFILL }},
15795 {&hf_ieee80211_qos_queue_size,
15796 {"Queue Size", "wlan.qos.queue_size",
15797 FT_UINT16, BASE_DEC, NULL, 0xFF00,
15798 NULL, HFILL }},
15800 {&hf_ieee80211_fcs,
15801 {"Frame check sequence", "wlan.fcs",
15802 FT_UINT32, BASE_HEX, NULL, 0,
15803 "Frame Check Sequence (FCS)", HFILL }},
15805 {&hf_ieee80211_fcs_good,
15806 {"Good", "wlan.fcs_good",
15807 FT_BOOLEAN, BASE_NONE, NULL, 0x0,
15808 "True if the FCS is correct", HFILL }},
15810 {&hf_ieee80211_fcs_bad,
15811 {"Bad", "wlan.fcs_bad",
15812 FT_BOOLEAN, BASE_NONE, NULL, 0x0,
15813 "True if the FCS is incorrect", HFILL }},
15815 {&hf_ieee80211_fragment_overlap,
15816 {"Fragment overlap", "wlan.fragment.overlap",
15817 FT_BOOLEAN, BASE_NONE,
15818 NULL, 0x0,
15819 "Fragment overlaps with other fragments", HFILL }},
15821 {&hf_ieee80211_fragment_overlap_conflict,
15822 {"Conflicting data in fragment overlap", "wlan.fragment.overlap.conflict",
15823 FT_BOOLEAN, BASE_NONE, NULL, 0x0,
15824 "Overlapping fragments contained conflicting data", HFILL }},
15826 {&hf_ieee80211_fragment_multiple_tails,
15827 {"Multiple tail fragments found", "wlan.fragment.multipletails",
15828 FT_BOOLEAN, BASE_NONE, NULL, 0x0,
15829 "Several tails were found when defragmenting the packet", HFILL }},
15831 {&hf_ieee80211_fragment_too_long_fragment,
15832 {"Fragment too long", "wlan.fragment.toolongfragment",
15833 FT_BOOLEAN, BASE_NONE, NULL, 0x0,
15834 "Fragment contained data past end of packet", HFILL }},
15836 {&hf_ieee80211_fragment_error,
15837 {"Defragmentation error", "wlan.fragment.error",
15838 FT_FRAMENUM, BASE_NONE, NULL, 0x0,
15839 "Defragmentation error due to illegal fragments", HFILL }},
15841 {&hf_ieee80211_fragment_count,
15842 {"Fragment count", "wlan.fragment.count",
15843 FT_UINT32, BASE_DEC, NULL, 0x0,
15844 NULL, HFILL }},
15846 {&hf_ieee80211_fragment,
15847 {"802.11 Fragment", "wlan.fragment",
15848 FT_FRAMENUM, BASE_NONE, NULL, 0x0,
15849 NULL, HFILL }},
15851 {&hf_ieee80211_fragments,
15852 {"802.11 Fragments", "wlan.fragments",
15853 FT_NONE, BASE_NONE, NULL, 0x0,
15854 NULL, HFILL }},
15856 {&hf_ieee80211_reassembled_in,
15857 {"Reassembled 802.11 in frame", "wlan.reassembled_in",
15858 FT_FRAMENUM, BASE_NONE, NULL, 0x0,
15859 "This 802.11 packet is reassembled in this frame", HFILL }},
15861 {&hf_ieee80211_reassembled_length,
15862 {"Reassembled 802.11 length", "wlan.reassembled.length",
15863 FT_UINT32, BASE_DEC, NULL, 0x0,
15864 "The total length of the reassembled payload", HFILL }},
15866 {&hf_ieee80211_wep_iv,
15867 {"Initialization Vector", "wlan.wep.iv",
15868 FT_UINT24, BASE_HEX, NULL, 0,
15869 NULL, HFILL }},
15871 {&hf_ieee80211_wep_iv_weak,
15872 {"Weak IV", "wlan.wep.weakiv",
15873 FT_BOOLEAN, BASE_NONE, NULL,0x0,
15874 NULL,HFILL}},
15876 {&hf_ieee80211_tkip_extiv,
15877 {"TKIP Ext. Initialization Vector", "wlan.tkip.extiv",
15878 FT_STRING, BASE_NONE, NULL, 0,
15879 "TKIP Extended Initialization Vector", HFILL }},
15881 {&hf_ieee80211_ccmp_extiv,
15882 {"CCMP Ext. Initialization Vector", "wlan.ccmp.extiv",
15883 FT_STRING, BASE_NONE, NULL, 0,
15884 "CCMP Extended Initialization Vector", HFILL }},
15886 {&hf_ieee80211_wep_key,
15887 {"Key Index", "wlan.wep.key",
15888 FT_UINT8, BASE_DEC, NULL, 0,
15889 NULL, HFILL }},
15891 {&hf_ieee80211_wep_icv,
15892 {"WEP ICV", "wlan.wep.icv",
15893 FT_UINT32, BASE_HEX, NULL, 0,
15894 NULL, HFILL }},
15896 {&hf_ieee80211_block_ack_request_control,
15897 {"Block Ack Request (BAR) Control", "wlan.bar.control",
15898 FT_UINT16, BASE_HEX, NULL, 0,
15899 NULL, HFILL }},
15901 {&hf_ieee80211_block_ack_control,
15902 {"Block Ack Request Control", "wlan.ba.control",
15903 FT_UINT16, BASE_HEX, NULL, 0,
15904 NULL, HFILL }},
15906 {&hf_ieee80211_block_ack_control_ack_policy,
15907 {"BAR Ack Policy", "wlan.ba.control.ackpolicy",
15908 FT_BOOLEAN, 16, TFS (&ieee80211_block_ack_control_ack_policy_flag), 0x01,
15909 "Block Ack Request (BAR) Ack Policy", HFILL }},
15911 {&hf_ieee80211_block_ack_control_multi_tid,
15912 {"Multi-TID", "wlan.ba.control.multitid",
15913 FT_BOOLEAN, 16, 0, 0x02,
15914 "Multi-Traffic Identifier (TID)", HFILL }},
15916 {&hf_ieee80211_block_ack_control_compressed_bitmap,
15917 {"Compressed Bitmap", "wlan.ba.control.cbitmap",
15918 FT_BOOLEAN, 16, 0, 0x04,
15919 NULL, HFILL }},
15921 {&hf_ieee80211_block_ack_control_reserved,
15922 {"Reserved", "wlan.ba.control.cbitmap",
15923 FT_UINT16, BASE_HEX, NULL, 0x0ff8,
15924 NULL, HFILL }},
15926 {&hf_ieee80211_block_ack_control_basic_tid_info,
15927 {"TID for which a Basic BlockAck frame is requested", "wlan.ba.basic.tidinfo",
15928 FT_UINT16, BASE_HEX, NULL, 0xf000,
15929 "Traffic Identifier (TID) for which a Basic BlockAck frame is requested", HFILL }},
15931 {&hf_ieee80211_block_ack_control_compressed_tid_info,
15932 {"TID for which a BlockAck frame is requested", "wlan.bar.compressed.tidinfo",
15933 FT_UINT16, BASE_HEX, NULL, 0xf000,
15934 "Traffic Identifier (TID) for which a BlockAck frame is requested", HFILL }},
15936 {&hf_ieee80211_block_ack_control_multi_tid_info,
15937 {"Number of TIDs Present", "wlan.ba.mtid.tidinfo",
15938 FT_UINT16, BASE_HEX, NULL, 0xf000,
15939 "Number of Traffic Identifiers (TIDs) Present", HFILL }},
15941 {&hf_ieee80211_block_ack_multi_tid_info,
15942 {"Traffic Identifier (TID) Info", "wlan.ba.mtid.tid",
15943 FT_UINT8, BASE_DEC, 0, 0,
15944 NULL, HFILL }},
15946 {&hf_ieee80211_block_ack_multi_tid_reserved,
15947 {"Reserved", "wlan.bar.mtid.tidinfo.reserved",
15948 FT_UINT16, BASE_HEX, 0, 0x0fff,
15949 NULL, HFILL }},
15951 {&hf_ieee80211_block_ack_multi_tid_value,
15952 {"Multi-TID Value", "wlan.bar.mtid.tidinfo.value",
15953 FT_UINT16, BASE_HEX, 0, 0xf000,
15954 NULL, HFILL }},
15956 {&hf_ieee80211_block_ack_request_type,
15957 {"Block Ack Request Type", "wlan.bar.type",
15958 FT_UINT8, BASE_HEX, VALS(ieee80211_block_ack_request_type_flags), 0x06,
15959 "Block Ack Request (BAR) Type", HFILL }},
15961 {&hf_ieee80211_block_ack_type,
15962 {"Block Ack Type", "wlan.ba.type",
15963 FT_UINT8, BASE_HEX, VALS(ieee80211_block_ack_type_flags), 0x06,
15964 NULL, HFILL }},
15966 {&hf_ieee80211_block_ack_bitmap,
15967 {"Block Ack Bitmap", "wlan.ba.bm",
15968 FT_BYTES, BASE_NONE, NULL, 0,
15969 NULL, HFILL }},
15971 {&hf_ieee80211_block_ack_bitmap_missing_frame,
15972 {"Missing frame", "wlan.ba.bm.missing_frame",
15973 FT_UINT32, BASE_DEC, NULL, 0,
15974 NULL, HFILL }},
15976 {&hf_ieee80211_vht_ndp_annc_token,
15977 {"Sounding Dialog Token", "wlan.vht_ndp.token",
15978 FT_UINT8, BASE_HEX, NULL, 0,
15979 NULL, HFILL }},
15981 {&hf_ieee80211_vht_ndp_annc_token_number,
15982 {"Sounding Dialog Token Number", "wlan.vht_ndp.token.number",
15983 FT_UINT8, BASE_DEC, NULL, 0xFC,
15984 NULL, HFILL }},
15986 {&hf_ieee80211_vht_ndp_annc_token_reserved,
15987 {"Reserved", "wlan.vht_ndp.token.reserved",
15988 FT_UINT8, BASE_HEX, NULL, 0x03,
15989 NULL, HFILL }},
15991 {&hf_ieee80211_vht_ndp_annc_sta_info,
15992 {"STA Info", "wlan.vht_ndp.sta_info",
15993 FT_UINT16, BASE_HEX, NULL, 0,
15994 NULL, HFILL }},
15996 {&hf_ieee80211_vht_ndp_annc_sta_info_aid12,
15997 {"AID12", "wlan.vht_ndp.sta_info.aid12",
15998 FT_UINT16, BASE_HEX, NULL, 0x0FFF,
15999 "12 least significant bits of the AID of the target STA", HFILL }},
16001 {&hf_ieee80211_vht_ndp_annc_sta_info_feedback_type,
16002 {"Feedback Type", "wlan.vht_ndp.sta_info.feedback_type",
16003 FT_BOOLEAN, 16, TFS(&vht_ndp_annc_sta_info_feedback_type), 0x1000,
16004 NULL, HFILL }},
16006 {&hf_ieee80211_vht_ndp_annc_sta_info_nc_index,
16007 {"Nc Index", "wlan.vht_ndp.sta_info.nc_index",
16008 FT_UINT16, BASE_DEC, VALS(num_plus_one_3bit_flag), 0xE000,
16009 NULL, HFILL }},
16011 {&hf_ieee80211_vht_ndp_annc_sta_info_reserved,
16012 {"Reserved", "wlan.vht_ndp.sta_info.reserved",
16013 FT_UINT16, BASE_HEX, NULL, 0xE000,
16014 NULL, HFILL }},
16016 {&hf_ieee80211_data_encap_payload_type,
16017 {"Payload Type", "wlan.data_encap.payload_type",
16018 FT_UINT8, BASE_DEC, VALS(ieee80211_data_encap_payload_types), 0,
16019 NULL, HFILL }},
16021 {&hf_ieee80211_ff_tdls_action_code,
16022 {"Action code", "wlan_mgt.fixed.action_code",
16023 FT_UINT8, BASE_DEC|BASE_EXT_STRING, &tdls_action_codes_ext, 0,
16024 "Management action code", HFILL }},
16026 {&hf_ieee80211_ff_target_channel,
16027 {"Target Channel", "wlan_mgt.fixed.target_channel",
16028 FT_UINT8, BASE_DEC, NULL, 0,
16029 NULL, HFILL }},
16031 {&hf_ieee80211_ff_regulatory_class,
16032 {"Regulatory Class", "wlan_mgt.fixed.regulatory_class",
16033 FT_UINT8, BASE_DEC, NULL, 0,
16034 NULL, HFILL }},
16036 {&hf_ieee80211_ff_wnm_action_code,
16037 {"Action code", "wlan_mgt.fixed.action_code",
16038 FT_UINT8, BASE_DEC|BASE_EXT_STRING, &wnm_action_codes_ext, 0,
16039 "Management action code", HFILL }},
16041 {&hf_ieee80211_ff_key_data,
16042 {"Key Data", "wlan_mgt.fixed.key_data",
16043 FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }},
16045 {&hf_ieee80211_ff_key_data_length,
16046 {"Key Data Length", "wlan_mgt.fixed.key_data_length",
16047 FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
16049 {&hf_ieee80211_ff_wnm_notification_type,
16050 {"WNM-Notification type", "wlan_mgt.fixed.wnm_notification_type",
16051 FT_UINT8, BASE_DEC|BASE_EXT_STRING, &wnm_notification_types_ext, 0,
16052 NULL, HFILL }},
16054 {&hf_ieee80211_ff_rm_action_code,
16055 {"Action code", "wlan_mgt.rm.action_code",
16056 FT_UINT8, BASE_DEC|BASE_EXT_STRING, &rm_action_codes_ext, 0,
16057 "Radio Measurement Action", HFILL }},
16059 {&hf_ieee80211_ff_rm_dialog_token,
16060 {"Dialog token", "wlan_mgt.rm.dialog_token",
16061 FT_UINT8, BASE_DEC, NULL, 0,
16062 "Non-zero Dialog Token identifies request/report transaction", HFILL }},
16064 {&hf_ieee80211_ff_rm_repetitions,
16065 {"Repetitions", "wlan_mgt.rm.repetitions",
16066 FT_UINT16, BASE_DEC, NULL, 0,
16067 "Numer of Repetitions, 65535 indicates repeat until cancellation", HFILL }},
16069 {&hf_ieee80211_ff_rm_tx_power,
16070 {"Transmit Power Used", "wlan_mgt.rm.tx_power",
16071 FT_INT8, BASE_DEC, NULL, 0,
16072 NULL, HFILL }},
16074 {&hf_ieee80211_ff_rm_max_tx_power,
16075 {"Max Transmit Power", "wlan_mgt.rm.max_tx_power",
16076 FT_INT8, BASE_DEC, NULL, 0,
16077 NULL, HFILL }},
16079 {&hf_ieee80211_ff_tpc,
16080 {"TPC Report", "wlan_mgt.rm.tpc",
16081 FT_NONE, BASE_NONE, NULL, 0,
16082 NULL, HFILL }},
16084 {&hf_ieee80211_ff_tpc_element_id,
16085 {"TPC Element ID", "wlan_mgt.rm.tpc.element_id",
16086 FT_UINT8, BASE_DEC, NULL, 0,
16087 NULL, HFILL }},
16089 {&hf_ieee80211_ff_tpc_length,
16090 {"TPC Length", "wlan_mgt.rm.tpc.length",
16091 FT_UINT8, BASE_DEC, NULL, 0,
16092 "Length of TPC Report element (always 2)", HFILL }},
16094 {&hf_ieee80211_ff_tpc_tx_power,
16095 {"TPC Transmit Power", "wlan_mgt.rm.tpc.tx_power",
16096 FT_INT8, BASE_DEC, NULL, 0,
16097 NULL, HFILL }},
16099 {&hf_ieee80211_ff_tpc_link_margin,
16100 {"TPC Link Margin", "wlan_mgt.rm.tpc.link_margin",
16101 FT_INT8, BASE_DEC, NULL, 0,
16102 NULL, HFILL }},
16104 {&hf_ieee80211_ff_rm_rx_antenna_id,
16105 {"Receive Antenna ID", "wlan_mgt.rm.rx_antenna_id",
16106 FT_UINT8, BASE_DEC, NULL, 0,
16107 NULL, HFILL }},
16109 {&hf_ieee80211_ff_rm_tx_antenna_id,
16110 {"Transmit Antenna ID", "wlan_mgt.rm.tx_antenna_id",
16111 FT_UINT8, BASE_DEC, NULL, 0,
16112 NULL, HFILL }},
16114 {&hf_ieee80211_ff_rm_rcpi,
16115 {"Received Channel Power", "wlan_mgt.rm.rcpi",
16116 FT_UINT8, BASE_DEC, NULL, 0,
16117 NULL, HFILL }},
16119 {&hf_ieee80211_ff_rm_rsni,
16120 {"Received Signal to noise indication", "wlan_mgt.rm.rsni",
16121 FT_UINT8, BASE_DEC, NULL, 0,
16122 NULL, HFILL }},
16124 {&hf_ieee80211_ff_request_mode_pref_cand,
16125 {"Preferred Candidate List Included","wlan_mgt.fixed.request_mode.pref_cand",
16126 FT_UINT8, BASE_DEC, NULL, 0x01,
16127 NULL, HFILL }},
16129 {&hf_ieee80211_ff_request_mode_abridged,
16130 {"Abridged", "wlan_mgt.fixed.request_mode.abridged",
16131 FT_UINT8, BASE_DEC, NULL, 0x02,
16132 NULL, HFILL }},
16134 {&hf_ieee80211_ff_request_mode_disassoc_imminent,
16135 {"Disassociation Imminent", "wlan_mgt.fixed.request_mode.disassoc_imminent",
16136 FT_UINT8, BASE_DEC, NULL, 0x04,
16137 NULL, HFILL }},
16139 {&hf_ieee80211_ff_request_mode_bss_term_included,
16140 {"BSS Termination Included", "wlan_mgt.fixed.request_mode.bss_term_included",
16141 FT_UINT8, BASE_DEC, NULL, 0x08,
16142 NULL, HFILL }},
16144 {&hf_ieee80211_ff_request_mode_ess_disassoc_imminent,
16145 {"ESS Disassociation Imminent", "wlan_mgt.fixed.request_mode.ess_disassoc_imminent",
16146 FT_UINT8, BASE_DEC, NULL, 0x10,
16147 NULL, HFILL }},
16149 {&hf_ieee80211_ff_disassoc_timer,
16150 {"Disassociation Timer", "wlan_mgt.fixed.disassoc_timer",
16151 FT_UINT16, BASE_DEC, NULL, 0,
16152 NULL, HFILL }},
16154 {&hf_ieee80211_ff_validity_interval,
16155 {"Validity Interval", "wlan_mgt.fixed.validity_interval",
16156 FT_UINT8, BASE_DEC, NULL, 0,
16157 NULL, HFILL }},
16159 {&hf_ieee80211_ff_url_len,
16160 {"Session Information URL Length",
16161 "wlan_mgt.fixed.session_information.url_length",
16162 FT_UINT8, BASE_DEC, NULL, 0,
16163 NULL, HFILL }},
16165 {&hf_ieee80211_ff_url,
16166 {"Session Information URL", "wlan_mgt.fixed.session_information.url",
16167 FT_STRING, BASE_NONE, NULL, 0,
16168 NULL, HFILL }},
16171 static hf_register_info ff[] = {
16173 {&hf_ieee80211_ff_timestamp,
16174 {"Timestamp", "wlan_mgt.fixed.timestamp",
16175 FT_UINT64, BASE_HEX, NULL, 0,
16176 NULL, HFILL }},
16178 {&hf_ieee80211_ff_auth_alg,
16179 {"Authentication Algorithm", "wlan_mgt.fixed.auth.alg",
16180 FT_UINT16, BASE_DEC, VALS(auth_alg), 0,
16181 NULL, HFILL }},
16183 {&hf_ieee80211_ff_beacon_interval,
16184 {"Beacon Interval", "wlan_mgt.fixed.beacon",
16185 FT_UINT32, BASE_CUSTOM, beacon_interval_base_custom, 0,
16186 NULL, HFILL }},
16188 {&hf_ieee80211_fixed_parameters,
16189 {"Fixed parameters", "wlan_mgt.fixed.all",
16190 FT_NONE, BASE_NONE, NULL, 0,
16191 NULL, HFILL }},
16193 {&hf_ieee80211_tagged_parameters,
16194 {"Tagged parameters", "wlan_mgt.tagged.all",
16195 FT_NONE, BASE_NONE, NULL, 0,
16196 NULL, HFILL }},
16198 {&hf_ieee80211_tag_ssid,
16199 {"SSID", "wlan_mgt.ssid",
16200 FT_STRING, BASE_NONE, NULL, 0,
16201 "Indicates the identity of an ESS or IBSS", HFILL }},
16203 {&hf_ieee80211_tag_supp_rates,
16204 {"Supported Rates", "wlan_mgt.supported_rates",
16205 FT_UINT8, BASE_HEX|BASE_EXT_STRING, &ieee80211_supported_rates_vals_ext, 0x0,
16206 "In Mbit/sec, (B) for Basic Rates", HFILL }},
16208 {&hf_ieee80211_tag_fh_dwell_time,
16209 {"Dwell Time", "wlan_mgt.fh.dwell_time",
16210 FT_UINT16, BASE_HEX, NULL, 0x0,
16211 "In Time Unit (TU)", HFILL }},
16213 {&hf_ieee80211_tag_fh_hop_set,
16214 {"Hop Set", "wlan_mgt.fh.hop_set",
16215 FT_UINT8, BASE_DEC, NULL, 0x0,
16216 NULL, HFILL }},
16218 {&hf_ieee80211_tag_fh_hop_pattern,
16219 {"Hop Pattern", "wlan_mgt.fh.hop_pattern",
16220 FT_UINT8, BASE_DEC, NULL, 0x0,
16221 NULL, HFILL }},
16223 {&hf_ieee80211_tag_fh_hop_index,
16224 {"Hop Index", "wlan_mgt.fh.hop_index",
16225 FT_UINT8, BASE_DEC, NULL, 0x0,
16226 NULL, HFILL }},
16228 {&hf_ieee80211_ff_block_ack_params,
16229 {"Block Ack Parameters", "wlan_mgt.fixed.baparams",
16230 FT_UINT16, BASE_HEX, NULL, 0,
16231 NULL, HFILL }},
16233 {&hf_ieee80211_ff_block_ack_params_amsdu_permitted,
16234 {"A-MSDUs", "wlan_mgt.fixed.baparams.amsdu",
16235 FT_BOOLEAN, 16, TFS (&ff_block_ack_params_amsdu_permitted_flag), 0x0001,
16236 "A-MSDU Permitted in QoS Data MPDUs", HFILL }},
16238 {&hf_ieee80211_ff_block_ack_params_policy,
16239 {"Block Ack Policy", "wlan_mgt.fixed.baparams.policy",
16240 FT_BOOLEAN, 16, TFS (&ff_block_ack_params_policy_flag), 0x0002,
16241 NULL, HFILL }},
16243 {&hf_ieee80211_ff_block_ack_params_tid,
16244 {"Traffic Identifier", "wlan_mgt.fixed.baparams.tid",
16245 FT_UINT16, BASE_HEX, NULL, 0x003C,
16246 NULL, HFILL }},
16248 {&hf_ieee80211_ff_block_ack_params_buffer_size,
16249 {"Number of Buffers (1 Buffer = 2304 Bytes)", "wlan_mgt.fixed.baparams.buffersize",
16250 FT_UINT16, BASE_DEC, NULL, 0xFFC0,
16251 "Number of Buffers", HFILL }},
16253 {&hf_ieee80211_ff_block_ack_timeout,
16254 {"Block Ack Timeout", "wlan_mgt.fixed.batimeout",
16255 FT_UINT16, BASE_HEX, NULL, 0,
16256 NULL, HFILL }},
16258 {&hf_ieee80211_ff_block_ack_ssc,
16259 {"Block Ack Starting Sequence Control (SSC)", "wlan_mgt.fixed.ssc",
16260 FT_UINT16, BASE_HEX, 0, 0,
16261 NULL, HFILL }},
16263 {&hf_ieee80211_ff_block_ack_ssc_fragment,
16264 {"Fragment", "wlan_mgt.fixed.fragment",
16265 FT_UINT16, BASE_DEC, 0, 0x000f,
16266 NULL, HFILL }},
16268 {&hf_ieee80211_ff_block_ack_ssc_sequence,
16269 {"Starting Sequence Number", "wlan_mgt.fixed.sequence",
16270 FT_UINT16, BASE_DEC, 0, 0xfff0,
16271 NULL, HFILL }},
16273 {&hf_ieee80211_ff_delba_param,
16274 {"Delete Block Ack (DELBA) Parameter Set", "wlan_mgt.fixed.delba.param",
16275 FT_UINT16, BASE_HEX, 0, 0,
16276 NULL, HFILL }},
16278 {&hf_ieee80211_ff_delba_param_reserved,
16279 {"Reserved", "wlan_mgt.fixed.delba.param.reserved",
16280 FT_UINT16, BASE_HEX, 0, 0x07ff,
16281 NULL, HFILL }},
16283 {&hf_ieee80211_ff_delba_param_init,
16284 {"Initiator", "wlan_mgt.fixed.delba.param.initiator",
16285 FT_BOOLEAN, 16, 0, 0x0800,
16286 NULL, HFILL }},
16288 {&hf_ieee80211_ff_delba_param_tid,
16289 {"TID", "wlan_mgt.fixed.delba.param.tid",
16290 FT_UINT16, BASE_HEX, 0, 0xf000,
16291 "Traffic Identifier (TID)", HFILL }},
16293 {&hf_ieee80211_ff_max_reg_pwr,
16294 {"Maximum Regulation Power", "wlan_mgt.fixed.maxregpwr",
16295 FT_UINT16, BASE_HEX, 0, 0,
16296 NULL, HFILL }},
16298 {&hf_ieee80211_ff_measurement_pilot_int,
16299 {"Measurement Pilot Interval", "wlan_mgt.fixed.msmtpilotint",
16300 FT_UINT16, BASE_HEX, 0, 0,
16301 "Measurement Pilot Interval Fixed Field", HFILL }},
16303 {&hf_ieee80211_ff_country_str,
16304 {"Country String", "wlan_mgt.fixed.country",
16305 FT_STRING, BASE_NONE, 0, 0,
16306 NULL, HFILL }},
16308 {&hf_ieee80211_ff_max_tx_pwr,
16309 {"Maximum Transmit Power", "wlan_mgt.fixed.maxtxpwr",
16310 FT_UINT8, BASE_HEX, 0, 0,
16311 NULL, HFILL }},
16313 {&hf_ieee80211_ff_tx_pwr_used,
16314 {"Transmit Power Used", "wlan_mgt.fixed.txpwr",
16315 FT_UINT8, BASE_HEX, 0, 0,
16316 NULL, HFILL }},
16318 {&hf_ieee80211_ff_transceiver_noise_floor,
16319 {"Transceiver Noise Floor", "wlan_mgt.fixed.tnoisefloor",
16320 FT_UINT8, BASE_HEX, 0, 0,
16321 NULL, HFILL }},
16323 {&hf_ieee80211_ff_channel_width,
16324 {"Supported Channel Width", "wlan_mgt.fixed.chanwidth",
16325 FT_UINT8, BASE_HEX, VALS(ff_channel_width_vals), 0,
16326 NULL, HFILL }},
16328 {&hf_ieee80211_ff_qos_info_ap,
16329 {"QoS Information (AP)", "wlan_mgt.fixed.qosinfo.ap",
16330 FT_UINT8, BASE_HEX, NULL, 0,
16331 NULL, HFILL }},
16333 {&hf_ieee80211_ff_qos_info_ap_edca_param_set_counter,
16334 {"EDCA Parameter Set Update Count", "wlan_mgt.fixed.qosinfo.ap.edcaupdate",
16335 FT_UINT8, BASE_HEX, NULL, 0x0F,
16336 "Enhanced Distributed Channel Access (EDCA) Parameter Set Update Count", HFILL }},
16338 {&hf_ieee80211_ff_qos_info_ap_q_ack,
16339 {"Q-Ack", "wlan_mgt.fixed.qosinfo.ap.qack",
16340 FT_BOOLEAN, 8, TFS (&ff_qos_info_ap_q_ack_flag), 0x10,
16341 "QoS Ack", HFILL }},
16343 {&hf_ieee80211_ff_qos_info_ap_queue_req,
16344 {"Queue Request", "wlan_mgt.fixed.qosinfo.ap",
16345 FT_BOOLEAN, 8, TFS (&ff_qos_info_ap_queue_req_flag), 0x20,
16346 NULL, HFILL }},
16348 {&hf_ieee80211_ff_qos_info_ap_txop_request,
16349 {"TXOP Request", "wlan_mgt.fixed.qosinfo.ap.txopreq",
16350 FT_BOOLEAN, 8, TFS (&ff_qos_info_ap_txop_request_flag), 0x40,
16351 "Transmit Opportunity (TXOP) Request", HFILL }},
16353 {&hf_ieee80211_ff_qos_info_ap_reserved,
16354 {"Reserved", "wlan_mgt.fixed.qosinfo.ap.reserved",
16355 FT_BOOLEAN, 8, NULL, 0x80,
16356 NULL, HFILL }},
16358 {&hf_ieee80211_ff_qos_info_sta,
16359 {"QoS Information (STA)", "wlan_mgt.fixed.qosinfo.sta",
16360 FT_UINT8, BASE_HEX, NULL, 0,
16361 NULL, HFILL }},
16363 {&hf_ieee80211_ff_qos_info_sta_ac_vo,
16364 {"AC_VO", "wlan_mgt.fixed.qosinfo.sta.ac.vo",
16365 FT_BOOLEAN, 8, TFS (&ff_qos_info_sta_ac_flag), 0x01,
16366 NULL, HFILL }},
16368 {&hf_ieee80211_ff_qos_info_sta_ac_vi,
16369 {"AC_VI", "wlan_mgt.fixed.qosinfo.sta.ac.vi",
16370 FT_BOOLEAN, 8, TFS (&ff_qos_info_sta_ac_flag), 0x02,
16371 NULL, HFILL }},
16373 {&hf_ieee80211_ff_qos_info_sta_ac_bk,
16374 {"AC_BK", "wlan_mgt.fixed.qosinfo.sta.ac.bk",
16375 FT_BOOLEAN, 8, TFS (&ff_qos_info_sta_ac_flag), 0x04,
16376 NULL, HFILL }},
16378 {&hf_ieee80211_ff_qos_info_sta_ac_be,
16379 {"AC_BE", "wlan_mgt.fixed.qosinfo.sta.ac.be",
16380 FT_BOOLEAN, 8, TFS (&ff_qos_info_sta_ac_flag), 0x08,
16381 NULL, HFILL }},
16383 {&hf_ieee80211_ff_qos_info_sta_q_ack,
16384 {"Q-Ack", "wlan_mgt.fixed.qosinfo.sta.qack",
16385 FT_BOOLEAN, 8, TFS (&ff_qos_info_sta_q_ack_flag), 0x10,
16386 "QoS Ack", HFILL }},
16388 {&hf_ieee80211_ff_qos_info_sta_max_sp_len,
16389 {"Service Period (SP) Length", "wlan_mgt.fixed.qosinfo.sta.splen",
16390 FT_UINT8, BASE_HEX, VALS(ff_qos_info_sta_max_sp_len_flags) , 0x60,
16391 NULL, HFILL }},
16393 {&hf_ieee80211_ff_qos_info_sta_more_data_ack,
16394 {"More Data Ack", "wlan_mgt.fixed.qosinfo.sta.moredataack",
16395 FT_BOOLEAN, 8, TFS (&ff_qos_info_sta_more_data_ack_flag), 0x80,
16396 NULL, HFILL }},
16398 {&hf_ieee80211_ff_sm_pwr_save,
16399 {"Spatial Multiplexing (SM) Power Control", "wlan_mgt.fixed.sm.powercontrol",
16400 FT_UINT8, BASE_HEX, NULL, 0,
16401 NULL, HFILL }},
16403 {&hf_ieee80211_ff_sm_pwr_save_enabled,
16404 {"SM Power Save", "wlan_mgt.fixed.sm.powercontrol.enabled",
16405 FT_BOOLEAN, 8, TFS (&tfs_enabled_disabled), 0x01,
16406 "Spatial Multiplexing (SM) Power Save", HFILL }},
16408 {&hf_ieee80211_ff_sm_pwr_save_sm_mode,
16409 {"SM Mode", "wlan_mgt.fixed.sm.powercontrol.mode",
16410 FT_BOOLEAN, 8, TFS (&ff_sm_pwr_save_sm_mode_flag), 0x02,
16411 "Spatial Multiplexing (SM) Mode", HFILL }},
16413 {&hf_ieee80211_ff_sm_pwr_save_reserved,
16414 {"Reserved", "wlan_mgt.fixed.sm.powercontrol.reserved",
16415 FT_UINT8, BASE_HEX, NULL, 0xFC,
16416 NULL, HFILL }},
16418 {&hf_ieee80211_ff_pco_phase_cntrl,
16419 {"Phased Coexistence Operation (PCO) Phase Control", "wlan_mgt.fixed.pco.phasecntrl",
16420 FT_BOOLEAN, BASE_NONE, TFS (&ff_pco_phase_cntrl_flag), 0x0,
16421 NULL, HFILL }},
16423 {&hf_ieee80211_ff_psmp_param_set,
16424 {"Power Save Multi-Poll (PSMP) Parameter Set", "wlan_mgt.fixed.psmp.paramset",
16425 FT_UINT16, BASE_HEX, 0, 0,
16426 NULL, HFILL }},
16428 {&hf_ieee80211_ff_psmp_param_set_n_sta,
16429 {"Number of STA Info Fields Present", "wlan_mgt.fixed.psmp.paramset.nsta",
16430 FT_UINT16, BASE_HEX, 0, 0x000F,
16431 NULL, HFILL }},
16433 {&hf_ieee80211_ff_psmp_param_set_more_psmp,
16434 {"More PSMP", "wlan_mgt.fixed.psmp.paramset.more",
16435 FT_BOOLEAN, 16, TFS(&ff_psmp_param_set_more_psmp_flag), 0x0010,
16436 "More Power Save Multi-Poll (PSMP)", HFILL }},
16438 {&hf_ieee80211_ff_psmp_param_set_psmp_sequence_duration,
16439 {"PSMP Sequence Duration [us]", "wlan_mgt.fixed.psmp.paramset.seqduration",
16440 FT_UINT16, BASE_DEC, 0, 0xFFE0,
16441 "Power Save Multi-Poll (PSMP) Sequence Duration", HFILL }},
16443 {&hf_ieee80211_ff_mimo_cntrl,
16444 {"MIMO Control", "wlan_mgt.fixed.mimo.control.",
16445 FT_BYTES, BASE_NONE, 0, 0x0,
16446 NULL, HFILL }},
16448 {&hf_ieee80211_ff_mimo_cntrl_nc_index,
16449 {"Nc Index", "wlan_mgt.fixed.mimo.control.ncindex",
16450 FT_UINT16, BASE_HEX, VALS(ff_mimo_cntrl_nc_index_flags), 0x0003,
16451 "Number of Columns Less One", HFILL }},
16453 {&hf_ieee80211_ff_mimo_cntrl_nr_index,
16454 {"Nr Index", "wlan_mgt.fixed.mimo.control.nrindex",
16455 FT_UINT16, BASE_HEX, VALS(ff_mimo_cntrl_nr_index_flags), 0x000C,
16456 "Number of Rows Less One", HFILL }},
16458 {&hf_ieee80211_ff_mimo_cntrl_channel_width,
16459 {"Channel Width", "wlan_mgt.fixed.mimo.control.chanwidth",
16460 FT_BOOLEAN, 16, TFS(&ff_mimo_cntrl_channel_width_flag), 0x0010,
16461 NULL, HFILL }},
16463 {&hf_ieee80211_ff_mimo_cntrl_grouping,
16464 {"Grouping (Ng)", "wlan_mgt.fixed.mimo.control.grouping",
16465 FT_UINT16, BASE_HEX, VALS(ff_mimo_cntrl_grouping_flags), 0x0060,
16466 NULL, HFILL }},
16468 {&hf_ieee80211_ff_mimo_cntrl_coefficient_size,
16469 {"Coefficient Size (Nb)", "wlan_mgt.fixed.mimo.control.cosize",
16470 FT_UINT16, BASE_HEX, VALS(ff_mimo_cntrl_coefficient_size_flags), 0x0180,
16471 NULL, HFILL }},
16473 {&hf_ieee80211_ff_mimo_cntrl_codebook_info,
16474 {"Codebook Information", "wlan_mgt.fixed.mimo.control.codebookinfo",
16475 FT_UINT16, BASE_HEX, VALS(ff_mimo_cntrl_codebook_info_flags), 0x0600,
16476 NULL, HFILL }},
16478 {&hf_ieee80211_ff_mimo_cntrl_remaining_matrix_segment,
16479 {"Remaining Matrix Segment", "wlan_mgt.fixed.mimo.control.matrixseg",
16480 FT_UINT16, BASE_HEX, 0, 0x3800,
16481 NULL, HFILL }},
16483 {&hf_ieee80211_ff_mimo_cntrl_reserved,
16484 {"Reserved", "wlan_mgt.fixed.mimo.control.reserved",
16485 FT_UINT16, BASE_HEX, 0, 0xC000,
16486 NULL, HFILL }},
16488 {&hf_ieee80211_ff_mimo_cntrl_sounding_timestamp,
16489 {"Sounding Timestamp", "wlan_mgt.fixed.mimo.control.soundingtime",
16490 FT_UINT32, BASE_HEX, 0, 0,
16491 NULL, HFILL }},
16493 {&hf_ieee80211_ff_psmp_sta_info,
16494 {"Power Save Multi-Poll (PSMP) Station Information", "wlan_mgt.fixed.psmp.stainfo",
16495 FT_UINT64, BASE_HEX, 0, 0,
16496 NULL, HFILL }},
16498 {&hf_ieee80211_ff_psmp_sta_info_type,
16499 {"Sta Info Type", "wlan_mgt.fixed.psmp.stainfo.type",
16500 FT_UINT32, BASE_HEX, VALS(ff_psmp_sta_info_flags), PSMP_STA_INFO_FLAG_TYPE,
16501 NULL, HFILL }},
16503 {&hf_ieee80211_ff_psmp_sta_info_dtt_start_offset,
16504 {"DTT Start Offset", "wlan_mgt.fixed.psmp.stainfo.dttstart",
16505 FT_UINT32, BASE_HEX, 0, PSMP_STA_INFO_FLAG_DTT_START,
16506 NULL, HFILL }},
16508 {&hf_ieee80211_ff_psmp_sta_info_dtt_duration,
16509 {"DTT Duration", "wlan_mgt.fixed.psmp.stainfo.dttduration",
16510 FT_UINT32, BASE_HEX, 0, PSMP_STA_INFO_FLAG_DTT_DURATION,
16511 NULL, HFILL }},
16513 {&hf_ieee80211_ff_psmp_sta_info_sta_id,
16514 {"Target Station ID", "wlan_mgt.fixed.psmp.stainfo.staid",
16515 FT_UINT32, BASE_HEX, 0, PSMP_STA_INFO_FLAG_STA_ID,
16516 NULL, HFILL }},
16518 {&hf_ieee80211_ff_psmp_sta_info_utt_start_offset,
16519 {"UTT Start Offset", "wlan_mgt.fixed.psmp.stainfo.uttstart",
16520 FT_UINT32, BASE_HEX, 0, PSMP_STA_INFO_FLAG_UTT_START,
16521 NULL, HFILL }},
16523 {&hf_ieee80211_ff_psmp_sta_info_utt_duration,
16524 {"UTT Duration", "wlan_mgt.fixed.psmp.stainfo.uttduration",
16525 FT_UINT32, BASE_HEX, 0, PSMP_STA_INFO_FLAG_UTT_DURATION,
16526 NULL, HFILL }},
16528 {&hf_ieee80211_ff_psmp_sta_info_reserved_small,
16529 {"Reserved", "wlan_mgt.fixed.psmp.stainfo.reserved",
16530 FT_UINT32, BASE_HEX, 0, PSMP_STA_INFO_FLAG_IA_RESERVED,
16531 NULL, HFILL }},
16533 {&hf_ieee80211_ff_psmp_sta_info_reserved_large,
16534 {"Reserved", "wlan_mgt.fixed.psmp.stainfo.reserved",
16535 FT_UINT64, BASE_HEX, 0, 0,
16536 NULL, HFILL }},
16538 {&hf_ieee80211_ff_psmp_sta_info_psmp_multicast_id,
16539 {"Power Save Multi-Poll (PSMP) Multicast ID", "wlan_mgt.fixed.psmp.stainfo.multicastid",
16540 FT_UINT64, BASE_HEX, 0, 0,
16541 NULL, HFILL }},
16543 {&hf_ieee80211_ff_ant_selection,
16544 {"Antenna Selection", "wlan_mgt.fixed.antsel",
16545 FT_UINT8, BASE_HEX, 0, 0,
16546 NULL, HFILL }},
16548 {&hf_ieee80211_ff_ant_selection_0,
16549 {"Antenna 0", "wlan_mgt.fixed.antsel.ant0",
16550 FT_UINT8, BASE_HEX, 0, 0x01,
16551 NULL, HFILL }},
16553 {&hf_ieee80211_ff_ant_selection_1,
16554 {"Antenna 1", "wlan_mgt.fixed.antsel.ant1",
16555 FT_UINT8, BASE_HEX, 0, 0x02,
16556 NULL, HFILL }},
16558 {&hf_ieee80211_ff_ant_selection_2,
16559 {"Antenna 2", "wlan_mgt.fixed.antsel.ant2",
16560 FT_UINT8, BASE_HEX, 0, 0x04,
16561 NULL, HFILL }},
16563 {&hf_ieee80211_ff_ant_selection_3,
16564 {"Antenna 3", "wlan_mgt.fixed.antsel.ant3",
16565 FT_UINT8, BASE_HEX, 0, 0x08,
16566 NULL, HFILL }},
16568 {&hf_ieee80211_ff_ant_selection_4,
16569 {"Antenna 4", "wlan_mgt.fixed.antsel.ant4",
16570 FT_UINT8, BASE_HEX, 0, 0x10,
16571 NULL, HFILL }},
16573 {&hf_ieee80211_ff_ant_selection_5,
16574 {"Antenna 5", "wlan_mgt.fixed.antsel.ant5",
16575 FT_UINT8, BASE_HEX, 0, 0x20,
16576 NULL, HFILL }},
16578 {&hf_ieee80211_ff_ant_selection_6,
16579 {"Antenna 6", "wlan_mgt.fixed.antsel.ant6",
16580 FT_UINT8, BASE_HEX, 0, 0x40,
16581 NULL, HFILL }},
16583 {&hf_ieee80211_ff_ant_selection_7,
16584 {"Antenna 7", "wlan_mgt.fixed.antsel.ant7",
16585 FT_UINT8, BASE_HEX, 0, 0x80,
16586 NULL, HFILL }},
16588 {&hf_ieee80211_ff_ext_channel_switch_announcement,
16589 {"Extended Channel Switch Announcement", "wlan_mgt.fixed.extchansw",
16590 FT_UINT32, BASE_HEX, 0, 0,
16591 NULL, HFILL }},
16593 {&hf_ieee80211_ff_ext_channel_switch_announcement_switch_mode,
16594 {"Channel Switch Mode", "wlan_mgt.fixed.extchansw.switchmode",
16595 FT_UINT32, BASE_HEX, VALS(ieee80211_tag_ext_channel_switch_announcement_switch_mode_flags), 0x000000FF,
16596 NULL, HFILL }},
16598 {&hf_ieee80211_ff_ext_channel_switch_announcement_new_reg_class,
16599 {"New Regulatory Class", "wlan_mgt.fixed.extchansw.new.regclass",
16600 FT_UINT32, BASE_HEX, NULL, 0x0000FF00,
16601 NULL, HFILL }},
16603 {&hf_ieee80211_ff_ext_channel_switch_announcement_new_chan_number,
16604 {"New Channel Number", "wlan_mgt.fixed.extchansw.new.channumber",
16605 FT_UINT32, BASE_HEX, NULL, 0x00FF0000,
16606 NULL, HFILL }},
16608 {&hf_ieee80211_ff_ext_channel_switch_announcement_switch_count,
16609 {"Channel Switch Count", "wlan_mgt.extchanswitch.switchcount",
16610 FT_UINT32, BASE_HEX, NULL, 0xFF000000,
16611 NULL, HFILL }},
16613 {&hf_ieee80211_ff_ht_info,
16614 {"HT Information", "wlan_mgt.fixed.extchansw",
16615 FT_UINT8, BASE_HEX, 0, 0,
16616 "HT Information Fixed Field", HFILL }},
16618 {&hf_ieee80211_ff_ht_info_information_request,
16619 {"Information Request", "wlan_mgt.fixed.mimo.control.chanwidth",
16620 FT_BOOLEAN, 8, TFS(&ff_ht_info_information_request_flag), 0x01,
16621 NULL, HFILL }},
16623 {&hf_ieee80211_ff_ht_info_40_mhz_intolerant,
16624 {"40 MHz Intolerant", "wlan_mgt.fixed.mimo.control.chanwidth",
16625 FT_BOOLEAN, 8, TFS(&ff_ht_info_40_mhz_intolerant_flag), 0x02,
16626 NULL, HFILL }},
16628 {&hf_ieee80211_ff_ht_info_sta_chan_width,
16629 {"Station Channel Width", "wlan_mgt.fixed.mimo.control.chanwidth",
16630 FT_BOOLEAN, 8, TFS(&ff_ht_info_sta_chan_width_flag), 0x04,
16631 NULL, HFILL }},
16633 {&hf_ieee80211_ff_ht_info_reserved,
16634 {"Reserved", "wlan_mgt.fixed.extchansw",
16635 FT_UINT8, BASE_HEX, 0, 0xF8,
16636 "Reserved Field", HFILL }},
16638 {&hf_ieee80211_ff_ht_action,
16639 {"HT Action", "wlan_mgt.fixed.htact",
16640 FT_UINT8, BASE_HEX, VALS(ff_ht_action_flags), 0,
16641 "HT Action Code", HFILL }},
16643 {&hf_ieee80211_ff_mimo_csi_snr,
16644 {"Signal to Noise Ratio (SNR)", "wlan_mgt.mimo.csimatrices.snr",
16645 FT_UINT8, BASE_HEX, NULL, 0,
16646 NULL, HFILL }},
16648 {&hf_ieee80211_ff_public_action,
16649 {"Public Action", "wlan_mgt.fixed.publicact",
16650 FT_UINT8, BASE_HEX|BASE_EXT_STRING, &ff_pa_action_codes_ext, 0,
16651 "Public Action Code", HFILL }},
16653 {&hf_ieee80211_ff_capture,
16654 {"Capabilities Information", "wlan_mgt.fixed.capabilities",
16655 FT_UINT16, BASE_HEX, NULL, 0,
16656 "Capability information", HFILL }},
16658 {&hf_ieee80211_ff_cf_ess,
16659 {"ESS capabilities", "wlan_mgt.fixed.capabilities.ess",
16660 FT_BOOLEAN, 16, TFS (&cf_ess_flags), 0x0001,
16661 NULL, HFILL }},
16663 {&hf_ieee80211_ff_cf_ibss,
16664 {"IBSS status", "wlan_mgt.fixed.capabilities.ibss",
16665 FT_BOOLEAN, 16, TFS(&cf_ibss_flags), 0x0002,
16666 "IBSS participation", HFILL }},
16668 {&hf_ieee80211_ff_cf_sta_poll,
16669 {"CFP participation capabilities", "wlan_mgt.fixed.capabilities.cfpoll.sta",
16670 FT_UINT16, BASE_HEX, VALS(sta_cf_pollable), 0x020C,
16671 "CF-Poll capabilities for a STA", HFILL }},
16673 {&hf_ieee80211_ff_cf_ap_poll,
16674 {"CFP participation capabilities", "wlan_mgt.fixed.capabilities.cfpoll.ap",
16675 FT_UINT16, BASE_HEX, VALS(ap_cf_pollable), 0x020C,
16676 "CF-Poll capabilities for an AP", HFILL }},
16678 {&hf_ieee80211_ff_cf_privacy,
16679 {"Privacy", "wlan_mgt.fixed.capabilities.privacy",
16680 FT_BOOLEAN, 16, TFS(&cf_privacy_flags), 0x0010,
16681 "WEP support", HFILL }},
16683 {&hf_ieee80211_ff_cf_preamble,
16684 {"Short Preamble", "wlan_mgt.fixed.capabilities.preamble",
16685 FT_BOOLEAN, 16, TFS(&tfs_allowed_not_allowed), 0x0020,
16686 NULL, HFILL }},
16688 {&hf_ieee80211_ff_cf_pbcc,
16689 {"PBCC", "wlan_mgt.fixed.capabilities.pbcc",
16690 FT_BOOLEAN, 16, TFS(&tfs_allowed_not_allowed), 0x0040,
16691 "PBCC Modulation", HFILL }},
16693 {&hf_ieee80211_ff_cf_agility,
16694 {"Channel Agility", "wlan_mgt.fixed.capabilities.agility",
16695 FT_BOOLEAN, 16, TFS(&tfs_inuse_not_inuse), 0x0080,
16696 NULL, HFILL }},
16698 {&hf_ieee80211_ff_cf_spec_man,
16699 {"Spectrum Management", "wlan_mgt.fixed.capabilities.spec_man",
16700 FT_BOOLEAN, 16, TFS(&tfs_implemented_not_implemented), 0x0100,
16701 NULL, HFILL }},
16703 {&hf_ieee80211_ff_short_slot_time,
16704 {"Short Slot Time", "wlan_mgt.fixed.capabilities.short_slot_time",
16705 FT_BOOLEAN, 16, TFS(&tfs_inuse_not_inuse), 0x0400,
16706 NULL, HFILL }},
16708 {&hf_ieee80211_ff_cf_apsd,
16709 {"Automatic Power Save Delivery", "wlan_mgt.fixed.capabilities.apsd",
16710 FT_BOOLEAN, 16, TFS(&tfs_implemented_not_implemented), 0x0800,
16711 NULL, HFILL }},
16713 {&hf_ieee80211_ff_radio_measurement,
16714 {"Radio Measurement", "wlan_mgt.fixed.capabilities.radio_measurement",
16715 FT_BOOLEAN, 16, TFS(&tfs_implemented_not_implemented), 0x1000,
16716 NULL, HFILL }},
16718 {&hf_ieee80211_ff_dsss_ofdm,
16719 {"DSSS-OFDM", "wlan_mgt.fixed.capabilities.dsss_ofdm",
16720 FT_BOOLEAN, 16, TFS(&tfs_allowed_not_allowed), 0x2000,
16721 "DSSS-OFDM Modulation", HFILL }},
16723 {&hf_ieee80211_ff_cf_del_blk_ack,
16724 {"Delayed Block Ack", "wlan_mgt.fixed.capabilities.del_blk_ack",
16725 FT_BOOLEAN, 16, TFS(&tfs_implemented_not_implemented), 0x4000,
16726 NULL, HFILL }},
16728 {&hf_ieee80211_ff_cf_imm_blk_ack,
16729 {"Immediate Block Ack", "wlan_mgt.fixed.capabilities.imm_blk_ack",
16730 FT_BOOLEAN, 16, TFS(&tfs_implemented_not_implemented), 0x8000,
16731 NULL, HFILL }},
16733 {&hf_ieee80211_ff_auth_seq,
16734 {"Authentication SEQ", "wlan_mgt.fixed.auth_seq",
16735 FT_UINT16, BASE_HEX, NULL, 0,
16736 "Authentication Sequence Number", HFILL }},
16738 {&hf_ieee80211_ff_assoc_id,
16739 {"Association ID", "wlan_mgt.fixed.aid",
16740 FT_UINT16, BASE_HEX, NULL, 0x3FFF,
16741 NULL, HFILL }},
16743 {&hf_ieee80211_ff_listen_ival,
16744 {"Listen Interval", "wlan_mgt.fixed.listen_ival",
16745 FT_UINT16, BASE_HEX, NULL, 0,
16746 NULL, HFILL }},
16748 {&hf_ieee80211_ff_current_ap,
16749 {"Current AP", "wlan_mgt.fixed.current_ap",
16750 FT_ETHER, BASE_NONE, NULL, 0,
16751 "MAC address of current AP", HFILL }},
16753 {&hf_ieee80211_ff_reason,
16754 {"Reason code", "wlan_mgt.fixed.reason_code",
16755 FT_UINT16, BASE_HEX|BASE_EXT_STRING, &ieee80211_reason_code_ext, 0,
16756 "Reason for unsolicited notification", HFILL }},
16758 {&hf_ieee80211_ff_status_code,
16759 {"Status code", "wlan_mgt.fixed.status_code",
16760 FT_UINT16, BASE_HEX|BASE_EXT_STRING, &ieee80211_status_code_ext, 0,
16761 "Status of requested event", HFILL }},
16763 {&hf_ieee80211_ff_category_code,
16764 {"Category code", "wlan_mgt.fixed.category_code",
16765 FT_UINT16, BASE_DEC|BASE_EXT_STRING, &category_codes_ext, 0,
16766 "Management action category", HFILL }},
16768 {&hf_ieee80211_ff_action_code,
16769 {"Action code", "wlan_mgt.fixed.action_code",
16770 FT_UINT16, BASE_DEC, VALS(action_codes), 0,
16771 "Management action code", HFILL }},
16773 {&hf_ieee80211_ff_dialog_token,
16774 {"Dialog token", "wlan_mgt.fixed.dialog_token",
16775 FT_UINT8, BASE_HEX, NULL, 0,
16776 "Management action dialog token", HFILL }},
16778 {&hf_ieee80211_ff_marvell_action_type,
16779 {"Marvell Action type", "wlan_mgt.fixed.mrvl_action_type",
16780 FT_UINT8, BASE_DEC, VALS(vendor_action_types_mrvl), 0,
16781 "Vendor Specific Action Type (Marvell)", HFILL }},
16783 {&hf_ieee80211_ff_marvell_mesh_mgt_action_code,
16784 {"Mesh action(Marvell)", "wlan_mgt.fixed.mrvl_mesh_action",
16785 FT_UINT8, BASE_HEX, VALS(mesh_mgt_action_codes_mrvl), 0,
16786 "Mesh action code(Marvell)", HFILL }},
16788 {&hf_ieee80211_ff_marvell_mesh_mgt_length,
16789 {"Message Length", "wlan_mgt.fixed.length",
16790 FT_UINT8, BASE_DEC, NULL, 0,
16791 NULL, HFILL }},
16793 {&hf_ieee80211_ff_marvell_mesh_mgt_mode,
16794 {"Message Mode", "wlan_mgt.fixed.mode",
16795 FT_UINT8, BASE_HEX, NULL, 0,
16796 NULL, HFILL }},
16798 {&hf_ieee80211_ff_marvell_mesh_mgt_ttl,
16799 {"Message TTL", "wlan_mgt.fixed.ttl",
16800 FT_UINT8, BASE_DEC, NULL, 0,
16801 NULL, HFILL }},
16803 {&hf_ieee80211_ff_marvell_mesh_mgt_dstcount,
16804 {"Destination Count", "wlan_mgt.fixed.dstcount",
16805 FT_UINT8, BASE_DEC, NULL, 0,
16806 NULL, HFILL }},
16808 {&hf_ieee80211_ff_marvell_mesh_mgt_hopcount,
16809 {"Hop Count", "wlan_mgt.fixed.hopcount",
16810 FT_UINT8, BASE_DEC, NULL, 0,
16811 NULL, HFILL }},
16813 {&hf_ieee80211_ff_marvell_mesh_mgt_rreqid,
16814 {"RREQ ID", "wlan_mgt.fixed.rreqid",
16815 FT_UINT32, BASE_DEC, NULL, 0,
16816 NULL, HFILL }},
16818 {&hf_ieee80211_ff_marvell_mesh_mgt_sa,
16819 {"Source Address", "wlan_mgt.fixed.sa",
16820 FT_ETHER, BASE_NONE, NULL, 0,
16821 "Source MAC address", HFILL }},
16823 {&hf_ieee80211_ff_marvell_mesh_mgt_ssn,
16824 {"SSN", "wlan_mgt.fixed.ssn",
16825 FT_UINT32, BASE_DEC, NULL, 0,
16826 "Source Sequence Number", HFILL }},
16828 {&hf_ieee80211_ff_marvell_mesh_mgt_metric,
16829 {"Metric", "wlan_mgt.fixed.metric",
16830 FT_UINT32, BASE_DEC, NULL, 0,
16831 "Route Metric", HFILL }},
16833 {&hf_ieee80211_ff_marvell_mesh_mgt_flags,
16834 {"RREQ Flags", "wlan_mgt.fixed.hopcount",
16835 FT_UINT8, BASE_HEX, NULL, 0,
16836 NULL, HFILL }},
16838 {&hf_ieee80211_ff_marvell_mesh_mgt_da,
16839 {"Destination Address", "wlan_mgt.fixed.da",
16840 FT_ETHER, BASE_NONE, NULL, 0,
16841 "Destination MAC address", HFILL }},
16843 {&hf_ieee80211_ff_marvell_mesh_mgt_dsn,
16844 {"DSN", "wlan_mgt.fixed.dsn",
16845 FT_UINT32, BASE_DEC, NULL, 0,
16846 "Destination Sequence Number", HFILL }},
16848 {&hf_ieee80211_ff_marvell_mesh_mgt_lifetime,
16849 {"Lifetime", "wlan_mgt.fixed.lifetime",
16850 FT_UINT32, BASE_DEC, NULL, 0,
16851 "Route Lifetime", HFILL }},
16853 {&hf_ieee80211_ff_wme_action_code,
16854 {"Action code", "wlan_mgt.fixed.action_code",
16855 FT_UINT16, BASE_HEX, VALS(wme_action_codes), 0,
16856 "Management notification action code", HFILL }},
16858 {&hf_ieee80211_ff_wme_status_code,
16859 {"Status code", "wlan_mgt.fixed.status_code",
16860 FT_UINT16, BASE_HEX, VALS(wme_status_codes), 0,
16861 "Management notification setup response status code", HFILL }},
16863 {&hf_ieee80211_ff_mesh_action,
16864 {"Mesh Action code", "wlan_mgt.fixed.mesh_action",
16865 FT_UINT8, BASE_HEX|BASE_EXT_STRING, &mesh_action_ext, 0,
16866 NULL, HFILL }},
16868 {&hf_ieee80211_ff_multihop_action,
16869 {"Multihop Action code", "wlan_mgt.fixed.multihop_action",
16870 FT_UINT8, BASE_HEX, VALS(multihop_action), 0,
16871 NULL, HFILL }},
16873 {&hf_ieee80211_ff_mesh_flags,
16874 {"Mesh Flags", "wlan_mgt.fixed.mesh_flags",
16875 FT_UINT8, BASE_HEX, NULL, 0,
16876 NULL, HFILL }},
16878 {&hf_ieee80211_ff_mesh_ttl,
16879 {"Mesh TTL", "wlan_mgt.fixed.mesh_ttl",
16880 FT_UINT8, BASE_HEX, NULL, 0,
16881 NULL, HFILL }},
16883 {&hf_ieee80211_ff_mesh_sequence,
16884 {"Sequence Number", "wlan_mgt.fixed.mesh_sequence",
16885 FT_UINT32, BASE_HEX, NULL, 0,
16886 NULL, HFILL }},
16888 {&hf_ieee80211_ff_mesh_addr4,
16889 {"Mesh Extended Address 4", "wlan_mgt.fixed.mesh_addr4",
16890 FT_ETHER, BASE_NONE, NULL, 0,
16891 NULL, HFILL }},
16893 {&hf_ieee80211_ff_mesh_addr5,
16894 {"Mesh Extended Address 5", "wlan_mgt.fixed.mesh_addr5",
16895 FT_ETHER, BASE_NONE, NULL, 0,
16896 NULL, HFILL }},
16898 {&hf_ieee80211_ff_mesh_addr6,
16899 {"Mesh Extended Address 6", "wlan_mgt.fixed.mesh_addr6",
16900 FT_ETHER, BASE_NONE, NULL, 0,
16901 NULL, HFILL }},
16903 {&hf_ieee80211_ff_selfprot_action,
16904 {"Self-protected Action code", "wlan_mgt.fixed.selfprot_action",
16905 FT_UINT8, BASE_HEX, VALS(selfprot_action), 0,
16906 NULL, HFILL }},
16908 {&hf_ieee80211_mesh_peering_proto,
16909 {"Mesh Peering Protocol ID", "wlan.peering.proto",
16910 FT_UINT16, BASE_HEX, VALS(mesh_peering_proto_ids), 0,
16911 NULL, HFILL }},
16913 {&hf_ieee80211_mesh_peering_local_link_id,
16914 {"Local Link ID", "wlan.peering.local_id",
16915 FT_UINT16, BASE_HEX, NULL, 0,
16916 "Mesh Peering Management Local Link ID", HFILL }},
16918 {&hf_ieee80211_mesh_peering_peer_link_id,
16919 {"Peer Link ID", "wlan.peering.peer_id",
16920 FT_UINT16, BASE_HEX, NULL, 0,
16921 "Mesh Peering Management Peer Link ID", HFILL }},
16923 {&hf_ieee80211_ff_hwmp_flags,
16924 {"HWMP Flags", "wlan.hwmp.flags",
16925 FT_UINT8, BASE_HEX, NULL, 0,
16926 NULL, HFILL }},
16928 {&hf_ieee80211_ff_hwmp_hopcount,
16929 {"HWMP Hop Count", "wlan.hwmp.hopcount",
16930 FT_UINT8, BASE_DEC, NULL, 0,
16931 NULL, HFILL }},
16933 {&hf_ieee80211_ff_hwmp_ttl,
16934 {"HWMP TTL", "wlan.hwmp.ttl",
16935 FT_UINT8, BASE_DEC, NULL, 0,
16936 NULL, HFILL }},
16938 {&hf_ieee80211_ff_hwmp_pdid,
16939 {"HWMP Path Discovery ID", "wlan.hwmp.pdid",
16940 FT_UINT32, BASE_DEC, NULL, 0,
16941 NULL, HFILL }},
16943 {&hf_ieee80211_ff_hwmp_orig_sta,
16944 {"Originator STA Address", "wlan.hwmp.orig_sta",
16945 FT_ETHER, BASE_NONE, NULL, 0,
16946 NULL, HFILL }},
16948 {&hf_ieee80211_ff_hwmp_orig_sn,
16949 {"HWMP Originator Sequence Number", "wlan.hwmp.orig_sn",
16950 FT_UINT32, BASE_DEC, NULL, 0,
16951 NULL, HFILL}},
16953 {&hf_ieee80211_ff_hwmp_orig_ext,
16954 {"Originator External Address", "wlan.hwmp.orig_ext",
16955 FT_ETHER, BASE_NONE, NULL, 0,
16956 NULL, HFILL }},
16958 {&hf_ieee80211_ff_hwmp_lifetime,
16959 {"HWMP Lifetime", "wlan.hwmp.lifetime",
16960 FT_UINT32, BASE_DEC, NULL, 0,
16961 NULL, HFILL }},
16963 {&hf_ieee80211_ff_hwmp_metric,
16964 {"HWMP Metric", "wlan.hwmp.metric",
16965 FT_UINT32, BASE_DEC, NULL, 0,
16966 NULL, HFILL }},
16968 {&hf_ieee80211_ff_hwmp_targ_count,
16969 {"HWMP Target Count", "wlan.hwmp.targ_count",
16970 FT_UINT8, BASE_DEC, NULL, 0,
16971 NULL, HFILL }},
16973 {&hf_ieee80211_ff_hwmp_targ_flags,
16974 {"HWMP Per-Target Flags", "wlan.hwmp.targ_flags",
16975 FT_UINT8, BASE_HEX, NULL, 0,
16976 NULL, HFILL }},
16978 {&hf_ieee80211_ff_hwmp_targ_to_flags,
16979 {"TO Flag", "wlan.hwmp.to_flag",
16980 FT_BOOLEAN, 8, TFS (&hwmp_targ_to_flags), 0x01,
16981 "Target Only Flag", HFILL }},
16983 {&hf_ieee80211_ff_hwmp_targ_usn_flags,
16984 {"USN Flag", "wlan.hwmp.usn_flag",
16985 FT_BOOLEAN, 8, TFS (&hwmp_targ_usn_flags), 0x04,
16986 "Unknown Target HWMP Sequence Number Flag", HFILL }},
16988 {&hf_ieee80211_ff_hwmp_targ_sta,
16989 {"Target STA Address", "wlan.hwmp.targ_sta",
16990 FT_ETHER, BASE_NONE, NULL, 0,
16991 NULL, HFILL }},
16993 {&hf_ieee80211_ff_hwmp_targ_ext,
16994 {"Target External Address", "wlan.hwmp.targ_ext",
16995 FT_ETHER, BASE_NONE, NULL, 0,
16996 NULL, HFILL }},
16998 {&hf_ieee80211_ff_hwmp_targ_sn,
16999 {"Target HWMP Sequence Number", "wlan.hwmp.targ_sn",
17000 FT_UINT32, BASE_DEC, NULL, 0,
17001 NULL, HFILL }},
17003 {&hf_ieee80211_mesh_config_path_sel_protocol,
17004 {"Path Selection Protocol", "wlan.mesh.config.ps_protocol",
17005 FT_UINT8, BASE_HEX, NULL, 0,
17006 "Mesh Configuration Path Selection Protocol", HFILL }},
17008 {&hf_ieee80211_mesh_config_path_sel_metric,
17009 {"Path Selection Metric", "wlan.mesh.config.ps_metric",
17010 FT_UINT8, BASE_HEX, NULL, 0,
17011 "Mesh Configuration Path Selection Metric", HFILL }},
17013 {&hf_ieee80211_mesh_config_congestion_control,
17014 {"Congestion Control", "wlan.mesh.config.cong_ctl",
17015 FT_UINT8, BASE_HEX, NULL, 0,
17016 "Mesh Configuration Congestion Control", HFILL }},
17018 {&hf_ieee80211_mesh_config_sync_method,
17019 {"Synchronization Method", "wlan.mesh.config.sync_method",
17020 FT_UINT8, BASE_HEX, NULL, 0,
17021 "Mesh Configuration Synchronization Method", HFILL }},
17023 {&hf_ieee80211_mesh_config_auth_protocol,
17024 {"Authentication Protocol", "wlan.mesh.config.auth_protocol",
17025 FT_UINT8, BASE_HEX, NULL, 0,
17026 "Mesh Configuration Authentication Protocol", HFILL }},
17028 {&hf_ieee80211_mesh_config_formation_info,
17029 {"Formation Info", "wlan.mesh.config.formation_info",
17030 FT_UINT8, BASE_HEX, NULL, 0,
17031 "Mesh Configuration Formation Info", HFILL }},
17033 {&hf_ieee80211_mesh_form_info_num_of_peerings,
17034 {"Number of Peerings", "wlan.mesh.config.formation_info.num_peers",
17035 FT_UINT8, BASE_DEC, NULL, 0x7E,
17036 NULL, HFILL }},
17038 {&hf_ieee80211_mesh_config_capability,
17039 {"Capability", "wlan.mesh.config.cap",
17040 FT_UINT8, BASE_HEX, NULL, 0,
17041 "Mesh Configuration Capability", HFILL }},
17043 {&hf_ieee80211_mesh_config_cap_accepting,
17044 {"Accepting Additional Mesh Peerings", "wlan.mesh.config.cap.accept",
17045 FT_BOOLEAN, 8, TFS (&tfs_yes_no), 0x01,
17046 NULL, HFILL }},
17048 {&hf_ieee80211_mesh_config_cap_mcca_support,
17049 {"MCCA Support", "wlan.mesh.config.cap.mcca_support",
17050 FT_BOOLEAN, 8, TFS (&tfs_yes_no), 0x02,
17051 NULL, HFILL }},
17053 {&hf_ieee80211_mesh_config_cap_mcca_enabled,
17054 {"MCCA Enabled", "wlan.mesh.config.cap.mcca_enabled",
17055 FT_BOOLEAN, 8, TFS (&tfs_yes_no), 0x04,
17056 NULL, HFILL }},
17058 {&hf_ieee80211_mesh_config_cap_forwarding,
17059 {"Mesh Forwarding", "wlan.mesh.config.cap.forwarding",
17060 FT_BOOLEAN, 8, TFS (&tfs_yes_no), 0x08,
17061 NULL, HFILL }},
17063 {&hf_ieee80211_mesh_config_cap_mbca_enabled,
17064 {"MBCA Enabled", "wlan.mesh.config.cap.mbca_enabled",
17065 FT_BOOLEAN, 8, TFS (&tfs_yes_no), 0x10,
17066 NULL, HFILL }},
17068 {&hf_ieee80211_mesh_config_cap_tbtt_adjusting,
17069 {"TBTT Adjustment", "wlan.mesh.config.cap.tbtt_adjusting",
17070 FT_BOOLEAN, 8, TFS (&tfs_yes_no), 0x20,
17071 NULL, HFILL }},
17073 {&hf_ieee80211_mesh_config_cap_power_save_level,
17074 {"Power Save", "wlan.mesh.config.cap.power_save_level",
17075 FT_BOOLEAN, 8, TFS (&mesh_config_cap_power_save_level_flags), 0x40,
17076 NULL, HFILL }},
17078 {&hf_ieee80211_mesh_id,
17079 {"Mesh ID", "wlan.mesh.id",
17080 FT_STRING, BASE_NONE, NULL, 0,
17081 NULL, HFILL }},
17083 {&hf_ieee80211_rann_flags,
17084 {"RANN Flags", "wlan.rann.flags",
17085 FT_UINT8, BASE_HEX, NULL, 0,
17086 "Root Announcement Flags", HFILL }},
17088 {&hf_ieee80211_rann_root_sta,
17089 {"Root STA Address", "wlan.rann.root_sta", FT_ETHER, BASE_NONE, NULL, 0,
17090 "Root Mesh STA Address", HFILL }},
17092 {&hf_ieee80211_rann_sn,
17093 {"Root STA Sequence Number", "wlan.rann.rann_sn",
17094 FT_UINT32, BASE_DEC, NULL, 0,
17095 "Root Mesh STA Sequence Number", HFILL }},
17097 {&hf_ieee80211_rann_interval,
17098 {"RANN Interval", "wlan.rann.interval",
17099 FT_UINT32, BASE_DEC, NULL, 0,
17100 "Root Announcement Interval", HFILL }},
17102 {&hf_ieee80211_ff_qos_action_code,
17103 {"Action code", "wlan_mgt.fixed.action_code",
17104 FT_UINT16, BASE_HEX, VALS(qos_action_codes), 0,
17105 "QoS management action code", HFILL }},
17107 {&hf_ieee80211_ff_ba_action,
17108 {"Action code", "wlan_mgt.fixed.action_code",
17109 FT_UINT8, BASE_HEX, VALS(ba_action_codes), 0,
17110 "Block Ack action code", HFILL }},
17112 {&hf_ieee80211_ff_dls_action_code,
17113 {"Action code", "wlan_mgt.fixed.action_code",
17114 FT_UINT16, BASE_HEX, VALS(dls_action_codes), 0,
17115 "DLS management action code", HFILL }},
17117 {&hf_ieee80211_ff_dst_mac_addr,
17118 {"Destination address", "wlan_mgt.fixed.dst_mac_addr",
17119 FT_ETHER, BASE_NONE, NULL, 0,
17120 "Destination MAC address", HFILL }},
17122 {&hf_ieee80211_ff_src_mac_addr,
17123 {"Source address", "wlan_mgt.fixed.src_mac_addr",
17124 FT_ETHER, BASE_NONE, NULL, 0,
17125 "Source MAC address", HFILL }},
17127 {&hf_ieee80211_ff_ft_action_code,
17128 {"Action code", "wlan_mgt.fixed.action_code",
17129 FT_UINT8, BASE_DEC, VALS(ft_action_codes), 0,
17130 "Management action code", HFILL }},
17132 {&hf_ieee80211_ff_sta_address,
17133 {"STA Address", "wlan_mgt.fixed.sta_address",
17134 FT_ETHER, BASE_NONE, NULL, 0,
17135 NULL, HFILL }},
17137 {&hf_ieee80211_ff_target_ap_address,
17138 {"Target AP Address", "wlan_mgt.fixed.target_ap_address",
17139 FT_ETHER, BASE_NONE, NULL, 0,
17140 "Target AP MAC address", HFILL }},
17142 {&hf_ieee80211_ff_gas_comeback_delay,
17143 {"GAS Comeback Delay", "wlan_mgt.fixed.gas_comeback_delay",
17144 FT_UINT16, BASE_DEC, NULL, 0,
17145 NULL, HFILL }},
17147 {&hf_ieee80211_ff_gas_fragment_id,
17148 {"GAS Query Response Fragment ID", "wlan_mgt.fixed.gas_fragment_id",
17149 FT_UINT8, BASE_DEC, NULL, 0x7f,
17150 NULL, HFILL }},
17152 {&hf_ieee80211_ff_more_gas_fragments,
17153 {"More GAS Fragments", "wlan_mgt.fixed.more_gas_fragments",
17154 FT_UINT8, BASE_DEC, NULL, 0x80,
17155 NULL, HFILL }},
17157 {&hf_ieee80211_ff_query_request_length,
17158 {"Query Request Length", "wlan_mgt.fixed.query_request_length",
17159 FT_UINT16, BASE_DEC, NULL, 0,
17160 NULL, HFILL }},
17162 {&hf_ieee80211_ff_query_request,
17163 {"Query Request", "wlan_mgt.fixed.query_request",
17164 FT_BYTES, BASE_NONE, NULL, 0,
17165 NULL, HFILL }},
17167 {&hf_ieee80211_ff_query_response_length,
17168 {"Query Response Length", "wlan_mgt.fixed.query_response_length",
17169 FT_UINT16, BASE_DEC, NULL, 0,
17170 NULL, HFILL }},
17172 {&hf_ieee80211_ff_query_response,
17173 {"Query Response", "wlan_mgt.fixed.query_response",
17174 FT_BYTES, BASE_NONE, NULL, 0,
17175 NULL, HFILL }},
17177 {&hf_ieee80211_gas_resp_fragments,
17178 {"GAS Query Response fragments", "wlan_mgt.fixed.fragments",
17179 FT_NONE, BASE_NONE, NULL, 0x00,
17180 NULL, HFILL } },
17182 {&hf_ieee80211_gas_resp_fragment,
17183 {"GAS Query Response fragment", "wlan_mgt.fixed.fragment",
17184 FT_FRAMENUM, BASE_NONE, NULL, 0x00,
17185 NULL, HFILL } },
17187 {&hf_ieee80211_gas_resp_fragment_overlap,
17188 {"GAS Query Response fragment overlap", "wlan_mgt.fixed.fragment.overlap",
17189 FT_BOOLEAN, BASE_NONE, NULL, 0x00,
17190 NULL, HFILL } },
17192 {&hf_ieee80211_gas_resp_fragment_overlap_conflict,
17193 {"GAS Query Response fragment overlapping with conflicting data", "wlan_mgt.fixed.fragment.overlap.conflicts",
17194 FT_BOOLEAN, BASE_NONE, NULL, 0x00,
17195 NULL, HFILL } },
17197 {&hf_ieee80211_gas_resp_fragment_multiple_tails,
17198 {"GAS Query Response has multiple tail fragments", "wlan_mgt.fixed.fragment.multiple_tails",
17199 FT_BOOLEAN, BASE_NONE, NULL, 0x00,
17200 NULL, HFILL } },
17202 {&hf_ieee80211_gas_resp_fragment_too_long_fragment,
17203 {"GAS Query Response fragment too long", "wlan_mgt.fixed.fragment.too_long_fragment",
17204 FT_BOOLEAN, BASE_NONE, NULL, 0x00,
17205 NULL, HFILL } },
17207 {&hf_ieee80211_gas_resp_fragment_error,
17208 {"GAS Query Response reassembly error", "wlan_mgt.fixed.fragment.error",
17209 FT_FRAMENUM, BASE_NONE, NULL, 0x00,
17210 NULL, HFILL } },
17212 {&hf_ieee80211_gas_resp_fragment_count,
17213 {"GAS Query Response fragment count", "wlan_mgt.fixed.fragment.count",
17214 FT_UINT32, BASE_DEC, NULL, 0x00,
17215 NULL, HFILL } },
17217 {&hf_ieee80211_gas_resp_reassembled_in,
17218 {"Reassembled in", "wlan_mgt.fixed.reassembled.in",
17219 FT_FRAMENUM, BASE_NONE, NULL, 0x00,
17220 NULL, HFILL } },
17222 {&hf_ieee80211_gas_resp_reassembled_length,
17223 {"Reassembled length", "wlan_mgt.fixed.reassembled.length",
17224 FT_UINT32, BASE_DEC, NULL, 0x00,
17225 NULL, HFILL } },
17227 {&hf_ieee80211_ff_anqp_info_id,
17228 {"Info ID", "wlan_mgt.fixed.anqp.info_id",
17229 FT_UINT16, BASE_DEC|BASE_EXT_STRING, &anqp_info_id_vals_ext, 0,
17230 "Access Network Query Protocol Info ID", HFILL }},
17232 {&hf_ieee80211_ff_anqp_info_length,
17233 {"Length", "wlan_mgt.fixed.anqp.info_length",
17234 FT_UINT16, BASE_DEC, NULL, 0,
17235 "Access Network Query Protocol Length", HFILL }},
17237 {&hf_ieee80211_ff_anqp_info,
17238 {"Information", "wlan_mgt.fixed.anqp.info",
17239 FT_BYTES, BASE_NONE, NULL, 0,
17240 "Access Network Query Protocol Information", HFILL }},
17242 {&hf_ieee80211_ff_anqp_query_id,
17243 {"ANQP Query ID", "wlan_mgt.fixed.anqp.query_id",
17244 FT_UINT16, BASE_DEC|BASE_EXT_STRING, &anqp_info_id_vals_ext, 0,
17245 "Access Network Query Protocol Query ID", HFILL }},
17247 {&hf_ieee80211_ff_anqp_capability,
17248 {"ANQP Capability", "wlan_mgt.fixed.anqp.capability",
17249 FT_UINT16, BASE_DEC|BASE_EXT_STRING, &anqp_info_id_vals_ext, 0,
17250 "Access Network Query Protocol Query ID", HFILL }},
17252 {&hf_ieee80211_ff_anqp_capability_vlen,
17253 {"Vendor-specific Capability Length", "wlan_mgt.fixed.anqp.capability_vlen",
17254 FT_UINT16, BASE_DEC, NULL, 0,
17255 NULL, HFILL }},
17257 {&hf_ieee80211_ff_anqp_capability_vendor,
17258 {"Vendor-specific Capability", "wlan_mgt.fixed.anqp.capability_vendor",
17259 FT_BYTES, BASE_NONE, NULL, 0,
17260 NULL, HFILL }},
17262 {&hf_ieee80211_ff_venue_info_group,
17263 {"Venue Group", "wlan_mgt.fixed.venue_info.group",
17264 FT_UINT8, BASE_DEC|BASE_EXT_STRING, &venue_group_vals_ext, 0,
17265 NULL, HFILL }},
17267 {&hf_ieee80211_ff_venue_info_type,
17268 {"Venue Type", "wlan_mgt.fixed.venue_info.type",
17269 FT_UINT8, BASE_DEC, NULL, 0,
17270 NULL, HFILL }},
17272 {&hf_ieee80211_ff_anqp_venue_length,
17273 {"Venue Name Duple Length", "wlan_mgt.fixed.anqp.venue.length",
17274 FT_UINT8, BASE_DEC, NULL, 0,
17275 NULL, HFILL }},
17277 {&hf_ieee80211_ff_anqp_venue_language,
17278 {"Language Code", "wlan_mgt.fixed.anqp.venue.language",
17279 FT_STRING, BASE_NONE, NULL, 0,
17280 "Venue Name Language Code", HFILL }},
17282 {&hf_ieee80211_ff_anqp_venue_name,
17283 {"Venue Name", "wlan_mgt.fixed.anqp.venue.name",
17284 FT_STRING, BASE_NONE, NULL, 0,
17285 NULL, HFILL }},
17287 {&hf_ieee80211_ff_anqp_nw_auth_type_indicator,
17288 {"Network Authentication Type Indicator", "wlan_mgt.fixed.anqp.nw_auth_type.indicator",
17289 FT_UINT8, BASE_DEC, VALS(nw_auth_type_vals), 0,
17290 NULL, HFILL }},
17292 {&hf_ieee80211_ff_anqp_nw_auth_type_url_len,
17293 {"Re-direct URL Length", "wlan_mgt.fixed.anqp.nw_auth_type.url_len",
17294 FT_UINT16, BASE_DEC, NULL, 0,
17295 NULL, HFILL }},
17297 {&hf_ieee80211_ff_anqp_nw_auth_type_url,
17298 {"Re-direct URL", "wlan_mgt.fixed.anqp.nw_auth_type_url",
17299 FT_STRING, BASE_NONE, NULL, 0,
17300 NULL, HFILL }},
17302 {&hf_ieee80211_ff_anqp_roaming_consortium_oi_len,
17303 {"OI Length", "wlan_mgt.fixed.anqp.roaming_consortium.oi_len",
17304 FT_UINT8, BASE_DEC, NULL, 0,
17305 "Roaming Consortium OI Length", HFILL }},
17307 {&hf_ieee80211_ff_anqp_roaming_consortium_oi,
17308 {"OI", "wlan_mgt.fixed.anqp.roaming_consortium.oi",
17309 FT_BYTES, BASE_NONE, NULL, 0,
17310 "Roaming Consortium OI", HFILL }},
17312 {&hf_ieee80211_ff_anqp_ip_addr_avail_ipv6,
17313 {"IPv6 Address", "wlan_mgt.fixed.anqp.ip_addr_availability.ipv6",
17314 FT_UINT8, BASE_DEC, VALS(ip_addr_avail_ipv6_vals), 0x03,
17315 "IP Address Type Availability information for IPv6", HFILL }},
17317 {&hf_ieee80211_ff_anqp_ip_addr_avail_ipv4,
17318 {"IPv4 Address", "wlan_mgt.fixed.anqp.ip_addr_availability.ipv4",
17319 FT_UINT8, BASE_DEC, VALS(ip_addr_avail_ipv4_vals), 0xfc,
17320 "IP Address Type Availability information for IPv4", HFILL }},
17322 {&hf_ieee80211_ff_anqp_nai_realm_count,
17323 {"NAI Realm Count", "wlan_mgt.fixed.anqp.nai_realm_list.count",
17324 FT_UINT16, BASE_DEC, NULL, 0,
17325 NULL, HFILL }},
17327 {&hf_ieee80211_ff_anqp_nai_field_len,
17328 {"NAI Realm Data Field Length", "wlan_mgt.fixed.anqp.nai_realm_list.field_len",
17329 FT_UINT16, BASE_DEC, NULL, 0,
17330 NULL, HFILL }},
17332 {&hf_ieee80211_ff_anqp_nai_realm_encoding,
17333 {"NAI Realm Encoding", "wlan_mgt.fixed.naqp_nai_realm_list.encoding",
17334 FT_UINT8, BASE_DEC, VALS(nai_realm_encoding_vals), 0x01,
17335 NULL, HFILL }},
17337 {&hf_ieee80211_ff_anqp_nai_realm_length,
17338 {"NAI Realm Length", "wlan_mgt.fixed.naqp_nai_realm_list.realm_length",
17339 FT_UINT8, BASE_DEC, NULL, 0,
17340 NULL, HFILL }},
17342 {&hf_ieee80211_ff_anqp_nai_realm,
17343 {"NAI Realm", "wlan_mgt.fixed.naqp_nai_realm_list.realm",
17344 FT_STRING, BASE_NONE, NULL, 0,
17345 NULL, HFILL }},
17347 {&hf_ieee80211_ff_anqp_nai_realm_eap_count,
17348 {"EAP Method Count", "wlan_mgt.fixed.naqp_nai_realm_list.eap_method_count",
17349 FT_UINT8, BASE_DEC, NULL, 0,
17350 NULL, HFILL }},
17352 {&hf_ieee80211_ff_anqp_nai_realm_eap_len,
17353 {"EAP Method subfield Length", "wlan_mgt.fixed.naqp_nai_realm_list.eap_method_len",
17354 FT_UINT8, BASE_DEC, NULL, 0,
17355 NULL, HFILL }},
17357 {&hf_ieee80211_ff_anqp_nai_realm_eap_method,
17358 {"EAP Method", "wlan_mgt.fixed.naqp_nai_realm_list.eap_method",
17359 FT_UINT8, BASE_DEC|BASE_EXT_STRING, &eap_type_vals_ext, 0,
17360 NULL, HFILL }},
17362 {&hf_ieee80211_ff_anqp_nai_realm_auth_param_count,
17363 {"Authentication Parameter Count", "wlan_mgt.fixed.naqp_nai_realm_list.auth_param_count",
17364 FT_UINT8, BASE_DEC, NULL, 0,
17365 NULL, HFILL }},
17367 {&hf_ieee80211_ff_anqp_nai_realm_auth_param_id,
17368 {"Authentication Parameter ID", "wlan_mgt.fixed.naqp_nai_realm_list.auth_param_id",
17369 FT_UINT8, BASE_DEC, VALS(nai_realm_auth_param_id_vals), 0,
17370 NULL, HFILL }},
17372 {&hf_ieee80211_ff_anqp_nai_realm_auth_param_len,
17373 {"Authentication Parameter Length", "wlan_mgt.fixed.naqp_nai_realm_list.auth_param_len",
17374 FT_UINT8, BASE_DEC, NULL, 0,
17375 NULL, HFILL }},
17377 {&hf_ieee80211_ff_anqp_nai_realm_auth_param_value,
17378 {"Authentication Parameter Value", "wlan_mgt.fixed.naqp_nai_realm_list.auth_param_value",
17379 FT_BYTES, BASE_NONE, NULL, 0,
17380 NULL, HFILL }},
17382 {&hf_ieee80211_3gpp_gc_gud,
17383 {"GUD", "wlan_mgt.fixed.anqp.3gpp_cellular_info.gud",
17384 FT_UINT8, BASE_DEC, NULL, 0,
17385 "Generic container User Data", HFILL }},
17387 {&hf_ieee80211_3gpp_gc_udhl,
17388 {"UDHL", "wlan_mgt.fixed.anqp.3gpp_cellular_info.udhl",
17389 FT_UINT8, BASE_DEC, NULL, 0,
17390 "User Data Header Length", HFILL }},
17392 {&hf_ieee80211_3gpp_gc_iei,
17393 {"IEI", "wlan_mgt.fixed.anqp.3gpp_cellular_info.iei",
17394 FT_UINT8, BASE_DEC, NULL, 0,
17395 "Information Element Identity", HFILL }},
17397 {&hf_ieee80211_3gpp_gc_plmn_len,
17398 {"PLMN Length", "wlan_mgt.fixed.anqp.3gpp_cellular_info.plmn_len",
17399 FT_UINT8, BASE_DEC, NULL, 0,
17400 "Length of PLMN List value contents", HFILL }},
17402 {&hf_ieee80211_3gpp_gc_num_plmns,
17403 {"Number of PLMNs", "wlan_mgt.fixed.anqp.3gpp_cellular_info.num_plmns",
17404 FT_UINT8, BASE_DEC, NULL, 0,
17405 NULL, HFILL }},
17407 {&hf_ieee80211_3gpp_gc_plmn,
17408 {"PLMN", "wlan_mgt.fixed.anqp.3gpp_cellular_info.plmn",
17409 FT_STRING, BASE_NONE, NULL, 0,
17410 "PLMN information", HFILL }},
17412 {&hf_ieee80211_ff_anqp_domain_name_len,
17413 {"Domain Name Length", "wlan_mgt.fixed.anqp.domain_name_list.len",
17414 FT_UINT8, BASE_DEC, NULL, 0,
17415 NULL, HFILL }},
17417 {&hf_ieee80211_ff_anqp_domain_name,
17418 {"Domain Name", "wlan_mgt.fixed.anqp.domain_name_list.name",
17419 FT_STRING, BASE_NONE, NULL, 0,
17420 NULL, HFILL }},
17422 {&hf_ieee80211_ff_dls_timeout,
17423 {"DLS timeout", "wlan_mgt.fixed.dls_timeout",
17424 FT_UINT16, BASE_HEX, NULL, 0,
17425 "DLS timeout value", HFILL }},
17427 {&hf_ieee80211_ff_sa_query_action_code,
17428 {"Action code", "wlan_mgt.fixed.action_code",
17429 FT_UINT8, BASE_DEC, VALS(sa_query_action_codes), 0,
17430 "Management action code", HFILL }},
17432 {&hf_ieee80211_ff_transaction_id,
17433 {"Transaction Id", "wlan_mgt.fixed.transaction_id",
17434 FT_UINT16, BASE_HEX, NULL, 0,
17435 NULL, HFILL }},
17437 {&hf_ieee80211_anqp_wfa_subtype,
17438 {"ANQP WFA Subtype", "wlan_mgt.anqp.wfa.subtype",
17439 FT_UINT8, BASE_DEC, VALS(wfa_subtype_vals), 0, NULL, HFILL }},
17441 {&hf_hs20_indication_dgaf_disabled,
17442 {"DGAF Disabled", "wlan_mgt.hs20.indication.dgaf_disabled",
17443 FT_UINT8, BASE_DEC, NULL, 0x01, NULL, HFILL }},
17445 {&hf_hs20_anqp_subtype,
17446 {"Subtype", "wlan_mgt.hs20.anqp.subtype",
17447 FT_UINT8, BASE_DEC, VALS(hs20_anqp_subtype_vals), 0,
17448 "Hotspot 2.0 ANQP Subtype", HFILL }},
17450 {&hf_hs20_anqp_reserved,
17451 {"Reserved", "wlan_mgt.hs20.anqp.reserved",
17452 FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
17454 {&hf_hs20_anqp_payload,
17455 {"Payload", "wlan_mgt.hs20.anqp.payload",
17456 FT_BYTES, BASE_NONE, NULL, 0,
17457 "Hotspot 2.0 ANQP Payload", HFILL }},
17459 {&hf_hs20_anqp_hs_query_list,
17460 {"Queried Subtype", "wlan_mgt.hs20.anqp.hs_query_list",
17461 FT_UINT8, BASE_DEC, VALS(hs20_anqp_subtype_vals), 0,
17462 "Queried HS 2.0 Element Subtype", HFILL }},
17464 {&hf_hs20_anqp_hs_capability_list,
17465 {"Capability", "wlan_mgt.hs20.anqp.hs_capability_list",
17466 FT_UINT8, BASE_DEC, VALS(hs20_anqp_subtype_vals), 0,
17467 "Hotspot 2.0 ANQP Subtype Capability", HFILL }},
17469 {&hf_hs20_anqp_ofn_length,
17470 {"Length", "wlan_mgt.hs20.anqp.ofn.length",
17471 FT_UINT8, BASE_DEC, NULL, 0,
17472 "Operator Friendly Name Length", HFILL }},
17474 {&hf_hs20_anqp_ofn_language,
17475 {"Language Code", "wlan_mgt.hs20.anqp.ofn.language",
17476 FT_STRING, BASE_NONE, NULL, 0,
17477 "Operator Friendly Name Language Code", HFILL }},
17479 {&hf_hs20_anqp_ofn_name,
17480 {"Operator Friendly Name", "wlan_mgt.hs20.anqp.ofn.name",
17481 FT_STRING, BASE_NONE, NULL, 0,
17482 NULL, HFILL }},
17484 {&hf_hs20_anqp_wan_metrics_link_status,
17485 {"Link Status", "wlan_mgt.hs20.anqp.wan_metrics.link_status",
17486 FT_UINT8, BASE_DEC, VALS(hs20_wm_link_status_vals), 0x03, NULL, HFILL }},
17488 {&hf_hs20_anqp_wan_metrics_symmetric_link,
17489 {"Symmetric Link", "wlan_mgt.hs20.anqp.wan_metrics.symmetric_link",
17490 FT_UINT8, BASE_DEC, NULL, 0x04, NULL, HFILL }},
17492 {&hf_hs20_anqp_wan_metrics_at_capacity,
17493 {"At Capacity", "wlan_mgt.hs20.anqp.wan_metrics.at_capacity",
17494 FT_UINT8, BASE_DEC, NULL, 0x08, NULL, HFILL }},
17496 {&hf_hs20_anqp_wan_metrics_reserved,
17497 {"Reserved", "wlan_mgt.hs20.anqp.wan_metrics.reserved",
17498 FT_UINT8, BASE_DEC, NULL, 0xf0, NULL, HFILL }},
17500 {&hf_hs20_anqp_wan_metrics_downlink_speed,
17501 {"Downlink Speed", "wlan_mgt.hs20.anqp.wan_metrics.downlink_speed",
17502 FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
17504 {&hf_hs20_anqp_wan_metrics_uplink_speed,
17505 {"Uplink Speed", "wlan_mgt.hs20.anqp.wan_metrics.uplink_speed",
17506 FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
17508 {&hf_hs20_anqp_wan_metrics_downlink_load,
17509 {"Downlink Load", "wlan_mgt.hs20.anqp.wan_metrics.downlink_load",
17510 FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
17512 {&hf_hs20_anqp_wan_metrics_uplink_load,
17513 {"Uplink Load", "wlan_mgt.hs20.anqp.wan_metrics.uplink_load",
17514 FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
17516 {&hf_hs20_anqp_wan_metrics_lmd,
17517 {"LMD", "wlan_mgt.hs20.anqp.wan_metrics.lmd",
17518 FT_UINT16, BASE_DEC, NULL, 0, "Load Measurement Duration", HFILL }},
17520 {&hf_hs20_anqp_cc_proto_ip_proto,
17521 {"IP Protocol", "wlan_mgt.hs20.anqp.cc.ip_proto",
17522 FT_UINT8, BASE_DEC, NULL, 0,
17523 "ProtoPort Tuple - IP Protocol", HFILL }},
17525 {&hf_hs20_anqp_cc_proto_port_num,
17526 {"Port Number", "wlan_mgt.hs20.anqp.cc.port_num",
17527 FT_UINT16, BASE_DEC, NULL, 0,
17528 "ProtoPort Tuple - Port Number", HFILL }},
17530 {&hf_hs20_anqp_cc_proto_status,
17531 {"Status", "wlan_mgt.hs20.anqp.cc.status",
17532 FT_UINT8, BASE_DEC, VALS(hs20_cc_status_vals), 0,
17533 "ProtoPort Tuple - Status", HFILL }},
17535 {&hf_hs20_anqp_nai_hrq_count,
17536 {"NAI Home Realm Count", "wlan_mgt.hs20.anqp.nai_hrq.count",
17537 FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
17539 {&hf_hs20_anqp_nai_hrq_encoding_type,
17540 {"NAI Home Realm Encoding Type",
17541 "wlan_mgt.hs20.anqp.nai_hrq.encoding_type",
17542 FT_UINT8, BASE_DEC, VALS(nai_realm_encoding_vals),
17543 0x01, NULL, HFILL }},
17545 {&hf_hs20_anqp_nai_hrq_length,
17546 {"NAI Home Realm Name Length", "wlan_mgt.hs20.anqp.nai_hrq.length",
17547 FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
17549 {&hf_hs20_anqp_nai_hrq_realm_name,
17550 {"NAI Home Realm Name", "wlan_mgt.hs20.anqp.nai_hrq.name",
17551 FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL }},
17553 {&hf_hs20_anqp_oper_class_indic,
17554 {"Operating Class", "wlan_mgt.hs20.anqp.oper_class_indic.oper_class",
17555 FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
17557 {&hf_ieee80211_tag,
17558 {"Tag", "wlan_mgt.tag",
17559 FT_NONE, BASE_NONE, 0x0, 0,
17560 NULL, HFILL }},
17562 {&hf_ieee80211_tag_number,
17563 {"Tag Number", "wlan_mgt.tag.number",
17564 FT_UINT8, BASE_DEC|BASE_EXT_STRING, &tag_num_vals_ext, 0,
17565 "Element ID", HFILL }},
17567 {&hf_ieee80211_tag_length,
17568 {"Tag length", "wlan_mgt.tag.length",
17569 FT_UINT32, BASE_DEC, NULL, 0,
17570 "Length of tag", HFILL }},
17572 {&hf_ieee80211_tag_interpretation,
17573 {"Tag interpretation", "wlan_mgt.tag.interpretation",
17574 FT_STRING, BASE_NONE, NULL, 0,
17575 "Interpretation of tag", HFILL }},
17577 {&hf_ieee80211_tag_data,
17578 {"Tag Data", "wlan_mgt.tag.data",
17579 FT_BYTES, BASE_NONE, NULL, 0,
17580 "Data Interpretation of tag", HFILL }},
17582 {&hf_ieee80211_tag_oui,
17583 {"OUI", "wlan_mgt.tag.oui",
17584 FT_UINT24, BASE_CUSTOM, oui_base_custom, 0, "OUI of vendor specific IE", HFILL }},
17586 {&hf_ieee80211_tag_ds_param_channel,
17587 {"Current Channel", "wlan_mgt.ds.current_channel",
17588 FT_UINT8, BASE_DEC, NULL, 0,
17589 "DS Parameter Set - Current Channel", HFILL }},
17591 {&hf_ieee80211_tag_cfp_count,
17592 {"CFP Count", "wlan_mgt.cfp.count",
17593 FT_UINT8, BASE_DEC, NULL, 0,
17594 "Indicates how many delivery traffic indication messages (DTIMs)", HFILL }},
17596 {&hf_ieee80211_tag_cfp_period,
17597 {"CFP Period", "wlan_mgt.cfp.period",
17598 FT_UINT8, BASE_DEC, NULL, 0,
17599 "Indicates the number of DTIM intervals between the start of CFPs", HFILL }},
17601 {&hf_ieee80211_tag_cfp_max_duration,
17602 {"CFP Max Duration", "wlan_mgt.cfp.max_duration",
17603 FT_UINT16, BASE_DEC, NULL, 0,
17604 "Indicates the maximum duration (in TU) of the CFP that may be generated by this PCF", HFILL }},
17606 {&hf_ieee80211_tag_cfp_dur_remaining,
17607 {"CFP Dur Remaining", "wlan_mgt.cfp.dur_remaining",
17608 FT_UINT16, BASE_DEC, NULL, 0,
17609 "Indicates the maximum time (in TU) remaining in the present CFP", HFILL }},
17611 {&hf_ieee80211_tag_vendor_oui_type,
17612 {"Vendor Specific OUI Type", "wlan_mgt.tag.vendor.oui.type",
17613 FT_UINT8, BASE_DEC, NULL, 0,
17614 NULL, HFILL }},
17616 {&hf_ieee80211_tag_vendor_data,
17617 {"Vendor Specific Data", "wlan_mgt.tag.vendor.data",
17618 FT_BYTES, BASE_NONE, NULL, 0,
17619 "Unknown/undecoded Vendor Specific Data", HFILL }},
17621 {&hf_ieee80211_tim_dtim_count,
17622 {"DTIM count", "wlan_mgt.tim.dtim_count",
17623 FT_UINT8, BASE_DEC, NULL, 0,
17624 "Indicates how many Beacon frames (including the current frame) appear before the next DTIM", HFILL }},
17626 {&hf_ieee80211_tim_dtim_period,
17627 {"DTIM period", "wlan_mgt.tim.dtim_period",
17628 FT_UINT8, BASE_DEC, NULL, 0,
17629 "Indicates the number of beacon intervals between successive DTIMs", HFILL }},
17631 {&hf_ieee80211_tim_bmapctl,
17632 {"Bitmap control", "wlan_mgt.tim.bmapctl",
17633 FT_UINT8, BASE_HEX, NULL, 0,
17634 NULL, HFILL }},
17636 {&hf_ieee80211_tim_bmapctl_mcast,
17637 {"Multicast", "wlan_mgt.tim.bmapctl.multicast",
17638 FT_BOOLEAN, 8, NULL, 0x1,
17639 "Contains the Traffic Indicator bit associated with Association ID 0", HFILL }},
17641 {&hf_ieee80211_tim_bmapctl_offset,
17642 {"Bitmap Offset", "wlan_mgt.tim.bmapctl.offset",
17643 FT_UINT8, BASE_HEX, NULL, 0xFE,
17644 NULL, HFILL }},
17646 {&hf_ieee80211_tim_partial_virtual_bitmap,
17647 {"Partial Virtual Bitmap", "wlan_mgt.tim.partial_virtual_bitmap",
17648 FT_BYTES, BASE_NONE, NULL, 0x0,
17649 NULL, HFILL }},
17651 {&hf_ieee80211_tag_ibss_atim_window,
17652 {"Atim Windows", "wlan_mgt.ibss.atim_windows",
17653 FT_UINT16, BASE_HEX, NULL, 0x0,
17654 "Contains the ATIM Window length in TU", HFILL }},
17656 {&hf_ieee80211_tag_country_info_code,
17657 {"Code", "wlan_mgt.country_info.code",
17658 FT_STRING, BASE_NONE, NULL, 0x0,
17659 NULL, HFILL }},
17661 {&hf_ieee80211_tag_country_info_env,
17662 {"Environment", "wlan_mgt.country_info.environment",
17663 FT_UINT8, BASE_HEX, VALS(environment_vals), 0x0,
17664 NULL, HFILL }},
17666 {&hf_ieee80211_tag_country_info_pad,
17667 {"Padding", "wlan_mgt.country_info.padding",
17668 FT_BYTES, BASE_NONE, NULL, 0x0,
17669 NULL, HFILL }},
17671 {&hf_ieee80211_tag_country_info_fnm,
17672 {"Country Info", "wlan_mgt.country_info.fnm",
17673 FT_NONE, BASE_NONE, NULL, 0x0,
17674 NULL, HFILL }},
17676 {&hf_ieee80211_tag_country_info_fnm_fcn,
17677 {"First Channel Number", "wlan_mgt.country_info.fnm.fcn",
17678 FT_UINT8, BASE_DEC, NULL, 0x0,
17679 NULL, HFILL }},
17681 {&hf_ieee80211_tag_country_info_fnm_nc,
17682 {"Number of Channels", "wlan_mgt.country_info.fnm.nc",
17683 FT_UINT8, BASE_DEC, NULL, 0x0,
17684 NULL, HFILL }},
17686 {&hf_ieee80211_tag_country_info_fnm_mtpl,
17687 {"Maximum Transmit Power Level (in dBm)", "wlan_mgt.country_info.fnm.mtpl",
17688 FT_UINT8, BASE_DEC, NULL, 0x0,
17689 NULL, HFILL }},
17691 {&hf_ieee80211_tag_country_info_rrc,
17692 {"Country Info", "wlan_mgt.country_info.rrc",
17693 FT_NONE, BASE_NONE, NULL, 0x0,
17694 NULL, HFILL }},
17696 {&hf_ieee80211_tag_country_info_rrc_rei,
17697 {"Regulatory Extension Identifier", "wlan_mgt.country_info.rrc.rei",
17698 FT_UINT8, BASE_DEC, NULL, 0x0,
17699 NULL, HFILL }},
17701 {&hf_ieee80211_tag_country_info_rrc_rc,
17702 {"Regulatory Class", "wlan_mgt.country_info.rrc.rc",
17703 FT_UINT8, BASE_DEC, NULL, 0x0,
17704 NULL, HFILL }},
17706 {&hf_ieee80211_tag_country_info_rrc_cc,
17707 {"Coverage Class", "wlan_mgt.country_info.rrc.cc",
17708 FT_UINT8, BASE_DEC, NULL, 0x0,
17709 NULL, HFILL }},
17711 {&hf_ieee80211_tag_fh_hopping_parameter_prime_radix,
17712 {"Prime Radix", "wlan_mgt.fh_hopping.parameter.prime_radix",
17713 FT_UINT8, BASE_DEC, NULL, 0x0,
17714 NULL, HFILL }},
17716 {&hf_ieee80211_tag_fh_hopping_parameter_nb_channels,
17717 {"Number of Channels", "wlan_mgt.fh_hopping.parameter.nb_channels",
17718 FT_UINT8, BASE_DEC, NULL, 0x0,
17719 NULL, HFILL }},
17721 {&hf_ieee80211_tag_fh_hopping_table_flag,
17722 {"Flag", "wlan_mgt.fh_hopping.table.flag",
17723 FT_UINT8, BASE_HEX, NULL, 0x0,
17724 "Indicates that a Random Table is present when the value is 1", HFILL }},
17726 {&hf_ieee80211_tag_fh_hopping_table_number_of_sets,
17727 {"Number of Sets", "wlan_mgt.fh_hopping.table.number_of_sets",
17728 FT_UINT8, BASE_DEC, NULL, 0x0,
17729 "Indicates the total number of sets within the hopping patterns", HFILL }},
17731 {&hf_ieee80211_tag_fh_hopping_table_modulus,
17732 {"Modulus", "wlan_mgt.fh_hopping.table.modulus",
17733 FT_UINT8, BASE_HEX, NULL, 0x0,
17734 "Indicate the values to be used in the equations to create a hopping sequence from the Random Table information", HFILL }},
17736 {&hf_ieee80211_tag_fh_hopping_table_offset,
17737 {"Offset", "wlan_mgt.fh_hopping.table.offset",
17738 FT_UINT8, BASE_HEX, NULL, 0x0,
17739 "Indicate the values to be used in the equations to create a hopping sequence from the Random Table information", HFILL }},
17741 {&hf_ieee80211_tag_fh_hopping_random_table,
17742 {"Random Table", "wlan_mgt.fh_hopping.table.random_table",
17743 FT_UINT16, BASE_HEX, NULL, 0x0,
17744 "It is a vector of single octet values that indicate the random sequence to be followed during a hopping sequence", HFILL }},
17746 {&hf_ieee80211_tag_request,
17747 {"Requested Element ID", "wlan_mgt.tag.request",
17748 FT_UINT8, BASE_DEC|BASE_EXT_STRING, &tag_num_vals_ext, 0,
17749 "The list of elements that are to be included in the responding STA Probe Response frame", HFILL }},
17751 {&hf_ieee80211_tclas_up,
17752 {"User Priority", "wlan_mgt.tclas.user_priority",
17753 FT_UINT8, BASE_DEC, NULL, 0,
17754 "Contains the value of the UP of the associated MSDUs", HFILL }},
17756 {&hf_ieee80211_tclas_class_type,
17757 {"Classifier Type", "wlan_mgt.tclas.class_type",
17758 FT_UINT8, BASE_DEC, VALS (classifier_type), 0,
17759 "Specifies the type of classifier parameters", HFILL }},
17761 {&hf_ieee80211_tclas_class_mask,
17762 {"Classifier Mask", "wlan_mgt.tclas.class_mask",
17763 FT_UINT8, BASE_HEX, NULL, 0,
17764 "Specifies a bitmap where bits that are set to 1 identify a subset of the classifier parameters", HFILL }},
17765 {&hf_ieee80211_tclas_class_mask0_src_addr,
17766 {"Source Address", "wlan_mgt.tclas.class_mask.src_addr",
17767 FT_UINT8, BASE_HEX, NULL, 0x01, NULL, HFILL }},
17768 {&hf_ieee80211_tclas_class_mask0_dst_addr,
17769 {"Destination Address", "wlan_mgt.tclas.class_mask.dst_addr",
17770 FT_UINT8, BASE_HEX, NULL, 0x02, NULL, HFILL }},
17771 {&hf_ieee80211_tclas_class_mask0_type,
17772 {"Type", "wlan_mgt.tclas.class_mask.type",
17773 FT_UINT8, BASE_HEX, NULL, 0x04, NULL, HFILL }},
17774 {&hf_ieee80211_tclas_class_mask1_ver,
17775 {"Version", "wlan_mgt.tclas.class_mask.version",
17776 FT_UINT8, BASE_HEX, NULL, 0x01, NULL, HFILL }},
17777 {&hf_ieee80211_tclas_class_mask1_src_ip,
17778 {"Source IP Address", "wlan_mgt.tclas.class_mask.src_ip",
17779 FT_UINT8, BASE_HEX, NULL, 0x02, NULL, HFILL }},
17780 {&hf_ieee80211_tclas_class_mask1_dst_ip,
17781 {"Destination IP Address", "wlan_mgt.tclas.class_mask.dst_ip",
17782 FT_UINT8, BASE_HEX, NULL, 0x04, NULL, HFILL }},
17783 {&hf_ieee80211_tclas_class_mask1_src_port,
17784 {"Source Port", "wlan_mgt.tclas.class_mask.src_port",
17785 FT_UINT8, BASE_HEX, NULL, 0x08, NULL, HFILL }},
17786 {&hf_ieee80211_tclas_class_mask1_dst_port,
17787 {"Destination Port", "wlan_mgt.tclas.class_mask.dst_port",
17788 FT_UINT8, BASE_HEX, NULL, 0x10, NULL, HFILL }},
17789 {&hf_ieee80211_tclas_class_mask1_ipv4_dscp,
17790 {"DSCP", "wlan_mgt.tclas.class_mask.dscp",
17791 FT_UINT8, BASE_HEX, NULL, 0x20, NULL, HFILL }},
17792 {&hf_ieee80211_tclas_class_mask1_ipv4_proto,
17793 {"Protocol", "wlan_mgt.tclas.class_mask.proto",
17794 FT_UINT8, BASE_HEX, NULL, 0x40, NULL, HFILL }},
17795 {&hf_ieee80211_tclas_class_mask1_ipv6_flow,
17796 {"Flow Label", "wlan_mgt.tclas.class_mask.flow_label",
17797 FT_UINT8, BASE_HEX, NULL, 0x20, NULL, HFILL }},
17798 {&hf_ieee80211_tclas_class_mask2_tci,
17799 {"802.1Q CLAN TCI", "wlan_mgt.tclas.class_mask.tci",
17800 FT_UINT8, BASE_HEX, NULL, 0x01, NULL, HFILL }},
17802 {&hf_ieee80211_tclas_src_mac_addr,
17803 {"Source address", "wlan_mgt.tclas.type",
17804 FT_ETHER, BASE_NONE, NULL, 0,
17805 "Classifier Parameters Ethernet Type", HFILL }},
17807 {&hf_ieee80211_tclas_dst_mac_addr,
17808 {"Destination address", "wlan_mgt.tclas.type",
17809 FT_ETHER, BASE_NONE, NULL, 0,
17810 NULL, HFILL }},
17812 {&hf_ieee80211_tclas_ether_type,
17813 {"Ethernet Type", "wlan_mgt.tclas.type",
17814 FT_UINT8, BASE_DEC, NULL, 0,
17815 NULL, HFILL }},
17817 {&hf_ieee80211_tclas_version,
17818 {"IP Version", "wlan_mgt.tclas.version",
17819 FT_UINT8, BASE_DEC, NULL, 0,
17820 NULL, HFILL }},
17822 {&hf_ieee80211_tclas_ipv4_src,
17823 {"IPv4 Src Addr", "wlan_mgt.tclas.ipv4_src",
17824 FT_IPv4, BASE_NONE, NULL, 0,
17825 NULL, HFILL }},
17827 {&hf_ieee80211_tclas_ipv4_dst,
17828 {"IPv4 Dst Addr", "wlan_mgt.tclas.ipv4_dst",
17829 FT_IPv4, BASE_NONE, NULL, 0,
17830 NULL, HFILL }},
17832 {&hf_ieee80211_tclas_src_port,
17833 {"Source Port", "wlan_mgt.tclas.src_port",
17834 FT_UINT16, BASE_DEC, NULL, 0,
17835 NULL, HFILL }},
17837 {&hf_ieee80211_tclas_dst_port,
17838 {"Destination Port", "wlan_mgt.tclas.dst_port",
17839 FT_UINT16, BASE_DEC, NULL, 0,
17840 NULL, HFILL }},
17842 {&hf_ieee80211_tclas_dscp,
17843 {"IPv4 DSCP", "wlan_mgt.tclas.dscp",
17844 FT_UINT8, BASE_HEX, NULL, 0,
17845 "IPv4 Differentiated Services Code Point (DSCP) Field", HFILL }},
17847 {&hf_ieee80211_tclas_protocol,
17848 {"Protocol", "wlan_mgt.tclas.protocol",
17849 FT_UINT8, BASE_HEX, NULL, 0,
17850 "IPv4 Protocol", HFILL }},
17852 {&hf_ieee80211_tclas_ipv6_src,
17853 {"IPv6 Src Addr", "wlan_mgt.tclas.ipv6_src",
17854 FT_IPv6, BASE_NONE, NULL, 0,
17855 NULL, HFILL }},
17857 {&hf_ieee80211_tclas_ipv6_dst,
17858 {"IPv6 Dst Addr", "wlan_mgt.tclas.ipv6_dst",
17859 FT_IPv6, BASE_NONE, NULL, 0,
17860 NULL, HFILL }},
17862 {&hf_ieee80211_tclas_flow,
17863 {"Flow Label", "wlan_mgt.tclas.flow",
17864 FT_UINT24, BASE_HEX, NULL, 0,
17865 "IPv6 Flow Label", HFILL }},
17867 {&hf_ieee80211_tclas_tag_type,
17868 {"802.1Q Tag Type", "wlan_mgt.tclas.tag_type",
17869 FT_UINT16, BASE_HEX, NULL, 0,
17870 NULL, HFILL }},
17872 {&hf_ieee80211_tag_challenge_text,
17873 {"Challenge Text", "wlan_mgt.tag.challenge_text",
17874 FT_BYTES, BASE_NONE, NULL, 0,
17875 NULL, HFILL }},
17877 {&hf_ieee80211_rsn_version,
17878 {"RSN Version", "wlan_mgt.rsn.version",
17879 FT_UINT16, BASE_DEC, NULL, 0,
17880 "Indicates the version number of the RSNA protocol", HFILL }},
17882 {&hf_ieee80211_rsn_gcs,
17883 {"Group Cipher Suite", "wlan_mgt.rsn.gcs",
17884 FT_UINT32, BASE_CUSTOM, rsn_gcs_base_custom, 0,
17885 "Contains the cipher suite selector used by the BSS to protect broadcast/multicast traffic", HFILL }},
17887 {&hf_ieee80211_rsn_gcs_oui,
17888 {"Group Cipher Suite OUI", "wlan_mgt.rsn.gcs.oui",
17889 FT_UINT24, BASE_CUSTOM, oui_base_custom, 0,
17890 NULL, HFILL }},
17892 {&hf_ieee80211_rsn_gcs_type,
17893 {"Group Cipher Suite type", "wlan_mgt.rsn.gcs.type",
17894 FT_UINT8, BASE_DEC, NULL, 0,
17895 NULL, HFILL }},
17897 {&hf_ieee80211_rsn_gcs_80211_type,
17898 {"Group Cipher Suite type", "wlan_mgt.rsn.gcs.type",
17899 FT_UINT8, BASE_DEC, VALS(ieee80211_rsn_cipher_vals), 0,
17900 NULL, HFILL }},
17902 {&hf_ieee80211_rsn_pcs_count,
17903 {"Pairwise Cipher Suite Count", "wlan_mgt.rsn.pcs.count",
17904 FT_UINT16, BASE_DEC, NULL, 0,
17905 "Indicates the number of pairwise cipher suite selectors that are contained in the Pairwise Cipher Suite List", HFILL }},
17907 {&hf_ieee80211_rsn_pcs_list,
17908 {"Pairwise Cipher Suite List", "wlan_mgt.rsn.pcs.list",
17909 FT_NONE, BASE_NONE, NULL, 0,
17910 "Contains a series of cipher suite selectors that indicate the pairwisecipher suites", HFILL }},
17912 {&hf_ieee80211_rsn_pcs,
17913 {"Pairwise Cipher Suite", "wlan_mgt.rsn.pcs",
17914 FT_UINT32, BASE_CUSTOM, rsn_pcs_base_custom, 0,
17915 NULL, HFILL }},
17917 {&hf_ieee80211_rsn_pcs_oui,
17918 {"Pairwise Cipher Suite OUI", "wlan_mgt.rsn.pcs.oui",
17919 FT_UINT24, BASE_CUSTOM, oui_base_custom, 0,
17920 NULL, HFILL }},
17922 {&hf_ieee80211_rsn_pcs_type,
17923 {"Pairwise Cipher Suite type", "wlan_mgt.rsn.pcs.type",
17924 FT_UINT8, BASE_DEC, NULL, 0,
17925 NULL, HFILL }},
17927 {&hf_ieee80211_rsn_pcs_80211_type,
17928 {"Pairwise Cipher Suite type", "wlan_mgt.rsn.pcs.type",
17929 FT_UINT8, BASE_DEC, VALS(ieee80211_rsn_cipher_vals), 0,
17930 NULL, HFILL }},
17932 {&hf_ieee80211_rsn_akms_count,
17933 {"Auth Key Management (AKM) Suite Count", "wlan_mgt.rsn.akms.count",
17934 FT_UINT16, BASE_DEC, NULL, 0,
17935 "Indicates the number of Auth Key Management suite selectors that are contained in the Auth Key Management Suite List", HFILL }},
17937 {&hf_ieee80211_rsn_akms_list,
17938 {"Auth Key Management (AKM) List", "wlan_mgt.rsn.akms.list",
17939 FT_NONE, BASE_NONE, NULL, 0,
17940 "Contains a series of cipher suite selectors that indicate the AKM suites", HFILL }},
17942 {&hf_ieee80211_rsn_akms,
17943 {"Auth Key Management (AKM) Suite", "wlan_mgt.rsn.akms",
17944 FT_UINT32, BASE_CUSTOM, rsn_akms_base_custom, 0,
17945 NULL, HFILL }},
17947 {&hf_ieee80211_rsn_akms_oui,
17948 {"Auth Key Management (AKM) OUI", "wlan_mgt.rsn.akms.oui",
17949 FT_UINT24, BASE_CUSTOM, oui_base_custom, 0,
17950 NULL, HFILL }},
17952 {&hf_ieee80211_rsn_akms_type,
17953 {"Auth Key Management (AKM) type", "wlan_mgt.rsn.akms.type",
17954 FT_UINT8, BASE_DEC, NULL, 0,
17955 NULL, HFILL }},
17957 {&hf_ieee80211_rsn_akms_80211_type,
17958 {"Auth Key Management (AKM) type", "wlan_mgt.rsn.akms.type",
17959 FT_UINT8, BASE_DEC, VALS(ieee80211_rsn_keymgmt_vals), 0,
17960 NULL, HFILL }},
17962 {&hf_ieee80211_rsn_cap,
17963 {"RSN Capabilities", "wlan_mgt.rsn.capabilities",
17964 FT_UINT16, BASE_HEX, NULL, 0,
17965 "RSN Capability information", HFILL }},
17967 {&hf_ieee80211_rsn_cap_preauth,
17968 {"RSN Pre-Auth capabilities", "wlan_mgt.rsn.capabilities.preauth",
17969 FT_BOOLEAN, 16, TFS(&rsn_preauth_flags), 0x0001,
17970 NULL, HFILL }},
17972 {&hf_ieee80211_rsn_cap_no_pairwise,
17973 {"RSN No Pairwise capabilities", "wlan_mgt.rsn.capabilities.no_pairwise",
17974 FT_BOOLEAN, 16, TFS(&rsn_no_pairwise_flags), 0x0002,
17975 NULL, HFILL }},
17977 {&hf_ieee80211_rsn_cap_ptksa_replay_counter,
17978 {"RSN PTKSA Replay Counter capabilities", "wlan_mgt.rsn.capabilities.ptksa_replay_counter",
17979 FT_UINT16, BASE_HEX, VALS(rsn_cap_replay_counter), 0x000C,
17980 NULL, HFILL }},
17982 {&hf_ieee80211_rsn_cap_gtksa_replay_counter,
17983 {"RSN GTKSA Replay Counter capabilities", "wlan_mgt.rsn.capabilities.gtksa_replay_counter",
17984 FT_UINT16, BASE_HEX, VALS(rsn_cap_replay_counter), 0x0030,
17985 NULL, HFILL }},
17987 {&hf_ieee80211_rsn_cap_mfpr,
17988 {"Management Frame Protection Required", "wlan_mgt.rsn.capabilities.mfpr",
17989 FT_BOOLEAN, 16, NULL, 0x0040,
17990 NULL, HFILL }},
17992 {&hf_ieee80211_rsn_cap_mfpc,
17993 {"Management Frame Protection Capable", "wlan_mgt.rsn.capabilities.mfpc",
17994 FT_BOOLEAN, 16, NULL, 0x0080,
17995 NULL, HFILL }},
17997 {&hf_ieee80211_rsn_cap_peerkey,
17998 {"PeerKey Enabled", "wlan_mgt.rsn.capabilities.peerkey",
17999 FT_BOOLEAN, 16, NULL, 0x0200,
18000 NULL, HFILL }},
18002 {&hf_ieee80211_rsn_pmkid_count,
18003 {"PMKID Count", "wlan_mgt.rsn.pmkid.count",
18004 FT_UINT16, BASE_DEC, NULL, 0,
18005 "Indicates the number of PMKID selectors that are contained in the PMKID Suite List", HFILL }},
18007 {&hf_ieee80211_rsn_pmkid_list,
18008 {"PMKID List", "wlan_mgt.rsn.pmkid.list",
18009 FT_NONE, BASE_NONE, NULL, 0,
18010 "Contains a series of cipher suite selectors that indicate the AKM suites", HFILL }},
18012 {&hf_ieee80211_rsn_pmkid,
18013 {"PMKID", "wlan_mgt.pmkid.akms",
18014 FT_BYTES, BASE_NONE, NULL, 0,
18015 NULL, HFILL }},
18017 {&hf_ieee80211_rsn_gmcs,
18018 {"Group Management Cipher Suite", "wlan_mgt.rsn.gmcs",
18019 FT_UINT32, BASE_CUSTOM, rsn_gmcs_base_custom, 0,
18020 "Contains the cipher suite selector used by the BSS to protect broadcast/multicast traffic", HFILL }},
18022 {&hf_ieee80211_rsn_gmcs_oui,
18023 {"Group Management Cipher Suite OUI", "wlan_mgt.rsn.gmcs.oui",
18024 FT_UINT24, BASE_CUSTOM, oui_base_custom, 0,
18025 NULL, HFILL }},
18027 {&hf_ieee80211_rsn_gmcs_type,
18028 {"Group Management Cipher Suite type", "wlan_mgt.rsn.gmcs.type",
18029 FT_UINT8, BASE_DEC, NULL, 0,
18030 NULL, HFILL }},
18032 {&hf_ieee80211_rsn_gmcs_80211_type,
18033 {"Group Management Cipher Suite type", "wlan_mgt.rsn.gmcs.type",
18034 FT_UINT8, BASE_DEC, VALS(ieee80211_rsn_cipher_vals), 0,
18035 NULL, HFILL }},
18037 {&hf_ieee80211_ht_pren_type,
18038 {"802.11n (Pre) Type", "wlan_mgt.vs.pren.type",
18039 FT_UINT8, BASE_DEC, VALS(ieee80211_ht_pren_type_vals), 0,
18040 "Vendor Specific HT Type", HFILL }},
18041 {&hf_ieee80211_ht_pren_unknown,
18042 {"802.11n (Pre) Unknown Data", "wlan_mgt.vs.pren.unknown_data",
18043 FT_BYTES, BASE_NONE, NULL, 0,
18044 NULL, HFILL }},
18046 {&hf_ieee80211_ht_cap,
18047 {"HT Capabilities Info", "wlan_mgt.ht.capabilities",
18048 FT_UINT16, BASE_HEX, NULL, 0,
18049 "HT Capabilities information", HFILL }},
18051 {&hf_ieee80211_ht_vs_cap,
18052 {"HT Capabilities Info (VS)", "wlan_mgt.vs.ht.capabilities",
18053 FT_UINT16, BASE_HEX, NULL, 0,
18054 "Vendor Specific HT Capabilities information", HFILL }},
18056 {&hf_ieee80211_ht_ldpc_coding,
18057 {"HT LDPC coding capability", "wlan_mgt.ht.capabilities.ldpccoding",
18058 FT_BOOLEAN, 16, TFS (&ht_ldpc_coding_flag), 0x0001,
18059 NULL, HFILL }},
18061 {&hf_ieee80211_ht_chan_width,
18062 {"HT Support channel width", "wlan_mgt.ht.capabilities.width",
18063 FT_BOOLEAN, 16, TFS (&ht_chan_width_flag), 0x0002,
18064 NULL, HFILL }},
18066 {&hf_ieee80211_ht_sm_pwsave,
18067 {"HT SM Power Save", "wlan_mgt.ht.capabilities.sm",
18068 FT_UINT16, BASE_HEX, VALS(ht_sm_pwsave_flag), 0x000c,
18069 NULL, HFILL }},
18071 {&hf_ieee80211_ht_green,
18072 {"HT Green Field", "wlan_mgt.ht.capabilities.green",
18073 FT_BOOLEAN, 16, TFS (&ht_green_flag), 0x0010,
18074 NULL, HFILL }},
18076 {&hf_ieee80211_ht_short20,
18077 {"HT Short GI for 20MHz", "wlan_mgt.ht.capabilities.short20",
18078 FT_BOOLEAN, 16, TFS (&tfs_supported_not_supported), 0x0020,
18079 NULL, HFILL }},
18081 {&hf_ieee80211_ht_short40,
18082 {"HT Short GI for 40MHz", "wlan_mgt.ht.capabilities.short40",
18083 FT_BOOLEAN, 16, TFS (&tfs_supported_not_supported), 0x0040,
18084 NULL, HFILL }},
18086 {&hf_ieee80211_ht_tx_stbc,
18087 {"HT Tx STBC", "wlan_mgt.ht.capabilities.txstbc",
18088 FT_BOOLEAN, 16, TFS (&tfs_supported_not_supported), 0x0080,
18089 NULL, HFILL }},
18091 {&hf_ieee80211_ht_rx_stbc,
18092 {"HT Rx STBC", "wlan_mgt.ht.capabilities.rxstbc",
18093 FT_UINT16, BASE_HEX, VALS(ht_rx_stbc_flag), 0x0300,
18094 "HT Tx STBC", HFILL }},
18096 {&hf_ieee80211_ht_delayed_block_ack,
18097 {"HT Delayed Block ACK", "wlan_mgt.ht.capabilities.delayedblockack",
18098 FT_BOOLEAN, 16, TFS (&ht_delayed_block_ack_flag), 0x0400,
18099 NULL, HFILL }},
18101 {&hf_ieee80211_ht_max_amsdu,
18102 {"HT Max A-MSDU length", "wlan_mgt.ht.capabilities.amsdu",
18103 FT_BOOLEAN, 16, TFS (&ht_max_amsdu_flag), 0x0800,
18104 NULL, HFILL }},
18106 {&hf_ieee80211_ht_dss_cck_40,
18107 {"HT DSSS/CCK mode in 40MHz", "wlan_mgt.ht.capabilities.dsscck",
18108 FT_BOOLEAN, 16, TFS (&ht_dss_cck_40_flag), 0x1000,
18109 "HT DSS/CCK mode in 40MHz", HFILL }},
18111 {&hf_ieee80211_ht_psmp,
18112 {"HT PSMP Support", "wlan_mgt.ht.capabilities.psmp",
18113 FT_BOOLEAN, 16, TFS (&ht_psmp_flag), 0x2000,
18114 NULL, HFILL }},
18116 {&hf_ieee80211_ht_40_mhz_intolerant,
18117 {"HT Forty MHz Intolerant", "wlan_mgt.ht.capabilities.40mhzintolerant",
18118 FT_BOOLEAN, 16, TFS (&ht_40_mhz_intolerant_flag), 0x4000,
18119 NULL, HFILL }},
18121 {&hf_ieee80211_ht_l_sig,
18122 {"HT L-SIG TXOP Protection support", "wlan_mgt.ht.capabilities.lsig",
18123 FT_BOOLEAN, 16, TFS (&tfs_supported_not_supported), 0x8000,
18124 NULL, HFILL }},
18126 {&hf_ieee80211_ampduparam,
18127 {"A-MPDU Parameters", "wlan_mgt.ht.ampduparam",
18128 FT_UINT8, BASE_HEX, NULL, 0,
18129 NULL, HFILL }},
18131 {&hf_ieee80211_ampduparam_vs,
18132 {"A-MPDU Parameters (VS)", "wlan_mgt.vs.ht.ampduparam",
18133 FT_UINT8, BASE_HEX, NULL, 0,
18134 "Vendor Specific A-MPDU Parameters", HFILL }},
18136 {&hf_ieee80211_ampduparam_mpdu,
18137 {"Maximum Rx A-MPDU Length", "wlan_mgt.ht.ampduparam.maxlength",
18138 FT_UINT8, BASE_HEX, 0, 0x03,
18139 NULL, HFILL }},
18141 {&hf_ieee80211_ampduparam_mpdu_start_spacing,
18142 {"MPDU Density", "wlan_mgt.ht.ampduparam.mpdudensity",
18143 FT_UINT8, BASE_HEX, VALS(&ampduparam_mpdu_start_spacing_flags), 0x1c,
18144 NULL, HFILL }},
18146 {&hf_ieee80211_ampduparam_reserved,
18147 {"Reserved", "wlan_mgt.ht.ampduparam.reserved",
18148 FT_UINT8, BASE_HEX, NULL, 0xE0,
18149 NULL, HFILL }},
18151 {&hf_ieee80211_mcsset,
18152 {"Rx Supported Modulation and Coding Scheme Set", "wlan_mgt.ht.mcsset",
18153 FT_STRING, BASE_NONE, NULL, 0,
18154 NULL, HFILL }},
18156 {&hf_ieee80211_mcsset_vs,
18157 {"Rx Supported Modulation and Coding Scheme Set (VS)", "wlan_mgt.vs.ht.mcsset",
18158 FT_STRING, BASE_NONE, NULL, 0,
18159 "Vendor Specific Rx Supported Modulation and Coding Scheme Set", HFILL }},
18161 {&hf_ieee80211_mcsset_rx_bitmask,
18162 {"Rx Modulation and Coding Scheme (One bit per modulation)", "wlan_mgt.ht.mcsset.rxbitmask",
18163 FT_NONE, BASE_NONE, NULL, 0,
18164 "One bit per modulation", HFILL }},
18166 {&hf_ieee80211_mcsset_rx_bitmask_0to7,
18167 {"Rx Bitmask Bits 0-7", "wlan_mgt.ht.mcsset.rxbitmask.0to7",
18168 FT_UINT32, BASE_HEX, 0, 0x000000ff,
18169 NULL, HFILL }},
18171 {&hf_ieee80211_mcsset_rx_bitmask_8to15,
18172 {"Rx Bitmask Bits 8-15", "wlan_mgt.ht.mcsset.rxbitmask.8to15",
18173 FT_UINT32, BASE_HEX, 0, 0x0000ff00,
18174 NULL, HFILL }},
18176 {&hf_ieee80211_mcsset_rx_bitmask_16to23,
18177 {"Rx Bitmask Bits 16-23", "wlan_mgt.ht.mcsset.rxbitmask.16to23",
18178 FT_UINT32, BASE_HEX, 0, 0x00ff0000,
18179 NULL, HFILL }},
18181 {&hf_ieee80211_mcsset_rx_bitmask_24to31,
18182 {"Rx Bitmask Bits 24-31", "wlan_mgt.ht.mcsset.rxbitmask.24to31",
18183 FT_UINT32, BASE_HEX, 0, 0xff000000,
18184 NULL, HFILL }},
18186 {&hf_ieee80211_mcsset_rx_bitmask_32,
18187 {"Rx Bitmask Bit 32", "wlan_mgt.ht.mcsset.rxbitmask.32",
18188 FT_UINT32, BASE_HEX, 0, 0x000001,
18189 NULL, HFILL }},
18191 {&hf_ieee80211_mcsset_rx_bitmask_33to38,
18192 {"Rx Bitmask Bits 33-38", "wlan_mgt.ht.mcsset.rxbitmask.33to38",
18193 FT_UINT32, BASE_HEX, 0, 0x00007e,
18194 NULL, HFILL }},
18196 {&hf_ieee80211_mcsset_rx_bitmask_39to52,
18197 {"Rx Bitmask Bits 39-52", "wlan_mgt.ht.mcsset.rxbitmask.39to52",
18198 FT_UINT32, BASE_HEX, 0, 0x1fff80,
18199 NULL, HFILL }},
18201 {&hf_ieee80211_mcsset_rx_bitmask_53to76,
18202 {"Rx Bitmask Bits 53-76", "wlan_mgt.ht.mcsset.rxbitmask.53to76",
18203 FT_UINT32, BASE_HEX, 0, 0x1fffffe0,
18204 NULL, HFILL }},
18206 {&hf_ieee80211_mcsset_highest_data_rate,
18207 {"Highest Supported Data Rate", "wlan_mgt.ht.mcsset.highestdatarate",
18208 FT_UINT16, BASE_HEX, 0, 0x03ff,
18209 NULL, HFILL }},
18211 {&hf_ieee80211_mcsset_tx_mcs_set_defined,
18212 {"Tx Supported MCS Set", "wlan_mgt.ht.mcsset.txsetdefined",
18213 FT_BOOLEAN, 16, TFS (&mcsset_tx_mcs_set_defined_flag), 0x0001,
18214 NULL, HFILL }},
18216 {&hf_ieee80211_mcsset_tx_rx_mcs_set_not_equal,
18217 {"Tx and Rx MCS Set", "wlan_mgt.ht.mcsset.txrxmcsnotequal",
18218 FT_BOOLEAN, 16, TFS (&mcsset_tx_rx_mcs_set_not_equal_flag), 0x0002,
18219 NULL, HFILL }},
18221 {&hf_ieee80211_mcsset_tx_max_spatial_streams,
18222 {"Max Tximum Number of Spatial Streams Supported", "wlan_mgt.ht.mcsset.txmaxss",
18223 FT_UINT16, BASE_HEX, VALS(mcsset_tx_max_spatial_streams_flags) , 0x000c,
18224 NULL, HFILL }},
18226 {&hf_ieee80211_mcsset_tx_unequal_modulation,
18227 {"Unequal Modulation", "wlan_mgt.ht.mcsset.txunequalmod",
18228 FT_BOOLEAN, 16, TFS (&tfs_supported_not_supported), 0x0010,
18229 NULL, HFILL }},
18231 {&hf_ieee80211_htex_cap,
18232 {"HT Extended Capabilities", "wlan_mgt.htex.capabilities",
18233 FT_UINT16, BASE_HEX, NULL, 0,
18234 "HT Extended Capability information", HFILL }},
18236 {&hf_ieee80211_htex_vs_cap,
18237 {"HT Extended Capabilities (VS)", "wlan_mgt.vs.htex.capabilities",
18238 FT_UINT16, BASE_HEX, NULL, 0,
18239 "Vendor Specific HT Extended Capability information", HFILL }},
18241 {&hf_ieee80211_htex_pco,
18242 {"Transmitter supports PCO", "wlan_mgt.htex.capabilities.pco",
18243 FT_BOOLEAN, 16, TFS (&tfs_supported_not_supported), 0x0001,
18244 NULL, HFILL }},
18246 {&hf_ieee80211_htex_transtime,
18247 {"Time needed to transition between 20MHz and 40MHz", "wlan_mgt.htex.capabilities.transtime",
18248 FT_UINT16, BASE_HEX, VALS(htex_transtime_flags), 0x0006,
18249 NULL, HFILL }},
18251 {&hf_ieee80211_htex_mcs,
18252 {"MCS Feedback capability", "wlan_mgt.htex.capabilities.mcs",
18253 FT_UINT16, BASE_HEX, VALS(htex_mcs_flags), 0x0300,
18254 NULL, HFILL }},
18256 {&hf_ieee80211_htex_htc_support,
18257 {"High Throughput", "wlan_mgt.htex.capabilities.htc",
18258 FT_BOOLEAN, 16, TFS (&tfs_supported_not_supported), 0x0400,
18259 NULL, HFILL }},
18261 {&hf_ieee80211_htex_rd_responder,
18262 {"Reverse Direction Responder", "wlan_mgt.htex.capabilities.rdresponder",
18263 FT_BOOLEAN, 16, TFS (&tfs_supported_not_supported), 0x0800,
18264 NULL, HFILL }},
18266 {&hf_ieee80211_txbf,
18267 {"Transmit Beam Forming (TxBF) Capabilities", "wlan_mgt.txbf",
18268 FT_UINT16, BASE_HEX, NULL, 0,
18269 NULL, HFILL }},
18271 {&hf_ieee80211_txbf_vs,
18272 {"Transmit Beam Forming (TxBF) Capabilities (VS)", "wlan_mgt.vs.txbf",
18273 FT_UINT16, BASE_HEX, NULL, 0,
18274 "Vendor Specific Transmit Beam Forming (TxBF) Capabilities", HFILL }},
18276 {&hf_ieee80211_txbf_cap,
18277 {"Transmit Beamforming", "wlan_mgt.txbf.txbf",
18278 FT_BOOLEAN, 32, TFS (&tfs_supported_not_supported), 0x00000001,
18279 NULL, HFILL }},
18281 {&hf_ieee80211_txbf_rcv_ssc,
18282 {"Receive Staggered Sounding", "wlan_mgt.txbf.rxss",
18283 FT_BOOLEAN, 32, TFS (&tfs_supported_not_supported), 0x00000002,
18284 NULL, HFILL }},
18286 {&hf_ieee80211_txbf_tx_ssc,
18287 {"Transmit Staggered Sounding", "wlan_mgt.txbf.txss",
18288 FT_BOOLEAN, 32, TFS (&tfs_supported_not_supported), 0x00000004,
18289 NULL, HFILL }},
18291 {&hf_ieee80211_txbf_rcv_ndp,
18292 {"Receive Null Data packet (NDP)", "wlan_mgt.txbf.rxndp",
18293 FT_BOOLEAN, 32, TFS (&tfs_supported_not_supported), 0x00000008,
18294 NULL, HFILL }},
18296 {&hf_ieee80211_txbf_tx_ndp,
18297 {"Transmit Null Data packet (NDP)", "wlan_mgt.txbf.txndp",
18298 FT_BOOLEAN, 32, TFS (&tfs_supported_not_supported), 0x00000010,
18299 NULL, HFILL }},
18301 {&hf_ieee80211_txbf_impl_txbf,
18302 {"Implicit TxBF capable", "wlan_mgt.txbf.impltxbf",
18303 FT_BOOLEAN, 32, TFS (&tfs_supported_not_supported), 0x00000020,
18304 "Implicit Transmit Beamforming (TxBF) capable", HFILL }},
18306 {&hf_ieee80211_txbf_calib,
18307 {"Calibration", "wlan_mgt.txbf.calibration",
18308 FT_UINT32, BASE_HEX, VALS(txbf_calib_flag), 0x000000c0,
18309 NULL, HFILL }},
18311 {&hf_ieee80211_txbf_expl_csi,
18312 {"STA can apply TxBF using CSI explicit feedback", "wlan_mgt.txbf.csi",
18313 FT_BOOLEAN, 32, TFS (&tfs_supported_not_supported), 0x00000100,
18314 "Station can apply TxBF using CSI explicit feedback", HFILL }},
18316 {&hf_ieee80211_txbf_expl_uncomp_fm,
18317 {"STA can apply TxBF using uncompressed beamforming feedback matrix", "wlan_mgt.txbf.fm.uncompressed.tbf",
18318 FT_BOOLEAN, 32, TFS (&tfs_supported_not_supported), 0x00000200,
18319 "Station can apply TxBF using uncompressed beamforming feedback matrix", HFILL }},
18321 {&hf_ieee80211_txbf_expl_comp_fm,
18322 {"STA can apply TxBF using compressed beamforming feedback matrix", "wlan_mgt.txbf.fm.compressed.tbf",
18323 FT_BOOLEAN, 32, TFS (&tfs_supported_not_supported), 0x00000400,
18324 "Station can apply TxBF using compressed beamforming feedback matrix", HFILL }},
18326 {&hf_ieee80211_txbf_expl_bf_csi,
18327 {"Receiver can return explicit CSI feedback", "wlan_mgt.txbf.rcsi",
18328 FT_UINT32, BASE_HEX, VALS(txbf_feedback_flags), 0x00001800,
18329 NULL, HFILL }},
18331 {&hf_ieee80211_txbf_expl_uncomp_fm_feed,
18332 {"Receiver can return explicit uncompressed Beamforming Feedback Matrix", "wlan_mgt.txbf.fm.uncompressed.rbf",
18333 FT_UINT32, BASE_HEX, VALS(txbf_feedback_flags), 0x00006000,
18334 NULL, HFILL }},
18336 {&hf_ieee80211_txbf_expl_comp_fm_feed,
18337 {"STA can compress and use compressed Beamforming Feedback Matrix", "wlan_mgt.txbf.fm.compressed.bf",
18338 FT_UINT32, BASE_HEX, VALS(txbf_feedback_flags), 0x00018000,
18339 "Station can compress and use compressed Beamforming Feedback Matrix", HFILL }},
18341 {&hf_ieee80211_txbf_min_group,
18342 {"Minimal grouping used for explicit feedback reports", "wlan_mgt.txbf.mingroup",
18343 FT_UINT32, BASE_HEX, VALS(txbf_min_group_flags), 0x00060000,
18344 NULL, HFILL }},
18346 {&hf_ieee80211_vht_cap,
18347 {"VHT Capabilities Info", "wlan_mgt.vht.capabilities",
18348 FT_UINT32, BASE_HEX, NULL, 0,
18349 "VHT Capabilities information", HFILL }},
18351 {&hf_ieee80211_vht_max_mpdu_length,
18352 {"Maximum MPDU Length", "wlan_mgt.vht.capabilities.maxmpdulength",
18353 FT_UINT32, BASE_HEX, VALS(vht_max_mpdu_length_flag), 0x00000003,
18354 "In Octets unit", HFILL }},
18356 {&hf_ieee80211_vht_supported_chan_width_set,
18357 {"Supported Channel Width Set", "wlan_mgt.vht.capabilities.supportedchanwidthset",
18358 FT_UINT32, BASE_HEX, VALS(vht_supported_chan_width_set_flag), 0x0000000c,
18359 NULL, HFILL }},
18361 {&hf_ieee80211_vht_rx_ldpc,
18362 {"Rx LDPC", "wlan_mgt.vht.capabilities.rxldpc",
18363 FT_BOOLEAN, 32, TFS (&tfs_supported_not_supported), 0x00000010,
18364 NULL, HFILL }},
18366 {&hf_ieee80211_vht_short_gi_for_80,
18367 {"Short GI for 80MHz", "wlan_mgt.vht.capabilities.short80",
18368 FT_BOOLEAN, 32, TFS (&tfs_supported_not_supported), 0x00000020,
18369 NULL, HFILL }},
18371 {&hf_ieee80211_vht_short_gi_for_160,
18372 {"Short GI for 160MHz and 80+80MHz", "wlan_mgt.vht.capabilities.short160",
18373 FT_BOOLEAN, 32, TFS (&tfs_supported_not_supported), 0x00000040,
18374 NULL, HFILL }},
18376 {&hf_ieee80211_vht_tx_stbc,
18377 {"Tx STBC", "wlan_mgt.vht.capabilities.txstbc",
18378 FT_BOOLEAN, 32, TFS (&tfs_supported_not_supported), 0x00000080,
18379 NULL, HFILL }},
18381 {&hf_ieee80211_vht_rx_stbc,
18382 {"Rx STBC", "wlan_mgt.vht.capabilities.rxstbc",
18383 FT_UINT32, BASE_HEX, VALS(vht_rx_stbc_flag), 0x00000700,
18384 NULL, HFILL }},
18386 {&hf_ieee80211_vht_su_beamformer_cap,
18387 {"SU Beam-former Capable", "wlan_mgt.vht.capabilities.subeamformer",
18388 FT_BOOLEAN, 32, TFS (&tfs_supported_not_supported), 0x00000800,
18389 NULL, HFILL }},
18391 {&hf_ieee80211_vht_su_beamformee_cap,
18392 {"SU Beam-formee Capable", "wlan_mgt.vht.capabilities.subeamformee",
18393 FT_BOOLEAN, 32, TFS (&tfs_supported_not_supported), 0x00001000,
18394 NULL, HFILL }},
18396 {&hf_ieee80211_vht_beamformer_antennas,
18397 {"Compressed Steering Number of Beamformer Antennas Supported", "wlan_mgt.vht.capabilities.beamformerants",
18398 FT_UINT32, BASE_HEX, VALS(num_plus_one_3bit_flag), 0x0000e000,
18399 NULL, HFILL }},
18401 {&hf_ieee80211_vht_sounding_dimensions,
18402 {"Number of Sounding Dimensions", "wlan_mgt.vht.capabilities.soundingdimensions",
18403 FT_UINT32, BASE_HEX, VALS(num_plus_one_3bit_flag), 0x00070000,
18404 NULL, HFILL }},
18406 {&hf_ieee80211_vht_mu_beamformer_cap,
18407 {"MU Beam-former Capable", "wlan_mgt.vht.capabilities.mubeamformer",
18408 FT_BOOLEAN, 32, TFS (&tfs_supported_not_supported), 0x00080000,
18409 NULL, HFILL }},
18411 {&hf_ieee80211_vht_mu_beamformee_cap,
18412 {"MU Beam-formee Capable", "wlan_mgt.vht.capabilities.mubeamformee",
18413 FT_BOOLEAN, 32, TFS (&tfs_supported_not_supported), 0x00100000,
18414 NULL, HFILL }},
18416 {&hf_ieee80211_vht_txop_ps,
18417 {"VHT TXOP PS", "wlan_mgt.vht.capabilities.vhttxopps",
18418 FT_BOOLEAN, 32, TFS (&tfs_supported_not_supported), 0x00200000,
18419 NULL, HFILL }},
18421 {&hf_ieee80211_vht_var_htc_field,
18422 {"+HTC-VHT Capable (VHT variant HT Control field)", "wlan_mgt.vht.capabilities.vhthtc",
18423 FT_BOOLEAN, 32, TFS (&tfs_supported_not_supported), 0x00400000,
18424 NULL, HFILL }},
18426 {&hf_ieee80211_vht_max_ampdu,
18427 {"Max A-MPDU Length", "wlan_mgt.vht.capabilities.maxampdu",
18428 FT_UINT32, BASE_HEX, VALS(vht_max_ampdu_flag), 0x03800000,
18429 "In Octets unit", HFILL }},
18431 {&hf_ieee80211_vht_link_adaptation_cap,
18432 {"VHT Link Adaptation", "wlan_mgt.vht.capabilities.linkadapt",
18433 FT_UINT32, BASE_HEX, VALS(vht_link_adapt_flag), 0x0c000000,
18434 NULL, HFILL }},
18436 {&hf_ieee80211_vht_rx_pattern,
18437 {"Rx Antenna Pattern Consistency", "wlan_mgt.vht.capabilities.rxpatconsist",
18438 FT_BOOLEAN, 32, TFS (&tfs_supported_not_supported), 0x10000000,
18439 NULL, HFILL }},
18441 {&hf_ieee80211_vht_tx_pattern,
18442 {"Tx Antenna Pattern Consistency", "wlan_mgt.vht.capabilities.txpatconsist",
18443 FT_BOOLEAN, 32, TFS (&tfs_supported_not_supported), 0x20000000,
18444 NULL, HFILL }},
18446 {&hf_ieee80211_vht_reserv,
18447 {"Reserved", "wlan_mgt.vht.reserved",
18448 FT_BOOLEAN, 32, NULL, 0xc0000000,
18449 NULL, HFILL }},
18451 {&hf_ieee80211_vht_mcsset,
18452 {"VHT Supported MCS Set", "wlan_mgt.vht.mcsset",
18453 FT_NONE, BASE_NONE, NULL, 0,
18454 NULL, HFILL }},
18456 {&hf_ieee80211_vht_mcsset_rx_mcs_map,
18457 {"Rx MCS Map", "wlan_mgt.vht.mcsset.rxmcsmap",
18458 FT_UINT16, BASE_HEX, NULL, 0,
18459 NULL, HFILL }},
18461 {&hf_ieee80211_vht_mcsset_rx_max_mcs_for_1_ss,
18462 {"Rx 1 SS", "wlan_mgt.vht.mcsset.rxmcsmap.ss1",
18463 FT_UINT16, BASE_HEX, VALS(vht_supported_mcs_flag), 0x0003,
18464 NULL, HFILL }},
18466 {&hf_ieee80211_vht_mcsset_rx_max_mcs_for_2_ss,
18467 {"Rx 2 SS", "wlan_mgt.vht.mcsset.rxmcsmap.ss2",
18468 FT_UINT16, BASE_HEX, VALS(vht_supported_mcs_flag), 0x000c,
18469 NULL, HFILL }},
18471 {&hf_ieee80211_vht_mcsset_rx_max_mcs_for_3_ss,
18472 {"Rx 3 SS", "wlan_mgt.vht.mcsset.rxmcsmap.ss3",
18473 FT_UINT16, BASE_HEX, VALS(vht_supported_mcs_flag), 0x0030,
18474 NULL, HFILL }},
18476 {&hf_ieee80211_vht_mcsset_rx_max_mcs_for_4_ss,
18477 {"Rx 4 SS", "wlan_mgt.vht.mcsset.rxmcsmap.ss4",
18478 FT_UINT16, BASE_HEX, VALS(vht_supported_mcs_flag), 0x00c0,
18479 NULL, HFILL }},
18481 {&hf_ieee80211_vht_mcsset_rx_max_mcs_for_5_ss,
18482 {"Rx 5 SS", "wlan_mgt.vht.mcsset.rxmcsmap.ss5",
18483 FT_UINT16, BASE_HEX, VALS(vht_supported_mcs_flag), 0x0300,
18484 NULL, HFILL }},
18486 {&hf_ieee80211_vht_mcsset_rx_max_mcs_for_6_ss,
18487 {"Rx 6 SS", "wlan_mgt.vht.mcsset.rxmcsmap.ss6",
18488 FT_UINT16, BASE_HEX, VALS(vht_supported_mcs_flag), 0x0c00,
18489 NULL, HFILL }},
18491 {&hf_ieee80211_vht_mcsset_rx_max_mcs_for_7_ss,
18492 {"Rx 7 SS", "wlan_mgt.vht.mcsset.rxmcsmap.ss7",
18493 FT_UINT16, BASE_HEX, VALS(vht_supported_mcs_flag), 0x3000,
18494 NULL, HFILL }},
18496 {&hf_ieee80211_vht_mcsset_rx_max_mcs_for_8_ss,
18497 {"Rx 8 SS", "wlan_mgt.vht.mcsset.rxmcsmap.ss8",
18498 FT_UINT16, BASE_HEX, VALS(vht_supported_mcs_flag), 0xc000,
18499 NULL, HFILL }},
18501 {&hf_ieee80211_vht_mcsset_rx_highest_long_gi,
18502 {"Rx Highest Long GI Data Rate (in Mb/s, 0 = subfield not in use)", "wlan_mgt.vht.mcsset.rxhighestlonggirate",
18503 FT_UINT16, BASE_HEX, NULL, 0x1fff,
18504 NULL, HFILL }},
18506 {&hf_ieee80211_vht_mcsset_tx_mcs_map,
18507 {"Tx MCS Map", "wlan_mgt.vht.mcsset.txmcsmap",
18508 FT_UINT16, BASE_HEX, NULL, 0,
18509 NULL, HFILL }},
18511 {&hf_ieee80211_vht_mcsset_tx_max_mcs_for_1_ss,
18512 {"Tx 1 SS", "wlan_mgt.vht.mcsset.txmcsmap.ss1",
18513 FT_UINT16, BASE_HEX, VALS(vht_supported_mcs_flag), 0x0003,
18514 NULL, HFILL }},
18516 {&hf_ieee80211_vht_mcsset_tx_max_mcs_for_2_ss,
18517 {"Tx 2 SS", "wlan_mgt.vht.mcsset.txmcsmap.ss2",
18518 FT_UINT16, BASE_HEX, VALS(vht_supported_mcs_flag), 0x000c,
18519 NULL, HFILL }},
18521 {&hf_ieee80211_vht_mcsset_tx_max_mcs_for_3_ss,
18522 {"Tx 3 SS", "wlan_mgt.vht.mcsset.txmcsmap.ss3",
18523 FT_UINT16, BASE_HEX, VALS(vht_supported_mcs_flag), 0x0030,
18524 NULL, HFILL }},
18526 {&hf_ieee80211_vht_mcsset_tx_max_mcs_for_4_ss,
18527 {"Tx 4 SS", "wlan_mgt.vht.mcsset.txmcsmap.ss4",
18528 FT_UINT16, BASE_HEX, VALS(vht_supported_mcs_flag), 0x00c0,
18529 NULL, HFILL }},
18531 {&hf_ieee80211_vht_mcsset_tx_max_mcs_for_5_ss,
18532 {"Tx 5 SS", "wlan_mgt.vht.mcsset.txmcsmap.ss5",
18533 FT_UINT16, BASE_HEX, VALS(vht_supported_mcs_flag), 0x0300,
18534 NULL, HFILL }},
18536 {&hf_ieee80211_vht_mcsset_tx_max_mcs_for_6_ss,
18537 {"Tx 6 SS", "wlan_mgt.vht.mcsset.txmcsmap.ss6",
18538 FT_UINT16, BASE_HEX, VALS(vht_supported_mcs_flag), 0x0c00,
18539 NULL, HFILL }},
18541 {&hf_ieee80211_vht_mcsset_tx_max_mcs_for_7_ss,
18542 {"Tx 7 SS", "wlan_mgt.vht.mcsset.txmcsmap.ss7",
18543 FT_UINT16, BASE_HEX, VALS(vht_supported_mcs_flag), 0x3000,
18544 NULL, HFILL }},
18546 {&hf_ieee80211_vht_mcsset_tx_max_mcs_for_8_ss,
18547 {"Tx 8 SS", "wlan_mgt.vht.mcsset.txmcsmap.ss8",
18548 FT_UINT16, BASE_HEX, VALS(vht_supported_mcs_flag), 0xc000,
18549 NULL, HFILL }},
18551 {&hf_ieee80211_vht_mcsset_tx_highest_long_gi,
18552 {"Tx Highest Long GI Data Rate (in Mb/s, 0 = subfield not in use)", "wlan_mgt.vht.mcsset.txhighestlonggirate",
18553 FT_UINT16, BASE_HEX, NULL, 0x1fff,
18554 NULL, HFILL }},
18556 {&hf_ieee80211_vht_op,
18557 {"VHT Operation Info", "wlan_mgt.vht.op",
18558 FT_NONE, BASE_NONE, NULL, 0,
18559 NULL, HFILL }},
18561 {&hf_ieee80211_vht_op_channel_width,
18562 {"Channel Width", "wlan_mgt.vht.op.channelwidth",
18563 FT_UINT8, BASE_HEX, VALS(vht_op_channel_width_flag), 0,
18564 NULL, HFILL }},
18566 {&hf_ieee80211_vht_op_channel_center0,
18567 {"Channel Center Segment 0", "wlan_mgt.vht.op.channelcenter0",
18568 FT_UINT8, BASE_DEC, NULL, 0,
18569 NULL, HFILL }},
18571 {&hf_ieee80211_vht_op_channel_center1,
18572 {"Channel Center Segment 1", "wlan_mgt.vht.op.channelcenter1",
18573 FT_UINT8, BASE_DEC, NULL, 0,
18574 NULL, HFILL }},
18576 {&hf_ieee80211_vht_op_basic_mcs_map,
18577 {"Basic MCS Map", "wlan_mgt.vht.op.basicmcsmap",
18578 FT_UINT16, BASE_HEX, NULL, 0,
18579 NULL, HFILL }},
18581 {&hf_ieee80211_vht_op_max_basic_mcs_for_1_ss,
18582 {"Basic 1 SS", "wlan_mgt.vht.op.basicmcsmap.ss1",
18583 FT_UINT16, BASE_HEX, VALS(vht_supported_mcs_flag), 0x0003,
18584 NULL, HFILL }},
18586 {&hf_ieee80211_vht_op_max_basic_mcs_for_2_ss,
18587 {"Basic 2 SS", "wlan_mgt.vht.op.basicmcsmap.ss2",
18588 FT_UINT16, BASE_HEX, VALS(vht_supported_mcs_flag), 0x000c,
18589 NULL, HFILL }},
18591 {&hf_ieee80211_vht_op_max_basic_mcs_for_3_ss,
18592 {"Basic 3 SS", "wlan_mgt.vht.op.basicmcsmap.ss3",
18593 FT_UINT16, BASE_HEX, VALS(vht_supported_mcs_flag), 0x0030,
18594 NULL, HFILL }},
18596 {&hf_ieee80211_vht_op_max_basic_mcs_for_4_ss,
18597 {"Basic 4 SS", "wlan_mgt.vht.op.basicmcsmap.ss4",
18598 FT_UINT16, BASE_HEX, VALS(vht_supported_mcs_flag), 0x00c0,
18599 NULL, HFILL }},
18601 {&hf_ieee80211_vht_op_max_basic_mcs_for_5_ss,
18602 {"Basic 5 SS", "wlan_mgt.vht.op.basicmcsmap.ss5",
18603 FT_UINT16, BASE_HEX, VALS(vht_supported_mcs_flag), 0x0300,
18604 NULL, HFILL }},
18606 {&hf_ieee80211_vht_op_max_basic_mcs_for_6_ss,
18607 {"Basic 6 SS", "wlan_mgt.vht.op.basicmcsmap.ss6",
18608 FT_UINT16, BASE_HEX, VALS(vht_supported_mcs_flag), 0x0c00,
18609 NULL, HFILL }},
18611 {&hf_ieee80211_vht_op_max_basic_mcs_for_7_ss,
18612 {"Basic 7 SS", "wlan_mgt.vht.op.basicmcsmap.ss7",
18613 FT_UINT16, BASE_HEX, VALS(vht_supported_mcs_flag), 0x3000,
18614 NULL, HFILL }},
18616 {&hf_ieee80211_vht_op_max_basic_mcs_for_8_ss,
18617 {"Basic 8 SS", "wlan_mgt.vht.op.basicmcsmap.ss8",
18618 FT_UINT16, BASE_HEX, VALS(vht_supported_mcs_flag), 0xc000,
18619 NULL, HFILL }},
18621 {&hf_ieee80211_vht_tpe_pwr_info,
18622 {"Tx Pwr Info", "wlan_mgt.vht.tpe.pwr_info",
18623 FT_UINT8, BASE_HEX, NULL, 0,
18624 NULL, HFILL }},
18626 {&hf_ieee80211_vht_tpe_pwr_info_count,
18627 {"Max Tx Pwr Count", "wlan_mgt.vht.tpe.pwr_info.count",
18628 FT_UINT8, BASE_DEC, NULL , 0x07,
18629 NULL, HFILL }},
18631 {&hf_ieee80211_vht_tpe_pwr_info_unit,
18632 {"Max Tx Pwr Unit Interpretation", "wlan_mgt.vht.tpe.pwr_info.unit",
18633 FT_UINT8, BASE_DEC, VALS(vht_tpe_pwr_units) , 0x38,
18634 NULL, HFILL }},
18636 {&hf_ieee80211_vht_tpe_pwr_info_reserved,
18637 {"Reserved", "wlan_mgt.vht.tpe.pwr_info.reserved",
18638 FT_UINT8, BASE_DEC, NULL , 0xC0,
18639 NULL, HFILL }},
18641 {&hf_ieee80211_vht_tpe_pwr_constr_20,
18642 {"Local Max Tx Pwr Constraint 20MHz", "wlan_mgt.vht.tpe.pwr_constr_20",
18643 FT_INT8, BASE_CUSTOM, vht_tpe_custom , 0,
18644 NULL, HFILL }},
18646 {&hf_ieee80211_vht_tpe_pwr_constr_40,
18647 {"Local Max Tx Pwr Constraint 40MHz", "wlan_mgt.vht.tpe.pwr_constr_40",
18648 FT_INT8, BASE_CUSTOM, vht_tpe_custom , 0,
18649 NULL, HFILL }},
18651 {&hf_ieee80211_vht_tpe_pwr_constr_80,
18652 {"Local Max Tx Pwr Constraint 80MHz", "wlan_mgt.vht.tpe.pwr_constr_80",
18653 FT_INT8, BASE_CUSTOM, vht_tpe_custom , 0,
18654 NULL, HFILL }},
18656 {&hf_ieee80211_vht_tpe_pwr_constr_160,
18657 {"Local Max Tx Pwr Constraint 160MHz/80+80 MHz", "wlan_mgt.vht.tpe.pwr_constr_160",
18658 FT_INT8, BASE_CUSTOM, vht_tpe_custom , 0,
18659 NULL, HFILL }},
18661 {&hf_ieee80211_txbf_csi_num_bf_ant,
18662 {"Max antennae STA can support when CSI feedback required", "wlan_mgt.txbf.csinumant",
18663 FT_UINT32, BASE_HEX, VALS(txbf_antenna_flags), 0x00180000,
18664 "Max antennae station can support when CSI feedback required", HFILL }},
18666 {&hf_ieee80211_txbf_uncomp_sm_bf_ant,
18667 {"Max antennae STA can support when uncompressed Beamforming feedback required", "wlan_mgt.txbf.fm.uncompressed.maxant",
18668 FT_UINT32, BASE_HEX, VALS(txbf_antenna_flags), 0x00600000,
18669 "Max antennae station can support when uncompressed Beamforming feedback required", HFILL }},
18671 {&hf_ieee80211_txbf_comp_sm_bf_ant,
18672 {"Max antennae STA can support when compressed Beamforming feedback required", "wlan_mgt.txbf.fm.compressed.maxant",
18673 FT_UINT32, BASE_HEX, VALS(txbf_antenna_flags), 0x01800000,
18674 "Max antennae station can support when compressed Beamforming feedback required", HFILL }},
18676 {&hf_ieee80211_txbf_csi_max_rows_bf,
18677 {"Maximum number of rows of CSI explicit feedback", "wlan_mgt.txbf.csi.maxrows",
18678 FT_UINT32, BASE_HEX, VALS(txbf_csi_max_rows_bf_flags), 0x06000000,
18679 NULL, HFILL }},
18681 {&hf_ieee80211_txbf_chan_est,
18682 {"Maximum number of space time streams for which channel dimensions can be simultaneously estimated", "wlan_mgt.txbf.channelest",
18683 FT_UINT32, BASE_HEX, VALS(txbf_chan_est_flags), 0x18000000,
18684 NULL, HFILL }},
18686 {&hf_ieee80211_txbf_resrv,
18687 {"Reserved", "wlan_mgt.txbf.reserved",
18688 FT_UINT32, BASE_HEX, NULL, 0xe0000000,
18689 NULL, HFILL }},
18691 {&hf_ieee80211_hta_cc,
18692 {"HT Control Channel", "wlan_mgt.hta.control_channel",
18693 FT_UINT8, BASE_DEC, NULL, 0,
18694 NULL, HFILL }},
18696 {&hf_ieee80211_hta_cap,
18697 {"HT Additional Capabilities", "wlan_mgt.hta.capabilities",
18698 FT_UINT16, BASE_HEX, NULL, 0,
18699 "HT Additional Capability information", HFILL }},
18701 {&hf_ieee80211_hta_ext_chan_offset,
18702 {"Extension Channel Offset", "wlan_mgt.hta.capabilities.extchan",
18703 FT_UINT16, BASE_HEX, VALS(hta_ext_chan_offset_flag), 0x0003,
18704 NULL, HFILL }},
18706 {&hf_ieee80211_hta_rec_tx_width,
18707 {"Recommended Tx Channel Width", "wlan_mgt.hta.capabilities.rectxwidth",
18708 FT_BOOLEAN, 16, TFS (&hta_rec_tx_width_flag), 0x0004,
18709 "Recommended Transmit Channel Width", HFILL }},
18711 {&hf_ieee80211_hta_rifs_mode,
18712 {"Reduced Interframe Spacing (RIFS) Mode", "wlan_mgt.hta.capabilities.rifsmode",
18713 FT_BOOLEAN, 16, TFS (&hta_rifs_mode_flag), 0x0008,
18714 NULL, HFILL }},
18716 {&hf_ieee80211_hta_controlled_access,
18717 {"Controlled Access Only", "wlan_mgt.hta.capabilities.controlledaccess",
18718 FT_BOOLEAN, 16, TFS (&hta_controlled_access_flag), 0x0010,
18719 NULL, HFILL }},
18721 {&hf_ieee80211_hta_service_interval,
18722 {"Service Interval Granularity", "wlan_mgt.hta.capabilities.serviceinterval",
18723 FT_UINT16, BASE_HEX, VALS(hta_service_interval_flag), 0x00E0,
18724 NULL, HFILL }},
18726 {&hf_ieee80211_hta_operating_mode,
18727 {"Operating Mode", "wlan_mgt.hta.capabilities.operatingmode",
18728 FT_UINT16, BASE_HEX, VALS(hta_operating_mode_flag), 0x0003,
18729 NULL, HFILL }},
18731 {&hf_ieee80211_hta_non_gf_devices,
18732 {"Non Greenfield (GF) devices Present", "wlan_mgt.hta.capabilities.nongfdevices",
18733 FT_BOOLEAN, 16, TFS (&hta_non_gf_devices_flag), 0x0004,
18734 "on Greenfield (GF) devices Present", HFILL }},
18736 {&hf_ieee80211_hta_basic_stbc_mcs,
18737 {"Basic STB Modulation and Coding Scheme (MCS)", "wlan_mgt.hta.capabilities.",
18738 FT_UINT16, BASE_HEX, NULL , 0x007f,
18739 NULL, HFILL }},
18741 {&hf_ieee80211_hta_dual_stbc_protection,
18742 {"Dual Clear To Send (CTS) Protection", "wlan_mgt.hta.capabilities.",
18743 FT_BOOLEAN, 16, TFS (&hta_dual_stbc_protection_flag), 0x0080,
18744 NULL, HFILL }},
18746 {&hf_ieee80211_hta_secondary_beacon,
18747 {"Secondary Beacon", "wlan_mgt.hta.capabilities.",
18748 FT_BOOLEAN, 16, TFS (&hta_secondary_beacon_flag), 0x0100,
18749 NULL, HFILL }},
18751 {&hf_ieee80211_hta_lsig_txop_protection,
18752 {"L-SIG TXOP Protection Support", "wlan_mgt.hta.capabilities.",
18753 FT_BOOLEAN, 16, TFS (&hta_lsig_txop_protection_flag), 0x0200,
18754 NULL, HFILL }},
18756 {&hf_ieee80211_hta_pco_active,
18757 {"Phased Coexistence Operation (PCO) Active", "wlan_mgt.hta.capabilities.",
18758 FT_BOOLEAN, 16, TFS (&hta_pco_active_flag), 0x0400,
18759 NULL, HFILL }},
18761 {&hf_ieee80211_hta_pco_phase,
18762 {"Phased Coexistence Operation (PCO) Phase", "wlan_mgt.hta.capabilities.",
18763 FT_BOOLEAN, 16, TFS (&hta_pco_phase_flag), 0x0800,
18764 NULL, HFILL }},
18766 {&hf_ieee80211_antsel,
18767 {"Antenna Selection (ASEL) Capabilities", "wlan_mgt.asel",
18768 FT_UINT8, BASE_HEX, NULL, 0,
18769 NULL, HFILL }},
18771 {&hf_ieee80211_antsel_vs,
18772 {"Antenna Selection (ASEL) Capabilities (VS)", "wlan_mgt.vs.asel",
18773 FT_UINT8, BASE_HEX, NULL, 0,
18774 "Vendor Specific Antenna Selection (ASEL) Capabilities", HFILL }},
18776 {&hf_ieee80211_antsel_b0,
18777 {"Antenna Selection Capable", "wlan_mgt.asel.capable",
18778 FT_BOOLEAN, 8, TFS (&tfs_supported_not_supported), 0x01,
18779 NULL, HFILL }},
18781 {&hf_ieee80211_antsel_b1,
18782 {"Explicit CSI Feedback Based Tx ASEL", "wlan_mgt.asel.txcsi",
18783 FT_BOOLEAN, 8, TFS (&tfs_supported_not_supported), 0x02,
18784 NULL, HFILL }},
18786 {&hf_ieee80211_antsel_b2,
18787 {"Antenna Indices Feedback Based Tx ASEL", "wlan_mgt.asel.txif",
18788 FT_BOOLEAN, 8, TFS (&tfs_supported_not_supported), 0x04,
18789 NULL, HFILL }},
18791 {&hf_ieee80211_antsel_b3,
18792 {"Explicit CSI Feedback", "wlan_mgt.asel.csi",
18793 FT_BOOLEAN, 8, TFS (&tfs_supported_not_supported), 0x08,
18794 NULL, HFILL }},
18796 {&hf_ieee80211_antsel_b4,
18797 {"Antenna Indices Feedback", "wlan_mgt.asel.if",
18798 FT_BOOLEAN, 8, TFS (&tfs_supported_not_supported), 0x10,
18799 NULL, HFILL }},
18801 {&hf_ieee80211_antsel_b5,
18802 {"Rx ASEL", "wlan_mgt.asel.rx",
18803 FT_BOOLEAN, 8, TFS (&tfs_supported_not_supported), 0x20,
18804 NULL, HFILL }},
18806 {&hf_ieee80211_antsel_b6,
18807 {"Tx Sounding PPDUs", "wlan_mgt.asel.sppdu",
18808 FT_BOOLEAN, 8, TFS (&tfs_supported_not_supported), 0x40,
18809 NULL, HFILL }},
18811 {&hf_ieee80211_antsel_b7,
18812 {"Reserved", "wlan_mgt.asel.reserved",
18813 FT_UINT8, BASE_HEX, NULL, 0x80,
18814 NULL, HFILL }},
18816 {&hf_ieee80211_ht_info_delimiter1,
18817 {"HT Information Subset (1 of 3)", "wlan_mgt.ht.info.delim1",
18818 FT_UINT8, BASE_HEX, NULL, 0,
18819 NULL, HFILL }},
18821 {&hf_ieee80211_ht_info_primary_channel,
18822 {"Primary Channel", "wlan_mgt.ht.info.primarychannel",
18823 FT_UINT8, BASE_DEC, NULL, 0,
18824 NULL, HFILL }},
18826 {&hf_ieee80211_ht_info_secondary_channel_offset,
18827 {"Secondary channel offset", "wlan_mgt.ht.info.secchanoffset",
18828 FT_UINT8, BASE_HEX, VALS(ht_info_secondary_channel_offset_flags), 0x03,
18829 NULL, HFILL }},
18831 {&hf_ieee80211_ht_info_channel_width,
18832 {"Supported channel width", "wlan_mgt.ht.info.chanwidth",
18833 FT_BOOLEAN, 8, TFS (&ht_info_channel_width_flag), 0x04,
18834 NULL, HFILL }},
18836 {&hf_ieee80211_ht_info_rifs_mode,
18837 {"Reduced Interframe Spacing (RIFS)", "wlan_mgt.ht.info.rifs",
18838 FT_BOOLEAN, 8, TFS (&ht_info_rifs_mode_flag), 0x08,
18839 NULL, HFILL }},
18841 {&hf_ieee80211_ht_info_psmp_stas_only,
18842 {"Power Save Multi-Poll (PSMP) stations only", "wlan_mgt.ht.info.psmponly",
18843 FT_BOOLEAN, 8, TFS (&ht_info_psmp_stas_only_flag), 0x10,
18844 NULL, HFILL }},
18846 {&hf_ieee80211_ht_info_service_interval_granularity,
18847 {"Shortest service interval", "wlan_mgt.ht.info.",
18848 FT_UINT8, BASE_HEX, VALS(ht_info_service_interval_granularity_flags), 0xe0,
18849 NULL, HFILL }},
18851 {&hf_ieee80211_ht_info_delimiter2,
18852 {"HT Information Subset (2 of 3)", "wlan_mgt.ht.info.delim2",
18853 FT_UINT16, BASE_HEX, NULL, 0,
18854 NULL, HFILL }},
18856 {&hf_ieee80211_ht_info_operating_mode,
18857 {"Operating mode of BSS", "wlan_mgt.ht.info.operatingmode",
18858 FT_UINT16, BASE_HEX, VALS(ht_info_operating_mode_flags), 0x0003,
18859 NULL, HFILL }},
18861 {&hf_ieee80211_ht_info_non_greenfield_sta_present,
18862 {"Non-greenfield STAs present", "wlan_mgt.ht.info.greenfield",
18863 FT_BOOLEAN, 16, TFS (&ht_info_non_greenfield_sta_present_flag), 0x0004,
18864 NULL, HFILL }},
18866 {&hf_ieee80211_ht_info_transmit_burst_limit,
18867 {"Transmit burst limit", "wlan_mgt.ht.info.burstlim",
18868 FT_BOOLEAN, 16, TFS (&ht_info_transmit_burst_limit_flag), 0x0008,
18869 NULL, HFILL }},
18871 {&hf_ieee80211_ht_info_obss_non_ht_stas_present,
18872 {"OBSS non-HT STAs present", "wlan_mgt.ht.info.obssnonht",
18873 FT_BOOLEAN, 16, TFS (&ht_info_obss_non_ht_stas_present_flag), 0x0010,
18874 NULL, HFILL }},
18876 {&hf_ieee80211_ht_info_reserved_1,
18877 {"Reserved", "wlan_mgt.ht.info.reserved1",
18878 FT_UINT16, BASE_HEX, NULL, 0xffe0,
18879 NULL, HFILL }},
18881 {&hf_ieee80211_ht_info_delimiter3,
18882 {"HT Information Subset (3 of 3)", "wlan_mgt.ht.info.delim3",
18883 FT_UINT16, BASE_HEX, NULL, 0,
18884 NULL, HFILL }},
18886 {&hf_ieee80211_ht_info_reserved_2,
18887 {"Reserved", "wlan_mgt.ht.info.reserved2",
18888 FT_UINT16, BASE_HEX, NULL, 0x003f,
18889 NULL, HFILL }},
18891 {&hf_ieee80211_ht_info_dual_beacon,
18892 {"Dual beacon", "wlan_mgt.ht.info.dualbeacon",
18893 FT_BOOLEAN, 16, TFS (&ht_info_dual_beacon_flag), 0x0040,
18894 NULL, HFILL }},
18896 {&hf_ieee80211_ht_info_dual_cts_protection,
18897 {"Dual Clear To Send (CTS) protection", "wlan_mgt.ht.info.dualcts",
18898 FT_BOOLEAN, 16, TFS (&ht_info_dual_cts_protection_flag), 0x0080,
18899 NULL, HFILL }},
18901 {&hf_ieee80211_ht_info_secondary_beacon,
18902 {"Beacon ID", "wlan_mgt.ht.info.secondarybeacon",
18903 FT_BOOLEAN, 16, TFS (&ht_info_secondary_beacon_flag), 0x0100,
18904 NULL, HFILL }},
18906 {&hf_ieee80211_ht_info_lsig_txop_protection_full_support,
18907 {"L-SIG TXOP Protection Full Support", "wlan_mgt.ht.info.lsigprotsupport",
18908 FT_BOOLEAN, 16, TFS (&ht_info_lsig_txop_protection_full_support_flag), 0x0200,
18909 NULL, HFILL }},
18911 {&hf_ieee80211_ht_info_pco_active,
18912 {"Phased Coexistence Operation (PCO)", "wlan_mgt.ht.info.pco.active",
18913 FT_BOOLEAN, 16, TFS (&tfs_active_inactive), 0x0400,
18914 NULL, HFILL }},
18916 {&hf_ieee80211_ht_info_pco_phase,
18917 {"Phased Coexistence Operation (PCO) Phase", "wlan_mgt.ht.info.pco.phase",
18918 FT_BOOLEAN, 16, TFS (&ht_info_pco_phase_flag), 0x0800,
18919 NULL, HFILL }},
18921 {&hf_ieee80211_ht_info_reserved_3,
18922 {"Reserved", "wlan_mgt.ht.info.reserved3",
18923 FT_UINT16, BASE_HEX, NULL, 0xf000,
18924 NULL, HFILL }},
18926 {&hf_ieee80211_tag_ap_channel_report_regulatory_class,
18927 {"Regulatory Class", "wlan_mgt.ap_channel_report.regulatory_class",
18928 FT_UINT8, BASE_DEC, NULL, 0,
18929 NULL, HFILL }},
18931 {&hf_ieee80211_tag_ap_channel_report_channel_list,
18932 {"Channel List", "wlan_mgt.ap_channel_report.channel_list",
18933 FT_UINT8, BASE_DEC, NULL, 0,
18934 NULL, HFILL }},
18936 {&hf_ieee80211_tag_secondary_channel_offset,
18937 {"Secondary Channel Offset", "wlan_mgt.secchanoffset",
18938 FT_UINT8, BASE_HEX, VALS(ieee80211_tag_secondary_channel_offset_flags), 0,
18939 NULL, HFILL }},
18941 {&hf_ieee80211_tag_bss_ap_avg_access_delay,
18942 {"AP Average Access Delay", "wlan_mgt.bss_ap_avg_access_delay",
18943 FT_UINT8, BASE_DEC, NULL, 0x0,
18944 NULL, HFILL }},
18946 {&hf_ieee80211_tag_antenna_id,
18947 {"Antenna ID", "wlan_mgt.antenna.id",
18948 FT_UINT8, BASE_DEC, NULL, 0x0,
18949 NULL, HFILL }},
18951 {&hf_ieee80211_tag_rsni,
18952 {"RSNI", "wlan_mgt.rsni",
18953 FT_UINT8, BASE_CUSTOM, rsni_base_custom, 0x0,
18954 NULL, HFILL }},
18956 {&hf_ieee80211_tag_bss_avb_adm_cap_bitmask,
18957 {"Available Admission Capacity Bitmask", "wlan_mgt.bss_avb_adm_cap.bitmask",
18958 FT_UINT16, BASE_HEX, NULL, 0,
18959 NULL, HFILL }},
18960 {&hf_ieee80211_tag_bss_avb_adm_cap_bitmask_up0,
18961 {"UP0 (bit0)", "wlan_mgt.bss_avb_adm_cap.bitmask.up0",
18962 FT_BOOLEAN, 16, TFS(&tfs_set_notset), BSS_BITMASK_UP0,
18963 NULL, HFILL }},
18964 {&hf_ieee80211_tag_bss_avb_adm_cap_bitmask_up1,
18965 {"UP1 (bit1)", "wlan_mgt.bss_avb_adm_cap.bitmask.up1",
18966 FT_BOOLEAN, 16, TFS(&tfs_set_notset), BSS_BITMASK_UP1,
18967 NULL, HFILL }},
18968 {&hf_ieee80211_tag_bss_avb_adm_cap_bitmask_up2,
18969 {"UP2 (bit2)", "wlan_mgt.bss_avb_adm_cap.bitmask.up2",
18970 FT_BOOLEAN, 16, TFS(&tfs_set_notset), BSS_BITMASK_UP2,
18971 NULL, HFILL }},
18972 {&hf_ieee80211_tag_bss_avb_adm_cap_bitmask_up3,
18973 {"UP3 (bit3)", "wlan_mgt.bss_avb_adm_cap.bitmask.up3",
18974 FT_BOOLEAN, 16, TFS(&tfs_set_notset), BSS_BITMASK_UP3,
18975 NULL, HFILL }},
18976 {&hf_ieee80211_tag_bss_avb_adm_cap_bitmask_up4,
18977 {"UP4 (bit4)", "wlan_mgt.bss_avb_adm_cap.bitmask.up4",
18978 FT_BOOLEAN, 16, TFS(&tfs_set_notset), BSS_BITMASK_UP4,
18979 NULL, HFILL }},
18980 {&hf_ieee80211_tag_bss_avb_adm_cap_bitmask_up5,
18981 {"UP5 (bit5)", "wlan_mgt.bss_avb_adm_cap.bitmask.up5",
18982 FT_BOOLEAN, 16, TFS(&tfs_set_notset), BSS_BITMASK_UP5,
18983 NULL, HFILL }},
18984 {&hf_ieee80211_tag_bss_avb_adm_cap_bitmask_up6,
18985 {"UP0 (bit6)", "wlan_mgt.bss_avb_adm_cap.bitmask.up6",
18986 FT_BOOLEAN, 16, TFS(&tfs_set_notset), BSS_BITMASK_UP6,
18987 NULL, HFILL }},
18988 {&hf_ieee80211_tag_bss_avb_adm_cap_bitmask_up7,
18989 {"UP7 (bit7)", "wlan_mgt.bss_avb_adm_cap.bitmask.up7",
18990 FT_BOOLEAN, 16, TFS(&tfs_set_notset), BSS_BITMASK_UP7,
18991 NULL, HFILL }},
18992 {&hf_ieee80211_tag_bss_avb_adm_cap_bitmask_ac0,
18993 {"AC0 (bit8)", "wlan_mgt.bss_avb_adm_cap.bitmask.ac0",
18994 FT_BOOLEAN, 16, TFS(&tfs_set_notset), BSS_BITMASK_AC0,
18995 NULL, HFILL }},
18996 {&hf_ieee80211_tag_bss_avb_adm_cap_bitmask_ac1,
18997 {"AC1 (bit9)", "wlan_mgt.bss_avb_adm_cap.bitmask.AC1",
18998 FT_BOOLEAN, 16, TFS(&tfs_set_notset), BSS_BITMASK_AC1,
18999 NULL, HFILL }},
19000 {&hf_ieee80211_tag_bss_avb_adm_cap_bitmask_ac2,
19001 {"AC2 (bit10)", "wlan_mgt.bss_avb_adm_cap.bitmask.ac2",
19002 FT_BOOLEAN, 16, TFS(&tfs_set_notset), BSS_BITMASK_AC2,
19003 NULL, HFILL }},
19004 {&hf_ieee80211_tag_bss_avb_adm_cap_bitmask_ac3,
19005 {"AC3 (bit11)", "wlan_mgt.bss_avb_adm_cap.bitmask.ac3",
19006 FT_BOOLEAN, 16, TFS(&tfs_set_notset), BSS_BITMASK_AC3,
19007 NULL, HFILL }},
19008 {&hf_ieee80211_tag_bss_avb_adm_cap_bitmask_rsv,
19009 {"Reserved", "wlan_mgt.bss_avb_adm_cap.bitmask.rsv",
19010 FT_UINT16, BASE_HEX, NULL, BSS_BITMASK_RSV,
19011 NULL, HFILL }},
19012 {&hf_ieee80211_tag_bss_avb_adm_cap_up0,
19013 {"UP0", "wlan_mgt.bss_avb_adm_cap.up0",
19014 FT_UINT16, BASE_DEC, NULL, 0x0,
19015 NULL, HFILL }},
19016 {&hf_ieee80211_tag_bss_avb_adm_cap_up1,
19017 {"UP1", "wlan_mgt.bss_avb_adm_cap.up1",
19018 FT_UINT16, BASE_DEC, NULL, 0x0,
19019 NULL, HFILL }},
19020 {&hf_ieee80211_tag_bss_avb_adm_cap_up2,
19021 {"UP2", "wlan_mgt.bss_avb_adm_cap.up2",
19022 FT_UINT16, BASE_DEC, NULL, 0x0,
19023 NULL, HFILL }},
19024 {&hf_ieee80211_tag_bss_avb_adm_cap_up3,
19025 {"UP3", "wlan_mgt.bss_avb_adm_cap.up3",
19026 FT_UINT16, BASE_DEC, NULL, 0x0,
19027 NULL, HFILL }},
19028 {&hf_ieee80211_tag_bss_avb_adm_cap_up4,
19029 {"UP4", "wlan_mgt.bss_avb_adm_cap.up4",
19030 FT_UINT16, BASE_DEC, NULL, 0x0,
19031 NULL, HFILL }},
19032 {&hf_ieee80211_tag_bss_avb_adm_cap_up5,
19033 {"UP5", "wlan_mgt.bss_avb_adm_cap.up5",
19034 FT_UINT16, BASE_DEC, NULL, 0x0,
19035 NULL, HFILL }},
19036 {&hf_ieee80211_tag_bss_avb_adm_cap_up6,
19037 {"UP6", "wlan_mgt.bss_avb_adm_cap.up6",
19038 FT_UINT16, BASE_DEC, NULL, 0x0,
19039 NULL, HFILL }},
19040 {&hf_ieee80211_tag_bss_avb_adm_cap_up7,
19041 {"UP7", "wlan_mgt.bss_avb_adm_cap.up7",
19042 FT_UINT16, BASE_DEC, NULL, 0x0,
19043 NULL, HFILL }},
19044 {&hf_ieee80211_tag_bss_avb_adm_cap_ac0,
19045 {"AC0", "wlan_mgt.bss_avb_adm_cap.ac0",
19046 FT_UINT16, BASE_DEC, NULL, 0x0,
19047 NULL, HFILL }},
19048 {&hf_ieee80211_tag_bss_avb_adm_cap_ac1,
19049 {"AC1", "wlan_mgt.bss_avb_adm_cap.ac1",
19050 FT_UINT16, BASE_DEC, NULL, 0x0,
19051 NULL, HFILL }},
19052 {&hf_ieee80211_tag_bss_avb_adm_cap_ac2,
19053 {"AC2", "wlan_mgt.bss_avb_adm_cap.ac2",
19054 FT_UINT16, BASE_DEC, NULL, 0x0,
19055 NULL, HFILL }},
19056 {&hf_ieee80211_tag_bss_avb_adm_cap_ac3,
19057 {"AC3", "wlan_mgt.bss_avb_adm_cap.ac3",
19058 FT_UINT16, BASE_DEC, NULL, 0x0,
19059 NULL, HFILL }},
19061 {&hf_ieee80211_tag_bss_avg_ac_access_delay_be,
19062 {"AC Average Access Delay for Best Effort", "wlan_mgt.bss_avg_ac_access_delay.be",
19063 FT_UINT8, BASE_DEC, NULL, 0x0,
19064 NULL, HFILL }},
19065 {&hf_ieee80211_tag_bss_avg_ac_access_delay_bk,
19066 {"AC Average Access Delay for Best Background", "wlan_mgt.bss_avg_ac_access_delay.bk",
19067 FT_UINT8, BASE_DEC, NULL, 0x0,
19068 NULL, HFILL }},
19069 {&hf_ieee80211_tag_bss_avg_ac_access_delay_vi,
19070 {"AC Average Access Delay for Video", "wlan_mgt.bss_avg_ac_access_delay_vi",
19071 FT_UINT8, BASE_DEC, NULL, 0x0,
19072 NULL, HFILL }},
19073 {&hf_ieee80211_tag_bss_avg_ac_access_delay_vo,
19074 {"AC Average Access Delay for Voice", "wlan_mgt.bss_avg_ac_access_delay_vo",
19075 FT_UINT8, BASE_DEC, NULL, 0x0,
19076 NULL, HFILL }},
19079 /* 802.11-2012 Table 8-119-RM Enabled Capabilities definition */
19080 {&hf_ieee80211_tag_rm_enabled_capabilities,
19081 {"RM Capabilities", "wlan_mgt.rmcap",
19082 FT_UINT8, BASE_HEX, NULL, 0,
19083 "Signals support for radio measurements in a device", HFILL }},
19085 /* RM Enabled Capability octet 1 */
19086 {&hf_ieee80211_tag_rm_enabled_capabilities_b0,
19087 {"Link Measurement", "wlan_mgt.rmcap.b0",
19088 FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x01,
19089 NULL, HFILL }},
19090 {&hf_ieee80211_tag_rm_enabled_capabilities_b1,
19091 {"Neighbor Report", "wlan_mgt.rmcap.b1",
19092 FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x02,
19093 NULL, HFILL }},
19094 {&hf_ieee80211_tag_rm_enabled_capabilities_b2,
19095 {"Parallel Measurements", "wlan_mgt.rmcap.b2",
19096 FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x04,
19097 NULL, HFILL }},
19098 {&hf_ieee80211_tag_rm_enabled_capabilities_b3,
19099 {"Repeated Measurements", "wlan_mgt.rmcap.b3",
19100 FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x08,
19101 NULL, HFILL }},
19102 {&hf_ieee80211_tag_rm_enabled_capabilities_b4,
19103 {"Beacon Passive Measurement", "wlan_mgt.rmcap.b4",
19104 FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x10,
19105 NULL, HFILL }},
19106 {&hf_ieee80211_tag_rm_enabled_capabilities_b5,
19107 {"Beacon Active Measurement", "wlan_mgt.rmcap.b5",
19108 FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x20,
19109 NULL, HFILL }},
19110 {&hf_ieee80211_tag_rm_enabled_capabilities_b6,
19111 {"Beacon Table Measurement", "wlan_mgt.rmcap.b6",
19112 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x40,
19113 NULL, HFILL }},
19114 {&hf_ieee80211_tag_rm_enabled_capabilities_b7,
19115 {"Beacon Measurement Reporting Conditions", "wlan_mgt.rmcap.b7",
19116 FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x80,
19117 NULL, HFILL }},
19119 /* RM Enabled Capability octet 2 */
19120 {&hf_ieee80211_tag_rm_enabled_capabilities_b8,
19121 {"Frame Measurement", "wlan_mgt.rmcap.b8",
19122 FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x01,
19123 NULL, HFILL }},
19124 {&hf_ieee80211_tag_rm_enabled_capabilities_b9,
19125 {"Channel Load Measurement", "wlan_mgt.rmcap.b9",
19126 FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x02,
19127 NULL, HFILL }},
19128 {&hf_ieee80211_tag_rm_enabled_capabilities_b10,
19129 {"Noise Histogram Measurement", "wlan_mgt.rmcap.b10",
19130 FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x04,
19131 NULL, HFILL }},
19132 {&hf_ieee80211_tag_rm_enabled_capabilities_b11,
19133 {"Statistics Measurement", "wlan_mgt.rmcap.b11",
19134 FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x08,
19135 NULL, HFILL }},
19136 {&hf_ieee80211_tag_rm_enabled_capabilities_b12,
19137 {"LCI Measurement", "wlan_mgt.rmcap.b12",
19138 FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x10,
19139 NULL, HFILL }},
19140 {&hf_ieee80211_tag_rm_enabled_capabilities_b13,
19141 {"LCI Azimuth capability", "wlan_mgt.rmcap.b13",
19142 FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x20,
19143 NULL, HFILL }},
19144 {&hf_ieee80211_tag_rm_enabled_capabilities_b14,
19145 {"Transmit Stream/Category Measurement", "wlan_mgt.rmcap.b14",
19146 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x40,
19147 NULL, HFILL }},
19148 {&hf_ieee80211_tag_rm_enabled_capabilities_b15,
19149 {"Triggered Transmit Stream/Category Measurement", "wlan_mgt.rmcap.b15",
19150 FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x80,
19151 NULL, HFILL }},
19153 /* RM Enabled Capability octet 3 */
19154 {&hf_ieee80211_tag_rm_enabled_capabilities_b16,
19155 {"AP Channel Report capability", "wlan_mgt.rmcap.b16",
19156 FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x01,
19157 NULL, HFILL }},
19158 {&hf_ieee80211_tag_rm_enabled_capabilities_b17,
19159 {"RM MIB capability", "wlan_mgt.rmcap.b17",
19160 FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x02,
19161 NULL, HFILL }},
19162 {&hf_ieee80211_tag_rm_enabled_capabilities_b18to20,
19163 {"Operating Channel Max Measurement Duration", "wlan_mgt.rmcap.b18to20",
19164 FT_UINT8, BASE_DEC, NULL, 0x1C,
19165 NULL, HFILL }},
19166 {&hf_ieee80211_tag_rm_enabled_capabilities_b21to23,
19167 {"Nonoperating Channel Max Measurement Duration", "wlan_mgt.rmcap.b21to23",
19168 FT_UINT8, BASE_DEC, NULL, 0xE0,
19169 NULL, HFILL }},
19171 /* RM Enabled Capability octet 4 */
19172 {&hf_ieee80211_tag_rm_enabled_capabilities_b24to26,
19173 {"Measurement Pilotcapability", "wlan_mgt.rmcap.b24to26",
19174 FT_UINT8, BASE_DEC, NULL, 0x07,
19175 NULL, HFILL }},
19176 {&hf_ieee80211_tag_rm_enabled_capabilities_b27,
19177 {"Measurement Pilot Transmission Information", "wlan_mgt.rmcap.b27",
19178 FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x08,
19179 NULL, HFILL }},
19180 {&hf_ieee80211_tag_rm_enabled_capabilities_b28,
19181 {"Neighbor Report TSF Offset", "wlan_mgt.rmcap.b28",
19182 FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x10,
19183 NULL, HFILL }},
19184 {&hf_ieee80211_tag_rm_enabled_capabilities_b29,
19185 {"RCPI Measurement capability", "wlan_mgt.rmcap.b29",
19186 FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x20,
19187 NULL, HFILL }},
19188 {&hf_ieee80211_tag_rm_enabled_capabilities_b30,
19189 {"RSNI Measurement capability", "wlan_mgt.rmcap.b30",
19190 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x40,
19191 NULL, HFILL }},
19192 {&hf_ieee80211_tag_rm_enabled_capabilities_b31,
19193 {"BSS Average Access Delay capability", "wlan_mgt.rmcap.b31",
19194 FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x80,
19195 NULL, HFILL }},
19197 /* RM Enabled Capability octet 5 */
19198 {&hf_ieee80211_tag_rm_enabled_capabilities_b32,
19199 {"BSS Available Admission Capacity capability", "wlan_mgt.rmcap.b32",
19200 FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x01,
19201 NULL, HFILL }},
19202 {&hf_ieee80211_tag_rm_enabled_capabilities_b33,
19203 {"Antenna capability", "wlan_mgt.rmcap.b33",
19204 FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x02,
19205 NULL, HFILL }},
19206 {&hf_ieee80211_tag_rm_enabled_capabilities_o5,
19207 {"Reserved", "wlan_mgt.rmcap.o5",
19208 FT_UINT8, BASE_HEX, NULL, 0xFC,
19209 "Must be zero", HFILL }},
19211 {&hf_ieee80211_tag_power_constraint_local,
19212 {"Local Power Constraint", "wlan_mgt.powercon.local",
19213 FT_UINT8, BASE_DEC, NULL, 0,
19214 "Value that allows the mitigation requirements to be satisfied in the current channel", HFILL }},
19216 {&hf_ieee80211_tag_power_capability_min,
19217 {"Minimum Transmit Power", "wlan_mgt.powercap.min",
19218 FT_UINT8, BASE_HEX, NULL, 0,
19219 "The nominal minimum transmit power with which the STA is capable of transmitting in the current channel", HFILL }},
19221 {&hf_ieee80211_tag_power_capability_max,
19222 {"Maximum Transmit Power", "wlan_mgt.powercap.max",
19223 FT_UINT8, BASE_HEX, NULL, 0,
19224 "The nominal maximum transmit power with which the STA is capable of transmitting in the current channel", HFILL }},
19226 {&hf_ieee80211_tag_tpc_report_trsmt_pow,
19227 {"Transmit Power", "wlan_mgt.tcprep.trsmt_pow",
19228 FT_INT8, BASE_DEC, NULL, 0,
19229 NULL, HFILL }},
19231 {&hf_ieee80211_tag_tpc_report_link_mrg,
19232 {"Link Margin", "wlan_mgt.tcprep.link_mrg",
19233 FT_INT8, BASE_DEC, NULL, 0,
19234 NULL, HFILL }},
19236 {&hf_ieee80211_tag_supported_channels,
19237 {"Supported Channels Set", "wlan_mgt.supchan",
19238 FT_NONE, BASE_NONE, NULL, 0,
19239 NULL, HFILL }},
19241 {&hf_ieee80211_tag_supported_channels_first,
19242 {"First Supported Channel", "wlan_mgt.supchan.first",
19243 FT_UINT8, BASE_DEC, NULL, 0,
19244 NULL, HFILL }},
19246 {&hf_ieee80211_tag_supported_channels_range,
19247 {"Supported Channel Range", "wlan_mgt.supchan.range",
19248 FT_UINT8, BASE_DEC, NULL, 0,
19249 NULL, HFILL }},
19251 {&hf_ieee80211_csa_channel_switch_mode,
19252 {"Channel Switch Mode", "wlan_mgt.csa.channel_switch_mode",
19253 FT_UINT8, BASE_HEX, NULL, 0,
19254 "Indicates any restrictions on transmission until a channel switch", HFILL }},
19256 {&hf_ieee80211_csa_new_channel_number,
19257 {"New Channel Number", "wlan_mgt.csa.new_channel_number",
19258 FT_UINT8, BASE_HEX, NULL, 0,
19259 "Set to the number of the channel to which the STA is moving", HFILL }},
19261 {&hf_ieee80211_csa_channel_switch_count,
19262 {"Channel Switch Count", "wlan_mgt.csa.channel_switch.count",
19263 FT_UINT8, BASE_DEC, NULL, 0,
19264 "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 }},
19266 {&hf_ieee80211_mesh_channel_switch_ttl,
19267 {"Mesh Channel Switch TTL", "wlan_mgt.csa.mesh_channel_switch.ttl",
19268 FT_UINT8, BASE_DEC, NULL, 0,
19269 NULL, HFILL }},
19271 {&hf_ieee80211_mesh_channel_switch_flag,
19272 {"Mesh Channel Switch Flag", "wlan_mgt.csa.mesh_channel_switch.flag",
19273 FT_UINT8, BASE_HEX, NULL, 0,
19274 NULL, HFILL }},
19276 {&hf_ieee80211_mesh_chswitch_flag_txrestrict,
19277 {"CSA Tx Restrict", "wlan_mgt.csa.mesh_channel_switch.flag.txrestrict",
19278 FT_BOOLEAN, 16, TFS (&csa_txrestrict_flags), 0x0001,
19279 NULL, HFILL }},
19281 {&hf_ieee80211_mesh_chswitch_flag_initiator,
19282 {"CSA Initiator", "wlan_mgt.csa.mesh_channel_switch.flag.initiator",
19283 FT_BOOLEAN, 16, TFS (&csa_initiator_flags), 0x0002,
19284 NULL, HFILL }},
19286 {&hf_ieee80211_mesh_channel_switch_reason_code,
19287 {"Mesh Channel Switch Reason Code", "wlan_mgt.csa.mesh_channel_switch.reason_code",
19288 FT_UINT16, BASE_HEX|BASE_EXT_STRING, &ieee80211_reason_code_ext, 0,
19289 NULL, HFILL }},
19291 {&hf_ieee80211_mesh_channel_switch_precedence_value,
19292 {"Mesh Channel Switch Precedence Value", "wlan_mgt.csa.mesh_channel_switch.pre_value",
19293 FT_UINT16, BASE_DEC, NULL, 0,
19294 NULL, HFILL }},
19296 {&hf_ieee80211_tag_measure_request_token,
19297 {"Measurement Token", "wlan_mgt.measure.req.token",
19298 FT_UINT8, BASE_HEX, NULL, 0xff,
19299 NULL, HFILL }},
19301 {&hf_ieee80211_tag_measure_request_mode,
19302 {"Measurement Request Mode", "wlan_mgt.measure.req.mode",
19303 FT_UINT8, BASE_HEX, NULL, 0xff,
19304 NULL, HFILL }},
19306 {&hf_ieee80211_tag_measure_request_mode_parallel,
19307 {"Parallel", "wlan_mgt.measure.req.reqmode.parallel",
19308 FT_BOOLEAN, 8, NULL, 0x01,
19309 NULL, HFILL }},
19311 {&hf_ieee80211_tag_measure_request_mode_enable,
19312 {"Measurement Request Mode Field", "wlan_mgt.measure.req.reqmode.enable",
19313 FT_BOOLEAN, 8, TFS (&tfs_enabled_disabled), 0x02,
19314 NULL, HFILL }},
19316 {&hf_ieee80211_tag_measure_request_mode_request,
19317 {"Measurement Reports", "wlan_mgt.measure.req.reqmode.request",
19318 FT_BOOLEAN, 8, TFS (&tfs_accepted_not_accepted), 0x04,
19319 NULL, HFILL }},
19321 {&hf_ieee80211_tag_measure_request_mode_report,
19322 {"Autonomous Measurement Reports", "wlan_mgt.measure.req.reqmode.report",
19323 FT_BOOLEAN, 8, TFS (&tfs_accepted_not_accepted), 0x08,
19324 NULL, HFILL }},
19326 {&hf_ieee80211_tag_measure_request_mode_duration_mandatory,
19327 {"Duration Mandatory", "wlan_mgt.measure.req.reqmode.duration_mandatory",
19328 FT_BOOLEAN, 8, TFS (&tfs_accepted_not_accepted), 0x10,
19329 NULL, HFILL }},
19331 {&hf_ieee80211_tag_measure_request_mode_reserved,
19332 {"Reserved", "wlan_mgt.measure.req.reqmode.reserved",
19333 FT_UINT8, BASE_HEX, NULL, 0xE0,
19334 NULL, HFILL }},
19336 {&hf_ieee80211_tag_measure_request_type,
19337 {"Measurement Request Type", "wlan_mgt.measure.req.reqtype",
19338 FT_UINT8, BASE_HEX|BASE_EXT_STRING, &ieee80211_tag_measure_request_type_flags_ext, 0x00,
19339 NULL, HFILL }},
19341 {&hf_ieee80211_tag_measure_request_channel_number,
19342 {"Measurement Channel Number", "wlan_mgt.measure.req.channelnumber",
19343 FT_UINT8, BASE_HEX, NULL, 0,
19344 NULL, HFILL }},
19346 {&hf_ieee80211_tag_measure_request_start_time,
19347 {"Measurement Start Time", "wlan_mgt.measure.req.starttime",
19348 FT_UINT64, BASE_HEX, NULL, 0,
19349 NULL, HFILL }},
19351 {&hf_ieee80211_tag_measure_request_duration,
19352 {"Measurement Duration", "wlan_mgt.measure.req.channelnumber",
19353 FT_UINT16, BASE_HEX, NULL, 0,
19354 "in TU (1 TU = 1024 us)", HFILL }},
19356 {&hf_ieee80211_tag_measure_request_regulatory_class,
19357 {"Measurement Channel Number", "wlan_mgt.measure.req.regclass",
19358 FT_UINT8, BASE_HEX, NULL, 0,
19359 NULL, HFILL }},
19361 {&hf_ieee80211_tag_measure_request_randomization_interval,
19362 {"Randomization Interval", "wlan_mgt.measure.req.randint",
19363 FT_UINT16, BASE_HEX, NULL, 0,
19364 "in TU (1 TU = 1024 us)", HFILL }},
19366 {&hf_ieee80211_tag_measure_request_measurement_mode,
19367 {"Measurement Mode", "wlan_mgt.measure.req.measurementmode",
19368 FT_UINT8, BASE_HEX, VALS(ieee80211_tag_measure_request_measurement_mode_flags), 0,
19369 NULL, HFILL }},
19371 {&hf_ieee80211_tag_measure_request_bssid,
19372 {"BSSID", "wlan_mgt.measure.req.bssid",
19373 FT_ETHER, BASE_NONE, NULL, 0,
19374 NULL, HFILL }},
19376 {&hf_ieee80211_tag_measure_request_subelement_length,
19377 {"Length", "wlan_mgt.measure.req.sub.length",
19378 FT_UINT8, BASE_DEC, NULL, 0,
19379 NULL, HFILL }},
19381 {&hf_ieee80211_tag_measure_request_beacon_sub_id,
19382 {"SubElement ID", "wlan_mgt.measure.req.beacon.sub.id",
19383 FT_UINT8, BASE_DEC, VALS(ieee80211_tag_measure_request_beacon_sub_id_flags), 0,
19384 NULL, HFILL }},
19386 {&hf_ieee80211_tag_measure_request_beacon_sub_ssid,
19387 {"SSID", "wlan_mgt.measure.req.beacon.sub.ssid",
19388 FT_STRING, BASE_NONE, 0, 0,
19389 NULL, HFILL }},
19391 {&hf_ieee80211_tag_measure_request_beacon_sub_bri_reporting_condition,
19392 {"Reporting Condition", "wlan_mgt.measure.req.beacon.sub.bri.repcond",
19393 FT_UINT8, BASE_HEX, VALS(ieee80211_tag_measure_request_beacon_sub_bri_reporting_condition_flags), 0,
19394 NULL, HFILL }},
19396 {&hf_ieee80211_tag_measure_request_beacon_sub_bri_threshold_offset,
19397 {"Threshold/Offset", "wlan_mgt.measure.req.beacon.sub.bri.threshold_offset",
19398 FT_UINT8, BASE_HEX, NULL, 0,
19399 NULL, HFILL }},
19401 {&hf_ieee80211_tag_measure_request_beacon_sub_reporting_detail,
19402 {"Reporting Detail", "wlan_mgt.measure.req.beacon.sub.bri.reporting_detail",
19403 FT_UINT8, BASE_HEX, VALS(ieee80211_tag_measure_request_beacon_sub_reporting_detail_flags), 0,
19404 NULL, HFILL }},
19406 {&hf_ieee80211_tag_measure_request_beacon_sub_request,
19407 {"Request", "wlan_mgt.measure.req.beacon.sub.request",
19408 FT_UINT8, BASE_DEC, 0, 0,
19409 NULL, HFILL }},
19411 {&hf_ieee80211_tag_measure_request_beacon_unknown,
19412 {"Unknown Data", "wlan_mgt.measure.req.beacon.unknown",
19413 FT_BYTES, BASE_NONE, NULL, 0,
19414 "(not interpreted)", HFILL }},
19416 {&hf_ieee80211_tag_measure_request_frame_request_type,
19417 {"Frame Request Type", "wlan_mgt.measure.req.frame_request_type",
19418 FT_UINT8, BASE_HEX, NULL, 0,
19419 NULL, HFILL }},
19421 {&hf_ieee80211_tag_measure_request_mac_address,
19422 {"MAC Address", "wlan_mgt.measure.req.mac_address",
19423 FT_BYTES, BASE_NONE, NULL, 0,
19424 NULL, HFILL }},
19426 {&hf_ieee80211_tag_measure_request_peer_mac_address,
19427 {"Peer MAC Address", "wlan_mgt.measure.req.peer_mac_address",
19428 FT_BYTES, BASE_NONE, NULL, 0,
19429 NULL, HFILL }},
19431 {&hf_ieee80211_tag_measure_request_group_id,
19432 {"Group ID", "wlan_mgt.measure.req.groupid",
19433 FT_UINT8, BASE_HEX|BASE_EXT_STRING, &ieee80211_tag_measure_request_group_id_flags_ext, 0,
19434 NULL, HFILL }},
19436 {&hf_ieee80211_tag_measure_report_measurement_token,
19437 {"Measurement Token", "wlan_mgt.measure.req.token",
19438 FT_UINT8, BASE_HEX, NULL, 0,
19439 NULL, HFILL }},
19441 {&hf_ieee80211_tag_measure_report_mode,
19442 {"Measurement Report Mode", "wlan_mgt.measure.req.mode",
19443 FT_UINT8, BASE_HEX, NULL, 0,
19444 NULL, HFILL }},
19446 {&hf_ieee80211_tag_measure_report_mode_late,
19447 {"Measurement Report Mode Field", "wlan_mgt.measure.rep.repmode.late",
19448 FT_BOOLEAN, 8, TFS (&tfs_enabled_disabled), 0x01,
19449 NULL, HFILL }},
19451 {&hf_ieee80211_tag_measure_report_mode_incapable,
19452 {"Measurement Reports", "wlan_mgt.measure.rep.repmode.incapable",
19453 FT_BOOLEAN, 8, TFS (&tfs_accepted_not_accepted), 0x02,
19454 NULL, HFILL }},
19456 {&hf_ieee80211_tag_measure_report_mode_refused,
19457 {"Autonomous Measurement Reports", "wlan_mgt.measure.rep.repmode.refused",
19458 FT_BOOLEAN, 8, TFS (&tfs_accepted_not_accepted), 0x04,
19459 NULL, HFILL }},
19461 {&hf_ieee80211_tag_measure_report_mode_reserved,
19462 {"Reserved", "wlan_mgt.measure.rep.repmode.reserved",
19463 FT_UINT8, BASE_HEX, NULL, 0xf8,
19464 NULL, HFILL }},
19466 {&hf_ieee80211_tag_measure_report_type,
19467 {"Measurement Report Type", "wlan_mgt.measure.rep.reptype",
19468 FT_UINT8, BASE_HEX|BASE_EXT_STRING, &ieee80211_tag_measure_report_type_flags_ext, 0x00,
19469 NULL, HFILL }},
19471 {&hf_ieee80211_tag_measure_report_channel_number,
19472 {"Measurement Channel Number", "wlan_mgt.measure.rep.channelnumber",
19473 FT_UINT8, BASE_HEX, NULL, 0,
19474 NULL, HFILL }},
19476 {&hf_ieee80211_tag_measure_report_start_time,
19477 {"Measurement Start Time", "wlan_mgt.measure.rep.starttime",
19478 FT_UINT64, BASE_HEX, NULL, 0,
19479 NULL, HFILL }},
19481 {&hf_ieee80211_tag_measure_report_duration,
19482 {"Measurement Duration", "wlan_mgt.measure.rep.channelnumber",
19483 FT_UINT16, BASE_HEX, NULL, 0,
19484 NULL, HFILL }},
19486 {&hf_ieee80211_tag_measure_cca_busy_fraction,
19487 {"CCA Busy Fraction", "wlan_mgt.measure.rep.ccabusy",
19488 FT_UINT8, BASE_HEX, NULL, 0,
19489 NULL, HFILL }},
19491 {&hf_ieee80211_tag_measure_basic_map_field,
19492 {"Map Field", "wlan_mgt.measure.rep.mapfield",
19493 FT_UINT8, BASE_HEX, NULL, 0,
19494 NULL, HFILL }},
19496 {&hf_ieee80211_tag_measure_map_field_bss,
19497 {"BSS", "wlan_mgt.measure.rep.repmode.mapfield.bss",
19498 FT_BOOLEAN, 8, TFS (&ieee80211_tag_measure_map_field_bss_flag), 0x01,
19499 NULL, HFILL }},
19501 {&hf_ieee80211_tag_measure_map_field_odfm,
19502 {"Orthogonal Frequency Division Multiplexing (ODFM) Preamble", "wlan_mgt.measure.rep.repmode.mapfield.bss",
19503 FT_BOOLEAN, 8, TFS (&tfs_detected_not_detected), 0x02,
19504 NULL, HFILL }},
19506 {&hf_ieee80211_tag_measure_map_field_unident_signal,
19507 {"Unidentified Signal", "wlan_mgt.measure.rep.repmode.mapfield.unidentsig",
19508 FT_BOOLEAN, 8, TFS (&tfs_detected_not_detected), 0x04,
19509 NULL, HFILL }},
19511 {&hf_ieee80211_tag_measure_map_field_radar,
19512 {"Radar", "wlan_mgt.measure.rep.repmode.mapfield.radar",
19513 FT_BOOLEAN, 8, TFS (&tfs_detected_not_detected), 0x08,
19514 NULL, HFILL }},
19516 {&hf_ieee80211_tag_measure_map_field_unmeasured,
19517 {"Unmeasured", "wlan_mgt.measure.rep.repmode.mapfield.unmeasured",
19518 FT_BOOLEAN, 8, TFS (&tfs_true_false), 0x10,
19519 NULL, HFILL }},
19521 {&hf_ieee80211_tag_measure_map_field_reserved,
19522 {"Reserved", "wlan_mgt.measure.rep.repmode.mapfield.reserved",
19523 FT_UINT8, BASE_HEX, NULL, 0xe0,
19524 NULL, HFILL }},
19526 {&hf_ieee80211_tag_measure_rpi_histogram_report,
19527 {"Receive Power Indicator (RPI) Histogram Report", "wlan_mgt.measure.rep.rpi.histogram_report",
19528 FT_BYTES, BASE_NONE, NULL, 0,
19529 NULL, HFILL }},
19531 {&hf_ieee80211_tag_measure_rpi_histogram_report_0,
19532 {"RPI 0 Density", "wlan_mgt.measure.rep.rpi.rpi0density",
19533 FT_UINT8, BASE_HEX, NULL, 0,
19534 "Receive Power Indicator (RPI) 0 Density", HFILL }},
19536 {&hf_ieee80211_tag_measure_rpi_histogram_report_1,
19537 {"RPI 1 Density", "wlan_mgt.measure.rep.rpi.rpi1density",
19538 FT_UINT8, BASE_HEX, NULL, 0,
19539 "Receive Power Indicator (RPI) 1 Density", HFILL }},
19541 {&hf_ieee80211_tag_measure_rpi_histogram_report_2,
19542 {"RPI 2 Density", "wlan_mgt.measure.rep.rpi.rpi2density",
19543 FT_UINT8, BASE_HEX, NULL, 0,
19544 "Receive Power Indicator (RPI) 2 Density", HFILL }},
19546 {&hf_ieee80211_tag_measure_rpi_histogram_report_3,
19547 {"RPI 3 Density", "wlan_mgt.measure.rep.rpi.rpi3density",
19548 FT_UINT8, BASE_HEX, NULL, 0,
19549 "Receive Power Indicator (RPI) 3 Density", HFILL }},
19551 {&hf_ieee80211_tag_measure_rpi_histogram_report_4,
19552 {"RPI 4 Density", "wlan_mgt.measure.rep.rpi.rpi4density",
19553 FT_UINT8, BASE_HEX, NULL, 0,
19554 "Receive Power Indicator (RPI) 4 Density", HFILL }},
19556 {&hf_ieee80211_tag_measure_rpi_histogram_report_5,
19557 {"RPI 5 Density", "wlan_mgt.measure.rep.rpi.rpi5density",
19558 FT_UINT8, BASE_HEX, NULL, 0,
19559 "Receive Power Indicator (RPI) 5 Density", HFILL }},
19561 {&hf_ieee80211_tag_measure_rpi_histogram_report_6,
19562 {"RPI 6 Density", "wlan_mgt.measure.rep.rpi.rpi6density",
19563 FT_UINT8, BASE_HEX, NULL, 0,
19564 "Receive Power Indicator (RPI) 6 Density", HFILL }},
19566 {&hf_ieee80211_tag_measure_rpi_histogram_report_7,
19567 {"RPI 7 Density", "wlan_mgt.measure.rep.rpi.rpi7density",
19568 FT_UINT8, BASE_HEX, NULL, 0,
19569 "Receive Power Indicator (RPI) 7 Density", HFILL }},
19571 {&hf_ieee80211_tag_measure_report_regulatory_class,
19572 {"Regulatory Class", "wlan_mgt.measure.rep.regclass",
19573 FT_UINT8, BASE_HEX, NULL, 0,
19574 NULL, HFILL }},
19576 {&hf_ieee80211_tag_measure_report_channel_load,
19577 {"Channel Load", "wlan_mgt.measure.rep.chanload",
19578 FT_UINT8, BASE_HEX, NULL, 0,
19579 NULL, HFILL }},
19581 {&hf_ieee80211_tag_measure_report_frame_info,
19582 {"Reported Frame Information", "wlan_mgt.measure.rep.frameinfo",
19583 FT_UINT8, BASE_HEX, NULL, 0,
19584 NULL, HFILL }},
19586 {&hf_ieee80211_tag_measure_report_frame_info_phy_type,
19587 {"Condensed PHY", "wlan_mgt.measure.rep.frameinfo.phytype",
19588 FT_UINT8, BASE_HEX, NULL, 0x7F,
19589 NULL, HFILL }},
19591 {&hf_ieee80211_tag_measure_report_frame_info_frame_type,
19592 {"Reported Frame Type", "wlan_mgt.measure.rep.frameinfo.frametype",
19593 FT_BOOLEAN, 8, TFS(&ieee80211_tag_measure_report_frame_info_frame_type_flag), 0x80,
19594 NULL, HFILL }},
19596 {&hf_ieee80211_tag_measure_report_rcpi,
19597 {"Received Channel Power Indicator (RCPI)", "wlan_mgt.measure.rep.rcpi",
19598 FT_UINT8, BASE_HEX, NULL, 0,
19599 "in dBm", HFILL }},
19601 {&hf_ieee80211_tag_measure_report_rsni,
19602 {"Received Signal to Noise Indicator (RSNI)", "wlan_mgt.measure.rep.rsni",
19603 FT_UINT8, BASE_HEX, NULL, 0,
19604 "in dB", HFILL }},
19606 {&hf_ieee80211_tag_measure_report_bssid,
19607 {"BSSID Being Reported", "wlan_mgt.measure.rep.bssid",
19608 FT_ETHER, BASE_NONE, NULL, 0,
19609 NULL, HFILL }},
19611 {&hf_ieee80211_tag_measure_report_ant_id,
19612 {"Antenna ID", "wlan_mgt.measure.rep.antid",
19613 FT_UINT8, BASE_HEX, NULL, 0,
19614 NULL, HFILL }},
19616 {&hf_ieee80211_tag_measure_report_anpi,
19617 {"ANPI", "wlan_mgt.measure.rep.anpi",
19618 FT_UINT8, BASE_HEX, NULL, 0,
19619 NULL, HFILL }},
19621 {&hf_ieee80211_tag_measure_report_ipi_density_0,
19622 {"IPI Density 0", "wlan_mgt.measure.rep.ipi_density0",
19623 FT_UINT8, BASE_HEX, NULL, 0,
19624 NULL, HFILL }},
19626 {&hf_ieee80211_tag_measure_report_ipi_density_1,
19627 {"IPI Density 1", "wlan_mgt.measure.rep.ipi_density1",
19628 FT_UINT8, BASE_HEX, NULL, 0,
19629 NULL, HFILL }},
19631 {&hf_ieee80211_tag_measure_report_ipi_density_2,
19632 {"IPI Density 2", "wlan_mgt.measure.rep.ipi_density2",
19633 FT_UINT8, BASE_HEX, NULL, 0,
19634 NULL, HFILL }},
19636 {&hf_ieee80211_tag_measure_report_ipi_density_3,
19637 {"IPI Density 3", "wlan_mgt.measure.rep.ipi_density3",
19638 FT_UINT8, BASE_HEX, NULL, 0,
19639 NULL, HFILL }},
19641 {&hf_ieee80211_tag_measure_report_ipi_density_4,
19642 {"IPI Density 4", "wlan_mgt.measure.rep.ipi_density4",
19643 FT_UINT8, BASE_HEX, NULL, 0,
19644 NULL, HFILL }},
19646 {&hf_ieee80211_tag_measure_report_ipi_density_5,
19647 {"IPI Density 5", "wlan_mgt.measure.rep.ipi_density5",
19648 FT_UINT8, BASE_HEX, NULL, 0,
19649 NULL, HFILL }},
19651 {&hf_ieee80211_tag_measure_report_ipi_density_6,
19652 {"IPI Density 6", "wlan_mgt.measure.rep.ipi_density6",
19653 FT_UINT8, BASE_HEX, NULL, 0,
19654 NULL, HFILL }},
19656 {&hf_ieee80211_tag_measure_report_ipi_density_7,
19657 {"IPI Density 7", "wlan_mgt.measure.rep.ipi_density7",
19658 FT_UINT8, BASE_HEX, NULL, 0,
19659 NULL, HFILL }},
19661 {&hf_ieee80211_tag_measure_report_ipi_density_8,
19662 {"IPI Density 8", "wlan_mgt.measure.rep.ipi_density8",
19663 FT_UINT8, BASE_HEX, NULL, 0,
19664 NULL, HFILL }},
19666 {&hf_ieee80211_tag_measure_report_ipi_density_9,
19667 {"IPI Density 9", "wlan_mgt.measure.rep.ipi_density9",
19668 FT_UINT8, BASE_HEX, NULL, 0,
19669 NULL, HFILL }},
19671 {&hf_ieee80211_tag_measure_report_ipi_density_10,
19672 {"IPI Density 10", "wlan_mgt.measure.rep.ipi_density10",
19673 FT_UINT8, BASE_HEX, NULL, 0,
19674 NULL, HFILL }},
19676 {&hf_ieee80211_tag_measure_report_parent_tsf,
19677 {"Parent Timing Synchronization Function (TSF)", "wlan_mgt.measure.rep.parenttsf",
19678 FT_UINT32, BASE_HEX, NULL, 0,
19679 NULL, HFILL }},
19681 {&hf_ieee80211_tag_quiet_count,
19682 {"Count", "wlan_mgt.quiet.count",
19683 FT_UINT8, BASE_DEC, NULL, 0,
19684 "Set to the number of TBTTs until the beacon interval during which the next quiet interval shall start", HFILL }},
19686 {&hf_ieee80211_tag_quiet_period,
19687 {"Period", "wlan_mgt.quiet.period",
19688 FT_UINT8, BASE_DEC, NULL, 0,
19689 "Set to the number of beacon intervals between the start of regularly scheduled quiet intervals", HFILL }},
19691 {&hf_ieee80211_tag_quiet_duration,
19692 {"Duration", "wlan_mgt.quiet.duration",
19693 FT_UINT16, BASE_DEC, NULL, 0,
19694 "Set to the duration of the quiet interval", HFILL }},
19696 {&hf_ieee80211_tag_quiet_offset,
19697 {"Offset", "wlan_mgt.quiet.offset",
19698 FT_UINT16, BASE_DEC, NULL, 0,
19699 "Set to the offset of the start of the quiet interval from the TBTT", HFILL }},
19701 {&hf_ieee80211_tag_dfs_owner,
19702 {"Owner", "wlan_mgt.dfs.owner",
19703 FT_ETHER, BASE_NONE, NULL, 0,
19704 "Set to the individual IEEE MAC address of the STA that is the currently known DFS Owner in the IBSS", HFILL }},
19706 {&hf_ieee80211_tag_dfs_recovery_interval,
19707 {"Recovery Interval", "wlan_mgt.dfs.recovery_interval",
19708 FT_UINT8, BASE_DEC, NULL, 0,
19709 "Indicates the time interval that shall be used for DFS owner recovery", HFILL }},
19711 {&hf_ieee80211_tag_dfs_channel_map,
19712 {"Channel Map", "wlan_mgt.dfs.channel_map",
19713 FT_NONE, BASE_NONE, NULL, 0,
19714 NULL, HFILL }},
19716 {&hf_ieee80211_tag_dfs_channel_number,
19717 {"Channel Number", "wlan_mgt.dfs.channel_number",
19718 FT_UINT8, BASE_DEC, NULL, 0,
19719 NULL, HFILL }},
19721 {&hf_ieee80211_tag_dfs_map,
19722 {"Map", "wlan_mgt.dfs.map",
19723 FT_UINT8, BASE_HEX, NULL, 0,
19724 NULL, HFILL }},
19726 {&hf_ieee80211_tag_erp_info,
19727 {"ERP Information", "wlan_mgt.erp_info",
19728 FT_UINT8, BASE_HEX, NULL, 0,
19729 NULL, HFILL }},
19731 {&hf_ieee80211_tag_erp_info_erp_present,
19732 {"Non ERP Present", "wlan_mgt.erp_info.erp_present",
19733 FT_BOOLEAN, 8, TFS(&tfs_set_notset), 0x01,
19734 NULL, HFILL }},
19736 {&hf_ieee80211_tag_erp_info_use_protection,
19737 {"Use Protection", "wlan_mgt.erp_info.use_protection",
19738 FT_BOOLEAN, 8, TFS(&tfs_set_notset), 0x02,
19739 NULL, HFILL }},
19741 {&hf_ieee80211_tag_erp_info_barker_preamble_mode,
19742 {"Barker Preamble Mode", "wlan_mgt.erp_info.barker_preamble_mode",
19743 FT_BOOLEAN, 8, TFS(&tfs_set_notset), 0x04,
19744 NULL, HFILL }},
19746 {&hf_ieee80211_tag_erp_info_reserved,
19747 {"Reserved", "wlan_mgt.erp_info.reserved",
19748 FT_UINT8, BASE_HEX, NULL, 0xF8,
19749 NULL, HFILL }},
19751 /* Table 8-103-Capabilities field */
19752 {&hf_ieee80211_tag_extended_capabilities,
19753 {"Extended Capabilities", "wlan_mgt.extcap",
19754 FT_UINT8, BASE_HEX, NULL, 0,
19755 NULL, HFILL }},
19757 /* P802.11n/D6.0 */
19758 /* Extended Capability octet 1 */
19759 {&hf_ieee80211_tag_extended_capabilities_b0,
19760 {"20/40 BSS Coexistence Management Support", "wlan_mgt.extcap.b0",
19761 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x01,
19762 "HT Information Exchange Support", HFILL }},
19764 /* P802.11p/D4.0 */
19765 {&hf_ieee80211_tag_extended_capabilities_b1,
19766 {"On-demand beacon", "wlan_mgt.extcap.b1",
19767 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x02,
19768 NULL, HFILL }},
19770 {&hf_ieee80211_tag_extended_capabilities_b2,
19771 {"Extended Channel Switching", "wlan_mgt.extcap.b2",
19772 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x04,
19773 NULL, HFILL }},
19775 {&hf_ieee80211_tag_extended_capabilities_b3,
19776 {"WAVE indication", "wlan_mgt.extcap.b3",
19777 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x08,
19778 NULL, HFILL }},
19779 /*End: P802.11p/D4.0 */
19781 {&hf_ieee80211_tag_extended_capabilities_b4,
19782 {"PSMP Capability", "wlan_mgt.extcap.b4",
19783 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x10,
19784 NULL, HFILL }},
19786 {&hf_ieee80211_tag_extended_capabilities_b5,
19787 {"Reserved", "wlan_mgt.extcap.b5",
19788 FT_UINT8, BASE_HEX, NULL, 0x20,
19789 "Must be zero", HFILL }},
19791 {&hf_ieee80211_tag_extended_capabilities_b6,
19792 {"S-PSMP Support", "wlan_mgt.extcap.b6",
19793 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x40,
19794 NULL, HFILL }},
19796 {&hf_ieee80211_tag_extended_capabilities_b7,
19797 {"Event", "wlan_mgt.extcap.b7",
19798 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x80,
19799 NULL, HFILL }},
19802 /* Extended Capability octet 2 */
19803 {&hf_ieee80211_tag_extended_capabilities_b8,
19804 {"Diagnostics", "wlan_mgt.extcap.b8",
19805 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x01,
19806 NULL, HFILL }},
19808 {&hf_ieee80211_tag_extended_capabilities_b9,
19809 {"Multicast Diagnostics", "wlan_mgt.extcap.b9",
19810 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x02,
19811 NULL, HFILL }},
19813 {&hf_ieee80211_tag_extended_capabilities_b10,
19814 {"Location Tracking", "wlan_mgt.extcap.b10",
19815 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x04,
19816 NULL, HFILL }},
19818 {&hf_ieee80211_tag_extended_capabilities_b11,
19819 {"FMS", "wlan_mgt.extcap.b11",
19820 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x08,
19821 NULL, HFILL }},
19823 {&hf_ieee80211_tag_extended_capabilities_b12,
19824 {"Proxy ARP Service", "wlan_mgt.extcap.b12",
19825 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x10,
19826 NULL, HFILL }},
19828 {&hf_ieee80211_tag_extended_capabilities_b13,
19829 {"Collocated Interference Reporting", "wlan_mgt.extcap.b13",
19830 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x20,
19831 NULL, HFILL }},
19833 {&hf_ieee80211_tag_extended_capabilities_b14,
19834 {"Civic Location", "wlan_mgt.extcap.b14",
19835 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x40,
19836 NULL, HFILL }},
19838 {&hf_ieee80211_tag_extended_capabilities_b15,
19839 {"Geospatial Location", "wlan_mgt.extcap.b15",
19840 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x80,
19841 NULL, HFILL }},
19844 /* Extended Capability octet 3 */
19845 {&hf_ieee80211_tag_extended_capabilities_b16,
19846 {"TFS", "wlan_mgt.extcap.b16",
19847 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x01,
19848 NULL, HFILL }},
19850 {&hf_ieee80211_tag_extended_capabilities_b17,
19851 {"WNM-Sleep Mode", "wlan_mgt.extcap.b17",
19852 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x02,
19853 NULL, HFILL }},
19855 {&hf_ieee80211_tag_extended_capabilities_b18,
19856 {"TIM Broadcast", "wlan_mgt.extcap.b18",
19857 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x04,
19858 NULL, HFILL }},
19860 {&hf_ieee80211_tag_extended_capabilities_b19,
19861 {"BSS Transition", "wlan_mgt.extcap.b19",
19862 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x08,
19863 NULL, HFILL }},
19865 {&hf_ieee80211_tag_extended_capabilities_b20,
19866 {"QoS Traffic Capability", "wlan_mgt.extcap.b20",
19867 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x10,
19868 NULL, HFILL }},
19870 {&hf_ieee80211_tag_extended_capabilities_b21,
19871 {"AC Station Count", "wlan_mgt.extcap.b21",
19872 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x20,
19873 NULL, HFILL }},
19875 {&hf_ieee80211_tag_extended_capabilities_b22,
19876 {"Multiple BSSID", "wlan_mgt.extcap.b22",
19877 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x40,
19878 NULL, HFILL }},
19880 {&hf_ieee80211_tag_extended_capabilities_b23,
19881 {"Timing Measurement", "wlan_mgt.extcap.b23",
19882 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x80,
19883 NULL, HFILL }},
19886 /* Extended Capability octet 4 */
19887 {&hf_ieee80211_tag_extended_capabilities_b24,
19888 {"Channel Usage", "wlan_mgt.extcap.b24",
19889 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x01,
19890 NULL, HFILL }},
19892 {&hf_ieee80211_tag_extended_capabilities_b25,
19893 {"SSID List", "wlan_mgt.extcap.b25",
19894 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x02,
19895 NULL, HFILL }},
19897 {&hf_ieee80211_tag_extended_capabilities_b26,
19898 {"DMS", "wlan_mgt.extcap.b26",
19899 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x04,
19900 NULL, HFILL }},
19902 {&hf_ieee80211_tag_extended_capabilities_b27,
19903 {"UTC TSF Offset", "wlan_mgt.extcap.b27",
19904 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x08,
19905 NULL, HFILL }},
19907 {&hf_ieee80211_tag_extended_capabilities_b28,
19908 {"Peer U-APSD Buffer STA Support", "wlan_mgt.extcap.b28",
19909 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x10,
19910 NULL, HFILL }},
19912 {&hf_ieee80211_tag_extended_capabilities_b29,
19913 {"TDLS Peer PSM Support", "wlan_mgt.extcap.b29",
19914 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x20,
19915 NULL, HFILL }},
19917 {&hf_ieee80211_tag_extended_capabilities_b30,
19918 {"TDLS channel switching", "wlan_mgt.extcap.b30",
19919 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x40,
19920 NULL, HFILL }},
19922 {&hf_ieee80211_tag_extended_capabilities_b31,
19923 {"Interworking", "wlan_mgt.extcap.b31",
19924 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x80,
19925 NULL, HFILL }},
19928 /* Extended Capability octet 5 */
19929 {&hf_ieee80211_tag_extended_capabilities_b32,
19930 {"QoS Map", "wlan_mgt.extcap.b32",
19931 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x01,
19932 NULL, HFILL }},
19934 {&hf_ieee80211_tag_extended_capabilities_b33,
19935 {"EBR", "wlan_mgt.extcap.b33",
19936 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x02,
19937 NULL, HFILL }},
19939 {&hf_ieee80211_tag_extended_capabilities_b34,
19940 {"SSPN Interface", "wlan_mgt.extcap.b34",
19941 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x04,
19942 NULL, HFILL }},
19944 {&hf_ieee80211_tag_extended_capabilities_b35,
19945 {"Reserved", "wlan_mgt.extcap.b35",
19946 FT_UINT8, BASE_HEX, NULL, 0x08,
19947 "Must be zero", HFILL }},
19949 {&hf_ieee80211_tag_extended_capabilities_b36,
19950 {"MSGCF Capability", "wlan_mgt.extcap.b36",
19951 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x10,
19952 NULL, HFILL }},
19954 {&hf_ieee80211_tag_extended_capabilities_b37,
19955 {"TDLS support", "wlan_mgt.extcap.b37",
19956 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x20,
19957 NULL, HFILL }},
19959 {&hf_ieee80211_tag_extended_capabilities_b38,
19960 {"TDLS Prohibited", "wlan_mgt.extcap.b38",
19961 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x40,
19962 NULL, HFILL }},
19964 {&hf_ieee80211_tag_extended_capabilities_b39,
19965 {"TDLS Channel Switching Prohibited", "wlan_mgt.extcap.b39",
19966 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x80,
19967 NULL, HFILL }},
19970 /* Extended Capability octet 6 */
19971 {&hf_ieee80211_tag_extended_capabilities_b40,
19972 {"Reject Unadmitted Frame", "wlan_mgt.extcap.b40",
19973 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x01,
19974 NULL, HFILL }},
19976 {&hf_ieee80211_tag_extended_capabilities_serv_int_granularity,
19977 {"Service Interval Granularity",
19978 "wlan_mgt.extcap.serv_int_granularity",
19979 FT_UINT8, BASE_DEC, VALS(service_interval_granularity_vals), 0x0e,
19980 NULL, HFILL }},
19982 {&hf_ieee80211_tag_extended_capabilities_b44,
19983 {"Identifier Location", "wlan_mgt.extcap.b44",
19984 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x10,
19985 NULL, HFILL }},
19987 {&hf_ieee80211_tag_extended_capabilities_b45,
19988 {"U-APSD Coexistence", "wlan_mgt.extcap.b45",
19989 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x20,
19990 NULL, HFILL }},
19992 {&hf_ieee80211_tag_extended_capabilities_b46,
19993 {"WNM-Notification", "wlan_mgt.extcap.b46",
19994 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x40,
19995 NULL, HFILL }},
19997 {&hf_ieee80211_tag_extended_capabilities_b47,
19998 {"Reserved", "wlan_mgt.extcap.b47",
19999 FT_UINT8, BASE_HEX, NULL, 0x80,
20000 "Must be zero", HFILL }},
20002 /* Extended Capability octet 7 */
20003 {&hf_ieee80211_tag_extended_capabilities_b48,
20004 {"UTF-8 SSID", "wlan_mgt.extcap.b48",
20005 FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x01,
20006 "The SSID in this BSS is interpreted using UTF-8 encoding", HFILL }},
20008 {&hf_ieee80211_tag_extended_capabilities_o7,
20009 {"Reserved", "wlan_mgt.extcap.o7",
20010 FT_UINT8, BASE_HEX, NULL, 0xfe,
20011 "Must be zero", HFILL }},
20013 /* Extended Capability octet 8 */
20015 {&hf_ieee80211_tag_extended_capabilities_o8,
20016 {"Reserved", "wlan_mgt.extcap.o8",
20017 FT_UINT8, BASE_HEX, NULL, 0xff,
20018 "Must be zero", HFILL }},
20020 {&hf_ieee80211_tag_cisco_ccx1_unknown,
20021 {"Unknown", "wlan_mgt.cisco.ccx1.unknown",
20022 FT_BYTES, BASE_NONE, NULL, 0,
20023 NULL, HFILL }},
20025 {&hf_ieee80211_tag_cisco_ccx1_name,
20026 {"Name", "wlan_mgt.cisco.ccx1.name",
20027 FT_STRING, BASE_NONE, NULL, 0,
20028 NULL, HFILL }},
20030 {&hf_ieee80211_tag_cisco_ccx1_clients,
20031 {"Clients", "wlan_mgt.cisco.ccx1.clients",
20032 FT_UINT8, BASE_DEC, NULL, 0,
20033 NULL, HFILL }},
20035 {&hf_ieee80211_tag_cisco_ccx1_unknown2,
20036 {"Unknown2", "wlan_mgt.cisco.ccx1.unknown2",
20037 FT_BYTES, BASE_NONE, NULL, 0,
20038 NULL, HFILL }},
20040 {&hf_ieee80211_tag_neighbor_report_bssid,
20041 {"BSSID", "wlan_mgt.nreport.bssid",
20042 FT_ETHER, BASE_NONE, NULL, 0,
20043 NULL, HFILL }},
20045 {&hf_ieee80211_tag_neighbor_report_bssid_info,
20046 {"BSSID Information", "wlan_mgt.nreport.bssid.info",
20047 FT_UINT32, BASE_HEX, NULL, 0,
20048 NULL, HFILL }},
20050 {&hf_ieee80211_tag_neighbor_report_bssid_info_reachability,
20051 {"AP Reachability", "wlan_mgt.nreport.bssid.info.reachability",
20052 FT_UINT16, BASE_HEX, NULL, 0x0003,
20053 NULL, HFILL }},
20055 {&hf_ieee80211_tag_neighbor_report_bssid_info_security,
20056 {"Security", "wlan_mgt.nreport.bssid.info.security",
20057 FT_UINT16, BASE_HEX, NULL, 0x0004,
20058 NULL, HFILL }},
20060 {&hf_ieee80211_tag_neighbor_report_bssid_info_key_scope,
20061 {"Key Scope", "wlan_mgt.nreport.bssid.info.keyscope",
20062 FT_UINT16, BASE_HEX, NULL, 0x0008,
20063 NULL, HFILL }},
20065 {&hf_ieee80211_tag_neighbor_report_bssid_info_capability_spec_mng,
20066 {"Capability: Spectrum Management", "wlan_mgt.nreport.bssid.info.capability.specmngt",
20067 FT_UINT16, BASE_HEX, NULL, 0x0010,
20068 NULL, HFILL }},
20070 {&hf_ieee80211_tag_neighbor_report_bssid_info_capability_qos,
20071 {"Capability: QoS", "wlan_mgt.nreport.bssid.info.capability.qos",
20072 FT_UINT16, BASE_HEX, NULL, 0x0020,
20073 NULL, HFILL }},
20075 {&hf_ieee80211_tag_neighbor_report_bssid_info_capability_apsd,
20076 {"Capability: APSD", "wlan_mgt.nreport.bssid.info.capability.apsd",
20077 FT_UINT16, BASE_HEX, NULL, 0x0040,
20078 NULL, HFILL }},
20080 {&hf_ieee80211_tag_neighbor_report_bssid_info_capability_radio_msnt,
20081 {"Capability: Radio Measurement", "wlan_mgt.nreport.bssid.info.capability.radiomsnt",
20082 FT_UINT16, BASE_HEX, NULL, 0x0080,
20083 NULL, HFILL }},
20085 {&hf_ieee80211_tag_neighbor_report_bssid_info_capability_dback,
20086 {"Capability: Delayed Block Ack", "wlan_mgt.nreport.bssid.info.capability.dback",
20087 FT_UINT16, BASE_HEX, NULL, 0x0100,
20088 NULL, HFILL }},
20090 {&hf_ieee80211_tag_neighbor_report_bssid_info_capability_iback,
20091 {"Capability: Immediate Block Ack", "wlan_mgt.nreport.bssid.info.capability.iback",
20092 FT_UINT16, BASE_HEX, NULL, 0x0200,
20093 NULL, HFILL }},
20095 {&hf_ieee80211_tag_neighbor_report_bssid_info_mobility_domain,
20096 {"Mobility Domain", "wlan_mgt.nreport.bssid.info.mobilitydomain",
20097 FT_UINT16, BASE_HEX, NULL, 0x0400,
20098 NULL, HFILL }},
20100 {&hf_ieee80211_tag_neighbor_report_bssid_info_high_throughput,
20101 {"High Throughput Control (+HTC)", "wlan_mgt.nreport.bssid.info.hthoughput",
20102 FT_UINT16, BASE_HEX, NULL, 0x0800,
20103 NULL, HFILL }},
20105 {&hf_ieee80211_tag_neighbor_report_bssid_info_reserved,
20106 {"Reserved", "wlan_mgt.nreport.bssid.info.reserved",
20107 FT_UINT32, BASE_HEX, NULL, 0,
20108 NULL, HFILL }},
20110 {&hf_ieee80211_tag_neighbor_report_reg_class,
20111 {"Regulatory Class", "wlan_mgt.nreport.regclass",
20112 FT_UINT8, BASE_HEX, NULL, 0,
20113 NULL, HFILL }},
20115 {&hf_ieee80211_tag_neighbor_report_channel_number,
20116 {"Channel Number", "wlan_mgt.nreport.channumber",
20117 FT_UINT8, BASE_HEX, NULL, 0,
20118 NULL, HFILL }},
20120 {&hf_ieee80211_tag_neighbor_report_phy_type,
20121 {"PHY Type", "wlan_mgt.nreport.phytype",
20122 FT_UINT8, BASE_HEX, NULL, 0,
20123 NULL, HFILL }},
20125 {&hf_ieee80211_tag_supported_reg_classes_current,
20126 {"Current Regulatory Class", "wlan_mgt.supregclass.current",
20127 FT_UINT8, BASE_HEX, NULL, 0,
20128 NULL, HFILL }},
20130 {&hf_ieee80211_tag_supported_reg_classes_alternate,
20131 {"Alternate Regulatory Classes", "wlan_mgt.supregclass.alt",
20132 FT_STRING, BASE_NONE, NULL, 0,
20133 NULL, HFILL }},
20135 {&hf_ieee80211_wfa_ie_type,
20136 {"Type", "wlan_mgt.wfa.ie.type",
20137 FT_UINT8, BASE_HEX, VALS(ieee802111_wfa_ie_type_vals), 0,
20138 NULL, HFILL }},
20140 {&hf_ieee80211_wfa_ie_wpa_version,
20141 {"WPA Version", "wlan_mgt.wfa.ie.wpa.version",
20142 FT_UINT16, BASE_DEC, NULL, 0,
20143 NULL, HFILL }},
20145 {&hf_ieee80211_wfa_ie_wpa_mcs,
20146 {"Multicast Cipher Suite", "wlan_mgt.wfa.ie.wpa.mcs",
20147 FT_UINT32, BASE_CUSTOM, wpa_mcs_base_custom, 0,
20148 "Contains the cipher suite selector used by the BSS to protect broadcast/multicasttraffic", HFILL }},
20150 {&hf_ieee80211_wfa_ie_wpa_mcs_oui,
20151 {"Multicast Cipher Suite OUI", "wlan_mgt.wfa.ie.wpa.mcs.oui",
20152 FT_UINT24, BASE_CUSTOM, oui_base_custom, 0,
20153 NULL, HFILL }},
20155 {&hf_ieee80211_wfa_ie_wpa_mcs_type,
20156 {"Multicast Cipher Suite type", "wlan_mgt.wfa.ie.wpa.mcs.type",
20157 FT_UINT8, BASE_DEC, NULL, 0,
20158 NULL, HFILL }},
20160 {&hf_ieee80211_wfa_ie_wpa_mcs_wfa_type,
20161 {"Multicast Cipher Suite type", "wlan_mgt.wfa.ie.wpa.mcs.type",
20162 FT_UINT8, BASE_DEC, VALS(ieee80211_wfa_ie_wpa_cipher_vals), 0,
20163 NULL, HFILL }},
20165 {&hf_ieee80211_wfa_ie_wpa_ucs_count,
20166 {"Unicast Cipher Suite Count", "wlan_mgt.wfa.ie.wpa.ucs.count",
20167 FT_UINT16, BASE_DEC, NULL, 0,
20168 "Indicates the number of pairwise cipher suite selectors that are contained in the Unicast Cipher Suite List", HFILL }},
20170 {&hf_ieee80211_wfa_ie_wpa_ucs_list,
20171 {"Unicast Cipher Suite List", "wlan_mgt.wfa.ie.wpa.ucs.list",
20172 FT_NONE, BASE_NONE, NULL, 0,
20173 "Contains a series of cipher suite selectors that indicate the Unicast cipher suites", HFILL }},
20175 {&hf_ieee80211_wfa_ie_wpa_ucs,
20176 {"Unicast Cipher Suite", "wlan_mgt.wfa.ie.wpa.ucs",
20177 FT_UINT32, BASE_CUSTOM, wpa_ucs_base_custom, 0,
20178 NULL, HFILL }},
20180 {&hf_ieee80211_wfa_ie_wpa_ucs_oui,
20181 {"Unicast Cipher Suite OUI", "wlan_mgt.wfa.ie.wpau.cs.oui",
20182 FT_UINT24, BASE_CUSTOM, oui_base_custom, 0,
20183 NULL, HFILL }},
20185 {&hf_ieee80211_wfa_ie_wpa_ucs_type,
20186 {"Unicast Cipher Suite type", "wlan_mgt.wfa.ie.wpa.ucs.type",
20187 FT_UINT8, BASE_DEC, NULL, 0,
20188 NULL, HFILL }},
20190 {&hf_ieee80211_wfa_ie_wpa_ucs_wfa_type,
20191 {"Unicast Cipher Suite type", "wlan_mgt.wfa.ie.wpa.ucs.type",
20192 FT_UINT8, BASE_DEC, VALS(ieee80211_wfa_ie_wpa_cipher_vals), 0,
20193 NULL, HFILL }},
20195 {&hf_ieee80211_wfa_ie_wpa_akms_count,
20196 {"Auth Key Management (AKM) Suite Count", "wlan_mgt.wfa.ie.wpa.akms.count",
20197 FT_UINT16, BASE_DEC, NULL, 0,
20198 "Indicates the number of Auth Key Management suite selectors that are contained in the Auth Key Management Suite List", HFILL }},
20200 {&hf_ieee80211_wfa_ie_wpa_akms_list,
20201 {"Auth Key Management (AKM) List", "wlan_mgt.wfa.ie.wpa.akms.list",
20202 FT_NONE, BASE_NONE, NULL, 0,
20203 "Contains a series of cipher suite selectors that indicate the AKM suites", HFILL }},
20205 {&hf_ieee80211_wfa_ie_wpa_akms,
20206 {"Auth Key Management (AKM) Suite", "wlan_mgt.wfa.ie.wpa.akms",
20207 FT_UINT32, BASE_CUSTOM, wpa_akms_base_custom, 0,
20208 NULL, HFILL }},
20210 {&hf_ieee80211_wfa_ie_wpa_akms_oui,
20211 {"Auth Key Management (AKM) OUI", "wlan_mgt.wfa.ie.wpa.akms.oui",
20212 FT_UINT24, BASE_CUSTOM, oui_base_custom, 0,
20213 NULL, HFILL }},
20215 {&hf_ieee80211_wfa_ie_wpa_akms_type,
20216 {"Auth Key Management (AKM) type", "wlan_mgt.wfa.ie.wpa.akms.type",
20217 FT_UINT8, BASE_DEC, NULL, 0,
20218 NULL, HFILL }},
20220 {&hf_ieee80211_wfa_ie_wpa_akms_wfa_type,
20221 {"Auth Key Management (AKM) type", "wlan_mgt.wfa.ie.wpa.type",
20222 FT_UINT8, BASE_DEC, VALS(ieee80211_wfa_ie_wpa_keymgmt_vals), 0,
20223 NULL, HFILL }},
20225 {&hf_ieee80211_wfa_ie_wme_subtype,
20226 {"WME Subtype", "wlan_mgt.wfa.ie.wme.subtype",
20227 FT_UINT8, BASE_DEC, VALS(ieee802111_wfa_ie_wme_type), 0,
20228 NULL, HFILL }},
20230 {&hf_ieee80211_wfa_ie_wme_version,
20231 {"WME Version", "wlan_mgt.wfa.ie.wme.version",
20232 FT_UINT8, BASE_DEC, NULL, 0,
20233 NULL, HFILL }},
20235 {&hf_ieee80211_wfa_ie_wme_qos_info,
20236 {"WME QoS Info", "wlan_mgt.wfa.ie.wme.qos_info",
20237 FT_UINT8, BASE_HEX, NULL, 0,
20238 NULL, HFILL }},
20240 {&hf_ieee80211_wfa_ie_wme_qos_info_sta_max_sp_length,
20241 {"Max SP Length", "wlan_mgt.wfa.ie.wme.qos_info.sta.max_sp_length",
20242 FT_UINT8, BASE_HEX, VALS(ieee802111_wfa_ie_wme_qos_info_sta_max_sp_length_vals), 0x60,
20243 NULL, HFILL }},
20245 {&hf_ieee80211_wfa_ie_wme_qos_info_sta_ac_be,
20246 {"AC_BE", "wlan_mgt.wfa.ie.wme.qos_info.sta.ac_be",
20247 FT_BOOLEAN, 8, TFS(&ieee802111_wfa_ie_wme_qos_info_sta_ac_tfs), 0x08,
20248 NULL, HFILL }},
20250 {&hf_ieee80211_wfa_ie_wme_qos_info_sta_ac_bk,
20251 {"AC_BK", "wlan_mgt.wfa.ie.wme.qos_info.sta.ac_bk",
20252 FT_BOOLEAN, 8, TFS(&ieee802111_wfa_ie_wme_qos_info_sta_ac_tfs), 0x04,
20253 NULL, HFILL }},
20255 {&hf_ieee80211_wfa_ie_wme_qos_info_sta_ac_vi,
20256 {"AC_VI", "wlan_mgt.wfa.ie.wme.qos_info.sta.ac_vi",
20257 FT_BOOLEAN, 8, TFS(&ieee802111_wfa_ie_wme_qos_info_sta_ac_tfs), 0x02,
20258 NULL, HFILL }},
20260 {&hf_ieee80211_wfa_ie_wme_qos_info_sta_ac_vo,
20261 {"AC_VO", "wlan_mgt.wfa.ie.wme.qos_info.sta.ac_vo",
20262 FT_BOOLEAN, 8, TFS(&ieee802111_wfa_ie_wme_qos_info_sta_ac_tfs), 0x01,
20263 NULL, HFILL }},
20265 {&hf_ieee80211_wfa_ie_wme_qos_info_sta_reserved,
20266 {"Reserved", "wlan_mgt.wfa.ie.wme.qos_info.sta.reserved",
20267 FT_UINT8, BASE_HEX, NULL, 0x90,
20268 "Must Be Zero", HFILL }},
20270 {&hf_ieee80211_wfa_ie_wme_qos_info_ap_u_apsd,
20271 {"U-APSD", "wlan_mgt.wfa.ie.wme.qos_info.ap.u_apsd",
20272 FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x80,
20273 "Indicates the WMM AP is currently supporting unscheduled automatic power save delivery", HFILL }},
20275 {&hf_ieee80211_wfa_ie_wme_qos_info_ap_parameter_set_count,
20276 {"Parameter Set Count", "wlan_mgt.wfa.ie.wme.qos_info.ap.parameter_set_count",
20277 FT_UINT8, BASE_HEX, NULL, 0x0F,
20278 NULL, HFILL }},
20280 {&hf_ieee80211_wfa_ie_wme_qos_info_ap_reserved,
20281 {"Reserved", "wlan_mgt.wfa.ie.wme.qos_info.ap.reserved",
20282 FT_UINT8, BASE_HEX, NULL, 0x70,
20283 "Must Be Zero", HFILL }},
20285 {&hf_ieee80211_wfa_ie_wme_reserved,
20286 {"Reserved", "wlan_mgt.wfa.ie.wme.reserved",
20287 FT_BYTES, BASE_NONE, NULL, 0,
20288 "Must Be Zero", HFILL }},
20290 {&hf_ieee80211_wfa_ie_wme_ac_parameters,
20291 {"Ac Parameters", "wlan_mgt.wfa.ie.wme.acp",
20292 FT_NONE, BASE_NONE, NULL, 0,
20293 NULL, HFILL }},
20295 {&hf_ieee80211_wfa_ie_wme_acp_aci_aifsn,
20296 {"ACI / AIFSN Field", "wlan_mgt.wfa.ie.wme.acp.aci_aifsn",
20297 FT_UINT8, BASE_HEX, NULL, 0,
20298 NULL, HFILL }},
20300 {&hf_ieee80211_wfa_ie_wme_acp_aci,
20301 {"ACI", "wlan_mgt.wfa.ie.wme.acp.aci",
20302 FT_UINT8, BASE_DEC, VALS(ieee80211_wfa_ie_wme_acs_vals), 0x60,
20303 NULL, HFILL }},
20305 {&hf_ieee80211_wfa_ie_wme_acp_acm,
20306 {"Admission Control Mandatory", "wlan_mgt.wfa.ie.wme.acp.aci",
20307 FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x10,
20308 NULL, HFILL }},
20310 {&hf_ieee80211_wfa_ie_wme_acp_aifsn,
20311 {"AIFSN", "wlan_mgt.wfa.ie.wme.acp.aifsn",
20312 FT_UINT8, BASE_DEC, NULL, 0x0F,
20313 NULL, HFILL }},
20315 {&hf_ieee80211_wfa_ie_wme_acp_reserved,
20316 {"Reserved", "wlan_mgt.wfa.ie.wme.acp.reserved",
20317 FT_UINT8, BASE_DEC, NULL, 0x80,
20318 "Must be Zero", HFILL }},
20320 {&hf_ieee80211_wfa_ie_wme_acp_ecw,
20321 {"ECW", "wlan_mgt.wfa.ie.wme.acp.ecw",
20322 FT_UINT8, BASE_HEX, NULL, 0x00,
20323 NULL, HFILL }},
20325 {&hf_ieee80211_wfa_ie_wme_acp_ecw_max,
20326 {"ECW Max", "wlan_mgt.wfa.ie.wme.acp.ecw.max",
20327 FT_UINT8, BASE_DEC, NULL, 0xF0,
20328 NULL, HFILL }},
20330 {&hf_ieee80211_wfa_ie_wme_acp_ecw_min,
20331 {"ECW Min", "wlan_mgt.wfa.ie.wme.acp.ecw.min",
20332 FT_UINT8, BASE_DEC, NULL, 0x0F,
20333 NULL, HFILL }},
20335 {&hf_ieee80211_wfa_ie_wme_acp_txop_limit,
20336 {"TXOP Limit", "wlan_mgt.wfa.ie.wme.acp.txop_limit",
20337 FT_UINT16, BASE_DEC, NULL, 0x00,
20338 NULL, HFILL }},
20340 {&hf_ieee80211_wfa_ie_wme_tspec_tsinfo,
20341 {"TS Info", "wlan_mgt.wfa.ie.wme.tspec.ts_info",
20342 FT_UINT24, BASE_HEX, NULL, 0,
20343 "Traffic Stream (TS) Info", HFILL }},
20345 {&hf_ieee80211_wfa_ie_wme_tspec_tsinfo_tid,
20346 {"TID", "wlan_mgt.wfa.ie.wme.tspec.ts_info.tid",
20347 FT_UINT24, BASE_DEC, NULL, 0x00001E,
20348 "Traffic Stream Info ID (TID)", HFILL }},
20350 {&hf_ieee80211_wfa_ie_wme_tspec_tsinfo_direction,
20351 {"Direction", "wlan_mgt.wfa.ie.wme.tspec.ts_info.dir",
20352 FT_UINT24, BASE_DEC, VALS(ieee80211_wfa_ie_wme_tspec_tsinfo_direction_vals), 0x000060,
20353 "Traffic Stream (TS) Info Direction", HFILL }},
20355 {&hf_ieee80211_wfa_ie_wme_tspec_tsinfo_psb,
20356 {"PSB", "wlan_mgt.wfa.ie.wme.tspec.ts_info.psb",
20357 FT_UINT24, BASE_DEC, VALS(ieee80211_wfa_ie_wme_tspec_tsinfo_psb_vals), 0x000400,
20358 "Traffic Stream (TS) Info Power Save Behavior (PSB)", HFILL }},
20360 {&hf_ieee80211_wfa_ie_wme_tspec_tsinfo_up,
20361 {"UP", "wlan_mgt.wfa.ie.wme.tspec.ts_info.up",
20362 FT_UINT24, BASE_DEC, VALS(ieee80211_wfa_ie_wme_tspec_tsinfo_up_vals), 0x003800,
20363 "Traffic Stream (TS) Info User Priority (UP)", HFILL }},
20365 {&hf_ieee80211_wfa_ie_wme_tspec_tsinfo_reserved,
20366 {"Reserved", "wlan_mgt.wfa.ie.wme.tspec.ts_info.reserved",
20367 FT_UINT24, BASE_HEX, NULL, 0xFFC381,
20368 "Must be Zero", HFILL }},
20370 {&hf_ieee80211_wfa_ie_wme_tspec_nor_msdu,
20371 {"Normal MSDU Size", "wlan_mgt.wfa.ie.wme.tspec.nor_msdu",
20372 FT_UINT16, BASE_DEC, NULL, 0,
20373 NULL, HFILL }},
20375 {&hf_ieee80211_wfa_ie_wme_tspec_max_msdu,
20376 {"Maximum MSDU Size", "wlan_mgt.wfa.ie.wme.tspec.max_msdu",
20377 FT_UINT16, BASE_DEC, NULL, 0,
20378 NULL, HFILL }},
20380 {&hf_ieee80211_wfa_ie_wme_tspec_min_srv,
20381 {"Minimum Service Interval", "wlan_mgt.wfa.ie.wme.tspec.min_srv",
20382 FT_UINT32, BASE_DEC, NULL, 0,
20383 NULL, HFILL }},
20385 {&hf_ieee80211_wfa_ie_wme_tspec_max_srv,
20386 {"Maximum Service Interval", "wlan_mgt.wfa.ie.wme.tspec.max_srv",
20387 FT_UINT32, BASE_DEC, NULL, 0,
20388 NULL, HFILL }},
20390 {&hf_ieee80211_wfa_ie_wme_tspec_inact_int,
20391 {"Inactivity Interval", "wlan_mgt.wfa.ie.wme.tspec.inact_int",
20392 FT_UINT32, BASE_DEC, NULL, 0,
20393 NULL, HFILL }},
20395 {&hf_ieee80211_wfa_ie_wme_tspec_susp_int,
20396 {"Suspension Interval", "wlan_mgt.wfa.ie.wme.tspec.susp_int",
20397 FT_UINT32, BASE_DEC, NULL, 0,
20398 NULL, HFILL }},
20400 {&hf_ieee80211_wfa_ie_wme_tspec_srv_start,
20401 {"Service Start Time", "wlan_mgt.wfa.ie.wme.tspec.srv_start",
20402 FT_UINT32, BASE_DEC, NULL, 0,
20403 NULL, HFILL }},
20405 {&hf_ieee80211_wfa_ie_wme_tspec_min_data,
20406 {"Minimum Data Rate", "wlan_mgt.wfa.ie.wme.tspec.min_data",
20407 FT_UINT32, BASE_DEC, NULL, 0,
20408 NULL, HFILL }},
20410 {&hf_ieee80211_wfa_ie_wme_tspec_mean_data,
20411 {"Mean Data Rate", "wlan_mgt.wfa.ie.wme.tspec.mean_data",
20412 FT_UINT32, BASE_DEC, NULL, 0,
20413 NULL, HFILL }},
20415 {&hf_ieee80211_wfa_ie_wme_tspec_peak_data,
20416 {"Peak Data Rate", "wlan_mgt.wfa.ie.wme.tspec.peak_data",
20417 FT_UINT32, BASE_DEC, NULL, 0,
20418 NULL, HFILL }},
20420 {&hf_ieee80211_wfa_ie_wme_tspec_burst_size,
20421 {"Burst Size", "wlan_mgt.wfa.ie.wme.tspec.burst_size",
20422 FT_UINT32, BASE_DEC, NULL, 0,
20423 NULL, HFILL }},
20425 {&hf_ieee80211_wfa_ie_wme_tspec_delay_bound,
20426 {"Delay Bound", "wlan_mgt.wfa.ie.wme.tspec.delay_bound",
20427 FT_UINT32, BASE_DEC, NULL, 0,
20428 NULL, HFILL }},
20430 {&hf_ieee80211_wfa_ie_wme_tspec_min_phy,
20431 {"Minimum PHY Rate", "wlan_mgt.wfa.ie.wme.tspec.min_phy",
20432 FT_UINT32, BASE_DEC, NULL, 0,
20433 NULL, HFILL }},
20435 {&hf_ieee80211_wfa_ie_wme_tspec_surplus,
20436 {"Surplus Bandwidth Allowance", "wlan_mgt.wfa.ie.wme.tspec.surplus",
20437 FT_UINT16, BASE_DEC, NULL, 0,
20438 NULL, HFILL }},
20440 {&hf_ieee80211_wfa_ie_wme_tspec_medium,
20441 {"Medium Time", "wlan_mgt.wfa.ie.wme.tspec.medium",
20442 FT_UINT16, BASE_DEC, NULL, 0,
20443 NULL, HFILL }},
20445 {&hf_ieee80211_rsn_ie_pmkid,
20446 {"RSN PMKID", "wlan_mgt.rsn.ie.pmkid",
20447 FT_BYTES, BASE_NONE, NULL, 0,
20448 NULL, HFILL }},
20450 {&hf_ieee80211_rsn_ie_unknown,
20451 {"RSN Unknown", "wlan_mgt.rsn.ie.unknown",
20452 FT_BYTES, BASE_NONE, NULL, 0,
20453 NULL, HFILL }},
20455 {&hf_ieee80211_marvell_ie_type,
20456 {"Type", "wlan_mgt.marvell.ie.type",
20457 FT_UINT8, BASE_HEX, NULL, 0,
20458 NULL, HFILL }},
20460 {&hf_ieee80211_marvell_ie_mesh_subtype,
20461 {"Subtype", "wlan_mgt.marvell.ie.subtype",
20462 FT_UINT8, BASE_HEX, NULL, 0,
20463 NULL, HFILL }},
20465 {&hf_ieee80211_marvell_ie_mesh_version,
20466 {"Version", "wlan_mgt.marvell.ie.version",
20467 FT_UINT8, BASE_HEX, NULL, 0,
20468 NULL, HFILL }},
20470 {&hf_ieee80211_marvell_ie_mesh_active_proto_id,
20471 {"Path Selection Protocol", "wlan_mgt.marvell.ie.proto_id",
20472 FT_UINT8, BASE_HEX, VALS(mesh_path_selection_codes), 0,
20473 NULL, HFILL }},
20475 {&hf_ieee80211_marvell_ie_mesh_active_metric_id,
20476 {"Path Selection Metric", "wlan_mgt.marvell.ie.metric_id",
20477 FT_UINT8, BASE_HEX, VALS(mesh_metric_codes), 0,
20478 NULL, HFILL }},
20480 {&hf_ieee80211_marvell_ie_mesh_cap,
20481 {"Mesh Capabilities", "wlan_mgt.marvell.ie.cap",
20482 FT_UINT8, BASE_HEX, NULL, 0,
20483 NULL, HFILL }},
20485 {&hf_ieee80211_marvell_ie_data,
20486 { "Marvell IE data", "wlan_mgt.marvell.data",
20487 FT_BYTES, BASE_NONE, NULL, 0x0,
20488 NULL, HFILL }},
20490 {&hf_ieee80211_atheros_ie_type,
20491 {"Type", "wlan_mgt.atheros.ie.type",
20492 FT_UINT8, BASE_HEX, VALS(atheros_ie_type_vals), 0,
20493 NULL, HFILL }},
20495 {&hf_ieee80211_atheros_ie_subtype,
20496 {"Subtype", "wlan_mgt.atheros.ie.subtype",
20497 FT_UINT8, BASE_HEX, NULL, 0,
20498 NULL, HFILL }},
20500 {&hf_ieee80211_atheros_ie_version,
20501 {"Version", "wlan_mgt.atheros.ie.version",
20502 FT_UINT8, BASE_HEX, NULL, 0,
20503 NULL, HFILL }},
20505 {&hf_ieee80211_atheros_ie_cap_f_turbop,
20506 {"Turbo Prime", "wlan_mgt.ie.atheros.capabilities.turbop",
20507 FT_BOOLEAN, 8, NULL, ATHEROS_IE_CAP_TURBOP,
20508 NULL, HFILL }},
20510 {&hf_ieee80211_atheros_ie_cap_f_comp,
20511 {"Compression", "wlan_mgt.ie.atheros.capabilities.comp",
20512 FT_BOOLEAN, 8, NULL, ATHEROS_IE_CAP_COMP,
20513 NULL, HFILL }},
20515 {&hf_ieee80211_atheros_ie_cap_f_ff,
20516 {"Fast Frames", "wlan_mgt.ie.atheros.capabilities.ff",
20517 FT_BOOLEAN, 8, NULL, ATHEROS_IE_CAP_FF,
20518 NULL, HFILL }},
20520 {&hf_ieee80211_atheros_ie_cap_f_xr,
20521 {"eXtended Range", "wlan_mgt.ie.atheros.capabilities.xr",
20522 FT_BOOLEAN, 8, NULL, ATHEROS_IE_CAP_XR,
20523 NULL, HFILL }},
20525 {&hf_ieee80211_atheros_ie_cap_f_ar,
20526 {"Advanced Radar", "wlan_mgt.ie.atheros.capabilities.ar",
20527 FT_BOOLEAN, 8, NULL, ATHEROS_IE_CAP_AR,
20528 NULL, HFILL }},
20530 {&hf_ieee80211_atheros_ie_cap_f_burst,
20531 {"Burst", "wlan_mgt.ie.atheros.capabilities.burst",
20532 FT_BOOLEAN, 8, NULL, ATHEROS_IE_CAP_BURST,
20533 NULL, HFILL }},
20535 {&hf_ieee80211_atheros_ie_cap_f_wme,
20536 {"CWMin tuning", "wlan_mgt.ie.atheros.capabilities.wme",
20537 FT_BOOLEAN, 8, NULL, ATHEROS_IE_CAP_WME,
20538 NULL, HFILL }},
20540 {&hf_ieee80211_atheros_ie_cap_f_boost,
20541 {"Boost", "wlan_mgt.ie.atheros.capabilities.boost",
20542 FT_BOOLEAN, 8, NULL, ATHEROS_IE_CAP_BOOST,
20543 NULL, HFILL }},
20545 {&hf_ieee80211_atheros_ie_advcap_cap,
20546 {"Capabilities", "wlan_mgt.atheros.ie.advcap.cap",
20547 FT_UINT8, BASE_HEX, NULL, 0,
20548 NULL, HFILL }},
20550 {&hf_ieee80211_atheros_ie_advcap_defkey,
20551 {"Default key index", "wlan_mgt.atheros.ie.advcap.defkey",
20552 FT_UINT16, BASE_HEX, NULL, 0,
20553 NULL, HFILL }},
20555 {&hf_ieee80211_atheros_ie_xr_info,
20556 {"Info", "wlan_mgt.atheros.ie.xr.info",
20557 FT_UINT8, BASE_HEX, NULL, 0,
20558 NULL, HFILL }},
20560 {&hf_ieee80211_atheros_ie_xr_base_bssid,
20561 {"Base BSS Id", "wlan_mgt.atheros.ie.xr.base_bssid",
20562 FT_ETHER, BASE_NONE, NULL, 0,
20563 NULL, HFILL }},
20565 {&hf_ieee80211_atheros_ie_xr_xr_bssid,
20566 {"XR BSS Id", "wlan_mgt.atheros.ie.xr.xr_bssid",
20567 FT_ETHER, BASE_NONE, NULL, 0,
20568 NULL, HFILL }},
20570 {&hf_ieee80211_atheros_ie_xr_xr_beacon,
20571 {"XR Beacon Interval", "wlan_mgt.atheros.ie.xr.xr_beacon",
20572 FT_UINT32, BASE_CUSTOM, beacon_interval_base_custom, 0,
20573 NULL, HFILL }},
20575 {&hf_ieee80211_atheros_ie_xr_base_cap,
20576 {"Base capabilities", "wlan_mgt.atheros.ie.xr.base_cap",
20577 FT_UINT8, BASE_HEX, NULL, 0,
20578 NULL, HFILL }},
20580 {&hf_ieee80211_atheros_ie_xr_xr_cap,
20581 {"XR capabilities", "wlan_mgt.atheros.ie.xr.xr_cap",
20582 FT_UINT8, BASE_HEX, NULL, 0,
20583 NULL, HFILL }},
20585 {&hf_ieee80211_atheros_ie_data,
20586 {"Atheros IE data", "wlan_mgt.atheros.data",
20587 FT_BYTES, BASE_NONE, NULL, 0,
20588 NULL, HFILL }},
20590 {&hf_ieee80211_aironet_ie_type,
20591 {"Aironet IE type", "wlan_mgt.aironet.type",
20592 FT_UINT8, BASE_DEC, VALS(aironet_ie_type_vals), 0,
20593 NULL, HFILL }},
20595 {&hf_ieee80211_aironet_ie_version,
20596 {"Aironet IE CCX version?", "wlan_mgt.aironet.version",
20597 FT_UINT8, BASE_DEC, NULL, 0,
20598 NULL, HFILL }},
20600 {&hf_ieee80211_aironet_ie_data,
20601 { "Aironet IE data", "wlan_mgt.aironet.data",
20602 FT_BYTES, BASE_NONE, NULL, 0x0,
20603 NULL, HFILL }},
20605 {&hf_ieee80211_qbss_version,
20606 {"QBSS Version", "wlan_mgt.qbss.version",
20607 FT_UINT8, BASE_DEC, NULL, 0,
20608 NULL, HFILL }},
20610 {&hf_ieee80211_qbss_scount,
20611 {"Station Count", "wlan_mgt.qbss.scount",
20612 FT_UINT16, BASE_DEC, NULL, 0,
20613 NULL, HFILL }},
20615 {&hf_ieee80211_qbss_cu,
20616 {"Channel Utilization", "wlan_mgt.qbss.cu",
20617 FT_UINT8, BASE_DEC, NULL, 0,
20618 NULL, HFILL }},
20620 {&hf_ieee80211_qbss_adc,
20621 {"Available Admission Capabilities", "wlan_mgt.qbss.adc",
20622 FT_UINT8, BASE_DEC, NULL, 0,
20623 NULL, HFILL }},
20625 {&hf_ieee80211_qbss2_cu,
20626 {"Channel Utilization", "wlan_mgt.qbss2.cu",
20627 FT_UINT8, BASE_DEC, NULL, 0,
20628 NULL, HFILL }},
20630 {&hf_ieee80211_qbss2_gl,
20631 {"G.711 CU Quantum", "wlan_mgt.qbss2.glimit",
20632 FT_UINT8, BASE_DEC, NULL, 0,
20633 NULL, HFILL }},
20635 {&hf_ieee80211_qbss2_cal,
20636 {"Call Admission Limit", "wlan_mgt.qbss2.cal",
20637 FT_UINT8, BASE_DEC, NULL, 0,
20638 NULL, HFILL }},
20640 {&hf_ieee80211_qbss2_scount,
20641 {"Station Count", "wlan_mgt.qbss2.scount",
20642 FT_UINT16, BASE_DEC, NULL, 0,
20643 NULL, HFILL }},
20645 {&hf_ieee80211_aironet_ie_qos_reserved,
20646 {"Aironet IE QoS reserved", "wlan_mgt.aironet.qos.reserved",
20647 FT_UINT8, BASE_HEX, NULL, 0,
20648 NULL, HFILL }},
20650 {&hf_ieee80211_aironet_ie_qos_paramset,
20651 {"Aironet IE QoS paramset", "wlan_mgt.aironet.qos.paramset",
20652 FT_UINT8, BASE_DEC, NULL, 0,
20653 NULL, HFILL }},
20655 {&hf_ieee80211_aironet_ie_qos_val,
20656 {"Aironet IE QoS valueset", "wlan_mgt.aironet.qos.val",
20657 FT_BYTES, BASE_NONE, NULL, 0,
20658 NULL, HFILL }},
20660 {&hf_ieee80211_aironet_ie_clientmfp,
20661 {"Aironet IE Client MFP", "wlan_mgt.aironet.clientmfp",
20662 FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x01,
20663 NULL, HFILL }},
20665 /* Vendor Specific : Nintendo */
20666 {&hf_ieee80211_vs_nintendo_type,
20667 {"Type", "wlan_mgt.vs.nintendo.type",
20668 FT_UINT8, BASE_DEC, VALS(ieee80211_vs_nintendo_type_vals), 0,
20669 NULL, HFILL }},
20671 {&hf_ieee80211_vs_nintendo_length,
20672 {"Length", "wlan_mgt.vs.nintendo.length",
20673 FT_UINT8, BASE_DEC, NULL, 0,
20674 NULL, HFILL }},
20676 {&hf_ieee80211_vs_nintendo_servicelist,
20677 {"Servicelist", "wlan_mgt.vs.nintendo.servicelist",
20678 FT_BYTES, BASE_NONE, NULL, 0,
20679 NULL, HFILL }},
20681 {&hf_ieee80211_vs_nintendo_service,
20682 {"Service", "wlan_mgt.vs.nintendo.service",
20683 FT_BYTES, BASE_NONE, NULL, 0,
20684 NULL, HFILL }},
20686 {&hf_ieee80211_vs_nintendo_consoleid,
20687 {"Console ID", "wlan_mgt.vs.nintendo.consoleid",
20688 FT_BYTES, BASE_NONE, NULL, 0,
20689 NULL, HFILL }},
20691 {&hf_ieee80211_vs_nintendo_unknown,
20692 {"Unknown", "wlan_mgt.vs.nintendo.unknown",
20693 FT_BYTES, BASE_NONE, NULL, 0,
20694 NULL, HFILL }},
20696 /* Vendor Specific : Aruba Networks */
20697 {&hf_ieee80211_vs_aruba_subtype,
20698 {"Subtype", "wlan_mgt.vs.aruba.subtype",
20699 FT_UINT8, BASE_DEC, VALS(ieee80211_vs_aruba_subtype_vals), 0,
20700 NULL, HFILL }},
20702 {&hf_ieee80211_vs_aruba_apname,
20703 {"AP Name", "wlan_mgt.vs.aruba.ap_name",
20704 FT_STRINGZ, BASE_NONE, NULL, 0,
20705 NULL, HFILL }},
20707 {&hf_ieee80211_vs_aruba_data,
20708 {"Data", "wlan_mgt.vs.aruba.data",
20709 FT_BYTES, BASE_NONE, NULL, 0,
20710 NULL, HFILL }},
20712 {&hf_ieee80211_tsinfo,
20713 {"Traffic Stream (TS) Info", "wlan_mgt.ts_info",
20714 FT_UINT24, BASE_HEX, NULL, 0,
20715 "Traffic Stream (TS) Info field", HFILL }},
20717 {&hf_ieee80211_tsinfo_type,
20718 {"Traffic Type", "wlan_mgt.ts_info.type",
20719 FT_UINT24, BASE_DEC, VALS(tsinfo_type), 0x000001,
20720 "Traffic Stream (TS) Info Traffic Type", HFILL }},
20722 {&hf_ieee80211_tsinfo_tsid,
20723 {"Traffic Stream ID (TSID)", "wlan_mgt.ts_info.tsid",
20724 FT_UINT24, BASE_DEC, NULL, 0x00001E,
20725 "Traffic Stream ID (TSID) Info TSID", HFILL }},
20727 {&hf_ieee80211_tsinfo_dir,
20728 {"Direction", "wlan_mgt.ts_info.dir",
20729 FT_UINT24, BASE_DEC, VALS(tsinfo_direction), 0x000060,
20730 "Traffic Stream (TS) Info Direction", HFILL }},
20732 {&hf_ieee80211_tsinfo_access,
20733 {"Access Policy", "wlan_mgt.ts_info.dir",
20734 FT_UINT24, BASE_DEC, VALS(tsinfo_access), 0x000180,
20735 "Traffic Stream (TS) Info Access Policy", HFILL }},
20737 {&hf_ieee80211_tsinfo_agg,
20738 {"Aggregation", "wlan_mgt.ts_info.agg",
20739 FT_UINT24, BASE_DEC, NULL, 0x000200,
20740 "Traffic Stream (TS) Info Access Policy", HFILL }},
20742 {&hf_ieee80211_tsinfo_apsd,
20743 {"Automatic Power-Save Delivery (APSD)", "wlan_mgt.ts_info.apsd",
20744 FT_UINT24, BASE_DEC, NULL, 0x000400,
20745 "Traffic Stream (TS) Info Automatic Power-Save Delivery (APSD)", HFILL }},
20747 {&hf_ieee80211_tsinfo_up,
20748 {"User Priority", "wlan_mgt.ts_info.up",
20749 FT_UINT24, BASE_DEC, VALS(qos_up), 0x003800,
20750 "Traffic Stream (TS) Info User Priority", HFILL }},
20752 {&hf_ieee80211_tsinfo_ack,
20753 {"Ack Policy", "wlan_mgt.ts_info.ack",
20754 FT_UINT24, BASE_DEC, VALS(ack_policy), 0x00C000,
20755 "Traffic Stream (TS) Info Ack Policy", HFILL }},
20757 {&hf_ieee80211_tsinfo_sched,
20758 {"Schedule", "wlan_mgt.ts_info.sched",
20759 FT_UINT24, BASE_DEC, NULL, 0x010000,
20760 "Traffic Stream (TS) Info Schedule", HFILL }},
20762 {&hf_ieee80211_tsinfo_rsv,
20763 {"Reserved", "wlan_mgt.ts_info.rsv",
20764 FT_UINT24, BASE_HEX, NULL, 0xFE0000,
20765 "Must be Zero", HFILL }},
20767 {&hf_ieee80211_tspec_nor_msdu,
20768 {"Normal MSDU Size", "wlan_mgt.tspec.nor_msdu",
20769 FT_UINT16, BASE_DEC, NULL, 0,
20770 NULL, HFILL }},
20772 {&hf_ieee80211_tspec_max_msdu,
20773 {"Maximum MSDU Size", "wlan_mgt.tspec.max_msdu",
20774 FT_UINT16, BASE_DEC, NULL, 0,
20775 NULL, HFILL }},
20777 {&hf_ieee80211_tspec_min_srv,
20778 {"Minimum Service Interval", "wlan_mgt.tspec.min_srv",
20779 FT_UINT32, BASE_DEC, NULL, 0,
20780 NULL, HFILL }},
20782 {&hf_ieee80211_tspec_max_srv,
20783 {"Maximum Service Interval", "wlan_mgt.tspec.max_srv",
20784 FT_UINT32, BASE_DEC, NULL, 0,
20785 NULL, HFILL }},
20787 {&hf_ieee80211_tspec_inact_int,
20788 {"Inactivity Interval", "wlan_mgt.tspec.inact_int",
20789 FT_UINT32, BASE_DEC, NULL, 0,
20790 NULL, HFILL }},
20792 {&hf_ieee80211_tspec_susp_int,
20793 {"Suspension Interval", "wlan_mgt.tspec.susp_int",
20794 FT_UINT32, BASE_DEC, NULL, 0,
20795 NULL, HFILL }},
20797 {&hf_ieee80211_tspec_srv_start,
20798 {"Service Start Time", "wlan_mgt.tspec.srv_start",
20799 FT_UINT32, BASE_DEC, NULL, 0,
20800 NULL, HFILL }},
20802 {&hf_ieee80211_tspec_min_data,
20803 {"Minimum Data Rate", "wlan_mgt.tspec.min_data",
20804 FT_UINT32, BASE_DEC, NULL, 0,
20805 NULL, HFILL }},
20807 {&hf_ieee80211_tspec_mean_data,
20808 {"Mean Data Rate", "wlan_mgt.tspec.mean_data",
20809 FT_UINT32, BASE_DEC, NULL, 0,
20810 NULL, HFILL }},
20812 {&hf_ieee80211_tspec_peak_data,
20813 {"Peak Data Rate", "wlan_mgt.tspec.peak_data",
20814 FT_UINT32, BASE_DEC, NULL, 0,
20815 NULL, HFILL }},
20817 {&hf_ieee80211_tspec_burst_size,
20818 {"Burst Size", "wlan_mgt.tspec.burst_size",
20819 FT_UINT32, BASE_DEC, NULL, 0,
20820 NULL, HFILL }},
20822 {&hf_ieee80211_tspec_delay_bound,
20823 {"Delay Bound", "wlan_mgt.tspec.delay_bound",
20824 FT_UINT32, BASE_DEC, NULL, 0,
20825 NULL, HFILL }},
20827 {&hf_ieee80211_tspec_min_phy,
20828 {"Minimum PHY Rate", "wlan_mgt.tspec.min_phy",
20829 FT_UINT32, BASE_DEC, NULL, 0,
20830 NULL, HFILL }},
20832 {&hf_ieee80211_tspec_surplus,
20833 {"Surplus Bandwidth Allowance", "wlan_mgt.tspec.surplus",
20834 FT_UINT16, BASE_DEC, NULL, 0,
20835 NULL, HFILL }},
20837 {&hf_ieee80211_tspec_medium,
20838 {"Medium Time", "wlan_mgt.tspec.medium",
20839 FT_UINT16, BASE_DEC, NULL, 0,
20840 NULL, HFILL }},
20842 {&hf_ieee80211_ts_delay,
20843 {"Traffic Stream (TS) Delay", "wlan_mgt.ts_delay",
20844 FT_UINT32, BASE_DEC, NULL, 0,
20845 NULL, HFILL }},
20847 {&hf_ieee80211_tclas_process,
20848 {"Processing", "wlan_mgt.tclas_proc.processing",
20849 FT_UINT8, BASE_DEC, VALS(ieee80211_tclas_process_flag), 0,
20850 "TCLAS Processing", HFILL }},
20852 {&hf_ieee80211_tag_qos_cap_qos_info,
20853 {"QoS Info", "wlan_mgt.tag.qos_cap.qos_info",
20854 FT_UINT8, BASE_HEX, NULL, 0,
20855 "TCLAS Processing", HFILL }},
20857 {&hf_ieee80211_qos_info_field_vo_uapsd,
20858 {"AC_VO U-APSD Flag", "wlan_mgt.tag.qos_cap.qos_info.vo_uapsd",
20859 FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x01,
20860 NULL, HFILL }},
20862 {&hf_ieee80211_qos_info_field_vi_uapsd,
20863 {"AC_VI U-APSD Flag", "wlan_mgt.tag.qos_cap.qos_info.vi_uapsd",
20864 FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x02,
20865 NULL, HFILL }},
20867 {&hf_ieee80211_qos_info_field_bk_uapsd,
20868 {"AC_BK U-APSD Flag", "wlan_mgt.tag.qos_cap.qos_info.bk_uapsd",
20869 FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x04,
20870 NULL, HFILL }},
20872 {&hf_ieee80211_qos_info_field_be_uapsd,
20873 {"AC_BE U-APSD Flag", "wlan_mgt.tag.qos_cap.qos_info.be_uapsd",
20874 FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x08,
20875 NULL, HFILL }},
20877 {&hf_ieee80211_qos_info_field_qack,
20878 {"Q-ACK", "wlan_mgt.tag.qos_cap.qos_info.qack",
20879 FT_BOOLEAN, 8, TFS(&qos_info_field_qack_flags), 0x10,
20880 NULL, HFILL }},
20882 {&hf_ieee80211_qos_info_field_max_sp_length,
20883 {"Max SP-Length", "wlan_mgt.tag.qos_cap.qos_info.max_sp_length",
20884 FT_UINT8, BASE_HEX, VALS(qos_info_field_max_sp_length_flags), 0x60,
20885 NULL , HFILL }},
20887 {&hf_ieee80211_qos_info_field_more_data_ack,
20888 {"More Data Ack", "wlan_mgt.tag.qos_cap.qos_info.more_data_ack",
20889 FT_BOOLEAN, 8, TFS(&qos_info_field_more_data_ack_flags) , 0x80,
20890 NULL, HFILL }},
20892 {&hf_ieee80211_qos_info_field_edca_upd_cnt,
20893 {"EDCA Parameter Set Update Count", "wlan_mgt.tag.qos_cap.qos_info.edca_upd_cnt",
20894 FT_UINT8, BASE_DEC, NULL, 0x07,
20895 NULL, HFILL}},
20897 {&hf_ieee80211_qos_info_field_queue_req,
20898 {"Queue Request", "wlan_mgt.tag.qos_cap.qos_info.queue_req",
20899 FT_BOOLEAN, 8, TFS(&qos_info_field_queue_req_flags), 0x07,
20900 NULL, HFILL}},
20902 {&hf_ieee80211_qos_info_field_txop_req,
20903 {"TXOP Request", "wlan_mgt.tag.qos_cap.qos_info.txop_req",
20904 FT_BOOLEAN, 8, TFS(&tfs_true_false), 0x40,
20905 NULL, HFILL}},
20907 {&hf_ieee80211_qos_info_field_reserved,
20908 {"Reserved", "wlan_mgt.tag.qos_cap.qos_info.reserved",
20909 FT_BOOLEAN, 8, NULL, 0x80,
20910 NULL, HFILL}},
20912 {&hf_ieee80211_tag_ext_supp_rates,
20913 {"Extended Supported Rates", "wlan_mgt.extended_supported_rates",
20914 FT_UINT8, BASE_HEX|BASE_EXT_STRING, &ieee80211_supported_rates_vals_ext, 0x0,
20915 "In Mbit/sec, (B) for Basic Rates", HFILL }},
20917 {&hf_ieee80211_sched_info,
20918 {"Schedule Info", "wlan_mgt.sched.sched_info",
20919 FT_UINT16, BASE_HEX, NULL, 0,
20920 "Schedule Info field", HFILL }},
20922 {&hf_ieee80211_sched_info_agg,
20923 {"Schedule Aggregation", "wlan_mgt.sched_info.agg",
20924 FT_UINT16, BASE_DEC, NULL, 0x0001,
20925 "Traffic Stream (TS) Info Access Policy", HFILL }},
20927 {&hf_ieee80211_sched_info_tsid,
20928 {"Schedule Traffic Stream ID (TSID)", "wlan_mgt.sched_info.tsid",
20929 FT_UINT16, BASE_DEC, NULL, 0x001E,
20930 "Traffic Stream ID (TSID) Info TSID", HFILL }},
20932 {&hf_ieee80211_sched_info_dir,
20933 {"Schedule Direction", "wlan_mgt.sched_info.dir",
20934 FT_UINT16, BASE_DEC, VALS(tsinfo_direction), 0x0060,
20935 "Traffic Stream (TS) Info Direction", HFILL }},
20937 {&hf_ieee80211_sched_srv_start,
20938 {"Service Start Time", "wlan_mgt.sched.srv_start",
20939 FT_UINT32, BASE_HEX, NULL, 0,
20940 NULL, HFILL }},
20942 {&hf_ieee80211_sched_srv_int,
20943 {"Service Interval", "wlan_mgt.sched.srv_int",
20944 FT_UINT32, BASE_HEX, NULL, 0,
20945 NULL, HFILL }},
20947 {&hf_ieee80211_sched_spec_int,
20948 {"Specification Interval", "wlan_mgt.sched.spec_int",
20949 FT_UINT16, BASE_HEX, NULL, 0,
20950 NULL, HFILL }},
20952 {&hf_ieee80211_aruba,
20953 {"Aruba Type", "wlan_mgt.aruba.type",
20954 FT_UINT16, BASE_DEC|BASE_EXT_STRING, &aruba_mgt_typevals_ext, 0,
20955 "Aruba Management", HFILL }},
20957 {&hf_ieee80211_aruba_hb_seq,
20958 {"Aruba Heartbeat Sequence", "wlan_mgt.aruba.heartbeat_sequence",
20959 FT_UINT64, BASE_DEC, NULL, 0,
20960 NULL, HFILL }},
20962 {&hf_ieee80211_aruba_mtu,
20963 {"Aruba MTU Size", "wlan_mgt.aruba.mtu_size",
20964 FT_UINT16, BASE_DEC, NULL, 0,
20965 NULL, HFILL }},
20967 /* Start: HT Control (+HTC) */
20968 {&hf_ieee80211_htc,
20969 {"HT Control (+HTC)", "wlan_mgt.htc",
20970 FT_UINT32, BASE_HEX, NULL, 0,
20971 "High Throughput Control (+HTC)", HFILL }},
20973 {&hf_ieee80211_htc_lac,
20974 {"Link Adaptation Control (LAC)", "wlan_mgt.htc.lac",
20975 FT_UINT16, BASE_HEX, NULL, 0,
20976 "High Throughput Control Link Adaptation Control (LAC)", HFILL }},
20978 {&hf_ieee80211_htc_lac_reserved,
20979 {"Reserved", "wlan_mgt.htc.lac.reserved",
20980 FT_BOOLEAN, 16, NULL, 0x0001,
20981 "High Throughput Control Link Adaptation Control Reserved", HFILL }},
20983 {&hf_ieee80211_htc_lac_trq,
20984 {"Training Request (TRQ)", "wlan_mgt.htc.lac.trq",
20985 FT_BOOLEAN, 16, TFS(&htc_lac_trq_flag), 0x0002,
20986 "High Throughput Control Link Adaptation Control Training Request (TRQ)", HFILL }},
20988 {&hf_ieee80211_htc_lac_mai_aseli,
20989 {"Antenna Selection Indication (ASELI)", "wlan_mgt.htc.lac.mai.aseli",
20990 FT_UINT16, BASE_HEX, NULL, 0x003C,
20991 "High Throughput Control Link Adaptation Control MAI Antenna Selection Indication", HFILL }},
20993 {&hf_ieee80211_htc_lac_mai_mrq,
20994 {"MCS Request (MRQ)", "wlan_mgt.htc.lac.mai.mrq",
20995 FT_BOOLEAN, 16, TFS(&htc_lac_mai_mrq_flag), 0x0004,
20996 "High Throughput Control Link Adaptation Control MAI MCS Request", HFILL }},
20998 {&hf_ieee80211_htc_lac_mai_msi,
20999 {"MCS Request Sequence Identifier (MSI)", "wlan_mgt.htc.lac.mai.msi",
21000 FT_UINT16, BASE_HEX, NULL, 0x0038,
21001 "High Throughput Control Link Adaptation Control MAI MCS Request Sequence Identifier", HFILL }},
21003 {&hf_ieee80211_htc_lac_mai_reserved,
21004 {"Reserved", "wlan_mgt.htc.lac.mai.reserved",
21005 FT_UINT16, BASE_HEX, NULL, 0x0038,
21006 "High Throughput Control Link Adaptation Control MAI Reserved", HFILL }},
21008 {&hf_ieee80211_htc_lac_mfsi,
21009 {"MCS Feedback Sequence Identifier (MFSI)", "wlan_mgt.htc.lac.mfsi",
21010 FT_UINT16, BASE_DEC, NULL, 0x01C0,
21011 "High Throughput Control Link Adaptation Control MCS Feedback Sequence Identifier (MSI)", HFILL }},
21013 {&hf_ieee80211_htc_lac_asel_command,
21014 {"Antenna Selection (ASEL) Command", "wlan_mgt.htc.lac.asel.command",
21015 FT_UINT16, BASE_HEX, VALS(ieee80211_htc_lac_asel_command_flags), 0x0E00,
21016 "High Throughput Control Link Adaptation Control Antenna Selection (ASEL) Command", HFILL }},
21018 {&hf_ieee80211_htc_lac_asel_data,
21019 {"Antenna Selection (ASEL) Data", "wlan_mgt.htc.lac.asel.data",
21020 FT_UINT16, BASE_HEX, NULL, 0xF000,
21021 "High Throughput Control Link Adaptation Control Antenna Selection (ASEL) Data", HFILL }},
21023 {&hf_ieee80211_htc_lac_mfb,
21024 {"MCS Feedback (MFB)", "wlan_mgt.htc.lac.mfb",
21025 FT_UINT16, BASE_HEX, NULL, 0xFE00,
21026 "High Throughput Control Link Adaptation Control MCS Feedback", HFILL }},
21028 {&hf_ieee80211_htc_cal_pos,
21029 {"Calibration Position", "wlan_mgt.htc.cal.pos",
21030 FT_UINT16, BASE_DEC, VALS(ieee80211_htc_cal_pos_flags), 0x0003,
21031 "High Throughput Control Calibration Position", HFILL }},
21033 {&hf_ieee80211_htc_cal_seq,
21034 {"Calibration Sequence Identifier", "wlan_mgt.htc.cal.seq",
21035 FT_UINT16, BASE_DEC, NULL, 0x000C,
21036 "High Throughput Control Calibration Sequence Identifier", HFILL }},
21038 {&hf_ieee80211_htc_reserved1,
21039 {"Reserved", "wlan_mgt.htc.reserved1",
21040 FT_UINT16, BASE_DEC, NULL, 0x0030,
21041 "High Throughput Control Reserved", HFILL }},
21043 {&hf_ieee80211_htc_csi_steering,
21044 {"CSI/Steering", "wlan_mgt.htc.csi_steering",
21045 FT_UINT16, BASE_DEC, VALS(ieee80211_htc_csi_steering_flags), 0x00C0,
21046 "High Throughput Control CSI/Steering", HFILL }},
21048 {&hf_ieee80211_htc_ndp_announcement,
21049 {"NDP Announcement", "wlan_mgt.htc.ndp_announcement",
21050 FT_BOOLEAN, 16, TFS(&ieee80211_htc_ndp_announcement_flag), 0x0100,
21051 "High Throughput Control NDP Announcement", HFILL }},
21053 {&hf_ieee80211_htc_reserved2,
21054 {"Reserved", "wlan_mgt.htc.reserved2",
21055 FT_UINT16, BASE_HEX, NULL, 0x3E00,
21056 "High Throughput Control Reserved", HFILL }},
21058 {&hf_ieee80211_htc_ac_constraint,
21059 {"AC Constraint", "wlan_mgt.htc.ac_constraint",
21060 FT_BOOLEAN, 16, NULL, 0x4000,
21061 "High Throughput Control AC Constraint", HFILL }},
21063 {&hf_ieee80211_htc_rdg_more_ppdu,
21064 {"RDG/More PPDU", "wlan_mgt.htc.rdg_more_ppdu",
21065 FT_BOOLEAN, 16, NULL, 0x8000,
21066 "High Throughput Control RDG/More PPDU", HFILL }},
21067 /* End: HT Control (+HTC) */
21069 /* MDIE */
21070 {&hf_ieee80211_tag_mobility_domain_mdid,
21071 {"Mobility Domain Identifier", "wlan_mgt.mobility_domain.mdid",
21072 FT_UINT16, BASE_HEX, NULL, 0,
21073 NULL, HFILL }},
21075 {&hf_ieee80211_tag_mobility_domain_ft_capab,
21076 {"FT Capability and Policy", "wlan_mgt.mobility_domain.ft_capab",
21077 FT_UINT8, BASE_HEX, NULL, 0,
21078 NULL, HFILL }},
21080 {&hf_ieee80211_tag_mobility_domain_ft_capab_ft_over_ds,
21081 {"Fast BSS Transition over DS",
21082 "wlan_mgt.mobility_domain.ft_capab.ft_over_ds",
21083 FT_UINT8, BASE_HEX, NULL, 0x01,
21084 NULL, HFILL }},
21086 {&hf_ieee80211_tag_mobility_domain_ft_capab_resource_req,
21087 {"Resource Request Protocol Capability",
21088 "wlan_mgt.mobility_domain.ft_capab.resource_req",
21089 FT_UINT8, BASE_HEX, NULL, 0x02,
21090 NULL, HFILL }},
21092 /* FTIE */
21093 {&hf_ieee80211_tag_ft_mic_control,
21094 {"MIC Control", "wlan_mgt.ft.mic_control",
21095 FT_UINT16, BASE_HEX, NULL, 0,
21096 NULL, HFILL }},
21098 {&hf_ieee80211_tag_ft_element_count,
21099 {"Element Count", "wlan_mgt.ft.element_count",
21100 FT_UINT16, BASE_DEC, NULL, 0xff00,
21101 NULL, HFILL }},
21103 {&hf_ieee80211_tag_ft_mic,
21104 {"MIC", "wlan_mgt.ft.mic",
21105 FT_BYTES, BASE_NONE, NULL, 0,
21106 NULL, HFILL }},
21108 {&hf_ieee80211_tag_ft_anonce,
21109 {"ANonce", "wlan_mgt.ft.anonce",
21110 FT_BYTES, BASE_NONE, NULL, 0,
21111 NULL, HFILL }},
21113 {&hf_ieee80211_tag_ft_snonce,
21114 {"SNonce", "wlan_mgt.ft.snonce",
21115 FT_BYTES, BASE_NONE, NULL, 0,
21116 NULL, HFILL }},
21118 {&hf_ieee80211_tag_ft_subelem_id,
21119 {"Subelement ID", "wlan_mgt.ft.subelem.id",
21120 FT_UINT8, BASE_DEC, VALS(ft_subelem_id_vals), 0,
21121 NULL, HFILL }},
21123 {&hf_ieee80211_tag_ft_subelem_len,
21124 {"Length", "wlan_mgt.ft.subelem.len",
21125 FT_UINT8, BASE_DEC, NULL, 0,
21126 NULL, HFILL }},
21128 {&hf_ieee80211_tag_ft_subelem_data,
21129 {"Data", "wlan_mgt.ft.subelem.data",
21130 FT_BYTES, BASE_NONE, NULL, 0,
21131 NULL, HFILL }},
21133 {&hf_ieee80211_tag_ft_subelem_r1kh_id,
21134 {"PMK-R1 key holder identifier (R1KH-ID)", "wlan_mgt.ft.subelem.r1kh_id",
21135 FT_BYTES, BASE_NONE, NULL, 0,
21136 NULL, HFILL }},
21138 {&hf_ieee80211_tag_ft_subelem_gtk_key_info,
21139 {"Key Info", "wlan_mgt.ft.subelem.gtk.key_info",
21140 FT_UINT16, BASE_HEX, NULL, 0,
21141 NULL, HFILL }},
21143 {&hf_ieee80211_tag_ft_subelem_gtk_key_id,
21144 {"Key ID", "wlan_mgt.ft.subelem.gtk.key_id",
21145 FT_UINT16, BASE_DEC, NULL, 0x0003,
21146 NULL, HFILL }},
21148 {&hf_ieee80211_tag_ft_subelem_gtk_key_length,
21149 {"Key Length", "wlan_mgt.ft.subelem.gtk.key_length",
21150 FT_UINT8, BASE_HEX, NULL, 0,
21151 NULL, HFILL }},
21153 {&hf_ieee80211_tag_ft_subelem_gtk_rsc,
21154 {"RSC", "wlan_mgt.ft.subelem.gtk.rsc",
21155 FT_BYTES, BASE_NONE, NULL, 0,
21156 NULL, HFILL }},
21158 {&hf_ieee80211_tag_ft_subelem_gtk_key,
21159 {"GTK", "wlan_mgt.ft.subelem.gtk.key",
21160 FT_BYTES, BASE_NONE, NULL, 0,
21161 NULL, HFILL }},
21163 {&hf_ieee80211_tag_ft_subelem_r0kh_id,
21164 {"PMK-R0 key holder identifier (R0KH-ID)", "wlan_mgt.ft.subelem.r0kh_id",
21165 FT_STRING, BASE_NONE, NULL, 0,
21166 NULL, HFILL }},
21168 {&hf_ieee80211_tag_ft_subelem_igtk_key_id,
21169 {"Key ID", "wlan_mgt.ft.subelem.igtk.key_id",
21170 FT_UINT16, BASE_DEC, NULL, 0,
21171 NULL, HFILL }},
21173 {&hf_ieee80211_tag_ft_subelem_igtk_ipn,
21174 {"IPN", "wlan_mgt.ft.subelem.igtk.ipn",
21175 FT_BYTES, BASE_NONE, NULL, 0,
21176 NULL, HFILL }},
21178 {&hf_ieee80211_tag_ft_subelem_igtk_key_length,
21179 {"Key Length", "wlan_mgt.ft.subelem.igtk.key_length",
21180 FT_UINT8, BASE_HEX, NULL, 0,
21181 NULL, HFILL }},
21183 {&hf_ieee80211_tag_ft_subelem_igtk_key,
21184 {"Wrapped Key (IGTK)", "wlan_mgt.ft.subelem.igtk.key",
21185 FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }},
21187 /* RIC Data IE: 802.11-2012: 8.4.2.52 */
21188 {&hf_ieee80211_tag_ric_data_id,
21189 {"Resource Handshake Identifier", "wlan_mgt.ric_data.id",
21190 FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
21192 {&hf_ieee80211_tag_ric_data_desc_cnt,
21193 {"Resource Descriptor Count", "wlan_mgt.ric_data.desc_cnt",
21194 FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
21196 {&hf_ieee80211_tag_ric_data_status_code,
21197 {"Status Code", "wlan_mgt.ric_data.status_code",
21198 FT_UINT16, BASE_HEX|BASE_EXT_STRING, &ieee80211_status_code_ext, 0,
21199 "Status of requested Resource", HFILL }},
21201 /* RIC Descriptor IE: 802.11-2012: 8.4.2.53 */
21202 {&hf_ieee80211_tag_ric_desc_rsrc_type,
21203 {"Resource Type", "wlan_mgt.ric_desc.rsrc_type",
21204 FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
21206 {&hf_ieee80211_tag_ric_desc_var_params,
21207 {"Variable Params", "wlan_mgt.ric_desc.var_params",
21208 FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }},
21210 /* MMIE */
21211 {&hf_ieee80211_tag_mmie_keyid,
21212 {"KeyID", "wlan_mgt.mmie.keyid",
21213 FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }},
21215 {&hf_ieee80211_tag_mmie_ipn,
21216 {"IPN", "wlan_mgt.mmie.ipn",
21217 FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }},
21219 {&hf_ieee80211_tag_mmie_mic,
21220 {"MIC", "wlan_mgt.mmie.mic",
21221 FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }},
21223 /* WAPI Parameter Set*/
21224 {&hf_ieee80211_tag_wapi_param_set_version,
21225 {"Version", "wlan_mgt.wapi.version",
21226 FT_UINT16, BASE_DEC, NULL, 0,
21227 NULL, HFILL }},
21229 {&hf_ieee80211_tag_wapi_param_set_akm_suite_count,
21230 {"AKM Suite Count", "wlan_mgt.wapi.akm_suite.count",
21231 FT_UINT16, BASE_DEC, NULL, 0,
21232 NULL, HFILL }},
21234 {&hf_ieee80211_tag_wapi_param_set_akm_suite_oui,
21235 {"AKM Suite OUI", "wlan_mgt.wapi.akm_suite.oui",
21236 FT_UINT24, BASE_CUSTOM, oui_base_custom, 0,
21237 NULL, HFILL }},
21239 {&hf_ieee80211_tag_wapi_param_set_akm_suite_type,
21240 {"AKM Suite Type", "wlan_mgt.wapi.akm_suite.type",
21241 FT_UINT8, BASE_DEC, VALS(ieee80211_wapi_suite_type) , 0,
21242 NULL, HFILL }},
21244 {&hf_ieee80211_tag_wapi_param_set_ucast_cipher_suite_count,
21245 {"Unicast Cipher Suite Count", "wlan_mgt.wapi.unicast_cipher.suite.count",
21246 FT_UINT16, BASE_DEC, NULL, 0,
21247 NULL, HFILL }},
21249 {&hf_ieee80211_tag_wapi_param_set_ucast_cipher_suite_oui,
21250 {"Unicast Cipher Suite OUI", "wlan_mgt.wapi.unicast_cipher.suite.oui",
21251 FT_UINT24, BASE_CUSTOM, oui_base_custom, 0,
21252 NULL, HFILL }},
21254 {&hf_ieee80211_tag_wapi_param_set_ucast_cipher_suite_type,
21255 {"Unicast Cipher Suite Type", "wlan_mgt.wapi.unicast_cipher.suite.type",
21256 FT_UINT8, BASE_DEC, VALS(ieee80211_wapi_cipher_type) , 0,
21257 NULL, HFILL }},
21259 {&hf_ieee80211_tag_wapi_param_set_mcast_cipher_suite_oui,
21260 {"Multicast Cipher Suite OUI", "wlan_mgt.wapi.multicast_cipher.suite.oui",
21261 FT_UINT24, BASE_CUSTOM, oui_base_custom, 0,
21262 NULL, HFILL }},
21264 {&hf_ieee80211_tag_wapi_param_set_mcast_cipher_suite_type,
21265 {"Multicast Cipher Suite Type", "wlan_mgt.wapi.multicast_cipher.suite.type",
21266 FT_UINT8, BASE_DEC, VALS(ieee80211_wapi_cipher_type) , 0,
21267 NULL, HFILL }},
21269 {&hf_ieee80211_tag_wapi_param_set_capab,
21270 {"WAPI Capability Info", "wlan_mgt.wapi.capab",
21271 FT_UINT16, BASE_HEX, NULL, 0,
21272 NULL, HFILL }},
21274 {&hf_ieee80211_tag_wapi_param_set_capab_preauth,
21275 {"Supports Preauthentication?", "wlan_mgt.wapi.capab.preauth",
21276 FT_BOOLEAN, 16 , NULL, 0x0001,
21277 NULL, HFILL }},
21279 {&hf_ieee80211_tag_wapi_param_set_capab_rsvd,
21280 {"Reserved", "wlan_mgt.wapi.capab.rsvd",
21281 FT_UINT16, BASE_DEC , NULL, 0xFFFE,
21282 NULL, HFILL }},
21284 {&hf_ieee80211_tag_wapi_param_set_bkid_count,
21285 {"No of BKID's", "wlan_mgt.wapi.bkid.count",
21286 FT_UINT16, BASE_DEC, NULL, 0,
21287 NULL, HFILL }},
21289 {&hf_ieee80211_tag_wapi_param_set_bkid_list,
21290 {"BKID", "wlan_mgt.wapi.bkid",
21291 FT_BYTES, BASE_NONE, NULL, 0,
21292 NULL, HFILL }},
21294 /* BSS Max Idle Period */
21295 {&hf_ieee80211_tag_bss_max_idle_period,
21296 {"BSS Max Idle Period (1000 TUs)", "wlan_mgt.bss_max_idle.period",
21297 FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }},
21298 {&hf_ieee80211_tag_bss_max_idle_options_protected,
21299 {"BSS Max Idle Period Options: Protected Keep-Alive Required",
21300 "wlan_mgt.bss_max_idle.options.protected",
21301 FT_UINT8, BASE_DEC, NULL, 0x01, NULL, HFILL }},
21303 /* TFS Request */
21304 {&hf_ieee80211_tag_tfs_request_id,
21305 {"TFS ID", "wlan_mgt.tfs_request.id",
21306 FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
21307 {&hf_ieee80211_tag_tfs_request_ac_delete_after_match,
21308 {"TFS Action Code - Delete after match",
21309 "wlan_mgt.tfs_request.action_code.delete_after_match",
21310 FT_UINT8, BASE_DEC, NULL, 0x01, NULL, HFILL }},
21311 {&hf_ieee80211_tag_tfs_request_ac_notify,
21312 {"TFS Action Code - Notify",
21313 "wlan_mgt.tfs_request.action_code.notify",
21314 FT_UINT8, BASE_DEC, NULL, 0x02, NULL, HFILL }},
21315 {&hf_ieee80211_tag_tfs_request_subelem_id,
21316 {"Subelement ID", "wlan_mgt.tfs_request.subelem.id",
21317 FT_UINT8, BASE_DEC, VALS(tfs_request_subelem_ids), 0,
21318 "TFS Request Subelement ID", HFILL }},
21319 {&hf_ieee80211_tag_tfs_request_subelem_len,
21320 {"Length", "wlan_mgt.tfs_request.subelem.len",
21321 FT_UINT8, BASE_DEC, NULL, 0,
21322 "TFS Request Subelement Length", HFILL }},
21323 {&hf_ieee80211_tag_tfs_request_subelem,
21324 {"Subelement Data", "wlan_mgt.tfs_request.subelem",
21325 FT_BYTES, BASE_NONE, NULL, 0,
21326 "TFS Request Subelement Data", HFILL }},
21328 /* TFS Response */
21329 {&hf_ieee80211_tag_tfs_response_subelem_id,
21330 {"Subelement ID", "wlan_mgt.tfs_response.subelem.id",
21331 FT_UINT8, BASE_DEC, VALS(tfs_response_subelem_ids), 0,
21332 "TFS Response Subelement ID", HFILL }},
21333 {&hf_ieee80211_tag_tfs_response_subelem_len,
21334 {"Length", "wlan_mgt.tfs_response.subelem.len",
21335 FT_UINT8, BASE_DEC, NULL, 0,
21336 "TFS Response Subelement Length", HFILL }},
21337 {&hf_ieee80211_tag_tfs_response_subelem,
21338 {"Subelement Data", "wlan_mgt.tfs_response.subelem",
21339 FT_BYTES, BASE_NONE, NULL, 0,
21340 "TFS Response Subelement Data", HFILL }},
21341 {&hf_ieee80211_tag_tfs_response_status,
21342 {"TFS Response Status", "wlan_mgt.tfs_response.status",
21343 FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
21344 {&hf_ieee80211_tag_tfs_response_id,
21345 {"TFS ID", "wlan_mgt.tfs_response.tfs_id",
21346 FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
21348 /* WNM-Sleep Mode */
21349 {&hf_ieee80211_tag_wnm_sleep_mode_action_type,
21350 {"Action Type", "wlan_mgt.wnm_sleep_mode.action_type",
21351 FT_UINT8, BASE_DEC, VALS(wnm_sleep_mode_action_types), 0,
21352 "WNM-Sleep Mode Action Type", HFILL }},
21353 {&hf_ieee80211_tag_wnm_sleep_mode_response_status,
21354 {"WNM-Sleep Mode Response Status",
21355 "wlan_mgt.wnm_sleep_mode.response_status",
21356 FT_UINT8, BASE_DEC, VALS(wnm_sleep_mode_response_status_vals), 0, NULL,
21357 HFILL }},
21358 {&hf_ieee80211_tag_wnm_sleep_mode_interval,
21359 {"WNM-Sleep Interval", "wlan_mgt.wnm_sleep_mode.interval",
21360 FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }},
21362 /* Time Advertisement */
21363 {&hf_ieee80211_tag_time_adv_timing_capab,
21364 {"Timing capabilities", "wlan_mgt.time_adv.timing_capab",
21365 FT_UINT8, BASE_DEC, VALS(time_adv_timing_capab_vals), 0,
21366 NULL, HFILL }},
21368 {&hf_ieee80211_tag_time_adv_time_value,
21369 {"Time Value", "wlan_mgt.time_adv.time_value",
21370 FT_BYTES, BASE_NONE, NULL, 0,
21371 NULL, HFILL }},
21373 {&hf_ieee80211_tag_time_adv_time_value_year,
21374 {"Time Value: Year", "wlan_mgt.time_adv.time_value.year",
21375 FT_UINT16, BASE_DEC, NULL, 0,
21376 NULL, HFILL }},
21378 {&hf_ieee80211_tag_time_adv_time_value_month,
21379 {"Time Value: Month", "wlan_mgt.time_adv.time_value.month",
21380 FT_UINT8, BASE_DEC, NULL, 0,
21381 NULL, HFILL }},
21383 {&hf_ieee80211_tag_time_adv_time_value_day,
21384 {"Time Value: Day", "wlan_mgt.time_adv.time_value.month",
21385 FT_UINT8, BASE_DEC, NULL, 0,
21386 NULL, HFILL }},
21388 {&hf_ieee80211_tag_time_adv_time_value_hours,
21389 {"Time Value: Hours", "wlan_mgt.time_adv.time_value.hours",
21390 FT_UINT8, BASE_DEC, NULL, 0,
21391 NULL, HFILL }},
21393 {&hf_ieee80211_tag_time_adv_time_value_minutes,
21394 {"Time Value: Minutes", "wlan_mgt.time_adv.time_value.minutes",
21395 FT_UINT8, BASE_DEC, NULL, 0,
21396 NULL, HFILL }},
21398 {&hf_ieee80211_tag_time_adv_time_value_seconds,
21399 {"Time Value: Seconds", "wlan_mgt.time_adv.time_value.seconds",
21400 FT_UINT8, BASE_DEC, NULL, 0,
21401 NULL, HFILL }},
21403 {&hf_ieee80211_tag_time_adv_time_value_milliseconds,
21404 {"Time Value: Milliseconds", "wlan_mgt.time_adv.time_value.milliseconds",
21405 FT_UINT16, BASE_DEC, NULL, 0,
21406 NULL, HFILL }},
21408 {&hf_ieee80211_tag_time_adv_time_value_reserved,
21409 {"Time Value: Reserved", "wlan_mgt.time_adv.time_value.reserved",
21410 FT_UINT8, BASE_DEC, NULL, 0,
21411 NULL, HFILL }},
21413 {&hf_ieee80211_tag_time_adv_time_error,
21414 {"Time Error", "wlan_mgt.time_adv.time_error",
21415 FT_BYTES, BASE_NONE, NULL, 0,
21416 NULL, HFILL }},
21418 {&hf_ieee80211_tag_time_adv_time_update_counter,
21419 {"Time Update Counter", "wlan_mgt.time_adv.time_update_counter",
21420 FT_UINT8, BASE_DEC, NULL, 0,
21421 NULL, HFILL }},
21423 /* Time Zone */
21424 {&hf_ieee80211_tag_time_zone,
21425 {"Time Zone", "wlan_mgt.time_zone",
21426 FT_STRING, BASE_NONE, NULL, 0,
21427 NULL, HFILL }},
21429 /* Interworking */
21430 {&hf_ieee80211_tag_interworking_access_network_type,
21431 {"Access Network Type", "wlan_mgt.interworking.access_network_type",
21432 FT_UINT8, BASE_DEC, VALS(access_network_type_vals), 0x0f,
21433 NULL, HFILL }},
21435 {&hf_ieee80211_tag_interworking_internet,
21436 {"Internet", "wlan_mgt.interworking.internet",
21437 FT_UINT8, BASE_DEC, NULL, 0x10,
21438 NULL, HFILL }},
21440 {&hf_ieee80211_tag_interworking_asra,
21441 {"ASRA", "wlan_mgt.interworking.asra",
21442 FT_UINT8, BASE_DEC, NULL, 0x20,
21443 "Additional Step Required for Access", HFILL }},
21445 {&hf_ieee80211_tag_interworking_esr,
21446 {"ESR", "wlan_mgt.interworking.esr",
21447 FT_UINT8, BASE_DEC, NULL, 0x40,
21448 "Emergency services reachable", HFILL }},
21450 {&hf_ieee80211_tag_interworking_uesa,
21451 {"UESA", "wlan_mgt.interworking.uesa",
21452 FT_UINT8, BASE_DEC, NULL, 0x80,
21453 "Unauthenticated emergency service accessible", HFILL }},
21455 {&hf_ieee80211_tag_interworking_hessid,
21456 {"HESSID", "wlan_mgt.interworking.hessid",
21457 FT_ETHER, BASE_NONE, NULL, 0,
21458 "Homogeneous ESS identifier", HFILL }},
21460 /* QoS Map Set element */
21461 {&hf_ieee80211_tag_qos_map_set_dscp_exc,
21462 {"DSCP Exception", "wlan_mgt.qos_map_set.dscp_exception",
21463 FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
21465 {&hf_ieee80211_tag_qos_map_set_dscp_exc_val,
21466 {"DSCP Value", "wlan_mgt.qos_map_set.dscp_value",
21467 FT_UINT8, BASE_DEC, NULL, 0,
21468 "DSCP Exception - DSCP Value", HFILL }},
21470 {&hf_ieee80211_tag_qos_map_set_dscp_exc_up,
21471 {"User Priority", "wlan_mgt.qos_map_set.up",
21472 FT_UINT8, BASE_DEC, NULL, 0,
21473 "DSCP Exception - User Priority", HFILL }},
21475 {&hf_ieee80211_tag_qos_map_set_range,
21476 {"DSCP Range description", "wlan_mgt.qos_map_set.range",
21477 FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
21479 {&hf_ieee80211_tag_qos_map_set_low,
21480 {"DSCP Low Value", "wlan_mgt.qos_map_set.dscp_low_value",
21481 FT_UINT8, BASE_DEC, NULL, 0,
21482 "DSCP Range description - DSCP Low Value", HFILL }},
21484 {&hf_ieee80211_tag_qos_map_set_high,
21485 {"DSCP High Value", "wlan_mgt.qos_map_set.dscp_high_value",
21486 FT_UINT8, BASE_DEC, NULL, 0,
21487 "DSCP Range description - DSCP High Value", HFILL }},
21489 /* Advertisement Protocol */
21490 {&hf_ieee80211_tag_adv_proto_resp_len_limit,
21491 {"Query Response Length Limit", "wlan_mgt.adv_proto.resp_len_limit",
21492 FT_UINT8, BASE_DEC, NULL, 0x7f,
21493 NULL, HFILL }},
21495 {&hf_ieee80211_tag_adv_proto_pame_bi,
21496 {"PAME-BI", "wlan_mgt.adv_proto.pame_bi",
21497 FT_UINT8, BASE_DEC, NULL, 0x80,
21498 "Pre-Association Message Xchange BSSID Independent (PAME-BI)", HFILL }},
21500 {&hf_ieee80211_tag_adv_proto_id,
21501 {"Advertisement Protocol ID", "wlan_mgt.adv_proto.id",
21502 FT_UINT8, BASE_DEC, VALS(adv_proto_id_vals), 0,
21503 NULL, HFILL }},
21505 /* Roaming Consortium */
21506 {&hf_ieee80211_tag_roaming_consortium_num_anqp_oi,
21507 {"Number of ANQP OIs", "wlan_mgt.roaming_consortium.num_anqp_oi",
21508 FT_UINT8, BASE_DEC, NULL, 0,
21509 NULL, HFILL }},
21511 {&hf_ieee80211_tag_roaming_consortium_oi1_len,
21512 {"OI #1 Length", "wlan_mgt.roaming_consortium.oi1_len",
21513 FT_UINT8, BASE_DEC, NULL, 0x0f,
21514 NULL, HFILL }},
21516 {&hf_ieee80211_tag_roaming_consortium_oi2_len,
21517 {"OI #2 Length", "wlan_mgt.roaming_consortium.oi2_len",
21518 FT_UINT8, BASE_DEC, NULL, 0xf0,
21519 NULL, HFILL }},
21521 {&hf_ieee80211_tag_roaming_consortium_oi1,
21522 {"OI #1", "wlan_mgt.roaming_consortium.oi1",
21523 FT_BYTES, BASE_NONE, NULL, 0,
21524 NULL, HFILL }},
21526 {&hf_ieee80211_tag_roaming_consortium_oi2,
21527 {"OI #2", "wlan_mgt.roaming_consortium.oi2",
21528 FT_BYTES, BASE_NONE, NULL, 0,
21529 NULL, HFILL }},
21531 {&hf_ieee80211_tag_roaming_consortium_oi3,
21532 {"OI #3", "wlan_mgt.roaming_consortium.oi3",
21533 FT_BYTES, BASE_NONE, NULL, 0,
21534 NULL, HFILL }},
21536 /* Timeout Interval */
21537 {&hf_ieee80211_tag_timeout_int_type,
21538 {"Timeout Interval Type", "wlan_mgt.timeout_int.type",
21539 FT_UINT8, BASE_DEC, VALS(timeout_int_types), 0,
21540 NULL, HFILL }},
21542 {&hf_ieee80211_tag_timeout_int_value,
21543 {"Timeout Interval Value", "wlan_mgt.timeout_int.value",
21544 FT_UINT32, BASE_DEC, NULL, 0,
21545 NULL, HFILL }},
21547 /* Link Identifier */
21548 {&hf_ieee80211_tag_link_id_bssid,
21549 {"BSSID", "wlan_mgt.link_id.bssid",
21550 FT_ETHER, BASE_NONE, NULL, 0,
21551 NULL, HFILL }},
21553 {&hf_ieee80211_tag_link_id_init_sta,
21554 {"TDLS initiator STA Address", "wlan_mgt.link_id.init_sta",
21555 FT_ETHER, BASE_NONE, NULL, 0,
21556 NULL, HFILL }},
21558 {&hf_ieee80211_tag_link_id_resp_sta,
21559 {"TDLS responder STA Address", "wlan_mgt.link_id.resp_sta",
21560 FT_ETHER, BASE_NONE, NULL, 0,
21561 NULL, HFILL }},
21563 /* Wakeup Schedule */
21564 {&hf_ieee80211_tag_wakeup_schedule_offset,
21565 {"Offset", "wlan_mgt.wakeup_schedule.offset",
21566 FT_UINT32, BASE_DEC, NULL, 0,
21567 NULL, HFILL }},
21569 {&hf_ieee80211_tag_wakeup_schedule_interval,
21570 {"Interval", "wlan_mgt.wakeup_schedule.interval",
21571 FT_UINT32, BASE_DEC, NULL, 0,
21572 NULL, HFILL }},
21574 {&hf_ieee80211_tag_wakeup_schedule_awake_window_slots,
21575 {"Awake Window Slots", "wlan_mgt.wakeup_schedule.awake_window_slots",
21576 FT_UINT32, BASE_DEC, NULL, 0,
21577 NULL, HFILL }},
21579 {&hf_ieee80211_tag_wakeup_schedule_max_awake_dur,
21580 {"Maximum Awake Window Duration", "wlan_mgt.wakeup_schedule.max_awake_dur",
21581 FT_UINT32, BASE_DEC, NULL, 0,
21582 NULL, HFILL }},
21584 {&hf_ieee80211_tag_wakeup_schedule_idle_count,
21585 {"Idle Count", "wlan_mgt.wakeup_schedule.idle_count",
21586 FT_UINT16, BASE_DEC, NULL, 0,
21587 NULL, HFILL }},
21589 /* Channel Switch Timing */
21590 {&hf_ieee80211_tag_channel_switch_timing_switch_time,
21591 {"Switch Time", "wlan_mgt.channel_switch_timing.switch_time",
21592 FT_UINT16, BASE_DEC, NULL, 0,
21593 NULL, HFILL }},
21595 {&hf_ieee80211_tag_channel_switch_timing_switch_timeout,
21596 {"Switch Timeout", "wlan_mgt.channel_switch_timing.switch_timeout",
21597 FT_UINT16, BASE_DEC, NULL, 0,
21598 NULL, HFILL }},
21600 /* PTI Control */
21601 {&hf_ieee80211_tag_pti_control_tid,
21602 {"TID", "wlan_mgt.pti_control.tid",
21603 FT_UINT8, BASE_DEC, NULL, 0,
21604 NULL, HFILL }},
21606 {&hf_ieee80211_tag_pti_control_sequence_control,
21607 {"Sequence Control", "wlan_mgt.pti_control.sequence_control",
21608 FT_UINT16, BASE_HEX, NULL, 0,
21609 NULL, HFILL }},
21611 /* PU Buffer Status */
21612 {&hf_ieee80211_tag_pu_buffer_status_ac_bk,
21613 {"AC_BK traffic available", "wlan_mgt.pu_buffer_status.ac_bk",
21614 FT_UINT8, BASE_DEC, NULL, 0x01,
21615 NULL, HFILL }},
21617 {&hf_ieee80211_tag_pu_buffer_status_ac_be,
21618 {"AC_BE traffic available", "wlan_mgt.pu_buffer_status.ac_be",
21619 FT_UINT8, BASE_DEC, NULL, 0x02,
21620 NULL, HFILL }},
21622 {&hf_ieee80211_tag_pu_buffer_status_ac_vi,
21623 {"AC_VI traffic available", "wlan_mgt.pu_buffer_status.ac_vi",
21624 FT_UINT8, BASE_DEC, NULL, 0x04,
21625 NULL, HFILL }},
21627 {&hf_ieee80211_tag_pu_buffer_status_ac_vo,
21628 {"AC_VO traffic available", "wlan_mgt.pu_buffer_status.ac_vo",
21629 FT_UINT8, BASE_DEC, NULL, 0x08,
21630 NULL, HFILL }}
21633 static hf_register_info aggregate_fields[] = {
21634 {&hf_ieee80211_amsdu_subframe,
21635 {"A-MSDU Subframe", "wlan_aggregate.a_mdsu.subframe",
21636 FT_NONE, BASE_NONE, NULL, 0x0,
21637 "Aggregate MAC Service Data Unit (MSDU) Subframe", HFILL }},
21639 {&hf_ieee80211_amsdu_length,
21640 {"A-MSDU Length", "wlan_aggregate.a_mdsu.length",
21641 FT_UINT16, BASE_DEC, NULL, 0x0,
21642 NULL, HFILL }}
21645 static uat_field_t wep_uat_flds[] = {
21647 UAT_FLD_VS(uat_wep_key_records, key, "Key type", wep_type_vals,
21648 "Decryption key type used"),
21649 UAT_FLD_CSTRING(uat_wep_key_records, string, "Key",
21650 "wep:<wep hexadecimal key>\n"
21651 "wpa-pwd:<passphrase>[:<ssid>]\n"
21652 "wpa-psk:<wpa hexadecimal key>"),
21653 UAT_END_FIELDS
21656 static gint *tree_array[] = {
21657 &ett_80211,
21658 &ett_fc_tree,
21659 &ett_proto_flags,
21660 &ett_fragments,
21661 &ett_fragment,
21662 &ett_block_ack,
21663 &ett_block_ack_bitmap,
21664 &ett_80211_mgt,
21665 &ett_fixed_parameters,
21666 &ett_tagged_parameters,
21667 &ett_tag_bmapctl_tree,
21668 &ett_tag_country_fnm_tree,
21669 &ett_tag_country_rcc_tree,
21670 &ett_qos_parameters,
21671 &ett_qos_ps_buf_state,
21672 &ett_qos_info_field_tree,
21673 &ett_wep_parameters,
21674 &ett_msh_control,
21675 &ett_hwmp_targ_flags_tree,
21676 &ett_mesh_chswitch_flag_tree,
21677 &ett_mesh_config_cap_tree,
21678 &ett_mesh_formation_info_tree,
21679 &ett_cap_tree,
21680 &ett_rsn_gcs_tree,
21681 &ett_rsn_pcs_tree,
21682 &ett_rsn_sub_pcs_tree,
21683 &ett_rsn_akms_tree,
21684 &ett_rsn_sub_akms_tree,
21685 &ett_rsn_cap_tree,
21686 &ett_rsn_pmkid_tree,
21687 &ett_rsn_gmcs_tree,
21688 &ett_wpa_mcs_tree,
21689 &ett_wpa_ucs_tree,
21690 &ett_wpa_sub_ucs_tree,
21691 &ett_wpa_akms_tree,
21692 &ett_wpa_sub_akms_tree,
21693 &ett_wme_ac,
21694 &ett_wme_aci_aifsn,
21695 &ett_wme_ecw,
21696 &ett_wme_qos_info,
21697 &ett_ht_cap_tree,
21698 &ett_tpc,
21699 &ett_ath_cap_tree,
21700 &ett_ff_ba_param_tree,
21701 &ett_ff_qos_info,
21702 &ett_ff_sm_pwr_save,
21703 &ett_ff_psmp_param_set,
21704 &ett_ff_mimo_cntrl,
21705 &ett_ff_ant_sel,
21706 &ett_ff_chan_switch_announce,
21707 &ett_ff_ht_info,
21708 &ett_ff_psmp_sta_info,
21709 &ett_ff_delba_param_tree,
21710 &ett_ff_ba_ssc_tree,
21711 &ett_mimo_report,
21712 &ett_cntrl_wrapper_fc,
21713 &ett_cntrl_wrapper_payload,
21714 &ett_vht_cap_tree,
21715 &ett_vht_mcsset_tree,
21716 &ett_vht_rx_mcsbit_tree,
21717 &ett_vht_tx_mcsbit_tree,
21718 &ett_vht_basic_mcsbit_tree,
21719 &ett_vht_op_tree,
21720 &ett_vht_tpe_info_tree,
21721 &ett_vht_ndp_annc_token_tree,
21722 &ett_vht_ndp_annc_sta_info_tree,
21723 &ett_ht_info_delimiter1_tree,
21724 &ett_ht_info_delimiter2_tree,
21725 &ett_ht_info_delimiter3_tree,
21726 &ett_msdu_aggregation_parent_tree,
21727 &ett_msdu_aggregation_subframe_tree,
21728 &ett_tag_measure_request_mode_tree,
21729 &ett_tag_measure_request_type_tree,
21730 &ett_tag_measure_report_mode_tree,
21731 &ett_tag_measure_report_type_tree,
21732 &ett_tag_measure_report_basic_map_tree,
21733 &ett_tag_measure_report_rpi_tree,
21734 &ett_tag_measure_report_frame_tree,
21735 &ett_tag_dfs_map_tree,
21736 &ett_tag_erp_info_tree,
21737 &ett_tag_ex_cap1,
21738 &ett_tag_ex_cap2,
21739 &ett_tag_ex_cap3,
21740 &ett_tag_ex_cap4,
21741 &ett_tag_ex_cap5,
21742 &ett_tag_ex_cap6,
21743 &ett_tag_ex_cap7,
21744 &ett_tag_ex_cap8,
21745 &ett_tag_rm_cap1,
21746 &ett_tag_rm_cap2,
21747 &ett_tag_rm_cap3,
21748 &ett_tag_rm_cap4,
21749 &ett_tag_rm_cap5,
21750 &ett_tag_tclas_mask_tree,
21751 &ett_tag_supported_channels,
21752 &ett_tag_neighbor_report_bssid_info_tree,
21753 &ett_tag_neighbor_report_bssid_info_capability_tree,
21754 &ett_tag_neighbor_report_sub_tag_tree,
21755 &ett_tag_bss_bitmask_tree,
21756 &ett_ampduparam_tree,
21757 &ett_mcsset_tree,
21758 &ett_mcsbit_tree,
21759 &ett_htex_cap_tree,
21760 &ett_txbf_tree,
21761 &ett_hta_cap_tree,
21762 &ett_hta_cap1_tree,
21763 &ett_hta_cap2_tree,
21764 &ett_htc_tree,
21765 &ett_antsel_tree,
21766 &ett_80211_mgt_ie,
21767 &ett_tsinfo_tree,
21768 &ett_sched_tree,
21769 &ett_fcs,
21770 &ett_tag_wapi_param_set_akm_tree,
21771 &ett_tag_wapi_param_set_ucast_tree,
21772 &ett_tag_wapi_param_set_mcast_tree,
21773 &ett_tag_wapi_param_set_preauth_tree,
21774 &ett_tag_time_adv_tree,
21775 &ett_adv_proto,
21776 &ett_adv_proto_tuple,
21777 &ett_gas_query,
21778 &ett_gas_resp_fragment,
21779 &ett_gas_resp_fragments,
21780 &ett_gas_anqp,
21781 &ett_nai_realm,
21782 &ett_nai_realm_eap,
21783 &ett_tag_ric_data_desc_ie,
21784 &ett_anqp_vendor_capab,
21785 &ett_hs20_cc_proto_port_tuple,
21786 &ett_ssid_list,
21787 &ett_nintendo,
21788 &ett_qos_map_set_exception,
21789 &ett_qos_map_set_range
21792 static ei_register_info ei[] = {
21793 { &ei_ieee80211_bad_length,
21794 { "ieee80211.bad_length", PI_MALFORMED, PI_ERROR,
21795 "Wrong length indicated", EXPFILL }},
21796 { &ei_ieee80211_inv_val,
21797 { "ieee80211.invalid_value", PI_MALFORMED, PI_WARN,
21798 "Invalid value", EXPFILL }},
21799 { &ei_ieee80211_tag_number, { "wlan_mgt.tag.number.unexpected_ie", PI_MALFORMED, PI_ERROR, "Unexpected IE (expected Advertisement Protocol)", EXPFILL }},
21800 { &ei_ieee80211_tag_length, { "wlan_mgt.tag.length.bad", PI_MALFORMED, PI_ERROR, "Bad tag length", EXPFILL }},
21801 { &ei_ieee80211_extra_data, { "ieee80211.extra_data", PI_MALFORMED, PI_WARN, "Unexpected extra data in the end", EXPFILL }},
21802 { &ei_ieee80211_ff_anqp_capability, { "wlan_mgt.fixed.anqp.capability.invalid", PI_MALFORMED, PI_ERROR, "Invalid vendor-specific ANQP capability", EXPFILL }},
21803 { &ei_ieee80211_ff_anqp_venue_length, { "wlan_mgt.fixed.anqp.venue.length.invalid", PI_MALFORMED, PI_ERROR, "Invalid Venue Name Duple length", EXPFILL }},
21804 { &ei_ieee80211_ff_anqp_roaming_consortium_oi_len, { "wlan_mgt.fixed.anqp.roaming_consortium.oi_len.invalid", PI_MALFORMED, PI_ERROR, "Invalid Roaming Consortium OI", EXPFILL }},
21805 { &ei_ieee80211_ff_anqp_nai_field_len, { "wlan_mgt.fixed.anqp.nai_realm_list.field_len.invalid", PI_MALFORMED, PI_ERROR, "Invalid NAI Realm List", EXPFILL }},
21806 { &ei_ieee80211_ff_anqp_nai_realm_eap_len, { "wlan_mgt.fixed.naqp_nai_realm_list.eap_method_len.invalid", PI_MALFORMED, PI_ERROR, "Invalid EAP Method subfield", EXPFILL }},
21807 { &ei_hs20_anqp_ofn_length, { "wlan_mgt.hs20.anqp.ofn.length.invalid", PI_MALFORMED, PI_ERROR, "Invalid Operator Friendly Name Duple length", EXPFILL }},
21808 { &ei_hs20_anqp_nai_hrq_length, { "wlan_mgt.hs20.anqp.nai_hrq.length.invalid", PI_MALFORMED, PI_ERROR, "Invalid NAI Home Realm Query length", EXPFILL }},
21809 { &ei_ieee80211_ff_anqp_info_length, { "wlan_mgt.fixed.anqp.info_length.invalid", PI_MALFORMED, PI_ERROR, "Invalid ANQP Info length", EXPFILL }},
21810 { &ei_ieee80211_not_enough_room_for_anqp_header, { "wlan_mgt.fixed.query_length_invalid", PI_MALFORMED, PI_ERROR, "Not enough room for ANQP header", EXPFILL }},
21811 { &ei_ieee80211_ff_query_request_length, { "wlan_mgt.fixed.query_request_length.invalid", PI_MALFORMED, PI_ERROR, "Invalid Query Request Length", EXPFILL }},
21812 { &ei_ieee80211_ff_query_response_length, { "wlan_mgt.fixed.query_response_length.invalid", PI_MALFORMED, PI_ERROR, "Invalid Query Response Length", EXPFILL }},
21813 { &ei_ieee80211_tag_wnm_sleep_mode_no_key_data, { "wlan_mgt.wnm_sleep_mode.no_key_data", PI_MALFORMED, PI_ERROR, "WNM-Sleep Mode Response is not long enough to include Key Data", EXPFILL }},
21814 { &ei_ieee80211_tdls_setup_response_malformed, { "wlan_mgt.tdls_setup_response_malformed", PI_MALFORMED, PI_ERROR, "TDLS Setup Response (success) does not include mandatory fields", EXPFILL }},
21815 { &ei_ieee80211_tdls_setup_confirm_malformed, { "wlan_mgt.tdls_setup_confirm_malformed", PI_MALFORMED, PI_ERROR, "TDLS Setup Confirm (success) does not include mandatory fields", EXPFILL }},
21816 { &ei_ieee80211_wfa_ie_wme_qos_info_bad_ftype, { "wlan_mgt.wfa.ie.wme.qos_info.bad_ftype", PI_UNDECODED, PI_WARN, "Could not deduce direction to decode correctly", EXPFILL }},
21817 { &ei_ieee80211_rsn_pcs_count, { "wlan_mgt.rsn.pcs.count.invalid", PI_MALFORMED, PI_ERROR, "Pairwise Cipher Suite Count too large", EXPFILL }},
21818 { &ei_ieee80211_rsn_pmkid_count, { "wlan_mgt.rsn.akms.count.invalid", PI_MALFORMED, PI_ERROR, "Auth Key Management (AKM) Suite Count too large", EXPFILL }},
21819 { &ei_ieee80211_pmkid_count_too_large, { "wlan_mgt.rsn.pmkid.count.invalid", PI_MALFORMED, PI_ERROR, "PMKID Count too large", EXPFILL }},
21820 { &ei_ieee80211_vht_tpe_pwr_info_count, { "wlan_mgt.vht.tpe.pwr_info.count.invalid", PI_MALFORMED, PI_ERROR, "Max Tx Pwr Count is Incorrect, should be 0-7", EXPFILL }},
21821 { &ei_ieee80211_missing_data, { "ieee80211.missing_data", PI_MALFORMED, PI_WARN, "No TFS Request subelements in TFS Request", EXPFILL }},
21822 { &ei_ieee80211_fc_retry, { "wlan.fc.retry.expert", PI_SEQUENCE, PI_NOTE, "Retransmission (retry)", EXPFILL }},
21823 { &ei_ieee80211_tag_measure_request_beacon_unknown, { "wlan_mgt.measure.req.beacon.unknown.expert", PI_UNDECODED, PI_WARN, "Unknown Data (not interpreted)", EXPFILL }},
21824 { &ei_ieee80211_tag_data, { "wlan_mgt.tag.data.undecoded", PI_UNDECODED, PI_NOTE, "Dissector for 802.11 IE Tag code not implemented, Contact Wireshark developers if you want this supported", EXPFILL }},
21827 expert_module_t *expert_ieee80211;
21829 module_t *wlan_module;
21831 memset (&wlan_stats, 0, sizeof wlan_stats);
21833 proto_aggregate = proto_register_protocol("IEEE 802.11 wireless LAN aggregate frame",
21834 "IEEE 802.11 Aggregate Data", "wlan_aggregate");
21835 proto_register_field_array(proto_aggregate, aggregate_fields, array_length(aggregate_fields));
21837 proto_wlan = proto_register_protocol ("IEEE 802.11 wireless LAN",
21838 "IEEE 802.11", "wlan");
21839 proto_register_field_array (proto_wlan, hf, array_length (hf));
21841 proto_wlan_mgt = proto_register_protocol ("IEEE 802.11 wireless LAN management frame",
21842 "802.11 MGT", "wlan_mgt");
21843 proto_register_field_array (proto_wlan_mgt, ff, array_length (ff));
21845 proto_register_subtree_array (tree_array, array_length (tree_array));
21847 expert_ieee80211 = expert_register_protocol(proto_wlan);
21848 expert_register_field_array(expert_ieee80211, ei, array_length(ei));
21850 register_dissector("wlan", dissect_ieee80211, proto_wlan);
21851 register_dissector("wlan_fixed", dissect_ieee80211_fixed, proto_wlan);
21852 register_dissector("wlan_bsfc", dissect_ieee80211_bsfc, proto_wlan);
21853 register_dissector("wlan_datapad", dissect_ieee80211_datapad, proto_wlan);
21854 register_dissector("wlan_ht", dissect_ieee80211_ht, proto_wlan);
21856 register_init_routine(wlan_defragment_init);
21857 register_init_routine(wlan_retransmit_init);
21858 register_init_routine(ieee80211_gas_reassembly_init);
21860 wlan_tap = register_tap("wlan");
21862 /* Register configuration options */
21863 wlan_module = prefs_register_protocol(proto_wlan, init_wepkeys);
21864 prefs_register_bool_preference(wlan_module, "defragment",
21865 "Reassemble fragmented 802.11 datagrams",
21866 "Whether fragmented 802.11 datagrams should be reassembled",
21867 &wlan_defragment);
21869 prefs_register_bool_preference(wlan_module, "ignore_draft_ht",
21870 "Ignore vendor-specific HT elements",
21871 "Don't dissect 802.11n draft HT elements (which might contain duplicate information).",
21872 &wlan_ignore_draft_ht);
21874 prefs_register_bool_preference(wlan_module, "retransmitted",
21875 "Call subdissector for retransmitted 802.11 frames",
21876 "Whether retransmitted 802.11 frames should be subdissected",
21877 &wlan_subdissector);
21879 prefs_register_bool_preference(wlan_module, "check_fcs",
21880 "Assume packets have FCS",
21881 "Some 802.11 cards include the FCS at the end of a packet, others do not.",
21882 &wlan_check_fcs);
21884 /* Davide Schiera (2006-11-26): changed "WEP bit" in "Protection bit" */
21885 /* (according to the document IEEE Std 802.11i-2004) */
21886 prefs_register_enum_preference(wlan_module, "ignore_wep",
21887 "Ignore the Protection bit",
21888 "Some 802.11 cards leave the Protection bit set even though the packet is decrypted, "
21889 "and some also leave the IV (initialization vector).",
21890 &wlan_ignore_wep, wlan_ignore_wep_options, TRUE);
21892 prefs_register_obsolete_preference(wlan_module, "wep_keys");
21894 /* Davide Schiera (2006-11-26): added reference to WPA/WPA2 decryption */
21895 prefs_register_bool_preference(wlan_module, "enable_decryption",
21896 "Enable decryption", "Enable WEP and WPA/WPA2 decryption",
21897 &enable_decryption);
21899 prefs_register_static_text_preference(wlan_module, "info_decryption_key",
21900 "Key examples: 01:02:03:04:05 (40/64-bit WEP),\n"
21901 "010203040506070809101111213 (104/128-bit WEP),\n"
21902 "MyPassword[:MyAP] (WPA + plaintext password [+ SSID]),\n"
21903 "0102030405...6061626364 (WPA + 256-bit key). "
21904 "Invalid keys will be ignored.",
21905 "Valid key formats");
21907 wep_uat = uat_new("WEP and WPA Decryption Keys",
21908 sizeof(uat_wep_key_record_t), /* record size */
21909 "80211_keys", /* filename */
21910 TRUE, /* from_profile */
21911 (void**) &uat_wep_key_records,/* data_ptr */
21912 &num_wepkeys_uat, /* numitems_ptr */
21913 UAT_AFFECTS_DISSECTION, /* affects dissection of packets, but not set of named fields */
21914 NULL, /* help */
21915 uat_wep_key_record_copy_cb, /* copy callback */
21916 uat_wep_key_record_update_cb, /* update callback */
21917 uat_wep_key_record_free_cb, /* free callback */
21918 init_wepkeys, /* post update callback - update the WEP/WPA keys */
21919 wep_uat_flds); /* UAT field definitions */
21921 prefs_register_uat_preference(wlan_module,
21922 "wep_key_table",
21923 "Decryption Keys",
21924 "WEP and pre-shared WPA keys",
21925 wep_uat);
21928 void
21929 proto_reg_handoff_ieee80211(void)
21931 dissector_handle_t data_encap_handle;
21934 * Get handles for the LLC, IPX and Ethernet dissectors.
21936 llc_handle = find_dissector("llc");
21937 ipx_handle = find_dissector("ipx");
21938 eth_withoutfcs_handle = find_dissector("eth_withoutfcs");
21939 data_handle = find_dissector("data");
21941 ieee80211_handle = find_dissector("wlan");
21942 dissector_add_uint("wtap_encap", WTAP_ENCAP_IEEE_802_11, ieee80211_handle);
21943 dissector_add_uint("ethertype", ETHERTYPE_CENTRINO_PROMISC, ieee80211_handle);
21945 /* Register handoff to Aruba GRE */
21946 dissector_add_uint("gre.proto", GRE_ARUBA_8200, ieee80211_handle);
21947 dissector_add_uint("gre.proto", GRE_ARUBA_8210, ieee80211_handle);
21948 dissector_add_uint("gre.proto", GRE_ARUBA_8220, ieee80211_handle);
21949 dissector_add_uint("gre.proto", GRE_ARUBA_8230, ieee80211_handle);
21950 dissector_add_uint("gre.proto", GRE_ARUBA_8240, ieee80211_handle);
21951 dissector_add_uint("gre.proto", GRE_ARUBA_8250, ieee80211_handle);
21952 dissector_add_uint("gre.proto", GRE_ARUBA_8260, ieee80211_handle);
21953 dissector_add_uint("gre.proto", GRE_ARUBA_8270, ieee80211_handle);
21954 dissector_add_uint("gre.proto", GRE_ARUBA_8280, ieee80211_handle);
21955 dissector_add_uint("gre.proto", GRE_ARUBA_8290, ieee80211_handle);
21956 dissector_add_uint("gre.proto", GRE_ARUBA_82A0, ieee80211_handle);
21957 dissector_add_uint("gre.proto", GRE_ARUBA_82B0, ieee80211_handle);
21958 dissector_add_uint("gre.proto", GRE_ARUBA_82C0, ieee80211_handle);
21959 dissector_add_uint("gre.proto", GRE_ARUBA_82D0, ieee80211_handle);
21960 dissector_add_uint("gre.proto", GRE_ARUBA_82E0, ieee80211_handle);
21961 dissector_add_uint("gre.proto", GRE_ARUBA_82F0, ieee80211_handle);
21962 dissector_add_uint("gre.proto", GRE_ARUBA_8300, ieee80211_handle);
21963 dissector_add_uint("gre.proto", GRE_ARUBA_8310, ieee80211_handle);
21964 dissector_add_uint("gre.proto", GRE_ARUBA_8320, ieee80211_handle);
21965 dissector_add_uint("gre.proto", GRE_ARUBA_8330, ieee80211_handle);
21966 dissector_add_uint("gre.proto", GRE_ARUBA_8340, ieee80211_handle);
21967 dissector_add_uint("gre.proto", GRE_ARUBA_8350, ieee80211_handle);
21968 dissector_add_uint("gre.proto", GRE_ARUBA_8360, ieee80211_handle);
21969 dissector_add_uint("gre.proto", GRE_ARUBA_8370, ieee80211_handle);
21971 data_encap_handle = create_dissector_handle(dissect_data_encap, proto_wlan);
21972 dissector_add_uint("ethertype", ETHERTYPE_IEEE80211_DATA_ENCAP,
21973 data_encap_handle);
21977 * Editor modelines
21979 * Local Variables:
21980 * c-basic-offset: 2
21981 * tab-width: 8
21982 * indent-tabs-mode: nil
21983 * End:
21985 * ex: set shiftwidth=2 tabstop=8 expandtab:
21986 * :indentSize=2:tabSize=8:noTabs=true: