A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ns3::dsr::DsrOptionField Class Reference
+ Inheritance diagram for ns3::dsr::DsrOptionField:

Public Member Functions

 DsrOptionField (uint32_t optionsOffset)
 Constructor. More...
 
 ~DsrOptionField ()
 Destructor.
 
void AddDsrOption (DsrOptionHeader const &option)
 Serialize the option, prepending pad1 or padn option as necessary. More...
 
uint32_t Deserialize (Buffer::Iterator start, uint32_t length)
 Deserialize the packet. More...
 
Buffer GetDsrOptionBuffer ()
 Get the buffer. More...
 
uint32_t GetDsrOptionsOffset ()
 Get the offset where the options begin, measured from the start of the extension header. More...
 
uint32_t GetSerializedSize () const
 Get the serialized size of the packet. More...
 
void Serialize (Buffer::Iterator start) const
 Serialize all added options. More...
 

Private Member Functions

uint32_t CalculatePad (DsrOptionHeader::Alignment alignment) const
 Calculate padding. More...
 

Private Attributes

Buffer m_optionData
 Data payload.
 
uint32_t m_optionsOffset
 Offset.
 

Detailed Description

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

Constructor & Destructor Documentation

ns3::dsr::DsrOptionField::DsrOptionField ( uint32_t  optionsOffset)

Constructor.

Parameters
optionsOffsetoption offset

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

Member Function Documentation

uint32_t ns3::dsr::DsrOptionField::CalculatePad ( DsrOptionHeader::Alignment  alignment) const
private
uint32_t ns3::dsr::DsrOptionField::Deserialize ( Buffer::Iterator  start,
uint32_t  length 
)

Deserialize the packet.

Parameters
startBuffer iterator
lengthlength
Returns
size of the packet

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

References ns3::Buffer::AddAtEnd(), ns3::Buffer::Begin(), m_optionData, ns3::Buffer::Iterator::Read(), and ns3::Buffer::Iterator::Write().

Referenced by ns3::dsr::DsrRoutingHeader::Deserialize().

Buffer ns3::dsr::DsrOptionField::GetDsrOptionBuffer ( )

Get the buffer.

Returns
buffer

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

References m_optionData.

uint32_t ns3::dsr::DsrOptionField::GetDsrOptionsOffset ( )
uint32_t ns3::dsr::DsrOptionField::GetSerializedSize ( void  ) const

Get the serialized size of the packet.

Returns
size

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

References CalculatePad(), ns3::Buffer::GetSize(), and m_optionData.

Referenced by ns3::dsr::DsrRoutingHeader::GetSerializedSize().

void ns3::dsr::DsrOptionField::Serialize ( Buffer::Iterator  start) const

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