Microchip® Advanced Software Framework

rpl-ext-header.c File Reference

    Management of extension headers for ContikiRPL.
Author
Vincent Brillault vince.nosp@m.nt.b.nosp@m.rilla.nosp@m.ult@.nosp@m.imag..nosp@m.fr, Joakim Eriksson joaki.nosp@m.me@s.nosp@m.ics.s.nosp@m.e, Niclas Finne nfi@s.nosp@m.ics..nosp@m.se, Nicolas Tsiftes nvt@s.nosp@m.ics..nosp@m.se.
#include "net/ip/uip.h"
#include "net/ip/tcpip.h"
#include "net/ipv6/uip-ds6.h"
#include "net/rpl/rpl-private.h"
#include "net/ip/uip-debug.h"
#include <limits.h>
#include <string.h>

Macros

#define _DEBUG_   DEBUG_NONE
 
#define UIP_EXT_BUF   ((struct uip_ext_hdr *)&uip_buf[uip_l2_l3_hdr_len])
 
#define UIP_EXT_HDR_OPT_BUF   ((struct uip_ext_hdr_opt *)&uip_buf[uip_l2_l3_hdr_len + uip_ext_opt_offset])
 
#define UIP_EXT_HDR_OPT_PADN_BUF   ((struct uip_ext_hdr_opt_padn *)&uip_buf[uip_l2_l3_hdr_len + uip_ext_opt_offset])
 
#define UIP_EXT_HDR_OPT_RPL_BUF   ((struct uip_ext_hdr_opt_rpl *)&uip_buf[uip_l2_l3_hdr_len + uip_ext_opt_offset])
 
#define UIP_HBHO_BUF   ((struct uip_hbho_hdr *)&uip_buf[uip_l2_l3_hdr_len])
 
#define UIP_HBHO_NEXT_BUF   ((struct uip_ext_hdr *)&uip_buf[uip_l2_l3_hdr_len + RPL_HOP_BY_HOP_LEN])
 
#define UIP_IP_BUF   ((struct uip_ip_hdr *)&uip_buf[UIP_LLH_LEN])
 

Functions

void rpl_insert_header (void)
 
uint8_t rpl_invert_header (void)
 
void rpl_remove_header (void)
 
void rpl_update_header_empty (void)
 
int rpl_update_header_final (uip_ipaddr_t *addr)
 
int rpl_verify_header (int uip_ext_opt_offset)
 
static void set_rpl_opt (unsigned uip_ext_opt_offset)