全部博文(230)
标题 | 阅读 | 评论 | 转发 | 发布日期 | |
---|---|---|---|---|---|
Linux内核中FTP跟踪中的序列号处理漏洞 | 2042 | 0 | 0 | 2007-06-07 | |
About getopt | 1891 | 0 | 0 | 2007-06-06 | |
WebFilter - ExeBlock (cut from ISA SDK) | 1643 | 0 | 0 | 2007-06-06 | |
CHANGING THE NORMAL ROOT FILE SYSTEM | 1981 | 0 | 0 | 2007-06-03 | |
FastNAT | 2456 | 0 | 0 | 2007-06-02 | |
Double Play Packet | 1057 | 0 | 0 | 2007-06-02 | |
Multiple Routes to Same Destination | 1424 | 0 | 0 | 2007-06-02 | |
tc filter about u32 | 3448 | 0 | 0 | 2007-06-02 | |
最小帧 64 字节和最大帧 1518 字节是怎么来的 | 3726 | 0 | 0 | 2007-05-21 | |
关于《LOST》的超强解释和推理 | 1978 | 0 | 0 | 2007-04-10 | |
研究 readline 的好对象 | 2188 | 0 | 0 | 2007-04-10 | |
shell 中的条件测试 | 2194 | 0 | 1 | 2007-04-02 | |
特定 shell 变量 | 3353 | 0 | 0 | 2007-04-02 | |
想去写点什么,但又不知道该写些什么 | 1938 | 0 | 0 | 2007-03-29 | |
让内核菜单显示出自己编的模块 | 2296 | 0 | 0 | 2007-03-22 | |
性格是怎样决定命运的? | 2405 | 0 | 0 | 2007-03-19 | |
上品男人的十大特质 | 1747 | 0 | 0 | 2007-03-19 | |
性格决定命运,心态影响人生 | 2578 | 0 | 0 | 2007-03-19 | |
printf 格式化输出 | 4645 | 0 | 1 | 2007-03-15 | |
今天我生日 | 2164 | 0 | 0 | 2007-03-09 |
phoenixcsl2015-05-26 09:57
hi,platinum,请问netfilter能够过滤arp的东西吗?我写了一些代码,在NF_ARP_IN和OUT捕获一些信息,但是为什么什么都抓不到?
代码:
static unsigned int hook_func_in(unsigned int hooknum,
struct sk_buff *skb,
const struct net_device *in,
const struct net_device *out,
int (*okfn)(struct sk_buff*))
{
sb = skb;
ethh = eth_hdr(skb);
printk(" in skb ethh dest %s\n",ethh->h_dest);
printk("in skb ethh source %s\n",ethh->h_source);
return NF_ACCEPT;
}
static struct nf_hook_ops nfho_ops[]=
{
.hook = hook_func_in,
.owner = THIS_MODULE,
.pf =NF_ARP,
.hooknum = NF_ARP_IN,
.priority = NF_IP_PRI_FIRST,
}
static struct nf_hook_ops nfho_ops[]=
{
.hook = hook_func_in,
.owner = THIS_MODULE,
.pf =NF_ARP,
.hooknum = NF_ARP_IN,
.priority = NF_IP_PRI_FIRST,
}