Context buffer for stateful 6LoWPAN address compression.  
More...
Context buffer for stateful 6LoWPAN address compression. 
- See also
 - RFC 6282, section 3.1.2  
 
- 
RFC 6775, section 4.2  
 
 | 
| file   | ctx.h | 
|   | Context buffer definitions. 
  | 
|   | 
◆ gnrc_sixlowpan_ctx_lookup_addr()
Gets a context matching the given IPv6 address best with its prefix. 
- Parameters
 - 
  
  
 
- Returns
 - The context associated with the best prefix for 
addr.  
- 
NULL if there is no such context. 
 
 
 
◆ gnrc_sixlowpan_ctx_lookup_id()
Gets context by ID. 
- Parameters
 - 
  
  
 
- Returns
 - The context associated with 
id.  
- 
NULL if there is no such context. 
 
 
 
◆ gnrc_sixlowpan_ctx_match()
Check if a prefix matches a compression context. 
- Parameters
 - 
  
    | [in] | ctx | The compression context  | 
    | [in] | prefix | IPv6 prefix  | 
    | [in] | prefix_len | Length of the IPv6 prefix | 
  
   
- Returns
 - true if the prefix matches the compression context. 
 
Definition at line 139 of file ctx.h.
 
 
◆ gnrc_sixlowpan_ctx_remove()
  
  
      
        
          | static void gnrc_sixlowpan_ctx_remove  | 
          ( | 
          uint8_t  | 
          id | ) | 
           | 
         
       
   | 
  
inlinestatic   | 
  
 
Removes context. 
- Parameters
 - 
  
  
 
Definition at line 123 of file ctx.h.
 
 
◆ gnrc_sixlowpan_ctx_update()
Updates (or adds if currently not registered) a context. 
- Parameters
 - 
  
    | [in] | id | The ID for the context. Must be < GNRC_SIXLOWPAN_CTX_SIZE.  | 
    | [in] | prefix | The prefix for the context.  | 
    | [in] | prefix_len | Length of prefix in bits. Must be > 0.  | 
    | [in] | ltime | New lifetime of the context. comp will be implicitly set to false if ltime == 0.  | 
    | [in] | comp | Use for compression if true, do not use for compression, but still for decompression if false. | 
  
   
- Returns
 - The new context on success. 
 
- 
NULL, on error or on removal. 
 
 
 
◆ gnrc_sixlowpan_ctx_update_6ctx()
  
  
      
        
          | static bool gnrc_sixlowpan_ctx_update_6ctx  | 
          ( | 
          const ipv6_addr_t *  | 
          prefix,  | 
         
        
           | 
           | 
          uint8_t  | 
          prefix_len,  | 
         
        
           | 
           | 
          uint32_t  | 
          valid  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
inlinestatic   | 
  
 
Create or update a compression context. 
- Parameters
 - 
  
    | [in] | prefix | IPv6 prefix of the compression context  | 
    | [in] | prefix_len | Length of the IPv6 prefix  | 
    | [in] | valid | Lifetime of the prefix in seconds | 
  
   
- Returns
 - true if a new compression context was created or an existing context was updated. false if no new context could be added 
 
Definition at line 158 of file ctx.h.