A Discrete-Event Network Simulator
API
ns3::Icmpv6OptionPrefixInformation Class Reference

ICMPv6 Option Prefix Information. More...

#include "icmpv6-header.h"

+ Inheritance diagram for ns3::Icmpv6OptionPrefixInformation:
+ Collaboration diagram for ns3::Icmpv6OptionPrefixInformation:

Public Types

enum  Flags_t { NONE = 0 , ROUTERADDR = 32 , AUTADDRCONF = 64 , ONLINK = 128 }
 Icmpv6 Option Prefix Information flag field values. More...
 

Public Member Functions

 Icmpv6OptionPrefixInformation ()
 Constructor. More...
 
 Icmpv6OptionPrefixInformation (Ipv6Address network, uint8_t prefixlen)
 Constructor. More...
 
 ~Icmpv6OptionPrefixInformation () override
 Destructor. More...
 
uint32_t Deserialize (Buffer::Iterator start) override
 Deserialize the packet. More...
 
uint8_t GetFlags () const
 Get the flags. More...
 
TypeId GetInstanceTypeId () const override
 Get the instance type ID. More...
 
uint32_t GetPreferredTime () const
 Get the preferred time of the information. More...
 
Ipv6Address GetPrefix () const
 Get the IPv6 prefix. More...
 
uint8_t GetPrefixLength () const
 Get the prefix length. More...
 
uint32_t GetReserved () const
 Get the reserved field. More...
 
uint32_t GetSerializedSize () const override
 Get the serialized size. More...
 
uint32_t GetValidTime () const
 Get the valid time of the information. More...
 
void Print (std::ostream &os) const override
 Print information. More...
 
void Serialize (Buffer::Iterator start) const override
 Serialize the packet. More...
 
void SetFlags (uint8_t flags)
 Set the flags. More...
 
void SetPreferredTime (uint32_t preferredTime)
 Set the preferred time of the information. More...
 
void SetPrefix (Ipv6Address prefix)
 Set the IPv6 prefix. More...
 
void SetPrefixLength (uint8_t prefixLength)
 Set the prefix length. More...
 
void SetReserved (uint32_t reserved)
 Set the reserved field (normally it will be 0x00000000). More...
 
void SetValidTime (uint32_t validTime)
 Set the valid time of the information. More...
 
- Public Member Functions inherited from ns3::Icmpv6OptionHeader
 Icmpv6OptionHeader ()
 Constructor. More...
 
 ~Icmpv6OptionHeader () override
 Destructor. More...
 
uint8_t GetLength () const
 Get the length of the option in 8 bytes unit. More...
 
uint8_t GetType () const
 Get the type of the option. More...
 
void SetLength (uint8_t len)
 Set the length of the option. More...
 
void SetType (uint8_t type)
 Set the type of the option. More...
 
- Public Member Functions inherited from ns3::Header
 ~Header () override
 
virtual uint32_t Deserialize (Buffer::Iterator start)=0
 Deserialize the object from a buffer iterator. More...
 
virtual uint32_t Deserialize (Buffer::Iterator start, Buffer::Iterator end)
 Deserialize the object from a buffer iterator. More...
 
- Public Member Functions inherited from ns3::Chunk
virtual uint32_t Deserialize (Buffer::Iterator start, Buffer::Iterator end)
 Deserialize the object from a buffer iterator. More...
 
- Public Member Functions inherited from ns3::ObjectBase
virtual ~ObjectBase ()
 Virtual destructor. More...
 
void GetAttribute (std::string name, AttributeValue &value) const
 Get the value of an attribute, raising fatal errors if unsuccessful. More...
 
bool GetAttributeFailSafe (std::string name, AttributeValue &value) const
 Get the value of an attribute without raising errors. More...
 
void SetAttribute (std::string name, const AttributeValue &value)
 Set a single attribute, raising fatal errors if unsuccessful. More...
 
bool SetAttributeFailSafe (std::string name, const AttributeValue &value)
 Set a single attribute without raising errors. More...
 
bool TraceConnect (std::string name, std::string context, const CallbackBase &cb)
 Connect a TraceSource to a Callback with a context. More...
 
bool TraceConnectWithoutContext (std::string name, const CallbackBase &cb)
 Connect a TraceSource to a Callback without a context. More...
 
bool TraceDisconnect (std::string name, std::string context, const CallbackBase &cb)
 Disconnect from a TraceSource a Callback previously connected with a context. More...
 
bool TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb)
 Disconnect from a TraceSource a Callback previously connected without a context. More...
 

Static Public Member Functions

static TypeId GetTypeId ()
 Get the UID of this class. More...
 
- Static Public Member Functions inherited from ns3::Icmpv6OptionHeader
static TypeId GetTypeId ()
 Get the UID of this class. More...
 
- Static Public Member Functions inherited from ns3::Header
static TypeId GetTypeId ()
 Get the type ID. More...
 
- Static Public Member Functions inherited from ns3::Chunk
static TypeId GetTypeId ()
 Get the type ID. More...
 
