*/
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/libpcap/pcap-bpf.c,v 1.86.2.5 2005-07-05 22:14:06 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/libpcap/pcap-bpf.c,v 1.86.2.6 2005-07-05 22:33:16 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
#include "gencode.h" /* for "no_optimize" */
static int pcap_setfilter_bpf(pcap_t *p, struct bpf_program *fp);
-static int pcap_setdirection_bpf(pcap_t *, pcap_direction_t);
+static int pcap_setdirection_bpf(pcap_t *, direction_t);
static int pcap_set_datalink_bpf(pcap_t *p, int dlt);
static int
* single device? IN, OUT or both?
*/
static int
-pcap_setdirection_bpf(pcap_t *p, pcap_direction_t d)
+pcap_setdirection_bpf(pcap_t *p, direction_t d)
{
#ifdef BIOCSSEESENT
u_int seesent;
#endif
/*
- * We don't support PCAP_D_OUT.
+ * We don't support D_OUT.
*/
- if (d == PCAP_D_OUT) {
+ if (d == D_OUT) {
snprintf(p->errbuf, sizeof(p->errbuf),
- "Setting direction to PCAP_D_OUT is not supported on BPF");
+ "Setting direction to D_OUT is not supported on BPF");
return -1;
}
#ifdef BIOCSSEESENT
- seesent = (d == PCAP_D_INOUT);
+ seesent = (d == D_INOUT);
if (ioctl(p->fd, BIOCSSEESENT, &seesent) == -1) {
(void) snprintf(p->errbuf, sizeof(p->errbuf),
"Cannot set direction to %s: %s",
- (d == PCAP_D_INOUT) ? "PCAP_D_INOUT" : "PCAP_D_IN",
+ (d == D_INOUT) ? "D_INOUT" : "D_IN",
strerror(errno));
return (-1);
}