Name Date Size #Lines LOC

..--

ChmodBPF/H--3916

cmake/H--642576

doc/H--1,040753

lbl/H--404209

missing/H--496256

msdos/H--2,5981,917

pcap/H--4,6961,252

rpcapd/H--6,6554,098

testprogs/H--4,6063,366

tests/H--

CHANGESH A D14-Sep-202470.6 KiB1,5961,433

CMakeLists.txtH A D14-Sep-2024129.1 KiB3,6133,397

CONTRIBUTING.mdH A D31-Mar-20231.4 KiB3024

CREDITSH A D14-Sep-202417.8 KiB281276

INSTALL.mdH A D14-Sep-202416.3 KiB350304

LICENSEH A D17-Feb-2017868 2016

Makefile-devel-addsH A D31-Mar-2023618 2318

Makefile.inH A D14-Sep-202428.9 KiB934717

README.mdH A D05-May-20233.4 KiB7760

TODOH A D14-Sep-20241.2 KiB2923

VERSIONH A D14-Sep-20247 21

aclocal.m4H A D14-Sep-202441.3 KiB1,3471,275

arcnet.hH A D27-May-20152.4 KiB5110

atmuni31.hH A D14-Sep-20243.9 KiB8641

autogen.shH A D14-Sep-2024831 2619

bpf_dump.cH A D14-Sep-20241.9 KiB6135

bpf_filter.cH A D14-Sep-202412.1 KiB545353

bpf_image.cH A D14-Sep-20249.2 KiB425327

charconv.cH A D14-Sep-20246.4 KiB21881

charconv.hH A D31-Mar-20232.2 KiB458

chmod_bpfH A D28-May-2018757 202

cmake_uninstall.cmake.inH A D28-May-20181 KiB2220

cmakeconfig.h.inH A D14-Sep-202410.6 KiB361242

config.guessH A D14-Sep-202449.5 KiB1,8131,586

config.h.inH A D14-Sep-202410 KiB369247

config.subH A D14-Sep-202436 KiB1,9721,765

configureH A D14-Sep-2024427.6 KiB15,28210,523

configure.acH A D14-Sep-202490 KiB3,2352,995

diag-control.hH A D14-Sep-202414.3 KiB431216

dlpisubs.cH A D14-Sep-202410.2 KiB416252

dlpisubs.hH A D27-May-2015702 3926

etherent.cH A D14-Sep-20243.7 KiB173113

ethertype.hH A D31-Mar-20233.5 KiB12490

extract.hH A D14-Sep-202418.5 KiB424258

fad-getad.cH A D14-Sep-20249.2 KiB294125

fad-gifc.cH A D14-Sep-202412.9 KiB428213

fad-glifc.cH A D14-Sep-20249.4 KiB348198

fmtutils.cH A D14-Sep-202411.1 KiB442192

fmtutils.hH A D14-Sep-20242.6 KiB6422

ftmacros.hH A D14-Sep-20244.8 KiB12822

gencode.cH A D14-Sep-2024262.5 KiB10,2625,952

gencode.hH A D14-Sep-202412.7 KiB417235

grammar.y.inH A D14-Sep-202429.9 KiB950898

ieee80211.hH A D31-Mar-20235.3 KiB14793

install-shH A D14-Sep-202415 KiB542352

libpcap.pc.inH A D31-Mar-2023537 2018

llc.hH A D27-May-20152.6 KiB9964

mkdepH A D14-Sep-20242.9 KiB12463

nametoaddr.cH A D14-Sep-202419.4 KiB821485

nametoaddr.hH A D17-Feb-20172.1 KiB499

nlpid.hH A D14-Sep-20241.7 KiB5727

nomkdepH A D31-Mar-2023135 71

optimize.cH A D14-Sep-202475.2 KiB3,1141,745

optimize.hH A D28-May-20181.3 KiB294

org.tcpdump.chmod_bpf.plistH A D31-Mar-2023442 1716

pcap-airpcap.cH A D14-Sep-202428.9 KiB1,056604

pcap-airpcap.hH A D31-Mar-20231.8 KiB373

pcap-bpf.cH A D14-Sep-202492.8 KiB3,6942,015

pcap-bpf.hH A D17-Feb-20172.2 KiB461

pcap-bt-linux.cH A D14-Sep-202412.1 KiB454306

pcap-bt-linux.hH A D28-May-20181.8 KiB392

pcap-bt-monitor-linux.cH A D14-Sep-20248.1 KiB281178

pcap-bt-monitor-linux.hH A D28-May-20181.6 KiB332

