summaryrefslogtreecommitdiff
path: root/isisd/isis_lsp.c
diff options
context:
space:
mode:
authorhasso <hasso>2005-09-19 06:35:47 +0000
committerhasso <hasso>2005-09-19 06:35:47 +0000
commit96e30387f164148fe47da6d4481283a61d761c97 (patch)
treed22600c92bf5d3f8d38c57c39646842e78e5d4dd /isisd/isis_lsp.c
parent72b9c956e2e025d24cf1e55a5e17ba34942a6ee3 (diff)
* isis_lsp.c: Better output of detailed LSP printout and fixed TE IPv4
reachibility metric display.
Diffstat (limited to 'isisd/isis_lsp.c')
-rw-r--r--isisd/isis_lsp.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/isisd/isis_lsp.c b/isisd/isis_lsp.c
index 26c46a2f..d02f3833 100644
--- a/isisd/isis_lsp.c
+++ b/isisd/isis_lsp.c
@@ -795,7 +795,7 @@ lsp_print_detail (dnode_t * node, struct vty *vty, char dynhost)
for (ALL_LIST_ELEMENTS (lsp->tlv_data.is_neighs, lnode, lnnode, is_neigh))
{
lspid_print (is_neigh->neigh_id, LSPid, dynhost, 0);
- vty_out (vty, " Metric: %d IS %s%s",
+ vty_out (vty, " Metric: %-10d IS %s%s",
is_neigh->metrics.metric_default, LSPid, VTY_NEWLINE);
}
@@ -808,7 +808,7 @@ lsp_print_detail (dnode_t * node, struct vty *vty, char dynhost)
sizeof (ipv4_reach_prefix));
memcpy (ipv4_reach_mask, inet_ntoa (ipv4_reach->mask),
sizeof (ipv4_reach_mask));
- vty_out (vty, " Metric: %d IP %s %s%s",
+ vty_out (vty, " Metric: %-10d IP-Internal %s %s%s",
ipv4_reach->metrics.metric_default, ipv4_reach_prefix,
ipv4_reach_mask, VTY_NEWLINE);
}
@@ -822,7 +822,7 @@ lsp_print_detail (dnode_t * node, struct vty *vty, char dynhost)
sizeof (ipv4_reach_prefix));
memcpy (ipv4_reach_mask, inet_ntoa (ipv4_reach->mask),
sizeof (ipv4_reach_mask));
- vty_out (vty, " Metric: %d IP-External %s %s%s",
+ vty_out (vty, " Metric: %-10d IP-External %s %s%s",
ipv4_reach->metrics.metric_default, ipv4_reach_prefix,
ipv4_reach_mask, VTY_NEWLINE);
}
@@ -839,11 +839,11 @@ lsp_print_detail (dnode_t * node, struct vty *vty, char dynhost)
inet_ntop (AF_INET6, &in6, (char *)buff, BUFSIZ);
if ((ipv6_reach->control_info &&
CTRL_INFO_DISTRIBUTION) == DISTRIBUTION_INTERNAL)
- vty_out (vty, " Metric: %d IPv6-Intern %s/%d%s",
+ vty_out (vty, " Metric: %-10d IPv6-Internal %s/%d%s",
ntohl (ipv6_reach->metric),
buff, ipv6_reach->prefix_len, VTY_NEWLINE);
else
- vty_out (vty, " Metric: %d IPv6-Extern %s/%d%s",
+ vty_out (vty, " Metric: %-10d IPv6-External %s/%d%s",
ntohl (ipv6_reach->metric),
buff, ipv6_reach->prefix_len, VTY_NEWLINE);
}
@@ -854,10 +854,11 @@ lsp_print_detail (dnode_t * node, struct vty *vty, char dynhost)
for (ALL_LIST_ELEMENTS (lsp->tlv_data.te_is_neighs, lnode,
lnnode, te_is_neigh))
{
- /* FIXME: metric display is wrong. */
+ uint32_t metric;
+ memcpy (&metric, te_is_neigh->te_metric, 3);
lspid_print (te_is_neigh->neigh_id, LSPid, dynhost, 0);
- vty_out (vty, " Metric: %d extd-IS %s%s",
- te_is_neigh->te_metric[0], LSPid, VTY_NEWLINE);
+ vty_out (vty, " Metric: %-10d IS-Extended %s%s",
+ ntohl (metric << 8), LSPid, VTY_NEWLINE);
}
/* TE IPv4 tlv */
@@ -866,7 +867,7 @@ lsp_print_detail (dnode_t * node, struct vty *vty, char dynhost)
lnnode, te_ipv4_reach))
{
/* FIXME: There should be better way to output this stuff. */
- vty_out (vty, " Metric: %d extd-IP %s/%d%s",
+ vty_out (vty, " Metric: %-10d IP-Extended %s/%d%s",
ntohl (te_ipv4_reach->te_metric),
inet_ntoa (newprefix2inaddr (&te_ipv4_reach->prefix_start,
te_ipv4_reach->control)),