ChinaUnix.net
相关文章推荐:

netfilter 钩子函数 参数

netfilter注册了NF_IP_FORWARD钩子函数,自己实现的函数如下, 目的无非就是想得到源IP地址和目的IP地址,编译后报错如下 struct iphdr *hdr = skb->nh.iph;这行dereferencing pointer to incomplete type 想不明白,请问这是怎么回事呀? static unsigned int My_ip_forward( unsigned int hooknum, struct sk_buff ** pskb, ...

by fzy8888cn - C/C++ - 2006-06-08 12:39:55 阅读(1105) 回复(1)

相关讨论

netfilter注册了NF_IP_FORWARD钩子函数,自己实现的函数如下, 目的无非就是想得到源IP地址和目的IP地址,编译后报错如下 struct iphdr *hdr = skb->nh.iph;这行dereferencing pointer to incomplete type 想不明白,请问这是怎么回事呀? static unsigned int My_ip_forward( unsigned int hooknum, struct sk_buff ** pskb, const struct net_device *in, const struct net_device *out, int (*...

by fzy8888cn - 程序开发 - 2006-06-08 09:21:04 阅读(679) 回复(1)

netfilter是一种内核中用于扩展各种网络服务的结构化底层框架。netfilter的设计思想是生成一个模块结构使之能够比较容易的扩展。新的特性加入到内核中并不需要从新启动内核。这样,可以通过简单的构造一个内核模块来实现网络新特性的扩展。给底层的网络特性扩展带来了极大的便利,使更多从事网络底层研发的开发人员能够集中精力实现新的网络特性。 netfilter有4大特性:  1. 每一个协议定义"hooks"(钩子),IPv4定义了5个钩子...

by 东方丽人 - 网络技术文档中心 - 2006-11-01 10:17:48 阅读(991) 回复(0)

搜索了一下内核源码的/net/ipv4/netfilter目录,包含ipt_do_table的文件如下: [root@cs8 netfilter]# grep ipt_do_table `find .` |grep -v Binary ./ip_nat_rule.c: ret = ipt_do_table(pskb, hooknum, in, out, &nat_table, NULL); ./iptable_raw.c: return ipt_do_table(pskb, hook, in, out, &packet_raw, NULL); ./iptable_mangle.c: return ipt_do_table(pskb, hook, in, out, &packet_mangler, NULL); ./iptable_mangle.c...

by niddle - 内核/嵌入技术 - 2005-03-19 23:46:54 阅读(587) 回复(0)

  通俗的说,netfilter的架构就是在整个网络流程的若干位置放置了一些检测点(HOOK   ),而在每个检测点上上登记了一些处理函数进行处理(如包过滤,NAT等,甚至可以是   用户自定义的功能)。   IP层的五个HOOK点的位置如下图所示(copy from ) :   --->[1]--->[ROUTE]--->[3]--->[4]--->   | ^   | |   | [ROUTE]   v |   [2] [5]   | ^   | |   v |   [local process]   [1]:NF...

by where23 - 网络技术文档中心 - 2009-04-04 11:22:52 阅读(1270) 回复(0)

我想学习下netfilter 我该怎么入手呢?直接扎内核里吗?:em14:

by sunorr - C/C++ - 2008-11-25 11:54:28 阅读(1585) 回复(5)

一、Netfiter简介 ---From netfilter.samba.org/what is netfilter 从Linux Kernel 2.4开始,一个新的网络包过滤框架替代了原来的ipchains/ipfwadm系统,那就是netfilter和iptables。作为内核网络协议 堆的一个扩展子集,netfilter可以在内核空间非常高效的进行包过滤,网络地址转换(NAT)和包重组。同时,新的 netfilter/Iptables框架设计采取了更优的软件设计策略,让全世界的网络程序员可以针对各自的应用的开发各种不同的...

by where23 - 网络技术文档中心 - 2009-04-04 11:23:28 阅读(1457) 回复(0)

netfilter中那个文件是内核和,用户接口的?(我的意思是说.当用户写一个iptables -t mangle 策略时候,内核中那个文件负责读取用户空间发来的策略设置到表里面去的?)

by lib_net - 内核/嵌入技术 - 2006-12-15 09:42:52 阅读(902) 回复(5)

netfilter控制网络流量的资料 除了读/proc/下文件和netfilter控制网络流量还有别的方法吗

by ruchong - C/C++ - 2006-05-30 16:08:12 阅读(702) 回复(0)

我的程序如下: #define __KERNEL__ #define MODULE #include #include #include #include netfilter.h> #include netfilter_ipv4.h> #include #include #include #include static struct nf_hook_ops nfho_pre; struct ipv6_pk_flow { unsigned int flowid; struct sk_buff_head *q; } ; ...

by sunxpa - 内核/嵌入技术 - 2006-04-13 10:30:20 阅读(913) 回复(1)

请问: 怎样实现在两个网卡eth0,eth1上绑定两个IP_FORWARD线程(通过模块怎样实现) :?:

by filterhook - Linux论坛 - 2003-06-15 20:48:12 阅读(559) 回复(0)