title: Why the route items in the route table(fetched via netlink socket) doesn't have netmask info?
body: <p>I'm writing a program to find out which network interface is the best to connect to a specified target address.  </p>
  
  <p>Right now, I can get the route table via <code>netlink</code> socket APIs, but seems there is no netmask infos in it. I read the manual of <code>rtnetlink</code>, in all <code>rtattr</code> items, there is no netmask infos, just <code>RTA_DST</code>, <code>RTA_SRC</code>, <code>RTA_GATEWAY</code>... defined.</p>
  
  <p>So, how to check out the netmask infos in route table? Just like we can see in <code>route -n</code> outputs.</p>
  
  <p>Thanks a lot.</p>