Commit 1cb3f767 authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Rename Ariadne to Babel.

parent 87978f62
...@@ -6,31 +6,31 @@ DEFINES = $(PLATFORM_DEFINES) ...@@ -6,31 +6,31 @@ DEFINES = $(PLATFORM_DEFINES)
CFLAGS = $(CDEBUGFLAGS) $(DEFINES) $(EXTRA_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 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 route.o xroute.o message.o
ariadne: $(OBJS) babel: $(OBJS)
$(CC) $(CFLAGS) $(LDFLAGS) -o ariadne $(OBJS) $(LDLIBS) $(CC) $(CFLAGS) $(LDFLAGS) -o babel $(OBJS) $(LDLIBS)
ariadne.html: ariadne.man babel.html: babel.man
groff -man -Thtml ariadne.man > ariadne.html groff -man -Thtml babel.man > babel.html
.PHONY: all install uninstall clean .PHONY: all install uninstall clean
all: ariadne all: babel
install: ariadne ariadne.man install: babel babel.man
-rm -f $(TARGET)$(PREFIX)/bin/ariadne -rm -f $(TARGET)$(PREFIX)/bin/babel
cp -f ariadne $(TARGET)$(PREFIX)/bin cp -f babel $(TARGET)$(PREFIX)/bin
mkdir -p $(TARGET)$(PREFIX)/man/man8 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: uninstall:
-rm -f $(TARGET)$(PREFIX)/bin/ariadne -rm -f $(TARGET)$(PREFIX)/bin/babel
-rm -f $(TARGET)$(PREFIX)/man/man8/ariadne.8 -rm -f $(TARGET)$(PREFIX)/man/man8/babel.8
clean: clean:
-rm -f ariadne ariadne.html *.o *~ core TAGS gmon.out -rm -f babel babel.html *.o *~ core TAGS gmon.out
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 based on HSDV and AODV, but with provisions for link cost estimation
and injection of external routes. and injection of external routes.
...@@ -13,23 +13,23 @@ Installation ...@@ -13,23 +13,23 @@ Installation
$ su -c 'make install' $ 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 IPv6 address, then run the routing daemon. Assuming your wireless
interface is eth1, and your IPv6 address is $IPv6, do interface is eth1, and your IPv6 address is $IPv6, do
# ip -6 addr add $IPv6 dev eth1 # 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 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 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: on your access point:
$ ip -6 route show default $ ip -6 route show default
...@@ -37,6 +37,6 @@ on your access point: ...@@ -37,6 +37,6 @@ on your access point:
Then run the routing daemon as so: Then run the routing daemon as so:
# ariadne -n default 256 $IPv6 eth1 # babel -n default 256 $IPv6 eth1
Juliusz Juliusz
...@@ -38,7 +38,7 @@ THE SOFTWARE. ...@@ -38,7 +38,7 @@ THE SOFTWARE.
#include <net/if.h> #include <net/if.h>
#include <arpa/inet.h> #include <arpa/inet.h>
#include "ariadne.h" #include "babel.h"
#include "util.h" #include "util.h"
#include "net.h" #include "net.h"
#include "kernel.h" #include "kernel.h"
...@@ -66,7 +66,7 @@ int numnets = 0; ...@@ -66,7 +66,7 @@ int numnets = 0;
static const unsigned char zeroes[16] = {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; int protocol_port;
unsigned char protocol_group[16]; unsigned char protocol_group[16];
...@@ -201,10 +201,10 @@ main(int argc, char **argv) ...@@ -201,10 +201,10 @@ main(int argc, char **argv)
fd = open(state_file, O_RDONLY); fd = open(state_file, O_RDONLY);
if(fd < 0 && errno != ENOENT) if(fd < 0 && errno != ENOENT)
perror("open(ariadne-state)"); perror("open(babel-state)");
rc = unlink(state_file); rc = unlink(state_file);
if(fd >= 0 && rc < 0) { if(fd >= 0 && rc < 0) {
perror("unlink(ariadne-state)"); perror("unlink(babel-state)");
/* If we couldn't unlink it, it might be stale. */ /* If we couldn't unlink it, it might be stale. */
close(fd); close(fd);
fd = -1; fd = -1;
...@@ -214,17 +214,17 @@ main(int argc, char **argv) ...@@ -214,17 +214,17 @@ main(int argc, char **argv)
int s, t; int s, t;
rc = read(fd, buf, 99); rc = read(fd, buf, 99);
if(rc < 0) { if(rc < 0) {
perror("read(ariadne-state)"); perror("read(babel-state)");
} else { } else {
buf[rc] = '\0'; buf[rc] = '\0';
rc = sscanf(buf, "%d %d\n", &s, &t); rc = sscanf(buf, "%d %d\n", &s, &t);
if(rc == 2 && s > 0 && s <= 256 && if(rc == 2 && s > 0 && s <= 256 &&
t >= 1176800000 && t <= now.tv_sec) { 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); seqno = ((s + 1) & 0xFF);
reboot_time = t; reboot_time = t;
} else { } else {
fprintf(stderr, "Couldn't parse ariadne-state.\n"); fprintf(stderr, "Couldn't parse babel-state.\n");
} }
} }
close(fd); close(fd);
...@@ -251,7 +251,7 @@ main(int argc, char **argv) ...@@ -251,7 +251,7 @@ main(int argc, char **argv)
exit(1); exit(1);
} }
protocol_socket = ariadne_socket(protocol_port); protocol_socket = babel_socket(protocol_port);
if(protocol_socket < 0) { if(protocol_socket < 0) {
perror("Couldn't create link local socket"); perror("Couldn't create link local socket");
goto fail; goto fail;
...@@ -392,7 +392,7 @@ main(int argc, char **argv) ...@@ -392,7 +392,7 @@ main(int argc, char **argv)
break; break;
if(FD_ISSET(protocol_socket, &readfds)) { 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)); (struct sockaddr*)&sin6, sizeof(sin6));
if(rc < 0) { if(rc < 0) {
if(errno != EAGAIN && errno != EINTR) { if(errno != EAGAIN && errno != EINTR) {
...@@ -496,13 +496,13 @@ main(int argc, char **argv) ...@@ -496,13 +496,13 @@ main(int argc, char **argv)
fd = open(state_file, O_WRONLY | O_TRUNC | O_CREAT, 0644); fd = open(state_file, O_WRONLY | O_TRUNC | O_CREAT, 0644);
if(fd < 0) { if(fd < 0) {
perror("creat(ariadne-state)"); perror("creat(babel-state)");
} else { } else {
char buf[100]; char buf[100];
rc = snprintf(buf, 100, "%d %d\n", seqno, (int)now.tv_sec); rc = snprintf(buf, 100, "%d %d\n", seqno, (int)now.tv_sec);
rc = write(fd, buf, rc); rc = write(fd, buf, rc);
if(rc < 0) if(rc < 0)
perror("write(ariadne-state)"); perror("write(babel-state)");
close(fd); close(fd);
} }
debugf("Done."); debugf("Done.");
......
.TH ARIADNE 1 .TH BABEL 1
.SH NAME .SH NAME
ariadne \- ad-hoc network routing daemon babel \- ad-hoc network routing daemon
.SH SYNOPSIS .SH SYNOPSIS
.B ariadne .B babel
[ [
.B \-m .B \-m
.I multicast-address .I multicast-address
...@@ -42,11 +42,11 @@ ariadne \- ad-hoc network routing daemon ...@@ -42,11 +42,11 @@ ariadne \- ad-hoc network routing daemon
.I address .I address
.IR interface ... .IR interface ...
.SH DESCRIPTION .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 based on DSDV and AODV, but with provisions for link cost estimation
and injection of external routes. 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 work efficiently on classical wired networks. In the worst case, it
will generate roughly double the amount of traffic that RIPng would will generate roughly double the amount of traffic that RIPng would
generate, while never counting to infinity. generate, while never counting to infinity.
...@@ -56,18 +56,18 @@ 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. Specify the link-local multicast address to be used by the protocol.
.TP .TP
.BI \-p " port" .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 .TP
.BI \-S " state-file" .BI \-S " state-file"
Set the name of the file used for preserving long-term information Set the name of the file used for preserving long-term information
between invocations of the between invocations of the
.B ariadne .B babel
daemon. If this file is deleted, the daemon will run in passive mode daemon. If this file is deleted, the daemon will run in passive mode
for 3 minutes when it is next invoked (see for 3 minutes when it is next invoked (see
.B -P .B -P
below), and other hosts might initially not accept to route to it. below), and other hosts might initially not accept to route to it.
The default is The default is
.BR /var/lib/ariadne-state . .BR /var/lib/babel-state .
.TP .TP
.BI \-h " hello-interval" .BI \-h " hello-interval"
Specify the interval in seconds at which periodic hello packets are 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 ...@@ -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. messages has been received, and down otherwise.
.SH FILES .SH FILES
.TP .TP
.B /var/lib/ariadne-state .B /var/lib/babel-state
The default location of the file storing long-term state. The default location of the file storing long-term state.
.SH SECURITY .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 inject IP packets with a link-local source address can disrupt the
protocol's operation. protocol's operation.
Since Ariadne uses link-local addresses only, there is no need to Since Babel uses link-local addresses only, there is no need to
update firewalls to allow forwarding of Ariadne protocol packets. If update firewalls to allow forwarding of Babel protocol packets. If
ingress filtering is done on a host, the protocol port should be 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. packets destined to the multicast address is not enough.
.SH BUGS .SH BUGS
Plenty. This is experimental software, run at your own risk. Plenty. This is experimental software, run at your own risk.
......
...@@ -24,7 +24,7 @@ THE SOFTWARE. ...@@ -24,7 +24,7 @@ THE SOFTWARE.
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include "ariadne.h" #include "babel.h"
#include "util.h" #include "util.h"
#include "destination.h" #include "destination.h"
......
...@@ -27,7 +27,7 @@ THE SOFTWARE. ...@@ -27,7 +27,7 @@ THE SOFTWARE.
#include <arpa/inet.h> #include <arpa/inet.h>
#include "ariadne.h" #include "babel.h"
#include "util.h" #include "util.h"
#include "net.h" #include "net.h"
#include "destination.h" #include "destination.h"
...@@ -176,7 +176,7 @@ flushbuf(struct network *net) ...@@ -176,7 +176,7 @@ flushbuf(struct network *net)
memcpy(&sin6.sin6_addr, protocol_group, 16); memcpy(&sin6.sin6_addr, protocol_group, 16);
sin6.sin6_port = htons(protocol_port); sin6.sin6_port = htons(protocol_port);
sin6.sin6_scope_id = net->ifindex; sin6.sin6_scope_id = net->ifindex;
rc = ariadne_send(protocol_socket, rc = babel_send(protocol_socket,
packet_header, sizeof(packet_header), packet_header, sizeof(packet_header),
net->sendbuf, net->buffered, net->sendbuf, net->buffered,
(struct sockaddr*)&sin6, sizeof(sin6)); (struct sockaddr*)&sin6, sizeof(sin6));
...@@ -278,7 +278,7 @@ send_unicast_packet(struct neighbour *neigh, unsigned char *buf, int buflen) ...@@ -278,7 +278,7 @@ send_unicast_packet(struct neighbour *neigh, unsigned char *buf, int buflen)
memcpy(&sin6.sin6_addr, neigh->address, 16); memcpy(&sin6.sin6_addr, neigh->address, 16);
sin6.sin6_port = htons(protocol_port); sin6.sin6_port = htons(protocol_port);
sin6.sin6_scope_id = neigh->network->ifindex; sin6.sin6_scope_id = neigh->network->ifindex;
rc = ariadne_send(protocol_socket, rc = babel_send(protocol_socket,
packet_header, sizeof(packet_header), packet_header, sizeof(packet_header),
buf, buflen, buf, buflen,
(struct sockaddr*)&sin6, sizeof(sin6)); (struct sockaddr*)&sin6, sizeof(sin6));
......
...@@ -26,7 +26,7 @@ THE SOFTWARE. ...@@ -26,7 +26,7 @@ THE SOFTWARE.
#include <sys/time.h> #include <sys/time.h>
#include <time.h> #include <time.h>
#include "ariadne.h" #include "babel.h"
#include "util.h" #include "util.h"
#include "neighbour.h" #include "neighbour.h"
#include "route.h" #include "route.h"
......
...@@ -31,7 +31,7 @@ THE SOFTWARE. ...@@ -31,7 +31,7 @@ THE SOFTWARE.
#include "net.h" #include "net.h"
int int
ariadne_socket(int port) babel_socket(int port)
{ {
struct sockaddr_in6 sin6; struct sockaddr_in6 sin6;
int s, rc; int s, rc;
...@@ -76,7 +76,7 @@ ariadne_socket(int port) ...@@ -76,7 +76,7 @@ ariadne_socket(int port)
} }
int 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 iovec iovec;
struct msghdr msg; struct msghdr msg;
...@@ -95,7 +95,7 @@ ariadne_recv(int s, void *buf, int buflen, struct sockaddr *sin, int slen) ...@@ -95,7 +95,7 @@ ariadne_recv(int s, void *buf, int buflen, struct sockaddr *sin, int slen)
} }
int int
ariadne_send(int s, babel_send(int s,
const void *buf1, int buflen1, const void *buf2, int buflen2, const void *buf1, int buflen1, const void *buf2, int buflen2,
const struct sockaddr *sin, int slen) const struct sockaddr *sin, int slen)
{ {
......
...@@ -20,8 +20,8 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN ...@@ -20,8 +20,8 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE. THE SOFTWARE.
*/ */
int ariadne_socket(int port); int babel_socket(int port);
int ariadne_recv(int s, void *buf, int buflen, struct sockaddr *sin, int slen); int babel_recv(int s, void *buf, int buflen, struct sockaddr *sin, int slen);
int ariadne_send(int s, int babel_send(int s,
const void *buf1, int buflen1, const void *buf2, int buflen2, const void *buf1, int buflen1, const void *buf2, int buflen2,
const struct sockaddr *sin, int slen); const struct sockaddr *sin, int slen);
...@@ -26,7 +26,7 @@ THE SOFTWARE. ...@@ -26,7 +26,7 @@ THE SOFTWARE.
#include <errno.h> #include <errno.h>
#include <assert.h> #include <assert.h>
#include "ariadne.h" #include "babel.h"
#include "util.h" #include "util.h"
#include "kernel.h" #include "kernel.h"
#include "destination.h" #include "destination.h"
......
...@@ -31,7 +31,7 @@ THE SOFTWARE. ...@@ -31,7 +31,7 @@ THE SOFTWARE.
#include <sys/socket.h> #include <sys/socket.h>
#include <arpa/inet.h> #include <arpa/inet.h>
#include "ariadne.h" #include "babel.h"
int int
seqno_compare(unsigned char s1, unsigned char s2) seqno_compare(unsigned char s1, unsigned char s2)
......
...@@ -26,7 +26,7 @@ THE SOFTWARE. ...@@ -26,7 +26,7 @@ THE SOFTWARE.
#include <errno.h> #include <errno.h>
#include <assert.h> #include <assert.h>
#include "ariadne.h" #include "babel.h"
#include "kernel.h" #include "kernel.h"
#include "neighbour.h" #include "neighbour.h"
#include "route.h" #include "route.h"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment