xref: /haiku/headers/compatibility/bsd/ifaddrs.h (revision 759ee24c4c1722813609c3b7c77fabef275b02bf)
1 /*
2  * Copyright 2015, Haiku, Inc. All Rights Reserved.
3  * Distributed under the terms of the MIT License.
4  */
5 #ifndef _IFADDRS_H
6 #define _IFADDRS_H
7 
8 #include <features.h>
9 
10 #ifdef _DEFAULT_SOURCE
11 
12 
13 #ifdef __cplusplus
14 extern "C" {
15 #endif
16 
17 
18 struct ifaddrs {
19 	struct ifaddrs  *ifa_next;    /* Next item in list */
20 	const char      *ifa_name;    /* Name of interface */
21 	unsigned int     ifa_flags;   /* Flags from SIOCGIFFLAGS */
22 	struct sockaddr *ifa_addr;    /* Address of interface */
23 	struct sockaddr *ifa_netmask; /* Netmask of interface */
24 	struct sockaddr *ifa_dstaddr;
25 	#define         ifa_broadaddr ifa_dstaddr
26 	void            *ifa_data;    /* Address-specific data */
27 };
28 
29 
30 int getifaddrs(struct ifaddrs **ifap);
31 void freeifaddrs(struct ifaddrs *ifa);
32 
33 
34 #ifdef __cplusplus
35 }
36 #endif
37 
38 
39 #endif
40 
41 
42 #endif
43