aboutsummaryrefslogtreecommitdiffstats
path: root/pcap-nit.c
diff options
context:
space:
mode:
authorguy <guy>2003-07-25 04:04:56 +0000
committerguy <guy>2003-07-25 04:04:56 +0000
commit9792990eb80889004b39ee70caa98b3d91ac8012 (patch)
tree599047dd2650b318c82f4f9832485661d8f50c3d /pcap-nit.c
parente648c9e593e7a7f0c3d031eb2e2c146de9efc67e (diff)
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.
Diffstat (limited to 'pcap-nit.c')
-rw-r--r--pcap-nit.c7
1 files changed, 4 insertions, 3 deletions
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);