ifaddrs.h revision 4ba0d9af63fbf7e9acfa068a1fe36b3d287b9c6b
2N/A/*
2N/A * Copyright (c) 1995, 1999
2N/A * Berkeley Software Design, Inc. All rights reserved.
2N/A *
2N/A * Redistribution and use in source and binary forms, with or without
2N/A * modification, are permitted provided that the following conditions
2N/A * are met:
2N/A * 1. Redistributions of source code must retain the above copyright
2N/A * notice, this list of conditions and the following disclaimer.
2N/A *
2N/A * THIS SOFTWARE IS PROVIDED BY Berkeley Software Design, Inc. ``AS IS'' AND
2N/A * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2N/A * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2N/A * ARE DISCLAIMED. IN NO EVENT SHALL Berkeley Software Design, Inc. BE LIABLE
2N/A * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2N/A * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2N/A * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2N/A * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2N/A * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2N/A * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
58N/A * SUCH DAMAGE.
2N/A *
2N/A * BSDI ifaddrs.h,v 2.5 2000/02/23 14:51:59 dab Exp
2N/A */
2N/A
23N/A#ifndef _IFADDRS_H_
23N/A#define _IFADDRS_H_
23N/A
23N/Astruct ifaddrs {
23N/A struct ifaddrs *ifa_next;
32N/A char *ifa_name;
32N/A unsigned int ifa_flags;
32N/A struct sockaddr *ifa_addr;
34N/A struct sockaddr *ifa_netmask;
32N/A struct sockaddr *ifa_dstaddr;
34N/A void *ifa_data;
32N/A};
32N/A
58N/A/*
32N/A * This may have been defined in <net/if.h>. Note that if <net/if.h> is
2N/A * to be included it must be included before this header file.
38N/A */
38N/A#ifndef ifa_broadaddr
38N/A#define ifa_broadaddr ifa_dstaddr /* broadcast address interface */
38N/A#endif
38N/A
38N/A#include <sys/cdefs.h>
38N/A
38N/A__BEGIN_DECLS
38N/Aextern int getifaddrs(struct ifaddrs **ifap);
83N/Aextern void freeifaddrs(struct ifaddrs *ifa);
83N/A__END_DECLS
99N/A
2N/A#endif
92N/A