Removed now obsolete NDPI_DETECTION_SUPPORT_IPV6: code is more readeable now

This commit is contained in:
Luca Deri
2021-02-10 19:09:11 +01:00
parent 76ac551ed3
commit ea0309d21b
10 changed files with 19 additions and 102 deletions
+3 -4
View File
@@ -150,10 +150,9 @@ extern "C" {
#define ndpi_match_strprefix(payload, payload_len, str) \
ndpi_match_prefix((payload), (payload_len), (str), (sizeof(str)-1))
#ifdef NDPI_DETECTION_SUPPORT_IPV6
int ndpi_handle_ipv6_extension_headers(struct ndpi_detection_module_struct *ndpi_str, const u_int8_t ** l4ptr, u_int16_t * l4len, u_int8_t * nxt_hdr);
#endif
int ndpi_handle_ipv6_extension_headers(struct ndpi_detection_module_struct *ndpi_str,
const u_int8_t ** l4ptr, u_int16_t * l4len,
u_int8_t * nxt_hdr);
#ifdef __cplusplus
}
#endif
-1
View File
@@ -25,7 +25,6 @@
#ifndef __NDPI_PROTOCOLS_IDS_H__
#define __NDPI_PROTOCOLS_IDS_H__
#define NDPI_DETECTION_SUPPORT_IPV6
#define NDPI_PROTOCOL_SIZE 2
typedef enum {
+1 -8
View File
@@ -377,9 +377,7 @@ struct ndpi_dns_packet_header {
typedef union
{
u_int32_t ipv4;
#ifdef NDPI_DETECTION_SUPPORT_IPV6
struct ndpi_in6_addr ipv6;
#endif
} ndpi_ip_addr_t;
@@ -809,9 +807,7 @@ struct ndpi_int_one_line_struct {
struct ndpi_packet_struct {
const struct ndpi_iphdr *iph;
#ifdef NDPI_DETECTION_SUPPORT_IPV6
const struct ndpi_ipv6hdr *iphv6;
#endif
const struct ndpi_tcphdr *tcp;
const struct ndpi_udphdr *udp;
const u_int8_t *generic_l4_ptr; /* is set only for non tcp-udp traffic */
@@ -1127,10 +1123,7 @@ struct ndpi_detection_module_struct {
u_int32_t jabber_file_transfer_timeout;
u_int8_t ip_version_limit;
/* NDPI_PROTOCOL_BITTORRENT */
struct hash_ip4p_table *bt_ht;
#ifdef NDPI_DETECTION_SUPPORT_IPV6
struct hash_ip4p_table *bt6_ht;
#endif
struct hash_ip4p_table *bt_ht, *bt6_ht;
/* BT_ANNOUNCE */
struct bt_announce *bt_ann;
-2
View File
@@ -42,9 +42,7 @@ typedef struct fragment_wrapper {
uint8_t l4_protocol;
uint32_t initial_offset;
uint16_t ct_frag;
#ifdef NDPI_DETECTION_SUPPORT_IPV6
char *flow_label; // IP6
#endif
char gap[200];
fragment_t **fragments_list;
} fragments_wrapper_t;