A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ns3::WifiMacHeader Class Reference

#include <wifi-mac-header.h>

+ Inheritance diagram for ns3::WifiMacHeader:

Public Types

enum  AddressType { ADDR1, ADDR2, ADDR3, ADDR4 }
 
enum  QosAckPolicy { NORMAL_ACK = 0, NO_ACK = 1, NO_EXPLICIT_ACK = 2, BLOCK_ACK = 3 }
 

Public Member Functions

virtual uint32_t Deserialize (Buffer::Iterator start)
 
Mac48Address GetAddr1 (void) const
 
Mac48Address GetAddr2 (void) const
 
Mac48Address GetAddr3 (void) const
 
Mac48Address GetAddr4 (void) const
 
Time GetDuration (void) const
 
uint16_t GetFragmentNumber (void) const
 
virtual TypeId GetInstanceTypeId (void) const
 
enum QosAckPolicy GetQosAckPolicy (void) const
 
uint8_t GetQosTid (void) const
 
uint8_t GetQosTxopLimit (void) const
 
uint16_t GetRawDuration (void) const
 
uint16_t GetSequenceControl (void) const
 
uint16_t GetSequenceNumber (void) const
 
virtual uint32_t GetSerializedSize (void) const
 
uint32_t GetSize (void) const
 
enum WifiMacType GetType (void) const
 
const char * GetTypeString (void) const
 
bool IsAck (void) const
 
bool IsAction () const
 
bool IsAssocReq (void) const
 
bool IsAssocResp (void) const
 
bool IsAuthentication (void) const
 
bool IsBeacon (void) const
 
bool IsBlockAck (void) const
 
bool IsBlockAckReq (void) const
 
bool IsCfpoll (void) const
 
bool IsCtl (void) const
 
bool IsCts (void) const
 
bool IsData (void) const
 
bool IsDeauthentication (void) const
 
bool IsDisassociation (void) const
 
bool IsFromDs (void) const
 
bool IsMgt (void) const
 
bool IsMoreFragments (void) const
 
bool IsMultihopAction () const
 
bool IsProbeReq (void) const
 
bool IsProbeResp (void) const
 
bool IsQosAck (void) const
 
bool IsQosAmsdu (void) const
 
bool IsQosBlockAck (void) const
 
bool IsQosData (void) const
 
bool IsQosEosp (void) const
 
bool IsQosNoAck (void) const
 
bool IsReassocReq (void) const
 
bool IsReassocResp (void) const
 
bool IsRetry (void) const
 
bool IsRts (void) const
 
bool IsToDs (void) const
 
virtual void Print (std::ostream &os) const
 
virtual void Serialize (Buffer::Iterator start) const
 
void SetAction ()
 
void SetAddr1 (Mac48Address address)
 
void SetAddr2 (Mac48Address address)
 
void SetAddr3 (Mac48Address address)
 
void SetAddr4 (Mac48Address address)
 
void SetAssocReq (void)
 
void SetAssocResp (void)
 
void SetBeacon (void)
 
void SetBlockAck (void)
 
void SetBlockAckReq (void)
 
void SetDsFrom (void)
 
void SetDsNotFrom (void)
 
void SetDsNotTo (void)
 
void SetDsTo (void)
 
void SetDuration (Time duration)
 
void SetFragmentNumber (uint8_t frag)
 
void SetId (uint16_t id)
 
void SetMoreFragments (void)
 
void SetMultihopAction ()
 
void SetNoMoreFragments (void)
 
void SetNoRetry (void)
 
void SetProbeReq (void)
 
void SetProbeResp (void)
 
void SetQosAckPolicy (enum QosAckPolicy)
 
void SetQosAmsdu (void)
 
void SetQosBlockAck (void)
 
void SetQosEosp ()
 
void SetQosNoAck (void)
 
void SetQosNoAmsdu (void)
 
void SetQosNoEosp ()
 
void SetQosNormalAck (void)
 
void SetQosTid (uint8_t tid)
 
void SetQosTxopLimit (uint8_t txop)
 
void SetRawDuration (uint16_t duration)
 
void SetRetry (void)
 
void SetSequenceNumber (uint16_t seq)
 
void SetType (enum WifiMacType type)
 
void SetTypeData (void)
 
- Public Member Functions inherited from ns3::ObjectBase
void GetAttribute (std::string name, AttributeValue &value) const
 
bool GetAttributeFailSafe (std::string name, AttributeValue &attribute) const
 
void SetAttribute (std::string name, const AttributeValue &value)
 
bool SetAttributeFailSafe (std::string name, const AttributeValue &value)
 
bool TraceConnect (std::string name, std::string context, const CallbackBase &cb)
 
bool TraceConnectWithoutContext (std::string name, const CallbackBase &cb)
 
bool TraceDisconnect (std::string name, std::string context, const CallbackBase &cb)
 
bool TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb)
 

Static Public Member Functions

static TypeId GetTypeId (void)
 
- Static Public Member Functions inherited from ns3::Header
static TypeId GetTypeId (void)
 
- Static Public Member Functions inherited from ns3::Chunk
static TypeId GetTypeId (void)
 
- Static Public Member Functions inherited from ns3::ObjectBase
static TypeId GetTypeId (void)
 

Private Member Functions

uint16_t GetFrameControl (void) const
 
uint16_t GetQosControl (void) const
 
void PrintFrameControl (std::ostream &os) const
 
void SetFrameControl (uint16_t control)
 
void SetQosControl (uint16_t qos)
 
void SetSequenceControl (uint16_t seq)
 

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_ctrlPwrMgt
 
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

- Protected Member Functions inherited from ns3::ObjectBase
void ConstructSelf (const AttributeConstructionList &attributes)
 
virtual void NotifyConstructionCompleted (void)
 

Detailed Description

Implements the IEEE 802.11 MAC header

Doxygen introspection did not find any typical Config paths.
No Attributes are defined for this type.
No TraceSources are defined for this type.

Definition at line 76 of file wifi-mac-header.h.

Member Function Documentation

uint32_t ns3::WifiMacHeader::Deserialize ( Buffer::Iterator  start)
virtual
Parameters
startan iterator which points to where the header should written.
Returns
the number of bytes read.

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 1106 of file wifi-mac-header.cc.

References ns3::Buffer::Iterator::GetDistanceFrom(), and ns3::Buffer::Iterator::ReadLsbtohU16().

TypeId ns3::WifiMacHeader::GetInstanceTypeId ( void  ) const
virtual
Returns
the TypeId associated to the most-derived type of this instance.

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 945 of file wifi-mac-header.cc.

uint32_t ns3::WifiMacHeader::GetSerializedSize ( void  ) const
virtual
Returns
the expected size of the header.

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 1049 of file wifi-mac-header.cc.

Referenced by ns3::MacLow::NotifyNav(), and ns3::DcaTxop::Queue().

void ns3::WifiMacHeader::Print ( std::ostream &  os) const
virtual
Parameters
osoutput stream 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 960 of file wifi-mac-header.cc.

References NS_FATAL_ERROR.

void ns3::WifiMacHeader::Serialize ( Buffer::Iterator  start) const
virtual
Parameters
startan 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 1054 of file wifi-mac-header.cc.

References NS_ASSERT, and ns3::Buffer::Iterator::WriteHtolsbU16().


The documentation for this class was generated from the following files: