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

UDP LOWPAN_NHC Extension Header Encoding - see RFC 6282. More...

#include "sixlowpan-header.h"

+ Inheritance diagram for ns3::SixLowPanUdpNhcExtension:
+ Collaboration diagram for ns3::SixLowPanUdpNhcExtension:

Public Types

enum  Ports_e { PORTS_INLINE = 0 , PORTS_ALL_SRC_LAST_DST , PORTS_LAST_SRC_ALL_DST , PORTS_LAST_SRC_LAST_DST }
 Ports: More...
 

Public Member Functions

 SixLowPanUdpNhcExtension (void)
 
virtual uint32_t Deserialize (Buffer::Iterator start)
 Deserialize the packet. More...
 
bool GetC (void) const
 Get the C (Checksum). More...
 
uint16_t GetChecksum (void) const
 Get the Checksum field value. More...
 
uint16_t GetDstPort () const
 Get the Destination Port. More...
 
virtual TypeId GetInstanceTypeId (void) const
 Return the instance type identifier. More...
 
virtual SixLowPanDispatch::NhcDispatch_e GetNhcDispatchType (void) const
 Get the NhcDispatch type. More...
 
Ports_e GetPorts (void) const
 Get the compressed Src and Dst Ports. More...
 
virtual uint32_t GetSerializedSize (void) const
 Get the serialized size of the packet. More...
 
uint16_t GetSrcPort () const
 Get the Source Port. More...
 
virtual void Print (std::ostream &os) const
 
virtual void Serialize (Buffer::Iterator start) const
 Serialize the packet. More...
 
void SetC (bool cField)
 Set the C (Checksum). More...
 
void SetChecksum (uint16_t checksum)
 Set the Checksum field values. More...
 
void SetDstPort (uint16_t port)
 Set the Destination Port. More...
 
void SetPorts (Ports_e port)
 Set the compressed Src and Dst Ports. More...
 
void SetSrcPort (uint16_t port)
 Set the Source Port. More...
 
- Public Member Functions inherited from ns3::Header
virtual ~Header ()
 
virtual uint32_t Deserialize (Buffer::Iterator start)=0
 Deserialize the object from a buffer iterator. More...
 
virtual uint32_t Deserialize (Buffer::Iterator start)=0
 
virtual uint32_t Deserialize (Buffer::Iterator start, Buffer::Iterator end)
 Deserialize the object from a buffer iterator. More...
 
virtual uint32_t GetSerializedSize (void) const =0
 
virtual void Print (std::ostream &os) const =0
 
virtual void Serialize (Buffer::Iterator start) const =0
 
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...
 
virtual void Print (std::ostream &os) const =0
 Print the object contents. 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 erros. More...
 
virtual TypeId GetInstanceTypeId (void) const =0
 Get the most derived TypeId for this Object. 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 (void)
 Get the type ID. More...
 
- Static Public Member Functions inherited from ns3::Header
static TypeId GetTypeId (void)
 Get the type ID. More...
 
- Static Public Member Functions inherited from ns3::Chunk
static TypeId GetTypeId (void)
 Get the type ID. More...
 
- Static Public Member Functions inherited from ns3::ObjectBase
static TypeId GetTypeId (void)
 Get the type ID. More...
 

Private Attributes

uint8_t m_baseFormat
 Dispatch + encoding fields. More...
 
uint16_t m_checksum
 Checksum. More...
 
uint16_t m_dstPort
 Destination port. More...
 
uint16_t m_srcPort
 Source port. 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 (void)
 Notifier called once the ObjectBase is fully constructed. More...
 

Detailed Description

UDP LOWPAN_NHC Extension Header Encoding - see RFC 6282.

Introspection did not find any typical Config paths.

   0   1   2   3   4   5   6   7
 +---+---+---+---+---+---+---+---+
 | 1 | 1 | 1 | 1 | 0 | C |   P   |
 +---+---+---+---+---+---+---+---+


No Attributes are defined for this type.
No TraceSources are defined for this type.
Size of this type is 16 bytes (on a 64-bit architecture).

Definition at line 1094 of file sixlowpan-header.h.

Member Enumeration Documentation

◆ Ports_e

Ports:

00: 16 bits for both Source Port and Destination Port 01: 16 bits for Source Port. Last 8 bits for Destination Port 10: Last 8 bits for Source Port. All 16 bits for Destination Port 11: Last 4 bits of both Source Port and Destination Port

Enumerator
PORTS_INLINE 
PORTS_ALL_SRC_LAST_DST 
PORTS_LAST_SRC_ALL_DST 
PORTS_LAST_SRC_LAST_DST 

