You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
jianglk.darker 7ee447c011
v811_spc009_project
4 months ago
..
ChmodBPF v811_spc009_project 4 months ago
Win32/Prj v811_spc009_project 4 months ago
cmake v811_spc009_project 4 months ago
doc v811_spc009_project 4 months ago
lbl v811_spc009_project 4 months ago
missing v811_spc009_project 4 months ago
msdos v811_spc009_project 4 months ago
pcap v811_spc009_project 4 months ago
rpcapd v811_spc009_project 4 months ago
testprogs v811_spc009_project 4 months ago
tests v811_spc009_project 4 months ago
.appveyor.yml v811_spc009_project 4 months ago
.cirrus.yml v811_spc009_project 4 months ago
.mailmap v811_spc009_project 4 months ago
.travis-coverity-scan-build.sh v811_spc009_project 4 months ago
.travis.yml v811_spc009_project 4 months ago
Android.bp v811_spc009_project 4 months ago
CHANGES v811_spc009_project 4 months ago
CMakeLists.txt v811_spc009_project 4 months ago
CONTRIBUTING.md v811_spc009_project 4 months ago
CREDITS v811_spc009_project 4 months ago
CleanSpec.mk v811_spc009_project 4 months ago
INSTALL.md v811_spc009_project 4 months ago
LICENSE v811_spc009_project 4 months ago
METADATA v811_spc009_project 4 months ago
MODULE_LICENSE_BSD v811_spc009_project 4 months ago
Makefile-devel-adds v811_spc009_project 4 months ago
Makefile.in v811_spc009_project 4 months ago
NOTICE v811_spc009_project 4 months ago
OWNERS v811_spc009_project 4 months ago
README.md v811_spc009_project 4 months ago
TODO v811_spc009_project 4 months ago
VERSION v811_spc009_project 4 months ago
aclocal.m4 v811_spc009_project 4 months ago
arcnet.h v811_spc009_project 4 months ago
atmuni31.h v811_spc009_project 4 months ago
bpf_dump.c v811_spc009_project 4 months ago
bpf_filter.c v811_spc009_project 4 months ago
bpf_image.c v811_spc009_project 4 months ago
charconv.c v811_spc009_project 4 months ago
charconv.h v811_spc009_project 4 months ago
chmod_bpf v811_spc009_project 4 months ago
cmake_uninstall.cmake.in v811_spc009_project 4 months ago
cmakeconfig.h.in v811_spc009_project 4 months ago
config.guess v811_spc009_project 4 months ago
config.h v811_spc009_project 4 months ago
config.h.in v811_spc009_project 4 months ago
config.sub v811_spc009_project 4 months ago
configure v811_spc009_project 4 months ago
configure.ac v811_spc009_project 4 months ago
diag-control.h v811_spc009_project 4 months ago
dlpisubs.c v811_spc009_project 4 months ago
dlpisubs.h v811_spc009_project 4 months ago
etherent.c v811_spc009_project 4 months ago
ethertype.h v811_spc009_project 4 months ago
extract.h v811_spc009_project 4 months ago
fad-getad.c v811_spc009_project 4 months ago
fad-gifc.c v811_spc009_project 4 months ago
fad-glifc.c v811_spc009_project 4 months ago
fmtutils.c v811_spc009_project 4 months ago
fmtutils.h v811_spc009_project 4 months ago
ftmacros.h v811_spc009_project 4 months ago
gencode.c v811_spc009_project 4 months ago
gencode.h v811_spc009_project 4 months ago
grammar.c v811_spc009_project 4 months ago
grammar.h v811_spc009_project 4 months ago
grammar.y.in v811_spc009_project 4 months ago
ieee80211.h v811_spc009_project 4 months ago
install-sh v811_spc009_project 4 months ago
libpcap.pc.in v811_spc009_project 4 months ago
llc.h v811_spc009_project 4 months ago
mkdep v811_spc009_project 4 months ago
nametoaddr.c v811_spc009_project 4 months ago
nametoaddr.h v811_spc009_project 4 months ago
nlpid.h v811_spc009_project 4 months ago
nomkdep v811_spc009_project 4 months ago
optimize.c v811_spc009_project 4 months ago
optimize.h v811_spc009_project 4 months ago
org.tcpdump.chmod_bpf.plist v811_spc009_project 4 months ago
pcap-airpcap.c v811_spc009_project 4 months ago
pcap-airpcap.h v811_spc009_project 4 months ago
pcap-bpf.c v811_spc009_project 4 months ago
pcap-bpf.h v811_spc009_project 4 months ago
pcap-bt-linux.c v811_spc009_project 4 months ago
pcap-bt-linux.h v811_spc009_project 4 months ago
pcap-bt-monitor-linux.c v811_spc009_project 4 months ago
pcap-bt-monitor-linux.h v811_spc009_project 4 months ago
pcap-common.c v811_spc009_project 4 months ago
pcap-common.h v811_spc009_project 4 months ago
pcap-config.1 v811_spc009_project 4 months ago
pcap-config.in v811_spc009_project 4 months ago
pcap-dag.c v811_spc009_project 4 months ago
pcap-dag.h v811_spc009_project 4 months ago
pcap-dbus.c v811_spc009_project 4 months ago
pcap-dbus.h v811_spc009_project 4 months ago
pcap-dll.rc v811_spc009_project 4 months ago
pcap-dlpi.c v811_spc009_project 4 months ago
pcap-dos.c v811_spc009_project 4 months ago
pcap-dos.h v811_spc009_project 4 months ago
pcap-dpdk.c v811_spc009_project 4 months ago
pcap-dpdk.h v811_spc009_project 4 months ago
pcap-enet.c v811_spc009_project 4 months ago
pcap-filter.manmisc.in v811_spc009_project 4 months ago
pcap-haiku.cpp v811_spc009_project 4 months ago
pcap-int.h v811_spc009_project 4 months ago
pcap-libdlpi.c v811_spc009_project 4 months ago
pcap-linktype.manmisc.in v811_spc009_project 4 months ago
pcap-linux.c v811_spc009_project 4 months ago
pcap-namedb.h v811_spc009_project 4 months ago
pcap-netfilter-linux-android.c v811_spc009_project 4 months ago
pcap-netfilter-linux-android.h v811_spc009_project 4 months ago
pcap-netfilter-linux.c v811_spc009_project 4 months ago
pcap-netfilter-linux.h v811_spc009_project 4 months ago
pcap-netmap.c v811_spc009_project 4 months ago
pcap-netmap.h v811_spc009_project 4 months ago
pcap-new.c v811_spc009_project 4 months ago
pcap-nit.c v811_spc009_project 4 months ago
pcap-npf.c v811_spc009_project 4 months ago
pcap-null.c v811_spc009_project 4 months ago
pcap-pf.c v811_spc009_project 4 months ago
pcap-rdmasniff.c v811_spc009_project 4 months ago
pcap-rdmasniff.h v811_spc009_project 4 months ago
pcap-rpcap-int.h v811_spc009_project 4 months ago
pcap-rpcap.c v811_spc009_project 4 months ago
pcap-rpcap.h v811_spc009_project 4 months ago
pcap-savefile.manfile.in v811_spc009_project 4 months ago
pcap-septel.c v811_spc009_project 4 months ago
pcap-septel.h v811_spc009_project 4 months ago
pcap-sita.c v811_spc009_project 4 months ago
pcap-sita.h v811_spc009_project 4 months ago
pcap-sita.html v811_spc009_project 4 months ago
pcap-snf.c v811_spc009_project 4 months ago
pcap-snf.h v811_spc009_project 4 months ago
pcap-snit.c v811_spc009_project 4 months ago
pcap-snoop.c v811_spc009_project 4 months ago
pcap-tc.c v811_spc009_project 4 months ago
pcap-tc.h v811_spc009_project 4 months ago
pcap-tstamp.manmisc.in v811_spc009_project 4 months ago
pcap-types.h v811_spc009_project 4 months ago
pcap-usb-linux.c v811_spc009_project 4 months ago
pcap-usb-linux.h v811_spc009_project 4 months ago
pcap.3pcap.in v811_spc009_project 4 months ago
pcap.c v811_spc009_project 4 months ago
pcap.h v811_spc009_project 4 months ago
pcap_activate.3pcap v811_spc009_project 4 months ago
pcap_breakloop.3pcap v811_spc009_project 4 months ago
pcap_can_set_rfmon.3pcap v811_spc009_project 4 months ago
pcap_close.3pcap v811_spc009_project 4 months ago
pcap_compile.3pcap.in v811_spc009_project 4 months ago
pcap_create.3pcap v811_spc009_project 4 months ago
pcap_datalink.3pcap.in v811_spc009_project 4 months ago
pcap_datalink_name_to_val.3pcap v811_spc009_project 4 months ago
pcap_datalink_val_to_name.3pcap v811_spc009_project 4 months ago
pcap_dump.3pcap v811_spc009_project 4 months ago
pcap_dump_close.3pcap v811_spc009_project 4 months ago
pcap_dump_file.3pcap v811_spc009_project 4 months ago
pcap_dump_flush.3pcap v811_spc009_project 4 months ago
pcap_dump_ftell.3pcap v811_spc009_project 4 months ago
pcap_dump_open.3pcap.in v811_spc009_project 4 months ago
pcap_file.3pcap v811_spc009_project 4 months ago
pcap_fileno.3pcap v811_spc009_project 4 months ago
pcap_findalldevs.3pcap v811_spc009_project 4 months ago
pcap_freecode.3pcap v811_spc009_project 4 months ago
pcap_get_required_select_timeout.3pcap v811_spc009_project 4 months ago
pcap_get_selectable_fd.3pcap v811_spc009_project 4 months ago
pcap_get_tstamp_precision.3pcap.in v811_spc009_project 4 months ago
pcap_geterr.3pcap v811_spc009_project 4 months ago
pcap_init.3pcap v811_spc009_project 4 months ago
pcap_inject.3pcap v811_spc009_project 4 months ago
pcap_is_swapped.3pcap v811_spc009_project 4 months ago
pcap_lib_version.3pcap v811_spc009_project 4 months ago
pcap_list_datalinks.3pcap.in v811_spc009_project 4 months ago
pcap_list_tstamp_types.3pcap.in v811_spc009_project 4 months ago
pcap_lookupdev.3pcap v811_spc009_project 4 months ago
pcap_lookupnet.3pcap v811_spc009_project 4 months ago
pcap_loop.3pcap v811_spc009_project 4 months ago
pcap_major_version.3pcap v811_spc009_project 4 months ago
pcap_next_ex.3pcap v811_spc009_project 4 months ago
pcap_offline_filter.3pcap v811_spc009_project 4 months ago
pcap_open_dead.3pcap.in v811_spc009_project 4 months ago
pcap_open_live.3pcap v811_spc009_project 4 months ago
pcap_open_offline.3pcap.in v811_spc009_project 4 months ago
pcap_set_buffer_size.3pcap v811_spc009_project 4 months ago
pcap_set_datalink.3pcap v811_spc009_project 4 months ago
pcap_set_immediate_mode.3pcap.in v811_spc009_project 4 months ago
pcap_set_promisc.3pcap v811_spc009_project 4 months ago
pcap_set_protocol_linux.3pcap v811_spc009_project 4 months ago
pcap_set_rfmon.3pcap v811_spc009_project 4 months ago
pcap_set_snaplen.3pcap v811_spc009_project 4 months ago
pcap_set_timeout.3pcap v811_spc009_project 4 months ago
pcap_set_tstamp_precision.3pcap.in v811_spc009_project 4 months ago
pcap_set_tstamp_type.3pcap.in v811_spc009_project 4 months ago
pcap_setdirection.3pcap v811_spc009_project 4 months ago
pcap_setfilter.3pcap v811_spc009_project 4 months ago
pcap_setnonblock.3pcap v811_spc009_project 4 months ago
pcap_snapshot.3pcap v811_spc009_project 4 months ago
pcap_stats.3pcap v811_spc009_project 4 months ago
pcap_statustostr.3pcap v811_spc009_project 4 months ago
pcap_strerror.3pcap v811_spc009_project 4 months ago
pcap_tstamp_type_name_to_val.3pcap v811_spc009_project 4 months ago
pcap_tstamp_type_val_to_name.3pcap v811_spc009_project 4 months ago
portability.h v811_spc009_project 4 months ago
post_update.sh v811_spc009_project 4 months ago
ppp.h v811_spc009_project 4 months ago
rpcap-protocol.c v811_spc009_project 4 months ago
rpcap-protocol.h v811_spc009_project 4 months ago
savefile.c v811_spc009_project 4 months ago
scanner.c v811_spc009_project 4 months ago
scanner.h v811_spc009_project 4 months ago
scanner.l v811_spc009_project 4 months ago
sf-pcap.c v811_spc009_project 4 months ago
sf-pcap.h v811_spc009_project 4 months ago
sf-pcapng.c v811_spc009_project 4 months ago
sf-pcapng.h v811_spc009_project 4 months ago
sockutils.c v811_spc009_project 4 months ago
sockutils.h v811_spc009_project 4 months ago
sslutils.c v811_spc009_project 4 months ago
sslutils.h v811_spc009_project 4 months ago
sunatmpos.h v811_spc009_project 4 months ago
varattrs.h v811_spc009_project 4 months ago

