linux安装libpcap
来源:互联网 发布:大众网络报编辑 编辑:程序博客网 时间:2024/06/08 18:17
1.首先是安装
用了apt-get install 一直不行,然后就选择wget下载后,-xzvf压缩,然后再./configure、make和make install。
2、编写了简单例子,#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <pcap/pcap.h>
int main(int argc,char *argv[]){
char *dev, errbuf[PCAP_ERRBUF_SIZE];
dev=pcap_lookupdev(errbuf);
if(dev==NULL){
fprintf(stderr,"couldn't find default device: %s\n",errbuf);
return(2);
}
printf("Device: %s\n",dev);
return(0);
}
来源: <http://blog.163.com/lifuliang207@126/blog/static/12726353120131022283250/>
undefined reference to pcap_findalldevs,这个时候百度了下,有人说需要安装libpcap-dev,安装了下,还是报错,这里应该是链接时候的错误,使用-lpcap就okay了。 0 0
- linux安装libpcap
- linux安装libpcap
- linux系统安装libpcap
- linux 安装libpcap
- linux下安装libpcap步骤
- Linux下libpcap的安装
- Linux下libpcap的安装
- Linux下libpcap的安装
- Linux下libpcap的安装
- linux下安装libpcap步骤
- Linux下libpcap的安装
- linux系统libpcap安装方法
- linux 下安装libpcap (库)手记
- linux 下安装libpcap (库)手记
- Linux下libpcap的安装与使用
- Linux下测试libpcap是否安装成功
- libpcap安装
- 安装Libpcap
- 使用always过程块实现一个选择运算器及八选一数据选择器
- 使用系统照相机需要注意的问题
- 找工作 - 第一天
- IoC模式
- 将eclipse java程序打包成jar的总结(包括工程中没有引用外部jar包和有引用外部jar包两种情况)
- linux安装libpcap
- cocos2d-x和Android学习思考
- java 数组
- Aerospike C客户端手册———键-值存储—读取记录
- Exception in thread "Driver" java.io.IOException: Log directory hdfs://vanzin-krb-1.vpc.cloudera.com
- linux命令“sudo”
- LigerUI之Grid使用详解(一)——显示数据
- 【字符串】大数的乘法(包括浮点数)
- linux中如何读取串口收发数据