aboutsummaryrefslogtreecommitdiff
path: root/src/include/ndpi_api.h
diff options
context:
space:
mode:
authorLuca Deri <deri@ntop.org>2023-04-28 22:59:47 +0200
committerLuca Deri <deri@ntop.org>2023-04-28 23:00:33 +0200
commit6e9dce357bc9bcd7adbfb5e7b2749329e2b6319c (patch)
tree2878890b829220ddc465ec4fc8d0e4cdab9f74f7 /src/include/ndpi_api.h
parentf7138f07a60046fd6cedb2133037a43be3431bd1 (diff)
Added ndpi_guess_undetected_protocol_v4() to restore logic that
was removed in https://github.com/ntop/nDPI/commit/032e778a6dc1ee2173c4cdb2c671180c5b5df245
Diffstat (limited to 'src/include/ndpi_api.h')
-rw-r--r--src/include/ndpi_api.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/include/ndpi_api.h b/src/include/ndpi_api.h
index 70d9021d2..9c2188e68 100644
--- a/src/include/ndpi_api.h
+++ b/src/include/ndpi_api.h
@@ -433,6 +433,27 @@ extern "C" {
ndpi_protocol ndpi_guess_undetected_protocol(struct ndpi_detection_module_struct *ndpi_struct,
struct ndpi_flow_struct *flow,
u_int8_t proto);
+
+ /**
+ * Superset of ndpi_guess_undetected_protocol with additional IPv4 guess based on host/port
+ *
+ * @par ndpi_struct = the detection module
+ * @par flow = the flow we're trying to guess, NULL if not available
+ * @par proto = the l4 protocol number
+ * @par shost = source address in host byte order
+ * @par sport = source port number
+ * @par dhost = destination address in host byte order
+ * @par dport = destination port number
+ * @return the struct ndpi_protocol that match the port base protocol
+ *
+ */
+ ndpi_protocol ndpi_guess_undetected_protocol_v4(struct ndpi_detection_module_struct *ndpi_struct,
+ struct ndpi_flow_struct *flow,
+ u_int8_t proto,
+ u_int32_t shost,
+ u_int16_t sport,
+ u_int32_t dhost,
+ u_int16_t dport);
/**
* Check if the string passed match with a protocol
*