1
0
Fork 0
mirror of https://github.com/the-tcpdump-group/libpcap.git synced 2026-09-19 16:29:19 +00:00
the LIBpcap interface to various kernel packet capture mechanism
  • C 61%
  • Perl 24.2%
  • Roff 5.3%
  • CMake 4.2%
  • M4 2.2%
  • Other 3.1%
Find a file
2026-09-11 15:10:30 +01:00
.github/ISSUE_TEMPLATE Update the GitHub issue template 2025-05-14 09:51:48 +02:00
ChmodBPF To quote 2009-09-09 16:50:36 -07:00
cmake dpdk: remove capture backend 2026-07-21 19:35:15 +01:00
doc Update Haiku particulars for R1/beta6. [skip ci] 2026-08-31 16:16:40 +01:00
missing Include <config.h> unconditionally 2024-03-27 22:27:49 +00:00
pcap Document various MidnightBSD peculiarities. [skip ci] 2026-09-08 12:15:00 +01:00
rpcapd CVE-2026-18313: Fix a memory leak in rpcapd. 2026-09-05 10:03:46 +01:00
testprogs Disable the optimizer when VXLAN is involved. 2026-09-11 13:34:15 +01:00
tests CVE-2026-6554: Limit "ja L" looping in pcap_offline_filter(). 2026-09-05 10:03:46 +01:00
.appveyor.yml AppVeyor: Update the remote capture build configuration 2026-03-01 16:12:10 +00:00
.ci-coverity-scan-build.sh .ci-coverity-scan-build.sh: Fix two shellcheck notes 2023-12-03 17:57:31 +01:00
.gitattributes add a GitHub issue template 2017-03-06 11:49:32 +00:00
.gitignore Refine the .gitignore files. 2026-08-09 14:22:20 +01:00
.mailmap Add more entries to .mailmap. [skip ci] 2020-09-08 16:01:40 +01:00
aclocal.m4 Autoconf: Add QNX support to AC_LBL_LIBRARY_NET(). 2026-01-19 17:45:50 +00:00
autogen.sh Autoconf: Print the GNU C Library version when needed in autogen.sh 2025-04-16 18:03:22 +02:00
bpf_dump.c Include <config.h> unconditionally 2024-03-27 22:27:49 +00:00
bpf_filter.c Document a caveat re .bf_insns == NULL. [skip ci] 2026-09-11 13:19:55 +01:00
bpf_image.c Add the missing case for "ldx #pktlen" to bpf_image(). 2025-11-09 20:43:02 +00:00
build.sh Make QNX build warning-free. 2026-09-01 13:20:39 +01:00
build_common.sh CI: Add initial support for Dragonfly BSD. 2026-09-08 19:59:01 +01:00
build_matrix.sh CI: Add a message when using Valgrind 2026-03-10 19:46:55 +01:00
cbpf-savefile.manfile.in cbpf-savefile(5): Bump MinorVer up. [skip ci] 2026-07-14 16:05:25 +01:00
CHANGES NPF: put in a comment saying what ps_recv and ps_drop do. 2026-09-10 13:19:27 -07:00
charconv.c Fix some typos 2023-10-18 15:01:02 +02:00
charconv.h Refine the #ifndef guard in charconv.h. [skip ci] 2021-08-10 13:49:21 +01:00
chmod_bpf Update to reflect the name change for Apple's UNIX-for-Macs. 2018-01-08 19:23:28 -08:00
cmake_uninstall.cmake.in Support "make uninstall" for CMake. 2017-09-28 11:21:11 -07:00
cmakeconfig.h.in In PCAP_BSWAP_ use compiler builtins if available. 2026-08-20 12:44:41 +01:00
CMakeLists.txt Do not disable netmap on MidnightBSD. 2026-09-08 12:13:15 +01:00
config.guess Autoconf: Update config.{guess,sub}, timestamps 2025-07-10 2026-04-26 18:30:05 +00:00
config.sub Autoconf: Update config.{guess,sub}, timestamps 2025-07-10 2026-04-26 18:30:05 +00:00
configure.ac Do not disable netmap on MidnightBSD. 2026-09-08 12:13:15 +01:00
CONTRIBUTING.md Mention the filter tests in CONTRIBUTING.md. [skip ci] 2025-03-17 18:00:41 +00:00
CREDITS List all recent contributors in CREDITS. [skip ci] 2025-12-29 17:25:59 +00:00
diag-control.h Restore clang pragma pop for uninitialized const pointer helper 2026-07-26 16:30:55 -07:00
dlpisubs.c CVE-2026-31912: Mind the program bounds in pcap_offline_filter(). 2026-09-05 10:03:46 +01:00
dlpisubs.h dlpi: some restructuring. 2025-07-29 19:29:47 -07:00
etherent.c Remove all instances of the "register" specifier. 2025-10-05 11:34:42 +01:00
ethertype.h Remove some ETHERTYPE_* definitions 2025-09-16 18:26:35 +02:00
extract.h Fix spelling 2023-06-25 17:15:12 +00:00
fad-getad.c Both AF_INET and AF_INET6 are mandatory. 2026-02-24 12:26:17 +00:00
fad-gifc.c Use calloc(3) a little bit more. 2025-11-01 13:36:00 +00:00
fad-glifc.c Use calloc(3) a little bit more. 2025-11-01 13:36:00 +00:00
fmtutils.c Fix a copy-and-pasteo in utf_16le_to_utf_8_truncated(). 2025-09-07 14:46:31 -07:00
fmtutils.h More pcap_ to pcapint_ for non-API routines. 2023-11-08 23:26:22 -08:00
ftmacros.h Avoid redefining _GNU_SOURCE. [skip appveyor] 2024-09-30 11:00:54 +01:00
gencode.c Disable the optimizer when VXLAN is involved. 2026-09-11 13:34:15 +01:00
gencode.h optimizer: Improve various DOT-related aspects. 2026-08-25 11:09:26 +01:00
grammar.y.in In "net <n> mask <m>" catch ENOMEM for the "m" too. 2026-02-21 15:49:55 +00:00
ieee80211.h Remove a few arrays from ieee80211.h. [skip ci] 2025-08-16 13:28:53 +01:00
install-sh Update install-sh script to the latest available version 2023-05-31 08:45:31 +01:00
INSTALL.md enumeratetest: Add a new test program. 2026-08-14 11:49:01 +01:00
instrument-functions.c instrument functions: Constify strrchr() result. [skip ci] 2026-09-08 19:59:01 +01:00
libpcap.pc.in autoconf, cmake: fix generated pcap-config and libpcap.pc. 2022-09-27 21:17:27 -07:00
LICENSE Delete trailing spaces/tabs 2015-03-08 21:39:43 +01:00
llc.h Add support for filters testing for 802.2 LLC frame types. 2014-05-19 20:53:58 -07:00
Makefile-devel-adds Fix parallel build with FreeBSD make. [skip appveyor] 2021-02-04 15:14:10 +00:00
Makefile.in Suppress sanitizer warnings for unsigned left shifts. 2026-09-02 14:31:25 +01:00
mkdep mkdep: Exit with a non-zero status if a command fails 2024-04-09 05:41:42 +00:00
nametoaddr.c Refine handling of struct eproto. 2026-01-24 09:43:29 +00:00
nametoaddr.h Separate DECnet and IPv4 code paths better. 2026-01-14 21:11:10 +00:00
no_sanitize.h Suppress sanitizer warnings for unsigned left shifts. 2026-09-02 14:31:25 +01:00
nomkdep Fix "make depend" in rpcapd if we can't generate dependencies. 2017-11-25 01:00:46 -08:00
optimize.c For "lsh" and "rsh" guard "#k" as well. 2026-09-05 10:03:46 +01:00
optimize.h Have separate flags for "optimizer debug" and "print DOT graph". 2018-05-03 01:39:39 -07:00
org.tcpdump.chmod_bpf.plist Use more HTTPS in URLs 2020-01-19 09:33:18 +01:00
pcap-bpf.c CVE-2026-31912: Mind the program bounds in pcap_offline_filter(). 2026-09-05 10:03:46 +01:00
pcap-bpf.h Delete trailing spaces/tabs 2015-03-08 21:39:43 +01:00
pcap-bt-linux.c Fold a few long lines for a cleaner patch. [skip ci] 2026-09-09 21:52:58 +01:00
pcap-bt-linux.h Have a pcap_if_list_t structure for use by the findalldevs code. 2017-01-18 13:36:27 -08:00
pcap-bt-monitor-linux.c Fold a few long lines for a cleaner patch. [skip ci] 2026-09-09 21:52:58 +01:00
pcap-bt-monitor-linux.h Have a pcap_if_list_t structure for use by the findalldevs code. 2017-01-18 13:36:27 -08:00
pcap-common.c Add DLT_/LINKTYPE_ values for DECT_NR_TAP 2026-07-26 10:23:50 +01:00
pcap-common.h rpcap: have the server tell the client its byte order. 2022-08-06 04:00:43 -07:00
pcap-config.1 pcap-config(1): Document --version a bit better. [skip ci] 2024-12-22 13:37:53 +00:00
pcap-config.in Document pcap-config better and test it. [skip ci] 2023-02-18 23:01:45 +00:00
pcap-dag.c DAG: Ignore vDAG Tx streams via sysfs too. [skip ci] 2026-09-10 18:13:28 +01:00
pcap-dag.h DAG: Fix a typo in pcap-dag.h. [skip ci] 2024-11-10 20:35:09 +00:00
pcap-dbus.c CVE-2026-31912: Mind the program bounds in pcap_offline_filter(). 2026-09-05 10:03:46 +01:00
pcap-dbus.h Have a pcap_if_list_t structure for use by the findalldevs code. 2017-01-18 13:36:27 -08:00
pcap-dll.rc Use correct strings for DLL VersionInfo 2021-10-27 15:55:26 -05:00
pcap-dlpi.c dlpi: fix an unused variable error 2026-04-27 09:45:29 -07:00
pcap-filter.manmisc.in Document various MidnightBSD peculiarities. [skip ci] 2026-09-08 12:15:00 +01:00
pcap-haiku.c CVE-2026-31912: Mind the program bounds in pcap_offline_filter(). 2026-09-05 10:03:46 +01:00
pcap-hurd.c CVE-2026-31912: Mind the program bounds in pcap_offline_filter(). 2026-09-05 10:03:46 +01:00
pcap-int.h Validate BPF opcodes stricter. 2026-09-05 10:03:46 +01:00
pcap-libdlpi.c dlpi: some restructuring. 2025-07-29 19:29:47 -07:00
pcap-linktype.manmisc.in Cross-reference some man pages better. [skip ci] 2024-10-01 12:23:59 +01:00
pcap-linux.c CVE-2026-31912: Mind the program bounds in pcap_offline_filter(). 2026-09-05 10:03:46 +01:00
pcap-namedb.h remove libpcap's own CVS keywords 2014-01-03 16:05:37 +04:00
pcap-netfilter-linux.c CVE-2026-31912: Mind the program bounds in pcap_offline_filter(). 2026-09-05 10:03:46 +01:00
pcap-netfilter-linux.h Have a pcap_if_list_t structure for use by the findalldevs code. 2017-01-18 13:36:27 -08:00
pcap-netmap.c netmap: Document DragonFly BSD in a comment. 2026-09-08 19:59:01 +01:00
pcap-netmap.h Add netmap support. 2017-05-31 12:45:20 -07:00
pcap-new.c Validate remote capture source strings better. 2025-12-18 15:42:31 +00:00
pcap-npf.c NPF: put in a comment saying what ps_recv and ps_drop do. 2026-09-10 13:19:27 -07:00
pcap-null.c Include <config.h> unconditionally 2024-03-27 22:27:49 +00:00
pcap-options.c free(3) argument needs no type cast. 2026-09-02 13:02:27 +01:00
pcap-rdmasniff.c CVE-2026-31912: Mind the program bounds in pcap_offline_filter(). 2026-09-05 10:03:46 +01:00
pcap-rdmasniff.h RDMA sniffing support for pcap 2017-08-25 10:47:31 -07:00
pcap-rpcap.c CVE-2026-18238: Fix RPCAP_MSG_PACKET validation. 2026-09-05 10:03:46 +01:00
pcap-rpcap.h More constification of arguments. 2018-12-25 00:46:46 -08:00
pcap-savefile.manfile.in pcap-savefile(5): Capitalize "GMT" properly. [skip ci] 2026-01-08 14:12:20 +00:00
pcap-snf.c CVE-2026-31912: Mind the program bounds in pcap_offline_filter(). 2026-09-05 10:03:46 +01:00
pcap-snf.h SNF: Fill pcap_if_t in more consistently. 2024-11-30 17:14:43 +00:00
pcap-tstamp.manmisc.in pcap-tstamp(7): Before pcap_activate(), not after. 2024-10-01 08:20:09 +01:00
pcap-types.h Get rid of extra blank line. 2018-08-04 02:59:54 -07:00
pcap-usb-linux-common.h usb-linux: reorganize the isochronous length handling code. 2024-03-18 14:24:58 -07:00
pcap-usb-linux.c CVE-2026-31912: Mind the program bounds in pcap_offline_filter(). 2026-09-05 10:03:46 +01:00
pcap-usb-linux.h Have a pcap_if_list_t structure for use by the findalldevs code. 2017-01-18 13:36:27 -08:00
pcap-util.c Rename SWAPSHORT(), SWAPLONG(), SWAPLL() to PCAP_BSWAP_({16,32,64}) 2026-08-15 05:00:50 +00:00
pcap-util.h In PCAP_BSWAP_ use compiler builtins if available. 2026-08-20 12:44:41 +01:00
pcap.3pcap.in Speak of null pointers, not NULL, in man pages. 2026-09-08 11:39:52 -07:00
pcap.c Document a caveat re .bf_insns == NULL. [skip ci] 2026-09-11 13:19:55 +01:00
pcap.h remove libpcap's own CVS keywords 2014-01-03 16:05:37 +04:00
pcap_activate.3pcap Bump the date up in pcap_activate(3PCAP). [skip ci] 2024-06-04 09:27:44 +01:00
pcap_breakloop.3pcap Finish the pruning of unsupported OSes. 2024-02-01 15:47:50 +00:00
pcap_can_set_rfmon.3pcap man: Format more special constants bold. [skip ci] 2020-08-21 19:54:55 +01:00
pcap_close.3pcap Add missing spaces to several man pages. [skip ci] 2026-08-05 10:52:19 +01:00
pcap_compile.3pcap.in pcap_compile(3PCAP): Clarify null pointers and empty strings. 2026-09-11 13:09:27 +01:00
pcap_create.3pcap Speak of null pointers, not NULL, in man pages. 2026-09-08 11:39:52 -07:00
pcap_datalink.3pcap.in Cross-reference some man pages better. [skip ci] 2024-10-01 12:23:59 +01:00
pcap_datalink_name_to_val.3pcap Cross-reference some man pages better. [skip ci] 2024-10-01 12:23:59 +01:00
pcap_datalink_val_to_name.3pcap Speak of null pointers, not NULL, in man pages. 2026-09-08 11:39:52 -07:00
pcap_dump.3pcap man: Indent multiline prototypes consistently. [skip ci] 2023-03-11 12:34:09 +00:00
pcap_dump_close.3pcap Add missing spaces to several man pages. [skip ci] 2026-08-05 10:52:19 +01:00
pcap_dump_file.3pcap Style cleanup. 2019-11-23 20:56:35 -08:00
pcap_dump_flush.3pcap Fix punctuation in a few more man pages. [skip ci] 2024-09-26 10:35:48 +01:00
pcap_dump_ftell.3pcap Add missing spaces to several man pages. [skip ci] 2026-08-05 10:52:19 +01:00
pcap_dump_open.3pcap.in Speak of null pointers, not NULL, in man pages. 2026-09-08 11:39:52 -07:00
pcap_file.3pcap Speak of null pointers, not NULL, in man pages. 2026-09-08 11:39:52 -07:00
pcap_fileno.3pcap Style cleanup. 2019-11-23 20:56:35 -08:00
pcap_findalldevs.3pcap Speak of null pointers, not NULL, in man pages. 2026-09-08 11:39:52 -07:00
pcap_freecode.3pcap Refine formatting and wording in a few man pages. [skip ci] 2026-03-14 13:13:09 +00:00
pcap_get_required_select_timeout.3pcap Speak of null pointers, not NULL, in man pages. 2026-09-08 11:39:52 -07:00
pcap_get_selectable_fd.3pcap Speak of null pointers, not NULL, in man pages. 2026-09-08 11:39:52 -07:00
pcap_get_tstamp_precision.3pcap.in man: Prevent hyphenation in a few more cases. [skip ci] 2022-02-13 10:42:40 +00:00
pcap_geterr.3pcap Cross-reference pcap_geterr(3PCAP) and pcap_strerror(3PCAP). 2024-10-07 22:50:19 +01:00
pcap_init.3pcap pcap_init: it was introduced in 1.10, not 1.9. [skip ci] 2025-12-30 22:32:40 -08:00
pcap_inject.3pcap pcap_inject(3PCAP): Add a couple more references. [skip ci] 2024-11-23 15:35:47 +00:00
pcap_is_swapped.3pcap man: Format more special constants bold. [skip ci] 2020-08-21 19:54:55 +01:00
pcap_lib_version.3pcap pcap_lib_version(3PCAP): Refine the format, update an example. 2025-10-23 21:44:40 +01:00
pcap_list_datalinks.3pcap.in Cross-reference some man pages better. [skip ci] 2024-10-01 12:23:59 +01:00
pcap_list_tstamp_types.3pcap.in Cross-reference some man pages better. [skip ci] 2024-10-01 12:23:59 +01:00
pcap_lookupdev.3pcap Speak of null pointers, not NULL, in man pages. 2026-09-08 11:39:52 -07:00
pcap_lookupnet.3pcap Add missing spaces to several man pages. [skip ci] 2026-08-05 10:52:19 +01:00
pcap_loop.3pcap Add missing spaces to several man pages. [skip ci] 2026-08-05 10:52:19 +01:00
pcap_major_version.3pcap Style cleanup. 2019-11-23 20:56:35 -08:00
pcap_next_ex.3pcap Speak of null pointers, not NULL, in man pages. 2026-09-08 11:39:52 -07:00
pcap_offline_filter.3pcap Speak of null pointers, not NULL, in man pages. 2026-09-08 11:39:52 -07:00
pcap_open_dead.3pcap.in Add BACKWARD COMPATIBILITY for more post-1.0 APIs. 2020-12-21 03:12:47 -08:00
pcap_open_live.3pcap Speak of null pointers, not NULL, in man pages. 2026-09-08 11:39:52 -07:00
pcap_open_offline.3pcap.in Speak of null pointers, not NULL, in man pages. 2026-09-08 11:39:52 -07:00
pcap_set_buffer_size.3pcap man: Format more special constants bold. [skip ci] 2020-08-21 19:54:55 +01:00
pcap_set_datalink.3pcap Add missing spaces to several man pages. [skip ci] 2026-08-05 10:52:19 +01:00
pcap_set_immediate_mode.3pcap.in Finish the pruning of unsupported OSes. 2024-02-01 15:47:50 +00:00
pcap_set_promisc.3pcap man: Format more special constants bold. [skip ci] 2020-08-21 19:54:55 +01:00
pcap_set_protocol_linux.3pcap man: Format more special constants bold. [skip ci] 2020-08-21 19:54:55 +01:00
pcap_set_rfmon.3pcap man: Format more special constants bold. [skip ci] 2020-08-21 19:54:55 +01:00
pcap_set_snaplen.3pcap man: Format more special constants bold. [skip ci] 2020-08-21 19:54:55 +01:00
pcap_set_timeout.3pcap man: Format more special constants bold. [skip ci] 2020-08-21 19:54:55 +01:00
pcap_set_tstamp_precision.3pcap.in Add missing spaces to several man pages. [skip ci] 2026-08-05 10:52:19 +01:00
pcap_set_tstamp_type.3pcap.in Cross-reference some man pages better. [skip ci] 2024-10-01 12:23:59 +01:00
pcap_setdirection.3pcap Add missing spaces to several man pages. [skip ci] 2026-08-05 10:52:19 +01:00
pcap_setfilter.3pcap pcap_setfilter(3PCAP): Clarify a null pointer. [skip ci] 2026-09-11 15:10:30 +01:00
pcap_setnonblock.3pcap Speak of null pointers, not NULL, in man pages. 2026-09-08 11:39:52 -07:00
pcap_snapshot.3pcap Style cleanup. 2019-11-23 20:56:35 -08:00
pcap_stats.3pcap Add missing spaces to several man pages. [skip ci] 2026-08-05 10:52:19 +01:00
pcap_statustostr.3pcap Speak of null pointers, not NULL, in man pages. 2026-09-08 11:39:52 -07:00
pcap_strerror.3pcap Cross-reference pcap_geterr(3PCAP) and pcap_strerror(3PCAP). 2024-10-07 22:50:19 +01:00
pcap_tstamp_type_name_to_val.3pcap Cross-reference some man pages better. [skip ci] 2024-10-01 12:23:59 +01:00
pcap_tstamp_type_val_to_name.3pcap Speak of null pointers, not NULL, in man pages. 2026-09-08 11:39:52 -07:00
pflog.h Remove some apparently-unneeded includes. 2024-11-13 17:42:22 -08:00
portability.h portability.h: improve a comment. 2026-03-16 18:17:50 -07:00
ppp.h Fix spelling 2023-06-25 17:15:12 +00:00
README.md README.md: Refine the OS-specific notes about BPF. 2026-01-19 18:20:39 +00:00
rpcap-protocol.c Include <config.h> unconditionally 2024-03-27 22:27:49 +00:00
rpcap-protocol.h Improve a few comments. [skip ci] 2026-05-19 13:48:35 +01:00
savefile.c CVE-2026-31912: Mind the program bounds in pcap_offline_filter(). 2026-09-05 10:03:46 +01:00
scanner.l scanner: Do not try including grammar.h twice. 2026-03-06 15:55:38 +00:00
sf-pcap.c Rename SWAPSHORT(), SWAPLONG(), SWAPLL() to PCAP_BSWAP_({16,32,64}) 2026-08-15 05:00:50 +00:00
sf-pcap.h Read the magic number into a byte array. 2019-06-12 11:32:21 -07:00
sf-pcapng.c Rename SWAPSHORT(), SWAPLONG(), SWAPLL() to PCAP_BSWAP_({16,32,64}) 2026-08-15 05:00:50 +00:00
sf-pcapng.h Read the magic number into a byte array. 2019-06-12 11:32:21 -07:00
sockutils.c rpcapd: Fixup a few comments. 2025-10-18 15:51:19 +01:00
sockutils.h Don't define SOCKET ourselves. 2024-01-19 19:31:22 -08:00
sslutils.c Include <config.h> unconditionally 2024-03-27 22:27:49 +00:00
sslutils.h Squelch Clang warnings about OpenSSL. 2024-03-03 21:19:21 +00:00
thread-local.h Check for HP's C compiler rather than for HP-UX. 2024-09-21 15:21:06 -07:00
varattrs.h Use compiler tests to determine how to define _U_. 2017-11-15 14:21:44 -08:00
VERSION updated VERSION on master branch 2020-12-29 16:40:42 -05:00

