Merge in SNORT/snort3 from ~VIIZHYK/snort3:fp_detection to master
Squashed commit of the following:
commit
fb421c5addc2cc9b687155e735b88cffaddbd63c
Author: viizhyk <viizhyk@cisco.com>
Date: Mon Dec 16 13:14:31 2024 -0500
inspector_manager: Refactored instrumentation code of connection profiling.
{
enable_content(p);
+ p->inspection_started_timestamp = TO_USECS_FROM_EPOCH(SnortClock::now());
InspectorManager::execute(p);
+
inspected = true;
+ p->inspection_started_timestamp = TO_USECS_FROM_EPOCH(SnortClock::now());
if ( !all_disabled(p) )
{
if ( detect(p, offload_enabled) )
return false; // don't finish out offloaded packets
}
+ if ( p->flow )
+ {
+ p->flow->add_inspection_duration(TO_USECS_FROM_EPOCH(SnortClock::now()) - p->inspection_started_timestamp);
+ }
}
finish_inspect_with_latency(p);
}
// new it_xxx) is run just once per flow (and all non-flow packets).
void InspectorManager::execute(Packet* p)
{
- p->inspection_started_timestamp = TO_USECS_FROM_EPOCH(SnortClock::now());
-
if ( trace_enabled(snort_trace, TRACE_INSPECTOR_MANAGER, DEFAULT_TRACE_LOG_LEVEL, p) )
internal_execute<true>(p);
else