A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ns3::dsr::DsrOptionRerrHeader Class Reference

Header of Dsr Option Route Error. More...

#include "dsr-option-header.h"

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

Public Member Functions

 DsrOptionRerrHeader ()
 Constructor.
 
 ~DsrOptionRerrHeader () override
 Destructor.
 
uint32_t Deserialize (Buffer::Iterator start) override
 Deserialize the packet.
 
Alignment GetAlignment () const override
 Get the Alignment requirement of this option header.
 
virtual Ipv4Address GetErrorDst () const
 Get the error destination ip address.
 
virtual Ipv4Address GetErrorSrc () const
 Get the route error source address.
 
uint8_t GetErrorType () const
 Get the route error type.
 
TypeId GetInstanceTypeId () const override
 Get the instance type ID.
 
virtual uint8_t GetSalvage () const
 Get the salvage value of the packet.
 
uint32_t GetSerializedSize () const override
 Get the serialized size of the packet.
 
void Print (std::ostream &os) const override
 Print some information about the packet.
 
void Serialize (Buffer::Iterator start) const override
 Serialize the packet.
 
virtual void SetErrorDst (Ipv4Address errorDstAddress)
 Set the error destination ip address.
 
virtual void SetErrorSrc (Ipv4Address errorSrcAddress)
 Set the route error source address.
 
void SetErrorType (uint8_t errorType)
 Set the route error type.
 
virtual void SetSalvage (uint8_t salvage)
 Set the salvage value of the packet.
 
- Public Member Functions inherited from ns3::dsr::DsrOptionHeader
 DsrOptionHeader ()
 Constructor.
 
 ~DsrOptionHeader () override
 Destructor.
 
uint8_t GetLength () const
 Get the option length.
 
uint8_t GetType () const
 Get the type of the option.
 
void SetLength (uint8_t length)
 Set the option length.
 
void SetType (uint8_t type)
 Set the type of the option.
 
- Public Member Functions inherited from ns3::Header
 ~Header () override
 
virtual uint32_t Deserialize (Buffer::Iterator start, Buffer::Iterator end)
 Deserialize the object from a buffer iterator.
 
- Public Member Functions inherited from ns3::ObjectBase
virtual ~ObjectBase ()
 Virtual destructor.
 
void GetAttribute (std::string name, AttributeValue &value, bool permissive=false) const
 Get the value of an attribute, raising fatal errors if unsuccessful.
 
bool GetAttributeFailSafe (std::string name, AttributeValue &value) const
 Get the value of an attribute without raising errors.
 
void SetAttribute (std::string name, const AttributeValue &value)
 Set a single attribute, raising fatal errors if unsuccessful.
 
bool SetAttributeFailSafe (std::string name, const AttributeValue &value)
 Set a single attribute without raising errors.
 
bool TraceConnect (std::string name, std::string context, const CallbackBase &cb)
 Connect a TraceSource to a Callback with a context.
 
bool TraceConnectWithoutContext (std::string name, const CallbackBase &cb)
 Connect a TraceSource to a Callback without a context.
 
bool TraceDisconnect (std::string name, std::string context, const CallbackBase &cb)
 Disconnect from a TraceSource a Callback previously connected with a context.
 
bool TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb)
 Disconnect from a TraceSource a Callback previously connected without a context.
 

Static Public Member Functions

static TypeId GetTypeId ()
 Get the type identificator.
 
- Static Public Member Functions inherited from ns3::dsr::DsrOptionHeader
static TypeId GetTypeId ()
 Get the type identificator.
 
- Static Public Member Functions inherited from ns3::Header
static TypeId GetTypeId ()
 Get the type ID.
 
- Static Public Member Functions inherited from ns3::Chunk
static TypeId GetTypeId ()
 Get the type ID.
 
- Static Public Member Functions inherited from ns3::ObjectBase
static TypeId GetTypeId ()
 Get the type ID.
 

Private Attributes

Buffer m_errorData
 The anonymous data of this option.
 
Ipv4Address m_errorDstAddress
 The error destination address.
 
uint16_t m_errorLength
 The specific error message length.
 
Ipv4Address m_errorSrcAddress
 The error source address.
 
uint8_t m_errorType
 The error type or route error option.
 
uint8_t m_salvage
 The salvage field.
 

Additional Inherited Members

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

Detailed Description

Header of Dsr Option Route Error.

Route Error (RERR) Message 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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|  Option Type |  Opt Data Len |   Error Type  |Reservd| Salvage|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                      Error Source Address                     |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                    Error Destination Address                  |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
.                                                               .
.                    Type-Specific Information                  .
.                                                               .
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

The type-specific information field varies by type of error, as detailed in the derived classes.

Definition at line 713 of file dsr-option-header.h.

Constructor & Destructor Documentation

◆ DsrOptionRerrHeader()

