免费注册 查看新帖 |

Chinaunix

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

[网络管理] ipp2p模块——0.99.17 [复制链接]

论坛徽章:
0
21 [报告]
发表于 2008-12-15 12:43 |只看该作者

  1. G2 ipp2p-0.99.17 # make
  2. make -C /lib/modules/2.6.27-gentoo-r5QT_Standart/build M=/root/src/ipp2p-0.99.17 modules
  3. make[1]: Entering directory `/usr/src/linux-2.6.27-gentoo-r5'
  4.   CC [M]  /root/src/ipp2p-0.99.17/ipt_ipp2p.o
  5. /root/src/ipp2p-0.99.17/ipt_ipp2p.c: In function 'match':
  6. /root/src/ipp2p-0.99.17/ipt_ipp2p.c:61: error: 'struct nf_conn' has no member named 'counters'
  7. /root/src/ipp2p-0.99.17/ipt_ipp2p.c:61: error: 'struct nf_conn' has no member named 'counters'
  8. /root/src/ipp2p-0.99.17/ipt_ipp2p.c:62: error: 'struct nf_conn' has no member named 'ipp2p'
  9. /root/src/ipp2p-0.99.17/ipt_ipp2p.c:64: error: 'struct nf_conn' has no member named 'ipp2p'
  10. /root/src/ipp2p-0.99.17/ipt_ipp2p.c:65: error: 'struct nf_conn' has no member named 'ipp2p'
  11. /root/src/ipp2p-0.99.17/ipt_ipp2p.c:67: error: 'struct nf_conn' has no member named 'counters'
  12. /root/src/ipp2p-0.99.17/ipt_ipp2p.c:67: error: 'struct nf_conn' has no member named 'counters'
  13. /root/src/ipp2p-0.99.17/ipt_ipp2p.c:67: error: 'struct nf_conn' has no member named 'ipp2p'
  14. /root/src/ipp2p-0.99.17/ipt_ipp2p.c:92: error: 'struct nf_conn' has no member named 'ipp2p'
  15. /root/src/ipp2p-0.99.17/ipt_ipp2p.c:114: error: 'struct nf_conn' has no member named 'ipp2p'
  16. make[2]: *** [/root/src/ipp2p-0.99.17/ipt_ipp2p.o] Error 1
  17. make[1]: *** [_module_/root/src/ipp2p-0.99.17] Error 2
  18. make[1]: Leaving directory `/usr/src/linux-2.6.27-gentoo-r5'
  19. make: *** [ipt_ipp2p.ko] Error 2
  20. G2 ipp2p-0.99.17 #
复制代码

环境如下

  1. G2 ipp2p-0.99.17 # uname -a
  2. Linux G2 2.6.27-gentoo-r5QT_Standart #1 SMP Fri Dec 12 12:14:09 CST 2008 i686 Intel(R) Pentium(R) 4 CPU 2.66GHz GenuineIntel GNU/Linux
  3. G2 ipp2p-0.99.17 #
  4. G2 ipp2p-0.99.17 # gcc -v
  5. Using built-in specs.
  6. Target: i686-pc-linux-gnu
  7. Configured with: /var/tmp/portage/sys-devel/gcc-4.1.2/work/gcc-4.1.2/configure --prefix=/usr --bindir=/usr/i686-pc-linux-gnu/gcc-bin/4.1.2 --includedir=/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include --datadir=/usr/share/gcc-data/i686-pc-linux-gnu/4.1.2 --mandir=/usr/share/gcc-data/i686-pc-linux-gnu/4.1.2/man --infodir=/usr/share/gcc-data/i686-pc-linux-gnu/4.1.2/info --with-gxx-include-dir=/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/g++-v4 --host=i686-pc-linux-gnu --build=i686-pc-linux-gnu --disable-altivec --enable-nls --without-included-gettext --with-system-zlib --disable-checking --disable-werror --enable-secureplt --disable-libunwind-exceptions --disable-multilib --enable-libmudflap --disable-libssp --disable-libgcj --with-arch=i686 --enable-languages=c,c++,treelang,fortran --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu
  8. Thread model: posix
  9. gcc version 4.1.2 (Gentoo 4.1.2 p1.0.2)
复制代码

论坛徽章:
0
22 [报告]
发表于 2008-12-27 16:53 |只看该作者

回复 #21 Yuri.G. 的帖子

请参考,http://linux.chinaunix.net/bbs/v ... p;extra=&page=1

里面有详细步骤..

