Name Date Size #Lines LOC

..15-Mar-2024-

ChmodBPF/H08-May-2022-3916

cmake/H08-May-2022-642576

doc/H19-Apr-2023-982706

lbl/H19-Apr-2023-404209

missing/H19-Apr-2023-502262

msdos/H06-May-2023-2,5981,917

pcap/H06-May-2023-4,5251,217

rpcapd/H06-May-2023-6,6744,115

testprogs/H06-May-2023-4,6143,374

tests/H19-Apr-2023-

CHANGESH A D06-May-202362.4 KiB1,4311,269

CMakeLists.txtH A D19-Apr-2023120.6 KiB3,3903,175

CONTRIBUTING.mdH A D19-Apr-20231.4 KiB3024

CREDITSH A D19-Apr-202316.6 KiB264259

INSTALL.mdH A D19-Apr-202312.8 KiB278235

LICENSEH A D08-May-2022868 2016

Makefile-devel-addsH A D19-Apr-2023618 2318

Makefile.inH A D06-May-202325.8 KiB844649

README.mdH A D06-May-20233.4 KiB7760

TODOH A D19-Apr-20231.4 KiB3427

VERSIONH A D06-May-20237 21

aclocal.m4H A D06-May-202340.2 KiB1,3281,253

arcnet.hH A D08-May-20222.4 KiB5110

atmuni31.hH A D19-Apr-20233.9 KiB8641

bpf_dump.cH A D08-May-20221.9 KiB6337

bpf_filter.cH A D19-Apr-202312.1 KiB547355

bpf_image.cH A D19-Apr-20239.2 KiB425328

charconv.cH A D19-Apr-20236.3 KiB21881

charconv.hH A D19-Apr-20232.2 KiB458

chmod_bpfH A D08-May-2022757 202

cmake_uninstall.cmake.inH A D08-May-20221 KiB2220

cmakeconfig.h.inH A D19-Apr-202310.6 KiB361242

config.guessH A D06-May-202348.8 KiB1,7751,548

config.h.inH A D19-Apr-20239.9 KiB369247

config.subH A D06-May-202335 KiB1,9081,720

configureH A D06-May-2023419.2 KiB15,24710,723

configure.acH A D06-May-202389.1 KiB3,2162,977

diag-control.hH A D19-Apr-202311.8 KiB339145

dlpisubs.cH A D19-Apr-202310.2 KiB418251

dlpisubs.hH A D08-May-2022702 3926

etherent.cH A D19-Apr-20233.7 KiB173114

ethertype.hH A D19-Apr-20233.5 KiB12490

extract.hH A D19-Apr-202318.5 KiB424258

fad-getad.cH A D19-Apr-20238.6 KiB280123

fad-gifc.cH A D19-Apr-202312.7 KiB426215

fad-glifc.cH A D19-Apr-20239.3 KiB346200

fmtutils.cH A D19-Apr-202312.1 KiB477207

fmtutils.hH A D19-Apr-20232.5 KiB6422

ftmacros.hH A D19-Apr-20234.8 KiB12822

gencode.cH A D06-May-2023256.7 KiB9,9945,809

gencode.hH A D19-Apr-202312.7 KiB417235

grammar.y.inH A D19-Apr-202326.6 KiB872820

ieee80211.hH A D19-Apr-20235.3 KiB14793

install-shH A D08-May-20225.4 KiB251152

libpcap.pc.inH A D19-Apr-2023537 2018

llc.hH A D08-May-20222.6 KiB9964

mkdepH A D06-May-20232.8 KiB12263

nametoaddr.cH A D06-May-202319.5 KiB826493

nametoaddr.hH A D08-May-20222.1 KiB499

nlpid.hH A D08-May-20221.7 KiB5727

nomkdepH A D19-Apr-2023135 71

optimize.cH A D06-May-202374.7 KiB3,1001,744

optimize.hH A D08-May-20221.3 KiB294

org.tcpdump.chmod_bpf.plistH A D19-Apr-2023442 1716

pcap-airpcap.cH A D19-Apr-202328.8 KiB1,055603

pcap-airpcap.hH A D19-Apr-20231.8 KiB373

pcap-bpf.cH A D19-Apr-202390.3 KiB3,6151,995

pcap-bpf.hH A D08-May-20222.2 KiB461

pcap-bt-linux.cH A D06-May-202311.9 KiB452305

pcap-bt-linux.hH A D08-May-20221.8 KiB392

pcap-bt-monitor-linux.cH A D19-Apr-20238 KiB279177

pcap-bt-monitor-linux.hH A D08-May-20221.6 KiB332

pcap-common.cH A D06-May-202342.8 KiB1,401292

pcap-common.hH A D19-Apr-20231.3 KiB293

pcap-config.1H A D19-Apr-20232.3 KiB7352

pcap-config.inH A D19-Apr-20233.8 KiB159101

pcap-dag.cH A D19-Apr-202337 KiB1,457956

