Ethereal-dev: Re: [Ethereal-dev] pcap_compile_nopcap() on netbsd

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Mon, 15 Dec 2003 01:06:11 -0800
On Mon, Dec 15, 2003 at 01:48:14PM +0900, Jun-ichiro itojun Hagino wrote:
> 	netbsd uses different function prototype than tcpdump.org distribution
> 	of libpcap, for pcap_compile_nopcap():
> 	the last char * is pointer for error code (must be of PCAP_ERRBUF_SIZE).
> 	i guess that configure.in should be annotated to check these two
> 	variants.

Which configure.in?  Tcpdump doesn't use "pcap_compile_nopcap()".

> 	(and as a sidenote, i guess tcpdump.org should adapt the last char *,
> 	as it does not report the cause when cap_compile_nopcap() fails)

Unfortunately, at this point the only way to write portable applications
using "pcap_compile_nopcap()" would be to use that type of configure
check.  I guess it'd be OK to change our API - any application that can
handle only the current tcpdump.org API won't work on recent NetBSD's
anyway.

"pcap_open_dead()", fortunately, is the same, as far as I know, in all
versions of libpcap that have it.