• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..--

ChmodBPF/20-Jan-2014-3916

SUNOS4/12-Sep-2018-

Win32/20-Jan-2014-

bpf/20-Jan-2014-

lbl/07-Feb-2025-418209

missing/07-Feb-2025-496256

msdos/07-Feb-2025-2,5981,917

packaging/23-Jun-2015-

pcap/07-Feb-2025-4,6961,245

tests/07-Feb-2025-

CHANGESD07-Feb-202570.6 KiB1,5961,433

CMakeLists.txtD07-Feb-2025129.1 KiB3,6133,397

CONTRIBUTING.mdD07-Feb-20251.4 KiB3024

CREDITSD07-Feb-202517.8 KiB281276

INSTALL.mdD07-Feb-202516.3 KiB350304

LICENSED23-Jun-2015868 2016

Makefile-devel-addsD07-Feb-2025618 2318

Makefile.inD07-Feb-202528.9 KiB934717

README.mdD07-Feb-20253.4 KiB7760

TODOD07-Feb-20251.2 KiB2923

VERSIOND07-Feb-20257 21

aclocal.m4D07-Feb-202541.3 KiB1,3471,275

arcnet.hD23-Jun-20152.5 KiB5310

atmuni31.hD07-Feb-20253.9 KiB8841

autogen.shD02-Sep-2024831 2619

bpf_dump.cD07-Feb-20252 KiB6637

bpf_filter.cD07-Feb-202512.2 KiB547354

bpf_image.cD07-Feb-20259.4 KiB430329

charconv.cD02-Sep-20246.4 KiB21881

charconv.hD17-Aug-20232.2 KiB458

chmod_bpfD12-Sep-2018757 202

cmake_uninstall.cmake.inD03-Sep-20181 KiB2220

cmakeconfig.h.inD07-Feb-202510.6 KiB361242

config.guessD07-Feb-202549.5 KiB1,8131,586

config.h.inD07-Feb-202510 KiB369247

config.subD07-Feb-202536 KiB1,9751,768

configureD07-Feb-2025427.6 KiB15,28210,523

configure.acD07-Feb-202590 KiB3,2352,995

diag-control.hD07-Feb-202514.3 KiB431216

dlpisubs.cD07-Feb-202510.3 KiB421254

dlpisubs.hD23-Jun-2015770 4126

etherent.cD07-Feb-20253.8 KiB178115

ethertype.hD07-Feb-20253.5 KiB12690

extract.hD07-Feb-202518.5 KiB424258

fad-getad.cD07-Feb-20259.3 KiB299127

fad-gifc.cD07-Feb-202513.1 KiB433215

fad-glifc.cD07-Feb-20259.6 KiB353200

fmtutils.cD07-Feb-202511.1 KiB442192

fmtutils.hD07-Feb-20252.6 KiB6422

ftmacros.hD07-Feb-20254.8 KiB12822

gencode.cD07-Feb-2025262.7 KiB10,2675,954

gencode.hD07-Feb-202512.8 KiB423239

grammar.y.inD02-Sep-202429.9 KiB950898

ieee80211.hD23-Jun-20155.4 KiB14993

install-shD07-Feb-202515 KiB542352

libpcap.pc.inD07-Feb-2025537 2018

llc.hD23-Jun-20152.6 KiB10164

mkdepD07-Feb-20252.9 KiB12463

nametoaddr.cD07-Feb-202519.5 KiB826487

nametoaddr.hD24-Jan-20172.1 KiB499

nlpid.hD07-Feb-20251.7 KiB5927

nomkdepD03-Sep-2018135 71

optimize.cD07-Feb-202575.3 KiB3,1191,747

optimize.hD03-Sep-20181.3 KiB294

org.tcpdump.chmod_bpf.plistD07-Feb-2025442 1716

pcap-airpcap.cD02-Sep-202428.9 KiB1,056604

pcap-airpcap.hD17-Aug-20231.8 KiB373

pcap-bpf.cD07-Feb-202593 KiB3,7022,020

pcap-bpf.hD23-Jun-20152.3 KiB481

pcap-bt-linux.cD07-Feb-202512.2 KiB458308

pcap-bt-linux.hD12-Sep-20181.8 KiB412

pcap-bt-monitor-linux.cD07-Feb-20258.3 KiB286180

pcap-bt-monitor-linux.hD12-Sep-20181.7 KiB352

pcap-common.cD07-Feb-202550 KiB1,583326

pcap-common.hD07-Feb-20251.4 KiB313

pcap-config.1D07-Feb-20253.5 KiB135101

pcap-config.inD07-Feb-20253.8 KiB166107

pcap-dag.cD07-Feb-202537 KiB1,447944

