Lines Matching defs:neigh
93 if (e->neigh) {
94 RT_LOCK(e->neigh);
95 RT_REMREF(e->neigh);
96 RT_UNLOCK(e->neigh);
98 e->neigh = rt;
126 memcpy(e->dmac, RT_ENADDR(e->neigh), sizeof(e->dmac));
165 rt = e->neigh;
218 rt = e->neigh;
308 if (e->neigh) {
309 RT_LOCK(e->neigh);
310 RT_REMREF(e->neigh);
311 RT_UNLOCK(e->neigh);
312 e->neigh = NULL;
320 * Update an L2T entry that was previously used for the same next hop as neigh.
324 reuse_entry(struct l2t_entry *e, struct rtentry *neigh)
328 la = (struct llinfo_arp *)neigh->rt_llinfo;
331 if (neigh != e->neigh)
332 neigh_replace(e, neigh);
334 if (memcmp(e->dmac, RT_ENADDR(neigh), sizeof(e->dmac)) ||
335 (neigh->rt_expire > time_uptime))
345 t3_l2t_get(struct toedev *dev, struct rtentry *neigh,
350 u32 addr = ((struct sockaddr_in *)rt_getkey(neigh))->sin_addr.s_addr;
351 int ifidx = neigh->rt_ifp->if_index;
360 reuse_entry(e, neigh);
375 neigh_replace(e, neigh);
380 if (neigh->rt_ifp->if_vlantrunk)
381 e->vlan = VLAN_DEV_INFO(neigh->dev)->vlan_id;
426 t3_l2t_update(struct toedev *dev, struct rtentry *neigh)
431 u32 addr = ((struct sockaddr_in *)rt_getkey(neigh))->sin_addr.s_addr;
432 int ifidx = neigh->rt_ifp->if_index;
448 if (neigh != e->neigh)
449 neigh_replace(e, neigh);
451 la = (struct llinfo_arp *)neigh->rt_llinfo;
462 if (memcmp(e->dmac, RT_ENADDR(neigh), 6))
476 t3_l2t_update(struct toedev *dev, struct rtentry *neigh)
480 u32 addr = *(u32 *) rt_key(neigh);
481 int ifidx = neigh->dev->ifindex;
489 if (neigh != e->neigh)
490 neigh_replace(e, neigh);
505 struct rtentry *neigh = e->neigh;
512 rw_rlock(&neigh->lock);
517 if (neigh->nud_state & NUD_FAILED) {
520 } else if (neigh_is_connected(neigh) && e->arpq_head)
523 e->state = neigh_is_connected(neigh) ?
525 if (memcmp(e->dmac, RT_ENADDR(neigh), sizeof(e->dmac)))
530 rw_runlock(&neigh->lock);
646 e->neigh ? e->neigh->dev->name : "");