aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoerg Mayer <jmayer@loplof.de>2016-07-08 00:24:14 +0200
committerJörg Mayer <jmayer@loplof.de>2016-07-07 23:57:29 +0000
commitd80c3b947c8333502d2aec839f520717c5d1f2b4 (patch)
tree7a31908b227a3042f594b423a6519bc649131314
parent10db044757938b6fd7e3562702d06146334c4e25 (diff)
Clean up fixed field handling
- Get rid of FF_FIELD macro. Use resoved strings instead. - Reorder add_ff_ functions so we don't need forward declarations - Replace add_fixed_field call by call to resolved function - Remove add_fixed_field and all structs and enums exclusive to it. - #if 0 out unused function add_ff_relay_capable_sta_info Change-Id: I9955febb317f3e7c1b9ae28a5ee9c6a6472f7e9c Reviewed-on: https://code.wireshark.org/review/16328 Reviewed-by: Jörg Mayer <jmayer@loplof.de>
-rw-r--r--epan/dissectors/packet-ieee80211.c1383
1 files changed, 555 insertions, 828 deletions
diff --git a/epan/dissectors/packet-ieee80211.c b/epan/dissectors/packet-ieee80211.c
index 37cb8f79b9..c6255acff3 100644
--- a/epan/dissectors/packet-ieee80211.c
+++ b/epan/dissectors/packet-ieee80211.c
@@ -341,132 +341,6 @@ typedef struct mimo_control
#define DATA_LONG_HDR_LEN 30
#define MGT_FRAME_HDR_LEN 24 /* Length of Management frame-headers */
-
-/* ************************************************************************* */
-/* Logical field codes (dissector's encoding of fixed fields) */
-/* ************************************************************************* */
-enum fixed_field {
- FIELD_TIMESTAMP, /* 64-bit timestamp */
- FIELD_BEACON_INTERVAL, /* 16-bit beacon interval */
- FIELD_CAP_INFO, /* Add capability information tree */
- FIELD_AUTH_ALG, /* Authentication algorithm used */
- FIELD_AUTH_TRANS_SEQ, /* Authentication sequence number */
- FIELD_CURRENT_AP_ADDR,
- FIELD_LISTEN_IVAL,
- FIELD_REASON_CODE,
- FIELD_ASSOC_ID,
- FIELD_STATUS_CODE,
- FIELD_CATEGORY_CODE, /* Management action category */
- FIELD_ACTION_CODE, /* Management action code */
- FIELD_DIALOG_TOKEN, /* Management action dialog token */
- FIELD_FOLLOWUP_DIALOG_TOKEN,
- FIELD_WME_ACTION_CODE, /* Management notification action code */
- FIELD_WME_DIALOG_TOKEN, /* Management notification dialog token */
- FIELD_WME_STATUS_CODE, /* Management notification setup response status code */
- FIELD_QOS_ACTION_CODE,
- FIELD_QOS_TS_INFO,
- FIELD_DLS_ACTION_CODE,
- FIELD_DST_MAC_ADDR, /* DLS destination MAC address */
- FIELD_SRC_MAC_ADDR, /* DLS source MAC address */
- FIELD_DLS_TIMEOUT, /* DLS timeout value */
- FIELD_SCHEDULE_INFO, /* Schedule Info field */
- FIELD_ACTION, /* Action field */
- FIELD_BLOCK_ACK_ACTION_CODE,
- FIELD_QOS_INFO_AP,
- FIELD_QOS_INFO_STA,
- FIELD_BLOCK_ACK_PARAM,
- FIELD_BLOCK_ACK_TIMEOUT,
- FIELD_BLOCK_ACK_SSC,
- FIELD_DELBA_PARAM_SET,
- FIELD_MAX_REG_PWR,
- FIELD_MEASUREMENT_PILOT_INT,
- FIELD_COUNTRY_STR,
- FIELD_MAX_TX_PWR,
- FIELD_TX_PWR_USED,
- FIELD_TRANSCEIVER_NOISE_FLOOR,
- FIELD_DS_PARAM_SET,
- FIELD_CHANNEL_WIDTH,
- FIELD_SM_PWR_CNTRL,
- FIELD_PCO_PHASE_CNTRL,
- FIELD_PSMP_PARAM_SET,
- FIELD_PSMP_STA_INFO,
- FIELD_MIMO_CNTRL,
- FIELD_ANT_SELECTION,
- FIELD_EXTENDED_CHANNEL_SWITCH_ANNOUNCEMENT,
- FIELD_HT_INFORMATION,
- FIELD_HT_ACTION_CODE,
- FIELD_PA_ACTION_CODE,
- FIELD_PPA_ACTION_CODE,
- FIELD_FT_ACTION_CODE,
- FIELD_STA_ADDRESS,
- FIELD_TARGET_AP_ADDRESS,
- FIELD_GAS_COMEBACK_DELAY,
- FIELD_GAS_FRAGMENT_ID,
- FIELD_SA_QUERY_ACTION_CODE,
- FIELD_TRANSACTION_ID,
- FIELD_TDLS_ACTION_CODE,
- FIELD_TARGET_CHANNEL,
- FIELD_OPERATING_CLASS,
- FIELD_MESH_ACTION,
- FIELD_MULTIHOP_ACTION,
- FIELD_MESH_CONTROL,
- FIELD_SELFPROT_ACTION,
- FIELD_WNM_ACTION_CODE,
- FIELD_UNPROTECTED_WNM_ACTION_CODE,
- FIELD_RELAY_CAPABLE_STA_INFO,
- FIELD_BAND_ID,
- FIELD_DMG_PARAMETERS,
- FIELD_SECTOR_SWEEP,
- FIELD_DYNAMIC_ALLOCATION,
- FIELD_SECTOR_SWEEP_FB,
- FIELD_BRP_REQ,
- FIELD_BEAMFORMING_CTRL,
- FIELD_BEAMFORMED_LINK_MAINTAINCE,
- FIELD_BEACON_INTERVAL_CTRL,
- FIELD_KEY_DATA_LENGTH,
- FIELD_WNM_NOTIFICATION_TYPE,
- FIELD_RM_ACTION_CODE,
- FIELD_RM_DIALOG_TOKEN,
- FIELD_RM_REPETITIONS,
- FIELD_RM_TX_POWER,
- FIELD_RM_MAX_TX_POWER,
- FIELD_RM_TPC_REPORT,
- FIELD_RM_RX_ANTENNA_ID,
- FIELD_RM_TX_ANTENNA_ID,
- FIELD_RM_RCPI,
- FIELD_RM_RSNI,
- FIELD_DMG_ACTION_CODE,
- FIELD_DMG_PWR_MGMT,
- FIELD_REQ_AP_ADDR,
- FIELD_RES_AP_ADDR,
- FIELD_CHECK_BEACON,
- FIELD_TOD,
- FIELD_TOA,
- FIELD_MAX_TOD_ERR,
- FIELD_MAX_TOA_ERR,
- FIELD_SUBJECT_ADDRESS,
- FIELD_HANDOVER_REASON,
- FIELD_HANDOVER_REMAINING_BI,
- FIELD_HANDOVER_RESULT,
- FIELD_HANDOVER_REJECT_REASON,
- FIELD_DESTINATION_REDS_AID,
- FIELD_DESTINATION_AID,
- FIELD_REALY_AID,
- FIELD_SOURCE_AID,
- FIELD_TIMING_OFFSET,
- FIELD_SAMPLING_FREQUENCY_OFFSET,
- FIELD_RELAY_OPERATION_TYPE,
- FIELD_UNPROTECTED_DMG_ACTION_CODE,
- FIELD_FST_ACTION_CODE,
- FIELD_LLT,
- FIELD_FSTS_ID,
- FIELD_OCT_MMPDU,
- FIELD_VHT_ACTION,
- FIELD_BSS_TERMINATION_DELAY,
- FIELD_BSS_TRANSITION_STATUS_CODE,
- MAX_FIELD_NUM /* add any new fixed field value above this line */
-};
-
/* ************************************************************************* */
/* Logical field codes (IEEE 802.11 encoding of tags) */
/* ************************************************************************* */
@@ -6906,10 +6780,6 @@ dissect_gas_comeback_response(proto_tree *tree, tvbuff_t *tvb, packet_info *pinf
/* Dissect and add fixed mgmt fields to protocol tree */
/* ************************************************************************* */
-static guint
-add_fixed_field(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset,
- enum fixed_field lfcode);
-
static guint64 last_timestamp;
static guint
@@ -7598,6 +7468,248 @@ add_ff_ppa_action_code(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_,
}
static guint
+add_ff_ft_action_code(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
+{
+ proto_tree_add_item(tree, hf_ieee80211_ff_ft_action_code, tvb, offset, 1,
+ ENC_LITTLE_ENDIAN);
+ return 1;
+}
+
+static guint
+add_ff_sta_address(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
+{
+ proto_tree_add_item(tree, hf_ieee80211_ff_sta_address, tvb, offset, 6,
+ ENC_NA);
+ return 6;
+}
+
+static guint
+add_ff_target_ap_address(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
+{
+ proto_tree_add_item(tree, hf_ieee80211_ff_target_ap_address, tvb, offset, 6,
+ ENC_NA);
+ return 6;
+}
+
+static guint
+add_ff_gas_comeback_delay(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
+{
+ proto_tree_add_item(tree, hf_ieee80211_ff_gas_comeback_delay, tvb, offset, 2,
+ ENC_LITTLE_ENDIAN);
+ return 2;
+}
+
+static guint
+add_ff_gas_fragment_id(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
+{
+ proto_tree_add_item(tree, hf_ieee80211_ff_gas_fragment_id, tvb, offset, 1,
+ ENC_LITTLE_ENDIAN);
+ proto_tree_add_item(tree, hf_ieee80211_ff_more_gas_fragments, tvb, offset, 1,
+ ENC_LITTLE_ENDIAN);
+ return 1;
+}
+
+static guint
+add_ff_sa_query_action_code(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
+{
+ proto_tree_add_item(tree, hf_ieee80211_ff_sa_query_action_code, tvb, offset,
+ 1, ENC_LITTLE_ENDIAN);
+ return 1;
+}
+
+static guint
+add_ff_transaction_id(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
+{
+ proto_tree_add_item(tree, hf_ieee80211_ff_transaction_id, tvb, offset, 2,
+ ENC_LITTLE_ENDIAN);
+ return 2;
+}
+
+static guint
+add_ff_tdls_action_code(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset)
+{
+ guint8 code;
+ code = tvb_get_guint8(tvb, offset);
+ col_set_str(pinfo->cinfo, COL_INFO,
+ val_to_str_ext_const(code, &tdls_action_codes_ext,
+ "Unknown TDLS Action"));
+ proto_tree_add_item(tree, hf_ieee80211_ff_tdls_action_code, tvb, offset, 1,
+ ENC_LITTLE_ENDIAN);
+ return 1;
+}
+
+static guint
+add_ff_target_channel(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
+{
+ proto_tree_add_item(tree, hf_ieee80211_ff_target_channel, tvb, offset, 1,
+ ENC_LITTLE_ENDIAN);
+ return 1;
+}
+
+static guint
+add_ff_operating_class(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
+{
+ proto_tree_add_item(tree, hf_ieee80211_ff_operating_class, tvb, offset, 1,
+ ENC_LITTLE_ENDIAN);
+ return 1;
+}
+
+static guint
+add_ff_wnm_action_code(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset)
+{
+ guint8 code;
+
+ code = tvb_get_guint8(tvb, offset);
+ col_set_str(pinfo->cinfo, COL_INFO,
+ val_to_str_ext_const(code, &wnm_action_codes_ext, "Unknown WNM Action"));
+ proto_tree_add_item(tree, hf_ieee80211_ff_wnm_action_code, tvb, offset, 1, ENC_LITTLE_ENDIAN);
+ return 1;
+}
+
+static guint
+add_ff_unprotected_wnm_action_code(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset)
+{
+ guint8 code;
+
+ code = tvb_get_guint8(tvb, offset);
+ col_set_str(pinfo->cinfo, COL_INFO,
+ val_to_str_ext_const(code, &unprotected_wnm_action_codes_ext, "Unknown Unprotected WNM Action"));
+ proto_tree_add_item(tree, hf_ieee80211_ff_unprotected_wnm_action_code, tvb, offset, 1, ENC_LITTLE_ENDIAN);
+ return 1;
+}
+
+static guint
+add_ff_unprotected_dmg_action_code(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
+{
+ proto_tree_add_item(tree, hf_ieee80211_ff_unprotected_dmg_action_code, tvb, offset, 1, ENC_NA);
+ return 1;
+}
+
+static guint
+add_ff_key_data_length(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
+{
+ proto_tree_add_item(tree, hf_ieee80211_ff_key_data_length, tvb, offset, 2,
+ ENC_LITTLE_ENDIAN);
+ return 2;
+}
+
+static guint
+add_ff_wnm_notification_type(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
+{
+ proto_tree_add_item(tree, hf_ieee80211_ff_wnm_notification_type,
+ tvb, offset, 1, ENC_NA);
+ return 1;
+}
+
+/* Action frame: Radio Measurement actions */
+static guint
+add_ff_rm_action_code(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
+{
+ proto_tree_add_item(tree, hf_ieee80211_ff_rm_action_code, tvb, offset, 1, ENC_NA);
+ return 1;
+}
+
+static guint
+add_ff_rm_dialog_token(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
+{
+ proto_tree_add_item(tree, hf_ieee80211_ff_rm_dialog_token, tvb, offset, 1, ENC_NA);
+ return 1;
+}
+
+/* Radio Measurement Request frame, Action fields */
+static guint
+add_ff_rm_repetitions(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
+{
+ /* Note: 65535 means repeated until cancelled or superseded */
+ proto_tree_add_item(tree, hf_ieee80211_ff_rm_repetitions, tvb, offset, 2,
+ ENC_BIG_ENDIAN);
+ return 2;
+}
+
+/* Link Measurement Request frame, Action fields*/
+static guint
+add_ff_rm_tx_power(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
+{
+ /* In dBm, see 8.4.1.20 */
+ proto_tree_add_item(tree, hf_ieee80211_ff_rm_tx_power, tvb, offset, 1, ENC_NA);
+ return 1;
+}
+
+static guint
+add_ff_rm_max_tx_power(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
+{
+ /* In dBm, see 8.4.1.19 */
+ proto_tree_add_item(tree, hf_ieee80211_ff_rm_max_tx_power, tvb, offset, 1, ENC_NA);
+ return 1;
+}
+
+/* Link Measurement Report frame, Action fields */
+static guint
+add_ff_rm_tpc_report(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
+{
+ proto_tree *tpc_tree;
+ proto_item *tpc_item;
+
+ /* 8.4.2.19 TPC Report element */
+ tpc_item = proto_tree_add_item(tree, hf_ieee80211_ff_tpc, tvb, offset, 4, ENC_NA);
+ tpc_tree = proto_item_add_subtree(tpc_item, ett_tpc);
+ proto_tree_add_item(tpc_tree, hf_ieee80211_ff_tpc_element_id, tvb, offset, 1, ENC_NA);
+ proto_tree_add_item(tpc_tree, hf_ieee80211_ff_tpc_length, tvb, offset + 1, 1, ENC_NA);
+ proto_tree_add_item(tpc_tree, hf_ieee80211_ff_tpc_tx_power, tvb, offset + 2, 1, ENC_NA);
+ proto_tree_add_item(tpc_tree, hf_ieee80211_ff_tpc_link_margin, tvb, offset + 3, 1, ENC_NA);
+ return 4;
+}
+
+static guint
+add_ff_rm_rx_antenna_id(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
+{
+ /* 8.4.2.42: 0 means unknown, 1-254 is valid, 255 means multiple antennas */
+ proto_tree_add_item(tree, hf_ieee80211_ff_rm_rx_antenna_id, tvb, offset, 1, ENC_NA);
+ return 1;
+}
+
+static guint
+add_ff_rm_tx_antenna_id(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
+{
+ /* 8.4.2.42: 0 means unknown, 1-254 is valid, 255 means multiple antennas */
+ proto_tree_add_item(tree, hf_ieee80211_ff_rm_tx_antenna_id, tvb, offset, 1, ENC_NA);
+ return 1;
+}
+
+static guint
+add_ff_rm_rcpi(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
+{
+ /* 8.4.2.40: RCPI as specified for certain PHYs */
+ proto_tree_add_item(tree, hf_ieee80211_ff_rm_rcpi, tvb, offset, 1, ENC_NA);
+ return 1;
+}
+
+static guint
+add_ff_rm_rsni(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
+{
+ /* 8.4.2.43: RSNI in steps of 0.5 dB, calculated as:
+ * RSNI = (10 * log10((RCPI_{power} - ANPI_{power}) / ANPI_{power}) + 20)*2 */
+ proto_tree_add_item(tree, hf_ieee80211_ff_rm_rsni, tvb, offset, 1, ENC_NA);
+ return 1;
+}
+
+static guint
+add_ff_bss_transition_status_code(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
+{
+ proto_tree_add_item(tree, hf_ieee80211_ff_bss_transition_status_code, tvb, offset, 1,
+ ENC_LITTLE_ENDIAN);
+ return 1;
+}
+
+static guint
+add_ff_bss_termination_delay(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
+{
+ proto_tree_add_item(tree, hf_ieee80211_ff_bss_termination_delay, tvb, offset, 1,
+ ENC_LITTLE_ENDIAN);
+ return 1;
+}
+
+static guint
add_ff_action_spectrum_mgmt(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset)
{
switch (tvb_get_guint8(tvb, offset + 1)) {
@@ -7605,18 +7717,18 @@ add_ff_action_spectrum_mgmt(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo,
case SM_ACTION_MEASUREMENT_REPORT:
case SM_ACTION_TPC_REQUEST:
case SM_ACTION_TPC_REPORT:
- add_fixed_field(tree, tvb, pinfo, offset, FIELD_CATEGORY_CODE);
- add_fixed_field(tree, tvb, pinfo, offset + 1, FIELD_ACTION_CODE);
- add_fixed_field(tree, tvb, pinfo, offset + 2, FIELD_DIALOG_TOKEN);
+ add_ff_category_code(tree, tvb, pinfo, offset);
+ add_ff_action_code(tree, tvb, pinfo, offset + 1);
+ add_ff_dialog_token(tree, tvb, pinfo, offset + 2);
return 3;
case SM_ACTION_CHAN_SWITCH_ANNC:
case SM_ACTION_EXT_CHAN_SWITCH_ANNC:
- add_fixed_field(tree, tvb, pinfo, offset, FIELD_CATEGORY_CODE);
- add_fixed_field(tree, tvb, pinfo, offset + 1, FIELD_ACTION_CODE);
+ add_ff_category_code(tree, tvb, pinfo, offset);
+ add_ff_action_code(tree, tvb, pinfo, offset + 1);
return 2;
default:
- add_fixed_field(tree, tvb, pinfo, offset, FIELD_CATEGORY_CODE);
- add_fixed_field(tree, tvb, pinfo, offset + 1, FIELD_ACTION_CODE);
+ add_ff_category_code(tree, tvb, pinfo, offset);
+ add_ff_action_code(tree, tvb, pinfo, offset + 1);
return 2;
}
}
@@ -7626,32 +7738,32 @@ add_ff_action_qos(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offse
{
switch (tvb_get_guint8(tvb, offset + 1)) {
case QOS_ACTION_ADDTS_REQUEST:
- add_fixed_field(tree, tvb, pinfo, offset, FIELD_CATEGORY_CODE);
- add_fixed_field(tree, tvb, pinfo, offset + 1, FIELD_QOS_ACTION_CODE);
- add_fixed_field(tree, tvb, pinfo, offset + 2, FIELD_DIALOG_TOKEN);
+ add_ff_category_code(tree, tvb, pinfo, offset);
+ add_ff_qos_action_code(tree, tvb, pinfo, offset + 1);
+ add_ff_dialog_token(tree, tvb, pinfo, offset + 2);
return 3;
case QOS_ACTION_ADDTS_RESPONSE:
- add_fixed_field(tree, tvb, pinfo, offset, FIELD_CATEGORY_CODE);
- add_fixed_field(tree, tvb, pinfo, offset + 1, FIELD_QOS_ACTION_CODE);
- add_fixed_field(tree, tvb, pinfo, offset + 2, FIELD_DIALOG_TOKEN);
- add_fixed_field(tree, tvb, pinfo, offset + 3, FIELD_STATUS_CODE);
+ add_ff_category_code(tree, tvb, pinfo, offset);
+ add_ff_qos_action_code(tree, tvb, pinfo, offset + 1);
+ add_ff_dialog_token(tree, tvb, pinfo, offset + 2);
+ add_ff_status_code(tree, tvb, pinfo, offset + 3);
return 5;
case QOS_ACTION_DELTS:
- add_fixed_field(tree, tvb, pinfo, offset, FIELD_CATEGORY_CODE);
- add_fixed_field(tree, tvb, pinfo, offset + 1, FIELD_QOS_ACTION_CODE);
- add_fixed_field(tree, tvb, pinfo, offset + 2, FIELD_QOS_TS_INFO);
- add_fixed_field(tree, tvb, pinfo, offset + 5, FIELD_REASON_CODE);
+ add_ff_category_code(tree, tvb, pinfo, offset);
+ add_ff_qos_action_code(tree, tvb, pinfo, offset + 1);
+ add_ff_qos_ts_info(tree, tvb, pinfo, offset + 2);
+ add_ff_reason_code(tree, tvb, pinfo, offset + 5);
return 7;
case QOS_ACTION_SCHEDULE:
- add_fixed_field(tree, tvb, pinfo, offset, FIELD_CATEGORY_CODE);
- add_fixed_field(tree, tvb, pinfo, offset + 1, FIELD_QOS_ACTION_CODE);
+ add_ff_category_code(tree, tvb, pinfo, offset);
+ add_ff_qos_action_code(tree, tvb, pinfo, offset + 1);
return 2;
case QOS_ACTION_MAP_CONFIGURE:
- add_fixed_field(tree, tvb, pinfo, offset, FIELD_CATEGORY_CODE);
- add_fixed_field(tree, tvb, pinfo, offset + 1, FIELD_QOS_ACTION_CODE);
+ add_ff_category_code(tree, tvb, pinfo, offset);
+ add_ff_qos_action_code(tree, tvb, pinfo, offset + 1);
return 2;
default:
- add_fixed_field(tree, tvb, pinfo, offset, FIELD_CATEGORY_CODE);
+ add_ff_category_code(tree, tvb, pinfo, offset);
return 2;
}
}
@@ -7661,32 +7773,32 @@ add_ff_action_dls(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offse
{
switch (tvb_get_guint8(tvb, offset + 1)) {
case DLS_ACTION_REQUEST:
- add_fixed_field(tree, tvb, pinfo, offset, FIELD_CATEGORY_CODE);
- add_fixed_field(tree, tvb, pinfo, offset + 1, FIELD_DLS_ACTION_CODE);
- add_fixed_field(tree, tvb, pinfo, offset + 2, FIELD_DST_MAC_ADDR);
- add_fixed_field(tree, tvb, pinfo, offset + 8, FIELD_SRC_MAC_ADDR);
- add_fixed_field(tree, tvb, pinfo, offset + 14, FIELD_CAP_INFO);
- add_fixed_field(tree, tvb, pinfo, offset + 16, FIELD_DLS_TIMEOUT);
+ add_ff_category_code(tree, tvb, pinfo, offset);
+ add_ff_dls_action_code(tree, tvb, pinfo, offset + 1);
+ add_ff_dst_mac_addr(tree, tvb, pinfo, offset + 2);
+ add_ff_src_mac_addr(tree, tvb, pinfo, offset + 8);
+ add_ff_cap_info(tree, tvb, pinfo, offset + 14);
+ add_ff_dls_timeout(tree, tvb, pinfo, offset + 16);
return 18;
case DLS_ACTION_RESPONSE:
- add_fixed_field(tree, tvb, pinfo, offset, FIELD_CATEGORY_CODE);
- add_fixed_field(tree, tvb, pinfo, offset + 1, FIELD_DLS_ACTION_CODE);
- add_fixed_field(tree, tvb, pinfo, offset + 2, FIELD_STATUS_CODE);
- add_fixed_field(tree, tvb, pinfo, offset + 4, FIELD_DST_MAC_ADDR);
- add_fixed_field(tree, tvb, pinfo, offset + 10, FIELD_SRC_MAC_ADDR);
+ add_ff_category_code(tree, tvb, pinfo, offset);
+ add_ff_dls_action_code(tree, tvb, pinfo, offset + 1);
+ add_ff_status_code(tree, tvb, pinfo, offset + 2);
+ add_ff_dst_mac_addr(tree, tvb, pinfo, offset + 4);
+ add_ff_src_mac_addr(tree, tvb, pinfo, offset + 10);
if (!hf_ieee80211_ff_status_code) {
- add_fixed_field(tree, tvb, pinfo, offset + 16, FIELD_CAP_INFO);
+ add_ff_cap_info(tree, tvb, pinfo, offset + 16);
}
return 16;
case DLS_ACTION_TEARDOWN:
- add_fixed_field(tree, tvb, pinfo, offset, FIELD_CATEGORY_CODE);
- add_fixed_field(tree, tvb, pinfo, offset + 1, FIELD_DLS_ACTION_CODE);
- add_fixed_field(tree, tvb, pinfo, offset + 2, FIELD_DST_MAC_ADDR);
- add_fixed_field(tree, tvb, pinfo, offset + 8, FIELD_SRC_MAC_ADDR);
- add_fixed_field(tree, tvb, pinfo, offset + 14, FIELD_REASON_CODE);
+ add_ff_category_code(tree, tvb, pinfo, offset);
+ add_ff_dls_action_code(tree, tvb, pinfo, offset + 1);
+ add_ff_dst_mac_addr(tree, tvb, pinfo, offset + 2);
+ add_ff_src_mac_addr(tree, tvb, pinfo, offset + 8);
+ add_ff_reason_code(tree, tvb, pinfo, offset + 14);
return 16;
default:
- add_fixed_field(tree, tvb, pinfo, offset, FIELD_CATEGORY_CODE);
+ add_ff_category_code(tree, tvb, pinfo, offset);
return 2;
}
}
@@ -7698,26 +7810,26 @@ add_ff_action_block_ack(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int
switch (tvb_get_guint8(tvb, offset + 1)) {
case BA_ADD_BLOCK_ACK_REQUEST:
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_CATEGORY_CODE);
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_BLOCK_ACK_ACTION_CODE);
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_DIALOG_TOKEN);
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_BLOCK_ACK_PARAM);
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_BLOCK_ACK_TIMEOUT);
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_BLOCK_ACK_SSC);
+ offset += add_ff_category_code(tree, tvb, pinfo, offset);
+ offset += add_ff_block_ack_action_code(tree, tvb, pinfo, offset);
+ offset += add_ff_dialog_token(tree, tvb, pinfo, offset);
+ offset += add_ff_block_ack_param(tree, tvb, pinfo, offset);
+ offset += add_ff_block_ack_timeout(tree, tvb, pinfo, offset);
+ offset += add_ff_block_ack_ssc(tree, tvb, pinfo, offset);
break;
case BA_ADD_BLOCK_ACK_RESPONSE:
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_CATEGORY_CODE);
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_BLOCK_ACK_ACTION_CODE);
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_DIALOG_TOKEN);
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_STATUS_CODE);
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_BLOCK_ACK_PARAM);
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_BLOCK_ACK_TIMEOUT);
+ offset += add_ff_category_code(tree, tvb, pinfo, offset);
+ offset += add_ff_block_ack_action_code(tree, tvb, pinfo, offset);
+ offset += add_ff_dialog_token(tree, tvb, pinfo, offset);
+ offset += add_ff_status_code(tree, tvb, pinfo, offset);
+ offset += add_ff_block_ack_param(tree, tvb, pinfo, offset);
+ offset += add_ff_block_ack_timeout(tree, tvb, pinfo, offset);
break;
case BA_DELETE_BLOCK_ACK:
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_CATEGORY_CODE);
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_BLOCK_ACK_ACTION_CODE);
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_DELBA_PARAM_SET);
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_REASON_CODE);
+ offset += add_ff_category_code(tree, tvb, pinfo, offset);
+ offset += add_ff_block_ack_action_code(tree, tvb, pinfo, offset);
+ offset += add_ff_delba_param_set(tree, tvb, pinfo, offset);
+ offset += add_ff_reason_code(tree, tvb, pinfo, offset);
break;
}
@@ -7759,30 +7871,30 @@ add_ff_action_public_fields(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo,
}
break;
case PA_GAS_INITIAL_REQUEST:
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_DIALOG_TOKEN);
+ offset += add_ff_dialog_token(tree, tvb, pinfo, offset);
offset += dissect_advertisement_protocol(pinfo, tree, tvb, offset,
&anqp);
offset += dissect_gas_initial_request(tree, tvb, pinfo, offset, anqp);
break;
case PA_GAS_INITIAL_RESPONSE:
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_DIALOG_TOKEN);
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_STATUS_CODE);
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_GAS_COMEBACK_DELAY);
+ offset += add_ff_dialog_token(tree, tvb, pinfo, offset);
+ offset += add_ff_status_code(tree, tvb, pinfo, offset);
+ offset += add_ff_gas_comeback_delay(tree, tvb, pinfo, offset);
offset += dissect_advertisement_protocol(pinfo, tree, tvb, offset,
&anqp);
offset += dissect_gas_initial_response(tree, tvb, pinfo, offset, anqp);
break;
case PA_GAS_COMEBACK_REQUEST:
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_DIALOG_TOKEN);
+ offset += add_ff_dialog_token(tree, tvb, pinfo, offset);
break;
case PA_GAS_COMEBACK_RESPONSE:
dialog_token = tvb_get_guint8(tvb, offset);
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_DIALOG_TOKEN);
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_STATUS_CODE);
+ offset += add_ff_dialog_token(tree, tvb, pinfo, offset);
+ offset += add_ff_status_code(tree, tvb, pinfo, offset);
frag = tvb_get_guint8(tvb, offset) & 0x7f;
more = (tvb_get_guint8(tvb, offset) & 0x80) != 0;
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_GAS_FRAGMENT_ID);
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_GAS_COMEBACK_DELAY);
+ offset += add_ff_gas_fragment_id(tree, tvb, pinfo, offset);
+ offset += add_ff_gas_comeback_delay(tree, tvb, pinfo, offset);
offset += dissect_advertisement_protocol(pinfo, tree, tvb, offset,
&anqp);
offset += dissect_gas_comeback_response(tree, tvb, pinfo, offset, anqp, frag,
@@ -7791,14 +7903,14 @@ add_ff_action_public_fields(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo,
case PA_TDLS_DISCOVERY_RESPONSE:
col_set_str(pinfo->cinfo, COL_PROTOCOL, "TDLS");
col_set_str(pinfo->cinfo, COL_INFO, "TDLS Discovery Response");
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_DIALOG_TOKEN);
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_CAP_INFO);
+ offset += add_ff_dialog_token(tree, tvb, pinfo, offset);
+ offset += add_ff_cap_info(tree, tvb, pinfo, offset);
break;
case PA_QAB_REQUEST:
case PA_QAB_RESPONSE:
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_DIALOG_TOKEN);
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_REQ_AP_ADDR);
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_RES_AP_ADDR);
+ offset += add_ff_dialog_token(tree, tvb, pinfo, offset);
+ offset += add_ff_req_ap_addr(tree, tvb, pinfo, offset);
+ offset += add_ff_res_ap_addr(tree, tvb, pinfo, offset);
break;
}
@@ -7810,9 +7922,9 @@ add_ff_action_public(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int of
{
guint8 code;
guint start = offset;
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_CATEGORY_CODE);
+ offset += add_ff_category_code(tree, tvb, pinfo, offset);
code = tvb_get_guint8(tvb, offset);
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_PA_ACTION_CODE);
+ offset += add_ff_pa_action_code(tree, tvb, pinfo, offset);
offset += add_ff_action_public_fields(tree, tvb, pinfo, offset, code);
return offset - start;
}
@@ -7822,9 +7934,9 @@ add_ff_action_protected_public(proto_tree *tree, tvbuff_t *tvb, packet_info *pin
{
guint8 code;
guint start = offset;
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_CATEGORY_CODE);
+ offset += add_ff_category_code(tree, tvb, pinfo, offset);
code = tvb_get_guint8(tvb, offset);
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_PPA_ACTION_CODE);
+ offset += add_ff_ppa_action_code(tree, tvb, pinfo, offset);
offset += add_ff_action_public_fields(tree, tvb, pinfo, offset, code);
return offset - start;
}
@@ -7835,41 +7947,41 @@ add_ff_action_radio_measurement(proto_tree *tree, tvbuff_t *tvb, packet_info *pi
guint start = offset;
guint8 code;
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_CATEGORY_CODE);
+ offset += add_ff_category_code(tree, tvb, pinfo, offset);
code = tvb_get_guint8(tvb, offset);
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_RM_ACTION_CODE);
+ offset += add_ff_rm_action_code(tree, tvb, pinfo, offset);
switch (code) {
case RM_ACTION_RADIO_MEASUREMENT_REQUEST:
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_RM_DIALOG_TOKEN);
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_RM_REPETITIONS);
+ offset += add_ff_rm_dialog_token(tree, tvb, pinfo, offset);
+ offset += add_ff_rm_repetitions(tree, tvb, pinfo, offset);
/* Followed by Measurement Request Elements */
break;
case RM_ACTION_RADIO_MEASUREMENT_REPORT:
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_RM_DIALOG_TOKEN);
+ offset += add_ff_rm_dialog_token(tree, tvb, pinfo, offset);
/* Followed by Measurement Report Elements */
break;
case RM_ACTION_LINK_MEASUREMENT_REQUEST:
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_RM_DIALOG_TOKEN);
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_RM_TX_POWER);
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_RM_MAX_TX_POWER);
+ offset += add_ff_rm_dialog_token(tree, tvb, pinfo, offset);
+ offset += add_ff_rm_tx_power(tree, tvb, pinfo, offset);
+ offset += add_ff_rm_max_tx_power(tree, tvb, pinfo, offset);
/* Followed by Optional Subelements */
break;
case RM_ACTION_LINK_MEASUREMENT_REPORT:
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_RM_DIALOG_TOKEN);
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_RM_TPC_REPORT);
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_RM_RX_ANTENNA_ID);
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_RM_TX_ANTENNA_ID);
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_RM_RCPI);
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_RM_RSNI);
+ offset += add_ff_rm_dialog_token(tree, tvb, pinfo, offset);
+ offset += add_ff_rm_tpc_report(tree, tvb, pinfo, offset);
+ offset += add_ff_rm_rx_antenna_id(tree, tvb, pinfo, offset);
+ offset += add_ff_rm_tx_antenna_id(tree, tvb, pinfo, offset);
+ offset += add_ff_rm_rcpi(tree, tvb, pinfo, offset);
+ offset += add_ff_rm_rsni(tree, tvb, pinfo, offset);
/* Followed by Optional Subelements */
break;
case RM_ACTION_NEIGHBOR_REPORT_REQUEST:
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_RM_DIALOG_TOKEN);
+ offset += add_ff_rm_dialog_token(tree, tvb, pinfo, offset);
/* Followed by Optional Subelements */
break;
case RM_ACTION_NEIGHBOR_REPORT_RESPONSE:
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_RM_DIALOG_TOKEN);
+ offset += add_ff_rm_dialog_token(tree, tvb, pinfo, offset);
/* Followed by Neighbor Report Elements */
break;
}
@@ -7883,31 +7995,31 @@ add_ff_action_fast_bss_transition(proto_tree *tree, tvbuff_t *tvb, packet_info *
guint start = offset;
guint8 code;
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_CATEGORY_CODE);
+ offset += add_ff_category_code(tree, tvb, pinfo, offset);
code = tvb_get_guint8(tvb, offset);
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_FT_ACTION_CODE);
+ offset += add_ff_ft_action_code(tree, tvb, pinfo, offset);
switch (code) {
case FT_ACTION_REQUEST:
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_STA_ADDRESS);
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_TARGET_AP_ADDRESS);
+ offset += add_ff_sta_address(tree, tvb, pinfo, offset);
+ offset += add_ff_target_ap_address(tree, tvb, pinfo, offset);
/* Followed by FT Request frame body (IEs) */
break;
case FT_ACTION_RESPONSE:
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_STA_ADDRESS);
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_TARGET_AP_ADDRESS);
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_STATUS_CODE);
+ offset += add_ff_sta_address(tree, tvb, pinfo, offset);
+ offset += add_ff_target_ap_address(tree, tvb, pinfo, offset);
+ offset += add_ff_status_code(tree, tvb, pinfo, offset);
/* Followed by FT Response frame body (IEs) */
break;
case FT_ACTION_CONFIRM:
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_STA_ADDRESS);
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_TARGET_AP_ADDRESS);
+ offset += add_ff_sta_address(tree, tvb, pinfo, offset);
+ offset += add_ff_target_ap_address(tree, tvb, pinfo, offset);
/* Followed by FT Confirm frame body (IEs) */
break;
case FT_ACTION_ACK:
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_STA_ADDRESS);
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_TARGET_AP_ADDRESS);
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_STATUS_CODE);
+ offset += add_ff_sta_address(tree, tvb, pinfo, offset);
+ offset += add_ff_target_ap_address(tree, tvb, pinfo, offset);
+ offset += add_ff_status_code(tree, tvb, pinfo, offset);
/* Followed by FT Ack frame body (IEs) */
break;
}
@@ -7921,16 +8033,16 @@ add_ff_action_sa_query(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int
guint start = offset;
guint8 code;
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_CATEGORY_CODE);
+ offset += add_ff_category_code(tree, tvb, pinfo, offset);
code = tvb_get_guint8(tvb, offset);
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_SA_QUERY_ACTION_CODE);
+ offset += add_ff_sa_query_action_code(tree, tvb, pinfo, offset);
switch (code) {
case SA_QUERY_REQUEST:
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_TRANSACTION_ID);
+ offset += add_ff_transaction_id(tree, tvb, pinfo, offset);
break;
case SA_QUERY_RESPONSE:
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_TRANSACTION_ID);
+ offset += add_ff_transaction_id(tree, tvb, pinfo, offset);
break;
}
@@ -7942,15 +8054,15 @@ add_ff_action_mesh(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offs
{
guint length;
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_CATEGORY_CODE);
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_MESH_ACTION);
+ offset += add_ff_category_code(tree, tvb, pinfo, offset);
+ offset += add_ff_mesh_action(tree, tvb, pinfo, offset);
/* The only fixed fields are the category and mesh action. The rest are IEs.
*/
length = 2;
if (tvb_get_guint8(tvb, 1) == MESH_ACTION_TBTT_ADJ_RESPONSE) {
/* ..except for the TBTT Adjustment Response, which has a status code field
*/
- length += add_fixed_field(tree, tvb, pinfo, offset, FIELD_STATUS_CODE);
+ length += add_ff_status_code(tree, tvb, pinfo, offset);
}
return length;
}
@@ -7960,9 +8072,9 @@ add_ff_action_multihop(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int
{
guint start = offset;
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_CATEGORY_CODE);
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_MULTIHOP_ACTION);
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_MESH_CONTROL);
+ offset += add_ff_category_code(tree, tvb, pinfo, offset);
+ offset += add_ff_multihop_action(tree, tvb, pinfo, offset);
+ offset += add_ff_mesh_control(tree, tvb, pinfo, offset);
return offset - start;
}
@@ -7971,16 +8083,16 @@ add_ff_action_self_protected(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo
{
guint start = offset;
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_CATEGORY_CODE);
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_SELFPROT_ACTION);
+ offset += add_ff_category_code(tree, tvb, pinfo, offset);
+ offset += add_ff_selfprot_action(tree, tvb, pinfo, offset);
switch (tvb_get_guint8(tvb, start + 1)) {
case SELFPROT_ACTION_MESH_PEERING_OPEN:
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_CAP_INFO);
+ offset += add_ff_cap_info(tree, tvb, pinfo, offset);
break;
case SELFPROT_ACTION_MESH_PEERING_CONFIRM:
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_CAP_INFO);
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_ASSOC_ID);
+ offset += add_ff_cap_info(tree, tvb, pinfo, offset);
+ offset += add_ff_assoc_id(tree, tvb, pinfo, offset);
break;
}
@@ -8003,7 +8115,7 @@ wnm_bss_trans_mgmt_req(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int
guint8 mode;
gint left;
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_DIALOG_TOKEN);
+ offset += add_ff_dialog_token(tree, tvb, pinfo, offset);
mode = tvb_get_guint8(tvb, offset);
proto_tree_add_item(tree, hf_ieee80211_ff_request_mode_pref_cand,
@@ -8061,10 +8173,10 @@ wnm_bss_trans_mgmt_resp(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int
guint8 code;
gint left;
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_DIALOG_TOKEN);
+ offset += add_ff_dialog_token(tree, tvb, pinfo, offset);
code = tvb_get_guint8(tvb, offset);
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_BSS_TRANSITION_STATUS_CODE);
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_BSS_TERMINATION_DELAY);
+ offset += add_ff_bss_transition_status_code(tree, tvb, pinfo, offset);
+ offset += add_ff_bss_termination_delay(tree, tvb, pinfo, offset);
if (!code) {
proto_tree_add_item(tree, hf_ieee80211_ff_target_bss,
tvb, offset, 6, ENC_NA);
@@ -8084,7 +8196,7 @@ static guint
wnm_sleep_mode_req(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset)
{
int start = offset;
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_DIALOG_TOKEN);
+ offset += add_ff_dialog_token(tree, tvb, pinfo, offset);
return offset - start;
}
@@ -8095,9 +8207,9 @@ wnm_sleep_mode_resp(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int off
guint16 key_data_len;
gint left;
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_DIALOG_TOKEN);
+ offset += add_ff_dialog_token(tree, tvb, pinfo, offset);
key_data_len = tvb_get_letohs(tvb, offset);
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_KEY_DATA_LENGTH);
+ offset += add_ff_key_data_length(tree, tvb, pinfo, offset);
left = tvb_reported_length_remaining(tvb, offset);
if (left < key_data_len) {
expert_add_info(pinfo, tree, &ei_ieee80211_tag_wnm_sleep_mode_no_key_data);
@@ -8113,7 +8225,7 @@ static guint
wnm_tfs_req(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset)
{
int start = offset;
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_DIALOG_TOKEN);
+ offset += add_ff_dialog_token(tree, tvb, pinfo, offset);
return offset - start;
}
@@ -8121,7 +8233,7 @@ static guint
wnm_tfs_resp(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset)
{
int start = offset;
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_DIALOG_TOKEN);
+ offset += add_ff_dialog_token(tree, tvb, pinfo, offset);
return offset - start;
}
@@ -8129,8 +8241,8 @@ static guint
wnm_notification_req(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset)
{
int start = offset;
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_DIALOG_TOKEN);
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_WNM_NOTIFICATION_TYPE);
+ offset += add_ff_dialog_token(tree, tvb, pinfo, offset);
+ offset += add_ff_wnm_notification_type(tree, tvb, pinfo, offset);
return offset - start;
}
@@ -8140,9 +8252,9 @@ add_ff_action_wnm(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offse
guint8 code;
guint start = offset;
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_CATEGORY_CODE);
+ offset += add_ff_category_code(tree, tvb, pinfo, offset);
code = tvb_get_guint8(tvb, offset);
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_WNM_ACTION_CODE);
+ offset += add_ff_wnm_action_code(tree, tvb, pinfo, offset);
switch (code) {
case WNM_BSS_TRANS_MGMT_REQ:
offset += wnm_bss_trans_mgmt_req(tree, tvb, pinfo, offset);
@@ -8176,22 +8288,22 @@ add_ff_action_unprotected_wnm(proto_tree *tree, tvbuff_t *tvb, packet_info *pinf
guint8 code;
guint start = offset;
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_CATEGORY_CODE);
+ offset += add_ff_category_code(tree, tvb, pinfo, offset);
code = tvb_get_guint8(tvb, offset);
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_UNPROTECTED_WNM_ACTION_CODE);
+ offset += add_ff_unprotected_wnm_action_code(tree, tvb, pinfo, offset);
switch (code) {
case UNPROTECTED_WNM_TIM:
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_CHECK_BEACON);
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_TIMESTAMP);
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_TOD);
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_TOA);
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_MAX_TOD_ERR);
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_MAX_TOA_ERR);
+ offset += add_ff_check_beacon(tree, tvb, pinfo, offset);
+ offset += add_ff_timestamp(tree, tvb, pinfo, offset);
+ offset += add_ff_tod(tree, tvb, pinfo, offset);
+ offset += add_ff_toa(tree, tvb, pinfo, offset);
+ offset += add_ff_max_tod_err(tree, tvb, pinfo, offset);
+ offset += add_ff_max_toa_err(tree, tvb, pinfo, offset);
break;
case UNPROTECTED_WNM_TIMING_MEASUREMENT:
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_DIALOG_TOKEN);
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_FOLLOWUP_DIALOG_TOKEN);
+ offset += add_ff_dialog_token(tree, tvb, pinfo, offset);
+ offset += add_ff_followup_dialog_token(tree, tvb, pinfo, offset);
break;
}
@@ -8205,62 +8317,62 @@ add_ff_action_tdls(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offs
guint16 status;
guint start = offset;
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_CATEGORY_CODE);
+ offset += add_ff_category_code(tree, tvb, pinfo, offset);
code = tvb_get_guint8(tvb, offset);
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_TDLS_ACTION_CODE);
+ offset += add_ff_tdls_action_code(tree, tvb, pinfo, offset);
switch (code) {
case TDLS_SETUP_REQUEST:
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_DIALOG_TOKEN);
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_CAP_INFO);
+ offset += add_ff_dialog_token(tree, tvb, pinfo, offset);
+ offset += add_ff_cap_info(tree, tvb, pinfo, offset);
break;
case TDLS_SETUP_RESPONSE:
status = tvb_get_letohs(tvb, offset);
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_STATUS_CODE);
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_DIALOG_TOKEN);
+ offset += add_ff_status_code(tree, tvb, pinfo, offset);
+ offset += add_ff_dialog_token(tree, tvb, pinfo, offset);
if (tvb_reported_length_remaining(tvb, offset) < 2) {
if (status == 0) {
expert_add_info(pinfo, tree, &ei_ieee80211_tdls_setup_response_malformed);
}
break;
}
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_CAP_INFO);
+ offset += add_ff_cap_info(tree, tvb, pinfo, offset);
break;
case TDLS_SETUP_CONFIRM:
status = tvb_get_letohs(tvb, offset);
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_STATUS_CODE);
+ offset += add_ff_status_code(tree, tvb, pinfo, offset);
if (tvb_reported_length_remaining(tvb, offset) < 1) {
if (status == 0) {
expert_add_info(pinfo, tree, &ei_ieee80211_tdls_setup_confirm_malformed);
}
break;
}
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_DIALOG_TOKEN);
+ offset += add_ff_dialog_token(tree, tvb, pinfo, offset);
break;
case TDLS_TEARDOWN:
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_REASON_CODE);
+ offset += add_ff_reason_code(tree, tvb, pinfo, offset);
break;
case TDLS_PEER_TRAFFIC_INDICATION:
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_DIALOG_TOKEN);
+ offset += add_ff_dialog_token(tree, tvb, pinfo, offset);
break;
case TDLS_CHANNEL_SWITCH_REQUEST:
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_TARGET_CHANNEL);
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_OPERATING_CLASS);
+ offset += add_ff_target_channel(tree, tvb, pinfo, offset);
+ offset += add_ff_operating_class(tree, tvb, pinfo, offset);
break;
case TDLS_CHANNEL_SWITCH_RESPONSE:
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_STATUS_CODE);
+ offset += add_ff_status_code(tree, tvb, pinfo, offset);
break;
case TDLS_PEER_PSM_REQUEST:
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_DIALOG_TOKEN);
+ offset += add_ff_dialog_token(tree, tvb, pinfo, offset);
break;
case TDLS_PEER_PSM_RESPONSE:
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_DIALOG_TOKEN);
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_STATUS_CODE);
+ offset += add_ff_dialog_token(tree, tvb, pinfo, offset);
+ offset += add_ff_status_code(tree, tvb, pinfo, offset);
break;
case TDLS_PEER_TRAFFIC_RESPONSE:
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_DIALOG_TOKEN);
+ offset += add_ff_dialog_token(tree, tvb, pinfo, offset);
break;
case TDLS_DISCOVERY_REQUEST:
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_DIALOG_TOKEN);
+ offset += add_ff_dialog_token(tree, tvb, pinfo, offset);
break;
}
@@ -8272,10 +8384,10 @@ add_ff_action_mgmt_notification(proto_tree *tree, tvbuff_t *tvb, packet_info *pi
{
guint start = offset;
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_CATEGORY_CODE);
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_WME_ACTION_CODE);
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_DIALOG_TOKEN);
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_WME_STATUS_CODE);
+ offset += add_ff_category_code(tree, tvb, pinfo, offset);
+ offset += add_ff_wme_action_code(tree, tvb, pinfo, offset);
+ offset += add_ff_dialog_token(tree, tvb, pinfo, offset);
+ offset += add_ff_wme_status_code(tree, tvb, pinfo, offset);
return offset - start; /* Size of fixed fields */
}
@@ -8287,7 +8399,7 @@ add_ff_action_vendor_specific(proto_tree *tree, tvbuff_t *tvb, packet_info *pinf
guint32 oui;
guint8 subtype;
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_CATEGORY_CODE);
+ offset += add_ff_category_code(tree, tvb, pinfo, offset);
oui = tvb_get_ntoh24(tvb, offset);
proto_tree_add_item(tree, hf_ieee80211_tag_oui, tvb, offset, 3, ENC_NA);
offset += 3;
@@ -8318,49 +8430,49 @@ add_ff_action_ht(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset
guint8 n_sta, i;
mimo_control_t mimo_cntrl;
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_CATEGORY_CODE);
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_HT_ACTION_CODE);
+ offset += add_ff_category_code(tree, tvb, pinfo, offset);
+ offset += add_ff_ht_action_code(tree, tvb, pinfo, offset);
switch (tvb_get_guint8(tvb, offset - 1)) {
case HT_ACTION_NOTIFY_CHAN_WIDTH:
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_CHANNEL_WIDTH);
+ offset += add_ff_channel_width(tree, tvb, pinfo, offset);
break;
case HT_ACTION_SM_PWR_SAVE:
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_SM_PWR_CNTRL);
+ offset += add_ff_sm_pwr_cntrl(tree, tvb, pinfo, offset);
break;
case HT_ACTION_PSMP_ACTION:
n_sta = tvb_get_guint8(tvb, offset);
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_PSMP_PARAM_SET);
+ offset += add_ff_psmp_param_set(tree, tvb, pinfo, offset);
for (i = 0; i < (n_sta & 0x0F); i++) {
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_PSMP_STA_INFO);
+ offset += add_ff_psmp_sta_info(tree, tvb, pinfo, offset);
}
break;
case HT_ACTION_SET_PCO_PHASE:
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_PCO_PHASE_CNTRL);
+ offset += add_ff_pco_phase_cntrl(tree, tvb, pinfo, offset);
break;
case HT_ACTION_MIMO_CSI:
mimo_cntrl = get_mimo_control(tvb, offset);
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_MIMO_CNTRL);
+ offset += add_ff_mimo_cntrl(tree, tvb, pinfo, offset);
offset += add_mimo_csi_matrices_report(tree, tvb, offset, mimo_cntrl);
break;
case HT_ACTION_MIMO_BEAMFORMING:
mimo_cntrl = get_mimo_control(tvb, offset);
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_MIMO_CNTRL);
+ offset += add_ff_mimo_cntrl(tree, tvb, pinfo, offset);
offset += add_mimo_beamforming_feedback_report(tree, tvb, offset,
mimo_cntrl);
break;
case HT_ACTION_MIMO_COMPRESSED_BEAMFORMING:
mimo_cntrl = get_mimo_control(tvb, offset);
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_MIMO_CNTRL);
+ offset += add_ff_mimo_cntrl(tree, tvb, pinfo, offset);
offset += add_mimo_compressed_beamforming_feedback_report(tree, tvb,
offset,
mimo_cntrl);
break;
case HT_ACTION_ANT_SEL_FEEDBACK:
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_ANT_SELECTION);
+ offset += add_ff_ant_selection(tree, tvb, pinfo, offset);
break;
case HT_ACTION_HT_INFO_EXCHANGE:
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_HT_INFORMATION);
+ offset += add_ff_ht_information(tree, tvb, pinfo, offset);
break;
}
@@ -8368,237 +8480,6 @@ add_ff_action_ht(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset
}
static guint
-add_ff_ft_action_code(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
-{
- proto_tree_add_item(tree, hf_ieee80211_ff_ft_action_code, tvb, offset, 1,
- ENC_LITTLE_ENDIAN);
- return 1;
-}
-
-static guint
-add_ff_sta_address(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
-{
- proto_tree_add_item(tree, hf_ieee80211_ff_sta_address, tvb, offset, 6,
- ENC_NA);
- return 6;
-}
-
-static guint
-add_ff_target_ap_address(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
-{
- proto_tree_add_item(tree, hf_ieee80211_ff_target_ap_address, tvb, offset, 6,
- ENC_NA);
- return 6;
-}
-
-static guint
-add_ff_gas_comeback_delay(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
-{
- proto_tree_add_item(tree, hf_ieee80211_ff_gas_comeback_delay, tvb, offset, 2,
- ENC_LITTLE_ENDIAN);
- return 2;
-}
-
-static guint
-add_ff_gas_fragment_id(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
-{
- proto_tree_add_item(tree, hf_ieee80211_ff_gas_fragment_id, tvb, offset, 1,
- ENC_LITTLE_ENDIAN);
- proto_tree_add_item(tree, hf_ieee80211_ff_more_gas_fragments, tvb, offset, 1,
- ENC_LITTLE_ENDIAN);
- return 1;
-}
-
-static guint
-add_ff_sa_query_action_code(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
-{
- proto_tree_add_item(tree, hf_ieee80211_ff_sa_query_action_code, tvb, offset,
- 1, ENC_LITTLE_ENDIAN);
- return 1;
-}
-
-static guint
-add_ff_transaction_id(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
-{
- proto_tree_add_item(tree, hf_ieee80211_ff_transaction_id, tvb, offset, 2,
- ENC_LITTLE_ENDIAN);
- return 2;
-}
-
-static guint
-add_ff_tdls_action_code(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset)
-{
- guint8 code;
- code = tvb_get_guint8(tvb, offset);
- col_set_str(pinfo->cinfo, COL_INFO,
- val_to_str_ext_const(code, &tdls_action_codes_ext,
- "Unknown TDLS Action"));
- proto_tree_add_item(tree, hf_ieee80211_ff_tdls_action_code, tvb, offset, 1,
- ENC_LITTLE_ENDIAN);
- return 1;
-}
-
-static guint
-add_ff_target_channel(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
-{
- proto_tree_add_item(tree, hf_ieee80211_ff_target_channel, tvb, offset, 1,
- ENC_LITTLE_ENDIAN);
- return 1;
-}
-
-static guint
-add_ff_operating_class(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
-{
- proto_tree_add_item(tree, hf_ieee80211_ff_operating_class, tvb, offset, 1,
- ENC_LITTLE_ENDIAN);
- return 1;
-}
-
-static guint
-add_ff_wnm_action_code(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset)
-{
- guint8 code;
-
- code = tvb_get_guint8(tvb, offset);
- col_set_str(pinfo->cinfo, COL_INFO,
- val_to_str_ext_const(code, &wnm_action_codes_ext, "Unknown WNM Action"));
- proto_tree_add_item(tree, hf_ieee80211_ff_wnm_action_code, tvb, offset, 1, ENC_LITTLE_ENDIAN);
- return 1;
-}
-
-static guint
-add_ff_unprotected_wnm_action_code(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset)
-{
- guint8 code;
-
- code = tvb_get_guint8(tvb, offset);
- col_set_str(pinfo->cinfo, COL_INFO,
- val_to_str_ext_const(code, &unprotected_wnm_action_codes_ext, "Unknown Unprotected WNM Action"));
- proto_tree_add_item(tree, hf_ieee80211_ff_unprotected_wnm_action_code, tvb, offset, 1, ENC_LITTLE_ENDIAN);
- return 1;
-}
-
-static guint
-add_ff_unprotected_dmg_action_code(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
-{
- proto_tree_add_item(tree, hf_ieee80211_ff_unprotected_dmg_action_code, tvb, offset, 1, ENC_NA);
- return 1;
-}
-
-static guint
-add_ff_key_data_length(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
-{
- proto_tree_add_item(tree, hf_ieee80211_ff_key_data_length, tvb, offset, 2,
- ENC_LITTLE_ENDIAN);
- return 2;
-}
-
-struct ieee80211_fixed_field_dissector {
- enum fixed_field lfcode;
- guint (*dissector)(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset);
-};
-
-static guint
-add_ff_wnm_notification_type(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
-{
- proto_tree_add_item(tree, hf_ieee80211_ff_wnm_notification_type,
- tvb, offset, 1, ENC_NA);
- return 1;
-}
-
-/* Action frame: Radio Measurement actions */
-static guint
-add_ff_rm_action_code(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
-{
- proto_tree_add_item(tree, hf_ieee80211_ff_rm_action_code, tvb, offset, 1, ENC_NA);
- return 1;
-}
-
-static guint
-add_ff_rm_dialog_token(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
-{
- proto_tree_add_item(tree, hf_ieee80211_ff_rm_dialog_token, tvb, offset, 1, ENC_NA);
- return 1;
-}
-
-/* Radio Measurement Request frame, Action fields */
-static guint
-add_ff_rm_repetitions(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
-{
- /* Note: 65535 means repeated until cancelled or superseded */
- proto_tree_add_item(tree, hf_ieee80211_ff_rm_repetitions, tvb, offset, 2,
- ENC_BIG_ENDIAN);
- return 2;
-}
-
-/* Link Measurement Request frame, Action fields*/
-static guint
-add_ff_rm_tx_power(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
-{
- /* In dBm, see 8.4.1.20 */
- proto_tree_add_item(tree, hf_ieee80211_ff_rm_tx_power, tvb, offset, 1, ENC_NA);
- return 1;
-}
-
-static guint
-add_ff_rm_max_tx_power(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
-{
- /* In dBm, see 8.4.1.19 */
- proto_tree_add_item(tree, hf_ieee80211_ff_rm_max_tx_power, tvb, offset, 1, ENC_NA);
- return 1;
-}
-
-/* Link Measurement Report frame, Action fields */
-static guint
-add_ff_rm_tpc_report(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
-{
- proto_tree *tpc_tree;
- proto_item *tpc_item;
-
- /* 8.4.2.19 TPC Report element */
- tpc_item = proto_tree_add_item(tree, hf_ieee80211_ff_tpc, tvb, offset, 4, ENC_NA);
- tpc_tree = proto_item_add_subtree(tpc_item, ett_tpc);
- proto_tree_add_item(tpc_tree, hf_ieee80211_ff_tpc_element_id, tvb, offset, 1, ENC_NA);
- proto_tree_add_item(tpc_tree, hf_ieee80211_ff_tpc_length, tvb, offset + 1, 1, ENC_NA);
- proto_tree_add_item(tpc_tree, hf_ieee80211_ff_tpc_tx_power, tvb, offset + 2, 1, ENC_NA);
- proto_tree_add_item(tpc_tree, hf_ieee80211_ff_tpc_link_margin, tvb, offset + 3, 1, ENC_NA);
- return 4;
-}
-
-static guint
-add_ff_rm_rx_antenna_id(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
-{
- /* 8.4.2.42: 0 means unknown, 1-254 is valid, 255 means multiple antennas */
- proto_tree_add_item(tree, hf_ieee80211_ff_rm_rx_antenna_id, tvb, offset, 1, ENC_NA);
- return 1;
-}
-
-static guint
-add_ff_rm_tx_antenna_id(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
-{
- /* 8.4.2.42: 0 means unknown, 1-254 is valid, 255 means multiple antennas */
- proto_tree_add_item(tree, hf_ieee80211_ff_rm_tx_antenna_id, tvb, offset, 1, ENC_NA);
- return 1;
-}
-
-static guint
-add_ff_rm_rcpi(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
-{
- /* 8.4.2.40: RCPI as specified for certain PHYs */
- proto_tree_add_item(tree, hf_ieee80211_ff_rm_rcpi, tvb, offset, 1, ENC_NA);
- return 1;
-}
-
-static guint
-add_ff_rm_rsni(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
-{
- /* 8.4.2.43: RSNI in steps of 0.5 dB, calculated as:
- * RSNI = (10 * log10((RCPI_{power} - ANPI_{power}) / ANPI_{power}) + 20)*2 */
- proto_tree_add_item(tree, hf_ieee80211_ff_rm_rsni, tvb, offset, 1, ENC_NA);
- return 1;
-}
-
-static guint
add_ff_beacon_interval_ctrl(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
{
proto_item *bic_item = proto_tree_add_item(tree, hf_ieee80211_ff_bic, tvb, offset, 6, ENC_LITTLE_ENDIAN);
@@ -8893,6 +8774,7 @@ add_tag_relay_capabilities(packet_info *pinfo, proto_item *item, gint32 tag_len,
return;
}
+#if 0
static guint
add_ff_relay_capable_sta_info(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
{
@@ -8903,7 +8785,7 @@ add_ff_relay_capable_sta_info(proto_tree *tree, tvbuff_t *tvb, packet_info *pinf
add_tag_relay_capabilities(pinfo, rcsi_item, 2, rcsi_tree, tvb, &offset);
return 3;
}
-
+#endif
static void
dissect_ieee80211_extension(guint16 fcf, tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
@@ -8926,14 +8808,14 @@ dissect_ieee80211_extension(guint16 fcf, tvbuff_t *tvb, packet_info *pinfo, prot
gboolean cc, dis;
guint16 bic_field;
fixed_tree = get_fixed_parameter_tree (ext_tree, tvb, offset, 20);
- offset += add_fixed_field(fixed_tree, tvb, pinfo, offset, FIELD_TIMESTAMP);
- offset += add_fixed_field(fixed_tree, tvb, pinfo, offset, FIELD_SECTOR_SWEEP);
- offset += add_fixed_field(fixed_tree, tvb, pinfo, offset, FIELD_BEACON_INTERVAL);
+ offset += add_ff_timestamp(fixed_tree, tvb, pinfo, offset);
+ offset += add_ff_sector_sweep(fixed_tree, tvb, pinfo, offset);
+ offset += add_ff_beacon_interval(fixed_tree, tvb, pinfo, offset);
bic_field = tvb_get_letohs(tvb, offset);
cc = (bic_field & 0x1);
dis = (bic_field & 0x2) >> 1;
- offset += add_fixed_field(fixed_tree, tvb, pinfo, offset, FIELD_BEACON_INTERVAL_CTRL);
- offset += add_fixed_field(fixed_tree, tvb, pinfo, offset, FIELD_DMG_PARAMETERS);
+ offset += add_ff_beacon_interval_ctrl(fixed_tree, tvb, pinfo, offset);
+ offset += add_ff_dmg_params(fixed_tree, tvb, pinfo, offset);
if(cc) {
offset += add_ff_cc_field(fixed_tree,tvb, offset, dis);
}
@@ -8958,17 +8840,17 @@ add_ff_action_unprotected_dmg(proto_tree *tree, tvbuff_t *tvb, packet_info *pinf
guint8 code;
guint start = offset;
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_CATEGORY_CODE);
+ offset += add_ff_category_code(tree, tvb, pinfo, offset);
code = tvb_get_guint8(tvb, offset);
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_UNPROTECTED_DMG_ACTION_CODE);
+ offset += add_ff_unprotected_dmg_action_code(tree, tvb, pinfo, offset);
switch (code) {
case UNPROTECTED_DMG_ANNOUNCE:
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_TIMESTAMP);
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_BEACON_INTERVAL);
+ offset += add_ff_timestamp(tree, tvb, pinfo, offset);
+ offset += add_ff_beacon_interval(tree, tvb, pinfo, offset);
break;
case UNPROTECTED_DMG_BRP:
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_DIALOG_TOKEN);
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_BRP_REQ);
+ offset += add_ff_dialog_token(tree, tvb, pinfo, offset);
+ offset += add_ff_BRP_request(tree, tvb, pinfo, offset);
break;
}
return offset - start;
@@ -9219,10 +9101,10 @@ add_ff_action_vht(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offse
proto_item *ti;
proto_tree *ti_tree;
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_CATEGORY_CODE);
+ offset += add_ff_category_code(tree, tvb, pinfo, offset);
vht_action = tvb_get_guint8(tvb, offset);
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_VHT_ACTION);
+ offset += add_ff_vht_action(tree, tvb, pinfo, offset);
switch(vht_action){
case VHT_ACT_VHT_COMPRESSED_BEAMFORMING:{
@@ -9265,31 +9147,31 @@ add_ff_action_fst(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offse
guint8 code;
guint start = offset;
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_CATEGORY_CODE);
+ offset += add_ff_category_code(tree, tvb, pinfo, offset);
code = tvb_get_guint8(tvb, offset);
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_FST_ACTION_CODE);
+ offset += add_ff_fst_action_code(tree, tvb, pinfo, offset);
switch (code) {
case FST_SETUP_REQUEST:
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_DIALOG_TOKEN);
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_LLT);
+ offset += add_ff_dialog_token(tree, tvb, pinfo, offset);
+ offset += add_ff_llt(tree, tvb, pinfo, offset);
break;
case FST_SETUP_RESPONSE:
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_DIALOG_TOKEN);
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_STATUS_CODE);
+ offset += add_ff_dialog_token(tree, tvb, pinfo, offset);
+ offset += add_ff_status_code(tree, tvb, pinfo, offset);
break;
case FST_TEAR_DOWN:
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_FSTS_ID);
+ offset += add_ff_fsts_id(tree, tvb, pinfo, offset);
break;
case FST_ACK_REQUEST:
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_DIALOG_TOKEN);
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_FSTS_ID);
+ offset += add_ff_dialog_token(tree, tvb, pinfo, offset);
+ offset += add_ff_fsts_id(tree, tvb, pinfo, offset);
break;
case FST_ACK_RESPONSE:
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_DIALOG_TOKEN);
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_FSTS_ID);
+ offset += add_ff_dialog_token(tree, tvb, pinfo, offset);
+ offset += add_ff_fsts_id(tree, tvb, pinfo, offset);
break;
case FST_ON_CHANNEL_TUNNEL_REQUEST:
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_OCT_MMPDU);
+ offset += add_ff_oct_mmpdu(tree, tvb, pinfo, offset);
break;
}
return offset - start;
@@ -9302,51 +9184,51 @@ add_ff_action_dmg(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offse
guint start = offset;
int left_offset;
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_CATEGORY_CODE);
+ offset += add_ff_category_code(tree, tvb, pinfo, offset);
code = tvb_get_guint8(tvb, offset);
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_DMG_ACTION_CODE);
+ offset += add_ff_dmg_action_code(tree, tvb, pinfo, offset);
switch (code) {
case DMG_ACTION_PWR_SAVE_CONFIG_REQ:
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_DIALOG_TOKEN);
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_DMG_PWR_MGMT);
+ offset += add_ff_dialog_token(tree, tvb, pinfo, offset);
+ offset += add_ff_dmg_pwr_mgmt(tree, tvb, pinfo, offset);
break;
case DMG_ACTION_PWR_SAVE_CONFIG_RES:
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_DIALOG_TOKEN);
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_STATUS_CODE);
+ offset += add_ff_dialog_token(tree, tvb, pinfo, offset);
+ offset += add_ff_status_code(tree, tvb, pinfo, offset);
break;
case DMG_ACTION_INFO_REQ:
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_SUBJECT_ADDRESS);
+ offset += add_ff_subject_address(tree, tvb, pinfo, offset);
break;
case DMG_ACTION_INFO_RES:
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_SUBJECT_ADDRESS);
+ offset += add_ff_subject_address(tree, tvb, pinfo, offset);
break;
case DMG_ACTION_HANDOVER_REQ:
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_HANDOVER_REASON);
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_HANDOVER_REMAINING_BI);
+ offset += add_ff_handover_reason(tree, tvb, pinfo, offset);
+ offset += add_ff_handover_remaining_bi(tree, tvb, pinfo, offset);
break;
case DMG_ACTION_HANDOVER_RES:
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_HANDOVER_RESULT);
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_HANDOVER_REJECT_REASON);
+ offset += add_ff_handover_result(tree, tvb, pinfo, offset);
+ offset += add_ff_handover_reject_reason(tree, tvb, pinfo, offset);
break;
case DMG_ACTION_DTP_REQ:
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_DIALOG_TOKEN);
+ offset += add_ff_dialog_token(tree, tvb, pinfo, offset);
break;
case DMG_ACTION_DTP_RES:
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_DIALOG_TOKEN);
+ offset += add_ff_dialog_token(tree, tvb, pinfo, offset);
break;
case DMG_ACTION_RELAY_SEARCH_REQ:
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_DIALOG_TOKEN);
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_DESTINATION_REDS_AID);
+ offset += add_ff_dialog_token(tree, tvb, pinfo, offset);
+ offset += add_ff_destination_reds_aid(tree, tvb, pinfo, offset);
break;
case DMG_ACTION_RELAY_SEARCH_RES:
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_DIALOG_TOKEN);
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_STATUS_CODE);
+ offset += add_ff_dialog_token(tree, tvb, pinfo, offset);
+ offset += add_ff_status_code(tree, tvb, pinfo, offset);
break;
case DMG_ACTION_MUL_RELAY_CHANNEL_MEASURE_REQ:
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_DIALOG_TOKEN);
+ offset += add_ff_dialog_token(tree, tvb, pinfo, offset);
break;
case DMG_ACTION_MUL_RELAY_CHANNEL_MEASURE_RES:
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_DIALOG_TOKEN);
+ offset += add_ff_dialog_token(tree, tvb, pinfo, offset);
left_offset =
tvb_reported_length_remaining(tvb, offset);
while(left_offset > 0) {
@@ -9360,47 +9242,47 @@ add_ff_action_dmg(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offse
}
break;
case DMG_ACTION_RLS_REQ:
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_DIALOG_TOKEN);
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_DESTINATION_AID);
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_REALY_AID);
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_SOURCE_AID);
+ offset += add_ff_dialog_token(tree, tvb, pinfo, offset);
+ offset += add_ff_destination_aid(tree, tvb, pinfo, offset);
+ offset += add_ff_realy_aid(tree, tvb, pinfo, offset);
+ offset += add_ff_source_aid(tree, tvb, pinfo, offset);
break;
case DMG_ACTION_RLS_RES:
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_DIALOG_TOKEN);
+ offset += add_ff_dialog_token(tree, tvb, pinfo, offset);
break;
case DMG_ACTION_RLS_ANNOUNCE:
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_DIALOG_TOKEN);
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_STATUS_CODE);
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_DESTINATION_AID);
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_REALY_AID);
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_SOURCE_AID);
+ offset += add_ff_dialog_token(tree, tvb, pinfo, offset);
+ offset += add_ff_status_code(tree, tvb, pinfo, offset);
+ offset += add_ff_destination_aid(tree, tvb, pinfo, offset);
+ offset += add_ff_realy_aid(tree, tvb, pinfo, offset);
+ offset += add_ff_source_aid(tree, tvb, pinfo, offset);
break;
case DMG_ACTION_RLS_TEARDOWN:
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_DESTINATION_AID);
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_REALY_AID);
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_SOURCE_AID);
+ offset += add_ff_destination_aid(tree, tvb, pinfo, offset);
+ offset += add_ff_realy_aid(tree, tvb, pinfo, offset);
+ offset += add_ff_source_aid(tree, tvb, pinfo, offset);
break;
case DMG_ACTION_RELAY_ACK_REQ:
case DMG_ACTION_RELAY_ACK_RES:
break;
case DMG_ACTION_TPA_REQ:
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_DIALOG_TOKEN);
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_TIMING_OFFSET);
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_SAMPLING_FREQUENCY_OFFSET);
+ offset += add_ff_dialog_token(tree, tvb, pinfo, offset);
+ offset += add_ff_timing_offset(tree, tvb, pinfo, offset);
+ offset += add_ff_sampling_frequency_offset(tree, tvb, pinfo, offset);
break;
case DMG_ACTION_TPA_RES:
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_DIALOG_TOKEN);
+ offset += add_ff_dialog_token(tree, tvb, pinfo, offset);
break;
case DMG_ACTION_TPA_REP:
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_STATUS_CODE);
+ offset += add_ff_status_code(tree, tvb, pinfo, offset);
break;
case DMG_ACTION_ROC_REQ:
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_DIALOG_TOKEN);
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_RELAY_OPERATION_TYPE);
+ offset += add_ff_dialog_token(tree, tvb, pinfo, offset);
+ offset += add_ff_relay_operation_type(tree, tvb, pinfo, offset);
break;
case DMG_ACTION_ROC_RES:
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_DIALOG_TOKEN);
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_STATUS_CODE);
+ offset += add_ff_dialog_token(tree, tvb, pinfo, offset);
+ offset += add_ff_status_code(tree, tvb, pinfo, offset);
break;
}
return offset - start;
@@ -9459,164 +9341,11 @@ add_ff_action(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset)
case CAT_VENDOR_SPECIFIC: /* Vendor Specific Protected Category - 127 */
return add_ff_action_vendor_specific(tree, tvb, pinfo, offset);
default:
- add_fixed_field(tree, tvb, pinfo, offset, FIELD_CATEGORY_CODE);
+ add_ff_category_code(tree, tvb, pinfo, offset);
return 1;
}
}
-static guint
-add_ff_bss_transition_status_code(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
-{
- proto_tree_add_item(tree, hf_ieee80211_ff_bss_transition_status_code, tvb, offset, 1,
- ENC_LITTLE_ENDIAN);
- return 1;
-}
-
-static guint
-add_ff_bss_termination_delay(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, int offset)
-{
- proto_tree_add_item(tree, hf_ieee80211_ff_bss_termination_delay, tvb, offset, 1,
- ENC_LITTLE_ENDIAN);
- return 1;
-}
-
-#define FF_FIELD(f, func) { FIELD_ ## f, add_ff_ ## func }
-
-static const struct ieee80211_fixed_field_dissector ff_dissectors[] = {
- FF_FIELD(TIMESTAMP , timestamp),
- FF_FIELD(BEACON_INTERVAL , beacon_interval),
- FF_FIELD(CAP_INFO , cap_info),
- FF_FIELD(AUTH_ALG , auth_alg),
- FF_FIELD(AUTH_TRANS_SEQ , auth_trans_seq),
- FF_FIELD(CURRENT_AP_ADDR , current_ap_addr),
- FF_FIELD(LISTEN_IVAL , listen_ival),
- FF_FIELD(REASON_CODE , reason_code),
- FF_FIELD(ASSOC_ID , assoc_id),
- FF_FIELD(STATUS_CODE , status_code),
- FF_FIELD(CATEGORY_CODE , category_code),
- FF_FIELD(ACTION_CODE , action_code),
- FF_FIELD(DIALOG_TOKEN , dialog_token),
- FF_FIELD(FOLLOWUP_DIALOG_TOKEN , followup_dialog_token),
- FF_FIELD(WME_ACTION_CODE , wme_action_code),
- FF_FIELD(WME_STATUS_CODE , wme_status_code),
- FF_FIELD(QOS_ACTION_CODE , qos_action_code),
- FF_FIELD(BLOCK_ACK_ACTION_CODE , block_ack_action_code),
- FF_FIELD(BLOCK_ACK_PARAM , block_ack_param),
- FF_FIELD(BLOCK_ACK_TIMEOUT , block_ack_timeout),
- FF_FIELD(BLOCK_ACK_SSC , block_ack_ssc),
- FF_FIELD(QOS_TS_INFO , qos_ts_info),
- FF_FIELD(MESH_ACTION , mesh_action),
- FF_FIELD(MULTIHOP_ACTION , multihop_action),
- FF_FIELD(MESH_CONTROL , mesh_control),
- FF_FIELD(SELFPROT_ACTION , selfprot_action),
- FF_FIELD(DLS_ACTION_CODE , dls_action_code),
- FF_FIELD(DST_MAC_ADDR , dst_mac_addr),
- FF_FIELD(SRC_MAC_ADDR , src_mac_addr),
- FF_FIELD(DLS_TIMEOUT , dls_timeout),
- FF_FIELD(DELBA_PARAM_SET , delba_param_set),
- FF_FIELD(MAX_REG_PWR , max_reg_pwr),
- FF_FIELD(MEASUREMENT_PILOT_INT , measurement_pilot_int),
- FF_FIELD(COUNTRY_STR , country_str),
- FF_FIELD(MAX_TX_PWR , max_tx_pwr),
- FF_FIELD(TX_PWR_USED , tx_pwr_used),
- FF_FIELD(TRANSCEIVER_NOISE_FLOOR , transceiver_noise_floor),
- FF_FIELD(CHANNEL_WIDTH , channel_width),
- FF_FIELD(QOS_INFO_AP , qos_info_ap),
- FF_FIELD(QOS_INFO_STA , qos_info_sta),
- FF_FIELD(SM_PWR_CNTRL , sm_pwr_cntrl),
- FF_FIELD(PCO_PHASE_CNTRL , pco_phase_cntrl),
- FF_FIELD(PSMP_PARAM_SET , psmp_param_set),
- FF_FIELD(MIMO_CNTRL , mimo_cntrl),
- FF_FIELD(ANT_SELECTION , ant_selection),
- FF_FIELD(EXTENDED_CHANNEL_SWITCH_ANNOUNCEMENT , extended_channel_switch_announcement) ,
- FF_FIELD(HT_INFORMATION , ht_information),
- FF_FIELD(HT_ACTION_CODE , ht_action_code),
- FF_FIELD(PSMP_STA_INFO , psmp_sta_info),
- FF_FIELD(SCHEDULE_INFO , schedule_info),
- FF_FIELD(PA_ACTION_CODE , pa_action_code),
- FF_FIELD(PPA_ACTION_CODE , ppa_action_code),
- FF_FIELD(ACTION , action),
- FF_FIELD(FT_ACTION_CODE , ft_action_code),
- FF_FIELD(STA_ADDRESS , sta_address),
- FF_FIELD(TARGET_AP_ADDRESS , target_ap_address),
- FF_FIELD(GAS_COMEBACK_DELAY , gas_comeback_delay),
- FF_FIELD(GAS_FRAGMENT_ID , gas_fragment_id),
- FF_FIELD(SA_QUERY_ACTION_CODE , sa_query_action_code),
- FF_FIELD(TRANSACTION_ID , transaction_id),
- FF_FIELD(TDLS_ACTION_CODE , tdls_action_code),
- FF_FIELD(TARGET_CHANNEL , target_channel),
- FF_FIELD(OPERATING_CLASS , operating_class),
- FF_FIELD(WNM_ACTION_CODE , wnm_action_code),
- FF_FIELD(UNPROTECTED_WNM_ACTION_CODE , unprotected_wnm_action_code),
- FF_FIELD(KEY_DATA_LENGTH , key_data_length),
- FF_FIELD(WNM_NOTIFICATION_TYPE , wnm_notification_type),
- FF_FIELD(RM_ACTION_CODE , rm_action_code),
- FF_FIELD(RM_DIALOG_TOKEN , rm_dialog_token),
- FF_FIELD(RM_REPETITIONS , rm_repetitions),
- FF_FIELD(RM_TX_POWER , rm_tx_power),
- FF_FIELD(RM_MAX_TX_POWER , rm_max_tx_power),
- FF_FIELD(RM_TPC_REPORT , rm_tpc_report),
- FF_FIELD(RM_RX_ANTENNA_ID , rm_rx_antenna_id),
- FF_FIELD(RM_TX_ANTENNA_ID , rm_tx_antenna_id),
- FF_FIELD(RM_RCPI , rm_rcpi),
- FF_FIELD(RM_RSNI , rm_rsni),
- FF_FIELD(RELAY_CAPABLE_STA_INFO , relay_capable_sta_info),
- FF_FIELD(BAND_ID , band_id),
- FF_FIELD(DMG_PARAMETERS , dmg_params),
- FF_FIELD(SECTOR_SWEEP , sector_sweep),
- FF_FIELD(DYNAMIC_ALLOCATION , dynamic_allocation),
- FF_FIELD(SECTOR_SWEEP_FB , sector_sweep_feedback),
- FF_FIELD(BRP_REQ , BRP_request),
- FF_FIELD(BEAMFORMED_LINK_MAINTAINCE , beamformed_link),
- FF_FIELD(BEAMFORMING_CTRL , beamforming_ctrl),
- FF_FIELD(BEACON_INTERVAL_CTRL , beacon_interval_ctrl),
- FF_FIELD(DMG_ACTION_CODE , dmg_action_code),
- FF_FIELD(DMG_PWR_MGMT , dmg_pwr_mgmt),
- FF_FIELD(REQ_AP_ADDR , req_ap_addr),
- FF_FIELD(RES_AP_ADDR , res_ap_addr),
- FF_FIELD(CHECK_BEACON , check_beacon),
- FF_FIELD(TOD , tod),
- FF_FIELD(TOA , toa),
- FF_FIELD(MAX_TOD_ERR , max_tod_err),
- FF_FIELD(MAX_TOA_ERR , max_toa_err),
- FF_FIELD(SUBJECT_ADDRESS , subject_address),
- FF_FIELD(HANDOVER_REASON , handover_reason),
- FF_FIELD(HANDOVER_REMAINING_BI , handover_remaining_bi),
- FF_FIELD(HANDOVER_RESULT , handover_result),
- FF_FIELD(HANDOVER_REJECT_REASON , handover_reject_reason),
- FF_FIELD(DESTINATION_REDS_AID , destination_reds_aid),
- FF_FIELD(DESTINATION_AID , destination_aid),
- FF_FIELD(REALY_AID , realy_aid),
- FF_FIELD(SOURCE_AID , source_aid),
- FF_FIELD(TIMING_OFFSET , timing_offset),
- FF_FIELD(SAMPLING_FREQUENCY_OFFSET , sampling_frequency_offset),
- FF_FIELD(RELAY_OPERATION_TYPE , relay_operation_type),
- FF_FIELD(UNPROTECTED_DMG_ACTION_CODE , unprotected_dmg_action_code),
- FF_FIELD(FST_ACTION_CODE , fst_action_code),
- FF_FIELD(LLT , llt),
- FF_FIELD(FSTS_ID , fsts_id),
- FF_FIELD(OCT_MMPDU , oct_mmpdu),
- FF_FIELD(VHT_ACTION , vht_action),
- FF_FIELD(BSS_TERMINATION_DELAY , bss_termination_delay),
- FF_FIELD(BSS_TRANSITION_STATUS_CODE , bss_transition_status_code),
- { (enum fixed_field)-1 , NULL }
-};
-
-#undef FF_FIELD
-
-static guint
-add_fixed_field(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset,
- enum fixed_field lfcode)
-{
- int i;
- for (i = 0; ff_dissectors[i].dissector; i++) {
- if (ff_dissectors[i].lfcode == lfcode) {
- return ff_dissectors[i].dissector(tree, tvb, pinfo, offset);
- }
- }
- return 0;
-}
-
static const value_string ieee80211_rsn_cipher_vals[] = {
{0, "NONE"},
{1, "WEP (40-bit)"},
@@ -10760,7 +10489,7 @@ dissect_qos_capability(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int
case MGT_REASSOC_REQ:
{
/* To AP so decode Qos Info as STA */
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_QOS_INFO_STA);
+ offset += add_ff_qos_info_sta(tree, tvb, pinfo, offset);
break;
}
@@ -10770,7 +10499,7 @@ dissect_qos_capability(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int
case MGT_REASSOC_RESP:
{
/* From AP so decode QoS Info as AP */
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_QOS_INFO_AP);
+ offset += add_ff_qos_info_ap(tree, tvb, pinfo, offset);
break;
}
@@ -14147,7 +13876,7 @@ add_tagged_field(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset
#if 0 /* ToDo */
case TAG_EDCA_PARAM_SET: /* 8.4.2.31 in 802-11-2012 */
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_QOS_INFO_AP);
+ offset += add_ff_qos_info_ap(tree, tvb, pinfo, offset);
offset += 1; /* reserved */
offset += 4; /* AC_BE */
offset += 4; /* AC_BK */
@@ -14169,7 +13898,7 @@ add_tagged_field(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset
}
offset += 2;
- add_fixed_field(tree, tvb, pinfo, offset, FIELD_QOS_TS_INFO);
+ add_ff_qos_ts_info(tree, tvb, pinfo, offset);
offset += 3;
proto_tree_add_item(tree, hf_ieee80211_tspec_nor_msdu, tvb, offset, 2, ENC_LITTLE_ENDIAN);
@@ -14369,7 +14098,7 @@ add_tagged_field(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset
}
offset += 2;
- add_fixed_field(tree, tvb, pinfo, offset, FIELD_SCHEDULE_INFO);
+ add_ff_schedule_info(tree, tvb, pinfo, offset);
offset += 2;
proto_tree_add_item(tree, hf_ieee80211_sched_srv_start, tvb, offset, 4, ENC_LITTLE_ENDIAN);
@@ -15006,9 +14735,9 @@ add_tagged_field(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset
rep_tree = proto_tree_add_subtree(sub_tree, tvb, offset, sub_length, ett_tag_measure_reported_frame_tree, NULL, "Reported Frame Body");
- add_fixed_field(rep_tree, tvb, pinfo, 0, FIELD_TIMESTAMP);
- add_fixed_field(rep_tree, tvb, pinfo, 8, FIELD_BEACON_INTERVAL);
- add_fixed_field(rep_tree, tvb, pinfo, 10, FIELD_CAP_INFO);
+ add_ff_timestamp(rep_tree, tvb, pinfo, 0);
+ add_ff_beacon_interval(rep_tree, tvb, pinfo, 8);
+ add_ff_cap_info(rep_tree, tvb, pinfo, 10);
offset += 12;
ieee_80211_add_tagged_parameters (tvb, offset, pinfo, rep_tree, sub_length - 12, MGT_PROBE_RESP);
@@ -15483,7 +15212,7 @@ add_tagged_field(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset
proto_tree_add_item (tree, hf_ieee80211_mesh_peering_peer_link_id, tvb, offset, 2, ENC_LITTLE_ENDIAN);
offset += 2;
}
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_REASON_CODE);
+ offset += add_ff_reason_code(tree, tvb, pinfo, offset);
break;
/* unexpected values */
@@ -15640,7 +15369,7 @@ add_tagged_field(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset
proto_tree_add_item (tree, hf_ieee80211_ff_hwmp_targ_ext, tvb, offset, 6, ENC_NA);
offset += 6;
}
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_REASON_CODE);
+ offset += add_ff_reason_code(tree, tvb, pinfo, offset);
}
break;
}
@@ -15725,7 +15454,7 @@ add_tagged_field(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset
offset += 2;
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_EXTENDED_CHANNEL_SWITCH_ANNOUNCEMENT);
+ offset += add_ff_extended_channel_switch_announcement(tree, tvb, pinfo, offset);
break;
}
@@ -15905,7 +15634,7 @@ add_tagged_field(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset
proto_tree_add_item(alloc_tree, hf_ieee80211_tag_pcp_active, tvb, offset, 2, ENC_LITTLE_ENDIAN);
proto_tree_add_item(alloc_tree, hf_ieee80211_tag_lp_sc_used, tvb, offset, 2, ENC_LITTLE_ENDIAN);
offset += 2;
- offset += add_fixed_field(alloc_tree, tvb, pinfo, offset, FIELD_BEAMFORMING_CTRL);
+ offset += add_ff_beamforming_ctrl(alloc_tree, tvb, pinfo, offset);
proto_tree_add_item(alloc_tree, hf_ieee80211_tag_src_aid, tvb, offset, 1, ENC_NA);
offset += 1;
proto_tree_add_item(alloc_tree, hf_ieee80211_tag_dest_aid, tvb, offset, 1, ENC_NA);
@@ -16115,7 +15844,7 @@ add_tagged_field(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset
offset += 3;
isGrant = ((ftype==CTRL_GRANT)||(ftype==CTRL_GRANT_ACK));
p_add_proto_data(wmem_file_scope(), pinfo, proto_wlan, IS_CTRL_GRANT_OR_GRANT_ACK_KEY, &isGrant);
- offset += add_fixed_field(tree, tvb, pinfo, 2, FIELD_BEAMFORMING_CTRL);
+ offset += add_ff_beamforming_ctrl(tree, tvb, pinfo, 2);
proto_tree_add_item(tree, hf_ieee80211_tag_tspec_allocation_period, tvb, offset, 2, ENC_LITTLE_ENDIAN);
offset += 2;
proto_tree_add_item(tree, hf_ieee80211_tag_tspec_min_allocation, tvb, offset, 2, ENC_LITTLE_ENDIAN);
@@ -16205,14 +15934,14 @@ add_tagged_field(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset
proto_tree_add_item(tree, hf_ieee80211_tag_multi_band_ctrl_addr_present, tvb, offset, 1, ENC_NA);
proto_tree_add_item(tree, hf_ieee80211_tag_multi_band_ctrl_cipher_present, tvb, offset, 1, ENC_NA);
offset += 1;
- offset += add_fixed_field(tree, tvb, pinfo, 1, FIELD_BAND_ID);
+ offset += add_ff_band_id(tree, tvb, pinfo, 1);
proto_tree_add_item(tree, hf_ieee80211_tag_multi_band_oper_class, tvb, offset, 1, ENC_NA);
offset += 1;
proto_tree_add_item(tree, hf_ieee80211_tag_multi_band_channel_number, tvb, offset, 1, ENC_NA);
offset += 1;
proto_tree_add_item(tree, hf_ieee80211_tag_bssid, tvb, offset, 6, ENC_NA);
offset += 6;
- offset += add_fixed_field(tree, tvb, pinfo, 2, FIELD_BEACON_INTERVAL);
+ offset += add_ff_beacon_interval(tree, tvb, pinfo, 2);
proto_tree_add_item(tree, hf_ieee80211_tag_multi_band_tsf_offset, tvb, offset, 8, ENC_LITTLE_ENDIAN);
offset += 8;
proto_tree_add_item(tree, hf_ieee80211_tag_multi_band_conn_ap, tvb, offset, 1, ENC_NA);
@@ -16309,8 +16038,8 @@ add_tagged_field(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset
break;
}
offset += 2;
- offset += add_fixed_field(tree, tvb, pinfo, 1, FIELD_BAND_ID);
- offset += add_fixed_field(tree, tvb, pinfo, 1, FIELD_BAND_ID);
+ offset += add_ff_band_id(tree, tvb, pinfo, 1);
+ offset += add_ff_band_id(tree, tvb, pinfo, 1);
proto_tree_add_item(tree, hf_ieee80211_tag_switching_stream_non_qos, tvb, offset, 1, ENC_NA);
offset += 1;
param_num = tvb_get_letohs(tvb, offset);
@@ -16395,8 +16124,8 @@ dissect_ieee80211_mgt (guint16 fcf, tvbuff_t *tvb, packet_info *pinfo, proto_tre
case MGT_ASSOC_REQ:
fixed_tree = get_fixed_parameter_tree (mgt_tree, tvb, 0, 4);
- add_fixed_field(fixed_tree, tvb, pinfo, 0, FIELD_CAP_INFO);
- add_fixed_field(fixed_tree, tvb, pinfo, 2, FIELD_LISTEN_IVAL);
+ add_ff_cap_info(fixed_tree, tvb, pinfo, 0);
+ add_ff_listen_ival(fixed_tree, tvb, pinfo, 2);
offset = 4; /* Size of fixed fields */
tagged_parameter_tree_len =
@@ -16410,9 +16139,9 @@ dissect_ieee80211_mgt (guint16 fcf, tvbuff_t *tvb, packet_info *pinfo, proto_tre
case MGT_ASSOC_RESP:
fixed_tree = get_fixed_parameter_tree (mgt_tree, tvb, 0, 6);
- add_fixed_field(fixed_tree, tvb, pinfo, 0, FIELD_CAP_INFO);
- add_fixed_field(fixed_tree, tvb, pinfo, 2, FIELD_STATUS_CODE);
- add_fixed_field(fixed_tree, tvb, pinfo, 4, FIELD_ASSOC_ID);
+ add_ff_cap_info(fixed_tree, tvb, pinfo, 0);
+ add_ff_status_code(fixed_tree, tvb, pinfo, 2);
+ add_ff_assoc_id(fixed_tree, tvb, pinfo, 4);
offset = 6; /* Size of fixed fields */
tagged_parameter_tree_len =
@@ -16426,9 +16155,9 @@ dissect_ieee80211_mgt (guint16 fcf, tvbuff_t *tvb, packet_info *pinfo, proto_tre
case MGT_REASSOC_REQ:
fixed_tree = get_fixed_parameter_tree (mgt_tree, tvb, 0, 10);
- add_fixed_field(fixed_tree, tvb, pinfo, 0, FIELD_CAP_INFO);
- add_fixed_field(fixed_tree, tvb, pinfo, 2, FIELD_LISTEN_IVAL);
- add_fixed_field(fixed_tree, tvb, pinfo, 4, FIELD_CURRENT_AP_ADDR);
+ add_ff_cap_info(fixed_tree, tvb, pinfo, 0);
+ add_ff_listen_ival(fixed_tree, tvb, pinfo, 2);
+ add_ff_current_ap_addr(fixed_tree, tvb, pinfo, 4);
offset = 10; /* Size of fixed fields */
tagged_parameter_tree_len =
@@ -16441,9 +16170,9 @@ dissect_ieee80211_mgt (guint16 fcf, tvbuff_t *tvb, packet_info *pinfo, proto_tre
case MGT_REASSOC_RESP:
fixed_tree = get_fixed_parameter_tree (mgt_tree, tvb, 0, 6);
- add_fixed_field(fixed_tree, tvb, pinfo, 0, FIELD_CAP_INFO);
- add_fixed_field(fixed_tree, tvb, pinfo, 2, FIELD_STATUS_CODE);
- add_fixed_field(fixed_tree, tvb, pinfo, 4, FIELD_ASSOC_ID);
+ add_ff_cap_info(fixed_tree, tvb, pinfo, 0);
+ add_ff_status_code(fixed_tree, tvb, pinfo, 2);
+ add_ff_assoc_id(fixed_tree, tvb, pinfo, 4);
offset = 6; /* Size of fixed fields */
tagged_parameter_tree_len =
@@ -16468,9 +16197,9 @@ dissect_ieee80211_mgt (guint16 fcf, tvbuff_t *tvb, packet_info *pinfo, proto_tre
case MGT_PROBE_RESP:
{
fixed_tree = get_fixed_parameter_tree (mgt_tree, tvb, 0, 12);
- add_fixed_field(fixed_tree, tvb, pinfo, 0, FIELD_TIMESTAMP);
- add_fixed_field(fixed_tree, tvb, pinfo, 8, FIELD_BEACON_INTERVAL);
- add_fixed_field(fixed_tree, tvb, pinfo, 10, FIELD_CAP_INFO);
+ add_ff_timestamp(fixed_tree, tvb, pinfo, 0);
+ add_ff_beacon_interval(fixed_tree, tvb, pinfo, 8);
+ add_ff_cap_info(fixed_tree, tvb, pinfo, 10);
offset = 12; /* Size of fixed fields */
tagged_parameter_tree_len = tvb_reported_length_remaining(tvb, offset);
@@ -16481,15 +16210,15 @@ dissect_ieee80211_mgt (guint16 fcf, tvbuff_t *tvb, packet_info *pinfo, proto_tre
case MGT_MEASUREMENT_PILOT:
{
fixed_tree = get_fixed_parameter_tree (mgt_tree, tvb, 0, 12);
- offset += add_fixed_field(fixed_tree, tvb, pinfo, offset, FIELD_TIMESTAMP);
- offset += add_fixed_field(fixed_tree, tvb, pinfo, offset, FIELD_MEASUREMENT_PILOT_INT);
- offset += add_fixed_field(fixed_tree, tvb, pinfo, offset, FIELD_BEACON_INTERVAL);
- offset += add_fixed_field(fixed_tree, tvb, pinfo, offset, FIELD_CAP_INFO);
- offset += add_fixed_field(fixed_tree, tvb, pinfo, offset, FIELD_COUNTRY_STR);
- offset += add_fixed_field(fixed_tree, tvb, pinfo, offset, FIELD_MAX_REG_PWR);
- offset += add_fixed_field(fixed_tree, tvb, pinfo, offset, FIELD_MAX_TX_PWR);
- offset += add_fixed_field(fixed_tree, tvb, pinfo, offset, FIELD_TX_PWR_USED);
- offset += add_fixed_field(fixed_tree, tvb, pinfo, offset, FIELD_TRANSCEIVER_NOISE_FLOOR);
+ offset += add_ff_timestamp(fixed_tree, tvb, pinfo, offset);
+ offset += add_ff_measurement_pilot_int(fixed_tree, tvb, pinfo, offset);
+ offset += add_ff_beacon_interval(fixed_tree, tvb, pinfo, offset);
+ offset += add_ff_cap_info(fixed_tree, tvb, pinfo, offset);
+ offset += add_ff_country_str(fixed_tree, tvb, pinfo, offset);
+ offset += add_ff_max_reg_pwr(fixed_tree, tvb, pinfo, offset);
+ offset += add_ff_max_tx_pwr(fixed_tree, tvb, pinfo, offset);
+ offset += add_ff_tx_pwr_used(fixed_tree, tvb, pinfo, offset);
+ offset += add_ff_transceiver_noise_floor(fixed_tree, tvb, pinfo, offset);
/* TODO DS Parameter Set ??? */
tagged_parameter_tree_len = tvb_reported_length_remaining(tvb, offset);
@@ -16499,9 +16228,9 @@ dissect_ieee80211_mgt (guint16 fcf, tvbuff_t *tvb, packet_info *pinfo, proto_tre
}
case MGT_BEACON: /* Dissect protocol payload fields */
fixed_tree = get_fixed_parameter_tree (mgt_tree, tvb, 0, 12);
- add_fixed_field(fixed_tree, tvb, pinfo, 0, FIELD_TIMESTAMP);
- add_fixed_field(fixed_tree, tvb, pinfo, 8, FIELD_BEACON_INTERVAL);
- add_fixed_field(fixed_tree, tvb, pinfo, 10, FIELD_CAP_INFO);
+ add_ff_timestamp(fixed_tree, tvb, pinfo, 0);
+ add_ff_beacon_interval(fixed_tree, tvb, pinfo, 8);
+ add_ff_cap_info(fixed_tree, tvb, pinfo, 10);
offset = 12; /* Size of fixed fields */
tagged_parameter_tree_len =
@@ -16517,7 +16246,7 @@ dissect_ieee80211_mgt (guint16 fcf, tvbuff_t *tvb, packet_info *pinfo, proto_tre
case MGT_DISASS:
fixed_tree = get_fixed_parameter_tree (mgt_tree, tvb, 0, 2);
- add_fixed_field(fixed_tree, tvb, pinfo, 0, FIELD_REASON_CODE);
+ add_ff_reason_code(fixed_tree, tvb, pinfo, 0);
offset = 2; /* Size of fixed fields */
tagged_parameter_tree_len = tvb_reported_length_remaining(tvb, offset);
if (tagged_parameter_tree_len > 0) {
@@ -16530,9 +16259,9 @@ dissect_ieee80211_mgt (guint16 fcf, tvbuff_t *tvb, packet_info *pinfo, proto_tre
case MGT_AUTHENTICATION:
fixed_tree = get_fixed_parameter_tree (mgt_tree, tvb, 0, 6);
- add_fixed_field(fixed_tree, tvb, pinfo, 0, FIELD_AUTH_ALG);
- add_fixed_field(fixed_tree, tvb, pinfo, 2, FIELD_AUTH_TRANS_SEQ);
- add_fixed_field(fixed_tree, tvb, pinfo, 4, FIELD_STATUS_CODE);
+ add_ff_auth_alg(fixed_tree, tvb, pinfo, 0);
+ add_ff_auth_trans_seq(fixed_tree, tvb, pinfo, 2);
+ add_ff_status_code(fixed_tree, tvb, pinfo, 4);
offset = 6; /* Size of fixed fields */
tagged_parameter_tree_len =
@@ -16550,7 +16279,7 @@ dissect_ieee80211_mgt (guint16 fcf, tvbuff_t *tvb, packet_info *pinfo, proto_tre
case MGT_DEAUTHENTICATION:
fixed_tree = get_fixed_parameter_tree (mgt_tree, tvb, 0, 2);
- add_fixed_field(fixed_tree, tvb, pinfo, 0, FIELD_REASON_CODE);
+ add_ff_reason_code(fixed_tree, tvb, pinfo, 0);
offset = 2; /* Size of fixed fields */
tagged_parameter_tree_len = tvb_reported_length_remaining(tvb, offset);
if (tagged_parameter_tree_len > 0) {
@@ -16566,7 +16295,7 @@ dissect_ieee80211_mgt (guint16 fcf, tvbuff_t *tvb, packet_info *pinfo, proto_tre
proto_item *lcl_fixed_hdr;
proto_tree *lcl_fixed_tree;
lcl_fixed_tree = proto_tree_add_subtree(mgt_tree, tvb, 0, 0, ett_fixed_parameters, &lcl_fixed_hdr, "Fixed parameters");
- offset += add_fixed_field(lcl_fixed_tree, tvb, pinfo, 0, FIELD_ACTION);
+ offset += add_ff_action(lcl_fixed_tree, tvb, pinfo, 0);
proto_item_set_len(lcl_fixed_hdr, offset);
if (ieee80211_tvb_invalid)
@@ -16587,7 +16316,7 @@ dissect_ieee80211_mgt (guint16 fcf, tvbuff_t *tvb, packet_info *pinfo, proto_tre
proto_tree *lcl_fixed_tree;
lcl_fixed_tree = proto_tree_add_subtree(mgt_tree, tvb, 0, 0, ett_fixed_parameters, &lcl_fixed_hdr, "Fixed parameters");
- offset += add_fixed_field(lcl_fixed_tree, tvb, pinfo, 0, FIELD_ACTION);
+ offset += add_ff_action(lcl_fixed_tree, tvb, pinfo, 0);
proto_item_set_len(lcl_fixed_hdr, offset);
if (ieee80211_tvb_invalid)
@@ -17341,8 +17070,7 @@ dissect_ieee80211_common (tvbuff_t *tvb, packet_info *pinfo,
hf_ieee80211_block_ack_control_basic_tid_info, tvb, offset, 2, ENC_LITTLE_ENDIAN);
offset += 2;
- /*offset +=*/ add_fixed_field(hdr_tree, tvb, pinfo, offset,
- FIELD_BLOCK_ACK_SSC);
+ /*offset +=*/ add_ff_block_ack_ssc(hdr_tree, tvb, pinfo, offset);
break;
}
case 1: /* Extended Compressesd BlockAckReq */
@@ -17357,8 +17085,7 @@ dissect_ieee80211_common (tvbuff_t *tvb, packet_info *pinfo,
hf_ieee80211_block_ack_control_compressed_tid_info, tvb, offset, 2, ENC_LITTLE_ENDIAN);
offset += 2;
- /*offset +=*/ add_fixed_field(hdr_tree, tvb, pinfo, offset,
- FIELD_BLOCK_ACK_SSC);
+ /*offset +=*/ add_ff_block_ack_ssc(hdr_tree, tvb, pinfo, offset);
break;
}
case 3: /* Multi-TID BlockAckReq */
@@ -17386,7 +17113,7 @@ dissect_ieee80211_common (tvbuff_t *tvb, packet_info *pinfo,
proto_tree_add_item(bar_mtid_sub_tree, hf_ieee80211_block_ack_multi_tid_value, tvb, offset, 2, ENC_LITTLE_ENDIAN);
offset += 2;
- offset += add_fixed_field(bar_mtid_sub_tree, tvb, pinfo, offset, FIELD_BLOCK_ACK_SSC);
+ offset += add_ff_block_ack_ssc(bar_mtid_sub_tree, tvb, pinfo, offset);
}
break;
}
@@ -17440,7 +17167,7 @@ dissect_ieee80211_common (tvbuff_t *tvb, packet_info *pinfo,
hf_ieee80211_block_ack_control_basic_tid_info, tvb, offset, 2, ENC_LITTLE_ENDIAN);
offset += 2;
- offset += add_fixed_field(hdr_tree, tvb, pinfo, offset, FIELD_BLOCK_ACK_SSC);
+ offset += add_ff_block_ack_ssc(hdr_tree, tvb, pinfo, offset);
proto_tree_add_item(hdr_tree, hf_ieee80211_block_ack_bitmap, tvb, offset, 128, ENC_NA);
/*offset += 128;*/
break;
@@ -17463,7 +17190,7 @@ dissect_ieee80211_common (tvbuff_t *tvb, packet_info *pinfo,
ssn = tvb_get_letohs(tvb, offset);
ssn >>= 4;
- offset += add_fixed_field(hdr_tree, tvb, pinfo, offset, FIELD_BLOCK_ACK_SSC);
+ offset += add_ff_block_ack_ssc(hdr_tree, tvb, pinfo, offset);
bmap = tvb_get_letoh64(tvb, offset);
ba_bitmap_item = proto_tree_add_item(hdr_tree, hf_ieee80211_block_ack_bitmap, tvb, offset, 8, ENC_NA);
ba_bitmap_tree = proto_item_add_subtree(ba_bitmap_item, ett_block_ack_bitmap);
@@ -17491,7 +17218,7 @@ dissect_ieee80211_common (tvbuff_t *tvb, packet_info *pinfo,
ssn = tvb_get_letohs(tvb, offset);
ssn >>= 4;
- offset += add_fixed_field(hdr_tree, tvb, pinfo, offset, FIELD_BLOCK_ACK_SSC);
+ offset += add_ff_block_ack_ssc(hdr_tree, tvb, pinfo, offset);
bmap = tvb_get_letoh64(tvb, offset);
ba_bitmap_item = proto_tree_add_item(hdr_tree, hf_ieee80211_block_ack_bitmap, tvb, offset, 8, ENC_NA);
ba_bitmap_tree = proto_item_add_subtree(ba_bitmap_item, ett_block_ack_bitmap);
@@ -17524,7 +17251,7 @@ dissect_ieee80211_common (tvbuff_t *tvb, packet_info *pinfo,
proto_tree_add_item(ba_mtid_sub_tree, hf_ieee80211_block_ack_multi_tid_value, tvb, offset, 2, ENC_LITTLE_ENDIAN);
offset += 2;
- offset += add_fixed_field(ba_mtid_sub_tree, tvb, pinfo, offset, FIELD_BLOCK_ACK_SSC);
+ offset += add_ff_block_ack_ssc(ba_mtid_sub_tree, tvb, pinfo, offset);
proto_tree_add_item(ba_mtid_sub_tree, hf_ieee80211_block_ack_bitmap, tvb, offset, 8, ENC_NA);
offset += 8;
}
@@ -17550,28 +17277,28 @@ dissect_ieee80211_common (tvbuff_t *tvb, packet_info *pinfo,
case CTRL_SPR: {
gboolean isGrant;
if(ctrl_type_subtype != CTRL_GRANT_ACK) {
- offset += add_fixed_field(hdr_tree, tvb, pinfo, offset, FIELD_DYNAMIC_ALLOCATION);
+ offset += add_ff_dynamic_allocation(hdr_tree, tvb, pinfo, offset);
} else { /* CTRL_GRANT_ACK have 5 octets that are reserved thus not shown.*/
offset += 5;
}
/* offset += commented to avoid Clang warnings*/
isGrant = ((ctrl_type_subtype==CTRL_GRANT)||(ctrl_type_subtype==CTRL_GRANT_ACK));
p_add_proto_data(wmem_file_scope(), pinfo, proto_wlan, IS_CTRL_GRANT_OR_GRANT_ACK_KEY, &isGrant);
- add_fixed_field(hdr_tree, tvb, pinfo, offset, FIELD_BEAMFORMING_CTRL);
+ add_ff_beamforming_ctrl(hdr_tree, tvb, pinfo, offset);
break;
}
case CTRL_SSW: {
- offset += add_fixed_field(hdr_tree, tvb, pinfo, offset, FIELD_SECTOR_SWEEP);
+ offset += add_ff_sector_sweep(hdr_tree, tvb, pinfo, offset);
/* offset += commented to avoid Clang warnings*/
- add_fixed_field(hdr_tree, tvb, pinfo, offset, FIELD_SECTOR_SWEEP_FB);
+ add_ff_sector_sweep_feedback(hdr_tree, tvb, pinfo, offset);
break;
}
case CTRL_SSW_ACK:
case CTRL_SSW_FEEDBACK: {
- offset += add_fixed_field(hdr_tree, tvb, pinfo, offset, FIELD_SECTOR_SWEEP_FB);
- offset += add_fixed_field(hdr_tree, tvb, pinfo, offset, FIELD_BRP_REQ);
+ offset += add_ff_sector_sweep_feedback(hdr_tree, tvb, pinfo, offset);
+ offset += add_ff_BRP_request(hdr_tree, tvb, pinfo, offset);
/* offset += commented to avoid Clang warnings*/
- add_fixed_field(hdr_tree, tvb, pinfo, offset, FIELD_BEAMFORMED_LINK_MAINTAINCE);
+ add_ff_beamformed_link(hdr_tree, tvb, pinfo, offset);
break;
}
case CTRL_DMG_DTS: {
@@ -17974,7 +17701,7 @@ dissect_ieee80211_common (tvbuff_t *tvb, packet_info *pinfo,
msh_fields = proto_tree_add_item(hdr_tree, hf_ieee80211_mesh_control_field, tvb, meshoff, meshctl_len, ENC_NA);
msh_tree = proto_item_add_subtree (msh_fields, ett_msh_control);
- add_fixed_field(msh_tree, tvb, pinfo, meshoff, FIELD_MESH_CONTROL);
+ add_ff_mesh_control(msh_tree, tvb, pinfo, meshoff);
}
} /* end of qos control field */
@@ -19143,7 +18870,7 @@ dissect_data_encap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* da
case 2:
col_set_str(pinfo->cinfo, COL_PROTOCOL, "TDLS");
col_clear(pinfo->cinfo, COL_INFO);
- offset += add_fixed_field(tree, tvb, pinfo, offset, FIELD_ACTION);
+ offset += add_ff_action(tree, tvb, pinfo, offset);
tagged_parameter_tree_len = tvb_reported_length_remaining(tvb, offset);
if (tagged_parameter_tree_len > 0) {
tagged_tree = get_tagged_parameter_tree(tree, tvb, offset,