📄 muxlib.html
字号:
This routine calls the driver's <b>endMCastAddrAdd( )</b> or <b>nptMCastAddrAdd( )</b>routine to accomplish this.<p>If the device does not support multicasting, <b><a href="./muxLib.html#muxMCastAddrAdd">muxMCastAddrAdd</a>( )</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>( )</b> or <b><a href="./muxTkLib.html#muxTkBind">muxTkBind</a>( )</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>( )</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( )</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( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>muxMCastAddrDel( )</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( )</b> or <b>nptMCastAddrDel( )</b>routine.<p>If the device does not support multicasting, <b><a href="./muxLib.html#muxMCastAddrAdd">muxMCastAddrAdd</a>( )</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>( )</b> or <b><a href="./muxTkLib.html#muxTkBind">muxTkBind</a>( )</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( )</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( )</b> or <b>nptMCastAddrDel( )</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( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>muxMCastAddrGet( )</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( )</b> or <b>nptMCastAddrGet( )</b> routine. <p><dl><dt><i>pCookie</i><dd>Expects the cookie returned from <b><a href="./muxLib.html#muxBind">muxBind</a>( )</b> or <b><a href="./muxTkLib.html#muxTkBind">muxTkBind</a>( )</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>( )</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>( )</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( )</b> or <b>nptMCastAddrGet( )</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( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>muxUnbind( )</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>( )</b> or <b><a href="./muxTkLib.html#muxTkBind">muxTkBind</a>( )</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>( )</b> or <b><a href="./muxTkLib.html#muxTkBind">muxTkBind</a>( )</b>call.<p></blockquote><h4>NOTE</h4><blockquote><p>If <b><a href="./muxLib.html#muxUnbind">muxUnbind</a>( )</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>( )</b> fails.<p></blockquote><h4>VXWORKS AE PROTECTION DOMAINS</h4><blockquote><p>Under VxWorks AE, you can call <b>muxUnBind( )</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( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>muxDevUnload( )</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( )</b> routinethat was registered by the service. The <b>stackShutdownRtn( )</b> should call<b><a href="./muxLib.html#muxUnbind">muxUnbind</a>( )</b> to detach from the device. Then, <b><a href="./muxLib.html#muxDevUnload">muxDevUnload</a>( )</b> calls thedevice's <b>endUnload( )</b> or <b>nptUnload( )</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( )</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( )</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( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>muxLinkHeaderCreate( )</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>( )</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( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>muxAddressForm( )</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 + -