Definition at line 1105 of file sixlowpan-header.h.

Constructor & Destructor Documentation

◆ SixLowPanUdpNhcExtension()

ns3::SixLowPanUdpNhcExtension::SixLowPanUdpNhcExtension ( void  )

Definition at line 1561 of file sixlowpan-header.cc.

References m_baseFormat, m_checksum, m_dstPort, and m_srcPort.

Member Function Documentation

◆ Deserialize()

uint32_t ns3::SixLowPanUdpNhcExtension::Deserialize ( Buffer::Iterator  start)
virtual

Deserialize the packet.

Parameters
[in]startBuffer iterator.
Returns
Size of the packet.

Implements ns3::Header.

Definition at line 1651 of file sixlowpan-header.cc.

References GetC(), GetPorts(), GetSerializedSize(), m_baseFormat, m_checksum, m_dstPort, m_srcPort, PORTS_ALL_SRC_LAST_DST, PORTS_INLINE, PORTS_LAST_SRC_ALL_DST, PORTS_LAST_SRC_LAST_DST, ns3::Buffer::Iterator::ReadNtohU16(), ns3::Buffer::Iterator::ReadU16(), ns3::Buffer::Iterator::ReadU8(), and visualizer.core::start().

+ Here is the call graph for this function:

◆ GetC()

bool ns3::SixLowPanUdpNhcExtension::GetC ( void  ) const

Get the C (Checksum).

Returns
False (All checksum carried in-line), true (Checksum elided).

Definition at line 1733 of file sixlowpan-header.cc.

References m_baseFormat.

Referenced by ns3::SixLowPanNetDevice::DecompressLowPanUdpNhc(), Deserialize(), GetSerializedSize(), and Serialize().

+ Here is the caller graph for this function:

◆ GetChecksum()

uint16_t ns3::SixLowPanUdpNhcExtension::GetChecksum ( void  ) const

Get the Checksum field value.

Returns
The Checksum field value.

Definition at line 1743 of file sixlowpan-header.cc.

References m_checksum.

Referenced by ns3::SixLowPanNetDevice::DecompressLowPanUdpNhc().

+ Here is the caller graph for this function:

◆ GetDstPort()

uint16_t ns3::SixLowPanUdpNhcExtension::GetDstPort ( void  ) const

Get the Destination Port.

Returns
The Destination Port.

Definition at line 1722 of file sixlowpan-header.cc.

References m_dstPort.

Referenced by ns3::SixLowPanNetDevice::DecompressLowPanUdpNhc().

+ Here is the caller graph for this function:

◆ GetInstanceTypeId()

TypeId ns3::SixLowPanUdpNhcExtension::GetInstanceTypeId ( void  ) const
virtual

Return the instance type identifier.

Returns
Instance type ID.

Implements ns3::ObjectBase.

Definition at line 1579 of file sixlowpan-header.cc.

References GetTypeId().

+ Here is the call graph for this function:

◆ GetNhcDispatchType()

SixLowPanDispatch::NhcDispatch_e ns3::SixLowPanUdpNhcExtension::GetNhcDispatchType ( void  ) const
virtual

Get the NhcDispatch type.

Returns
The NhcDispatch type.

Definition at line 1691 of file sixlowpan-header.cc.

References ns3::SixLowPanDispatch::LOWPAN_UDPNHC.

◆ GetPorts()

SixLowPanUdpNhcExtension::Ports_e ns3::SixLowPanUdpNhcExtension::GetPorts ( void  ) const

Get the compressed Src and Dst Ports.

Returns
The Src and Dst Ports.

Definition at line 1702 of file sixlowpan-header.cc.

References m_baseFormat.

Referenced by ns3::SixLowPanNetDevice::DecompressLowPanUdpNhc(), Deserialize(), GetSerializedSize(), and Serialize().

+ Here is the caller graph for this function:

◆ GetSerializedSize()

uint32_t ns3::SixLowPanUdpNhcExtension::GetSerializedSize ( void  ) const
virtual

Get the serialized size of the packet.

Returns
Size.

Implements ns3::Header.

Definition at line 1589 of file sixlowpan-header.cc.

References GetC(), GetPorts(), PORTS_ALL_SRC_LAST_DST, PORTS_INLINE, PORTS_LAST_SRC_ALL_DST, and PORTS_LAST_SRC_LAST_DST.

Referenced by ns3::SixLowPanNetDevice::CompressLowPanUdpNhc(), and Deserialize().

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

