diff options
-rw-r--r-- | fuzz/fuzz_config.cpp | 6 | ||||
-rw-r--r-- | python/ndpi/ndpi.py | 14 |
2 files changed, 10 insertions, 10 deletions
diff --git a/fuzz/fuzz_config.cpp b/fuzz/fuzz_config.cpp index 35c188e94..42b3ae611 100644 --- a/fuzz/fuzz_config.cpp +++ b/fuzz/fuzz_config.cpp @@ -562,8 +562,8 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { ndpi_detection_process_packet(ndpi_info_mod, &flow, pkt.data(), pkt.size(), 0, &input_info); p = ndpi_detection_giveup(ndpi_info_mod, &flow, &protocol_was_guessed); - assert(p.master_protocol == ndpi_get_flow_masterprotocol(&flow)); - assert(p.app_protocol == ndpi_get_flow_appprotocol(&flow)); + assert(p.proto.master_protocol == ndpi_get_flow_masterprotocol(&flow)); + assert(p.proto.app_protocol == ndpi_get_flow_appprotocol(&flow)); assert(p.category == ndpi_get_flow_category(&flow)); ndpi_get_lower_proto(p); ndpi_get_upper_proto(p); @@ -572,7 +572,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { ndpi_get_flow_ndpi_proto(&flow, &p2); ndpi_is_proto(p, NDPI_PROTOCOL_TLS); ndpi_http_method2str(flow.http.method); - ndpi_is_subprotocol_informative(p.app_protocol); + ndpi_is_subprotocol_informative(p.proto.app_protocol); ndpi_get_http_method(bool_value ? &flow : NULL); ndpi_get_http_url(&flow); ndpi_get_http_content_type(&flow); diff --git a/python/ndpi/ndpi.py b/python/ndpi/ndpi.py index 22289ed83..6d074d382 100644 --- a/python/ndpi/ndpi.py +++ b/python/ndpi/ndpi.py @@ -1,7 +1,7 @@ """ ------------------------------------------------------------------------------------------------------------------------ ndpi.py -Copyright (C) 2011-22 - ntop.org +Copyright (C) 2011-24 - ntop.org This file is part of nDPI, an open source deep packet inspection library. nDPI is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later @@ -18,8 +18,8 @@ from _ndpi import ffi, lib ndpi_protocol = namedtuple('NDPIProtocol', ['C', - 'proto.master_protocol', - 'proto.app_protocol', + 'master_protocol', + 'app_protocol', 'category']) ndpi_confidence = namedtuple('NDPIConfidence', ['id', @@ -53,8 +53,8 @@ class NDPI(object): int(packet_time_ms), input_info) return ndpi_protocol(C=p, - master_protocol=p.master_protocol, - app_protocol=p.app_protocol, + master_protocol=p.proto.master_protocol, + app_protocol=p.proto.app_protocol, category=p.category) def giveup(self, flow): @@ -62,8 +62,8 @@ class NDPI(object): flow.C, ffi.new("uint8_t*", 0)) return ndpi_protocol(C=p, - master_protocol=p.master_protocol, - app_protocol=p.app_protocol, + master_protocol=p.proto.master_protocol, + app_protocol=p.proto.app_protocol, category=p.category) def protocol_name(self, protocol): |