xref: /minix3/include/ifaddrs.h (revision 2fe8fb192fe7e8720e3e7a77f928da545e872a6a)
1*2fe8fb19SBen Gras /*	$NetBSD: ifaddrs.h,v 1.5 2005/02/03 04:39:32 perry Exp $	*/
2*2fe8fb19SBen Gras 
3dbc345e1SBen Gras /*
4dbc345e1SBen Gras  * Copyright (c) 1995, 1999
5dbc345e1SBen Gras  *	Berkeley Software Design, Inc.  All rights reserved.
6dbc345e1SBen Gras  *
7dbc345e1SBen Gras  * Redistribution and use in source and binary forms, with or without
8dbc345e1SBen Gras  * modification, are permitted provided that the following conditions
9dbc345e1SBen Gras  * are met:
10dbc345e1SBen Gras  * 1. Redistributions of source code must retain the above copyright
11dbc345e1SBen Gras  *    notice, this list of conditions and the following disclaimer.
12dbc345e1SBen Gras  *
13dbc345e1SBen Gras  * THIS SOFTWARE IS PROVIDED BY Berkeley Software Design, Inc. ``AS IS'' AND
14dbc345e1SBen Gras  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15dbc345e1SBen Gras  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16dbc345e1SBen Gras  * ARE DISCLAIMED.  IN NO EVENT SHALL Berkeley Software Design, Inc. BE LIABLE
17dbc345e1SBen Gras  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18dbc345e1SBen Gras  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19dbc345e1SBen Gras  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20dbc345e1SBen Gras  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21dbc345e1SBen Gras  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22dbc345e1SBen Gras  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23dbc345e1SBen Gras  * SUCH DAMAGE.
24dbc345e1SBen Gras  *
25dbc345e1SBen Gras  *	BSDI ifaddrs.h,v 2.5 2000/02/23 14:51:59 dab Exp
26dbc345e1SBen Gras  */
27dbc345e1SBen Gras 
28dbc345e1SBen Gras #ifndef	_IFADDRS_H_
29dbc345e1SBen Gras #define	_IFADDRS_H_
30dbc345e1SBen Gras 
31dbc345e1SBen Gras struct ifaddrs {
32dbc345e1SBen Gras 	struct ifaddrs  *ifa_next;
33dbc345e1SBen Gras 	char		*ifa_name;
34dbc345e1SBen Gras 	u_int		 ifa_flags;
35dbc345e1SBen Gras 	struct sockaddr	*ifa_addr;
36dbc345e1SBen Gras 	struct sockaddr	*ifa_netmask;
37dbc345e1SBen Gras 	struct sockaddr	*ifa_dstaddr;
38dbc345e1SBen Gras 	void		*ifa_data;
39dbc345e1SBen Gras };
40dbc345e1SBen Gras 
41dbc345e1SBen Gras /*
42dbc345e1SBen Gras  * This may have been defined in <net/if.h>.  Note that if <net/if.h> is
43dbc345e1SBen Gras  * to be included it must be included before this header file.
44dbc345e1SBen Gras  */
45dbc345e1SBen Gras #ifndef	ifa_broadaddr
46dbc345e1SBen Gras #define	ifa_broadaddr	ifa_dstaddr	/* broadcast address interface */
47dbc345e1SBen Gras #endif
48dbc345e1SBen Gras 
49*2fe8fb19SBen Gras #include <sys/cdefs.h>
50dbc345e1SBen Gras 
51*2fe8fb19SBen Gras __BEGIN_DECLS
52*2fe8fb19SBen Gras int getifaddrs(struct ifaddrs **);
53*2fe8fb19SBen Gras void freeifaddrs(struct ifaddrs *);
54*2fe8fb19SBen Gras __END_DECLS
55dbc345e1SBen Gras 
56*2fe8fb19SBen Gras #endif /* !_IFADDRS_H_ */
57