pcap-dag.hD12-Sep-2018525 152

pcap-dbus.cD07-Feb-202510.1 KiB355211

pcap-dbus.hD12-Sep-2018181 52

pcap-dll.rcD07-Feb-20251 KiB3735

pcap-dlpi.cD07-Feb-202548.7 KiB1,9431,181

pcap-dos.cD07-Feb-202536.5 KiB1,5531,078

pcap-dos.hD23-Jun-20156.8 KiB228171

pcap-dpdk.cD02-Sep-202431.6 KiB1,085764

pcap-dpdk.hD17-Aug-20231.4 KiB292

pcap-enet.cD07-Feb-20254.9 KiB235174

pcap-filter.manmisc.inD07-Feb-202536.9 KiB1,2071,185

pcap-haiku.cD02-Sep-202415.1 KiB505309

pcap-int.hD07-Feb-202519.3 KiB608260

pcap-libdlpi.cD07-Feb-202513.1 KiB521309

pcap-linktype.manmisc.inD07-Feb-20252.3 KiB4928

pcap-linux.cD07-Feb-2025159.7 KiB5,7412,710

pcap-namedb.hD23-Jun-20152 KiB431

pcap-netfilter-linux.cD07-Feb-202521.9 KiB800535

pcap-netfilter-linux.hD12-Sep-20181.7 KiB382

pcap-netmap.cD07-Feb-20257.8 KiB304187

pcap-netmap.hD03-Sep-2018126 32

pcap-new.cD07-Feb-202513.5 KiB503324

pcap-nit.cD07-Feb-202510.5 KiB423249

pcap-npf.cD07-Feb-202571.2 KiB2,7781,448

pcap-null.cD07-Feb-20252 KiB6931

pcap-pf.cD07-Feb-202518.8 KiB686379

pcap-rdmasniff.cD07-Feb-202511.5 KiB454339

pcap-rdmasniff.hD03-Sep-2018140 32

pcap-rpcap-unix.cD07-Feb-202517.6 KiB765569

pcap-rpcap-unix.hD29-Mar-202071 21

pcap-rpcap.cD07-Feb-2025107.1 KiB3,6322,036

pcap-rpcap.hD16-Mar-20202.2 KiB507

pcap-savefile.manfile.inD07-Feb-20257.2 KiB184164

pcap-septel.cD07-Feb-20258.3 KiB334160

pcap-septel.hD12-Sep-2018583 162

pcap-sita.cD07-Feb-202536.2 KiB1,086880

pcap-sita.hD23-Jun-2015293 112

pcap-sita.htmlD07-Feb-202537.3 KiB942901

pcap-snf.cD07-Feb-202515 KiB621411

pcap-snf.hD12-Sep-2018178 52

pcap-snit.cD07-Feb-202513.2 KiB517317

pcap-snoop.cD07-Feb-202513.5 KiB471279

pcap-tc.cD07-Feb-202532.7 KiB1,217877

pcap-tc.hD12-Sep-20181.9 KiB5511

pcap-tstamp.manmisc.inD07-Feb-20259.4 KiB203181

pcap-types.hD07-Feb-20251.9 KiB508

pcap-usb-linux-common.hD02-Sep-20244.2 KiB12845

pcap-usb-linux.cD07-Feb-202526.6 KiB969528

pcap-usb-linux.hD12-Sep-20181.8 KiB412

pcap-util.cD02-Sep-202418.9 KiB628306

pcap-util.hD02-Sep-20242.3 KiB5210

pcap.3pcap.inD07-Feb-202531.4 KiB1,0591,039

pcap.cD07-Feb-2025119.5 KiB4,5992,791

pcap.hD23-Jun-20152.3 KiB481

pcap_activate.3pcapD07-Feb-20254.1 KiB136116

pcap_breakloop.3pcapD07-Feb-20255.8 KiB149129

pcap_can_set_rfmon.3pcapD07-Feb-20252.7 KiB8161

pcap_close.3pcapD07-Feb-20251.5 KiB4020

pcap_compile.3pcap.inD07-Feb-20253 KiB9373

pcap_create.3pcapD07-Feb-20252.2 KiB7353

pcap_datalink.3pcap.inD07-Feb-20252.4 KiB7252

pcap_datalink_name_to_val.3pcapD07-Feb-20251.8 KiB5030

pcap_datalink_val_to_name.3pcapD07-Feb-20252.8 KiB7757

pcap_dump.3pcapD07-Feb-20251.7 KiB5030

pcap_dump_close.3pcapD07-Feb-20251.5 KiB4020

pcap_dump_file.3pcapD07-Feb-20251.5 KiB3919

pcap_dump_flush.3pcapD07-Feb-20251.7 KiB4929

