diff options
author | Luca Deri <deri@ntop.org> | 2024-04-03 23:03:46 +0200 |
---|---|---|
committer | Luca Deri <deri@ntop.org> | 2024-04-03 23:03:46 +0200 |
commit | 9185c2ccc402d3368fc28ac90ab281b4f951719e (patch) | |
tree | a687c66cdd24f6b8ebe52791c88faa1677cea1d5 /example/ndpiReader.c | |
parent | aacbc9e91868082f7751ddb79b4683efde6e0723 (diff) |
Added support for STUN Mapped IP address
Diffstat (limited to 'example/ndpiReader.c')
-rw-r--r-- | example/ndpiReader.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/example/ndpiReader.c b/example/ndpiReader.c index 029f784f2..16c88e947 100644 --- a/example/ndpiReader.c +++ b/example/ndpiReader.c @@ -1457,7 +1457,6 @@ static void parseOptions(int argc, char **argv) { /* ********************************** */ -#if 0 /** * @brief A faster replacement for inet_ntoa(). */ @@ -1487,7 +1486,6 @@ char* intoaV4(u_int32_t addr, char* buf, u_int16_t bufLen) { return(cp); } -#endif /* ********************************** */ @@ -1905,6 +1903,14 @@ static void printFlow(u_int32_t id, struct ndpi_flow_info *flow, u_int16_t threa } } + if(flow->stun.mapped_address.ipv4 != 0) { + char buf[32]; + + fprintf(out, "[Mapped IP/Port: %s:%u]", + intoaV4(flow->stun.mapped_address.ipv4, buf, sizeof(buf)), + flow->stun.mapped_address.port); + } + if(flow->http.url[0] != '\0') { ndpi_risk_enum risk = ndpi_validate_url(flow->http.url); |