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
c7f860f2
Commit
c7f860f2
authored
Jun 02, 2007
by
Juliusz Chroboczek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement -c.
parent
676a011e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
3 deletions
+10
-3
babel.c
babel.c
+7
-2
message.c
message.c
+2
-1
message.h
message.h
+1
-0
No files found.
babel.c
View file @
c7f860f2
...
...
@@ -161,6 +161,11 @@ main(int argc, char **argv)
goto
syntax
;
}
else
if
(
strcmp
(
*
arg
,
"-P"
)
==
0
)
{
parasitic
=
1
;
}
else
if
(
strcmp
(
*
arg
,
"-c"
)
==
0
)
{
SHIFTE
();
add_cost
=
atoi
(
*
arg
);
if
(
add_cost
<
0
||
add_cost
>
INFINITY
)
goto
syntax
;
}
else
if
(
strcmp
(
*
arg
,
"-s"
)
==
0
)
{
split_horizon
=
0
;
}
else
if
(
strcmp
(
*
arg
,
"-b"
)
==
0
)
{
...
...
@@ -485,9 +490,9 @@ main(int argc, char **argv)
" "
"[-h hello_interval] [-H wired_hello_interval]
\n
"
" "
"[-u update_interval] [-k metric] [-s] [-P] [-
d level
]
\n
"
"[-u update_interval] [-k metric] [-s] [-P] [-
c cost
]
\n
"
" "
"[-n net cost]... address interface...
\n
"
,
"[-
d level] [-
n net cost]... address interface...
\n
"
,
argv
[
0
]);
exit
(
1
);
...
...
message.c
View file @
c7f860f2
...
...
@@ -43,6 +43,7 @@ const unsigned char packet_header[4] = {42, 0, 0, 0};
unsigned
int
jitter
;
unsigned
int
update_jitter
;
int
add_cost
=
0
;
int
parasitic
=
0
;
int
silent_time
=
30
;
int
broadcast_txcost
=
0
;
...
...
@@ -384,7 +385,7 @@ flushupdates(void)
route
->
nexthop
->
network
==
net
)
continue
;
seqno
=
route
->
seqno
;
metric
=
route
->
metric
;
metric
=
MIN
(
route
->
metric
+
add_cost
,
INFINITY
)
;
}
else
{
seqno
=
buffered_updates
[
i
]
->
seqno
;
metric
=
INFINITY
;
...
...
message.h
View file @
c7f860f2
...
...
@@ -26,6 +26,7 @@ extern int seqno_interval;
extern
unsigned
int
jitter
;
extern
unsigned
int
update_jitter
;
extern
int
add_cost
;
extern
int
parasitic
;
extern
int
silent_time
;
extern
int
broadcast_txcost
;
...
...
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