Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 1 | /**************************************************************************** |
| 2 | **************************************************************************** |
| 3 | *** |
| 4 | *** This header was automatically generated from a Linux kernel header |
| 5 | *** of the same name, to make information necessary for userspace to |
| 6 | *** call into the kernel available to libc. It contains only constants, |
| 7 | *** structures, and macros generated from the original header, and thus, |
| 8 | *** contains no copyrightable information. |
| 9 | *** |
| 10 | *** To edit the content of this header, modify the corresponding |
| 11 | *** source file (e.g. under external/kernel-headers/original/) then |
| 12 | *** run bionic/libc/kernel/tools/update_all.py |
| 13 | *** |
| 14 | *** Any manual change here will be lost the next time this script will |
| 15 | *** be run. You've been warned! |
| 16 | *** |
| 17 | **************************************************************************** |
| 18 | ****************************************************************************/ |
| 19 | #ifndef __LINUX_IF_ADDR_H |
| 20 | #define __LINUX_IF_ADDR_H |
| 21 | #include <linux/types.h> |
| 22 | #include <linux/netlink.h> |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 23 | struct ifaddrmsg { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 24 | __u8 ifa_family; |
| 25 | __u8 ifa_prefixlen; |
| 26 | __u8 ifa_flags; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 27 | __u8 ifa_scope; |
| 28 | __u32 ifa_index; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 29 | }; |
| 30 | enum { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 31 | IFA_UNSPEC, |
| 32 | IFA_ADDRESS, |
| 33 | IFA_LOCAL, |
| 34 | IFA_LABEL, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 35 | IFA_BROADCAST, |
| 36 | IFA_ANYCAST, |
| 37 | IFA_CACHEINFO, |
| 38 | IFA_MULTICAST, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 39 | IFA_FLAGS, |
Christopher Ferris | 9ce2884 | 2018-10-25 12:11:39 -0700 | [diff] [blame] | 40 | IFA_RT_PRIORITY, |
Christopher Ferris | 86a4837 | 2019-01-10 14:14:59 -0800 | [diff] [blame] | 41 | IFA_TARGET_NETNSID, |
Christopher Ferris | 10a76e6 | 2022-06-08 13:31:52 -0700 | [diff] [blame^] | 42 | IFA_PROTO, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 43 | __IFA_MAX, |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 44 | }; |
| 45 | #define IFA_MAX (__IFA_MAX - 1) |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 46 | #define IFA_F_SECONDARY 0x01 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 47 | #define IFA_F_TEMPORARY IFA_F_SECONDARY |
| 48 | #define IFA_F_NODAD 0x02 |
| 49 | #define IFA_F_OPTIMISTIC 0x04 |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 50 | #define IFA_F_DADFAILED 0x08 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 51 | #define IFA_F_HOMEADDRESS 0x10 |
| 52 | #define IFA_F_DEPRECATED 0x20 |
| 53 | #define IFA_F_TENTATIVE 0x40 |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 54 | #define IFA_F_PERMANENT 0x80 |
| 55 | #define IFA_F_MANAGETEMPADDR 0x100 |
| 56 | #define IFA_F_NOPREFIXROUTE 0x200 |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 57 | #define IFA_F_MCAUTOJOIN 0x400 |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 58 | #define IFA_F_STABLE_PRIVACY 0x800 |
| 59 | struct ifa_cacheinfo { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 60 | __u32 ifa_prefered; |
| 61 | __u32 ifa_valid; |
| 62 | __u32 cstamp; |
| 63 | __u32 tstamp; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 64 | }; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 65 | #define IFA_RTA(r) ((struct rtattr *) (((char *) (r)) + NLMSG_ALIGN(sizeof(struct ifaddrmsg)))) |
| 66 | #define IFA_PAYLOAD(n) NLMSG_PAYLOAD(n, sizeof(struct ifaddrmsg)) |
Christopher Ferris | 10a76e6 | 2022-06-08 13:31:52 -0700 | [diff] [blame^] | 67 | #define IFAPROT_UNSPEC 0 |
| 68 | #define IFAPROT_KERNEL_LO 1 |
| 69 | #define IFAPROT_KERNEL_RA 2 |
| 70 | #define IFAPROT_KERNEL_LL 3 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 71 | #endif |