sk_buff结构定义在<include/linux/skbuff.h>头文件中,由变量堆组成。sk_buff数据结构分布 整个结构体...
inteth_header(structsk_buff*skb,structnet_device*dev,u16 type,void*daddr,void*saddr,intlen){//将skb->data = skb->data + ETH_ALEN;structethhdr*eth=(structethhdr*)skb_push(skb,ETH_ALEN);if(type!=ETH_P_802_3)eth->proto=htons(type);// htons()将本地类型转换为网络类型elseeth->proto...
target(structsk_buff **pskb, conststructnet_device *in, conststructnet_device *out, unsignedinthooknum, constvoid*targinfo, void*userinfo) { conststructipt_id_target_info *idinfo = targinfo; // 如果当前包的ID值和指定值不同,将指定值赋值给IP头中的ID字段 if((*pskb)->nh.iph->id != ...
inteth_header(structsk_buff*skb,structnet_device*dev,u16 type,void*daddr,void*saddr,intlen){//将skb->data = skb->data + ETH_ALEN;structethhdr*eth=(structethhdr*)skb_push(skb,ETH_ALEN);if(type!=ETH_P_802_3)eth->proto=htons(type);// htons()将本地类型转换为网络类型elseeth->proto...