diff options
Diffstat (limited to 'ospfd/ospf_route.c')
| -rw-r--r-- | ospfd/ospf_route.c | 25 |
1 files changed, 5 insertions, 20 deletions
diff --git a/ospfd/ospf_route.c b/ospfd/ospf_route.c index b6e8338ee7..a661c80a91 100644 --- a/ospfd/ospf_route.c +++ b/ospfd/ospf_route.c @@ -631,27 +631,15 @@ void ospf_route_table_dump(struct route_table *rt) { struct route_node *rn; struct ospf_route * or ; - char buf1[BUFSIZ]; - char buf2[BUFSIZ]; struct listnode *pnode; struct ospf_path *path; -#if 0 - zlog_debug ("Type Dest Area Path Type Cost Next Adv."); - zlog_debug (" Hop(s) Router(s)"); -#endif /* 0 */ - zlog_debug("========== OSPF routing table =========="); for (rn = route_top(rt); rn; rn = route_next(rn)) if ((or = rn->info) != NULL) { if (or->type == OSPF_DESTINATION_NETWORK) { - zlog_debug("N %s/%d\t%s\t%s\t%d", - inet_ntop(AF_INET, &rn->p.u.prefix4, - buf1, BUFSIZ), - rn->p.prefixlen, - inet_ntop(AF_INET, - & or->u.std.area_id, buf2, - BUFSIZ), + zlog_debug("N %-18pFX %-15pI4 %s %d", &rn->p, + &or->u.std.area_id, ospf_path_type_str[or->path_type], or->cost); for (ALL_LIST_ELEMENTS_RO(or->paths, pnode, @@ -659,12 +647,9 @@ void ospf_route_table_dump(struct route_table *rt) zlog_debug(" -> %s", inet_ntoa(path->nexthop)); } else - zlog_debug("R %s\t%s\t%s\t%d", - inet_ntop(AF_INET, &rn->p.u.prefix4, - buf1, BUFSIZ), - inet_ntop(AF_INET, - & or->u.std.area_id, buf2, - BUFSIZ), + zlog_debug("R %-18pI4 %-15pI4 %s %d", + &rn->p.u.prefix4, + &or->u.std.area_id, ospf_path_type_str[or->path_type], or->cost); } |
