ifaddrs.h revision e2fc7cd3
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
9struct 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
21int getifaddrs(struct ifaddrs **ifap);
22void freeifaddrs(struct ifaddrs *ifa);
23
24
25#endif
26