A Discrete-Event Network Simulator
API
ns3::dsr::DsrFsHeader Class Reference

Dsr fixed size header Format. More...

#include "dsr-fs-header.h"

+ Inheritance diagram for ns3::dsr::DsrFsHeader:
+ Collaboration diagram for ns3::dsr::DsrFsHeader:

Public Member Functions

 DsrFsHeader ()
 Constructor. More...
 
 ~DsrFsHeader () override
 Destructor. More...
 
uint32_t Deserialize (Buffer::Iterator start) override
 Deserialize the packet. More...
 
uint16_t GetDestId () const
 brief Get the dest ID of the header. More...
 
TypeId GetInstanceTypeId () const override
 Get the instance type ID. More...
 
uint8_t GetMessageType () const
 brief Get the message type of the header. More...
 
uint8_t GetNextHeader () const
 Get the next header. More...
 
uint16_t GetPayloadLength () const
 Get the payload length of the header. More...
 
uint32_t GetSerializedSize () const override
 Get the serialized size of the packet. More...
 
uint16_t GetSourceId () const
 brief Get the source ID of the header. More...
 
void Print (std::ostream &os) const override
 Print some information about the packet. More...
 
void Serialize (Buffer::Iterator start) const override
 Serialize the packet. More...
 
void SetDestId (uint16_t destId)
 brief Set the dest ID of the header. More...
 
void SetMessageType (uint8_t messageType)
 brief Set the message type of the header. More...
 
void SetNextHeader (uint8_t protocol)
 Set the "Next header" field. More...
 
void SetPayloadLength (uint16_t length)
 brief Set the payload length of the header. More...
 
void SetSourceId (uint16_t sourceId)
 brief Set the source ID of the header. More...
 
- Public Member Functions inherited from ns3::Header
 ~Header () override
 
virtual uint32_t Deserialize (Buffer::Iterator start)=0
 Deserialize the object from a buffer iterator. More...
 
virtual uint32_t Deserialize (Buffer::Iterator start, Buffer::Iterator end)
 Deserialize the object from a buffer iterator. More...
 
- Public Member Functions inherited from ns3::Chunk
virtual uint32_t Deserialize (Buffer::Iterator start, Buffer::Iterator end)
 Deserialize the object from a buffer iterator. More...
 
- Public Member Functions inherited from ns3::ObjectBase
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 errors. 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 ()
 Get the type identificator. More...
 
- Static Public Member Functions inherited from ns3::Header
static TypeId GetTypeId ()
 Get the type ID. More...
 
- Static Public Member Functions inherited from ns3::Chunk
static TypeId GetTypeId ()
 Get the type ID. More...
 
- Static Public Member Functions inherited from ns3::ObjectBase
static TypeId GetTypeId ()
 Get the type ID. More...
 

Private Attributes

Buffer m_data
 The data of the extension. More...
 
uint16_t m_destId
 The destination node id. More...
 
uint8_t m_messageType
 The type of the message. More...
 
uint8_t m_nextHeader
 The "next header" field. More...
 
uint16_t m_payloadLen
 The "payload length" field. More...
 
uint16_t m_sourceId
 The source node id. More...
 

Additional Inherited Members

- Protected Member Functions inherited from ns3::ObjectBase
void ConstructSelf (const AttributeConstructionList &attributes)
 Complete construction of ObjectBase; invoked by derived classes. More...
 
virtual void NotifyConstructionCompleted ()
 Notifier called once the ObjectBase is fully constructed. More...
 

Detailed Description

Dsr fixed size header Format.

 |      0        |      1        |      2        |      3        |
 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |  Next Header |F|     Reservd    |       Payload Length       |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                            Options                           |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

The modified version of Dsr fixed size header Format

 |      0        |      1        |      2        |      3        |
 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |  Next Header |F|  Message Type  |       Payload Length       |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |             Source Id           |            Dest Id         |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                            Options                           |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Definition at line 81 of file dsr-fs-header.h.

Constructor & Destructor Documentation

◆ DsrFsHeader()

ns3::dsr::DsrFsHeader::DsrFsHeader ( )

Constructor.

Definition at line 63 of file dsr-fs-header.cc.

◆ ~DsrFsHeader()

ns3::dsr::DsrFsHeader::~DsrFsHeader ( )
override

Destructor.

Definition at line 73 of file dsr-fs-header.cc.

Member Function Documentation

◆ Deserialize()

uint32_t ns3::dsr::DsrFsHeader::Deserialize ( Buffer::Iterator  start)
overridevirtual

◆ GetDestId()

uint16_t ns3::dsr::DsrFsHeader::GetDestId ( ) const

brief Get the dest ID of the header.

Returns
dest ID the dest ID of the header

Definition at line 132 of file dsr-fs-header.cc.

References m_destId.

Referenced by ns3::dsr::DsrRouting::AddAckReqHeader(), Print(), ns3::dsr::DsrRoutingHeader::Print(), ns3::dsr::DsrRouting::PromiscReceive(), and ns3::dsr::DsrRoutingHeader::Serialize().

+ Here is the caller graph for this function:

◆ GetInstanceTypeId()

TypeId ns3::dsr::DsrFsHeader::GetInstanceTypeId ( void  ) const
overridevirtual

Get the instance type ID.

Returns
instance type ID

Implements ns3::ObjectBase.

Reimplemented in ns3::dsr::DsrRoutingHeader.

