-
Notifications
You must be signed in to change notification settings - Fork 25
Getting Started: CLI (Linux)
Wonsup Yoon edited this page Mar 21, 2024
·
12 revisions
- Compiler requirements
- for Debian/Ubuntu: (
sudo
)apt install make gcc g++ gdb
- for CentOS/Fedora: (
sudo
)yum install make gcc gcc-c++ gdb
KENS requires CMake 3.11 or higher.
- for recent Linux distros (Debian 10, Ubuntu 20.04, CentOS 8, Fedora 26, or later)
- for Debian/Ubuntu: (
sudo
)apt install cmake
- for CentOS/Fedora: (
sudo
)yum install cmake
- for Debian/Ubuntu: (
- for old Linux distros
- for Debian: Debian backports
- for Ubuntu: Kitware APT
- for CentOS: Kitware homepage
- Download and extract latest version.
- Open terminal and go to the extracted directory
- Prepare build files
$ cmake -B build .
- Move to build directory
$ cd build
- Build
$ make -j$(nproc)
Run following binary.
$ ./app/echo/echo
Using random seed.
$ RANDOM_SEED=1234 ./app/echo/echo
You can use non-kens binary to run the echo application via following.
$ ./app/echo/echo-non-kens
Run following binaries to test your TCP implementation (part1 and part2 for PA#2).
$ ./app/kens/test-kens-open
$ ./app/kens/test-kens-bind
$ ./app/kens/test-kens-handshake
$ ./app/kens/test-kens-close
Using random seed.
$ RANDOM_SEED=1234 ./app/kens/test-kens-open
$ RANDOM_SEED=1234 ./app/kens/test-kens-bind
$ RANDOM_SEED=1234 ./app/kens/test-kens-handshake
$ RANDOM_SEED=1234 ./app/kens/test-kens-close
$ ./app/kens/test-kens-transfer
$ ./app/kens/test-kens-open-unreliable
$ ./app/kens/test-kens-bind-unreliable
$ ./app/kens/test-kens-handshake-unreliable
$ ./app/kens/test-kens-close-unreliable
$ ./app/kens/test-kens-transfer-unreliable
Using random seed.
$ RANDOM_SEED=1234 ./app/kens/test-kens-transfer
$ RANDOM_SEED=1234 ./app/kens/test-kens-open-unreliable
$ RANDOM_SEED=1234 ./app/kens/test-kens-bind-unreliable
$ RANDOM_SEED=1234 ./app/kens/test-kens-handshake-unreliable
$ RANDOM_SEED=1234 ./app/kens/test-kens-close-unreliable
$ RANDOM_SEED=1234 ./app/kens/test-kens-transfer-unreliable
You can run KENS with prebuilt solutions.
- Running prebuilt solutions
$ ./app/kens/test-kens-open-run-solution
$ ./app/kens/test-kens-bind-run-solution
$ ./app/kens/test-kens-handshake-run-solution
$ ./app/kens/test-kens-close-run-solution
$ ./app/kens/test-kens-transfer-run-solution
$ ./app/kens/test-kens-open-unreliable-run-solution
$ ./app/kens/test-kens-bind-unreliable-run-solution
$ ./app/kens/test-kens-handshake-unreliable-run-solution
$ ./app/kens/test-kens-close-unreliable-run-solution
$ ./app/kens/test-kens-transfer-unreliable-run-solution
Use routing-all to test routing assignment.
$ ./app/routing/routing-all
Some environments need to specify compiler to build KENS. You can set compilers like below.
$ cmake -B build . -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++
$ cmake -B build . -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++
Using Ninja Build
$ cmake -B build . -G "Ninja"