hdf_netbuf.h
Overview
Related Modules:
Description:
Declares network data buffers and provides APIs for operating buffer queues.
This file describes the following network data operations for network device driver development: Applying for, releasing, and moving a network data buffer Initializing a network data buffer queue, placing a network data buffer to a queue, and removing a network data buffer from a queue
Since:
1.0
Version:
1.0
Summary
Data Structures
Macros
Defines the reserved field of a network data buffer used to store private information. |
Enumerations
Functions
NetBufQueueInit (struct NetBufQueue q) |
|
NetBufQueueSize (const struct NetBufQueue q) |
|
NetBufQueueIsEmpty (const struct NetBufQueue q) |
|
NetBufQueueEnqueue (struct NetBufQueue q, struct NetBuf nb) |
|
NetBufQueueEnqueueHead (struct NetBufQueue q, struct NetBuf nb) |
|
NetBufQueueDequeue (struct NetBufQueue q) |
struct NetBuf Obtains a network data buffer from the header of a queue and deletes it from the queue. |
NetBufQueueDequeueTail (struct NetBufQueue q) |
struct NetBuf Obtains a network data buffer from the tail of a queue and deletes it from the queue. |
NetBufQueueAtHead (const struct NetBufQueue q) |
static struct NetBuf Obtains the network data buffer from the header of a queue, without deleting it from the queue. |
NetBufQueueAtTail (const struct NetBufQueue q) |
static struct NetBuf Obtains the network data buffer from the tail of a queue, without deleting it from the queue. |
NetBufQueueClear (struct NetBufQueue q) |
Clears a network data buffer queue and releases the network data buffer in the queue. |
NetBufQueueConcat (struct NetBufQueue q, struct NetBufQueue add) |
Moves all network data buffers from one queue to another and clears the source queue. |
NetBufAlloc (uint32_t size) |
struct NetBuf |
NetBufFree (struct NetBuf nb) |
|
NetBufDevAlloc (const struct NetDevice dev, uint32_t size) |
struct NetBuf Applies for a network data buffer based on the reserved space and requested size set by a network device. |
NetBufPush (struct NetBuf nb, uint32_t id, uint32_t len) |
Performs operations based on the segment ID of a network data buffer. The function is opposite to that of NetBufPop. |
Performs operations based on the segment ID of a network data buffer. The function is opposite to that of NetBufPush. |
|
NetBufGetAddress (const struct NetBuf nb, uint32_t id) |
Obtains the address of a specified buffer segment in a network data buffer. |
NetBufGetRoom (const struct NetBuf nb, uint32_t id) |
Obtains the size of a specified buffer segment space in a network data buffer. |
NetBufGetDataLen (const struct NetBuf nb) |
Obtains the actual data length of the data segment of a network data buffer. |
NetBufResizeRoom (struct NetBuf nb, uint32_t head, uint32_t tail) |
|
NetBufConcat (struct NetBuf nb, struct NetBuf cnb) |
Copies data in a network data buffer to another network data buffer. |
Pbuf2NetBuf (const struct NetDevice netdev, struct pbuf lwipBuf) |
struct NetBuf Converts the pbuf structure of Lightweight TCP/IP Stack (lwIP) to a network data buffer. |
NetBuf2Pbuf (const struct NetBuf nb) |
Converts a network data buffer to the pbuf structure of Lightweight TCP/IP Stack (lwIP). |