Home | History | Annotate | Download | only in mrouted

Lines Matching defs:metric

342 update_route(u_int32_t origin, u_int32_t mask, u_int metric, u_int32_t src,
349 * Compute an adjusted metric, taking into account the cost of the
353 if (src != 0 && (metric < 1 || metric >= 2*UNREACHABLE)) {
355 "%s reports out-of-range metric %u for origin %s",
356 inet_fmt(src), metric,
360 adj_metric = metric + uvifs[vifi].uv_metric;
428 * the route timer and, if the reported metric has changed, update
460 * subnet and the reported metric for that origin is better than
462 * gateway and metric. We also switch gateways if the reported
463 * metric is the same as the one in the route entry and the gateway
465 * or if the metric is the same but the reporting gateway has a lower
471 * XXX Why do we do this if we are just changing the metric?
493 if (metric < r->rt_metric ||
494 (metric == r->rt_metric &&
497 * Neighbor has lower metric to origin (or has same metric
508 else if (metric > UNREACHABLE) { /* "poisoned reverse" */
542 (metric > r->rt_metric ||
543 (metric == r->rt_metric &&
546 * Current dominant no longer has a lower metric to origin
547 * (or same metric and lower IP address); we adopt the vif
552 if (metric > UNREACHABLE) {
703 int metric;
740 int metric;
782 do { /* Loop through (origin, metric) pairs */
792 metric = *p++;
796 rt[nrt].metric = (metric & 0x7f);
798 } while (!(metric & 0x80));
819 update_route(rt[i].origin, rt[i].mask, rt[i].metric,
855 *p++ = 0x81; /*XXX metric 1, is this safe? */
1100 " Origin-Subnet From-Gateway Metric Tmr In-Vif Out-Vifs");