免费注册 查看新帖 |

Chinaunix

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

[网络管理] IPP2P模块修改版,最新0.99.16 [复制链接]

论坛徽章:
0
561 [报告]
发表于 2009-03-12 16:38 |只看该作者

iptables-1.4.2编译通不过


  1. Proxy:/usr/src/ipp2p-0.99.16# make
  2. make -C /usr/src/linux M=/usr/src/ipp2p-0.99.16 modules
  3. make[1]: Entering directory `/usr/src/linux-source-2.6.26'
  4.   CC [M]  /usr/src/ipp2p-0.99.16/ipt_ipp2p.o
  5.   Building modules, stage 2.
  6.   MODPOST 1 modules
  7.   CC      /usr/src/ipp2p-0.99.16/ipt_ipp2p.mod.o
  8.   LD [M]  /usr/src/ipp2p-0.99.16/ipt_ipp2p.ko
  9. make[1]: Leaving directory `/usr/src/linux-source-2.6.26'
  10. gcc -O3 -Wall -DIPTABLES_VERSION=\"1.4.2\" -I/usr/src/iptables-1.4.2/include -fPIC -c libipt_ipp2p.c
  11. libipt_ipp2p.c:367: error: variable 鈥榠pp2p鈥?has initializer but incomplete type
  12. libipt_ipp2p.c:369: error: unknown field 鈥榥ext鈥?specified in initializer
复制代码

论坛徽章:
0
562 [报告]
发表于 2009-03-12 17:54 |只看该作者

回复 #561 weizhishu 的帖子

噢,看样子只能降版本

论坛徽章:
0
563 [报告]
发表于 2009-03-17 14:32 |只看该作者

安装问题,请教!

我测试安装,一直无法安装的上去,
我修改了makefile
指定了,KERNEL_SRC = /usr/src/redhat/BUILD/kernel-2.6.22/linux-2.6.22.i386
IPTABLES_SRC = /usr/src/redhat/BUILD/iptables-1.3.8

ipp2p-0.99.16]# make
make -C /usr/src/redhat/BUILD/kernel-2.6.22/linux-2.6.22.i386 M=/root/ipp2p-0.99.16 modules
make[1]: Entering directory `/usr/src/redhat/BUILD/kernel-2.6.22/linux-2.6.22.i386'
  CC [M]  /root/ipp2p-0.99.16/ipt_ipp2p.o
/root/ipp2p-0.99.16/ipt_ipp2p.c: In function 'match':
/root/ipp2p-0.99.16/ipt_ipp2p.c:842: error: 'struct nf_conn' has no member named 'ipp2p'
/root/ipp2p-0.99.16/ipt_ipp2p.c:844: error: 'struct nf_conn' has no member named 'ipp2p'
/root/ipp2p-0.99.16/ipt_ipp2p.c:845: error: 'struct nf_conn' has no member named 'ipp2p'
/root/ipp2p-0.99.16/ipt_ipp2p.c:847: error: 'struct nf_conn' has no member named 'ipp2p'
/root/ipp2p-0.99.16/ipt_ipp2p.c:878: error: 'struct nf_conn' has no member named 'ipp2p'
/root/ipp2p-0.99.16/ipt_ipp2p.c:900: error: 'struct nf_conn' has no member named 'ipp2p'
make[2]: *** [/root/ipp2p-0.99.16/ipt_ipp2p.o] Error 1
make[1]: *** [_module_/root/ipp2p-0.99.16] Error 2
make[1]: Leaving directory `/usr/src/redhat/BUILD/kernel-2.6.22/linux-2.6.22.i386'
make: *** [ipt_ipp2p.ko] Error 2
请教解决办法,谢谢。

论坛徽章:
0
564 [报告]
发表于 2009-04-23 15:03 |只看该作者
发个过滤超级旋风的

static int match_qqdownload_search(u8 *payload, u16 len)
{
        /*
        QQDownload 2
        02 02 01 xx xx
        xx xx 网络字节序数据长度 = tcp 数据长度
        QQDownload 1.9
        02 00 fc xx xx
        xx xx 网络字节序数据长度 = tcp 数据长度
        */
        int ret = -1;
        if ( *payload == 0x02 ) {
                if ( ( *(payload + 1) == 0x02 && *(payload + 2) == 0x10 )
                                || ( *(payload + 1) == 0x00 && *(payload + 2) == 0xfc )
                ) {
                        if ( len == ntohs( get_u16( payload, 3) ) ) {
                                printk( "2P Track: len %d bytes; QQDownload search %02x %02x %02x\n",
                                        len,
                                        *payload,
                                        *(payload + 1),
                                        *(payload + 2)
                                        );
                                ret = 0;
                        }
                }
        }
        return ret;               
}