pcap-common.cH A D14-Sep-202449.8 KiB1,578324

pcap-common.hH A D31-Mar-20231.3 KiB293

pcap-config.1H A D14-Sep-20243.4 KiB133101

pcap-config.inH A D14-Sep-20243.8 KiB166107

pcap-dag.cH A D14-Sep-202436.8 KiB1,442942

pcap-dag.hH A D28-May-2018457 132

pcap-dbus.cH A D14-Sep-202410 KiB350209

pcap-dbus.hH A D28-May-2018112 32

pcap-dll.rcH A D31-Mar-20231 KiB3735

pcap-dlpi.cH A D14-Sep-202448.6 KiB1,9381,179

pcap-dos.cH A D14-Sep-202436.4 KiB1,5511,078

pcap-dos.hH A D17-Feb-20176.7 KiB226171

pcap-dpdk.cH A D14-Sep-202431.6 KiB1,085764

pcap-dpdk.hH A D31-Mar-20231.4 KiB292

pcap-enet.cH A D14-Sep-20244.7 KiB230172

pcap-filter.manmisc.inH A D14-Sep-202436.9 KiB1,2071,185

pcap-haiku.cH A D14-Sep-202415.1 KiB505309

pcap-int.hH A D14-Sep-202419.2 KiB602258

pcap-libdlpi.cH A D14-Sep-202412.9 KiB516307

pcap-linktype.manmisc.inH A D31-Mar-20232.3 KiB4928

pcap-linux.cH A D14-Sep-2024159.5 KiB5,7362,708

pcap-namedb.hH A D27-May-20152 KiB411

pcap-netfilter-linux.cH A D14-Sep-202421.7 KiB795533

pcap-netfilter-linux.hH A D28-May-20181.7 KiB362

pcap-netmap.cH A D14-Sep-20247.8 KiB304187

pcap-netmap.hH A D28-May-2018126 32

pcap-new.cH A D14-Sep-202413.5 KiB503324

pcap-nit.cH A D14-Sep-202410.3 KiB418247

pcap-npf.cH A D14-Sep-202471.2 KiB2,7781,448

pcap-null.cH A D14-Sep-20241.9 KiB6429

pcap-pf.cH A D14-Sep-202418.6 KiB681377

pcap-rdmasniff.cH A D14-Sep-202411.5 KiB454339

pcap-rdmasniff.hH A D28-May-2018140 32

pcap-rpcap.cH A D14-Sep-2024107.1 KiB3,6322,036

pcap-rpcap.hH A D21-Dec-20192.2 KiB507

pcap-savefile.manfile.inH A D14-Sep-20247.2 KiB184164

pcap-septel.cH A D14-Sep-20248.1 KiB329158

pcap-septel.hH A D28-May-2018512 142

pcap-sita.cH A D14-Sep-202436 KiB1,081878

pcap-sita.hH A D27-May-2015224 92

pcap-sita.htmlH A D14-Sep-202437.3 KiB942901

pcap-snf.cH A D14-Sep-202414.8 KiB616409

pcap-snf.hH A D28-May-2018110 32

pcap-snit.cH A D14-Sep-202413 KiB512315

pcap-snoop.cH A D14-Sep-202413.3 KiB466277

pcap-tc.cH A D14-Sep-202432.7 KiB1,217877

pcap-tc.hH A D28-May-20181.9 KiB5511

pcap-tstamp.manmisc.inH A D14-Sep-20249.4 KiB203181

pcap-types.hH A D31-Mar-20231.9 KiB508

pcap-usb-linux-common.hH A D14-Sep-20244.2 KiB12845

pcap-usb-linux.cH A D14-Sep-202426.4 KiB962524

pcap-usb-linux.hH A D28-May-20181.8 KiB392

pcap-util.cH A D14-Sep-202418.9 KiB628306

pcap-util.hH A D14-Sep-20242.3 KiB5210

pcap.3pcap.inH A D14-Sep-202431.4 KiB1,0591,039

pcap.cH A D14-Sep-2024119.3 KiB4,5902,786

pcap.hH A D27-May-20152.2 KiB441

pcap_activate.3pcapH A D14-Sep-20244.1 KiB136116

pcap_breakloop.3pcapH A D14-Sep-20245.8 KiB149129

pcap_can_set_rfmon.3pcapH A D31-Mar-20232.7 KiB8161

pcap_close.3pcapH A D31-Mar-20231.5 KiB4020

pcap_compile.3pcap.inH A D14-Sep-20243 KiB9373

pcap_create.3pcapH A D14-Sep-20242.2 KiB7353

