[普通]ndis相关结构与函数

作者(passion) 阅读(1410次) 评论(0) 分类( 内核开发)

NDIS NET_BUFFER Structures

This section includes:


 

NDIS NET_BUFFER Functions

This section includes:

In most cases, a caller that allocates a NET_BUFFER_LIST structure will allocate and queue at least one NET_BUFFER structure on that NET_BUFFER_LIST structure. It is more efficient to preallocate NET_BUFFER structures when you allocate a pool of NET_BUFFER_LIST structures than allocating NET_BUFFER_LIST structures and NET_BUFFER structures separately.

You can call the NdisAllocateNetBufferListPool function with the fAllocateNetBuffer value set to TRUE when creating a NET_BUFFER_LIST structure pool. In this case, a NET_BUFFER structure is preallocated with each NET_BUFFER_LIST structure that the caller allocates from the pool. You can call the NdisAllocateNetBufferAndNetBufferList function or theNdisAllocateNetBufferList function to allocate NET_BUFFER_LIST structures from such a pool. CallNdisAllocateNetBufferAndNetBufferList only if fAllocateNetBuffer is TRUE and DataSize is zero.

You can also call NdisAllocateNetBufferListPool and set the DataSize member to a nonzero value when creating a NET_BUFFER_LIST structure pool. In this case, a NET_BUFFER structure, MDL, and data are preallocated with each NET_BUFFER_LIST structure that the caller allocates from the pool.

NET_BUFFER structures, MDLs, and data buffers that are allocated with NdisAllocateNetBufferAndNetBufferList orNdisAllocateNetBufferList should not be freed separate from the NET_BUFFER_LIST structure. Such structures are freed with the NET_BUFFER_LIST structure when you call the NdisFreeNetBufferList function.

Call the NdisFreeNetBufferListPool function to free a NET_BUFFER_LIST structure pool.


« 上一篇:城市热点dr.com5.2.0,5.2.1,6.0(D) 校园网客户端破解版(drcom至尊版)
« 下一篇:预编译头错误
在这里写下您精彩的评论
  • 微信

  • QQ

  • 支付宝

返回首页
返回首页 img
返回顶部~
返回顶部 img