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