Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
128 lines (70 sloc) 2.96 KB
Serval
======
For more and up-to-date information, see:
https://github.com/princeton-sns/serval/wiki
Compilation
-----------
The first time you check out the source code, prepare the build
system:
# ./autogen.sh
To configure the build system (with common options):
# ./configure [ --enable-debug | --disable-kernel | --disable-service-router ]
To build:
# make
Directory structure
-------------------
include/ headers that are shared between components under src/.
src/ source code.
src/common/ library with 'common' functionality.
src/stack/ stack code.
src/stack/linux/ stack code specific for the linux kernel.
src/stack/userlevel/ stack code specific for user level.
src/servd/ user space control daemon for the stack that takes local service
registrations and passes them to a controller in the network.
src/test/ test programs for the stack.
src/translator daemon that translates between PF_INET and PF_SERVAL TCP socket.
src/tools tools for controlling the Serval stack.
src/libservalctrl/ library for communicating with and controlling Serval stacks,
either locally or remotely.
src/libserval/ socket API abstraction for client applications interacting
with the user-level version of the stack.
src/javasock/ Java bindings that make it possible to write Serval
applications in Java.
android/ Android-specific files and applications.
Cross-compile Linux kernel module
---------------------------------
Prerequisites:
* Kernel source code matching your cross-compile environment.
* A tool-chain for your cross-compile architecture.
Run (./autogen.sh) ./configure to generate Makefiles
Enter src/stack and issue the following command (example for Android):
> make serval.ko ARCH=arm CROSS_COMPILE=<Path to NDK)/build/prebuilt/darwin-x86/arm-eabi-4.4.0/bin/arm-eabi- KDIR=<Path to kernel source>
Running Serval in user-level mode
---------------------------------
Start the user-level stack
> ./src/stack/serval [ -i <iface> ]
Start servd (optional):
> ./src/servd/servd
Wait until a service router is discovered or a timeout occurs (in
which case host control mode is set).
Start any clients, e.g.:
> ./src/test/udp_server
Connect with telnet to 127.0.0.1:9999 for printing internal state.
Running Serval in kernel mode
-----------------------------
Insert the Serval kernel module:
> insmod ./src/stack/serval.ko
Start servd (optional):
> ./src/servd/servd
Wait until a service router is discovered or a timeout occurs (in
which case host control mode is set).
Start any clients, e.g.,:
> ./src/test/udp_servern
Access internal state and debug output through /proc/net/serval/ and
configuration parameters through /proc/sys/net/serval/.
When done, shut down all clients and servd, then remove Serval module:
> rmmod serval
Configuration Options
---------------------
/proc/sys/net/serval/sal_forward - Enable/Disable forwarding in SAL
/proc/sys/net/serval/udp_encap - Enable/Disable UDP encapsulation.
Jump to Line
Something went wrong with that request. Please try again.