A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ns3::Icmpv6OptionSixLowPanContext Class Reference

ICMPv6 SixLowPan Context Option header (see RFC 8505). More...

#include "sixlowpan-nd-header.h"

Inheritance diagram for ns3::Icmpv6OptionSixLowPanContext:
Collaboration diagram for ns3::Icmpv6OptionSixLowPanContext:

Public Member Functions

 Icmpv6OptionSixLowPanContext ()
 Constructor.
 Icmpv6OptionSixLowPanContext (bool c, uint8_t cid, uint16_t time, Ipv6Prefix prefix)
 Constructor.
 ~Icmpv6OptionSixLowPanContext () override
 Destructor.
uint32_t Deserialize (Buffer::Iterator start) override
 Deserialize the packet.
uint8_t GetCid () const
 Get the context identifier field.
uint8_t GetContextLen () const
 Get the context length field.
Ipv6Prefix GetContextPrefix () const
 Get the context prefix field.
TypeId GetInstanceTypeId () const override
 Get the instance type ID.
uint32_t GetSerializedSize () const override
 Get the serialized size.
uint16_t GetValidTime () const
 Get the valid lifetime field.
bool IsFlagC () const
 Is compression flag ?
void Print (std::ostream &os) const override
 Print information.
void Serialize (Buffer::Iterator start) const override
 Serialize the packet.
void SetCid (uint8_t cid)
 Set the context identifier field.
void SetContextPrefix (Ipv6Prefix prefix)
 Set the context prefix field.
void SetFlagC (bool c)
 Set the C flag.
void SetValidTime (uint16_t time)
 Set the valid lifetime field.
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

bool m_c
 The compression flag, indicates that this context is valid for use in compression.
uint8_t m_cid
 The context identifier value.
uint8_t m_contextLen
 The context length value.
Ipv6Prefix m_prefix
 The context prefix value.
uint16_t m_validTime
 The valid lifetime value (units of 60 seconds).

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 SixLowPan Context Option header (see RFC 8505).

Introspection did not find any typical Config paths
No Attributes are defined for this type
No TraceSources are defined for this type
Group: Internet
Size of this type is 40 bytes (on a 64-bit architecture).


Definition at line 407 of file sixlowpan-nd-header.h.

Constructor & Destructor Documentation

◆ Icmpv6OptionSixLowPanContext() [1/2]

ns3::Icmpv6OptionSixLowPanContext::Icmpv6OptionSixLowPanContext ( )

Constructor.

Definition at line 523 of file sixlowpan-nd-header.cc.

References ns3::Icmpv6Header::ICMPV6_OPT_SIXLOWPAN_CONTEXT, m_c, m_cid, m_contextLen, m_prefix, m_validTime, NS_LOG_FUNCTION, ns3::Icmpv6OptionHeader::SetLength(), and ns3::Icmpv6OptionHeader::SetType().

Referenced by GetTypeId().

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

◆ Icmpv6OptionSixLowPanContext() [2/2]

ns3::Icmpv6OptionSixLowPanContext::Icmpv6OptionSixLowPanContext ( bool c,
uint8_t cid,
uint16_t time,
Ipv6Prefix prefix )

Constructor.

Parameters
cthe c flag
cidthe context identifier
timethe valid lifetime (units of 60 seconds)
prefixthe context prefix

Definition at line 535 of file sixlowpan-nd-header.cc.

References ns3::Ipv6Prefix::GetPrefixLength(), ns3::Icmpv6Header::ICMPV6_OPT_SIXLOWPAN_CONTEXT, m_c, m_cid, m_contextLen, m_prefix, m_validTime, NS_LOG_FUNCTION, ns3::Icmpv6OptionHeader::SetLength(), and ns3::Icmpv6OptionHeader::SetType().

Here is the call graph for this function:

◆ ~Icmpv6OptionSixLowPanContext()

ns3::Icmpv6OptionSixLowPanContext::~Icmpv6OptionSixLowPanContext ( )
override

