Skip to content

Commit e9a6196

Browse files
committed
Provide an explicit state for the flow classification process
Application should keep calling nDPI until flow state became `NDPI_STATE_CLASSIFIED`. The main loop in the application is simplified to something like: ``` res = ndpi_detection_process_packet(...); if(res->state == NDPI_STATE_CLASSIFIED) { /* Done: you can get finale classification and all metadata. nDPI doesn't need more packets for this flow */ } else { /* nDPI needs more packets for this flow. The provided classification is not final and more metadata might be extracted */ } ``` You can take a look at `ndpiReader` for a slightly more complex example. API changes: * remove the third parameter from `ndpi_detection_giveup()`. If you need to know if the classification flow has been guessed, you can access `flow->protocol_was_guessed` * remove `ndpi_extra_dissection_possible()` * change some prototypes from accepting `ndpi_protocol foo` to `ndpi_master_app_protocol bar`. The update is trivial: from `foo` to `foo.proto`
1 parent 2279a01 commit e9a6196

File tree

13 files changed

+131
-163
lines changed

13 files changed

+131
-163
lines changed

example/ndpiReader.c

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ void ndpiCheckHostStringMatch(char *testChar) {
460460
detected_protocol.proto.master_protocol = 0;
461461
detected_protocol.category = match.protocol_category;
462462

463-
ndpi_protocol2name(ndpi_str, detected_protocol, appBufStr,
463+
ndpi_protocol2name(ndpi_str, detected_protocol.proto, appBufStr,
464464
sizeof(appBufStr));
465465

466466
printf("Match Found for string [%s] -> P(%d) B(%d) C(%d) => %s %s %s\n",
@@ -544,7 +544,7 @@ static void ndpiCheckIPMatch(char *testChar) {
544544
memset(&detected_protocol, 0, sizeof(ndpi_protocol));
545545
detected_protocol.proto.app_protocol = ndpi_map_ndpi_id_to_user_proto_id(ndpi_str, ret);
546546

547-
ndpi_protocol2name(ndpi_str, detected_protocol, appBufStr,
547+
ndpi_protocol2name(ndpi_str, detected_protocol.proto, appBufStr,
548548
sizeof(appBufStr));
549549

550550
printf("Match Found for IP %s, port %d -> %s (%d)\n",
@@ -1761,11 +1761,11 @@ static void printFlow(u_int32_t id, struct ndpi_flow_info *flow, u_int16_t threa
17611761
);
17621762

17631763
fprintf(csv_fp, "%s|",
1764-
ndpi_protocol2id(flow->detected_protocol, buf, sizeof(buf)));
1764+
ndpi_protocol2id(flow->detected_protocol.proto, buf, sizeof(buf)));
17651765

17661766
fprintf(csv_fp, "%s|%s|%s|%s|",
17671767
ndpi_protocol2name(ndpi_thread_info[thread_id].workflow->ndpi_struct,
1768-
flow->detected_protocol, buf, sizeof(buf)),
1768+
flow->detected_protocol.proto, buf, sizeof(buf)),
17691769
ndpi_stack2str(ndpi_thread_info[thread_id].workflow->ndpi_struct,
17701770
&flow->detected_protocol.protocol_stack, buf2, sizeof(buf2)),
17711771
ndpi_get_proto_name(ndpi_thread_info[thread_id].workflow->ndpi_struct,
@@ -1904,7 +1904,7 @@ static void printFlow(u_int32_t id, struct ndpi_flow_info *flow, u_int16_t threa
19041904
flow->detected_protocol.proto.master_protocol,
19051905
flow->detected_protocol.proto.app_protocol,
19061906
ndpi_protocol2name(ndpi_thread_info[thread_id].workflow->ndpi_struct,
1907-
flow->detected_protocol, buf1, sizeof(buf1))
1907+
flow->detected_protocol.proto, buf1, sizeof(buf1))
19081908
);
19091909
}
19101910
}
@@ -1946,14 +1946,14 @@ static void printFlow(u_int32_t id, struct ndpi_flow_info *flow, u_int16_t threa
19461946

19471947
#ifdef NDPI_EXTENDED_SANITY_CHECKS
19481948
/* Be sure new stack logic is compatible with legacy code */
1949-
assert(ndpi_stack_get_upper_proto(&flow->detected_protocol.protocol_stack) == ndpi_get_upper_proto(flow->detected_protocol));
1950-
assert(ndpi_stack_get_lower_proto(&flow->detected_protocol.protocol_stack) == ndpi_get_lower_proto(flow->detected_protocol));
1949+
assert(ndpi_stack_get_upper_proto(&flow->detected_protocol.protocol_stack) == ndpi_get_upper_proto(flow->detected_protocol.proto));
1950+
assert(ndpi_stack_get_lower_proto(&flow->detected_protocol.protocol_stack) == ndpi_get_lower_proto(flow->detected_protocol.proto));
19511951
#endif
19521952

19531953
fprintf(out, "%s/%s][Stack: %s][IP: %u/%s]",
1954-
ndpi_protocol2id(flow->detected_protocol, buf, sizeof(buf)),
1954+
ndpi_protocol2id(flow->detected_protocol.proto, buf, sizeof(buf)),
19551955
ndpi_protocol2name(ndpi_thread_info[thread_id].workflow->ndpi_struct,
1956-
flow->detected_protocol, buf1, sizeof(buf1)),
1956+
flow->detected_protocol.proto, buf1, sizeof(buf1)),
19571957
ndpi_stack2str(ndpi_thread_info[thread_id].workflow->ndpi_struct,
19581958
&flow->detected_protocol.protocol_stack, buf2, sizeof(buf2)),
19591959
flow->detected_protocol.protocol_by_ip,
@@ -1987,7 +1987,7 @@ static void printFlow(u_int32_t id, struct ndpi_flow_info *flow, u_int16_t threa
19871987

19881988
fprintf(out, "[%s]",
19891989
ndpi_is_encrypted_proto(ndpi_thread_info[thread_id].workflow->ndpi_struct,
1990-
flow->detected_protocol) ? "Encrypted" : "ClearText");
1990+
flow->detected_protocol.proto) ? "Encrypted" : "ClearText");
19911991

19921992
fprintf(out, "[Confidence: %s]", ndpi_confidence_get_name(flow->confidence));
19931993

@@ -2026,7 +2026,7 @@ static void printFlow(u_int32_t id, struct ndpi_flow_info *flow, u_int16_t threa
20262026
(unsigned int)flow->detected_protocol.category);
20272027

20282028
breed = ndpi_get_proto_breed(ndpi_thread_info[thread_id].workflow->ndpi_struct,
2029-
ndpi_get_upper_proto(flow->detected_protocol));
2029+
ndpi_get_upper_proto(flow->detected_protocol.proto));
20302030
fprintf(out, "[Breed: %s]", ndpi_get_proto_breed_name(breed));
20312031

20322032
fprintf(out, "[%u pkts/%llu bytes ", flow->src2dst_packets, (long long unsigned int) flow->src2dst_bytes);
@@ -2549,14 +2549,13 @@ static void node_proto_guess_walker(const void *node, ndpi_VISIT which, int dept
25492549

25502550
if((which == ndpi_preorder) || (which == ndpi_leaf)) { /* Avoid walking the same node multiple times */
25512551
if((!flow->detection_completed) && flow->ndpi_flow) {
2552-
u_int8_t proto_guessed;
25532552

25542553
malloc_size_stats = 1;
25552554
flow->detected_protocol = ndpi_detection_giveup(ndpi_thread_info[thread_id].workflow->ndpi_struct,
2556-
flow->ndpi_flow, &proto_guessed);
2555+
flow->ndpi_flow);
25572556
malloc_size_stats = 0;
25582557

2559-
if(proto_guessed) ndpi_thread_info[thread_id].workflow->stats.guessed_flow_protocols++;
2558+
if(flow->ndpi_flow->protocol_was_guessed) ndpi_thread_info[thread_id].workflow->stats.guessed_flow_protocols++;
25602559
}
25612560

25622561
process_ndpi_collected_info(ndpi_thread_info[thread_id].workflow, flow);
@@ -2954,7 +2953,7 @@ static void port_stats_walker(const void *node, ndpi_VISIT which, int depth, voi
29542953
/* get app level protocol */
29552954
if(flow->detected_protocol.proto.master_protocol) {
29562955
ndpi_protocol2name(ndpi_thread_info[thread_id].workflow->ndpi_struct,
2957-
flow->detected_protocol, proto, sizeof(proto));
2956+
flow->detected_protocol.proto, proto, sizeof(proto));
29582957
} else {
29592958
strncpy(proto, ndpi_get_proto_name(ndpi_thread_info[thread_id].workflow->ndpi_struct,
29602959
flow->detected_protocol.proto.app_protocol),sizeof(proto) - 1);
@@ -3062,7 +3061,7 @@ static void dump_realtime_protocol(struct ndpi_workflow * workflow, struct ndpi_
30623061
snprintf(dstip, sizeof(dstip), "[%s]", flow->dst_name ? flow->dst_name : "");
30633062
}
30643063

3065-
ndpi_protocol2name(workflow->ndpi_struct, flow->detected_protocol, app_name, sizeof(app_name));
3064+
ndpi_protocol2name(workflow->ndpi_struct, flow->detected_protocol.proto, app_name, sizeof(app_name));
30663065

30673066
if (ret == 1) {
30683067
fprintf(out, "Detected Realtime protocol %s --> [%s] %s:%d <--> %s:%d app=%s <%s>\n",
@@ -3972,7 +3971,7 @@ static void printFlowsStats() {
39723971
fprintf(out, "\t%u\t%-10s\t%s:%u <-> %s:%u\t[",
39733972
i,
39743973
ndpi_protocol2name(ndpi_thread_info[0].workflow->ndpi_struct,
3975-
all_flows[i].flow->detected_protocol, buf, sizeof(buf)),
3974+
all_flows[i].flow->detected_protocol.proto, buf, sizeof(buf)),
39763975
all_flows[i].flow->src_name ? all_flows[i].flow->src_name : "",
39773976
ntohs(all_flows[i].flow->src_port),
39783977
all_flows[i].flow->dst_name ? all_flows[i].flow->dst_name : "",
@@ -4918,7 +4917,7 @@ static void ndpi_process_packet(u_char *args,
49184917
}
49194918
trailer->flow_risk_info[sizeof(trailer->flow_risk_info) - 1] = '\0';
49204919
trailer->proto.master_protocol = htons(p.proto.master_protocol), trailer->proto.app_protocol = htons(p.proto.app_protocol);
4921-
ndpi_protocol2name(ndpi_thread_info[thread_id].workflow->ndpi_struct, p, trailer->name, sizeof(trailer->name));
4920+
ndpi_protocol2name(ndpi_thread_info[thread_id].workflow->ndpi_struct, p.proto, trailer->name, sizeof(trailer->name));
49224921

49234922
/* Metadata */
49244923
/* Metadata are (all) available in `flow` only after nDPI completed its work!

example/ndpiSimpleIntegration.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -876,12 +876,10 @@ static void ndpi_process_packet(uint8_t * const args,
876876
return;
877877
} else if (flow_to_process->ndpi_flow->num_processed_pkts == 0xFE) {
878878
/* last chance to guess something, better then nothing */
879-
uint8_t protocol_was_guessed = 0;
880879
flow_to_process->guessed_protocol =
881880
ndpi_detection_giveup(workflow->ndpi_struct,
882-
flow_to_process->ndpi_flow,
883-
&protocol_was_guessed);
884-
if (protocol_was_guessed != 0) {
881+
flow_to_process->ndpi_flow);
882+
if (flow_to_process->ndpi_flow->protocol_was_guessed != 0) {
885883
printf("[%8llu, %d, %4d][GUESSED] protocol: %s | app protocol: %s | category: %s\n",
886884
workflow->packets_captured,
887885
reader_thread->array_index,

example/reader_util.c

Lines changed: 13 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1140,7 +1140,7 @@ static void dump_flow_fingerprint(struct ndpi_workflow * workflow,
11401140
ndpi_serialize_string_uint32(&serializer, "srv_port", ntohs(flow->dst_port));
11411141
ndpi_serialize_string_string(&serializer, "proto",
11421142
ndpi_protocol2name(workflow->ndpi_struct,
1143-
flow->detected_protocol,
1143+
flow->detected_protocol.proto,
11441144
buf, sizeof(buf)));
11451145

11461146
if(flow->server_hostname)
@@ -1187,7 +1187,7 @@ static void process_ndpi_monitoring_info(struct ndpi_flow_info *flow) {
11871187
return;
11881188

11891189
if(flow->monitoring_state == 0 &&
1190-
flow->ndpi_flow->monitoring) {
1190+
flow->ndpi_flow->state == NDPI_STATE_MONITORING) {
11911191
/* We just moved to monitoring state */
11921192
flow->monitoring_state = 1;
11931193
flow->num_packets_before_monitoring = flow->ndpi_flow->packet_direction_complete_counter[0] + flow->ndpi_flow->packet_direction_complete_counter[1];
@@ -1696,7 +1696,7 @@ void process_ndpi_collected_info(struct ndpi_workflow * workflow, struct ndpi_fl
16961696
ndpi_serialize_string_uint32(&flow->ndpi_flow_serializer, "detection_completed", flow->detection_completed);
16971697
ndpi_serialize_string_uint32(&flow->ndpi_flow_serializer, "check_extra_packets", flow->check_extra_packets);
16981698

1699-
if(flow->ndpi_flow->monitoring) {
1699+
if(flow->ndpi_flow->state == NDPI_STATE_MONITORING) {
17001700
serialize_monitoring_metadata(flow);
17011701
}
17021702

@@ -2010,26 +2010,19 @@ static struct ndpi_proto packet_processing(struct ndpi_workflow * workflow,
20102010
ipsize, time_ms, &input_info);
20112011
if(monitoring_enabled)
20122012
process_ndpi_monitoring_info(flow);
2013-
enough_packets |= ndpi_flow->fail_with_unknown;
2014-
if(enough_packets || (flow->detected_protocol.proto.app_protocol != NDPI_PROTOCOL_UNKNOWN)) {
2015-
if((!enough_packets)
2016-
&& ndpi_extra_dissection_possible(workflow->ndpi_struct, ndpi_flow))
2017-
; /* Wait for further metadata */
2018-
else {
2019-
/* New protocol detected or give up */
2020-
flow->detection_completed = 1;
2021-
2022-
if(flow->detected_protocol.proto.app_protocol == NDPI_PROTOCOL_UNKNOWN) {
2023-
u_int8_t proto_guessed;
2024-
2025-
flow->detected_protocol = ndpi_detection_giveup(workflow->ndpi_struct, flow->ndpi_flow,
2026-
&proto_guessed);
2027-
if(proto_guessed) workflow->stats.guessed_flow_protocols++;
2028-
}
2013+
if(flow->detected_protocol.state == NDPI_STATE_CLASSIFIED ||
2014+
enough_packets) {
2015+
2016+
flow->detection_completed = 1;
20292017

2030-
process_ndpi_collected_info(workflow, flow);
2018+
if(flow->detected_protocol.state != NDPI_STATE_CLASSIFIED) {
2019+
flow->detected_protocol = ndpi_detection_giveup(workflow->ndpi_struct, flow->ndpi_flow);
20312020
}
2021+
2022+
if(flow->ndpi_flow->protocol_was_guessed) workflow->stats.guessed_flow_protocols++;
2023+
process_ndpi_collected_info(workflow, flow);
20322024
}
2025+
20332026
/* Let's try to save client-server direction */
20342027
flow->current_pkt_from_client_to_server = input_info.in_pkt_dir;
20352028

fuzz/fuzz_config.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
1212
FuzzedDataProvider fuzzed_data(data, size);
1313
struct ndpi_detection_module_struct *ndpi_info_mod;
1414
struct ndpi_flow_struct flow;
15-
u_int8_t protocol_was_guessed, unused;
15+
u_int8_t unused;
1616
u_int32_t i, ret;
1717
u_int16_t bool_value;
1818
struct ndpi_lru_cache_stats lru_stats;
@@ -811,7 +811,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
811811
ndpi_detection_get_l4(pkt.data(), pkt.size(), &l4_return, &l4_len_return, &l4_protocol_return, NDPI_DETECTION_ONLY_IPV4);
812812

813813
ndpi_detection_process_packet(ndpi_info_mod, &flow, pkt.data(), pkt.size(), 0, &input_info);
814-
p = ndpi_detection_giveup(ndpi_info_mod, &flow, &protocol_was_guessed);
814+
p = ndpi_detection_giveup(ndpi_info_mod, &flow);
815815

816816
assert(p.proto.master_protocol == ndpi_get_flow_masterprotocol(&flow));
817817
assert(p.proto.app_protocol == ndpi_get_flow_appprotocol(&flow));

fuzz/fuzz_ndpi_reader.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,10 @@ static void node_cleanup_walker(const void *node, ndpi_VISIT which, int depth, v
4646
(void)depth;
4747
(void)user_data;
4848

49-
if(flow == NULL) return;
50-
5149
if((which == ndpi_preorder) || (which == ndpi_leaf)) { /* Avoid walking the same node multiple times */
5250
if((!flow->detection_completed) && flow->ndpi_flow) {
53-
u_int8_t proto_guessed;
54-
5551
flow->detected_protocol = ndpi_detection_giveup(workflow->ndpi_struct,
56-
flow->ndpi_flow, &proto_guessed);
52+
flow->ndpi_flow);
5753
}
5854

5955
process_ndpi_collected_info(workflow, flow);

fuzz/fuzz_process_packet.c

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ static ndpi_serializer json_serializer = {};
1010
static ndpi_serializer csv_serializer = {};
1111

1212
int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
13-
uint8_t protocol_was_guessed;
14-
1513
if (ndpi_info_mod == NULL) {
1614
fuzz_init_detection_module(&ndpi_info_mod, NULL);
1715

@@ -22,19 +20,12 @@ int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
2220
memset(&ndpi_flow, 0, SIZEOF_FLOW_STRUCT);
2321
ndpi_protocol detected_protocol =
2422
ndpi_detection_process_packet(ndpi_info_mod, &ndpi_flow, Data, Size, 0, NULL);
25-
ndpi_protocol guessed_protocol =
26-
ndpi_detection_giveup(ndpi_info_mod, &ndpi_flow, &protocol_was_guessed);
23+
detected_protocol = ndpi_detection_giveup(ndpi_info_mod, &ndpi_flow);
2724

2825
ndpi_reset_serializer(&json_serializer);
2926
ndpi_reset_serializer(&csv_serializer);
30-
if (protocol_was_guessed == 0)
31-
{
32-
ndpi_dpi2json(ndpi_info_mod, &ndpi_flow, detected_protocol, &json_serializer);
33-
ndpi_dpi2json(ndpi_info_mod, &ndpi_flow, detected_protocol, &csv_serializer);
34-
} else {
35-
ndpi_dpi2json(ndpi_info_mod, &ndpi_flow, guessed_protocol, &json_serializer);
36-
ndpi_dpi2json(ndpi_info_mod, &ndpi_flow, guessed_protocol, &csv_serializer);
37-
}
27+
ndpi_dpi2json(ndpi_info_mod, &ndpi_flow, detected_protocol, &json_serializer);
28+
ndpi_dpi2json(ndpi_info_mod, &ndpi_flow, detected_protocol, &csv_serializer);
3829
ndpi_free_flow_data(&ndpi_flow);
3930

4031
return 0;

python/ndpi/ndpi.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,7 @@ def process_packet(self, flow, packet, packet_time_ms, input_info):
5959

6060
def giveup(self, flow):
6161
p = lib.ndpi_detection_giveup(self._detection_module,
62-
flow.C,
63-
ffi.new("uint8_t*", 0))
62+
flow.C)
6463
return ndpi_protocol(C=p,
6564
master_protocol=p.proto.master_protocol,
6665
app_protocol=p.proto.app_protocol,

python/ndpi/ndpi_build.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,7 @@
5656
const u_int64_t packet_time_ms,
5757
struct ndpi_flow_input_info *input_info);
5858
ndpi_protocol ndpi_detection_giveup(struct ndpi_detection_module_struct *ndpi_struct,
59-
struct ndpi_flow_struct *flow,
60-
u_int8_t *protocol_was_guessed);
59+
struct ndpi_flow_struct *flow);
6160
void ndpi_py_setup_detection_module(struct ndpi_detection_module_struct *mod);
6261
struct ndpi_flow_struct * ndpi_py_initialize_flow(void);
6362
char* ndpi_protocol2name(struct ndpi_detection_module_struct *ndpi_mod, ndpi_protocol proto, char *buf, u_int buf_len);

src/include/ndpi_api.h

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -223,13 +223,11 @@ extern "C" {
223223
*
224224
* @par ndpi_struct = the detection module
225225
* @par flow = the flow given for the detection module
226-
* @par protocol_was_guessed = 1 if the protocol was guesses (requires enable_guess = 1), 0 otherwise
227226
* @return the detected protocol even if the flow is not completed;
228227
*
229228
*/
230229
ndpi_protocol ndpi_detection_giveup(struct ndpi_detection_module_struct *ndpi_struct,
231-
struct ndpi_flow_struct *flow,
232-
u_int8_t *protocol_was_guessed);
230+
struct ndpi_flow_struct *flow);
233231

234232
/**
235233
* Processes one packet and returns the ID of the detected protocol.
@@ -415,26 +413,26 @@ extern "C" {
415413
* Write the protocol name in the buffer -buf- as master_protocol.protocol
416414
*
417415
* @par ndpi_mod = the detection module
418-
* @par proto = the struct ndpi_protocol contain the protocols name
416+
* @par proto = the struct ndpi_master_app_protocol contain the protocols name
419417
* @par buf = the buffer to write the name of the protocols
420418
* @par buf_len = the length of the buffer
421419
* @return the buffer contains the master_protocol and protocol name
422420
*
423421
*/
424422
char* ndpi_protocol2name(struct ndpi_detection_module_struct *ndpi_mod,
425-
ndpi_protocol proto, char *buf, u_int buf_len);
423+
ndpi_master_app_protocol proto, char *buf, u_int buf_len);
426424

427425
/**
428426
* Same as ndpi_protocol2name() with the difference that the numeric protocol
429427
* name is returned
430428
*
431-
* @par proto = the struct ndpi_protocol contain the protocols name
429+
* @par proto = the struct ndpi_master_app_protocol contain the protocols name
432430
* @par buf = the buffer to write the name of the protocols
433431
* @par buf_len = the length of the buffer
434432
* @return the buffer contains the master_protocol and protocol name
435433
*
436434
*/
437-
char* ndpi_protocol2id(ndpi_protocol proto, char *buf, u_int buf_len);
435+
char* ndpi_protocol2id(ndpi_master_app_protocol proto, char *buf, u_int buf_len);
438436

439437
/**
440438
* Find out if a given category is custom/user-defined
@@ -974,8 +972,8 @@ extern "C" {
974972
ndpi_l4_proto_info ndpi_get_l4_proto_info(struct ndpi_detection_module_struct *ndpi_struct, u_int16_t ndpi_proto_id);
975973
const char* ndpi_get_l4_proto_name(ndpi_l4_proto_info proto);
976974

977-
u_int16_t ndpi_get_lower_proto(ndpi_protocol proto);
978-
u_int16_t ndpi_get_upper_proto(ndpi_protocol proto);
975+
u_int16_t ndpi_get_lower_proto(ndpi_master_app_protocol proto);
976+
u_int16_t ndpi_get_upper_proto(ndpi_master_app_protocol proto);
979977
bool ndpi_is_proto(ndpi_master_app_protocol proto, u_int16_t p);
980978
bool ndpi_is_proto_unknown(ndpi_master_app_protocol proto);
981979
bool ndpi_is_proto_equals(ndpi_master_app_protocol to_check, ndpi_master_app_protocol to_match, bool exact_match_only);
@@ -1041,8 +1039,6 @@ extern "C" {
10411039
int ndpi_flowv6_flow_hash(u_int8_t l4_proto, struct ndpi_in6_addr *src_ip, struct ndpi_in6_addr *dst_ip,
10421040
u_int16_t src_port, u_int16_t dst_port, u_int8_t icmp_type, u_int8_t icmp_code,
10431041
u_char *hash_buf, u_int8_t hash_buf_len);
1044-
u_int8_t ndpi_extra_dissection_possible(struct ndpi_detection_module_struct *ndpi_str,
1045-
struct ndpi_flow_struct *flow);
10461042
u_int8_t ndpi_is_safe_ssl_cipher(u_int32_t cipher);
10471043
const char* ndpi_cipher2str(u_int32_t cipher, char unknown_cipher[8]);
10481044
const char* ndpi_tunnel2str(ndpi_packet_tunnel tt);
@@ -1135,7 +1131,7 @@ extern "C" {
11351131
u_int8_t ndpi_is_public_ipv4(u_int32_t a /* host byte order */);
11361132
u_int64_t ndpi_htonll(u_int64_t v);
11371133
u_int64_t ndpi_ntohll(u_int64_t v);
1138-
u_int8_t ndpi_is_encrypted_proto(struct ndpi_detection_module_struct *ndpi_str, ndpi_protocol proto);
1134+
u_int8_t ndpi_is_encrypted_proto(struct ndpi_detection_module_struct *ndpi_str, ndpi_master_app_protocol proto);
11391135

11401136
/* DGA */
11411137
int ndpi_check_dga_name(struct ndpi_detection_module_struct *ndpi_str,

0 commit comments

Comments
 (0)