diff options
author | Simon Barber <simon.barber@meraki.net> | 2015-12-09 14:26:46 -0800 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2015-12-24 07:58:51 +0000 |
commit | ffa9e938e24779470c664ea8eca1e452ce025f97 (patch) | |
tree | 907bfdf175cdfd1ac3694b2ca9de9ca452f33020 /epan/dissectors/packet-cisco-wids.c | |
parent | 1ffd4398504d5bc69c322fd64e826fa7eb22ed3b (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-cisco-wids.c')
-rw-r--r-- | epan/dissectors/packet-cisco-wids.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/epan/dissectors/packet-cisco-wids.c b/epan/dissectors/packet-cisco-wids.c index c6e86c9953..90505c383f 100644 --- a/epan/dissectors/packet-cisco-wids.c +++ b/epan/dissectors/packet-cisco-wids.c @@ -90,15 +90,16 @@ dissect_cwids(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U ti = proto_tree_add_item(tree, proto_cwids, tvb, offset, 28, ENC_NA); cwids_tree = proto_item_add_subtree(ti, ett_cwids); + memset(&phdr, 0, sizeof(phdr)); phdr.fcs_len = 0; /* no FCS */ phdr.decrypted = FALSE; phdr.datapad = FALSE; phdr.phy = PHDR_802_11_PHY_UNKNOWN; - phdr.presence_flags = PHDR_802_11_HAS_CHANNEL; proto_tree_add_item(cwids_tree, hf_cwids_version, tvb, offset, 2, ENC_BIG_ENDIAN); offset += 2; proto_tree_add_item(cwids_tree, hf_cwids_unknown1, tvb, offset, 7, ENC_NA); offset += 7; + phdr.has_channel = TRUE; phdr.channel = tvb_get_guint8(tvb, offset); proto_tree_add_item(cwids_tree, hf_cwids_channel, tvb, offset, 1, ENC_BIG_ENDIAN); offset += 1; |