Elliott Hughes | 180edef | 2023-11-02 00:08:05 +0000 | [diff] [blame] | 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 | */ |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 7 | #ifndef __LINUX_IF_ADDR_H |
| 8 | #define __LINUX_IF_ADDR_H |
| 9 | #include <linux/types.h> |
| 10 | #include <linux/netlink.h> |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 11 | struct ifaddrmsg { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 12 | __u8 ifa_family; |
| 13 | __u8 ifa_prefixlen; |
| 14 | __u8 ifa_flags; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 15 | __u8 ifa_scope; |
| 16 | __u32 ifa_index; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 17 | }; |
| 18 | enum { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 19 | IFA_UNSPEC, |
| 20 | IFA_ADDRESS, |
| 21 | IFA_LOCAL, |
| 22 | IFA_LABEL, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 23 | IFA_BROADCAST, |
| 24 | IFA_ANYCAST, |
| 25 | IFA_CACHEINFO, |
| 26 | IFA_MULTICAST, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 27 | IFA_FLAGS, |
Christopher Ferris | 9ce2884 | 2018-10-25 12:11:39 -0700 | [diff] [blame] | 28 | IFA_RT_PRIORITY, |
Christopher Ferris | 86a4837 | 2019-01-10 14:14:59 -0800 | [diff] [blame] | 29 | IFA_TARGET_NETNSID, |
Christopher Ferris | 10a76e6 | 2022-06-08 13:31:52 -0700 | [diff] [blame] | 30 | IFA_PROTO, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 31 | __IFA_MAX, |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 32 | }; |
| 33 | #define IFA_MAX (__IFA_MAX - 1) |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 34 | #define IFA_F_SECONDARY 0x01 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 35 | #define IFA_F_TEMPORARY IFA_F_SECONDARY |
| 36 | #define IFA_F_NODAD 0x02 |
| 37 | #define IFA_F_OPTIMISTIC 0x04 |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 38 | #define IFA_F_DADFAILED 0x08 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 39 | #define IFA_F_HOMEADDRESS 0x10 |
| 40 | #define IFA_F_DEPRECATED 0x20 |
| 41 | #define IFA_F_TENTATIVE 0x40 |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 42 | #define IFA_F_PERMANENT 0x80 |
| 43 | #define IFA_F_MANAGETEMPADDR 0x100 |
| 44 | #define IFA_F_NOPREFIXROUTE 0x200 |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 45 | #define IFA_F_MCAUTOJOIN 0x400 |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 46 | #define IFA_F_STABLE_PRIVACY 0x800 |
| 47 | struct ifa_cacheinfo { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 48 | __u32 ifa_prefered; |
| 49 | __u32 ifa_valid; |
| 50 | __u32 cstamp; |
| 51 | __u32 tstamp; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 52 | }; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 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)) |
Christopher Ferris | 10a76e6 | 2022-06-08 13:31:52 -0700 | [diff] [blame] | 55 | #define IFAPROT_UNSPEC 0 |
| 56 | #define IFAPROT_KERNEL_LO 1 |
| 57 | #define IFAPROT_KERNEL_RA 2 |
| 58 | #define IFAPROT_KERNEL_LL 3 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 59 | #endif |