Re: IOCTLs versus netlink

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

 






On Mon, Sep 2, 2013 at 1:30 AM, Kristian Evensen <kristian.evensen@xxxxxxxxx> wrote:
On Sun, Sep 1, 2013 at 3:16 PM, Greg Freemyer <greg.freemyer@xxxxxxxxx> wrote:
>
>
> Kevin Wilson <wkevils@xxxxxxxxx> wrote:
>>Hi,
>>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.

-Kristian

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

Hi,

This should give you a lot of insight http://people.ee.ethz.ch/~arkeller/linux/kernel_user_space_howto.html

- Rohan
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux