]> The Tcpdump Group git mirrors - libpcap/blobdiff - pcap-dos.c
pcap_create_interface() needs the interface name on Linux.
[libpcap] / pcap-dos.c
index 19f69e5da6140193baf428626f19c157852d6c6a..ea6b225a23efaa6bacb607223955262ce968cdcb 100644 (file)
@@ -149,11 +149,11 @@ struct pcap_dos {
        struct pcap_stat stat;
 };
 
-pcap_t *pcap_create_interface (const char *device, char *ebuf)
+pcap_t *pcap_create_interface (const char *device _U_, char *ebuf)
 {
        pcap_t *p;
 
-       p = pcap_create_common(device, ebuf, sizeof (struct pcap_dos));
+       p = pcap_create_common(ebuf, sizeof (struct pcap_dos));
        if (p == NULL)
                return (NULL);
 
@@ -194,18 +194,18 @@ static int pcap_activate_dos (pcap_t *pcap)
 
   if (pcap->fd == 1)  /* first time we're called */
   {
-    if (!init_watt32(pcap, pcap->opt.source, pcap->errbuf) ||
-        !first_init(pcap->opt.source, pcap->errbuf, pcap->opt.promisc))
+    if (!init_watt32(pcap, pcap->opt.device, pcap->errbuf) ||
+        !first_init(pcap->opt.device, pcap->errbuf, pcap->opt.promisc))
     {
       return (PCAP_ERROR);
     }
     atexit (close_driver);
   }
-  else if (stricmp(active_dev->name,pcap->opt.source))
+  else if (stricmp(active_dev->name,pcap->opt.device))
   {
     pcap_snprintf (pcap->errbuf, PCAP_ERRBUF_SIZE,
                    "Cannot use different devices simultaneously "
-                   "(`%s' vs. `%s')", active_dev->name, pcap->opt.source);
+                   "(`%s' vs. `%s')", active_dev->name, pcap->opt.device);
     return (PCAP_ERROR);
   }
   handle_to_device [pcap->fd-1] = active_dev;