The Netlink socket mechanism might be better placed in the socket programming section. However, the Netlink mechanism being a socket mechanism which is used to converse with the kernel, placing it here.
The Netlink Socket is a mechanism to retrieve and send data between user space and kernel space. The Netlink socket has its own address family AF_NETLINK .
The Netlink socket was introduced to standardize access to various kernel modules from user space programs. Before Netlink sockets were available – access to kernel space was via various IOCTL calls, system calls. and various procfs files. This led to dependencies on various kernel releases and features. The introduction of Netlink sockets allowed the user space programs to query the kernel in a more standardized way. The previous methods of accessing the kernel space are still available but however, the netlink sockets are a newer and more standardized form of accessing the Linux kernel.
The Netlink socket can be utilized to perform Inter Process Communication as well.
In the following articles, we will look at how Netlink Socket structures and APIs are used and look at networking using netlink sockets.