- Static Public Member Functions inherited from ns3::ObjectBase
static TypeId GetTypeId ()
 Get the type ID. More...
 

Private Attributes

uint8_t m_flags
 The flags. More...
 
uint32_t m_preferredTime
 The preferred time. More...
 
Ipv6Address m_prefix
 The prefix value. More...
 
uint8_t m_prefixLength
 The length of the prefix. More...
 
uint32_t m_reserved
 The reserved field. More...
 
uint32_t m_validTime
 The valid time. More...
 

Additional Inherited Members

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

Detailed Description

ICMPv6 Option Prefix Information.

Definition at line 1428 of file icmpv6-header.h.

Member Enumeration Documentation

◆ Flags_t

Icmpv6 Option Prefix Information flag field values.

Enumerator
NONE 

No flags.

ROUTERADDR 

Router Address.

AUTADDRCONF 

Autonomous Address Configuration.

ONLINK 

On-link.

Definition at line 1463 of file icmpv6-header.h.

Constructor & Destructor Documentation

◆ Icmpv6OptionPrefixInformation() [1/2]

ns3::Icmpv6OptionPrefixInformation::Icmpv6OptionPrefixInformation ( )

◆ Icmpv6OptionPrefixInformation() [2/2]

ns3::Icmpv6OptionPrefixInformation::Icmpv6OptionPrefixInformation ( Ipv6Address  network,
uint8_t  prefixlen 
)

Constructor.

Parameters
networkprefix
prefixlenprefix length

Definition at line 1784 of file icmpv6-header.cc.

References ns3::Icmpv6Header::ICMPV6_OPT_PREFIX, NS_LOG_FUNCTION, SetFlags(), ns3::Icmpv6OptionHeader::SetLength(), SetPreferredTime(), SetPrefix(), SetPrefixLength(), SetReserved(), ns3::Icmpv6OptionHeader::SetType(), and SetValidTime().

+ Here is the call graph for this function:

◆ ~Icmpv6OptionPrefixInformation()

ns3::Icmpv6OptionPrefixInformation::~Icmpv6OptionPrefixInformation ( )
override

Destructor.

Definition at line 1797 of file icmpv6-header.cc.

References NS_LOG_FUNCTION.

Member Function Documentation

◆ Deserialize()

uint32_t ns3::Icmpv6OptionPrefixInformation::Deserialize ( Buffer::Iterator  start)
overridevirtual

◆ GetFlags()

uint8_t ns3::Icmpv6OptionPrefixInformation::GetFlags ( ) const

Get the flags.

Returns
the flags.

Definition at line 1818 of file icmpv6-header.cc.

References m_flags, and NS_LOG_FUNCTION.

◆ GetInstanceTypeId()

TypeId ns3::Icmpv6OptionPrefixInformation::GetInstanceTypeId ( void  ) const
overridevirtual

Get the instance type ID.

Returns
instance type ID

Reimplemented from ns3::Icmpv6OptionHeader.

Definition at line 1765 of file icmpv6-header.cc.

References GetTypeId(), and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

◆ GetPreferredTime()

uint32_t ns3::Icmpv6OptionPrefixInformation::GetPreferredTime ( ) const

Get the preferred time of the information.

Returns
preferred time

Definition at line 1846 of file icmpv6-header.cc.

References m_preferredTime, and NS_LOG_FUNCTION.

◆ GetPrefix()

Ipv6Address ns3::Icmpv6OptionPrefixInformation::GetPrefix ( ) const

Get the IPv6 prefix.

Returns
IPv6 prefix

Definition at line 1874 of file icmpv6-header.cc.

References m_prefix, and NS_LOG_FUNCTION.

◆ GetPrefixLength()

uint8_t ns3::Icmpv6OptionPrefixInformation::GetPrefixLength ( ) const

Get the prefix length.

Returns
prefix length

Definition at line 1803 of file icmpv6-header.cc.

References m_prefixLength, and NS_LOG_FUNCTION.

◆ GetReserved()

uint32_t ns3::Icmpv6OptionPrefixInformation::GetReserved ( ) const

Get the reserved field.

Returns
the reserved field (should be 0x00000000)

Definition at line 1860 of file icmpv6-header.cc.

References m_preferredTime, and NS_LOG_FUNCTION.

◆ GetSerializedSize()

uint32_t ns3::Icmpv6OptionPrefixInformation::GetSerializedSize ( ) const
overridevirtual

Get the serialized size.

Returns
serialized size

Reimplemented from ns3::Icmpv6OptionHeader.

Definition at line 1896 of file icmpv6-header.cc.

References NS_LOG_FUNCTION.

Referenced by Deserialize().

+ Here is the caller graph for this function:

◆ GetTypeId()

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

Get the UID of this class.

Returns
UID

Definition at line 1755 of file icmpv6-header.cc.

References ns3::TypeId::SetParent().

Referenced by GetInstanceTypeId().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetValidTime()

uint32_t ns3::Icmpv6OptionPrefixInformation::GetValidTime ( ) const

Get the valid time of the information.

Returns
valid time

