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

Rename Ariadne to Babel.

parent 87978f62
......@@ -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
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
......@@ -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.");
......
.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.
......
......@@ -24,7 +24,7 @@ THE SOFTWARE.
#include <stdio.h>
#include <string.h>
#include "ariadne.h"
#include "babel.h"
#include "util.h"
#include "destination.h"
......
......@@ -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)");
}
......
......@@ -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"
......
......@@ -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;
......
......@@ -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);
......@@ -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"
......
......@@ -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)
......
......@@ -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"
......
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