24#ifndef SURICATA_UTIL_BUFFER_H
25#define SURICATA_UTIL_BUFFER_H
42static inline void MemBufferReset(
MemBuffer *b)
51#define MEMBUFFER_BUFFER(mem_buffer) (mem_buffer)->buffer
56#define MEMBUFFER_OFFSET(mem_buffer) (mem_buffer)->offset
61#define MEMBUFFER_SIZE(mem_buffer) (mem_buffer)->size
#define ATTR_FMT_PRINTF(x, y)
void MemBufferPrintToFP(MemBuffer *buffer, FILE *fp)
Write a buffer to the file pointer.
void MemBufferWriteString(MemBuffer *dst, const char *fmt,...) ATTR_FMT_PRINTF(2
Write a string buffer to the Membuffer dst.
int MemBufferExpand(MemBuffer **buffer, uint32_t expand_by)
expand membuffer by size of 'expand_by'
MemBuffer * MemBufferCreateNew(uint32_t size)
uint32_t MemBufferWriteRaw(MemBuffer *dst, const uint8_t *raw, const uint32_t raw_len)
Write a raw buffer to the MemBuffer dst.
void MemBufferPrintToFPAsHex(MemBuffer *b, FILE *fp)
Write a buffer in hex format.
struct MemBuffer_ MemBuffer
void MemBufferFree(MemBuffer *buffer)
size_t MemBufferPrintToFPAsString(MemBuffer *b, FILE *fp)
Write a buffer to the file pointer as a printable char string.