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
5d715b56
Commit
5d715b56
authored
Oct 25, 2008
by
Juliusz Chroboczek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement route_old and route_expired.
parent
131be267
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
0 deletions
+14
-0
route.c
route.c
+12
-0
route.h
route.h
+2
-0
No files found.
route.c
View file @
5d715b56
...
@@ -215,6 +215,18 @@ route_feasible(struct route *route)
...
@@ -215,6 +215,18 @@ route_feasible(struct route *route)
return
update_feasible
(
route
->
src
,
route
->
seqno
,
route
->
refmetric
);
return
update_feasible
(
route
->
src
,
route
->
seqno
,
route
->
refmetric
);
}
}
int
route_old
(
struct
route
*
route
)
{
return
route
->
time
<
now
.
tv_sec
-
route
->
hold_time
*
7
/
8
;
}
int
route_expired
(
struct
route
*
route
)
{
return
route
->
time
<
now
.
tv_sec
-
route
->
hold_time
;
}
int
int
update_feasible
(
struct
source
*
src
,
update_feasible
(
struct
source
*
src
,
unsigned
short
seqno
,
unsigned
short
refmetric
)
unsigned
short
seqno
,
unsigned
short
refmetric
)
...
...
route.h
View file @
5d715b56
...
@@ -47,6 +47,8 @@ void uninstall_route(struct route *route);
...
@@ -47,6 +47,8 @@ void uninstall_route(struct route *route);
void
switch_route
(
struct
route
*
old
,
struct
route
*
new
);
void
switch_route
(
struct
route
*
old
,
struct
route
*
new
);
void
change_route_metric
(
struct
route
*
route
,
unsigned
newmetric
);
void
change_route_metric
(
struct
route
*
route
,
unsigned
newmetric
);
int
route_feasible
(
struct
route
*
route
);
int
route_feasible
(
struct
route
*
route
);
int
route_old
(
struct
route
*
route
);
int
route_expired
(
struct
route
*
route
);
int
update_feasible
(
struct
source
*
src
,
int
update_feasible
(
struct
source
*
src
,
unsigned
short
seqno
,
unsigned
short
refmetric
);
unsigned
short
seqno
,
unsigned
short
refmetric
);
struct
route
*
find_best_route
(
const
unsigned
char
*
prefix
,
unsigned
char
plen
,
struct
route
*
find_best_route
(
const
unsigned
char
*
prefix
,
unsigned
char
plen
,
...
...
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