Re: Continuous packet capture

2009-03-27 Thread Jonathan S. Polacheck
Brad, Great stuff. Thanks. I'm going on the assumption that $inst-[1] (line 94) is the raw packet, headers and all. I plan to test by pointing pcap at a capture file and comparing output to input. My next plan is to add a sql insert of $hexpacket at line 108. My goal is to keep up with an

Re: Continuous packet capture

2009-03-27 Thread Jonathan S. Polacheck
Nosing around in the mailing list archive I find; Re: Prioritizing Event Loops Martijn van Beers Fri, 18 Jan 2008 11:37:22 -0800 snip In POE, all your external data, whether from a socket or a file, or something else entirely, enters your app through a POE::Wheel (you might not be aware of

Re: Continuous packet capture

2009-03-27 Thread Brad Lhotsky
Sorry, I thought I found a bug in the code, but it turns out my code was correct. $inst-[0] is the Packet Header, $inst-[1] is the packet in raw form. Jonathan S. Polacheck wrote: Brad, Great stuff. Thanks. I'm going on the assumption that $inst-[1] (line 94) is the raw packet, headers

Re: Continuous packet capture

2009-03-27 Thread Brad Lhotsky
I'm not sure that POE::Component::Pcap works like the POE::Component::Server::TCP. It appears to be implemented as a separate POE::Session and uses select() with an internal file descriptor to poll the device for new packets and fire the events specified by the dispath argument. Jonathan

Re: Continuous packet capture

2009-03-26 Thread Brad Lhotsky
I don't know if this will help you or not, but here's a script I have running to monitor and track recursive DNS Queries on my network. You can ignore the database stuff, but it might help. http://divisionbyzero.net/~brad/code/dns_snoop.pl.html I process the packets as they come in, but I

Re: Continuous packet capture

2009-03-24 Thread Jonathan S. Polacheck
I have spent a couple of days casting about, looking at examples and perldoc. I don't seem to be able to get the data from 'tcpdump' (or POE::Component::PCAP) to the wheel that will process the data. For my last attempt, I removed Filter::Referece and tried with just the wheel. Still no luck.

Re: Continuous packet capture

2009-03-15 Thread Jon Polacheck
/Child_Processes_3 From: Jonathan S. Polacheck jpola...@texasmutual.com To: poe@perl.org Sent: Friday, March 13, 2009 1:13:55 PM Subject: Re: Continuous packet capture ch...@fedde.us wrote; Your first step is going to be to make sure your code is 'use strict

Re: Continuous packet capture

2009-03-15 Thread Alex _
the tasks is the queue. Wheel::run pops of tasks and runs it in a separate process From: Jon Polacheck jon...@grandecom.net To: poe@perl.org Sent: Sunday, March 15, 2009 7:08:01 AM Subject: Re: Continuous packet capture What I get out the the example; Wheel

Continuous packet capture

2009-03-13 Thread Jonathan S. Polacheck
Perhaps this is a case of premature optimization. I am working toward a continuous packet capture application (as in Infinistream, Gigastor, NetVCR, etc). So far, I have two perl scripts. One takes Net::Pcap output and Hexdumps it to a fifo file. The other reads the fifo and inserts

Re: Continuous packet capture

2009-03-13 Thread Alex _
heres an example of producer/consumer with wheel::run http://poe.perl.org/?POE_Cookbook/Child_Processes_3 From: Jonathan S. Polacheck jpola...@texasmutual.com To: poe@perl.org Sent: Friday, March 13, 2009 1:13:55 PM Subject: Re: Continuous packet capture ch