Netlink Protocol Families

The Netlink protocol family has many protocol families. Some of them have been deprecated and some are presently as of the date of this article present in the Linux Kernel. The list (as of Linux 6.13.2) provides the reader in knowing the different protocol families available (I do not claim to know what each of them does individually myself 🙂 )The protocol families are tabulated below. 

Netlink Protocol FamilyDescription
NETLINK_ROUTEReceives routing and link updates and may be used to modify routing tables
NETLINK_UNUSEDUnused netlink family
NETLINK_USERSOCKReserved for user space IPC between different user space applications using NETLINK socket
NETLINK_FIREWALL(Up to and including Linux 3.4) Transport IPv4 packets from netfilter to user space.  Used by ip_queue kernel module. After a long period of being declared obsolete (in favor of the more advanced nfnetlink_queue feature), NETLINK_FIREWALL was removed in Linux 3.5.
NETLINK_SOCK_DIAG(Since Linux 3.3) Query information about sockets of various protocol families from the kernel (see sock_diag(7)).
NETLINK_NFLOG(Up to and including Linux 3.16) Netfilter/iptables ULOG.
NETLINK_XFRMProvides an interface to manage the IPsec security association and security policy databases – mostly used by key-manager daemons using the Internet Key Exchange protocol. (From Wikipedia)
NETLINK_SELINUXSELinux notifications- refer wikipedia page – Wikipedia -SELinux
NETLINK_ISCSIUsed for IPC between open-iscsi daemon ) and the Linux kernel’s iSCSI transport module. It facilitates the control plane, such as configuring sessions, logging in/out of targets, and setting parameters, while the actual data path (read/write) remains in the kernel
NETLINK_AUDITProvides an interface to the audit subsystem found in Linux kernel versions 2.6.6 and later.
NETLINK_FIB_LOOKUP(Since Linux 2.6.13) Access to FIB lookup from user space
NETLINK_CONNECTOR(Since Linux 2.6.14) Kernel connector.  See Documentation/driver-api/connector.rst (or /Documentation/connector/connector.*  in kernel 5.2 and earlier) in the Linux kernel source tree for further information.
NETLINK_NETFILTER(Since Linux 2.6.14) Netfilter subsystem.
NETLINK_IP6_FW(Up to and including Linux 3.4) Transport IPv6 packets from netfilter to user space.  Used by ip6_queue kernel module.
NETLINK_DNRT_MSGDECnet routing messages.
NETLINK_KOBJECT_UEVENT(Since Linux 2.6.10) Kernel messages to user space.
NETLINK_GENERIC(Since Linux 2.6.15) Generic netlink family for simplified netlink usage.
NETLINK_SCSITRANSPORTLinux Netlink family (protocol) used to transmit asynchronous SCSI transport-related events between the Linux kernel (specifically the SCSI mid-layer and low-level drivers) and user-space process
NETLINK_ECRYPTFSComponent of the eCryptfs (enterprise cryptographic filesystem) stack in Linux, designed to handle communication between the eCryptfs kernel module and a user-space daemon
NETLINK_RDMA(Introduced in Linux 3.0) Netlink socket family used to facilitate communication between the Linux kernel and user-space applications regarding InfiniBand (IB) and Remote Direct Memory Access (RDMA) subsystems. It is part of the broader Linux RDMA stack that allows high-performance
NETLINK_CRYPTO(Since Linux 3.2) Netlink interface to request information about ciphers registered with the kernel crypto API as well as allow configuration of the kernel crypto API.
NETLINK_SMCNetlink protocol family in the Linux kernel used for communication between user-space applications and the SMC (Shared Memory Communications) subsystem. It facilitates the management, configuration, and monitoring of SMC-R (over RDMA) and SMC-D (over ISM/internal shared memory) sockets.
NETLINK_INET_DIAG Linux kernel Netlink family used to query information about internet sockets (TCP, UDP, etc.) from the kernel. It is essentially a specialized, high-performance interface for obtaining detailed socket diagnostics, often used by tools like ss (socket statistics) to replace the slower, text-based /proc/net/tcp or /proc/net/udp files.

Understanding GENERIC_NETLINK interface

Comments

  1. Pingback: Netlink Message Macros | Hitch Hiker's Guide to Learning

Leave a Reply

Your email address will not be published. Required fields are marked *