pcap-dag.hH A D08-May-2022457 132

pcap-dbus.cH A D19-Apr-202310 KiB352211

pcap-dbus.hH A D08-May-2022112 32

pcap-dll.rcH A D19-Apr-20231 KiB3735

pcap-dlpi.cH A D19-Apr-202348.5 KiB1,9401,181

pcap-dos.cH A D19-Apr-202336.4 KiB1,5511,078

pcap-dos.hH A D08-May-20226.7 KiB226171

pcap-dpdk.cH A D19-Apr-202331.6 KiB1,087766

pcap-dpdk.hH A D19-Apr-20231.4 KiB292

pcap-enet.cH A D19-Apr-20234.7 KiB232174

pcap-filter.manmisc.inH A D19-Apr-202336.8 KiB1,2021,180

pcap-haiku.cppH A D19-Apr-20236.9 KiB306198

pcap-int.hH A D19-Apr-202321.1 KiB667273

pcap-libdlpi.cH A D06-May-202312.9 KiB518309

pcap-linktype.manmisc.inH A D19-Apr-20232.3 KiB4928

pcap-linux.cH A D06-May-2023155.1 KiB5,5882,682

pcap-namedb.hH A D08-May-20222 KiB411

pcap-netfilter-linux.cH A D06-May-202321.5 KiB794531

pcap-netfilter-linux.hH A D08-May-20221.7 KiB362

pcap-netmap.cH A D19-Apr-20237.8 KiB306189

pcap-netmap.hH A D08-May-2022126 32

pcap-new.cH A D19-Apr-202313.3 KiB496317

pcap-nit.cH A D19-Apr-202310.3 KiB420246

pcap-npf.cH A D06-May-202369.5 KiB2,7501,439

pcap-null.cH A D08-May-20221.9 KiB6631

pcap-pf.cH A D19-Apr-202318.5 KiB682375

pcap-rdmasniff.cH A D19-Apr-202311.5 KiB456341

pcap-rdmasniff.hH A D08-May-2022140 32

pcap-rpcap-int.hH A D08-May-20223.4 KiB768

pcap-rpcap.cH A D19-Apr-2023106.8 KiB3,6292,035

pcap-rpcap.hH A D08-May-20222.2 KiB507

pcap-savefile.manfile.inH A D19-Apr-20235.2 KiB138118

pcap-septel.cH A D19-Apr-20238.1 KiB331160

pcap-septel.hH A D08-May-2022512 142

pcap-sita.cH A D06-May-202336 KiB1,083880

pcap-sita.hH A D08-May-2022224 92

pcap-sita.htmlH A D06-May-202337.4 KiB944903

pcap-snf.cH A D06-May-202314.8 KiB618411

pcap-snf.hH A D08-May-2022110 32

pcap-snit.cH A D19-Apr-202312.9 KiB513313

pcap-snoop.cH A D19-Apr-202313.2 KiB468276

pcap-tc.cH A D19-Apr-202332.6 KiB1,219876

pcap-tc.hH A D08-May-20221.9 KiB5511

pcap-tstamp.manmisc.inH A D19-Apr-20239.4 KiB202180

pcap-types.hH A D19-Apr-20231.9 KiB508

pcap-usb-linux-common.cH A D19-Apr-20234.8 KiB13139

pcap-usb-linux-common.hH A D19-Apr-20231.3 KiB272

pcap-usb-linux.cH A D06-May-202325.7 KiB945523

pcap-usb-linux.hH A D08-May-20221.8 KiB392

pcap-util.cH A D19-Apr-202313.6 KiB475268

pcap-util.hH A D19-Apr-20232.4 KiB5612

pcap.3pcap.inH A D19-Apr-202331.4 KiB1,0591,039

pcap.cH A D19-Apr-2023115 KiB4,4712,750

pcap.hH A D08-May-20222.2 KiB441

pcap_activate.3pcapH A D19-Apr-20233.9 KiB132112

pcap_breakloop.3pcapH A D19-Apr-20235.8 KiB149129

pcap_can_set_rfmon.3pcapH A D19-Apr-20232.7 KiB8161

pcap_close.3pcapH A D19-Apr-20231.5 KiB4020

pcap_compile.3pcap.inH A D19-Apr-20233 KiB9474

pcap_create.3pcapH A D19-Apr-20232.2 KiB7353

pcap_datalink.3pcap.inH A D19-Apr-20232.4 KiB7252

pcap_datalink_name_to_val.3pcapH A D19-Apr-20231.8 KiB5030

pcap_datalink_val_to_name.3pcapH A D19-Apr-20232.8 KiB7757

pcap_dump.3pcapH A D19-Apr-20231.7 KiB5131

pcap_dump_close.3pcapH A D19-Apr-20231.5 KiB4020

pcap_dump_file.3pcapH A D19-Apr-20231.5 KiB3919

pcap_dump_flush.3pcapH A D19-Apr-20231.7 KiB4929