Destructor.

Definition at line 559 of file sixlowpan-nd-header.cc.

References NS_LOG_FUNCTION.

Member Function Documentation

◆ Deserialize()

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

Deserialize the packet.

Parameters
startstart offset
Returns
length of packet

Reimplemented from ns3::Icmpv6OptionHeader.

Definition at line 707 of file sixlowpan-nd-header.cc.

References GetContextLen(), GetSerializedSize(), m_c, m_cid, m_contextLen, m_prefix, m_validTime, ns3::Buffer::Iterator::Next(), NS_LOG_FUNCTION, ns3::Buffer::Iterator::Read(), ns3::Buffer::Iterator::ReadNtohU16(), ns3::Buffer::Iterator::ReadU8(), ns3::Icmpv6OptionHeader::SetLength(), and ns3::Icmpv6OptionHeader::SetType().

Here is the call graph for this function:

◆ GetCid()

uint8_t ns3::Icmpv6OptionSixLowPanContext::GetCid ( ) const

Get the context identifier field.

Returns
context identifier value

Definition at line 603 of file sixlowpan-nd-header.cc.

References m_cid, and NS_LOG_FUNCTION.

◆ GetContextLen()

uint8_t ns3::Icmpv6OptionSixLowPanContext::GetContextLen ( ) const

Get the context length field.

Returns
context length value

Definition at line 582 of file sixlowpan-nd-header.cc.

References m_contextLen, and NS_LOG_FUNCTION.

Referenced by Deserialize().

Here is the caller graph for this function:

◆ GetContextPrefix()

Ipv6Prefix ns3::Icmpv6OptionSixLowPanContext::GetContextPrefix ( ) const

Get the context prefix field.

Returns
context prefix value

Definition at line 632 of file sixlowpan-nd-header.cc.

References m_prefix, and NS_LOG_FUNCTION.

◆ GetInstanceTypeId()

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

Get the instance type ID.

Returns
instance type ID

Reimplemented from ns3::Icmpv6OptionHeader.

Definition at line 575 of file sixlowpan-nd-header.cc.

References GetTypeId(), and NS_LOG_FUNCTION.

Here is the call graph for this function:

◆ GetSerializedSize()

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

Get the serialized size.

Returns
serialized size

Reimplemented from ns3::Icmpv6OptionHeader.

Definition at line 667 of file sixlowpan-nd-header.cc.

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

Referenced by Deserialize().

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

◆ GetTypeId()

TypeId ns3::Icmpv6OptionSixLowPanContext::GetTypeId ( )
static

Get the UID of this class.

Returns
UID

Definition at line 565 of file sixlowpan-nd-header.cc.

References ns3::Icmpv6OptionHeader::Icmpv6OptionHeader(), Icmpv6OptionSixLowPanContext(), and ns3::TypeId::SetParent().

Referenced by GetInstanceTypeId().

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

◆ GetValidTime()

uint16_t ns3::Icmpv6OptionSixLowPanContext::GetValidTime ( ) const

Get the valid lifetime field.

Returns
valid lifetime value (units of 60 seconds)

Definition at line 618 of file sixlowpan-nd-header.cc.

References m_validTime, and NS_LOG_FUNCTION.

◆ IsFlagC()

bool ns3::Icmpv6OptionSixLowPanContext::IsFlagC ( ) const

Is compression flag ?

Returns
true if context is valid for use in compression, false otherwise

Definition at line 589 of file sixlowpan-nd-header.cc.

References m_c, and NS_LOG_FUNCTION.

◆ Print()

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

Print information.

Parameters
osoutput stream

Reimplemented from ns3::Icmpv6OptionHeader.

Definition at line 656 of file sixlowpan-nd-header.cc.

References ns3::Icmpv6OptionHeader::GetLength(), ns3::Icmpv6OptionHeader::GetType(), m_c, m_cid, m_contextLen, m_prefix, m_validTime, and NS_LOG_FUNCTION.

