Microchip® Advanced Software Framework

uip-ds6.c File Reference

    IPv6 data structures handling functions.
    Comprises part of the Neighbor discovery (RFC 4861)
    and auto configuration (RFC 4862) state machines.
Author
Mathilde Durvy mdurv.nosp@m.y@ci.nosp@m.sco.c.nosp@m.om
Julien Abeille jabei.nosp@m.lle@.nosp@m.cisco.nosp@m..com
#include <string.h>
#include <stdlib.h>
#include <stddef.h>
#include "lib/random.h"
#include "net/ipv6/uip-nd6.h"
#include "net/ipv6/uip-ds6.h"
#include "net/ip/uip-packetqueue.h"
#include "net/ip/uip-debug.h"

Macros

#define _DEBUG_   DEBUG_NONE
 

Functions

uint8_t get_match_length (uip_ipaddr_t *src, uip_ipaddr_t *dst)
 Get the number of matching bits of two addresses. More...
 
uip_ds6_aaddr_tuip_ds6_aaddr_add (uip_ipaddr_t *ipaddr)
 
uip_ds6_aaddr_tuip_ds6_aaddr_lookup (uip_ipaddr_t *ipaddr)
 
void uip_ds6_aaddr_rm (uip_ds6_aaddr_t *aaddr)
 
uip_ds6_addr_tuip_ds6_addr_add (uip_ipaddr_t *ipaddr, unsigned long vlifetime, uint8_t type)
 
uip_ds6_addr_tuip_ds6_addr_lookup (uip_ipaddr_t *ipaddr)
 
void uip_ds6_addr_rm (uip_ds6_addr_t *addr)
 
uint32_t uip_ds6_compute_reachable_time (void)
 Compute the reachable time based on base reachable time, see RFC 4861. More...
 
uip_ds6_addr_tuip_ds6_get_global (int8_t state)
 
uip_ds6_addr_tuip_ds6_get_link_local (int8_t state)
 
void uip_ds6_init (void)
 Initialize data structures. More...
 
uint8_t uip_ds6_is_addr_onlink (uip_ipaddr_t *ipaddr)
 
uint8_t uip_ds6_list_loop (uip_ds6_element_t *list, uint8_t size, uint16_t elementsize, uip_ipaddr_t *ipaddr, uint8_t ipaddrlen, uip_ds6_element_t **out_element)
 Generic loop routine on an abstract data structure, which generalizes all data structures used in DS6. More...
 
uip_ds6_maddr_tuip_ds6_maddr_add (const uip_ipaddr_t *ipaddr)
 
uip_ds6_maddr_tuip_ds6_maddr_lookup (const uip_ipaddr_t *ipaddr)
 
void uip_ds6_maddr_rm (uip_ds6_maddr_t *maddr)
 
void uip_ds6_periodic (void)
 Periodic processing of data structures. More...
 
uip_ds6_prefix_tuip_ds6_prefix_add (uip_ipaddr_t *ipaddr, uint8_t ipaddrlen, unsigned long interval)
 
uip_ds6_prefix_tuip_ds6_prefix_lookup (uip_ipaddr_t *ipaddr, uint8_t ipaddrlen)
 
void uip_ds6_prefix_rm (uip_ds6_prefix_t *prefix)
 
void uip_ds6_select_src (uip_ipaddr_t *src, uip_ipaddr_t *dst)
 Source address selection, see RFC 3484. More...
 
void uip_ds6_send_rs (void)
 Send periodic RS to find router. More...
 
void uip_ds6_set_addr_iid (uip_ipaddr_t *ipaddr, uip_lladdr_t *lladdr)
 set the last 64 bits of an IP address based on the MAC address More...
 

Variables

static uip_ipaddr_t loc_fipaddr
 
static uip_ds6_aaddr_tlocaaddr
 
static uip_ds6_addr_tlocaddr
 
static uip_ds6_maddr_tlocmaddr
 
static uip_ds6_prefix_tlocprefix
 
static uint8_t rscount
 RS timer, to schedule RS sending. More...
 
struct etimer uip_ds6_timer_periodic
 
struct etimer uip_ds6_timer_rs
 Timer for maintenance of data structures. More...
 
"DS6" Data structures

number of rs already sent

uip_ds6_netif_t uip_ds6_if
 
uip_ds6_prefix_t uip_ds6_prefix_list [UIP_DS6_PREFIX_NB]
 The single interface. More...
 
uint8_t uip_ds6_addr_size
 Prefix list. More...
 
uint8_t uip_ds6_netif_addr_list_offset