Automated merge with http://olsrd.sf.net/hg/olsrd
authorHannes Gredler <hannes@gredler.at>
Wed, 5 Mar 2008 09:41:48 +0000 (10:41 +0100)
committerHannes Gredler <hannes@gredler.at>
Wed, 5 Mar 2008 09:41:48 +0000 (10:41 +0100)
1  2 
lib/txtinfo/src/olsrd_txtinfo.c

@@@ -346,6 -348,31 +348,29 @@@ static void ipc_print_neigh(void
      ipc_sendf("\n");
  }
  
 -    link = link_set;
 -    while(link)       {
+ static void ipc_print_link(void)
+ {
+     struct ipaddr_str buf1, buf2;
+     struct link_entry *link = NULL;
+     ipc_sendf("Table: Links\nLocal IP\tremote IP\tHysteresis\tLinkQuality\tlost\ttotal\tNLQ\tETX\n");
+     /* Link set */
 -        link = link->next;
 -    }
++    FOR_ALL_LINK_ENTRIES(link) {
+       ipc_sendf( "%s\t%s\t%0.2f\t%0.2f\t%d\t%d\t%0.2f\t%0.2f\t\n",
+                    olsr_ip_to_string(&buf1, &link->local_iface_addr),
+                    olsr_ip_to_string(&buf2, &link->neighbor_iface_addr),
+                    link->L_link_quality, 
+                    link->loss_link_quality,
+                    link->lost_packets, 
+                    link->total_packets,
+                    link->neigh_link_quality, 
+                    olsr_calc_link_etx(link));
++    } FOR_ALL_LINK_ENTRIES_END(link);
+     ipc_sendf("\n");
+ }
  static void ipc_print_routes(void)
  {
      struct ipaddr_str buf1, buf2;