全部博文(230)
标题 | 阅读 | 评论 | 转发 | 发布日期 | |
---|---|---|---|---|---|
使用open vswitch构建虚拟网络 | 6346 | 0 | 0 | 2015-04-21 | |
OpenvSwitch完全使用手册 | 5792 | 0 | 0 | 2015-04-21 | |
别用TCP的紧急数据 | 3369 | 0 | 0 | 2015-04-09 | |
Inside TCP:显式拥塞控制 | 1362 | 0 | 0 | 2015-04-09 | |
Inside TCP: Spurious RTO 问题 | 2035 | 0 | 0 | 2015-04-09 | |
Inside TCP:TCP确认机制 | 1082 | 0 | 0 | 2015-04-09 | |
Inside TCP: 拥塞控制 | 1317 | 0 | 0 | 2015-04-09 | |
Data Center TCP(DCTCP) | 12650 | 1 | 0 | 2015-04-09 | |
TCP SNMP counters (一) | 1612 | 0 | 0 | 2015-04-09 | |
TCP SNMP counters (二) | 1246 | 0 | 0 | 2015-04-09 | |
TCP SNMP counters (三) | 1445 | 0 | 0 | 2015-04-09 | |
无线报文简单分析 | 1862 | 0 | 0 | 2015-02-05 | |
【推荐】 nc 传输文件 | 4423 | 0 | 0 | 2014-05-01 | |
CLOSE_WAIT状态的原因与解决方法 | 2636 | 0 | 0 | 2014-04-23 | |
SACC2013(备忘一下) | 2241 | 0 | 0 | 2014-03-14 | |
线速 pps 计算方法 | 9320 | 1 | 0 | 2013-04-16 | |
64byte 的数据包(最小包)的个数计算方法 | 6444 | 0 | 2 | 2009-06-18 | |
ipp2p VS. l7-filter | 7101 | 3 | 3 | 2008-01-14 | |
The quick intro to libipq | 3249 | 0 | 0 | 2007-10-28 | |
关于 ARP 欺骗 | 3002 | 0 | 1 | 2007-10-10 |
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,
}