--- Begin Message ---
(Your first attempt seems to have worked - finally.  Perhaps Michael cleared 
the backlog?)

On Aug 10, 2020, at 4:24 AM, Denis Ovsienko via tcpdump-workers 
<tcpdump-workers@lists.tcpdump.org> wrote:

> It turns out, pcap_compile_nopcap() has been a part of the libpcap API
> since version 0.5 (June 2000), but it is not even mentioned anywhere in
> the man pages. The existing pcap_compile.3pcap man page seems to be the
> best place to add this information, since the two functions are
> similar. Would it be the right thing to do?

The problem with pcap_compile_nopcap() is that it provides no way to return an 
error message if it fails, unlike pcap_open_dead() combined with 
pcap_compile(), where you can use pcap_geterr() before closing the pcap_t.

An additional problem is that NetBSD fixed this by adding an error-buffer 
pointer argument, but that meant that NetBSD's pcap_compile_nopcap() was 
unfixably incompatible with the one in other OSes.  They've shifted to the 
compatible API, at the cost of not being able to get an error string.

So, for now, my inclination is to 1) deprecate pcap_compile_nopcap() (complete 
with marking it as deprecated, so code that uses it gets a compile-time warning 
on compilers where the deprecation macro is supported) and 2) not document it.

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

Reply via email to