全部博文(230)
| 标题 | 阅读 | 评论 | 转发 | 发布日期 | |
|---|---|---|---|---|---|
| ssh 公钥认证文件名(总忘,记下来!) | 2472 | 2 | 0 | 2007-08-18 | |
| 用 readline 实现了自定义命令补全功能 | 2540 | 0 | 0 | 2007-08-16 | |
| 我 vmware 下 linux 的时钟超快 | 1772 | 1 | 0 | 2007-08-16 | |
| 开始接触 2.6 内核了 | 2260 | 2 | 0 | 2007-08-13 | |
| 买了个 N72,攒一些资源站点 | 1711 | 0 | 0 | 2007-08-11 | |
| ipt_account 的用法 | 3801 | 0 | 0 | 2007-08-11 | |
| The system.map File | 2039 | 0 | 0 | 2007-07-11 | |
| 最近有点累,也许应该休息一下了 | 2072 | 2 | 0 | 2007-07-09 | |
| Linux 做无线 AP | 5632 | 0 | 0 | 2007-07-07 | |
| 一直觉得刘翔和巩俐很像,可是没人认同我,难道我的眼光有问题? | 2321 | 5 | 0 | 2007-07-07 | |
| ASCII 码表 | 1944 | 0 | 0 | 2007-07-06 | |
| The TCP state transition table needs a few words | 2496 | 4 | 0 | 2007-07-02 | |
| 什么是白皮书,蓝皮书,绿皮书,红皮书 | 2734 | 0 | 0 | 2007-06-30 | |
| RFC1025 - TCP AND IP BAKE OFF | 3048 | 0 | 0 | 2007-06-28 | |
| 直升机能做翻滚吗? | 3184 | 0 | 0 | 2007-06-24 | |
| http://www.quest.i-poon.com | 4117 | 2 | 0 | 2007-06-13 | |
| iptables 里 recent 模块的用法 | 3932 | 0 | 1 | 2007-06-10 | |
| 存储入门:光纤网卡和 HBA 卡的区别 | 3447 | 0 | 0 | 2007-06-10 | |
| 关于 date 命令的用法(总忘!) | 3006 | 1 | 1 | 2007-06-10 | |
| Creating a shared and static library [gcc] | 3369 | 0 | 0 | 2007-06-08 |
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,
}