pcap_datalink.3pcap.inH A D31-Mar-20232.4 KiB7252

pcap_datalink_name_to_val.3pcapH A D31-Mar-20231.8 KiB5030

pcap_datalink_val_to_name.3pcapH A D31-Mar-20232.8 KiB7757

pcap_dump.3pcapH A D14-Sep-20241.7 KiB5030

pcap_dump_close.3pcapH A D31-Mar-20231.5 KiB4020

pcap_dump_file.3pcapH A D31-Mar-20231.5 KiB3919

pcap_dump_flush.3pcapH A D31-Mar-20231.7 KiB4929

pcap_dump_ftell.3pcapH A D31-Mar-20232.3 KiB6545

pcap_dump_open.3pcap.inH A D31-Mar-20233.6 KiB10989

pcap_file.3pcapH A D31-Mar-20232.1 KiB6040

pcap_fileno.3pcapH A D31-Mar-20232 KiB6646

pcap_findalldevs.3pcapH A D14-Sep-20246.8 KiB263243

pcap_freecode.3pcapH A D31-Mar-20231.7 KiB4424

pcap_get_required_select_timeout.3pcapH A D31-Mar-20234.9 KiB171151

pcap_get_selectable_fd.3pcapH A D31-Mar-20234.7 KiB153133

pcap_get_tstamp_precision.3pcap.inH A D31-Mar-20231.9 KiB5735

pcap_geterr.3pcapH A D31-Mar-20231.8 KiB5232

pcap_init.3pcapH A D14-Sep-20243.2 KiB10383

pcap_inject.3pcapH A D31-Mar-20233.6 KiB10383

pcap_is_swapped.3pcapH A D31-Mar-20231.9 KiB5232

pcap_lib_version.3pcapH A D31-Mar-20231.6 KiB4020

pcap_list_datalinks.3pcap.inH A D31-Mar-20232.6 KiB7454

pcap_list_tstamp_types.3pcap.inH A D31-Mar-20233 KiB8362

pcap_lookupdev.3pcapH A D14-Sep-20242.6 KiB8767

pcap_lookupnet.3pcapH A D14-Sep-20242.2 KiB7454

pcap_loop.3pcapH A D14-Sep-20246.9 KiB223203

pcap_major_version.3pcapH A D31-Mar-20232 KiB5535

pcap_next_ex.3pcapH A D14-Sep-20245 KiB153133

pcap_offline_filter.3pcapH A D14-Sep-20242 KiB5535

pcap_open_dead.3pcap.inH A D31-Mar-20232.9 KiB8666

pcap_open_live.3pcapH A D14-Sep-20243.1 KiB10181

pcap_open_offline.3pcap.inH A D14-Sep-20243.8 KiB11999

pcap_set_buffer_size.3pcapH A D31-Mar-20231.8 KiB5030

pcap_set_datalink.3pcapH A D31-Mar-20232 KiB5939

pcap_set_immediate_mode.3pcap.inH A D31-Mar-20233.3 KiB10079

pcap_set_promisc.3pcapH A D31-Mar-20231.8 KiB5131

pcap_set_protocol_linux.3pcapH A D31-Mar-20232.8 KiB7353

pcap_set_rfmon.3pcapH A D31-Mar-20231.8 KiB5232

pcap_set_snaplen.3pcapH A D31-Mar-20231.8 KiB4929

pcap_set_timeout.3pcapH A D31-Mar-20232.2 KiB5737

pcap_set_tstamp_precision.3pcap.inH A D14-Sep-20242.4 KiB7048

pcap_set_tstamp_type.3pcap.inH A D31-Mar-20232.8 KiB7352

pcap_setdirection.3pcapH A D31-Mar-20232.5 KiB7757

pcap_setfilter.3pcapH A D31-Mar-20231.9 KiB6040

pcap_setnonblock.3pcapH A D14-Sep-20243.3 KiB10989

pcap_snapshot.3pcapH A D31-Mar-20231.9 KiB5333

pcap_stats.3pcapH A D31-Mar-20233.5 KiB10686

pcap_statustostr.3pcapH A D31-Mar-20231.6 KiB4222

pcap_strerror.3pcapH A D14-Sep-20241.8 KiB4525

pcap_tstamp_type_name_to_val.3pcapH A D31-Mar-20231.9 KiB5029

pcap_tstamp_type_val_to_name.3pcapH A D31-Mar-20232 KiB5433

pflog.hH A D31-Mar-20234.1 KiB158104

portability.hH A D14-Sep-20245.3 KiB16784

ppp.hH A D14-Sep-20242.6 KiB5835

