[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: stop ifnet ioctl (ab)use in the kernel, step 1
On Fri, Mar 11, 2011 at 12:13:48PM -0500, der Mouse wrote:
> > The network protocols and some drivers use ioctls to manipulate ifnet
> > flags, to add/delete multicast addresses, and to initialize ifaddrs.
> > I'd like to stop that before I tackle some [other stuff].
> What is the perceived need being addressed here? Do you just find
> if()_ioctl ugly compared to adding more function pointers to struct
> ifnet? Is the if_ioctl() way actually causing some trouble somewhere?
> Something else?
The if_ioctl() way leads to recursion that makes synchronizing ioctls a
worse PITA than it needs to be.
The if_ioctl() way requires lines of code that marshal arguments into an
ifreq (say) and then cast them to (void *). It's more error-prone and a
lot less type-safe than it could be.
David Young OJC Technologies
dyoung%ojctech.com@localhost Urbana, IL * (217) 344-0444 x24
Main Index |
Thread Index |