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 9 struct ifaddrs { 10 struct ifaddrs *ifa_next; /* Next item in list */ 11 const char *ifa_name; /* Name of interface */ 12 unsigned int ifa_flags; /* Flags from SIOCGIFFLAGS */ 13 struct sockaddr *ifa_addr; /* Address of interface */ 14 struct sockaddr *ifa_netmask; /* Netmask of interface */ 15 struct sockaddr *ifa_dstaddr; 16 #define ifa_broadaddr ifa_dstaddr 17 void *ifa_data; /* Address-specific data */ 18 }; 19 20 21 int getifaddrs(struct ifaddrs **ifap); 22 void freeifaddrs(struct ifaddrs *ifa); 23 24 25 #endif 26