论坛徽章:
0
565 [报告]
发表于 2009-05-08 18:35 |只看该作者

编译报错,请教楼主

好用,多谢!

[ 本帖最后由 yahwist7 于 2009-5-9 15:11 编辑 ]

论坛徽章:
17
2015年辞旧岁徽章
日期:2015-03-03 16:54:152017金鸡报晓
日期:2017-02-08 10:39:422017金鸡报晓
日期:2017-01-10 15:19:56JAVA
日期:2016-11-01 13:25:46C
日期:2016-10-25 16:01:4715-16赛季CBA联赛之八一
日期:2016-06-21 23:38:0815-16赛季CBA联赛之山东
日期:2016-05-12 12:49:54IT运维版块每日发帖之星
日期:2016-04-20 06:20:00IT运维版块每日发帖之星
日期:2016-03-22 06:20:00黄金圣斗士
日期:2015-11-24 10:43:13IT运维版块每日发帖之星
日期:2015-08-25 06:20:002015亚冠之德黑兰石油
日期:2015-08-22 22:55:54
566 [报告]
发表于 2009-07-27 10:52 |只看该作者

回复 #554 ShadowStar 的帖子

安装成功了.

LZ能否详细说一下,用什么抓包?怎样抓包?怎样分析?用c怎样描述特征值?最好举个例子吧

[ 本帖最后由 ccjsj1 于 2009-7-27 11:06 编辑 ]

论坛徽章:
0
567 [报告]
发表于 2009-07-27 11:33 |只看该作者
原帖由 force_eagle 于 2009-4-23 15:03 发表
发个过滤超级旋风的

static int match_qqdownload_search(u8 *payload, u16 len)
{
        /*
        QQDownload 2
        02 02 01 xx xx
        xx xx 网络字节序数据长度 = tcp 数据长度
   ...



代码能用code括起来吗?like this


  1. [code]
复制代码

论坛徽章:
0
568 [报告]
发表于 2009-08-03 08:36 |只看该作者
具体要求什么环境?
我的RHEL 5.2(kernel 2.6.18-92.el5) + iptables 1.4.3 编译了好几次都没有成功。

论坛徽章:
0
569 [报告]
发表于 2009-08-07 18:03 |只看该作者
系统:Ubuntu 8.04sever
内核:2.6.24-19-server
iptables版本:1.3.8  1.4.0
ipp2p版本:0.99.15

编译无法通过,出错信息如下:
[email=root@ubuntu:/usr/src/ipp2p-0.99.15]root@ubuntu:/usr/src/ipp2p-0.99.15[/email]# make
make -C /lib/modules/2.6.24-19-server/build SUBDIRS=/usr/src/ipp2p-0.99.15 modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.24-19-server'
  CC [M]  /usr/src/ipp2p-0.99.15/ipt_ipp2p.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /usr/src/ipp2p-0.99.15/ipt_ipp2p.mod.o
  LD [M]  /usr/src/ipp2p-0.99.15/ipt_ipp2p.ko
make[1]: Leaving directory `/usr/src/linux-headers-2.6.24-19-server'
gcc -O3 -Wall -DIPTABLES_VERSION=\"1.4.0\" -I/var/src/iptables-1.4.0/include -fPIC -c libipt_ipp2p.c
libipt_ipp2p.c:8:22: error: iptables.h: No such file or directory
libipt_ipp2p.c:70: warning: 'struct ipt_entry_match' declared inside parameter list
libipt_ipp2p.c:70: warning: its scope is only this definition or declaration, which is probably not what you want
libipt_ipp2p.c: In function 'init':
libipt_ipp2p.c:72: error: dereferencing pointer to incomplete type
libipt_ipp2p.c:74: error: 'NFC_UNKNOWN' undeclared (first use in this function)
libipt_ipp2p.c:74: error: (Each undeclared identifier is reported only once
libipt_ipp2p.c:74: error: for each function it appears in.)
libipt_ipp2p.c: At top level:
libipt_ipp2p.c:87: warning: 'struct ipt_entry_match' declared inside parameter list
libipt_ipp2p.c:87: warning: 'struct ipt_entry' declared inside parameter list
libipt_ipp2p.c: In function 'parse':
libipt_ipp2p.c:89: error: dereferencing pointer to incomplete type
libipt_ipp2p.c:94: warning: implicit declaration of function 'exit_error'
libipt_ipp2p.c:94: error: 'PARAMETER_PROBLEM' undeclared (first use in this function)
libipt_ipp2p.c: In function 'final_check':
libipt_ipp2p.c:305: error: 'PARAMETER_PROBLEM' undeclared (first use in this function)
libipt_ipp2p.c: At top level:
libipt_ipp2p.c:314: warning: 'struct ipt_entry_match' declared inside parameter list
libipt_ipp2p.c:314: warning: 'struct ipt_ip' declared inside parameter list
libipt_ipp2p.c: In function 'print':
libipt_ipp2p.c:316: error: dereferencing pointer to incomplete type
libipt_ipp2p.c: At top level:
libipt_ipp2p.c:341: warning: 'struct ipt_entry_match' declared inside parameter list
libipt_ipp2p.c:341: warning: 'struct ipt_ip' declared inside parameter list
libipt_ipp2p.c: In function 'save':
libipt_ipp2p.c:343: error: dereferencing pointer to incomplete type
libipt_ipp2p.c: At top level:
libipt_ipp2p.c:367: error: variable 'ipp2p' has initializer but incomplete type
libipt_ipp2p.c:369: error: unknown field 'next' specified in initializer
libipt_ipp2p.c:369: warning: excess elements in struct initializer
libipt_ipp2p.c:369: warning: (near initialization for 'ipp2p')
libipt_ipp2p.c:370: error: unknown field 'name' specified in initializer
libipt_ipp2p.c:370: warning: excess elements in struct initializer
libipt_ipp2p.c:370: warning: (near initialization for 'ipp2p')
libipt_ipp2p.c:371: error: unknown field 'version' specified in initializer
libipt_ipp2p.c:371: warning: excess elements in struct initializer
libipt_ipp2p.c:371: warning: (near initialization for 'ipp2p')
libipt_ipp2p.c:372: error: unknown field 'size' specified in initializer
libipt_ipp2p.c:372: warning: implicit declaration of function 'IPT_ALIGN'
libipt_ipp2p.c:372: warning: excess elements in struct initializer
libipt_ipp2p.c:372: warning: (near initialization for 'ipp2p')
libipt_ipp2p.c:373: error: unknown field 'userspacesize' specified in initializer
libipt_ipp2p.c:373: warning: excess elements in struct initializer
libipt_ipp2p.c:373: warning: (near initialization for 'ipp2p')
libipt_ipp2p.c:374: error: unknown field 'help' specified in initializer
libipt_ipp2p.c:374: warning: excess elements in struct initializer
libipt_ipp2p.c:374: warning: (near initialization for 'ipp2p')
libipt_ipp2p.c:375: error: unknown field 'init' specified in initializer
libipt_ipp2p.c:375: warning: excess elements in struct initializer
libipt_ipp2p.c:375: warning: (near initialization for 'ipp2p')
libipt_ipp2p.c:376: error: unknown field 'parse' specified in initializer
libipt_ipp2p.c:376: warning: excess elements in struct initializer
libipt_ipp2p.c:376: warning: (near initialization for 'ipp2p')
libipt_ipp2p.c:377: error: unknown field 'final_check' specified in initializer
libipt_ipp2p.c:377: warning: excess elements in struct initializer
libipt_ipp2p.c:377: warning: (near initialization for 'ipp2p')
libipt_ipp2p.c:378: error: unknown field 'print' specified in initializer
libipt_ipp2p.c:378: warning: excess elements in struct initializer
libipt_ipp2p.c:378: warning: (near initialization for 'ipp2p')
libipt_ipp2p.c:379: error: unknown field 'save' specified in initializer
libipt_ipp2p.c:379: warning: excess elements in struct initializer
libipt_ipp2p.c:379: warning: (near initialization for 'ipp2p')
libipt_ipp2p.c:380: error: unknown field 'extra_opts' specified in initializer
libipt_ipp2p.c:381: warning: excess elements in struct initializer
libipt_ipp2p.c:381: warning: (near initialization for 'ipp2p')
libipt_ipp2p.c: In function '_init':
libipt_ipp2p.c:387: warning: implicit declaration of function 'register_match'
make: *** [libipt_ipp2p.so] Error 1

后来ipp2p换成官方的0.8.2编译通过

老大帮个忙看看咋回事?跪求解决方法!

论坛徽章:
0
570 [报告]
发表于 2009-09-11 16:43 |只看该作者
请问这是什么错误啊,缺什么了?
make -C /usr/src/kernels/2.6.18-128.7.1.el5-i686 M=/home/sofeware/ipp2p-0.99.16 modules
make[1]: Entering directory `/usr/src/kernels/2.6.18-128.7.1.el5-i686'
  CC [M]  /home/sofeware/ipp2p-0.99.16/ipt_ipp2p.o
In file included from /home/sofeware/ipp2p-0.99.16/ipt_ipp2p.c:6:
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: error: implicit declaration of function ‘nf_ct_is_confirmed’
include/net/netfilter/nf_conntrack_core.h:66: error: implicit declaration of function ‘nf_ct_deliver_cached_events’
/home/sofeware/ipp2p-0.99.16/ipt_ipp2p.c: In function ‘match’:
/home/sofeware/ipp2p-0.99.16/ipt_ipp2p.c:815: error: storage size of ‘ctinfo’ isn’t known
/home/sofeware/ipp2p-0.99.16/ipt_ipp2p.c:836: error: implicit declaration of function ‘nf_ct_get’
/home/sofeware/ipp2p-0.99.16/ipt_ipp2p.c:836: warning: assignment makes pointer from integer without a cast
/home/sofeware/ipp2p-0.99.16/ipt_ipp2p.c:841: error: dereferencing pointer to incomplete type
/home/sofeware/ipp2p-0.99.16/ipt_ipp2p.c:841: error: ‘IP_CT_DIR_ORIGINAL’ undeclared (first use in this function)
/home/sofeware/ipp2p-0.99.16/ipt_ipp2p.c:841: error: (Each undeclared identifier is reported only once
/home/sofeware/ipp2p-0.99.16/ipt_ipp2p.c:841: error: for each function it appears in.)
/home/sofeware/ipp2p-0.99.16/ipt_ipp2p.c:841: error: dereferencing pointer to incomplete type
/home/sofeware/ipp2p-0.99.16/ipt_ipp2p.c:841: error: ‘IP_CT_DIR_REPLY’ undeclared (first use in this function)
/home/sofeware/ipp2p-0.99.16/ipt_ipp2p.c:842: error: dereferencing pointer to incomplete type
/home/sofeware/ipp2p-0.99.16/ipt_ipp2p.c:844: error: dereferencing pointer to incomplete type
/home/sofeware/ipp2p-0.99.16/ipt_ipp2p.c:845: error: dereferencing pointer to incomplete type
/home/sofeware/ipp2p-0.99.16/ipt_ipp2p.c:847: error: dereferencing pointer to incomplete type
/home/sofeware/ipp2p-0.99.16/ipt_ipp2p.c:847: error: dereferencing pointer to incomplete type
/home/sofeware/ipp2p-0.99.16/ipt_ipp2p.c:847: error: dereferencing pointer to incomplete type
/home/sofeware/ipp2p-0.99.16/ipt_ipp2p.c:878: error: dereferencing pointer to incomplete type
/home/sofeware/ipp2p-0.99.16/ipt_ipp2p.c:900: error: dereferencing pointer to incomplete type
/home/sofeware/ipp2p-0.99.16/ipt_ipp2p.c:815: warning: unused variable ‘ctinfo’
/home/sofeware/ipp2p-0.99.16/ipt_ipp2p.c: In function ‘init’:
/home/sofeware/ipp2p-0.99.16/ipt_ipp2p.c:962: error: implicit declaration of function ‘need_conntrack’
make[2]: *** [/home/sofeware/ipp2p-0.99.16/ipt_ipp2p.o] Error 1
make[1]: *** [_module_/home/sofeware/ipp2p-0.99.16] Error 2
make[1]: Leaving directory `/usr/src/kernels/2.6.18-128.7.1.el5-i686'
make: *** [ipt_ipp2p.ko] Error 2
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP