A Discrete-Event Network Simulator
API
6LoWPAN

Performs 6LoWPAN compression of IPv6 packets as specified by RFC 4944 and RFC 6282 More...

+ Collaboration diagram for 6LoWPAN:

Modules

 6LoWPAN module tests
 

Classes

class  ns3::SixLowPanNetDevice::Fragments
 A Set of Fragments. More...
 
class  ns3::SixLowPanDispatch
 Dispatch header helper. More...
 
class  ns3::SixLowPanFrag1
 6LoWPAN FRAG1 header - see RFC 4944. More...
 
class  ns3::SixLowPanFragN
 6LoWPAN FRAGN header - see RFC 4944. More...
 
class  ns3::SixLowPanHc1
 6LoWPAN HC1 header - see RFC 4944. More...
 
class  ns3::SixLowPanHelper
 Setup a sixlowpan stack to be used as a shim between IPv6 and a generic NetDevice. More...
 
class  ns3::SixLowPanIphc
 LOWPAN_IPHC base Encoding - see RFC 6282. More...
 
class  ns3::SixLowPanIpv6
 6LoWPAN IPv6 uncompressed header - see RFC 4944. More...
 
class  ns3::SixLowPanNetDevice
 Shim performing 6LoWPAN compression, decompression and fragmentation. More...
 
class  ns3::SixLowPanNhcExtension
 LOWPAN_NHC Extension Header Encoding - see RFC 6282. More...
 
class  ns3::SixLowPanUdpNhcExtension
 UDP LOWPAN_NHC Extension Header Encoding - see RFC 6282. More...
 

Enumerations

enum  ns3::SixLowPanDispatch::Dispatch_e {
  ns3::SixLowPanDispatch::LOWPAN_NALP = 0x0, ns3::SixLowPanDispatch::LOWPAN_NALP_N = 0x3F, ns3::SixLowPanDispatch::LOWPAN_IPv6 = 0x41, ns3::SixLowPanDispatch::LOWPAN_HC1 = 0x42,
  ns3::SixLowPanDispatch::LOWPAN_BC0 = 0x50, ns3::SixLowPanDispatch::LOWPAN_IPHC = 0x60, ns3::SixLowPanDispatch::LOWPAN_IPHC_N = 0x7F, ns3::SixLowPanDispatch::LOWPAN_MESH = 0x80,
  ns3::SixLowPanDispatch::LOWPAN_MESH_N = 0xBF, ns3::SixLowPanDispatch::LOWPAN_FRAG1 = 0xC0, ns3::SixLowPanDispatch::LOWPAN_FRAG1_N = 0xC7, ns3::SixLowPanDispatch::LOWPAN_FRAGN = 0xE0,
  ns3::SixLowPanDispatch::LOWPAN_FRAGN_N = 0xE7, ns3::SixLowPanDispatch::LOWPAN_UNSUPPORTED = 0xFF
}
 Dispatch values, as defined in RFC 4944 and RFC 6282 More...
 
enum  ns3::SixLowPanNetDevice::DropReason { ns3::SixLowPanNetDevice::DROP_FRAGMENT_TIMEOUT = 1, ns3::SixLowPanNetDevice::DROP_FRAGMENT_BUFFER_FULL, ns3::SixLowPanNetDevice::DROP_UNKNOWN_EXTENSION }
 Enumeration of the dropping reasons in SixLoWPAN. More...
 
enum  ns3::SixLowPanNhcExtension::Eid_e {
  ns3::SixLowPanNhcExtension::EID_HOPBYHOP_OPTIONS_H = 0, ns3::SixLowPanNhcExtension::EID_ROUTING_H, ns3::SixLowPanNhcExtension::EID_FRAGMENTATION_H, ns3::SixLowPanNhcExtension::EID_DESTINATION_OPTIONS_H,
  ns3::SixLowPanNhcExtension::EID_MOBILITY_H, ns3::SixLowPanNhcExtension::EID_IPv6_H = 7
}
 EID: IPv6 Extension Header ID. More...
 
enum  ns3::SixLowPanIphc::HeaderCompression_e { ns3::SixLowPanIphc::HC_INLINE = 0, ns3::SixLowPanIphc::HC_COMPR_64, ns3::SixLowPanIphc::HC_COMPR_16, ns3::SixLowPanIphc::HC_COMPR_0 }
 Source or Destination Address Mode. More...
 
enum  ns3::SixLowPanIphc::Hlim_e { ns3::SixLowPanIphc::HLIM_INLINE = 0, ns3::SixLowPanIphc::HLIM_COMPR_1, ns3::SixLowPanIphc::HLIM_COMPR_64, ns3::SixLowPanIphc::HLIM_COMPR_255 }
 HLIM: Hop Limit. More...
 
enum  ns3::SixLowPanHc1::LowPanHc1Addr_e { ns3::SixLowPanHc1::HC1_PIII = 0x00, ns3::SixLowPanHc1::HC1_PIIC = 0x01, ns3::SixLowPanHc1::HC1_PCII = 0x02, ns3::SixLowPanHc1::HC1_PCIC = 0x03 }
 Kind of address compression. More...
 
