📄 muxlib.html
字号:
<p> OK on success, EINVAL or ERROR if the device's registered<br> <b><i>endUnload</i>( )</b> function failed, if the specified device was not found,<br> or some other error occurred<p></blockquote><h4>ERRNO</h4><blockquote><p>S_muxLib_UNLOAD_FAILED, S_muxLib_NO_DEVICE</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.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>muxAddressForm</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>muxAddressForm</i>( )</strong> - form an address into a packet</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>M_BLK_ID muxAddressForm ( void* pCookie, /* cookie that identifies the device */ M_BLK_ID pMblk, /* structure to contain packet */ M_BLK_ID pSrcAddr, /* structure containing source address */ M_BLK_ID pDstAddr /* structure containing destination address */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine accepts the source and destination addressing informationthrough the <i>pSrcAddr</i> and <i>pDstAddr</i> mBlks and returns an <b>M_BLK_ID</b> that points to the assembled link-level header. This routine prepends the link-level header into <i>pMblk</i> if there is enough space available or it allocates a new <b>mBlk</b>-<b>clBlk</b>-cluster and prepends the new <i>mBlk</i> to the <b>mBlk</b> chain passed in <i>pMblk</i>. This routine returns a pointer to an <b>mBlk</b> that contains the link-level header information.<p><dl><dt><i>pCookie</i><dd>Expects the pointer returned from the <b><i><a href="./muxLib.html#muxBind">muxBind</a></i>( )</b>. This pointer identifies the device to which the MUX has bound this protocol. <p><dt><i>pMblk</i><dd>Expects a pointer to the <b>mBlk</b> structure that contains the packet. <p><dt><i>pSrcAddr</i><dd>Expects a pointer to the <b>mBlk</b> that contains the source address.<p><dt><i>pDstAddr</i><dd> Expects a pointer to the <b>mBlk</b> that contains the destination address.<p></dl></blockquote><h4>RETURNS</h4><blockquote><p><p> <b>M_BLK_ID</b> or NULL.<p></blockquote><h4>ERRNO</h4><blockquote><p>S_muxLib_NO_DEVICE</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./muxLib.html#top">muxLib</a></b><hr><a name="muxPacketDataGet"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>muxPacketDataGet</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>muxPacketDataGet</i>( )</strong> - return the data from a packet</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS muxPacketDataGet ( void* pCookie, /* cookie that identifies the device */ M_BLK_ID pMblk, /* returns the packet data */ LL_HDR_INFO * pLinkHdrInfo /* the new data is returned here */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine copies the header information from the packet referenced in<i>pMblk</i> into the <b>LL_HDR_INFO</b> structure referenced in <i>pLinkHdrInfo</i>.<p><dl><dt><i>pCookie</i><dd>Expects the cookie returned from the <b><i><a href="./muxLib.html#muxBind">muxBind</a></i>( )</b> call. Thiscookie identifies the device to which the MUX bound this protocol.<p><dt><i>pMblk</i><dd>Expects a pointer to an <b>mBlk</b> or <b>mBlk</b> cluster representing a packetcontaining the data to be returned<p><dt><i>pLinkHdrInfo</i><dd> Expects a pointer to an <b>LL_HDR_INFO</b> structure into which the packet headerinformation is copied from the incoming <b>mBlk</b><p></dl></blockquote><h4>RETURNS</h4><blockquote><p><p> OK or ERROR if the device type is not recognized.<p></blockquote><h4>ERRNO</h4><blockquote><p>S_muxLib_NO_DEVICE</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./muxLib.html#top">muxLib</a></b><hr><a name="muxPacketAddrGet"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>muxPacketAddrGet</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>muxPacketAddrGet</i>( )</strong> - get addressing information from a packet</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS muxPacketAddrGet ( void* pCookie, /* cookie that identifies the device */ M_BLK_ID pMblk, /* structure to contain packet */ M_BLK_ID pSrcAddr, /* structure containing source address */ M_BLK_ID pDstAddr, /* structure containing destination address */ M_BLK_ID pESrcAddr, /* structure containing the end source */ M_BLK_ID pEDstAddr /* structure containing the end destination */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine takes a pointer to cookie that was handed back by <b><i><a href="./muxLib.html#muxBind">muxBind</a></i>( )</b>,an <b>M_BLK_ID</b> that came from a device and up to four <b>M_BLK_ID</b>'s that can receive data pointers.<p>The routine returns appropriate informationon the immediate source, immediate destination, ultimate source and,ultimate destination addresses from the packet pointed to in the first<b>M_BLK_ID</b>. This routine is a pass through to the device's own routinewhich knows how to interpret packets that it has received.<p><dl><dt><i>pCookie</i><dd>Expects the cookie returned from the <b><i><a href="./muxLib.html#muxBind">muxBind</a></i>( )</b> call. Thiscookie identifies the device to which the MUX bound this protocol.<p><dt><i>pMblk</i><dd>Expects an <b>M_BLK_ID</b> representing packet data from which the addressinginformation is to be extracted<p><dt><i>pSrcAddr</i><dd>Expects NULL or an <b>M_BLK_ID</b> which will hold the local source addressextracted from the packet<p><dt><i>pDstAddr</i><dd>Expects NULL or an <b>M_BLK_ID</b> which will hold the local destination addressextracted from the packet<p><dt><i>pESrcAddr</i><dd>Expects NULL or an <b>M_BLK_ID</b> which will hold the end source addressextracted from the packet<p><dt><i>pEDstAddr</i><dd> Expects NULL or an <b>M_BLK_ID</b> which will hold the end destination addressextracted from the packet<p></dl></blockquote><h4>RETURNS</h4><blockquote><p><p> OK or ERROR.<p></blockquote><h4>ERRNO</h4><blockquote><p>S_muxLib_NO_DEVICE</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./muxLib.html#top">muxLib</a></b><hr><a name="endFindByName"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>endFindByName</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>endFindByName</i>( )</strong> - find a device using its string name</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>END_OBJ* endFindByName ( char* pName, /* device name to search for */ int unit )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine takes a string name and a unit number and finds theEND device that has that name/unit combination.<p></blockquote><h4>RETURNS</h4><blockquote><p>A pointer to an <b>END_OBJ</b> or NULL (if the device is not found).</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./muxLib.html#top">muxLib</a></b><hr><a name="muxDevExists"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>muxDevExists</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>muxDevExists</i>( )</strong> - tests whether a device is already loaded into the MUX</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>BOOL muxDevExists ( char* pName, /* string containing a device name (ln, ei, ...) */ int unit /* unit number */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine takes a string device name (for example, ln or ei)and a unit number.If this device is already known to the MUX, it returns TRUE.Otherwise, this routine returns FALSE. <p><dl><dt><i>pName</i><dd>Expects a pointer to a string containing the device name<p><dt><i>unit</i><dd> Expects the unit number of the device<p></dl></blockquote><h4>RETURNS</h4><blockquote><p><p> TRUE if the device exists, else FALSE.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./muxLib.html#top">muxLib</a></b><hr><a name="muxAddrResFuncAdd"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>muxAddrResFuncAdd</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>muxAddrResFuncAdd</i>( )</strong> - add an address resolution function</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS muxAddrResFuncAdd ( long ifType, /* Media interface type from m2Lib.h */ long protocol, /* Protocol type from RFC 1700 */ FUNCPTR addrResFunc /* Function to call. */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine takes an ifType from <b>m2Lib.h</b>, a protocol number from RFC 1700and a pointer to an address resolution function and installs that functionfor later retrieval by <b><i><a href="./muxLib.html#muxAddrResFuncGet">muxAddrResFuncGet</a></i>( )</b>.<p><dl><dt><i>ifType</i><dd>Expects a media interface or network driver type from <b>m2Lib.h</b><p><dt><i>protocol</i><dd>Expects a network service or protocol type from RFC 1700<p><dt><i>addrResFunc</i><dd> Expects a pointer to an address resolution function for this driver andprotocol<p></dl></blockquote><h4>RETURNS</h4><blockquote><p><p> OK or ERROR.</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.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>muxAddrResFuncGet</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>muxAddrResFuncGet</i>( )</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 takes an <i>ifType</i> (from <b>m2Lib.h</b>) and a protocol (from RFC 1700)and returns a pointer to the address resolution function registeredfor this <i>ifType</i>/protocol pair. If no such function exists then NULLis returned.<p><dl><dt><i>ifType</i><dd>Expects a media interface or network driver type from <b>m2Lib.h</b><p><dt><i>protocol</i><dd> Expects a network service or protocol type from RFC 1700<p></dl></blockquote><h4>RETURNS</h4><blockquote><p><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.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>muxAddrResFuncDel</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>muxAddrResFuncDel</i>( )</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 takes an ifType (from <b>m2Lib.h</b>) and a protocol (from RFC 1700)and deletes the associated address resolution routine (if such exists).<p><dl><dt><i>ifType</i><dd>Expects a media interface or network driver type from <b>m2Lib.h</b><p><dt><i>protocol</i><dd> Expects a network service or protocol type from RFC 1700<p></dl></blockquote><h4>RETURNS</h4><blockquote><p><p> OK or ERROR.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./muxLib.html#top">muxLib</a></b></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -