#include <netinet6/nd6.h>

netinet6/nd6.h Kernel.framework

includes: sys/appleapiopts.h, sys/types.h, netinet/in.h, netinet6/in6_var.h, Kernel/net/net_kev.h, Kernel/sys/queue.h
31 macros · 8 structs · 1 variable · 1 function

macroND6_LLINFO_PURGE

#define ND6_LLINFO_PURGE -3

macroND6_LLINFO_NOSTATE

#define ND6_LLINFO_NOSTATE -2

macroND6_LLINFO_INCOMPLETE

We don't need the WAITDELETE state any more, but we keep the definition in a comment line instead of removing it. This is necessary to avoid unintentionally reusing the value for another purpose, which might affect backward compatibility with old applications. (20000711 jinmei@kame.net) #define ND6_LLINFO_WAITDELETE -1
#define ND6_LLINFO_INCOMPLETE 0

macroND6_LLINFO_REACHABLE

#define ND6_LLINFO_REACHABLE 1

macroND6_LLINFO_STALE

#define ND6_LLINFO_STALE 2

macroND6_LLINFO_DELAY

#define ND6_LLINFO_DELAY 3

macroND6_LLINFO_PROBE

#define ND6_LLINFO_PROBE 4

structnd_ifinfo

size 56, align 4
u_int32_tlinkmtuLinkMTU
u_int32_tmaxmtuUpper bound of LinkMTU
u_int32_tbasereachableBaseReachableTime
u_int32_treachableReachable Time
u_int32_tretransRetrans Timer
u_int32_tflagsFlags
intrecalctmBaseReacable re-calculation timer
u_int8_tchlimCurHopLimit
u_int8_treceivedra
u_int8_t[8]randomseed0the following 3 members are for privacy extension for addrconf upper 64 bits of SHA256 digest
u_int8_t[8]randomseed1lower 64 bits (usually the EUI64 IFID)
u_int8_t[8]randomidcurrent random ID

macroND6_IFF_PERFORMNUD

#define ND6_IFF_PERFORMNUD 0x1

macroND6_IFF_PROXY_PREFIXES

#define ND6_IFF_PROXY_PREFIXES 0x20

macroND6_IFF_IGNORE_NA

#define ND6_IFF_IGNORE_NA 0x40

macroND6_IFF_REPLICATED

#define ND6_IFF_REPLICATED 0x100
sleep proxy registered

macroND6_IFF_DAD

#define ND6_IFF_DAD 0x200
Perform DAD on the interface

variabledad_enhanced

extern int dad_enhanced

macroND6_DAD_ENHANCED_DEFAULT

#define ND6_DAD_ENHANCED_DEFAULT 1

structin6_nbrinfo

size 56, align 8
char[16]ifnameif name, e.g. "en0"
struct in6_addraddrIPv6 address of the neighbor
longasked# of queries already sent for this addr
intisrouterif it acts as a router
intstatereachability state
intexpirelifetime for NDP state transition

macroNDDRF_INSTALLED

valid values for stateflags
#define NDDRF_INSTALLED 0x01
installed in the routing table

macroNDDRF_IFSCOPE

#define NDDRF_IFSCOPE 0x02
installed as a scoped route

macroNDDRF_STATIC

#define NDDRF_STATIC 0x04
for internal use only

macroNDDRF_MAPPED

#define NDDRF_MAPPED 0x08
Default router addr is mapped to a different one for routing

macroNDDRF_INELIGIBLE

#define NDDRF_INELIGIBLE 0x10
Default router entry is ineligible for default router selection

macroNDDRF_LOCAL

#define NDDRF_LOCAL 0x20
Router's address is locally hosted as well

structin6_defrouter

size 48, align 8
struct sockaddr_in6rtaddr
u_charflags
u_charstateflags
u_shortrtlifetime
u_longexpire
u_shortif_index

structin6_prefix

size 1, align 1
struct sockaddr_in6prefix
struct prf_raraflags
u_charprefixlen
u_charorigin
u_longvltime
u_longpltime
u_longexpire
u_int32_tflags
intrefcnt
u_shortif_index
u_shortadvrtrsnumber of advertisement routers

structin6_ondireq

size 48, align 4
char[16]ifname
unnamed struct at Kernel/netinet6/nd6.h:163:2ndi
u_int32_tlinkmtuLinkMTU
u_int32_tmaxmtuUpper bound of LinkMTU
u_int32_tbasereachableBaseReachableTime
u_int32_treachableReachable Time
u_int32_tretransRetrans Timer
u_int32_tflagsFlags
intrecalctmBaseReacable re-calculation timer
u_int8_tchlimCurHopLimit
u_int8_treceivedraNumber of routers learned on the interface
u_int8_tcollision_countThe current collision count value being used for secure address generation.

structin6_ndireq

size 72, align 4
char[16]ifname
struct nd_ifinfondi

structin6_ndifreq

size 24, align 8
char[16]ifname
u_longifindex

macroMAX_RTR_SOLICITATION_DELAY

#define MAX_RTR_SOLICITATION_DELAY 1
1sec

macroRTR_SOLICITATION_INTERVAL

#define RTR_SOLICITATION_INTERVAL 4
4sec

structin6_route_info

size 24, align 8
struct in6_addrprefix
u_int8_tprefixlen
u_shortdefrtrsnumber of default routers

macroNDPRF_DETACHED

#define NDPRF_DETACHED 0x2

macroNDPRF_STATIC

#define NDPRF_STATIC 0x100

macroNDPRF_IFSCOPE

#define NDPRF_IFSCOPE 0x1000

macroNDPRF_PRPROXY

#define NDPRF_PRPROXY 0x2000

macroMAX_RTR_SOLICITATION_DELAY

protocol constants
#define MAX_RTR_SOLICITATION_DELAY 1
1sec

macroRTR_SOLICITATION_INTERVAL

#define RTR_SOLICITATION_INTERVAL 4
4sec

macroMAX_RTR_SOLICITATIONS

#define MAX_RTR_SOLICITATIONS 3

macroND6_INFINITE_LIFETIME

#define ND6_INFINITE_LIFETIME 0xffffffff

macroND6_MAX_LIFETIME

#define ND6_MAX_LIFETIME 0x7fffffff

functionnd6_lookup_ipv6

extern errno_t nd6_lookup_ipv6(
	ifnet_t interface,
	const struct sockaddr_in6 *ip6_dest,
	struct sockaddr_dl *ll_dest,
	size_t ll_dest_len,
	route_t hint,
	mbuf_t packet
)
@function nd6_lookup_ipv6 @discussion This function will check the routing table for a cached neighbor discovery entry or trigger an neighbor discovery query to resolve the IPv6 address to a link-layer address. nd entries are stored in the routing table. This function will lookup the IPv6 destination in the routing table. If the destination requires forwarding to a gateway, the route of the gateway will be looked up. The route entry is inspected to determine if the link layer destination address is known. If unknown, neighbor discovery will be used to resolve the entry. @param interface The interface the packet is being sent on. @param ip6_dest The IPv6 destination of the packet. @param ll_dest On output, the link-layer destination. @param ll_dest_len The length of the buffer for ll_dest. @param hint Any routing hint passed down from the protocol. @param packet The packet being transmitted. @result May return an error such as EHOSTDOWN or ENETUNREACH. If this function returns EJUSTRETURN, the packet has been queued and will be sent when the address is resolved. If any other value is returned, the caller is responsible for disposing of the packet.