Contiki 2.6

sicslowpan.c File Reference

6lowpan implementation (RFC4944 and draft-ietf-6lowpan-hc-06) More...

#include <string.h>
#include "contiki.h"
#include "dev/watchdog.h"
#include "net/tcpip.h"
#include "net/uip.h"
#include "net/uip-ds6.h"
#include "net/rime.h"
#include "net/sicslowpan.h"
#include "net/neighbor-info.h"
#include "net/netstack.h"

Go to the source code of this file.

Defines

#define DEBUG   0
 FOR HC-06 COMPLIANCE TODO: -Add compression options to UDP, currently only supports both ports compressed or both ports elided.
#define MAC_MAX_PAYLOAD   102
 Size of the 802.15.4 payload (127byte - 25 for MAC header)
#define COMPRESSION_THRESHOLD   0
 Some MAC layers need a minimum payload, which is configurable through the SICSLOWPAN_CONF_MIN_MAC_PAYLOAD option.
#define sicslowpan_buf   uip_buf
 The buffer used for the 6lowpan processing is uip_buf.
Pointers in the rime buffer
#define RIME_FRAG_PTR   (rime_ptr)
#define RIME_FRAG_DISPATCH_SIZE   0
#define RIME_FRAG_TAG   2
#define RIME_FRAG_OFFSET   4
#define RIME_IPHC_BUF   ((uint8_t *)(rime_ptr + rime_hdr_len))
#define RIME_HC1_PTR   (rime_ptr + rime_hdr_len)
#define RIME_HC1_DISPATCH   0
#define RIME_HC1_ENCODING   1
#define RIME_HC1_TTL   2
#define RIME_HC1_HC_UDP_PTR   (rime_ptr + rime_hdr_len)
#define RIME_HC1_HC_UDP_DISPATCH   0
#define RIME_HC1_HC_UDP_HC1_ENCODING   1
#define RIME_HC1_HC_UDP_UDP_ENCODING   2
#define RIME_HC1_HC_UDP_TTL   3
#define RIME_HC1_HC_UDP_PORTS   4
#define RIME_HC1_HC_UDP_CHKSUM   5
Pointers in the sicslowpan and uip buffer
#define SICSLOWPAN_IP_BUF   ((struct uip_ip_hdr *)&sicslowpan_buf[UIP_LLH_LEN])
#define SICSLOWPAN_UDP_BUF   ((struct uip_udp_hdr *)&sicslowpan_buf[UIP_LLIPH_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])

Variables

General variables
HC06 specific variables
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}

Detailed Description

6lowpan implementation (RFC4944 and draft-ietf-6lowpan-hc-06)

Author:
Adam Dunkels <adam@sics.se>
Nicolas Tsiftes <nvt@sics.se>
Niclas Finne <nfi@sics.se>
Mathilde Durvy <mdurvy@cisco.com>
Julien Abeille <jabeille@cisco.com>
Joakim Eriksson <joakime@sics.se>
Joel Hoglund <joel@sics.se>

Definition in file sicslowpan.c.