pcap_dump_ftell.3pcapH A D19-Apr-20232.3 KiB6545

pcap_dump_open.3pcap.inH A D19-Apr-20233.6 KiB10989

pcap_file.3pcapH A D19-Apr-20232.1 KiB6040

pcap_fileno.3pcapH A D19-Apr-20232 KiB6646

pcap_findalldevs.3pcapH A D19-Apr-20236.3 KiB236216

pcap_freecode.3pcapH A D19-Apr-20231.7 KiB4424

pcap_get_required_select_timeout.3pcapH A D19-Apr-20234.9 KiB171151

pcap_get_selectable_fd.3pcapH A D19-Apr-20234.7 KiB153133

pcap_get_tstamp_precision.3pcap.inH A D19-Apr-20231.9 KiB5735

pcap_geterr.3pcapH A D19-Apr-20231.8 KiB5232

pcap_init.3pcapH A D19-Apr-20233.2 KiB10080

pcap_inject.3pcapH A D19-Apr-20233.6 KiB10383

pcap_is_swapped.3pcapH A D19-Apr-20231.9 KiB5232

pcap_lib_version.3pcapH A D19-Apr-20231.6 KiB4020

pcap_list_datalinks.3pcap.inH A D19-Apr-20232.6 KiB7454

pcap_list_tstamp_types.3pcap.inH A D19-Apr-20233 KiB8362

pcap_lookupdev.3pcapH A D19-Apr-20232.6 KiB8767

pcap_lookupnet.3pcapH A D19-Apr-20232 KiB6949

pcap_loop.3pcapH A D19-Apr-20236.9 KiB229209

pcap_major_version.3pcapH A D19-Apr-20232 KiB5535

pcap_next_ex.3pcapH A D19-Apr-20235 KiB154134

pcap_offline_filter.3pcapH A D19-Apr-20232 KiB5636

pcap_open_dead.3pcap.inH A D19-Apr-20232.9 KiB8666

pcap_open_live.3pcapH A D19-Apr-20232.8 KiB9575

pcap_open_offline.3pcap.inH A D19-Apr-20233.8 KiB11898

pcap_set_buffer_size.3pcapH A D19-Apr-20231.8 KiB5030

pcap_set_datalink.3pcapH A D19-Apr-20232 KiB5939

pcap_set_immediate_mode.3pcap.inH A D19-Apr-20233.3 KiB10079

pcap_set_promisc.3pcapH A D19-Apr-20231.8 KiB5131

pcap_set_protocol_linux.3pcapH A D19-Apr-20232.8 KiB7353

pcap_set_rfmon.3pcapH A D19-Apr-20231.8 KiB5232

pcap_set_snaplen.3pcapH A D19-Apr-20231.8 KiB4929

pcap_set_timeout.3pcapH A D19-Apr-20232.2 KiB5737

pcap_set_tstamp_precision.3pcap.inH A D19-Apr-20232.4 KiB6947

pcap_set_tstamp_type.3pcap.inH A D19-Apr-20232.8 KiB7352

pcap_setdirection.3pcapH A D19-Apr-20232.5 KiB7757

pcap_setfilter.3pcapH A D19-Apr-20231.9 KiB6040

pcap_setnonblock.3pcapH A D19-Apr-20233.2 KiB10787

pcap_snapshot.3pcapH A D19-Apr-20231.9 KiB5333

pcap_stats.3pcapH A D19-Apr-20233.5 KiB10686

pcap_statustostr.3pcapH A D19-Apr-20231.6 KiB4222

pcap_strerror.3pcapH A D19-Apr-20231.5 KiB4121

pcap_tstamp_type_name_to_val.3pcapH A D19-Apr-20231.9 KiB5029

pcap_tstamp_type_val_to_name.3pcapH A D19-Apr-20232 KiB5433

pflog.hH A D19-Apr-20234.1 KiB158104

portability.hH A D19-Apr-20235.2 KiB16683

ppp.hH A D08-May-20222.6 KiB5835

rpcap-protocol.cH A D19-Apr-20236.8 KiB19886

rpcap-protocol.hH A D19-Apr-202319.4 KiB450192

savefile.cH A D19-Apr-202317.4 KiB700413

scanner.lH A D19-Apr-202316.7 KiB600385

sf-pcap.cH A D19-Apr-202331.6 KiB1,195649

sf-pcap.hH A D08-May-20221.7 KiB385

sf-pcapng.cH A D19-Apr-202339.6 KiB1,519755

sf-pcapng.hH A D08-May-20221.4 KiB335

sockutils.cH A D06-May-202362.4 KiB2,1131,000

sockutils.hH A D19-Apr-20235.8 KiB17660

sslutils.cH A D19-Apr-20236.4 KiB240162

sslutils.hH A D19-Apr-20232.4 KiB6719

sunatmpos.hH A D08-May-20222.1 KiB448

varattrs.hH A D08-May-20222.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