1 @(#) $Header: /tcpdump/master/libpcap/README,v 1.34 2008-12-14 19:44:14 guy Exp $ (LBL)
7 Please send inquiries/comments/reports to:
8 tcpdump-workers@lists.tcpdump.org
10 Anonymous Git is available via:
11 git clone git://bpf.tcpdump.org/libpcap
13 Version 1.x.y of LIBPCAP can be retrieved with the CVS tag "libpcap_1_{x}rel{y}":
14 cvs -d :pserver:tcpdump@cvs.tcpdump.org:/tcpdump/master checkout -r libpcap_1_{x}rel{y} libpcap
16 Please submit patches against the master copy to the libpcap project on
19 formerly from Lawrence Berkeley National Laboratory
20 Network Research Group <libpcap@ee.lbl.gov>
21 ftp://ftp.ee.lbl.gov/libpcap.tar.Z (0.4)
23 This directory contains source code for libpcap, a system-independent
24 interface for user-level packet capture. libpcap provides a portable
25 framework for low-level network monitoring. Applications include
26 network statistics collection, security monitoring, network debugging,
27 etc. Since almost every system vendor provides a different interface
28 for packet capture, and since we've developed several tools that
29 require this functionality, we've created this system-independent API
30 to ease in porting and to alleviate the need for several
31 system-dependent packet capture modules in each application.
33 For some platforms there are README.{system} files that discuss issues
34 with the OS's interface for packet capture on those platforms, such as
35 how to enable support for that interface in the OS, if it's not built in
38 The libpcap interface supports a filtering mechanism based on the
39 architecture in the BSD packet filter. BPF is described in the 1993
40 Winter Usenix paper ``The BSD Packet Filter: A New Architecture for
41 User-level Packet Capture''. A compressed PostScript version can be
44 ftp://ftp.ee.lbl.gov/papers/bpf-usenix93.ps.Z
48 http://www.tcpdump.org/papers/bpf-usenix93.ps.Z
50 and a gzipped version can be found at
52 http://www.tcpdump.org/papers/bpf-usenix93.ps.gz
54 A PDF version can be found at
56 http://www.tcpdump.org/papers/bpf-usenix93.pdf
58 Although most packet capture interfaces support in-kernel filtering,
59 libpcap utilizes in-kernel filtering only for the BPF interface.
60 On systems that don't have BPF, all packets are read into user-space
61 and the BPF filters are evaluated in the libpcap library, incurring
62 added overhead (especially, for selective filters). Ideally, libpcap
63 would translate BPF filters into a filter program that is compatible
64 with the underlying kernel subsystem, but this is not yet implemented.
66 BPF is standard in 4.4BSD, BSD/OS, NetBSD, FreeBSD, OpenBSD, DragonFly
67 BSD, and Mac OS X; an older, modified and undocumented version is
68 standard in AIX. {DEC OSF/1, Digital UNIX, Tru64 UNIX} uses the
69 packetfilter interface but has been extended to accept BPF filters
70 (which libpcap utilizes). Also, you can add BPF filter support to
71 Ultrix using the kernel source and/or object patches available in:
73 http://www.tcpdump.org/other/bpfext42.tar.Z
75 Linux, in the 2.2 kernel and later kernels, has a "Socket Filter"
76 mechanism that accepts BPF filters; see the README.linux file for
77 information on configuring that option.
79 Note to Linux distributions and *BSD systems that include libpcap:
81 There's now a rule to make a shared library, which should work on Linux
82 and *BSD, among other platforms.
84 It sets the soname of the library to "libpcap.so.1"; this is what it
85 should be, *NOT* libpcap.so.1.x or libpcap.so.1.x.y or something such as
88 We've been maintaining binary compatibility between libpcap releases for
89 quite a while; there's no reason to tie a binary linked with libpcap to
90 a particular release of libpcap.
92 Problems, bugs, questions, desirable enhancements, etc. should be sent
93 to the address "tcpdump-workers@lists.tcpdump.org". Bugs, support
94 requests, and feature requests may also be submitted on the SourceForge
97 http://sourceforge.net/projects/libpcap/
99 Source code contributions, etc. should be sent to the email address
100 submitted as patches on the SourceForge site for libpcap.
102 Current versions can be found at www.tcpdump.org, or the SourceForge