1LIBPCAP 1.x.y 2 3www.tcpdump.org 4 5Please send inquiries/comments/reports to: 6 tcpdump-workers@lists.tcpdump.org 7 8Anonymous Git is available via: 9 git clone git://bpf.tcpdump.org/libpcap 10 11Please submit patches by forking the branch on GitHub at 12 13 http://github.com/the-tcpdump-group/libpcap/tree/master 14 15and issuing a pull request. 16 17formerly 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 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 31For 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 46 http://www.tcpdump.org/papers/bpf-usenix93.ps.Z 47 48and a gzipped version can be found at 49 50 http://www.tcpdump.org/papers/bpf-usenix93.ps.gz 51 52A PDF version can be found at 53 54 http://www.tcpdump.org/papers/bpf-usenix93.pdf 55 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 64BPF is standard in 4.4BSD, BSD/OS, NetBSD, FreeBSD, OpenBSD, DragonFly 65BSD, and Mac OS X; an older, modified and undocumented version is 66standard in AIX. {DEC OSF/1, Digital UNIX, Tru64 UNIX} uses the 67packetfilter interface but has been extended to accept BPF filters 68(which libpcap utilizes). Also, you can add BPF filter support to 69Ultrix using the kernel source and/or object patches available in: 70 71 http://www.tcpdump.org/other/bpfext42.tar.Z 72 73Linux, in the 2.2 kernel and later kernels, has a "Socket Filter" 74mechanism that accepts BPF filters; see the README.linux file for 75information on configuring that option. 76 77Note to Linux distributions and *BSD systems that include libpcap: 78 79There's now a rule to make a shared library, which should work on Linux 80and *BSD, among other platforms. 81 82It sets the soname of the library to "libpcap.so.1"; this is what it 83should be, *NOT* libpcap.so.1.x or libpcap.so.1.x.y or something such as 84that. 85 86We've been maintaining binary compatibility between libpcap releases for 87quite a while; there's no reason to tie a binary linked with libpcap to 88a particular release of libpcap. 89 90Problems, bugs, questions, desirable enhancements, etc. should be sent 91to the address "tcpdump-workers@lists.tcpdump.org". Bugs, support 92requests, and feature requests may also be submitted on the GitHub issue 93tracker for libpcap at 94 95 https://github.com/the-tcpdump-group/libpcap/issues 96 97Source code contributions, etc. should be sent to the email address 98above or submitted by forking the branch on GitHub at 99 100 http://github.com/the-tcpdump-group/libpcap/tree/master 101 102and issuing a pull request. 103 104Current versions can be found at www.tcpdump.org. 105 106 - The TCPdump team 107