Last time we talked about getting a Linux routing table with a simple Netlink code. Now it’s time to do more interesting stuff. Let’s add and delete some routes using the power of the Netlink!
Tag: netlink
Getting Linux routing table using netlink
In the previous article, we discussed the monitoring of the network interfaces using Netlink. Now it’s time to do something more complex and interesting. Let’s discover how to get and print the system routing table like “ip route” command.
Monitoring Linux networking state using netlink
Once in my work, I needed to monitor all changes in the Linux networking subsystem: adding or deleting IP addresses, routes, etc. Maybe the best way to do this is to use socket-based Netlink technology. Using Netlink, we can “subscribe” to some network-related notifications from the kernel. It’s also possible to send commands to the network stack and change the…