
# if test $ac_cv_linux_vers = unknown then
# { { echo "$as_me:$LINENO: error: cannot determine linux version when cross-compiling" >&5
#echo "$as_me: error: cannot determine linux version when cross-compiling" >&2}
# { (exit 1)exit 1}}
# fi
运行./configure --host=arm-linux
(2)打开生成的Makefile,将INCLS项改为INCLS=-I.-I./../libpcap-0.9.8 -I$(srcdir)/missing -I/usr/local/include,
DEFS项改为DEFS=-DHAVE_CONFIG_H -I./../libpcap-0.9.8 -I/usr/local/include -I$(srcdir)missing -D_U="__attribute__((unused))"。
LDFLAGS=-L/usr/local/lib。然后make,make install。在/usr/local/sbin下有个tcpdump的二进制文件,这个就是交叉编译成功的tcpdump
(3)将这个二进制文件放到tftpboot文件夹,用过tftp将这个文件下载到arm板上,chmod 777 tcpdump将其变为可执行文件。
(4)运行tcpdump,成功!
linux下有命令可直接执行抓包的,命令如下:1、tcpdump -vv -i ethN -s 10240 -w /root/abc.cap host ip2、上述命令中,ethN,是你要抓的本机网卡,一般是eth0,可使用ifconfig查看使用的哪个网卡
-s 指定的是抓包数量 -w指定的是抓到的包写到哪个位置 host ip即为抓取哪个ip 的包
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)