A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ns3::Ipv6OptionHeader Class Reference

Header for IPv6 Option. More...

#include <ipv6-option-header.h>

+ Inheritance diagram for ns3::Ipv6OptionHeader:
+ Collaboration diagram for ns3::Ipv6OptionHeader:

Classes

struct  Alignment
 represents the alignment requirements of an option header More...

Public Member Functions

 Ipv6OptionHeader ()
 Constructor.
virtual ~Ipv6OptionHeader ()
 Destructor.
virtual uint32_t Deserialize (Buffer::Iterator start)
 Deserialize the packet.
virtual Alignment GetAlignment () const
 Get the Alignment requirement of this option header.
virtual TypeId GetInstanceTypeId () const
 Get the instance type ID.
uint8_t GetLength () const
 Get the option length.
virtual uint32_t GetSerializedSize () const
 Get the serialized size of the packet.
uint8_t GetType () const
 Get the type of the option.
virtual void Print (std::ostream &os) const
 Print some informations about the packet.
virtual void Serialize (Buffer::Iterator start) const
 Serialize the packet.
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
virtual ~Header ()

Static Public Member Functions

static TypeId GetTypeId ()
 Get the type identificator.

Private Attributes

Buffer m_data
 The anonymous data of this option.
uint8_t m_length
 The option length.
uint8_t m_type
 The type of the option.

Additional Inherited Members

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

Detailed Description

Header for IPv6 Option.

Definition at line 35 of file ipv6-option-header.h.

Constructor & Destructor Documentation

ns3::Ipv6OptionHeader::Ipv6OptionHeader ( )

Constructor.

Definition at line 47 of file ipv6-option-header.cc.

ns3::Ipv6OptionHeader::~Ipv6OptionHeader ( )
virtual

Destructor.

Definition at line 53 of file ipv6-option-header.cc.

Member Function Documentation

uint32_t ns3::Ipv6OptionHeader::Deserialize ( Buffer::Iterator  start)
virtual
Ipv6OptionHeader::Alignment ns3::Ipv6OptionHeader::GetAlignment ( ) const
virtual

Get the Alignment requirement of this option header.

Returns
The required alignment

Subclasses should only implement this method, if special alignment is required. Default is no alignment (1n+0).

Reimplemented in ns3::Ipv6OptionRouterAlertHeader, ns3::Ipv6OptionJumbogramHeader, and OptionWithAlignmentHeader.

Definition at line 114 of file ipv6-option-header.cc.

Referenced by ns3::OptionField::AddOption().

+ Here is the caller graph for this function:

TypeId ns3::Ipv6OptionHeader::GetInstanceTypeId ( void  ) const
virtual

Get the instance type ID.

Returns
instance type ID

Implements ns3::ObjectBase.

Reimplemented in ns3::Ipv6OptionRouterAlertHeader, ns3::Ipv6OptionJumbogramHeader, ns3::Ipv6OptionPadnHeader, and ns3::Ipv6OptionPad1Header.

Definition at line 42 of file ipv6-option-header.cc.

References GetTypeId().

+ Here is the call graph for this function:

uint32_t ns3::Ipv6OptionHeader::GetSerializedSize ( void  ) const
virtual

Get the serialized size of the packet.

Returns
size

Implements ns3::Header.

Reimplemented in ns3::Ipv6OptionRouterAlertHeader, ns3::Ipv6OptionJumbogramHeader, ns3::Ipv6OptionPadnHeader, ns3::Ipv6OptionPad1Header, OptionWithAlignmentHeader, and OptionWithoutAlignmentHeader.

Definition at line 82 of file ipv6-option-header.cc.

References m_length.

Referenced by ns3::OptionField::AddOption(), and Deserialize().

+ Here is the caller graph for this function:

TypeId ns3::Ipv6OptionHeader::GetTypeId ( void  )
static

Get the type identificator.

This method returns the TypeId associated to ns3::Ipv6OptionHeader.

Returns
type identificator

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

Reimplemented from ns3::Header.

Reimplemented in ns3::Ipv6OptionRouterAlertHeader, ns3::Ipv6OptionJumbogramHeader, ns3::Ipv6OptionPadnHeader, and ns3::Ipv6OptionPad1Header.

Definition at line 33 of file ipv6-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:

void ns3::Ipv6OptionHeader::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::Ipv6OptionRouterAlertHeader, ns3::Ipv6OptionJumbogramHeader, ns3::Ipv6OptionPadnHeader, and ns3::Ipv6OptionPad1Header.

Definition at line 77 of file ipv6-option-header.cc.

References m_type.

void ns3::Ipv6OptionHeader::Serialize ( Buffer::Iterator  start) const
virtual

Serialize the packet.

Parameters
startBuffer iterator

Implements ns3::Header.

Reimplemented in ns3::Ipv6OptionRouterAlertHeader, ns3::Ipv6OptionJumbogramHeader, ns3::Ipv6OptionPadnHeader, ns3::Ipv6OptionPad1Header, OptionWithAlignmentHeader, and OptionWithoutAlignmentHeader.

Definition at line 87 of file ipv6-option-header.cc.

References ns3::Buffer::Begin(), ns3::Buffer::End(), m_data, m_length, m_type, visualizer.core::start(), ns3::Buffer::Iterator::Write(), and ns3::Buffer::Iterator::WriteU8().

Referenced by ns3::OptionField::AddOption().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::Ipv6OptionHeader::SetLength ( uint8_t  length)
void ns3::Ipv6OptionHeader::SetType ( uint8_t  type)

Member Data Documentation

Buffer ns3::Ipv6OptionHeader::m_data
private

The anonymous data of this option.

Definition at line 147 of file ipv6-option-header.h.

Referenced by Deserialize(), and Serialize().

uint8_t ns3::Ipv6OptionHeader::m_length
private

The option length.

Definition at line 142 of file ipv6-option-header.h.

Referenced by Deserialize(), GetLength(), GetSerializedSize(), Serialize(), and SetLength().

uint8_t ns3::Ipv6OptionHeader::m_type
private

The type of the option.

Definition at line 137 of file ipv6-option-header.h.

Referenced by Deserialize(), GetType(), Print(), Serialize(), and SetType().


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