blob: 2f14aac9ef0ca88b96c3a45a211309541fce9298 [file] [log] [blame]
JP Abgrall511eca32014-02-12 13:46:45 -08001@(#) $Header: /tcpdump/master/libpcap/README,v 1.34 2008-12-14 19:44:14 guy Exp $ (LBL)
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002
JP Abgrall511eca32014-02-12 13:46:45 -08003LIBPCAP 1.x.y
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004
JP Abgrall511eca32014-02-12 13:46:45 -08005www.tcpdump.org
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006
JP Abgrall511eca32014-02-12 13:46:45 -08007Please send inquiries/comments/reports to:
8 tcpdump-workers@lists.tcpdump.org
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08009
JP Abgrall511eca32014-02-12 13:46:45 -080010Anonymous Git is available via:
11 git clone git://bpf.tcpdump.org/libpcap
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080012
JP Abgrall511eca32014-02-12 13:46:45 -080013Please submit patches by forking the branch on GitHub at
14
15 http://github.com/the-tcpdump-group/libpcap/tree/master
16
17and issuing a pull request.
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080018
19formerly from Lawrence Berkeley National Laboratory
20 Network Research Group <libpcap@ee.lbl.gov>
JP Abgrall511eca32014-02-12 13:46:45 -080021 ftp://ftp.ee.lbl.gov/old/libpcap-0.4a7.tar.Z
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080022
23This directory contains source code for libpcap, a system-independent
24interface for user-level packet capture. libpcap provides a portable
25framework for low-level network monitoring. Applications include
26network statistics collection, security monitoring, network debugging,
27etc. Since almost every system vendor provides a different interface
28for packet capture, and since we've developed several tools that
29require this functionality, we've created this system-independent API
30to ease in porting and to alleviate the need for several
31system-dependent packet capture modules in each application.
32
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080033For 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''. A compressed PostScript version can be
42found at
43
44 ftp://ftp.ee.lbl.gov/papers/bpf-usenix93.ps.Z
45
46or
47
48 http://www.tcpdump.org/papers/bpf-usenix93.ps.Z
49
50and a gzipped version can be found at
51
52 http://www.tcpdump.org/papers/bpf-usenix93.ps.gz
53
54A PDF version can be found at
55
56 http://www.tcpdump.org/papers/bpf-usenix93.pdf
57
58Although most packet capture interfaces support in-kernel filtering,
59libpcap utilizes in-kernel filtering only for the BPF interface.
60On systems that don't have BPF, all packets are read into user-space
61and the BPF filters are evaluated in the libpcap library, incurring
62added overhead (especially, for selective filters). Ideally, libpcap
63would translate BPF filters into a filter program that is compatible
64with the underlying kernel subsystem, but this is not yet implemented.
65
JP Abgrall511eca32014-02-12 13:46:45 -080066BPF is standard in 4.4BSD, BSD/OS, NetBSD, FreeBSD, OpenBSD, DragonFly
67BSD, and Mac OS X; an older, modified and undocumented version is
68standard in AIX. {DEC OSF/1, Digital UNIX, Tru64 UNIX} uses the
69packetfilter interface but has been extended to accept BPF filters
70(which libpcap utilizes). Also, you can add BPF filter support to
71Ultrix using the kernel source and/or object patches available in:
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080072
JP Abgrall511eca32014-02-12 13:46:45 -080073 http://www.tcpdump.org/other/bpfext42.tar.Z
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080074
75Linux, in the 2.2 kernel and later kernels, has a "Socket Filter"
76mechanism that accepts BPF filters; see the README.linux file for
77information on configuring that option.
78
JP Abgrall511eca32014-02-12 13:46:45 -080079Note to Linux distributions and *BSD systems that include libpcap:
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080080
JP Abgrall511eca32014-02-12 13:46:45 -080081There's now a rule to make a shared library, which should work on Linux
82and *BSD, among other platforms.
83
84It sets the soname of the library to "libpcap.so.1"; this is what it
85should be, *NOT* libpcap.so.1.x or libpcap.so.1.x.y or something such as
86that.
87
88We've been maintaining binary compatibility between libpcap releases for
89quite a while; there's no reason to tie a binary linked with libpcap to
90a particular release of libpcap.
91
92Problems, bugs, questions, desirable enhancements, etc. should be sent
93to the address "tcpdump-workers@lists.tcpdump.org". Bugs, support
94requests, and feature requests may also be submitted on the GitHub issue
95tracker for libpcap at
96
97 https://github.com/the-tcpdump-group/libpcap/issues
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080098
99Source code contributions, etc. should be sent to the email address
JP Abgrall511eca32014-02-12 13:46:45 -0800100above or submitted by forking the branch on GitHub at
The Android Open Source Project478ab6c2009-03-03 19:30:05 -0800101
JP Abgrall511eca32014-02-12 13:46:45 -0800102 http://github.com/the-tcpdump-group/libpcap/tree/master
103
104and issuing a pull request.
105
106Current versions can be found at www.tcpdump.org.
The Android Open Source Project478ab6c2009-03-03 19:30:05 -0800107
108 - The TCPdump team