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

📄 netbuflib.html

📁 Vxworks API操作系统和驱动程序设计API。压缩的HTML文件
💻 HTML
📖 第 1 页 / 共 4 页
字号:
<b><a href="./netBufLib.html#top">netBufLib</a></b><hr><a name="netMblkGet"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries :  Routines</i></a></p></blockquote><h1>netMblkGet(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>netMblkGet(&nbsp;)</strong> - get an <b>mBlk</b> from a memory pool</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 allocates an <b>mBlk</b> from the specified memory pool, ifavailable.<p><dl><dt><i>pNetPool</i><dd>Expects a pointer to the pool from which you want an <b>mBlk</b>.<dt><i>canWait</i><dd>Expects either <b>M_WAIT</b> or <b>M_DONTWAIT</b>.  If no <b>mBlk</b> is immediately available,the <b>M_WAIT</b> value allows this routine to repeat the allocation attempt afterperforming garbage collection. It omits these steps when the <b>M_DONTWAIT</b>value is used.<dt><i>type</i><dd>Expects the type value that you want to associate with the returned <b>mBlk</b>.</dl><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 if no <b>mBlk</b> is available.<p></blockquote><h4>ERRNO</h4><blockquote><p><p>&nbsp;<b>S_netBufLib_MBLK_INVALID</b></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.htm"><i>OS Libraries :  Routines</i></a></p></blockquote><h1>netClBlkGet(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>netClBlkGet(&nbsp;)</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>.<dt><i>canWait</i><dd>Expects either <b>M_WAIT</b> or <b>M_DONTWAIT</b>.  If no <b>clBlk</b> is immediately available,the <b>M_WAIT</b> value allows this routine to repeat the allocation attempt afterperforming garbage collection. It omits these steps when the <b>M_DONTWAIT</b>value is used.</dl></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 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.htm"><i>OS Libraries :  Routines</i></a></p></blockquote><h1>netClusterGet(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>netClusterGet(&nbsp;)</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>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>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.htm"><i>OS Libraries :  Routines</i></a></p></blockquote><h1>netMblkClGet(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>netMblkClGet(&nbsp;)</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 pair from the specified memory pooland joins it to the specified <b>mBlk</b> structure.  The <b>mBlk</b>-<b>clBlk</b>-clustertriplet it produces is the basic structure for handling data at all layersof 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 pair.<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 pair.  <dt><i>bufSize</i><dd>Expects the size, in bytes, of the cluster in the <b>clBlk</b>-cluster pair.  <dt><i>canWait</i><dd>Expects either <b>M_WAIT</b> or <b>M_DONTWAIT</b>.  If either item is not immediatelyavailable, the <b>M_WAIT</b> value allows this routine to repeat the allocationattempt after performing garbage collection. It omits those steps when the<b>M_DONTWAIT</b> value is used.<dt><i>bestFit</i><dd>Expects either TRUE or FALSE.  If <i>bestFit</i> is TRUE and a cluster of the exact size is unavailable, this routine gets a larger cluster (ifavailable).  If <i>bestFit</i> is FALSE and an exact size cluster is unavailable, this routine gets either a smaller or a larger cluster (depending on what is available).  Otherwise, it returns immediately with an ERROR value.For memory pools containing only one cluster size, <i>bestFit</i> should alwaysbe set to FALSE.</dl></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. This restriction does not apply under non-AE versions of VxWorks.  <p></blockquote><h4>RETURNS</h4><blockquote><p>OK or ERROR.<p></blockquote><h4>ERRNO</h4><blockquote><p><p>&nbsp;<b>S_netBufLib_CLSIZE_INVALID</b></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./netBufLib.html#top">netBufLib</a></b><hr><a name="netTupleGet"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries :  Routines</i></a></p></blockquote><h1>netTupleGet(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>netTupleGet(&nbsp;)</strong> - get an <b>mBlk</b>-<b>clBlk</b>-cluster</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>M_BLK_ID netTupleGet    (    NET_POOL_ID pNetPool,     /* pointer to the net pool */    int         bufSize,      /* size of the buffer to get */    int         canWait,      /* wait or dontwait */    UCHAR       type,         /* type of data */    BOOL        bestFit       /* TRUE/FALSE */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine gets an <b>mBlk</b>-<b>clBlk</b>-cluster triplet from the specifiedmemory pool.  The resulting structure is the basic method for accessingdata at all layers of the network stack.<p><dl><dt><i>pNetPool</i><dd>Expects a pointer to the memory pool with which you want to build a<b>mBlk</b>-<b>clBlk</b>-cluster triplet.<dt><i>bufSize</i><dd>Expects the size, in bytes, of the cluster in the <b>clBlk</b>-clusterpair.<dt><i>canWait</i><dd>Expects either <b>M_WAIT</b> or <b>M_DONTWAIT</b>.  If any item in the triplet is notimmediately available, the <b>M_WAIT</b> value allows this routine to repeat theallocation attempt after performing garbage collection. The <b>M_DONTWAIT</b> valueprevents those extra steps.<dt><i>type</i><dd>Expects the type of data, for example <b>MT_DATA</b>, <b>MT_HEADER</b>. The variousvalues for this type are defined in <b>netBufLib.h</b>.<dt><i>bestFit</i><dd>Expects either TRUE or FALSE.  If <i>bestFit</i> is TRUE and a cluster of the exact size is unavailable, this routine gets a larger cluster (ifavailable).  If <i>bestFit</i> is FALSE and an exact size cluster is unavailable, this routine gets either a smaller or a larger cluster (depending on what is available).  Otherwise, it returns immediately with an ERROR value.For memory pools containing only one cluster size, <i>bestFit</i> should alwaysbe set to FALSE.</dl>

⌨️ 快捷键说明

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