diff options
author | Lawrence Teo <lteo@cvs.openbsd.org> | 2012-05-25 01:58:09 +0000 |
---|---|---|
committer | Lawrence Teo <lteo@cvs.openbsd.org> | 2012-05-25 01:58:09 +0000 |
commit | 8093f5e607f42cbabe8359e77f8982ec908b2bac (patch) | |
tree | e8e8a3293ceb69d286241fb70129b56c28cbdb86 /lib/libpcap/savefile.c | |
parent | 69f23bc61c36de2f09f0f566e98df6fce92c6571 (diff) |
Import a number of core functions from libpcap-1.2.0 while preserving
local changes: strncpy() -> strlcpy(), malloc(x * y) -> calloc(x, y),
exclude cross-platform cruft, etc.
The new functions are pcap_create(), pcap_set_snaplen(),
pcap_set_promisc(), pcap_can_set_rfmon(), pcap_set_rfmon(),
pcap_set_timeout(), pcap_set_buffer_size(), pcap_activate(), and
pcap_statustostr().
This diff was tested on amd64, i386, macppc, and sparc64, where
regression tests were done on various pcap-based ports (especially amd64
and i386 where regression tests were run on all pcap-based ports).
Testers also tried running pcap-based ports that they are familiar with
to ensure that there is no behavioral change. tcpdump and pflogd in
base were also tested by different testers. The new pcap_* functions
were tested with a proof-of-concept Snort 2.9 port for many months.
Thank you to everyone who helped test this diff and provided feedback:
haesbaert@, sthen@, matthew@, gonzalo@, brett@, Rodolfo Gouveia,
Aaron Bieber, Markus Lude, and Ray Percival.
ok haesbaert sthen henning
Diffstat (limited to 'lib/libpcap/savefile.c')
-rw-r--r-- | lib/libpcap/savefile.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libpcap/savefile.c b/lib/libpcap/savefile.c index e9ccefff3c0..c0527bacf3b 100644 --- a/lib/libpcap/savefile.c +++ b/lib/libpcap/savefile.c @@ -1,4 +1,4 @@ -/* $OpenBSD: savefile.c,v 1.9 2006/03/26 20:58:51 djm Exp $ */ +/* $OpenBSD: savefile.c,v 1.10 2012/05/25 01:58:08 lteo Exp $ */ /* * Copyright (c) 1993, 1994, 1995, 1996, 1997 @@ -395,6 +395,7 @@ pcap_dump_ftell(pcap_dumper_t *p) return (ftell((FILE *)p)); } +int pcap_dump_flush(pcap_dumper_t *p) { |