Definition at line 58 of file dsr-fs-header.cc.

References GetTypeId().

+ Here is the call graph for this function:

◆ GetMessageType()

uint8_t ns3::dsr::DsrFsHeader::GetMessageType ( ) const

brief Get the message type of the header.

Returns
message type the message type of the header

Definition at line 96 of file dsr-fs-header.cc.

References m_messageType.

Referenced by Print(), ns3::dsr::DsrRoutingHeader::Print(), ns3::dsr::DsrRouting::PromiscReceive(), and ns3::dsr::DsrRoutingHeader::Serialize().

+ Here is the caller graph for this function:

◆ GetNextHeader()

uint8_t ns3::dsr::DsrFsHeader::GetNextHeader ( ) const

Get the next header.

Returns
the next header number

Definition at line 84 of file dsr-fs-header.cc.

References m_nextHeader.

Referenced by ns3::dsr::DsrRouting::AddAckReqHeader(), Print(), ns3::dsr::DsrRoutingHeader::Print(), ns3::dsr::DsrRouting::PromiscReceive(), ns3::dsr::DsrRouting::Receive(), and ns3::dsr::DsrRoutingHeader::Serialize().

+ Here is the caller graph for this function:

◆ GetPayloadLength()

uint16_t ns3::dsr::DsrFsHeader::GetPayloadLength ( ) const

Get the payload length of the header.

Returns
the payload length of the header

Definition at line 108 of file dsr-fs-header.cc.

References m_payloadLen.

Referenced by Deserialize(), ns3::dsr::DsrRoutingHeader::Deserialize(), Print(), ns3::dsr::DsrRoutingHeader::Print(), and ns3::dsr::DsrRoutingHeader::Serialize().

+ Here is the caller graph for this function:

◆ GetSerializedSize()

uint32_t ns3::dsr::DsrFsHeader::GetSerializedSize ( ) const
overridevirtual

Get the serialized size of the packet.

Returns
size

Implements ns3::Header.

Reimplemented in ns3::dsr::DsrRoutingHeader.

Definition at line 147 of file dsr-fs-header.cc.

Referenced by Deserialize().

+ Here is the caller graph for this function:

◆ GetSourceId()

uint16_t ns3::dsr::DsrFsHeader::GetSourceId ( ) const

brief Get the source ID of the header.

Returns
source ID the source ID of the header

Definition at line 120 of file dsr-fs-header.cc.

References m_sourceId.

Referenced by ns3::dsr::DsrRouting::AddAckReqHeader(), Print(), ns3::dsr::DsrRoutingHeader::Print(), ns3::dsr::DsrRouting::PromiscReceive(), ns3::dsr::DsrRouting::Receive(), and ns3::dsr::DsrRoutingHeader::Serialize().

+ Here is the caller graph for this function:

◆ GetTypeId()

TypeId ns3::dsr::DsrFsHeader::GetTypeId ( void  )
static

Get the type identificator.

Returns
type identificator

Definition at line 48 of file dsr-fs-header.cc.

References ns3::TypeId::AddConstructor().

Referenced by GetInstanceTypeId().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Print()

void ns3::dsr::DsrFsHeader::Print ( std::ostream &  os) const
overridevirtual

Print some information about the packet.

Parameters
osoutput stream

Implements ns3::Header.

Reimplemented in ns3::dsr::DsrRoutingHeader.

Definition at line 138 of file dsr-fs-header.cc.

References GetDestId(), GetMessageType(), GetNextHeader(), GetPayloadLength(), and GetSourceId().

+ Here is the call graph for this function:

◆ Serialize()

void ns3::dsr::DsrFsHeader::Serialize ( Buffer::Iterator  start) const
overridevirtual

◆ SetDestId()

◆ SetMessageType()

◆ SetNextHeader()

◆ SetPayloadLength()

◆ SetSourceId()

Member Data Documentation

◆ m_data

Buffer ns3::dsr::DsrFsHeader::m_data
private

The data of the extension.

Definition at line 198 of file dsr-fs-header.h.

Referenced by Deserialize(), and Serialize().

◆ m_destId

uint16_t ns3::dsr::DsrFsHeader::m_destId
private

The destination node id.

Definition at line 194 of file dsr-fs-header.h.

Referenced by Deserialize(), GetDestId(), Serialize(), and SetDestId().

◆ m_messageType

uint8_t ns3::dsr::DsrFsHeader::m_messageType
private

The type of the message.

Definition at line 182 of file dsr-fs-header.h.

Referenced by Deserialize(), GetMessageType(), Serialize(), and SetMessageType().

◆ m_nextHeader

uint8_t ns3::dsr::DsrFsHeader::m_nextHeader
private

The "next header" field.

Definition at line 178 of file dsr-fs-header.h.

Referenced by Deserialize(), GetNextHeader(), Serialize(), and SetNextHeader().

◆ m_payloadLen

uint16_t ns3::dsr::DsrFsHeader::m_payloadLen
private

The "payload length" field.

Definition at line 186 of file dsr-fs-header.h.

Referenced by Deserialize(), GetPayloadLength(), Serialize(), and SetPayloadLength().

◆ m_sourceId

uint16_t ns3::dsr::DsrFsHeader::m_sourceId
private

The source node id.

Definition at line 190 of file dsr-fs-header.h.

Referenced by Deserialize(), GetSourceId(), Serialize(), and SetSourceId().


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