X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/91447636331957f3d9b5ca5b508f07c526b0074d..060df5ea7c632b1ac8cc8aac1fb59758165c2084:/bsd/netinet/in_arp.h diff --git a/bsd/netinet/in_arp.h b/bsd/netinet/in_arp.h index e32f597a7..9b1a740ac 100644 --- a/bsd/netinet/in_arp.h +++ b/bsd/netinet/in_arp.h @@ -1,29 +1,36 @@ /* - * Copyright (c) 2004 Apple Computer, Inc. All rights reserved. + * Copyright (c) 2009 Apple Inc. All rights reserved. * - * @APPLE_LICENSE_HEADER_START@ + * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ * - * The contents of this file constitute Original Code as defined in and - * are subject to the Apple Public Source License Version 1.1 (the - * "License"). You may not use this file except in compliance with the - * License. Please obtain a copy of the License at - * http://www.apple.com/publicsource and read it before using this file. + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. The rights granted to you under the License + * may not be used to create, or enable the creation or redistribution of, + * unlawful or unlicensed copies of an Apple operating system, or to + * circumvent, violate, or enable the circumvention or violation of, any + * terms of an Apple operating system software license agreement. * - * This Original Code and all software distributed under the License are - * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the - * License for the specific language governing rights and limitations - * under the License. + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. * - * @APPLE_LICENSE_HEADER_END@ + * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ */ #ifndef _NETINET_IN_ARP_H_ #define _NETINET_IN_ARP_H_ #include +struct sockaddr; struct sockaddr_dl; struct sockaddr_in; @@ -55,15 +62,19 @@ struct sockaddr_in; #ifdef BSD_KERNEL_PRIVATE #define inet_arp_lookup arp_lookup_ip #else -errno_t inet_arp_lookup(ifnet_t interface, const struct sockaddr_in *ip_dest, - struct sockaddr_dl *ll_dest, size_t ll_dest_len, route_t hint, - mbuf_t packet); +extern errno_t inet_arp_lookup(ifnet_t interface, + const struct sockaddr_in *ip_dest, struct sockaddr_dl *ll_dest, + size_t ll_dest_len, route_t hint, mbuf_t packet); #endif /* BSD_KERNEL_PRIVATE */ #ifdef KERNEL_PRIVATE +extern void arp_init(void); +extern void in_arpdrain(void *); /* arp_lookup_ip is obsolete, use inet_arp_lookup */ -errno_t arp_lookup_ip(ifnet_t interface, const struct sockaddr_in *ip_dest, - struct sockaddr_dl *ll_dest, size_t ll_dest_len, route_t hint, - mbuf_t packet); +extern errno_t arp_lookup_ip(ifnet_t interface, + const struct sockaddr_in *ip_dest, struct sockaddr_dl *ll_dest, + size_t ll_dest_len, route_t hint, mbuf_t packet); +__private_extern__ errno_t arp_route_to_gateway_route(const struct sockaddr *, + route_t, route_t *); #endif /* KERNEL_PRIVATE */ /*! @@ -86,14 +97,14 @@ errno_t arp_lookup_ip(ifnet_t interface, const struct sockaddr_in *ip_dest, #ifdef BSD_KERNEL_PRIVATE #define inet_arp_handle_input arp_ip_handle_input #else -errno_t inet_arp_handle_input(ifnet_t ifp, u_int16_t arpop, +extern errno_t inet_arp_handle_input(ifnet_t ifp, u_int16_t arpop, const struct sockaddr_dl *sender_hw, const struct sockaddr_in *sender_ip, const struct sockaddr_in *target_ip); #endif /* KERNEL_PRIVATE */ #ifdef KERNEL_PRIVATE /* arp_ip_handle_input is obsolete, use inet_arp_handle_input */ -errno_t arp_ip_handle_input(ifnet_t ifp, u_int16_t arpop, +extern errno_t arp_ip_handle_input(ifnet_t ifp, u_int16_t arpop, const struct sockaddr_dl *sender_hw, const struct sockaddr_in *sender_ip, const struct sockaddr_in *target_ip); @@ -125,7 +136,7 @@ errno_t arp_ip_handle_input(ifnet_t ifp, u_int16_t arpop, /* inet_arp_init_ifaddr is aliased to arp_ifinit */ #define inet_arp_init_ifaddr arp_ifinit #else -void inet_arp_init_ifaddr(ifnet_t interface, ifaddr_t ipaddr); +extern void inet_arp_init_ifaddr(ifnet_t interface, ifaddr_t ipaddr); #endif -#endif _NETINET_IN_ARP_H_ +#endif /* _NETINET_IN_ARP_H_ */