aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2015-07-07 00:39:50 -0700
committerGuy Harris <guy@alum.mit.edu>2015-07-07 07:40:31 +0000
commit53fcaabe66a7a307f231412111f7890b29bcb6d2 (patch)
tree974bf8c981c17daee0e2070b537328e66ac2bab8
parent21754f43e1e7139bcd3d673714c2a191681a63e9 (diff)
Use the NSS provided by the Ixia Veriwave hardware.
It doesn't appear to provide the FEC type, although radiotap does, so add a flag to indicate whether we have that. Change-Id: I298d79bc6b640ee2408c3d70075c32bf331a210c Reviewed-on: https://code.wireshark.org/review/9533 Reviewed-by: Guy Harris <guy@alum.mit.edu>
-rw-r--r--epan/dissectors/packet-ieee80211-radio.c6
-rw-r--r--epan/dissectors/packet-ieee80211-radiotap.c10
-rw-r--r--epan/dissectors/packet-ixveriwave.c26
-rw-r--r--wiretap/wtap.h5
4 files changed, 35 insertions, 12 deletions
diff --git a/epan/dissectors/packet-ieee80211-radio.c b/epan/dissectors/packet-ieee80211-radio.c
index 0b9f404abf..084494ba79 100644
--- a/epan/dissectors/packet-ieee80211-radio.c
+++ b/epan/dissectors/packet-ieee80211-radio.c
@@ -879,8 +879,10 @@ dissect_wlan_radio (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void
proto_tree_add_uint(user_tree, hf_wlan_radio_11ac_nsts, tvb, 0, 0,
nsts);
}
- proto_tree_add_uint(user_tree, hf_wlan_radio_11ac_fec, tvb, 0, 0,
- (phdr->phy_info.info_11ac.fec >> i) & 0x01);
+ if (phdr->phy_info.info_11ac.presence_flags & PHDR_802_11AC_HAS_FEC) {
+ proto_tree_add_uint(user_tree, hf_wlan_radio_11ac_fec, tvb, 0, 0,
+ (phdr->phy_info.info_11ac.fec >> i) & 0x01);
+ }
/*
* If we can calculate the data rate for this user, do so.
diff --git a/epan/dissectors/packet-ieee80211-radiotap.c b/epan/dissectors/packet-ieee80211-radiotap.c
index 0629cab41d..a2c1f7639a 100644
--- a/epan/dissectors/packet-ieee80211-radiotap.c
+++ b/epan/dissectors/packet-ieee80211-radiotap.c
@@ -1659,6 +1659,16 @@ dissect_radiotap(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
phdr.phy_info.info_11ac.nss[i] = nss;
if (nss) {
+ /*
+ * OK, there's some data here.
+ * If we haven't already flagged this
+ * as VHT, do so.
+ */
+ if (phdr.phy != PHDR_802_11_PHY_11AC) {
+ phdr.phy = PHDR_802_11_PHY_11AC;
+ phdr.phy_info.info_11ac.presence_flags = 0;
+ }
+ phdr.phy_info.info_11ac.presence_flags |= PHDR_802_11AC_HAS_FEC;
if (vht_tree) {
it = proto_tree_add_item(vht_tree, hf_radiotap_vht_user,
tvb, offset + 4, 5, ENC_NA);
diff --git a/epan/dissectors/packet-ixveriwave.c b/epan/dissectors/packet-ixveriwave.c
index 04cab895db..d56c936002 100644
--- a/epan/dissectors/packet-ixveriwave.c
+++ b/epan/dissectors/packet-ixveriwave.c
@@ -650,8 +650,9 @@ wlantap_dissect(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_tree
tvbuff_t *next_tvb;
guint length;
gint8 dbm;
+ guint8 plcp_type;
guint8 mcs_index;
- guint8 ness;
+ guint8 nss;
float phyRate;
guint i;
@@ -719,10 +720,11 @@ wlantap_dissect(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_tree
offset +=2;
phyRate = (float)tvb_get_letohs(tvb, offset) / 10;
offset +=2;
- ness = tvb_get_guint8(tvb, offset);
+ plcp_type = tvb_get_guint8(tvb, offset);
offset++;
mcs_index = tvb_get_guint8(tvb, offset);
offset++;
+ nss = tvb_get_guint8(tvb, offset);
offset++;
if ((vw_rflags & FLAGS_CHAN_HT) || (vw_rflags & FLAGS_CHAN_VHT)) {
@@ -733,19 +735,23 @@ wlantap_dissect(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_tree
phdr.phy_info.info_11ac.short_gi = ((vw_rflags & FLAGS_CHAN_SHORTGI) != 0);
/*
* XXX - this probably has only one user, so only one MCS index
- * and only one NSS, but where's the NSS?
+ * and only one NSS.
*/
- for (i = 0; i < 4; i++)
+ phdr.phy_info.info_11ac.nss[0] = nss;
+ phdr.phy_info.info_11ac.mcs[0] = mcs_index;
+ for (i = 1; i < 4; i++)
phdr.phy_info.info_11ac.nss[i] = 0;
} else {
+ /*
+ * XXX - where's the number of extension spatial streams?
+ * The code in wiretap/vwr.c doesn't seem to provide it.
+ */
phdr.phy = PHDR_802_11_PHY_11N;
phdr.phy_info.info_11n.presence_flags =
PHDR_802_11N_HAS_MCS_INDEX |
- PHDR_802_11N_HAS_SHORT_GI |
- PHDR_802_11N_HAS_NESS;
+ PHDR_802_11N_HAS_SHORT_GI;
phdr.phy_info.info_11n.mcs_index = mcs_index;
phdr.phy_info.info_11n.short_gi = ((vw_rflags & FLAGS_CHAN_SHORTGI) != 0);
- phdr.phy_info.info_11n.ness = ness;
}
if (tree) {
proto_tree_add_item(tap_tree, hf_radiotap_mcsindex,
@@ -759,7 +765,11 @@ wlantap_dissect(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_tree
"%.1f (MCS %d)", phyRate, mcs_index);
}
} else {
- /* XXX - CHAN_OFDM could be 11a or 11g */
+ /*
+ * XXX - CHAN_OFDM could be 11a or 11g.
+ *
+ * XXX - use the PLCP type?
+ */
if (vw_chanflags & CHAN_CCK) {
phdr.phy = PHDR_802_11_PHY_11B;
}
diff --git a/wiretap/wtap.h b/wiretap/wtap.h
index 52d7139335..9f9f4871d1 100644
--- a/wiretap/wtap.h
+++ b/wiretap/wtap.h
@@ -745,8 +745,9 @@ struct ieee_802_11ac {
#define PHDR_802_11AC_HAS_LDPC_EXTRA_OFDM_SYMBOL 0x00000010 /* ldpc_extra_ofdm_symbol */
#define PHDR_802_11AC_HAS_BEAMFORMED 0x00000020 /* beamformed */
#define PHDR_802_11AC_HAS_BANDWIDTH 0x00000040 /* bandwidth */
-#define PHDR_802_11AC_HAS_GROUP_ID 0x00000080 /* group_id */
-#define PHDR_802_11AC_HAS_PARTIAL_AID 0x00000100 /* partial_aid */
+#define PHDR_802_11AC_HAS_FEC 0x00000080 /* fec */
+#define PHDR_802_11AC_HAS_GROUP_ID 0x00000100 /* group_id */
+#define PHDR_802_11AC_HAS_PARTIAL_AID 0x00000200 /* partial_aid */
struct ieee_802_11_phdr {
gint fcs_len; /* Number of bytes of FCS - -1 means "unknown" */