Search code examples
ipv6inet-ntop

inet_ntop provides different returns for the same ipv6 address on different platforms


On my Mac, inet_ntop produces this IPv6 address for a certain 128-bit value:

2001::53aa:64c:422:2ece:a29c:9cf6.51391

On my FC15 Linux system, I get this IPv6 address presentation:

2001:0:53aa:64c:422:2ece:a29c:9cf6.51391

My understanding is that zeros between :: can be ignored, so I think that these are the same address. Are they the same address? If so, why do the different operating systems display it differently?

Thanks.


Solution

  • Yes, they are the same address. The :: means 'all zeroes', the other notation shows the zero.