From c8f72ef76471cf038bb55ef48179c4795ff638fa Mon Sep 17 00:00:00 2001 From: Luca Deri Date: Mon, 2 May 2022 10:51:08 +0200 Subject: Added ndpi_get_flow_error_code() API call Fixed typo --- src/include/ndpi_api.h.in | 9 +++++++++ src/include/ndpi_typedefs.h | 6 ++++++ 2 files changed, 15 insertions(+) (limited to 'src/include') diff --git a/src/include/ndpi_api.h.in b/src/include/ndpi_api.h.in index 9ad9bd7c2..c350159f0 100644 --- a/src/include/ndpi_api.h.in +++ b/src/include/ndpi_api.h.in @@ -98,6 +98,15 @@ extern "C" { int ndpi_match_string_value(void *_automa, char *string_to_match, u_int match_len, u_int32_t *num); + /** + * Return the protocol error code of a given flow + * + * @par flow = the flow to analyze + * @return the error code or 0 otherwise + * + */ + u_int32_t ndpi_get_flow_error_code(struct ndpi_flow_struct *flow); + /** * nDPI personal allocation and free functions **/ diff --git a/src/include/ndpi_typedefs.h b/src/include/ndpi_typedefs.h index 124347fb0..2644a73df 100644 --- a/src/include/ndpi_typedefs.h +++ b/src/include/ndpi_typedefs.h @@ -1300,6 +1300,12 @@ struct ndpi_flow_struct { char fingerprint[48]; char class_ident[48]; } dhcp; + + struct { + u_int8_t version; /* 0 = SNMPv1, 1 = SNMPv2c, 3 = SNMPv3 */ + u_int8_t primitive; /* GET, SET... */ + u_int8_t error_status; + } snmp; } protos; /*** ALL protocol specific 64 bit variables here ***/ -- cgit v1.2.3