WinPcap 获取本地适配器信息
来源:互联网 发布:数组的存储方式 编辑:程序博客网 时间:2024/05/06 17:57
开始学习WinPcap的相关开发
从最简单的开始, 获取本地的网卡信息
#include <stdio.h>#include <stdlib.h>#define HAVE_REMOTE#include <pcap.h>#pragma comment(lib,"wpcap.lib")int _tmain(int argc, _TCHAR* argv[]){pcap_if_t *alldevs;pcap_if_t *d;int i = 0;char errbuf[PCAP_ERRBUF_SIZE];/* get local devices */if(pcap_findalldevs_ex(PCAP_SRC_IF_STRING, NULL, &alldevs, errbuf) == -1){fprintf(stderr, "Error in pcap_findalldevs_ex: %s\n", errbuf);exit(1);}/* print devices list */for(d = alldevs; d != NULL; d = d->next){printf("%d. %s", ++i, d->name);if (d->description)printf("(%s)\n", d->description);elseprintf("(No description available)\n");}if(i == 0){printf("\nNo interfaces found! Make sure Winpcap is installed.\n");return -1;}pcap_freealldevs(alldevs);getchar();return 0;}
0 0
- WinPcap 获取本地适配器信息
- WinPcap编程入门(1)——获取本地适配器信息
- 获取本地适配器信息
- winpcap获取适配器列表
- 获得本地适配器信息
- WIN网络编程-获取本地适配器信息
- GetAdaptersAddresses获取适配器信息
- 获取适配器网卡信息
- WinPcap. 获取本地驱动设备列表
- WinPcap教程(2):获取设备高级信息
- WinPcap教程(2):获取设备高级信息
- WinPcap获取网卡的更多信息
- 计算机网络课程设计二——获取本地适配器的主要信息
- 通过注册表获取适配器信息
- 获取本地信息
- 使用Winpcap获取本地IP和子网掩码的简单程序
- WinPcap编程【3】获取已安装设备的高级信息
- WinPcap编程【3】获取已安装设备的高级信息
- 结构、表现、行为 分离
- Problem I. Improvements
- python学习——基础
- 导向滤波 收集材料备份
- 大型高并发高负载网站/论坛的系统架构
- WinPcap 获取本地适配器信息
- .net之session跨页面传值
- SQL语句中的Having子句与where子句之区别
- 工厂模式
- 语音通话中talkspurt的介绍
- 有关电子商务平台的个人学习总结
- Python: 实现bitmap数据结构
- 欢迎使用CSDN-markdown编辑器
- clousim学习笔记----关于cloudlet从生到死