开发者

How to write a IPV6 loopback address in array form

The IPV4 address has been written as { 127, 0, 0, 1 } How to write the loopback address in IPV6 in this format. Do I need to take a 16 sized开发者_JAVA百科 array??? Isnt there any better way ???


Well, IPv6 has many "shortened" forms, so that a loopback address can be written as ::1 - however, in an array, you'd need to spell out the entire thing (16 * 8 = 128 bits):

{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 }
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