aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStig Bjørlykke <stig@bjorlykke.org>2023-03-07 14:48:14 +0100
committerStig Bjørlykke <stig@bjorlykke.org>2023-03-08 07:28:28 +0000
commit6fc17a13036d5f1eac8272e85b3dbd9f5e94f4f2 (patch)
tree455ea8362851719189cc73439ebf9adcd692766d
parent34d3f122d375ce5805c484e62411784e076c0e28 (diff)
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.
-rw-r--r--epan/dissectors/packet-ieee80211.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/epan/dissectors/packet-ieee80211.c b/epan/dissectors/packet-ieee80211.c
index cc6148b24a..4cf514e614 100644
--- a/epan/dissectors/packet-ieee80211.c
+++ b/epan/dissectors/packet-ieee80211.c
@@ -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),