diff options
author | Ivan Nardi <12729895+IvanNardi@users.noreply.github.com> | 2024-11-26 16:41:32 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-26 16:41:32 +0100 |
commit | 214a2e53566aefd4641d7233587b2e391e9c29b5 (patch) | |
tree | 173994d6e3926e35aad1de031d11ed776d377075 /src/lib/ndpi_utils.c | |
parent | d93fd27bccd008662ba8bcee68ad3cf6b5faba1a (diff) |
SIP: export metadata via json (#2630)
Fix: 1bda2bf41
Diffstat (limited to 'src/lib/ndpi_utils.c')
-rw-r--r-- | src/lib/ndpi_utils.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/lib/ndpi_utils.c b/src/lib/ndpi_utils.c index bbe42bd21..7779974ae 100644 --- a/src/lib/ndpi_utils.c +++ b/src/lib/ndpi_utils.c @@ -1632,6 +1632,19 @@ int ndpi_dpi2json(struct ndpi_detection_module_struct *ndpi_struct, ndpi_serialize_end_of_block(serializer); break; + case NDPI_PROTOCOL_SIP: + ndpi_serialize_start_of_block(serializer, "sip"); + if(flow->protos.sip.from) + ndpi_serialize_string_string(serializer, "from", flow->protos.sip.from); + if(flow->protos.sip.from_imsi[0] != '\0') + ndpi_serialize_string_string(serializer, "from_imsi", flow->protos.sip.from_imsi); + if(flow->protos.sip.to) + ndpi_serialize_string_string(serializer, "to", flow->protos.sip.to); + if(flow->protos.sip.to_imsi[0] != '\0') + ndpi_serialize_string_string(serializer, "to_imsi", flow->protos.sip.to_imsi); + ndpi_serialize_end_of_block(serializer); + break; + case NDPI_PROTOCOL_TLS: case NDPI_PROTOCOL_DTLS: ndpi_tls2json(serializer, flow); |