• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * This file is auto-generated. Modifications will be lost.
3  *
4  * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/
5  * for more information.
6  */
7 #ifndef __LINUX_IF_ADDR_H
8 #define __LINUX_IF_ADDR_H
9 #include <linux/types.h>
10 #include <linux/netlink.h>
11 struct ifaddrmsg {
12   __u8 ifa_family;
13   __u8 ifa_prefixlen;
14   __u8 ifa_flags;
15   __u8 ifa_scope;
16   __u32 ifa_index;
17 };
18 enum {
19   IFA_UNSPEC,
20   IFA_ADDRESS,
21   IFA_LOCAL,
22   IFA_LABEL,
23   IFA_BROADCAST,
24   IFA_ANYCAST,
25   IFA_CACHEINFO,
26   IFA_MULTICAST,
27   IFA_FLAGS,
28   IFA_RT_PRIORITY,
29   IFA_TARGET_NETNSID,
30   IFA_PROTO,
31   __IFA_MAX,
32 };
33 #define IFA_MAX (__IFA_MAX - 1)
34 #define IFA_F_SECONDARY 0x01
35 #define IFA_F_TEMPORARY IFA_F_SECONDARY
36 #define IFA_F_NODAD 0x02
37 #define IFA_F_OPTIMISTIC 0x04
38 #define IFA_F_DADFAILED 0x08
39 #define IFA_F_HOMEADDRESS 0x10
40 #define IFA_F_DEPRECATED 0x20
41 #define IFA_F_TENTATIVE 0x40
42 #define IFA_F_PERMANENT 0x80
43 #define IFA_F_MANAGETEMPADDR 0x100
44 #define IFA_F_NOPREFIXROUTE 0x200
45 #define IFA_F_MCAUTOJOIN 0x400
46 #define IFA_F_STABLE_PRIVACY 0x800
47 struct ifa_cacheinfo {
48   __u32 ifa_prefered;
49   __u32 ifa_valid;
50   __u32 cstamp;
51   __u32 tstamp;
52 };
53 #define IFA_RTA(r) ((struct rtattr *) (((char *) (r)) + NLMSG_ALIGN(sizeof(struct ifaddrmsg))))
54 #define IFA_PAYLOAD(n) NLMSG_PAYLOAD(n, sizeof(struct ifaddrmsg))
55 #define IFAPROT_UNSPEC 0
56 #define IFAPROT_KERNEL_LO 1
57 #define IFAPROT_KERNEL_RA 2
58 #define IFAPROT_KERNEL_LL 3
59 #endif
60