From 9792990eb80889004b39ee70caa98b3d91ac8012 Mon Sep 17 00:00:00 2001 From: guy Date: Fri, 25 Jul 2003 04:04:56 +0000 Subject: Add a "stats" function pointer to the pcap_t structure, which handles getting statistics for a pcap_t. Have "pcap_stats()" call it, rather than being a per-platform function; have stats routines for non-live pcap_t's that return an error. --- pcap-nit.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'pcap-nit.c') diff --git a/pcap-nit.c b/pcap-nit.c index 1c0117f..2be8e79 100644 --- a/pcap-nit.c +++ b/pcap-nit.c @@ -20,7 +20,7 @@ */ #ifndef lint static const char rcsid[] = - "@(#) $Header: /tcpdump/master/libpcap/pcap-nit.c,v 1.45 2003-07-25 03:25:46 guy Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/libpcap/pcap-nit.c,v 1.46 2003-07-25 04:04:58 guy Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H @@ -71,8 +71,8 @@ static const char rcsid[] = /* Forwards */ static int nit_setflags(int, int, int, char *); -int -pcap_stats(pcap_t *p, struct pcap_stat *ps) +static int +pcap_stats_nit(pcap_t *p, struct pcap_stat *ps) { /* @@ -260,6 +260,7 @@ pcap_open_live(const char *device, int snaplen, int promisc, int to_ms, goto bad; } + p->stats_op = pcap_stats_nit; p->close_op = pcap_close_nit; return (p); -- cgit v1.2.3