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_NEIGHBOUR_H |
| 20 | #define __LINUX_NEIGHBOUR_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 ndmsg { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 24 | __u8 ndm_family; |
| 25 | __u8 ndm_pad1; |
| 26 | __u16 ndm_pad2; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 27 | __s32 ndm_ifindex; |
| 28 | __u16 ndm_state; |
| 29 | __u8 ndm_flags; |
| 30 | __u8 ndm_type; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 31 | }; |
| 32 | enum { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 33 | NDA_UNSPEC, |
| 34 | NDA_DST, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 35 | NDA_LLADDR, |
| 36 | NDA_CACHEINFO, |
| 37 | NDA_PROBES, |
| 38 | NDA_VLAN, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 39 | NDA_PORT, |
| 40 | NDA_VNI, |
| 41 | NDA_IFINDEX, |
| 42 | NDA_MASTER, |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 43 | NDA_LINK_NETNSID, |
Christopher Ferris | 525ce91 | 2017-07-26 13:12:53 -0700 | [diff] [blame] | 44 | NDA_SRC_VNI, |
Christopher Ferris | d842e43 | 2019-03-07 10:21:59 -0800 | [diff] [blame] | 45 | NDA_PROTOCOL, |
Christopher Ferris | 8177cdf | 2020-08-03 11:53:55 -0700 | [diff] [blame] | 46 | NDA_NH_ID, |
Christopher Ferris | 25c18d4 | 2020-10-14 17:42:58 -0700 | [diff] [blame] | 47 | NDA_FDB_EXT_ATTRS, |
Christopher Ferris | a479261 | 2022-01-10 13:51:15 -0800 | [diff] [blame] | 48 | NDA_FLAGS_EXT, |
Christopher Ferris | 80ae69d | 2022-08-02 16:32:21 -0700 | [diff] [blame^] | 49 | NDA_NDM_STATE_MASK, |
| 50 | NDA_NDM_FLAGS_MASK, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 51 | __NDA_MAX |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 52 | }; |
| 53 | #define NDA_MAX (__NDA_MAX - 1) |
Christopher Ferris | a479261 | 2022-01-10 13:51:15 -0800 | [diff] [blame] | 54 | #define NTF_USE (1 << 0) |
| 55 | #define NTF_SELF (1 << 1) |
| 56 | #define NTF_MASTER (1 << 2) |
| 57 | #define NTF_PROXY (1 << 3) |
| 58 | #define NTF_EXT_LEARNED (1 << 4) |
| 59 | #define NTF_OFFLOADED (1 << 5) |
| 60 | #define NTF_STICKY (1 << 6) |
| 61 | #define NTF_ROUTER (1 << 7) |
| 62 | #define NTF_EXT_MANAGED (1 << 0) |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 63 | #define NUD_INCOMPLETE 0x01 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 64 | #define NUD_REACHABLE 0x02 |
| 65 | #define NUD_STALE 0x04 |
| 66 | #define NUD_DELAY 0x08 |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 67 | #define NUD_PROBE 0x10 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 68 | #define NUD_FAILED 0x20 |
| 69 | #define NUD_NOARP 0x40 |
| 70 | #define NUD_PERMANENT 0x80 |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 71 | #define NUD_NONE 0x00 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 72 | struct nda_cacheinfo { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 73 | __u32 ndm_confirmed; |
| 74 | __u32 ndm_used; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 75 | __u32 ndm_updated; |
| 76 | __u32 ndm_refcnt; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 77 | }; |
| 78 | struct ndt_stats { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 79 | __u64 ndts_allocs; |
| 80 | __u64 ndts_destroys; |
| 81 | __u64 ndts_hash_grows; |
| 82 | __u64 ndts_res_failed; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 83 | __u64 ndts_lookups; |
| 84 | __u64 ndts_hits; |
| 85 | __u64 ndts_rcv_probes_mcast; |
| 86 | __u64 ndts_rcv_probes_ucast; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 87 | __u64 ndts_periodic_gc_runs; |
| 88 | __u64 ndts_forced_gc_runs; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 89 | __u64 ndts_table_fulls; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 90 | }; |
| 91 | enum { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 92 | NDTPA_UNSPEC, |
| 93 | NDTPA_IFINDEX, |
| 94 | NDTPA_REFCNT, |
| 95 | NDTPA_REACHABLE_TIME, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 96 | NDTPA_BASE_REACHABLE_TIME, |
| 97 | NDTPA_RETRANS_TIME, |
| 98 | NDTPA_GC_STALETIME, |
| 99 | NDTPA_DELAY_PROBE_TIME, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 100 | NDTPA_QUEUE_LEN, |
| 101 | NDTPA_APP_PROBES, |
| 102 | NDTPA_UCAST_PROBES, |
| 103 | NDTPA_MCAST_PROBES, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 104 | NDTPA_ANYCAST_DELAY, |
| 105 | NDTPA_PROXY_DELAY, |
| 106 | NDTPA_PROXY_QLEN, |
| 107 | NDTPA_LOCKTIME, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 108 | NDTPA_QUEUE_LENBYTES, |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 109 | NDTPA_MCAST_REPROBES, |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 110 | NDTPA_PAD, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 111 | __NDTPA_MAX |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 112 | }; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 113 | #define NDTPA_MAX (__NDTPA_MAX - 1) |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 114 | struct ndtmsg { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 115 | __u8 ndtm_family; |
| 116 | __u8 ndtm_pad1; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 117 | __u16 ndtm_pad2; |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 118 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 119 | struct ndt_config { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 120 | __u16 ndtc_key_len; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 121 | __u16 ndtc_entry_size; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 122 | __u32 ndtc_entries; |
| 123 | __u32 ndtc_last_flush; |
| 124 | __u32 ndtc_last_rand; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 125 | __u32 ndtc_hash_rnd; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 126 | __u32 ndtc_hash_mask; |
| 127 | __u32 ndtc_hash_chain_gc; |
| 128 | __u32 ndtc_proxy_qlen; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 129 | }; |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 130 | enum { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 131 | NDTA_UNSPEC, |
| 132 | NDTA_NAME, |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 133 | NDTA_THRESH1, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 134 | NDTA_THRESH2, |
| 135 | NDTA_THRESH3, |
| 136 | NDTA_CONFIG, |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 137 | NDTA_PARMS, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 138 | NDTA_STATS, |
| 139 | NDTA_GC_INTERVAL, |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 140 | NDTA_PAD, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 141 | __NDTA_MAX |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 142 | }; |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 143 | #define NDTA_MAX (__NDTA_MAX - 1) |
Christopher Ferris | 25c18d4 | 2020-10-14 17:42:58 -0700 | [diff] [blame] | 144 | enum { |
| 145 | FDB_NOTIFY_BIT = (1 << 0), |
| 146 | FDB_NOTIFY_INACTIVE_BIT = (1 << 1) |
| 147 | }; |
| 148 | enum { |
| 149 | NFEA_UNSPEC, |
| 150 | NFEA_ACTIVITY_NOTIFY, |
| 151 | NFEA_DONT_REFRESH, |
| 152 | __NFEA_MAX |
| 153 | }; |
| 154 | #define NFEA_MAX (__NFEA_MAX - 1) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 155 | #endif |