Contiki 3.x
Data Structures | Macros
6LoWPAN implementation

6lowpan is a Working Group in IETF which defines the use of IPv6 on IEEE 802.15.4 links. More...

Data Structures

struct  sicslowpan_addr_context
 The header for fragments. More...
 
struct  sicslowpan_nh_compressor
 The structure of a next header compressor. More...
 

Macros

#define DEBUG   DEBUG_NONE
 FOR HC-06 COMPLIANCE TODO: -Add compression options to UDP, currently only supports both ports compressed or both ports elided. More...
 
#define MAC_MAX_PAYLOAD   (127 - 2)
 Maximum available size for frame headers, link layer security-related overhead, as well as 6LoWPAN payload. More...
 
#define COMPRESSION_THRESHOLD   0
 Some MAC layers need a minimum payload, which is configurable through the SICSLOWPAN_CONF_COMPRESSION_THRESHOLD option. More...
 
#define SICSLOWPAN_FIXED_HDRLEN   21
 Fixed size of a frame header. More...
 

Pointers in the packetbuf buffer

#define PACKETBUF_FRAG_PTR   (packetbuf_ptr)
 
#define PACKETBUF_FRAG_DISPATCH_SIZE   0 /* 16 bit */
 
#define PACKETBUF_FRAG_TAG   2 /* 16 bit */
 
#define PACKETBUF_FRAG_OFFSET   4 /* 8 bit */
 
#define PACKETBUF_IPHC_BUF   ((uint8_t *)(packetbuf_ptr + packetbuf_hdr_len))
 
#define PACKETBUF_HC1_PTR   (packetbuf_ptr + packetbuf_hdr_len)
 
#define PACKETBUF_HC1_DISPATCH   0 /* 8 bit */
 
#define PACKETBUF_HC1_ENCODING   1 /* 8 bit */
 
#define PACKETBUF_HC1_TTL   2 /* 8 bit */
 
#define PACKETBUF_HC1_HC_UDP_PTR   (packetbuf_ptr + packetbuf_hdr_len)
 
#define PACKETBUF_HC1_HC_UDP_DISPATCH   0 /* 8 bit */
 
#define PACKETBUF_HC1_HC_UDP_HC1_ENCODING   1 /* 8 bit */
 
#define PACKETBUF_HC1_HC_UDP_UDP_ENCODING   2 /* 8 bit */
 
#define PACKETBUF_HC1_HC_UDP_TTL   3 /* 8 bit */
 
#define PACKETBUF_HC1_HC_UDP_PORTS   4 /* 8 bit */
 
#define PACKETBUF_HC1_HC_UDP_CHKSUM   5 /* 16 bit */
 

Pointers in the sicslowpan and uip buffer

#define SICSLOWPAN_IP_BUF(buf)   ((struct uip_ip_hdr *)buf)
 
#define SICSLOWPAN_UDP_BUF(buf)   ((struct uip_udp_hdr *)&buf[UIP_IPH_LEN])
 
#define UIP_IP_BUF   ((struct uip_ip_hdr *)&uip_buf[UIP_LLH_LEN])
 
#define UIP_UDP_BUF   ((struct uip_udp_hdr *)&uip_buf[UIP_LLIPH_LEN])
 
#define UIP_TCP_BUF   ((struct uip_tcp_hdr *)&uip_buf[UIP_LLIPH_LEN])
 
#define UIP_ICMP_BUF   ((struct uip_icmp_hdr *)&uip_buf[UIP_LLIPH_LEN])
 

General variables

static uint8_t * packetbuf_ptr
 A pointer to the packetbuf buffer. More...
 
static uint8_t packetbuf_hdr_len
 packetbuf_hdr_len is the total length of (the processed) 6lowpan headers (fragment headers, IPV6 or HC1, HC2, and HC1 and HC2 non compressed fields).
 
static int packetbuf_payload_len
 The length of the payload in the Packetbuf buffer. More...
 
static uint8_t uncomp_hdr_len
 uncomp_hdr_len is the length of the headers before compression (if HC2 is used this includes the UDP header in addition to the IP header).
 
static int last_tx_status
 the result of the last transmitted fragment
 

HC06 specific variables

static struct
sicslowpan_addr_context
context
 Addresses contexts for IPHC. More...
 
