Public Member Functions

ns3::OptionField Class Reference

Option field for an IPv6ExtensionHeader Enables adding options to an IPv6ExtensionHeader. More...

#include <ipv6-extension-header.h>

Inheritance diagram for ns3::OptionField:
Inheritance graph
[legend]
Collaboration diagram for ns3::OptionField:
Collaboration graph
[legend]

List of all members.

Public Member Functions

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

Detailed Description

Option field for an IPv6ExtensionHeader Enables adding options to an IPv6ExtensionHeader.

Implementor's note: Make sure to add the result of OptionField::GetSerializedSize () to your IPv6ExtensionHeader::GetSerializedSize () return value. Call OptionField::Serialize and OptionField::Deserialize at the end of your corresponding IPv6ExtensionHeader methods.


Constructor & Destructor Documentation

ns3::OptionField::OptionField ( uint32_t  optionsOffset  ) 

Constructor.

Parameters:
optionsOffset option offset

Member Function Documentation

void ns3::OptionField::AddOption ( Ipv6OptionHeader const &  option  ) 

Serialize the option, prepending pad1 or padn option as necessary.

Parameters:
option the option header to serialize
uint32_t ns3::OptionField::Deserialize ( Buffer::Iterator  start,
uint32_t  length 
)

Deserialize the packet.

Parameters:
start Buffer iterator
length length
Returns:
size of the packet
Buffer ns3::OptionField::GetOptionBuffer (  ) 

Get the buffer.

Returns:
buffer
uint32_t ns3::OptionField::GetOptionsOffset (  ) 

Get the offset where the options begin, measured from the start of the extension header.

Returns:
the offset from the start of the extension header
uint32_t ns3::OptionField::GetSerializedSize (  )  const

Get the serialized size of the packet.

Returns:
size

Reimplemented in ns3::Ipv6ExtensionHopByHopHeader, and ns3::Ipv6ExtensionDestinationHeader.

void ns3::OptionField::Serialize ( Buffer::Iterator  start  )  const

Serialize all added options.

Parameters:
start Buffer iterator

Reimplemented in ns3::Ipv6ExtensionHopByHopHeader, and ns3::Ipv6ExtensionDestinationHeader.


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