Re: [Re: problem with ioctl in 2.2.14 kernel..]

From: Raghavendra Bhat (mr.raghu@usa.net)
Date: Thu Apr 13 2000 - 14:30:40 EST


Thanks for your reply.

We have already used the ifconfig code to fix the problem for our application.
Ifconfig reads it from /proc/net/dev and enquires with the kernel to know
whether the interface is active or not. But I was curious about whether it is
a bug or feature of ioctl in 2.2.14.

In the 2.0.36, there was an IP address field in the ifconf structure which is
absent in 2.2.14. So even if you were not assigning an IP address to an
interface (2.0.36) a default IP address was getting assigned as a result of
which ioctl was listing it. But it is different in 2.2.14 with that ipaddress
field absent.

Thanks again,
Raghu

Andreas Dilger <adilger@home.com> wrote:
> You write:
> > In the 2-2-14 kernel, an ioctl call with request type SIOCGIFCONF (for
that
> > matter any request type) returns only those interfaces which have a valid
IP
> > address. We have an application which was coded for 2.0.36 kernel. This
> > particular kernel does return even the interfaces without an IP address.
As we
> > are porting this application to 2.2.14, is there any way in which ioctl
call
> > can be returning even the interfaces without an IP address. Certainly we
can
> > work around this by reading the/proc/net/dev or the output of ifconfig
> > (Ifconfig on 2.2.14 returns interfaces without IP address). But is there
any
> > other solution with which the ioctl itself returns it.
>
> I don't know which ioctl is the correct one, but if ifconfig can do it
> correctly, maybe look at the ifconfig source code and see what it does...
>
> Cheers, Andreas
> --
> Andreas Dilger \ "If a man ate a pound of pasta and a pound of antipasto,
> \ would they cancel out, leaving him still hungry?"
> http://www-mddsp.enel.ucalgary.ca/People/adilger/ -- Dogbert

____________________________________________________________________
Get free email and a permanent address at http://www.netaddress.com/?N=1

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Apr 15 2000 - 21:00:22 EST