static uint8_t * hc06_ptr
 pointer to the byte where to write next inline field. More...
 
const uint8_t unc_llconf [] = {0x0f,0x28,0x22,0x20}
 
const uint8_t unc_ctxconf [] = {0x00,0x88,0x82,0x80}
 
const uint8_t unc_mxconf [] = {0x0f, 0x25, 0x23, 0x21}
 
const uint8_t llprefix [] = {0xfe, 0x80}
 
static const uint8_t ttl_values [] = {0, 1, 64, 255}
 

IPHC related functions

static struct
sicslowpan_addr_context
addr_context_lookup_by_prefix (uip_ipaddr_t *ipaddr)
 find the context corresponding to prefix ipaddr
 
static struct
sicslowpan_addr_context
addr_context_lookup_by_number (uint8_t number)
 find the context with the given number
 
static uint8_t compress_addr_64 (uint8_t bitpos, uip_ipaddr_t *ipaddr, uip_lladdr_t *lladdr)
 
static void uncompress_addr (uip_ipaddr_t *ipaddr, uint8_t const prefix[], uint8_t pref_post_count, uip_lladdr_t *lladdr)
 
static void compress_hdr_iphc (linkaddr_t *link_destaddr)
 Compress IP/UDP header. More...
 
static void uncompress_hdr_iphc (uint8_t *buf, uint16_t ip_len)
 Uncompress IPHC (i.e., IPHC and LOWPAN_UDP) headers and put them in sicslowpan_buf. More...
 

IPv6 dispatch "compression" function

static void compress_hdr_ipv6 (linkaddr_t *link_destaddr)
 

Input/output functions common to all compression schemes

static void packet_sent (void *ptr, int status, int transmissions)
 Callback function for the MAC packet sent callback.
 
static void send_packet (linkaddr_t *dest)
 This function is called by the 6lowpan code to send out a packet. More...
 
static uint8_t output (const uip_lladdr_t *localdest)
 Take an IP packet and format it to be sent on an 802.15.4 network using 6lowpan. More...
 
static void input (void)
 Process a received 6lowpan packet. More...
 

General sicslowpan defines

#define SICSLOWPAN_UDP_4_BIT_PORT_MIN   0xF0B0
 
#define SICSLOWPAN_UDP_4_BIT_PORT_MAX   0xF0BF /* F0B0 + 15 */
 
#define SICSLOWPAN_UDP_8_BIT_PORT_MIN   0xF000
 
#define SICSLOWPAN_UDP_8_BIT_PORT_MAX   0xF0FF /* F000 + 255 */
 

6lowpan compressions

#define SICSLOWPAN_COMPRESSION_IPV6   0
 
#define SICSLOWPAN_COMPRESSION_HC1   1
 
#define SICSLOWPAN_COMPRESSION_HC06   2
 

6lowpan dispatches

#define SICSLOWPAN_DISPATCH_IPV6   0x41 /* 01000001 = 65 */
 
#define SICSLOWPAN_DISPATCH_HC1   0x42 /* 01000010 = 66 */
 
#define SICSLOWPAN_DISPATCH_IPHC   0x60 /* 011xxxxx = ... */
 
#define SICSLOWPAN_DISPATCH_FRAG1   0xc0 /* 11000xxx */
 
#define SICSLOWPAN_DISPATCH_FRAGN   0xe0 /* 11100xxx */
 

HC1 encoding

#define SICSLOWPAN_HC1_NH_UDP   0x02
 
#define SICSLOWPAN_HC1_NH_TCP   0x06
 
#define SICSLOWPAN_HC1_NH_ICMP6   0x04
 

HC_UDP encoding (works together with HC1)

#define SICSLOWPAN_HC_UDP_ALL_C   0xE0
 

IPHC encoding

#define SICSLOWPAN_IPHC_FL_C   0x10
 
#define SICSLOWPAN_IPHC_TC_C   0x08
 
#define SICSLOWPAN_IPHC_NH_C   0x04
 
#define SICSLOWPAN_IPHC_TTL_1   0x01
 
#define SICSLOWPAN_IPHC_TTL_64   0x02
 
#define SICSLOWPAN_IPHC_TTL_255   0x03
 
#define SICSLOWPAN_IPHC_TTL_I   0x00
 
#define SICSLOWPAN_IPHC_CID   0x80
 
