#include <wifi-mac-header.h>
Public Member Functions | |
WifiMacHeader () | |
~WifiMacHeader () | |
virtual TypeId | GetInstanceTypeId (void) const |
virtual void | Print (std::ostream &os) const |
virtual uint32_t | GetSerializedSize (void) const |
virtual void | Serialize (Buffer::Iterator start) const |
virtual uint32_t | Deserialize (Buffer::Iterator start) |
void | SetAssocReq (void) |
void | SetAssocResp (void) |
void | SetProbeReq (void) |
void | SetProbeResp (void) |
void | SetBeacon (void) |
void | SetTypeData (void) |
void | SetDsFrom (void) |
void | SetDsNotFrom (void) |
void | SetDsTo (void) |
void | SetDsNotTo (void) |
void | SetAddr1 (Mac48Address address) |
void | SetAddr2 (Mac48Address address) |
void | SetAddr3 (Mac48Address address) |
void | SetAddr4 (Mac48Address address) |
void | SetType (enum WifiMacType_e type) |
void | SetRawDuration (uint16_t duration) |
void | SetDuration (Time duration) |
void | SetId (uint16_t id) |
void | SetSequenceNumber (uint16_t seq) |
void | SetFragmentNumber (uint8_t frag) |
void | SetNoMoreFragments (void) |
void | SetMoreFragments (void) |
void | SetRetry (void) |
void | SetNoRetry (void) |
void | SetQosTid (uint8_t tid) |
void | SetQosTxopLimit (uint8_t txop) |
Mac48Address | GetAddr1 (void) const |
Mac48Address | GetAddr2 (void) const |
Mac48Address | GetAddr3 (void) const |
Mac48Address | GetAddr4 (void) const |
enum WifiMacType_e | GetType (void) const |
bool | IsFromDs (void) const |
bool | IsToDs (void) const |
bool | IsData (void) const |
bool | IsQosData (void) const |
bool | IsCtl (void) const |
bool | IsMgt (void) const |
bool | IsCfpoll (void) const |
bool | IsRts (void) const |
bool | IsCts (void) const |
bool | IsAck (void) const |
bool | IsAssocReq (void) const |
bool | IsAssocResp (void) const |
bool | IsReassocReq (void) const |
bool | IsReassocResp (void) const |
bool | IsProbeReq (void) const |
bool | IsProbeResp (void) const |
bool | IsBeacon (void) const |
bool | IsDisassociation (void) const |
bool | IsAuthentication (void) const |
bool | IsDeauthentication (void) const |
uint16_t | GetRawDuration (void) const |
Time | GetDuration (void) const |
uint16_t | GetSequenceControl (void) const |
uint16_t | GetSequenceNumber (void) const |
uint16_t | GetFragmentNumber (void) const |
bool | IsRetry (void) const |
bool | IsMoreFragments (void) const |
bool | IsQosBlockAck (void) const |
bool | IsQosNoAck (void) const |
bool | IsQosAck (void) const |
uint8_t | GetQosTid (void) const |
uint8_t | GetQosTxopLimit (void) const |
uint32_t | GetSize (void) const |
char const * | GetTypeString (void) const |
Static Public Member Functions | |
static TypeId | GetTypeId (void) |
This method returns the TypeId associated to ns3::WifiMacHeader. | |
Private Member Functions | |
uint16_t | GetFrameControl (void) const |
uint16_t | GetQosControl (void) const |
void | SetFrameControl (uint16_t control) |
void | SetSequenceControl (uint16_t seq) |
void | SetQosControl (uint16_t qos) |
void | PrintFrameControl (std::ostream &os) const |
Private Attributes | |
uint8_t | m_ctrlType |
uint8_t | m_ctrlSubtype |
uint8_t | m_ctrlToDs |
uint8_t | m_ctrlFromDs |
uint8_t | m_ctrlMoreFrag |
uint8_t | m_ctrlRetry |
uint8_t | m_ctrlPwrMgt |
uint8_t | m_ctrlMoreData |
uint8_t | m_ctrlWep |
uint8_t | m_ctrlOrder |
uint16_t | m_duration |
Mac48Address | m_addr1 |
Mac48Address | m_addr2 |
Mac48Address | m_addr3 |
uint8_t | m_seqFrag |
uint16_t | m_seqSeq |
Mac48Address | m_addr4 |
uint8_t | m_qosTid |
uint8_t | m_qosEosp |
uint8_t | m_qosAckPolicy |
uint16_t | m_qosStuff |
Definition at line 65 of file wifi-mac-header.h.
ns3::WifiMacHeader::WifiMacHeader | ( | ) |
Definition at line 42 of file wifi-mac-header.cc.
ns3::WifiMacHeader::~WifiMacHeader | ( | ) |
Definition at line 48 of file wifi-mac-header.cc.
uint32_t ns3::WifiMacHeader::Deserialize | ( | Buffer::Iterator | start | ) | [virtual] |
start | an iterator which points to where the header should written. |
This method is used by Packet::RemoveHeader to re-create a header from the byte buffer of a packet. The data read is expected to match bit-for-bit the representation of this header in real networks.
Implements ns3::Header.
Definition at line 921 of file wifi-mac-header.cc.
References ns3::Buffer::Iterator::GetDistanceFrom(), m_addr1, m_addr2, m_addr3, m_addr4, m_ctrlFromDs, m_ctrlSubtype, m_ctrlToDs, m_ctrlType, m_duration, NS_ASSERT, ns3::ReadFrom(), ns3::Buffer::Iterator::ReadLsbtohU16(), SetFrameControl(), SetQosControl(), SetSequenceControl(), ns3::SUBTYPE_CTL_ACK, ns3::SUBTYPE_CTL_BACKREQ, ns3::SUBTYPE_CTL_BACKRESP, ns3::SUBTYPE_CTL_CTS, ns3::SUBTYPE_CTL_RTS, ns3::TYPE_CTL, ns3::TYPE_DATA, and ns3::TYPE_MGT.
Mac48Address ns3::WifiMacHeader::GetAddr1 | ( | void | ) | const |
Definition at line 308 of file wifi-mac-header.cc.
References m_addr1.
Referenced by ns3::MacLow::CalculateOverallTxTime(), ns3::MacLow::CtsTimeout(), ns3::MacLow::FastAckTimeout(), ns3::MacLow::ForwardDown(), ns3::AdhocWifiMac::ForwardUp(), ns3::MacLow::GetDataTxMode(), ns3::DcaTxop::GetFragmentOffset(), ns3::DcaTxop::GetFragmentSize(), ns3::DcaTxop::GetNextFragmentSize(), ns3::MacTxMiddle::GetNextSequenceNumberfor(), ns3::MacLow::GetRtsTxMode(), ns3::DcaTxop::IsLastFragment(), ns3::DcaTxop::MissedAck(), ns3::DcaTxop::MissedCts(), ns3::DcaTxop::NeedDataRetransmission(), ns3::DcaTxop::NeedFragmentation(), ns3::DcaTxop::NeedRts(), ns3::DcaTxop::NeedRtsRetransmission(), ns3::MacLow::NormalAckTimeout(), ns3::DcaTxop::NotifyAccessGranted(), ns3::MacLow::NotifyNav(), ns3::DcaTxop::Queue(), ns3::NqstaWifiMac::Receive(), ns3::NqapWifiMac::Receive(), ns3::MacRxMiddle::Receive(), ns3::MacLow::ReceiveOk(), ns3::MacLow::SendDataAfterCts(), ns3::MacLow::SendDataPacket(), ns3::MacLow::SendRtsForPacket(), ns3::MacLow::StartTransmission(), ns3::MacLow::SuperFastAckTimeout(), ns3::NqapWifiMac::TxFailed(), and ns3::NqapWifiMac::TxOk().
Mac48Address ns3::WifiMacHeader::GetAddr2 | ( | void | ) | const |
Definition at line 313 of file wifi-mac-header.cc.
References m_addr2.
Referenced by ns3::AdhocWifiMac::ForwardUp(), ns3::MacRxMiddle::Lookup(), ns3::MacLow::NotifyNav(), ns3::NqstaWifiMac::Receive(), ns3::NqapWifiMac::Receive(), ns3::MacRxMiddle::Receive(), and ns3::MacLow::ReceiveOk().
Mac48Address ns3::WifiMacHeader::GetAddr3 | ( | void | ) | const |
Definition at line 318 of file wifi-mac-header.cc.
References m_addr3.
Referenced by ns3::NqstaWifiMac::Receive(), and ns3::NqapWifiMac::Receive().
Mac48Address ns3::WifiMacHeader::GetAddr4 | ( | void | ) | const |
Definition at line 323 of file wifi-mac-header.cc.
References m_addr4.
Time ns3::WifiMacHeader::GetDuration | ( | void | ) | const |
Definition at line 564 of file wifi-mac-header.cc.
References m_duration, and ns3::MicroSeconds().
Referenced by ns3::MacLow::ForwardDown(), ns3::MacLow::NotifyNav(), and ns3::MacLow::ReceiveOk().
uint16_t ns3::WifiMacHeader::GetFragmentNumber | ( | void | ) | const |
Definition at line 579 of file wifi-mac-header.cc.
References m_seqFrag.
Referenced by ns3::MacRxMiddle::HandleFragments(), and ns3::MacRxMiddle::Receive().
uint16_t ns3::WifiMacHeader::GetFrameControl | ( | void | ) | const [private] |
Definition at line 625 of file wifi-mac-header.cc.
References m_ctrlFromDs, m_ctrlMoreData, m_ctrlMoreFrag, m_ctrlOrder, m_ctrlRetry, m_ctrlSubtype, m_ctrlToDs, m_ctrlType, and m_ctrlWep.
Referenced by Serialize().
TypeId ns3::WifiMacHeader::GetInstanceTypeId | ( | void | ) | const [virtual] |
This method is typically implemented by ns3::Object::GetInstanceTypeId but some classes which derive from ns3::ObjectBase directly have to implement it themselves.
Implements ns3::ObjectBase.
Definition at line 774 of file wifi-mac-header.cc.
References GetTypeId().
uint16_t ns3::WifiMacHeader::GetQosControl | ( | void | ) | const [private] |
Definition at line 641 of file wifi-mac-header.cc.
References m_qosAckPolicy, m_qosEosp, m_qosStuff, and m_qosTid.
Referenced by Serialize().
uint8_t ns3::WifiMacHeader::GetQosTid | ( | void | ) | const |
Definition at line 612 of file wifi-mac-header.cc.
References IsQosData(), m_qosTid, and NS_ASSERT.
Referenced by ns3::MacTxMiddle::GetNextSequenceNumberfor(), and ns3::MacRxMiddle::Lookup().
uint8_t ns3::WifiMacHeader::GetQosTxopLimit | ( | void | ) | const |
Definition at line 618 of file wifi-mac-header.cc.
References IsQosData(), m_qosStuff, and NS_ASSERT.
uint16_t ns3::WifiMacHeader::GetRawDuration | ( | void | ) | const |
Definition at line 559 of file wifi-mac-header.cc.
References m_duration.
uint16_t ns3::WifiMacHeader::GetSequenceControl | ( | void | ) | const |
Definition at line 569 of file wifi-mac-header.cc.
References m_seqFrag, and m_seqSeq.
Referenced by ns3::MacLow::ForwardDown(), ns3::MacRxMiddle::HandleFragments(), ns3::MacRxMiddle::IsDuplicate(), ns3::DcaTxop::NotifyAccessGranted(), ns3::MacRxMiddle::Receive(), and Serialize().
uint16_t ns3::WifiMacHeader::GetSequenceNumber | ( | void | ) | const |
Definition at line 574 of file wifi-mac-header.cc.
References m_seqSeq.
Referenced by ns3::MacRxMiddle::HandleFragments(), and ns3::MacRxMiddle::Receive().
uint32_t ns3::WifiMacHeader::GetSerializedSize | ( | void | ) | const [virtual] |
This method is used by Packet::AddHeader to store a header into the byte buffer of a packet. This method should return the number of bytes which are needed to store the full header data by Serialize.
Implements ns3::Header.
Definition at line 868 of file wifi-mac-header.cc.
References GetSize().
Referenced by ns3::MacLow::NotifyNav(), and ns3::DcaTxop::Queue().
uint32_t ns3::WifiMacHeader::GetSize | ( | void | ) | const |
Definition at line 680 of file wifi-mac-header.cc.
References m_ctrlFromDs, m_ctrlSubtype, m_ctrlToDs, m_ctrlType, NS_ASSERT, ns3::SUBTYPE_CTL_ACK, ns3::SUBTYPE_CTL_BACKREQ, ns3::SUBTYPE_CTL_BACKRESP, ns3::SUBTYPE_CTL_CTS, ns3::SUBTYPE_CTL_RTS, ns3::TYPE_CTL, ns3::TYPE_DATA, and ns3::TYPE_MGT.
Referenced by ns3::MacLow::GetAckSize(), ns3::MacLow::GetCtsSize(), ns3::MacLow::GetDataTxMode(), ns3::MacLow::GetRtsSize(), GetSerializedSize(), ns3::MacLow::GetSize(), and ns3::MacRxMiddle::HandleFragments().
enum WifiMacType_e ns3::WifiMacHeader::GetType | ( | void | ) | const |
Definition at line 328 of file wifi-mac-header.cc.
References m_ctrlSubtype, m_ctrlType, NS_ASSERT, ns3::SUBTYPE_CTL_ACK, ns3::SUBTYPE_CTL_BACKREQ, ns3::SUBTYPE_CTL_BACKRESP, ns3::SUBTYPE_CTL_CTS, ns3::SUBTYPE_CTL_RTS, ns3::TYPE_CTL, ns3::TYPE_DATA, ns3::TYPE_MGT, ns3::WIFI_MAC_CTL_ACK, ns3::WIFI_MAC_CTL_BACKREQ, ns3::WIFI_MAC_CTL_BACKRESP, ns3::WIFI_MAC_CTL_CTS, ns3::WIFI_MAC_CTL_RTS, ns3::WIFI_MAC_DATA, ns3::WIFI_MAC_DATA_CFACK, ns3::WIFI_MAC_DATA_CFACK_CFPOLL, ns3::WIFI_MAC_DATA_CFPOLL, ns3::WIFI_MAC_DATA_NULL, ns3::WIFI_MAC_DATA_NULL_CFACK, ns3::WIFI_MAC_DATA_NULL_CFACK_CFPOLL, ns3::WIFI_MAC_DATA_NULL_CFPOLL, ns3::WIFI_MAC_MGT_ASSOCIATION_REQUEST, ns3::WIFI_MAC_MGT_ASSOCIATION_RESPONSE, ns3::WIFI_MAC_MGT_AUTHENTICATION, ns3::WIFI_MAC_MGT_BEACON, ns3::WIFI_MAC_MGT_DEAUTHENTICATION, ns3::WIFI_MAC_MGT_DISASSOCIATION, ns3::WIFI_MAC_MGT_PROBE_REQUEST, ns3::WIFI_MAC_MGT_PROBE_RESPONSE, ns3::WIFI_MAC_MGT_REASSOCIATION_REQUEST, ns3::WIFI_MAC_MGT_REASSOCIATION_RESPONSE, ns3::WIFI_MAC_QOSDATA, ns3::WIFI_MAC_QOSDATA_CFACK, ns3::WIFI_MAC_QOSDATA_CFACK_CFPOLL, ns3::WIFI_MAC_QOSDATA_CFPOLL, ns3::WIFI_MAC_QOSDATA_NULL, ns3::WIFI_MAC_QOSDATA_NULL_CFACK_CFPOLL, and ns3::WIFI_MAC_QOSDATA_NULL_CFPOLL.
Referenced by GetTypeString(), IsAck(), IsAssocReq(), IsAssocResp(), IsAuthentication(), IsBeacon(), IsCfpoll(), IsCts(), IsDeauthentication(), IsDisassociation(), IsProbeReq(), IsProbeResp(), IsReassocReq(), IsReassocResp(), IsRts(), and Print().
TypeId ns3::WifiMacHeader::GetTypeId | ( | void | ) | [static] |
This method returns the TypeId associated to ns3::WifiMacHeader.
No Attributes defined for this type.
No TraceSources defined for this type.
Reimplemented from ns3::Header.
Definition at line 765 of file wifi-mac-header.cc.
References ns3::TypeId::SetParent().
Referenced by GetInstanceTypeId().
char const * ns3::WifiMacHeader::GetTypeString | ( | void | ) | const |
Definition at line 716 of file wifi-mac-header.cc.
References FOO, and GetType().
Referenced by ns3::MacLow::ForwardDown(), Print(), and ns3::MacLow::ReceiveOk().
bool ns3::WifiMacHeader::IsAck | ( | void | ) | const |
Definition at line 502 of file wifi-mac-header.cc.
References GetType(), and ns3::WIFI_MAC_CTL_ACK.
Referenced by ns3::MacLow::ReceiveOk().
bool ns3::WifiMacHeader::IsAssocReq | ( | void | ) | const |
Definition at line 507 of file wifi-mac-header.cc.
References GetType(), and ns3::WIFI_MAC_MGT_ASSOCIATION_REQUEST.
Referenced by ns3::NqstaWifiMac::Receive(), and ns3::NqapWifiMac::Receive().
bool ns3::WifiMacHeader::IsAssocResp | ( | void | ) | const |
Definition at line 512 of file wifi-mac-header.cc.
References GetType(), and ns3::WIFI_MAC_MGT_ASSOCIATION_RESPONSE.
Referenced by ns3::NqstaWifiMac::Receive(), ns3::NqapWifiMac::TxFailed(), and ns3::NqapWifiMac::TxOk().
bool ns3::WifiMacHeader::IsAuthentication | ( | void | ) | const |
Definition at line 547 of file wifi-mac-header.cc.
References GetType(), and ns3::WIFI_MAC_MGT_AUTHENTICATION.
Referenced by ns3::NqapWifiMac::Receive().
bool ns3::WifiMacHeader::IsBeacon | ( | void | ) | const |
Definition at line 537 of file wifi-mac-header.cc.
References GetType(), and ns3::WIFI_MAC_MGT_BEACON.
Referenced by ns3::NqstaWifiMac::Receive().
bool ns3::WifiMacHeader::IsCfpoll | ( | void | ) | const |
Definition at line 473 of file wifi-mac-header.cc.
References GetType(), ns3::WIFI_MAC_DATA_CFACK_CFPOLL, ns3::WIFI_MAC_DATA_CFPOLL, ns3::WIFI_MAC_DATA_NULL_CFACK_CFPOLL, ns3::WIFI_MAC_DATA_NULL_CFPOLL, ns3::WIFI_MAC_QOSDATA_CFACK_CFPOLL, ns3::WIFI_MAC_QOSDATA_CFPOLL, ns3::WIFI_MAC_QOSDATA_NULL_CFACK_CFPOLL, and ns3::WIFI_MAC_QOSDATA_NULL_CFPOLL.
Referenced by ns3::MacLow::NotifyNav().
bool ns3::WifiMacHeader::IsCtl | ( | void | ) | const |
Definition at line 463 of file wifi-mac-header.cc.
References m_ctrlType, and ns3::TYPE_CTL.
Referenced by ns3::NqstaWifiMac::Receive(), and ns3::MacLow::ReceiveOk().
bool ns3::WifiMacHeader::IsCts | ( | void | ) | const |
Definition at line 497 of file wifi-mac-header.cc.
References GetType(), and ns3::WIFI_MAC_CTL_CTS.
Referenced by ns3::MacLow::ReceiveOk().
bool ns3::WifiMacHeader::IsData | ( | void | ) | const |
Definition at line 452 of file wifi-mac-header.cc.
References m_ctrlType, and ns3::TYPE_DATA.
Referenced by ns3::NqstaWifiMac::Receive(), ns3::NqapWifiMac::Receive(), ns3::MacRxMiddle::Receive(), and ns3::MacLow::ReceiveOk().
bool ns3::WifiMacHeader::IsDeauthentication | ( | void | ) | const |
Definition at line 552 of file wifi-mac-header.cc.
References GetType(), and ns3::WIFI_MAC_MGT_DEAUTHENTICATION.
Referenced by ns3::NqapWifiMac::Receive().
bool ns3::WifiMacHeader::IsDisassociation | ( | void | ) | const |
Definition at line 542 of file wifi-mac-header.cc.
References GetType(), and ns3::WIFI_MAC_MGT_DISASSOCIATION.
Referenced by ns3::NqapWifiMac::Receive().
bool ns3::WifiMacHeader::IsFromDs | ( | void | ) | const |
Definition at line 441 of file wifi-mac-header.cc.
References m_ctrlFromDs.
Referenced by ns3::NqstaWifiMac::Receive(), and ns3::NqapWifiMac::Receive().
bool ns3::WifiMacHeader::IsMgt | ( | void | ) | const |
Definition at line 468 of file wifi-mac-header.cc.
References m_ctrlType, and ns3::TYPE_MGT.
Referenced by ns3::NqapWifiMac::Receive(), ns3::MacRxMiddle::Receive(), and ns3::MacLow::ReceiveOk().
bool ns3::WifiMacHeader::IsMoreFragments | ( | void | ) | const |
Definition at line 589 of file wifi-mac-header.cc.
References m_ctrlMoreFrag.
Referenced by ns3::MacRxMiddle::HandleFragments().
bool ns3::WifiMacHeader::IsProbeReq | ( | void | ) | const |
Definition at line 527 of file wifi-mac-header.cc.
References GetType(), and ns3::WIFI_MAC_MGT_PROBE_REQUEST.
Referenced by ns3::NqstaWifiMac::Receive(), and ns3::NqapWifiMac::Receive().
bool ns3::WifiMacHeader::IsProbeResp | ( | void | ) | const |
Definition at line 532 of file wifi-mac-header.cc.
References GetType(), and ns3::WIFI_MAC_MGT_PROBE_RESPONSE.
Referenced by ns3::NqstaWifiMac::Receive().
bool ns3::WifiMacHeader::IsQosAck | ( | void | ) | const |
Definition at line 606 of file wifi-mac-header.cc.
References IsQosData(), m_qosAckPolicy, and NS_ASSERT.
bool ns3::WifiMacHeader::IsQosBlockAck | ( | void | ) | const |
Definition at line 594 of file wifi-mac-header.cc.
References IsQosData(), m_qosAckPolicy, and NS_ASSERT.
bool ns3::WifiMacHeader::IsQosData | ( | void | ) | const |
Definition at line 458 of file wifi-mac-header.cc.
References m_ctrlSubtype, m_ctrlType, and ns3::TYPE_DATA.
Referenced by ns3::MacTxMiddle::GetNextSequenceNumberfor(), GetQosTid(), GetQosTxopLimit(), IsQosAck(), IsQosBlockAck(), IsQosNoAck(), ns3::MacRxMiddle::Lookup(), and ns3::MacLow::ReceiveOk().
bool ns3::WifiMacHeader::IsQosNoAck | ( | void | ) | const |
Definition at line 600 of file wifi-mac-header.cc.
References IsQosData(), m_qosAckPolicy, and NS_ASSERT.
Referenced by ns3::MacLow::ReceiveOk().
bool ns3::WifiMacHeader::IsReassocReq | ( | void | ) | const |
Definition at line 517 of file wifi-mac-header.cc.
References GetType(), and ns3::WIFI_MAC_MGT_REASSOCIATION_REQUEST.
Referenced by ns3::NqapWifiMac::Receive().
bool ns3::WifiMacHeader::IsReassocResp | ( | void | ) | const |
Definition at line 522 of file wifi-mac-header.cc.
References GetType(), and ns3::WIFI_MAC_MGT_REASSOCIATION_RESPONSE.
bool ns3::WifiMacHeader::IsRetry | ( | void | ) | const |
Definition at line 584 of file wifi-mac-header.cc.
References m_ctrlRetry.
Referenced by ns3::MacRxMiddle::IsDuplicate().
bool ns3::WifiMacHeader::IsRts | ( | void | ) | const |
Definition at line 492 of file wifi-mac-header.cc.
References GetType(), and ns3::WIFI_MAC_CTL_RTS.
Referenced by ns3::MacLow::NotifyNav(), and ns3::MacLow::ReceiveOk().
bool ns3::WifiMacHeader::IsToDs | ( | void | ) | const |
Definition at line 446 of file wifi-mac-header.cc.
References m_ctrlToDs.
Referenced by ns3::NqstaWifiMac::Receive(), and ns3::NqapWifiMac::Receive().
void ns3::WifiMacHeader::Print | ( | std::ostream & | os | ) | const [virtual] |
This method is used by Packet::Print to print the content of a trailer as ascii data to a c++ output stream. Although the trailer is free to format its output as it wishes, it is recommended to follow a few rules to integrate with the packet pretty printer: start with flags, small field values located between a pair of parens. Values should be separated by whitespace. Follow the parens with the important fields, separated by whitespace. i.e.: (field1 val1 field2 val2 field3 val3) field4 val4 field5 val5
Implements ns3::Header.
Definition at line 789 of file wifi-mac-header.cc.
References GetType(), GetTypeString(), m_addr1, m_addr2, m_addr3, m_addr4, m_ctrlFromDs, m_ctrlToDs, m_duration, m_seqFrag, m_seqSeq, NS_ASSERT, PrintFrameControl(), ns3::WIFI_MAC_CTL_ACK, ns3::WIFI_MAC_CTL_BACKREQ, ns3::WIFI_MAC_CTL_BACKRESP, ns3::WIFI_MAC_CTL_CTS, ns3::WIFI_MAC_CTL_RTS, ns3::WIFI_MAC_DATA, ns3::WIFI_MAC_DATA_CFACK, ns3::WIFI_MAC_DATA_CFACK_CFPOLL, ns3::WIFI_MAC_DATA_CFPOLL, ns3::WIFI_MAC_DATA_NULL, ns3::WIFI_MAC_DATA_NULL_CFACK, ns3::WIFI_MAC_DATA_NULL_CFACK_CFPOLL, ns3::WIFI_MAC_DATA_NULL_CFPOLL, ns3::WIFI_MAC_MGT_ASSOCIATION_REQUEST, ns3::WIFI_MAC_MGT_ASSOCIATION_RESPONSE, ns3::WIFI_MAC_MGT_AUTHENTICATION, ns3::WIFI_MAC_MGT_BEACON, ns3::WIFI_MAC_MGT_DEAUTHENTICATION, ns3::WIFI_MAC_MGT_DISASSOCIATION, ns3::WIFI_MAC_MGT_PROBE_REQUEST, ns3::WIFI_MAC_MGT_PROBE_RESPONSE, ns3::WIFI_MAC_MGT_REASSOCIATION_REQUEST, ns3::WIFI_MAC_MGT_REASSOCIATION_RESPONSE, ns3::WIFI_MAC_QOSDATA, ns3::WIFI_MAC_QOSDATA_CFACK, ns3::WIFI_MAC_QOSDATA_CFACK_CFPOLL, ns3::WIFI_MAC_QOSDATA_CFPOLL, ns3::WIFI_MAC_QOSDATA_NULL, ns3::WIFI_MAC_QOSDATA_NULL_CFACK_CFPOLL, and ns3::WIFI_MAC_QOSDATA_NULL_CFPOLL.
void ns3::WifiMacHeader::PrintFrameControl | ( | std::ostream & | os | ) | const [private] |
Definition at line 780 of file wifi-mac-header.cc.
References m_ctrlFromDs, m_ctrlMoreData, m_ctrlMoreFrag, m_ctrlRetry, and m_ctrlToDs.
Referenced by Print().
void ns3::WifiMacHeader::Serialize | ( | Buffer::Iterator | start | ) | const [virtual] |
start | an iterator which points to where the header should be written. |
This method is used by Packet::AddHeader to store a header into the byte buffer of a packet. The data written is expected to match bit-for-bit the representation of this header in a real network.
Implements ns3::Header.
Definition at line 873 of file wifi-mac-header.cc.
References GetFrameControl(), GetQosControl(), GetSequenceControl(), m_addr1, m_addr2, m_addr3, m_addr4, m_ctrlFromDs, m_ctrlSubtype, m_ctrlToDs, m_ctrlType, m_duration, NS_ASSERT, ns3::SUBTYPE_CTL_ACK, ns3::SUBTYPE_CTL_BACKREQ, ns3::SUBTYPE_CTL_BACKRESP, ns3::SUBTYPE_CTL_CTS, ns3::SUBTYPE_CTL_RTS, ns3::TYPE_CTL, ns3::TYPE_DATA, ns3::TYPE_MGT, ns3::Buffer::Iterator::WriteHtolsbU16(), and ns3::WriteTo().
void ns3::WifiMacHeader::SetAddr1 | ( | Mac48Address | address | ) |
Definition at line 73 of file wifi-mac-header.cc.
References m_addr1.
Referenced by ns3::NqstaWifiMac::Enqueue(), ns3::NqapWifiMac::ForwardDown(), ns3::MacLow::SendAckAfterData(), ns3::NqstaWifiMac::SendAssociationRequest(), ns3::NqapWifiMac::SendAssocResp(), ns3::MacLow::SendCtsAfterRts(), ns3::NqapWifiMac::SendOneBeacon(), ns3::NqstaWifiMac::SendProbeRequest(), ns3::NqapWifiMac::SendProbeResp(), and ns3::MacLow::SendRtsForPacket().
void ns3::WifiMacHeader::SetAddr2 | ( | Mac48Address | address | ) |
Definition at line 78 of file wifi-mac-header.cc.
References m_addr2.
Referenced by ns3::NqstaWifiMac::Enqueue(), ns3::NqapWifiMac::ForwardDown(), ns3::NqstaWifiMac::SendAssociationRequest(), ns3::NqapWifiMac::SendAssocResp(), ns3::NqapWifiMac::SendOneBeacon(), ns3::NqstaWifiMac::SendProbeRequest(), ns3::NqapWifiMac::SendProbeResp(), and ns3::MacLow::SendRtsForPacket().
void ns3::WifiMacHeader::SetAddr3 | ( | Mac48Address | address | ) |
Definition at line 83 of file wifi-mac-header.cc.
References m_addr3.
Referenced by ns3::NqstaWifiMac::Enqueue(), ns3::NqapWifiMac::ForwardDown(), ns3::NqstaWifiMac::SendAssociationRequest(), ns3::NqapWifiMac::SendAssocResp(), ns3::NqapWifiMac::SendOneBeacon(), ns3::NqstaWifiMac::SendProbeRequest(), and ns3::NqapWifiMac::SendProbeResp().
void ns3::WifiMacHeader::SetAddr4 | ( | Mac48Address | address | ) |
Definition at line 88 of file wifi-mac-header.cc.
References m_addr4.
void ns3::WifiMacHeader::SetAssocReq | ( | void | ) |
Definition at line 93 of file wifi-mac-header.cc.
References m_ctrlSubtype, m_ctrlType, and ns3::TYPE_MGT.
Referenced by ns3::NqstaWifiMac::SendAssociationRequest().
void ns3::WifiMacHeader::SetAssocResp | ( | void | ) |
Definition at line 99 of file wifi-mac-header.cc.
References m_ctrlSubtype, m_ctrlType, and ns3::TYPE_MGT.
Referenced by ns3::NqapWifiMac::SendAssocResp().
void ns3::WifiMacHeader::SetBeacon | ( | void | ) |
Definition at line 117 of file wifi-mac-header.cc.
References m_ctrlSubtype, m_ctrlType, and ns3::TYPE_MGT.
Referenced by ns3::NqapWifiMac::SendOneBeacon().
void ns3::WifiMacHeader::SetDsFrom | ( | void | ) |
Definition at line 52 of file wifi-mac-header.cc.
References m_ctrlFromDs.
Referenced by ns3::NqapWifiMac::ForwardDown().
void ns3::WifiMacHeader::SetDsNotFrom | ( | void | ) |
Definition at line 57 of file wifi-mac-header.cc.
References m_ctrlFromDs.
Referenced by ns3::NqstaWifiMac::Enqueue(), ns3::MacLow::SendAckAfterData(), ns3::NqstaWifiMac::SendAssociationRequest(), ns3::NqapWifiMac::SendAssocResp(), ns3::MacLow::SendCtsAfterRts(), ns3::NqapWifiMac::SendOneBeacon(), ns3::NqstaWifiMac::SendProbeRequest(), ns3::NqapWifiMac::SendProbeResp(), and ns3::MacLow::SendRtsForPacket().
void ns3::WifiMacHeader::SetDsNotTo | ( | void | ) |
Definition at line 67 of file wifi-mac-header.cc.
References m_ctrlToDs.
Referenced by ns3::NqapWifiMac::ForwardDown(), ns3::MacLow::SendAckAfterData(), ns3::NqstaWifiMac::SendAssociationRequest(), ns3::NqapWifiMac::SendAssocResp(), ns3::MacLow::SendCtsAfterRts(), ns3::NqapWifiMac::SendOneBeacon(), ns3::NqstaWifiMac::SendProbeRequest(), ns3::NqapWifiMac::SendProbeResp(), and ns3::MacLow::SendRtsForPacket().
void ns3::WifiMacHeader::SetDsTo | ( | void | ) |
Definition at line 62 of file wifi-mac-header.cc.
References m_ctrlToDs.
Referenced by ns3::NqstaWifiMac::Enqueue().
void ns3::WifiMacHeader::SetDuration | ( | Time | duration | ) |
Definition at line 263 of file wifi-mac-header.cc.
References ns3::TimeUnit< 1 >::GetMicroSeconds(), m_duration, and NS_ASSERT.
Referenced by ns3::MacLow::SendAckAfterData(), ns3::MacLow::SendCtsAfterRts(), ns3::MacLow::SendDataAfterCts(), ns3::MacLow::SendDataPacket(), and ns3::MacLow::SendRtsForPacket().
void ns3::WifiMacHeader::SetFragmentNumber | ( | uint8_t | frag | ) |
Definition at line 278 of file wifi-mac-header.cc.
References m_seqFrag.
Referenced by ns3::DcaTxop::GetFragmentPacket(), and ns3::DcaTxop::NotifyAccessGranted().
void ns3::WifiMacHeader::SetFrameControl | ( | uint16_t | control | ) | [private] |
Definition at line 652 of file wifi-mac-header.cc.
References m_ctrlFromDs, m_ctrlMoreData, m_ctrlMoreFrag, m_ctrlOrder, m_ctrlRetry, m_ctrlSubtype, m_ctrlToDs, m_ctrlType, and m_ctrlWep.
Referenced by Deserialize().
void ns3::WifiMacHeader::SetId | ( | uint16_t | id | ) |
Definition at line 270 of file wifi-mac-header.cc.
References m_duration.
void ns3::WifiMacHeader::SetMoreFragments | ( | void | ) |
Definition at line 286 of file wifi-mac-header.cc.
References m_ctrlMoreFrag.
Referenced by ns3::DcaTxop::GetFragmentPacket().
void ns3::WifiMacHeader::SetNoMoreFragments | ( | void | ) |
Definition at line 282 of file wifi-mac-header.cc.
References m_ctrlMoreFrag.
Referenced by ns3::DcaTxop::GetFragmentPacket(), ns3::DcaTxop::NotifyAccessGranted(), ns3::MacLow::SendAckAfterData(), ns3::MacLow::SendCtsAfterRts(), and ns3::MacLow::SendRtsForPacket().
void ns3::WifiMacHeader::SetNoRetry | ( | void | ) |
Definition at line 294 of file wifi-mac-header.cc.
References m_ctrlRetry.
Referenced by ns3::DcaTxop::NotifyAccessGranted(), ns3::MacLow::SendAckAfterData(), ns3::MacLow::SendCtsAfterRts(), and ns3::MacLow::SendRtsForPacket().
void ns3::WifiMacHeader::SetProbeReq | ( | void | ) |
Definition at line 105 of file wifi-mac-header.cc.
References m_ctrlSubtype, m_ctrlType, and ns3::TYPE_MGT.
Referenced by ns3::NqstaWifiMac::SendProbeRequest().
void ns3::WifiMacHeader::SetProbeResp | ( | void | ) |
Definition at line 111 of file wifi-mac-header.cc.
References m_ctrlSubtype, m_ctrlType, and ns3::TYPE_MGT.
Referenced by ns3::NqapWifiMac::SendProbeResp().
void ns3::WifiMacHeader::SetQosControl | ( | uint16_t | qos | ) | [private] |
Definition at line 671 of file wifi-mac-header.cc.
References m_qosAckPolicy, m_qosEosp, m_qosStuff, and m_qosTid.
Referenced by Deserialize().
void ns3::WifiMacHeader::SetQosTid | ( | uint8_t | tid | ) |
Definition at line 298 of file wifi-mac-header.cc.
References m_qosTid.
void ns3::WifiMacHeader::SetQosTxopLimit | ( | uint8_t | txop | ) |
Definition at line 302 of file wifi-mac-header.cc.
References m_qosStuff.
void ns3::WifiMacHeader::SetRawDuration | ( | uint16_t | duration | ) |
Definition at line 258 of file wifi-mac-header.cc.
References m_duration.
void ns3::WifiMacHeader::SetRetry | ( | void | ) |
Definition at line 290 of file wifi-mac-header.cc.
References m_ctrlRetry.
Referenced by ns3::DcaTxop::MissedAck().
void ns3::WifiMacHeader::SetSequenceControl | ( | uint16_t | seq | ) | [private] |
Definition at line 665 of file wifi-mac-header.cc.
References m_seqFrag, and m_seqSeq.
Referenced by Deserialize().
void ns3::WifiMacHeader::SetSequenceNumber | ( | uint16_t | seq | ) |
Definition at line 274 of file wifi-mac-header.cc.
References m_seqSeq.
Referenced by ns3::DcaTxop::NotifyAccessGranted().
void ns3::WifiMacHeader::SetType | ( | enum WifiMacType_e | type | ) |
Definition at line 129 of file wifi-mac-header.cc.
References m_ctrlFromDs, m_ctrlSubtype, m_ctrlToDs, m_ctrlType, ns3::SUBTYPE_CTL_ACK, ns3::SUBTYPE_CTL_BACKREQ, ns3::SUBTYPE_CTL_BACKRESP, ns3::SUBTYPE_CTL_CTS, ns3::SUBTYPE_CTL_RTS, ns3::TYPE_CTL, ns3::TYPE_DATA, ns3::TYPE_MGT, ns3::WIFI_MAC_CTL_ACK, ns3::WIFI_MAC_CTL_BACKREQ, ns3::WIFI_MAC_CTL_BACKRESP, ns3::WIFI_MAC_CTL_CTS, ns3::WIFI_MAC_CTL_RTS, ns3::WIFI_MAC_DATA, ns3::WIFI_MAC_DATA_CFACK, ns3::WIFI_MAC_DATA_CFACK_CFPOLL, ns3::WIFI_MAC_DATA_CFPOLL, ns3::WIFI_MAC_DATA_NULL, ns3::WIFI_MAC_DATA_NULL_CFACK, ns3::WIFI_MAC_DATA_NULL_CFACK_CFPOLL, ns3::WIFI_MAC_DATA_NULL_CFPOLL, ns3::WIFI_MAC_MGT_ASSOCIATION_REQUEST, ns3::WIFI_MAC_MGT_ASSOCIATION_RESPONSE, ns3::WIFI_MAC_MGT_AUTHENTICATION, ns3::WIFI_MAC_MGT_BEACON, ns3::WIFI_MAC_MGT_DEAUTHENTICATION, ns3::WIFI_MAC_MGT_DISASSOCIATION, ns3::WIFI_MAC_MGT_PROBE_REQUEST, ns3::WIFI_MAC_MGT_PROBE_RESPONSE, ns3::WIFI_MAC_MGT_REASSOCIATION_REQUEST, ns3::WIFI_MAC_MGT_REASSOCIATION_RESPONSE, ns3::WIFI_MAC_QOSDATA, ns3::WIFI_MAC_QOSDATA_CFACK, ns3::WIFI_MAC_QOSDATA_CFACK_CFPOLL, ns3::WIFI_MAC_QOSDATA_CFPOLL, ns3::WIFI_MAC_QOSDATA_NULL, ns3::WIFI_MAC_QOSDATA_NULL_CFACK_CFPOLL, and ns3::WIFI_MAC_QOSDATA_NULL_CFPOLL.
Referenced by ns3::MacLow::GetAckSize(), ns3::MacLow::GetCtsSize(), ns3::MacLow::GetRtsSize(), ns3::MacLow::NotifyNav(), ns3::MacLow::SendAckAfterData(), ns3::MacLow::SendCtsAfterRts(), and ns3::MacLow::SendRtsForPacket().
void ns3::WifiMacHeader::SetTypeData | ( | void | ) |
Definition at line 123 of file wifi-mac-header.cc.
References m_ctrlSubtype, m_ctrlType, and ns3::TYPE_DATA.
Referenced by ns3::NqstaWifiMac::Enqueue(), and ns3::NqapWifiMac::ForwardDown().
Mac48Address ns3::WifiMacHeader::m_addr1 [private] |
Definition at line 168 of file wifi-mac-header.h.
Referenced by Deserialize(), GetAddr1(), Print(), Serialize(), and SetAddr1().
Mac48Address ns3::WifiMacHeader::m_addr2 [private] |
Definition at line 169 of file wifi-mac-header.h.
Referenced by Deserialize(), GetAddr2(), Print(), Serialize(), and SetAddr2().
Mac48Address ns3::WifiMacHeader::m_addr3 [private] |
Definition at line 170 of file wifi-mac-header.h.
Referenced by Deserialize(), GetAddr3(), Print(), Serialize(), and SetAddr3().
Mac48Address ns3::WifiMacHeader::m_addr4 [private] |
Definition at line 173 of file wifi-mac-header.h.
Referenced by Deserialize(), GetAddr4(), Print(), Serialize(), and SetAddr4().
uint8_t ns3::WifiMacHeader::m_ctrlFromDs [private] |
Definition at line 160 of file wifi-mac-header.h.
Referenced by Deserialize(), GetFrameControl(), GetSize(), IsFromDs(), Print(), PrintFrameControl(), Serialize(), SetDsFrom(), SetDsNotFrom(), SetFrameControl(), and SetType().
uint8_t ns3::WifiMacHeader::m_ctrlMoreData [private] |
Definition at line 164 of file wifi-mac-header.h.
Referenced by GetFrameControl(), PrintFrameControl(), and SetFrameControl().
uint8_t ns3::WifiMacHeader::m_ctrlMoreFrag [private] |
Definition at line 161 of file wifi-mac-header.h.
Referenced by GetFrameControl(), IsMoreFragments(), PrintFrameControl(), SetFrameControl(), SetMoreFragments(), and SetNoMoreFragments().
uint8_t ns3::WifiMacHeader::m_ctrlOrder [private] |
Definition at line 166 of file wifi-mac-header.h.
Referenced by GetFrameControl(), and SetFrameControl().
uint8_t ns3::WifiMacHeader::m_ctrlPwrMgt [private] |
Definition at line 163 of file wifi-mac-header.h.
uint8_t ns3::WifiMacHeader::m_ctrlRetry [private] |
Definition at line 162 of file wifi-mac-header.h.
Referenced by GetFrameControl(), IsRetry(), PrintFrameControl(), SetFrameControl(), SetNoRetry(), and SetRetry().
uint8_t ns3::WifiMacHeader::m_ctrlSubtype [private] |
Definition at line 158 of file wifi-mac-header.h.
Referenced by Deserialize(), GetFrameControl(), GetSize(), GetType(), IsQosData(), Serialize(), SetAssocReq(), SetAssocResp(), SetBeacon(), SetFrameControl(), SetProbeReq(), SetProbeResp(), SetType(), and SetTypeData().
uint8_t ns3::WifiMacHeader::m_ctrlToDs [private] |
Definition at line 159 of file wifi-mac-header.h.
Referenced by Deserialize(), GetFrameControl(), GetSize(), IsToDs(), Print(), PrintFrameControl(), Serialize(), SetDsNotTo(), SetDsTo(), SetFrameControl(), and SetType().
uint8_t ns3::WifiMacHeader::m_ctrlType [private] |
Definition at line 157 of file wifi-mac-header.h.
Referenced by Deserialize(), GetFrameControl(), GetSize(), GetType(), IsCtl(), IsData(), IsMgt(), IsQosData(), Serialize(), SetAssocReq(), SetAssocResp(), SetBeacon(), SetFrameControl(), SetProbeReq(), SetProbeResp(), SetType(), and SetTypeData().
uint8_t ns3::WifiMacHeader::m_ctrlWep [private] |
Definition at line 165 of file wifi-mac-header.h.
Referenced by GetFrameControl(), and SetFrameControl().
uint16_t ns3::WifiMacHeader::m_duration [private] |
Definition at line 167 of file wifi-mac-header.h.
Referenced by Deserialize(), GetDuration(), GetRawDuration(), Print(), Serialize(), SetDuration(), SetId(), and SetRawDuration().
uint8_t ns3::WifiMacHeader::m_qosAckPolicy [private] |
Definition at line 176 of file wifi-mac-header.h.
Referenced by GetQosControl(), IsQosAck(), IsQosBlockAck(), IsQosNoAck(), and SetQosControl().
uint8_t ns3::WifiMacHeader::m_qosEosp [private] |
Definition at line 175 of file wifi-mac-header.h.
Referenced by GetQosControl(), and SetQosControl().
uint16_t ns3::WifiMacHeader::m_qosStuff [private] |
Definition at line 177 of file wifi-mac-header.h.
Referenced by GetQosControl(), GetQosTxopLimit(), SetQosControl(), and SetQosTxopLimit().
uint8_t ns3::WifiMacHeader::m_qosTid [private] |
Definition at line 174 of file wifi-mac-header.h.
Referenced by GetQosControl(), GetQosTid(), SetQosControl(), and SetQosTid().
uint8_t ns3::WifiMacHeader::m_seqFrag [private] |
Definition at line 171 of file wifi-mac-header.h.
Referenced by GetFragmentNumber(), GetSequenceControl(), Print(), SetFragmentNumber(), and SetSequenceControl().
uint16_t ns3::WifiMacHeader::m_seqSeq [private] |
Definition at line 172 of file wifi-mac-header.h.
Referenced by GetSequenceControl(), GetSequenceNumber(), Print(), SetSequenceControl(), and SetSequenceNumber().