Lines Matching refs:dev
135 struct ndisc_options *ndisc_parse_options(const struct net_device *dev,
203 int (*parse_options)(const struct net_device *dev,
206 void (*update)(const struct net_device *dev, struct neighbour *n,
209 int (*opt_addr_space)(const struct net_device *dev, u8 icmp6_type,
212 void (*fill_addr_option)(const struct net_device *dev,
215 void (*prefix_rcv_add_addr)(struct net *net, struct net_device *dev,
226 static inline int ndisc_ops_is_useropt(const struct net_device *dev, in ndisc_ops_is_useropt() argument
229 if (dev->ndisc_ops && dev->ndisc_ops->is_useropt) in ndisc_ops_is_useropt()
230 return dev->ndisc_ops->is_useropt(nd_opt_type); in ndisc_ops_is_useropt()
235 static inline int ndisc_ops_parse_options(const struct net_device *dev, in ndisc_ops_parse_options() argument
239 if (dev->ndisc_ops && dev->ndisc_ops->parse_options) in ndisc_ops_parse_options()
240 return dev->ndisc_ops->parse_options(dev, nd_opt, ndopts); in ndisc_ops_parse_options()
245 static inline void ndisc_ops_update(const struct net_device *dev, in ndisc_ops_update() argument
250 if (dev->ndisc_ops && dev->ndisc_ops->update) in ndisc_ops_update()
251 dev->ndisc_ops->update(dev, n, flags, icmp6_type, ndopts); in ndisc_ops_update()
254 static inline int ndisc_ops_opt_addr_space(const struct net_device *dev, in ndisc_ops_opt_addr_space() argument
257 if (dev->ndisc_ops && dev->ndisc_ops->opt_addr_space && in ndisc_ops_opt_addr_space()
259 return dev->ndisc_ops->opt_addr_space(dev, icmp6_type, NULL, in ndisc_ops_opt_addr_space()
265 static inline int ndisc_ops_redirect_opt_addr_space(const struct net_device *dev, in ndisc_ops_redirect_opt_addr_space() argument
269 if (dev->ndisc_ops && dev->ndisc_ops->opt_addr_space) in ndisc_ops_redirect_opt_addr_space()
270 return dev->ndisc_ops->opt_addr_space(dev, NDISC_REDIRECT, in ndisc_ops_redirect_opt_addr_space()
276 static inline void ndisc_ops_fill_addr_option(const struct net_device *dev, in ndisc_ops_fill_addr_option() argument
280 if (dev->ndisc_ops && dev->ndisc_ops->fill_addr_option && in ndisc_ops_fill_addr_option()
282 dev->ndisc_ops->fill_addr_option(dev, skb, icmp6_type, NULL); in ndisc_ops_fill_addr_option()
285 static inline void ndisc_ops_fill_redirect_addr_option(const struct net_device *dev, in ndisc_ops_fill_redirect_addr_option() argument
289 if (dev->ndisc_ops && dev->ndisc_ops->fill_addr_option) in ndisc_ops_fill_redirect_addr_option()
290 dev->ndisc_ops->fill_addr_option(dev, skb, NDISC_REDIRECT, ha); in ndisc_ops_fill_redirect_addr_option()
294 struct net_device *dev, in ndisc_ops_prefix_rcv_add_addr() argument
304 if (dev->ndisc_ops && dev->ndisc_ops->prefix_rcv_add_addr) in ndisc_ops_prefix_rcv_add_addr()
305 dev->ndisc_ops->prefix_rcv_add_addr(net, dev, pinfo, in6_dev, in ndisc_ops_prefix_rcv_add_addr()
334 static inline int ndisc_opt_addr_space(struct net_device *dev, u8 icmp6_type) in ndisc_opt_addr_space() argument
336 return __ndisc_opt_addr_space(dev->addr_len, in ndisc_opt_addr_space()
337 ndisc_addr_option_pad(dev->type)) + in ndisc_opt_addr_space()
338 ndisc_ops_opt_addr_space(dev, icmp6_type); in ndisc_opt_addr_space()
341 static inline int ndisc_redirect_opt_addr_space(struct net_device *dev, in ndisc_redirect_opt_addr_space() argument
346 return __ndisc_opt_addr_space(dev->addr_len, in ndisc_redirect_opt_addr_space()
347 ndisc_addr_option_pad(dev->type)) + in ndisc_redirect_opt_addr_space()
348 ndisc_ops_redirect_opt_addr_space(dev, neigh, ops_data_buf, in ndisc_redirect_opt_addr_space()
364 struct net_device *dev) in ndisc_opt_addr_data() argument
366 return __ndisc_opt_addr_data(p, dev->addr_len, in ndisc_opt_addr_data()
367 ndisc_addr_option_pad(dev->type)); in ndisc_opt_addr_data()
370 static inline u32 ndisc_hashfn(const void *pkey, const struct net_device *dev, __u32 *hash_rnd) in ndisc_hashfn() argument
374 return (((p32[0] ^ hash32_ptr(dev)) * hash_rnd[0]) + in ndisc_hashfn()
380 static inline struct neighbour *__ipv6_neigh_lookup_noref(struct net_device *dev, const void *pkey) in __ipv6_neigh_lookup_noref() argument
382 return ___neigh_lookup_noref(&nd_tbl, neigh_key_eq128, ndisc_hashfn, pkey, dev); in __ipv6_neigh_lookup_noref()
386 struct neighbour *__ipv6_neigh_lookup_noref_stub(struct net_device *dev, in __ipv6_neigh_lookup_noref_stub() argument
390 ndisc_hashfn, pkey, dev); in __ipv6_neigh_lookup_noref_stub()
393 static inline struct neighbour *__ipv6_neigh_lookup(struct net_device *dev, const void *pkey) in __ipv6_neigh_lookup() argument
398 n = __ipv6_neigh_lookup_noref(dev, pkey); in __ipv6_neigh_lookup()
406 static inline void __ipv6_confirm_neigh(struct net_device *dev, in __ipv6_confirm_neigh() argument
412 n = __ipv6_neigh_lookup_noref(dev, pkey); in __ipv6_confirm_neigh()
423 static inline void __ipv6_confirm_neigh_stub(struct net_device *dev, in __ipv6_confirm_neigh_stub() argument
429 n = __ipv6_neigh_lookup_noref_stub(dev, pkey); in __ipv6_confirm_neigh_stub()
441 static inline struct neighbour *ip_neigh_gw6(struct net_device *dev, in ip_neigh_gw6() argument
446 neigh = __ipv6_neigh_lookup_noref_stub(dev, addr); in ip_neigh_gw6()
448 neigh = __neigh_create(ipv6_stub->nd_tbl, addr, dev, false); in ip_neigh_gw6()
461 void ndisc_send_ns(struct net_device *dev, const struct in6_addr *solicit,
465 void ndisc_send_rs(struct net_device *dev,
467 void ndisc_send_na(struct net_device *dev, const struct in6_addr *daddr,
473 int ndisc_mc_map(const struct in6_addr *addr, char *buf, struct net_device *dev,
476 void ndisc_update(const struct net_device *dev, struct neighbour *neigh,