[Olsr-cvs] olsrd-current/lib/pgraph/src olsrd_pgraph.c,1.7,1.8

Bernd Petrovitsch (spam-protected)
Thu Sep 13 17:32:01 CEST 2007


Update of /cvsroot/olsrd/olsrd-current/lib/pgraph/src
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv16823/lib/pgraph/src

Modified Files:
	olsrd_pgraph.c 
Log Message:
* patch by Hannes Gredler <(spam-protected)> to consolidate the the link-state database and the spf-calculation

Index: olsrd_pgraph.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/lib/pgraph/src/olsrd_pgraph.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** olsrd_pgraph.c	30 Aug 2007 22:49:12 -0000	1.7
--- olsrd_pgraph.c	13 Sep 2007 15:31:59 -0000	1.8
***************
*** 146,150 ****
  static void ipc_print_neigh_link(struct neighbor_entry *neighbor);
  
! static void ipc_print_tc_link(struct tc_entry *entry, struct topo_dst *dst_entry);
  
  #if 0
--- 146,150 ----
  static void ipc_print_neigh_link(struct neighbor_entry *neighbor);
  
! static void ipc_print_tc_link(struct tc_entry *entry, struct tc_edge_entry *dst_entry);
  
  #if 0
***************
*** 322,327 ****
    olsr_u8_t index;
    struct neighbor_entry *neighbor_table_tmp;
!   struct tc_entry *entry;
!   struct topo_dst *dst_entry;
  
    res = 0;
--- 322,327 ----
    olsr_u8_t index;
    struct neighbor_entry *neighbor_table_tmp;
!   struct tc_entry *tc;
!   struct tc_edge_entry *tc_edge;
  
    res = 0;
***************
*** 347,366 ****
  
        /* 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_print_tc_link(entry, dst_entry);
! 		  dst_entry = dst_entry->next;
! 		}
! 	      entry = entry->next;
! 	    }
! 	}
  
        ipc_send(" end ", strlen(" end "));
--- 347,355 ----
  
        /* Topology */  
!       OLSR_FOR_ALL_TC_ENTRIES(tc) {
!           OLSR_FOR_ALL_TC_EDGE_ENTRIES(tc, tc_edge) {
!               ipc_print_tc_link(tc, tc_edge);
!           } OLSR_FOR_ALL_TC_EDGE_ENTRIES_END(tc, tc_edge);
!       } OLSR_FOR_ALL_TC_ENTRIES_END(tc);
  
        ipc_send(" end ", strlen(" end "));
***************
*** 411,415 ****
  #endif
  
! static void ipc_print_tc_link(struct tc_entry *entry, struct topo_dst *dst_entry)
  {
    char buf[256];
--- 400,404 ----
  #endif
  
! static void ipc_print_tc_link(struct tc_entry *entry, struct tc_edge_entry *dst_entry)
  {
    char buf[256];
***************
*** 419,423 ****
  //  double etx = calc_etx( dst_entry->link_quality, dst_entry->inverse_link_quality );
  
!   main_adr = olsr_ip_to_string(&entry->T_last_addr);
    adr = olsr_ip_to_string(&dst_entry->T_dest_addr);
    len = sprintf( buf, "add link %s %s\n", main_adr, adr );
--- 408,412 ----
  //  double etx = calc_etx( dst_entry->link_quality, dst_entry->inverse_link_quality );
  
!   main_adr = olsr_ip_to_string(&entry->addr);
    adr = olsr_ip_to_string(&dst_entry->T_dest_addr);
    len = sprintf( buf, "add link %s %s\n", main_adr, adr );





More information about the Olsr-cvs mailing list