#define SICSLOWPAN_IPHC_SAC   0x40
 
#define SICSLOWPAN_IPHC_SAM_00   0x00
 
#define SICSLOWPAN_IPHC_SAM_01   0x10
 
#define SICSLOWPAN_IPHC_SAM_10   0x20
 
#define SICSLOWPAN_IPHC_SAM_11   0x30
 
#define SICSLOWPAN_IPHC_SAM_BIT   4
 
#define SICSLOWPAN_IPHC_M   0x08
 
#define SICSLOWPAN_IPHC_DAC   0x04
 
#define SICSLOWPAN_IPHC_DAM_00   0x00
 
#define SICSLOWPAN_IPHC_DAM_01   0x01
 
#define SICSLOWPAN_IPHC_DAM_10   0x02
 
#define SICSLOWPAN_IPHC_DAM_11   0x03
 
#define SICSLOWPAN_IPHC_DAM_BIT   0
 
#define SICSLOWPAN_IPHC_ADDR_CONTEXT_LL   0
 
#define SICSLOWPAN_IPHC_MCAST_RANGE   0xA0
 

LOWPAN_UDP encoding (works together with IPHC)

#define SICSLOWPAN_NHC_UDP_MASK   0xF8
 
#define SICSLOWPAN_NHC_UDP_ID   0xF0
 
#define SICSLOWPAN_NHC_UDP_CHECKSUMC   0x04
 
#define SICSLOWPAN_NHC_UDP_CHECKSUMI   0x00
 
#define SICSLOWPAN_NHC_UDP_CS_P_00   0xF0 /* all inline */
 
#define SICSLOWPAN_NHC_UDP_CS_P_01   0xF1 /* source 16bit inline, dest = 0xF0 + 8 bit inline */
 
#define SICSLOWPAN_NHC_UDP_CS_P_10   0xF2 /* source = 0xF0 + 8bit inline, dest = 16 bit inline */
 
#define SICSLOWPAN_NHC_UDP_CS_P_11   0xF3 /* source & dest = 0xF0B + 4bit inline */
 

The 6lowpan "headers" length

#define SICSLOWPAN_IPV6_HDR_LEN   1 /*one byte*/
 
#define SICSLOWPAN_HC1_HDR_LEN   3
 
#define SICSLOWPAN_HC1_HC_UDP_HDR_LEN   7
 
#define SICSLOWPAN_FRAG1_HDR_LEN   4
 
#define SICSLOWPAN_FRAGN_HDR_LEN   5
 

Address compressibility test functions

#define sicslowpan_is_iid_16_bit_compressable(a)
 check whether we can compress the IID in address 'a' to 16 bits. More...
 
#define sicslowpan_is_mcast_addr_decompressable(a)
 check whether the 9-bit group-id of the compressed multicast address is known. More...
 
#define sicslowpan_is_mcast_addr_compressable(a)
 check whether the 112-bit group-id of the multicast address is mappable to a 9-bit group-id It is true if the group is the all nodes or all routers group.
 
#define sicslowpan_is_mcast_addr_compressable48(a)
 
#define sicslowpan_is_mcast_addr_compressable32(a)
 
#define sicslowpan_is_mcast_addr_compressable8(a)
 

Detailed Description

6lowpan is a Working Group in IETF which defines the use of IPv6 on IEEE 802.15.4 links.

Our implementation is based on RFC4944 Transmission of IPv6 Packets over IEEE 802.15.4 Networks, draft-hui-6lowpan-interop-00 Interoperability Test for 6LoWPAN, and draft-hui-6lowpan-hc-01 Compression format for IPv6 datagrams in 6lowpan Networks.


Specifications implemented

Note
We currently only support 802.15.4 64-bit addresses.

RFC 4944

RFC4944 defines address configuration mechanisms based on 802.15.4 16-bit and 64-bit addresses, fragmentation of IPv6 packets below IP layer, IPv6 and UDP header compression, a mesh header to enable link-layer forwarding in a mesh under topology, and a broadcast header to enable broadcast in a mesh under topology.

We implement addressing, fragmentation, and header compression. We support the header compression scenarios defined in draft-hui-6lowpan-interop-00. This draft defines an interoperability scenario which was used between ArchRock and Sensinode implementations.

We do not implement mesh under related features, as we target route over techniques.

6282

