X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=eigrpd%2Feigrp_dump.c;h=e1ad51a9dbb1f7d4350accd2788e75a4310e8601;hb=2ab691e6c0ac9a12ece419c3da7a715b628097b4;hp=a3d6eb2e9e97ea2c90318b14282ed68ba7049fb1;hpb=75e43de7a68c5f13a53b5a6b4dc8372b970de340;p=mirror_frr.git diff --git a/eigrpd/eigrp_dump.c b/eigrpd/eigrp_dump.c index a3d6eb2e9..e1ad51a9d 100644 --- a/eigrpd/eigrp_dump.c +++ b/eigrpd/eigrp_dump.c @@ -122,8 +122,8 @@ void eigrp_ip_header_dump(struct ip *iph) zlog_debug("ip_ttl %u", iph->ip_ttl); zlog_debug("ip_p %u", iph->ip_p); zlog_debug("ip_sum 0x%x", (uint32_t)iph->ip_sum); - zlog_debug("ip_src %s", inet_ntoa(iph->ip_src)); - zlog_debug("ip_dst %s", inet_ntoa(iph->ip_dst)); + zlog_debug("ip_src %pI4", &iph->ip_src); + zlog_debug("ip_dst %pI4", &iph->ip_dst); } /* @@ -154,7 +154,7 @@ void show_ip_eigrp_interface_header(struct vty *vty, struct eigrp *eigrp) { vty_out(vty, - "\nEIGRP interfaces for AS(%d)\n\n %-10s %-10s %-10s %-6s %-12s %-7s %-14s %-12s %-8s %-8s %-8s\n %-39s %-12s %-7s %-14s %-12s %-8s\n", + "\nEIGRP interfaces for AS(%d)\n\n%-16s %-10s %-10s %-6s %-12s %-7s %-14s %-12s %-8s %-8s %-8s\n %-44s %-12s %-7s %-14s %-12s %-8s\n", eigrp->AS, "Interface", "Bandwidth", "Delay", "Peers", "Xmit Queue", "Mean", "Pacing Time", "Multicast", "Pending", "Hello", "Holdtime", "", "Un/Reliable", "SRTT", "Un/Reliable", @@ -164,7 +164,7 @@ void show_ip_eigrp_interface_header(struct vty *vty, struct eigrp *eigrp) void show_ip_eigrp_interface_sub(struct vty *vty, struct eigrp *eigrp, struct eigrp_interface *ei) { - vty_out(vty, "%-11s ", IF_NAME(ei)); + vty_out(vty, "%-16s ", IF_NAME(ei)); vty_out(vty, "%-11u", ei->params.bandwidth); vty_out(vty, "%-11u", ei->params.delay); vty_out(vty, "%-7u", ei->nbrs->count); @@ -204,8 +204,7 @@ void show_ip_eigrp_neighbor_sub(struct vty *vty, struct eigrp_neighbor *nbr, int detail) { - vty_out(vty, "%-3u %-17s %-21s", 0, eigrp_neigh_ip_string(nbr), - IF_NAME(nbr->ei)); + vty_out(vty, "%-3u %-17pI4 %-21s", 0, &nbr->src, IF_NAME(nbr->ei)); if (nbr->t_holddown) vty_out(vty, "%-7lu", thread_timer_remain_second(nbr->t_holddown)); @@ -231,22 +230,20 @@ void show_ip_eigrp_neighbor_sub(struct vty *vty, struct eigrp_neighbor *nbr, */ void show_ip_eigrp_topology_header(struct vty *vty, struct eigrp *eigrp) { - vty_out(vty, "\nEIGRP Topology Table for AS(%d)/ID(%s)\n\n", eigrp->AS, - inet_ntoa(eigrp->router_id)); + vty_out(vty, "\nEIGRP Topology Table for AS(%d)/ID(%pI4)\n\n", + eigrp->AS, &eigrp->router_id); vty_out(vty, - "Codes: P - Passive, A - Active, U - Update, Q - Query, " - "R - Reply\n r - reply Status, s - sia Status\n\n"); + "Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply\n r - reply Status, s - sia Status\n\n"); } -void show_ip_eigrp_prefix_entry(struct vty *vty, struct eigrp_prefix_entry *tn) +void show_ip_eigrp_prefix_descriptor(struct vty *vty, + struct eigrp_prefix_descriptor *tn) { struct list *successors = eigrp_topology_get_successor(tn); - char buffer[PREFIX_STRLEN]; vty_out(vty, "%-3c", (tn->state > 0) ? 'A' : 'P'); - vty_out(vty, "%s, ", - prefix2str(tn->destination, buffer, PREFIX_STRLEN)); + vty_out(vty, "%pFX, ", tn->destination); vty_out(vty, "%u successors, ", (successors) ? successors->count : 0); vty_out(vty, "FD is %u, serno: %" PRIu64 " \n", tn->fdistance, tn->serno); @@ -255,14 +252,15 @@ void show_ip_eigrp_prefix_entry(struct vty *vty, struct eigrp_prefix_entry *tn) list_delete(&successors); } -void show_ip_eigrp_nexthop_entry(struct vty *vty, struct eigrp *eigrp, - struct eigrp_nexthop_entry *te, bool *first) +void show_ip_eigrp_route_descriptor(struct vty *vty, struct eigrp *eigrp, + struct eigrp_route_descriptor *te, + bool *first) { if (te->reported_distance == EIGRP_MAX_METRIC) return; if (*first) { - show_ip_eigrp_prefix_entry(vty, te->prefix); + show_ip_eigrp_prefix_descriptor(vty, te->prefix); *first = false; } @@ -270,8 +268,8 @@ void show_ip_eigrp_nexthop_entry(struct vty *vty, struct eigrp *eigrp, vty_out(vty, "%-7s%s, %s\n", " ", "via Connected", IF_NAME(te->ei)); else { - vty_out(vty, "%-7s%s%s (%u/%u), %s\n", " ", "via ", - inet_ntoa(te->adv_router->src), te->distance, + vty_out(vty, "%-7s%s%pI4 (%u/%u), %s\n", " ", "via ", + &te->adv_router->src, te->distance, te->reported_distance, IF_NAME(te->ei)); } }