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
70066514
Commit
70066514
authored
Apr 20, 2007
by
Julien Cristau
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Send txcosts more often.
parent
ffc0d48e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
3 deletions
+6
-3
ariadne.c
ariadne.c
+3
-3
ariadne.h
ariadne.h
+2
-0
message.c
message.c
+1
-0
No files found.
ariadne.c
View file @
70066514
...
@@ -419,10 +419,10 @@ main(int argc, char **argv)
...
@@ -419,10 +419,10 @@ main(int argc, char **argv)
for
(
i
=
0
;
i
<
numnets
;
i
++
)
{
for
(
i
=
0
;
i
<
numnets
;
i
++
)
{
if
(
now
.
tv_sec
>=
nets
[
i
].
hello_time
+
nets
[
i
].
hello_interval
)
if
(
now
.
tv_sec
>=
nets
[
i
].
hello_time
+
nets
[
i
].
hello_interval
)
send_hello
(
&
nets
[
i
]);
send_hello
(
&
nets
[
i
]);
if
(
now
.
tv_sec
>=
nets
[
i
].
update_time
+
update_interval
)
{
if
(
now
.
tv_sec
>=
nets
[
i
].
update_time
+
update_interval
)
send_update
(
NULL
,
&
nets
[
i
]);
send_update
(
NULL
,
&
nets
[
i
]);
if
(
now
.
tv_sec
>=
nets
[
i
].
txcost_time
+
nets
[
i
].
txcost_interval
)
send_txcost
(
NULL
,
&
nets
[
i
]);
send_txcost
(
NULL
,
&
nets
[
i
]);
}
if
(
now
.
tv_sec
>=
if
(
now
.
tv_sec
>=
nets
[
i
].
self_update_time
+
nets
[
i
].
self_update_interval
)
{
nets
[
i
].
self_update_time
+
nets
[
i
].
self_update_interval
)
{
send_self_update
(
&
nets
[
i
]);
send_self_update
(
&
nets
[
i
]);
...
@@ -577,7 +577,7 @@ add_network(char *ifname, int ifindex, int mtu,
...
@@ -577,7 +577,7 @@ add_network(char *ifname, int ifindex, int mtu,
nets
[
numnets
].
hello_interval
=
hello_interval
;
nets
[
numnets
].
hello_interval
=
hello_interval
;
nets
[
numnets
].
self_update_interval
=
nets
[
numnets
].
self_update_interval
=
MAX
(
15
+
hello_interval
/
2
,
hello_interval
);
MAX
(
15
+
hello_interval
/
2
,
hello_interval
);
nets
[
numnets
].
txcost_interval
=
MIN
(
42
,
2
*
hello_interval
);
nets
[
numnets
].
bufsize
=
mtu
-
sizeof
(
packet_header
);
nets
[
numnets
].
bufsize
=
mtu
-
sizeof
(
packet_header
);
strncpy
(
nets
[
numnets
].
ifname
,
ifname
,
IF_NAMESIZE
);
strncpy
(
nets
[
numnets
].
ifname
,
ifname
,
IF_NAMESIZE
);
p
=
malloc
(
nets
[
numnets
].
bufsize
);
p
=
malloc
(
nets
[
numnets
].
bufsize
);
...
...
ariadne.h
View file @
70066514
...
@@ -64,6 +64,7 @@ struct network {
...
@@ -64,6 +64,7 @@ struct network {
int
hello_time
;
int
hello_time
;
int
self_update_time
;
int
self_update_time
;
int
update_time
;
int
update_time
;
int
txcost_time
;
char
ifname
[
IF_NAMESIZE
];
char
ifname
[
IF_NAMESIZE
];
int
buffered
;
int
buffered
;
struct
timeval
flush_time
;
struct
timeval
flush_time
;
...
@@ -72,6 +73,7 @@ struct network {
...
@@ -72,6 +73,7 @@ struct network {
unsigned
char
hello_seqno
;
unsigned
char
hello_seqno
;
unsigned
int
hello_interval
;
unsigned
int
hello_interval
;
unsigned
int
self_update_interval
;
unsigned
int
self_update_interval
;
unsigned
int
txcost_interval
;
};
};
extern
struct
timeval
now
;
extern
struct
timeval
now
;
...
...
message.c
View file @
70066514
...
@@ -544,6 +544,7 @@ send_txcost(struct neighbour *neigh, struct network *net)
...
@@ -544,6 +544,7 @@ send_txcost(struct neighbour *neigh, struct network *net)
}
}
}
}
}
}
net
->
txcost_time
=
now
.
tv_sec
;
}
else
{
}
else
{
int
cost
;
int
cost
;
...
...
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