summaryrefslogtreecommitdiff
path: root/pcap-snit.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-snit.c
parente648c9e593e7a7f0c3d031eb2e2c146de9efc67e (diff)
downloadlibpcap-9792990eb80889004b39ee70caa98b3d91ac8012.tar.gz
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-snit.c')
-rw-r--r--pcap-snit.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/pcap-snit.c b/pcap-snit.c
index 3426c0d9..f3280bd7 100644
--- a/pcap-snit.c
+++ b/pcap-snit.c
@@ -25,7 +25,7 @@
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/libpcap/pcap-snit.c,v 1.61 2003-07-25 03:25:47 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/libpcap/pcap-snit.c,v 1.62 2003-07-25 04:04:59 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
@@ -84,8 +84,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_snit(pcap_t *p, struct pcap_stat *ps)
{
/*
@@ -318,6 +318,7 @@ pcap_open_live(const char *device, int snaplen, int promisc, int to_ms,
goto bad;
}
+ p->stats_op = pcap_stats_snit;
p->close_op = pcap_close_snit;
return (p);