supporting more than 16 device-specific ioctls by a network driver

From: Rajeevalochan
Date: Tue Mar 30 2004 - 22:29:49 EST


hi,

I am developing a network driver for gigabit ethernet card on linux as a
loadable module. If the driver has to export ioctls to appication layer, how
does the control transferred to the driver module? How to select the ioctl
command values for device specific ioctls?

With reference to the kernel source at net/ipv4/af_inet.c,

static int inet_ioctl(struct socket *sock, unsigned int cmd, unsigned long
arg)
{
...
...
...

default:
if ((cmd >= SIOCDEVPRIVATE) &&
(cmd <= (SIOCDEVPRIVATE + 15)))
return(dev_ioctl(cmd,(void *) arg));

...
...
...
}

does the above source means that there can be only 16 device specific ioclts
possible, starting from (SIOCDEVPRIVATE) to (SIOCDEVPRIVATE+15)? what should
be done if the driver has to support more than 16 ioclts?

thanks in advance for the reply,

regards,
Rajeevalochan Ramaswamy

-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html