Fix some compilation warnings
This commit is contained in:
@@ -53,7 +53,6 @@ double get_flow_score(ndpi_norm_value* scores, int n_metrics){
|
||||
/* ********************************** */
|
||||
|
||||
double Ddos_score(struct ndpi_flow_info* flow){
|
||||
double f = (double)flow->first_seen/1000.0, l = (double)flow->last_seen/1000.0;
|
||||
int n_metrics = 6;
|
||||
ndpi_norm_value* scores = malloc(n_metrics * sizeof(ndpi_norm_value));
|
||||
/* pktlen_c_to_s_avg */
|
||||
@@ -105,7 +104,6 @@ double Ddos_score(struct ndpi_flow_info* flow){
|
||||
}
|
||||
|
||||
double Dos_goldeneye_score(struct ndpi_flow_info* flow){
|
||||
double f = (double)flow->first_seen/1000.0, l = (double)flow->last_seen/1000.0;
|
||||
int n_metrics = 6;
|
||||
ndpi_norm_value* scores = malloc(n_metrics * sizeof(ndpi_norm_value));
|
||||
/* pktlen_s_to_c_max */
|
||||
@@ -208,7 +206,6 @@ double Dos_hulk_score(struct ndpi_flow_info* flow){
|
||||
}
|
||||
|
||||
double Dos_slow_score(struct ndpi_flow_info* flow){
|
||||
double f = (double)flow->first_seen/1000.0, l = (double)flow->last_seen/1000.0;
|
||||
int n_metrics = 6;
|
||||
ndpi_norm_value* scores = malloc(n_metrics * sizeof(ndpi_norm_value));
|
||||
/* pktlen_s_to_c_max */
|
||||
@@ -260,7 +257,6 @@ double Dos_slow_score(struct ndpi_flow_info* flow){
|
||||
}
|
||||
|
||||
double Ftp_patator_score(struct ndpi_flow_info* flow){
|
||||
double f = (double)flow->first_seen/1000.0, l = (double)flow->last_seen/1000.0;
|
||||
int n_metrics = 6;
|
||||
ndpi_norm_value* scores = malloc(n_metrics * sizeof(ndpi_norm_value));
|
||||
/* iat_flow_min */
|
||||
@@ -364,7 +360,6 @@ double Hearthbleed_score(struct ndpi_flow_info* flow){
|
||||
}
|
||||
|
||||
double Infiltration_score(struct ndpi_flow_info* flow){
|
||||
double f = (double)flow->first_seen/1000.0, l = (double)flow->last_seen/1000.0;
|
||||
int n_metrics = 6;
|
||||
ndpi_norm_value* scores = malloc(n_metrics * sizeof(ndpi_norm_value));
|
||||
/* pktlen_c_to_s_max */
|
||||
@@ -416,7 +411,6 @@ double Infiltration_score(struct ndpi_flow_info* flow){
|
||||
}
|
||||
|
||||
double Ssh_patator_score(struct ndpi_flow_info* flow){
|
||||
double f = (double)flow->first_seen/1000.0, l = (double)flow->last_seen/1000.0;
|
||||
int n_metrics = 6;
|
||||
ndpi_norm_value* scores = malloc(n_metrics * sizeof(ndpi_norm_value));
|
||||
/* fin */
|
||||
|
||||
@@ -218,6 +218,7 @@ FILE *trace = NULL;
|
||||
*/
|
||||
static void setupDetection(u_int16_t thread_id, pcap_t * pcap_handle);
|
||||
|
||||
#if 0
|
||||
static void reduceBDbits(uint32_t *bd, unsigned int len) {
|
||||
int mask = 0;
|
||||
int shift = 0;
|
||||
@@ -238,6 +239,7 @@ static void reduceBDbits(uint32_t *bd, unsigned int len) {
|
||||
for(i = 0; i < len; i++)
|
||||
bd[i] = bd[i] >> shift;
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Get flow byte distribution mean and variance
|
||||
@@ -1530,12 +1532,14 @@ static int acceptable(u_int32_t num_pkts){
|
||||
|
||||
/* *********************************************** */
|
||||
|
||||
#if 0
|
||||
static int receivers_sort(void *_a, void *_b) {
|
||||
struct receiver *a = (struct receiver *)_a;
|
||||
struct receiver *b = (struct receiver *)_b;
|
||||
|
||||
return(b->num_pkts - a->num_pkts);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* *********************************************** */
|
||||
|
||||
|
||||
@@ -1210,7 +1210,7 @@ static struct ndpi_proto packet_processing(struct ndpi_workflow * workflow,
|
||||
u_int8_t *payload;
|
||||
u_int8_t src_to_dst_direction = 1;
|
||||
u_int8_t begin_or_end_tcp = 0;
|
||||
struct ndpi_proto nproto = { NDPI_PROTOCOL_UNKNOWN, NDPI_PROTOCOL_UNKNOWN };
|
||||
struct ndpi_proto nproto = NDPI_PROTOCOL_NULL;
|
||||
|
||||
if(iph)
|
||||
flow = get_ndpi_flow_info(workflow, IPVERSION, vlan_id,
|
||||
@@ -1441,7 +1441,7 @@ struct ndpi_proto ndpi_workflow_process_packet(struct ndpi_workflow * workflow,
|
||||
/** --- IPv6 header --- **/
|
||||
struct ndpi_ipv6hdr *iph6;
|
||||
|
||||
struct ndpi_proto nproto = { NDPI_PROTOCOL_UNKNOWN, NDPI_PROTOCOL_UNKNOWN };
|
||||
struct ndpi_proto nproto = NDPI_PROTOCOL_NULL;
|
||||
ndpi_packet_tunnel tunnel_type = ndpi_no_tunnel;
|
||||
|
||||
/* lengths and offsets */
|
||||
|
||||
Reference in New Issue
Block a user