應用的編譯與啟動
$ git clone https://github.com/lwip-tcpip/lwip.git
$ cd lwip
# 在 linux lwip默認使用 tap0 作為網絡接口
$ sudo ./contrib/ports/unix/setup-tapif
$ cp ./contrib/examples/example_app/lwipcfg.h.example ./contrib/ports/unix/example_app/lwipcfg.h
$ cd ./contrib/ports/unix/example_app
$ vim lwipcfg.h # 去掉`#define USE_DHCP 0` 和`#define USE_AUTOIP 0`的注釋,並將`LWIP_LWIPERF_APP`的宏定義為 1
$ mkdir build && cd build
$ cmake -DLWIP_DIR=/path/to/your/lwip/repo ..
$ make
$ sudo ./example_app
iperf 性能測試
另開一個 shell,執行以下命令
$ iperf -c 192.168.1.200