]> git.proxmox.com Git - mirror_frr.git/commitdiff
* isis_lsp.c: Better output of detailed LSP printout and fixed TE IPv4
authorhasso <hasso>
Mon, 19 Sep 2005 06:35:47 +0000 (06:35 +0000)
committerhasso <hasso>
Mon, 19 Sep 2005 06:35:47 +0000 (06:35 +0000)
  reachibility metric display.

isisd/ChangeLog
isisd/isis_lsp.c

index 402477b66c654a5665d86bfdf8d5bafd6de8bab2..3735b4fcb1a586440aae3826e8d203839c532979 100644 (file)
@@ -1,3 +1,8 @@
+2005-09-19 Hasso Tepper <hasso at quagga.net>
+
+       * isis_lsp.c: Better output of detailed LSP printout and fixed TE IPv4
+         reachibility metric display.
+
 2005-09-19 Hasso Tepper <hasso at quagga.net>
 
        * isis_tlv.h: Cleanup comment about TLVs we should support, remove info
index 26c46a2f1a7aa7f77132961047569c47d8a98fde..d02f383365c2f09da6295879d083b1085c2a295e 100644 (file)
@@ -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)),