The haddock documentation for loop and loopBS indicate that I should expect the number of packets processed to be returned. I was therefore surpised when loopBS lied to me that I had processed zero packets. Checking the original pcap_loop man page, I see an explanation:
pcap_loop() returns 0 if cnt is exhausted or if, when reading from a ``savefile'', no more packets are available. It returns -1 if an error occurs or -2 if the loop terminated due to a call to pcap_breakloop() before any packets were processed.
The haddock documentation for loop and loopBS indicate that I should expect the number of packets processed to be returned. I was therefore surpised when loopBS lied to me that I had processed zero packets. Checking the original pcap_loop man page, I see an explanation: