#ifndef NETBUF_MBLOCK_H
#define NETBUF_MBLOCK_H
#include "netbuf-defs.h"
#ifdef __cplusplus
extern "C" {
#endif
struct netbuf_mblock_st;
struct netbuf_st;
struct netbuf_mblock_dealloc_queue_st;
typedef struct {
struct netbuf_mblock_st *parent;
nb_SIZE offset;
} nb_ALLOCINFO;
typedef struct {
sllist_node slnode;
nb_SIZE offset;
nb_SIZE size;
} nb_QDEALLOC;
typedef struct {
sllist_node slnode;
nb_SIZE start;
nb_SIZE wrap;
nb_SIZE cursor;
nb_SIZE nalloc;
char *root;
struct netbuf_mblock_dealloc_queue_st *deallocs;
struct netbuf_mblock_st *parent;
} nb_MBLOCK;
typedef struct netbuf_mblock_st {
sllist_root active;
sllist_root avail;
nb_SIZE basealloc;
unsigned int maxblocks;
unsigned int curblocks;
nb_MBLOCK *cacheblocks;
nb_SIZE ncacheblocks;
struct netbuf_st *mgr;
} nb_MBPOOL;
typedef struct netbuf_mblock_dealloc_queue_st {
sllist_root pending;
nb_SIZE min_offset;
nb_MBPOOL qpool;
} nb_DEALLOC_QUEUE;
#ifdef __cplusplus
}
#endif
#endif