安装java tcpdump
2015-07-06 15:02
861 查看
安装libpcap.a
http://www.cnblogs.com/lynch_world/archive/2011/08/31/2160678.html http://www.linuxfromscratch.org/blfs/view/6.2.0/basicnet/libpcap.html
libpcap provides functions for user-level packet capture, used in low-level network monitoring.
Download (HTTP): http://www.tcpdump.org/release/libpcap-0.9.4.tar.gz
Download (FTP):
Download MD5 sum: 79025766e8027df154cb1f32de8a7974
Download size: 416 KB
Estimated disk space required: 3.2 MB
Estimated build time: less than 0.1 SBU
of passive network monitoring cards.
User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/libpcap
Install libpcap by running the following commands:
./configure
在这一步可能会遇到缺少flex包的问题:
解决方法:
4、编译
make
可能会遇到yacc错误:
解决方法:
5、安装
sudo make install
注意:要加上sudo,不然会出现权限问题。
6、示例
testlibpcap.c文件,目的是为了查询网络设备。
然后编译:
gcc编译后,运行./testlibpcap会出错:
解决方法:
到/usr/lib下找到libpcap.so.1.x.x文件,复制一个备份,重命名为libpcap.so.1,将libpcap.so.1后拷贝文件到/usr/lib目录下,就可以了。
还有一点需要注意:
如果直接这样运行./testlibpcap,结果肯定是“no suitable device found”,原因是权限不够,所以,还需要这样运行才能结果正常。
sudo ./testlibpcap
安装
This package does not come with a test suite.
Now, as the root user:
Installed Programs:None
Installed Library:libpcap.a
Installed Directory:/usr/share/doc/libpcap-0.9.4
Last updated on 2007-02-14 11:57:11 -0600
安装libjpcap:
https://code.google.com/p/jdrcom/downloads/detail?name=jpcap-0.7.tar.gz&can=2&q=
makefile 添加-fPIC
这里可能遇到jni.h头文件找不到。
通过locate jni.h查找该头问价你的目录
注意下下jdk的目录:
http://www.cnblogs.com/lynch_world/archive/2011/08/31/2160678.html http://www.linuxfromscratch.org/blfs/view/6.2.0/basicnet/libpcap.html
Introduction to Libpcap
libpcap provides functions for user-level packet capture, used in low-level network monitoring.
Package Information
Download (HTTP): http://www.tcpdump.org/release/libpcap-0.9.4.tar.gzDownload (FTP):
Download MD5 sum: 79025766e8027df154cb1f32de8a7974
Download size: 416 KB
Estimated disk space required: 3.2 MB
Estimated build time: less than 0.1 SBU
Libpcap Dependencies
Optional
Software distribution for the DAG and Septel rangeof passive network monitoring cards.
User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/libpcap
Installation of Libpcap
Install libpcap by running the following commands:./configure --prefix=/usr && make
./configure
在这一步可能会遇到缺少flex包的问题:
4、编译
make
可能会遇到yacc错误:
sudo make install
注意:要加上sudo,不然会出现权限问题。
6、示例
testlibpcap.c文件,目的是为了查询网络设备。
到/usr/lib下找到libpcap.so.1.x.x文件,复制一个备份,重命名为libpcap.so.1,将libpcap.so.1后拷贝文件到/usr/lib目录下,就可以了。
还有一点需要注意:
如果直接这样运行./testlibpcap,结果肯定是“no suitable device found”,原因是权限不够,所以,还需要这样运行才能结果正常。
sudo ./testlibpcap
安装
This package does not come with a test suite.
Now, as the root user:
make install && install -v -m755 -d /usr/share/doc/libpcap-0.9.4 && install -v -m644 doc/*{html,txt} /usr/share/doc/libpcap-0.9.4
Contents
Installed Programs:NoneInstalled Library:libpcap.a
Installed Directory:/usr/share/doc/libpcap-0.9.4
Short Descriptions
libpcap.a | is a library used for user-level packet capture. |
安装libjpcap:
https://code.google.com/p/jdrcom/downloads/detail?name=jpcap-0.7.tar.gz&can=2&q=
makefile 添加-fPIC
$(CC) $(COMPILE_OPTION) -fPIC -I$(JNI_INCLUDE) -I$(JNI_INCLUDE2)\ -I$(PCAP_INCLUDE)\
这里可能遇到jni.h头文件找不到。
通过locate jni.h查找该头问价你的目录
注意下下jdk的目录:
$(CC) $(COMPILE_OPTION) -fPIC -I$(JNI_INCLUDE) -I$(JNI_INCLUDE2)\ -I$(PCAP_INCLUDE)\
相关文章推荐
- HDOJ-3549 Flow Problem(网络流)
- Http协议时无状态的,没有记忆功能,连接--传送--断开
- 第 1 节: 1-文本自增演示HttpHandler不记忆状态
- HttpHandler动态生成图片
- HttpResponse
- HttpRequest类
- 第 3 节: 3-Http协议之Request、Response
- HTTP协议分析
- 第 11 节: 11-HttpHandler简介
- TCP/UDP编程
- http协议分析工具
- HDOJ-1532 Drainage Ditches(网络流)
- HttpClient的使用方法
- iOS开发经验技巧之IOS中http请求使用cookie
- iOS 网络编程 socket 发送数据
- HttpClient的使用
- 影响移动应用网络性能的三大因素
- Swoole,PHP语言的高性能网络通信框架
- boost http请求应用
- 网络路径查询traceroute