[Olsr-cvs] olsrd-current/src main.c,1.83,1.83.2.1
Andreas T�nnesen
(spam-protected)
Sat Jan 7 19:06:13 CET 2006
Update of /cvsroot/olsrd/olsrd-current/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18225
Modified Files:
Tag: olsrd_04
main.c
Log Message:
Added LQ command line options
Index: main.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/src/main.c,v
retrieving revision 1.83
retrieving revision 1.83.2.1
diff -C2 -d -r1.83 -r1.83.2.1
*** main.c 29 Sep 2005 05:53:34 -0000 1.83
--- main.c 7 Jan 2006 18:06:11 -0000 1.83.2.1
***************
*** 529,532 ****
--- 529,533 ----
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");
***************
*** 633,636 ****
--- 634,673 ----
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