<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Using ioctl() to add an entry to TCPIP routing table in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/using-ioctl-to-add-an-entry-to-tcpip-routing-table/m-p/4322639#M44948</link>
    <description>Is anyone familiar with using ioctl() in C to add or delete an entry in the TCPIP routing table? I have the call set as follows:&lt;BR /&gt;&lt;BR /&gt;status = ioctl( sock_id, SIOCADDRT, &amp;amp;rt_entry)&lt;BR /&gt;&lt;BR /&gt;rt_entry is a structure I found in TCPIP$EXAMPLES. I am not sure if it is the correct structure to use since I did not find it anywhere else defined. When I call the ioctl() function I get "Invalid argument". Could someone please tell me what the correct format of the structure is suppose to be. Also is there a way to specify the network mask for the routing IP address in the ioctl function?</description>
    <pubDate>Fri, 12 Dec 2008 19:20:53 GMT</pubDate>
    <dc:creator>Brian Lindauer</dc:creator>
    <dc:date>2008-12-12T19:20:53Z</dc:date>
    <item>
      <title>Using ioctl() to add an entry to TCPIP routing table</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/using-ioctl-to-add-an-entry-to-tcpip-routing-table/m-p/4322639#M44948</link>
      <description>Is anyone familiar with using ioctl() in C to add or delete an entry in the TCPIP routing table? I have the call set as follows:&lt;BR /&gt;&lt;BR /&gt;status = ioctl( sock_id, SIOCADDRT, &amp;amp;rt_entry)&lt;BR /&gt;&lt;BR /&gt;rt_entry is a structure I found in TCPIP$EXAMPLES. I am not sure if it is the correct structure to use since I did not find it anywhere else defined. When I call the ioctl() function I get "Invalid argument". Could someone please tell me what the correct format of the structure is suppose to be. Also is there a way to specify the network mask for the routing IP address in the ioctl function?</description>
      <pubDate>Fri, 12 Dec 2008 19:20:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/using-ioctl-to-add-an-entry-to-tcpip-routing-table/m-p/4322639#M44948</guid>
      <dc:creator>Brian Lindauer</dc:creator>
      <dc:date>2008-12-12T19:20:53Z</dc:date>
    </item>
    <item>
      <title>Re: Using ioctl() to add an entry to TCPIP routing table</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/using-ioctl-to-add-an-entry-to-tcpip-routing-table/m-p/4322640#M44949</link>
      <description>&lt;!--!*#--&gt;I've not had occasion to have to add an entry to the routing table but it appears that your rt_entry structure should look like the rtentry structure in SYS$COMMON:[SYSHLP.EXAMPLES.TCPIP.LIBPCAP]ROUTE.H. The mask is defined by rt_mask field within this structure.&lt;BR /&gt;&lt;BR /&gt;struct rtentry {&lt;BR /&gt;        struct  radix_node rt_nodes[2]; /* tree glue, and other values */&lt;BR /&gt;#define rt_key(r)       ((struct sockaddr *)((r)-&amp;gt;rt_nodes-&amp;gt;rn_key))&lt;BR /&gt;#define rt_mask(r)      ((struct sockaddr *)((r)-&amp;gt;rt_nodes-&amp;gt;rn_mask))&lt;BR /&gt;        struct  sockaddr *rt_gateway;   /* value */&lt;BR /&gt;        int     rt_flags;               /* up/down?, host/net */&lt;BR /&gt;        int     rt_refcnt;              /* # held references */&lt;BR /&gt;        u_long  rt_use;                 /* raw # packets forwarded */&lt;BR /&gt;        struct  ifnet *rt_ifp;          /* the answer: interface to use */&lt;BR /&gt;        struct  ifaddr *rt_ifa;         /* the answer: interface to use */&lt;BR /&gt;        struct  sockaddr *rt_genmask;   /* for generation of cloned routes */&lt;BR /&gt;        caddr_t rt_llinfo;              /* pointer to link level info cache */&lt;BR /&gt;        struct  rt_metrics rt_rmx;      /* metrics used by rx'ing protocols */&lt;BR /&gt;        short   rt_idle;                /* easy to tell llayer still live */&lt;BR /&gt;        short   rt_aliasid;             /* cluster aliasid id of dst */&lt;BR /&gt;        u_int   rt_precedence;          /* precedence */&lt;BR /&gt;#if SEC_NET&lt;BR /&gt;        struct tnrh_rem_host *rt_host;  /* Remote host structure. */&lt;BR /&gt;#endif&lt;BR /&gt;        struct  rtentry *rt_gwroute;    /* entry for gateway route */&lt;BR /&gt;        struct mip6_binding_cache *rt_mip6cache;/* ptr to Mobile IPv6 binding */&lt;BR /&gt;        u_long  rt_reserved[5];         /* reserved for future use */&lt;BR /&gt;};&lt;BR /&gt;</description>
      <pubDate>Fri, 12 Dec 2008 21:01:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/using-ioctl-to-add-an-entry-to-tcpip-routing-table/m-p/4322640#M44949</guid>
      <dc:creator>Jim_McKinney</dc:creator>
      <dc:date>2008-12-12T21:01:04Z</dc:date>
    </item>
  </channel>
</rss>

