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