xref: /netbsd-src/include/ifaddrs.h (revision 9fed1c5a9e8ca3438fa85a8dc05a8fb3297801f4)
1*9fed1c5aSroy /*	$NetBSD: ifaddrs.h,v 1.8 2016/09/21 13:32:27 roy Exp $	*/
26037c786Sitojun 
36037c786Sitojun /*
46037c786Sitojun  * Copyright (c) 1995, 1999
56037c786Sitojun  *	Berkeley Software Design, Inc.  All rights reserved.
66037c786Sitojun  *
76037c786Sitojun  * Redistribution and use in source and binary forms, with or without
86037c786Sitojun  * modification, are permitted provided that the following conditions
96037c786Sitojun  * are met:
106037c786Sitojun  * 1. Redistributions of source code must retain the above copyright
116037c786Sitojun  *    notice, this list of conditions and the following disclaimer.
126037c786Sitojun  *
136037c786Sitojun  * THIS SOFTWARE IS PROVIDED BY Berkeley Software Design, Inc. ``AS IS'' AND
146037c786Sitojun  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
156037c786Sitojun  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
166037c786Sitojun  * ARE DISCLAIMED.  IN NO EVENT SHALL Berkeley Software Design, Inc. BE LIABLE
176037c786Sitojun  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
186037c786Sitojun  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
196037c786Sitojun  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
206037c786Sitojun  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
216037c786Sitojun  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
226037c786Sitojun  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
236037c786Sitojun  * SUCH DAMAGE.
246037c786Sitojun  *
254b9363d8Sitojun  *	BSDI ifaddrs.h,v 2.5 2000/02/23 14:51:59 dab Exp
266037c786Sitojun  */
276037c786Sitojun 
286037c786Sitojun #ifndef	_IFADDRS_H_
296037c786Sitojun #define	_IFADDRS_H_
306037c786Sitojun 
316037c786Sitojun struct ifaddrs {
326037c786Sitojun 	struct ifaddrs  *ifa_next;
336037c786Sitojun 	char		*ifa_name;
34398f5724Sdholland 	unsigned int	 ifa_flags;
356037c786Sitojun 	struct sockaddr	*ifa_addr;
366037c786Sitojun 	struct sockaddr	*ifa_netmask;
376037c786Sitojun 	struct sockaddr	*ifa_dstaddr;
386037c786Sitojun 	void		*ifa_data;
39*9fed1c5aSroy 	unsigned int	 ifa_addrflags;
406037c786Sitojun };
416037c786Sitojun 
426037c786Sitojun /*
436037c786Sitojun  * This may have been defined in <net/if.h>.  Note that if <net/if.h> is
446037c786Sitojun  * to be included it must be included before this header file.
456037c786Sitojun  */
466037c786Sitojun #ifndef	ifa_broadaddr
476037c786Sitojun #define	ifa_broadaddr	ifa_dstaddr	/* broadcast address interface */
486037c786Sitojun #endif
496037c786Sitojun 
506037c786Sitojun #include <sys/cdefs.h>
516037c786Sitojun 
526037c786Sitojun __BEGIN_DECLS
5319b7469aSperry int getifaddrs(struct ifaddrs **);
5419b7469aSperry void freeifaddrs(struct ifaddrs *);
556037c786Sitojun __END_DECLS
566037c786Sitojun 
571e57dbd8Skleink #endif /* !_IFADDRS_H_ */
58