What kinds of tasks were you imagining would be executed at intervals?  Garbage collection, statistics?  What did you have in mind?<br><br><div class="gmail_quote">On Tue, Feb 10, 2009 at 3:32 AM, Victor Julien <span dir="ltr"><<a href="mailto:lists@inliniac.net">lists@inliniac.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div class="Wj3C7c">Martin Fong wrote:<br>
> Matt Jonkman wrote:<br>
><br>
>> Cooperative event loops (e.g., libevent) to support asynch I/O<br>
>><br>
>> Do you mean something like parallel processing of different tools on the<br>
>> same stream or event? For instance one stream with http would go through<br>
>> regular matching but also be copied out to a http interpreter to pull<br>
>> environment variables and the like onto a separate thread/processor?<br>
><br>
> I'm actually thinking about unix select () loops.  Because the current<br>
> implementation simply invokes pcap_loop (), there's no way for a<br>
> module to independently perform I/O or respond to a select ()-based<br>
> timer.  There have been cases when I've needed to write data to a<br>
> socket or read from a pipe, but my preprocessor only got the<br>
> opportunity when it "processed" a packet (-- and clearly I don't want<br>
> the I/O to block).  (And, yes, I know about the danger of having a<br>
> module consume too many cycles doing I/O or computing, but there's<br>
> nothing to prevents such abuse now -- and cooperative event processing<br>
> _does_ work.)<br>
><br>
>      As far as your suggestion, that too sounds interesting...!<br>
<br>
</div></div>I was thinking about having a way for module to register functions that<br>
will be executed at given times and intervals, probably by having a<br>
separate thread for that. That would introduce a lot of locking issues<br>
of course, so maybe another/additional way is needed.<br>
<br>
What about having a module get called at a fixed interval even if there<br>
are no packets? Pcap/ip_queue/nf_queue etc can all work with timeouts or<br>
non-blocking io...<br>
<br>
Maybe the module registration functions should be able to determine the<br>
interval, so that if no module requires it the overhead is not imposed,<br>
and if your module does it's set and used.<br>
<br>
Interesting...<br>
<br>
Cheers,<br>
Victor<br>
<font color="#888888"><br>
--<br>
---------------------------------------------<br>
Victor Julien<br>
<a href="http://www.inliniac.net/" target="_blank">http://www.inliniac.net/</a><br>
PGP: <a href="http://www.inliniac.net/victorjulien.asc" target="_blank">http://www.inliniac.net/victorjulien.asc</a><br>
</font><div><div></div><div class="Wj3C7c">---------------------------------------------<br>
<br>
_______________________________________________<br>
Discussion mailing list<br>
<a href="mailto:Discussion@openinfosecfoundation.org">Discussion@openinfosecfoundation.org</a><br>
<a href="http://lists.openinfosecfoundation.org/mailman/listinfo/discussion" target="_blank">http://lists.openinfosecfoundation.org/mailman/listinfo/discussion</a><br>
</div></div></blockquote></div><br>