2001-10-08 13:52:32

by Sebastian Heidl

[permalink] [raw]
Subject: implementation of SIOCGIFFCOUNT


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_

--


2001-10-08 14:03:17

by BALBIR SINGH

[permalink] [raw]
Subject: Re: implementation of SIOCGIFFCOUNT

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_
>




Attachments:
Wipro_Disclaimer.txt (853.00 B)