-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 *));
-int nd6_prelist_add __P((struct nd_prefix *, struct nd_defrouter *,
- struct nd_prefix **));
-int nd6_prefix_onlink __P((struct nd_prefix *));
-int nd6_prefix_offlink __P((struct nd_prefix *));
-void pfxlist_onlink_check __P((void));
-struct nd_defrouter *defrouter_lookup __P((struct in6_addr *,
- struct ifnet *));
-struct nd_prefix *nd6_prefix_lookup __P((struct nd_prefix *));
-int in6_init_prefix_ltimes __P((struct nd_prefix *ndpr));
-void rt6_flush __P((struct in6_addr *, struct ifnet *));
-int nd6_setdefaultiface __P((int));
-int in6_tmpifadd __P((const struct in6_ifaddr *, int));
-
-#endif /* __APPLE_API_PRIVATE */
-#endif /* KERNEL */
+void nd6_rs_input(struct mbuf *, int, int);
+void nd6_ra_input(struct mbuf *, int, int);
+void prelist_del(struct nd_prefix *);
+void defrouter_addreq(struct nd_defrouter *);
+void defrouter_delreq(struct nd_defrouter *, int);
+void defrouter_select(void);
+void defrtrlist_del(struct nd_defrouter *, int);
+void prelist_remove(struct nd_prefix *, int);
+int prelist_update(struct nd_prefix *, struct nd_defrouter *,
+ struct mbuf *);
+int nd6_prelist_add(struct nd_prefix *, struct nd_defrouter *,
+ struct nd_prefix **);
+int nd6_prefix_onlink(struct nd_prefix *, int, int);
+int nd6_prefix_offlink(struct nd_prefix *);
+void pfxlist_onlink_check(int);
+struct nd_defrouter *defrouter_lookup(struct in6_addr *,
+ struct ifnet *);
+struct nd_prefix *nd6_prefix_lookup(struct nd_prefix *);
+int in6_init_prefix_ltimes(struct nd_prefix *ndpr);
+void rt6_flush(struct in6_addr *, struct ifnet *);
+int nd6_setdefaultiface(int);
+int in6_tmpifadd(const struct in6_ifaddr *, int);
+#endif /* 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.
+ */
+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);