Netlink is a communication protocol defined in RFC 3549. It is async, TLV-based protocol, providing 1-1 and 1-many communications between kernel and userland. Netlink is currently used in Linux kernel to modify, read and subscribe for nearly all networking states. Interface state, addresses, routes, firewall, rules, fibs, etc, are controlled via Netlink.
Netlink support was added in D36002. It has got a number of improvements and first customers since then.
- First third-party application - net/bird2 got netlink support
- There is WIP for netlink-based devd notifications in D37574.
- Linux(4) now depends on netlink.
Netlink in GENERIC
I would like to enable it in GENERIC for two reasons.
The first one is to provide some stability for the third-party userland applications, so they can rely on the fact that netlink always exists since 14/13.2. Loadable module makes it notably harder to account for. For example, net/bird2 can be either build with netlink or rtsock support.
The second one is to enable the gradual conversion of the base userland tools to use netlink(4) interfaces. Converting tools like netstat (D36529), route, ifconfig one-by-one simplifies the testing/fixing cycle. Othewise, switching all base to use netlink at once may be too big of a leap.