IPv6 neighbor discovery

Provides IPv6 neighbor discovery message types. More...

Detailed Description

Provides IPv6 neighbor discovery message types.

Files

file  ndp.h
 IPv6 neighbor discovery message type definitions.
 

Data Structures

struct  ndp_rtr_sol_t
 Router solicitation message format. More...
 
struct  ndp_rtr_adv_t
 Router advertisement message format. More...
 
struct  ndp_nbr_sol_t
 Neighbor solicitation message format. More...
 
struct  ndp_nbr_adv_t
 Neighbor advertisement message format. More...
 
struct  ndp_redirect_t
 Redirect message format. More...
 
struct  ndp_opt_t
 General NDP option format. More...
 
struct  ndp_opt_pi_t
 Prefix information option format. More...
 
struct  ndp_opt_rh_t
 Redirected header option format. More...
 
struct  ndp_opt_mtu_t
 MTU option format. More...
 
struct  ndp_opt_rdnss_t
 Recursive DNS server option format without payload. More...
 
struct  ndp_opt_rdnss_impl_t
 Recursive DNS server option format with payload. More...
 

Macros

#define NDP_OPT_RDNSS_MIN_LEN   (3U)
 Minimum length of a recursive DNS server option (in units of 8 bytes) More...
 
#define NDP_HOP_LIMIT   (255U)
 Hop-limit required for most NDP messages to ensure link-local communication. More...
 

Router advertisement flags

See also
RFC 4861, section 4.2
#define NDP_RTR_ADV_FLAGS_MASK   (0xc0)
 
#define NDP_RTR_ADV_FLAGS_M   (0x80)
 managed address configuration
 
#define NDP_RTR_ADV_FLAGS_O   (0x40)
 other configuration
 
#define NDP_RTR_ADV_CUR_HL_UNSPEC   (0)
 Router advertisement constants. More...
 
#define NDP_RTR_ADV_LTIME_SEC_MAX   (9000)
 maximum router lifetime in seconds More...
 
#define NDP_NBR_ADV_LTIME_NOT_DR   (0)
 router should not be a default router More...
 
#define NDP_NBR_ADV_REACH_TIME   (0)
 reachable time unspecified by advertising router
 
#define NDP_NBR_ADV_RETRANS_TIMER   (0)
 retrans. More...
 

Neighbor advertisement flags

See also
RFC 4861, section 4.4
#define NDP_NBR_ADV_FLAGS_MASK   (0xe0)
 
#define NDP_NBR_ADV_FLAGS_R   (0x80)
 router
 
#define NDP_NBR_ADV_FLAGS_S   (0x40)
 solicited
 
#define NDP_NBR_ADV_FLAGS_O   (0x20)
 override
 

NDP option types

See also
IANA, IPv6 Neighbor Discovery Option Formats
#define NDP_OPT_SL2A   (1)
 source link-layer address option
 
#define NDP_OPT_TL2A   (2)
 target link-layer address option
 
#define NDP_OPT_PI   (3)
 prefix information option
 
#define NDP_OPT_RH   (4)
 redirected option
 
#define NDP_OPT_MTU   (5)
 MTU option.
 
#define NDP_OPT_RDNSS   (25)
 recursive DNS server option
 
#define NDP_OPT_AR   (33)
 address registration option
 
#define NDP_OPT_6CTX   (34)
 6LoWPAN context option
 
#define NDP_OPT_ABR   (35)
 authoritative border router option
 

Flags for prefix information option

#define NDP_OPT_PI_FLAGS_MASK   (0xc0)
 
#define NDP_OPT_PI_FLAGS_L   (0x80)
 on-link
 
#define NDP_OPT_PI_FLAGS_A   (0x40)
 autonomous address configuration
 

Prefix information option constants

See also
RFC 4861, section 4.6.2
#define NDP_OPT_PI_VALID_LTIME_INF   (UINT32_MAX)
 infinite valid lifetime
 
#define NDP_OPT_PI_PREF_LTIME_INF   (UINT32_MAX)
 infinite preferred lifetime
 

Lengths for fixed length options

Note
Options don't use bytes as their length unit, but 8 bytes.
#define NDP_OPT_PI_LEN   (4U)
 
#define NDP_OPT_MTU_LEN   (1U)
 

Router constants

See also
RFC 4861, section 6.2.1
RFC 4861, section 10
#define NDP_MAX_INIT_RA_INTERVAL   (16000U)
 MAX_INITIAL_RTR_ADVERT_INTERVAL (in ms)
 
#define NDP_MAX_INIT_RA_NUMOF   (3U)
 MAX_INITIAL_RTR_ADVERTISEMENT.
 
#define NDP_MAX_FIN_RA_NUMOF   (3U)
 MAX_FINAL_RTR_ADVERTISEMENT.
 
#define NDP_MIN_MS_DELAY_BETWEEN_RAS   (3000U)
 MIN_DELAY_BETWEEN_RAS (in ms)
 
#define NDP_MAX_RA_DELAY   (500U)
 MAX_RA_DELAY_TIME (in ms)
 
#define NDP_MAX_RA_INTERVAL_MS   (600000U)
 default of MaxRtrAdvInterval (in ms)
 