enum  ns3::SixLowPanHc1::LowPanHc1NextHeader_e { ns3::SixLowPanHc1::HC1_NC = 0x00, ns3::SixLowPanHc1::HC1_UDP = 0x01, ns3::SixLowPanHc1::HC1_ICMP = 0x02, ns3::SixLowPanHc1::HC1_TCP = 0x03 }
 Next header information. More...
 
enum  ns3::SixLowPanDispatch::NhcDispatch_e {
  ns3::SixLowPanDispatch::LOWPAN_NHC = 0xE0, ns3::SixLowPanDispatch::LOWPAN_NHC_N = 0xEF, ns3::SixLowPanDispatch::LOWPAN_UDPNHC = 0xF0, ns3::SixLowPanDispatch::LOWPAN_UDPNHC_N = 0xF7,
  ns3::SixLowPanDispatch::LOWPAN_NHCUNSUPPORTED = 0xFF
}
 Dispatch values for Next Header compression. More...
 
enum  ns3::SixLowPanUdpNhcExtension::Ports_e { ns3::SixLowPanUdpNhcExtension::PORTS_INLINE = 0, ns3::SixLowPanUdpNhcExtension::PORTS_ALL_SRC_LAST_DST, ns3::SixLowPanUdpNhcExtension::PORTS_LAST_SRC_ALL_DST, ns3::SixLowPanUdpNhcExtension::PORTS_LAST_SRC_LAST_DST }
 Ports: More...
 
enum  ns3::SixLowPanIphc::TrafficClassFlowLabel_e { ns3::SixLowPanIphc::TF_FULL = 0, ns3::SixLowPanIphc::TF_DSCP_ELIDED, ns3::SixLowPanIphc::TF_FL_ELIDED, ns3::SixLowPanIphc::TF_ELIDED }
 TF: Traffic Class, Flow Label. More...
 

Detailed Description

Performs 6LoWPAN compression of IPv6 packets as specified by RFC 4944 and RFC 6282

This module acts as a shim between IPv6 and a generic NetDevice.

The module implements RFC 4944 and RFC 6282, with the following exceptions:

Enumeration Type Documentation

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.

Enumeration of the dropping reasons in SixLoWPAN.

Enumerator
DROP_FRAGMENT_TIMEOUT 

Fragment timeout exceeded.

DROP_FRAGMENT_BUFFER_FULL 

Fragment buffer size exceeded.

DROP_UNKNOWN_EXTENSION 

Unsupported compression kind.

Definition at line 70 of file sixlowpan-net-device.h.

EID: IPv6 Extension Header ID.

EID: IPv6 Extension Header ID: 0: IPv6 Hop-by-Hop Options Header [RFC 2460] 1: IPv6 Routing Header [RFC 2460] 2: IPv6 Fragment Header [RFC 2460] 3: IPv6 Destination Options Header [RFC 2460] 4: IPv6 Mobility Header [RFC 6275] 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 976 of file sixlowpan-header.h.

Source or Destination Address Mode.

00: 128 bits. 01: 64 bits (or 48 bits if multicast). 10: 16 bits (or 32 bits if multicast). 11: Fully elided (or 8 bits if multicast).

Enumerator
HC_INLINE 
HC_COMPR_64 
HC_COMPR_16 
HC_COMPR_0 

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

HLIM: Hop Limit.

00: The Hop Limit field is carried in-line. 01: The Hop Limit field is compressed and the hop limit is 1. 10: The Hop Limit field is compressed and the hop limit is 64. 11: The Hop Limit field is compressed and the hop limit is 255.

Enumerator
HLIM_INLINE 
HLIM_COMPR_1 
HLIM_COMPR_64 
HLIM_COMPR_255 

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

Kind of address compression.

The address compression is handled in 4 bits and might mean: PI: Prefix inline, PC: Prefix Compressed, II: Interface Identifier, Inline, IC: Interface Identifier Compressed.

Enumerator
HC1_PIII 
HC1_PIIC 
HC1_PCII 
HC1_PCIC 

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

Next header information.

The Next header compression is handled in 4 bits and might mean: NC: Not Compressed, UDP, ICMP or TCP.

Enumerator
HC1_NC 
HC1_UDP 
HC1_ICMP 
HC1_TCP 

Definition at line 157 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.

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 1116 of file sixlowpan-header.h.

TF: Traffic Class, Flow Label.

00: ECN + DSCP + 4-bit Pad + Flow Label (4 bytes) 01: ECN + 2-bit Pad + Flow Label (3 bytes), DSCP is elided. 10: ECN + DSCP (1 byte), Flow Label is elided. 11: Traffic Class and Flow Label are elided.

Enumerator
TF_FULL 
TF_DSCP_ELIDED 
TF_FL_ELIDED 
TF_ELIDED 

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