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
2b7d6b1f
Commit
2b7d6b1f
authored
Apr 03, 2008
by
Juliusz Chroboczek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add unique ids for all local protocol messages.
parent
11c3bbc7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
4 deletions
+12
-4
local.c
local.c
+12
-4
No files found.
local.c
View file @
2b7d6b1f
...
...
@@ -90,7 +90,8 @@ local_notify_self()
if
(
local_socket
<
0
)
return
;
rc
=
snprintf
(
buf
,
512
,
"add self id %s
\n
"
,
format_address
(
myid
));
rc
=
snprintf
(
buf
,
512
,
"add self alamakota id %s
\n
"
,
format_address
(
myid
));
if
(
rc
<
0
||
rc
>=
512
)
goto
fail
;
...
...
@@ -126,9 +127,12 @@ local_notify_neighbour(struct neighbour *neigh, int kind)
return
;
rc
=
snprintf
(
buf
,
512
,
"%s neighbour id %s address %s "
"%s neighbour
%lx
id %s address %s "
"if %s reach %04x rxcost %d txcost %d cost %d
\n
"
,
local_kind
(
kind
),
/* Neighbours never move aroundin memory , so we can use the
address as a unique identifier. */
(
unsigned
long
int
)
neigh
,
format_address
(
neigh
->
id
),
format_address
(
neigh
->
address
),
neigh
->
network
->
ifname
,
...
...
@@ -159,9 +163,10 @@ local_notify_xroute(struct xroute *xroute, int kind)
if
(
local_socket
<
0
)
return
;
rc
=
snprintf
(
buf
,
512
,
"%s xroute prefix %s metric %d
\n
"
,
rc
=
snprintf
(
buf
,
512
,
"%s xroute
%s
prefix %s metric %d
\n
"
,
local_kind
(
kind
),
format_prefix
(
xroute
->
prefix
,
xroute
->
plen
),
format_prefix
(
xroute
->
prefix
,
xroute
->
plen
),
xroute
->
metric
);
if
(
rc
<
0
||
rc
>=
512
)
...
...
@@ -187,10 +192,13 @@ local_notify_route(struct route *route, int kind)
return
;
rc
=
snprintf
(
buf
,
512
,
"%s route prefix %s installed %s "
"%s route
%s-%s-%lx
prefix %s installed %s "
"id %s metric %d refmetric %d via %s if %s neigh %s
\n
"
,
local_kind
(
kind
),
format_prefix
(
route
->
src
->
prefix
,
route
->
src
->
plen
),
format_address
(
route
->
src
->
id
),
(
unsigned
long
)
route
->
neigh
,
format_prefix
(
route
->
src
->
prefix
,
route
->
src
->
plen
),
route
->
installed
?
"yes"
:
"no"
,
format_address
(
route
->
src
->
id
),
route
->
metric
,
route
->
refmetric
,
...
...
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