From 1a29958d1ff3d628f09af7350189b4830ae25a95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Deronne?= Date: Sat, 6 Nov 2021 15:35:28 +0100 Subject: [PATCH] wifi: Prepare WifiMacHeader for 802.11ad --- src/wifi/model/wifi-mac-header.cc | 14 ++++++++++++++ src/wifi/model/wifi-mac-header.h | 24 ++++++++++++++++++++++++ 2 files changed, 38 insertions(+) diff --git a/src/wifi/model/wifi-mac-header.cc b/src/wifi/model/wifi-mac-header.cc index b60737591..f91503dfb 100644 --- a/src/wifi/model/wifi-mac-header.cc +++ b/src/wifi/model/wifi-mac-header.cc @@ -281,6 +281,8 @@ WifiMacHeader::SetType (WifiMacType type, bool resetToDsFromDs) m_ctrlType = TYPE_DATA; m_ctrlSubtype = 15; break; + default: + break; } if (resetToDsFromDs) { @@ -731,6 +733,12 @@ WifiMacHeader::IsAction (void) const return (GetType () == WIFI_MAC_MGT_ACTION); } +bool +WifiMacHeader::IsActionNoAck () const +{ + return (GetType () == WIFI_MAC_MGT_ACTION_NO_ACK); +} + bool WifiMacHeader::IsMultihopAction (void) const { @@ -791,6 +799,12 @@ WifiMacHeader::IsRetry (void) const return (m_ctrlRetry == 1); } +bool +WifiMacHeader::IsMoreData (void) const +{ + return (m_ctrlMoreData == 1); +} + bool WifiMacHeader::IsMoreFragments (void) const { diff --git a/src/wifi/model/wifi-mac-header.h b/src/wifi/model/wifi-mac-header.h index 1dc13402d..8b8e2086b 100644 --- a/src/wifi/model/wifi-mac-header.h +++ b/src/wifi/model/wifi-mac-header.h @@ -45,6 +45,16 @@ enum WifiMacType WIFI_MAC_CTL_END, WIFI_MAC_CTL_END_ACK, + WIFI_MAC_CTL_DMG_POLL, + WIFI_MAC_CTL_DMG_SPR, + WIFI_MAC_CTL_DMG_GRANT, + WIFI_MAC_CTL_DMG_CTS, + WIFI_MAC_CTL_DMG_DTS, + WIFI_MAC_CTL_DMG_SSW, + WIFI_MAC_CTL_DMG_SSW_FBCK, + WIFI_MAC_CTL_DMG_SSW_ACK, + WIFI_MAC_CTL_DMG_GRANT_ACK, + WIFI_MAC_MGT_BEACON, WIFI_MAC_MGT_ASSOCIATION_REQUEST, WIFI_MAC_MGT_ASSOCIATION_RESPONSE, @@ -74,6 +84,8 @@ enum WifiMacType WIFI_MAC_QOSDATA_NULL, WIFI_MAC_QOSDATA_NULL_CFPOLL, WIFI_MAC_QOSDATA_NULL_CFACK_CFPOLL, + + WIFI_MAC_EXTENSION_DMG_BEACON, }; /** @@ -472,6 +484,12 @@ public: * \return true if the header is an Action header, false otherwise */ bool IsAction (void) const; + /** + * Return true if the header is an Action No Ack header. + * + * \return true if the header is an Action No Ack header, false otherwise + */ + bool IsActionNoAck (void) const; /** * Check if the header is a Multihop action header. * @@ -515,6 +533,12 @@ public: * \return true if the Retry bit is set, false otherwise */ bool IsRetry (void) const; + /** + * Return if the More Data bit is set. + * + * \return true if the More Data bit is set, false otherwise + */ + bool IsMoreData (void) const; /** * Return if the More Fragment bit is set. *