Lines Matching refs:dev
136 struct ndisc_options *ndisc_parse_options(const struct net_device *dev,
204 int (*parse_options)(const struct net_device *dev,
207 void (*update)(const struct net_device *dev, struct neighbour *n,
210 int (*opt_addr_space)(const struct net_device *dev, u8 icmp6_type,
213 void (*fill_addr_option)(const struct net_device *dev,
216 void (*prefix_rcv_add_addr)(struct net *net, struct net_device *dev,
227 static inline int ndisc_ops_is_useropt(const struct net_device *dev, in ndisc_ops_is_useropt() argument
230 if (dev->ndisc_ops && dev->ndisc_ops->is_useropt) in ndisc_ops_is_useropt()
231 return dev->ndisc_ops->is_useropt(nd_opt_type); in ndisc_ops_is_useropt()
236 static inline int ndisc_ops_parse_options(const struct net_device *dev, in ndisc_ops_parse_options() argument
240 if (dev->ndisc_ops && dev->ndisc_ops->parse_options) in ndisc_ops_parse_options()
241 return dev->ndisc_ops->parse_options(dev, nd_opt, ndopts); in ndisc_ops_parse_options()
246 static inline void ndisc_ops_update(const struct net_device *dev, in ndisc_ops_update() argument
251 if (dev->ndisc_ops && dev->ndisc_ops->update) in ndisc_ops_update()
252 dev->ndisc_ops->update(dev, n, flags, icmp6_type, ndopts); in ndisc_ops_update()
255 static inline int ndisc_ops_opt_addr_space(const struct net_device *dev, in ndisc_ops_opt_addr_space() argument
258 if (dev->ndisc_ops && dev->ndisc_ops->opt_addr_space && in ndisc_ops_opt_addr_space()
260 return dev->ndisc_ops->opt_addr_space(dev, icmp6_type, NULL, in ndisc_ops_opt_addr_space()
266 static inline int ndisc_ops_redirect_opt_addr_space(const struct net_device *dev, in ndisc_ops_redirect_opt_addr_space() argument
270 if (dev->ndisc_ops && dev->ndisc_ops->opt_addr_space) in ndisc_ops_redirect_opt_addr_space()
271 return dev->ndisc_ops->opt_addr_space(dev, NDISC_REDIRECT, in ndisc_ops_redirect_opt_addr_space()
277 static inline void ndisc_ops_fill_addr_option(const struct net_device *dev, in ndisc_ops_fill_addr_option() argument
281 if (dev->ndisc_ops && dev->ndisc_ops->fill_addr_option && in ndisc_ops_fill_addr_option()
283 dev->ndisc_ops->fill_addr_option(dev, skb, icmp6_type, NULL); in ndisc_ops_fill_addr_option()
286 static inline void ndisc_ops_fill_redirect_addr_option(const struct net_device *dev, in ndisc_ops_fill_redirect_addr_option() argument
290 if (dev->ndisc_ops && dev->ndisc_ops->fill_addr_option) in ndisc_ops_fill_redirect_addr_option()
291 dev->ndisc_ops->fill_addr_option(dev, skb, NDISC_REDIRECT, ha); in ndisc_ops_fill_redirect_addr_option()
295 struct net_device *dev, in ndisc_ops_prefix_rcv_add_addr() argument
305 if (dev->ndisc_ops && dev->ndisc_ops->prefix_rcv_add_addr) in ndisc_ops_prefix_rcv_add_addr()
306 dev->ndisc_ops->prefix_rcv_add_addr(net, dev, pinfo, in6_dev, in ndisc_ops_prefix_rcv_add_addr()
335 static inline int ndisc_opt_addr_space(struct net_device *dev, u8 icmp6_type) in ndisc_opt_addr_space() argument
337 return __ndisc_opt_addr_space(dev->addr_len, in ndisc_opt_addr_space()
338 ndisc_addr_option_pad(dev->type)) + in ndisc_opt_addr_space()
339 ndisc_ops_opt_addr_space(dev, icmp6_type); in ndisc_opt_addr_space()
342 static inline int ndisc_redirect_opt_addr_space(struct net_device *dev, in ndisc_redirect_opt_addr_space() argument
347 return __ndisc_opt_addr_space(dev->addr_len, in ndisc_redirect_opt_addr_space()
348 ndisc_addr_option_pad(dev->type)) + in ndisc_redirect_opt_addr_space()
349 ndisc_ops_redirect_opt_addr_space(dev, neigh, ops_data_buf, in ndisc_redirect_opt_addr_space()
365 struct net_device *dev) in ndisc_opt_addr_data() argument
367 return __ndisc_opt_addr_data(p, dev->addr_len, in ndisc_opt_addr_data()
368 ndisc_addr_option_pad(dev->type)); in ndisc_opt_addr_data()
371 static inline u32 ndisc_hashfn(const void *pkey, const struct net_device *dev, __u32 *hash_rnd) in ndisc_hashfn() argument
375 return (((p32[0] ^ hash32_ptr(dev)) * hash_rnd[0]) + in ndisc_hashfn()
381 static inline struct neighbour *__ipv6_neigh_lookup_noref(struct net_device *dev, const void *pkey) in __ipv6_neigh_lookup_noref() argument
383 return ___neigh_lookup_noref(&nd_tbl, neigh_key_eq128, ndisc_hashfn, pkey, dev); in __ipv6_neigh_lookup_noref()
387 struct neighbour *__ipv6_neigh_lookup_noref_stub(struct net_device *dev, in __ipv6_neigh_lookup_noref_stub() argument
391 ndisc_hashfn, pkey, dev); in __ipv6_neigh_lookup_noref_stub()
394 static inline struct neighbour *__ipv6_neigh_lookup(struct net_device *dev, const void *pkey) in __ipv6_neigh_lookup() argument
399 n = __ipv6_neigh_lookup_noref(dev, pkey); in __ipv6_neigh_lookup()
407 static inline void __ipv6_confirm_neigh(struct net_device *dev, in __ipv6_confirm_neigh() argument
413 n = __ipv6_neigh_lookup_noref(dev, pkey); in __ipv6_confirm_neigh()
418 static inline void __ipv6_confirm_neigh_stub(struct net_device *dev, in __ipv6_confirm_neigh_stub() argument
424 n = __ipv6_neigh_lookup_noref_stub(dev, pkey); in __ipv6_confirm_neigh_stub()
430 static inline struct neighbour *ip_neigh_gw6(struct net_device *dev, in ip_neigh_gw6() argument
435 neigh = __ipv6_neigh_lookup_noref_stub(dev, addr); in ip_neigh_gw6()
437 neigh = __neigh_create(ipv6_stub->nd_tbl, addr, dev, false); in ip_neigh_gw6()
450 struct sk_buff *ndisc_ns_create(struct net_device *dev, const struct in6_addr *solicit,
452 void ndisc_send_ns(struct net_device *dev, const struct in6_addr *solicit,
459 void ndisc_send_rs(struct net_device *dev,
461 void ndisc_send_na(struct net_device *dev, const struct in6_addr *daddr,
467 int ndisc_mc_map(const struct in6_addr *addr, char *buf, struct net_device *dev,
470 void ndisc_update(const struct net_device *dev, struct neighbour *neigh,