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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

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

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux