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