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
b295f15f
Commit
b295f15f
authored
Jun 12, 2013
by
Baptiste Jonglez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Display the RTT of neighbours on the local interface
parent
9a99f954
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
local.c
local.c
+10
-2
No files found.
local.c
View file @
b295f15f
...
@@ -133,12 +133,19 @@ local_kind(int kind)
...
@@ -133,12 +133,19 @@ local_kind(int kind)
static
void
static
void
local_notify_neighbour_1
(
int
s
,
struct
neighbour
*
neigh
,
int
kind
)
local_notify_neighbour_1
(
int
s
,
struct
neighbour
*
neigh
,
int
kind
)
{
{
char
buf
[
512
];
char
buf
[
512
]
,
rttbuf
[
30
]
;
int
rc
;
int
rc
;
rttbuf
[
0
]
=
'\0'
;
if
(
valid_rtt
(
neigh
))
{
rc
=
snprintf
(
rttbuf
,
30
,
" rtt %d"
,
neigh
->
rtt
);
if
(
rc
<
0
||
rc
>=
30
)
rttbuf
[
0
]
=
'\0'
;
}
rc
=
snprintf
(
buf
,
512
,
rc
=
snprintf
(
buf
,
512
,
"%s neighbour %lx address %s "
"%s neighbour %lx address %s "
"if %s reach %04x rxcost %d txcost %d cost %d
\n
"
,
"if %s reach %04x rxcost %d txcost %d
%s
cost %d
\n
"
,
local_kind
(
kind
),
local_kind
(
kind
),
/* Neighbours never move around in memory , so we can use the
/* Neighbours never move around in memory , so we can use the
address as a unique identifier. */
address as a unique identifier. */
...
@@ -148,6 +155,7 @@ local_notify_neighbour_1(int s, struct neighbour *neigh, int kind)
...
@@ -148,6 +155,7 @@ local_notify_neighbour_1(int s, struct neighbour *neigh, int kind)
neigh
->
reach
,
neigh
->
reach
,
neighbour_rxcost
(
neigh
),
neighbour_rxcost
(
neigh
),
neighbour_txcost
(
neigh
),
neighbour_txcost
(
neigh
),
rttbuf
,
neighbour_cost
(
neigh
));
neighbour_cost
(
neigh
));
if
(
rc
<
0
||
rc
>=
512
)
if
(
rc
<
0
||
rc
>=
512
)
...
...
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