6LoWPAN¶
Provides 6LoWPAN dispatch types and helper functions.
-
bool
sixlowpan_nalp
(uint8_t disp)¶ Checks if dispatch indicates that frame is not a 6LoWPAN (NALP) frame.
Parameters
disp: The first byte of a frame. Return values
- true, if frame is a NALP.
- false, if frame is not a NALP.
-
SIXLOWPAN_UNCOMP
¶ uncompressed 6LoWPAN frame dispatch.
1
(0x41)
-
SIXLOWPAN_FRAG_DISP_MASK
¶ mask for fragmentation dispatch
1
(0xf8)
-
SIXLOWPAN_FRAG_1_DISP
¶ dispatch for 1st fragment
1
(0xc0)
-
SIXLOWPAN_FRAG_N_DISP
¶ dispatch for subsequent fragments
1
(0xe0)
-
SIXLOWPAN_FRAG_MAX_LEN
¶ Maximum datagram size .
1
(2047)
-
SIXLOWPAN_IPHC1_DISP_MASK
¶ Dispatch mask for LOWPAN_IPHC.
1
(0xe0)
See also
-
SIXLOWPAN_IPHC1_DISP
¶ Dispatch for LOWPAN_IPHC.
1
(0x60)
See also
-
bool
sixlowpan_frag_is
(sixlowpan_frag_t * hdr)¶ Checks if a given fragment is a 6LoWPAN fragment.
Parameters
hdr: A 6LoWPAN fragmentation header. Return values
- true, if given fragment is a 6LoWPAN fragment.
- false, if given fragment is not a 6LoWPAN fragment.
-
SIXLOWPAN_FRAG_SIZE_MASK
¶ mask for datagram size
1
(0x07ff)
-
bool
sixlowpan_iphc_is
(uint8_t * data)¶ Checks if datagram is an IPHC datagram.
Parameters
data: Data of a datagram. Must not be NULL. Return values
- true, if datagram is an IPHC datagram.
- false, if datagram is not an IPHC datagram.
-
SIXLOWPAN_IPHC1_TF
¶ Flag for Traffic Class & Flow Label elision (part of first byte of LOWPAN_IPHC).
1
(0x18)
See also
-
SIXLOWPAN_IPHC1_NH
¶ Flag for Next Header Compression (part of first byte of LOWPAN_IPHC).
1
(0x04)
See also
-
SIXLOWPAN_IPHC1_HL
¶ Flag for Hop Limit elision (part of first byte of LOWPAN_IPHC).
1
(0x03)
See also
-
SIXLOWPAN_IPHC2_CID_EXT
¶ Flag for Context Identifier Extention (part of second byte of LOWPAN_IPHC).
1
(0x80)
See also
-
SIXLOWPAN_IPHC2_SAC
¶ Flag for Source Address Compression (part of second byte of LOWPAN_IPHC).
1
(0x40)
See also
-
SIXLOWPAN_IPHC2_SAM
¶ Bits for Source Address Mode (part of second byte of LOWPAN_IPHC).
1
(0x30)
See also
-
SIXLOWPAN_IPHC2_DAC
¶ Flag for Destination Address Compression (part of second byte of LOWPAN_IPHC).
1
(0x04)
See also
-
SIXLOWPAN_IPHC2_DAM
¶ Bits for Destination Address Mode (part of second byte of LOWPAN_IPHC).
1
(0x03)
See also
-
SIXLOWPAN_IPHC2_M
¶ Flag for Multicast Compression (part of second byte of LOWPAN_IPHC).
1
(0x08)
See also
-
SIXLOWPAN_IPHC_HDR_LEN
¶ 6LoWPAN IPHC header length
1
(2)
-
SIXLOWPAN_IPHC_CID_EXT_LEN
¶ 6LoWPAN context idendifier extension header length
1
(1)
-
void
sixlowpan_print
(uint8_t * data,msp430_types.h::size_t
size)¶ Prints 6LoWPAN dispatch to stdout.
Parameters
data: A 6LoWPAN frame. size: Size of data
.
-
struct
sixlowpan_frag_t
¶ General and 1st 6LoWPAN fragmentation header.
Note
The general 6LoWPAN fragmentation header refers to the first 4 bytes of a
FRAG0
orFRAGN
fragmentation header, which are identical.See also
-
byteorder.h::network_uint16_t
disp_size
¶ Dispatch and datagram size.
The 5 most significant bits are the dispatch, the remaining bits are the size.
-
byteorder.h::network_uint16_t
tag
¶ datagram tag
-
-
struct
sixlowpan_frag_n_t
¶ Subsequent 6LoWPAN fragmentation header.
See also
-
byteorder.h::network_uint16_t
disp_size
¶ Dispatch and datagram size.
The 5 most significant bits are the dispatch, the remaining bits are the size.
-
byteorder.h::network_uint16_t
tag
¶ datagram tag
-
uint8_t
offset
¶ offset
-