Winpcap 的PCap文件格式解析
来源:互联网 发布:银行卡绑定了很多软件 编辑:程序博客网 时间:2024/06/10 06:31
Winpcap 的PCap文件格式解析
SourceCode: WinPcap Ver4.02
Tools: WireShark Ver 1.3.0-SVN-29835
Pcap为WireShark, Ethereal等网络协议分析器支持的常用格式之一。
如下将阐述PCAP的文件格式。
structpcap_file_header {
bpf_u_int32 magic; /* 0xa1b2c3d4 */
u_short version_major; /* magjor Version 2 */
u_shortversion_minor; /* magjorVersion 4 */
bpf_int32 thiszone; /* gmt to local correction */
bpf_u_int32 sigfigs; /* accuracy of timestamps */
bpf_u_int32 snaplen; /* max length saved portion of each pkt */
bpf_u_int32 linktype; /* data link type (LINKTYPE_*) */
};
表一
linktype
Value
LINKTYPE_NULL
0
LINKTYPE_ETHERNET
1
/* also for 100Mb and up */
LINKTYPE_EXP_ETHERNET
2
/* 3Mb experimental Ethernet */
LINKTYPE_AX25
3
LINKTYPE_PRONET
4
LINKTYPE_CHAOS
5
LINKTYPE_TOKEN_RING
6
/* DLT_IEEE802 is used for Token Ring */
LINKTYPE_ARCNET
7
LINKTYPE_SLIP
8
LINKTYPE_PPP
9
LINKTYPE_FDDI
10
structtimeval {
long tv_sec; /* seconds 含义同time_t对象的值 */
long tv_usec; /* andmicroseconds */
};
structpcap_pkthdr {
struct timeval ts; /* time stamp */
bpf_u_int32 caplen; /* length of portion present */
bpf_u_int32 len; /* length this packet (off wire) */
};
pcap文件格式结构
文件头
格式如结构体pcap_file_header
数据包头1
格式如pcap_pkthdr
数据包
数据包
数据包头n-1
格式如pcap_pkthdr
数据包
数据包
数据包头n
格式如pcap_pkthdr
数据包
数据包
- Winpcap 的PCap文件格式解析
- pcap文件格式解析
- pcap文件格式及文件解析
- pcap文件格式及文件解析
- pcap文件格式及文件解析
- Wireshark的Pcap文件格式分析及解析源码【转】
- Wireshark的Pcap文件格式分析及解析源码
- Wireshark的Pcap文件格式分析
- Wireshark的Pcap文件格式分析
- .pcap文件格式的再分析
- 简洁的Pcap文件格式--Wireshark
- 使用WinPcap和libpcap类库读写pcap文件(002)PCAP文件格式
- pcap文件格式
- PCAP文件格式
- pcap文件格式
- pcap文件格式
- pcap文件格式
- pcap文件格式
- 进化论中的概率论 进化13个字母序列的无差期望值公式
- spring中通知Introduction的配置
- 安装mysql遇到的问题
- 深度探索C++对象模型学习笔记——构造语意学
- 5262
- Winpcap 的PCap文件格式解析
- 心情
- Spring中ref local与ref bean区别
- 石子合并(动态规划)详细解题报告(转)
- 项目中如何更好的控制客户需求
- 使用J2me网络编程访问网页内容--转载哦~~
- Our College Campus
- MVN 安装 JMX
- POJ 1128 Frame Stacking