文章分类 -  Linux Pcap

libpcap 编程入门资源
摘要:原文:http://blogold.chinaunix.net/u1/45976/showart_1984567.html最近在学习libpcap编程,找到几个非常好的libpcap编程入门资源。第一个当然是官网www.tcpdump.org/ 的document:《Programming with pcap 》《Programming with Libpcap - Sniffing the network from our own application》 (pdf,非常漂亮,文章写得又好)还有一篇《Aprendiendo a programar con libpcap》可惜是西班牙语,看不 阅读全文
posted @ 2011-05-30 15:21 hotty 阅读(386) 评论(0) 推荐(0)
C语言解析pcap文件得到HTTP信息实例(原创,附源码)
摘要:原文:http://xiexiaohui.com.host2.ugocn.com/index.php/archives/34转载请注明出处。来自 hello xiexh (xiexiaohui0921@163.com)这是进公司写的一个练手程序,程序功能为解析由Wireshark生成的pcap文件。实现步骤:1)用Wireshark软件抓包得到test.pcap文件2)程序:分析pcap文件头 -> 分析pcap_pkt头 -> 分析帧头 -> 分析ip头 -> 分析tcp头 -> 分析http信息#include<stdio.h>#include&l 阅读全文
posted @ 2011-05-19 14:25 hotty 阅读(3892) 评论(0) 推荐(0)
pcap入门级实例(转载)
摘要:原文:http://xiexiaohui.com.host2.ugocn.com/index.php/archives/47/*pcap_1.c*/#include <stdio.h>#include <stdlib.h>#include <pcap.h> /*如果没有pcap的系统,要自己下载一个 */#include <errno.h>#include <sys/socket.h>#include <netinet/in.h>#include <arpa/inet.h>int main(int argc, 阅读全文
posted @ 2011-05-19 11:28 hotty 阅读(805) 评论(0) 推荐(0)