struct State
{
- State() : data(), root(), selector(nullptr), node(nullptr),
- waypoint(0), sid(0), packet_number(0), opt_parent(false)
+ State() : data(), root(), selector(nullptr), node(nullptr), waypoint(0),
+ original_waypoint(0), sid(0), packet_number(0), opt_parent(false)
{
for (uint8_t i = 0; i < NUM_IPS_OPTIONS_VARS; ++i)
byte_extract_vars[i] = 0;
State(const detection_option_tree_node_t& n, const detection_option_eval_data_t& d,
snort::IpsOption* s, unsigned wp, uint64_t id, bool p) : data(d),
root(1, nullptr, d.otn, new RuleLatencyState[snort::ThreadConfig::get_instance_max()]()),
- selector(s), node(const_cast<detection_option_tree_node_t*>(&n)),
- waypoint(wp), sid(id), packet_number(d.p->context->packet_number), opt_parent(p)
+ selector(s), node(const_cast<detection_option_tree_node_t*>(&n)), waypoint(wp),
+ original_waypoint(wp), sid(id), packet_number(d.p->context->packet_number),
+ opt_parent(p)
{
for (uint8_t i = 0; i < NUM_IPS_OPTIONS_VARS; ++i)
snort::GetVarValueByIndex(&byte_extract_vars[i], i);
snort::IpsOption* selector;
detection_option_tree_node_t* node;
unsigned waypoint;
+ const unsigned original_waypoint;
uint64_t sid;
uint64_t packet_number;
uint32_t byte_extract_vars[NUM_IPS_OPTIONS_VARS];
clear_trace_cursor_info();
if (result)
+ {
snort::pc.cont_matches++;
+ snort::pc.cont_match_distance += original_waypoint;
+ }
else
+ {
snort::pc.cont_mismatches++;
+ snort::pc.cont_mismatch_distance += original_waypoint;
+ }
return true;
}
{ CountType::SUM, "cont_matches", "total number of continuations matched" },
{ CountType::SUM, "cont_mismatches", "total number of continuations mismatched" },
{ CountType::MAX, "cont_max_num", "peak number of simultaneous continuations per flow" },
+ { CountType::SUM, "cont_match_distance", "total number of bytes jumped over by matched continuations"},
+ { CountType::SUM, "cont_mismatch_distance", "total number of bytes jumped over by mismatched continuations"},
{ CountType::END, nullptr, nullptr }
};