Contexts for 6LoWPAN address compression

Context buffer for stateful 6LoWPAN address compression. More...

Detailed Description

See also
RFC 6282, section 3.1.2
RFC 6775, section 4.2


file  ctx.h
 Context buffer definitions.

Data Structures

struct  gnrc_sixlowpan_ctx_t
 Entry in the 6LoWPAN context buffer. More...


 maximum number of entries in context buffer


gnrc_sixlowpan_ctx_tgnrc_sixlowpan_ctx_lookup_addr (const ipv6_addr_t *addr)
 Gets a context matching the given IPv6 address best with its prefix. More...
gnrc_sixlowpan_ctx_tgnrc_sixlowpan_ctx_lookup_id (uint8_t id)
 Gets context by ID. More...
gnrc_sixlowpan_ctx_tgnrc_sixlowpan_ctx_update (uint8_t id, const ipv6_addr_t *prefix, uint8_t prefix_len, uint16_t ltime, bool comp)
 Updates (or adds if currently not registered) a context. More...
void gnrc_sixlowpan_ctx_reset (void)
 Resets the whole context buffer.

Context flags.

Flags to set in gnrc_sixlowpan_ctx_t::flags_id.

 mask for the Context ID. More...
 Use context for compression.

Macro Definition Documentation



Definition at line 47 of file ctx.h.

Function Documentation

◆ gnrc_sixlowpan_ctx_lookup_addr()

gnrc_sixlowpan_ctx_t* gnrc_sixlowpan_ctx_lookup_addr ( const ipv6_addr_t addr)
[in]addrAn IPv6 address.
The context associated with the best prefix for addr.
NULL if there is no such context.

◆ gnrc_sixlowpan_ctx_lookup_id()

gnrc_sixlowpan_ctx_t* gnrc_sixlowpan_ctx_lookup_id ( uint8_t  id)
[in]idA context ID.
The context associated with id.
NULL if there is no such context.

◆ gnrc_sixlowpan_ctx_update()

gnrc_sixlowpan_ctx_t* gnrc_sixlowpan_ctx_update ( uint8_t  id,
const ipv6_addr_t prefix,
uint8_t  prefix_len,
uint16_t  ltime,
bool  comp 
[in]idThe ID for the context. Must be < GNRC_SIXLOWPAN_CTX_SIZE.
[in]prefixThe prefix for the context.
[in]prefix_lenLength of prefix in bits. Must be > 0.
[in]ltimeNew lifetime of the context. comp will be implicitly set to false if ltime == 0.
[in]compUse for compression if true, do not use for compression, but still for decompression if false.
The new context on success.
NULL, on error or on removal.