From 4f51c9f05cb63287d9af1afa96e058d1d6763cc8 Mon Sep 17 00:00:00 2001 From: Hajime Tazaki Date: Fri, 26 Feb 2016 20:24:56 +0900 Subject: [PATCH] lkl: add documentation for configurable environmental variables Fixes #94. Signed-off-by: Hajime Tazaki --- Documentation/lkl.txt | 58 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/Documentation/lkl.txt b/Documentation/lkl.txt index 9a0bc25482accf..1687046bb18b83 100644 --- a/Documentation/lkl.txt +++ b/Documentation/lkl.txt @@ -94,6 +94,64 @@ following command: $ make CROSS_COMPILE=i686-w64-mingw32- tools/lkl +LKL hijack library +------------------ + +LKL hijack library (liblkl-hijack.so) is used to replace system calls used by an +application on the fly so that the application can use LKL instead of the kernel +of host operating system. LD_PRELOAD is used to dynamically override system calls +with this library when you execute a program. + +You can usually use this library via a wrapper script. + + $ cd tools/lkl + $ ./bin/lkl-hijack.sh ip address show + +There are environmental variables to configure the behavior of LKL. The followings +are the list of those variable for your environment. + +* LKL_HIJACK_NET_TAP + + an interface name for tap device in host operating system to connect to LKL. +``` + $ LKL_HIJACK_NET_TAP=tap0 lkl-hijack.sh ip address show +``` +* LKL_HIJACK_NET_IP + + the IP address of the interface specified by LKL_HIJACK_NET_TAP. +``` + $ LKL_HIJACK_NET_IP=198.51.100.5 lkl-hijack.sh ip address show +``` +* LKL_HIJACK_NET_NETMASK_LEN + + the network mask length of the interface specified by LKL_HIJACK_NET_TAP. +``` + $ LKL_HIJACK_NET_IP=198.51.100.5 LKL_HIJACK_NET_NETMASK_LEN=24 lkl-hijack.sh ip address show +``` +* LKL_HIJACK_NET_MAC + + the MAC address of the interface specified by LKL_HIJACK_NET_TAP. +``` + $ LKL_HIJACK_NET_MAC="aa:bb:cc:dd:ee:ff" lkl-hijack.sh ip address show +``` +* LKL_HIJACK_NET_GATEWAY + + the gateway IP address of LKL network stack. +``` + $ LKL_HIJACK_NET_GATEWAY=198.51.100.5 lkl-hijack.sh ip address show +``` +* LKL_HIJACK_NET_MTU + + the MTU size of the interface specified by LKL_HIJACK_NET_TAP. +``` + $ LKL_HIJACK_NET_MTU=1280 lkl-hijack.sh ip address show +``` +* LKL_HIJACK_DEBUG + + increate the verbose level of debug information. +``` + $ LKL_HIJACK_DEBUG=1 lkl-hijack.sh ip address show +``` FAQ ---