title: Default Gateway in C on Linux
body: <p>How do you find the default gateway of a routing table using C on Linux?</p>
  
  <p>I don't want to issue a call to the shell or read a file.  There are ioctls for adding and deleteing routes (SIOCADDRT, SIOCDELRT) and I've found on reference to getting routes (SIOCGRTCONF) but it seems that the version of the kernel I'm using doesn't support SIOCGRTCONF.</p>