diff options
Diffstat (limited to 'example/reader_util.c')
-rw-r--r-- | example/reader_util.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/example/reader_util.c b/example/reader_util.c index fdb01e2ba..014574503 100644 --- a/example/reader_util.c +++ b/example/reader_util.c @@ -1010,8 +1010,8 @@ static struct ndpi_flow_info *get_ndpi_flow_info6(struct ndpi_workflow * workflo /* ****************************************************** */ static u_int8_t is_ndpi_proto(struct ndpi_flow_info *flow, u_int16_t id) { - if((flow->detected_protocol.master_protocol == id) - || (flow->detected_protocol.app_protocol == id)) + if((flow->detected_protocol.proto.master_protocol == id) + || (flow->detected_protocol.proto.app_protocol == id)) return(1); else return(0); @@ -1556,7 +1556,7 @@ static struct ndpi_proto packet_processing(struct ndpi_workflow * workflow, if(payload_len && ((flow->src2dst_packets+flow->dst2src_packets) < MAX_NUM_BIN_PKTS)) { #if 0 /* Discard packets until the protocol is detected */ - if(flow->detected_protocol.app_protocol != NDPI_PROTOCOL_UNKNOWN) + if(flow->detected_protocol.proto.app_protocol != NDPI_PROTOCOL_UNKNOWN) #endif ndpi_inc_bin(&flow->payload_len_bin, plen2slot(payload_len), 1); } @@ -1613,9 +1613,9 @@ static struct ndpi_proto packet_processing(struct ndpi_workflow * workflow, if((proto == IPPROTO_TCP) && ( is_ndpi_proto(flow, NDPI_PROTOCOL_TLS) - || (flow->detected_protocol.master_protocol == NDPI_PROTOCOL_TLS) + || (flow->detected_protocol.proto.master_protocol == NDPI_PROTOCOL_TLS) || is_ndpi_proto(flow, NDPI_PROTOCOL_SSH) - || (flow->detected_protocol.master_protocol == NDPI_PROTOCOL_SSH)) + || (flow->detected_protocol.proto.master_protocol == NDPI_PROTOCOL_SSH)) ) { if((flow->src2dst_packets+flow->dst2src_packets) < 10 /* MIN_NUM_ENCRYPT_SKIP_PACKETS */) skip = 1; /* Skip initial negotiation packets */ @@ -1632,9 +1632,9 @@ static struct ndpi_proto packet_processing(struct ndpi_workflow * workflow, if((proto == IPPROTO_TCP) && ( is_ndpi_proto(flow, NDPI_PROTOCOL_TLS) - || (flow->detected_protocol.master_protocol == NDPI_PROTOCOL_TLS) + || (flow->detected_protocol.proto.master_protocol == NDPI_PROTOCOL_TLS) || is_ndpi_proto(flow, NDPI_PROTOCOL_SSH) - || (flow->detected_protocol.master_protocol == NDPI_PROTOCOL_SSH)) + || (flow->detected_protocol.proto.master_protocol == NDPI_PROTOCOL_SSH)) ) flow->has_human_readeable_strings = 0; } @@ -1672,7 +1672,7 @@ static struct ndpi_proto packet_processing(struct ndpi_workflow * workflow, ipsize, time_ms, &input_info); enough_packets |= ndpi_flow->fail_with_unknown; - if(enough_packets || (flow->detected_protocol.app_protocol != NDPI_PROTOCOL_UNKNOWN)) { + if(enough_packets || (flow->detected_protocol.proto.app_protocol != NDPI_PROTOCOL_UNKNOWN)) { if((!enough_packets) && ndpi_extra_dissection_possible(workflow->ndpi_struct, ndpi_flow)) ; /* Wait for further metadata */ @@ -1680,7 +1680,7 @@ static struct ndpi_proto packet_processing(struct ndpi_workflow * workflow, /* New protocol detected or give up */ flow->detection_completed = 1; - if(flow->detected_protocol.app_protocol == NDPI_PROTOCOL_UNKNOWN) { + if(flow->detected_protocol.proto.app_protocol == NDPI_PROTOCOL_UNKNOWN) { u_int8_t proto_guessed; flow->detected_protocol = ndpi_detection_giveup(workflow->ndpi_struct, flow->ndpi_flow, |