Initial geoip support
This commit is contained in:
@@ -1465,6 +1465,12 @@ extern "C" {
|
||||
int ndpi_hash_find_entry(ndpi_str_hash *h, char *key, u_int key_len, u_int8_t *value);
|
||||
int ndpi_hash_add_entry(ndpi_str_hash *h, char *key, u_int8_t key_len, u_int8_t value);
|
||||
|
||||
/* ******************************* */
|
||||
|
||||
int ndpi_load_geeoip(struct ndpi_detection_module_struct *ndpi_str,
|
||||
const char *ip_city_data, const char *ip_as_data);
|
||||
int ndpi_free_geeoip(struct ndpi_detection_module_struct *ndpi_str);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -26,8 +26,12 @@
|
||||
|
||||
#include "ndpi_define.h"
|
||||
#include "ndpi_protocol_ids.h"
|
||||
|
||||
#include "ndpi_utils.h"
|
||||
|
||||
#ifdef HAVE_MAXMINDDB
|
||||
#include <maxminddb.h>
|
||||
#endif
|
||||
|
||||
/* NDPI_LOG_LEVEL */
|
||||
typedef enum {
|
||||
NDPI_LOG_ERROR,
|
||||
@@ -1153,6 +1157,11 @@ struct ndpi_detection_module_struct {
|
||||
#ifdef CUSTOM_NDPI_PROTOCOLS
|
||||
#include "../../../nDPI-custom/custom_ndpi_typedefs.h"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_MAXMINDDB
|
||||
MMDB_s mmdb_city, mmdb_as;
|
||||
u_int8_t mmdb_city_loaded, mmdb_as_loaded;
|
||||
#endif
|
||||
};
|
||||
|
||||
#endif /* NDPI_LIB_COMPILATION */
|
||||
|
||||
Reference in New Issue
Block a user