全部博文(230)
标题 | 阅读 | 评论 | 转发 | 发布日期 | |
---|---|---|---|---|---|
Inside TCP: Spurious RTO 问题 | 2043 | 0 | 0 | 2015-04-09 | |
Inside TCP:TCP确认机制 | 1091 | 0 | 0 | 2015-04-09 | |
Inside TCP: 拥塞控制 | 1326 | 0 | 0 | 2015-04-09 | |
Data Center TCP(DCTCP) | 12702 | 1 | 0 | 2015-04-09 | |
TCP SNMP counters (一) | 1620 | 0 | 0 | 2015-04-09 | |
TCP SNMP counters (二) | 1256 | 0 | 0 | 2015-04-09 | |
TCP SNMP counters (三) | 1456 | 0 | 0 | 2015-04-09 | |
【推荐】 pf_ring透明工作模式(transparent_mode)原理 | 1957 | 0 | 0 | 2015-04-06 | |
[kipmi0]进程CPU占用率高 | 4228 | 0 | 0 | 2015-04-06 | |
无线报文简单分析 | 1867 | 0 | 0 | 2015-02-05 | |
【推荐】 nc 传输文件 | 4433 | 0 | 0 | 2014-05-01 | |
CLOSE_WAIT状态的原因与解决方法 | 2646 | 0 | 0 | 2014-04-23 | |
远程执行 Linux 图形界面程序 | 3891 | 0 | 0 | 2014-04-15 | |
DNS 记录类型 | 4167 | 0 | 0 | 2014-03-28 | |
读 SCTP 协议漏洞有感 | 3312 | 0 | 0 | 2014-03-28 | |
SACC2013(备忘一下) | 2247 | 0 | 0 | 2014-03-14 | |
Windows Performance Monitor: "Unable to add these counters" | 4710 | 0 | 0 | 2014-03-13 | |
vim tips | 2858 | 0 | 0 | 2013-08-08 | |
Git Tips | 4141 | 0 | 4 | 2013-07-30 | |
线速 pps 计算方法 | 9362 | 1 | 0 | 2013-04-16 |
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,
}