in reply to Net::Pcap Filters and alarm() [SOLVED]

What happens if you pcap_close($pcap) in the alarm handler?

Replies are listed 'Best First'.
Re^2: Net::Pcap Filters and alarm()
by return0 (Acolyte) on Apr 09, 2014 at 18:45 UTC
    Alarm handler never gets called. I put a print statement there to notify me :(
Re^2: Net::Pcap Filters and alarm()
by return0 (Acolyte) on Apr 09, 2014 at 19:17 UTC
    if the timeout is reached before i ping 10.0.0.1 in another terminal, the Net::Pcap::loop returns and executes the alarm() handler before continuing the process the packet! what?!
      Nice to see it's not just me, that's got a packet to his head. Why stick to Net::Pcap if it's broken? What did you use instead?