4.88 KB, 下载次数: 27
.c 文件
const struct iphdr *iph = ip_hdr(skb);
unsigned int tcplen = skb->len - iph->ihl * 4;
const struct tcphdr *tcph =(struct tcphdr *)(skb_network_header(skb) + iph->ihl * 4);
datalen = tcplen - tcph->doff * 4; //得到http长度
data = (void *)tcph + tcph->doff * 4; //得到http数据部分
欢迎光临 Chinaunix (http://bbs.chinaunix.net/) | Powered by Discuz! X3.2 |