Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
babeld
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
babeld
Commits
2be3f890
Commit
2be3f890
authored
Jun 12, 2013
by
Juliusz Chroboczek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add more options to the config file.
parent
a56c7e8e
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
79 additions
and
1 deletion
+79
-1
babeld.h
babeld.h
+2
-1
babeld.man
babeld.man
+36
-0
configuration.c
configuration.c
+41
-0
No files found.
babeld.h
View file @
2be3f890
...
@@ -92,7 +92,8 @@ extern unsigned char myid[8];
...
@@ -92,7 +92,8 @@ extern unsigned char myid[8];
extern
const
unsigned
char
zeroes
[
16
],
ones
[
16
];
extern
const
unsigned
char
zeroes
[
16
],
ones
[
16
];
extern
int
protocol_port
;
extern
char
*
state_file
;
extern
int
protocol_port
,
local_server_port
;
extern
unsigned
char
protocol_group
[
16
];
extern
unsigned
char
protocol_group
[
16
];
extern
int
protocol_socket
;
extern
int
protocol_socket
;
extern
int
kernel_socket
;
extern
int
kernel_socket
;
...
...
babeld.man
View file @
2be3f890
...
@@ -163,6 +163,42 @@ protocol, and is equivalent to the command-line option
...
@@ -163,6 +163,42 @@ protocol, and is equivalent to the command-line option
.BI protocol-port " port"
.BI protocol-port " port"
This specifies the UDP port number to be used by the protocol, and is equivalent to the command-line option
This specifies the UDP port number to be used by the protocol, and is equivalent to the command-line option
.BR \-p .
.BR \-p .
.TP
.BI kernel-priority " priority"
This specifies the priority value used when installing routes into the
kernel, and is equivalent to the command-line option
.BR \-k .
.TP
.BI allow-duplicates " priority"
This allows duplicating external routes when their kernel priority is
at least
.IR priority .
Do not use this option unless you know what you are doing, as it can
cause persistent route flapping.
.TP
.BR keep-unfeasible " {" true | false }
This specifies whether to keep unfeasible (useless) routes, and is
equivalent to the command-line option
.BR \-u .
.TP
.BI state-file " filename"
This specifies the name of the file used for preserving long-term
information between invocations of the
.B babeld
daemon, and is equivalent to the command-line option
.BR \-S .
.TP
.BI debug " level"
This specifies the debugging level, and is equivalent to the command-line
option
.BR \-d .
.TP
.BI local-port " port"
This specifies the TCP port on which
.B babeld
will listen for connections from a front-end, and is equivalent to the
command-line option
.BR \-g .
.SS Interface configuration
.SS Interface configuration
An interface is configured by a line with the following format:
An interface is configured by a line with the following format:
.IP
.IP
...
...
configuration.c
View file @
2be3f890
...
@@ -35,6 +35,7 @@ THE SOFTWARE.
...
@@ -35,6 +35,7 @@ THE SOFTWARE.
#include "babeld.h"
#include "babeld.h"
#include "util.h"
#include "util.h"
#include "interface.h"
#include "interface.h"
#include "route.h"
#include "configuration.h"
#include "configuration.h"
struct
filter
*
input_filters
=
NULL
;
struct
filter
*
input_filters
=
NULL
;
...
@@ -594,6 +595,46 @@ parse_option(int c, gnc_t gnc, void *closure)
...
@@ -594,6 +595,46 @@ parse_option(int c, gnc_t gnc, void *closure)
goto
error
;
goto
error
;
memcpy
(
protocol_group
,
group
,
16
);
memcpy
(
protocol_group
,
group
,
16
);
free
(
group
);
free
(
group
);
}
else
if
(
strcmp
(
token
,
"kernel-priority"
)
==
0
)
{
int
m
;
c
=
getint
(
c
,
&
m
,
gnc
,
closure
);
if
(
c
<
-
1
||
m
<
0
||
m
>
0xFFFF
)
goto
error
;
kernel_metric
=
m
;
}
else
if
(
strcmp
(
token
,
"allow-duplicates"
)
==
0
)
{
int
a
;
c
=
getint
(
c
,
&
a
,
gnc
,
closure
);
if
(
c
<
-
1
||
a
<
0
||
a
>
0xFFFF
)
goto
error
;
allow_duplicates
=
c
;
}
else
if
(
strcmp
(
token
,
"keep-unfeasible"
)
==
0
)
{
int
u
;
c
=
getbool
(
c
,
&
u
,
gnc
,
closure
);
if
(
c
<
-
1
)
goto
error
;
keep_unfeasible
=
(
u
==
CONFIG_YES
);
}
else
if
(
strcmp
(
token
,
"state-file"
)
==
0
)
{
char
*
file
;
c
=
getstring
(
c
,
&
file
,
gnc
,
closure
);
if
(
c
<
-
1
)
goto
error
;
state_file
=
file
;
}
else
if
(
strcmp
(
token
,
"debug"
)
==
0
)
{
int
d
;
c
=
getint
(
c
,
&
d
,
gnc
,
closure
);
if
(
d
<
0
)
goto
error
;
debug
=
d
;
}
else
if
(
strcmp
(
token
,
"local-port"
)
==
0
)
{
int
p
;
c
=
getint
(
c
,
&
p
,
gnc
,
closure
);
if
(
c
<
-
1
||
p
<
0
||
p
>
0xFFFF
)
goto
error
;
#ifdef NO_LOCAL_INTERFACE
fprintf
(
stderr
,
"Warning: no local interface in this version.
\n
"
);
#else
local_server_port
=
p
;
#endif
}
else
{
}
else
{
goto
error
;
goto
error
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment