Reputation: 81
I use ioctl()
to set the gateway address (SIOCADDRT
with RTF_GATEWAY
in the flags).
What's the standard ioctl routine to retrieve it?
Upvotes: 3
Views: 9147
Reputation: 110
My understanding is that there is no 'standard ioctl routine' to get the gateway address in a cross-platform-friendly fashion. On Linux you might consider looking at using Netlink sockets, as described in this post.
Upvotes: 1