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 } |
Dispatch values, as defined in RFC 4944 and RFC 6282 More... | |
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... | |
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 47 of file sixlowpan-header.h.
Dispatch values, as defined in RFC 4944 and RFC 6282
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 78 of file sixlowpan-header.h.
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 102 of file sixlowpan-header.h.
ns3::SixLowPanDispatch::SixLowPanDispatch | ( | void | ) |
Definition at line 36 of file sixlowpan-header.cc.
|
static |
Get the Dispatch type.
[in] | dispatch | The dispatch value. |
Definition at line 42 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().
|
static |
Get the NhcDispatch type.
[in] | dispatch | The dispatch value. |
Definition at line 80 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().