46 #ifndef UIP_DS6_NEIGHBOR_H_ 47 #define UIP_DS6_NEIGHBOR_H_ 52 #include "net/nbr-table.h" 54 #if UIP_CONF_IPV6_QUEUE_PKT 55 #include "net/ipv6/uip-packetqueue.h" 57 #if UIP_DS6_NBR_CONF_MULTI_IPV6_ADDRS 58 #include "lib/assert.h" 64 #define NBR_INCOMPLETE 0 65 #define NBR_REACHABLE 1 72 #ifdef UIP_DS6_NBR_CONF_MULTI_IPV6_ADDRS 73 #define UIP_DS6_NBR_MULTI_IPV6_ADDRS UIP_DS6_NBR_CONF_MULTI_IPV6_ADDRS 75 #define UIP_DS6_NBR_MULTI_IPV6_ADDRS 0 80 #ifdef UIP_DS6_NBR_CONF_MAX_6ADDRS_PER_NBR 81 #define UIP_DS6_NBR_MAX_6ADDRS_PER_NBR UIP_DS6_NBR_CONF_MAX_6ADDRS_PER_NBR 83 #define UIP_DS6_NBR_MAX_6ADDRS_PER_NBR 2 87 #ifdef UIP_DS6_NBR_CONF_MAX_NEIGHBOR_CACHES 88 #define UIP_DS6_NBR_MAX_NEIGHBOR_CACHES UIP_DS6_NBR_CONF_MAX_NEIGHBOR_CACHES 90 #define UIP_DS6_NBR_MAX_NEIGHBOR_CACHES \ 91 (NBR_TABLE_MAX_NEIGHBORS * UIP_DS6_NBR_MAX_6ADDRS_PER_NBR) 94 #if UIP_DS6_NBR_MULTI_IPV6_ADDRS 99 } uip_ds6_nbr_entry_t;
106 #if UIP_DS6_NBR_MULTI_IPV6_ADDRS 108 uip_ds6_nbr_entry_t *nbr_entry;
113 #if UIP_ND6_SEND_NS || UIP_ND6_SEND_RA 118 #if UIP_CONF_IPV6_QUEUE_PKT 119 struct uip_packetqueue_handle packethandle;
120 #define UIP_DS6_NBR_PACKET_LIFETIME CLOCK_SECOND * 4 124 void uip_ds6_neighbors_init(
void);
141 const uip_lladdr_t *lladdr,
142 uint8_t isrouter, uint8_t state,
143 nbr_table_reason_t reason,
void *data);
247 void uip_ds6_nbr_refresh_reachable_state(
const uip_ipaddr_t *
ipaddr);
static uip_ipaddr_t ipaddr
Pointer to prefix information option in uip_buf.
static uip_ds6_nbr_t * nbr
Pointer to llao option in uip_buf.
uip_ds6_nbr_t * uip_ds6_nbr_head(void)
Get the first neighbor cache in nbr_table.
uip_ds6_nbr_t * uip_ds6_get_least_lifetime_neighbor(void)
This searches inside the neighbor table for the neighbor that is about to expire the next...
void uip_ds6_link_callback(int status, int numtx)
The callback function to update link-layer stats in a neighbor cache.
int uip_ds6_nbr_num(void)
Return the number of neighbor caches.
void uip_ds6_neighbor_periodic(void)
The housekeeping function called periodically.
uip_ipaddr_t * uip_ds6_nbr_ipaddr_from_lladdr(const uip_lladdr_t *lladdr)
Get an IPv6 address associated with a specified link-layer address.
Linked list manipulation routines.
const uip_ipaddr_t * uip_ds6_nbr_get_ipaddr(const uip_ds6_nbr_t *nbr)
Get an IPv6 address of a neighbor cache.
uip_ds6_nbr_t * uip_ds6_nbr_lookup(const uip_ipaddr_t *ipaddr)
Get the neighbor cache associated with a specified IPv6 address.
Second timer library header file.
const uip_lladdr_t * uip_ds6_nbr_lladdr_from_ipaddr(const uip_ipaddr_t *ipaddr)
Get the link-layer address associated with a specified IPv6 address.
Header file for the uIP TCP/IP stack.
uip_ds6_nbr_t * uip_ds6_nbr_add(const uip_ipaddr_t *ipaddr, const uip_lladdr_t *lladdr, uint8_t isrouter, uint8_t state, nbr_table_reason_t reason, void *data)
Add a neighbor cache for a specified IPv6 address, which is associated with a specified link-layer ad...
Header file for IPv6 Neighbor discovery (RFC 4861)
struct uip_ds6_nbr uip_ds6_nbr_t
The default nbr_table entry (when UIP_DS6_NBR_MULTI_IPV6_ADDRS is disabled), that implements nbr cach...
#define LIST_STRUCT(name)
Declare a linked list inside a structure declaraction.
uip_ds6_nbr_t * uip_ds6_nbr_next(uip_ds6_nbr_t *nbr)
Get the next neighbor cache of a specified one.
int uip_ds6_nbr_update_ll(uip_ds6_nbr_t **nbr_pp, const uip_lladdr_t *new_ll_addr)
Update the link-layer address associated with an IPv6 address.
int uip_ds6_nbr_rm(uip_ds6_nbr_t *nbr)
Remove a neighbor cache.
uip_ds6_nbr_t * uip_ds6_nbr_ll_lookup(const uip_lladdr_t *lladdr)
Get the neighbor cache associated with a specified link-layer address.
const uip_lladdr_t * uip_ds6_nbr_get_ll(const uip_ds6_nbr_t *nbr)
Get the link-layer address associated with a specified nbr cache.
The default nbr_table entry (when UIP_DS6_NBR_MULTI_IPV6_ADDRS is disabled), that implements nbr cach...