2016-09-11 09:42:19 +00:00
|
|
|
/**
|
2016-09-11 20:20:15 +00:00
|
|
|
* Author......: See docs/credits.txt
|
2016-09-11 09:42:19 +00:00
|
|
|
* License.....: MIT
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _DEBUGFILE_H
|
|
|
|
#define _DEBUGFILE_H
|
|
|
|
|
2016-09-13 08:38:59 +00:00
|
|
|
#include <stdio.h>
|
|
|
|
|
|
|
|
#define DEBUG_MODE 0
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
FILE *fp;
|
|
|
|
char *filename;
|
|
|
|
uint mode;
|
|
|
|
|
|
|
|
} debugfile_ctx_t;
|
|
|
|
|
|
|
|
int debugfile_init (debugfile_ctx_t *debugfile_ctx, const uint debug_mode, const char *debug_file);
|
|
|
|
void debugfile_destroy (debugfile_ctx_t *debugfile_ctx);
|
|
|
|
void debugfile_format_plain (debugfile_ctx_t *debugfile_ctx, const u8 *plain_ptr, const u32 plain_len);
|
|
|
|
void debugfile_write_append (debugfile_ctx_t *debugfile_ctx, const u8 *rule_buf, const u32 rule_len, const u8 *mod_plain_ptr, const u32 mod_plain_len, const u8 *orig_plain_ptr, const u32 orig_plain_len);
|
|
|
|
|
2016-09-11 09:42:19 +00:00
|
|
|
#endif // _DEBUGFILE_H
|