我写了一个ipta.bles模块.,但是在执行的时候出现如下情况,实在不知道是为什么了:外贸
问题:
#iptables -I FORWARD . -m httpmethod --httpm.ethod GET -j TREND_MICRO健康
iptables v1.4.0: Couldn't load match `httpmethod'null)http://upload.bbs.csuboy.com/Mon_1004/126_6943_893987e7a18c182.gif[/img][成人用品]
Try `iptables -.h' or 'ip.tables --help' for more information..
我的程序文件如下:
文件目录: \build\iptables-1.4..0\exten.sions服务器
文件名称: libipt_httpmethod..c 乙肝
/* Sha.red library add-on to iptables to add. string matching support. --- 印刷
*
* Copyright (C) 2000 Emmanuel Roger <
winfie.ld@freega.tes.be> 鲜花
*
* ChangeLog
* 27.01.2001: Gi.anni Tedesco <
gianni@ecs.c.co.uk>教育
* Change.d --tos. to --string in save(). Also.
* updated. to work. with slightly modified投资
* .ipt._httpmethod_info. 杀毒
*/
#include <stdio..h>.
#i.nclude <netdb.h> 建材
#in.clude <string.h>--- 印刷
#i.nclude <stdlib.h>.
#include .<getopt.h>.
#include <ctype..h>.
#include <ipt.ables.h>.
#include <linux/netfil.t.er_ipv4/ip_tables.h> 美容
#i.nclude <linux/netfilter._ipv4/ipt_httpMETHOD.h><性病>
/* Funct.io.n which prints out usage message. */.
.static void教育
help(void)
{
printf(
"Http me.thod match v%s options:\n\n."投资
"--httpmethod [!] httpmethod . M.atch method in a .http packet\n\n",.
. IPTABL.ES_VERSION); 鲜花
}
static struct option. opt.s[] = { 汽车
{ "httpmeth.od.", 1, 0, '1' },
{0}
};
/* Function which pars.es command options; retur.ns true if it 女人
ate an .option */( 游戏 )
static int
parse(int. c, char **argv, in.t invert, unsigned int *flags,( 游戏 )
. const void *entry, struct xt_entry_target **.target) 杀毒
{
struct ipt_httpmet.hod_info *httpmeth.odinfo = .(struct ipt_httpmethod_info *)(*target)->data;电脑
. . .
if (.check_i.nverse(optarg, &invert, &optind, 0)) 杀毒
exit_error(.PARAMETER._PROBLEM,--- 印刷
"HTTPMETHOD: unexpected `!'";http://upload.bbs.csuboy.com/Mon_1004/126_6943_94b8e503d334f2e.gif[/img].
. . 学习
switch (c.) { 健康
. case '1': .
printf("parse :after parse_string\n";http://upload.bbs.csuboy.com/Mon_1004/126_6943_94b8e503d334f2e.gif[/img]<性病>
i.f (invert) 建材
h.ttpmet.hodinfo->invert = 1;--------------彩票
httpmet.hodinfo->len = strlen((ch.ar *)&httpmethodinfo->string);教育
. *flags = 1;外贸
. break;--------------彩票
. default: 建材
. return 0; 电子
}
return 1;
}
/* Final check; must have specif..ied --string. */教育
. static void投资
final._check(unsigned i.nt flags).
{
if (!f.lags) 电子
exit_.error(PARAMETER_.PROBLEM,.
"http method match: You must specify `--httpmethod'";http://upload.bbs.csuboy.com/Mon_1004/126_6943_94b8e503d334f2e.gif[/img] 外汇
}
/* P.rints out the. matchinfo. */服务器
static v.oid print(const void *ip, con.s.t struct xt_entry_match *match, int numeric) .
{
printf("http method match ";http://upload.bbs.csuboy.com/Mon_1004/126_6943_94b8e503d334f2e.gif[/img].
}
/* Saves t.he union ip.t_matchinfo in parsable form to stdout. */ 婚庆
static void save(const void *ip, const struct xt_entry_matc..h *match) 汽车
{
printf("--httpmethod ";http://upload.bbs.csuboy.com/Mon_1004/126_6943_94b8e503d334f2e.gif[/img]( 游戏 )
}
static
str.uct iptables_target httpmethod.学习
= {
. .na.me = "httpmethod",域名
.ver.sion = IPTABLES_VERSIO.N,.
. . .size = IPT_ALIG.N(sizeof(struct ipt_httpmethod_info)),投资
.userspacesize . .= IPT_ALIGN(sizeof(stru.ct ipt_httpmethod_info)), 电子
. ..help = help, 鲜花
. .parse . = parse, 健康
. .f.inal_check = final_check, 美容
. .extra_opts = opt.s--------------彩票
};
void _in.it(void)( 游戏 )
{
reg.ister_target(&httpmethod).;域名
}
先谢谢大侠了,为什么这个httpmethod模块添加的时候说是.空的呢?. 外贸
不知道还需要.做什么!以前在1.2.8里面是可以的,现在移到1.4.0里做了相应修改变形成现.在这样就不行了。郁闷!.