ns3::dsr::DsrOptionRerrHeader::DsrOptionRerrHeader ( )

Constructor.

Definition at line 730 of file dsr-option-header.cc.

References ns3::dsr::DsrOptionHeader::SetLength(), and ns3::dsr::DsrOptionHeader::SetType().

+ Here is the call graph for this function:

◆ ~DsrOptionRerrHeader()

ns3::dsr::DsrOptionRerrHeader::~DsrOptionRerrHeader ( )
override

Destructor.

Definition at line 739 of file dsr-option-header.cc.

Member Function Documentation

◆ Deserialize()

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

Deserialize the packet.

Parameters
startBuffer iterator
Returns
size of the packet

Reimplemented from ns3::dsr::DsrOptionHeader.

Reimplemented in ns3::dsr::DsrOptionRerrUnreachHeader, and ns3::dsr::DsrOptionRerrUnsupportedHeader.

Definition at line 820 of file dsr-option-header.cc.

References ns3::Buffer::AddAtEnd(), ns3::Buffer::Begin(), GetSerializedSize(), m_errorData, m_errorDstAddress, m_errorLength, m_errorSrcAddress, m_errorType, m_salvage, ns3::Buffer::Iterator::Next(), ns3::ReadFrom(), ns3::Buffer::Iterator::ReadU8(), ns3::dsr::DsrOptionHeader::SetLength(), ns3::dsr::DsrOptionHeader::SetType(), and ns3::Buffer::Iterator::Write().

+ Here is the call graph for this function:

◆ GetAlignment()

DsrOptionHeader::Alignment ns3::dsr::DsrOptionRerrHeader::GetAlignment ( ) const
overridevirtual

Get the Alignment requirement of this option header.

Returns
The required alignment

Reimplemented from ns3::dsr::DsrOptionHeader.

Reimplemented in ns3::dsr::DsrOptionRerrUnreachHeader, and ns3::dsr::DsrOptionRerrUnsupportedHeader.

Definition at line 842 of file dsr-option-header.cc.

◆ GetErrorDst()

Ipv4Address ns3::dsr::DsrOptionRerrHeader::GetErrorDst ( ) const
virtual

Get the error destination ip address.

Returns
The error destination address

Reimplemented in ns3::dsr::DsrOptionRerrUnreachHeader, and ns3::dsr::DsrOptionRerrUnsupportedHeader.

Definition at line 786 of file dsr-option-header.cc.

References m_errorDstAddress.

◆ GetErrorSrc()

Ipv4Address ns3::dsr::DsrOptionRerrHeader::GetErrorSrc ( ) const
virtual

Get the route error source address.

Returns
The error source address

Reimplemented in ns3::dsr::DsrOptionRerrUnreachHeader, and ns3::dsr::DsrOptionRerrUnsupportedHeader.

Definition at line 774 of file dsr-option-header.cc.

References m_errorSrcAddress.

◆ GetErrorType()

uint8_t ns3::dsr::DsrOptionRerrHeader::GetErrorType ( ) const

Get the route error type.

Returns
The error type

Definition at line 750 of file dsr-option-header.cc.

References m_errorType.

Referenced by ns3::dsr::DsrOptionRerrUnreachHeader::Serialize(), and ns3::dsr::DsrOptionRerrUnsupportedHeader::Serialize().

+ Here is the caller graph for this function:

◆ GetInstanceTypeId()

TypeId ns3::dsr::DsrOptionRerrHeader::GetInstanceTypeId ( ) const
overridevirtual

Get the instance type ID.

Returns
instance type ID

Reimplemented from ns3::dsr::DsrOptionHeader.

Reimplemented in ns3::dsr::DsrOptionRerrUnreachHeader, and ns3::dsr::DsrOptionRerrUnsupportedHeader.

Definition at line 725 of file dsr-option-header.cc.

References GetTypeId().

+ Here is the call graph for this function:

◆ GetSalvage()

uint8_t ns3::dsr::DsrOptionRerrHeader::GetSalvage ( ) const
virtual

Get the salvage value of the packet.

Returns
The salvage value of the packet

Reimplemented in ns3::dsr::DsrOptionRerrUnreachHeader, and ns3::dsr::DsrOptionRerrUnsupportedHeader.

Definition at line 762 of file dsr-option-header.cc.

References m_salvage.

◆ GetSerializedSize()

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

Get the serialized size of the packet.

Returns
size

Reimplemented from ns3::dsr::DsrOptionHeader.

Reimplemented in ns3::dsr::DsrOptionRerrUnreachHeader, and ns3::dsr::DsrOptionRerrUnsupportedHeader.

Definition at line 800 of file dsr-option-header.cc.

Referenced by Deserialize().

+ Here is the caller graph for this function:

◆ GetTypeId()

