aboutsummaryrefslogtreecommitdiff
path: root/example/ndpiReader.c
diff options
context:
space:
mode:
authorIvan Nardi <nardi.ivan@gmail.com>2024-11-12 10:01:57 +0100
committerIvan Nardi <12729895+IvanNardi@users.noreply.github.com>2024-11-12 13:34:25 +0100
commit1bda2bf414b22ce2e983e9c9a849698ccdbb1bf1 (patch)
tree2df250b2808f43030ecb5ba7971e5afd8be46e2d /example/ndpiReader.c
parent6ff71aa6be12361cd012290980d05dc2659db0bb (diff)
SIP: extract some basic metadata
Diffstat (limited to 'example/ndpiReader.c')
-rw-r--r--example/ndpiReader.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/example/ndpiReader.c b/example/ndpiReader.c
index 0bbcd1e55..8ae077eb4 100644
--- a/example/ndpiReader.c
+++ b/example/ndpiReader.c
@@ -1961,6 +1961,25 @@ static void printFlow(u_int32_t id, struct ndpi_flow_info *flow, u_int16_t threa
}
break;
+ case INFO_SIP:
+ if (flow->sip.from[0] != '\0')
+ {
+ fprintf(out, "[SIP From: %s]", flow->sip.from);
+ }
+ if (flow->sip.from_imsi[0] != '\0')
+ {
+ fprintf(out, "[SIP From IMSI: %s]", flow->sip.from_imsi);
+ }
+ if (flow->sip.to[0] != '\0')
+ {
+ fprintf(out, "[SIP To: %s]", flow->sip.to);
+ }
+ if (flow->sip.to_imsi[0] != '\0')
+ {
+ fprintf(out, "[SIP To IMSI: %s]", flow->sip.to_imsi);
+ }
+ break;
+
case INFO_NATPMP:
if (flow->natpmp.internal_port != 0 && flow->natpmp.ip[0] != '\0')
{