5 Please send inquiries/comments/reports to:
6 tcpdump-workers@lists.tcpdump.org
8 Anonymous Git is available via:
9 git clone git://bpf.tcpdump.org/libpcap
11 Please submit patches by forking the branch on GitHub at
13 http://github.com/the-tcpdump-group/libpcap/tree/master
15 and issuing a pull request.
17 formerly from Lawrence Berkeley National Laboratory
18 Network Research Group <libpcap@ee.lbl.gov>
19 ftp://ftp.ee.lbl.gov/old/libpcap-0.4a7.tar.Z
21 This directory contains source code for libpcap, a system-independent
22 interface for user-level packet capture. libpcap provides a portable
23 framework for low-level network monitoring. Applications include
24 network statistics collection, security monitoring, network debugging,
25 etc. Since almost every system vendor provides a different interface
26 for packet capture, and since we've developed several tools that
27 require this functionality, we've created this system-independent API
28 to ease in porting and to alleviate the need for several
29 system-dependent packet capture modules in each application.
31 For some platforms there are README.{system} files that discuss issues
32 with the OS's interface for packet capture on those platforms, such as
33 how to enable support for that interface in the OS, if it's not built in
36 The libpcap interface supports a filtering mechanism based on the
37 architecture in the BSD packet filter. BPF is described in the 1993
38 Winter Usenix paper ``The BSD Packet Filter: A New Architecture for
39 User-level Packet Capture''. A compressed PostScript version can be
42 ftp://ftp.ee.lbl.gov/papers/bpf-usenix93.ps.Z
46 http://www.tcpdump.org/papers/bpf-usenix93.ps.Z
48 and a gzipped version can be found at
50 http://www.tcpdump.org/papers/bpf-usenix93.ps.gz
52 A PDF version can be found at
54 http://www.tcpdump.org/papers/bpf-usenix93.pdf
56 Although most packet capture interfaces support in-kernel filtering,
57 libpcap utilizes in-kernel filtering only for the BPF interface.
58 On systems that don't have BPF, all packets are read into user-space
59 and the BPF filters are evaluated in the libpcap library, incurring
60 added overhead (especially, for selective filters). Ideally, libpcap
61 would translate BPF filters into a filter program that is compatible
62 with the underlying kernel subsystem, but this is not yet implemented.
64 BPF is standard in 4.4BSD, BSD/OS, NetBSD, FreeBSD, OpenBSD, DragonFly
65 BSD, and Mac OS X; an older, modified and undocumented version is
66 standard in AIX. {DEC OSF/1, Digital UNIX, Tru64 UNIX} uses the
67 packetfilter interface but has been extended to accept BPF filters
68 (which libpcap utilizes). Also, you can add BPF filter support to
69 Ultrix using the kernel source and/or object patches available in:
71 http://www.tcpdump.org/other/bpfext42.tar.Z
73 Linux, in the 2.2 kernel and later kernels, has a "Socket Filter"
74 mechanism that accepts BPF filters; see the README.linux file for
75 information on configuring that option.
77 Note to Linux distributions and *BSD systems that include libpcap:
79 There's now a rule to make a shared library, which should work on Linux
80 and *BSD, among other platforms.
82 It sets the soname of the library to "libpcap.so.1"; this is what it
83 should be, *NOT* libpcap.so.1.x or libpcap.so.1.x.y or something such as
86 We've been maintaining binary compatibility between libpcap releases for
87 quite a while; there's no reason to tie a binary linked with libpcap to
88 a particular release of libpcap.
90 Problems, bugs, questions, desirable enhancements, etc. should be sent
91 to the address "tcpdump-workers@lists.tcpdump.org". Bugs, support
92 requests, and feature requests may also be submitted on the GitHub issue
93 tracker for libpcap at
95 https://github.com/the-tcpdump-group/libpcap/issues
97 Source code contributions, etc. should be sent to the email address
98 above or submitted by forking the branch on GitHub at
100 http://github.com/the-tcpdump-group/libpcap/tree/master
102 and issuing a pull request.
104 Current versions can be found at www.tcpdump.org.