105.5. libpcap-1.11.0
A system-independent interface for user-level packet capture
1.11.0-1 · BSD-3-Clause · 0.2 SBU · 1.3 MiB, 105 files · 41_system, 117 of 1047 · ports/core/net-libs/libpcap
Homepage: https://www.tcpdump.org/
libpcap is the packet capture library: it opens a network interface, applies a BPF filter in the kernel and hands captured packets to the program, and reads and writes the pcap file format. tcpdump, wireshark, nmap, iftop and aircrack-ng are among the ports built on it. Besides network interfaces this build captures from USB buses, Bluetooth adapters and the D-Bus message buses.
Depends on: flex, bison, libnl, dbus, bluez.
Required by (16): aircrack-ng, amiberry, bpftrace, dosbox-x, iftop, john, ldns, libvirt, net-snmp, nmap, opus-tools, ppp, sniffnet, tcpdump, wine, wireshark.
Sources: libpcap-1.11.0.tar.xz (719.3 KiB). Every step kpkg takes applies to this port.
Install: script/chroot/exec.sh bash -c 'source script/phases/41_system/phase.env && kpkg install libpcap'
build.sh:
./configure --prefix=/usr \
--with-libnl \
--enable-dbus \
--enable-usb \
--enable-bluetooth \
--disable-netmap \
--disable-rdma \
--without-dag \
--without-snf
make
make DESTDIR=$PKG install
--with-libnl— Link libnl’s generic netlink library, which libpcap uses to create a monitor-mode interface on a mac80211 wireless device (tcpdump -I). The default takes libnl only if present; naming it makes configure stop when libnl is missing.--enable-dbus— Add capture from a D-Bus bus (dbus-system,dbus-session). As an explicityesit stops configure whendbus-1is missing, instead of building without it.--enable-usb— Add capture from the kernel’susbmoninterfaces (usbmon0,usbmon1…).--enable-bluetooth— Add capture from Bluetooth HCI adapters and the HCI monitor channel, through bluez’s headers.--disable-netmap— Build no netmap capture module. netmap is a kernel framework kept outside Linux’s own tree, and no port here builds it or its headers.--disable-rdma— Build no RDMA (InfiniBand) capture module, which needslibibverbs; the tree has no rdma-core port.--without-dag— Build without Endace DAG capture-card support, and--without-snfwithout Myricom SNF; both need the vendors’ own libraries, which the tree does not carry.
Programs: pcap-config.
Libraries: libpcap.a, libpcap.so.
Directories: /usr/include/pcap, /usr/share/licenses/libpcap.