IPv6: add support for custom categories (#2126)
This commit is contained in:
@@ -810,6 +810,7 @@ extern "C" {
|
||||
* -1 else
|
||||
*/
|
||||
int ndpi_load_categories_file(struct ndpi_detection_module_struct *ndpi_str, const char* path, void *user_data);
|
||||
int ndpi_load_categories_file2(struct ndpi_detection_module_struct *ndpi_str, FILE *fd, void *user_data);
|
||||
|
||||
/**
|
||||
* Loads a file (separated by <cr>) of domain names associated with the specified category
|
||||
@@ -1028,11 +1029,17 @@ extern "C" {
|
||||
int ndpi_enable_loaded_categories(struct ndpi_detection_module_struct *ndpi_struct);
|
||||
void* ndpi_find_ipv4_category_userdata(struct ndpi_detection_module_struct *ndpi_str,
|
||||
u_int32_t saddr);
|
||||
void* ndpi_find_ipv6_category_userdata(struct ndpi_detection_module_struct *ndpi_str,
|
||||
struct in6_addr *saddr);
|
||||
int ndpi_fill_ip_protocol_category(struct ndpi_detection_module_struct *ndpi_struct,
|
||||
struct ndpi_flow_struct *flow,
|
||||
u_int32_t saddr,
|
||||
u_int32_t daddr,
|
||||
ndpi_protocol *ret);
|
||||
int ndpi_fill_ip6_protocol_category(struct ndpi_detection_module_struct *ndpi_str,
|
||||
struct ndpi_flow_struct *flow,
|
||||
struct in6_addr *saddr, struct in6_addr *daddr,
|
||||
ndpi_protocol *ret);
|
||||
int ndpi_match_custom_category(struct ndpi_detection_module_struct *ndpi_struct,
|
||||
char *name, u_int name_len, ndpi_protocol_category_t *id);
|
||||
void ndpi_fill_protocol_category(struct ndpi_detection_module_struct *ndpi_struct,
|
||||
|
||||
@@ -1327,6 +1327,7 @@ struct ndpi_detection_module_struct {
|
||||
ndpi_domain_classify *sc_hostnames, *sc_hostnames_shadow;
|
||||
#endif
|
||||
void *ipAddresses, *ipAddresses_shadow; /* Patricia */
|
||||
void *ipAddresses6, *ipAddresses6_shadow; /* Patricia IPv6*/
|
||||
u_int8_t categories_loaded;
|
||||
} custom_categories;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user