version 1.1, 2012/02/21 23:32:47
|
version 1.1.1.5, 2021/03/17 00:39:23
|
Line 29
|
Line 29
|
/* Macros */ |
/* Macros */ |
#define MBDATAU(bp) ((u_char *)(bp) + sizeof(struct mpdmbuf) + (bp)->offset) |
#define MBDATAU(bp) ((u_char *)(bp) + sizeof(struct mpdmbuf) + (bp)->offset) |
#define MBDATA(bp) ((bp) ? MBDATAU(bp) : NULL) |
#define MBDATA(bp) ((bp) ? MBDATAU(bp) : NULL) |
#define MBLEN(bp) ((bp) ? (bp)->cnt : 0) | #define MBLEN(bp) ((size_t)((bp) ? (bp)->cnt : 0)) |
#define MBSPACE(bp) ((bp) ? (bp)->size - (bp)->offset : 0) |
#define MBSPACE(bp) ((bp) ? (bp)->size - (bp)->offset : 0) |
|
|
/* Types of allocated memory */ |
/* Types of allocated memory */ |
Line 55
|
Line 55
|
#define MB_PPTP "PPTP" |
#define MB_PPTP "PPTP" |
#define MB_RADIUS "RADIUS" |
#define MB_RADIUS "RADIUS" |
#define MB_RADSRV "RADSRV" |
#define MB_RADSRV "RADSRV" |
|
#define MB_ACL "ACL_BPF" |
|
#define MB_IPFW "ACL_IPFW" |
#define MB_UTIL "UTIL" |
#define MB_UTIL "UTIL" |
#define MB_VJCOMP "VJCOMP" |
#define MB_VJCOMP "VJCOMP" |
#define MB_IPPOOL "IPPOOL" |
#define MB_IPPOOL "IPPOOL" |
Line 71
|
Line 73
|
|
|
extern void *Malloc(const char *type, size_t size) __malloc_like; |
extern void *Malloc(const char *type, size_t size) __malloc_like; |
extern void *Mdup(const char *type, const void *src, size_t size) __malloc_like; |
extern void *Mdup(const char *type, const void *src, size_t size) __malloc_like; |
|
extern void *Mdup2(const char *type, const void *src, size_t oldsize, size_t newsize) __malloc_like; |
extern void *Mstrdup(const char *type, const void *src) __malloc_like; |
extern void *Mstrdup(const char *type, const void *src) __malloc_like; |
extern void Freee(void *ptr); |
extern void Freee(void *ptr); |
|
|
Line 87
|
Line 90
|
|
|
/* Etc */ |
/* Etc */ |
|
|
extern int MemStat(Context ctx, int ac, char *av[], void *arg); | extern int MemStat(Context ctx, int ac, const char *const av[], const void *arg); |
extern void DumpBp(Mbuf bp); |
extern void DumpBp(Mbuf bp); |
|
|
#endif |
#endif |