Stable release | 4.12.3 (21 July 2017 | )
---|---|
Preview release | 4.13-rc2 (23 July 2017 | )
Operating system | Linux |
Platform | Linux kernel |
Type | Application programming interface |
License | GNU General Public License |
Website | www |
Netlink socket family is a Linux kernel interface used for inter-process communication (IPC) between both the kernel and userspace processes, and between different userspace processes, in a way similar to the Unix domain sockets. Similarly to the Unix domain sockets, and unlike INET sockets, Netlink communication cannot traverse host boundaries. However, while the Unix domain sockets use the file system namespace, Netlink processes are addressed by process identifiers (PIDs).
Netlink is designed and used for transferring miscellaneous networking information between the kernel space and userspace processes. Networking utilities, such as the iproute2 family and the utilities used for configuring mac80211-based wireless drivers, use Netlink to communicate with the Linux kernel from userspace. Netlink provides a standard socket-based interface for userspace processes, and a kernel-side API for internal use by kernel modules. Originally, Netlink used the AF_NETLINK socket family.
Netlink is designed to be a more flexible successor to ioctl; RFC 3549 describes the protocol in detail.
Netlink was created by Alexey Kuznetsov as a more flexible alternative to the sophisticated but awkward ioctl
communication method used for setting and getting external socket options. The Linux kernel continues to support ioctl
for backward compatibility. It can be used as follows: