• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10/xnu-2782.1.97/bsd/netinet6/

Lines Matching defs:ln

312 	struct llinfo_nd6 *ln;
314 ln = (how == M_WAITOK) ? zalloc(llinfo_nd6_zone) :
316 if (ln != NULL)
317 bzero(ln, sizeof (*ln));
319 return (ln);
325 struct llinfo_nd6 *ln = arg;
327 if (ln->ln_next != NULL || ln->ln_prev != NULL) {
328 panic("%s: trying to free %p when it is in use", __func__, ln);
333 if (ln->ln_hold != NULL) {
334 m_freem(ln->ln_hold);
335 ln->ln_hold = NULL;
339 VERIFY(ln->ln_rt->rt_llinfo == ln);
340 if (ln->ln_rt->rt_llinfo_purge != NULL)
341 ln->ln_rt->rt_llinfo_purge(ln->ln_rt);
343 zfree(llinfo_nd6_zone, ln);
349 struct llinfo_nd6 *ln = rt->rt_llinfo;
352 VERIFY(rt->rt_llinfo_purge == nd6_llinfo_purge && ln != NULL);
354 if (ln->ln_llreach != NULL) {
356 ifnet_llreach_free(ln->ln_llreach);
357 ln->ln_llreach = NULL;
359 ln->ln_lastused = 0;
365 struct llinfo_nd6 *ln = rt->rt_llinfo;
366 struct if_llreach *lr = ln->ln_llreach;
379 ifnet_llreach_up2calexp(lr, ln->ln_lastused);
387 struct llinfo_nd6 *ln = rt->rt_llinfo;
388 struct if_llreach *lr = ln->ln_llreach;
401 ifnet_llreach_up2upexp(lr, ln->ln_lastused);
407 ln_setexpire(struct llinfo_nd6 *ln, uint64_t expiry)
409 ln->ln_expire = expiry;
413 ln_getexpire(struct llinfo_nd6 *ln)
418 if (ln->ln_expire != 0) {
419 struct rtentry *rt = ln->ln_rt;
430 ln->ln_expire - rt->base_uptime;
746 struct llinfo_nd6 *ln;
788 ln = llinfo_nd6.ln_next;
789 while (ln != NULL && ln != &llinfo_nd6) {
796 next = ln->ln_next;
797 rt = ln->ln_rt;
801 if (ln->ln_flags & ND6_LNF_TIMER_SKIP) {
803 ln = next;
810 panic("%s: ln(%p) rt(%p) rt_ifp == NULL", __func__,
811 ln, rt);
815 /* rt_llinfo must always be equal to ln */
816 if ((struct llinfo_nd6 *)rt->rt_llinfo != ln) {
817 panic("%s: rt_llinfo(%p) is not equal to ln(%p)",
818 __func__, rt->rt_llinfo, ln);
825 panic("%s: rt(%p) key is NULL ln(%p)", __func__,
826 rt, ln);
831 ln->ln_flags |= ND6_LNF_TIMER_SKIP;
833 if (ln->ln_expire == 0 || (rt->rt_flags & RTF_STATIC)) {
840 if (ln->ln_state > ND6_LLINFO_INCOMPLETE)
841 ln->ln_state = ND6_LLINFO_STALE;
843 ln->ln_state = ND6_LLINFO_PURGE;
844 ln_setexpire(ln, timenow);
853 if (ln->ln_expire > timenow) {
854 switch (ln->ln_state) {
863 ln = next;
882 if (ln->ln_expire != 0) {
883 ln->ln_state = ND6_LLINFO_PURGE;
885 "ln(0x%llx) dst %s, if_index %d >= %d\n",
887 (uint64_t)VM_KERNEL_ADDRPERM(ln),
901 switch (ln->ln_state) {
903 if (ln->ln_asked < nd6_mmaxtries) {
904 struct ifnet *exclifp = ln->ln_exclifp;
905 ln->ln_asked++;
906 ln_setexpire(ln, timenow + retrans / 1000);
912 NULL, &dst->sin6_addr, ln);
915 &dst->sin6_addr, ln, 0);
921 struct mbuf *m = ln->ln_hold;
922 ln->ln_hold = NULL;
951 if (ln->ln_expire != 0) {
952 ln->ln_state = ND6_LLINFO_STALE;
953 ln_setexpire(ln, timenow + nd6_gctimer);
962 if (ln->ln_expire != 0) {
979 ln->ln_asked = 1;
980 ln->ln_state = ND6_LLINFO_PROBE;
981 ln_setexpire(ln, timenow + retrans / 1000);
986 &dst->sin6_addr, ln, 0);
992 ln->ln_state = ND6_LLINFO_STALE; /* XXX */
993 ln_setexpire(ln, timenow + nd6_gctimer);
999 if (ln->ln_asked < nd6_umaxtries) {
1000 ln->ln_asked++;
1001 ln_setexpire(ln, timenow + retrans / 1000);
1006 &dst->sin6_addr, ln, 0);
1026 ln = next;
1031 ln = llinfo_nd6.ln_next;
1032 while (ln != NULL && ln != &llinfo_nd6) {
1033 struct rtentry *rt = ln->ln_rt;
1034 struct llinfo_nd6 *next = ln->ln_next;
1037 if (ln->ln_flags & ND6_LNF_TIMER_SKIP)
1038 ln->ln_flags &= ~ND6_LNF_TIMER_SKIP;
1040 ln = next;
1520 struct llinfo_nd6 *ln;
1614 ln = llinfo_nd6.ln_next;
1615 while (ln != NULL && ln != &llinfo_nd6) {
1619 nln = ln->ln_next;
1620 rt = ln->ln_rt;
1644 ln = nln;
1740 struct llinfo_nd6 *ln = rt->rt_llinfo;
1741 ln->ln_state = ND6_LLINFO_NOSTATE;
1923 struct llinfo_nd6 *ln;
1933 ln = rt->rt_llinfo;
1951 if ((ln && ln->ln_router) || dr) {
1981 ln->ln_state = ND6_LLINFO_INCOMPLETE;
2019 struct llinfo_nd6 *ln = rt->rt_llinfo;
2106 ((rt->rt_flags & RTF_LLINFO) && ln == NULL)) {
2111 * (RTF_LLINFO && ln == NULL case).
2121 if (ln != NULL) {
2122 ln_setexpire(ln,
2172 if (ln != NULL)
2178 rt->rt_llinfo = ln = nd6_llinfo_alloc(M_WAITOK);
2179 if (ln == NULL)
2188 ln->ln_rt = rt;
2193 * and ln->ln_expire should have some lifetime
2196 ln->ln_state = ND6_LLINFO_REACHABLE;
2202 ln->ln_state = ND6_LLINFO_NOSTATE;
2205 ln_setexpire(ln, (ifp->if_eflags & IFEF_IPV6_ND6ALT) ?
2208 LN_INSERTHEAD(ln);
2225 for (i = 0; i < 10 && llinfo_nd6.ln_prev != ln; i++) {
2255 ln_setexpire(ln, 0);
2256 ln->ln_state = ND6_LLINFO_REACHABLE;
2300 ln_setexpire(ln, 0);
2301 ln->ln_state = ND6_LLINFO_REACHABLE;
2330 if (ln == NULL)
2357 * llinfo_nd6, and likewise, ln->ln_rt stil points to this
2360 if (ln->ln_flags & ND6_LNF_IN_USE)
2361 LN_DEQUEUE(ln);
2370 if (ln->ln_hold != NULL) {
2371 m_freem(ln->ln_hold);
2372 ln->ln_hold = NULL;
2798 struct llinfo_nd6 *ln;
2823 ln = rt->rt_llinfo;
2824 nbi_32.state = ln->ln_state;
2825 nbi_32.asked = ln->ln_asked;
2826 nbi_32.isrouter = ln->ln_router;
2827 nbi_32.expire = ln_getexpire(ln);
2835 struct llinfo_nd6 *ln;
2860 ln = rt->rt_llinfo;
2861 nbi_64.state = ln->ln_state;
2862 nbi_64.asked = ln->ln_asked;
2863 nbi_64.isrouter = ln->ln_router;
2864 nbi_64.expire = ln_getexpire(ln);
2922 struct llinfo_nd6 *ln = NULL;
2973 ln = (struct llinfo_nd6 *)rt->rt_llinfo;
2974 if (ln == NULL)
3033 ln->ln_state = newstate;
3035 if (ln->ln_state == ND6_LLINFO_STALE) {
3036 struct mbuf *m = ln->ln_hold;
3043 ln_setexpire(ln, timenow + nd6_gctimer);
3044 ln->ln_hold = NULL;
3058 } else if (ln->ln_state == ND6_LLINFO_INCOMPLETE) {
3060 ln_setexpire(ln, timenow);
3100 ln->ln_router = 0;
3109 ln->ln_router = 1;
3111 ln->ln_router = 0;
3117 ln->ln_router = 0;
3125 ln->ln_router = 1;
3140 if (do_update && ln->ln_router &&
3198 struct llinfo_nd6 *ln = NULL;
3409 ln = rt->rt_llinfo;
3439 ln = rt->rt_llinfo;
3446 if (!ln || !rt) {
3459 "(ln=0x%llx, rt=0x%llx)\n",
3461 (uint64_t)VM_KERNEL_ADDRPERM(ln),
3476 ln->ln_state < ND6_LLINFO_REACHABLE) {
3477 ln->ln_state = ND6_LLINFO_STALE;
3478 ln_setexpire(ln, timenow + nd6_gctimer);
3488 if (ln->ln_state == ND6_LLINFO_STALE) {
3489 ln->ln_asked = 0;
3490 ln->ln_state = ND6_LLINFO_DELAY;
3491 ln_setexpire(ln, timenow + nd6_delay);
3501 if (ln->ln_state > ND6_LLINFO_INCOMPLETE) {
3511 if (ln->ln_state == ND6_LLINFO_DELAY ||
3512 (ln->ln_expire != 0 && ip6_neighborgcthresh > 0 &&
3515 if (ln->ln_state == ND6_LLINFO_DELAY)
3517 if (ln->ln_expire != 0 && ip6_neighborgcthresh > 0 &&
3520 if (ln->ln_flags & ND6_LNF_IN_USE) {
3521 LN_DEQUEUE(ln);
3522 LN_INSERTHEAD(ln);
3537 ln->ln_exclifp = ((origifp == ifp) ? NULL : origifp);
3548 if (ln->ln_state == ND6_LLINFO_NOSTATE)
3549 ln->ln_state = ND6_LLINFO_INCOMPLETE;
3550 if (ln->ln_hold)
3551 m_freem(ln->ln_hold);
3552 ln->ln_hold = m;
3553 if (ln->ln_expire != 0 && ln->ln_asked < nd6_mmaxtries &&
3554 ln->ln_expire <= timenow) {
3555 ln->ln_asked++;
3560 ln_setexpire(ln, timenow + ndi->retrans / 1000);
3564 /* We still have a reference on rt (for ln) */
3567 &dst->sin6_addr, ln);
3569 nd6_ns_output(ifp, NULL, &dst->sin6_addr, ln, 0);
3584 if (ln->ln_expire != 0 && ip6_neighborgcthresh > 0 &&
3588 if (ln->ln_flags & ND6_LNF_IN_USE) {
3589 LN_DEQUEUE(ln);
3590 LN_INSERTHEAD(ln);