全部博文(230)
标题 | 阅读 | 评论 | 转发 | 发布日期 | |
---|---|---|---|---|---|
DNS 记录类型 | 4162 | 0 | 0 | 2014-03-28 | |
Cache 替换算法【转】 | 3173 | 0 | 1 | 2011-07-11 | |
LVM HOWTO tips | 4210 | 0 | 0 | 2010-09-07 | |
glib 官方在线文档 | 2572 | 0 | 0 | 2010-06-29 | |
dedup util 数据块零碰撞算法 | 2318 | 0 | 0 | 2010-06-20 | |
Linux下的 C/C++ 开发与调试工具 | 2572 | 0 | 2 | 2010-06-20 | |
基于 Dedup 的数据打包技术 | 1380 | 0 | 0 | 2010-06-20 | |
重复数据删除技术 | 2881 | 0 | 1 | 2010-06-20 | |
计算机中的单位、进制关系 | 1949 | 0 | 0 | 2009-08-27 | |
how to write netfilter connection tracking helper | 3917 | 0 | 3 | 2007-12-15 | |
C Hash Table | 3620 | 0 | 2 | 2007-12-03 | |
A packet through the linux 2.4 network stack | 2870 | 1 | 2 | 2007-09-08 | |
看懂DVD文件格式 | 2982 | 0 | 0 | 2007-09-04 | |
Linux TCP/IP 协议栈的关键数据结构Socket Buffer(sk_buff ) | 3051 | 0 | 2 | 2007-08-30 | |
什么是 LPI? | 3682 | 0 | 0 | 2007-08-24 | |
DMIScope-BIOS 刷写 BIOS 来安装 OEM 系统 | 6229 | 0 | 0 | 2007-08-21 | |
ipt_account 的用法 | 3649 | 0 | 0 | 2007-08-11 | |
The system.map File | 1962 | 0 | 0 | 2007-07-11 | |
ASCII 码表 | 1816 | 0 | 0 | 2007-07-06 | |
The TCP state transition table needs a few words | 2450 | 4 | 0 | 2007-07-02 |
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,
}