diff options
author | Luca Deri <deri@ntop.org> | 2024-10-15 22:25:48 +0200 |
---|---|---|
committer | Luca Deri <deri@ntop.org> | 2024-10-15 22:25:48 +0200 |
commit | afc4d9e34d61a45c5daeffcdcc187bc0b105ef3e (patch) | |
tree | e288f43f143f02b88bcaf59315c9c52d2d4adead /src/lib/ndpi_utils.c | |
parent | 97ce7293920646d3b8e052ef467d23f086baf982 (diff) |
Added -L <domain suffix> for loading domain suffixes
Exported domainanme in JSON file (-K JSON)
Diffstat (limited to 'src/lib/ndpi_utils.c')
-rw-r--r-- | src/lib/ndpi_utils.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/lib/ndpi_utils.c b/src/lib/ndpi_utils.c index 26efd20a2..bfe1e5274 100644 --- a/src/lib/ndpi_utils.c +++ b/src/lib/ndpi_utils.c @@ -1267,11 +1267,12 @@ int ndpi_dpi2json(struct ndpi_detection_module_struct *ndpi_struct, ndpi_serialize_proto(ndpi_struct, serializer, flow->risk, flow->confidence, l7_protocol); host_server_name = ndpi_get_flow_info(flow, &l7_protocol); - if (host_server_name != NULL) - { + + if (host_server_name != NULL) { ndpi_serialize_string_string(serializer, "hostname", host_server_name); + ndpi_serialize_string_string(serializer, "domainame", ndpi_get_host_domain(ndpi_struct, host_server_name)); } - + switch(l7_protocol.proto.master_protocol ? l7_protocol.proto.master_protocol : l7_protocol.proto.app_protocol) { case NDPI_PROTOCOL_IP_ICMP: if(flow->entropy > 0.0f) { |