Netlink Sockets: Addind a new socket family

Kernel version 3.13, Ubuntu 14.04 $ uname -a Linux ubuntu 3.13.0-37-generic #64-Ubuntu SMP Mon Sep 22 21:28:38 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux We need two changes: User space Locate the file "netlink.h" $ sudo locate "netlink.h" You would get the header file at "/usr/include/linux/netlink.h" Add the new family #define NETLINK_MY     17 Keep…

Netlink Sockets: Linux Kernel-User communication (PART I)

Ubuntu 14.04, Kernel version 3.11 Netlink sockets provide full duplex, asynchronous, low-overhead communication channel between user-kernel space processes. Other solutions such as ioctl(), sysfs, UDP sockets are either blocking (hence expensive) or slow (UDP has more overhead compared to Netlink) and complex. Netlink can carry data buffers on a return trip from kernel to user…

%d bloggers like this: