全部博文(230)
标题 | 阅读 | 评论 | 转发 | 发布日期 | |
---|---|---|---|---|---|
Gentoo Quick Guide | 2302 | 0 | 0 | 2007-11-03 | |
HOWTO Maintain Gentoo - | 2961 | 0 | 0 | 2007-11-03 | |
The quick intro to libipq | 3249 | 0 | 0 | 2007-10-28 | |
Gentoo 安装初试 | 2477 | 0 | 0 | 2007-10-11 | |
关于 ARP 欺骗 | 3002 | 0 | 1 | 2007-10-10 | |
分享易中天的十句话 | 2817 | 2 | 0 | 2007-09-17 | |
强制类型转换、三目灵活运用、字节序调整 | 2357 | 0 | 0 | 2007-09-14 | |
Linux 下查看源码的利器 vim + ctags + cscope | 2780 | 1 | 0 | 2007-09-10 | |
QoS 原理介绍 | 3452 | 0 | 2 | 2007-09-09 | |
A packet through the linux 2.4 network stack | 2867 | 1 | 2 | 2007-09-08 | |
git 是个好东西! | 2041 | 0 | 0 | 2007-09-06 | |
看懂DVD文件格式 | 2964 | 0 | 0 | 2007-09-04 | |
VMware 对 Linux 内核协议栈有干扰 | 2681 | 0 | 0 | 2007-09-04 | |
Linux TCP/IP 协议栈的关键数据结构Socket Buffer(sk_buff ) | 3032 | 0 | 2 | 2007-08-30 | |
让 Linux 支持 UPnP(实战) | 10488 | 0 | 2 | 2007-08-28 | |
今天去体检了 | 3078 | 0 | 0 | 2007-08-28 | |
无意中发现,自己长大了 | 2061 | 2 | 0 | 2007-08-27 | |
什么是 LPI? | 3671 | 0 | 0 | 2007-08-24 | |
DMIScope-BIOS 刷写 BIOS 来安装 OEM 系统 | 6223 | 0 | 0 | 2007-08-21 | |
一句看完以后使我久久不能忘怀的话 | 1578 | 0 | 0 | 2007-08-18 |
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,
}