菜人netfilter问题,急急急,请高手帮忙 急急急急急急急急急急急急
#define MODULE
#include <linux/module.h>
#define __KERNEL__
#include <linux/kernel.h>
#include <linux/netfilter.h>
#include <linux/netfilter_ipv4.h>
static struct nf_hook_ops nfho;
/* 注册的hook函数的实现 */
unsigned int hook_func(unsigned int hooknum,
struct sk_buff **skb,
const struct net_device *in,
const struct net_device *out,
int (*okfn)(struct sk_buff *))
{
return 0; /* NF_DROP丢弃所有的数据包 */
}
int init_module()
{
nfho.list={NULL,NULL};
nfho.hook = hook_func;
nfho.hooknum =NF_IP_PRE_ROUTING;
nfho.pf =PF_INET;
nfho.priority = &n