title: How to setup multiple routing entries for socket?
body: <p>I am very new to static routing, our client requested to implement static routing for sockets. When I googled I came across with <code>rtentry</code> to set routing information. When I opened this structure I saw the fields for static routing</p>
  
  <pre><code>struct sockaddr rt_dst;     /* Target address.  */
  struct sockaddr rt_gateway;     /* Gateway addr (RTF_GATEWAY).  */
  struct sockaddr rt_genmask;     /* Target network mask (IP).  */
  </code></pre>
  
  <p>But how can I setup multiple entry here?
  creating multiple <code>rtentry</code> and calling <code>ioctl(FileDes, SIOCADDRT, &amp;rtentry)</code> will fix my problem?</p>
  
  <pre><code>int32_t FileDes = socket(PF_INET, SOCK_DGRAM, IPPROTO_IP);
  for(auto RtEntry : RtEntriesList)
  {
     ioctl(FileDes, SIOCADDRT, RtEntry)`
  }
  </code></pre>
  
  <p>If I configure, how can I test this? It will be helpful if you can provide a link to know more about these things.</p>