-void nd6_rs_input __P((struct mbuf *, int, int));
-void nd6_ra_input __P((struct mbuf *, int, int));
-void prelist_del __P((struct nd_prefix *));
-void defrouter_addreq __P((struct nd_defrouter *));
-void defrouter_delreq __P((struct nd_defrouter *, int));
-void defrouter_select __P((void));
-void defrtrlist_del __P((struct nd_defrouter *));
-void prelist_remove __P((struct nd_prefix *));
-int prelist_update __P((struct nd_prefix *, struct nd_defrouter *,
- struct mbuf *));
-struct nd_pfxrouter *find_pfxlist_reachable_router __P((struct nd_prefix *)); /* XXXYYY */
-void pfxlist_onlink_check __P((void));
-void defrouter_addifreq __P((struct ifnet *)); /* XXXYYY */
-struct nd_defrouter *defrouter_lookup __P((struct in6_addr *,
- struct ifnet *));
-struct nd_prefix *prefix_lookup __P((struct nd_prefix *)); /* XXXYYY */
-int in6_ifdel __P((struct ifnet *, struct in6_addr *));
-struct nd_pfxrouter *pfxrtr_lookup __P((struct nd_prefix *,
- struct nd_defrouter *)); /* XXXYYY */
-int in6_init_prefix_ltimes __P((struct nd_prefix *ndpr));
-void rt6_flush __P((struct in6_addr *, struct ifnet *));
-int nd6_setdefaultiface __P((int));
+extern void nd6_rtr_init(void);
+extern void nd6_rs_input(struct mbuf *, int, int);
+extern void nd6_ra_input(struct mbuf *, int, int);
+extern void prelist_del(struct nd_prefix *);
+extern void defrouter_select(struct ifnet *);
+extern void defrouter_reset(void);
+extern int defrtrlist_ioctl(u_long, caddr_t);
+extern void defrtrlist_del(struct nd_defrouter *);
+extern int defrtrlist_add_static(struct nd_defrouter *);
+extern int defrtrlist_del_static(struct nd_defrouter *);
+extern void prelist_remove(struct nd_prefix *);
+extern int prelist_update(struct nd_prefix *, struct nd_defrouter *,
+ struct mbuf *, int);
+extern int nd6_prelist_add(struct nd_prefix *, struct nd_defrouter *,
+ struct nd_prefix **, boolean_t);
+extern int nd6_prefix_onlink(struct nd_prefix *);
+extern int nd6_prefix_onlink_scoped(struct nd_prefix *, unsigned int);
+extern int nd6_prefix_offlink(struct nd_prefix *);
+extern void pfxlist_onlink_check(void);
+extern struct nd_defrouter *defrouter_lookup(struct in6_addr *, struct ifnet *);
+extern struct nd_prefix *nd6_prefix_lookup(struct nd_prefix *);
+extern int in6_init_prefix_ltimes(struct nd_prefix *ndpr);
+extern void rt6_flush(struct in6_addr *, struct ifnet *);
+extern int nd6_setdefaultiface(int);
+extern int in6_tmpifadd(const struct in6_ifaddr *, int);
+extern void nddr_addref(struct nd_defrouter *, int);
+extern struct nd_defrouter *nddr_remref(struct nd_defrouter *, int);
+extern uint64_t nddr_getexpire(struct nd_defrouter *);
+extern void ndpr_addref(struct nd_prefix *, int);
+extern struct nd_prefix *ndpr_remref(struct nd_prefix *, int);
+extern uint64_t ndpr_getexpire(struct nd_prefix *);
+
+/* nd6_prproxy.c */
+struct ip6_hdr;
+extern u_int32_t nd6_prproxy;
+extern void nd6_prproxy_init(void);
+extern int nd6_if_prproxy(struct ifnet *, boolean_t);
+extern void nd6_prproxy_prelist_update(struct nd_prefix *, struct nd_prefix *);
+extern boolean_t nd6_prproxy_ifaddr(struct in6_ifaddr *);
+extern void nd6_proxy_find_fwdroute(struct ifnet *, struct route_in6 *);
+extern boolean_t nd6_prproxy_isours(struct mbuf *, struct ip6_hdr *,
+ struct route_in6 *, unsigned int);
+extern void nd6_prproxy_ns_output(struct ifnet *, struct ifnet *,
+ struct in6_addr *, struct in6_addr *, struct llinfo_nd6 *);
+extern void nd6_prproxy_ns_input(struct ifnet *, struct in6_addr *,
+ char *, int, struct in6_addr *, struct in6_addr *);
+extern void nd6_prproxy_na_input(struct ifnet *, struct in6_addr *,
+ struct in6_addr *, struct in6_addr *, int);
+extern void nd6_prproxy_sols_reap(struct nd_prefix *);
+extern void nd6_prproxy_sols_prune(struct nd_prefix *, u_int32_t);
+extern int nd6_if_disable(struct ifnet *, boolean_t);
+#endif /* BSD_KERNEL_PRIVATE */
+
+#ifdef KERNEL
+
+/*
+ * @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.
+ */
+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);