svn commit: r334277 - in head: contrib/libpcap contrib/ofed/usr.lib/3 contrib/pf/pflogd contrib/wpa/src/l2_packet lib lib/libpcap share/mk usr.sbin/cxgbetool

Hans Petter Selasky hps at selasky.org
Wed May 30 09:43:04 UTC 2018


On 05/30/18 11:00, Antoine Brodin wrote:
> On Wed, May 30, 2018 at 8:20 AM, Hans Petter Selasky <hps at selasky.org> wrote:
>> On 05/30/18 10:02, Antoine Brodin wrote:
>>>
>>> Could the pcap/pcap.h header be fixed instead with #ifdef HAVE_REMOTE
>>> as it previously had?
>>
>>
>> The HAVE_REMOTE was removed upstream:
>>
>> https://github.com/the-tcpdump-group/libpcap/commit/a372536befc9b1ee1d355058daa2eb9f66aa0c59#diff-46964bcbd8e8a5cec9a75c66ab26a97b
>>
>> What do you think? Shall we re-add it to base?

Hi,
> Either hide remote packet capture functions from the header or enable
> remote capture functions?

This feature is disabled by default for UNIX.

> Note that net/p5-Net-Pcap will fail to build with libpcap from ports
> too when libpcap from ports is updated to version 1.9.0 (pre-release).

No, libpcap from ports has own header files and libraries and does not 
use anything from libpcap in base.

Enabling remote packet capture in libcap won't solve the build failure.

The right solution from my point of view is to extend the BUILD_DEPENDS 
and CFLAGS and LDFLAGS like shown:

BUILD_DEPENDS=  p5-IO-Interface>=0:net/p5-IO-Interface \
                 libpcap>=0:net/libpcap

CFLAGS+=        -I${PREFIX}/include
LDFLAGS+=       -L${PREFIX}/lib

After the upgrade to 1.9.0 (pre-release) in ports you simply add:

CFLAGS+=        -DHAVE_PCAP_SETSAMPLING -DHAVE_PCAP_OPEN

--HPS


More information about the svn-src-head mailing list