Re: implementation of SIOCGIFFCOUNT

From: BALBIR SINGH (balbir.singh@wipro.com)
Date: Mon Oct 08 2001 - 09:03:40 EST


Pass '0' as the size argument and u will get the total size (sizeof struct * number of interfaces)
back. The only thing is u have to make two calls, which u would do anyway.

Balbir

Sebastian Heidl wrote:

>Hi,
>
>is there a specific reason for SIOCGIFCOUNT not being implemented
>in the kernel ? All occurences lead to net/core/dev.c dev_ioctl(...)
>which just returns -EINVAL for this command. So one has to guess
>the number of struct ifreq structures to pass to a SIOCGIFCONF
>call.
>
>enlighten me, please ;-)
>_sh_
>



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



This archive was generated by hypermail 2b29 : Mon Oct 15 2001 - 21:00:17 EST