论坛徽章:
0
23 [报告]
发表于 2009-02-08 03:07 |只看该作者
root@localhost:~# tar xvf ipp2p-0.99.17.tar.gz
ipp2p-0.99.17/
ipp2p-0.99.17/Makefile
ipp2p-0.99.17/ipt_ipp2p_data.c
ipp2p-0.99.17/ipt_ipp2p.c
ipp2p-0.99.17/ipt_ipp2p.h
ipp2p-0.99.17/patch.diff
ipp2p-0.99.17/libipt_ipp2p.c
root@localhost:~# cd ipp2p-0.99.17/
root@localhost:~/ipp2p-0.99.17# make
make -C /lib/modules/2.6.18-6-686/build M=/home/roy/ipp2p-0.99.17 modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.18-6-686'
  CC [M]  /home/roy/ipp2p-0.99.17/ipt_ipp2p.o
In file included from /home/roy/ipp2p-0.99.17/ipt_ipp2p.c:3:
include/net/netfilter/nf_conntrack_core.h:42: warning: 'struct nf_conntrack_tuple' declared inside parameter list
include/net/netfilter/nf_conntrack_core.h:42: warning: its scope is only this definition or declaration, which is probably not what you want
include/net/netfilter/nf_conntrack_core.h:48: warning: 'struct nf_conntrack_tuple' declared inside parameter list
include/net/netfilter/nf_conntrack_core.h:53: warning: 'struct nf_conn' declared inside parameter list
include/net/netfilter/nf_conntrack_core.h:53: warning: 'struct nf_conntrack_tuple' declared inside parameter list
include/net/netfilter/nf_conntrack_core.h: In function 'nf_conntrack_confirm':
include/net/netfilter/nf_conntrack_core.h:64: warning: implicit declaration of function 'nf_ct_is_confirmed'
include/net/netfilter/nf_conntrack_core.h:66: warning: implicit declaration of function 'nf_ct_deliver_cached_events'
/home/roy/ipp2p-0.99.17/ipt_ipp2p.c: At top level:
/home/roy/ipp2p-0.99.17/ipt_ipp2p.c:24: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'match'
/home/roy/ipp2p-0.99.17/ipt_ipp2p.c:128: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'checkentry'
/home/roy/ipp2p-0.99.17/ipt_ipp2p.c:139: error: 'match' undeclared here (not in a function)
/home/roy/ipp2p-0.99.17/ipt_ipp2p.c:142: error: 'checkentry' undeclared here (not in a function)
/home/roy/ipp2p-0.99.17/ipt_ipp2p.c: In function 'init':
/home/roy/ipp2p-0.99.17/ipt_ipp2p.c:148: warning: implicit declaration of function 'need_conntrack'
make[2]: *** [/home/roy/ipp2p-0.99.17/ipt_ipp2p.o] Error 1
make[1]: *** [_module_/home/roy/ipp2p-0.99.17] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.18-6-686'
make: *** [ipt_ipp2p.ko] Error 2
root@localhost:~/ipp2p-0.99.17# cd ..
root@localhost:~# tar xvf ipp2p-0.99.15.tar.gz
ipp2p-0.99.15/
ipp2p-0.99.15/Makefile
ipp2p-0.99.15/Module.symvers
ipp2p-0.99.15/README
ipp2p-0.99.15/ipt.sh
ipp2p-0.99.15/ipt_ipp2p.c
ipp2p-0.99.15/ipt_ipp2p.h
ipp2p-0.99.15/COPYING
ipp2p-0.99.15/libipt_ipp2p.c
root@localhost:~# cd ipp2p-0.99.15
root@localhost:~/ipp2p-0.99.15# make
make -C /lib/modules/2.6.18-6-686/build M=/home/roy/ipp2p-0.99.15 modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.18-6-686'
  CC [M]  /home/roy/ipp2p-0.99.15/ipt_ipp2p.o
  Building modules, stage 2.
  MODPOST
  CC      /home/roy/ipp2p-0.99.15/ipt_ipp2p.mod.o
  LD [M]  /home/roy/ipp2p-0.99.15/ipt_ipp2p.ko
