1 #ifndef _LXC_NETNS_IFADDRS_H
2 #define _LXC_NETNS_IFADDRS_H
9 #include <linux/if_link.h>
10 #include <linux/types.h>
11 #include <netinet/in.h>
13 #include <sys/socket.h>
15 #include "netns_ifaddrs.h"
17 struct netns_ifaddrs
{
18 struct netns_ifaddrs
*ifa_next
;
20 /* Can - but shouldn't be - NULL. */
23 /* This field is not present struct ifaddrs. */
28 /* This field is not present struct ifaddrs. */
31 /* This field is not present struct ifaddrs. */
34 struct sockaddr
*ifa_addr
;
35 struct sockaddr
*ifa_netmask
;
37 struct sockaddr
*ifu_broadaddr
;
38 struct sockaddr
*ifu_dstaddr
;
41 /* These fields are not present struct ifaddrs. */
43 #if HAVE_STRUCT_RTNL_LINK_STATS64
44 struct rtnl_link_stats64 ifa_stats
;
46 struct rtnl_link_stats ifa_stats
;
50 #define __ifa_broadaddr ifa_ifu.ifu_broadaddr
51 #define __ifa_dstaddr ifa_ifu.ifu_dstaddr
53 extern void netns_freeifaddrs(struct netns_ifaddrs
*);
54 extern int netns_getifaddrs(struct netns_ifaddrs
**ifap
, __s32 netns_id
,
61 #endif /* _LXC_NETNS_IFADDRS_H */