TypeId ns3::dsr::DsrOptionRerrHeader::GetTypeId ( )
static

Get the type identificator.

Returns
type identificator

Definition at line 715 of file dsr-option-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::DsrOptionRerrHeader::Print ( std::ostream & os) const
overridevirtual

Print some information about the packet.

Parameters
osoutput stream

Reimplemented from ns3::dsr::DsrOptionHeader.

Reimplemented in ns3::dsr::DsrOptionRerrUnreachHeader, and ns3::dsr::DsrOptionRerrUnsupportedHeader.

Definition at line 792 of file dsr-option-header.cc.

References ns3::dsr::DsrOptionHeader::GetLength(), ns3::dsr::DsrOptionHeader::GetType(), m_errorDstAddress, m_errorSrcAddress, m_errorType, and m_salvage.

+ Here is the call graph for this function:

◆ Serialize()

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

Serialize the packet.

Parameters
startBuffer iterator

Reimplemented from ns3::dsr::DsrOptionHeader.

Reimplemented in ns3::dsr::DsrOptionRerrUnreachHeader, and ns3::dsr::DsrOptionRerrUnsupportedHeader.

Definition at line 806 of file dsr-option-header.cc.

References ns3::Buffer::Begin(), ns3::Buffer::End(), ns3::dsr::DsrOptionHeader::GetLength(), ns3::dsr::DsrOptionHeader::GetType(), m_errorData, m_errorDstAddress, m_errorSrcAddress, m_errorType, m_salvage, ns3::Buffer::Iterator::Write(), ns3::WriteTo(), and ns3::Buffer::Iterator::WriteU8().

+ Here is the call graph for this function:

◆ SetErrorDst()

void ns3::dsr::DsrOptionRerrHeader::SetErrorDst ( Ipv4Address errorDstAddress)
virtual

Set the error destination ip address.

Parameters
errorDstAddressThe error destination address

Reimplemented in ns3::dsr::DsrOptionRerrUnreachHeader, and ns3::dsr::DsrOptionRerrUnsupportedHeader.

Definition at line 780 of file dsr-option-header.cc.

References m_errorDstAddress.

◆ SetErrorSrc()

void ns3::dsr::DsrOptionRerrHeader::SetErrorSrc ( Ipv4Address errorSrcAddress)
virtual

Set the route error source address.

Parameters
errorSrcAddressThe error source address

Reimplemented in ns3::dsr::DsrOptionRerrUnreachHeader, and ns3::dsr::DsrOptionRerrUnsupportedHeader.

Definition at line 768 of file dsr-option-header.cc.

References m_errorSrcAddress.

◆ SetErrorType()

void ns3::dsr::DsrOptionRerrHeader::SetErrorType ( uint8_t errorType)

◆ SetSalvage()

void ns3::dsr::DsrOptionRerrHeader::SetSalvage ( uint8_t salvage)
virtual

Set the salvage value of the packet.

Parameters
salvageThe salvage value of the packet

Reimplemented in ns3::dsr::DsrOptionRerrUnreachHeader, and ns3::dsr::DsrOptionRerrUnsupportedHeader.

Definition at line 756 of file dsr-option-header.cc.

References m_salvage.

Member Data Documentation

◆ m_errorData

Buffer ns3::dsr::DsrOptionRerrHeader::m_errorData
private

The anonymous data of this option.

Definition at line 825 of file dsr-option-header.h.

Referenced by Deserialize(), and Serialize().

◆ m_errorDstAddress

Ipv4Address ns3::dsr::DsrOptionRerrHeader::m_errorDstAddress
private

The error destination address.

Definition at line 821 of file dsr-option-header.h.

Referenced by Deserialize(), GetErrorDst(), Print(), Serialize(), and SetErrorDst().

◆ m_errorLength

uint16_t ns3::dsr::DsrOptionRerrHeader::m_errorLength
private

The specific error message length.

Definition at line 813 of file dsr-option-header.h.

Referenced by Deserialize().

◆ m_errorSrcAddress

Ipv4Address ns3::dsr::DsrOptionRerrHeader::m_errorSrcAddress
private

The error source address.

Definition at line 817 of file dsr-option-header.h.

Referenced by Deserialize(), GetErrorSrc(), Print(), Serialize(), and SetErrorSrc().

◆ m_errorType

uint8_t ns3::dsr::DsrOptionRerrHeader::m_errorType
private

The error type or route error option.

Definition at line 805 of file dsr-option-header.h.

Referenced by Deserialize(), GetErrorType(), Print(), Serialize(), and SetErrorType().

◆ m_salvage

uint8_t ns3::dsr::DsrOptionRerrHeader::m_salvage
private

The salvage field.

Definition at line 809 of file dsr-option-header.h.

Referenced by Deserialize(), GetSalvage(), Print(), Serialize(), and SetSalvage().


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