suricata
|
#include "suricata-common.h"
#include "util-print.h"
#include "util-error.h"
#include "util-debug.h"
#include "util-validate.h"
#include "rust.h"
Go to the source code of this file.
Macros | |
#define | BUFFER_LENGTH 2048 |
Functions | |
void | PrintBufferRawLineHex (char *nbuf, int *offset, int max_size, const uint8_t *buf, uint32_t buflen) |
print a buffer as hex on a single line More... | |
void | PrintRawLineHexBuf (char *retbuf, uint32_t retbuflen, const uint8_t *buf, uint32_t buflen) |
print a buffer as hex on a single line into retbuf buffer More... | |
void | PrintRawUriFp (FILE *fp, uint8_t *buf, uint32_t buflen) |
void | PrintRawUriBuf (char *retbuf, uint32_t *offset, uint32_t retbuflen, uint8_t *buf, size_t buflen) |
void | PrintRawDataFp (FILE *fp, const uint8_t *buf, uint32_t buflen) |
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 | 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) |
const char * | PrintInet (int af, const void *src, char *dst, socklen_t size) |
void | PrintHexString (char *str, size_t size, uint8_t *buf, size_t buf_len) |
Print utility functions
Definition in file util-print.c.
#define BUFFER_LENGTH 2048 |
void PrintBufferRawLineHex | ( | char * | nbuf, |
int * | offset, | ||
int | max_size, | ||
const uint8_t * | buf, | ||
uint32_t | buflen | ||
) |
print a buffer as hex on a single line
Prints in the format "00 AA BB"
nbuf | buffer into which the output is written |
offset | of where to start writing into the buffer |
max_size | the size of the output buffer |
buf | buffer to print from |
buflen | length of the input buffer |
Definition at line 44 of file util-print.c.
References offset, and PrintBufferData.
void PrintHexString | ( | char * | str, |
size_t | size, | ||
uint8_t * | buf, | ||
size_t | buf_len | ||
) |
Definition at line 254 of file util-print.c.
References DEBUG_VALIDATE_BUG_ON, and str.
const char* PrintInet | ( | int | af, |
const void * | src, | ||
char * | dst, | ||
socklen_t | size | ||
) |
Definition at line 230 of file util-print.c.
Referenced by AddressDebugPrint(), SCRadixAddKeyIPV4String(), SCRadixAddKeyIPV6String(), and TLSGetIPInformations().
void PrintRawDataFp | ( | FILE * | fp, |
const uint8_t * | buf, | ||
uint32_t | buflen | ||
) |
Definition at line 111 of file util-print.c.
Referenced by DetectBase64DecodeDoMatch(), and StreamingBufferCompareRawData().
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 | ||
) |
Definition at line 148 of file util-print.c.
References PrintBufferData.
void PrintRawLineHexBuf | ( | char * | retbuf, |
uint32_t | retbuflen, | ||
const uint8_t * | buf, | ||
uint32_t | buflen | ||
) |
print a buffer as hex on a single line into retbuf buffer
Prints in the format "00 AA BB"
retbuf | pointer to the buffer which will have the result |
rebuflen | length of the buffer |
buf | buffer to print from |
buflen | length of the input buffer |
Definition at line 61 of file util-print.c.
References offset, and PrintBufferData.
void PrintRawUriBuf | ( | char * | retbuf, |
uint32_t * | offset, | ||
uint32_t | retbuflen, | ||
uint8_t * | buf, | ||
size_t | buflen | ||
) |
Definition at line 93 of file util-print.c.
References offset, and PrintBufferData.
Referenced by LogCustomFormatWriteTimestamp().
void PrintRawUriFp | ( | FILE * | fp, |
uint8_t * | buf, | ||
uint32_t | buflen | ||
) |
Definition at line 69 of file util-print.c.
References BUFFER_LENGTH, offset, and PrintBufferData.
Referenced by EngineAnalysisFP().
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 | ||
) |
Definition at line 194 of file util-print.c.