开发者

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 th开发者_StackOverflow社区ey the same address? If so, why do the different operating systems display it differently?

Thanks.


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