RFC6282 defines a stateful header compression mechanism which deprecate the stateless header compression mechanism defined in RFC4944. It is much more powerfull and flexible, in particular it allows compression of some multicast addresses and of all global unicast addresses.


Implementation overview

6lowpan does not run as a separate process. It is called by the MAC process when a 6lowpan packet is received, and by the tcpip process when an IPv6 packet needs to be sent.

It is initialized from the MAC process, which calls sicslowpan_init (giving as argument a pointer to the mac_driver structure).

The main 6lowpan functions are implemented in the sicslowpan.h and sicslowpan.c files. They are used to format packets between the 802.15.4 and the IPv6 layers.

6lowpan also creates a few IPv6 and link-layer dependencies which are detailed in the next section.


Implementation details

Addressing

Link-layer addresses
The format of a 802.15.4 address is defined in uip.h.

/** \brief 64 bit 802.15.4 address */
uint8_t addr[2];
};
/** \brief 16 bit 802.15.4 address */
uint8_t addr[8];
};
/** \brief 802.15.4 address */
#define UIP_802154_SHORTADDR_LEN 2
#define UIP_802154_LONGADDR_LEN 8
#define UIP_LLADDR_LEN UIP_802154_LONGADDR_LEN

Neighbor Discovery Link Layer Address options
The format of ND link-layer address options depends on the length of the link-layer addresses. 802.15.4 specificities regarding link-layer address options are implemented in uip-nd6.h.

#define UIP_ND6_OPT_SHORT_LLAO_LEN 8
#define UIP_ND6_OPT_LONG_LLAO_LEN 16
#define UIP_ND6_OPT_LLAO_LEN UIP_ND6_OPT_LONG_LLAO_LEN

Address Autoconfiguration
The address autoconfiguration mechanism also depends on the format of the link-layer address. The dependency is reflected in the uip_ds6_set_addr_iid function in uip-ds6.c.

#if (UIP_LLADDR_LEN == 8)
memcpy(ipaddr->u8 + 8, lladdr, UIP_LLADDR_LEN);
ipaddr->u8[8] ^= 0x02;

Packet Input/Output

At initialization, the input function in sicslowpan.c is set as the function to be called by the MAC upon packet reception. The output function is set as the tcpip_output function.
At packet reception, the link-layer copies the 802.15.4 payload in the rime buffer, and sets its length. It also stores the source and destination link-layer addresses as two rime addresses.

packetbuf_copyfrom(&rx_frame.payload, rx_frame.payload_length);
packetbuf_set_datalen(rx_frame.payload_length);
packetbuf_set_addr(PACKETBUF_ADDR_RECEIVER, (const rimeaddr_t *)&rx_frame.dest_addr);
packetbuf_set_addr(PACKETBUF_ADDR_SENDER, (const rimeaddr_t *)&rx_frame.src_addr);

It then calls the sicslowpan input function. Similarly, when the IPv6 layer has a packet to send over the radio, it puts the packet in uip_buf, sets uip_len and calls the sicslowpan output function.

Fragmentation

Note
Fragmentation support is enabled by setting the SICSLOWPAN_CONF_FRAG compilation option.
In order to make it possible to reassemble multiple packets at the same time we have a mechanism for storing each fragment per sender and tag until it is fully reassembled or the reassemly times out. At reception, once all the fragments are received, we copy the packet to uip_buf, set uip_len, and call tcpip_input.
MAC_MAX_PAYLOAD defines the maximum payload length in a 802.15.4 frame. For now it is constant and equal to 102 bytes (the 802.15.4 frame can be maximum 127 bytes long, and the header 25 bytes long).

Header Compression

Compression schemes
The SICSLOWPAN_CONF_COMPRESSION compilation option defines the compression scheme supported. We support IPHC, and IPv6 compression. IPv6 compression are defined in RFC4944, IPHC in RFC6282. What we call IPv6 compression means sending packets with no compression, and adding the IPv6 dispatch before the IPv6 header.
If at compile time IPv6 "compression" is chosen, packets sent will never be compressed, and compressed packets will not be processed at reception.

If at compile time IPHC is chosen, we will try to compress all fields at sending, and will accept packets compressed with the chosen scheme, as well as uncompressed packets.
.

