sn00py has asked for the wisdom of the Perl Monks concerning the following question:

i have no idea about how to break the function Net::Pcap::loop($object, -1, \&print_packet,'') the number of packet is -1 so,it means looping forever then the question is how to stop pcap to capture packets without terminate the program thanks

Replies are listed 'Best First'.
Re: Help Needed !!inNet::Pcap module
by Anonymous Monk on Jan 24, 2009 at 07:42 UTC
    Use pcap_breakloop? Or use sigtrap?