Added printf/fprintf replacement for some internal modules. (#1974)
* logging is instead redirected to `ndpi_debug_printf` Signed-off-by: lns <matzeton@googlemail.com> Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
This commit is contained in:
@@ -728,21 +728,22 @@ extern "C" {
|
||||
*
|
||||
* @par ndpi_mod = the detection module
|
||||
*/
|
||||
void ndpi_dump_protocols(struct ndpi_detection_module_struct *mod);
|
||||
void ndpi_dump_protocols(struct ndpi_detection_module_struct *mod, FILE *dump_out);
|
||||
|
||||
/**
|
||||
* Generate Options list used in OPNsense firewall plugin
|
||||
*
|
||||
* @par opt = The Option list to generate
|
||||
* @par dump_out = Output stream for generated options
|
||||
*/
|
||||
void ndpi_generate_options(u_int opt);
|
||||
void ndpi_generate_options(u_int opt, FILE *dump_out);
|
||||
|
||||
/**
|
||||
* Write the list of the scores and their associated risks
|
||||
*
|
||||
* @par ndpi_mod = the detection module
|
||||
* @par dump_out = Output stream for dumped risk scores
|
||||
*/
|
||||
void ndpi_dump_risks_score(void);
|
||||
void ndpi_dump_risks_score(FILE *dump_out);
|
||||
|
||||
/**
|
||||
* Read a file and load the protocols
|
||||
|
||||
@@ -41,11 +41,14 @@
|
||||
#include <sys/param.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#ifndef __APPLE__
|
||||
#include <netinet/ip.h>
|
||||
#include <netinet/tcp.h>
|
||||
#include <netinet/udp.h>
|
||||
#endif
|
||||
|
||||
#if !defined __APPLE__ && !defined __FreeBSD__ && !defined __NetBSD__ && !defined __OpenBSD__
|
||||
#include <endian.h>
|
||||
|
||||
@@ -64,6 +64,10 @@
|
||||
#ifndef _NDPI_PATRICIA_TYPEDEF_H_
|
||||
#define _NDPI_PATRICIA_TYPEDEF_H_
|
||||
|
||||
#ifndef NDPI_CFFI_PREPROCESSING
|
||||
#include "ndpi_includes.h"
|
||||
#endif
|
||||
|
||||
#define UV16_MAX_USER_VALUES 2
|
||||
|
||||
struct patricia_uv16 {
|
||||
|
||||
@@ -25,6 +25,9 @@ E * ndpi_typedefs.h
|
||||
#define __NDPI_TYPEDEFS_H__
|
||||
|
||||
#include "ndpi_define.h"
|
||||
#ifndef NDPI_CFFI_PREPROCESSING
|
||||
#include "ndpi_includes.h"
|
||||
#endif
|
||||
#include "ndpi_protocol_ids.h"
|
||||
#include "ndpi_utils.h"
|
||||
|
||||
@@ -47,6 +50,12 @@ typedef unsigned int u_int;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef __APPLE__
|
||||
typedef unsigned char u_char;
|
||||
typedef unsigned short u_short;
|
||||
typedef unsigned int u_int;
|
||||
#endif
|
||||
|
||||
/* NDPI_LOG_LEVEL */
|
||||
typedef enum {
|
||||
NDPI_LOG_ERROR,
|
||||
|
||||
@@ -25,9 +25,14 @@
|
||||
#define __NDPI_UTILS_H__
|
||||
|
||||
#include "ndpi_define.h"
|
||||
#ifndef NDPI_CFFI_PREPROCESSING
|
||||
#include "ndpi_includes.h"
|
||||
#endif
|
||||
|
||||
#ifndef NDPI_CFFI_PREPROCESSING
|
||||
extern u_int8_t ndpi_ends_with(char *str, char *ends);
|
||||
struct ndpi_detection_module_struct;
|
||||
extern u_int8_t ndpi_ends_with(struct ndpi_detection_module_struct *ndpi_struct,
|
||||
char *str, char *ends);
|
||||
#endif // NDPI_CFFI_PREPROCESSING
|
||||
/* **************************************** */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user