[Olsr-cvs] olsrd-current/src lq_packet.c, 1.18, 1.19 olsr_cfg.h, 1.25, 1.26 parser.c, 1.27, 1.28

Thomas Lopatic (spam-protected)
Thu Nov 17 02:58:54 CET 2005


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

Modified Files:
	lq_packet.c olsr_cfg.h parser.c 
Log Message:
Added experimental LinkQualityFishEye configuration option, which enables
us to shrink LQ TC intervals without swamping the network with LQ TCs. Look
at create_lq_tc() in lq_packet.c.


Index: parser.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/src/parser.c,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -d -r1.27 -r1.28
*** parser.c	4 Jun 2005 15:13:53 -0000	1.27
--- parser.c	17 Nov 2005 01:58:52 -0000	1.28
***************
*** 242,246 ****
  	{
  	  /* IPv4 */
! 	  if (m->v4.ttl <= 0)
  	    {
  	      OLSR_PRINTF(2, "Dropping packet type %d from neigh %s with TTL 0\n", 
--- 242,246 ----
  	{
  	  /* IPv4 */
! 	  if (m->v4.ttl <= 0 && olsr_cnf->lq_fish == 0)
  	    {
  	      OLSR_PRINTF(2, "Dropping packet type %d from neigh %s with TTL 0\n", 
***************
*** 253,257 ****
  	{
  	  /* IPv6 */
! 	  if (m->v6.ttl <= 0) 
  	    {
  	      OLSR_PRINTF(2, "Dropping packet type %d from %s with TTL 0\n", 
--- 253,257 ----
  	{
  	  /* IPv6 */
! 	  if (m->v6.ttl <= 0 && olsr_cnf->lq_fish == 0) 
  	    {
  	      OLSR_PRINTF(2, "Dropping packet type %d from %s with TTL 0\n", 

Index: olsr_cfg.h
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/src/olsr_cfg.h,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -d -r1.25 -r1.26
*** olsr_cfg.h	30 May 2005 13:13:38 -0000	1.25
--- olsr_cfg.h	17 Nov 2005 01:58:52 -0000	1.26
***************
*** 55,58 ****
--- 55,59 ----
  #define DEF_USE_HYST        OLSR_TRUE
  #define DEF_LQ_LEVEL        0
+ #define DEF_LQ_FISH         0
  #define DEF_LQ_WSIZE        10
  #define DEF_CLEAR_SCREEN    OLSR_FALSE
***************
*** 207,210 ****
--- 208,212 ----
    olsr_u8_t                lq_level;
    olsr_u32_t               lq_wsize;
+   olsr_u8_t                lq_fish;
    struct plugin_entry      *plugins;
    struct hna4_entry        *hna4_entries;

Index: lq_packet.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/src/lq_packet.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** lq_packet.c	23 Oct 2005 20:58:14 -0000	1.18
--- lq_packet.c	17 Nov 2005 01:58:51 -0000	1.19
***************
*** 150,153 ****
--- 150,155 ----
    struct neighbor_entry *walker;
    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
***************
*** 164,168 ****
    COPY_IP(&lq_tc->comm.orig, &main_addr);
  
!   lq_tc->comm.ttl = MAX_TTL;
    lq_tc->comm.hops = 0;
    lq_tc->comm.seqno = get_msg_seqno();
--- 166,182 ----
    COPY_IP(&lq_tc->comm.orig, &main_addr);
  
!   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);
!   }
! 
!   else
!     lq_tc->comm.ttl = MAX_TTL;
! 
    lq_tc->comm.hops = 0;
    lq_tc->comm.seqno = get_msg_seqno();





More information about the Olsr-cvs mailing list