|
Hi there,
I would like to make a simple sniffer program that
will sniff for packets in a particular device for a given time say 2 secs and
print whatever packets captured...
I use the to_ms in pcap_open_live and also
pcap_dispatch to try to get this behavior but it is stucked when there is no
packet in the device, it didn't timeout and exit....
Is the timeout mechanism not supported in Linux
libpcap071?
Any idea to implement it w/ most of the libpcap
API?
Thanks
Andrew
|
