the-tcpdump-group/libpcap — pull request #340 by crondaemon (2014-01-24 11:00:22+00:00)
Title: Added pcap_loop_sample() function.

Added a new api pcap_loop_sample(). It works as pcap_loop() except for a new parameter (n) that allows the callback function to be called every n packets.

This is useful if the handle function is heavy and can cause packet loss. One can run it on a sampling basis.