设为首页 加入收藏

TOP

libpcap1.0.0移植到ARM开发板上
2014-11-24 11:57:25 来源: 作者: 【 】 浏览:0
Tags:libpcap1.0.0 移植 ARM 开发

1、从http://www.tcpdump.org/官方网址上下载libpcap1.0.0源码压缩包,进行解压。


2、修改confiugre文件,把下面两段注释掉,在6249行和6587行,为什么要这样做,没有深入了解其原因。


#if test -z "$with_pcap" && test "$cross_compiling" = yes; then
# { { echo "$as_me:$LINENO: error: pcap type not determined when cross-compiling; use --with-pcap=..." >&5
#echo "$as_me: error: pcap type not determined when cross-compiling; use --with-pcap=..." >&2;}
# { (exit 1); exit 1; }; }
#fi
.......
# 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


3、 执行./configure --host=arm-linux,这样就会使用arm-linux-gcc进行configure,生成Makefile


4、修改Makefile的prefix项为prefix=/usr/local/arm/3.4.1/arm-linux(这个就是你的交叉编译器所在目录,根据自己的情况修改),同时查看CC是否已=arm-linux-gcc。


5、接下来make,make install,完成了libpcap的编译和安装,查看/usr/local/arm/3.4.1/arm-linux/include,是否多出pcap文件夹和pcap.h、pcap-bpf.h、pcap-namedb.h这四个东西。


到此libpcap1.0.0移植成功,接下来就是自己编写相关应用程序进行测试了。


】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇libpcap向嵌入式Linux的移植过程 下一篇jQuery中html()使用事项

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容:

·在 Redis 中如何查看 (2025-12-26 03:19:03)
·Redis在实际应用中, (2025-12-26 03:19:01)
·Redis配置中`require (2025-12-26 03:18:58)
·Asus Armoury Crate (2025-12-26 02:52:33)
·WindowsFX (LinuxFX) (2025-12-26 02:52:30)