A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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.
virtual ~DsrFsHeader ()
 Destructor.
virtual uint32_t Deserialize (Buffer::Iterator start)
 Deserialize the packet.
uint16_t GetDestId () const
virtual TypeId GetInstanceTypeId () const
 Get the instance type ID.
uint8_t GetMessageType () const
uint8_t GetNextHeader () const
 Get the next header.
uint16_t GetPayloadLength () const
 Get the payload length of the header.
virtual uint32_t GetSerializedSize () const
 Get the serialized size of the packet.
uint16_t GetSourceId () const
virtual void Print (std::ostream &os) const
 Print some informations about the packet.
virtual void Serialize (Buffer::Iterator start) const
 Serialize the packet.
void SetDestId (uint16_t destId)
void SetMessageType (uint8_t messageType)
void SetNextHeader (uint8_t protocol)
 Set the "Next header" field.
void SetPayloadLength (uint16_t length)
void SetSourceId (uint16_t sourceId)
- Public Member Functions inherited from ns3::Header
virtual ~Header ()

Static Public Member Functions

static TypeId GetTypeId ()
 Get the type identificator.

Private Attributes

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

Additional Inherited Members

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

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 79 of file dsr-fs-header.h.

Constructor & Destructor Documentation

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

Constructor.

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

ns3::dsr::DsrFsHeader::~DsrFsHeader ( )
virtual

Destructor.

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

Member Function Documentation

uint32_t ns3::dsr::DsrFsHeader::Deserialize ( Buffer::Iterator  start)
virtual
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 117 of file dsr-fs-header.cc.

References m_destId.

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

+ Here is the caller graph for this function:

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

Get the instance type ID.

Returns
instance type ID

Implements ns3::ObjectBase.

Reimplemented in ns3::dsr::DsrRoutingHeader.

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

References GetTypeId().

+ Here is the call graph for this function:

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 87 of file dsr-fs-header.cc.

References m_messageType.

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

+ Here is the caller graph for this function:

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

Get the next header.

Returns
the next header number

Definition at line 77 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:

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

Get the payload length of the header.

Returns
the payload length of the header

Definition at line 97 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:

uint32_t ns3::dsr::DsrFsHeader::GetSerializedSize ( void  ) const
virtual

Get the serialized size of the packet.

Returns
size

Implements ns3::Header.

Reimplemented in ns3::dsr::DsrRoutingHeader.

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

Referenced by Deserialize().

+ Here is the caller graph for this function:

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 107 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:

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

Get the type identificator.

This method returns the TypeId associated to ns3::dsr::DsrFsHeader.

Returns
type identificator

No Attributes defined for this type.
No TraceSources defined for this type.

Reimplemented from ns3::Header.

Reimplemented in ns3::dsr::DsrRoutingHeader.

Definition at line 44 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:

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

Print some informations about the packet.

Parameters
osoutput stream
Returns
info about this packet

Implements ns3::Header.

Reimplemented in ns3::dsr::DsrRoutingHeader.

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

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

+ Here is the call graph for this function:

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

Serialize the packet.

Parameters
startBuffer iterator

Implements ns3::Header.

Reimplemented in ns3::dsr::DsrRoutingHeader.

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

References ns3::Buffer::GetSize(), m_data, m_destId, m_messageType, m_nextHeader, m_payloadLen, m_sourceId, ns3::Buffer::PeekData(), visualizer.core::start(), ns3::Buffer::Iterator::Write(), ns3::Buffer::Iterator::WriteU16(), and ns3::Buffer::Iterator::WriteU8().

+ Here is the call graph for this function:

Member Data Documentation

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

The data of the extension.

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

Referenced by Deserialize(), and Serialize().

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

The destination node id.

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

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

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

The type of the message.

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

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

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

The "next header" field.

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

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

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

The "payload length" field.

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

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

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

The source node id.

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

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


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