[Olsr-dev] dot_draw does not show its own HNA

John Hay (spam-protected)
Fri Nov 2 06:37:30 CET 2007


On Thu, Nov 01, 2007 at 10:01:56PM +0100, Jens Nachtigall wrote:
> Hi all,
> 
> with latest 0.5.4 I noticed that the dot_draw plugin does not print the nodes 
> own HNA set, but only the HNA sets announced by foreign nodes.

It is not new. It has been like that in 4.10 too. I do not know about
earlier versions. Here is what I have used on previous versions. I
have not tried it on 0.5.4 yet though.

John
-- 
John Hay -- (spam-protected) / (spam-protected)


B
--- lib/dot_draw/src/olsrd_dot_draw.c.orig	2007-07-23 14:58:38.000000000 +0200
+++ lib/dot_draw/src/olsrd_dot_draw.c	2007-08-15 12:42:40.000000000 +0200
@@ -301,6 +336,9 @@
   struct topo_dst *dst_entry;
   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;
 
@@ -362,6 +400,31 @@
 	    }
 	}
 
+      /* 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");
 




More information about the Olsr-dev mailing list