comm: add -Wall
[unleashed.git] / include / inet / ip2mac.h
blob417864eb5ae04cf47994853247ba4f6966a67d3c
1 /*
2 * CDDL HEADER START
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]
19 * CDDL HEADER END
23 * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
27 #ifndef _IP2MAC_H
28 #define _IP2MAC_H
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
33 #include <sys/types.h>
34 #include <sys/socket_impl.h>
35 #include <net/if_dl.h>
37 #ifdef _KERNEL
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;
44 uint_t ip2mac_err;
45 uint_t ip2mac_ifindex;
46 } ip2mac_t;
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 *,
55 void *, zoneid_t);
56 extern int ip2mac_cancel(ip2mac_id_t, zoneid_t);
57 #endif /* _KERNEL */
59 #ifdef __cplusplus
61 #endif
63 #endif /* _IP2MAC_H */