using namespace HttpCommon;
using namespace HttpEnums;
-THREAD_LOCAL std::array<ProfileStats, PSI_MAX> HttpCursorModule::http_ps;
+THREAD_LOCAL std::array<ProfileStats, PSI_MAX> HttpRuleOptModule::http_ps;
-bool HttpCursorModule::begin(const char*, int, SnortConfig*)
+const std::string hdrs_num_range = "0:" + std::to_string(HttpMsgHeadShared::MAX_HEADERS);
+
+bool HttpRuleOptModule::begin(const char*, int, SnortConfig*)
{
para_list.reset();
sub_id = 0;
form = 0;
- switch (buffer_index)
+ switch (rule_opt_index)
{
case HTTP_BUFFER_RAW_STATUS:
case HTTP_BUFFER_STAT_CODE:
case HTTP_BUFFER_TRUE_IP:
case HTTP_BUFFER_URI:
case HTTP_BUFFER_VERSION:
+ case HTTP_RANGE_NUM_HDRS:
inspect_section = IS_FLEX_HEADER;
break;
case HTTP_BUFFER_CLIENT_BODY:
break;
case HTTP_BUFFER_RAW_TRAILER:
case HTTP_BUFFER_TRAILER:
+ case HTTP_RANGE_NUM_TRAILERS:
inspect_section = IS_TRAILER;
break;
default:
return true;
}
-bool HttpCursorModule::set(const char*, Value& v, SnortConfig*)
+bool HttpRuleOptModule::set(const char*, Value& v, SnortConfig*)
{
if (v.is("field"))
{
para_list.fragment = true;
sub_id = UC_FRAGMENT;
}
+ else if (v.is("~range"))
+ {
+ return para_list.range.validate(v.get_string(), hdrs_num_range.c_str());
+ }
return true;
}
-bool HttpCursorModule::end(const char*, int, SnortConfig*)
+bool HttpRuleOptModule::end(const char*, int, SnortConfig*)
{
// Check for option conflicts
if (para_list.with_header + para_list.with_body + para_list.with_trailer > 1)
ParseError("Only specify one with_ option. Use the one that happens last.");
- if (((buffer_index == HTTP_BUFFER_TRAILER) || (buffer_index == HTTP_BUFFER_RAW_TRAILER)) &&
+ if (((rule_opt_index == HTTP_BUFFER_TRAILER) || (rule_opt_index == HTTP_BUFFER_RAW_TRAILER) || (rule_opt_index == HTTP_RANGE_NUM_TRAILERS)) &&
(para_list.with_header || para_list.with_body) &&
!para_list.request)
ParseError("Trailers with with_ option must also specify request");
if (para_list.scheme + para_list.host + para_list.port + para_list.path + para_list.query +
para_list.fragment > 1)
ParseError("Only specify one part of the URI");
- if (buffer_index == HTTP_BUFFER_PARAM && para_list.param.length() == 0)
+ if (rule_opt_index == HTTP_BUFFER_PARAM && para_list.param.length() == 0)
ParseError("Specify parameter name");
return true;
}
-void HttpCursorModule::HttpRuleParaList::reset()
+void HttpRuleOptModule::HttpRuleParaList::reset()
{
field.clear();
param.clear();
path = false;
query = false;
fragment = false;
+ range.init();
}
uint32_t HttpIpsOption::hash() const
uint32_t b = (uint32_t)inspect_section;
uint32_t c = buffer_info.hash();
mix(a,b,c);
+ a += range.hash();
finalize(a,b,c);
return c;
}
const HttpIpsOption& hio = static_cast<const HttpIpsOption&>(ips);
return IpsOption::operator==(ips) &&
inspect_section == hio.inspect_section &&
- buffer_info == hio.buffer_info;
+ buffer_info == hio.buffer_info &&
+ range == hio.range;
}
bool HttpIpsOption::retry(Cursor& current_cursor, const Cursor&)
IpsOption::EvalStatus HttpIpsOption::eval(Cursor& c, Packet* p)
{
- RuleProfile profile(HttpCursorModule::http_ps[psi]);
+ RuleProfile profile(HttpRuleOptModule::http_ps[psi]);
if (!p->flow || !p->flow->gadget || (HttpInspect::get_latest_is(p) == IS_NONE))
return NO_MATCH;
const Http2FlowData* const h2i_flow_data =
(Http2FlowData*)p->flow->get_flow_data(Http2FlowData::inspector_id);
- HttpInspect* const hi = (h2i_flow_data != nullptr) ?
+ const HttpInspect* const hi = (h2i_flow_data != nullptr) ?
(HttpInspect*)(p->flow->assistant_gadget) : (HttpInspect*)(p->flow->gadget);
- const Field& http_buffer = hi->http_get_buf(c, p, buffer_info);
+ if (buffer_info.type <= HTTP_BUFFER_MAX)
+ {
+ const Field& http_buffer = hi->http_get_buf(c, p, buffer_info);
- if (http_buffer.length() <= 0)
- return NO_MATCH;
+ if (http_buffer.length() <= 0)
+ return NO_MATCH;
- c.set(key, http_buffer.start(), http_buffer.length());
+ c.set(key, http_buffer.start(), http_buffer.length());
- return MATCH;
+ return MATCH;
+ }
+ else
+ {
+ const int32_t num_lines = hi->http_get_num_headers(p, buffer_info);
+ if (num_lines != HttpCommon::STAT_NOT_PRESENT && range.eval(num_lines))
+ return MATCH;
+
+ return NO_MATCH;
+ }
}
//-------------------------------------------------------------------------
static Module* client_body_mod_ctor()
{
- return new HttpCursorModule(IPS_OPT, IPS_HELP, HTTP_BUFFER_CLIENT_BODY, CAT_SET_BODY,
+ return new HttpRuleOptModule(IPS_OPT, IPS_HELP, HTTP_BUFFER_CLIENT_BODY, CAT_SET_BODY,
PSI_CLIENT_BODY);
}
IPS_OPT,
IPS_HELP,
client_body_mod_ctor,
- HttpCursorModule::mod_dtor
+ HttpRuleOptModule::mod_dtor
},
OPT_TYPE_DETECTION,
0, PROTO_BIT__TCP,
static Module* cookie_mod_ctor()
{
- return new HttpCursorModule(IPS_OPT, IPS_HELP, HTTP_BUFFER_COOKIE, CAT_SET_COOKIE, PSI_COOKIE,
+ return new HttpRuleOptModule(IPS_OPT, IPS_HELP, HTTP_BUFFER_COOKIE, CAT_SET_COOKIE, PSI_COOKIE,
http_cookie_params);
}
IPS_OPT,
IPS_HELP,
cookie_mod_ctor,
- HttpCursorModule::mod_dtor
+ HttpRuleOptModule::mod_dtor
},
OPT_TYPE_DETECTION,
0, PROTO_BIT__TCP,
static Module* header_mod_ctor()
{
- return new HttpCursorModule(IPS_OPT, IPS_HELP, HTTP_BUFFER_HEADER, CAT_SET_HEADER,
+ return new HttpRuleOptModule(IPS_OPT, IPS_HELP, HTTP_BUFFER_HEADER, CAT_SET_HEADER,
PSI_HEADER, http_header_params);
}
IPS_OPT,
IPS_HELP,
header_mod_ctor,
- HttpCursorModule::mod_dtor
+ HttpRuleOptModule::mod_dtor
},
OPT_TYPE_DETECTION,
0, PROTO_BIT__TCP,
static Module* method_mod_ctor()
{
- return new HttpCursorModule(IPS_OPT, IPS_HELP, HTTP_BUFFER_METHOD, CAT_SET_METHOD, PSI_METHOD,
+ return new HttpRuleOptModule(IPS_OPT, IPS_HELP, HTTP_BUFFER_METHOD, CAT_SET_METHOD, PSI_METHOD,
http_method_params);
}
IPS_OPT,
IPS_HELP,
method_mod_ctor,
- HttpCursorModule::mod_dtor
+ HttpRuleOptModule::mod_dtor
},
OPT_TYPE_DETECTION,
0, PROTO_BIT__TCP,
static Module* param_mod_ctor()
{
- return new HttpCursorModule(IPS_OPT, IPS_HELP, HTTP_BUFFER_PARAM, CAT_SET_OTHER, PSI_PARAM,
+ return new HttpRuleOptModule(IPS_OPT, IPS_HELP, HTTP_BUFFER_PARAM, CAT_SET_OTHER, PSI_PARAM,
http_param_params);
}
IPS_OPT,
IPS_HELP,
param_mod_ctor,
- HttpCursorModule::mod_dtor
+ HttpRuleOptModule::mod_dtor
},
OPT_TYPE_DETECTION,
0, PROTO_BIT__TCP,
static Module* raw_body_mod_ctor()
{
- return new HttpCursorModule(IPS_OPT, IPS_HELP, HTTP_BUFFER_RAW_BODY, CAT_SET_OTHER,
+ return new HttpRuleOptModule(IPS_OPT, IPS_HELP, HTTP_BUFFER_RAW_BODY, CAT_SET_OTHER,
PSI_RAW_BODY);
}
IPS_OPT,
IPS_HELP,
raw_body_mod_ctor,
- HttpCursorModule::mod_dtor
+ HttpRuleOptModule::mod_dtor
},
OPT_TYPE_DETECTION,
0, PROTO_BIT__TCP,
static Module* raw_cookie_mod_ctor()
{
- return new HttpCursorModule(IPS_OPT, IPS_HELP, HTTP_BUFFER_RAW_COOKIE, CAT_SET_OTHER,
+ return new HttpRuleOptModule(IPS_OPT, IPS_HELP, HTTP_BUFFER_RAW_COOKIE, CAT_SET_OTHER,
PSI_RAW_COOKIE, http_raw_cookie_params);
}
IPS_OPT,
IPS_HELP,
raw_cookie_mod_ctor,
- HttpCursorModule::mod_dtor
+ HttpRuleOptModule::mod_dtor
},
OPT_TYPE_DETECTION,
0, PROTO_BIT__TCP,
static Module* raw_header_mod_ctor()
{
- return new HttpCursorModule(IPS_OPT, IPS_HELP, HTTP_BUFFER_RAW_HEADER, CAT_SET_RAW_HEADER,
+ return new HttpRuleOptModule(IPS_OPT, IPS_HELP, HTTP_BUFFER_RAW_HEADER, CAT_SET_RAW_HEADER,
PSI_RAW_HEADER, http_raw_header_params);
}
IPS_OPT,
IPS_HELP,
raw_header_mod_ctor,
- HttpCursorModule::mod_dtor
+ HttpRuleOptModule::mod_dtor
},
OPT_TYPE_DETECTION,
0, PROTO_BIT__TCP,
static Module* raw_request_mod_ctor()
{
- return new HttpCursorModule(IPS_OPT, IPS_HELP, HTTP_BUFFER_RAW_REQUEST, CAT_SET_OTHER,
+ return new HttpRuleOptModule(IPS_OPT, IPS_HELP, HTTP_BUFFER_RAW_REQUEST, CAT_SET_OTHER,
PSI_RAW_REQUEST, http_raw_request_params);
}
IPS_OPT,
IPS_HELP,
raw_request_mod_ctor,
- HttpCursorModule::mod_dtor
+ HttpRuleOptModule::mod_dtor
},
OPT_TYPE_DETECTION,
0, PROTO_BIT__TCP,
static Module* raw_status_mod_ctor()
{
- return new HttpCursorModule(IPS_OPT, IPS_HELP, HTTP_BUFFER_RAW_STATUS, CAT_SET_OTHER,
+ return new HttpRuleOptModule(IPS_OPT, IPS_HELP, HTTP_BUFFER_RAW_STATUS, CAT_SET_OTHER,
PSI_RAW_STATUS, http_raw_status_params);
}
IPS_OPT,
IPS_HELP,
raw_status_mod_ctor,
- HttpCursorModule::mod_dtor
+ HttpRuleOptModule::mod_dtor
},
OPT_TYPE_DETECTION,
0, PROTO_BIT__TCP,
static Module* raw_trailer_mod_ctor()
{
- return new HttpCursorModule(IPS_OPT, IPS_HELP, HTTP_BUFFER_RAW_TRAILER, CAT_SET_RAW_HEADER,
+ return new HttpRuleOptModule(IPS_OPT, IPS_HELP, HTTP_BUFFER_RAW_TRAILER, CAT_SET_RAW_HEADER,
PSI_RAW_TRAILER, http_raw_trailer_params);
}
IPS_OPT,
IPS_HELP,
raw_trailer_mod_ctor,
- HttpCursorModule::mod_dtor
+ HttpRuleOptModule::mod_dtor
},
OPT_TYPE_DETECTION,
0, PROTO_BIT__TCP,
static Module* raw_uri_mod_ctor()
{
- return new HttpCursorModule(IPS_OPT, IPS_HELP, HTTP_BUFFER_RAW_URI, CAT_SET_RAW_KEY,
+ return new HttpRuleOptModule(IPS_OPT, IPS_HELP, HTTP_BUFFER_RAW_URI, CAT_SET_RAW_KEY,
PSI_RAW_URI, http_raw_uri_params);
}
IPS_OPT,
IPS_HELP,
raw_uri_mod_ctor,
- HttpCursorModule::mod_dtor
+ HttpRuleOptModule::mod_dtor
},
OPT_TYPE_DETECTION,
0, PROTO_BIT__TCP,
static Module* stat_code_mod_ctor()
{
- return new HttpCursorModule(IPS_OPT, IPS_HELP, HTTP_BUFFER_STAT_CODE, CAT_SET_STAT_CODE,
+ return new HttpRuleOptModule(IPS_OPT, IPS_HELP, HTTP_BUFFER_STAT_CODE, CAT_SET_STAT_CODE,
PSI_STAT_CODE, http_stat_code_params);
}
IPS_OPT,
IPS_HELP,
stat_code_mod_ctor,
- HttpCursorModule::mod_dtor
+ HttpRuleOptModule::mod_dtor
},
OPT_TYPE_DETECTION,
0, PROTO_BIT__TCP,
static Module* stat_msg_mod_ctor()
{
- return new HttpCursorModule(IPS_OPT, IPS_HELP, HTTP_BUFFER_STAT_MSG, CAT_SET_STAT_MSG,
+ return new HttpRuleOptModule(IPS_OPT, IPS_HELP, HTTP_BUFFER_STAT_MSG, CAT_SET_STAT_MSG,
PSI_STAT_MSG, http_stat_msg_params);
}
IPS_OPT,
IPS_HELP,
stat_msg_mod_ctor,
- HttpCursorModule::mod_dtor
+ HttpRuleOptModule::mod_dtor
},
OPT_TYPE_DETECTION,
0, PROTO_BIT__TCP,
static Module* trailer_mod_ctor()
{
- return new HttpCursorModule(IPS_OPT, IPS_HELP, HTTP_BUFFER_TRAILER, CAT_SET_HEADER,
+ return new HttpRuleOptModule(IPS_OPT, IPS_HELP, HTTP_BUFFER_TRAILER, CAT_SET_HEADER,
PSI_TRAILER, http_trailer_params);
}
IPS_OPT,
IPS_HELP,
trailer_mod_ctor,
- HttpCursorModule::mod_dtor
+ HttpRuleOptModule::mod_dtor
},
OPT_TYPE_DETECTION,
0, PROTO_BIT__TCP,
static Module* true_ip_mod_ctor()
{
- return new HttpCursorModule(IPS_OPT, IPS_HELP, HTTP_BUFFER_TRUE_IP, CAT_SET_OTHER,
+ return new HttpRuleOptModule(IPS_OPT, IPS_HELP, HTTP_BUFFER_TRUE_IP, CAT_SET_OTHER,
PSI_TRUE_IP, http_true_ip_params);
}
IPS_OPT,
IPS_HELP,
true_ip_mod_ctor,
- HttpCursorModule::mod_dtor
+ HttpRuleOptModule::mod_dtor
},
OPT_TYPE_DETECTION,
0, PROTO_BIT__TCP,
static Module* uri_mod_ctor()
{
- return new HttpCursorModule(IPS_OPT, IPS_HELP, HTTP_BUFFER_URI, CAT_SET_KEY, PSI_URI,
+ return new HttpRuleOptModule(IPS_OPT, IPS_HELP, HTTP_BUFFER_URI, CAT_SET_KEY, PSI_URI,
http_uri_params);
}
IPS_OPT,
IPS_HELP,
uri_mod_ctor,
- HttpCursorModule::mod_dtor
+ HttpRuleOptModule::mod_dtor
},
OPT_TYPE_DETECTION,
0, PROTO_BIT__TCP,
static Module* version_mod_ctor()
{
- return new HttpCursorModule(IPS_OPT, IPS_HELP, HTTP_BUFFER_VERSION, CAT_SET_OTHER,
+ return new HttpRuleOptModule(IPS_OPT, IPS_HELP, HTTP_BUFFER_VERSION, CAT_SET_OTHER,
PSI_VERSION, http_version_params);
}
IPS_OPT,
IPS_HELP,
version_mod_ctor,
- HttpCursorModule::mod_dtor
+ HttpRuleOptModule::mod_dtor
},
OPT_TYPE_DETECTION,
0, PROTO_BIT__TCP,
#define IPS_HELP "rule option to set detection cursor to normalized JavaScript data"
static Module* js_data_mod_ctor()
{
- return new HttpCursorModule(IPS_OPT, IPS_HELP, BUFFER_JS_DATA, CAT_SET_JS_DATA,
+ return new HttpRuleOptModule(IPS_OPT, IPS_HELP, BUFFER_JS_DATA, CAT_SET_JS_DATA,
PSI_JS_DATA);
}
IPS_OPT,
IPS_HELP,
js_data_mod_ctor,
- HttpCursorModule::mod_dtor
+ HttpRuleOptModule::mod_dtor
+ },
+ OPT_TYPE_DETECTION,
+ 0, PROTO_BIT__TCP,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ HttpIpsOption::opt_ctor,
+ HttpIpsOption::opt_dtor,
+ nullptr
+};
+
+//-------------------------------------------------------------------------
+// num_header_lines
+//-------------------------------------------------------------------------
+#undef IPS_OPT
+#define IPS_OPT "num_headers"
+#undef IPS_HELP
+#define IPS_HELP "rule option to perform range check on number of headers"
+
+static const Parameter http_num_hdrs_params[] =
+{
+ { "~range", Parameter::PT_INTERVAL, hdrs_num_range.c_str(), nullptr,
+ "check that number of headers of current buffer are in given range" },
+ { "request", Parameter::PT_IMPLIED, nullptr, nullptr,
+ "match against the version from the request message even when examining the response" },
+ { "with_header", Parameter::PT_IMPLIED, nullptr, nullptr,
+ "this rule is limited to examining HTTP message headers" },
+ { "with_body", Parameter::PT_IMPLIED, nullptr, nullptr,
+ "parts of this rule examine HTTP message body" },
+ { "with_trailer", Parameter::PT_IMPLIED, nullptr, nullptr,
+ "parts of this rule examine HTTP message trailers" },
+ { nullptr, Parameter::PT_MAX, nullptr, nullptr, nullptr }
+};
+
+static Module* num_hdrs_mod_ctor()
+{
+ return new HttpRuleOptModule(IPS_OPT, IPS_HELP, HTTP_RANGE_NUM_HDRS, CAT_SET_OTHER,
+ PSI_RANGE_NUM_HDRS, http_num_hdrs_params);
+}
+
+static const IpsApi num_headers_api =
+{
+ {
+ PT_IPS_OPTION,
+ sizeof(IpsApi),
+ IPSAPI_VERSION,
+ 1,
+ API_RESERVED,
+ API_OPTIONS,
+ IPS_OPT,
+ IPS_HELP,
+ num_hdrs_mod_ctor,
+ HttpRuleOptModule::mod_dtor
+ },
+ OPT_TYPE_DETECTION,
+ 0, PROTO_BIT__TCP,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ HttpIpsOption::opt_ctor,
+ HttpIpsOption::opt_dtor,
+ nullptr
+};
+
+//-------------------------------------------------------------------------
+// num_trailer_lines
+//-------------------------------------------------------------------------
+#undef IPS_OPT
+#define IPS_OPT "num_trailers"
+#undef IPS_HELP
+#define IPS_HELP "rule option to perform range check on number of trailers"
+
+static Module* num_trailers_mod_ctor()
+{
+ return new HttpRuleOptModule(IPS_OPT, IPS_HELP, HTTP_RANGE_NUM_TRAILERS, CAT_SET_OTHER,
+ PSI_RANGE_NUM_TRAILERS, http_num_hdrs_params);
+}
+
+static const IpsApi num_trailers_api =
+{
+ {
+ PT_IPS_OPTION,
+ sizeof(IpsApi),
+ IPSAPI_VERSION,
+ 1,
+ API_RESERVED,
+ API_OPTIONS,
+ IPS_OPT,
+ IPS_HELP,
+ num_trailers_mod_ctor,
+ HttpRuleOptModule::mod_dtor
},
OPT_TYPE_DETECTION,
0, PROTO_BIT__TCP,
const BaseApi* ips_http_cookie = &cookie_api.base;
const BaseApi* ips_http_header = &header_api.base;
const BaseApi* ips_http_method = &method_api.base;
+const BaseApi* ips_http_num_headers = &num_headers_api.base;
+const BaseApi* ips_http_num_trailers = &num_trailers_api.base;
const BaseApi* ips_http_param = ¶m_api.base;
const BaseApi* ips_http_raw_body = &raw_body_api.base;
const BaseApi* ips_http_raw_cookie = &raw_cookie_api.base;
#include "profiler/profiler.h"
#include "framework/ips_option.h"
#include "framework/module.h"
+#include "framework/range.h"
#include "http_buffer_info.h"
#include "http_enum.h"
+class HttpInspect;
+
enum PsIdx { PSI_CLIENT_BODY, PSI_COOKIE, PSI_HEADER, PSI_METHOD, PSI_PARAM,
PSI_RAW_BODY, PSI_RAW_COOKIE, PSI_RAW_HEADER, PSI_RAW_REQUEST, PSI_RAW_STATUS,
PSI_RAW_TRAILER, PSI_RAW_URI, PSI_STAT_CODE, PSI_STAT_MSG, PSI_TRAILER,
- PSI_TRUE_IP, PSI_URI, PSI_VERSION, PSI_JS_DATA, PSI_VBA_DATA, PSI_MAX };
+ PSI_TRUE_IP, PSI_URI, PSI_VERSION, PSI_JS_DATA, PSI_VBA_DATA,
+ PSI_RANGE_NUM_HDRS, PSI_RANGE_NUM_TRAILERS, PSI_MAX };
-class HttpCursorModule : public snort::Module
+class HttpRuleOptModule : public snort::Module
{
public:
- HttpCursorModule(const char* key_, const char* help, HttpEnums::HTTP_BUFFER buffer_index_,
+ HttpRuleOptModule(const char* key_, const char* help, HttpEnums::HTTP_RULE_OPT rule_opt_index_,
snort::CursorActionType cat_, PsIdx psi_)
- : snort::Module(key_, help), key(key_), buffer_index(buffer_index_),
+ : snort::Module(key_, help), key(key_), rule_opt_index(rule_opt_index_),
cat(cat_), psi(psi_) {}
- HttpCursorModule(const char* key_, const char* help, HttpEnums::HTTP_BUFFER buffer_index_,
+ HttpRuleOptModule(const char* key_, const char* help, HttpEnums::HTTP_RULE_OPT rule_opt_index_,
snort::CursorActionType cat_, PsIdx psi_, const snort::Parameter params[])
- : snort::Module(key_, help, params), key(key_), buffer_index(buffer_index_),
- cat(cat_), psi(psi_) {}
+ : snort::Module(key_, help, params), key(key_), rule_opt_index(rule_opt_index_),
+ cat(cat_), psi(psi_) {}
snort::ProfileStats* get_profile() const override { return &http_ps[psi]; }
static void mod_dtor(snort::Module* m) { delete m; }
bool begin(const char*, int, snort::SnortConfig*) override;
bool path;
bool query;
bool fragment;
+ snort::RangeCheck range;
void reset();
};
const char* const key;
- const HttpEnums::HTTP_BUFFER buffer_index;
+ const HttpEnums::HTTP_RULE_OPT rule_opt_index;
const snort::CursorActionType cat;
const PsIdx psi;
class HttpIpsOption : public snort::IpsOption
{
public:
- HttpIpsOption(const HttpCursorModule* cm) :
+ HttpIpsOption(const HttpRuleOptModule* cm) :
snort::IpsOption(cm->key, RULE_OPTION_TYPE_BUFFER_SET),
key(cm->key), cat(cm->cat), psi(cm->psi),
inspect_section(cm->inspect_section),
- buffer_info(cm->buffer_index, cm->sub_id, cm->form,
- cm->para_list.param, cm->para_list.nocase) {}
+ buffer_info(cm->rule_opt_index, cm->sub_id, cm->form,
+ cm->para_list.param, cm->para_list.nocase), range(cm->para_list.range){}
snort::CursorActionType get_cursor_type() const override { return cat; }
EvalStatus eval(Cursor&, snort::Packet*) override;
uint32_t hash() const override;
bool operator==(const snort::IpsOption& ips) const override;
bool retry(Cursor&, const Cursor&) override;
static IpsOption* opt_ctor(snort::Module* m, OptTreeNode*)
- { return new HttpIpsOption((HttpCursorModule*)m); }
+ { return new HttpIpsOption((HttpRuleOptModule*)m); }
static void opt_dtor(snort::IpsOption* p) { delete p; }
+
private:
const char* const key;
const snort::CursorActionType cat;
const PsIdx psi;
const HttpEnums::InspectSection inspect_section;
HttpBufferInfo buffer_info;
+ const snort::RangeCheck range;
};
#endif