LIBPCAP 1.x.y by The Tcpdump Group

To report a security issue please send an e-mail to security@tcpdump.org.

To report bugs and other problems, contribute patches, request a feature, provide generic feedback etc please see the guidelines for contributing.

The documentation directory has README files about specific operating systems and options.

Anonymous Git is available via:

https://github.com/the-tcpdump-group/libpcap.git

This directory contains source code for libpcap, a system-independent interface for user-level packet capture. libpcap provides a portable framework for low-level network monitoring. Applications include network statistics collection, security monitoring, network debugging, etc. Since almost every system vendor provides a different interface for packet capture, and since we've developed several tools that require this functionality, we've created this system-independent API to ease in porting and to alleviate the need for several system-dependent packet capture modules in each application.

formerly from	Lawrence Berkeley National Laboratory
		Network Research Group <libpcap@ee.lbl.gov>
		ftp://ftp.ee.lbl.gov/old/libpcap-0.4a7.tar.Z

Support for particular platforms and BPF

For some platforms there are README.{system} files that discuss issues with the OS's interface for packet capture on those platforms, such as how to enable support for that interface in the OS, if it's not built in by default.

The libpcap interface supports a filtering mechanism based on the architecture in the BSD packet filter. BPF is described in the 1993 Winter Usenix paper ``The BSD Packet Filter: A New Architecture for User-level Packet Capture'' (compressed PostScript, gzipped PostScript, PDF).

Although most packet capture interfaces support some in-kernel filtering, libpcap utilizes in-kernel filtering only for the use cases that support BPF programs, namely, the BPF packet capture interface, the Linux packet socket and the GNU/Hurd interface.

In all other cases libpcap reads every packet into user-space and evaluates it using the filter program, which incurs added overhead (especially, for selective filters). Ideally, libpcap would translate BPF filters into a filter program that is compatible with the underlying kernel subsystem, but this is not implemented.

BPF is standard in NetBSD, FreeBSD, OpenBSD, DragonFly BSD, macOS, QNX and Solaris 11; an older, modified and undocumented version is standard in AIX.

Linux has a number of BPF based systems, and libpcap does not support any of the eBPF mechanisms as yet, although it supports many of the memory mapped receive mechanisms. See the Linux-specific README for more information.

Note to Linux distributions and *BSD systems that include libpcap:

There's now a rule to make a shared library, which should work on Linux and *BSD, among other platforms.

It sets the soname of the library to libpcap.so.1; this is what it should be, NOT libpcap.so.1.x or libpcap.so.1.x.y or something such as that.

We've been maintaining binary compatibility between libpcap releases for quite a while; there's no reason to tie a binary linked with libpcap to a particular release of libpcap.