[Olsr-cvs] olsrd-current/src interfaces.h, 1.33, 1.34 lq_packet.c, 1.20, 1.21

Thomas Lopatic (spam-protected)
Wed Oct 11 22:58:47 CEST 2006


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

Modified Files:
	interfaces.h lq_packet.c 
Log Message:
Make TTL index a per-interface value.


Index: lq_packet.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/src/lq_packet.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** lq_packet.c	7 Jan 2006 08:16:20 -0000	1.20
--- lq_packet.c	11 Oct 2006 20:58:45 -0000	1.21
***************
*** 152,156 ****
    struct link_entry *link;
    static int ttl_list[] = { MAX_TTL, 3, 2, 1, 2, 1, 1, 3, 2, 1, 2, 1, 1, 0 };
-   static int ttl_index = 0;
  
    // remember that we have generated an LQ TC message; this is
--- 152,155 ----
***************
*** 169,176 ****
    if (olsr_cnf->lq_fish > 0)
    {
!     if (ttl_list[ttl_index] == 0)
!       ttl_index = 0;
  
!     lq_tc->comm.ttl = ttl_list[ttl_index++];
  
      OLSR_PRINTF(3, "Creating LQ TC with TTL %d.\n", lq_tc->comm.ttl);
--- 168,175 ----
    if (olsr_cnf->lq_fish > 0)
    {
!     if (ttl_list[outif->ttl_index] == 0)
!       outif->ttl_index = 0;
  
!     lq_tc->comm.ttl = ttl_list[outif->ttl_index++];
  
      OLSR_PRINTF(3, "Creating LQ TC with TTL %d.\n", lq_tc->comm.ttl);

Index: interfaces.h
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/src/interfaces.h,v
retrieving revision 1.33
retrieving revision 1.34
diff -C2 -d -r1.33 -r1.34
*** interfaces.h	17 Apr 2006 18:31:09 -0000	1.33
--- interfaces.h	11 Oct 2006 20:58:45 -0000	1.34
***************
*** 143,146 ****
--- 143,148 ----
    struct        if_gen_property *gen_properties;/* Generic interface properties */
  
+   int           ttl_index; /* index in TTL array for fish-eye */
+ 
    struct	interface *int_next;
  };





More information about the Olsr-cvs mailing list