Ipv6 support.
Changes to support Ipv6.
Change-Id: I0f1e991e79e7b1fe7f6f4890cef85049cb23b4c3
Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
diff --git a/sock_channel.cpp b/sock_channel.cpp
index ef86029..34adf3a 100644
--- a/sock_channel.cpp
+++ b/sock_channel.cpp
@@ -15,7 +15,7 @@
std::string Channel::getRemoteAddress() const
{
char tmp[INET_ADDRSTRLEN] = { 0 };
- inet_ntop(AF_INET, &address.inAddr.sin_addr, tmp, sizeof(tmp));
+ inet_ntop(AF_INET6, &address.inAddr.sin6_addr, tmp, sizeof(tmp));
return std::string(tmp);
}
@@ -154,3 +154,4 @@
}
} // namespace udpsocket
+