aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-ieee80211-prism.c
diff options
context:
space:
mode:
authorSimon Barber <simon.barber@meraki.net>2015-12-09 14:26:46 -0800
committerGuy Harris <guy@alum.mit.edu>2015-12-24 07:58:51 +0000
commitffa9e938e24779470c664ea8eca1e452ce025f97 (patch)
tree907bfdf175cdfd1ac3694b2ca9de9ca452f33020 /epan/dissectors/packet-ieee80211-prism.c
parent1ffd4398504d5bc69c322fd64e826fa7eb22ed3b (diff)
Refactor 802.11 radio flags.
The use of a flag field here is aesthetically unpleasing when the flags are referred to frequently. Convert these into bitfield entries. Change-Id: I6f47e31558439dfd343ec7f856d04480366a1237 Reviewed-on: https://code.wireshark.org/review/12511 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'epan/dissectors/packet-ieee80211-prism.c')
-rw-r--r--epan/dissectors/packet-ieee80211-prism.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/epan/dissectors/packet-ieee80211-prism.c b/epan/dissectors/packet-ieee80211-prism.c
index 828b50feba..1122081b04 100644
--- a/epan/dissectors/packet-ieee80211-prism.c
+++ b/epan/dissectors/packet-ieee80211-prism.c
@@ -311,11 +311,11 @@ dissect_prism(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U
}
/* We don't have any 802.11 metadata yet. */
+ memset(&phdr, 0, sizeof(phdr));
phdr.fcs_len = -1;
phdr.decrypted = FALSE;
phdr.datapad = FALSE;
phdr.phy = PHDR_802_11_PHY_UNKNOWN;
- phdr.presence_flags = 0;
col_set_str(pinfo->cinfo, COL_PROTOCOL, "Prism");
col_clear(pinfo->cinfo, COL_INFO);
@@ -383,7 +383,7 @@ dissect_prism(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U
case PRISM_TYPE1_CHANNEL:
case PRISM_TYPE2_CHANNEL:
channel = tvb_get_guint32(tvb, offset, byte_order);
- phdr.presence_flags |= PHDR_802_11_HAS_CHANNEL;
+ phdr.has_channel = TRUE;
phdr.channel = channel;
if(tree){
proto_tree_add_item(prism_did_tree, hf_ieee80211_prism_did_channel, tvb, offset, 4, byte_order);
@@ -428,7 +428,7 @@ dissect_prism(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U
case PRISM_TYPE1_RATE:
case PRISM_TYPE2_RATE:
rate = tvb_get_guint32(tvb, offset, byte_order);
- phdr.presence_flags |= PHDR_802_11_HAS_DATA_RATE;
+ phdr.has_data_rate = TRUE;
phdr.data_rate = rate;
if(tree){
proto_tree_add_item(prism_did_tree, hf_ieee80211_prism_did_rate, tvb, offset, 4, byte_order);