vfs: check userland buffers before reading them.
[haiku.git] / headers / compatibility / bsd / ifaddrs.h
blob2716a709f6ce15152b86d6bfbb0248562d9e631c
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
9 #ifdef _BSD_SOURCE
12 #ifdef __cplusplus
13 extern "C" {
14 #endif
17 struct ifaddrs {
18 struct ifaddrs *ifa_next; /* Next item in list */
19 const char *ifa_name; /* Name of interface */
20 unsigned int ifa_flags; /* Flags from SIOCGIFFLAGS */
21 struct sockaddr *ifa_addr; /* Address of interface */
22 struct sockaddr *ifa_netmask; /* Netmask of interface */
23 struct sockaddr *ifa_dstaddr;
24 #define ifa_broadaddr ifa_dstaddr
25 void *ifa_data; /* Address-specific data */
29 int getifaddrs(struct ifaddrs **ifap);
30 void freeifaddrs(struct ifaddrs *ifa);
33 #ifdef __cplusplus
35 #endif
38 #endif
41 #endif