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