rpcap-protocol.cH A D14-Sep-20246.8 KiB19684

rpcap-protocol.hH A D14-Sep-202419.4 KiB452194

savefile.cH A D14-Sep-202417.5 KiB698411

scanner.lH A D14-Sep-202418.9 KiB691433

sf-pcap.cH A D14-Sep-202434.6 KiB1,273669

sf-pcap.hH A D21-Dec-20191.7 KiB385

sf-pcapng.cH A D14-Sep-202439.6 KiB1,517753

sf-pcapng.hH A D21-Dec-20191.4 KiB335

sockutils.cH A D14-Sep-202462.6 KiB2,1181,000

sockutils.hH A D14-Sep-20245.8 KiB17862

sslutils.cH A D14-Sep-20246.4 KiB238160

sslutils.hH A D14-Sep-20242.7 KiB7322

sunatmpos.hH A D27-May-20152.1 KiB448

thread-local.hH A D14-Sep-20243 KiB7323

varattrs.hH A D28-May-20182.4 KiB6010

README.md

1# LIBPCAP 1.x.y by [The Tcpdump Group](https://www.tcpdump.org)
2
3**To report a security issue please send an e-mail to security@tcpdump.org.**
4
5To report bugs and other problems, contribute patches, request a
6feature, provide generic feedback etc please see the
7[guidelines for contributing](CONTRIBUTING.md).
8
9The [documentation directory](doc/) has README files about specific
10operating systems and options.
11
12Anonymous Git is available via:
13
14  https://github.com/the-tcpdump-group/libpcap.git
15
16This directory contains source code for libpcap, a system-independent
17interface for user-level packet capture.  libpcap provides a portable
18framework for low-level network monitoring.  Applications include
19network statistics collection, security monitoring, network debugging,
20etc.  Since almost every system vendor provides a different interface
21for packet capture, and since we've developed several tools that
22require this functionality, we've created this system-independent API
23to ease in porting and to alleviate the need for several
24system-dependent packet capture modules in each application.
25
26```text
27formerly from	Lawrence Berkeley National Laboratory
28		Network Research Group <libpcap@ee.lbl.gov>
29		ftp://ftp.ee.lbl.gov/old/libpcap-0.4a7.tar.Z
30```
31
32### Support for particular platforms and BPF
33For some platforms there are `README.{system}` files that discuss issues
34with the OS's interface for packet capture on those platforms, such as
35how to enable support for that interface in the OS, if it's not built in
36by default.
37
38The libpcap interface supports a filtering mechanism based on the
39architecture in the BSD packet filter.  BPF is described in the 1993
40Winter Usenix paper ``The BSD Packet Filter: A New Architecture for
41User-level Packet Capture''
42([compressed PostScript](https://www.tcpdump.org/papers/bpf-usenix93.ps.Z),
43[gzipped PostScript](https://www.tcpdump.org/papers/bpf-usenix93.ps.gz),
44[PDF](https://www.tcpdump.org/papers/bpf-usenix93.pdf)).
45
46Although most packet capture interfaces support in-kernel filtering,
47libpcap utilizes in-kernel filtering only for the BPF interface.
48On systems that don't have BPF, all packets are read into user-space
49and the BPF filters are evaluated in the libpcap library, incurring
50added overhead (especially, for selective filters).  Ideally, libpcap
51would translate BPF filters into a filter program that is compatible
52with the underlying kernel subsystem, but this is not yet implemented.
53
54BPF is standard in 4.4BSD, BSD/OS, NetBSD, FreeBSD, OpenBSD, DragonFly
55BSD, macOS, and Solaris 11; an older, modified and undocumented version
56is standard in AIX.  {DEC OSF/1, Digital UNIX, Tru64 UNIX} uses the
57packetfilter interface but has been extended to accept BPF filters
58(which libpcap utilizes).
59
60Linux has a number of BPF based systems, and libpcap does not support
61any of the eBPF mechanisms as yet, although it supports many of the
62memory mapped receive mechanisms.
63See the [Linux-specific README](doc/README.linux) for more information.
64
65### Note to Linux distributions and *BSD systems that include libpcap:
66
67There's now a rule to make a shared library, which should work on Linux
68and *BSD, among other platforms.
69
70It sets the soname of the library to `libpcap.so.1`; this is what it
71should be, **NOT** `libpcap.so.1.x` or `libpcap.so.1.x.y` or something such as
72that.
73
74We've been maintaining binary compatibility between libpcap releases for
75quite a while; there's no reason to tie a binary linked with libpcap to
76a particular release of libpcap.
77