Hello,

I would like to ask you a question about pcap library. I try to use function 
pcap_loop on a loopback device. My callback function is quite simple, it just 
gets sequence field from ICMP and prints it. When I run my program and start 
to ping the lo device the program produces strange output. My callback 
function is called four time for every packet arrived. It seems to me that 
the pcap_loop function is calling callback as fast as it can and in my case 
it is four time before new packet arrives. What's more, i tried to slow down 
my callback function by using a loop. For 65535 empty iterations there was 
the same effect but for 65536 iterations my program catches only the first 
packet and then starts to behave like there was no more traffic. What is the 
problem? It is very important to me to synchronize this because I have to 
catch EVERY packet and then decide if to drop it or not.

thanks for quick response

        Sebastian Proba

-
This is the TCPDUMP workers list. It is archived at
http://www.tcpdump.org/lists/workers/index.html
To unsubscribe use mailto:[EMAIL PROTECTED]?body=unsubscribe

Reply via email to