1#ifndef __LINUX_NEIGHBOUR_H
2#define __LINUX_NEIGHBOUR_H
3
4#include <linux/types.h>
5#include <linux/netlink.h>
6
7struct ndmsg
8{
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{
20 NDA_UNSPEC,
21 NDA_DST,
22 NDA_LLADDR,
23 NDA_CACHEINFO,
24 NDA_PROBES,
25 __NDA_MAX
26};
27
28#define NDA_MAX (__NDA_MAX - 1)
29
30
31
32
33
34#define NTF_PROXY 0x08
35#define NTF_ROUTER 0x80
36
37
38
39
40
41#define NUD_INCOMPLETE 0x01
42#define NUD_REACHABLE 0x02
43#define NUD_STALE 0x04
44#define NUD_DELAY 0x08
45#define NUD_PROBE 0x10
46#define NUD_FAILED 0x20
47
48
49#define NUD_NOARP 0x40
50#define NUD_PERMANENT 0x80
51#define NUD_NONE 0x00
52
53
54
55
56
57
58struct nda_cacheinfo
59{
60 __u32 ndm_confirmed;
61 __u32 ndm_used;
62 __u32 ndm_updated;
63 __u32 ndm_refcnt;
64};
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91struct ndt_stats
92{
93 __u64 ndts_allocs;
94 __u64 ndts_destroys;
95 __u64 ndts_hash_grows;
96 __u64 ndts_res_failed;
97 __u64 ndts_lookups;
98 __u64 ndts_hits;
99 __u64 ndts_rcv_probes_mcast;
100 __u64 ndts_rcv_probes_ucast;
101 __u64 ndts_periodic_gc_runs;
102 __u64 ndts_forced_gc_runs;
103};
104
105enum {
106 NDTPA_UNSPEC,
107 NDTPA_IFINDEX,
108 NDTPA_REFCNT,
109 NDTPA_REACHABLE_TIME,
110 NDTPA_BASE_REACHABLE_TIME,
111 NDTPA_RETRANS_TIME,
112 NDTPA_GC_STALETIME,
113 NDTPA_DELAY_PROBE_TIME,
114 NDTPA_QUEUE_LEN,
115 NDTPA_APP_PROBES,
116 NDTPA_UCAST_PROBES,
117 NDTPA_MCAST_PROBES,
118 NDTPA_ANYCAST_DELAY,
119 NDTPA_PROXY_DELAY,
120 NDTPA_PROXY_QLEN,
121 NDTPA_LOCKTIME,
122 __NDTPA_MAX
123};
124#define NDTPA_MAX (__NDTPA_MAX - 1)
125
126struct ndtmsg
127{
128 __u8 ndtm_family;
129 __u8 ndtm_pad1;
130 __u16 ndtm_pad2;
131};
132
133struct ndt_config
134{
135 __u16 ndtc_key_len;
136 __u16 ndtc_entry_size;
137 __u32 ndtc_entries;
138 __u32 ndtc_last_flush;
139 __u32 ndtc_last_rand;
140 __u32 ndtc_hash_rnd;
141 __u32 ndtc_hash_mask;
142 __u32 ndtc_hash_chain_gc;
143 __u32 ndtc_proxy_qlen;
144};
145
146enum {
147 NDTA_UNSPEC,
148 NDTA_NAME,
149 NDTA_THRESH1,
150 NDTA_THRESH2,
151 NDTA_THRESH3,
152 NDTA_CONFIG,
153 NDTA_PARMS,
154 NDTA_STATS,
155 NDTA_GC_INTERVAL,
156 __NDTA_MAX
157};
158#define NDTA_MAX (__NDTA_MAX - 1)
159
160#endif
161