1
2#ifndef __LINUX_NEIGHBOUR_H
3#define __LINUX_NEIGHBOUR_H
4
5#include <linux/types.h>
6#include <linux/netlink.h>
7
8struct ndmsg {
9 __u8 ndm_family;
10 __u8 ndm_pad1;
11 __u16 ndm_pad2;
12 __s32 ndm_ifindex;
13 __u16 ndm_state;
14 __u8 ndm_flags;
15 __u8 ndm_type;
16};
17
18enum {
19 NDA_UNSPEC,
20 NDA_DST,
21 NDA_LLADDR,
22 NDA_CACHEINFO,
23 NDA_PROBES,
24 NDA_VLAN,
25 NDA_PORT,
26 NDA_VNI,
27 NDA_IFINDEX,
28 NDA_MASTER,
29 NDA_LINK_NETNSID,
30 NDA_SRC_VNI,
31 NDA_PROTOCOL,
32 NDA_NH_ID,
33 NDA_FDB_EXT_ATTRS,
34 NDA_FLAGS_EXT,
35 NDA_NDM_STATE_MASK,
36 NDA_NDM_FLAGS_MASK,
37 __NDA_MAX
38};
39
40#define NDA_MAX (__NDA_MAX - 1)
41
42
43
44
45
46#define NTF_USE (1 << 0)
47#define NTF_SELF (1 << 1)
48#define NTF_MASTER (1 << 2)
49#define NTF_PROXY (1 << 3)
50#define NTF_EXT_LEARNED (1 << 4)
51#define NTF_OFFLOADED (1 << 5)
52#define NTF_STICKY (1 << 6)
53#define NTF_ROUTER (1 << 7)
54
55#define NTF_EXT_MANAGED (1 << 0)
56
57
58
59
60
61#define NUD_INCOMPLETE 0x01
62#define NUD_REACHABLE 0x02
63#define NUD_STALE 0x04
64#define NUD_DELAY 0x08
65#define NUD_PROBE 0x10
66#define NUD_FAILED 0x20
67
68
69#define NUD_NOARP 0x40
70#define NUD_PERMANENT 0x80
71#define NUD_NONE 0x00
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91struct nda_cacheinfo {
92 __u32 ndm_confirmed;
93 __u32 ndm_used;
94 __u32 ndm_updated;
95 __u32 ndm_refcnt;
96};
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123struct ndt_stats {
124 __u64 ndts_allocs;
125 __u64 ndts_destroys;
126 __u64 ndts_hash_grows;
127 __u64 ndts_res_failed;
128 __u64 ndts_lookups;
129 __u64 ndts_hits;
130 __u64 ndts_rcv_probes_mcast;
131 __u64 ndts_rcv_probes_ucast;
132 __u64 ndts_periodic_gc_runs;
133 __u64 ndts_forced_gc_runs;
134 __u64 ndts_table_fulls;
135};
136
137enum {
138 NDTPA_UNSPEC,
139 NDTPA_IFINDEX,
140 NDTPA_REFCNT,
141 NDTPA_REACHABLE_TIME,
142 NDTPA_BASE_REACHABLE_TIME,
143 NDTPA_RETRANS_TIME,
144 NDTPA_GC_STALETIME,
145 NDTPA_DELAY_PROBE_TIME,
146 NDTPA_QUEUE_LEN,
147 NDTPA_APP_PROBES,
148 NDTPA_UCAST_PROBES,
149 NDTPA_MCAST_PROBES,
150 NDTPA_ANYCAST_DELAY,
151 NDTPA_PROXY_DELAY,
152 NDTPA_PROXY_QLEN,
153 NDTPA_LOCKTIME,
154 NDTPA_QUEUE_LENBYTES,
155 NDTPA_MCAST_REPROBES,
156 NDTPA_PAD,
157 __NDTPA_MAX
158};
159#define NDTPA_MAX (__NDTPA_MAX - 1)
160
161struct ndtmsg {
162 __u8 ndtm_family;
163 __u8 ndtm_pad1;
164 __u16 ndtm_pad2;
165};
166
167struct ndt_config {
168 __u16 ndtc_key_len;
169 __u16 ndtc_entry_size;
170 __u32 ndtc_entries;
171 __u32 ndtc_last_flush;
172 __u32 ndtc_last_rand;
173 __u32 ndtc_hash_rnd;
174 __u32 ndtc_hash_mask;
175 __u32 ndtc_hash_chain_gc;
176 __u32 ndtc_proxy_qlen;
177};
178
179enum {
180 NDTA_UNSPEC,
181 NDTA_NAME,
182 NDTA_THRESH1,
183 NDTA_THRESH2,
184 NDTA_THRESH3,
185 NDTA_CONFIG,
186 NDTA_PARMS,
187 NDTA_STATS,
188 NDTA_GC_INTERVAL,
189 NDTA_PAD,
190 __NDTA_MAX
191};
192#define NDTA_MAX (__NDTA_MAX - 1)
193
194
195
196
197
198enum {
199 FDB_NOTIFY_BIT = (1 << 0),
200 FDB_NOTIFY_INACTIVE_BIT = (1 << 1)
201};
202
203
204
205
206
207
208
209enum {
210 NFEA_UNSPEC,
211 NFEA_ACTIVITY_NOTIFY,
212 NFEA_DONT_REFRESH,
213 __NFEA_MAX
214};
215#define NFEA_MAX (__NFEA_MAX - 1)
216
217#endif
218