I am making a packet capturing program for http procotol using pcap library.
it runs all days for gathering useful information.
 
However, it has very strange behavior as follows:
After handled so many incoming packets so well, pcap_loop() exits with returing 0.
I read that "pcap_loop() does not return 0" in libpcap man page. but, in my program
pcap_loop() returns 0.
 
If pcap_loop can return 0, what does that mean?
In the case of pcap_dispatch(), returing 0 is the 'read time-out' case.
Does the return 0 from pcap_loop() has the same meaning as pcap_dispatch()? 
(I set read time out at calling pcap_open_live function)
 
The more strange thing is that the above case is happened more often in gigabit-ethernet than in fast-ethernet.
I test my program in fast-ethernet and gigabit-ethernet so many times. Is the pcap_lib on gigabit-ethernet a problem?
I test on serveral fast-ethernet cards and one gigabit-ethernet card (intel gigabit - optical)
 
Please give me a hint.
I really appricate your help in advance!!
 
 
 

Reply via email to