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

Dispatch header helper. More...

#include "sixlowpan-header.h"

Public Types

enum  Dispatch_e {
  LOWPAN_NALP = 0x0 , LOWPAN_NALP_N = 0x3F , LOWPAN_IPv6 = 0x41 , LOWPAN_HC1 = 0x42 ,
  LOWPAN_BC0 = 0x50 , LOWPAN_IPHC = 0x60 , LOWPAN_IPHC_N = 0x7F , LOWPAN_MESH = 0x80 ,
  LOWPAN_MESH_N = 0xBF , LOWPAN_FRAG1 = 0xC0 , LOWPAN_FRAG1_N = 0xC7 , LOWPAN_FRAGN = 0xE0 ,
  LOWPAN_FRAGN_N = 0xE7 , LOWPAN_UNSUPPORTED = 0xFF
}
 
enum  NhcDispatch_e {
  LOWPAN_NHC = 0xE0 , LOWPAN_NHC_N = 0xEF , LOWPAN_UDPNHC = 0xF0 , LOWPAN_UDPNHC_N = 0xF7 ,
  LOWPAN_NHCUNSUPPORTED = 0xFF
}
 Dispatch values for Next Header compression. More...
 

Public Member Functions

 SixLowPanDispatch (void)
 

Static Public Member Functions

static Dispatch_e GetDispatchType (uint8_t dispatch)
 Get the Dispatch type. More...
 
static NhcDispatch_e GetNhcDispatchType (uint8_t dispatch)
 Get the NhcDispatch type. More...
 

Detailed Description

Dispatch header helper.

This class only purpose is to interpret the Dispatch header into its correct type.

The dispatch type is defined by a zero bit as the first bit and a one bit as the second bit.

                      1                   2                   3
  0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |0 1| Dispatch  |  type-specific header
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

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

Member Enumeration Documentation

◆ Dispatch_e

\brief Dispatch values, as defined in <a href="http://datatracker.ietf.org/doc/rfc4944/">RFC 4944</a> and <a href="http://datatracker.ietf.org/doc/rfc6282/">RFC 6282</a>
   Pattern    Header Type
 +------------+------------------------------------------------+
 | 00  xxxxxx | NALP        - Not a LoWPAN frame               |
 | 01  000000 | ESC         - Additional Dispatch byte follows |
 | 01  000001 | IPv6        - Uncompressed IPv6 Addresses      |
 | 01  000010 | LOWPAN_HC1  - LOWPAN_HC1 compressed IPv6       |
 | 01  000011 | reserved    - Reserved for future use          |
 |   ...      | reserved    - Reserved for future use          |
 | 01  001111 | reserved    - Reserved for future use          |
 | 01  010000 | LOWPAN_BC0  - LOWPAN_BC0 broadcast             |
 | 01  010001 | reserved    - Reserved for future use          |
 |   ...      | reserved    - Reserved for future use          |
 | 01  1xxxxx | LOWPAN_IPHC - LOWPAN_IPHC compressed IPv6      |
 | 10  xxxxxx | MESH        - Mesh Header                      |
 | 11  000xxx | FRAG1       - Fragmentation Header (first)     |
 | 11  001000 | reserved    - Reserved for future use          |
 |   ...      | reserved    - Reserved for future use          |
 | 11  011111 | reserved    - Reserved for future use          |
 | 11  100xxx | FRAGN       - Fragmentation Header (subsequent)|
 | 11  101000 | reserved    - Reserved for future use          |
 |   ...      | reserved    - Reserved for future use          |
 | 11  111111 | reserved    - Reserved for future use          |
 +------------+------------------------------------------------+
Enumerator
LOWPAN_NALP 
LOWPAN_NALP_N 
LOWPAN_IPv6 
LOWPAN_HC1 
LOWPAN_BC0 
LOWPAN_IPHC 
LOWPAN_IPHC_N 
LOWPAN_MESH 
LOWPAN_MESH_N 
LOWPAN_FRAG1 
LOWPAN_FRAG1_N 
LOWPAN_FRAGN 
LOWPAN_FRAGN_N 
LOWPAN_UNSUPPORTED 

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

◆ NhcDispatch_e

Dispatch values for Next Header compression.

The dispatch values reflect the dispatch use, since some dispatch bits carry actual header compression bits.

Enumerator
LOWPAN_NHC 
LOWPAN_NHC_N 
LOWPAN_UDPNHC 
LOWPAN_UDPNHC_N 
LOWPAN_NHCUNSUPPORTED 

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

Constructor & Destructor Documentation

◆ SixLowPanDispatch()

ns3::SixLowPanDispatch::SixLowPanDispatch ( void  )

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

Member Function Documentation

◆ GetDispatchType()

SixLowPanDispatch::Dispatch_e ns3::SixLowPanDispatch::GetDispatchType ( uint8_t  dispatch)
static

Get the Dispatch type.

Parameters
[in]dispatchThe dispatch value.
Returns
The Dispatch type.

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

References LOWPAN_BC0, LOWPAN_FRAG1, LOWPAN_FRAG1_N, LOWPAN_FRAGN, LOWPAN_FRAGN_N, LOWPAN_HC1, LOWPAN_IPHC, LOWPAN_IPHC_N, LOWPAN_IPv6, LOWPAN_MESH, LOWPAN_MESH_N, LOWPAN_NALP, LOWPAN_NALP_N, and LOWPAN_UNSUPPORTED.

Referenced by ns3::SixLowPanNetDevice::ProcessFragment(), and ns3::SixLowPanNetDevice::ReceiveFromDevice().

+ Here is the caller graph for this function:

◆ GetNhcDispatchType()

SixLowPanDispatch::NhcDispatch_e ns3::SixLowPanDispatch::GetNhcDispatchType ( uint8_t  dispatch)
static

Get the NhcDispatch type.

Parameters
[in]dispatchThe dispatch value.
Returns
The NhcDispatch type.

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

References LOWPAN_NHC, LOWPAN_NHC_N, LOWPAN_NHCUNSUPPORTED, LOWPAN_UDPNHC, and LOWPAN_UDPNHC_N.

Referenced by ns3::SixLowPanNetDevice::DecompressLowPanIphc(), and ns3::SixLowPanNetDevice::DecompressLowPanNhc().

+ Here is the caller graph for this function:

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