Debian Codegraph @

psutil/arch/aix/ifaddrs.h

raw
1 /*
2 * Copyright (c) 2017, Arnon Yaari
3 * All rights reserved.
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8 /*! Based on code from
9 https://lists.samba.org/archive/samba-technical/2009-February/063079.html
10 !*/
11
12
13 #ifndef GENERIC_AIX_IFADDRS_H
14 #define GENERIC_AIX_IFADDRS_H
15
16 #include <sys/socket.h>
17 #include <net/if.h>
18
19 #undef ifa_dstaddr
20 #undef ifa_broadaddr
21 #define ifa_broadaddr ifa_dstaddr
22
23 struct ifaddrs {
24 struct ifaddrs *ifa_next;
25 char *ifa_name;
26 unsigned int ifa_flags;
27 struct sockaddr *ifa_addr;
28 struct sockaddr *ifa_netmask;
29 struct sockaddr *ifa_dstaddr;
30 };
31
32 extern int getifaddrs(struct ifaddrs **);
33 extern void freeifaddrs(struct ifaddrs *);
34 #endif