1
0
mirror of https://github.com/openbsd/src.git synced 2024-12-21 23:18:00 -08:00
openbsd-src/lib/libpcap
sthen f331ac58f8 backout scanner.l strtonum commits; they restrict numbers to INT_MAX,
breaking filter expressions like "ether[14:4]=0xaaaa0300". ok op@ deraadt@

-/--------------------------
revision 1.32
date: 2024/08/29 07:33:50;  author: anton;  state: Exp;  lines: +2 -2;  commitid: ZYtBn8qrrNNh87on;
Fix regression introduced in previous migration to strtol() by
correcting the error condition, making it on par with the example in the
manual.

ok op@
-/--------------------------
revision 1.31
date: 2024/08/28 11:40:33;  author: op;  state: Exp;  lines: +13 -31;  commitid: RirJPBPfGo9NeSE6;
libpcap: replace hand-rolled number parser with strtol

can't use strtonum here since it needs to handle octal and hex
notations as well.  Part of a larger diff that's ok beck@
-/--------------------------
2024-09-24 14:20:31 +00:00
..
bpf_image.c ANSI functions; ok tb 2024-04-05 18:01:56 +00:00
CHANGES
etherent.c ANSI functions; ok tb 2024-04-05 18:01:56 +00:00
ethertype.h Fix wrong ETHERTYPE_IPV6 2018-01-01 19:41:01 +00:00
fad-getad.c libpcap: replace atoi() usage with strtonum() 2024-08-28 11:41:42 +00:00
gencode.c remove unused variables 2024-09-15 07:14:58 +00:00
gencode.h remove prototypes with no matching function 2024-05-21 11:13:08 +00:00
grammar.y more ansi function decls 2024-04-08 02:51:14 +00:00
inet.c libpcap: replace atoi() usage with strtonum() 2024-08-28 11:41:42 +00:00
llc.h
Makefile mdoc version of pcap-filter; 2019-09-25 16:59:00 +00:00
nametoaddr.c ANSI functions; ok tb 2024-04-05 18:01:56 +00:00
optimize.c more ansi function decls 2024-04-08 02:51:14 +00:00
pcap_open_live.3 from edgar pettijohn: correct return type in pcap_open_live.3; 2020-05-29 05:51:19 +00:00
pcap-bpf.c Delete obsolete /* ARGSUSED */ lint comments. 2023-03-08 04:43:04 +00:00
pcap-filter.5 type mgtv -> mgt; from todd carson 2024-02-26 06:49:38 +00:00
pcap-int.h Import pcap_set_immediate_mode() from mainline libpcap which allows a 2018-04-05 03:47:27 +00:00
pcap-namedb.h
pcap.c Change some libpcap functions which use pointers as arguments and 2018-06-03 10:29:28 +00:00
pcap.h support PCAP_NETMASK_UNKNOWN, adapted from an old commit in upstream 2021-01-18 09:26:35 +00:00
ppp.h
README
savefile.c Allow libpcap to read files with some additional link-layer type values 2023-08-10 15:47:05 +00:00
scanner.l backout scanner.l strtonum commits; they restrict numbers to INT_MAX, 2024-09-24 14:20:31 +00:00
shlib_version crank the major cos grammar.c has grown. 2020-08-03 03:47:12 +00:00
VERSION

$OpenBSD: README,v 1.7 2014/04/11 04:08:58 lteo Exp $
$NetBSD: README,v 1.2 1995/03/06 11:38:07 mycroft Exp $

LIBPCAP 0.5
Now maintained by "The Tcpdump Group"
Send patches to patches@tcpdump.org
See 		www.tcpdump.org

formerly from 	Lawrence Berkeley National Laboratory
		Network Research Group <libpcap@ee.lbl.gov>
		ftp://ftp.ee.lbl.gov/libpcap.tar.Z (0.4)

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.

Note well: this interface is new and is likely to change.

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 is in:

	ftp://ftp.ee.lbl.gov/papers/bpf-usenix93.ps.Z.

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/386, NetBSD, and FreeBSD.  DEC OSF/1
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:

	ftp://gatekeeper.dec.com/pub/DEC/net/bpfext42.tar.Z.

Problems, bugs, questions, desirable enhancements, source code
contributions, etc., should be sent to the email address
"patches@tcpdump.org".