We represent the OS library (library operating system, LibOS) for Linux.
Our task is to create a network kernel stack as an external shared library that can be executed in user space in order to provide personalized network stack options and testing tools. Developers will have a tool to simplify the simulation of complex network topologies from Linux routers / hosts.
Although the architecture itself is able to virtualize many things, the current design focuses only on the network stack. You can use the network stack functions such as TCP, UDP, SCTP, DCCP (IPv4 and IPv6), Mobie IPv6, Multipath TCP (IPv4 / IPv6, while not included in the main branch) and netlink in various user-space applications (quagga, iproute2, iperf, wget, thttpd).
What is LibOS
The library is accessed via the API (
lib_init()
) to connect the user-space applications to the userspace version of the kernel kernel stack. The clock generator, the
net_device
virtual structure, and the scheduler are supported by the caller, and kernel resources like system calls are provided by the callee.
')
Once the LibOS is initialized through the API, user-space applications with a POSIX socket can use the system calls defined in LibOS, replacing the original characters from the socket with those specific to LibOS. Thus, the application uses the LibOS network stack, without involving the host network stack.
There are currently two LibOS users: this is the Network Stack in Userspace
(NUSE) and ns-3 network simulator with Direct Code Execution (DCE). They are submitted to the
external repository .
How to use
To build a library
% make {defconfig,menuconfig} ARCH=lib
then collect.
% make library ARCH=lib
You will see
liblinux-$(KERNELVERSION).so
in the top level folder.
Additional Information
The main difference from UML (user-mode linux) is that LibOS allows running multiple instances with a network stack within the same process with
dlmopen(3)
, including for ease of debugging.
These patches are available in the specified branch:
git://github.com/libos-nuse/net-next-nuse.git for-asm-upstream
For more information, see the
presentation from the last Netdev0.1 conference.