Lines Matching defs:lle

172 nd6_lle_event(void *arg __unused, struct llentry *lle, int evt)
181 LLE_WLOCK_ASSERT(lle);
183 if (lltable_get_af(lle->lle_tbl) != AF_INET6)
189 KASSERT(lle->la_flags & LLE_VALID,
190 ("%s: %p resolved but not valid?", __func__, lle));
199 ifp = lltable_get_ifp(lle->lle_tbl);
204 lltable_fill_sa_entry(lle, (struct sockaddr *)&dst);
213 bcopy(lle->ll_addr, gw.sdl_data, ifp->if_addrlen);
627 * lle in STALE state (remaining timer value stored in lle_remtime).
639 nd6_is_stale(struct llentry *lle, long *pdelay, int *do_switch)
649 lle_hittime = llentry_get_hittime(lle);
654 * STALE state. No packets has been passed using this lle.
659 if (lle->lle_remtime > delay)
660 lle->lle_remtime -= delay;
662 delay = lle->lle_remtime;
663 lle->lle_remtime = 0;
698 * Switch @lle state to new state optionally arming timers.
703 nd6_llinfo_setstate(struct llentry *lle, int newstate)
714 ifp = lle->lle_tbl->llt_ifp;
718 if (!ND6_LLINFO_PERMANENT(lle)) {
719 ifp = lle->lle_tbl->llt_ifp;
725 llentry_request_feedback(lle);
733 lle->la_asked = 0;
739 nd6_llinfo_settimer_locked(lle, delay);
741 lle->lle_remtime = remtime;
742 lle->ln_state = newstate;
1341 struct llentry *lle;
1353 if ((lle = nd6_lookup(&addr->sin6_addr, LLE_SF(AF_INET6, 0), ifp)) != NULL) {
1354 LLE_RUNLOCK(lle);
1361 nd6_free_children(struct llentry *lle)
1366 LLE_WLOCK_ASSERT(lle);
1368 while ((child_lle = CK_SLIST_FIRST(&lle->lle_children)) != NULL) {
1376 * Tries to update @lle address/prepend data with new @lladdr.
1379 * In any case, @lle is returned wlocked.
1382 nd6_try_set_entry_addr_locked(struct ifnet *ifp, struct llentry *lle, char *lladdr)
1393 lltable_set_entry_addr(ifp, lle, buf, sz, off);
1396 CK_SLIST_FOREACH(child_lle, &lle->lle_children, lle_child_next) {
1412 nd6_try_set_entry_addr(struct ifnet *ifp, struct llentry *lle, char *lladdr)
1415 LLE_WLOCK_ASSERT(lle);
1417 if (!lltable_acquire_wlock(ifp, lle))
1419 bool ret = nd6_try_set_entry_addr_locked(ifp, lle, lladdr);
1446 KASSERT((ln->la_flags & LLE_CHILD) == 0, ("child lle"));
2016 /* Prefer any existing lle over newly-created one */
2022 /* No existing lle, mark as new entry (6,7) */
2234 * data in @desten buffer. Copy of lle ln_flags can be also
2237 * If destination LLE does not exists or lle state modification
2284 /* Entry found, let's copy lle info */
2311 * Locking order: parent lle gets locked first, chen goes the child.
2317 struct llentry *lle, *lle_tmp;
2319 lle = nd6_alloc(addr, 0, ifp);
2320 if (lle != NULL && family != AF_INET6) {
2323 lltable_free_entry(LLTABLE6(ifp), lle);
2331 if (lle == NULL) {
2336 ip6_sprintf(ip6buf, addr), lle);
2341 LLE_WLOCK(lle);
2345 lltable_link_entry(LLTABLE6(ifp), lle);
2347 lltable_free_entry(LLTABLE6(ifp), lle);
2348 lle = lle_tmp;
2351 /* Check if child lle for the same family exists */
2352 lle_tmp = llentry_lookup_family(lle, child_lle->r_family);
2356 lltable_link_child_entry(lle, child_lle);
2358 /* child lle already exists, free newly-created one */
2362 LLE_WUNLOCK(lle);
2363 lle = child_lle;
2366 return (lle);
2371 * address in @desten buffer. Copy of lle ln_flags can be also
2385 struct llentry *lle = NULL;
2398 lle = nd6_lookup(&dst->sin6_addr, LLE_SF(family, LLE_EXCLUSIVE), ifp);
2399 if ((lle == NULL) && nd6_is_addr_neighbor(dst, ifp)) {
2405 lle = nd6_get_llentry(ifp, &dst->sin6_addr, family);
2408 if (lle == NULL) {
2413 LLE_WLOCK_ASSERT(lle);
2422 if ((!(lle->la_flags & LLE_CHILD)) && (lle->ln_state == ND6_LLINFO_STALE))
2423 nd6_llinfo_setstate(lle, ND6_LLINFO_DELAY);
2430 if (lle->ln_state > ND6_LLINFO_INCOMPLETE) {
2432 lladdr = lle->ll_addr;
2435 lladdr = lle->r_linkdata;
2436 ll_len = lle->r_hdrlen;
2440 *pflags = lle->la_flags;
2442 LLE_ADDREF(lle);
2443 *plle = lle;
2445 LLE_WUNLOCK(lle);
2458 dropped = lltable_append_entry_queue(lle, m, V_nd6_maxqueuelen);
2465 * Note that for newly-created lle la_asked will be 0,
2472 /* If we have child lle, switch to the parent to send NS */
2473 if (lle->la_flags & LLE_CHILD) {
2474 struct llentry *lle_parent = lle->lle_parent;
2475 LLE_WUNLOCK(lle);
2476 lle = lle_parent;
2477 LLE_WLOCK(lle);
2479 if (lle->la_asked == 0) {
2480 lle->la_asked++;
2482 psrc = nd6_llinfo_get_holdsrc(lle, &src);
2484 nd6_llinfo_setstate(lle, ND6_LLINFO_INCOMPLETE);
2486 LLE_WUNLOCK(lle);
2495 * address in @desten buffer. Copy of lle ln_flags can be also
2516 nd6_flush_holdchain(struct ifnet *ifp, struct llentry *lle, struct mbuf *chain)
2525 .ro_prepend = lle->r_linkdata,
2526 .ro_plen = lle->r_hdrlen,
2529 lltable_fill_sa_entry(lle, (struct sockaddr *)&dst6);
2547 nd6_flush_children_holdchain(struct ifnet *ifp, struct llentry *lle)
2554 CK_SLIST_FOREACH(child_lle, &lle->lle_children, lle_child_next) {
2633 * Removes either all lle entries for given @ia, or lle