aboutsummaryrefslogtreecommitdiff
path: root/example/reader_util.c
diff options
context:
space:
mode:
authorlns <matzeton@googlemail.com>2022-06-16 16:06:11 +0200
committerlns <matzeton@googlemail.com>2022-06-17 16:00:14 +0200
commit1987dbc8cdfabd52cad6cc6cf57ff069843add09 (patch)
tree4999c0a066fdf575e0aa95670a3613f4cac349cf /example/reader_util.c
parent20a29c393f5cff3864a75070b2988fe1be1c6d17 (diff)
Added collectd dissector (again).add/collectd-protocol
Signed-off-by: lns <matzeton@googlemail.com>
Diffstat (limited to 'example/reader_util.c')
-rw-r--r--example/reader_util.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/example/reader_util.c b/example/reader_util.c
index 800305b45..c50c3281f 100644
--- a/example/reader_util.c
+++ b/example/reader_util.c
@@ -1140,7 +1140,16 @@ void process_ndpi_collected_info(struct ndpi_workflow * workflow, struct ndpi_fl
ndpi_snprintf(flow->http.content_type, sizeof(flow->http.content_type), "%s", flow->ndpi_flow->http.content_type ? flow->ndpi_flow->http.content_type : "");
ndpi_snprintf(flow->http.request_content_type, sizeof(flow->http.request_content_type), "%s", flow->ndpi_flow->http.request_content_type ? flow->ndpi_flow->http.request_content_type : "");
}
- } else if(is_ndpi_proto(flow, NDPI_PROTOCOL_TELNET)) {
+ }
+ /* COLLECTD */
+ else if(is_ndpi_proto(flow, NDPI_PROTOCOL_COLLECTD)) {
+ flow->info_type = INFO_GENERIC;
+ if(flow->ndpi_flow->protos.collectd.client_username[0] != '\0')
+ ndpi_snprintf(flow->info, sizeof(flow->info), "Username: %s",
+ flow->ndpi_flow->protos.collectd.client_username);
+ }
+ /* TELNET */
+ else if(is_ndpi_proto(flow, NDPI_PROTOCOL_TELNET)) {
if(flow->ndpi_flow->protos.telnet.username[0] != '\0')
flow->telnet.username = ndpi_strdup(flow->ndpi_flow->protos.telnet.username);
if(flow->ndpi_flow->protos.telnet.password[0] != '\0')