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
afc36c5f
Commit
afc36c5f
authored
Jan 19, 2018
by
Juliusz Chroboczek
Committed by
Juliusz Chroboczek
Oct 23, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move address computation into struct buffered.
parent
9fb50fd6
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
19 additions
and
7 deletions
+19
-7
configuration.c
configuration.c
+2
-0
disambiguation.c
disambiguation.c
+2
-0
interface.c
interface.c
+6
-0
interface.h
interface.h
+1
-0
message.c
message.c
+2
-7
neighbour.c
neighbour.c
+2
-0
resend.c
resend.c
+2
-0
source.c
source.c
+2
-0
No files found.
configuration.c
View file @
afc36c5f
...
...
@@ -24,6 +24,8 @@ THE SOFTWARE.
#include <string.h>
#include <stdio.h>
#include <sys/time.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <assert.h>
#ifdef __linux
...
...
disambiguation.c
View file @
afc36c5f
...
...
@@ -25,6 +25,8 @@ THE SOFTWARE.
#include <stdio.h>
#include <errno.h>
#include <assert.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <sys/time.h>
#include "babeld.h"
...
...
interface.c
View file @
afc36c5f
...
...
@@ -302,6 +302,12 @@ interface_up(struct interface *ifp, int up)
goto
fail
;
}
memset
(
&
ifp
->
buf
.
sin6
,
0
,
sizeof
(
ifp
->
buf
.
sin6
));
ifp
->
buf
.
sin6
.
sin6_family
=
AF_INET6
;
memcpy
(
&
ifp
->
buf
.
sin6
.
sin6_addr
,
protocol_group
,
16
);
ifp
->
buf
.
sin6
.
sin6_port
=
htons
(
protocol_port
);
ifp
->
buf
.
sin6
.
sin6_scope_id
=
ifp
->
ifindex
;
mtu
=
kernel_interface_mtu
(
ifp
->
name
,
ifp
->
ifindex
);
if
(
mtu
<
0
)
{
fprintf
(
stderr
,
"Warning: couldn't get MTU of interface %s (%d).
\n
"
,
...
...
interface.h
View file @
afc36c5f
...
...
@@ -80,6 +80,7 @@ struct interface_conf {
#define IF_CHANNEL_NONINTERFERING -2
struct
buffered
{
struct
sockaddr_in6
sin6
;
char
*
buf
;
int
len
;
int
size
;
...
...
message.c
View file @
afc36c5f
...
...
@@ -943,7 +943,6 @@ void
flushbuf
(
struct
interface
*
ifp
)
{
int
rc
;
struct
sockaddr_in6
sin6
;
assert
(
ifp
->
buf
.
len
<=
ifp
->
buf
.
size
);
...
...
@@ -953,17 +952,13 @@ flushbuf(struct interface *ifp)
debugf
(
" (flushing %d buffered bytes on %s)
\n
"
,
ifp
->
buf
.
len
,
ifp
->
name
);
if
(
check_bucket
(
ifp
))
{
memset
(
&
sin6
,
0
,
sizeof
(
sin6
));
sin6
.
sin6_family
=
AF_INET6
;
memcpy
(
&
sin6
.
sin6_addr
,
protocol_group
,
16
);
sin6
.
sin6_port
=
htons
(
protocol_port
);
sin6
.
sin6_scope_id
=
ifp
->
ifindex
;
DO_HTONS
(
packet_header
+
2
,
ifp
->
buf
.
len
);
fill_rtt_message
(
ifp
);
rc
=
babel_send
(
protocol_socket
,
packet_header
,
sizeof
(
packet_header
),
ifp
->
buf
.
buf
,
ifp
->
buf
.
len
,
(
struct
sockaddr
*
)
&
sin6
,
sizeof
(
sin6
));
(
struct
sockaddr
*
)
&
ifp
->
buf
.
sin6
,
sizeof
(
ifp
->
buf
.
sin6
));
if
(
rc
<
0
)
perror
(
"send"
);
}
else
{
...
...
neighbour.c
View file @
afc36c5f
...
...
@@ -24,6 +24,8 @@ THE SOFTWARE.
#include <string.h>
#include <stdio.h>
#include <sys/time.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <time.h>
#include <assert.h>
...
...
resend.c
View file @
afc36c5f
...
...
@@ -24,6 +24,8 @@ THE SOFTWARE.
#include <time.h>
#include <string.h>
#include <stdlib.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include "babeld.h"
#include "util.h"
...
...
source.c
View file @
afc36c5f
...
...
@@ -24,6 +24,8 @@ THE SOFTWARE.
#include <stdio.h>
#include <string.h>
#include <sys/time.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <assert.h>
#include "babeld.h"
...
...
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