[Olsr-cvs] olsrd-current/src main.c,1.85,1.86

Andreas T�nnesen (spam-protected)
Sat Jan 7 19:05:07 CET 2006


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

Modified Files:
	main.c 
Log Message:
Addee LQ command line options

Index: main.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/src/main.c,v
retrieving revision 1.85
retrieving revision 1.86
diff -C2 -d -r1.85 -r1.86
*** main.c	7 Jan 2006 17:18:32 -0000	1.85
--- main.c	7 Jan 2006 18:05:05 -0000	1.86
***************
*** 505,508 ****
--- 505,509 ----
    fprintf(stderr, "usage: olsrd [-f <configfile>] [ -i interface1 interface2 ... ]\n");
    fprintf(stderr, "  [-d <debug_level>] [-ipv6] [-multi <IPv6 multicast address>]\n"); 
+   fprintf(stderr, "  [-lql <LQ level>] [-lqw <LQ winsize>]\n"); 
    fprintf(stderr, "  [-bcast <broadcastaddr>] [-ipc] [-dispin] [-dispout] [-delgw]\n");
    fprintf(stderr, "  [-hint <hello interval (secs)>] [-tcint <tc interval (secs)>]\n");
***************
*** 609,612 ****
--- 610,649 ----
  	  continue;
  	}
+ 
+       /*
+        * Set LQ level
+        */
+       if (strcmp(*argv, "-lql") == 0) 
+ 	{
+ 	  int tmp_lq_level;
+ 	  NEXT_ARG;
+           CHECK_ARGC;
+ 	  
+ 	  /* Sanity checking is done later */
+ 	  sscanf(*argv, "%d", &tmp_lq_level);
+ 	  olsr_cnf->lq_level = tmp_lq_level;
+ 	  continue;
+ 	}
+ 
+       /*
+        * Set LQ winsize
+        */
+       if (strcmp(*argv, "-lqw") == 0) 
+ 	{
+ 	  int tmp_lq_wsize;
+ 	  NEXT_ARG;
+           CHECK_ARGC;
+ 	  
+ 	  sscanf(*argv, "%d", &tmp_lq_wsize);
+ 
+ 	  if(tmp_lq_wsize < MIN_LQ_WSIZE || tmp_lq_wsize > MAX_LQ_WSIZE)
+ 	    {
+ 	      printf("LQ winsize %d not allowed. Range [%d-%d]\n", 
+ 		     tmp_lq_wsize, MIN_LQ_WSIZE, MAX_LQ_WSIZE);
+ 	      olsr_exit(__func__, EXIT_FAILURE);
+ 	    }
+ 	  olsr_cnf->lq_wsize = tmp_lq_wsize;
+ 	  continue;
+ 	}
        
        /*





More information about the Olsr-cvs mailing list