NetBSD modified the calling sequence for "pcap_compile_nopcap()" to take
an extra argument, which is a pointer to a buffer into which any error
message from the compilation is captured.
Unfortunately, FreeBSD 4.x already incorporated "pcap_compile_nopcap()"
with the current tcpdump.org calling sequence, and OpenBSD 2.7 did the
same, so, unless NetBSD changes the calling sequence back, the FreeBSD
4.x libpcap API/OpenBSD 2.{7,8} API, and the libpcap API for whatever
NetBSD release next comes from the main branch, won't be compatible.
I sympathize with Jason Thorpe's rationale for the change:
Revision 1.8 / (download) - annotate - [select for diffs] , Fri Oct 6
16:39:24 2000 UTC (2 months ago) by thorpej
Branch: MAIN
CVS Tags: HEAD
Changes since 1.7: +3 -1 lines
Diff to previous 1.7 (colored)
Add pcap_compile_nopcap() from the most recent libpcap release
from tcpdump.org, although with a slightly different signature.
The tcpdump.org version has no way to report an error string back
to the caller. This version takes an additional "errbuf" argument
(similar to pcap_open_*()).
but the change does make it a bit more of a pain to use
"pcap_compile_nopcap()" in programs.
"pcap_open_dead()", if everybody picks it up, would allow all the BSDs
(and everybody else) to have a compatible API for compiling filter
expressions into BPF code without having a capture device open, *and*
would allow you to get an error string. Is the best solution here to
deprecate "pcap_compile_nopcap()", and let its signature remain
platform-dependent? (I think that was the suggestion at one point.)
-
This is the TCPDUMP workers list. It is archived at
http://www.tcpdump.org/lists/workers/index.html
To unsubscribe use mailto:[EMAIL PROTECTED]?body=unsubscribe