ifaddrs.h revision 62606
162606Sitojun/*	$FreeBSD: head/include/ifaddrs.h 62606 2000-07-05 02:13:17Z itojun $	*/
262606Sitojun
362606Sitojun/*
462606Sitojun * Copyright (c) 1995, 1999
562606Sitojun *	Berkeley Software Design, Inc.  All rights reserved.
662606Sitojun *
762606Sitojun * Redistribution and use in source and binary forms, with or without
862606Sitojun * modification, are permitted provided that the following conditions
962606Sitojun * are met:
1062606Sitojun * 1. Redistributions of source code must retain the above copyright
1162606Sitojun *    notice, this list of conditions and the following disclaimer.
1262606Sitojun *
1362606Sitojun * THIS SOFTWARE IS PROVIDED BY Berkeley Software Design, Inc. ``AS IS'' AND
1462606Sitojun * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1562606Sitojun * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1662606Sitojun * ARE DISCLAIMED.  IN NO EVENT SHALL Berkeley Software Design, Inc. BE LIABLE
1762606Sitojun * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1862606Sitojun * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
1962606Sitojun * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2062606Sitojun * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2162606Sitojun * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2262606Sitojun * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2362606Sitojun * SUCH DAMAGE.
2462606Sitojun *
2562606Sitojun *	BSDI ifaddrs.h,v 2.5 2000/02/23 14:51:59 dab Exp
2662606Sitojun */
2762606Sitojun
2862606Sitojun#ifndef	_IFADDRS_H_
2962606Sitojun#define	_IFADDRS_H_
3062606Sitojun
3162606Sitojunstruct ifaddrs {
3262606Sitojun	struct ifaddrs  *ifa_next;
3362606Sitojun	char		*ifa_name;
3462606Sitojun	u_int		 ifa_flags;
3562606Sitojun	struct sockaddr	*ifa_addr;
3662606Sitojun	struct sockaddr	*ifa_netmask;
3762606Sitojun	struct sockaddr	*ifa_dstaddr;
3862606Sitojun	void		*ifa_data;
3962606Sitojun};
4062606Sitojun
4162606Sitojun/*
4262606Sitojun * This may have been defined in <net/if.h>.  Note that if <net/if.h> is
4362606Sitojun * to be included it must be included before this header file.
4462606Sitojun */
4562606Sitojun#ifndef	ifa_broadaddr
4662606Sitojun#define	ifa_broadaddr	ifa_dstaddr	/* broadcast address interface */
4762606Sitojun#endif
4862606Sitojun
4962606Sitojun#include <sys/cdefs.h>
5062606Sitojun
5162606Sitojun__BEGIN_DECLS
5262606Sitojunextern int getifaddrs __P((struct ifaddrs **));
5362606Sitojunextern void freeifaddrs __P((struct ifaddrs *));
5462606Sitojun__END_DECLS
5562606Sitojun
5662606Sitojun#endif
57