wifi: WifiRemoteStationManager records association refused

This commit is contained in:
Stefano Avallone
2021-07-09 16:39:59 +02:00
committed by Stefano Avallone
parent 181fec14bd
commit 4368777fb1
2 changed files with 32 additions and 1 deletions

View File

@@ -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
{

View File

@@ -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.