tcpdump mailing list archives

Error in the pcap_next_ex(3PCAP) man page


From: Aaron Rainbolt <arraybolt3 () gmail com>
Date: Wed, 25 Mar 2026 01:18:55 -0400

Hi,

In the "Return Value" section of the pcap_next_ex(3PCAP) manpage, it
says that "pcap_next_ex() returns... PCAP_ERROR_BREAK if packets are
being read from a ``savefile'' and there are no more packets to read
from the savefile...". This is incorrect; the source code states that
PCAP_ERROR_BREAK can be returned if the pcap_next_ex() call is
interrupted by pcap_breakloop():

    #define PCAP_ERROR_BREAK            -2      /* loop terminated by pcap_breakloop */

And in practice, this is what happens in some code I wrote for testing
a TCP-behavior-changing kernel module. [1]

I'd be happy to file a PR for this, but figured I should start here in
case it's easier for someone with direct push access to tweak it
themselves.

Thanks,

--
Aaron

[1] https://github.com/0xsirus/tirdad/issues/33
_______________________________________________
tcpdump-workers mailing list -- tcpdump-workers () lists tcpdump org
To unsubscribe send an email to tcpdump-workers-leave () lists tcpdump org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Current thread: