summaryrefslogtreecommitdiff
path: root/pcap-null.c
diff options
context:
space:
mode:
authorguy <guy>2003-07-25 04:42:02 +0000
committerguy <guy>2003-07-25 04:42:02 +0000
commitcd2807e08d02de68b766ed88acf3bfd3b54b2a24 (patch)
tree32510d11551eab43465b88894a38d7b627eb1413 /pcap-null.c
parent9792990eb80889004b39ee70caa98b3d91ac8012 (diff)
downloadlibpcap-cd2807e08d02de68b766ed88acf3bfd3b54b2a24.tar.gz
Add a "setfilter" function pointer to the pcap_t structure, which
handles setting a filter for a pcap_t. Have "pcap_setfilter()" call it, rather than being a per-platform function. The per-platform functions don't need to check for an offline capture any more, as they're not called for an offline capture (and the ones that just call "install_bpf_program()" don't need to exist at all).
Diffstat (limited to 'pcap-null.c')
-rw-r--r--pcap-null.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/pcap-null.c b/pcap-null.c
index 67f2a604..6f6788d9 100644
--- a/pcap-null.c
+++ b/pcap-null.c
@@ -20,7 +20,7 @@
*/
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/libpcap/pcap-null.c,v 1.17 2003-07-25 04:04:58 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/libpcap/pcap-null.c,v 1.18 2003-07-25 04:42:03 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
@@ -61,19 +61,6 @@ pcap_platform_finddevs(pcap_if_t **alldevsp, char *errbuf)
}
int
-pcap_setfilter(pcap_t *p, struct bpf_program *fp)
-{
- if (p->sf.rfile == NULL) {
- (void)snprintf(p->errbuf, sizeof(p->errbuf),
- "pcap_setfilter: %s", nosup);
- return (-1);
- }
- if (install_bpf_program(p, fp) < 0)
- return (-1);
- return (0);
-}
-
-int
pcap_set_datalink_platform(pcap_t *p, int dlt)
{
return (0);