Go to the documentation of this file.
24 #ifndef SURICATA_UTIL_PRINT_H
25 #define SURICATA_UTIL_PRINT_H
27 #define PrintBufferData(buf, buf_offset_ptr, buf_size, ...) do { \
28 int cw = snprintf((buf) + *(buf_offset_ptr), \
29 (buf_size) - *(buf_offset_ptr), \
32 if ( (*(buf_offset_ptr) + cw) >= buf_size) { \
33 SCLogDebug("Truncating data write since it exceeded buffer " \
34 "limit of - %"PRIu32"\n", buf_size); \
35 *(buf_offset_ptr) = buf_size - 1; \
37 *(buf_offset_ptr) += cw; \
44 void PrintRawUriBuf(
char *, uint32_t *, uint32_t, uint8_t *,
size_t);
47 const uint8_t *src_buf, uint32_t src_buf_len);
49 const uint8_t *src_buf,
const uint32_t src_buf_len);
51 const char *
PrintInet(
int ,
const void *,
char *, socklen_t);
void PrintRawDataToBuffer(uint8_t *dst_buf, uint32_t *dst_buf_offset_ptr, uint32_t dst_buf_size, const uint8_t *src_buf, uint32_t src_buf_len)
void PrintRawLineHexBuf(char *, uint32_t, const uint8_t *, uint32_t)
print a buffer as hex on a single line into retbuf buffer
void PrintStringsToBuffer(uint8_t *dst_buf, uint32_t *dst_buf_offset_ptr, uint32_t dst_buf_size, const uint8_t *src_buf, const uint32_t src_buf_len)
void PrintRawDataFp(FILE *, const uint8_t *, uint32_t)
void PrintRawUriBuf(char *, uint32_t *, uint32_t, uint8_t *, size_t)
void PrintBufferRawLineHex(char *, int *, int, const uint8_t *, uint32_t)
print a buffer as hex on a single line
void PrintHexString(char *str, size_t size, uint8_t *buf, size_t buf_len)
const char * PrintInet(int, const void *, char *, socklen_t)
void PrintRawUriFp(FILE *, uint8_t *, uint32_t)