diff options
author | Luca <deri@ntop.org> | 2019-10-31 00:14:20 +0100 |
---|---|---|
committer | Luca <deri@ntop.org> | 2019-10-31 00:14:20 +0100 |
commit | 4802987178a0a49ea5ff4a01e92a35b5517734dc (patch) | |
tree | 90577a9664c56338c4f71b1ec303bc1d2b39c1d2 /src/lib/ndpi_utils.c | |
parent | af01e61c89a66630fdc76e5059c0a348226e6f40 (diff) |
Initial work towards HTTP content-type export
Diffstat (limited to 'src/lib/ndpi_utils.c')
-rw-r--r-- | src/lib/ndpi_utils.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/lib/ndpi_utils.c b/src/lib/ndpi_utils.c index dbe5d7901..f11f074cd 100644 --- a/src/lib/ndpi_utils.c +++ b/src/lib/ndpi_utils.c @@ -966,12 +966,20 @@ int ndpi_flow2json(struct ndpi_detection_module_struct *ndpi_struct, ndpi_serialize_end_of_block(serializer); break; + case NDPI_PROTOCOL_TELNET: + ndpi_serialize_start_of_block(serializer, "telnet"); + ndpi_serialize_string_string(serializer, "username", flow->protos.telnet.username); + ndpi_serialize_end_of_block(serializer); + break; + case NDPI_PROTOCOL_HTTP: ndpi_serialize_start_of_block(serializer, "http"); if(flow->host_server_name[0] != '\0') ndpi_serialize_string_string(serializer, "hostname", (const char*)flow->host_server_name); - ndpi_serialize_string_string(serializer, "url", flow->http.url); + ndpi_serialize_string_string(serializer, "url", flow->http.url); ndpi_serialize_string_uint32(serializer, "code", flow->http.response_status_code); + ndpi_serialize_string_string(serializer, "content_type", flow->http.content_type); + ndpi_serialize_string_string(serializer, "user_agent", flow->http.user_agent); ndpi_serialize_end_of_block(serializer); break; |