Home | History | Annotate | Download | only in mrouted

Lines Matching defs:origin

44 static int find_route(u_int32_t origin, u_int32_t mask);
45 static void create_route(u_int32_t origin, u_int32_t mask);
243 * look for a route entry matching the specified origin and mask. If a
246 * entry preceding the point at which the new origin should be inserted.
251 find_route(u_int32_t origin, u_int32_t mask)
257 if (origin == r->rt_origin && mask == r->rt_originmask) {
263 ntohl(origin) < ntohl(r->rt_origin))) {
273 * Create a new routing table entry for the specified origin and link it into
278 * Only the origin, originmask, originwidth and flags fields are initialized
282 create_route(u_int32_t origin, u_int32_t mask)
292 r->rt_origin = origin;
336 * Process a route report for a single origin, creating or updating the
342 update_route(u_int32_t origin, u_int32_t mask, u_int metric, u_int32_t src,
355 "%s reports out-of-range metric %u for origin %s",
357 inet_fmts(origin, mask));
364 * Look up the reported origin in the routing table.
366 if (!find_route(origin, mask)) {
370 * or if the reported origin and mask are invalid.
375 if (src != 0 && !inet_valid_subnet(origin, mask)) {
377 "%s reports an invalid origin (%s) and/or mask (%08x)",
379 inet_fmt(origin), ntohl(mask));
387 create_route(origin, mask);
400 * We now have a routing entry for the reported origin. Update it?
405 * The routing entry is for a formerly-unreachable or new origin.
425 * to the origin subnet (src and r->rt_gateway both equal zero) or
427 * towards the origin (src and r->rt_gateway not equal zero). Reset
455 * The report is for an origin we consider reachable; the report
458 * back towards the origin. If the source of the update is one of
459 * our own interfaces, or if the origin is not a directly-connected
460 * subnet and the reported metric for that origin is better than
497 * Neighbor has lower metric to origin (or has same metric
511 * origin; if no subordinate recorded, record this neighbor
524 * path to route's origin; it is no longer a subordinate
546 * Current dominant no longer has a lower metric to origin
702 u_int32_t origin;
722 o1 = ntohl(r1->origin);
723 o2 = ntohl(r2->origin);
742 u_int32_t origin;
782 do { /* Loop through (origin, metric) pairs */
789 origin = 0;
791 ((char *)&origin)[i] = *p++;
795 rt[nrt].origin = origin;
806 if (rt[nrt-1].origin == 0)
812 if (i != 0 && rt[i].origin == rt[i-1].origin &&
816 inet_fmts(rt[i].origin, rt[i].mask));
819 update_route(rt[i].origin, rt[i].mask, rt[i].metric,
1100 " Origin-Subnet From-Gateway Metric Tmr In-Vif Out-Vifs");