aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorLuca Deri <deri@ntop.org>2022-05-02 10:51:08 +0200
committerLuca Deri <deri@ntop.org>2022-05-02 10:51:08 +0200
commitc8f72ef76471cf038bb55ef48179c4795ff638fa (patch)
treea1b404ee71e6e9d9369f198ab02116bce4ae4b40 /src/include
parent02d0b5fe13a49ca06179f089e2bf82dedd3043f0 (diff)
Added ndpi_get_flow_error_code() API call
Fixed typo
Diffstat (limited to 'src/include')
-rw-r--r--src/include/ndpi_api.h.in9
-rw-r--r--src/include/ndpi_typedefs.h6
2 files changed, 15 insertions, 0 deletions
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
@@ -99,6 +99,15 @@ extern "C" {
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
**/
void * ndpi_malloc(size_t size);
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 ***/