aboutsummaryrefslogtreecommitdiffstats
path: root/hicn-light/src/hicn/core/connection.c
diff options
context:
space:
mode:
authorEnrico Loparco (eloparco) <eloparco@cisco.com>2021-06-14 13:37:37 +0200
committerEnrico Loparco (eloparco) <eloparco@cisco.com>2021-06-24 09:25:40 +0200
commit4c5b811c7d105aafb847f9006fd1e5235206e5cd (patch)
treec185256c1cb0c0fc23b5c32b042a531201adcbce /hicn-light/src/hicn/core/connection.c
parent1c37763975af0a6c89a9089aa606155227e67d41 (diff)
[HICN-707] Add function for IP addr to string conversion
Signed-off-by: Enrico Loparco (eloparco) <eloparco@cisco.com> Change-Id: Ie9226963a6459661918678a3b1723bf87a2b15ab
Diffstat (limited to 'hicn-light/src/hicn/core/connection.c')
-rw-r--r--hicn-light/src/hicn/core/connection.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/hicn-light/src/hicn/core/connection.c b/hicn-light/src/hicn/core/connection.c
index 3921eb582..fcca364e9 100644
--- a/hicn-light/src/hicn/core/connection.c
+++ b/hicn-light/src/hicn/core/connection.c
@@ -286,13 +286,15 @@ connection_initialize(connection_t * connection, face_type_t type, const char *
goto ERR_REGISTER_FD;
#endif
- // XXX TODO
- //char *str = pair_ToString(udp->pair);
+ char addr_str[INET6_ADDRSTRLEN];
+ if (local)
+ address_to_string(&(pair->local), addr_str);
+ else
+ address_to_string(&(pair->remote), addr_str);
DEBUG("%s connection %p created for address %s (local=%s)",
- face_type_str(connection->type), connection, "N/A",
+ face_type_str(connection->type), connection, addr_str,
connection_is_local(connection) ? "true" : "false");
- //free(str);
- //
+
return 0;
#if 0