Skip to content

Commit

Permalink
lkl: add documentation for configurable environmental variables
Browse files Browse the repository at this point in the history
Fixes torvalds#94.

Signed-off-by: Hajime Tazaki <thehajime@gmail.com>
  • Loading branch information
thehajime committed Feb 26, 2016
1 parent 391b8a8 commit 4f51c9f
Showing 1 changed file with 58 additions and 0 deletions.
58 changes: 58 additions & 0 deletions Documentation/lkl.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
---
Expand Down

0 comments on commit 4f51c9f

Please sign in to comment.