[Olsr-cvs] olsrd-current/src/cfgparser cfgfile_gen.c, 1.7, 1.8 olsrd_conf.c, 1.54, 1.55 oparse.y, 1.33, 1.34 oscan.lex, 1.24, 1.25
Bernd Petrovitsch
(spam-protected)
Thu Sep 13 18:08:15 CEST 2007
Update of /cvsroot/olsrd/olsrd-current/src/cfgparser
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv632/src/cfgparser
Modified Files:
cfgfile_gen.c olsrd_conf.c oparse.y oscan.lex
Log Message:
* added 104-olsrd-policy-routing.patch by Sven-Ola Tücke <(spam-protected)> (with trivial changes)
Index: cfgfile_gen.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/src/cfgparser/cfgfile_gen.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** cfgfile_gen.c 12 Sep 2007 14:06:19 -0000 1.7
--- cfgfile_gen.c 13 Sep 2007 16:08:13 -0000 1.8
***************
*** 124,127 ****
--- 124,131 ----
fprintf(fd, "TosValue\t%d\n\n", cnf->tos);
+ /* RtTable */
+ fprintf(fd, "# Policy Routing Table to use. Default is 254\n\n");
+ fprintf(fd, "RtTable\t%d\n\n", cnf->rttable);
+
/* Willingness */
fprintf(fd, "# The fixed willingness to use(0-7)\n# If not set willingness will be calculated\n# dynammically based on battery/power status\n\n");
***************
*** 435,438 ****
--- 439,446 ----
WRITE_TO_BUF("TosValue\t%d\n\n", cnf->tos)
+ /* RtTable */
+ WRITE_TO_BUF("# Policy Routing Tableto use. Default is 254\n\n")
+ WRITE_TO_BUF("RtTable\t%d\n\n", cnf->rttable)
+
/* Willingness */
WRITE_TO_BUF("# The fixed willingness to use(0-7)\n# If not set willingness will be calculated\n# dynammically based on battery/power status\n\n")
Index: oscan.lex
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/src/cfgparser/oscan.lex,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -d -r1.24 -r1.25
*** oscan.lex 17 May 2007 20:35:16 -0000 1.24
--- oscan.lex 13 Sep 2007 16:08:13 -0000 1.25
***************
*** 300,303 ****
--- 300,308 ----
}
+ "RtTable" {
+ yylval = NULL;
+ return TOK_RTTABLE;
+ }
+
"Willingness" {
yylval = NULL;
Index: olsrd_conf.c
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/src/cfgparser/olsrd_conf.c,v
retrieving revision 1.54
retrieving revision 1.55
diff -C2 -d -r1.54 -r1.55
*** olsrd_conf.c 13 May 2007 22:23:55 -0000 1.54
--- olsrd_conf.c 13 Sep 2007 16:08:13 -0000 1.55
***************
*** 447,450 ****
--- 447,451 ----
cnf->allow_no_interfaces = DEF_ALLOW_NO_INTS;
cnf->tos = DEF_TOS;
+ cnf->rttable = 254;
cnf->willingness_auto = DEF_WILL_AUTO;
cnf->ipc_connections = DEF_IPC_CONNECTIONS;
***************
*** 474,478 ****
--- 475,483 ----
cnf->max_tc_vtime = 0.0;
cnf->ioctl_s = 0;
+ #if LINUX_POLICY_ROUTING
+ cnf->rtnl_s = 0;
+ #else
cnf->rts = 0;
+ #endif
}
***************
*** 550,553 ****
--- 555,559 ----
printf("No interfaces : NOT ALLOWED\n");
printf("TOS : 0x%02x\n", cnf->tos);
+ printf("RtTable : 0x%02x\n", cnf->rttable);
if(cnf->willingness_auto)
printf("Willingness : AUTO\n");
Index: oparse.y
===================================================================
RCS file: /cvsroot/olsrd/olsrd-current/src/cfgparser/oparse.y,v
retrieving revision 1.33
retrieving revision 1.34
diff -C2 -d -r1.33 -r1.34
*** oparse.y 13 May 2007 21:49:59 -0000 1.33
--- oparse.y 13 Sep 2007 16:08:13 -0000 1.34
***************
*** 144,147 ****
--- 144,148 ----
%token TOK_NOINT
%token TOK_TOS
+ %token TOK_RTTABLE
%token TOK_WILLINGNESS
%token TOK_IPCCON
***************
*** 198,201 ****
--- 199,203 ----
| bnoint
| atos
+ | arttable
| awillingness
| busehyst
***************
*** 835,838 ****
--- 837,850 ----
;
+ arttable: TOK_RTTABLE TOK_INTEGER
+ {
+ if(PARSER_DEBUG) printf("RtTable: %d\n", $2->integer);
+ cnf->rttable = $2->integer;
+
+ free($2);
+
+ }
+ ;
+
awillingness: TOK_WILLINGNESS TOK_INTEGER
{
More information about the Olsr-cvs
mailing list