◆ GetSrcPort()

uint16_t ns3::SixLowPanUdpNhcExtension::GetSrcPort ( void  ) const

Get the Source Port.

Returns
The Source Port.

Definition at line 1712 of file sixlowpan-header.cc.

References m_srcPort.

Referenced by ns3::SixLowPanNetDevice::DecompressLowPanUdpNhc().

+ Here is the caller graph for this function:

◆ GetTypeId()

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

Get the type ID.

Returns
The object TypeId.

Definition at line 1570 of file sixlowpan-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:

◆ Print()

void ns3::SixLowPanUdpNhcExtension::Print ( std::ostream &  os) const
virtual
Parameters
osoutput stream This method is used by Packet::Print to print the content of a header as ascii data to a c++ output stream. Although the header 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 1584 of file sixlowpan-header.cc.

References m_baseFormat.

Referenced by ns3::operator<<().

+ Here is the caller graph for this function:

◆ Serialize()

void ns3::SixLowPanUdpNhcExtension::Serialize ( Buffer::Iterator  start) const
virtual

◆ SetC()

void ns3::SixLowPanUdpNhcExtension::SetC ( bool  cField)

Set the C (Checksum).

Parameters
[in]cFieldFalse (All checksum carried in-line), true (Checksum elided).

Definition at line 1727 of file sixlowpan-header.cc.

References m_baseFormat.

Referenced by ns3::SixLowPanNetDevice::CompressLowPanUdpNhc().

+ Here is the caller graph for this function:

◆ SetChecksum()

void ns3::SixLowPanUdpNhcExtension::SetChecksum ( uint16_t  checksum)

Set the Checksum field values.

Parameters
[in]checksumThe Checksum field value.

Definition at line 1738 of file sixlowpan-header.cc.

References m_checksum.

Referenced by ns3::SixLowPanNetDevice::CompressLowPanUdpNhc().

+ Here is the caller graph for this function:

◆ SetDstPort()

void ns3::SixLowPanUdpNhcExtension::SetDstPort ( uint16_t  port)

Set the Destination Port.

Parameters
[in]portThe Destination Port.

Definition at line 1717 of file sixlowpan-header.cc.

References m_dstPort.

Referenced by ns3::SixLowPanNetDevice::CompressLowPanUdpNhc().

+ Here is the caller graph for this function:

◆ SetPorts()

void ns3::SixLowPanUdpNhcExtension::SetPorts ( Ports_e  port)

Set the compressed Src and Dst Ports.

Parameters
[in]portSrc and Dst Ports.

Definition at line 1696 of file sixlowpan-header.cc.

References m_baseFormat.

Referenced by ns3::SixLowPanNetDevice::CompressLowPanUdpNhc().

+ Here is the caller graph for this function:

◆ SetSrcPort()

void ns3::SixLowPanUdpNhcExtension::SetSrcPort ( uint16_t  port)

Set the Source Port.

Parameters
[in]portThe Source Port.

Definition at line 1707 of file sixlowpan-header.cc.

References m_srcPort.

Referenced by ns3::SixLowPanNetDevice::CompressLowPanUdpNhc().

+ Here is the caller graph for this function:

Member Data Documentation

◆ m_baseFormat

uint8_t ns3::SixLowPanUdpNhcExtension::m_baseFormat
private

Dispatch + encoding fields.

Definition at line 1215 of file sixlowpan-header.h.

Referenced by SixLowPanUdpNhcExtension(), Deserialize(), GetC(), GetPorts(), Print(), Serialize(), SetC(), and SetPorts().

◆ m_checksum

uint16_t ns3::SixLowPanUdpNhcExtension::m_checksum
private

Checksum.

Definition at line 1216 of file sixlowpan-header.h.

Referenced by SixLowPanUdpNhcExtension(), Deserialize(), GetChecksum(), Serialize(), and SetChecksum().

◆ m_dstPort

uint16_t ns3::SixLowPanUdpNhcExtension::m_dstPort
private

Destination port.

Definition at line 1218 of file sixlowpan-header.h.

Referenced by SixLowPanUdpNhcExtension(), Deserialize(), GetDstPort(), Serialize(), and SetDstPort().

◆ m_srcPort

uint16_t ns3::SixLowPanUdpNhcExtension::m_srcPort
private

Source port.

Definition at line 1217 of file sixlowpan-header.h.

Referenced by SixLowPanUdpNhcExtension(), Deserialize(), GetSrcPort(), Serialize(), and SetSrcPort().


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