Lines Matching defs:ln
412 struct llinfo_nd6 *ln;
424 ln = llinfo_nd6.ln_next;
425 while (ln && ln != &llinfo_nd6) {
428 struct llinfo_nd6 *next = ln->ln_next;
432 if ((rt = ln->ln_rt) == NULL) {
433 ln = next;
437 ln = next;
445 if (ln->ln_expire > timenow.tv_sec) {
458 if (ln->ln_state > ND6_LLINFO_INCOMPLETE)
459 ln->ln_state = ND6_LLINFO_STALE;
461 ln->ln_state = ND6_LLINFO_PURGE;
462 ln->ln_expire = timenow.tv_sec;
468 ln = next;
475 printf("rt=0 in nd6_timer(ln=%p)\n", ln);
476 ln = next;
479 if (rt->rt_llinfo && (struct llinfo_nd6 *)rt->rt_llinfo != ln) {
480 printf("rt_llinfo(%p) is not equal to ln(%p)\n",
481 rt->rt_llinfo, ln);
482 ln = next;
486 printf("dst=0 in nd6_timer(ln=%p)\n", ln);
487 ln = next;
491 switch (ln->ln_state) {
493 if (ln->ln_asked < nd6_mmaxtries) {
494 ln->ln_asked++;
495 ln->ln_expire = timenow.tv_sec +
498 ln, 0, 0);
500 struct mbuf *m = ln->ln_hold;
501 ln->ln_hold = NULL;
515 ln->ln_hold = NULL;
521 if (ln->ln_expire) {
522 ln->ln_state = ND6_LLINFO_STALE;
523 ln->ln_expire = timenow.tv_sec + nd6_gctimer;
530 if (ln->ln_expire)
537 ln->ln_asked = 1;
538 ln->ln_state = ND6_LLINFO_PROBE;
539 ln->ln_expire = timenow.tv_sec +
543 ln, 0, 0);
545 ln->ln_state = ND6_LLINFO_STALE; /* XXX */
546 ln->ln_expire = timenow.tv_sec + nd6_gctimer;
550 if (ln->ln_asked < nd6_umaxtries) {
551 ln->ln_asked++;
552 ln->ln_expire = timenow.tv_sec +
555 &dst->sin6_addr, ln, 0, 0);
561 ln = next;
766 struct llinfo_nd6 *ln, *nln;
821 ln = llinfo_nd6.ln_next;
822 while (ln && ln != &llinfo_nd6) {
826 nln = ln->ln_next;
827 rt = ln->ln_rt;
834 ln = nln;
915 struct llinfo_nd6 *ln =
917 ln->ln_state = ND6_LLINFO_NOSTATE;
1022 struct llinfo_nd6 *ln = (struct llinfo_nd6 *)rt->rt_llinfo, *next;
1036 if ((ln && ln->ln_router) || dr) {
1059 ln->ln_state = ND6_LLINFO_INCOMPLETE;
1092 if (ln)
1093 next = ln->ln_next;
1119 struct llinfo_nd6 *ln;
1143 ln = (struct llinfo_nd6 *)rt->rt_llinfo;
1144 if (ln->ln_state < ND6_LLINFO_REACHABLE)
1152 ln->ln_byhint++;
1153 if (ln->ln_byhint > nd6_maxnudhint)
1157 ln->ln_state = ND6_LLINFO_REACHABLE;
1158 if (ln->ln_expire)
1159 ln->ln_expire = timenow.tv_sec +
1170 struct llinfo_nd6 *ln = (struct llinfo_nd6 *)rt->rt_llinfo;
1235 if (ln)
1236 ln->ln_expire = timenow.tv_sec;
1238 if (ln && ln->ln_expire == 0) {
1244 ln->ln_expire = 1;
1294 if (ln != NULL)
1300 R_Malloc(ln, struct llinfo_nd6 *, sizeof(*ln));
1301 rt->rt_llinfo = (caddr_t)ln;
1302 if (!ln) {
1308 Bzero(ln, sizeof(*ln));
1309 ln->ln_rt = rt;
1314 * and ln->ln_expire should have some lifetime
1317 ln->ln_state = ND6_LLINFO_REACHABLE;
1318 ln->ln_byhint = 0;
1324 ln->ln_state = ND6_LLINFO_NOSTATE;
1325 ln->ln_expire = timenow.tv_sec;
1328 ln->ln_next = llinfo_nd6.ln_next;
1329 llinfo_nd6.ln_next = ln;
1330 ln->ln_prev = &llinfo_nd6;
1331 ln->ln_next->ln_prev = ln;
1341 ln->ln_expire = 0;
1342 ln->ln_state = ND6_LLINFO_REACHABLE;
1343 ln->ln_byhint = 0;
1363 ln->ln_expire = 0;
1364 ln->ln_state = ND6_LLINFO_REACHABLE;
1365 ln->ln_byhint = 0;
1389 if (!ln)
1411 ln->ln_next->ln_prev = ln->ln_prev;
1412 ln->ln_prev->ln_next = ln->ln_next;
1413 ln->ln_prev = NULL;
1416 if (ln->ln_hold)
1417 m_freem(ln->ln_hold);
1418 ln->ln_hold = NULL;
1419 R_Free((caddr_t)ln);
1636 struct llinfo_nd6 *ln;
1655 ln = (struct llinfo_nd6 *)rt->rt_llinfo;
1656 nbi->state = ln->ln_state;
1657 nbi->asked = ln->ln_asked;
1658 nbi->isrouter = ln->ln_router;
1659 nbi->expire = ln->ln_expire;
1687 struct llinfo_nd6 *ln = NULL;
1745 ln = (struct llinfo_nd6 *)rt->rt_llinfo;
1746 if (!ln)
1802 ln->ln_state = newstate;
1804 if (ln->ln_state == ND6_LLINFO_STALE) {
1811 ln->ln_expire = timenow.tv_sec + nd6_gctimer;
1813 if (ln->ln_hold) {
1818 nd6_output(ifp, ifp, ln->ln_hold,
1821 ln->ln_hold = NULL;
1823 } else if (ln->ln_state == ND6_LLINFO_INCOMPLETE) {
1825 ln->ln_expire = timenow.tv_sec;
1864 ln->ln_router = 0;
1873 ln->ln_router = 1;
1875 ln->ln_router = 0;
1881 ln->ln_router = 0;
1889 ln->ln_router = 1;
1909 if (do_update && ln->ln_router && !ip6_forwarding && (ip6_accept_rtadv || (ifp->if_eflags & IFEF_ACCEPT_RTADVD))) {
1960 struct llinfo_nd6 *ln = NULL;
2039 ln = (struct llinfo_nd6 *)rt->rt_llinfo;
2048 ln = (struct llinfo_nd6 *)rt->rt_llinfo;
2051 if (!ln || !rt) {
2056 "(ln=%p, rt=%p)\n",
2057 ip6_sprintf(&dst->sin6_addr), ln, rt);
2068 ln->ln_state < ND6_LLINFO_REACHABLE) {
2069 ln->ln_state = ND6_LLINFO_STALE;
2070 ln->ln_expire = timenow.tv_sec + nd6_gctimer;
2080 if (ln->ln_state == ND6_LLINFO_STALE) {
2081 ln->ln_asked = 0;
2082 ln->ln_state = ND6_LLINFO_DELAY;
2083 ln->ln_expire = timenow.tv_sec + nd6_delay;
2091 if (ln->ln_state > ND6_LLINFO_INCOMPLETE)
2103 if (ln->ln_state == ND6_LLINFO_NOSTATE)
2104 ln->ln_state = ND6_LLINFO_INCOMPLETE;
2105 if (ln->ln_hold)
2106 m_freem(ln->ln_hold);
2107 ln->ln_hold = m;
2108 if (ln->ln_expire) {
2109 if (ln->ln_asked < nd6_mmaxtries &&
2110 ln->ln_expire < timenow.tv_sec) {
2111 ln->ln_asked++;
2112 ln->ln_expire = timenow.tv_sec +
2114 nd6_ns_output(ifp, NULL, &dst->sin6_addr, ln, 0, locked);