1. 下载 tcpdump
2. 交叉编译
交叉编译libpcap:
$ wget http://www.tcpdump.org/release/libpcap-1.8.1.tar.gz
$ tar -xvf ibpcap-1.8.1.tar.gz
$ cd libpcap-1.8.1
$ ./configure --prefix=$PWD/install --host=arm-hisiv500-linux --with-pcap=linux
$ make
$ make install
交叉编译 tcpdump:
$ wget http://www.tcpdump.org/release/tcpdump-4.9.1.tar.gz
$ tar -xvf tcpdump-4.9.1.tar.gz
$ cd tcpdump-4.9.1
$ make
3. 相关说明
配置出错:
configure: error: Neither flex nor lex was found.
$ sudo apt-get install flex bison