ns-3
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:

List of all members.

Public Member Functions

virtual TypeId GetInstanceTypeId () const
 Get the instance type ID.
 DsrFsHeader ()
 Constructor.
virtual ~DsrFsHeader ()
 Destructor.
void SetNextHeader (uint8_t protocol)
 Set the "Next header" field.
uint8_t GetNextHeader () const
 Get the next header.
void SetMessageType (uint8_t messageType)
uint8_t GetMessageType () const
void SetSourceId (uint16_t sourceId)
uint16_t GetSourceId () const
void SetDestId (uint16_t destId)
uint16_t GetDestId () const
void SetPayloadLength (uint16_t length)
uint16_t GetPayloadLength () const
 Get the payload length of the header.
virtual void Print (std::ostream &os) const
 Print some informations about the packet.
virtual uint32_t GetSerializedSize () const
 Get the serialized size of the packet.
virtual void Serialize (Buffer::Iterator start) const
 Serialize the packet.
virtual uint32_t Deserialize (Buffer::Iterator start)
 Deserialize the packet.

Static Public Member Functions

static TypeId GetTypeId ()
 Get the type identificator.

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

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

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

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.

References GetTypeId().

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

brief Get the message type of the header.

Returns:
message type the message type of the header

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

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

Get the next header.

Returns:
the next header number

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

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

Get the payload length of the header.

Returns:
the payload length of the header

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

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.

Referenced by Deserialize().

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

brief Get the source id of the header.

Returns:
source id the source id of the header

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

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.

References ns3::TypeId::AddConstructor().

Referenced by GetInstanceTypeId().

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.

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

void ns3::dsr::DsrFsHeader::Serialize ( Buffer::Iterator  start) const
virtual
void ns3::dsr::DsrFsHeader::SetDestId ( uint16_t  destId)
void ns3::dsr::DsrFsHeader::SetMessageType ( uint8_t  messageType)
void ns3::dsr::DsrFsHeader::SetNextHeader ( uint8_t  protocol)
void ns3::dsr::DsrFsHeader::SetPayloadLength ( uint16_t  length)
void ns3::dsr::DsrFsHeader::SetSourceId ( uint16_t  sourceId)

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