uip-nd6.h File Reference

Neighbor discovery (RFC 4861). More...

#include "net/uip.h"
#include "sys/stimer.h"

Go to the source code of this file.

Data Structures

struct  uip_nd6_neighbor
 An entry in the neighbor cache. More...
struct  uip_nd6_defrouter
 An entry in the default router list. More...
struct  uip_nd6_prefix
 A prefix list entry. More...
struct  uip_nd6_ns
 A neighbor solicitation constant part. More...
struct  uip_nd6_na
 A neighbor advertisement constant part. More...
struct  uip_nd6_rs
 A router solicitation constant part. More...
struct  uip_nd6_ra
 A router advertisement constant part. More...
struct  uip_nd6_redirect
 A redirect message constant part. More...
struct  uip_nd6_opt_hdr
 ND option header. More...
struct  uip_nd6_opt_prefix_info
 ND option prefix information. More...
struct  uip_nd6_opt_mtu
 ND option MTU. More...

Defines

General



#define UIP_ND6_HOP_LIMIT   255
 HOP LIMIT to be used when sending ND messages (255).
#define UIP_ND6_INFINITE_LIFETIME   0xFFFFFFFF
 INFINITE lifetime.
Configuration options



#define UIP_CONF_ND6_MAX_NEIGHBORS   4
 max number of entries in the neighbor cache
#define UIP_CONF_ND6_MAX_DEFROUTERS   2
 max number of entries in the default router cache
#define UIP_CONF_ND6_MAX_PREFIXES   2
 max number of entries in the prefix list
RFC 4861 Host constant



#define UIP_ND6_MAX_RTR_SOLICITATION_DELAY   1
#define UIP_ND6_RTR_SOLICITATION_INTERVAL   4
#define UIP_ND6_MAX_RTR_SOLICITATIONS   3
RFC 4861 Router constants



#define UIP_ND6_SEND_RA   1
#define UIP_ND6_MAX_RA_INTERVAL   600
#define UIP_ND6_MIN_RA_INTERVAL   (UIP_ND6_MAX_RA_INTERVAL / 3)
#define UIP_ND6_M_FLAG   0
#define UIP_ND6_O_FLAG   0
#define UIP_ND6_ROUTER_LIFETIME   3 * UIP_ND6_MAX_RA_INTERVAL
#define UIP_ND6_MAX_INITIAL_RA_INTERVAL   16
#define UIP_ND6_MAX_INITIAL_RAS   3
#define UIP_ND6_MIN_DELAY_BETWEEN_RAS   3
#define UIP_ND6_MAX_RA_DELAY_TIME_MS   500
RFC 4861 Node constant



#define UIP_ND6_MAX_MULTICAST_SOLICIT   3
#define UIP_ND6_MAX_UNICAST_SOLICIT   3
#define UIP_ND6_REACHABLE_TIME   30000
#define UIP_ND6_RETRANS_TIMER   1000
#define UIP_ND6_DELAY_FIRST_PROBE_TIME   5
#define UIP_ND6_MIN_RANDOM_FACTOR(x)   (x / 2)
#define UIP_ND6_MAX_RANDOM_FACTOR(x)   ((x) + (x) / 2)
ND6 option types



#define UIP_ND6_OPT_SLLAO   1
#define UIP_ND6_OPT_TLLAO   2
#define UIP_ND6_OPT_PREFIX_INFO   3
#define UIP_ND6_OPT_REDIRECTED_HDR   4
#define UIP_ND6_OPT_MTU   5
#define UIP_ND6_OPT_TYPE_OFFSET   0
#define UIP_ND6_OPT_LEN_OFFSET   1
#define UIP_ND6_OPT_DATA_OFFSET   2
ND6 message length (excluding options)



#define UIP_ND6_NA_LEN   20
#define UIP_ND6_NS_LEN   20
#define UIP_ND6_RA_LEN   12
#define UIP_ND6_RS_LEN   4
ND6 option length in bytes



#define UIP_ND6_OPT_HDR_LEN   2
#define UIP_ND6_OPT_PREFIX_INFO_LEN   32
#define UIP_ND6_OPT_MTU_LEN   8
#define UIP_ND6_OPT_LLAO_LEN   8
 length of a ND6 LLAO option for default L2 type (e.g.
Neighbor Advertisement flags masks



#define UIP_ND6_NA_FLAG_ROUTER   0x80
#define UIP_ND6_NA_FLAG_SOLICITED   0x40
#define UIP_ND6_NA_FLAG_OVERRIDE   0x20
#define UIP_ND6_RA_FLAG_ONLINK   0x80
#define UIP_ND6_RA_FLAG_AUTONOMOUS   0x40

Enumerations

enum  uip_neighbor_state
 

Possible states for the neighbor cache entries.

More...

Functions

ND Neighbor Cache, Router List and Prefix List handling functions



void uip_nd6_init (void)
 Initialize Neighbor Discovery structures.
void uip_nd6_periodic (void)
 Periodic processing of Neighbor Discovery Structures.
struct uip_nd6_neighboruip_nd6_nbrcache_lookup (uip_ipaddr_t *ipaddr)
 Look for a neighbor cache entry corresponding to a specific IP address.
struct uip_nd6_neighboruip_nd6_nbrcache_add (uip_ipaddr_t *ipaddr, uip_lladdr_t *lladdr, u8_t isrouter, uip_neighbor_state state)
 Add a neighbor cache entry.
struct uip_nd6_defrouteruip_nd6_choose_defrouter (void)
 Returns a default router.
struct uip_nd6_defrouteruip_nd6_defrouter_lookup (struct uip_nd6_neighbor *neighbor)
 Find a default router corresponding to a given neighbor cache entry.
void uip_nd6_defrouter_rm (struct uip_nd6_defrouter *router)
 Remove a default router.
struct uip_nd6_defrouteruip_nd6_defrouter_add (struct uip_nd6_neighbor *neighbor, unsigned long interval)
 Add a default router.
u8_t uip_nd6_is_addr_onlink (uip_ipaddr_t *ipaddr)
 Check if an IP address in on-link by looking at prefix list.
struct uip_nd6_prefixuip_nd6_prefix_lookup (uip_ipaddr_t *ipaddr)
 Find a given prefix.
struct uip_nd6_prefixuip_nd6_prefix_add (uip_ipaddr_t *ipaddr, u8_t length, unsigned long interval)
 Add a prefix.
void uip_nd6_prefix_rm (struct uip_nd6_prefix *prefix)
 Remove a prefix from th eprefix list.
ND Messages Processing and Generation



void uip_nd6_ns_input (void)
 Process a neighbor solicitation.
void uip_nd6_ns_output (uip_ipaddr_t *src, uip_ipaddr_t *dest, uip_ipaddr_t *tgt)
 Send a neighbor solicitation, send a Neighbor Advertisement.
void uip_nd6_na_input (void)
 Process a Neighbor Advertisement.
void uip_nd6_rs_output (void)
 Send a Router Solicitation.
void uip_nd6_ra_input (void)
 process a Router Advertisement

Detailed Description

Neighbor discovery (RFC 4861).

Author:
Julien Abeille <jabeille@cisco.com>
Mathilde Durvy <mdurvy@cisco.com>

Definition in file uip-nd6.h.


Generated on Mon Apr 11 14:23:47 2011 for Contiki 2.5 by  doxygen 1.6.1