haiku/headers/compatibility/bsd/ifaddrs.h
Adrien Destugues e3468ef600 ifaddrs: add extern "C"
We need this to be callable from C programs. Thanks to Diver for
reporting!
2015-02-26 22:02:37 +01:00

36 lines
750 B
C

/*
* Copyright 2015, Haiku, Inc. All Rights Reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef _IFADDRS_H
#define _IFADDRS_H
#ifdef __cplusplus
extern "C" {
#endif
struct ifaddrs {
struct ifaddrs *ifa_next; /* Next item in list */
const char *ifa_name; /* Name of interface */
unsigned int ifa_flags; /* Flags from SIOCGIFFLAGS */
struct sockaddr *ifa_addr; /* Address of interface */
struct sockaddr *ifa_netmask; /* Netmask of interface */
struct sockaddr *ifa_dstaddr;
#define ifa_broadaddr ifa_dstaddr
void *ifa_data; /* Address-specific data */
};
int getifaddrs(struct ifaddrs **ifap);
void freeifaddrs(struct ifaddrs *ifa);
#ifdef __cplusplus
}
#endif
#endif