]> git.puffer.fish Git - matthieu/frr.git/commitdiff
2003-06-27 Paul Jakma <paul@dishone.st>
authorpaul <paul>
Fri, 27 Jun 2003 01:28:45 +0000 (01:28 +0000)
committerpaul <paul>
Fri, 27 Jun 2003 01:28:45 +0000 (01:28 +0000)
        * ospf_vty.c: (global) add, unused, description array for lsa flags.
  (show_ip_ospf_database_header): pretty print options, printf hex
          numbers as 0x, print lsa flags and note if it is a translated LSA.
          (show_lsa_detail_proc): print out OSPF_LSA_LOCAL_XLT LSAs.
* ospf_packet.c: (ospf_write) print out destination IP in debug info
          if write fails.

ospfd/ospf_packet.c
ospfd/ospf_vty.c

index 89d35c5847d282e199904941a6a4935cfc05f321..7bd48223c2ba1b44c6f8de4e9bff9f9d2dc36e20 100644 (file)
@@ -558,7 +558,8 @@ ospf_write (struct thread *thread)
   ret = sendmsg (ospf->fd, &msg, flags);
   
   if (ret < 0)
-    zlog_warn ("*** sendmsg in ospf_write failed with %s", strerror (errno));
+    zlog_warn ("*** sendmsg in ospf_write to %s failed with %s", 
+               inet_ntoa (iph.ip_dst), strerror (errno));
 
   /* Retrieve OSPF packet type. */
   stream_set_getp (op->s, 1);
index d02214dd7dfbbb1e57722789eb049fff47c4e440..392b7ae00801868e9f6a29a4b9973a0f192846ff 100644 (file)
@@ -3196,13 +3196,32 @@ char *show_database_header[] =
 #endif /* HAVE_OPAQUE_LSA */
 };
 
+char *show_lsa_flags[] =
+{
+  "Self-originated",
+  "Checked",
+  "Received",
+  "Approved",
+  "Discard",
+#ifdef HAVE_NSSA
+  "Translated",
+#endif
+};
+
 void
 show_ip_ospf_database_header (struct vty *vty, struct ospf_lsa *lsa)
 {
   struct router_lsa *rlsa = (struct router_lsa*) lsa->data;
-
+  
   vty_out (vty, "  LS age: %d%s", LS_AGE (lsa), VTY_NEWLINE);
-  vty_out (vty, "  Options: %d%s", lsa->data->options, VTY_NEWLINE);
+  vty_out (vty, "  Options: 0x%-2x : %s%s", 
+           lsa->data->options,
+           ospf_options_dump(lsa->data->options), 
+           VTY_NEWLINE);
+  vty_out (vty, "  LS Flags: 0x%-2x %s%s",
+           lsa->flags, 
+           ((lsa->flags & OSPF_LSA_LOCAL_XLT) ? "(Translated from Type-7)" : ""),
+           VTY_NEWLINE);
 
   if (lsa->data->type == OSPF_ROUTER_LSA)
     {
@@ -3534,12 +3553,6 @@ show_lsa_detail_proc (struct vty *vty, struct route_table *rt,
       for (rn = start; rn; rn = route_next_until (rn, start))
        if ((lsa = rn->info))
          {
-#ifdef HAVE_NSSA
-           /* Stay away from any Local Translated Type-7 LSAs */
-           if (CHECK_FLAG (lsa->flags, OSPF_LSA_LOCAL_XLT))
-             continue;
-#endif /* HAVE_NSSA */
-
            if (show_function[lsa->data->type] != NULL)
              show_function[lsa->data->type] (vty, lsa);
          }