README.md

LIBPCAP 1.x.y

Build Status

Build Status

Now maintained by "The Tcpdump Group"

https://www.tcpdump.org

formerly from Lawrence Berkeley National Laboratory Network Research Group libpcap@ee.lbl.gov ftp://ftp.ee.lbl.gov/old/libpcap-0.4a7.tar.Z

To report a security issue please send an e-mail to security@tcpdump.org.

To report bugs and other problems, contribute patches, request a feature, provide generic feedback etc please see the file CONTRIBUTING.md in the libpcap source tree root.

The directory doc/ has README files about specific operating systems and options.

Anonymous Git is available via:

https://github.com/the-tcpdump-group/libpcap.git

This directory contains source code for libpcap, a system-independent interface for user-level packet capture. libpcap provides a portable framework for low-level network monitoring. Applications include network statistics collection, security monitoring, network debugging, etc. Since almost every system vendor provides a different interface for packet capture, and since we've developed several tools that require this functionality, we've created this system-independent API to ease in porting and to alleviate the need for several system-dependent packet capture modules in each application.

For some platforms there are README.{system} files that discuss issues with the OS's interface for packet capture on those platforms, such as how to enable support for that interface in the OS, if it's not built in by default.

The libpcap interface supports a filtering mechanism based on the architecture in the BSD packet filter. BPF is described in the 1993 Winter Usenix paper ``The BSD Packet Filter: A New Architecture for User-level Packet Capture''. A compressed PostScript version can be found at

https://www.tcpdump.org/papers/bpf-usenix93.ps.Z

and a gzipped version can be found at

https://www.tcpdump.org/papers/bpf-usenix93.ps.gz

A PDF version can be found at

https://www.tcpdump.org/papers/bpf-usenix93.pdf

Although most packet capture interfaces support in-kernel filtering, libpcap utilizes in-kernel filtering only for the BPF interface. On systems that don't have BPF, all packets are read into user-space and the BPF filters are evaluated in the libpcap library, incurring added overhead (especially, for selective filters). Ideally, libpcap would translate BPF filters into a filter program that is compatible with the underlying kernel subsystem, but this is not yet implemented.

BPF is standard in 4.4BSD, BSD/OS, NetBSD, FreeBSD, OpenBSD, DragonFly BSD, and macOS; an older, modified and undocumented version is standard in AIX. {DEC OSF/1, Digital UNIX, Tru64 UNIX} uses the packetfilter interface but has been extended to accept BPF filters (which libpcap utilizes). Also, you can add BPF filter support to Ultrix using the kernel source and/or object patches available in:

https://www.tcpdump.org/other/bpfext42.tar.Z

Linux has a number of BPF based systems, and libpcap does not support any of the eBPF mechanisms as yet, although it supports many of the memory mapped receive mechanisms. See the README.linux file for more information.

Note to Linux distributions and *BSD systems that include libpcap:

There's now a rule to make a shared library, which should work on Linux and *BSD, among other platforms.

It sets the soname of the library to "libpcap.so.1"; this is what it should be, NOT libpcap.so.1.x or libpcap.so.1.x.y or something such as that.

We've been maintaining binary compatibility between libpcap releases for quite a while; there's no reason to tie a binary linked with libpcap to a particular release of libpcap.