#define NDP_MIN_RA_INTERVAL_MS   (198000U)
 default of MinRtrAdvInterval (in ms)
 
#define NDP_RTR_LTIME_SEC   (1800U)
 default of AdvDefaultLifetime (in sec)
 

Host constants

See also
RFC 4861, section 10
#define NDP_MAX_RS_MS_DELAY   (1000U)
 MAX_RTR_SOLICITATION_DELAY (in ms)
 
#define NDP_RS_MS_INTERVAL   (4000U)
 RTR_SOLICITATION_INTERVAL (in ms)
 
#define NDP_MAX_RS_NUMOF   (3U)
 MAX_RTR_SOLICITATIONS.
 

Node constants

See also
RFC 4861, section 10
#define NDP_MAX_MC_SOL_NUMOF   (3U)
 MAX_MULTICAST_SOLICIT.
 
#define NDP_MAX_UC_SOL_NUMOF   (3U)
 MAX_UNICAST_SOLICIT.
 
#define NDP_DAD_TRANSMIT_NUMOF   (1U)
 Default for DupAddrDetectTransmits. More...
 
#define NDP_MAX_ANYCAST_MS_DELAY   (1000U)
 MAX_ANYCAST_DELAY_TIME (in ms)
 
#define NDP_MAX_NA_NUMOF   (3U)
 MAX_NEIGHBOR_ADVERTISEMENT.
 
#define NDP_REACH_MS   (30000U)
 REACHABLE_TIME (in ms)
 
#define NDP_RETRANS_TIMER_MS   (1000U)
 RETRANS_TIMER (in ms)
 
#define NDP_MAX_RETRANS_TIMER_MS   (60000U)
 MAX_RETRANS_TIMER (in ms) More...
 
#define NDP_MAX_NS_NUMOF   (17U)
 Maximum retransmission of neighbor solicitations when UNREACHABLE. More...
 
#define NDP_DELAY_FIRST_PROBE_MS   (5000U)
 DELAY_FIRST_PROBE_TIME (in ms)
 
#define NDP_MIN_RANDOM_FACTOR   (500U)
 MIN_RANDOM_FACTOR (x 1000)
 
#define NDP_MAX_RANDOM_FACTOR   (1500U)
 MAX_RANDOM_FACTOR (x 1000)
 

Macro Definition Documentation

◆ NDP_DAD_TRANSMIT_NUMOF

#define NDP_DAD_TRANSMIT_NUMOF   (1U)

Default for DupAddrDetectTransmits.

See also
RFC 4862, section 5.1
Note
Must not be greater than 7 for Generic (GNRC) network stack since GNRC_NETIF_IPV6_ADDRS_FLAGS_STATE_TENTATIVE restricts it to that number.

Definition at line 171 of file ndp.h.

◆ NDP_HOP_LIMIT

#define NDP_HOP_LIMIT   (255U)

Hop-limit required for most NDP messages to ensure link-local communication.

See also
RFC 4861, section 4.1
RFC 4861, section 4.2
RFC 4861, section 4.3
RFC 4861, section 4.4
RFC 4861, section 4.5

Definition at line 206 of file ndp.h.

◆ NDP_MAX_NS_NUMOF

#define NDP_MAX_NS_NUMOF   (17U)

Maximum retransmission of neighbor solicitations when UNREACHABLE.

With more than this number the backoff will always be larger than NDP_MAX_RETRANS_TIMER_MS, even if the random factor is 0.5 and the retransmission time is 1ms.

Definition at line 190 of file ndp.h.

◆ NDP_MAX_RETRANS_TIMER_MS

#define NDP_MAX_RETRANS_TIMER_MS   (60000U)

MAX_RETRANS_TIMER (in ms)

See also
RFC 7048

Definition at line 181 of file ndp.h.

◆ NDP_NBR_ADV_LTIME_NOT_DR

#define NDP_NBR_ADV_LTIME_NOT_DR   (0)

router should not be a default router

See also
RFC 4861, section 6.2.1

Definition at line 61 of file ndp.h.

◆ NDP_NBR_ADV_RETRANS_TIMER

#define NDP_NBR_ADV_RETRANS_TIMER   (0)

retrans.

timer unspecified by advertising router

Definition at line 64 of file ndp.h.

◆ NDP_OPT_RDNSS_MIN_LEN

#define NDP_OPT_RDNSS_MIN_LEN   (3U)

Minimum length of a recursive DNS server option (in units of 8 bytes)

See also
RFC 8106, section 5.1

Definition at line 128 of file ndp.h.

◆ NDP_RTR_ADV_CUR_HL_UNSPEC

#define NDP_RTR_ADV_CUR_HL_UNSPEC   (0)

Router advertisement constants.

See also
RFC 4861, section 4.2 current hop limit unspecified by advertising router

Definition at line 49 of file ndp.h.

◆ NDP_RTR_ADV_LTIME_SEC_MAX

#define NDP_RTR_ADV_LTIME_SEC_MAX   (9000)

maximum router lifetime in seconds

See also
RFC 4861, section 6.2.1

Definition at line 55 of file ndp.h.