免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
楼主: springwind426
打印 上一主题 下一主题

[网络管理] 发布一个速度匹配的内核模块(hashspeed) [复制链接]

论坛徽章:
0
1 [报告]
发表于 2008-03-10 11:34 |显示全部楼层
想问下老大这个限速模块能否实现在一个网段机器中``抽出几台机器不限速的给自己用
该怎么做?
谢谢

论坛徽章:
0
2 [报告]
发表于 2008-03-12 09:39 |显示全部楼层
我用2.6.24 iptables1.4编译出错类。。。。。
Makefile:24: You need to install iptables sources and maybe set IPTABLES_SRC
make -C /lib/modules/2.6.24.3/build M=/usr/src/hashspeed-0.1 modules
make[1]: Entering directory `/usr/src/linux-2.6.24.3'
  CC [M]  /usr/src/hashspeed-0.1/ipt_hashspeed.o
/usr/src/hashspeed-0.1/ipt_hashspeed.c: ÔÚº¯Êý ¡®ipt_hashspeed_init¡¯ ÖУº
/usr/src/hashspeed-0.1/ipt_hashspeed.c:751: ´íÎ󣺡®proc_net¡¯ δÉùÃ÷ (Ôڴ˺¯ÊýÄ                  ÚµÚÒ»´ÎʹÓ&Atilde
/usr/src/hashspeed-0.1/ipt_hashspeed.c:751: ´íÎó£º(¼´Ê¹ÔÚÒ»¸öº¯ÊýÄÚ¶à´Î³öÏÖ£¬Ã¿¸                  öδÉùÃ÷µÄ±êʶ·ûÔÚÆä
/usr/src/hashspeed-0.1/ipt_hashspeed.c:751: ´íÎó£ºËùÔڵĺ¯ÊýÄÚÖ»±¨¸æÒ»´Î¡&pound
/usr/src/hashspeed-0.1/ipt_hashspeed.c: ÔÚº¯Êý ¡®ipt_hashspeed_fini¡¯ ÖУº
/usr/src/hashspeed-0.1/ipt_hashspeed.c:773: ´íÎ󣺡®proc_net¡¯ δÉùÃ÷ (Ôڴ˺¯ÊýÄ                  ÚµÚÒ»´ÎʹÓ&Atilde
make[2]: *** [/usr/src/hashspeed-0.1/ipt_hashspeed.o] ´íÎó 1
make[1]: *** [_module_/usr/src/hashspeed-0.1] ´íÎó 2
make[1]: Leaving directory `/usr/src/linux-2.6.24.3'
make: *** [ipt_hashspeed.ko] ´íÎó 2
[root@Ecofe2 hashspeed-0.1]# init 0
[root@Ecofe2 hashspeed-0.1]# ls
ipt_hashspeed.c  libipt_hashspeed.c  README.zh_CN-utf8
ipt_hashspeed.h  Makefile
[root@Ecofe2 hashspeed-0.1]# history -c
[root@Ecofe2 hashspeed-0.1]# make
Makefile:24: You need to install iptables sources and maybe set IPTABLES_SRC
make -C /lib/modules/2.6.24.3/build M=/usr/src/hashspeed-0.1 modules
make[1]: Entering directory `/usr/src/linux-2.6.24.3'
  CC [M]  /usr/src/hashspeed-0.1/ipt_hashspeed.o
/usr/src/hashspeed-0.1/ipt_hashspeed.c: ÔÚº¯Êý ¡®ipt_hashspeed_init¡¯ ÖУº
/usr/src/hashspeed-0.1/ipt_hashspeed.c:751: ´íÎ󣺡®proc_net¡¯ δÉùÃ÷ (Ôڴ˺¯ÊýÄÚµÚÒ»´ÎʹÓ&Atilde
/usr/src/hashspeed-0.1/ipt_hashspeed.c:751: ´íÎó£º(¼´Ê¹ÔÚÒ»¸öº¯ÊýÄÚ¶à´Î³öÏÖ£¬Ã¿¸öδÉùÃ÷µÄ±êʶ·ûÔÚÆä
/usr/src/hashspeed-0.1/ipt_hashspeed.c:751: ´íÎó£ºËùÔڵĺ¯ÊýÄÚÖ»±¨¸æÒ»´Î¡&pound
/usr/src/hashspeed-0.1/ipt_hashspeed.c: ÔÚº¯Êý ¡®ipt_hashspeed_fini¡¯ ÖУº
/usr/src/hashspeed-0.1/ipt_hashspeed.c:773: ´íÎ󣺡®proc_net¡¯ δÉùÃ÷ (Ôڴ˺¯ÊýÄÚµÚÒ»´ÎʹÓ&Atilde
make[2]: *** [/usr/src/hashspeed-0.1/ipt_hashspeed.o] ´íÎó 1
make[1]: *** [_module_/usr/src/hashspeed-0.1] ´íÎó 2
make[1]: Leaving directory `/usr/src/linux-2.6.24.3'
make: *** [ipt_hashspeed.ko] ´íÎó 2

论坛徽章:
0
3 [报告]
发表于 2008-04-03 16:22 |显示全部楼层
哪位大哥有在2.6.24.4 iptables1.4下编译通过....

楼主GG说把proc_net 都换成 init_net.proc_net 试
试了也不行的...

GG帮忙看看

论坛徽章:
0
4 [报告]
发表于 2008-04-07 23:53 |显示全部楼层
......编译好几个内核..
我还是在linux-2.6.23 iptables-1.4.0  gcc-4.1.2-14.el5下编译通过...

楼主说的2.6.24内核要把proc_net 全换成init.proc_net
这个是替换哪个文件的proc_net.

论坛徽章:
0
5 [报告]
发表于 2008-04-08 00:34 |显示全部楼层
楼主老大.linux2.6.23 iptables-1.4下可以译出来..
模块已加载成功后我用
[root@EEE ~]# iptables -m hashspeed -h
iptables v1.4.0: Couldn't load match `hashspeed'null)

Try `iptables -h' or 'iptables --help' for more information.
怎么会这样呢?????

*******************
然后我把iptables换成1.3.8模块加块正常..使用hashspeed也正常...

哪位在iptables1.4.0下译成功能正常使用的...帮帮哇.....
在此先谢各位大哥大姐了... :wink:

论坛徽章:
0
6 [报告]
发表于 2008-04-08 13:15 |显示全部楼层
谢谢
我现在在linux2.6.24.4 iptables.1.4下顺利译过``正常运行。
嘿嘿。。。在此谢谢楼主及其他GG
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP