wifi: Add AID to MAC address conversion accessors to ApWifiMac

This commit is contained in:
Rediet
2019-04-10 12:15:00 +02:00
committed by Stefano Avallone
parent 74be3d506d
commit 34de93aed5
2 changed files with 33 additions and 0 deletions

View File

@@ -1456,6 +1456,25 @@ ApWifiMac::GetNextAssociationId (void)
return 0;
}
const std::map<uint16_t, Mac48Address>&
ApWifiMac::GetStaList (void) const
{
return m_staList;
}
uint16_t
ApWifiMac::GetAssociationId (Mac48Address addr) const
{
for (auto & it : m_staList)
{
if (it.second == addr)
{
return it.first;
}
}
return SU_STA_ID;
}
uint8_t
ApWifiMac::GetBufferStatus (uint8_t tid, Mac48Address address) const
{

View File

@@ -108,6 +108,20 @@ public:
*/
int64_t AssignStreams (int64_t stream);
/**
* Get a const reference to the map of associated stations. Each station is
* specified by an (association ID, MAC address) pair. Make sure not to use
* the returned reference after that this object has been deallocated.
*
* \return a const reference to the map of associated stations
*/
const std::map<uint16_t, Mac48Address>& GetStaList (void) const;
/**
* \param addr the address of the associated station
* \return the Association ID allocated by the AP to the station, SU_STA_ID if unallocated
*/
uint16_t GetAssociationId (Mac48Address addr) const;
/**
* Return the value of the Queue Size subfield of the last QoS Data or QoS Null
* frame received from the station with the given MAC address and belonging to