make[1]: Leaving directory `/usr/src/linux-headers-2.6.18-6-686'
gcc -O3 -Wall -DIPTABLES_VERSION=\"1.3.6\" -I/usr/src/iptables-1.3.6/include -fPIC -c libipt_ipp2p.c
gcc -shared -o libipt_ipp2p.so libipt_ipp2p.o
root@localhost:~/ipp2p-0.99.15# ll
total 148
-rw-r--r-- 1 jackz jackz 17982 Aug 16  2007 COPYING
-rw-r--r-- 1 jackz jackz  2130 Feb 27  2008 Makefile
-rw-r--r-- 1 jackz jackz     0 Aug 16  2007 Module.symvers
-rw-r--r-- 1 jackz jackz  4683 Aug 16  2007 README
-rwxr-xr-x 1 jackz jackz   144 Dec 17  2007 ipt.sh
-rw-r--r-- 1 jackz jackz 31162 Mar  3  2008 ipt_ipp2p.c
-rw-r--r-- 1 jackz jackz   663 Mar  3  2008 ipt_ipp2p.h
-rw-r--r-- 1 root  root  11421 Feb  7 19:17 ipt_ipp2p.ko
-rw-r--r-- 1 root  root    747 Feb  7 19:17 ipt_ipp2p.mod.c
-rw-r--r-- 1 root  root   2228 Feb  7 19:17 ipt_ipp2p.mod.o
-rw-r--r-- 1 root  root   9764 Feb  7 19:17 ipt_ipp2p.o
-rw-r--r-- 1 jackz jackz 13901 Dec  9  2007 libipt_ipp2p.c
-rw-r--r-- 1 root  root  10648 Feb  7 19:17 libipt_ipp2p.o
-rwxr-xr-x 1 root  root  12358 Feb  7 19:17 libipt_ipp2p.so
root@localhost:~/ipp2p-0.99.15# uname -a

Linux localhost 2.6.18-6-686 #1 SMP Sat Dec 27 09:31:05 UTC 2008 i686 GNU/Linux

不知道最新的ipp2p-0.99.16 ipp2p-0.99.17改过什么东西  就是通不过

论坛徽章:
0
24 [报告]
发表于 2009-02-08 22:10 |只看该作者
出现了同18楼的错误

论坛徽章:
0
25 [报告]
发表于 2009-03-12 14:44 |只看该作者
Ubuntu 8.10 server
iptables-1.4.2
kernel 2.6.27-7-server
是否支持,我编译了多次都未通过。

论坛徽章:
0
26 [报告]
发表于 2009-03-13 23:01 |只看该作者
2.6.28以上的内核是不是用不了IPP2P V0.99.16和IPP2P V0.99.17啊,编译时出现:

/usr/src/ipp2p-0.99.17/ipt_ipp2p.c: In function `match':
/usr/src/ipp2p-0.99.17/ipt_ipp2p.c:61: error: structure has no member named `counters'
/usr/src/ipp2p-0.99.17/ipt_ipp2p.c:61: error: structure has no member named `counters'
/usr/src/ipp2p-0.99.17/ipt_ipp2p.c:67: error: structure has no member named `counters'
/usr/src/ipp2p-0.99.17/ipt_ipp2p.c:67: error: structure has no member named `counters'
/usr/src/ipp2p-0.99.17/ipt_ipp2p.c: At top level:
/usr/src/ipp2p-0.99.17/ipt_ipp2p.c:139: warning: initialization from incompatible pointer type
/usr/src/ipp2p-0.99.17/ipt_ipp2p.c:142: warning: initialization from incompatible pointer type
make[2]: *** [/usr/src/ipp2p-0.99.17/ipt_ipp2p.o] Error 1
make[1]: *** [_module_/usr/src/ipp2p-0.99.17] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.28.6'
make: *** [ipt_ipp2p.ko] Error 2


2.6.28以上的内核好象把counters移到 struct nf_conn 的扩展部分了.
期待高手改一下2.6.28内核能用的最新版本.

论坛徽章:
0
27 [报告]
发表于 2009-03-17 18:39 |只看该作者
没人帮忙,还是自己动手算了.
ipp2p-0.99.17修改版:ipp2p-0.99.17.26286
测试环境:
内核2.6.28.6
iptables V1.4.1.1
功能与ipp2p-0.99.17相同,只是增加u_int32_t ipp2p_cc到nf_conn结构,代替原版本中的counters
修正BUG:ipt_ipp2p模块读取iptables配置参数不正确。

ipp2p-0.99.17.26286.rar

18.82 KB, 下载次数: 193

论坛徽章:
0
28 [报告]
发表于 2012-08-22 11:19 |只看该作者
回复 27# wind98


   

论坛徽章:
0
29 [报告]
发表于 2012-08-22 11:21 |只看该作者
回复 1# ShadowStar


    感谢LZ分享,if(TOTAL_PACKETS == 1)
                conntrack->ipp2p = 0;可以不要把,在conntrack创建的时候就置为0了,可以看看ip_conntrack_core.c
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP