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
1cb3f767
Commit
1cb3f767
authored
Apr 27, 2007
by
Juliusz Chroboczek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename Ariadne to Babel.
parent
87978f62
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
73 additions
and
73 deletions
+73
-73
Makefile
Makefile
+14
-14
README
README
+11
-11
babel.c
babel.c
+11
-11
babel.h
babel.h
+0
-0
babel.man
babel.man
+13
-13
destination.c
destination.c
+1
-1
message.c
message.c
+9
-9
neighbour.c
neighbour.c
+1
-1
net.c
net.c
+5
-5
net.h
net.h
+5
-5
route.c
route.c
+1
-1
util.c
util.c
+1
-1
xroute.c
xroute.c
+1
-1
No files found.
Makefile
View file @
1cb3f767
...
...
@@ -6,31 +6,31 @@ DEFINES = $(PLATFORM_DEFINES)
CFLAGS
=
$(CDEBUGFLAGS)
$(DEFINES)
$(EXTRA_DEFINES)
SRCS
=
ariadne
.c net.c kernel.c util.c destination.c neighbour.c
\
SRCS
=
babel
.c net.c kernel.c util.c destination.c neighbour.c
\
route.c xroute.c message.c
OBJS
=
ariadne
.o net.o kernel.o util.o destination.o neighbour.o
\
OBJS
=
babel
.o net.o kernel.o util.o destination.o neighbour.o
\
route.o xroute.o message.o
ariadne
:
$(OBJS)
$(CC)
$(CFLAGS)
$(LDFLAGS)
-o
ariadne
$(OBJS)
$(LDLIBS)
babel
:
$(OBJS)
$(CC)
$(CFLAGS)
$(LDFLAGS)
-o
babel
$(OBJS)
$(LDLIBS)
ariadne.html
:
ariadne
.man
groff
-man
-Thtml
ariadne.man
>
ariadne
.html
babel.html
:
babel
.man
groff
-man
-Thtml
babel.man
>
babel
.html
.PHONY
:
all install uninstall clean
all
:
ariadne
all
:
babel
install
:
ariadne ariadne
.man
-
rm
-f
$(TARGET)$(PREFIX)
/bin/
ariadne
cp
-f
ariadne
$(TARGET)$(PREFIX)
/bin
install
:
babel babel
.man
-
rm
-f
$(TARGET)$(PREFIX)
/bin/
babel
cp
-f
babel
$(TARGET)$(PREFIX)
/bin
mkdir
-p
$(TARGET)$(PREFIX)
/man/man8
cp
-f
ariadne.man
$(TARGET)$(PREFIX)
/man/man8/ariadne
.8
cp
-f
babel.man
$(TARGET)$(PREFIX)
/man/man8/babel
.8
uninstall
:
-
rm
-f
$(TARGET)$(PREFIX)
/bin/
ariadne
-
rm
-f
$(TARGET)$(PREFIX)
/man/man8/
ariadne
.8
-
rm
-f
$(TARGET)$(PREFIX)
/bin/
babel
-
rm
-f
$(TARGET)$(PREFIX)
/man/man8/
babel
.8
clean
:
-
rm
-f
ariadne ariadne
.html
*
.o
*
~ core TAGS gmon.out
-
rm
-f
babel babel
.html
*
.o
*
~ core TAGS gmon.out
README
View file @
1cb3f767
Ariadne
*****
**
Babel
*****
Ariadne
is a loop-avoiding distance-vector routing protocol roughly
Babel
is a loop-avoiding distance-vector routing protocol roughly
based on HSDV and AODV, but with provisions for link cost estimation
and injection of external routes.
...
...
@@ -13,23 +13,23 @@ Installation
$ su -c 'make install'
Running
Ariadne
*************
**
Running
Babel
*************
In order to run
Ariadne
on a node (wireless or wired), just give it an
In order to run
Babel
on a node (wireless or wired), just give it an
IPv6 address, then run the routing daemon. Assuming your wireless
interface is eth1, and your IPv6 address is $IPv6, do
# ip -6 addr add $IPv6 dev eth1
#
ariadne
$IPv6 eth1
#
babel
$IPv6 eth1
If your node has multiple interfaces which you want to participate in
the
Ariadne
netowk, just list them all:
the
Babel
netowk, just list them all:
#
ariadne
$IPv6 eth0 eth1 sit1
#
babel
$IPv6 eth0 eth1 sit1
On an access point, you'll probably want to inject external routes
into the
Ariadne
network. First check that you have a default route
into the
Babel
network. First check that you have a default route
on your access point:
$ ip -6 route show default
...
...
@@ -37,6 +37,6 @@ on your access point:
Then run the routing daemon as so:
#
ariadne
-n default 256 $IPv6 eth1
#
babel
-n default 256 $IPv6 eth1
Juliusz
ariadne
.c
→
babel
.c
View file @
1cb3f767
...
...
@@ -38,7 +38,7 @@ THE SOFTWARE.
#include <net/if.h>
#include <arpa/inet.h>
#include "
ariadne
.h"
#include "
babel
.h"
#include "util.h"
#include "net.h"
#include "kernel.h"
...
...
@@ -66,7 +66,7 @@ int numnets = 0;
static
const
unsigned
char
zeroes
[
16
]
=
{
0
};
char
*
state_file
=
"/var/lib/
ariadne
-state"
;
char
*
state_file
=
"/var/lib/
babel
-state"
;
int
protocol_port
;
unsigned
char
protocol_group
[
16
];
...
...
@@ -201,10 +201,10 @@ main(int argc, char **argv)
fd
=
open
(
state_file
,
O_RDONLY
);
if
(
fd
<
0
&&
errno
!=
ENOENT
)
perror
(
"open(
ariadne
-state)"
);
perror
(
"open(
babel
-state)"
);
rc
=
unlink
(
state_file
);
if
(
fd
>=
0
&&
rc
<
0
)
{
perror
(
"unlink(
ariadne
-state)"
);
perror
(
"unlink(
babel
-state)"
);
/* If we couldn't unlink it, it might be stale. */
close
(
fd
);
fd
=
-
1
;
...
...
@@ -214,17 +214,17 @@ main(int argc, char **argv)
int
s
,
t
;
rc
=
read
(
fd
,
buf
,
99
);
if
(
rc
<
0
)
{
perror
(
"read(
ariadne
-state)"
);
perror
(
"read(
babel
-state)"
);
}
else
{
buf
[
rc
]
=
'\0'
;
rc
=
sscanf
(
buf
,
"%d %d
\n
"
,
&
s
,
&
t
);
if
(
rc
==
2
&&
s
>
0
&&
s
<=
256
&&
t
>=
1176800000
&&
t
<=
now
.
tv_sec
)
{
debugf
(
"Got %d %d from
ariadne
-state.
\n
"
,
s
,
t
);
debugf
(
"Got %d %d from
babel
-state.
\n
"
,
s
,
t
);
seqno
=
((
s
+
1
)
&
0xFF
);
reboot_time
=
t
;
}
else
{
fprintf
(
stderr
,
"Couldn't parse
ariadne
-state.
\n
"
);
fprintf
(
stderr
,
"Couldn't parse
babel
-state.
\n
"
);
}
}
close
(
fd
);
...
...
@@ -251,7 +251,7 @@ main(int argc, char **argv)
exit
(
1
);
}
protocol_socket
=
ariadne
_socket
(
protocol_port
);
protocol_socket
=
babel
_socket
(
protocol_port
);
if
(
protocol_socket
<
0
)
{
perror
(
"Couldn't create link local socket"
);
goto
fail
;
...
...
@@ -392,7 +392,7 @@ main(int argc, char **argv)
break
;
if
(
FD_ISSET
(
protocol_socket
,
&
readfds
))
{
rc
=
ariadne
_recv
(
protocol_socket
,
buf
,
maxmtu
,
rc
=
babel
_recv
(
protocol_socket
,
buf
,
maxmtu
,
(
struct
sockaddr
*
)
&
sin6
,
sizeof
(
sin6
));
if
(
rc
<
0
)
{
if
(
errno
!=
EAGAIN
&&
errno
!=
EINTR
)
{
...
...
@@ -496,13 +496,13 @@ main(int argc, char **argv)
fd
=
open
(
state_file
,
O_WRONLY
|
O_TRUNC
|
O_CREAT
,
0644
);
if
(
fd
<
0
)
{
perror
(
"creat(
ariadne
-state)"
);
perror
(
"creat(
babel
-state)"
);
}
else
{
char
buf
[
100
];
rc
=
snprintf
(
buf
,
100
,
"%d %d
\n
"
,
seqno
,
(
int
)
now
.
tv_sec
);
rc
=
write
(
fd
,
buf
,
rc
);
if
(
rc
<
0
)
perror
(
"write(
ariadne
-state)"
);
perror
(
"write(
babel
-state)"
);
close
(
fd
);
}
debugf
(
"Done."
);
...
...
ariadne
.h
→
babel
.h
View file @
1cb3f767
File moved
ariadne
.man
→
babel
.man
View file @
1cb3f767
.TH
ARIADNE
1
.TH
BABEL
1
.SH NAME
ariadne
\- ad-hoc network routing daemon
babel
\- ad-hoc network routing daemon
.SH SYNOPSIS
.B
ariadne
.B
babel
[
.B \-m
.I multicast-address
...
...
@@ -42,11 +42,11 @@ ariadne \- ad-hoc network routing daemon
.I address
.IR interface ...
.SH DESCRIPTION
Ariadne
is a loop-avoiding distance-vector routing protocol roughly
Babel
is a loop-avoiding distance-vector routing protocol roughly
based on DSDV and AODV, but with provisions for link cost estimation
and injection of external routes.
While it is optimised for wireless mesh networks,
Ariadne
will also
While it is optimised for wireless mesh networks,
Babel
will also
work efficiently on classical wired networks. In the worst case, it
will generate roughly double the amount of traffic that RIPng would
generate, while never counting to infinity.
...
...
@@ -56,18 +56,18 @@ generate, while never counting to infinity.
Specify the link-local multicast address to be used by the protocol.
.TP
.BI \-p " port"
Specify the UDP port number to be used by the
Ariadne
protocol.
Specify the UDP port number to be used by the
Babel
protocol.
.TP
.BI \-S " state-file"
Set the name of the file used for preserving long-term information
between invocations of the
.B
ariadne
.B
babel
daemon. If this file is deleted, the daemon will run in passive mode
for 3 minutes when it is next invoked (see
.B -P
below), and other hosts might initially not accept to route to it.
The default is
.BR /var/lib/
ariadne
-state .
.BR /var/lib/
babel
-state .
.TP
.BI \-h " hello-interval"
Specify the interval in seconds at which periodic hello packets are
...
...
@@ -144,17 +144,17 @@ adjacency is assumed to be up if at least one of the last three hello
messages has been received, and down otherwise.
.SH FILES
.TP
.B /var/lib/
ariadne
-state
.B /var/lib/
babel
-state
The default location of the file storing long-term state.
.SH SECURITY
Ariadne
is a completely insecure protocol: any attacker able to
Babel
is a completely insecure protocol: any attacker able to
inject IP packets with a link-local source address can disrupt the
protocol's operation.
Since
Ariadne
uses link-local addresses only, there is no need to
update firewalls to allow forwarding of
Ariadne
protocol packets. If
Since
Babel
uses link-local addresses only, there is no need to
update firewalls to allow forwarding of
Babel
protocol packets. If
ingress filtering is done on a host, the protocol port should be
opened. As
Ariadne
uses unicast packets in some cases, just allowing
opened. As
Babel
uses unicast packets in some cases, just allowing
packets destined to the multicast address is not enough.
.SH BUGS
Plenty. This is experimental software, run at your own risk.
...
...
destination.c
View file @
1cb3f767
...
...
@@ -24,7 +24,7 @@ THE SOFTWARE.
#include <stdio.h>
#include <string.h>
#include "
ariadne
.h"
#include "
babel
.h"
#include "util.h"
#include "destination.h"
...
...
message.c
View file @
1cb3f767
...
...
@@ -27,7 +27,7 @@ THE SOFTWARE.
#include <arpa/inet.h>
#include "
ariadne
.h"
#include "
babel
.h"
#include "util.h"
#include "net.h"
#include "destination.h"
...
...
@@ -176,10 +176,10 @@ flushbuf(struct network *net)
memcpy
(
&
sin6
.
sin6_addr
,
protocol_group
,
16
);
sin6
.
sin6_port
=
htons
(
protocol_port
);
sin6
.
sin6_scope_id
=
net
->
ifindex
;
rc
=
ariadne
_send
(
protocol_socket
,
packet_header
,
sizeof
(
packet_header
),
net
->
sendbuf
,
net
->
buffered
,
(
struct
sockaddr
*
)
&
sin6
,
sizeof
(
sin6
));
rc
=
babel
_send
(
protocol_socket
,
packet_header
,
sizeof
(
packet_header
),
net
->
sendbuf
,
net
->
buffered
,
(
struct
sockaddr
*
)
&
sin6
,
sizeof
(
sin6
));
if
(
rc
<
0
)
perror
(
"send"
);
}
...
...
@@ -278,10 +278,10 @@ send_unicast_packet(struct neighbour *neigh, unsigned char *buf, int buflen)
memcpy
(
&
sin6
.
sin6_addr
,
neigh
->
address
,
16
);
sin6
.
sin6_port
=
htons
(
protocol_port
);
sin6
.
sin6_scope_id
=
neigh
->
network
->
ifindex
;
rc
=
ariadne
_send
(
protocol_socket
,
packet_header
,
sizeof
(
packet_header
),
buf
,
buflen
,
(
struct
sockaddr
*
)
&
sin6
,
sizeof
(
sin6
));
rc
=
babel
_send
(
protocol_socket
,
packet_header
,
sizeof
(
packet_header
),
buf
,
buflen
,
(
struct
sockaddr
*
)
&
sin6
,
sizeof
(
sin6
));
if
(
rc
<
0
)
perror
(
"send(unicast)"
);
}
...
...
neighbour.c
View file @
1cb3f767
...
...
@@ -26,7 +26,7 @@ THE SOFTWARE.
#include <sys/time.h>
#include <time.h>
#include "
ariadne
.h"
#include "
babel
.h"
#include "util.h"
#include "neighbour.h"
#include "route.h"
...
...
net.c
View file @
1cb3f767
...
...
@@ -31,7 +31,7 @@ THE SOFTWARE.
#include "net.h"
int
ariadne
_socket
(
int
port
)
babel
_socket
(
int
port
)
{
struct
sockaddr_in6
sin6
;
int
s
,
rc
;
...
...
@@ -76,7 +76,7 @@ ariadne_socket(int port)
}
int
ariadne
_recv
(
int
s
,
void
*
buf
,
int
buflen
,
struct
sockaddr
*
sin
,
int
slen
)
babel
_recv
(
int
s
,
void
*
buf
,
int
buflen
,
struct
sockaddr
*
sin
,
int
slen
)
{
struct
iovec
iovec
;
struct
msghdr
msg
;
...
...
@@ -95,9 +95,9 @@ ariadne_recv(int s, void *buf, int buflen, struct sockaddr *sin, int slen)
}
int
ariadne
_send
(
int
s
,
const
void
*
buf1
,
int
buflen1
,
const
void
*
buf2
,
int
buflen2
,
const
struct
sockaddr
*
sin
,
int
slen
)
babel
_send
(
int
s
,
const
void
*
buf1
,
int
buflen1
,
const
void
*
buf2
,
int
buflen2
,
const
struct
sockaddr
*
sin
,
int
slen
)
{
struct
iovec
iovec
[
2
];
struct
msghdr
msg
;
...
...
net.h
View file @
1cb3f767
...
...
@@ -20,8 +20,8 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
int
ariadne
_socket
(
int
port
);
int
ariadne
_recv
(
int
s
,
void
*
buf
,
int
buflen
,
struct
sockaddr
*
sin
,
int
slen
);
int
ariadne
_send
(
int
s
,
const
void
*
buf1
,
int
buflen1
,
const
void
*
buf2
,
int
buflen2
,
const
struct
sockaddr
*
sin
,
int
slen
);
int
babel
_socket
(
int
port
);
int
babel
_recv
(
int
s
,
void
*
buf
,
int
buflen
,
struct
sockaddr
*
sin
,
int
slen
);
int
babel
_send
(
int
s
,
const
void
*
buf1
,
int
buflen1
,
const
void
*
buf2
,
int
buflen2
,
const
struct
sockaddr
*
sin
,
int
slen
);
route.c
View file @
1cb3f767
...
...
@@ -26,7 +26,7 @@ THE SOFTWARE.
#include <errno.h>
#include <assert.h>
#include "
ariadne
.h"
#include "
babel
.h"
#include "util.h"
#include "kernel.h"
#include "destination.h"
...
...
util.c
View file @
1cb3f767
...
...
@@ -31,7 +31,7 @@ THE SOFTWARE.
#include <sys/socket.h>
#include <arpa/inet.h>
#include "
ariadne
.h"
#include "
babel
.h"
int
seqno_compare
(
unsigned
char
s1
,
unsigned
char
s2
)
...
...
xroute.c
View file @
1cb3f767
...
...
@@ -26,7 +26,7 @@ THE SOFTWARE.
#include <errno.h>
#include <assert.h>
#include "
ariadne
.h"
#include "
babel
.h"
#include "kernel.h"
#include "neighbour.h"
#include "route.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