nd6.h revision 121472
162587Sitojun/* $FreeBSD: head/sys/netinet6/nd6.h 121472 2003-10-24 18:26:30Z ume $ */ 295023Ssuz/* $KAME: nd6.h,v 1.76 2001/12/18 02:10:31 itojun Exp $ */ 362587Sitojun 453541Sshin/* 553541Sshin * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. 653541Sshin * All rights reserved. 753541Sshin * 853541Sshin * Redistribution and use in source and binary forms, with or without 953541Sshin * modification, are permitted provided that the following conditions 1053541Sshin * are met: 1153541Sshin * 1. Redistributions of source code must retain the above copyright 1253541Sshin * notice, this list of conditions and the following disclaimer. 1353541Sshin * 2. Redistributions in binary form must reproduce the above copyright 1453541Sshin * notice, this list of conditions and the following disclaimer in the 1553541Sshin * documentation and/or other materials provided with the distribution. 1653541Sshin * 3. Neither the name of the project nor the names of its contributors 1753541Sshin * may be used to endorse or promote products derived from this software 1853541Sshin * without specific prior written permission. 1953541Sshin * 2053541Sshin * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND 2153541Sshin * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 2253541Sshin * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 2353541Sshin * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE 2453541Sshin * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 2553541Sshin * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2653541Sshin * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2753541Sshin * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2853541Sshin * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 2953541Sshin * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 3053541Sshin * SUCH DAMAGE. 3153541Sshin */ 3253541Sshin 3353541Sshin#ifndef _NETINET6_ND6_H_ 3462587Sitojun#define _NETINET6_ND6_H_ 3553541Sshin 3662587Sitojun/* see net/route.h, or net/if_inarp.h */ 3762587Sitojun#ifndef RTF_ANNOUNCE 3862587Sitojun#define RTF_ANNOUNCE RTF_PROTO2 3962587Sitojun#endif 4062587Sitojun 4153541Sshin#include <sys/queue.h> 4278064Sume#include <sys/callout.h> 4353541Sshin 4453541Sshinstruct llinfo_nd6 { 4553541Sshin struct llinfo_nd6 *ln_next; 4653541Sshin struct llinfo_nd6 *ln_prev; 4753541Sshin struct rtentry *ln_rt; 4853541Sshin struct mbuf *ln_hold; /* last packet until resolved/timeout */ 4953541Sshin long ln_asked; /* number of queries already sent for this addr */ 5053541Sshin u_long ln_expire; /* lifetime for NDP state transition */ 5153541Sshin short ln_state; /* reachability state */ 5253541Sshin short ln_router; /* 2^0: ND6 router bit */ 5362587Sitojun int ln_byhint; /* # of times we made it reachable by UL hint */ 5453541Sshin}; 5553541Sshin 5662587Sitojun#define ND6_LLINFO_NOSTATE -2 5778064Sume/* 5878064Sume * We don't need the WAITDELETE state any more, but we keep the definition 5978064Sume * in a comment line instead of removing it. This is necessary to avoid 6078064Sume * unintentionally reusing the value for another purpose, which might 6178064Sume * affect backward compatibility with old applications. 6278064Sume * (20000711 jinmei@kame.net) 6378064Sume */ 6478064Sume/* #define ND6_LLINFO_WAITDELETE -1 */ 6562587Sitojun#define ND6_LLINFO_INCOMPLETE 0 6662587Sitojun#define ND6_LLINFO_REACHABLE 1 6762587Sitojun#define ND6_LLINFO_STALE 2 6862587Sitojun#define ND6_LLINFO_DELAY 3 6962587Sitojun#define ND6_LLINFO_PROBE 4 7053541Sshin 7162587Sitojun#define ND6_IS_LLINFO_PROBREACH(n) ((n)->ln_state > ND6_LLINFO_INCOMPLETE) 7262587Sitojun 7353541Sshinstruct nd_ifinfo { 7462587Sitojun u_int32_t linkmtu; /* LinkMTU */ 7562587Sitojun u_int32_t maxmtu; /* Upper bound of LinkMTU */ 7662587Sitojun u_int32_t basereachable; /* BaseReachableTime */ 7762587Sitojun u_int32_t reachable; /* Reachable Time */ 7862587Sitojun u_int32_t retrans; /* Retrans Timer */ 7962587Sitojun u_int32_t flags; /* Flags */ 8062587Sitojun int recalctm; /* BaseReacable re-calculation timer */ 8162587Sitojun u_int8_t chlim; /* CurHopLimit */ 82121161Sume u_int8_t initialized; /* Flag to see the entry is initialized */ 8395023Ssuz /* the following 3 members are for privacy extension for addrconf */ 8478064Sume u_int8_t randomseed0[8]; /* upper 64 bits of MD5 digest */ 8578064Sume u_int8_t randomseed1[8]; /* lower 64 bits (usually the EUI64 IFID) */ 8678064Sume u_int8_t randomid[8]; /* current random ID */ 8753541Sshin}; 8853541Sshin 8962587Sitojun#define ND6_IFF_PERFORMNUD 0x1 90118498Sume#define ND6_IFF_ACCEPT_RTADV 0x2 9162587Sitojun 92121161Sume#ifdef _KERNEL 93121161Sume#define ND_IFINFO(ifp) \ 94121161Sume (((struct in6_ifextra *)(ifp)->if_afdata[AF_INET6])->nd_ifinfo) 95121161Sume#define IN6_LINKMTU(ifp) \ 96121161Sume ((ND_IFINFO(ifp)->linkmtu && ND_IFINFO(ifp)->linkmtu < (ifp)->if_mtu) \ 97121161Sume ? ND_IFINFO(ifp)->linkmtu \ 98121161Sume : ((ND_IFINFO(ifp)->maxmtu && ND_IFINFO(ifp)->maxmtu < (ifp)->if_mtu) \ 99121161Sume ? ND_IFINFO(ifp)->maxmtu : (ifp)->if_mtu)) 100121161Sume#endif 101121161Sume 10253541Sshinstruct in6_nbrinfo { 10362587Sitojun char ifname[IFNAMSIZ]; /* if name, e.g. "en0" */ 10462587Sitojun struct in6_addr addr; /* IPv6 address of the neighbor */ 10553541Sshin long asked; /* number of queries already sent for this addr */ 10653541Sshin int isrouter; /* if it acts as a router */ 10753541Sshin int state; /* reachability state */ 10853541Sshin int expire; /* lifetime for NDP state transition */ 10953541Sshin}; 11053541Sshin 11162587Sitojun#define DRLSTSIZ 10 11262587Sitojun#define PRLSTSIZ 10 11353541Sshinstruct in6_drlist { 11462587Sitojun char ifname[IFNAMSIZ]; 11553541Sshin struct { 11653541Sshin struct in6_addr rtaddr; 11753541Sshin u_char flags; 11853541Sshin u_short rtlifetime; 11953541Sshin u_long expire; 12062587Sitojun u_short if_index; 12153541Sshin } defrouter[DRLSTSIZ]; 12253541Sshin}; 12353541Sshin 12478064Sumestruct in6_defrouter { 12578064Sume struct sockaddr_in6 rtaddr; 12678064Sume u_char flags; 12778064Sume u_short rtlifetime; 12878064Sume u_long expire; 12978064Sume u_short if_index; 13081369Ssimokawa}; 13178064Sume 132121472Sume#ifdef _KERNEL 133121472Sumestruct in6_oprlist { 134121472Sume char ifname[IFNAMSIZ]; 135121472Sume struct { 136121472Sume struct in6_addr prefix; 137121472Sume struct prf_ra raflags; 138121472Sume u_char prefixlen; 139121472Sume u_char origin; 140121472Sume u_long vltime; 141121472Sume u_long pltime; 142121472Sume u_long expire; 143121472Sume u_short if_index; 144121472Sume u_short advrtrs; /* number of advertisement routers */ 145121472Sume struct in6_addr advrtr[DRLSTSIZ]; /* XXX: explicit limit */ 146121472Sume } prefix[PRLSTSIZ]; 147121472Sume}; 148121472Sume#endif 149121472Sume 15053541Sshinstruct in6_prlist { 15162587Sitojun char ifname[IFNAMSIZ]; 15253541Sshin struct { 15353541Sshin struct in6_addr prefix; 15462587Sitojun struct prf_ra raflags; 15553541Sshin u_char prefixlen; 15662587Sitojun u_char origin; 15795023Ssuz u_int32_t vltime; 15895023Ssuz u_int32_t pltime; 15995023Ssuz time_t expire; 16062587Sitojun u_short if_index; 16162587Sitojun u_short advrtrs; /* number of advertisement routers */ 16253541Sshin struct in6_addr advrtr[DRLSTSIZ]; /* XXX: explicit limit */ 16353541Sshin } prefix[PRLSTSIZ]; 16453541Sshin}; 16553541Sshin 16678064Sumestruct in6_prefix { 16778064Sume struct sockaddr_in6 prefix; 16878064Sume struct prf_ra raflags; 16978064Sume u_char prefixlen; 17078064Sume u_char origin; 171121472Sume u_int32_t vltime; 172121472Sume u_int32_t pltime; 173121472Sume time_t expire; 17478064Sume u_int32_t flags; 17578064Sume int refcnt; 17678064Sume u_short if_index; 17778064Sume u_short advrtrs; /* number of advertisement routers */ 17878064Sume /* struct sockaddr_in6 advrtr[] */ 17981369Ssimokawa}; 18078064Sume 18178064Sume#ifdef _KERNEL 18278064Sumestruct in6_ondireq { 18378064Sume char ifname[IFNAMSIZ]; 18478064Sume struct { 18578064Sume u_int32_t linkmtu; /* LinkMTU */ 18678064Sume u_int32_t maxmtu; /* Upper bound of LinkMTU */ 18778064Sume u_int32_t basereachable; /* BaseReachableTime */ 18878064Sume u_int32_t reachable; /* Reachable Time */ 18978064Sume u_int32_t retrans; /* Retrans Timer */ 19078064Sume u_int32_t flags; /* Flags */ 19178064Sume int recalctm; /* BaseReacable re-calculation timer */ 19278064Sume u_int8_t chlim; /* CurHopLimit */ 19378064Sume u_int8_t receivedra; 19478064Sume } ndi; 19578064Sume}; 19678064Sume#endif 19778064Sume 19853541Sshinstruct in6_ndireq { 19962587Sitojun char ifname[IFNAMSIZ]; 20062587Sitojun struct nd_ifinfo ndi; 20153541Sshin}; 20253541Sshin 20362587Sitojunstruct in6_ndifreq { 20462587Sitojun char ifname[IFNAMSIZ]; 20562587Sitojun u_long ifindex; 20662587Sitojun}; 20762587Sitojun 20878064Sume/* Prefix status */ 20978064Sume#define NDPRF_ONLINK 0x1 21078064Sume#define NDPRF_DETACHED 0x2 21162587Sitojun 21253541Sshin/* protocol constants */ 21395023Ssuz#define MAX_RTR_SOLICITATION_DELAY 1 /* 1sec */ 21495023Ssuz#define RTR_SOLICITATION_INTERVAL 4 /* 4sec */ 21562587Sitojun#define MAX_RTR_SOLICITATIONS 3 21653541Sshin 21762587Sitojun#define ND6_INFINITE_LIFETIME 0xffffffff 21853541Sshin 21953541Sshin#ifdef _KERNEL 22053541Sshin/* node constants */ 22162587Sitojun#define MAX_REACHABLE_TIME 3600000 /* msec */ 22262587Sitojun#define REACHABLE_TIME 30000 /* msec */ 22362587Sitojun#define RETRANS_TIMER 1000 /* msec */ 22462587Sitojun#define MIN_RANDOM_FACTOR 512 /* 1024 * 0.5 */ 22562587Sitojun#define MAX_RANDOM_FACTOR 1536 /* 1024 * 1.5 */ 22678064Sume#define DEF_TEMP_VALID_LIFETIME 604800 /* 1 week */ 22778064Sume#define DEF_TEMP_PREFERRED_LIFETIME 86400 /* 1 day */ 22878064Sume#define TEMPADDR_REGEN_ADVANCE 5 /* sec */ 22978064Sume#define MAX_TEMP_DESYNC_FACTOR 600 /* 10 min */ 23062587Sitojun#define ND_COMPUTE_RTIME(x) \ 23153541Sshin (((MIN_RANDOM_FACTOR * (x >> 10)) + (random() & \ 23253541Sshin ((MAX_RANDOM_FACTOR - MIN_RANDOM_FACTOR) * (x >> 10)))) /1000) 23353541Sshin 23462587SitojunTAILQ_HEAD(nd_drhead, nd_defrouter); 23553541Sshinstruct nd_defrouter { 23662587Sitojun TAILQ_ENTRY(nd_defrouter) dr_entry; 23753541Sshin struct in6_addr rtaddr; 23895023Ssuz u_char flags; /* flags on RA message */ 23953541Sshin u_short rtlifetime; 24053541Sshin u_long expire; 24162587Sitojun struct ifnet *ifp; 24253541Sshin}; 24353541Sshin 24453541Sshinstruct nd_prefix { 24562587Sitojun struct ifnet *ndpr_ifp; 24660938Sjake LIST_ENTRY(nd_prefix) ndpr_entry; 24762587Sitojun struct sockaddr_in6 ndpr_prefix; /* prefix */ 24862587Sitojun struct in6_addr ndpr_mask; /* netmask derived from the prefix */ 24962587Sitojun struct in6_addr ndpr_addr; /* address that is derived from the prefix */ 25062587Sitojun u_int32_t ndpr_vltime; /* advertised valid lifetime */ 25162587Sitojun u_int32_t ndpr_pltime; /* advertised preferred lifetime */ 25262587Sitojun time_t ndpr_expire; /* expiration time of the prefix */ 25362587Sitojun time_t ndpr_preferred; /* preferred time of the prefix */ 25462587Sitojun struct prf_ra ndpr_flags; 25578064Sume u_int32_t ndpr_stateflags; /* actual state flags */ 25653541Sshin /* list of routers that advertise the prefix: */ 25760938Sjake LIST_HEAD(pr_rtrhead, nd_pfxrouter) ndpr_advrtrs; 25853541Sshin u_char ndpr_plen; 25978064Sume int ndpr_refcnt; /* reference couter from addresses */ 26053541Sshin}; 26153541Sshin 26262587Sitojun#define ndpr_next ndpr_entry.le_next 26353541Sshin 26462587Sitojun#define ndpr_raf ndpr_flags 26562587Sitojun#define ndpr_raf_onlink ndpr_flags.onlink 26662587Sitojun#define ndpr_raf_auto ndpr_flags.autonomous 26753541Sshin 26853541Sshin/* 26953541Sshin * We keep expired prefix for certain amount of time, for validation purposes. 27053541Sshin * 1800s = MaxRtrAdvInterval 27153541Sshin */ 27262587Sitojun#define NDPR_KEEP_EXPIRED (1800 * 2) 27353541Sshin 27453541Sshin/* 27553541Sshin * Message format for use in obtaining information about prefixes 27653541Sshin * from inet6 sysctl function 27753541Sshin */ 27853541Sshinstruct inet6_ndpr_msghdr { 27953541Sshin u_short inpm_msglen; /* to skip over non-understood messages */ 28072093Sasmodai u_char inpm_version; /* future binary compatibility */ 28153541Sshin u_char inpm_type; /* message type */ 28262587Sitojun struct in6_addr inpm_prefix; 28353541Sshin u_long prm_vltim; 28453541Sshin u_long prm_pltime; 28553541Sshin u_long prm_expire; 28653541Sshin u_long prm_preferred; 28762587Sitojun struct in6_prflags prm_flags; 28853541Sshin u_short prm_index; /* index for associated ifp */ 28953541Sshin u_char prm_plen; /* length of prefix in bits */ 29053541Sshin}; 29153541Sshin 29262587Sitojun#define prm_raf_onlink prm_flags.prf_ra.onlink 29362587Sitojun#define prm_raf_auto prm_flags.prf_ra.autonomous 29453541Sshin 29562587Sitojun#define prm_statef_onlink prm_flags.prf_state.onlink 29653541Sshin 29762587Sitojun#define prm_rrf_decrvalid prm_flags.prf_rr.decrvalid 29862587Sitojun#define prm_rrf_decrprefd prm_flags.prf_rr.decrprefd 29953541Sshin 30062587Sitojun#define ifpr2ndpr(ifpr) ((struct nd_prefix *)(ifpr)) 30162587Sitojun#define ndpr2ifpr(ndpr) ((struct ifprefix *)(ndpr)) 30253541Sshin 30353541Sshinstruct nd_pfxrouter { 30460938Sjake LIST_ENTRY(nd_pfxrouter) pfr_entry; 30562587Sitojun#define pfr_next pfr_entry.le_next 30662587Sitojun struct nd_defrouter *router; 30753541Sshin}; 30853541Sshin 30960938SjakeLIST_HEAD(nd_prhead, nd_prefix); 31053541Sshin 31153541Sshin/* nd6.c */ 31262587Sitojunextern int nd6_prune; 31362587Sitojunextern int nd6_delay; 31462587Sitojunextern int nd6_umaxtries; 31562587Sitojunextern int nd6_mmaxtries; 31662587Sitojunextern int nd6_useloopback; 31762587Sitojunextern int nd6_maxnudhint; 31878064Sumeextern int nd6_gctimer; 31962587Sitojunextern struct llinfo_nd6 llinfo_nd6; 32062587Sitojunextern struct nd_ifinfo *nd_ifinfo; 32162587Sitojunextern struct nd_drhead nd_defrouter; 32262587Sitojunextern struct nd_prhead nd_prefix; 32378064Sumeextern int nd6_debug; 32453541Sshin 325120941Sume#define nd6log(x) do { if (nd6_debug) log x; } while (/*CONSTCOND*/ 0) 32678064Sume 32778064Sumeextern struct callout nd6_timer_ch; 32878064Sume 32962587Sitojun/* nd6_rtr.c */ 33062587Sitojunextern int nd6_defifindex; 33178064Sumeextern int ip6_desync_factor; /* seconds */ 33278064Sumeextern u_int32_t ip6_temp_preferred_lifetime; /* seconds */ 33378064Sumeextern u_int32_t ip6_temp_valid_lifetime; /* seconds */ 33478064Sumeextern int ip6_temp_regen_advance; /* seconds */ 33562587Sitojun 33653541Sshinunion nd_opts { 337121472Sume struct nd_opt_hdr *nd_opt_array[13]; /* max = target address list */ 33853541Sshin struct { 33962587Sitojun struct nd_opt_hdr *zero; 34062587Sitojun struct nd_opt_hdr *src_lladdr; 34162587Sitojun struct nd_opt_hdr *tgt_lladdr; 34295023Ssuz struct nd_opt_prefix_info *pi_beg; /* multiple opts, start */ 34362587Sitojun struct nd_opt_rd_hdr *rh; 34462587Sitojun struct nd_opt_mtu *mtu; 34562587Sitojun struct nd_opt_hdr *six; 346121472Sume struct nd_opt_advinterval *adv; 347121472Sume struct nd_opt_homeagent_info *hai; 348121472Sume struct nd_opt_hdr *src_addrlist; 349121472Sume struct nd_opt_hdr *tgt_addrlist; 35062587Sitojun struct nd_opt_hdr *search; /* multiple opts */ 35162587Sitojun struct nd_opt_hdr *last; /* multiple opts */ 35262587Sitojun int done; 35362587Sitojun struct nd_opt_prefix_info *pi_end;/* multiple opts, end */ 35453541Sshin } nd_opt_each; 35553541Sshin}; 35662587Sitojun#define nd_opts_src_lladdr nd_opt_each.src_lladdr 35762587Sitojun#define nd_opts_tgt_lladdr nd_opt_each.tgt_lladdr 35862587Sitojun#define nd_opts_pi nd_opt_each.pi_beg 35962587Sitojun#define nd_opts_pi_end nd_opt_each.pi_end 36062587Sitojun#define nd_opts_rh nd_opt_each.rh 36162587Sitojun#define nd_opts_mtu nd_opt_each.mtu 36262587Sitojun#define nd_opts_adv nd_opt_each.adv 36362587Sitojun#define nd_opts_hai nd_opt_each.hai 364121472Sume#define nd_opts_src_addrlist nd_opt_each.src_addrlist 365121472Sume#define nd_opts_tgt_addrlist nd_opt_each.tgt_addrlist 36662587Sitojun#define nd_opts_search nd_opt_each.search 36762587Sitojun#define nd_opts_last nd_opt_each.last 36862587Sitojun#define nd_opts_done nd_opt_each.done 36953541Sshin 37053541Sshin/* XXX: need nd6_var.h?? */ 37153541Sshin/* nd6.c */ 37262587Sitojunvoid nd6_init __P((void)); 373121161Sumestruct nd_ifinfo *nd6_ifattach __P((struct ifnet *)); 374121161Sumevoid nd6_ifdetach __P((struct nd_ifinfo *)); 37562587Sitojunint nd6_is_addr_neighbor __P((struct sockaddr_in6 *, struct ifnet *)); 37662587Sitojunvoid nd6_option_init __P((void *, int, union nd_opts *)); 37762587Sitojunstruct nd_opt_hdr *nd6_option __P((union nd_opts *)); 37862587Sitojunint nd6_options __P((union nd_opts *)); 37953541Sshinstruct rtentry *nd6_lookup __P((struct in6_addr *, int, struct ifnet *)); 38062587Sitojunvoid nd6_setmtu __P((struct ifnet *)); 38162587Sitojunvoid nd6_timer __P((void *)); 38262587Sitojunvoid nd6_purge __P((struct ifnet *)); 38378064Sumestruct llinfo_nd6 *nd6_free __P((struct rtentry *)); 38462587Sitojunvoid nd6_nud_hint __P((struct rtentry *, struct in6_addr *, int)); 385120941Sumeint nd6_resolve __P((struct ifnet *, struct rtentry *, struct mbuf *, 386120941Sume struct sockaddr *, u_char *)); 38785074Sruvoid nd6_rtrequest __P((int, struct rtentry *, struct rt_addrinfo *)); 38862587Sitojunint nd6_ioctl __P((u_long, caddr_t, struct ifnet *)); 38962587Sitojunstruct rtentry *nd6_cache_lladdr __P((struct ifnet *, struct in6_addr *, 39062587Sitojun char *, int, int, int)); 39162587Sitojunint nd6_output __P((struct ifnet *, struct ifnet *, struct mbuf *, 392120941Sume struct sockaddr_in6 *, struct rtentry *)); 39362587Sitojunint nd6_storelladdr __P((struct ifnet *, struct rtentry *, struct mbuf *, 394120941Sume struct sockaddr *, u_char *)); 39578064Sumeint nd6_need_cache __P((struct ifnet *)); 39653541Sshin 39753541Sshin/* nd6_nbr.c */ 39862587Sitojunvoid nd6_na_input __P((struct mbuf *, int, int)); 39978064Sumevoid nd6_na_output __P((struct ifnet *, const struct in6_addr *, 40078064Sume const struct in6_addr *, u_long, int, struct sockaddr *)); 40162587Sitojunvoid nd6_ns_input __P((struct mbuf *, int, int)); 40278064Sumevoid nd6_ns_output __P((struct ifnet *, const struct in6_addr *, 40378064Sume const struct in6_addr *, struct llinfo_nd6 *, int)); 40462587Sitojuncaddr_t nd6_ifptomac __P((struct ifnet *)); 40562587Sitojunvoid nd6_dad_start __P((struct ifaddr *, int *)); 40678064Sumevoid nd6_dad_stop __P((struct ifaddr *)); 40762587Sitojunvoid nd6_dad_duplicated __P((struct ifaddr *)); 40853541Sshin 40953541Sshin/* nd6_rtr.c */ 41062587Sitojunvoid nd6_rs_input __P((struct mbuf *, int, int)); 41162587Sitojunvoid nd6_ra_input __P((struct mbuf *, int, int)); 41262587Sitojunvoid prelist_del __P((struct nd_prefix *)); 41362587Sitojunvoid defrouter_addreq __P((struct nd_defrouter *)); 41462587Sitojunvoid defrouter_delreq __P((struct nd_defrouter *, int)); 41562587Sitojunvoid defrouter_select __P((void)); 41662587Sitojunvoid defrtrlist_del __P((struct nd_defrouter *)); 41762587Sitojunvoid prelist_remove __P((struct nd_prefix *)); 41862587Sitojunint prelist_update __P((struct nd_prefix *, struct nd_defrouter *, 419120941Sume struct mbuf *)); 42078064Sumeint nd6_prelist_add __P((struct nd_prefix *, struct nd_defrouter *, 421120941Sume struct nd_prefix **)); 42278064Sumeint nd6_prefix_onlink __P((struct nd_prefix *)); 42378064Sumeint nd6_prefix_offlink __P((struct nd_prefix *)); 42462587Sitojunvoid pfxlist_onlink_check __P((void)); 425120941Sumestruct nd_defrouter *defrouter_lookup __P((struct in6_addr *, struct ifnet *)); 42678064Sumestruct nd_prefix *nd6_prefix_lookup __P((struct nd_prefix *)); 427120941Sumeint in6_init_prefix_ltimes __P((struct nd_prefix *)); 42862587Sitojunvoid rt6_flush __P((struct in6_addr *, struct ifnet *)); 42962587Sitojunint nd6_setdefaultiface __P((int)); 43078064Sumeint in6_tmpifadd __P((const struct in6_ifaddr *, int)); 43153541Sshin 43253541Sshin#endif /* _KERNEL */ 43353541Sshin 43453541Sshin#endif /* _NETINET6_ND6_H_ */ 435