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
7bac9a7c
Commit
7bac9a7c
authored
Jan 20, 2018
by
Juliusz Chroboczek
Committed by
Juliusz Chroboczek
Oct 23, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make fill_rtt_message take a buffered.
parent
98f6ed92
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
message.c
message.c
+8
-8
No files found.
message.c
View file @
7bac9a7c
...
@@ -892,17 +892,17 @@ parse_packet(const unsigned char *from, struct interface *ifp,
...
@@ -892,17 +892,17 @@ parse_packet(const unsigned char *from, struct interface *ifp,
}
}
static
int
static
int
fill_rtt_message
(
struct
interface
*
ifp
)
fill_rtt_message
(
struct
buffered
*
buf
)
{
{
if
(
ifp
->
buf
.
enable_timestamps
&&
(
ifp
->
buf
.
hello
>=
0
))
{
if
(
buf
->
enable_timestamps
&&
(
buf
->
hello
>=
0
))
{
if
(
ifp
->
buf
.
buf
[
ifp
->
buf
.
hello
+
8
]
==
SUBTLV_PADN
&&
if
(
buf
->
buf
[
buf
->
hello
+
8
]
==
SUBTLV_PADN
&&
ifp
->
buf
.
buf
[
ifp
->
buf
.
hello
+
9
]
==
4
)
{
buf
->
buf
[
buf
->
hello
+
9
]
==
4
)
{
unsigned
int
time
;
unsigned
int
time
;
/* Change the type of sub-TLV. */
/* Change the type of sub-TLV. */
ifp
->
buf
.
buf
[
ifp
->
buf
.
hello
+
8
]
=
SUBTLV_TIMESTAMP
;
buf
->
buf
[
buf
->
hello
+
8
]
=
SUBTLV_TIMESTAMP
;
gettime
(
&
now
);
gettime
(
&
now
);
time
=
time_us
(
now
);
time
=
time_us
(
now
);
DO_HTONL
(
ifp
->
buf
.
buf
+
ifp
->
buf
.
hello
+
10
,
time
);
DO_HTONL
(
buf
->
buf
+
buf
->
hello
+
10
,
time
);
return
1
;
return
1
;
}
else
{
}
else
{
fprintf
(
stderr
,
fprintf
(
stderr
,
...
@@ -925,7 +925,7 @@ flushbuf(struct interface *ifp)
...
@@ -925,7 +925,7 @@ flushbuf(struct interface *ifp)
debugf
(
" (flushing %d buffered bytes on %s)
\n
"
,
debugf
(
" (flushing %d buffered bytes on %s)
\n
"
,
ifp
->
buf
.
len
,
ifp
->
name
);
ifp
->
buf
.
len
,
ifp
->
name
);
DO_HTONS
(
packet_header
+
2
,
ifp
->
buf
.
len
);
DO_HTONS
(
packet_header
+
2
,
ifp
->
buf
.
len
);
fill_rtt_message
(
ifp
);
fill_rtt_message
(
&
ifp
->
buf
);
rc
=
babel_send
(
protocol_socket
,
rc
=
babel_send
(
protocol_socket
,
packet_header
,
sizeof
(
packet_header
),
packet_header
,
sizeof
(
packet_header
),
ifp
->
buf
.
buf
,
ifp
->
buf
.
len
,
ifp
->
buf
.
buf
,
ifp
->
buf
.
len
,
...
@@ -1170,7 +1170,7 @@ flush_unicast(int dofree)
...
@@ -1170,7 +1170,7 @@ flush_unicast(int dofree)
sin6
.
sin6_port
=
htons
(
protocol_port
);
sin6
.
sin6_port
=
htons
(
protocol_port
);
sin6
.
sin6_scope_id
=
unicast_neighbour
->
ifp
->
ifindex
;
sin6
.
sin6_scope_id
=
unicast_neighbour
->
ifp
->
ifindex
;
DO_HTONS
(
packet_header
+
2
,
unicast_buffered
);
DO_HTONS
(
packet_header
+
2
,
unicast_buffered
);
fill_rtt_message
(
unicast_neighbour
->
ifp
);
fill_rtt_message
(
&
unicast_neighbour
->
ifp
->
buf
);
rc
=
babel_send
(
protocol_socket
,
rc
=
babel_send
(
protocol_socket
,
packet_header
,
sizeof
(
packet_header
),
packet_header
,
sizeof
(
packet_header
),
unicast_buffer
,
unicast_buffered
,
unicast_buffer
,
unicast_buffered
,
...
...
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