aboutsummaryrefslogtreecommitdiff
path: root/pcap-pf.c
diff options
context:
space:
mode:
authorguy <guy>2004-10-19 07:06:11 +0000
committerguy <guy>2004-10-19 07:06:11 +0000
commite5aebee6d80c8909048dc1ce865e9adb97d94fd7 (patch)
tree77b64a0b8528dc128ac9f7c319e58a2b3ca8b565 /pcap-pf.c
parent4b1ac36c836ee326f778742bc28dd3b374702281 (diff)
Add a "pcap_close_common()" routine which can be used as the close
routine for some pcap-XXX.c files and can be called by the close routine in other pcap-XXX.c files.
Diffstat (limited to 'pcap-pf.c')
-rw-r--r--pcap-pf.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/pcap-pf.c b/pcap-pf.c
index 3a59083f..ddd20abd 100644
--- a/pcap-pf.c
+++ b/pcap-pf.c
@@ -24,7 +24,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/libpcap/pcap-pf.c,v 1.87 2004-03-23 19:18:06 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/libpcap/pcap-pf.c,v 1.88 2004-10-19 07:06:13 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
@@ -279,15 +279,6 @@ pcap_stats_pf(pcap_t *p, struct pcap_stat *ps)
return (0);
}
-static void
-pcap_close_pf(pcap_t *p)
-{
- if (p->buffer != NULL)
- free(p->buffer);
- if (p->fd >= 0)
- close(p->fd);
-}
-
/*
* We include the OS's <net/bpf.h>, not our "pcap-bpf.h", so we probably
* don't get DLT_DOCSIS defined.
@@ -501,7 +492,7 @@ your system may not be properly configured; see the packetfilter(4) man page\n",
p->getnonblock_op = pcap_getnonblock_fd;
p->setnonblock_op = pcap_setnonblock_fd;
p->stats_op = pcap_stats_pf;
- p->close_op = pcap_close_pf;
+ p->close_op = pcap_close_common;
return (p);
bad: