ICMPv6 SixLowPan Context Option header (see RFC 8505). More...
#include "sixlowpan-nd-header.h"
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. | |
| Related Symbols inherited from ns3::ObjectBase | |
| static TypeId | GetObjectIid () |
| Ensure the TypeId for ObjectBase gets fully configured to anchor the inheritance tree properly. | |
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.
| 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().
| ns3::Icmpv6OptionSixLowPanContext::Icmpv6OptionSixLowPanContext | ( | bool | c, |
| uint8_t | cid, | ||
| uint16_t | time, | ||
| Ipv6Prefix | prefix ) |
Constructor.
| c | the c flag |
| cid | the context identifier |
| time | the valid lifetime (units of 60 seconds) |
| prefix | the 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().
|
override |
|
overridevirtual |
Deserialize the packet.
| start | start offset |
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().
| uint8_t ns3::Icmpv6OptionSixLowPanContext::GetCid | ( | ) | const |
Get the context identifier field.
Definition at line 603 of file sixlowpan-nd-header.cc.
References m_cid, and NS_LOG_FUNCTION.
| uint8_t ns3::Icmpv6OptionSixLowPanContext::GetContextLen | ( | ) | const |
Get the context length field.
Definition at line 582 of file sixlowpan-nd-header.cc.
References m_contextLen, and NS_LOG_FUNCTION.
Referenced by Deserialize().
| Ipv6Prefix ns3::Icmpv6OptionSixLowPanContext::GetContextPrefix | ( | ) | const |
Get the context prefix field.
Definition at line 632 of file sixlowpan-nd-header.cc.
References m_prefix, and NS_LOG_FUNCTION.
|
overridevirtual |
Get the instance type ID.
Reimplemented from ns3::Icmpv6OptionHeader.
Definition at line 575 of file sixlowpan-nd-header.cc.
References GetTypeId(), and NS_LOG_FUNCTION.
|
overridevirtual |
Get the 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().
|
static |
Get the UID of this class.
Definition at line 565 of file sixlowpan-nd-header.cc.
References ns3::Icmpv6OptionHeader::Icmpv6OptionHeader(), Icmpv6OptionSixLowPanContext(), and ns3::TypeId::SetParent().
Referenced by GetInstanceTypeId().
| uint16_t ns3::Icmpv6OptionSixLowPanContext::GetValidTime | ( | ) | const |
Get the valid lifetime field.
Definition at line 618 of file sixlowpan-nd-header.cc.
References m_validTime, and NS_LOG_FUNCTION.
| bool ns3::Icmpv6OptionSixLowPanContext::IsFlagC | ( | ) | const |
Is compression flag ?
Definition at line 589 of file sixlowpan-nd-header.cc.
References m_c, and NS_LOG_FUNCTION.
|
overridevirtual |
Print information.
| os | output 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.
|
overridevirtual |
Serialize the packet.
| start | start 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().
| void ns3::Icmpv6OptionSixLowPanContext::SetCid | ( | uint8_t | cid | ) |
Set the context identifier field.
| cid | the 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().
| void ns3::Icmpv6OptionSixLowPanContext::SetContextPrefix | ( | Ipv6Prefix | prefix | ) |
Set the context prefix field.
| prefix | the 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().
| void ns3::Icmpv6OptionSixLowPanContext::SetFlagC | ( | bool | c | ) |
Set the C flag.
| c | the C flag |
Definition at line 596 of file sixlowpan-nd-header.cc.
References m_c, and NS_LOG_FUNCTION.
Referenced by ns3::SixLowPanNdProtocol::MakeRaPacket().
| void ns3::Icmpv6OptionSixLowPanContext::SetValidTime | ( | uint16_t | time | ) |
Set the valid lifetime field.
| time | the 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().
|
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().
|
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().
|
private |
The context length value.
Definition at line 524 of file sixlowpan-nd-header.h.
Referenced by Icmpv6OptionSixLowPanContext(), Icmpv6OptionSixLowPanContext(), Deserialize(), GetContextLen(), Print(), Serialize(), and SetContextPrefix().
|
private |
The context prefix value.
Definition at line 544 of file sixlowpan-nd-header.h.
Referenced by Icmpv6OptionSixLowPanContext(), Icmpv6OptionSixLowPanContext(), Deserialize(), GetContextPrefix(), Print(), Serialize(), and SetContextPrefix().
|
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().