⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 routelib.html

📁 vxworks相关论文
💻 HTML
📖 第 1 页 / 共 2 页
字号:
VxWorks would distinguish among these routes based on factors such as the netmask or the type of service.  Thus, it is perfectly legal to say:<pre>    -&gt; mRouteAdd ("90.0.0.0", "91.0.0.3", 0xffffff00, 0, 0);    -&gt; mRouteAdd ("90.0.0.0", "91.0.0.254", 0xffff0000, 0, 0);</pre>This adds two routes to the same network, "90.0.0.0", that go by twodifferent gateways.  The differentiating factor is the netmask.<p>This routine adds a route of type <b>M2_ipRouteProto_other</b>, which is astatic route.  This route will not be modified or deleted until acall to <b><i><a href="./routeLib.html#mRouteDelete">mRouteDelete</a></i>(&nbsp;)</b> removes it.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK or ERROR.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./routeLib.html#top">routeLib</a></b>, <b><i><a href="./routeLib.html#mRouteEntryAdd">mRouteEntryAdd</a></i>(&nbsp;)</b>, <b><i><a href="./routeLib.html#mRouteDelete">mRouteDelete</a></i>(&nbsp;)</b>, <b><i><a href="./routeLib.html#routeAdd">routeAdd</a></i>(&nbsp;)</b><hr><a name="mRouteEntryAdd"></a><p align=right><a href="rtnIndex.html"><i>Libraries :  Routines</i></a></p></blockquote><h1><i>mRouteEntryAdd</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>mRouteEntryAdd</i>(&nbsp;)</strong> - add a protocol-specific route to the routing table </p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS mRouteEntryAdd    (    long destIp, /* destination address, network order */    long gateIp, /* gateway address, network order */    long mask,   /* mask for destination, network order */    int  tos,    /* type of service */    int  flags,  /* route flags */    int  proto   /* routing protocol */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>For a single destination <i>destIp</i>, this routine can add additional routes <i>gateIp</i> to the routing table.  The different routes are distinguished by a destination mask <i>mask</i>, the type of service <i>tos</i>, and associated flag values <i>flags</i>.  Valid values for <i>flags</i> are 0,<b>RTF_HOST</b>, <b>RTF_CLONING</b> (defined in <b>net/route.h</b>).  The <i>proto</i> parameter identifies the protocol that generated this route.  Values for <i>proto</i> may be found in <b>m2Lib.h</b>.  The <i>tos</i> parameter takes one of following values (defined in <b>netinet/ip.h</b>): <p>&nbsp;&nbsp;&nbsp;&nbsp;<b>IPTOS_LOWDELAY</b><br>&nbsp;&nbsp;&nbsp;&nbsp;<b>IPTOS_THROUGHPUT</b><br>&nbsp;&nbsp;&nbsp;&nbsp;<b>IPTOS_RELIABILITY</b><br>&nbsp;&nbsp;&nbsp;&nbsp;<b>IPTOS_MINCOST</b><p></blockquote><h4>RETURNS</h4><blockquote><p>OK or ERROR.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./routeLib.html#top">routeLib</a></b>, <b>m2Lib.h</b>, <b><i><a href="./routeLib.html#mRouteAdd">mRouteAdd</a></i>(&nbsp;)</b>, <b><i><a href="./routeLib.html#mRouteDelete">mRouteDelete</a></i>(&nbsp;)</b><hr><a name="mRouteEntryDelete"></a><p align=right><a href="rtnIndex.html"><i>Libraries :  Routines</i></a></p></blockquote><h1><i>mRouteEntryDelete</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>mRouteEntryDelete</i>(&nbsp;)</strong> - delete route from the routing table </p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS mRouteEntryDelete    (    long destIp, /* destination address, network order */    long gateIp, /* gateway address, network order */    long mask,   /* mask for destination, network order */    int  tos,    /* type of service */    int  flags,  /* route flags */    int  proto   /* routing protocol */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine deletes a protocol-specific route from the routing table.  Specify the route using a destination <i>pDest</i>, a gateway <i>pGate</i>, a destination mask <i>mask</i>, the type of service <i>tos</i>, a <i>flags</i> value, and a <i>proto</i> value that identifies the routing protocol that added the route.  The valid values for <i>flags</i> are 0 and <b>RTF_HOST</b>  (defined in <b>net/route.h</b>).  Values for <i>proto</i> may be found in <b>m2Lib.h</b> and <i>tos</i> is one of the following values defined in <b>netinet/ip.h</b>:<p>&nbsp;&nbsp;&nbsp;&nbsp;<b>IPTOS_LOWDELA</b><br>&nbsp;&nbsp;&nbsp;&nbsp;<b>IPTOS_THROUGHPU</b><br>&nbsp;&nbsp;&nbsp;&nbsp;<b>IPTOS_RELIABILIT</b><br>&nbsp;&nbsp;&nbsp;&nbsp;<b>IPTOS_MINCOST</b><p>An existing route is deleted only if it is owned by the protocol specified by <i>proto</i>.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK or ERROR.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./routeLib.html#top">routeLib</a></b><hr><a name="mRouteDelete"></a><p align=right><a href="rtnIndex.html"><i>Libraries :  Routines</i></a></p></blockquote><h1><i>mRouteDelete</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>mRouteDelete</i>(&nbsp;)</strong> - delete a route from the routing table </p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS mRouteDelete    (    char * pDest, /* destination address */    long   mask,  /* mask for destination */    int    tos,   /* type of service */    int    flags  /* either 0 or RTF_HOST */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine deletes a routing table entry as specified by thedestination, <i>pDest</i>, the destination mask, <i>mask</i>, and type of service,<i>tos</i>.  The <i>tos</i> values are as defined in the reference entry for<b><i><a href="./routeLib.html#mRouteAdd">mRouteAdd</a></i>(&nbsp;)</b>.<p></blockquote><h4>EXAMPLE</h4><blockquote><p>Consider the case of a route added in the following manner:<pre>    -&gt; mRouteAdd ("90.0.0.0", "91.0.0.3", 0xffffff00, 0, 0);</pre>To delete a route that was added in the above manner, call <b><i><a href="./routeLib.html#mRouteDelete">mRouteDelete</a></i>(&nbsp;)</b>as follows:<pre>    -&gt; mRouteDelete("90.0.0.0", 0xffffff00, 0);</pre>If the netmask and or type of service do not match, the routeis not deleted.<p>The value of <i>flags</i> should be <b>RTF_HOST</b> for host routes, <b>RTF_CLONING</b> forroutes which need to be cloned, and 0 in all other cases.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK or ERROR.  <p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./routeLib.html#top">routeLib</a></b>, <b><i><a href="./routeLib.html#mRouteAdd">mRouteAdd</a></i>(&nbsp;)</b><hr><a name="routeProtoPrioritySet"></a><p align=right><a href="rtnIndex.html"><i>Libraries :  Routines</i></a></p></blockquote><h1><i>routeProtoPrioritySet</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>routeProtoPrioritySet</i>(&nbsp;)</strong> - set the priority of routes added by the routing protocol </p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS routeProtoPrioritySet    (    int proto, /* protocol no, from m2Lib.h */    int prio   /* priority, >= 0 , <= 200 */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine assigns a priority to a routing protocol.  A route generated by the <i>proto</i> protocol is added to the routing table only if a protocol of higher priority does not already have that route installed in the table. Use <i>proto</i> to identify the protocol.  See <b>m2Lib.h</b> for a listing of validvalues for <i>proto</i>.  Use <i>prio</i> to specify the priority level you want to assign to <i>proto</i>.  The <i>prio</i> parameter may be any integer value greater or equal to 0 and less than or equal to 200.  The higher values indicate higher priority.  If you do not want VxWorks to prioritize protocols, do not call this routine. <p>Routes that are added with the <b><i><a href="./routeLib.html#routeAdd">routeAdd</a></i>(&nbsp;)</b> or <b><i><a href="./routeLib.html#mRouteAdd">mRouteAdd</a></i>(&nbsp;)</b> call are oftype <b>M2_ipRouteProto_other</b>.  These are static routes that are notaffected by routing protocols such as RIP and OSPF.  To change thepriority of routes added in this way pass the value<b>M2_ipRoute_Proto_other</b> in the first argument of this routine.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK if priority set successfully else ERROR.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./routeLib.html#top">routeLib</a></b></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -