-- more FIXIT-H fixed
-- removed process.plugin_path and process.script_path since they are
needed ahead of parsing
+-- added idle processing, though still as sketchy as Snort until alpha 2
116
-- fixed valgrind leak
}
if ( DAQ_Acquire(0, main_func, NULL) )
break;
+
+ // FIXIT-M acquire(0) won't return until no packets, signal, etc.
+ // which makes this idle unlikely to execute under high traffic
+ // conditions; that means the idle processing may not be useful
+ // or that we need a hook to do things periodically even when
+ // traffic is available
+ snort_idle();
}
}
Packet* get_current_packet()
{ return &s_packet; }
-// FIXIT-H for multiple packet threads
+// FIXIT-M for multiple packet threads
// using thread locals for s_pkth and s_data won't work
// will need array of s_packet, s_pkth, and s_data and
// capture all if it is not clear which thread crashed
Active_Reset();
PacketManager::encode_reset();
- if ( flow_con ) // FIXIT-H always instantiate
- flow_con->timeout_flows(4, pkthdr->ts.tv_sec);
-
-#if 0
- // FIXIT-H do this when idle
if ( flow_con ) // FIXIT-H always instantiate
- flow_con->timeout_flows(16384, time(NULL));
-#endif
+ {
+ flow_con->timeout_flows(4, pkthdr->ts.tv_sec);
+ }
s_packet.pkth = NULL; // no longer avail on segv
return verdict;
}
+void snort_idle()
+{
+ if ( flow_con )
+ flow_con->timeout_flows(16384, time(NULL));
+ pc.idle++;
+}
+
void snort_rotate()
{
- SetRotatePerfFileFlag();
+ SetRotatePerfFileFlag();
}
void snort_thread_init(const char* intf)