From 8093f5e607f42cbabe8359e77f8982ec908b2bac Mon Sep 17 00:00:00 2001 From: Lawrence Teo Date: Fri, 25 May 2012 01:58:09 +0000 Subject: 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 --- lib/libpcap/savefile.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/libpcap/savefile.c') 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) { -- cgit v1.2.3