nDPI/fuzz/fuzz_common_code.h

28 lines
610 B
C

#ifndef __FUZZ_COMMON_CODE_H__
#define __FUZZ_COMMON_CODE_H__
#include "ndpi_api.h"
#include <libgen.h>
#ifdef __cplusplus
extern "C"
{
#endif
void fuzz_init_detection_module(struct ndpi_detection_module_struct **ndpi_info_mod,
struct ndpi_global_context *g_ctx,
const char *path);
/* To allow memory allocation failures */
void fuzz_set_alloc_callbacks(void);
void fuzz_set_alloc_seed(int seed);
void fuzz_set_alloc_callbacks_and_seed(int seed);
FILE *buffer_to_file(const uint8_t *data, size_t size);
#ifdef __cplusplus
}
#endif
#endif