X-Git-Url: https://git.tcpdump.org/libpcap/blobdiff_plain/852d376fb7942659e73578feeb46e78c86adbc23..cc3ca65d6519faf3a0e4609b5150757c14af36e9:/pcap-dos.c diff --git a/pcap-dos.c b/pcap-dos.c index 19f69e5d..ea6b225a 100644 --- a/pcap-dos.c +++ b/pcap-dos.c @@ -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;