[Olsr-cvs] olsrd-current/lib/txtinfo/src olsrd_txtinfo.c,1.9,1.10
Bernd Petrovitsch
(spam-protected)
Thu Sep 13 17:32:01 CEST 2007
Update of /cvsroot/olsrd/olsrd-current/lib/txtinfo/src
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv16823/lib/txtinfo/src
Modified Files:
olsrd_txtinfo.c
Log Message:
* patch by Hannes Gredler <(spam-protected)> to consolidate the the link-state database and the spf-calculation
Index: olsrd_txtinfo.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/lib/txtinfo/src/olsrd_txtinfo.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** olsrd_txtinfo.c 5 Sep 2007 16:17:36 -0000 1.9
--- olsrd_txtinfo.c 13 Sep 2007 15:31:59 -0000 1.10
***************
*** 337,366 ****
static void ipc_print_topology(void)
{
! int index;
! struct tc_entry *entry;
! struct topo_dst *dst_entry;
ipc_sendf("Table: Topology\nDestination IP\tLast hop IP\tLQ\tILQ\tETX\n");
/* Topology */
! for(index = 0; index < HASHSIZE; index++) {
! /* For all TC entries */
! entry = tc_table[index].next;
! while(entry != &tc_table[index]) {
! /* For all destination entries of that TC entry */
! dst_entry = entry->destinations.next;
! while(dst_entry != &entry->destinations) {
! ipc_sendf( "%s\t%s\t%0.2f\t%0.2f\t%0.2f\n",
! olsr_ip_to_string(&dst_entry->T_dest_addr),
! olsr_ip_to_string(&entry->T_last_addr),
! dst_entry->link_quality,
! dst_entry->inverse_link_quality,
! (dst_entry->link_quality * dst_entry->inverse_link_quality) ? 1.0 / (dst_entry->link_quality * dst_entry->inverse_link_quality) : 0.0);
!
! dst_entry = dst_entry->next;
! }
! entry = entry->next;
! }
! }
ipc_sendf("\n");
}
--- 337,358 ----
static void ipc_print_topology(void)
{
! struct tc_entry *tc;
! struct tc_edge_entry *tc_edge;
ipc_sendf("Table: Topology\nDestination IP\tLast hop IP\tLQ\tILQ\tETX\n");
/* Topology */
! OLSR_FOR_ALL_TC_ENTRIES(tc) {
! OLSR_FOR_ALL_TC_EDGE_ENTRIES(tc, tc_edge) {
! ipc_sendf( "%s\t%s\t%0.2f\t%0.2f\t%0.2f\n",
! olsr_ip_to_string(&tc_edge->T_dest_addr),
! olsr_ip_to_string(&tc->addr),
! tc_edge->link_quality,
! tc_edge->inverse_link_quality,
! (tc_edge->link_quality * tc_edge->inverse_link_quality) ? 1.0 / (tc_edge->link_quality * tc_edge->inverse_link_quality) : 0.0);
!
! } OLSR_FOR_ALL_TC_EDGE_ENTRIES_END(tc, tc_edge);
! } OLSR_FOR_ALL_TC_ENTRIES_END(tc);
!
ipc_sendf("\n");
}
More information about the Olsr-cvs
mailing list