Implements the IEEE 802.11 MAC header. More...
#include "wifi-mac-header.h"
Public Types | |
enum | AddressType { ADDR1, ADDR2, ADDR3, ADDR4 } |
Address types. More... | |
enum | QosAckPolicy { NORMAL_ACK = 0, NO_ACK = 1, NO_EXPLICIT_ACK = 2, BLOCK_ACK = 3 } |
ACK policy for QoS frames. More... | |
typedef void(* | TracedCallback) (const WifiMacHeader &header) |
TracedCallback signature for WifiMacHeader. More... | |
Public Member Functions | |
WifiMacHeader () | |
~WifiMacHeader () | |
virtual uint32_t | Deserialize (Buffer::Iterator start) |
Mac48Address | GetAddr1 (void) const |
Return the address in the Address 1 field. More... | |
Mac48Address | GetAddr2 (void) const |
Return the address in the Address 2 field. More... | |
Mac48Address | GetAddr3 (void) const |
Return the address in the Address 3 field. More... | |
Mac48Address | GetAddr4 (void) const |
Return the address in the Address 4 field. More... | |
Time | GetDuration (void) const |
Return the duration from the Duration/ID field (Time object). More... | |
uint16_t | GetFragmentNumber (void) const |
Return the fragment number of the header. More... | |
virtual TypeId | GetInstanceTypeId (void) const |
Get the most derived TypeId for this Object. More... | |
enum QosAckPolicy | GetQosAckPolicy (void) const |
Return the QoS ACK Policy of a QoS header. More... | |
uint8_t | GetQosTid (void) const |
Return the Traffic ID of a QoS header. More... | |
uint8_t | GetQosTxopLimit (void) const |
Return the TXOP limit. More... | |
uint16_t | GetRawDuration (void) const |
Return the raw duration from the Duration/ID field. More... | |
uint16_t | GetSequenceControl (void) const |
Return the raw Sequence Control field. More... | |
uint16_t | GetSequenceNumber (void) const |
Return the sequence number of the header. More... | |
virtual uint32_t | GetSerializedSize (void) const |
uint32_t | GetSize (void) const |
Return the size of the WifiMacHeader in octets. More... | |
enum WifiMacType | GetType (void) const |
Return the type (enum WifiMacType) More... | |
const char * | GetTypeString (void) const |
Return a string corresponds to the header type. More... | |
bool | IsAck (void) const |
Return true if the header is an ACK header. More... | |
bool | IsAction () const |
Return true if the header is an Action header. More... | |
bool | IsAssocReq (void) const |
Return true if the header is an Association Request header. More... | |
bool | IsAssocResp (void) const |
Return true if the header is an Association Response header. More... | |
bool | IsAuthentication (void) const |
Return true if the header is an Authentication header. More... | |
bool | IsBeacon (void) const |
Return true if the header is a Beacon header. More... | |
bool | IsBlockAck (void) const |
Return true if the header is a Block ACK header. More... | |
bool | IsBlockAckReq (void) const |
Return true if the header is a Block ACK Request header. More... | |
bool | IsCfpoll (void) const |
Return true if the Type/Subtype is one of the possible CF-Poll headers. More... | |
bool | IsCtl (void) const |
Return true if the Type is Control. More... | |
bool | IsCts (void) const |
Return true if the header is a CTS header. More... | |
bool | IsData (void) const |
Return true if the Type is DATA. More... | |
bool | IsDeauthentication (void) const |
Return true if the header is a Deauthentication header. More... | |
bool | IsDisassociation (void) const |
Return true if the header is a Disassociation header. More... | |
bool | IsFromDs (void) const |
bool | IsMgt (void) const |
Return true if the Type is Management. More... | |
bool | IsMoreFragments (void) const |
Return if the More Fragment bit is set. More... | |
bool | IsMultihopAction () const |
Check if the header is a Multihop action header. More... | |
bool | IsProbeReq (void) const |
Return true if the header is a Probe Request header. More... | |
bool | IsProbeResp (void) const |
Return true if the header is a Probe Response header. More... | |
bool | IsQosAck (void) const |
Return if the QoS ACK policy is Normal ACK. More... | |
bool | IsQosAmsdu (void) const |
Check if the A-MSDU present bit is set in the QoS control field. More... | |
bool | IsQosBlockAck (void) const |
Return if the QoS ACK policy is Block ACK. More... | |
bool | IsQosData (void) const |
Return true if the Type is DATA and Subtype is one of the possible values for QoS DATA. More... | |
bool | IsQosEosp (void) const |
Return if the end of service period (EOSP) is set. More... | |
bool | IsQosNoAck (void) const |
Return if the QoS ACK policy is No ACK. More... | |
bool | IsReassocReq (void) const |
Return true if the header is a Reassociation Request header. More... | |
bool | IsReassocResp (void) const |
Return true if the header is a Reassociation Response header. More... | |
bool | IsRetry (void) const |
Return if the Retry bit is set. More... | |
bool | IsRts (void) const |
Return true if the header is a RTS header. More... | |
bool | IsToDs (void) const |
virtual void | Print (std::ostream &os) const |
virtual void | Serialize (Buffer::Iterator start) const |
void | SetAction () |
Set Type/Subtype values for an action header. More... | |
void | SetAddr1 (Mac48Address address) |
Fill the Address 1 field with the given address. More... | |
void | SetAddr2 (Mac48Address address) |
Fill the Address 2 field with the given address. More... | |
void | SetAddr3 (Mac48Address address) |
Fill the Address 3 field with the given address. More... | |
void | SetAddr4 (Mac48Address address) |
Fill the Address 4 field with the given address. More... | |
void | SetAssocReq (void) |
Set Type/Subtype values for an association request header. More... | |
void | SetAssocResp (void) |
Set Type/Subtype values for an association response header. More... | |
void | SetBeacon (void) |
Set Type/Subtype values for a beacon header. More... | |
void | SetBlockAck (void) |
Set Type/Subtype values for a Block Ack header. More... | |
void | SetBlockAckReq (void) |
Set Type/Subtype values for a Block Ack Request header. More... | |
void | SetDsFrom (void) |
Set the From DS bit in the Frame Control field. More... | |
void | SetDsNotFrom (void) |
Un-set the From DS bit in the Frame Control field. More... | |
void | SetDsNotTo (void) |
Un-set the To DS bit in the Frame Control field. More... | |
void | SetDsTo (void) |
Set the To DS bit in the Frame Control field. More... | |
void | SetDuration (Time duration) |
Set the Duration/ID field with the given duration (Time object). More... | |
void | SetFragmentNumber (uint8_t frag) |
Set the fragment number of the header. More... | |
void | SetId (uint16_t id) |
Set the Duration/ID field with the given ID. More... | |
void | SetMoreFragments (void) |
Set the More Fragment bit in the Frame Control field. More... | |
void | SetMultihopAction () |
Set Type/Subtype values for a multihop action header. More... | |
void | SetNoMoreFragments (void) |
Un-set the More Fragment bit in the Frame Control Field. More... | |
void | SetNoOrder (void) |
Unset order bit in the frame control field. More... | |
void | SetNoRetry (void) |
Un-set the Retry bit in the Frame Control field. More... | |
void | SetOrder (void) |
Set order bit in the frame control field. More... | |
void | SetProbeReq (void) |
Set Type/Subtype values for a probe request header. More... | |
void | SetProbeResp (void) |
Set Type/Subtype values for a probe response header. More... | |
void | SetQosAckPolicy (enum QosAckPolicy policy) |
Set the QoS ACK policy in the QoS control field. More... | |
void | SetQosAmsdu (void) |
Set that A-MSDU is present. More... | |
void | SetQosBlockAck (void) |
Set the QoS ACK policy in the QoS control field to block ACK. More... | |
void | SetQosEosp () |
Set the end of service period (EOSP) bit in the QoS control field. More... | |
void | SetQosMeshControlPresent () |
Set the Mesh Control Present flag for the QoS header. More... | |
void | SetQosNoAck (void) |
Set the QoS ACK policy in the QoS control field to no ACK. More... | |
void | SetQosNoAmsdu (void) |
Set that A-MSDU is not present. More... | |
void | SetQosNoEosp () |
Un-set the end of service period (EOSP) bit in the QoS control field. More... | |
void | SetQosNoMeshControlPresent () |
Clear the Mesh Control Present flag for the QoS header. More... | |
void | SetQosNormalAck (void) |
Set the QoS ACK policy in the QoS control field to normal ACK. More... | |
void | SetQosTid (uint8_t tid) |
Set the TID for the QoS header. More... | |
void | SetQosTxopLimit (uint8_t txop) |
Set TXOP limit in the QoS control field. More... | |
void | SetRawDuration (uint16_t duration) |
Set the Duration/ID field with the given raw uint16_t value. More... | |
void | SetRetry (void) |
Set the Retry bit in the Frame Control field. More... | |
void | SetSequenceNumber (uint16_t seq) |
Set the sequence number of the header. More... | |
void | SetType (enum WifiMacType type) |
Set Type/Subtype values with the correct values depending on the given type. More... | |
void | SetTypeData (void) |
Set Type/Subtype values for a data packet with no subtype equal to 0. More... | |
![]() | |
virtual | ~Header () |
![]() | |
virtual | ~ObjectBase () |
Virtual destructor. More... | |
void | GetAttribute (std::string name, AttributeValue &value) const |
Get the value of an attribute, raising fatal errors if unsuccessful. More... | |
bool | GetAttributeFailSafe (std::string name, AttributeValue &value) const |
Get the value of an attribute without raising erros. More... | |
void | SetAttribute (std::string name, const AttributeValue &value) |
Set a single attribute, raising fatal errors if unsuccessful. More... | |
bool | SetAttributeFailSafe (std::string name, const AttributeValue &value) |
Set a single attribute without raising errors. More... | |
bool | TraceConnect (std::string name, std::string context, const CallbackBase &cb) |
Connect a TraceSource to a Callback with a context. More... | |
bool | TraceConnectWithoutContext (std::string name, const CallbackBase &cb) |
Connect a TraceSource to a Callback without a context. More... | |
bool | TraceDisconnect (std::string name, std::string context, const CallbackBase &cb) |
Disconnect from a TraceSource a Callback previously connected with a context. More... | |
bool | TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb) |
Disconnect from a TraceSource a Callback previously connected without a context. More... | |
Static Public Member Functions | |
static TypeId | GetTypeId (void) |
![]() | |
static TypeId | GetTypeId (void) |
Get the type ID. More... | |
![]() | |
static TypeId | GetTypeId (void) |
Get the type ID. More... | |
![]() | |
static TypeId | GetTypeId (void) |
Get the type ID. More... | |
Private Member Functions | |
uint16_t | GetFrameControl (void) const |
Return the raw Frame Control field. More... | |
uint16_t | GetQosControl (void) const |
Return the raw QoS Control field. More... | |
void | PrintFrameControl (std::ostream &os) const |
Print the Frame Control field to the output stream. More... | |
void | SetFrameControl (uint16_t control) |
Set the Frame Control field with the given raw value. More... | |
void | SetQosControl (uint16_t qos) |
Set the QoS Control field with the given raw value. More... | |
void | SetSequenceControl (uint16_t seq) |
Set the Sequence Control field with the given raw value. More... | |
Private Attributes | |
Mac48Address | m_addr1 |
Mac48Address | m_addr2 |
Mac48Address | m_addr3 |
Mac48Address | m_addr4 |
uint8_t | m_amsduPresent |
uint8_t | m_ctrlFromDs |
uint8_t | m_ctrlMoreData |
uint8_t | m_ctrlMoreFrag |
uint8_t | m_ctrlOrder |
uint8_t | m_ctrlRetry |
uint8_t | m_ctrlSubtype |
uint8_t | m_ctrlToDs |
uint8_t | m_ctrlType |
uint8_t | m_ctrlWep |
uint16_t | m_duration |
uint8_t | m_qosAckPolicy |
uint8_t | m_qosEosp |
uint16_t | m_qosStuff |
uint8_t | m_qosTid |
uint8_t | m_seqFrag |
uint16_t | m_seqSeq |
Additional Inherited Members | |
![]() | |
void | ConstructSelf (const AttributeConstructionList &attributes) |
Complete construction of ObjectBase; invoked by derived classes. More... | |
virtual void | NotifyConstructionCompleted (void) |
Notifier called once the ObjectBase is fully constructed. More... | |
![]() | |
static TypeId | GetObjectIid (void) |
Ensure the TypeId for ObjectBase gets fully configured to anchor the inheritance tree properly. More... | |
Implements the IEEE 802.11 MAC header.
Introspection did not find any typical Config paths.
No Attributes are defined for this type.
No TraceSources are defined for this type.
Size of this type is 56 bytes (on a 64-bit architecture).
Definition at line 81 of file wifi-mac-header.h.
typedef void(* ns3::WifiMacHeader::TracedCallback) (const WifiMacHeader &header) |
TracedCallback signature for WifiMacHeader.
[in] | header | The header |
Definition at line 598 of file wifi-mac-header.h.
ns3::WifiMacHeader::WifiMacHeader | ( | ) |
Definition at line 49 of file wifi-mac-header.cc.
ns3::WifiMacHeader::~WifiMacHeader | ( | ) |
Definition at line 57 of file wifi-mac-header.cc.
|
virtual |
start | an iterator which points to where the header should read from. |
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.
Note that data is not actually removed from the buffer to which the iterator points. Both Packet::RemoveHeader() and Packet::PeekHeader() call Deserialize(), but only the RemoveHeader() has additional statements to remove the header bytes from the underlying buffer and associated metadata.
Implements ns3::Header.
Definition at line 1221 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, ns3::ReadFrom(), ns3::Buffer::Iterator::ReadLsbtohU16(), SetFrameControl(), SetQosControl(), SetSequenceControl(), visualizer.core::start(), 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 |
Return the address in the Address 1 field.
Definition at line 467 of file wifi-mac-header.cc.
References m_addr1.
Referenced by ns3::MacLow::AggregateToAmpdu(), ns3::MacLow::CalculateOverallTxTime(), ns3::MacLow::CalculateTransmissionTime(), ns3::EdcaTxopN::CompleteMpduTx(), ns3::EdcaTxopN::CompleteTx(), ns3::MacLow::CtsTimeout(), ns3::MacLow::DeaggregateAmpduAndReceive(), ns3::MacLow::FastAckTimeout(), ns3::MeshWifiInterfaceMac::ForwardDown(), ns3::MacLow::ForwardDown(), ns3::MacLow::GetDataTxVector(), ns3::DcaTxop::GetFragmentOffset(), ns3::EdcaTxopN::GetFragmentOffset(), ns3::DcaTxop::GetFragmentSize(), ns3::EdcaTxopN::GetFragmentSize(), ns3::DcaTxop::GetNextFragmentSize(), ns3::EdcaTxopN::GetNextFragmentSize(), ns3::BlockAckManager::GetNextPacket(), ns3::MacTxMiddle::GetNextSequenceNumberfor(), ns3::MacLow::GetRtsTxVector(), ns3::EdcaTxopN::GotAck(), ns3::DcaTxop::IsLastFragment(), ns3::EdcaTxopN::IsLastFragment(), ns3::EdcaTxopN::MapDestAddressForAggregation(), ns3::DcaTxop::MissedAck(), ns3::EdcaTxopN::MissedAck(), ns3::EdcaTxopN::MissedBlockAck(), ns3::DcaTxop::MissedCts(), ns3::EdcaTxopN::MissedCts(), ns3::EdcaTxopN::NeedBarRetransmission(), ns3::DcaTxop::NeedDataRetransmission(), ns3::EdcaTxopN::NeedDataRetransmission(), ns3::DcaTxop::NeedFragmentation(), ns3::EdcaTxopN::NeedFragmentation(), ns3::MacLow::NeedRts(), ns3::DcaTxop::NeedRtsRetransmission(), ns3::EdcaTxopN::NeedRtsRetransmission(), ns3::MacLow::NormalAckTimeout(), ns3::DcaTxop::NotifyAccessGranted(), ns3::EdcaTxopN::NotifyAccessGranted(), ns3::MacLow::NotifyNav(), ns3::BlockAckManager::PeekNextPacket(), ns3::MacTxMiddle::PeekNextSequenceNumberfor(), ns3::MacLow::PerformMsduAggregation(), NodeStatistics::PhyCallback(), ns3::aodv::Neighbors::ProcessTxError(), ns3::dsr::DsrRouteCache::ProcessTxError(), ns3::EdcaTxopN::PushFront(), ns3::DcaTxop::Queue(), ns3::EdcaTxopN::Queue(), ns3::flame::FlameProtocolMac::Receive(), ns3::MacRxMiddle::Receive(), ns3::AdhocWifiMac::Receive(), ns3::StaWifiMac::Receive(), ns3::ApWifiMac::Receive(), ns3::MeshWifiInterfaceMac::Receive(), ns3::OcbWifiMac::Receive(), ns3::RegularWifiMac::Receive(), ns3::MacLow::ReceiveError(), ns3::MacLow::ReceiveOk(), ns3::BlockAckManager::RemovePacket(), ns3::MacLow::SendCtsToSelf(), ns3::MacLow::SendDataAfterCts(), ns3::MacLow::SendDataPacket(), ns3::MeshWifiInterfaceMac::SendManagementFrame(), ns3::MacLow::SendRtsForPacket(), ns3::EdcaTxopN::SetupBlockAckIfNeeded(), ns3::MacLow::StartDataTxTimers(), ns3::MacLow::StartTransmission(), ns3::MacLow::StopMpduAggregation(), ns3::BlockAckManager::StorePacket(), ns3::MacLow::SuperFastAckTimeout(), ns3::dot11s::PeerManagementProtocolMac::TxError(), ns3::ApWifiMac::TxFailed(), ns3::dot11s::PeerManagementProtocolMac::TxOk(), ns3::ApWifiMac::TxOk(), ns3::dot11s::PeerManagementProtocolMac::UpdateOutcomingFrame(), and ns3::EdcaTxopN::VerifyBlockAck().
Mac48Address ns3::WifiMacHeader::GetAddr2 | ( | void | ) | const |
Return the address in the Address 2 field.
Definition at line 473 of file wifi-mac-header.cc.
References m_addr2.
Referenced by ns3::MacLow::DeaggregateAmpduAndReceive(), ns3::MacRxMiddle::Lookup(), ns3::EdcaTxopN::MapSrcAddressForAggregation(), ns3::dsr::DsrRouting::NotifyDataReceipt(), ns3::MacLow::NotifyNav(), ns3::flame::FlameProtocolMac::Receive(), ns3::dot11s::PeerManagementProtocolMac::Receive(), ns3::MacRxMiddle::Receive(), ns3::AdhocWifiMac::Receive(), ns3::StaWifiMac::Receive(), ns3::ApWifiMac::Receive(), ns3::MeshWifiInterfaceMac::Receive(), ns3::OcbWifiMac::Receive(), ns3::RegularWifiMac::Receive(), ns3::dot11s::HwmpProtocolMac::ReceiveAction(), ns3::MacLow::ReceiveError(), ns3::MacLow::ReceiveMpdu(), ns3::MacLow::SendCtsToSelf(), ns3::MacLow::SendDataAfterCts(), ns3::MacLow::SendDataPacket(), ns3::MacLow::SendRtsForPacket(), ns3::MacLow::StoreMpduIfNeeded(), and ns3::AnimationInterface::WifiPhyRxBeginTrace().
Mac48Address ns3::WifiMacHeader::GetAddr3 | ( | void | ) | const |
Return the address in the Address 3 field.
Definition at line 479 of file wifi-mac-header.cc.
References m_addr3.
Referenced by ns3::EdcaTxopN::MapDestAddressForAggregation(), ns3::EdcaTxopN::MapSrcAddressForAggregation(), ns3::dot11s::PeerManagementProtocolMac::Receive(), ns3::StaWifiMac::Receive(), ns3::ApWifiMac::Receive(), ns3::MeshWifiInterfaceMac::Receive(), ns3::OcbWifiMac::Receive(), ns3::dot11s::HwmpProtocolMac::ReceiveAction(), and ns3::dot11s::HwmpProtocolMac::ReceiveData().
Mac48Address ns3::WifiMacHeader::GetAddr4 | ( | void | ) | const |
Return the address in the Address 4 field.
Definition at line 485 of file wifi-mac-header.cc.
References m_addr4.
Referenced by ns3::MeshWifiInterfaceMac::Receive(), and ns3::dot11s::HwmpProtocolMac::ReceiveData().
Time ns3::WifiMacHeader::GetDuration | ( | void | ) | const |
Return the duration from the Duration/ID field (Time object).
Definition at line 782 of file wifi-mac-header.cc.
References m_duration, and ns3::MicroSeconds().
Referenced by ns3::MacLow::DeaggregateAmpduAndReceive(), ns3::MacLow::ForwardDown(), ns3::MacLow::NotifyNav(), and ns3::MacLow::ReceiveError().
uint16_t ns3::WifiMacHeader::GetFragmentNumber | ( | void | ) | const |
Return the fragment number of the header.
Definition at line 800 of file wifi-mac-header.cc.
References m_seqFrag.
Referenced by ns3::MacRxMiddle::HandleFragments(), ns3::MacRxMiddle::Receive(), and ns3::BlockAckCache::UpdateWithMpdu().
|
private |
Return the raw Frame Control field.
Definition at line 890 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().
|
virtual |
Get the most derived TypeId for this Object.
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 1054 of file wifi-mac-header.cc.
References GetTypeId().
enum WifiMacHeader::QosAckPolicy ns3::WifiMacHeader::GetQosAckPolicy | ( | void | ) | const |
Return the QoS ACK Policy of a QoS header.
Definition at line 860 of file wifi-mac-header.cc.
References BLOCK_ACK, m_qosAckPolicy, NO_ACK, NO_EXPLICIT_ACK, NORMAL_ACK, and NS_ASSERT.
|
private |
Return the raw QoS Control field.
Definition at line 906 of file wifi-mac-header.cc.
References m_amsduPresent, m_qosAckPolicy, m_qosEosp, m_qosStuff, and m_qosTid.
Referenced by Serialize().
uint8_t ns3::WifiMacHeader::GetQosTid | ( | void | ) | const |
Return the Traffic ID of a QoS header.
Definition at line 853 of file wifi-mac-header.cc.
References IsQosData(), m_qosTid, and NS_ASSERT.
Referenced by ns3::EdcaTxopN::CompleteMpduTx(), ns3::EdcaTxopN::CompleteTx(), ns3::MacLow::DeaggregateAmpduAndReceive(), ns3::ApWifiMac::DeaggregateAmsduAndForward(), ns3::BlockAckManager::GetNextPacket(), ns3::MacTxMiddle::GetNextSequenceNumberfor(), ns3::MacLow::GetTid(), ns3::MacRxMiddle::Lookup(), ns3::WifiRemoteStationManager::Lookup(), ns3::EdcaTxopN::MissedAck(), ns3::EdcaTxopN::MissedBlockAck(), ns3::EdcaTxopN::MissedCts(), ns3::EdcaTxopN::NeedBarRetransmission(), ns3::EdcaTxopN::NotifyAccessGranted(), ns3::MacTxMiddle::PeekNextSequenceNumberfor(), ns3::MacLow::PerformMsduAggregation(), ns3::ApWifiMac::Receive(), ns3::MeshWifiInterfaceMac::Receive(), ns3::MacLow::ReceiveError(), ns3::MacLow::ReceiveMpdu(), ns3::BlockAckManager::RemovePacket(), ns3::EdcaTxopN::SetupBlockAckIfNeeded(), ns3::MacLow::StoreMpduIfNeeded(), ns3::BlockAckManager::StorePacket(), and ns3::EdcaTxopN::VerifyBlockAck().
uint8_t ns3::WifiMacHeader::GetQosTxopLimit | ( | void | ) | const |
Return the TXOP limit.
Definition at line 883 of file wifi-mac-header.cc.
References IsQosData(), m_qosStuff, and NS_ASSERT.
uint16_t ns3::WifiMacHeader::GetRawDuration | ( | void | ) | const |
Return the raw duration from the Duration/ID field.
Definition at line 776 of file wifi-mac-header.cc.
References m_duration.
uint16_t ns3::WifiMacHeader::GetSequenceControl | ( | void | ) | const |
Return the raw Sequence Control field.
Definition at line 788 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::EdcaTxopN::NotifyAccessGranted(), ns3::MacRxMiddle::Receive(), Serialize(), and ns3::MacLow::StoreMpduIfNeeded().
uint16_t ns3::WifiMacHeader::GetSequenceNumber | ( | void | ) | const |
Return the sequence number of the header.
Definition at line 794 of file wifi-mac-header.cc.
References m_seqSeq.
Referenced by ns3::MacLow::AggregateToAmpdu(), ns3::MacLow::DeaggregateAmpduAndReceive(), AmpduAggregationTest::DoRun(), ns3::BlockAckManager::GetNextPacket(), ns3::MacRxMiddle::HandleFragments(), ns3::BlockAckManager::HasOtherFragments(), ns3::EdcaTxopN::MissedBlockAck(), ns3::EdcaTxopN::NeedBarRetransmission(), ns3::BlockAckManager::PeekNextPacket(), ns3::MacRxMiddle::Receive(), ns3::MacLow::ReceiveMpdu(), ns3::BlockAckManager::RemovePacket(), ns3::BlockAckManager::StorePacket(), ns3::BlockAckCache::UpdateWithMpdu(), and ns3::EdcaTxopN::VerifyBlockAck().
|
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 1162 of file wifi-mac-header.cc.
References GetSize().
Referenced by ns3::MacLow::NotifyNav().
uint32_t ns3::WifiMacHeader::GetSize | ( | void | ) | const |
Return the size of the WifiMacHeader in octets.
GetSerializedSize calls this function.
Definition at line 947 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_CTLWRAPPER, ns3::SUBTYPE_CTL_CTS, ns3::SUBTYPE_CTL_RTS, ns3::TYPE_CTL, ns3::TYPE_DATA, and ns3::TYPE_MGT.
Referenced by ns3::MacLow::AggregateToAmpdu(), ns3::MacLow::GetAckSize(), ns3::MacLow::GetBlockAckSize(), ns3::MacLow::GetCtsSize(), ns3::WifiRemoteStationManager::GetFragmentOffset(), ns3::WifiRemoteStationManager::GetFragmentSize(), ns3::WifiRemoteStationManager::GetNFragments(), ns3::MacLow::GetRtsSize(), GetSerializedSize(), ns3::MacLow::GetSize(), ns3::MacRxMiddle::HandleFragments(), ns3::MacLow::IsAmpdu(), ns3::WifiRemoteStationManager::NeedFragmentation(), ns3::WifiRemoteStationManager::NeedRts(), and ns3::MacLow::StopMpduAggregation().
enum WifiMacType ns3::WifiMacHeader::GetType | ( | void | ) | const |
Return the type (enum WifiMacType)
Definition at line 491 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_ACTION, ns3::WIFI_MAC_MGT_ACTION_NO_ACK, 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_MULTIHOP_ACTION, 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(), IsAction(), IsAssocReq(), IsAssocResp(), IsAuthentication(), IsBeacon(), IsBlockAck(), IsBlockAckReq(), IsCfpoll(), IsCts(), IsDeauthentication(), IsDisassociation(), IsMultihopAction(), IsProbeReq(), IsProbeResp(), IsReassocReq(), IsReassocResp(), IsRts(), ns3::EdcaTxopN::NotifyAccessGranted(), NodeStatistics::PhyCallback(), Print(), and ns3::RegularWifiMac::Receive().
|
static |
Definition at line 1043 of file wifi-mac-header.cc.
References ns3::TypeId::SetParent().
Referenced by GetInstanceTypeId().
const char * ns3::WifiMacHeader::GetTypeString | ( | void | ) | const |
Return a string corresponds to the header type.
Definition at line 990 of file wifi-mac-header.cc.
References ns3::DATA, FOO, and GetType().
Referenced by ns3::MacLow::ForwardDown(), and Print().
bool ns3::WifiMacHeader::IsAck | ( | void | ) | const |
Return true if the header is an ACK header.
Definition at line 686 of file wifi-mac-header.cc.
References GetType(), and ns3::WIFI_MAC_CTL_ACK.
Referenced by ns3::MacLow::DeaggregateAmpduAndReceive().
bool ns3::WifiMacHeader::IsAction | ( | void | ) | const |
Return true if the header is an Action header.
Definition at line 752 of file wifi-mac-header.cc.
References GetType(), and ns3::WIFI_MAC_MGT_ACTION.
Referenced by ns3::EdcaTxopN::GotAck(), ns3::dot11s::PeerManagementProtocolMac::Receive(), ns3::dot11s::HwmpProtocolMac::Receive(), ns3::OcbWifiMac::Receive(), ns3::RegularWifiMac::Receive(), and ns3::dot11s::PeerManagementProtocolMac::UpdateOutcomingFrame().
bool ns3::WifiMacHeader::IsAssocReq | ( | void | ) | const |
Return true if the header is an Association Request header.
Definition at line 692 of file wifi-mac-header.cc.
References GetType(), and ns3::WIFI_MAC_MGT_ASSOCIATION_REQUEST.
Referenced by ns3::StaWifiMac::Receive(), and ns3::ApWifiMac::Receive().
bool ns3::WifiMacHeader::IsAssocResp | ( | void | ) | const |
Return true if the header is an Association Response header.
Definition at line 698 of file wifi-mac-header.cc.
References GetType(), and ns3::WIFI_MAC_MGT_ASSOCIATION_RESPONSE.
Referenced by ns3::StaWifiMac::Receive(), ns3::ApWifiMac::TxFailed(), and ns3::ApWifiMac::TxOk().
bool ns3::WifiMacHeader::IsAuthentication | ( | void | ) | const |
Return true if the header is an Authentication header.
Definition at line 740 of file wifi-mac-header.cc.
References GetType(), and ns3::WIFI_MAC_MGT_AUTHENTICATION.
bool ns3::WifiMacHeader::IsBeacon | ( | void | ) | const |
Return true if the header is a Beacon header.
Definition at line 728 of file wifi-mac-header.cc.
References GetType(), and ns3::WIFI_MAC_MGT_BEACON.
Referenced by ns3::dot11s::PeerManagementProtocolMac::Receive(), ns3::StaWifiMac::Receive(), and ns3::MeshWifiInterfaceMac::Receive().
bool ns3::WifiMacHeader::IsBlockAck | ( | void | ) | const |
Return true if the header is a Block ACK header.
Definition at line 770 of file wifi-mac-header.cc.
References GetType(), and ns3::WIFI_MAC_CTL_BACKRESP.
Referenced by ns3::MacLow::AggregateToAmpdu(), ns3::MacLow::DeaggregateAmpduAndReceive(), ns3::MacLow::ForwardDown(), ns3::MacLow::GetTid(), ns3::EdcaTxopN::MissedBlockAck(), ns3::EdcaTxopN::NeedBarRetransmission(), and ns3::MacLow::StartTransmission().
bool ns3::WifiMacHeader::IsBlockAckReq | ( | void | ) | const |
Return true if the header is a Block ACK Request header.
Definition at line 764 of file wifi-mac-header.cc.
References GetType(), and ns3::WIFI_MAC_CTL_BACKREQ.
Referenced by ns3::MacLow::AggregateToAmpdu(), ns3::MacLow::DeaggregateAmpduAndReceive(), ns3::MacLow::GetTid(), ns3::EdcaTxopN::MissedBlockAck(), ns3::EdcaTxopN::MissedCts(), ns3::EdcaTxopN::NeedBarRetransmission(), and ns3::MacLow::StartTransmission().
bool ns3::WifiMacHeader::IsCfpoll | ( | void | ) | const |
Return true if the Type/Subtype is one of the possible CF-Poll headers.
Definition at line 653 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 |
Return true if the Type is Control.
Definition at line 641 of file wifi-mac-header.cc.
References m_ctrlType, and ns3::TYPE_CTL.
Referenced by ns3::AdhocWifiMac::Receive(), ns3::StaWifiMac::Receive(), and ns3::OcbWifiMac::Receive().
bool ns3::WifiMacHeader::IsCts | ( | void | ) | const |
Return true if the header is a CTS header.
Definition at line 680 of file wifi-mac-header.cc.
References GetType(), and ns3::WIFI_MAC_CTL_CTS.
bool ns3::WifiMacHeader::IsData | ( | void | ) | const |
Return true if the Type is DATA.
The method does not check the Subtype field. (e.g. the header may be DATA with QoS)
Definition at line 628 of file wifi-mac-header.cc.
References m_ctrlType, and ns3::TYPE_DATA.
Referenced by ns3::MacLow::DeaggregateAmpduAndReceive(), ns3::EdcaTxopN::NotifyAccessGranted(), OcbWifiMacTestCase::PhyTxTrace(), ns3::flame::FlameProtocolMac::Receive(), ns3::dot11s::HwmpProtocolMac::Receive(), ns3::MacRxMiddle::Receive(), ns3::AdhocWifiMac::Receive(), ns3::StaWifiMac::Receive(), ns3::ApWifiMac::Receive(), ns3::MeshWifiInterfaceMac::Receive(), ns3::OcbWifiMac::Receive(), ns3::dot11s::HwmpProtocolMac::ReceiveData(), ns3::flame::FlameProtocolMac::UpdateOutcomingFrame(), and ns3::dot11s::HwmpProtocolMac::UpdateOutcomingFrame().
bool ns3::WifiMacHeader::IsDeauthentication | ( | void | ) | const |
Return true if the header is a Deauthentication header.
Definition at line 746 of file wifi-mac-header.cc.
References GetType(), and ns3::WIFI_MAC_MGT_DEAUTHENTICATION.
bool ns3::WifiMacHeader::IsDisassociation | ( | void | ) | const |
Return true if the header is a Disassociation header.
Definition at line 734 of file wifi-mac-header.cc.
References GetType(), and ns3::WIFI_MAC_MGT_DISASSOCIATION.
Referenced by ns3::ApWifiMac::Receive().
bool ns3::WifiMacHeader::IsFromDs | ( | void | ) | const |
Definition at line 616 of file wifi-mac-header.cc.
References m_ctrlFromDs.
Referenced by ns3::StaWifiMac::Receive(), and ns3::ApWifiMac::Receive().
bool ns3::WifiMacHeader::IsMgt | ( | void | ) | const |
Return true if the Type is Management.
Definition at line 647 of file wifi-mac-header.cc.
References m_ctrlType, and ns3::TYPE_MGT.
Referenced by ns3::MacRxMiddle::Receive(), ns3::ApWifiMac::Receive(), ns3::OcbWifiMac::Receive(), and ns3::RegularWifiMac::Receive().
bool ns3::WifiMacHeader::IsMoreFragments | ( | void | ) | const |
Return if the More Fragment bit is set.
Definition at line 812 of file wifi-mac-header.cc.
References m_ctrlMoreFrag.
Referenced by ns3::MacRxMiddle::HandleFragments().
bool ns3::WifiMacHeader::IsMultihopAction | ( | void | ) | const |
Check if the header is a Multihop action header.
Definition at line 758 of file wifi-mac-header.cc.
References GetType(), and ns3::WIFI_MAC_MGT_MULTIHOP_ACTION.
bool ns3::WifiMacHeader::IsProbeReq | ( | void | ) | const |
Return true if the header is a Probe Request header.
Definition at line 716 of file wifi-mac-header.cc.
References GetType(), and ns3::WIFI_MAC_MGT_PROBE_REQUEST.
Referenced by ns3::StaWifiMac::Receive(), and ns3::ApWifiMac::Receive().
bool ns3::WifiMacHeader::IsProbeResp | ( | void | ) | const |
Return true if the header is a Probe Response header.
Definition at line 722 of file wifi-mac-header.cc.
References GetType(), and ns3::WIFI_MAC_MGT_PROBE_RESPONSE.
Referenced by ns3::StaWifiMac::Receive().
bool ns3::WifiMacHeader::IsQosAck | ( | void | ) | const |
Return if the QoS ACK policy is Normal ACK.
Definition at line 832 of file wifi-mac-header.cc.
References IsQosData(), m_qosAckPolicy, and NS_ASSERT.
Referenced by ns3::MacLow::DeaggregateAmpduAndReceive().
bool ns3::WifiMacHeader::IsQosAmsdu | ( | void | ) | const |
Check if the A-MSDU present bit is set in the QoS control field.
Definition at line 846 of file wifi-mac-header.cc.
References IsQosData(), m_amsduPresent, and NS_ASSERT.
Referenced by ns3::EdcaTxopN::GotAck(), ns3::EdcaTxopN::NotifyAccessGranted(), ns3::AdhocWifiMac::Receive(), ns3::StaWifiMac::Receive(), ns3::ApWifiMac::Receive(), and ns3::OcbWifiMac::Receive().
bool ns3::WifiMacHeader::IsQosBlockAck | ( | void | ) | const |
Return if the QoS ACK policy is Block ACK.
Definition at line 818 of file wifi-mac-header.cc.
References IsQosData(), m_qosAckPolicy, and NS_ASSERT.
Referenced by ns3::EdcaTxopN::CompleteTx(), and ns3::EdcaTxopN::NotifyAccessGranted().
bool ns3::WifiMacHeader::IsQosData | ( | void | ) | const |
Return true if the Type is DATA and Subtype is one of the possible values for QoS DATA.
Definition at line 635 of file wifi-mac-header.cc.
References m_ctrlSubtype, m_ctrlType, and ns3::TYPE_DATA.
Referenced by ns3::MacLow::AggregateToAmpdu(), ns3::EdcaTxopN::CompleteMpduTx(), ns3::EdcaTxopN::CompleteTx(), ns3::MacLow::DeaggregateAmpduAndReceive(), ns3::BlockAckManager::GetNextPacket(), ns3::MacTxMiddle::GetNextSequenceNumberfor(), GetQosTid(), GetQosTxopLimit(), ns3::MacLow::GetTid(), IsQosAck(), IsQosAmsdu(), IsQosBlockAck(), IsQosEosp(), IsQosNoAck(), ns3::MacRxMiddle::Lookup(), ns3::WifiRemoteStationManager::Lookup(), ns3::EdcaTxopN::MissedAck(), ns3::EdcaTxopN::MissedBlockAck(), ns3::EdcaTxopN::MissedCts(), ns3::EdcaTxopN::NeedBarRetransmission(), ns3::EdcaTxopN::NotifyAccessGranted(), ns3::MacTxMiddle::PeekNextSequenceNumberfor(), ns3::AdhocWifiMac::Receive(), ns3::StaWifiMac::Receive(), ns3::ApWifiMac::Receive(), ns3::MeshWifiInterfaceMac::Receive(), ns3::OcbWifiMac::Receive(), ns3::MacLow::ReceiveError(), ns3::MacLow::ReceiveMpdu(), ns3::MacLow::StartTransmission(), and ns3::BlockAckManager::StorePacket().
bool ns3::WifiMacHeader::IsQosEosp | ( | void | ) | const |
Return if the end of service period (EOSP) is set.
Definition at line 839 of file wifi-mac-header.cc.
References IsQosData(), m_qosEosp, and NS_ASSERT.
bool ns3::WifiMacHeader::IsQosNoAck | ( | void | ) | const |
Return if the QoS ACK policy is No ACK.
Definition at line 825 of file wifi-mac-header.cc.
References IsQosData(), m_qosAckPolicy, and NS_ASSERT.
bool ns3::WifiMacHeader::IsReassocReq | ( | void | ) | const |
Return true if the header is a Reassociation Request header.
Definition at line 704 of file wifi-mac-header.cc.
References GetType(), and ns3::WIFI_MAC_MGT_REASSOCIATION_REQUEST.
bool ns3::WifiMacHeader::IsReassocResp | ( | void | ) | const |
Return true if the header is a Reassociation Response header.
Definition at line 710 of file wifi-mac-header.cc.
References GetType(), and ns3::WIFI_MAC_MGT_REASSOCIATION_RESPONSE.
bool ns3::WifiMacHeader::IsRetry | ( | void | ) | const |
Return if the Retry bit is set.
Definition at line 806 of file wifi-mac-header.cc.
References m_ctrlRetry.
Referenced by ns3::EdcaTxopN::CompleteTx(), ns3::MacRxMiddle::IsDuplicate(), and ns3::EdcaTxopN::NotifyAccessGranted().
bool ns3::WifiMacHeader::IsRts | ( | void | ) | const |
Return true if the header is a RTS header.
Definition at line 674 of file wifi-mac-header.cc.
References GetType(), and ns3::WIFI_MAC_CTL_RTS.
Referenced by ns3::MacLow::ForwardDown(), and ns3::MacLow::NotifyNav().
bool ns3::WifiMacHeader::IsToDs | ( | void | ) | const |
Definition at line 622 of file wifi-mac-header.cc.
References m_ctrlToDs.
Referenced by ns3::StaWifiMac::Receive(), and ns3::ApWifiMac::Receive().
|
virtual |
os | output stream This method is used by Packet::Print to print the content of a header as ascii data to a c++ output stream. Although the header 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 1069 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_FATAL_ERROR, PrintFrameControl(), ns3::WIFI_MAC_CTL_ACK, ns3::WIFI_MAC_CTL_BACKREQ, ns3::WIFI_MAC_CTL_BACKRESP, ns3::WIFI_MAC_CTL_CTLWRAPPER, 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_ACTION, ns3::WIFI_MAC_MGT_ACTION_NO_ACK, 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_MULTIHOP_ACTION, 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.
|
private |
Print the Frame Control field to the output stream.
os | the output stream to print to |
Definition at line 1060 of file wifi-mac-header.cc.
References m_ctrlFromDs, m_ctrlMoreData, m_ctrlMoreFrag, m_ctrlRetry, and m_ctrlToDs.
Referenced by Print().
|
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 1168 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::SetAction | ( | void | ) |
Set Type/Subtype values for an action header.
Definition at line 166 of file wifi-mac-header.cc.
References m_ctrlSubtype, m_ctrlType, and ns3::TYPE_MGT.
Referenced by ns3::dot11s::HwmpProtocolMac::ForwardPerr(), ns3::EdcaTxopN::SendAddBaRequest(), ns3::RegularWifiMac::SendAddBaResponse(), ns3::EdcaTxopN::SendDelbaFrame(), ns3::dot11s::PeerManagementProtocolMac::SendPeerLinkManagementFrame(), ns3::dot11s::HwmpProtocolMac::SendPrep(), ns3::dot11s::HwmpProtocolMac::SendPreq(), and ns3::OcbWifiMac::SendVsc().
void ns3::WifiMacHeader::SetAddr1 | ( | Mac48Address | address | ) |
Fill the Address 1 field with the given address.
address | the address to be used in the Address 1 field |
Definition at line 86 of file wifi-mac-header.cc.
References first::address, and m_addr1.
Referenced by ns3::MeshWifiBeacon::CreateHeader(), AmpduAggregationTest::DoRun(), TwoLevelAggregationTest::DoRun(), ns3::StaWifiMac::Enqueue(), ns3::AdhocWifiMac::Enqueue(), ns3::OcbWifiMac::Enqueue(), ns3::MeshWifiInterfaceMac::ForwardDown(), ns3::ApWifiMac::ForwardDown(), ns3::dot11s::HwmpProtocolMac::ForwardPerr(), ns3::EdcaTxopN::MissedAck(), ns3::EdcaTxopN::MissedBlockAck(), ns3::EdcaTxopN::MissedCts(), ns3::MacLow::SendAckAfterData(), ns3::EdcaTxopN::SendAddBaRequest(), ns3::RegularWifiMac::SendAddBaResponse(), ns3::StaWifiMac::SendAssociationRequest(), ns3::ApWifiMac::SendAssocResp(), ns3::EdcaTxopN::SendBlockAckRequest(), ns3::MacLow::SendBlockAckResponse(), ns3::MacLow::SendCtsToSelf(), ns3::EdcaTxopN::SendDelbaFrame(), ns3::ApWifiMac::SendOneBeacon(), ns3::dot11s::PeerManagementProtocolMac::SendPeerLinkManagementFrame(), ns3::dot11s::HwmpProtocolMac::SendPrep(), ns3::dot11s::HwmpProtocolMac::SendPreq(), ns3::StaWifiMac::SendProbeRequest(), ns3::ApWifiMac::SendProbeResp(), ns3::MacLow::SendRtsForPacket(), ns3::OcbWifiMac::SendVsc(), ns3::flame::FlameProtocolMac::UpdateOutcomingFrame(), and ns3::dot11s::HwmpProtocolMac::UpdateOutcomingFrame().
void ns3::WifiMacHeader::SetAddr2 | ( | Mac48Address | address | ) |
Fill the Address 2 field with the given address.
address | the address to be used in the Address 2 field |
Definition at line 92 of file wifi-mac-header.cc.
References first::address, and m_addr2.
Referenced by ns3::MeshWifiBeacon::CreateHeader(), ns3::StaWifiMac::Enqueue(), ns3::AdhocWifiMac::Enqueue(), ns3::OcbWifiMac::Enqueue(), ns3::MeshWifiInterfaceMac::ForwardDown(), ns3::ApWifiMac::ForwardDown(), ns3::dot11s::HwmpProtocolMac::ForwardPerr(), ns3::EdcaTxopN::MissedAck(), ns3::EdcaTxopN::MissedBlockAck(), ns3::EdcaTxopN::MissedCts(), ns3::EdcaTxopN::SendAddBaRequest(), ns3::RegularWifiMac::SendAddBaResponse(), ns3::StaWifiMac::SendAssociationRequest(), ns3::ApWifiMac::SendAssocResp(), ns3::EdcaTxopN::SendBlockAckRequest(), ns3::MacLow::SendBlockAckResponse(), ns3::EdcaTxopN::SendDelbaFrame(), ns3::ApWifiMac::SendOneBeacon(), ns3::dot11s::PeerManagementProtocolMac::SendPeerLinkManagementFrame(), ns3::dot11s::HwmpProtocolMac::SendPrep(), ns3::dot11s::HwmpProtocolMac::SendPreq(), ns3::StaWifiMac::SendProbeRequest(), ns3::ApWifiMac::SendProbeResp(), ns3::MacLow::SendRtsForPacket(), and ns3::OcbWifiMac::SendVsc().
void ns3::WifiMacHeader::SetAddr3 | ( | Mac48Address | address | ) |
Fill the Address 3 field with the given address.
address | the address to be used in the Address 3 field |
Definition at line 98 of file wifi-mac-header.cc.
References first::address, and m_addr3.
Referenced by ns3::MeshWifiBeacon::CreateHeader(), ns3::StaWifiMac::Enqueue(), ns3::AdhocWifiMac::Enqueue(), ns3::OcbWifiMac::Enqueue(), ns3::MeshWifiInterfaceMac::ForwardDown(), ns3::ApWifiMac::ForwardDown(), ns3::dot11s::HwmpProtocolMac::ForwardPerr(), ns3::EdcaTxopN::MissedAck(), ns3::EdcaTxopN::MissedBlockAck(), ns3::EdcaTxopN::MissedCts(), ns3::EdcaTxopN::NotifyAccessGranted(), ns3::MacLow::PerformMsduAggregation(), ns3::EdcaTxopN::SendAddBaRequest(), ns3::RegularWifiMac::SendAddBaResponse(), ns3::StaWifiMac::SendAssociationRequest(), ns3::ApWifiMac::SendAssocResp(), ns3::EdcaTxopN::SendBlockAckRequest(), ns3::EdcaTxopN::SendDelbaFrame(), ns3::ApWifiMac::SendOneBeacon(), ns3::dot11s::PeerManagementProtocolMac::SendPeerLinkManagementFrame(), ns3::dot11s::HwmpProtocolMac::SendPrep(), ns3::dot11s::HwmpProtocolMac::SendPreq(), ns3::StaWifiMac::SendProbeRequest(), ns3::ApWifiMac::SendProbeResp(), and ns3::OcbWifiMac::SendVsc().
void ns3::WifiMacHeader::SetAddr4 | ( | Mac48Address | address | ) |
Fill the Address 4 field with the given address.
address | the address to be used in the Address 4 field |
Definition at line 104 of file wifi-mac-header.cc.
References first::address, and m_addr4.
Referenced by ns3::MeshWifiInterfaceMac::ForwardDown().
void ns3::WifiMacHeader::SetAssocReq | ( | void | ) |
Set Type/Subtype values for an association request header.
Definition at line 110 of file wifi-mac-header.cc.
References m_ctrlSubtype, m_ctrlType, and ns3::TYPE_MGT.
Referenced by ns3::StaWifiMac::SendAssociationRequest().
void ns3::WifiMacHeader::SetAssocResp | ( | void | ) |
Set Type/Subtype values for an association response header.
Definition at line 117 of file wifi-mac-header.cc.
References m_ctrlSubtype, m_ctrlType, and ns3::TYPE_MGT.
Referenced by ns3::ApWifiMac::SendAssocResp().
void ns3::WifiMacHeader::SetBeacon | ( | void | ) |
Set Type/Subtype values for a beacon header.
Definition at line 138 of file wifi-mac-header.cc.
References m_ctrlSubtype, m_ctrlType, and ns3::TYPE_MGT.
Referenced by ns3::MeshWifiBeacon::CreateHeader(), and ns3::ApWifiMac::SendOneBeacon().
void ns3::WifiMacHeader::SetBlockAck | ( | void | ) |
Set Type/Subtype values for a Block Ack header.
Definition at line 152 of file wifi-mac-header.cc.
References m_ctrlSubtype, m_ctrlType, and ns3::TYPE_CTL.
void ns3::WifiMacHeader::SetBlockAckReq | ( | void | ) |
Set Type/Subtype values for a Block Ack Request header.
Definition at line 145 of file wifi-mac-header.cc.
References m_ctrlSubtype, m_ctrlType, and ns3::TYPE_CTL.
void ns3::WifiMacHeader::SetDsFrom | ( | void | ) |
Set the From DS bit in the Frame Control field.
Definition at line 62 of file wifi-mac-header.cc.
References m_ctrlFromDs.
Referenced by ns3::MeshWifiInterfaceMac::ForwardDown(), ns3::ApWifiMac::ForwardDown(), and ns3::dot11s::AirtimeLinkMetricCalculator::SetHeaderTid().
void ns3::WifiMacHeader::SetDsNotFrom | ( | void | ) |
Un-set the From DS bit in the Frame Control field.
Definition at line 68 of file wifi-mac-header.cc.
References m_ctrlFromDs.
Referenced by ns3::MeshWifiBeacon::CreateHeader(), ns3::StaWifiMac::Enqueue(), ns3::AdhocWifiMac::Enqueue(), ns3::OcbWifiMac::Enqueue(), ns3::dot11s::HwmpProtocolMac::ForwardPerr(), ns3::EdcaTxopN::MissedAck(), ns3::EdcaTxopN::MissedBlockAck(), ns3::EdcaTxopN::MissedCts(), ns3::MacLow::SendAckAfterData(), ns3::EdcaTxopN::SendAddBaRequest(), ns3::RegularWifiMac::SendAddBaResponse(), ns3::StaWifiMac::SendAssociationRequest(), ns3::ApWifiMac::SendAssocResp(), ns3::EdcaTxopN::SendBlockAckRequest(), ns3::MacLow::SendBlockAckResponse(), ns3::MacLow::SendCtsToSelf(), ns3::EdcaTxopN::SendDelbaFrame(), ns3::ApWifiMac::SendOneBeacon(), ns3::dot11s::PeerManagementProtocolMac::SendPeerLinkManagementFrame(), ns3::dot11s::HwmpProtocolMac::SendPrep(), ns3::dot11s::HwmpProtocolMac::SendPreq(), ns3::StaWifiMac::SendProbeRequest(), ns3::ApWifiMac::SendProbeResp(), ns3::MacLow::SendRtsForPacket(), and ns3::OcbWifiMac::SendVsc().
void ns3::WifiMacHeader::SetDsNotTo | ( | void | ) |
Un-set the To DS bit in the Frame Control field.
Definition at line 80 of file wifi-mac-header.cc.
References m_ctrlToDs.
Referenced by ns3::MeshWifiBeacon::CreateHeader(), ns3::AdhocWifiMac::Enqueue(), ns3::OcbWifiMac::Enqueue(), ns3::ApWifiMac::ForwardDown(), ns3::dot11s::HwmpProtocolMac::ForwardPerr(), ns3::EdcaTxopN::MissedAck(), ns3::EdcaTxopN::MissedBlockAck(), ns3::EdcaTxopN::MissedCts(), ns3::MacLow::SendAckAfterData(), ns3::EdcaTxopN::SendAddBaRequest(), ns3::RegularWifiMac::SendAddBaResponse(), ns3::StaWifiMac::SendAssociationRequest(), ns3::ApWifiMac::SendAssocResp(), ns3::EdcaTxopN::SendBlockAckRequest(), ns3::MacLow::SendBlockAckResponse(), ns3::MacLow::SendCtsToSelf(), ns3::EdcaTxopN::SendDelbaFrame(), ns3::ApWifiMac::SendOneBeacon(), ns3::dot11s::PeerManagementProtocolMac::SendPeerLinkManagementFrame(), ns3::dot11s::HwmpProtocolMac::SendPrep(), ns3::dot11s::HwmpProtocolMac::SendPreq(), ns3::StaWifiMac::SendProbeRequest(), ns3::ApWifiMac::SendProbeResp(), ns3::MacLow::SendRtsForPacket(), and ns3::OcbWifiMac::SendVsc().
void ns3::WifiMacHeader::SetDsTo | ( | void | ) |
Set the To DS bit in the Frame Control field.
Definition at line 74 of file wifi-mac-header.cc.
References m_ctrlToDs.
Referenced by ns3::StaWifiMac::Enqueue(), ns3::MeshWifiInterfaceMac::ForwardDown(), and ns3::dot11s::AirtimeLinkMetricCalculator::SetHeaderTid().
void ns3::WifiMacHeader::SetDuration | ( | Time | duration | ) |
Set the Duration/ID field with the given duration (Time object).
The method converts the given time to microseconds.
duration | the duration (Time object) |
Definition at line 332 of file wifi-mac-header.cc.
References ns3::Time::GetNanoSeconds(), m_duration, and NS_ASSERT.
Referenced by ns3::MacLow::ForwardDown(), ns3::MacLow::SendAckAfterData(), ns3::MacLow::SendBlockAckResponse(), ns3::MacLow::SendCtsToSelf(), ns3::MacLow::SendDataAfterCts(), ns3::MacLow::SendDataPacket(), and ns3::MacLow::SendRtsForPacket().
void ns3::WifiMacHeader::SetFragmentNumber | ( | uint8_t | frag | ) |
Set the fragment number of the header.
frag | the given fragment number |
Definition at line 349 of file wifi-mac-header.cc.
References m_seqFrag.
Referenced by ns3::DcaTxop::GetFragmentPacket(), ns3::EdcaTxopN::GetFragmentPacket(), ns3::DcaTxop::NotifyAccessGranted(), ns3::EdcaTxopN::NotifyAccessGranted(), and ns3::EdcaTxopN::SendAddBaRequest().
|
private |
Set the Frame Control field with the given raw value.
control | the raw Frame Control field value |
Definition at line 918 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 | ) |
Set the Duration/ID field with the given ID.
id | the ID |
Definition at line 339 of file wifi-mac-header.cc.
References m_duration.
void ns3::WifiMacHeader::SetMoreFragments | ( | void | ) |
Set the More Fragment bit in the Frame Control field.
Definition at line 359 of file wifi-mac-header.cc.
References m_ctrlMoreFrag.
Referenced by ns3::DcaTxop::GetFragmentPacket(), and ns3::EdcaTxopN::GetFragmentPacket().
void ns3::WifiMacHeader::SetMultihopAction | ( | void | ) |
Set Type/Subtype values for a multihop action header.
Definition at line 173 of file wifi-mac-header.cc.
References m_ctrlSubtype, m_ctrlType, and ns3::TYPE_MGT.
void ns3::WifiMacHeader::SetNoMoreFragments | ( | void | ) |
Un-set the More Fragment bit in the Frame Control Field.
Definition at line 354 of file wifi-mac-header.cc.
References m_ctrlMoreFrag.
Referenced by ns3::DcaTxop::GetFragmentPacket(), ns3::EdcaTxopN::GetFragmentPacket(), ns3::EdcaTxopN::MissedAck(), ns3::EdcaTxopN::MissedBlockAck(), ns3::EdcaTxopN::MissedCts(), ns3::DcaTxop::NotifyAccessGranted(), ns3::EdcaTxopN::NotifyAccessGranted(), ns3::MacLow::SendAckAfterData(), ns3::EdcaTxopN::SendAddBaRequest(), ns3::EdcaTxopN::SendBlockAckRequest(), ns3::MacLow::SendBlockAckResponse(), ns3::MacLow::SendCtsToSelf(), and ns3::MacLow::SendRtsForPacket().
void ns3::WifiMacHeader::SetNoOrder | ( | void | ) |
Unset order bit in the frame control field.
Definition at line 369 of file wifi-mac-header.cc.
References m_ctrlOrder.
Referenced by ns3::StaWifiMac::Enqueue(), ns3::AdhocWifiMac::Enqueue(), ns3::OcbWifiMac::Enqueue(), ns3::ApWifiMac::ForwardDown(), ns3::StaWifiMac::SendAssociationRequest(), ns3::ApWifiMac::SendAssocResp(), ns3::ApWifiMac::SendOneBeacon(), ns3::StaWifiMac::SendProbeRequest(), and ns3::ApWifiMac::SendProbeResp().
void ns3::WifiMacHeader::SetNoRetry | ( | void | ) |
Un-set the Retry bit in the Frame Control field.
Definition at line 379 of file wifi-mac-header.cc.
References m_ctrlRetry.
Referenced by ns3::EdcaTxopN::MissedAck(), ns3::EdcaTxopN::MissedBlockAck(), ns3::EdcaTxopN::MissedCts(), ns3::DcaTxop::NotifyAccessGranted(), ns3::EdcaTxopN::NotifyAccessGranted(), ns3::MacLow::SendAckAfterData(), ns3::EdcaTxopN::SendAddBaRequest(), ns3::EdcaTxopN::SendBlockAckRequest(), ns3::MacLow::SendBlockAckResponse(), ns3::MacLow::SendCtsToSelf(), and ns3::MacLow::SendRtsForPacket().
void ns3::WifiMacHeader::SetOrder | ( | void | ) |
Set order bit in the frame control field.
Definition at line 364 of file wifi-mac-header.cc.
References m_ctrlOrder.
void ns3::WifiMacHeader::SetProbeReq | ( | void | ) |
Set Type/Subtype values for a probe request header.
Definition at line 124 of file wifi-mac-header.cc.
References m_ctrlSubtype, m_ctrlType, and ns3::TYPE_MGT.
Referenced by ns3::StaWifiMac::SendProbeRequest().
void ns3::WifiMacHeader::SetProbeResp | ( | void | ) |
Set Type/Subtype values for a probe response header.
Definition at line 131 of file wifi-mac-header.cc.
References m_ctrlSubtype, m_ctrlType, and ns3::TYPE_MGT.
Referenced by ns3::ApWifiMac::SendProbeResp().
void ns3::WifiMacHeader::SetQosAckPolicy | ( | enum QosAckPolicy | policy | ) |
Set the QoS ACK policy in the QoS control field.
policy |
Definition at line 399 of file wifi-mac-header.cc.
References BLOCK_ACK, m_qosAckPolicy, NO_ACK, NO_EXPLICIT_ACK, and NORMAL_ACK.
Referenced by ns3::MacLow::AggregateToAmpdu(), ns3::StaWifiMac::Enqueue(), ns3::AdhocWifiMac::Enqueue(), ns3::OcbWifiMac::Enqueue(), ns3::MeshWifiInterfaceMac::ForwardDown(), ns3::ApWifiMac::ForwardDown(), ns3::BlockAckManager::GetNextPacket(), ns3::BlockAckManager::PeekNextPacket(), and ns3::EdcaTxopN::VerifyBlockAck().
void ns3::WifiMacHeader::SetQosAmsdu | ( | void | ) |
Set that A-MSDU is present.
Definition at line 436 of file wifi-mac-header.cc.
References m_amsduPresent.
Referenced by ns3::EdcaTxopN::NotifyAccessGranted(), and ns3::MacLow::PerformMsduAggregation().
void ns3::WifiMacHeader::SetQosBlockAck | ( | void | ) |
Set the QoS ACK policy in the QoS control field to block ACK.
Definition at line 425 of file wifi-mac-header.cc.
References m_qosAckPolicy.
|
private |
Set the QoS Control field with the given raw value.
qos | the raw QoS Control field value |
Definition at line 937 of file wifi-mac-header.cc.
References m_amsduPresent, m_qosAckPolicy, m_qosEosp, m_qosStuff, and m_qosTid.
Referenced by Deserialize().
void ns3::WifiMacHeader::SetQosEosp | ( | ) |
Set the end of service period (EOSP) bit in the QoS control field.
Definition at line 389 of file wifi-mac-header.cc.
References m_qosEosp.
void ns3::WifiMacHeader::SetQosMeshControlPresent | ( | void | ) |
Set the Mesh Control Present flag for the QoS header.
Definition at line 451 of file wifi-mac-header.cc.
References m_qosStuff.
Referenced by ns3::dot11s::HwmpProtocolMac::UpdateOutcomingFrame().
void ns3::WifiMacHeader::SetQosNoAck | ( | void | ) |
Set the QoS ACK policy in the QoS control field to no ACK.
Definition at line 431 of file wifi-mac-header.cc.
References m_qosAckPolicy.
void ns3::WifiMacHeader::SetQosNoAmsdu | ( | void | ) |
Set that A-MSDU is not present.
Definition at line 441 of file wifi-mac-header.cc.
References m_amsduPresent.
Referenced by ns3::StaWifiMac::Enqueue(), ns3::AdhocWifiMac::Enqueue(), ns3::OcbWifiMac::Enqueue(), ns3::MeshWifiInterfaceMac::ForwardDown(), and ns3::ApWifiMac::ForwardDown().
void ns3::WifiMacHeader::SetQosNoEosp | ( | ) |
Un-set the end of service period (EOSP) bit in the QoS control field.
Definition at line 394 of file wifi-mac-header.cc.
References m_qosEosp.
Referenced by ns3::StaWifiMac::Enqueue(), ns3::AdhocWifiMac::Enqueue(), ns3::OcbWifiMac::Enqueue(), ns3::MeshWifiInterfaceMac::ForwardDown(), and ns3::ApWifiMac::ForwardDown().
void ns3::WifiMacHeader::SetQosNoMeshControlPresent | ( | ) |
Clear the Mesh Control Present flag for the QoS header.
Definition at line 458 of file wifi-mac-header.cc.
References m_qosStuff.
void ns3::WifiMacHeader::SetQosNormalAck | ( | void | ) |
Set the QoS ACK policy in the QoS control field to normal ACK.
Definition at line 419 of file wifi-mac-header.cc.
References m_qosAckPolicy.
void ns3::WifiMacHeader::SetQosTid | ( | uint8_t | tid | ) |
Set the TID for the QoS header.
tid | the TID for the QoS header |
Definition at line 384 of file wifi-mac-header.cc.
References m_qosTid.
Referenced by ns3::StaWifiMac::Enqueue(), ns3::AdhocWifiMac::Enqueue(), ns3::OcbWifiMac::Enqueue(), ns3::MeshWifiInterfaceMac::ForwardDown(), ns3::ApWifiMac::ForwardDown(), ns3::dot11s::AirtimeLinkMetricCalculator::SetHeaderTid(), PowerRateAdaptationTest::TestAparf(), and PowerRateAdaptationTest::TestParf().
void ns3::WifiMacHeader::SetQosTxopLimit | ( | uint8_t | txop | ) |
Set TXOP limit in the QoS control field.
txop |
Definition at line 446 of file wifi-mac-header.cc.
References m_qosStuff.
Referenced by ns3::StaWifiMac::Enqueue(), ns3::AdhocWifiMac::Enqueue(), ns3::OcbWifiMac::Enqueue(), ns3::MeshWifiInterfaceMac::ForwardDown(), and ns3::ApWifiMac::ForwardDown().
void ns3::WifiMacHeader::SetRawDuration | ( | uint16_t | duration | ) |
Set the Duration/ID field with the given raw uint16_t value.
duration | the raw duration in uint16_t |
Definition at line 326 of file wifi-mac-header.cc.
References m_duration.
void ns3::WifiMacHeader::SetRetry | ( | void | ) |
Set the Retry bit in the Frame Control field.
Definition at line 374 of file wifi-mac-header.cc.
References m_ctrlRetry.
Referenced by ns3::BlockAckManager::GetNextPacket(), ns3::DcaTxop::MissedAck(), ns3::EdcaTxopN::MissedAck(), ns3::EdcaTxopN::MissedBlockAck(), and ns3::BlockAckManager::PeekNextPacket().
|
private |
Set the Sequence Control field with the given raw value.
seq | the raw Sequence Control field value |
Definition at line 931 of file wifi-mac-header.cc.
References m_seqFrag, and m_seqSeq.
Referenced by Deserialize().
void ns3::WifiMacHeader::SetSequenceNumber | ( | uint16_t | seq | ) |
Set the sequence number of the header.
seq | the given sequence number |
Definition at line 344 of file wifi-mac-header.cc.
References m_seqSeq.
Referenced by AmpduAggregationTest::DoRun(), ns3::DcaTxop::NotifyAccessGranted(), ns3::EdcaTxopN::NotifyAccessGranted(), and ns3::EdcaTxopN::SendAddBaRequest().
void ns3::WifiMacHeader::SetType | ( | enum WifiMacType | type | ) |
Set Type/Subtype values with the correct values depending on the given type.
type | the WifiMacType for the header |
Definition at line 180 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_CTLWRAPPER, 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_CTLWRAPPER, 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_ACTION, ns3::WIFI_MAC_MGT_ACTION_NO_ACK, 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_MULTIHOP_ACTION, 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::StaWifiMac::Enqueue(), ns3::AdhocWifiMac::Enqueue(), ns3::OcbWifiMac::Enqueue(), ns3::MeshWifiInterfaceMac::ForwardDown(), ns3::ApWifiMac::ForwardDown(), ns3::MacLow::GetAckSize(), ns3::MacLow::GetBlockAckSize(), ns3::MacLow::GetCtsSize(), ns3::MacLow::GetRtsSize(), ns3::EdcaTxopN::MissedAck(), ns3::EdcaTxopN::MissedBlockAck(), ns3::EdcaTxopN::MissedCts(), ns3::MacLow::NotifyNav(), ns3::MacLow::SendAckAfterData(), ns3::EdcaTxopN::SendBlockAckRequest(), ns3::MacLow::SendBlockAckResponse(), ns3::MacLow::SendCtsAfterRts(), ns3::MacLow::SendCtsToSelf(), and ns3::MacLow::SendRtsForPacket().
void ns3::WifiMacHeader::SetTypeData | ( | void | ) |
Set Type/Subtype values for a data packet with no subtype equal to 0.
Definition at line 159 of file wifi-mac-header.cc.
References m_ctrlSubtype, m_ctrlType, and ns3::TYPE_DATA.
Referenced by ns3::StaWifiMac::Enqueue(), ns3::AdhocWifiMac::Enqueue(), ns3::OcbWifiMac::Enqueue(), ns3::ApWifiMac::ForwardDown(), ns3::dot11s::AirtimeLinkMetricCalculator::SetHeaderTid(), PowerRateAdaptationTest::TestAparf(), and PowerRateAdaptationTest::TestParf().
|
private |
Definition at line 649 of file wifi-mac-header.h.
Referenced by Deserialize(), GetAddr1(), Print(), Serialize(), and SetAddr1().
|
private |
Definition at line 650 of file wifi-mac-header.h.
Referenced by Deserialize(), GetAddr2(), Print(), Serialize(), and SetAddr2().
|
private |
Definition at line 651 of file wifi-mac-header.h.
Referenced by Deserialize(), GetAddr3(), Print(), Serialize(), and SetAddr3().
|
private |
Definition at line 654 of file wifi-mac-header.h.
Referenced by Deserialize(), GetAddr4(), Print(), Serialize(), and SetAddr4().
|
private |
Definition at line 658 of file wifi-mac-header.h.
Referenced by GetQosControl(), IsQosAmsdu(), SetQosAmsdu(), SetQosControl(), and SetQosNoAmsdu().
|
private |
Definition at line 642 of file wifi-mac-header.h.
Referenced by Deserialize(), GetFrameControl(), GetSize(), IsFromDs(), Print(), PrintFrameControl(), Serialize(), SetDsFrom(), SetDsNotFrom(), SetFrameControl(), and SetType().
|
private |
Definition at line 645 of file wifi-mac-header.h.
Referenced by GetFrameControl(), PrintFrameControl(), and SetFrameControl().
|
private |
Definition at line 643 of file wifi-mac-header.h.
Referenced by GetFrameControl(), IsMoreFragments(), PrintFrameControl(), SetFrameControl(), SetMoreFragments(), and SetNoMoreFragments().
|
private |
Definition at line 647 of file wifi-mac-header.h.
Referenced by GetFrameControl(), SetFrameControl(), SetNoOrder(), and SetOrder().
|
private |
Definition at line 644 of file wifi-mac-header.h.
Referenced by GetFrameControl(), IsRetry(), PrintFrameControl(), SetFrameControl(), SetNoRetry(), and SetRetry().
|
private |
Definition at line 640 of file wifi-mac-header.h.
Referenced by Deserialize(), GetFrameControl(), GetSize(), GetType(), IsQosData(), Serialize(), SetAction(), SetAssocReq(), SetAssocResp(), SetBeacon(), SetBlockAck(), SetBlockAckReq(), SetFrameControl(), SetMultihopAction(), SetProbeReq(), SetProbeResp(), SetType(), and SetTypeData().
|
private |
Definition at line 641 of file wifi-mac-header.h.
Referenced by Deserialize(), GetFrameControl(), GetSize(), IsToDs(), Print(), PrintFrameControl(), Serialize(), SetDsNotTo(), SetDsTo(), SetFrameControl(), and SetType().
|
private |
Definition at line 639 of file wifi-mac-header.h.
Referenced by Deserialize(), GetFrameControl(), GetSize(), GetType(), IsCtl(), IsData(), IsMgt(), IsQosData(), Serialize(), SetAction(), SetAssocReq(), SetAssocResp(), SetBeacon(), SetBlockAck(), SetBlockAckReq(), SetFrameControl(), SetMultihopAction(), SetProbeReq(), SetProbeResp(), SetType(), and SetTypeData().
|
private |
Definition at line 646 of file wifi-mac-header.h.
Referenced by GetFrameControl(), and SetFrameControl().
|
private |
Definition at line 648 of file wifi-mac-header.h.
Referenced by Deserialize(), GetDuration(), GetRawDuration(), Print(), Serialize(), SetDuration(), SetId(), and SetRawDuration().
|
private |
Definition at line 657 of file wifi-mac-header.h.
Referenced by GetQosAckPolicy(), GetQosControl(), IsQosAck(), IsQosBlockAck(), IsQosNoAck(), SetQosAckPolicy(), SetQosBlockAck(), SetQosControl(), SetQosNoAck(), and SetQosNormalAck().
|
private |
Definition at line 656 of file wifi-mac-header.h.
Referenced by GetQosControl(), IsQosEosp(), SetQosControl(), SetQosEosp(), and SetQosNoEosp().
|
private |
Definition at line 659 of file wifi-mac-header.h.
Referenced by GetQosControl(), GetQosTxopLimit(), SetQosControl(), SetQosMeshControlPresent(), SetQosNoMeshControlPresent(), and SetQosTxopLimit().
|
private |
Definition at line 655 of file wifi-mac-header.h.
Referenced by GetQosControl(), GetQosTid(), SetQosControl(), and SetQosTid().
|
private |
Definition at line 652 of file wifi-mac-header.h.
Referenced by GetFragmentNumber(), GetSequenceControl(), Print(), SetFragmentNumber(), and SetSequenceControl().
|
private |
Definition at line 653 of file wifi-mac-header.h.
Referenced by GetSequenceControl(), GetSequenceNumber(), Print(), SetSequenceControl(), and SetSequenceNumber().