[Olsr-cvs] olsrd-current/src/cfgparser cfgfile_gen.c, 1.2, 1.3 olsrd_conf.c, 1.48, 1.49 oparse.y, 1.28, 1.29 oscan.lex, 1.20, 1.21
Andreas T�nnesen
(spam-protected)
Mon Apr 17 20:31:11 CEST 2006
- Previous message: [Olsr-cvs] olsrd-current/files olsrd.conf.default.lq, 1.1, 1.1.2.1 olsrd.conf.default.lq-fisheye, 1.2, 1.2.2.1 olsrd.conf.default.rfc, 1.2, 1.2.2.1 olsrd.conf.win32.lq, 1.1, 1.1.2.1 olsrd.conf.win32.rfc, 1.1, 1.1.2.1
- Next message: [Olsr-cvs] olsrd-current/files olsrd.conf.5.gz, 1.7, 1.8 olsrd.conf.default.lq, 1.1, 1.2 olsrd.conf.default.lq-fisheye, 1.2, 1.3 olsrd.conf.default.rfc, 1.2, 1.3 olsrd.conf.win32.lq, 1.1, 1.2 olsrd.conf.win32.rfc, 1.1, 1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/olsrd/olsrd-current/src/cfgparser
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15372/src/cfgparser
Modified Files:
cfgfile_gen.c olsrd_conf.c oparse.y oscan.lex
Log Message:
Added new config options NicChgsPollInt and AutoDetectChanges
Index: cfgfile_gen.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/src/cfgparser/cfgfile_gen.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** cfgfile_gen.c 30 Dec 2005 02:24:00 -0000 1.2
--- cfgfile_gen.c 17 Apr 2006 18:31:09 -0000 1.3
***************
*** 179,182 ****
--- 179,186 ----
fprintf(fd, "Pollrate\t%0.2f\n", cnf->pollrate);
+ /* NIC Changes Pollrate */
+ fprintf(fd, "# Interval to poll network interfaces for configuration\n# changes. Defaults to 2.5 seconds\n");
+ fprintf(fd, "NicChgsPollInt\t%0.2f\n", cnf->nic_chgs_pollrate);
+
/* TC redundancy */
fprintf(fd, "# TC redundancy\n# Specifies how much neighbor info should\n# be sent in TC messages\n# Possible values are:\n# 0 - only send MPR selectors\n# 1 - send MPR selectors and MPRs\n# 2 - send all neighbors\n#\n# defaults to 0\n\n");
***************
*** 255,259 ****
!
fprintf(fd, " # Emission and validity intervals.\n # If not defined, RFC proposed values will\n # in most cases be used.\n\n");
--- 259,264 ----
! fprintf(fd, " # Olsrd can autodetect changes in\n # interface configurations. Enabled by default\n # turn off to save CPU.\n AutoDetectChanges: %s\n", in->cnf->autodetect_chg ? "yes" : "no");
!
fprintf(fd, " # Emission and validity intervals.\n # If not defined, RFC proposed values will\n # in most cases be used.\n\n");
Index: oscan.lex
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/src/cfgparser/oscan.lex,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** oscan.lex 19 Nov 2005 08:49:44 -0000 1.20
--- oscan.lex 17 Apr 2006 18:31:09 -0000 1.21
***************
*** 277,280 ****
--- 277,285 ----
}
+ "NicChgsPollInt" {
+ yylval = NULL;
+ return TOK_NICCHGSPOLLRT;
+ }
+
"Hna4" {
yylval = NULL;
***************
*** 446,450 ****
return TOK_HNAVAL;
}
!
--- 451,458 ----
return TOK_HNAVAL;
}
! "AutoDetectChanges" {
! yylval = NULL;
! return TOK_AUTODETCHG;
! }
Index: olsrd_conf.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/src/cfgparser/olsrd_conf.c,v
retrieving revision 1.48
retrieving revision 1.49
diff -C2 -d -r1.48 -r1.49
*** olsrd_conf.c 9 Mar 2006 15:05:27 -0000 1.48
--- olsrd_conf.c 17 Apr 2006 18:31:09 -0000 1.49
***************
*** 247,250 ****
--- 247,259 ----
}
+ /* NIC Changes Pollrate */
+
+ if(cnf->nic_chgs_pollrate < MIN_NICCHGPOLLRT ||
+ cnf->nic_chgs_pollrate > MAX_NICCHGPOLLRT)
+ {
+ fprintf(stderr, "NIC Changes Pollrate %0.2f is not allowed\n", cnf->nic_chgs_pollrate);
+ return -1;
+ }
+
/* TC redundancy */
***************
*** 449,452 ****
--- 458,462 ----
cnf->pollrate = DEF_POLLRATE;
+ cnf->nic_chgs_pollrate = DEF_NICCHGPOLLRT;
cnf->tc_redundancy = TC_REDUNDANCY;
***************
*** 502,505 ****
--- 512,516 ----
io->hna_params.emission_interval = HNA_INTERVAL;
io->hna_params.validity_time = HNA_HOLD_TIME;
+ io->autodetect_chg = OLSR_TRUE;
return io;
***************
*** 560,563 ****
--- 571,576 ----
printf("Pollrate : %0.2f\n", cnf->pollrate);
+ printf("NIC ChangPollrate: %0.2f\n", cnf->nic_chgs_pollrate);
+
printf("TC redundancy : %d\n", cnf->tc_redundancy);
***************
*** 612,616 ****
ipv6_buf, mult->val);
}
!
in = in->next;
}
--- 625,631 ----
ipv6_buf, mult->val);
}
!
! printf("\tAutodetetc changes : %s\n", in->cnf->autodetect_chg ? "yes" : "no");
!
in = in->next;
}
Index: oparse.y
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/src/cfgparser/oparse.y,v
retrieving revision 1.28
retrieving revision 1.29
diff -C2 -d -r1.28 -r1.29
*** oparse.y 17 Nov 2005 04:25:44 -0000 1.28
--- oparse.y 17 Apr 2006 18:31:09 -0000 1.29
***************
*** 146,149 ****
--- 146,150 ----
%token TOK_HYSTLOWER
%token TOK_POLLRATE
+ %token TOK_NICCHGSPOLLRT
%token TOK_TCREDUNDANCY
%token TOK_MPRCOVERAGE
***************
*** 174,177 ****
--- 175,179 ----
%token TOK_HNAINT
%token TOK_HNAVAL
+ %token TOK_AUTODETCHG
%token TOK_IP4_ADDR
***************
*** 198,201 ****
--- 200,204 ----
| fhystlower
| fpollrate
+ | fnicchgspollrt
| atcredundancy
| amprcoverage
***************
*** 273,276 ****
--- 276,280 ----
| isethnaint
| isethnaval
+ | isetautodetchg
| isetlqmult
;
***************
*** 628,631 ****
--- 632,652 ----
}
;
+ isetautodetchg: TOK_AUTODETCHG TOK_BOOLEAN
+ {
+ int ifcnt = ifs_in_curr_cfg;
+ struct olsr_if *ifs = cnf->interfaces;
+
+ if(PARSER_DEBUG) printf("\tAutodetect changes: %s\n", $2->boolean ? "YES" : "NO");
+ while(ifcnt)
+ {
+ ifs->cnf->autodetect_chg = $2->boolean;
+
+ ifs = ifs->next;
+ ifcnt--;
+ }
+
+ free($2);
+ }
+ ;
isetlqmult: TOK_LQ_MULT TOK_DEFAULT TOK_FLOAT
***************
*** 875,878 ****
--- 896,907 ----
;
+ fnicchgspollrt: TOK_NICCHGSPOLLRT TOK_FLOAT
+ {
+ if(PARSER_DEBUG) printf("NIC Changes Pollrate %0.2f\n", $2->floating);
+ cnf->nic_chgs_pollrate = $2->floating;
+
+ free($2);
+ }
+ ;
atcredundancy: TOK_TCREDUNDANCY TOK_INTEGER
- Previous message: [Olsr-cvs] olsrd-current/files olsrd.conf.default.lq, 1.1, 1.1.2.1 olsrd.conf.default.lq-fisheye, 1.2, 1.2.2.1 olsrd.conf.default.rfc, 1.2, 1.2.2.1 olsrd.conf.win32.lq, 1.1, 1.1.2.1 olsrd.conf.win32.rfc, 1.1, 1.1.2.1
- Next message: [Olsr-cvs] olsrd-current/files olsrd.conf.5.gz, 1.7, 1.8 olsrd.conf.default.lq, 1.1, 1.2 olsrd.conf.default.lq-fisheye, 1.2, 1.3 olsrd.conf.default.rfc, 1.2, 1.3 olsrd.conf.win32.lq, 1.1, 1.2 olsrd.conf.win32.rfc, 1.1, 1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Olsr-cvs
mailing list