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 /wiretap/snoop.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 'wiretap/snoop.c')
-rw-r--r-- | wiretap/snoop.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/wiretap/snoop.c b/wiretap/snoop.c index 1fcfada8fe..da88bb4c51 100644 --- a/wiretap/snoop.c +++ b/wiretap/snoop.c @@ -738,16 +738,16 @@ snoop_read_shomiti_wireless_pseudoheader(FILE_T fh, if (file_seek(fh, rsize, SEEK_CUR, err) == -1) return FALSE; + memset(&pseudo_header->ieee_802_11, 0, sizeof(pseudo_header->ieee_802_11)); pseudo_header->ieee_802_11.fcs_len = 4; pseudo_header->ieee_802_11.decrypted = FALSE; pseudo_header->ieee_802_11.datapad = FALSE; pseudo_header->ieee_802_11.phy = PHDR_802_11_PHY_UNKNOWN; - pseudo_header->ieee_802_11.presence_flags = - PHDR_802_11_HAS_CHANNEL | - PHDR_802_11_HAS_DATA_RATE | - PHDR_802_11_HAS_SIGNAL_PERCENT; + pseudo_header->ieee_802_11.has_channel = TRUE; pseudo_header->ieee_802_11.channel = whdr.channel; + pseudo_header->ieee_802_11.has_data_rate = TRUE; pseudo_header->ieee_802_11.data_rate = whdr.rate; + pseudo_header->ieee_802_11.has_signal_percent = TRUE; pseudo_header->ieee_802_11.signal_percent = whdr.signal; /* add back the header and don't forget the pad as well */ |