Compression related functions
When a packet is received, the input function is called. Fragmentation issues are handled, then we check the dispatch byte: if it is IPv6, we treat the packet inline. If it is IPHC, the decompression function (uncompress_hdr_iphc) is called.
When a packet needs to be sent, we try to compress it. If only the IPv6 compression support is enabled, we just add the IPv6 dispatch before the 802.15.4 payload. If IPHC support is enabled, we call the corresponding compression function (compress_hdr_iphc) to compress the packet as much as possible.

IPHC comments
IPHC uses address contexts to enable compression of global unicast addresses. All nodes must share context (namely the global prefixes in use) to compress and uncompress such addresses successfully. The context number is defined by 4 bits. Context 00 is reserved for the link local context. Other contexts have to be distributed within the LoWPAN dynamically, by means of ND extensions yet to be implemented.
Until then, if you want to test global address compression, you need to configure the global contexts manually.


Macro Definition Documentation

#define COMPRESSION_THRESHOLD   0

Some MAC layers need a minimum payload, which is configurable through the SICSLOWPAN_CONF_COMPRESSION_THRESHOLD option.

Definition at line 164 of file sicslowpan.c.

Referenced by output().

#define DEBUG   DEBUG_NONE

FOR HC-06 COMPLIANCE TODO: -Add compression options to UDP, currently only supports both ports compressed or both ports elided.

-Verify TC/FL compression works

-Add stateless multicast option

Definition at line 75 of file sicslowpan.c.

#define MAC_MAX_PAYLOAD   (127 - 2)

Maximum available size for frame headers, link layer security-related overhead, as well as 6LoWPAN payload.

Definition at line 155 of file sicslowpan.c.

Referenced by output().

#define SICSLOWPAN_FIXED_HDRLEN   21

Fixed size of a frame header.

This value is used in case framer returns an error or if SICSLOWPAN_USE_FIXED_HDRLEN is defined.

Definition at line 172 of file sicslowpan.c.

Referenced by output().

#define sicslowpan_is_iid_16_bit_compressable (   a)
Value:
((((a)->u16[4]) == 0) && \
(((a)->u8[10]) == 0)&& \
(((a)->u8[11]) == 0xff)&& \
(((a)->u8[12]) == 0xfe)&& \
(((a)->u8[13]) == 0))

check whether we can compress the IID in address 'a' to 16 bits.

This is used for unicast addresses only, and is true if the address is on the format <PREFIX>::0000:00ff:fe00:XXXX NOTE: we currently assume 64-bits prefixes

Definition at line 240 of file sicslowpan.h.

#define sicslowpan_is_mcast_addr_decompressable (   a)
Value:
(((*a & 0x01) == 0) && \
((*(a + 1) == 0x01) || (*(a + 1) == 0x02)))

check whether the 9-bit group-id of the compressed multicast address is known.

It is true if the 9-bit group is the all nodes or all routers group.

Parameters
ais typed uint8_t *

Definition at line 254 of file sicslowpan.h.

Function Documentation

static void compress_hdr_iphc ( linkaddr_t *  link_destaddr)
static

Compress IP/UDP header.

This function is called by the 6lowpan code to create a compressed 6lowpan packet in the packetbuf buffer from a full IPv6 packet in the uip_buf buffer.

IPHC (RFC 6282)
http://tools.ietf.org/html/

Note
We do not support ISA100_UDP header compression

For LOWPAN_UDP compression, we either compress both ports or none. General format with LOWPAN_UDP compression is

*                      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|1|TF |N|HLI|C|S|SAM|M|D|DAM| SCI   | DCI   | comp. IPv6 hdr|
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
* | compressed IPv6 fields .....                                  |
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
* | LOWPAN_UDP    | non compressed UDP fields ...                 |
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
* | L4 data ...                                                   |
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
* 
Note
The context number 00 is reserved for the link local prefix. For unicast addresses, if we cannot compress the prefix, we neither compress the IID.
Parameters
link_destaddrL2 destination address, needed to compress IP dest

Definition at line 669 of file sicslowpan.c.

References addr_context_lookup_by_prefix(), NULL, packetbuf_hdr_len, packetbuf_ptr, UIP_HTONS, UIP_IP_BUF, uip_is_addr_linklocal, uip_is_addr_mcast, uip_is_addr_unspecified, uip_lladdr, and uncomp_hdr_len.

Referenced by output().

