tcpdump mailing list archives

Re: backward compatibility in pcap_loop(3PCAP)?


From: Guy Harris via tcpdump-workers <tcpdump-workers () lists tcpdump org>
Date: Fri, 21 Aug 2020 15:19:25 -0700

--- Begin Message --- From: Guy Harris <gharris () sonic net>
Date: Fri, 21 Aug 2020 15:19:25 -0700
On Aug 21, 2020, at 2:48 PM, Denis Ovsienko via tcpdump-workers <tcpdump-workers () lists tcpdump org> wrote:

The man page says:

      (In  older  versions  of libpcap, the behavior when cnt was 0
      was undefined; different platforms and devices  behaved
      differently,  so  code that  must work with older versions of
      libpcap should use -1, not 0, as the value of cnt.)

Would it make sense to move this paragraph to a BACKWARD COMPATIBILITY
section and to tell which specific version started to recognise 0 as a
valid value?

That's where other "some of what this manual page says doesn't apply to older versions of libpcap" items go, so it'd 
make sense.

The PACKET_COUNT_IS_UNLIMITED(), which is what pcap modules should now be using, was introduced in libpcap 1.5, so the 
first version where either 0 or -1 should work is 1.5.

--- End Message ---
_______________________________________________
tcpdump-workers mailing list
tcpdump-workers () lists tcpdump org
https://lists.sandelman.ca/mailman/listinfo/tcpdump-workers

Current thread: