From 296b9cf1fb301672c2e637a62925e08fabebf6a8 Mon Sep 17 00:00:00 2001 From: Richard Sharpe Date: Sat, 22 Aug 2015 09:51:25 -0700 Subject: Add some symbols to wtap.h so that we can correctly support 802.11ad. Currently there are a lot of local hacks in the 802.11ad support and better support can be provided. Also add a structure to track 802.11ad (DMG) specific features in the phdr structure as suggested by Guy Harris. Also, respond to some suggestions by Guy Harris. Change-Id: I8459e3986a134a08ee2e31f0158b8aa5c9b91d86 Signed-off-by: Richard Sharpe Reviewed-on: https://code.wireshark.org/review/10204 Reviewed-by: Guy Harris --- wiretap/wtap.h | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) (limited to 'wiretap') diff --git a/wiretap/wtap.h b/wiretap/wtap.h index 8de0c30898..dad8105cc1 100644 --- a/wiretap/wtap.h +++ b/wiretap/wtap.h @@ -571,6 +571,7 @@ struct p2p_phdr { #define PHDR_802_11_PHY_11G 6 /* 802.11g */ #define PHDR_802_11_PHY_11N 7 /* 802.11n */ #define PHDR_802_11_PHY_11AC 8 /* 802.11ac */ +#define PHDR_802_11_PHY_11AD 9 /* 802.11ad */ /* * PHY-specific information. @@ -737,7 +738,7 @@ struct ieee_802_11ac { }; /* - * Presence flags. + * 802.11ac presence flags. */ #define PHDR_802_11AC_HAS_STBC 0x00000001 /* stbc */ #define PHDR_802_11AC_HAS_TXOP_PS_NOT_ALLOWED 0x00000002 /* txop_ps_not_allowed */ @@ -750,6 +751,30 @@ struct ieee_802_11ac { #define PHDR_802_11AC_HAS_GROUP_ID 0x00000100 /* group_id */ #define PHDR_802_11AC_HAS_PARTIAL_AID 0x00000200 /* partial_aid */ +/* + * 802.11ad. + */ + +/* + * Min and Max frequencies for 802.11ad and a macro for checking for 802.11ad. + */ + +#define PHDR_802_11AD_MIN_FREQUENCY 57000 +#define PHDR_802_11AD_MAX_FREQUENCY 66000 + +#define IS_80211AD(frequency) (((frequency) >= PHDR_802_11AD_MIN_FREQUENCY) &&\ + ((frequency) <= PHDR_802_11AD_MAX_FREQUENCY)) + +struct ieee_802_11ad { + guint32 presence_flags; /* Which of this information is present? */ + guint8 mcs; /* MCS index */ +}; + +/* + * 802.11ad presence flags. + */ +#define PHDR_802_11AD_HAS_MCS_INDEX 0x00000001 /* mcs */ + struct ieee_802_11_phdr { gint fcs_len; /* Number of bytes of FCS - -1 means "unknown" */ gboolean decrypted; /* TRUE if frame is decrypted even if "protected" bit is set */ @@ -762,6 +787,7 @@ struct ieee_802_11_phdr { struct ieee_802_11g info_11g; struct ieee_802_11n info_11n; struct ieee_802_11ac info_11ac; + struct ieee_802_11ad info_11ad; } phy_info; guint32 presence_flags; /* Flags indicating presence of fields below */ guint16 channel; /* Channel number */ -- cgit v1.2.3