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

📄 netbuflib.html

📁 Vxworks API操作系统和驱动程序设计API。压缩的HTML文件
💻 HTML
📖 第 1 页 / 共 4 页
字号:
</blockquote><h4>VXWORKS AE PROTECTION DOMAINS</h4><blockquote><p>Under VxWorks AE, you can call this function from within the kernel protection domain only.  In addition, all arguments to this function can  reference only that data which is valid in the kernel protection domain. Likewise, the returned ID 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><b>M_BLK_ID</b> or NULL.<p></blockquote><h4>ERRNO</h4><blockquote><p><p>&nbsp;<b>S_netBufLib_MBLK_INVALID</b><br>&nbsp;<b>S_netBufLib_CLSIZE_INVALID</b><br>&nbsp;<b>S_netBufLib_NETPOOL_INVALID</b></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./netBufLib.html#top">netBufLib</a></b><hr><a name="netClBlkJoin"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries :  Routines</i></a></p></blockquote><h1>netClBlkJoin(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>netClBlkJoin(&nbsp;)</strong> - join a cluster to a <b>clBlk</b> structure </p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>CL_BLK_ID netClBlkJoin    (    CL_BLK_ID pClBlk,         /* pointer to a cluster Blk */    char *    pClBuf,         /* pointer to a cluster buffer */    int       size,           /* size of the cluster buffer */    FUNCPTR   pFreeRtn,       /* pointer to the free routine */    int       arg1,           /* argument 1 of the free routine */    int       arg2,           /* argument 2 of the free routine */    int       arg3            /* argument 3 of the free routine */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine joins the previously reserved cluster specified by <i>pClBuf</i> to the previously reserved <b>clBlk</b> structure specified by <i>pClBlk</i>. The <i>size</i> parameter passes in the size of the cluster referenced in <i>pClBuf</i>.  The arguments <i>pFreeRtn</i>, <i>arg1</i>, <i>arg2</i>, <i>arg3</i> set the  values of the <b>pCLFreeRtn</b>, <b>clFreeArg1</b>, <b>clFreeArg2</b>, and <b>clFreeArg1</b>, members of the specified <b>clBlk</b> structure.<p></blockquote><h4>VXWORKS AE PROTECTION DOMAINS</h4><blockquote><p>Under VxWorks AE, you can call this function from within the kernel protection domain only.  In addition, all arguments to this function can  reference only that data which is valid in the kernel protection domain. Likewise, the returned ID 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><b>CL_BLK_ID</b> or NULL.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./netBufLib.html#top">netBufLib</a></b><hr><a name="netMblkClJoin"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries :  Routines</i></a></p></blockquote><h1>netMblkClJoin(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>netMblkClJoin(&nbsp;)</strong> - join an <b>mBlk</b> to a <b>clBlk</b>-cluster construct</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>M_BLK_ID netMblkClJoin    (    M_BLK_ID  pMblk,          /* pointer to an mBlk */    CL_BLK_ID pClBlk          /* pointer to a cluster Blk */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine joins the previously reserved <b>mBlk</b> referenced in <i>pMblk</i> tothe <b>clBlk</b>-cluster construct referenced in <i>pClBlk</i>. Internally, this routine sets the <b>M_EXT</b> flag in <b>mBlk.mBlkHdr.mFlags</b>.  It also and sets the <b>mBlk.mBlkHdr.mData</b> to point to the start of the data in the cluster.<p></blockquote><h4>VXWORKS AE PROTECTION DOMAINS</h4><blockquote><p>Under VxWorks AE, you can call this function from within the kernel protection domain only.  In addition, all arguments to this function can  reference only that data which is valid in the kernel protection domain. Likewise, the returned ID 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><b>M_BLK_ID</b> or NULL.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./netBufLib.html#top">netBufLib</a></b><hr><a name="netClPoolIdGet"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries :  Routines</i></a></p></blockquote><h1>netClPoolIdGet(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>netClPoolIdGet(&nbsp;)</strong> - return a <b>CL_POOL_ID</b> for a specified buffer size </p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>CL_POOL_ID netClPoolIdGet    (    NET_POOL_ID pNetPool,     /* pointer to the net pool */    int         bufSize,      /* size of the buffer */    BOOL        bestFit       /* TRUE/FALSE */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine returns a <b>CL_POOL_ID</b> for a cluster pool containing clusters that match the specified <i>bufSize</i>.  If bestFit is TRUE, this routine returns a <b>CL_POOL_ID</b> for a pool that contains clusters greater than or equal to <i>bufSize</i>.  If <i>bestFit</i> is FALSE, this routine returns a <b>CL_POOL_ID</b> for a cluster from whatever cluster pool is available.  If the memory pool specified by <i>pNetPool</i> contains only one cluster pool, <i>bestFit</i> should always be FALSE.<p></blockquote><h4>VXWORKS AE PROTECTION DOMAINS</h4><blockquote><p>Under VxWorks AE, you can call this function from within the kernel protection domain only.  In addition, all arguments to this function can  reference only that data which is valid in the kernel protection domain. Likewise, the returned ID 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><b>CL_POOL_ID</b> or NULL.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./netBufLib.html#top">netBufLib</a></b><hr><a name="netMblkToBufCopy"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries :  Routines</i></a></p></blockquote><h1>netMblkToBufCopy(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>netMblkToBufCopy(&nbsp;)</strong> - copy data from an <b>mBlk</b> to a buffer</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>int netMblkToBufCopy    (    M_BLK_ID pMblk,           /* pointer to an mBlk */    char *   pBuf,            /* pointer to the buffer to copy */    FUNCPTR  pCopyRtn         /* function pointer for copy routine */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine copies data from the <b>mBlk</b> chain referenced in <i>pMblk</i> to the buffer referenced in <i>pBuf</i>.  It is assumed that <i>pBuf</i> points to enough memory to contain all the data in the entire <b>mBlk</b> chain.The argument <i>pCopyRtn</i> expects either a NULL or a function pointer to a copy routine.  The arguments passed to the copy routine are source pointer, destination pointer and the length of data to copy.  If <i>pCopyRtn</i> is NULL, <b><a href="./netBufLib.html#netMblkToBufCopy">netMblkToBufCopy</a>(&nbsp;)</b> uses a default routine to extract the data from the chain.<p></blockquote><h4>RETURNS</h4><blockquote><p>The length of data copied or zero.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./netBufLib.html#top">netBufLib</a></b><hr><a name="netMblkDup"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries :  Routines</i></a></p></blockquote><h1>netMblkDup(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>netMblkDup(&nbsp;)</strong> - duplicate an <b>mBlk</b></p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>M_BLK_ID netMblkDup    (    M_BLK_ID pSrcMblk,        /* pointer to source mBlk */    M_BLK_ID pDestMblk        /* pointer to the destination mBlk */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine copies the references from a source <b>mBlk</b> in an <b>mBlk</b>-<b>clBlk</b>-cluster construct to a stand-alone <b>mBlk</b>.This lets the two <b>mBlk</b> structures share the same <b>clBlk</b>-clusterconstruct.  This routine also increments the reference count in the shared <b>clBlk</b>.  The <i>pSrcMblk</i> expects a pointer to the source <b>mBlk</b>.  The <i>pDescMblk</i> parameter expects a pointer to the destination <b>mBlk</b>. <p></blockquote><h4>VXWORKS AE PROTECTION DOMAINS</h4><blockquote><p>Under VxWorks AE, you can call this function from within the kernel protection domain only.  In addition, all arguments to this function can  reference only that data which is valid in the kernel protection domain. Likewise, the returned ID 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>A pointer to the destination <b>mBlk</b> or NULL if the source <b>mBlk</b> referenced in <i>pSrcMblk</i> is not part of a valid <b>mBlk</b>-<b>clBlk</b>-cluster construct.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./netBufLib.html#top">netBufLib</a></b><hr><a name="netMblkChainDup"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries :  Routines</i></a></p></blockquote><h1>netMblkChainDup(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>netMblkChainDup(&nbsp;)</strong> - duplicate an <b>mBlk</b> chain</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>M_BLK_ID netMblkChainDup    (    NET_POOL_ID pNetPool,     /* pointer to the pool */    M_BLK_ID    pMblk,        /* pointer to source mBlk chain*/    int         offset,       /* offset to duplicate from */    int         len,          /* length to copy */    int         canWait       /* M_DONTWAIT/M_WAIT */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine makes a copy of an <b>mBlk</b> chain starting at <i>offset</i> bytes fromthe beginning of the chain and continuing for <i>len</i> bytes.  If <i>len</i> is <b>M_COPYALL</b>, then this routine will copy the entire <b>mBlk</b> chain from the <i>offset</i>.<p>This routine copies the references from a source <i>pMblk</i> chain toa newly allocated <b>mBlk</b> chain. This lets the two <b>mBlk</b> chains share the same <b>clBlk</b>-clusterconstructs.  This routine also increments the reference count in the shared <b>clBlk</b>.  The <i>pMblk</i> expects a pointer to the source <b>mBlk</b>chain.  The <i>pNetPool</i> parameter expects a pointer to the netPool from whichthe new <b>mBlk</b> chain is allocated.<p>The <i>canWait</i> parameter determines the behavior if any required <b>mBlk</b>is not immediately available. A value of <b>M_WAIT</b> allows this routine torepeat the allocation attempt after performing garbage collection. The<b>M_DONTWAIT</b> value prevents those extra steps.<p></blockquote><h4>VXWORKS AE PROTECTION DOMAINS</h4><blockquote><p>Under VxWorks AE, you can call this function from within the kernel protection domain only.  In addition, all arguments to this function can  reference only that data which is valid in the kernel protection domain. Likewise, the returned ID is valid in the kernel protection domain only.This restriction does not apply under non-AE versions of VxWorks.  <p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./netBufLib.html#top">netBufLib</a></b>, <b><a href="./netBufLib.html#netMblkDup">netMblkDup</a>(&nbsp;)</b><p></blockquote><h4>RETURNS</h4><blockquote><p>A pointer to the newly allocated <b>mBlk</b> chain or NULL.<p></blockquote><h4>ERRNO</h4><blockquote><p><p>&nbsp;<b>S_netBufLib_INVALID_ARGUMENT</b><br>&nbsp;<b>S_netBufLib_NO_POOL_MEMORY</b></body></html>

⌨️ 快捷键说明

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