ieee80211: Add a field for WLAN Flags

Add the frame control flags string to a new field. This can be
used in a custom column, similar to TCP Flags.
This commit is contained in:
Stig Bjørlykke 2023-03-07 14:48:14 +01:00
parent 34d3f122d3
commit 6fc17a1303
1 changed files with 9 additions and 0 deletions

View File

@ -3616,6 +3616,7 @@ static int hf_ieee80211_fc_frame_extension = -1;
static int hf_ieee80211_fc_frame_type_subtype = -1;
static int hf_ieee80211_fc_flags = -1;
static int hf_ieee80211_fc_flags_str = -1;
static int hf_ieee80211_fc_to_ds = -1;
static int hf_ieee80211_fc_from_ds = -1;
static int hf_ieee80211_fc_data_ds = -1;
@ -33622,6 +33623,7 @@ dissect_ieee80211_pv0(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
gboolean more_frags;
proto_item *ti = NULL;
proto_item *cw_item = NULL;
proto_tree *flags_item;
proto_item *hidden_item;
proto_tree *cw_tree = NULL;
guint16 hdr_len, ohdr_len;
@ -34655,6 +34657,8 @@ dissect_ieee80211_pv0(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
proto_item_append_text(ti, ", Flags: %s", flag_str);
col_append_fstr(pinfo->cinfo, COL_INFO, ", Flags=%s", flag_str);
flags_item = proto_tree_add_string(hdr_tree, hf_ieee80211_fc_flags_str, tvb, 0, 0, flag_str);
proto_item_set_generated(flags_item);
/*
* Only management and data frames have a body, so we don't have
@ -36722,6 +36726,11 @@ proto_register_ieee80211(void)
FT_UINT8, BASE_HEX, NULL, 0,
NULL, HFILL }},
{&hf_ieee80211_fc_flags_str,
{"WLAN Flags", "wlan.flags.str",
FT_STRING, BASE_NONE, NULL, 0,
NULL, HFILL }},
{&hf_ieee80211_fc_data_ds,
{"DS status", "wlan.fc.ds",
FT_UINT8, BASE_HEX, VALS(tofrom_ds), (FLAG_FROM_DS|FLAG_TO_DS),