Microchip® Advanced Software Framework

rpl-icmp6.c File Reference

    ICMP6 I/O for RPL control messages.
Author
Joakim Eriksson joaki.nosp@m.me@s.nosp@m.ics.s.nosp@m.e, Nicolas Tsiftes nvt@s.nosp@m.ics..nosp@m.se Contributors: Niclas Finne nfi@s.nosp@m.ics..nosp@m.se, Joel Hoglund joel@.nosp@m.sics.nosp@m..se, Mathieu Pouillot m.pou.nosp@m.illo.nosp@m.t@wat.nosp@m.teco.nosp@m..com George Oikonomou oikon.nosp@m.omou.nosp@m.@user.nosp@m.s.so.nosp@m.urcef.nosp@m.orge.nosp@m..net (multicast)
#include "net/ip/tcpip.h"
#include "net/ip/uip.h"
#include "net/ipv6/uip-ds6.h"
#include "net/ipv6/uip-nd6.h"
#include "net/ipv6/uip-icmp6.h"
#include "net/rpl/rpl-private.h"
#include "net/packetbuf.h"
#include "uip-mcast6.h"
#include <limits.h>
#include <string.h>
#include "net/ip/uip-debug.h"

Macros

#define _DEBUG_   DEBUG_NONE
 
#define RPL_DIO_GROUNDED   0x80
 
#define RPL_DIO_MOP_MASK   0x3c
 
#define RPL_DIO_MOP_SHIFT   3
 
#define RPL_DIO_PREFERENCE_MASK   0x07
 
#define UIP_ICMP_BUF   ((struct uip_icmp_hdr *)&uip_buf[uip_l2_l3_hdr_len])
 
#define UIP_ICMP_PAYLOAD   ((unsigned char *)&uip_buf[uip_l2_l3_icmp_hdr_len])
 
#define UIP_IP_BUF   ((struct uip_ip_hdr *)&uip_buf[UIP_LLH_LEN])
 

Functions

static void dao_ack_input (void)
 
void dao_ack_output (rpl_instance_t *instance, uip_ipaddr_t *dest, uint8_t sequence)
 
static void dao_input (void)
 
void dao_output (rpl_parent_t *parent, uint8_t lifetime)
 
void dao_output_target (rpl_parent_t *parent, uip_ipaddr_t *prefix, uint8_t lifetime)
 
static void dio_input (void)
 
void dio_output (rpl_instance_t *instance, uip_ipaddr_t *uc_addr)
 
static void dis_input (void)
 
void dis_output (uip_ipaddr_t *addr)
 
static uint16_t get16 (uint8_t *buffer, int pos)
 
static uint32_t get32 (uint8_t *buffer, int pos)
 
static int get_global_addr (uip_ipaddr_t *addr)
 
void rpl_icmp6_register_handlers ()
 
static void set16 (uint8_t *buffer, int pos, uint16_t value)
 
static void set32 (uint8_t *buffer, int pos, uint32_t value)
 
 UIP_ICMP6_HANDLER (dis_handler, ICMP6_RPL, RPL_CODE_DIS, dis_input)
 
 UIP_ICMP6_HANDLER (dio_handler, ICMP6_RPL, RPL_CODE_DIO, dio_input)
 
 UIP_ICMP6_HANDLER (dao_handler, ICMP6_RPL, RPL_CODE_DAO, dao_input)
 
 UIP_ICMP6_HANDLER (dao_ack_handler, ICMP6_RPL, RPL_CODE_DAO_ACK, dao_ack_input)
 

Variables

static uint8_t dao_sequence = RPL_LOLLIPOP_INIT
 
rpl_of_t RPL_OF