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

📄 muxlib.html

📁 Vxworks API操作系统和驱动程序设计API。压缩的HTML文件
💻 HTML
📖 第 1 页 / 共 5 页
字号:
<b>m2Lib.h</b>. If using the END model, the <i>ifType</i> argument is restricted to the values in <b>m2Lib.h</b>. In the NPT model, this restriction does not apply.<p><dt><i>protocol</i><dd>Expects a network service or protocol type, such as can be found in RFC1700. Look for the values under ETHER TYPES. For example, Internet IPwould be identified as 2048 (0x800 hexadecimal). If using the END model, <i>protocol</i> is restricted to the values in RFC 1700. In the NPT model,this restriction does not apply.<p><dt><i>addrResFunc</i><dd>Expects a pointer to an address resolution function for this combinationof driver type and service type. The prototype of your replacement address resolution function must match that of <b>arpresolve(&nbsp;)</b>:<p><pre>int arpresolve   (   struct arpcom *   ac,   struct rtentry *  rt,   struct mbuf *     m,   struct sockaddr * dst,   u_char *          desten   )</pre>This function returns one upon success, which indicates that <i>desten</i> has been updated with the necessary data-link layer information and that the IP sublayer output function can transmit the packet. <p>This function returns zero if it cannot resolve the address immediately. In the default <b>arpresolve(&nbsp;)</b> implementation, resolving the address immediately means <b>arpresolve(&nbsp;)</b> was able to find the address in its table of results from previous ARP requests. Returning zero indicates that the table did not contain the information but that the packet has been stored and that an ARP request has been queued. <p>If the ARP request times out, the packet is dropped. If the ARP request completes successfully, processing that event updates the local ARP table and resubmits the packet to the IP sublayer's output function for transmission. This time, the <b>arpresolve(&nbsp;)</b> call will return one. <p>What is essential to note here is that <b>arpresolve(&nbsp;)</b> did not wait for the ARP request to complete before returning. If you replace the default <b>arpresolve(&nbsp;)</b> function, you must make sure your function returns as soon as possible and that it never blocks. Otherwise, you block the IP sublayer from transmitting other packets out through the interface for which this packet was queued. You must also make sure that your <b>arpresolve(&nbsp;)</b> function takes responsibility for the packet if it returns zero. Otherwise, the packet is dropped. </dl></blockquote><h4>RETURNS</h4><blockquote><p>OK, or ERROR.<p></blockquote><h4>VXWORKS AE PROTECTION DOMAINS</h4><blockquote><p>Under VxWorks AE, you can call <b><a href="./muxLib.html#muxAddrResFuncAdd">muxAddrResFuncAdd</a>(&nbsp;)</b> from within the kernel protection domain only, and the data referenced in the <i>addrResFunc</i> parameter must reside in the kernel protection domain.  This restriction does not apply under non-AE versions of VxWorks.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./muxLib.html#top">muxLib</a></b><hr><a name="muxAddrResFuncGet"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries :  Routines</i></a></p></blockquote><h1>muxAddrResFuncGet(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>muxAddrResFuncGet(&nbsp;)</strong> - get the address resolution function for ifType/protocol</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>FUNCPTR muxAddrResFuncGet    (    long ifType,              /* ifType from m2Lib.h */    long protocol             /* protocol from RFC 1700 */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine gets a pointer to the registered address resolution function for the specified interface-protocol pair.  If no such function exists, <b>muxAddResFuncGet(&nbsp;)</b> returns NULL.  <p><dl><dt><i>ifType</i><dd>Expects a media interface or network driver type, such as those foundin <b>m2Lib.h</b>. If using the END model, the <i>ifType</i> argument is restricted to the <b>m2Lib.h</b> values. In the NPT model, this restriction does not apply.<p><dt><i>protocol</i><dd>Expects a network service or protocol type such as those found in RFC 1700.Look for the values under ETHER TYPES.  For example, Internet IP would be identified as 2048 (0x800 hexadecimal). If using the END model, the <i>protocol</i> argument is restricted to the RFC 1700 values.  In the NPT model,this restriction does not apply.</dl></blockquote><h4>VXWORKS AE PROTECTION DOMAINS</h4><blockquote><p>Under VxWorks AE, you can call <b><a href="./muxLib.html#muxAddrResFuncGet">muxAddrResFuncGet</a>(&nbsp;)</b> from within the kernel protection domain only.  In addition, the returned FUNCPTR is valid in the kernel protection domain only.  This restriction does not apply under non-AE versions of VxWorks.  <p></blockquote><h4>RETURNS</h4><blockquote><p>FUNCPTR to the routine or NULL.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./muxLib.html#top">muxLib</a></b><hr><a name="muxAddrResFuncDel"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries :  Routines</i></a></p></blockquote><h1>muxAddrResFuncDel(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>muxAddrResFuncDel(&nbsp;)</strong> - delete an address resolution function</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS muxAddrResFuncDel    (    long ifType,              /* ifType of function you want to delete */    long protocol             /* protocol from which to delete the function */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This function deletes the address resolution function registered for thespecified interface-protocol pair. If using the NPT architecture, the <i>ifType</i> and <i>protocol</i> arguments are not restricted to the <b>m2Lib.h</b> or RFC 1700 values.<p><dl><dt><i>ifType</i><dd>Expects a media interface or network driver type. For and END driver, use the values specified in <b>m2Lib.h</b>.<p><dt><i>protocol</i><dd>Expects a network service or protocol type. For example, Internet IP would be identified as 2048 (0x800 hexadecimal). This value can be found in RFC 1700 under the heading, ETHER TYPES.  </dl></blockquote><h4>VXWORKS AE PROTECTION DOMAINS</h4><blockquote><p>Under VxWorks AE, you can call <b><a href="./muxLib.html#muxAddrResFuncDel">muxAddrResFuncDel</a>(&nbsp;)</b> from within the kernel protection domain only.  This restriction does not apply under non-AE versions of VxWorks.  <p></blockquote><h4>RETURNS</h4><blockquote><p>OK or ERROR.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./muxLib.html#top">muxLib</a></b><hr><a name="muxTaskDelaySet"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries :  Routines</i></a></p></blockquote><h1>muxTaskDelaySet(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>muxTaskDelaySet(&nbsp;)</strong> - set the inter-cycle delay on the polling task</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS muxTaskDelaySet    (    int delay    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine sets up a delay (measured in ticks) that is inserted at the end of each run through the list of devices polled by <b>tMuxPollTask</b>.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK; or ERROR, if you specify a delay less than zero.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./muxLib.html#top">muxLib</a></b><hr><a name="muxTaskDelayGet"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries :  Routines</i></a></p></blockquote><h1>muxTaskDelayGet(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>muxTaskDelayGet(&nbsp;)</strong> - get the delay on the polling task</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS muxTaskDelayGet    (    int* pDelay    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine returns the amount of delay (in ticks) that is inserted between the polling runs of <b>tMuxPollTask</b>.  This value is written tothe location specified by <i>pDelay</i>.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK; or ERROR, if NULL is passed in the <i>pDelay</i> variable.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./muxLib.html#top">muxLib</a></b><hr><a name="muxTaskPrioritySet"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries :  Routines</i></a></p></blockquote><h1>muxTaskPrioritySet(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>muxTaskPrioritySet(&nbsp;)</strong> - reset the priority of <b>tMuxPollTask</b></p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS muxTaskPrioritySet    (    int priority    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine resets the priority of a running <b>tMuxPollTask</b>.  Valid task priorities are values between zero and 255 inclusive.  However, do not set the priority of <b>tMuxPollTask</b> to exceed that of <b>tNetTask</b>. Otherwise, you will shut out <b>tNetTask</b> from getting any processor time. <p></blockquote><h4>RETURNS</h4><blockquote><p>OK; or ERROR, if you specify a non-valid priority value.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./muxLib.html#top">muxLib</a></b><hr><a name="muxTaskPriorityGet"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries :  Routines</i></a></p></blockquote><h1>muxTaskPriorityGet(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>muxTaskPriorityGet(&nbsp;)</strong> - get the priority of <b>tMuxPollTask</b></p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS muxTaskPriorityGet    (    int* pPriority    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine returns the current priority of <b>tMuxPollTask</b>. This valueis returned to the location specified by the <i>pPriority</i> parameter. <p></blockquote><h4>RETURNS</h4><blockquote><p>OK; or ERROR, if NULL is passed in the <i>pPriority</i> parameter.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./muxLib.html#top">muxLib</a></b><hr><a name="muxPollStart"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries :  Routines</i></a></p></blockquote><h1>muxPollStart(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>muxPollStart(&nbsp;)</strong> - initialize and start the MUX poll task</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS muxPollStart    (    int numDev,               /* Maximum number of devices to support */                              /* poll mode. */     int priority,             /* tMuxPollTask priority, not to exceed */                              /* tNetTask. */     int delay                 /* Delay, in ticks, at end of each polling */                              /* cycle. */     )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine initializes and starts the MUX poll task, <b>tMuxPollTask</b>.  This task runs an infinite loop in which it polls each of the interfaces referenced on a list of network interfaces. To add or remove devices from this list, use <b><a href="./muxLib.html#muxPollDevAdd">muxPollDevAdd</a>(&nbsp;)</b> and <b><a href="./muxLib.html#muxPollDevDel">muxPollDevDel</a>(&nbsp;)</b>. Removing all devices from the list automatically triggers a call to <b><a href="./muxLib.html#muxPollEnd">muxPollEnd</a>(&nbsp;)</b>, which shuts down <b>tMuxPollTask</b>.<p>Using the <i>priority</i> parameter, you assign the priority to <b>tMuxPollTask</b>.Valid values are between 0 and 255, inclusive. However, you must not setthe priority of <b>tMuxPollTask</b> to exceed that of <b>tNetTask</b>. Otherwise, you risk shutting <b>tNetTask</b> out from getting processor time. To reset the <b>tMuxPollTask</b> priority after launch, use <b><a href="./muxLib.html#muxTaskPrioritySet">muxTaskPrioritySet</a>(&nbsp;)</b>. <p>Using the <i>delay</i> parameter, you can set up a delay at the end of each trip though the poll list. To reset the value of this delay after the launch of <b>tNetTask</b>, call <b><a href="./muxLib.html#muxTaskDelaySet">muxTaskDelaySet</a>(&nbsp;)</b>. <p>To shut down <b>tMuxPollTask</b>, call <b><a href="./muxLib.html#muxPollEnd">muxPollEnd</a>(&nbsp;)</b>. <p></blockquote><h4>RETURNS</h4><blockquote><p>OK or ERROR</blockquote><h4>SE

⌨️ 快捷键说明

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