4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
23 * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
33 #include <sys/types.h>
34 #include <sys/socket_impl.h>
35 #include <net/if_dl.h>
39 * IP address -> link layer address conversion routines and structures.
41 typedef struct ip2mac
{
42 struct sockaddr_storage ip2mac_pa
;
43 struct sockaddr_dl ip2mac_ha
;
45 uint_t ip2mac_ifindex
;
48 #define IP2MAC_RESOLVE 0x01 /* Asynchronously resolve, if needed */
49 #define IP2MAC_LOOKUP 0x02 /* Lookup only */
51 typedef void *ip2mac_id_t
;
52 typedef void (ip2mac_callback_t
)(ip2mac_t
*, void *);
54 extern ip2mac_id_t
ip2mac(uint_t
, ip2mac_t
*, ip2mac_callback_t
*,
56 extern int ip2mac_cancel(ip2mac_id_t
, zoneid_t
);
63 #endif /* _IP2MAC_H */