RE: ioctl call for network device

From: Hen, Shmulik (shmulik.hen@intel.com)
Date: Tue May 08 2001 - 06:52:40 EST


> struct ifreq has a member called ifr_data. It is a pointer. You can
> put a pointer to any of your data, including the most complex structure
> you might envision, in that area. This allows you to pass anything
> to and from your module. This pointer can be properly dereferenced
> in kernel space but you should use copy_to/from_user and friends so a
> user-space coding bug won't panic the kernel.

How about a linked list ?
Will the driver be able to follow the list where each node was dynamically
allocated by the application ?
Is there a size limit on the buffer ifr_data points to ? (AFAIK, Windows
NDIS drivers limit to 1 page buffer =4096 bytes).

        Thanks,

        Shmulik Hen
        Linux Advanced Networking Services
        Intel Network Communications Group

-
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 : Tue May 15 2001 - 21:00:12 EST