How do you find the default gateway of a routing table using C on Linux?
I don\'t want to issue a call to the shell or read a file. There are ioctls for adding and
You will probably need to use a NETLINK_ROUTE socket, part of the PF_NETLINK family of sockets. Check out the source code of the 'ip' program part of 'iproute'. Specifically, its 'route' subcommand.