Save the result of the add_dev() call, so that the "#if 0" code could be
made to work. (If it can't be made to work, it should be removed, along
with the curdev variable and the assignment to it.)
Don't pass dev->flags to add_dev(), as that routine expects PCAP_IF_
flags, not IFF_ flags - and we don't have the relevant IFF_ flags anyway
(IFF_UP, IFF_RUNNING, IFF_LOOPBACK if that applies).
int pcap_platform_finddevs (pcap_if_list_t *devlistp, char *errbuf)
{
struct device *dev;
+ pcap_if_t *curdev;
#if 0 /* Pkt drivers should have no addresses */
struct sockaddr_in sa_ll_1, sa_ll_2;
struct sockaddr *addr, *netmask, *broadaddr, *dstaddr;
FLUSHK();
(*dev->close) (dev);
- if (add_dev(devlistp, dev->name, dev->flags,
- dev->long_name, errbuf) == NULL)
+ /*
+ * XXX - find out whether it's up or running? Does that apply here?
+ */
+ if ((curdev = add_dev(devlistp, dev->name, 0,
+ dev->long_name, errbuf)) == NULL)
{
ret = -1;
break;