tcpdump mailing list archives

Re: RFC: a loadable plugin framework for external capture backends


From: Robin Jarry via tcpdump-workers <tcpdump-workers () lists tcpdump org>
Date: Sat, 03 Oct 2026 12:11:36 +0200

--- Begin Message --- From: "Robin Jarry" <rjarry () redhat com>
Date: Sat, 03 Oct 2026 12:11:36 +0200
Michael Richardson, Oct 03, 2026 at 01:10:
So you're saying that plugins should be bundled *by the OS distributor* and wired in, rather than allowing outside-of-libpcap projects *not* bundled by the distributor to be plugged into libpcap?

I'm saying that calling dlopen() shouldn't be required: do that at link time.

This would defeat the whole purpose of external applications providing their own backend without libpcap knowing about them in advance.

dlopen() is the only solution if we don't want to hardcode the list of well-known plugins *and* require their .so to be present at build time so that the linker is happy.

If so, that might work for most cases with Linux distributions, most of which don't seem to draw a strong distinction between "core OS" and "packages". It *does* mean that the libpcap package would have more dependencies.

Yes, that's the problem with "compile-time option, disabled"..

libpcap must *not* have any additional dependencies. This is the other way around: external backends would depend on libpcap plugin ABI. They would drop their plugins in a well known location and libpcap would dynamically load them at runtime, not build time.

It might not work so well for the *BSDs, most of which have a "core OS" separate from the package collection, and that include libpcap in the "core OS". That includes macOS ("CupertinoBSD"), which, being a commercial OS, may have third-party *binary-only* libpcap extensions, which would require a stadardized *ABI*. (macOS is one reason why I try to make sure libpcap never changes its ABI other than, perhaps, carefully dropping routines from the API/ABI over time, as long as they've been deprecated before their disappearance.)

libpcap 2.x

The plugin *ABI* does not need to be standardized across different OSes and architectures, only the *API*.

--
Robin

# Prices subject to change without notice.


--- End Message ---
_______________________________________________
tcpdump-workers mailing list -- tcpdump-workers () lists tcpdump org
To unsubscribe send an email to tcpdump-workers-leave () lists tcpdump org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Current thread: