• Home
  • Raw
  • Download

Lines Matching refs:neigh

94 static int ndisc_constructor(struct neighbour *neigh);
95 static void ndisc_solicit(struct neighbour *neigh, struct sk_buff *skb);
96 static void ndisc_error_report(struct neighbour *neigh, struct sk_buff *skb);
364 static int ndisc_constructor(struct neighbour *neigh) in ndisc_constructor() argument
366 struct in6_addr *addr = (struct in6_addr*)&neigh->primary_key; in ndisc_constructor()
367 struct net_device *dev = neigh->dev; in ndisc_constructor()
380 __neigh_parms_put(neigh->parms); in ndisc_constructor()
381 neigh->parms = neigh_parms_clone(parms); in ndisc_constructor()
384 neigh->type = is_multicast ? RTN_MULTICAST : RTN_UNICAST; in ndisc_constructor()
386 neigh->nud_state = NUD_NOARP; in ndisc_constructor()
387 neigh->ops = &ndisc_direct_ops; in ndisc_constructor()
388 neigh->output = neigh->ops->queue_xmit; in ndisc_constructor()
391 neigh->nud_state = NUD_NOARP; in ndisc_constructor()
392 ndisc_mc_map(addr, neigh->ha, dev, 1); in ndisc_constructor()
394 neigh->nud_state = NUD_NOARP; in ndisc_constructor()
395 memcpy(neigh->ha, dev->dev_addr, dev->addr_len); in ndisc_constructor()
397 neigh->type = RTN_LOCAL; in ndisc_constructor()
399 neigh->nud_state = NUD_NOARP; in ndisc_constructor()
400 memcpy(neigh->ha, dev->broadcast, dev->addr_len); in ndisc_constructor()
403 neigh->ops = &ndisc_hh_ops; in ndisc_constructor()
405 neigh->ops = &ndisc_generic_ops; in ndisc_constructor()
406 if (neigh->nud_state&NUD_VALID) in ndisc_constructor()
407 neigh->output = neigh->ops->connected_output; in ndisc_constructor()
409 neigh->output = neigh->ops->output; in ndisc_constructor()
504 struct neighbour *neigh, in ndisc_send_skb() argument
521 dst = icmp6_dst_alloc(dev, neigh, daddr); in ndisc_send_skb()
555 struct neighbour *neigh, in __ndisc_send() argument
567 ndisc_send_skb(skb, dev, neigh, daddr, saddr, icmp6h); in __ndisc_send()
570 static void ndisc_send_na(struct net_device *dev, struct neighbour *neigh, in ndisc_send_na() argument
601 __ndisc_send(dev, neigh, daddr, src_addr, in ndisc_send_na()
606 void ndisc_send_ns(struct net_device *dev, struct neighbour *neigh, in ndisc_send_ns() argument
622 __ndisc_send(dev, neigh, daddr, saddr, in ndisc_send_ns()
663 static void ndisc_error_report(struct neighbour *neigh, struct sk_buff *skb) in ndisc_error_report() argument
675 static void ndisc_solicit(struct neighbour *neigh, struct sk_buff *skb) in ndisc_solicit() argument
679 struct net_device *dev = neigh->dev; in ndisc_solicit()
680 struct in6_addr *target = (struct in6_addr *)&neigh->primary_key; in ndisc_solicit()
681 int probes = atomic_read(&neigh->probes); in ndisc_solicit()
686 if ((probes -= neigh->parms->ucast_probes) < 0) { in ndisc_solicit()
687 if (!(neigh->nud_state & NUD_VALID)) { in ndisc_solicit()
691 ndisc_send_ns(dev, neigh, target, target, saddr); in ndisc_solicit()
692 } else if ((probes -= neigh->parms->app_probes) < 0) { in ndisc_solicit()
694 neigh_app_ns(neigh); in ndisc_solicit()
729 struct neighbour *neigh; in ndisc_recv_ns() local
872 neigh = __neigh_lookup(&nd_tbl, saddr, dev, in ndisc_recv_ns()
874 if (neigh) in ndisc_recv_ns()
875 neigh_update(neigh, lladdr, NUD_STALE, in ndisc_recv_ns()
878 if (neigh || !dev->header_ops) { in ndisc_recv_ns()
879 ndisc_send_na(dev, neigh, saddr, &msg->target, in ndisc_recv_ns()
882 if (neigh) in ndisc_recv_ns()
883 neigh_release(neigh); in ndisc_recv_ns()
906 struct neighbour *neigh; in ndisc_recv_na() local
962 neigh = neigh_lookup(&nd_tbl, &msg->target, dev); in ndisc_recv_na()
964 if (neigh) { in ndisc_recv_na()
965 u8 old_flags = neigh->flags; in ndisc_recv_na()
968 if (neigh->nud_state & NUD_FAILED) in ndisc_recv_na()
983 neigh_update(neigh, lladdr, in ndisc_recv_na()
990 if ((old_flags & ~neigh->flags) & NTF_ROUTER) { in ndisc_recv_na()
1001 neigh_release(neigh); in ndisc_recv_na()
1009 struct neighbour *neigh; in ndisc_recv_rs() local
1050 neigh = __neigh_lookup(&nd_tbl, saddr, skb->dev, 1); in ndisc_recv_rs()
1051 if (neigh) { in ndisc_recv_rs()
1052 neigh_update(neigh, lladdr, NUD_STALE, in ndisc_recv_rs()
1056 neigh_release(neigh); in ndisc_recv_rs()
1115 struct neighbour *neigh = NULL; in ndisc_router_discovery() local
1210 neigh = rt->rt6i_nexthop; in ndisc_router_discovery()
1213 neigh_clone(neigh); in ndisc_router_discovery()
1231 neigh = rt->rt6i_nexthop; in ndisc_router_discovery()
1232 if (neigh == NULL) { in ndisc_router_discovery()
1240 neigh->flags |= NTF_ROUTER; in ndisc_router_discovery()
1297 if (!neigh) in ndisc_router_discovery()
1298 neigh = __neigh_lookup(&nd_tbl, &ipv6_hdr(skb)->saddr, in ndisc_router_discovery()
1300 if (neigh) { in ndisc_router_discovery()
1311 neigh_update(neigh, lladdr, NUD_STALE, in ndisc_router_discovery()
1390 else if (neigh) in ndisc_router_discovery()
1391 neigh_release(neigh); in ndisc_router_discovery()
1401 struct neighbour *neigh; in ndisc_redirect_rcv() local
1481 neigh = __neigh_lookup(&nd_tbl, target, skb->dev, 1); in ndisc_redirect_rcv()
1482 if (neigh) { in ndisc_redirect_rcv()
1484 &ipv6_hdr(skb)->saddr, neigh, lladdr, in ndisc_redirect_rcv()
1486 neigh_release(neigh); in ndisc_redirect_rcv()
1491 void ndisc_send_redirect(struct sk_buff *skb, struct neighbour *neigh, in ndisc_send_redirect() argument
1550 read_lock_bh(&neigh->lock); in ndisc_send_redirect()
1551 if (neigh->nud_state & NUD_VALID) { in ndisc_send_redirect()
1552 memcpy(ha_buf, neigh->ha, dev->addr_len); in ndisc_send_redirect()
1553 read_unlock_bh(&neigh->lock); in ndisc_send_redirect()
1557 read_unlock_bh(&neigh->lock); in ndisc_send_redirect()