blob: 78cc3c4b41b571831ae5d18df1252768da04b88f [file] [log] [blame] [view]
Haibo Huang165065a2018-07-23 17:26:52 -07001To report a security issue please send an e-mail to security@tcpdump.org.
2
3To report bugs and other problems, contribute patches, request a
4feature, provide generic feedback etc please see the file
5[CONTRIBUTING](CONTRIBUTING.md) in the libpcap source tree root.
6
7The directory doc/ has README files about specific operating systems and
8options.
9
JP Abgrall511eca32014-02-12 13:46:45 -080010LIBPCAP 1.x.y
Haibo Huang165065a2018-07-23 17:26:52 -070011Now maintained by "The Tcpdump Group"
12https://www.tcpdump.org
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080013
JP Abgrall511eca32014-02-12 13:46:45 -080014Anonymous Git is available via:
Haibo Huang165065a2018-07-23 17:26:52 -070015 https://github.com/the-tcpdump-group/libpcap.git
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080016
17formerly from Lawrence Berkeley National Laboratory
18 Network Research Group <libpcap@ee.lbl.gov>
JP Abgrall511eca32014-02-12 13:46:45 -080019 ftp://ftp.ee.lbl.gov/old/libpcap-0.4a7.tar.Z
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080020
21This directory contains source code for libpcap, a system-independent
22interface for user-level packet capture. libpcap provides a portable
23framework for low-level network monitoring. Applications include
24network statistics collection, security monitoring, network debugging,
25etc. Since almost every system vendor provides a different interface
26for packet capture, and since we've developed several tools that
27require this functionality, we've created this system-independent API
28to ease in porting and to alleviate the need for several
29system-dependent packet capture modules in each application.
30
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080031For some platforms there are README.{system} files that discuss issues
32with the OS's interface for packet capture on those platforms, such as
33how to enable support for that interface in the OS, if it's not built in
34by default.
35
36The libpcap interface supports a filtering mechanism based on the
37architecture in the BSD packet filter. BPF is described in the 1993
38Winter Usenix paper ``The BSD Packet Filter: A New Architecture for
39User-level Packet Capture''. A compressed PostScript version can be
40found at
41
42 ftp://ftp.ee.lbl.gov/papers/bpf-usenix93.ps.Z
43
44or
45
Haibo Huang165065a2018-07-23 17:26:52 -070046 https://www.tcpdump.org/papers/bpf-usenix93.ps.Z
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080047
48and a gzipped version can be found at
49
Haibo Huang165065a2018-07-23 17:26:52 -070050 https://www.tcpdump.org/papers/bpf-usenix93.ps.gz
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080051
52A PDF version can be found at
53
Haibo Huang165065a2018-07-23 17:26:52 -070054 https://www.tcpdump.org/papers/bpf-usenix93.pdf
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080055
56Although most packet capture interfaces support in-kernel filtering,
57libpcap utilizes in-kernel filtering only for the BPF interface.
58On systems that don't have BPF, all packets are read into user-space
59and the BPF filters are evaluated in the libpcap library, incurring
60added overhead (especially, for selective filters). Ideally, libpcap
61would translate BPF filters into a filter program that is compatible
62with the underlying kernel subsystem, but this is not yet implemented.
63
JP Abgrall511eca32014-02-12 13:46:45 -080064BPF is standard in 4.4BSD, BSD/OS, NetBSD, FreeBSD, OpenBSD, DragonFly
Haibo Huang165065a2018-07-23 17:26:52 -070065BSD, and macOS; an older, modified and undocumented version is standard
66in AIX. {DEC OSF/1, Digital UNIX, Tru64 UNIX} uses the packetfilter
67interface but has been extended to accept BPF filters (which libpcap
68utilizes). Also, you can add BPF filter support to Ultrix using the
69kernel source and/or object patches available in:
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080070
Haibo Huang165065a2018-07-23 17:26:52 -070071 https://www.tcpdump.org/other/bpfext42.tar.Z
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080072
Haibo Huang165065a2018-07-23 17:26:52 -070073Linux has a number of BPF based systems, and libpcap does not support
74any of the eBPF mechanisms as yet, although it supports many of the
75memory mapped receive mechanisms.
76See the [README.linux](doc/README.linux.md) file for more information.
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080077
JP Abgrall511eca32014-02-12 13:46:45 -080078Note to Linux distributions and *BSD systems that include libpcap:
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080079
Elliott Hughesd8845d72015-10-19 18:07:04 -070080There's now a rule to make a shared library, which should work on Linux
JP Abgrall511eca32014-02-12 13:46:45 -080081and *BSD, among other platforms.
82
Elliott Hughesd8845d72015-10-19 18:07:04 -070083It sets the soname of the library to "libpcap.so.1"; this is what it
84should be, *NOT* libpcap.so.1.x or libpcap.so.1.x.y or something such as
JP Abgrall511eca32014-02-12 13:46:45 -080085that.
86
Elliott Hughesd8845d72015-10-19 18:07:04 -070087We've been maintaining binary compatibility between libpcap releases for
88quite a while; there's no reason to tie a binary linked with libpcap to
JP Abgrall511eca32014-02-12 13:46:45 -080089a particular release of libpcap.
90
Haibo Huang165065a2018-07-23 17:26:52 -070091Current versions can be found at https://www.tcpdump.org.
JP Abgrall511eca32014-02-12 13:46:45 -080092
Haibo Huang165065a2018-07-23 17:26:52 -070093 - The TCPdump group