• Home
  • Raw
  • Download

Lines Matching refs:neigh

129 static int dn_neigh_construct(struct neighbour *neigh)  in dn_neigh_construct()  argument
131 struct net_device *dev = neigh->dev; in dn_neigh_construct()
132 struct dn_neigh *dn = (struct dn_neigh *)neigh; in dn_neigh_construct()
149 __neigh_parms_put(neigh->parms); in dn_neigh_construct()
150 neigh->parms = neigh_parms_clone(parms); in dn_neigh_construct()
153 neigh->ops = &dn_long_ops; in dn_neigh_construct()
155 neigh->ops = &dn_short_ops; in dn_neigh_construct()
159 neigh->ops = &dn_phase3_ops; in dn_neigh_construct()
161 neigh->nud_state = NUD_NOARP; in dn_neigh_construct()
162 neigh->output = neigh->ops->connected_output; in dn_neigh_construct()
165 memcpy(neigh->ha, dev->broadcast, dev->addr_len); in dn_neigh_construct()
167 dn_dn2eth(neigh->ha, dn->addr); in dn_neigh_construct()
192 static void dn_long_error_report(struct neighbour *neigh, struct sk_buff *skb) in dn_long_error_report() argument
199 static void dn_short_error_report(struct neighbour *neigh, struct sk_buff *skb) in dn_short_error_report() argument
209 struct neighbour *neigh = dst->neighbour; in dn_neigh_output_packet() local
210 struct net_device *dev = neigh->dev; in dn_neigh_output_packet()
214 if (dev_hard_header(skb, dev, ntohs(skb->protocol), neigh->ha, in dn_neigh_output_packet()
216 return neigh->ops->queue_xmit(skb); in dn_neigh_output_packet()
228 struct neighbour *neigh = dst->neighbour; in dn_long_output() local
229 struct net_device *dev = neigh->dev; in dn_long_output()
268 return NF_HOOK(PF_DECnet, NF_DN_POST_ROUTING, skb, NULL, neigh->dev, dn_neigh_output_packet); in dn_long_output()
274 struct neighbour *neigh = dst->neighbour; in dn_short_output() local
275 struct net_device *dev = neigh->dev; in dn_short_output()
307 return NF_HOOK(PF_DECnet, NF_DN_POST_ROUTING, skb, NULL, neigh->dev, dn_neigh_output_packet); in dn_short_output()
317 struct neighbour *neigh = dst->neighbour; in dn_phase3_output() local
318 struct net_device *dev = neigh->dev; in dn_phase3_output()
349 return NF_HOOK(PF_DECnet, NF_DN_POST_ROUTING, skb, NULL, neigh->dev, dn_neigh_output_packet); in dn_phase3_output()
374 struct neighbour *neigh; in dn_neigh_router_hello() local
381 neigh = __neigh_lookup(&dn_neigh_table, &src, skb->dev, 1); in dn_neigh_router_hello()
383 dn = (struct dn_neigh *)neigh; in dn_neigh_router_hello()
385 if (neigh) { in dn_neigh_router_hello()
386 write_lock(&neigh->lock); in dn_neigh_router_hello()
388 neigh->used = jiffies; in dn_neigh_router_hello()
389 dn_db = (struct dn_dev *)neigh->dev->dn_ptr; in dn_neigh_router_hello()
391 if (!(neigh->nud_state & NUD_PERMANENT)) { in dn_neigh_router_hello()
392 neigh->updated = jiffies; in dn_neigh_router_hello()
394 if (neigh->dev->type == ARPHRD_ETHER) in dn_neigh_router_hello()
395 memcpy(neigh->ha, &eth_hdr(skb)->h_source, ETH_ALEN); in dn_neigh_router_hello()
415 dn_db->router = neigh_clone(neigh); in dn_neigh_router_hello()
418 neigh_release(xchg(&dn_db->router, neigh_clone(neigh))); in dn_neigh_router_hello()
421 write_unlock(&neigh->lock); in dn_neigh_router_hello()
422 neigh_release(neigh); in dn_neigh_router_hello()
435 struct neighbour *neigh; in dn_neigh_endnode_hello() local
441 neigh = __neigh_lookup(&dn_neigh_table, &src, skb->dev, 1); in dn_neigh_endnode_hello()
443 dn = (struct dn_neigh *)neigh; in dn_neigh_endnode_hello()
445 if (neigh) { in dn_neigh_endnode_hello()
446 write_lock(&neigh->lock); in dn_neigh_endnode_hello()
448 neigh->used = jiffies; in dn_neigh_endnode_hello()
450 if (!(neigh->nud_state & NUD_PERMANENT)) { in dn_neigh_endnode_hello()
451 neigh->updated = jiffies; in dn_neigh_endnode_hello()
453 if (neigh->dev->type == ARPHRD_ETHER) in dn_neigh_endnode_hello()
454 memcpy(neigh->ha, &eth_hdr(skb)->h_source, ETH_ALEN); in dn_neigh_endnode_hello()
460 write_unlock(&neigh->lock); in dn_neigh_endnode_hello()
461 neigh_release(neigh); in dn_neigh_endnode_hello()
494 static void neigh_elist_cb(struct neighbour *neigh, void *_info) in neigh_elist_cb() argument
499 if (neigh->dev != s->dev) in neigh_elist_cb()
502 dn = (struct dn_neigh *) neigh; in neigh_elist_cb()
515 *(s->rs) = neigh->nud_state & NUD_CONNECTED ? 0x80 : 0x0; in neigh_elist_cb()