Getting the Gateway Link Layer Address Using RTNetlink
In my networking application I need to get the MAC address of the default gateway. One way to do this is parsing the relevant files in
/proc/net, but this is not an elegant solution.
Instead, I use the network configuration interface to the linux kernel:
rtnetlink. To get familiar ...