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);
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;
* The list, as returned through "alldevsp", may be NULL if no interfaces
* were up and could be opened.
*/
-int pcap_findalldevs_interfaces (pcap_if_t **alldevsp, char *errbuf)
+int pcap_platform_finddevs (pcap_if_t **alldevsp, char *errbuf)
{
struct device *dev;
struct sockaddr_in sa_ll_1, sa_ll_2;
return (ret);
}
-/*
- * platform-dependent routine to add devices or interfaces.
- * We don't have any, so just return 0.
- */
-int pcap_platform_finddevs (pcap_if_t **alldevsp, char *errbuf)
-{
- (void) alldevsp;
- (void) errbuf;
- return (0);
-}
-
/*
* pcap_assert() is mainly used for debugging
*/