diff --git a/example/ndpiReader.c b/example/ndpiReader.c index b1fbfd7ddd0..91466bab410 100644 --- a/example/ndpiReader.c +++ b/example/ndpiReader.c @@ -1548,7 +1548,7 @@ void print_bin(FILE *fout, const char *label, struct ndpi_bin *b) { /* ********************************** */ -static void print_ndpi_address_port(FILE *out, const char *label, ndpi_address_port *ap) { +static void print_ndpi_address_port_file(FILE *out, const char *label, ndpi_address_port *ap) { if(ap->port != 0) { char buf[INET6_ADDRSTRLEN]; @@ -1932,11 +1932,11 @@ static void printFlow(u_int32_t id, struct ndpi_flow_info *flow, u_int16_t threa } } - print_ndpi_address_port(out, "Mapped IP/Port", &flow->stun.mapped_address); - print_ndpi_address_port(out, "Peer IP/Port", &flow->stun.peer_address); - print_ndpi_address_port(out, "Relayed IP/Port", &flow->stun.relayed_address); - print_ndpi_address_port(out, "Rsp Origin IP/Port", &flow->stun.response_origin); - print_ndpi_address_port(out, "Other IP/Port", &flow->stun.other_address); + print_ndpi_address_port_file(out, "Mapped IP/Port", &flow->stun.mapped_address); + print_ndpi_address_port_file(out, "Peer IP/Port", &flow->stun.peer_address); + print_ndpi_address_port_file(out, "Relayed IP/Port", &flow->stun.relayed_address); + print_ndpi_address_port_file(out, "Rsp Origin IP/Port", &flow->stun.response_origin); + print_ndpi_address_port_file(out, "Other IP/Port", &flow->stun.other_address); if(flow->http.url[0] != '\0') { ndpi_risk_enum risk = ndpi_validate_url(flow->http.url); diff --git a/src/include/ndpi_api.h b/src/include/ndpi_api.h index 480b652c597..5ad1bca9c5f 100644 --- a/src/include/ndpi_api.h +++ b/src/include/ndpi_api.h @@ -1807,7 +1807,7 @@ extern "C" { ndpi_risk_info* ndpi_risk2severity(ndpi_risk_enum risk); u_int16_t ndpi_risk2score(ndpi_risk risk, u_int16_t *client_score, u_int16_t *server_score); - + char* print_ndpi_address_port(ndpi_address_port *ap, char *buf, u_int buf_len); u_int8_t ndpi_check_issuerdn_risk_exception(struct ndpi_detection_module_struct *ndpi_str, char *issuerDN); u_int8_t ndpi_check_flow_risk_exceptions(struct ndpi_detection_module_struct *ndpi_str, diff --git a/src/lib/ndpi_utils.c b/src/lib/ndpi_utils.c index 03fb4f8a981..426c04ad99e 100644 --- a/src/lib/ndpi_utils.c +++ b/src/lib/ndpi_utils.c @@ -1236,7 +1236,7 @@ static void ndpi_tls2json(ndpi_serializer *serializer, struct ndpi_flow_struct * /* ********************************** */ -static char* print_ndpi_address_port(ndpi_address_port *ap, char *buf, u_int buf_len) { +char* print_ndpi_address_port(ndpi_address_port *ap, char *buf, u_int buf_len) { char ipbuf[INET6_ADDRSTRLEN]; if(ap->is_ipv6) {