A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
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.
 
 Icmpv6OptionPrefixInformation (Ipv6Address network, uint8_t prefixlen)
 Constructor.
 
 ~Icmpv6OptionPrefixInformation () override
 Destructor.
 
uint32_t Deserialize (Buffer::Iterator start) override
 Deserialize the packet.
 
uint8_t GetFlags () const
 Get the flags.
 
TypeId GetInstanceTypeId () const override
 Get the instance type ID.
 
uint32_t GetPreferredTime () const
 Get the preferred time of the information.
 
Ipv6Address GetPrefix () const
 Get the IPv6 prefix.
 
uint8_t GetPrefixLength () const
 Get the prefix length.
 
uint32_t GetReserved () const
 Get the reserved field.
 
uint32_t GetSerializedSize () const override
 Get the serialized size.
 
uint32_t GetValidTime () const
 Get the valid time of the information.
 
void Print (std::ostream &os) const override
 Print information.
 
void Serialize (Buffer::Iterator start) const override
 Serialize the packet.
 
void SetFlags (uint8_t flags)
 Set the flags.
 
void SetPreferredTime (uint32_t preferredTime)
 Set the preferred time of the information.
 
void SetPrefix (Ipv6Address prefix)
 Set the IPv6 prefix.
 
void SetPrefixLength (uint8_t prefixLength)
 Set the prefix length.
 
void SetReserved (uint32_t reserved)
 Set the reserved field (normally it will be 0x00000000).
 
void SetValidTime (uint32_t validTime)
 Set the valid time of the information.
 
- Public Member Functions inherited from ns3::Icmpv6OptionHeader
 Icmpv6OptionHeader ()
 Constructor.
 
 ~Icmpv6OptionHeader () override
 Destructor.
 
uint8_t GetLength () const
 Get the length of the option in 8 bytes unit.
 
uint8_t GetType () const
 Get the type of the option.
 
void SetLength (uint8_t len)
 Set the length of the option.
 
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 UID of this class.
 
- Static Public Member Functions inherited from ns3::Icmpv6OptionHeader
static TypeId GetTypeId ()
 Get the UID of this class.
 
- 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

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

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

ICMPv6 Option Prefix Information.

Definition at line 1417 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 1452 of file icmpv6-header.h.

Constructor & Destructor Documentation

◆ Icmpv6OptionPrefixInformation() [1/2]

ns3::Icmpv6OptionPrefixInformation::Icmpv6OptionPrefixInformation ( )

Constructor.

Definition at line 1760 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() [2/2]

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

Constructor.

Parameters
networkprefix
prefixlenprefix length

Definition at line 1773 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 1786 of file icmpv6-header.cc.

References NS_LOG_FUNCTION.

Member Function Documentation

◆ Deserialize()

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

Deserialize the packet.

Parameters
startstart offset
Returns
length of packet

Reimplemented from ns3::Icmpv6OptionHeader.

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

References GetSerializedSize(), NS_LOG_FUNCTION, ns3::Buffer::Iterator::Read(), ns3::Buffer::Iterator::ReadNtohU32(), ns3::Buffer::Iterator::ReadU8(), SetFlags(), ns3::Icmpv6OptionHeader::SetLength(), SetPreferredTime(), SetPrefix(), SetPrefixLength(), SetReserved(), ns3::Icmpv6OptionHeader::SetType(), and SetValidTime().

+ Here is the call graph for this function:

◆ GetFlags()

uint8_t ns3::Icmpv6OptionPrefixInformation::GetFlags ( ) const

Get the flags.

Returns
the flags.

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

References m_flags, and NS_LOG_FUNCTION.

◆ GetInstanceTypeId()

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

Get the instance type ID.

Returns
instance type ID

Reimplemented from ns3::Icmpv6OptionHeader.

Definition at line 1754 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 1835 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 1863 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 1792 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 1849 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 1885 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 ( )
static

Get the UID of this class.

Returns
UID

Definition at line 1744 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 1821 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 1877 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

Serialize the packet.

Parameters
startstart offset

Reimplemented from ns3::Icmpv6OptionHeader.

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

References ns3::Ipv6Address::GetBytes(), ns3::Icmpv6OptionHeader::GetLength(), ns3::Icmpv6OptionHeader::GetType(), m_flags, m_preferredTime, m_prefix, m_prefixLength, m_reserved, m_validTime, NS_LOG_FUNCTION, ns3::Buffer::Iterator::Write(), ns3::Buffer::Iterator::WriteHtonU32(), and ns3::Buffer::Iterator::WriteU8().

+ Here is the call graph for this function:

◆ SetFlags()

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

Set the flags.

Parameters
flagsthe flags to set

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

References m_flags, and NS_LOG_FUNCTION.

Referenced by Icmpv6OptionPrefixInformation(), 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 1842 of file icmpv6-header.cc.

References m_preferredTime, and NS_LOG_FUNCTION.

Referenced by Icmpv6OptionPrefixInformation(), 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 1870 of file icmpv6-header.cc.

References m_prefix, and NS_LOG_FUNCTION.

Referenced by Icmpv6OptionPrefixInformation(), 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 1799 of file icmpv6-header.cc.

References m_prefixLength, NS_ASSERT, and NS_LOG_FUNCTION.

Referenced by Icmpv6OptionPrefixInformation(), 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 1856 of file icmpv6-header.cc.

References m_reserved, and NS_LOG_FUNCTION.

Referenced by Icmpv6OptionPrefixInformation(), 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 1828 of file icmpv6-header.cc.

References m_validTime, and NS_LOG_FUNCTION.

Referenced by Icmpv6OptionPrefixInformation(), 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 1571 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 1581 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 1561 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 1566 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 1586 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 1576 of file icmpv6-header.h.

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


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