A somewhat outdated article Why and How to Use Netlink Socket (Source, 2005) inspired me to create up to date examples and more:
- Netlink Unicast Example
- Netlink Multicast Example
- Netlink Unicast Example (Linux network namespace aware)
These should work for Linux kernel versions >= 3.6.