roxen.lists.pike.general

Subject Author Date
Re: PikeFlows-0.1 James Harton <james[at]helicopter[dot]geek[dot]nz> 23-02-2009
Pontus Rodling wrote:
> James Harton skrev:
>   
>> Hi all.
>>
>> Just a quick note to say that I've posted the code for my IP flow
>> engine based around Bill's Public.Network.Pcap.
>>
>>
http://www.helicopter.geek.nz/2009/02/pikeflows-pike-ip-packet-flow-analysis.html
>>
>>
>>     
> Looks really nice!
>
> One question though, if you don't receive any packets, does the counter
> thread still execute?
> Cause i've been having a problem with Pcap blocking everything (threads,
> callbacks, call_outs) from running while it's waiting for a packet.
>
> I've been working on a network packet dissection library for Pike,
> however i haven't added support IPv6 yet.
> Currently supported are Ethernet, IPv4, UDP and dissectors for some game
> protocols.
> And thanks to you now I have some code to base the TCP stream/flow part
> of the lib on, if that's okay of course.
>
>   

I'm glad you like it.  I had trouble with pcap blocking also, but if you 
look at flow.pike you'll see that the capture loop is put in its own 
thread.  I've tried varying techniques for running the capture (non 
blocking, etc) but the way I've done it seemed to perform the best.

Like a dumbass I didn't specify the license, but it's under the LGPL.  
I'm happy for you to use it.

If your packet dissection code works better than mine (pretty quick and 
nasty, but it's a simple enough job) then feel free to contribute it back.

Cheers

James.