wifi: Print ExtendedCapabilities IE and fix issues when used with non-VHT STA

This commit is contained in:
Sébastien Deronne
2018-04-01 10:51:01 +02:00
parent 1ef9c0dd26
commit 6d142d9cd2
4 changed files with 26 additions and 15 deletions

View File

@@ -162,6 +162,9 @@ int main (int argc, char *argv[])
phy.EnablePcap ("SimpleHtHiddenStations_Sta1", staDevices.Get (0));
phy.EnablePcap ("SimpleHtHiddenStations_Sta2", staDevices.Get (1));
AsciiTraceHelper ascii;
phy.EnableAsciiAll (ascii.CreateFileStream ("SimpleHtHiddenStations.tr"));
Simulator::Stop (Seconds (simulationTime + 1));
Simulator::Run ();

View File

@@ -372,21 +372,24 @@ ExtendedCapabilities::DeserializeInformationField (Buffer::Iterator start, uint8
{
Buffer::Iterator i = start;
uint8_t byte1 = i.ReadU8 ();
uint8_t byte2 = i.ReadU8 ();
uint8_t byte3 = i.ReadU8 ();
uint8_t byte4 = i.ReadU8 ();
uint8_t byte5 = i.ReadU8 ();
uint8_t byte6 = i.ReadU8 ();
uint8_t byte7 = i.ReadU8 ();
uint8_t byte8 = i.ReadU8 ();
SetExtendedCapabilitiesByte1 (byte1);
SetExtendedCapabilitiesByte2 (byte2);
SetExtendedCapabilitiesByte3 (byte3);
SetExtendedCapabilitiesByte4 (byte4);
SetExtendedCapabilitiesByte5 (byte5);
SetExtendedCapabilitiesByte6 (byte6);
SetExtendedCapabilitiesByte7 (byte7);
SetExtendedCapabilitiesByte8 (byte8);
if (m_vhtSupported > 0)
{
uint8_t byte2 = i.ReadU8 ();
uint8_t byte3 = i.ReadU8 ();
uint8_t byte4 = i.ReadU8 ();
uint8_t byte5 = i.ReadU8 ();
uint8_t byte6 = i.ReadU8 ();
uint8_t byte7 = i.ReadU8 ();
uint8_t byte8 = i.ReadU8 ();
SetExtendedCapabilitiesByte2 (byte2);
SetExtendedCapabilitiesByte3 (byte3);
SetExtendedCapabilitiesByte4 (byte4);
SetExtendedCapabilitiesByte5 (byte5);
SetExtendedCapabilitiesByte6 (byte6);
SetExtendedCapabilitiesByte7 (byte7);
SetExtendedCapabilitiesByte8 (byte8);
}
return length;
}
@@ -401,6 +404,7 @@ ExtendedCapabilities::DeserializeInformationField (Buffer::Iterator start, uint8
std::ostream &
operator << (std::ostream &os, const ExtendedCapabilities &extendedcapabilities)
{
os << +extendedcapabilities.GetExtendedCapabilitiesByte1 ();
return os;
}

View File

@@ -518,7 +518,6 @@ operator << (std::ostream &os, const HtOperation &htOperation)
<< "|" << bool (htOperation.GetTxRxMcsSetUnequal ())
<< "|" << +htOperation.GetTxMaxNSpatialStreams ()
<< "|" << bool (htOperation.GetTxUnequalModulation ());
return os;
}

View File

@@ -149,6 +149,7 @@ MgtProbeRequestHeader::Print (std::ostream &os) const
{
os << "ssid=" << m_ssid << ", "
<< "rates=" << m_rates << ", "
<< "Extended Capabilities=" << m_extendedCapability << " , "
<< "HT Capabilities=" << m_htCapability << " , "
<< "VHT Capabilities=" << m_vhtCapability << " , "
<< "HE Capabilities=" << m_heCapability;
@@ -416,6 +417,7 @@ MgtProbeResponseHeader::Print (std::ostream &os) const
os << "ssid=" << m_ssid << ", "
<< "rates=" << m_rates << ", "
<< "ERP information=" << m_erpInformation << ", "
<< "Extended Capabilities=" << m_extendedCapability << " , "
<< "HT Capabilities=" << m_htCapability << " , "
<< "HT Operation=" << m_htOperation << " , "
<< "VHT Capabilities=" << m_vhtCapability << " , "
@@ -648,6 +650,7 @@ MgtAssocRequestHeader::Print (std::ostream &os) const
{
os << "ssid=" << m_ssid << ", "
<< "rates=" << m_rates << ", "
<< "Extended Capabilities=" << m_extendedCapability << " , "
<< "HT Capabilities=" << m_htCapability << " , "
<< "VHT Capabilities=" << m_vhtCapability << " , "
<< "HE Capabilities=" << m_heCapability;
@@ -842,6 +845,7 @@ MgtReassocRequestHeader::Print (std::ostream &os) const
os << "current AP address=" << m_currentApAddr << ", "
<< "ssid=" << m_ssid << ", "
<< "rates=" << m_rates << ", "
<< "Extended Capabilities=" << m_extendedCapability << " , "
<< "HT Capabilities=" << m_htCapability << " , "
<< "VHT Capabilities=" << m_vhtCapability << " , "
<< "HE Capabilities=" << m_heCapability;
@@ -1085,6 +1089,7 @@ MgtAssocResponseHeader::Print (std::ostream &os) const
<< "aid=" << m_aid << ", "
<< "rates=" << m_rates << ", "
<< "ERP information=" << m_erpInformation << ", "
<< "Extended Capabilities=" << m_extendedCapability << " , "
<< "HT Capabilities=" << m_htCapability << " , "
<< "HT Operation=" << m_htOperation << " , "
<< "VHT Capabilities=" << m_vhtCapability << " , "