static void input ( void  )
static

Process a received 6lowpan packet.

The 6lowpan packet is put in packetbuf by the MAC. If its a frag1 or a non-fragmented packet we first uncompress the IP header. The 6lowpan payload and possibly the uncompressed IP header are then copied in siclowpan_buf. If the IP packet is complete it is copied to uip_buf and the IP layer is called.

Note
We do not check for overlapping sicslowpan fragments (it is a SHALL in the RFC 4944 and should never happen)

Definition at line 1503 of file sicslowpan.c.

References NULL, packetbuf_datalen(), packetbuf_dataptr(), packetbuf_hdr_len, packetbuf_payload_len, packetbuf_ptr, tcpip_input(), uip_buf, UIP_IP_BUF, uip_len, UIP_LLH_LEN, uncomp_hdr_len, and uncompress_hdr_iphc().

Referenced by cc26xx_uart_set_input(), uart0_set_input(), uart_set_input(), and usb_serial_set_input().

static uint8_t output ( const uip_lladdr_t localdest)
static

Take an IP packet and format it to be sent on an 802.15.4 network using 6lowpan.

Parameters
localdestThe MAC address of the destination

The IP packet is initially in uip_buf. Its header is compressed and if necessary it is fragmented. The resulting packet/fragments are put in packetbuf and delivered to the 802.15.4 MAC.

Definition at line 1275 of file sicslowpan.c.

References compress_hdr_iphc(), COMPRESSION_THRESHOLD, last_tx_status, linkaddr_copy(), linkaddr_null, MAC_MAX_PAYLOAD, MAC_TX_COLLISION, MAC_TX_ERR, MAC_TX_OK, NULL, packetbuf_clear(), packetbuf_dataptr(), packetbuf_hdr_len, packetbuf_payload_len, packetbuf_ptr, packetbuf_set_datalen(), send_packet(), SICSLOWPAN_FIXED_HDRLEN, UIP_IP_BUF, uip_len, and uncomp_hdr_len.

static void send_packet ( linkaddr_t *  dest)
static

This function is called by the 6lowpan code to send out a packet.

Parameters
destthe link layer destination address of the packet

Definition at line 1243 of file sicslowpan.c.

References NULL, packet_sent(), uip_lladdr, and watchdog_periodic().

Referenced by output().

static void uncompress_hdr_iphc ( uint8_t *  buf,
uint16_t  ip_len 
)
static

Uncompress IPHC (i.e., IPHC and LOWPAN_UDP) headers and put them in sicslowpan_buf.

This function is called by the input function when the dispatch is IPHC. We process the packet in the packetbuf buffer, uncompress the header fields, and copy the result in the sicslowpan buffer. At the end of the decompression, packetbuf_hdr_len and uncompressed_hdr_len are set to the appropriate values

Parameters
bufPointer to the buffer to uncompress the packet into.
ip_lenEqual to 0 if the packet is not a fragment (IP length is then inferred from the L2 length), non 0 if the packet is a 1st fragment.

Definition at line 956 of file sicslowpan.c.

References addr_context_lookup_by_number(), hc06_ptr, NULL, packetbuf_datalen(), packetbuf_hdr_len, packetbuf_ptr, UIP_HTONS, and uncomp_hdr_len.

Referenced by input().

Variable Documentation

struct sicslowpan_addr_context* context
static

Addresses contexts for IPHC.

pointer to an address context.

Definition at line 501 of file sicslowpan.c.

Referenced by PROCESS_THREAD().

uint8_t* hc06_ptr
static

pointer to the byte where to write next inline field.

Definition at line 504 of file sicslowpan.c.

Referenced by uncompress_hdr_iphc().

int packetbuf_payload_len
static

The length of the payload in the Packetbuf buffer.

The payload is what comes after the compressed or uncompressed headers (can be the IP payload if the IP header only is compressed or the UDP payload if the UDP header is also compressed)

Definition at line 199 of file sicslowpan.c.

Referenced by input(), and output().

uint8_t* packetbuf_ptr
static

A pointer to the packetbuf buffer.

We initialize it to the beginning of the packetbuf buffer, then access different fields by updating the offset packetbuf_hdr_len.

Definition at line 184 of file sicslowpan.c.

Referenced by compress_hdr_iphc(), input(), output(), and uncompress_hdr_iphc().