Go to the documentation of this file.
24 #ifndef SURICATA_UTIL_BUFFER_H
25 #define SURICATA_UTIL_BUFFER_H
42 static 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
void MemBufferWriteString(MemBuffer *dst, const char *fmt,...) ATTR_FMT_PRINTF(2
Write a string buffer to the Membuffer dst.
size_t MemBufferPrintToFPAsString(MemBuffer *b, FILE *fp)
Write a buffer to the file pointer as a printable char string.
void MemBufferPrintToFP(MemBuffer *buffer, FILE *fp)
Write a buffer to the file pointer.
#define ATTR_FMT_PRINTF(x, y)
void MemBufferPrintToFPAsHex(MemBuffer *b, FILE *fp)
Write a buffer in hex format.
uint32_t MemBufferWriteRaw(MemBuffer *dst, const uint8_t *raw, const uint32_t raw_len)
Write a raw buffer to the MemBuffer dst.
MemBuffer * MemBufferCreateNew(uint32_t size)
struct MemBuffer_ MemBuffer
int MemBufferExpand(MemBuffer **buffer, uint32_t expand_by)
expand membuffer by size of 'expand_by'
void MemBufferFree(MemBuffer *buffer)