我记得新版本内核的这个地方的声明项目可行性研究报告
unsigned int package_check(
unsigned int hooknum,
struct sk_buff **pack, 应该是 sk_buff * pack的了
const struct net_device *in,
const struct net_device *out,
int (*okfn)(struct sk_buff *)
)
-----------------
不知道楼主用的那个版本的?编译的时候注意检查一下warning那些咯
我用过这样的代码是可以的
iph = ip_hdr(skb);
if (iph->protocol == IPPROTO_TCP) {
tcph = (void *) iph + iph->ihl * 4;