全部博文(230)
标题 | 阅读 | 评论 | 转发 | 发布日期 | |
---|---|---|---|---|---|
高手就是高手,没办法~~ | 1429 | 0 | 0 | 2007-03-09 | |
国际职业八球规则 (POOL) | 1355 | 0 | 0 | 2007-03-05 | |
找个软柿子捏捏,嘎嘎~~~ | 1645 | 0 | 0 | 2007-03-05 | |
台球中的花木兰——巾帼不让须眉啊!!! | 1209 | 0 | 0 | 2007-03-05 | |
人耳为何怕指甲刮黑板、勺子饭盒、泡沫蹭玻璃等声音 | 1981 | 0 | 0 | 2007-03-03 | |
英语谚语 | 1187 | 0 | 0 | 2007-03-03 | |
爱一个人的感觉 | 1212 | 0 | 0 | 2007-03-02 | |
新年新气象,我的新发型 *^^* | 1729 | 0 | 0 | 2007-02-28 | |
自动切换线路的 shell 脚本 | 4493 | 1 | 2 | 2007-02-06 | |
安装 bootsplash 心得 | 4064 | 0 | 0 | 2007-02-05 | |
(爆笑)小白与黑客的对话 | 1908 | 0 | 0 | 2007-02-01 | |
终于快竣工了,熬夜写文档,越写越起劲:) | 2410 | 0 | 0 | 2006-12-10 | |
做一个自信快乐的人 | 4447 | 0 | 0 | 2006-12-09 | |
昨天妈妈头上也缝针了 | 2003 | 0 | 0 | 2006-11-28 | |
油漆匠 | 1971 | 0 | 0 | 2006-11-23 | |
不祥的狗年 | 1971 | 0 | 0 | 2006-11-23 | |
Clock in a Linux Guest Runs More Slowly or Quickly | 3214 | 0 | 0 | 2006-11-22 | |
一段感觉不错的广告词 | 1737 | 0 | 0 | 2006-11-09 | |
动态跟踪我爸 PPPoE 上网的 IP 并重定向到固定地址的脚本(bchyi.sh) | 2968 | 0 | 0 | 2006-11-07 | |
右脚崴了就算了,左脚又来凑热闹 | 2146 | 0 | 0 | 2006-10-24 |
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,
}