Contiki-Inga 3.x
|
Data structure and methods for IPv6 Neighbor Cache (RFC 4861, section 5.1) More...
Data Structures | |
struct | uip_ds6_nbr |
An entry in the nbr cache. More... | |
Typedefs | |
typedef struct uip_ds6_nbr | uip_ds6_nbr_t |
An entry in the nbr cache. | |
Functions | |
void | uip_ds6_neighbors_init (void) |
Initialize neighbor cache. More... | |
Possible states for the nbr cache entries | |
#define | NBR_INCOMPLETE 0 |
#define | NBR_REACHABLE 1 |
#define | NBR_STALE 2 |
#define | NBR_DELAY 3 |
#define | NBR_PROBE 4 |
Neighbor Cache basic routines | |
uip_ds6_nbr_t * | uip_ds6_nbr_add (const uip_ipaddr_t *ipaddr, const uip_lladdr_t *lladdr, uint8_t isrouter, uint8_t state) |
Adds a neighbor to the neighbor cache. More... | |
void | uip_ds6_nbr_rm (uip_ds6_nbr_t *nbr) |
Removes entry from neighbor cache. | |
const uip_lladdr_t * | uip_ds6_nbr_get_ll (const uip_ds6_nbr_t *nbr) |
Returns link-local address of neighbor. | |
const uip_ipaddr_t * | uip_ds6_nbr_get_ipaddr (const uip_ds6_nbr_t *nbr) |
Returns IP address of neighbor. | |
uip_ds6_nbr_t * | uip_ds6_nbr_lookup (const uip_ipaddr_t *ipaddr) |
Lookup if a neighbor cache entry for given IP address exists. More... | |
uip_ds6_nbr_t * | uip_ds6_nbr_ll_lookup (const uip_lladdr_t *lladdr) |
Lookup if a neighbor cache entry for given link-layer address exists. More... | |
uip_ipaddr_t * | uip_ds6_nbr_ipaddr_from_lladdr (const uip_lladdr_t *lladdr) |
Returns IP address associated with link-local address, based on neighbor cache entry. More... | |
const uip_lladdr_t * | uip_ds6_nbr_lladdr_from_ipaddr (const uip_ipaddr_t *ipaddr) |
Returns link-layer address associated with IP address, based on neighbor cache entry. More... | |
void | uip_ds6_link_neighbor_callback (int status, int numtx) |
? | |
void | uip_ds6_neighbor_periodic (void) |
? | |
int | uip_ds6_nbr_num (void) |
? | |
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. More... | |
Data structure and methods for IPv6 Neighbor Cache (RFC 4861, section 5.1)
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.
Definition at line 280 of file uip-ds6-nbr.c.
References NULL, and stimer_remaining().
uip_ds6_nbr_t* uip_ds6_nbr_add | ( | const uip_ipaddr_t * | ipaddr, |
const uip_lladdr_t * | lladdr, | ||
uint8_t | isrouter, | ||
uint8_t | state | ||
) |
Adds a neighbor to the neighbor cache.
ipaddr | IP address of the neighbor to add. |
lladdr | Link-local address of the neighbor (may be unknown when added), NULL if not known (requires state to be set to NBR_INCOMPLETE) |
isrouter | Set to 1 if neighbor is a router, to 0 if host or unknown |
state | State of this entry. Possible values are: NBR_INCOMPLETE, NBR_REACHABLE, NBR_STALE, NBR_DELAY, NBR_PROBE |
Definition at line 80 of file uip-ds6-nbr.c.
References NULL, stimer_set(), and uip_ipaddr_copy.
Referenced by tcpip_ipv6_output(), uip_nd6_ns_input(), and uip_nd6_ra_input().
uip_ipaddr_t* uip_ds6_nbr_ipaddr_from_lladdr | ( | const uip_lladdr_t * | lladdr | ) |
Returns IP address associated with link-local address, based on neighbor cache entry.
Definition at line 178 of file uip-ds6-nbr.c.
References NULL, and uip_ds6_nbr_ll_lookup().
uip_ds6_nbr_t* uip_ds6_nbr_ll_lookup | ( | const uip_lladdr_t * | lladdr | ) |
Lookup if a neighbor cache entry for given link-layer address exists.
llpaddr | link-layer address to look up |
Definition at line 171 of file uip-ds6-nbr.c.
Referenced by uip_ds6_link_neighbor_callback(), and uip_ds6_nbr_ipaddr_from_lladdr().
const uip_lladdr_t* uip_ds6_nbr_lladdr_from_ipaddr | ( | const uip_ipaddr_t * | ipaddr | ) |
Returns link-layer address associated with IP address, based on neighbor cache entry.
Definition at line 186 of file uip-ds6-nbr.c.
References NULL, uip_ds6_nbr_get_ll(), and uip_ds6_nbr_lookup().
Referenced by uip_ds6_route_add().
uip_ds6_nbr_t* uip_ds6_nbr_lookup | ( | const uip_ipaddr_t * | ipaddr | ) |
Lookup if a neighbor cache entry for given IP address exists.
ipaddr | IP address to look up |
Definition at line 156 of file uip-ds6-nbr.c.
References NULL.
Referenced by tcpip_ipv6_output(), uip_ds6_defrt_choose(), uip_ds6_nbr_lladdr_from_ipaddr(), uip_nd6_na_input(), uip_nd6_ns_input(), and uip_nd6_ra_input().
void uip_ds6_neighbors_init | ( | void | ) |
Initialize neighbor cache.
Definition at line 74 of file uip-ds6-nbr.c.
References uip_ds6_nbr_rm().
Referenced by uip_ds6_init().