pcap_dump_ftell.3pcapD07-Feb-20252.3 KiB6545

pcap_dump_open.3pcap.inD07-Feb-20253.6 KiB10989

pcap_file.3pcapD07-Feb-20252.1 KiB6040

pcap_fileno.3pcapD07-Feb-20252 KiB6646

pcap_findalldevs.3pcapD07-Feb-20256.8 KiB263243

pcap_freecode.3pcapD07-Feb-20251.7 KiB4424

pcap_get_required_select_timeout.3pcapD07-Feb-20254.9 KiB171151

pcap_get_selectable_fd.3pcapD07-Feb-20254.7 KiB153133

pcap_get_tstamp_precision.3pcap.inD07-Feb-20251.9 KiB5735

pcap_geterr.3pcapD07-Feb-20251.8 KiB5232

pcap_init.3pcapD02-Sep-20243.2 KiB10383

pcap_inject.3pcapD07-Feb-20253.6 KiB10383

pcap_is_swapped.3pcapD07-Feb-20251.9 KiB5232

pcap_lib_version.3pcapD07-Feb-20251.6 KiB4020

pcap_list_datalinks.3pcap.inD07-Feb-20252.6 KiB7454

pcap_list_tstamp_types.3pcap.inD07-Feb-20253 KiB8362

pcap_lookupdev.3pcapD07-Feb-20252.6 KiB8767

pcap_lookupnet.3pcapD07-Feb-20252.2 KiB7454

pcap_loop.3pcapD07-Feb-20256.9 KiB223203

pcap_major_version.3pcapD07-Feb-20252 KiB5535

pcap_next_ex.3pcapD07-Feb-20255 KiB153133

pcap_offline_filter.3pcapD07-Feb-20252 KiB5535

pcap_open_dead.3pcap.inD07-Feb-20252.9 KiB8666

pcap_open_live.3pcapD07-Feb-20253.1 KiB10181

pcap_open_offline.3pcap.inD07-Feb-20253.8 KiB11999

pcap_set_buffer_size.3pcapD07-Feb-20251.8 KiB5030

pcap_set_datalink.3pcapD07-Feb-20252 KiB5939

pcap_set_immediate_mode.3pcap.inD07-Feb-20253.3 KiB10079

pcap_set_promisc.3pcapD07-Feb-20251.8 KiB5131

pcap_set_protocol_linux.3pcapD07-Feb-20252.8 KiB7353

pcap_set_rfmon.3pcapD07-Feb-20251.8 KiB5232

pcap_set_snaplen.3pcapD07-Feb-20251.8 KiB4929

pcap_set_timeout.3pcapD07-Feb-20252.2 KiB5737

pcap_set_tstamp_precision.3pcap.inD07-Feb-20252.4 KiB7048

pcap_set_tstamp_type.3pcap.inD07-Feb-20252.8 KiB7352

pcap_setdirection.3pcapD07-Feb-20252.5 KiB7757

pcap_setfilter.3pcapD07-Feb-20251.9 KiB6040

pcap_setnonblock.3pcapD07-Feb-20253.3 KiB10989

pcap_snapshot.3pcapD07-Feb-20251.9 KiB5333

pcap_stats.3pcapD07-Feb-20253.5 KiB10686

pcap_statustostr.3pcapD07-Feb-20251.6 KiB4222

pcap_strerror.3pcapD07-Feb-20251.8 KiB4525

pcap_tstamp_type_name_to_val.3pcapD07-Feb-20251.9 KiB5029

pcap_tstamp_type_val_to_name.3pcapD07-Feb-20252 KiB5433

pflog.hD17-Aug-20234.1 KiB158104

portability.hD07-Feb-20255.3 KiB16784

ppp.hD07-Feb-20252.7 KiB6035

rpcap-protocol.cD07-Feb-20256.8 KiB19784

rpcap-protocol.hD07-Feb-202519.4 KiB452194

savefile.cD07-Feb-202517.6 KiB703413

scanner.lD07-Feb-202519.1 KiB698437

sf-pcap.cD07-Feb-202534.7 KiB1,278671

sf-pcap.hD16-Mar-20201.8 KiB405

sf-pcapng.cD07-Feb-202539.6 KiB1,517753

sf-pcapng.hD16-Mar-20201.4 KiB335

sockutils.cD07-Feb-202562.6 KiB2,1181,000

sockutils.hD07-Feb-20255.8 KiB17862

sslutils.cD02-Sep-20246.4 KiB238160

sslutils.hD02-Sep-20242.7 KiB7322

sunatmpos.hD23-Jun-20152.2 KiB468

thread-local.hD02-Sep-20243 KiB7323

varattrs.hD03-Sep-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