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