Microchip® Advanced Software Framework

uip-ds6.h File Reference

    Network interface and stateless autoconfiguration (RFC 4862)
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 "net/ip/uip.h"
#include "sys/stimer.h"
#include "net/ipv6/uip-nd6.h"
#include "net/ipv6/uip-ds6-route.h"
#include "net/ipv6/uip-ds6-nbr.h"
#include "compiler.h"

Data Structures

struct  uip_ds6_aaddr
 Anycast address. More...
 
struct  uip_ds6_addr
 Unicast address structure. More...
 
struct  uip_ds6_element
 Generic type for a DS6, to use a common loop though all DS. More...
 
struct  uip_ds6_maddr
 A multicast address. More...
 
struct  uip_ds6_netif
 Interface structure (contains all the interface variables) More...
 
struct  uip_ds6_prefix
 A prefix list entry. More...
 

Macros

#define ADDR_ANYTYPE   0
 How the address was acquired: Autoconf, DHCP or manually. More...
 
#define ADDR_AUTOCONF   1
 
#define ADDR_DEPRECATED   2
 
#define ADDR_DHCP   2
 
#define ADDR_MANUAL   3
 
#define ADDR_PREFERRED   1
 
#define ADDR_TENTATIVE   0
 Possible states for the an address (RFC 4862) More...
 
#define FOUND   0
 
#define FREESPACE   1
 
#define NOSPACE   2
 
#define UIP_DS6_AADDR_NB   UIP_DS6_AADDR_NBS + UIP_DS6_AADDR_NBU
 
#define UIP_DS6_AADDR_NBS   0
 
#define UIP_DS6_AADDR_NBU   0
 
#define UIP_DS6_ADDR_NB   UIP_DS6_ADDR_NBS + UIP_DS6_ADDR_NBU
 
#define UIP_DS6_ADDR_NBS   1
 
#define UIP_DS6_ADDR_NBU   2
 
#define UIP_DS6_DEFRT_NB   UIP_DS6_DEFRT_NBS + UIP_DS6_DEFRT_NBU
 
#define UIP_DS6_DEFRT_NBS   0
 Configuration. More...
 
#define UIP_DS6_DEFRT_NBU   2
 
#define UIP_DS6_LL_NUD   0
 
#define UIP_DS6_MADDR_NB   UIP_DS6_MADDR_NBS + UIP_DS6_MADDR_NBU
 
#define UIP_DS6_MADDR_NBS   1 + UIP_DS6_ADDR_NB /* all nodes + one solicited per unicast */
 
#define UIP_DS6_MADDR_NBU   0
 
#define UIP_DS6_PERIOD   (CLOCK_SECOND/10) /** Period for uip-ds6 periodic task*/
 General DS6 definitions. More...
 
#define UIP_DS6_PREFIX_NB   UIP_DS6_PREFIX_NBS + UIP_DS6_PREFIX_NBU
 
#define UIP_DS6_PREFIX_NBS   1
 
#define UIP_DS6_PREFIX_NBU   2
 
Macros to check if an IP address (unicast, multicast or anycast) is mine

compute random reachable timer

#define uip_ds6_is_my_addr(addr)   (uip_ds6_addr_lookup(addr) != NULL)
 
#define uip_ds6_is_my_maddr(addr)   (uip_ds6_maddr_lookup(addr) != NULL)
 
#define uip_ds6_is_my_aaddr(addr)   (uip_ds6_aaddr_lookup(addr) != NULL)
 

Typedefs

typedef struct uip_ds6_aaddr uip_ds6_aaddr_t
 Anycast address. More...
 
typedef struct uip_ds6_addr uip_ds6_addr_t
 Unicast address structure. More...
 
typedef struct uip_ds6_element uip_ds6_element_t
 Generic type for a DS6, to use a common loop though all DS. More...
 
typedef struct uip_ds6_maddr uip_ds6_maddr_t
 A multicast address. More...
 
typedef struct uip_ds6_netif uip_ds6_netif_t
 Interface structure (contains all the interface variables) More...
 
typedef struct uip_ds6_prefix uip_ds6_prefix_t
 A prefix list entry. More...
 

Functions

uint8_t get_match_length (uip_ipaddr_t *src, uip_ipaddr_t *dst)
 Get the number of matching bits of two addresses. More...
 
uint32_t uip_ds6_compute_reachable_time (void)
 Compute the reachable time based on base reachable time, see RFC 4861. More...
 
void uip_ds6_init (void)
 Initialize data structures. More...
 
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...
 
void uip_ds6_periodic (void)
 Periodic processing of data structures. More...
 
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...
 
Prefix list basic routines
uip_ds6_prefix_tuip_ds6_prefix_add (uip_ipaddr_t *ipaddr, uint8_t length, unsigned long interval)
 
void uip_ds6_prefix_rm (uip_ds6_prefix_t *prefix)
 
uip_ds6_prefix_tuip_ds6_prefix_lookup (uip_ipaddr_t *ipaddr, uint8_t ipaddrlen)
 
uint8_t uip_ds6_is_addr_onlink (uip_ipaddr_t *ipaddr)
 
Unicast address list basic routines
uip_ds6_addr_tuip_ds6_addr_add (uip_ipaddr_t *ipaddr, unsigned long vlifetime, uint8_t type)
 
void uip_ds6_addr_rm (uip_ds6_addr_t *addr)
 
uip_ds6_addr_tuip_ds6_addr_lookup (uip_ipaddr_t *ipaddr)
 
uip_ds6_addr_tuip_ds6_get_link_local (int8_t state)
 
uip_ds6_addr_tuip_ds6_get_global (int8_t state)
 
Multicast address list basic routines
uip_ds6_maddr_tuip_ds6_maddr_add (const uip_ipaddr_t *ipaddr)
 
void uip_ds6_maddr_rm (uip_ds6_maddr_t *maddr)
 
uip_ds6_maddr_tuip_ds6_maddr_lookup (const uip_ipaddr_t *ipaddr)
 
Anycast address list basic routines
uip_ds6_aaddr_tuip_ds6_aaddr_add (uip_ipaddr_t *ipaddr)
 
void uip_ds6_aaddr_rm (uip_ds6_aaddr_t *aaddr)
 
uip_ds6_aaddr_tuip_ds6_aaddr_lookup (uip_ipaddr_t *ipaddr)
 

Variables

uip_ds6_netif_t uip_ds6_if
 
struct etimer uip_ds6_timer_periodic
 
struct etimer uip_ds6_timer_rs
 Timer for maintenance of data structures. More...
 

#define uip_ds6_is_my_aaddr (   addr)    (uip_ds6_aaddr_lookup(addr) != NULL)
#define uip_ds6_is_my_addr (   addr)    (uip_ds6_addr_lookup(addr) != NULL)
#define uip_ds6_is_my_maddr (   addr)    (uip_ds6_maddr_lookup(addr) != NULL)

Referenced by uip_process().