]> The Tcpdump Group git mirrors - libpcap/blobdiff - pcap-bpf.c
0.9's already been released, so, for better or worse, we're stuck with
[libpcap] / pcap-bpf.c
index 78ad1d70777a1994788b2e9a7cb944fe0faa5c6b..b221ac6fcd2f97a2697afef388bc534323096c85 100644 (file)
@@ -20,7 +20,7 @@
  */
 #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
@@ -105,7 +105,7 @@ static int odmlockid = 0;
 #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
@@ -1095,26 +1095,26 @@ pcap_setfilter_bpf(pcap_t *p, struct bpf_program *fp)
  * 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);
        }