LOWPAN_NHC Extension Header Encoding - see RFC 6282. More...
#include <sixlowpan-header.h>
Public Types | |
enum | Eid_e { EID_HOPBYHOP_OPTIONS_H = 0, EID_ROUTING_H, EID_FRAGMENTATION_H, EID_DESTINATION_OPTIONS_H, EID_MOBILITY_H, EID_IPv6_H = 7 } |
EID: IPv6 Extension Header ID. More... | |
Public Member Functions | |
SixLowPanNhcExtension (void) | |
uint32_t | CopyBlob (uint8_t *blob, uint32_t size) const |
Get the option header data blob. More... | |
virtual uint32_t | Deserialize (Buffer::Iterator start) |
Deserialize the packet. More... | |
Eid_e | GetEid (void) const |
Get the Extension Header Type. More... | |
virtual TypeId | GetInstanceTypeId (void) const |
Return the instance type identifier. More... | |
uint8_t | GetNextHeader (void) const |
Get the Next Header field value. More... | |
bool | GetNh (void) const |
Get the Next Header field value. More... | |
virtual SixLowPanDispatch::NhcDispatch_e | GetNhcDispatchType (void) const |
Get the NhcDispatch type. More... | |
virtual uint32_t | GetSerializedSize (void) const |
Get the serialized size of the packet. More... | |
virtual void | Print (std::ostream &os) const |
virtual void | Serialize (Buffer::Iterator start) const |
Serialize the packet. More... | |
void | SetBlob (const uint8_t *blob, uint32_t size) |
Set the option header data blob. More... | |
void | SetEid (Eid_e extensionHeaderType) |
Set the Extension Header Type. More... | |
void | SetNextHeader (uint8_t nextHeader) |
Set the Next Header field values. More... | |
void | SetNh (bool nhField) |
Set the NH field values. More... | |
Public Member Functions inherited from ns3::Header | |
virtual | ~Header () |
Public Member Functions inherited from ns3::ObjectBase | |
virtual | ~ObjectBase () |
Virtual destructor. More... | |
void | GetAttribute (std::string name, AttributeValue &value) const |
bool | GetAttributeFailSafe (std::string name, AttributeValue &attribute) const |
void | SetAttribute (std::string name, const AttributeValue &value) |
bool | SetAttributeFailSafe (std::string name, const AttributeValue &value) |
bool | TraceConnect (std::string name, std::string context, const CallbackBase &cb) |
bool | TraceConnectWithoutContext (std::string name, const CallbackBase &cb) |
bool | TraceDisconnect (std::string name, std::string context, const CallbackBase &cb) |
bool | TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb) |
Static Public Member Functions | |
static TypeId | GetTypeId (void) |
Get the type ID. More... | |
Static Public Member Functions inherited from ns3::Header | |
static TypeId | GetTypeId (void) |
Static Public Member Functions inherited from ns3::Chunk | |
static TypeId | GetTypeId (void) |
Static Public Member Functions inherited from ns3::ObjectBase | |
static TypeId | GetTypeId (void) |
Get the type ID. More... | |
Private Attributes | |
uint8_t | m_nhcBlob [256] |
NHC compressed header. More... | |
uint8_t | m_nhcBlobLength |
Length of the NHC compressed header. More... | |
uint8_t | m_nhcExtensionHeader |
NHC extension header type. More... | |
uint8_t | m_nhcNextHeader |
Next header. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from ns3::ObjectBase | |
void | ConstructSelf (const AttributeConstructionList &attributes) |
virtual void | NotifyConstructionCompleted (void) |
This method is invoked once all member attributes have been initialized. More... | |
LOWPAN_NHC Extension Header Encoding - see RFC 6282.
Doxygen introspection did not find any typical Config paths.
0 1 2 3 4 5 6 7 +---+---+---+---+---+---+---+---+ | 1 | 1 | 1 | 0 | EID |NH | +---+---+---+---+---+---+---+---+
No Attributes are defined for this type.
No TraceSources are defined for this type.
Definition at line 931 of file sixlowpan-header.h.
EID: IPv6 Extension Header ID.
EID: IPv6 Extension Header ID: 0: IPv6 Hop-by-Hop Options Header [RFC2460] 1: IPv6 Routing Header [RFC2460] 2: IPv6 Fragment Header [RFC2460] 3: IPv6 Destination Options Header [RFC2460] 4: IPv6 Mobility Header [RFC6275] 5: Reserved 6: Reserved 7: IPv6 Header
Enumerator | |
---|---|
EID_HOPBYHOP_OPTIONS_H | |
EID_ROUTING_H | |
EID_FRAGMENTATION_H | |
EID_DESTINATION_OPTIONS_H | |
EID_MOBILITY_H | |
EID_IPv6_H |
Definition at line 947 of file sixlowpan-header.h.
ns3::SixLowPanNhcExtension::SixLowPanNhcExtension | ( | void | ) |
Definition at line 1425 of file sixlowpan-header.cc.
References m_nhcBlobLength, m_nhcExtensionHeader, and m_nhcNextHeader.
uint32_t ns3::SixLowPanNhcExtension::CopyBlob | ( | uint8_t * | blob, |
uint32_t | size | ||
) | const |
Get the option header data blob.
blob | a buffer to copy the blob data into |
size | the size of the buffer |
Definition at line 1533 of file sixlowpan-header.cc.
References m_nhcBlob, m_nhcBlobLength, and NS_ASSERT_MSG.
Referenced by ns3::SixLowPanNetDevice::DecompressLowPanNhc().
|
virtual |
Deserialize the packet.
start | Buffer iterator |
Implements ns3::Header.
Definition at line 1473 of file sixlowpan-header.cc.
References GetNh(), GetSerializedSize(), m_nhcBlob, m_nhcBlobLength, m_nhcExtensionHeader, m_nhcNextHeader, ns3::Buffer::Iterator::Read(), ns3::Buffer::Iterator::ReadU8(), and visualizer.core::start().
SixLowPanNhcExtension::Eid_e ns3::SixLowPanNhcExtension::GetEid | ( | void | ) | const |
Get the Extension Header Type.
Definition at line 1499 of file sixlowpan-header.cc.
References m_nhcExtensionHeader.
Referenced by ns3::SixLowPanNetDevice::DecompressLowPanNhc().
|
virtual |
Return the instance type identifier.
Implements ns3::ObjectBase.
Definition at line 1441 of file sixlowpan-header.cc.
References GetTypeId().
uint8_t ns3::SixLowPanNhcExtension::GetNextHeader | ( | void | ) | const |
Get the Next Header field value.
Definition at line 1509 of file sixlowpan-header.cc.
References m_nhcNextHeader.
Referenced by ns3::SixLowPanNetDevice::DecompressLowPanNhc().
bool ns3::SixLowPanNhcExtension::GetNh | ( | void | ) | const |
Get the Next Header field value.
Definition at line 1520 of file sixlowpan-header.cc.
References m_nhcExtensionHeader.
Referenced by ns3::SixLowPanNetDevice::DecompressLowPanNhc(), Deserialize(), GetSerializedSize(), and Serialize().
|
virtual |
Get the NhcDispatch type.
Definition at line 1488 of file sixlowpan-header.cc.
References ns3::SixLowPanDispatch::LOWPAN_NHC.
|
virtual |
Get the serialized size of the packet.
Implements ns3::Header.
Definition at line 1451 of file sixlowpan-header.cc.
References GetNh(), and m_nhcBlobLength.
Referenced by ns3::SixLowPanNetDevice::CompressLowPanNhc(), Deserialize(), and Print().
|
static |
Get the type ID.
Definition at line 1433 of file sixlowpan-header.cc.
References ns3::TypeId::SetParent().
Referenced by GetInstanceTypeId().
|
virtual |
os | output stream This method is used by Packet::Print to print the content of a trailer as ascii data to a c++ output stream. Although the trailer is free to format its output as it wishes, it is recommended to follow a few rules to integrate with the packet pretty printer: start with flags, small field values located between a pair of parens. Values should be separated by whitespace. Follow the parens with the important fields, separated by whitespace. i.e.: (field1 val1 field2 val2 field3 val3) field4 val4 field5 val5 |
Implements ns3::Header.
Definition at line 1446 of file sixlowpan-header.cc.
References GetSerializedSize(), and m_nhcExtensionHeader.
Referenced by ns3::operator<<().
|
virtual |
Serialize the packet.
start | Buffer iterator |
Implements ns3::Header.
Definition at line 1461 of file sixlowpan-header.cc.
References GetNh(), m_nhcBlob, m_nhcBlobLength, m_nhcExtensionHeader, m_nhcNextHeader, visualizer.core::start(), ns3::Buffer::Iterator::Write(), and ns3::Buffer::Iterator::WriteU8().
void ns3::SixLowPanNhcExtension::SetBlob | ( | const uint8_t * | blob, |
uint32_t | size | ||
) |
Set the option header data blob.
blob | a buffer holding the blob data |
size | the data blob size |
Definition at line 1525 of file sixlowpan-header.cc.
References m_nhcBlob, m_nhcBlobLength, and NS_ASSERT_MSG.
Referenced by ns3::SixLowPanNetDevice::CompressLowPanNhc().
void ns3::SixLowPanNhcExtension::SetEid | ( | Eid_e | extensionHeaderType | ) |
Set the Extension Header Type.
extensionHeaderType | the Extension Header Type |
Definition at line 1493 of file sixlowpan-header.cc.
References m_nhcExtensionHeader.
Referenced by ns3::SixLowPanNetDevice::CompressLowPanNhc().
void ns3::SixLowPanNhcExtension::SetNextHeader | ( | uint8_t | nextHeader | ) |
Set the Next Header field values.
nextHeader | the Next Header field value |
Definition at line 1504 of file sixlowpan-header.cc.
References m_nhcNextHeader.
Referenced by ns3::SixLowPanNetDevice::CompressLowPanNhc().
void ns3::SixLowPanNhcExtension::SetNh | ( | bool | nhField | ) |
Set the NH field values.
nhField | the NH field value |
Definition at line 1514 of file sixlowpan-header.cc.
References m_nhcExtensionHeader.
Referenced by ns3::SixLowPanNetDevice::CompressLowPanNhc().
|
private |
NHC compressed header.
Definition at line 1053 of file sixlowpan-header.h.
Referenced by CopyBlob(), Deserialize(), Serialize(), and SetBlob().
|
private |
Length of the NHC compressed header.
Definition at line 1052 of file sixlowpan-header.h.
Referenced by CopyBlob(), Deserialize(), GetSerializedSize(), Serialize(), SetBlob(), and SixLowPanNhcExtension().
|
private |
NHC extension header type.
Definition at line 1050 of file sixlowpan-header.h.
Referenced by Deserialize(), GetEid(), GetNh(), Print(), Serialize(), SetEid(), SetNh(), and SixLowPanNhcExtension().
|
private |
Next header.
Definition at line 1051 of file sixlowpan-header.h.
Referenced by Deserialize(), GetNextHeader(), Serialize(), SetNextHeader(), and SixLowPanNhcExtension().