Definition at line 1832 of file icmpv6-header.cc.

References m_validTime, and NS_LOG_FUNCTION.

◆ Print()

void ns3::Icmpv6OptionPrefixInformation::Print ( std::ostream &  os) const
overridevirtual

Print information.

Parameters
osoutput stream

Reimplemented from ns3::Icmpv6OptionHeader.

Definition at line 1888 of file icmpv6-header.cc.

References ns3::Icmpv6OptionHeader::GetLength(), ns3::Icmpv6OptionHeader::GetType(), m_prefix, and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

◆ Serialize()

void ns3::Icmpv6OptionPrefixInformation::Serialize ( Buffer::Iterator  start) const
overridevirtual

◆ SetFlags()

void ns3::Icmpv6OptionPrefixInformation::SetFlags ( uint8_t  flags)

Set the flags.

Parameters
flagsthe flags to set

Definition at line 1825 of file icmpv6-header.cc.

References m_flags, and NS_LOG_FUNCTION.

Referenced by Icmpv6OptionPrefixInformation(), Deserialize(), and ns3::Radvd::Send().

+ Here is the caller graph for this function:

◆ SetPreferredTime()

void ns3::Icmpv6OptionPrefixInformation::SetPreferredTime ( uint32_t  preferredTime)

Set the preferred time of the information.

Parameters
preferredTimepreferred time

Definition at line 1853 of file icmpv6-header.cc.

References m_preferredTime, and NS_LOG_FUNCTION.

Referenced by Icmpv6OptionPrefixInformation(), Deserialize(), and ns3::Radvd::Send().

+ Here is the caller graph for this function:

◆ SetPrefix()

void ns3::Icmpv6OptionPrefixInformation::SetPrefix ( Ipv6Address  prefix)

Set the IPv6 prefix.

Parameters
prefixthe IPv6 prefix

Definition at line 1881 of file icmpv6-header.cc.

References m_prefix, and NS_LOG_FUNCTION.

Referenced by Icmpv6OptionPrefixInformation(), Deserialize(), and ns3::Radvd::Send().

+ Here is the caller graph for this function:

◆ SetPrefixLength()

void ns3::Icmpv6OptionPrefixInformation::SetPrefixLength ( uint8_t  prefixLength)

Set the prefix length.

Parameters
prefixLengththe prefix length

Definition at line 1810 of file icmpv6-header.cc.

References m_prefixLength, NS_ASSERT, and NS_LOG_FUNCTION.

Referenced by Icmpv6OptionPrefixInformation(), Deserialize(), and ns3::Radvd::Send().

+ Here is the caller graph for this function:

◆ SetReserved()

void ns3::Icmpv6OptionPrefixInformation::SetReserved ( uint32_t  reserved)

Set the reserved field (normally it will be 0x00000000).

Parameters
reservedreserved value

Definition at line 1867 of file icmpv6-header.cc.

References m_reserved, and NS_LOG_FUNCTION.

Referenced by Icmpv6OptionPrefixInformation(), and Deserialize().

+ Here is the caller graph for this function:

◆ SetValidTime()

void ns3::Icmpv6OptionPrefixInformation::SetValidTime ( uint32_t  validTime)

Set the valid time of the information.

Parameters
validTimevalid time

Definition at line 1839 of file icmpv6-header.cc.

References m_validTime, and NS_LOG_FUNCTION.

Referenced by Icmpv6OptionPrefixInformation(), Deserialize(), and ns3::Radvd::Send().

+ Here is the caller graph for this function:

Member Data Documentation

◆ m_flags

uint8_t ns3::Icmpv6OptionPrefixInformation::m_flags
private

The flags.

Definition at line 1582 of file icmpv6-header.h.

Referenced by GetFlags(), Serialize(), and SetFlags().

◆ m_preferredTime

uint32_t ns3::Icmpv6OptionPrefixInformation::m_preferredTime
private

The preferred time.

Definition at line 1592 of file icmpv6-header.h.

Referenced by GetPreferredTime(), GetReserved(), Serialize(), and SetPreferredTime().

◆ m_prefix

Ipv6Address ns3::Icmpv6OptionPrefixInformation::m_prefix
private

The prefix value.

Definition at line 1572 of file icmpv6-header.h.

Referenced by GetPrefix(), Print(), Serialize(), and SetPrefix().

◆ m_prefixLength

uint8_t ns3::Icmpv6OptionPrefixInformation::m_prefixLength
private

The length of the prefix.

Definition at line 1577 of file icmpv6-header.h.

Referenced by GetPrefixLength(), Serialize(), and SetPrefixLength().

◆ m_reserved

uint32_t ns3::Icmpv6OptionPrefixInformation::m_reserved
private

The reserved field.

Definition at line 1597 of file icmpv6-header.h.

Referenced by Serialize(), and SetReserved().

◆ m_validTime

uint32_t ns3::Icmpv6OptionPrefixInformation::m_validTime
private

The valid time.

Definition at line 1587 of file icmpv6-header.h.

Referenced by GetValidTime(), Serialize(), and SetValidTime().


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