Lines Matching refs:rts
1246 struct rt_spare new, *rts, *losing_rts = NULL; in rtm_lose() local
1261 rts = &rt->rt_spares[i]; in rtm_lose()
1262 if (rts->rts_gate == S_ADDR(INFO_GATE(info))) { in rtm_lose()
1263 losing_rts = rts; in rtm_lose()
1266 if (rts->rts_gate != 0 && rts->rts_ifp != &dummy_ifp) in rtm_lose()
1982 struct rt_spare *rts; in walk_kern() local
2067 rts = &RT->rt_spares[i]; in walk_kern()
2070 if (rts->rts_flags & RTS_EXTERNAL) in walk_kern()
2073 if (rts->rts_metric == metric) { in walk_kern()
2075 rts->rts_router, rts->rts_ifp, rts->rts_gate, in walk_kern()
2077 (rts->rts_origin & RO_FILE) ? (ags|AGS_FILE) : ags, in walk_kern()
2310 struct rt_spare *rts; in rtadd() local
2324 for (rts = rt->rt_spares, i = rt->rt_num_spares; i != 0; i--, rts++) in rtadd()
2325 rts->rts_metric = HOPCNT_INFINITY; in rtadd()
2416 struct rt_spare *rts, *rts1; in rts_better() local
2420 rts = rt->rt_spares+1; in rts_better()
2421 for (i = rt->rt_num_spares, rts1 = rts+1; i > 2; i--, rts1++) { in rts_better()
2422 if (BETTER_LINK(rt, rts1, rts)) in rts_better()
2423 rts = rts1; in rts_better()
2426 return (rts); in rts_better()
2433 struct rt_spare *rts) in rtswitch() argument
2444 if (rts == NULL) in rtswitch()
2445 rts = rts_better(rt); in rtswitch()
2448 if (!BETTER_LINK(rt, rts, rt->rt_spares)) in rtswitch()
2453 (int)(rts - rt->rt_spares)); in rtswitch()
2454 rtchange(rt, rt->rt_state & ~(RS_NET_SYN), rts, label); in rtswitch()
2457 *rts = rts_empty; in rtswitch()
2459 *rts = swap; in rtswitch()
2469 struct rt_spare *rts; in rtdelete() local
2477 rts = &rt->rt_spares[i]; in rtdelete()
2478 rts_delete(rt, rts); in rtdelete()
2506 rts_delete(struct rt_entry *rt, struct rt_spare *rts) in rts_delete() argument
2510 trace_upslot(rt, rts, &rts_empty); in rts_delete()
2512 rts->rts_gate, rts->rts_ifp, NULL); in rts_delete()
2520 *rts = rts_empty; in rts_delete()
2644 struct rt_spare *rts; in walk_bad() local
2649 rts = &((struct rt_entry *)rn)->rt_spares[i]; in walk_bad()
2651 if (rts->rts_metric < HOPCNT_INFINITY && in walk_bad()
2652 (rts->rts_ifp == NULL || in walk_bad()
2653 (rts->rts_ifp->int_state & IS_BROKE))) in walk_bad()
2654 rts_delete(RT, rts); in walk_bad()
2656 if (rts->rts_origin != RO_NONE) in walk_bad()
2693 struct rt_spare *rts; in walk_rewire() local
2697 rts = RT->rt_spares; in walk_rewire()
2698 for (i = RT->rt_num_spares; i > 0; i--, rts++) { in walk_rewire()
2699 if (rts->rts_ifp == wire->if_old) { in walk_rewire()
2700 rts->rts_ifp = wire->if_new; in walk_rewire()
2703 rdisc_suppress(rts->rts_ifp); in walk_rewire()
2704 if ((rts->rts_metric += wire->metric_delta) > in walk_rewire()
2706 rts->rts_metric = HOPCNT_INFINITY; in walk_rewire()
2727 struct rt_spare *rts; in walk_age() local
2736 rts = RT->rt_spares; in walk_age()
2737 for (i = RT->rt_num_spares; i != 0; i--, rts++) { in walk_age()
2739 ifp = rts->rts_ifp; in walk_age()
2741 if (!AGE_RT(RT->rt_state, rts->rts_origin, ifp)) { in walk_age()
2746 rts->rts_time = now.tv_sec; in walk_age()
2752 rts->rts_time = now_stale + 1; in walk_age()
2757 if (age_bad_gate == rts->rts_gate && in walk_age()
2758 rts->rts_time >= now_stale) { in walk_age()
2759 rts->rts_time -= SUPPLY_INTERVAL; in walk_age()
2763 if (rts->rts_origin == RO_RIP && in walk_age()
2765 (rts->rts_metric < HOPCNT_INFINITY && in walk_age()
2766 now_garbage > rts->rts_time)) && in walk_age()
2768 rts_delete(RT, rts); in walk_age()