Here is the call graph for this function:

◆ Serialize()

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

Serialize the packet.

Parameters
startstart offset

Reimplemented from ns3::Icmpv6OptionHeader.

Definition at line 675 of file sixlowpan-nd-header.cc.

References ns3::Icmpv6OptionHeader::GetLength(), ns3::Icmpv6OptionHeader::GetType(), m_c, m_cid, m_contextLen, m_prefix, m_validTime, NS_LOG_FUNCTION, ns3::Buffer::Iterator::Write(), ns3::Buffer::Iterator::WriteU16(), and ns3::Buffer::Iterator::WriteU8().

Here is the call graph for this function:

◆ SetCid()

void ns3::Icmpv6OptionSixLowPanContext::SetCid ( uint8_t cid)

Set the context identifier field.

Parameters
cidthe context identifier value

Definition at line 610 of file sixlowpan-nd-header.cc.

References m_cid, NS_ASSERT, and NS_LOG_FUNCTION.

Referenced by ns3::SixLowPanNdProtocol::MakeRaPacket().

Here is the caller graph for this function:

◆ SetContextPrefix()

void ns3::Icmpv6OptionSixLowPanContext::SetContextPrefix ( Ipv6Prefix prefix)

Set the context prefix field.

Parameters
prefixthe context prefix value

Definition at line 639 of file sixlowpan-nd-header.cc.

References ns3::Ipv6Prefix::GetPrefixLength(), m_contextLen, m_prefix, NS_LOG_FUNCTION, and ns3::Icmpv6OptionHeader::SetLength().

Referenced by ns3::SixLowPanNdProtocol::MakeRaPacket().

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

◆ SetFlagC()

void ns3::Icmpv6OptionSixLowPanContext::SetFlagC ( bool c)

Set the C flag.

Parameters
cthe C flag

Definition at line 596 of file sixlowpan-nd-header.cc.

References m_c, and NS_LOG_FUNCTION.

Referenced by ns3::SixLowPanNdProtocol::MakeRaPacket().

Here is the caller graph for this function:

◆ SetValidTime()

void ns3::Icmpv6OptionSixLowPanContext::SetValidTime ( uint16_t time)

Set the valid lifetime field.

Parameters
timethe valid lifetime value (units of 60 seconds)

Definition at line 625 of file sixlowpan-nd-header.cc.

References m_validTime, and NS_LOG_FUNCTION.

Referenced by ns3::SixLowPanNdProtocol::MakeRaPacket().

Here is the caller graph for this function:

Member Data Documentation

◆ m_c

bool ns3::Icmpv6OptionSixLowPanContext::m_c
private

The compression flag, indicates that this context is valid for use in compression.

Definition at line 529 of file sixlowpan-nd-header.h.

Referenced by Icmpv6OptionSixLowPanContext(), Icmpv6OptionSixLowPanContext(), Deserialize(), IsFlagC(), Print(), Serialize(), and SetFlagC().

◆ m_cid

uint8_t ns3::Icmpv6OptionSixLowPanContext::m_cid
private

The context identifier value.

Definition at line 534 of file sixlowpan-nd-header.h.

Referenced by Icmpv6OptionSixLowPanContext(), Icmpv6OptionSixLowPanContext(), Deserialize(), GetCid(), Print(), Serialize(), and SetCid().

◆ m_contextLen

uint8_t ns3::Icmpv6OptionSixLowPanContext::m_contextLen
private

◆ m_prefix

Ipv6Prefix ns3::Icmpv6OptionSixLowPanContext::m_prefix
private

◆ m_validTime

uint16_t ns3::Icmpv6OptionSixLowPanContext::m_validTime
private

The valid lifetime value (units of 60 seconds).

Definition at line 539 of file sixlowpan-nd-header.h.

Referenced by Icmpv6OptionSixLowPanContext(), Icmpv6OptionSixLowPanContext(), Deserialize(), GetValidTime(), Print(), Serialize(), and SetValidTime().


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