diff --git a/src/wifi/model/wifi-remote-station-manager.cc b/src/wifi/model/wifi-remote-station-manager.cc index 6ed5061ca..4b857aed0 100644 --- a/src/wifi/model/wifi-remote-station-manager.cc +++ b/src/wifi/model/wifi-remote-station-manager.cc @@ -467,6 +467,23 @@ WifiRemoteStationManager::RecordDisassociated (Mac48Address address) LookupState (address)->m_state = WifiRemoteStationState::DISASSOC; } +bool +WifiRemoteStationManager::IsAssocRefused (Mac48Address address) const +{ + if (address.IsGroup ()) + { + return false; + } + return LookupState (address)->m_state == WifiRemoteStationState::ASSOC_REFUSED; +} + +void +WifiRemoteStationManager::RecordAssocRefused (Mac48Address address) +{ + NS_ASSERT (!address.IsGroup ()); + LookupState (address)->m_state = WifiRemoteStationState::ASSOC_REFUSED; +} + uint16_t WifiRemoteStationManager::GetAssociationId (Mac48Address remoteAddress) const { diff --git a/src/wifi/model/wifi-remote-station-manager.h b/src/wifi/model/wifi-remote-station-manager.h index 9bff997e8..9aef03c64 100644 --- a/src/wifi/model/wifi-remote-station-manager.h +++ b/src/wifi/model/wifi-remote-station-manager.h @@ -81,7 +81,8 @@ struct WifiRemoteStationState BRAND_NEW, DISASSOC, WAIT_ASSOC_TX_OK, - GOT_ASSOC_TX_OK + GOT_ASSOC_TX_OK, + ASSOC_REFUSED } m_state; /** @@ -711,6 +712,19 @@ public: * \param address the address of the station */ void RecordDisassociated (Mac48Address address); + /** + * Return whether we refused an association request from the given station + * + * \param address the address of the station + * \return true if we refused an association request, false otherwise + */ + bool IsAssocRefused (Mac48Address address) const; + /** + * Records that association request was refused + * + * \param address the address of the station + */ + void RecordAssocRefused (Mac48Address address); /** * Set the address of the MLD the given station is affiliated with.