equal
deleted
inserted
replaced
178 struct neighbour **hash_buckets; |
178 struct neighbour **hash_buckets; |
179 unsigned int hash_mask; |
179 unsigned int hash_mask; |
180 __u32 hash_rnd; |
180 __u32 hash_rnd; |
181 unsigned int hash_chain_gc; |
181 unsigned int hash_chain_gc; |
182 struct pneigh_entry **phash_buckets; |
182 struct pneigh_entry **phash_buckets; |
183 #ifdef CONFIG_PROC_FS |
|
184 struct proc_dir_entry *pde; |
|
185 #endif |
|
186 }; |
183 }; |
187 |
184 |
188 /* flags for neigh_update() */ |
185 /* flags for neigh_update() */ |
189 #define NEIGH_UPDATE_F_OVERRIDE 0x00000001 |
186 #define NEIGH_UPDATE_F_OVERRIDE 0x00000001 |
190 #define NEIGH_UPDATE_F_WEAK_OVERRIDE 0x00000002 |
187 #define NEIGH_UPDATE_F_WEAK_OVERRIDE 0x00000002 |
221 extern void neigh_parms_release(struct neigh_table *tbl, struct neigh_parms *parms); |
218 extern void neigh_parms_release(struct neigh_table *tbl, struct neigh_parms *parms); |
222 |
219 |
223 static inline |
220 static inline |
224 struct net *neigh_parms_net(const struct neigh_parms *parms) |
221 struct net *neigh_parms_net(const struct neigh_parms *parms) |
225 { |
222 { |
226 #ifdef CONFIG_NET_NS |
223 return read_pnet(&parms->net); |
227 return parms->net; |
|
228 #else |
|
229 return &init_net; |
|
230 #endif |
|
231 } |
224 } |
232 |
225 |
233 extern unsigned long neigh_rand_reach_time(unsigned long base); |
226 extern unsigned long neigh_rand_reach_time(unsigned long base); |
234 |
227 |
235 extern void pneigh_enqueue(struct neigh_table *tbl, struct neigh_parms *p, |
228 extern void pneigh_enqueue(struct neigh_table *tbl, struct neigh_parms *p, |
242 extern int pneigh_delete(struct neigh_table *tbl, struct net *net, const void *key, struct net_device *dev); |
235 extern int pneigh_delete(struct neigh_table *tbl, struct net *net, const void *key, struct net_device *dev); |
243 |
236 |
244 static inline |
237 static inline |
245 struct net *pneigh_net(const struct pneigh_entry *pneigh) |
238 struct net *pneigh_net(const struct pneigh_entry *pneigh) |
246 { |
239 { |
247 #ifdef CONFIG_NET_NS |
240 return read_pnet(&pneigh->net); |
248 return pneigh->net; |
|
249 #else |
|
250 return &init_net; |
|
251 #endif |
|
252 } |
241 } |
253 |
242 |
254 extern void neigh_app_ns(struct neighbour *n); |
243 extern void neigh_app_ns(struct neighbour *n); |
255 extern void neigh_for_each(struct neigh_table *tbl, void (*cb)(struct neighbour *, void *), void *cookie); |
244 extern void neigh_for_each(struct neigh_table *tbl, void (*cb)(struct neighbour *, void *), void *cookie); |
256 extern void __neigh_for_each_release(struct neigh_table *tbl, int (*cb)(struct neighbour *)); |
245 extern void __neigh_for_each_release(struct neigh_table *tbl, int (*cb)(struct neighbour *)); |