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

📄 nbuf.h

📁 Freescale MCF5445evb 参考测试代码
💻 H
字号:
/* * File:        nbuf.h * Purpose:     Definitions for network buffer management * * Notes:       These routines implement a network buffer scheme */#ifndef _NBUF_H_#define _NBUF_H_/********************************************************************//* * Number of network buffers to use */#ifndef NBUF_MAX#define NBUF_MAX    200#endif/* * Size of each buffer in bytes */#ifndef NBUF_SZ#define NBUF_SZ     2048#endif/*  * Buffer Descriptor Format  *  * Fields: * node     Pointer to next node in the queue * data     Pointer to the data buffer * offset   Index into buffer * length   Remaining bytes in buffer from (data + offset) */typedef struct{    QNODE node;    uint8 *data;       uint16 offset;    uint16 length;} NBUF;/* * Functions to manipulate the network buffers. */intnbuf_init(int, int);voidnbuf_flush(void);NBUF *nbuf_alloc (void);voidnbuf_free(NBUF *);voidnbuf_reset(void);voidnbuf_debug_dump(void);/********************************************************************/#endif  /* _NBUF_H_ */

⌨️ 快捷键说明

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