IOCTLs versus netlink
kristian.evensen at gmail.com
Sun Sep 1 16:00:57 EDT 2013
On Sun, Sep 1, 2013 at 3:16 PM, Greg Freemyer <greg.freemyer at gmail.com> wrote:
> Kevin Wilson <wkevils at gmail.com> wrote:
>>Can someone please explain why are netlink sockets a better
>>communication method between kernel space and userspace ?
Another reason is to make things easier to extend. Adding a parameter
to a netlink message is as easy as adding an additional netlink
attribute. User space applications that has not been updated to
support your change, will not see this parameter as it is unknown to
them when processing the attributes. Extending an ioctl would mean
adding new paramteres to the struct that is passed to/from the kernel,
which will cause all kinds of problems. For example, how to avoid
overflows when returning it to user space.
More information about the Kernelnewbies