/home/adang/Desktop/biyesheji/imp2/imp2_k.c: In function ‘get_icmp’:
/home/adang/Desktop/biyesheji/imp2/imp2_k.c:118: error: ‘struct sk_buff’ has no member named ‘nh’
Post by sunzhonghai666;2110608
2.6.20内核以后的skbuff.h头文件中将struct sk_buff结构体修改了,h中包含有传输层的报文头,nh中包含有网络层的报文头,而mac中包含的是链路层的报文头。
linux-2.6.20以后的内核头文件sk_buff.h中这三个成员提取到单独的变量对应关系如下:
h-->transport_header;
nh-->network_header;
mac-->mac_header;