Contiki 2.5
Data Structures | Variables
sicslowpan.h File Reference

    Header file for the 6lowpan implementation
    (RFC4944 and draft-hui-6lowpan-hc-01)
More...

#include "net/uip.h"
#include "net/mac/mac.h"

Go to the source code of this file.

Data Structures

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

Macros

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)
 

Variables

struct mac_driversicslowpan_mac
 A pointer to the mac driver.
 

Detailed Description

    Header file for the 6lowpan implementation
    (RFC4944 and draft-hui-6lowpan-hc-01)
Author
Adam Dunkels adam@.nosp@m.sics.nosp@m..se
Nicolas Tsiftes nvt@s.nosp@m.ics..nosp@m.se
Niclas Finne nfi@s.nosp@m.ics..nosp@m.se
Mathilde Durvy mdurv.nosp@m.y@ci.nosp@m.sco.c.nosp@m.om
Julien Abeille jabei.nosp@m.lle@.nosp@m.cisco.nosp@m..com

Definition in file sicslowpan.h.