Skip to content

Commit

Permalink
Merge pull request #245 from tass-belgium/development
Browse files Browse the repository at this point in the history
Development branch: people, please consider for merging
  • Loading branch information
maximevince committed Mar 18, 2015
2 parents d204048 + 938f6ac commit 869a6fb
Show file tree
Hide file tree
Showing 43 changed files with 2,644 additions and 348 deletions.
21 changes: 17 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ CRC?=1
OLSR?=0
SLAACV4?=1
TFTP?=1
AODV?=1
MEMORY_MANAGER?=0
MEMORY_MANAGER_PROFILING?=0
TUN?=0
Expand Down Expand Up @@ -78,6 +79,11 @@ ifeq ($(TFTP),1)
OPTIONS+=-DPICO_SUPPORT_TFTP
endif

ifeq ($(AODV),1)
MOD_OBJ+=$(LIBBASE)modules/pico_aodv.o
OPTIONS+=-DPICO_SUPPORT_AODV
endif


ifneq ($(ENDIAN),little)
CFLAGS+=-DPICO_BIGENDIAN
Expand Down Expand Up @@ -164,6 +170,12 @@ ifeq ($(ARCH),lpc18xx)
-mcpu=cortex-m3 -mthumb -MMD -MP -DLPC18XX
endif

ifeq ($(ARCH),lpc17xx)
CFLAGS+=-fmessage-length=0 -fno-builtin \
-ffunction-sections -fdata-sections -mlittle-endian \
-mcpu=cortex-m3 -mthumb -MMD -MP -DLPC17XX
endif

ifeq ($(ARCH),lpc43xx)
CFLAGS+=-fmessage-length=0 -fno-builtin \
-ffunction-sections -fdata-sections -mlittle-endian \
Expand Down Expand Up @@ -192,7 +204,7 @@ ifeq ($(ARCH),shared)
CFLAGS+=-fPIC
endif

.c.o:
%.o:%.c deps
$(CC) -c $(CFLAGS) -o $@ $<

CORE_OBJ= stack/pico_stack.o \
Expand Down Expand Up @@ -283,11 +295,11 @@ endif

all: mod core lib

core: deps $(CORE_OBJ)
core: $(CORE_OBJ)
@mkdir -p $(PREFIX)/lib
@mv stack/*.o $(PREFIX)/lib

mod: deps $(MOD_OBJ)
mod: $(MOD_OBJ)
@mkdir -p $(PREFIX)/modules
@mv modules/*.o $(PREFIX)/modules || echo

Expand Down Expand Up @@ -348,7 +360,7 @@ units: mod core lib $(UNITS_OBJ) $(MOD_OBJ)
@echo -e "\t[CC] units.o"
@$(CC) -c -o $(PREFIX)/test/units.o test/units.c $(CFLAGS) -I stack -I modules -I includes -I test/unit -DUNIT_TEST
@echo -e "\t[LD] $(PREFIX)/test/units"
@$(CC) -o $(PREFIX)/test/units $(CFLAGS) $(PREFIX)/test/units.o -lcheck -lm -pthread -lrt $(UNITS_OBJ)
@$(CC) -o $(PREFIX)/test/units $(CFLAGS) $(PREFIX)/test/units.o -lcheck -lm -pthread -lrt $(UNITS_OBJ) $(PREFIX)/modules/pico_aodv.o
@$(CC) -o $(PREFIX)/test/modunit_pico_protocol.elf $(CFLAGS) -I. test/unit/modunit_pico_protocol.c stack/pico_tree.c -lcheck -lm -pthread -lrt $(UNITS_OBJ)
@$(CC) -o $(PREFIX)/test/modunit_pico_frame.elf $(CFLAGS) -I. test/unit/modunit_pico_frame.c stack/pico_tree.c -lcheck -lm -pthread -lrt $(UNITS_OBJ)
@$(CC) -o $(PREFIX)/test/modunit_seq.elf $(CFLAGS) -I. test/unit/modunit_seq.c -lcheck -lm -pthread -lrt $(UNITS_OBJ) $(PREFIX)/lib/libpicotcp.a
Expand All @@ -361,6 +373,7 @@ units: mod core lib $(UNITS_OBJ) $(MOD_OBJ)
@$(CC) -o $(PREFIX)/test/modunit_tftp.elf $(CFLAGS) -I. test/unit/modunit_pico_tftp.c -lcheck -lm -pthread -lrt $(UNITS_OBJ) $(PREFIX)/lib/libpicotcp.a
@$(CC) -o $(PREFIX)/test/modunit_sntp_client.elf $(CFLAGS) -I. test/unit/modunit_pico_sntp_client.c -lcheck -lm -pthread -lrt $(UNITS_OBJ)
@$(CC) -o $(PREFIX)/test/modunit_ipfilter.elf $(CFLAGS) -I. test/unit/modunit_pico_ipfilter.c stack/pico_tree.c -lcheck -lm -pthread -lrt $(UNITS_OBJ)
@$(CC) -o $(PREFIX)/test/modunit_aodv.elf $(CFLAGS) -I. test/unit/modunit_pico_aodv.c -lcheck -lm -pthread -lrt $(UNITS_OBJ) $(PREFIX)/lib/libpicotcp.a
@$(CC) -o $(PREFIX)/test/modunit_queue.elf $(CFLAGS) -I. test/unit/modunit_queue.c -lcheck -lm -pthread -lrt $(UNITS_OBJ)

devunits: mod core lib
Expand Down
42 changes: 42 additions & 0 deletions docs/user_manual/chap_api_aodv.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
\section{Ad-hoc On-Demand Distance Vector Routing (AODV)}


AODV is a reactive routing protocol for mobile ad-hoc networks
(MANETs). Its best fit are especially ultra-low power radio networks,
or those RF topologies where sporadic traffic between a small specific set
of nodes is foreseen.
In order to create a route, one node must explicitly start the communication
towards a remote node, and the route is created ad-hoc upon the demand
for a specific network path.
AODV guarantees that the traffic generated by each node in order to create
and maintain routes is kept as low as possible.

\subsection{pico\_aodv\_add}

\subsubsection*{Description}
This function will add the target device to the AODV mechanism on the machine,
meaning that it will be possible to advertise and collect routing information
using Ad-hoc On-Demand Distance Vector Routing, as described in RFC3561, through the
target device.

In order to use multiple devices in the AODV system, this function needs to be called
multiple times, once per device.

\subsubsection*{Function prototype}
\texttt{pico\_aodv\_add(struct pico\_device *dev);}

\subsubsection*{Parameters}
\begin{itemize}[noitemsep]
\item \texttt{dev} - a pointer to a struct \texttt{pico\_device} specifying the target interface.
\end{itemize}

\subsubsection*{Return value}
0 returned if the device is successfully added.

\subsubsection*{Example}
\begin{verbatim}
ret = pico_aodv_add(dev);
\end{verbatim}

0 comments on commit 869a6fb

Please sign in to comment.