109cb034itojun/*	$FreeBSD$	*/
209cb034itojun
3b036d1bpfg/*-
4b036d1bpfg * SPDX-License-Identifier: BSD-1-Clause
5b036d1bpfg *
609cb034itojun * Copyright (c) 1995, 1999
709cb034itojun *	Berkeley Software Design, Inc.  All rights reserved.
809cb034itojun *
909cb034itojun * Redistribution and use in source and binary forms, with or without
1009cb034itojun * modification, are permitted provided that the following conditions
1109cb034itojun * are met:
1209cb034itojun * 1. Redistributions of source code must retain the above copyright
1309cb034itojun *    notice, this list of conditions and the following disclaimer.
1409cb034itojun *
1509cb034itojun * THIS SOFTWARE IS PROVIDED BY Berkeley Software Design, Inc. ``AS IS'' AND
1609cb034itojun * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1709cb034itojun * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1809cb034itojun * ARE DISCLAIMED.  IN NO EVENT SHALL Berkeley Software Design, Inc. BE LIABLE
1909cb034itojun * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2009cb034itojun * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2109cb034itojun * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2209cb034itojun * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2309cb034itojun * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2409cb034itojun * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2509cb034itojun * SUCH DAMAGE.
2609cb034itojun *
2709cb034itojun *	BSDI ifaddrs.h,v 2.5 2000/02/23 14:51:59 dab Exp
2809cb034itojun */
2909cb034itojun
3009cb034itojun#ifndef	_IFADDRS_H_
3109cb034itojun#define	_IFADDRS_H_
3209cb034itojun
3309cb034itojunstruct ifaddrs {
3409cb034itojun	struct ifaddrs  *ifa_next;
3509cb034itojun	char		*ifa_name;
36c0a01b0ed	unsigned int	 ifa_flags;
3709cb034itojun	struct sockaddr	*ifa_addr;
3809cb034itojun	struct sockaddr	*ifa_netmask;
3909cb034itojun	struct sockaddr	*ifa_dstaddr;
4009cb034itojun	void		*ifa_data;
4109cb034itojun};
4209cb034itojun
4309cb034itojun/*
4409cb034itojun * This may have been defined in <net/if.h>.  Note that if <net/if.h> is
4509cb034itojun * to be included it must be included before this header file.
4609cb034itojun */
4709cb034itojun#ifndef	ifa_broadaddr
4809cb034itojun#define	ifa_broadaddr	ifa_dstaddr	/* broadcast address interface */
4909cb034itojun#endif
5009cb034itojun
5147c129abmsstruct ifmaddrs {
5247c129abms	struct ifmaddrs	*ifma_next;
5347c129abms	struct sockaddr	*ifma_name;
5447c129abms	struct sockaddr	*ifma_addr;
5547c129abms	struct sockaddr	*ifma_lladdr;
5647c129abms};
5747c129abms
5809cb034itojun#include <sys/cdefs.h>
5909cb034itojun
6009cb034itojun__BEGIN_DECLS
61300518cimpextern int getifaddrs(struct ifaddrs **);
62300518cimpextern void freeifaddrs(struct ifaddrs *);
6347c129abmsextern int getifmaddrs(struct ifmaddrs **);
6447c129abmsextern void freeifmaddrs(struct ifmaddrs *);
6509cb034itojun__END_DECLS
6609cb034itojun
6709cb034itojun#endif
68