]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/libpcap/README
MFC r313695, r313760, r314769, r314863, r314865, r316125
[FreeBSD/FreeBSD.git] / contrib / libpcap / README
1 LIBPCAP 1.x.y
2
3 www.tcpdump.org
4
5 Please send inquiries/comments/reports to:
6         tcpdump-workers@lists.tcpdump.org
7
8 Anonymous Git is available via:
9         git clone git://bpf.tcpdump.org/libpcap
10
11 Please submit patches by forking the branch on GitHub at
12
13         http://github.com/the-tcpdump-group/libpcap/tree/master
14
15 and issuing a pull request.
16
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
20
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.
30
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
34 by default.
35
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
40 found at
41
42         ftp://ftp.ee.lbl.gov/papers/bpf-usenix93.ps.Z
43
44 or
45
46         http://www.tcpdump.org/papers/bpf-usenix93.ps.Z
47
48 and a gzipped version can be found at
49
50         http://www.tcpdump.org/papers/bpf-usenix93.ps.gz
51
52 A PDF version can be found at
53
54         http://www.tcpdump.org/papers/bpf-usenix93.pdf
55
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.
63
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:
70
71         http://www.tcpdump.org/other/bpfext42.tar.Z
72
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.
76
77 Note to Linux distributions and *BSD systems that include libpcap:
78
79 There's now a rule to make a shared library, which should work on Linux
80 and *BSD, among other platforms.
81
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
84 that.
85
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.
89
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
94
95         https://github.com/the-tcpdump-group/libpcap/issues
96
97 Source code contributions, etc. should be sent to the email address
98 above or submitted by forking the branch on GitHub at
99
100         http://github.com/the-tcpdump-group/libpcap/tree/master
101
102 and issuing a pull request.
103
104 Current versions can be found at www.tcpdump.org.
105
106  - The TCPdump team