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

📄 muxlib.html

📁 Vxworks API操作系统和驱动程序设计API。压缩的HTML文件
💻 HTML
📖 第 1 页 / 共 5 页
字号:
This routine calls the driver's <b>endMCastAddrAdd(&nbsp;)</b> or <b>nptMCastAddrAdd(&nbsp;)</b>routine to accomplish this.<p>If the device does not support multicasting, <b><a href="./muxLib.html#muxMCastAddrAdd">muxMCastAddrAdd</a>(&nbsp;)</b> will returnERROR and <b>errno</b> will be set to ENOTSUP (assuming the driver has beenwritten properly).<p><dl><dt><i>pCookie</i><dd>Expects the cookie returned from the <b><a href="./muxLib.html#muxBind">muxBind</a>(&nbsp;)</b> or <b><a href="./muxTkLib.html#muxTkBind">muxTkBind</a>(&nbsp;)</b> call.  Thiscookie identifies the device to which the MUX has bound this service. <p><dt><i>pAddress</i><dd>Expects a pointer to a character string containing the address you want to add. <br> </dl></blockquote><h4>VXWORKS AE PROTECTION DOMAINS</h4><blockquote><p>Under VxWorks AE, you can call <b><a href="./muxLib.html#muxMCastAddrAdd">muxMCastAddrAdd</a>(&nbsp;)</b> from within the kernel protection domain only, and the data referenced in the <i>pCookie</i> parameter must reside in the kernel protection domain.  This restriction does not apply under non-AE versions of VxWorks.  <p></blockquote><h4>RETURNS</h4><blockquote><p>OK; ENETDOWN, if <i>pCookie</i> does not represent a valid device;or ERROR, if the device's <b>endMCastAddrAdd(&nbsp;)</b> function fails.<p></blockquote><h4>ERRNO</h4><blockquote><p><b>S_muxLib_NO_DEVICE</b></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./muxLib.html#top">muxLib</a></b><hr><a name="muxMCastAddrDel"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries :  Routines</i></a></p></blockquote><h1>muxMCastAddrDel(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>muxMCastAddrDel(&nbsp;)</strong> - delete a multicast address from a device's multicast table</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS muxMCastAddrDel    (    void * pCookie,           /* binding instance from muxBind() or */                              /* muxTkBind() */     char * pAddress           /* Address to delete from the table. */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine deletes an address from the multicast table maintained by a device by calling that device's <b>endMCastAddrDel(&nbsp;)</b> or <b>nptMCastAddrDel(&nbsp;)</b>routine.<p>If the device does not support multicasting, <b><a href="./muxLib.html#muxMCastAddrAdd">muxMCastAddrAdd</a>(&nbsp;)</b> will returnERROR and <b>errno</b> will be set to ENOTSUP (assuming the driver has beenwritten properly).<p><dl><dt><i>pCookie</i><dd>Expects the cookie returned from <b><a href="./muxLib.html#muxBind">muxBind</a>(&nbsp;)</b> or <b><a href="./muxTkLib.html#muxTkBind">muxTkBind</a>(&nbsp;)</b> call.  Thiscookie identifies the device to which the MUX bound this service. <dt><i>pAddress</i><dd>Expects a pointer to a character string containing the address you want to delete. </dl></blockquote><h4>VXWORKS AE PROTECTION DOMAINS</h4><blockquote><p>Under VxWorks AE, you can call <b>muxMCastAddrDell(&nbsp;)</b> from within the kernel protection domain only, and the data referenced in the <i>pCookie</i> parameter must reside in the kernel protection domain.  This restriction does not apply under non-AE versions of VxWorks.  <p></blockquote><h4>RETURNS</h4><blockquote><p>OK; ENETDOWN, if <i>pCookie</i> does not represent a valid driver;or ERROR, if the driver's registered <b>endMCastAddrDel(&nbsp;)</b> or <b>nptMCastAddrDel(&nbsp;)</b> functions fail.<p></blockquote><h4>ERRNO</h4><blockquote><p><b>S_muxLib_NO_DEVICE</b></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./muxLib.html#top">muxLib</a></b><hr><a name="muxMCastAddrGet"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries :  Routines</i></a></p></blockquote><h1>muxMCastAddrGet(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>muxMCastAddrGet(&nbsp;)</strong> - get the multicast address table from the MUX/Driver</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>int muxMCastAddrGet    (    void *        pCookie,    /* binding instance from muxBind() or */                              /* muxTkBind() */     MULTI_TABLE * pTable      /* pointer to a table to be filled and */                              /* returned. */     )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine writes the list of multicast addresses for a specifieddevice into a buffer.  To get this list, it calls the driver's own<b>endMCastAddrGet(&nbsp;)</b> or <b>nptMCastAddrGet(&nbsp;)</b> routine. <p><dl><dt><i>pCookie</i><dd>Expects the cookie returned from <b><a href="./muxLib.html#muxBind">muxBind</a>(&nbsp;)</b> or <b><a href="./muxTkLib.html#muxTkBind">muxTkBind</a>(&nbsp;)</b>call.  This cookie indicates the device to which the MUXhas bound this service. <dt><i>pTable</i><dd>Expects a pointer to a <b>MULTI_TABLE</b> structure.  You must have allocated this structure at some time before the call to <b><a href="./muxLib.html#muxMCastAddrGet">muxMCastAddrGet</a>(&nbsp;)</b>. The <b>MULTI_TABLE</b> structure is defined in <b>end.h</b> as: <p><pre>   typedef struct multi_table       {       int     tableLen;  /* length of table in bytes */       char *  pTable;    /* pointer to entries */       } MULTI_TABLE;</pre></dl></blockquote><h4>VXWORKS AE PROTECTION DOMAINS</h4><blockquote><p>Under VxWorks AE, you can call <b><a href="./muxLib.html#muxMCastAddrGet">muxMCastAddrGet</a>(&nbsp;)</b> from within the kernel protection domain only, and the data referenced in the <i>pCookie</i> parameter must reside in the kernel protection domain.  This restriction does not apply under non-AE versions of VxWorks.  <p></blockquote><h4>RETURNS</h4><blockquote><p>OK; ENETDOWN, if <i>pCookie</i> does not represent a valid driver;or ERROR, if the driver's registered <b>endMCastAddrGet(&nbsp;)</b> or <b>nptMCastAddrGet(&nbsp;)</b> routines fail.<p></blockquote><h4>ERRNO</h4><blockquote><p><b>S_muxLib_NO_DEVICE</b></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./muxLib.html#top">muxLib</a></b><hr><a name="muxUnbind"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries :  Routines</i></a></p></blockquote><h1>muxUnbind(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>muxUnbind(&nbsp;)</strong> - detach a network service from the specified device</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS muxUnbind    (    void *  pCookie,          /* binding instance from muxBind() or */                              /* muxTkBind() */     long    type,             /* type passed to muxBind() or muxTkBind() call */    FUNCPTR stackRcvRtn       /* pointer to stack receive routine */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine disconnects a network service from the specified device.  The<i>pCookie</i> argument indicates the service/device binding returned by the<b><a href="./muxLib.html#muxBind">muxBind</a>(&nbsp;)</b> or <b><a href="./muxTkLib.html#muxTkBind">muxTkBind</a>(&nbsp;)</b> routine. The <i>type</i> and <i>stackRcvRtn</i> argumentsmust also match the values given to the original <b><a href="./muxLib.html#muxBind">muxBind</a>(&nbsp;)</b> or <b><a href="./muxTkLib.html#muxTkBind">muxTkBind</a>(&nbsp;)</b>call.<p></blockquote><h4>NOTE</h4><blockquote><p>If <b><a href="./muxLib.html#muxUnbind">muxUnbind</a>(&nbsp;)</b> returns ERROR, and <b>errno</b> is set to EINVAL, thisindicates that the device is not bound to the service.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK; or ERROR, if <b><a href="./muxLib.html#muxUnbind">muxUnbind</a>(&nbsp;)</b> fails.<p></blockquote><h4>VXWORKS AE PROTECTION DOMAINS</h4><blockquote><p>Under VxWorks AE, you can call <b>muxUnBind(&nbsp;)</b> from within the kernel protection domain only, and the data referenced in the <i>stackRcvRtn</i> and  <i>pCookie</i> parameters must reside in the kernel protection domain.  This restriction does not apply under non-AE versions of VxWorks.  <p></blockquote><h4>ERRNO</h4><blockquote><p>EINVAL, <b>S_muxLib_NO_DEVICE</b></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./muxLib.html#top">muxLib</a></b><hr><a name="muxDevUnload"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries :  Routines</i></a></p></blockquote><h1>muxDevUnload(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>muxDevUnload(&nbsp;)</strong> - unloads a device from the MUX</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS muxDevUnload    (    char * pName,             /* a string containing the name of the */                              /* device for example, ln or ei */     int    unit               /* the unit number */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine unloads a device from the MUX.  This breaks any networkconnections that use the device.  When this routine is called, each servicebound to the device disconnects from it with the <b>stackShutdownRtn(&nbsp;)</b> routinethat was registered by the service.  The <b>stackShutdownRtn(&nbsp;)</b> should call<b><a href="./muxLib.html#muxUnbind">muxUnbind</a>(&nbsp;)</b> to detach from the device.  Then, <b><a href="./muxLib.html#muxDevUnload">muxDevUnload</a>(&nbsp;)</b> calls thedevice's <b>endUnload(&nbsp;)</b> or <b>nptUnload(&nbsp;)</b> routine.<p><dl><dt><i>pName</i><dd>Expects a pointer to a string containing the name of the device, for example<b>ln</b> or <b>ei</b><p><dt><i>unit</i><dd>Expects the unit number of the device indicated by <i>pName</i></dl></blockquote><h4>VXWORKS AE PROTECTION DOMAINS</h4><blockquote><p>Under VxWorks AE, you can call <b>muxDevUnLoad(&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, on success; ERROR, if the specified device was not foundor some other error occurred; or the error value returned by the driver's<b>unload(&nbsp;)</b> routine.<p></blockquote><h4>ERRNO</h4><blockquote><p><b>S_muxLib_UNLOAD_FAILED</b>, <b>S_muxLib_NO_DEVICE</b></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./muxLib.html#top">muxLib</a></b><hr><a name="muxLinkHeaderCreate"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries :  Routines</i></a></p></blockquote><h1>muxLinkHeaderCreate(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>muxLinkHeaderCreate(&nbsp;)</strong> - attach a link-level header to a packet</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>M_BLK_ID muxLinkHeaderCreate    (    void *   pCookie,         /* protocol/device binding from muxBind() */    M_BLK_ID pPacket,         /* structure containing frame contents */    M_BLK_ID pSrcAddr,        /* structure containing source address */    M_BLK_ID pDstAddr,        /* structure containing destination address */    BOOL     bcastFlag        /* use broadcast destination (if available)? */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine constructs a link-level header using the source addressof the device indicated by the <i>pCookie</i> argument as returned from the<b><a href="./muxLib.html#muxBind">muxBind</a>(&nbsp;)</b> routine.<p>The <i>pDstAddr</i> argument provides an <b>M_BLK_ID</b> buffer containing thelink-level destination address.Alternatively, the <i>bcastFlag</i> argument, if TRUE, indicates that theroutine should use the link-level broadcast address, if available forthe device. Although other information contained in the <i>pDstAddr</i>argument must be accurate, the address data itself is ignored in that case.<p>The <i>pPacket</i> argument contains the contents of the resulting link-levelframe.  This routine prepends the new link-level header to the initial<b>mBlk</b> in that network packet if space is available or allocates a new<b>mBlk</b>-<b>clBlk</b>-cluster triplet and prepends it to the <b>mBlk</b> chain. When construction of the header is complete, it returns an <b>M_BLK_ID</b> that points to the initial <b>mBlk</b> in the assembled link-level frame.<p></blockquote><h4>RETURNS</h4><blockquote><p><b>M_BLK_ID</b> or NULL.<p></blockquote><h4>ERRNO</h4><blockquote><p><b>S_muxLib_INVALID_ARGS</b></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./muxLib.html#top">muxLib</a></b><hr><a name="muxAddressForm"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries :  Routines</i></a></p></blockquote><h1>muxAddressForm(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>muxAddressForm(&nbsp;)</strong> - form a frame with a link-layer address</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>M_BLK_ID muxAddressForm    (

⌨️ 快捷键说明

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