📄 netbuflib.html
字号:
<pre>STATUS netPoolDelete ( NET_POOL_ID pNetPool /* pointer to a net pool */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine deletes the specified <b><a href="./netBufLib.html#top">netBufLib</a></b>-managed memory pool.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK or ERROR.<p></blockquote><h4>ERRNO</h4><blockquote><p><p> S_netBufLib_NETPOOL_INVALID</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./netBufLib.html#top">netBufLib</a></b><hr><a name="netMblkFree"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>netMblkFree</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>netMblkFree</i>( )</strong> - free an <b>mBlk</b> back to its memory pool</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void netMblkFree ( NET_POOL_ID pNetPool, /* pointer to the net pool */ M_BLK_ID pMblk /* mBlk to free */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine frees the specified <b>mBlk</b> back to the specified memory pool.<p></blockquote><h4>RETURNS</h4><blockquote><p>N/A</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./netBufLib.html#top">netBufLib</a></b><hr><a name="netClBlkFree"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>netClBlkFree</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>netClBlkFree</i>( )</strong> - free a <b>clBlk</b>-cluster construct back to the memory pool</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void netClBlkFree ( NET_POOL_ID pNetPool, /* pointer to the net pool */ CL_BLK_ID pClBlk /* pointer to the clBlk to free */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine decrements the reference counter in the specified <b>clBlk</b>. If the reference count falls to zero, this routine frees both the <b>clBlk</b>and its associated cluster back to the specified memory pool.<p></blockquote><h4>RETURNS</h4><blockquote><p>N/A</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./netBufLib.html#top">netBufLib</a></b><hr><a name="netClFree"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>netClFree</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>netClFree</i>( )</strong> - free a cluster back to the memory pool</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void netClFree ( NET_POOL_ID pNetPool, /* pointer to the net pool */ UCHAR * pClBuf /* pointer to the cluster buffer */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine returns the specified cluster buffer back to the specifiedmemory pool. <p></blockquote><h4>RETURNS</h4><blockquote><p>N/A</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./netBufLib.html#top">netBufLib</a></b><hr><a name="netMblkClFree"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>netMblkClFree</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>netMblkClFree</i>( )</strong> - free an <b>mBlk</b>-<b>clBlk</b>-cluster construct</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>M_BLK_ID netMblkClFree ( M_BLK_ID pMblk /* pointer to the mBlk */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>For the specified <b>mBlk</b>-<b>clBlk</b>-cluster construct, this routinefrees the <b>mBlk</b> back to the specified memory pool. It also decrements the reference count in the <b>clBlk</b> structure. If the reference count falls to zero, no other <b>mBlk</b> structure reference this <b>clBlk</b>. In that case, this routine also frees the <b>clBlk</b> structure and its associated cluster back to the specified memory pool. <p></blockquote><h4>RETURNS</h4><blockquote><p>If the specified <b>mBlk</b> was part of an <b>mBlk</b> chain, this routine returns a pointer to the next <b>mBlk</b>. Otherwise, it returns a NULL.<p></blockquote><h4>ERRNO</h4><blockquote><p><p> S_netBufLib_MBLK_INVALID</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./netBufLib.html#top">netBufLib</a></b><hr><a name="netMblkClChainFree"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>netMblkClChainFree</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>netMblkClChainFree</i>( )</strong> - free a chain of <b>mBlk</b>-<b>clBlk</b>-cluster constructs</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void netMblkClChainFree ( M_BLK_ID pMblk /* pointer to the mBlk */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>For the specified chain of <b>mBlk</b>-<b>clBlk</b>-cluster constructs, this routine frees all the <b>mBlk</b> structures back to the specified memory pool. It also decrements the reference count in all the <b>clBlk</b> structures. If the reference count in a <b>clBlk</b> falls to zero, this routine also frees that <b>clBlk</b> and its associated cluster back to the specified memory pool. <p></blockquote><h4>RETURNS</h4><blockquote><p>N/A<p></blockquote><h4>ERRNO</h4><blockquote><p><p> S_netBufLib_MBLK_INVALID</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./netBufLib.html#top">netBufLib</a></b><hr><a name="netMblkGet"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>netMblkGet</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>netMblkGet</i>( )</strong> - get an <b>mBlk</b></p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>M_BLK_ID netMblkGet ( NET_POOL_ID pNetPool, /* pointer to the net pool */ int canWait, /* M_WAIT/M_DONTWAIT */ UCHAR type /* mBlk type */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine gets a <b>mBlk</b> from the specified memory pool.<p><dl><dt><i>pNetPool</i><dd>Expects a pointer to the pool from which you want an <b>mBlk</b>.<p><dt><i>canWait</i><dd>Expects either <b>M_WAIT</b> or <b>M_DONTWAIT</b>. If <i>canWait</i> is <b>M_WAIT</b>, this routine blocks until an <b>mBlk</b> is available. If <i>canWait</i> is <b>M_DONTWAIT</b>and no <b>mBlk</b> is immediately available, this routine returns immediately(no blocking) with a NULL value. <p><dt><i>type</i><dd> Expects the type value that you want to associate with the returned <b>mBlk</b>. </dl><p></blockquote><h4>RETURNS</h4><blockquote><p><b>M_BLK_ID</b>, or a NULL if no <b>mBlk</b> was available.<p></blockquote><h4>ERRNO</h4><blockquote><p><p> S_netBufLib_MBLK_INVALID</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./netBufLib.html#top">netBufLib</a></b><hr><a name="netClBlkGet"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>netClBlkGet</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>netClBlkGet</i>( )</strong> - get a <b>clBlk</b></p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>CL_BLK_ID netClBlkGet ( NET_POOL_ID pNetPool, /* pointer to the net pool */ int canWait /* M_WAIT/M_DONTWAIT */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine gets a <b>clBlk</b> from the specified memory pool.<dl><dt><i>pNetPool</i><dd>Expects a pointer to the pool from which you want a <b>clBlk</b>.<p><dt><i>canWait</i><dd> Expects either <b>M_WAIT</b> or <b>M_DONTWAIT</b>. If <i>canWait</i> is <b>M_WAIT</b>, this routine blocks until an <b>clBlk</b> is available. If <i>canWait</i> is <b>M_DONTWAIT</b>and no <b>clBlk</b> is immediately available, this routine returns immediately(no blocking) with a NULL value. <p></dl></blockquote><h4>RETURNS</h4><blockquote><p><p> <b>CL_BLK_ID</b> or a NULL if no <b>clBlk</b> was available.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./netBufLib.html#top">netBufLib</a></b><hr><a name="netClusterGet"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>netClusterGet</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>netClusterGet</i>( )</strong> - get a cluster from the specified cluster pool</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>char * netClusterGet ( NET_POOL_ID pNetPool, /* pointer to the net pool */ CL_POOL_ID pClPool /* ptr to the cluster pool */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine gets a cluster from the specified cluster pool <i>pClPool</i> within the specified memory pool <i>pNetPool</i>. <p></blockquote><h4>RETURNS</h4><blockquote><p>This routine returns a character pointer to a cluster buffer or NULLif none was available.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./netBufLib.html#top">netBufLib</a></b><hr><a name="netMblkClGet"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>netMblkClGet</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>netMblkClGet</i>( )</strong> - get a <b>clBlk</b>-cluster and join it to the specified <b>mBlk</b></p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS netMblkClGet ( NET_POOL_ID pNetPool, /* pointer to the net pool */ M_BLK_ID pMblk, /* mBlk to embed the cluster in */ int bufSize, /* size of the buffer to get */ int canWait, /* wait or dontwait */ BOOL bestFit /* TRUE/FALSE */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine gets a <b>clBlk</b>-cluster construct from the specified memory pool and joins it to the specified <b>mBlk</b> structure. This createsan <b>mBlk</b>-<b>clBlk</b>-cluster construct that you can use to pass dataacross the layers of the network stack.<p><dl><dt><i>pNetPool</i><dd>Expects a pointer to the memory pool from which you want to get a free <b>clBlk</b>-cluster construct. <p><dt><i>pMbkl</i><dd>Expects a pointer to the <b>mBlk</b> structure (previously allocated) to which you want to join the retrieved <b>clBlk</b>-cluster construct. <p><dt><i>bufSize</i><dd>Expects the size, in bytes, of the cluster in the <b>clBlk</b>-clusterconstruct. <p><dt><i>canWait</i><dd>Expects either <b>M_WAIT</b> or <b>M_DONTWAIT</b>. If <i>canWait</i> is <b>M_WAIT</b>, this
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -