PATCH by John Hay <jhay@meraka.org.za>:
authorBernd Petrovitsch <bernd@firmix.at>
Sat, 3 Nov 2007 23:11:40 +0000 (23:11 +0000)
committerBernd Petrovitsch <bernd@firmix.at>
Sat, 3 Nov 2007 23:11:40 +0000 (23:11 +0000)
- also printout our own HNAs in the dotdraw plugin.

CHANGELOG
lib/dot_draw/src/olsrd_dot_draw.c

index a3c6524..170f012 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,10 +1,13 @@
 This file states changes as of version 0.2.4:
-$Id: CHANGELOG,v 1.108 2007/11/03 22:56:07 bernd67 Exp $
+$Id: CHANGELOG,v 1.109 2007/11/03 23:11:40 bernd67 Exp $
 
 0.5.5 ---------------------------------------------------------------------
 
 BUGFIX by Hannes Gredler <hannes@gredler.at> fixing not deleted tc entry.
 
+PATCH by John Hay <jhay@meraka.org.za>:
+- also printout our own HNAs in the dotdraw plugin.
+
 PATCHES and CLEANUPS by Bernd Petrovitsch <bernd@firmix.at>
 - Jens Nachtigall <nachtigall@web.de> suggested (and reminded) to use
   olsrd.conf.default.lq as the default installed one.
index 6a94d23..0cdf83a 100644 (file)
@@ -37,7 +37,7 @@
  * to the project. For more information see the website or contact
  * the copyright holders.
  *
- * $Id: olsrd_dot_draw.c,v 1.28 2007/11/02 20:58:07 bernd67 Exp $
+ * $Id: olsrd_dot_draw.c,v 1.29 2007/11/03 23:11:40 bernd67 Exp $
  */
 
 /*
@@ -298,6 +298,9 @@ pcf_event(int changes_neighborhood,
   struct tc_edge_entry *tc_edge;
   struct hna_entry *tmp_hna;
   struct hna_net *tmp_net;
+  struct hna4_entry *hna4;
+  struct hna6_entry *hna6;
+  union hna_netmask hna_msk;
 
   res = 0;
 
@@ -348,6 +351,31 @@ pcf_event(int changes_neighborhood,
            }
        }
 
+      /* Local HNA entries */
+      if (olsr_cnf->ip_version == AF_INET)
+       {
+       hna4 = olsr_cnf->hna4_entries;
+       while(hna4)
+        {
+         hna_msk.v4 = hna4->netmask.v4;
+         ipc_print_net(&olsr_cnf->interfaces->interf->ip_addr,
+                       &hna4->net,
+                       &hna_msk);
+         hna4 = hna4->next;
+        }
+       }
+      else
+       {
+       hna6 = olsr_cnf->hna6_entries;
+       while(hna6)
+        {
+         hna_msk.v6 = hna6->prefix_len;
+         ipc_print_net(&olsr_cnf->interfaces->interf->ip_addr,
+                       &hna6->net,
+                       &hna_msk);
+         hna6 = hna6->next;
+        }
+      }
 
       ipc_send_str("}\n\n");
 
@@ -361,7 +389,6 @@ pcf_event(int changes_neighborhood,
   return res;
 }
 
-
 static void
 ipc_print_tc_link(struct tc_entry *entry, struct tc_edge_entry *dst_entry)
 {