To convert IPv4 address into an ASCII string in Internet standard dotted-decimal format we use inet_ntoa
function. What function shuold I use for IPv6?
The equivalent function for IPv6 is inet_ntop
. In fact this can do IPv4 as well as 6 so is worth using anyway.