Formal IPv6 address definition
Opened this issue · 0 comments
annevk commented
From @rmisev:
This definition is obscure: it is not clear how to convert a 128-bit integer to a list of pieces and vice versa. Also, all algorithms use an IPv6 address as a list of pieces, not as a 128-bit integer. By the way, RFC4291 defines an IPv6 address slightly differently: "IPv6 addresses are 128-bit identifiers...".
From @domenic:
I can see how it's "conceptually" a u128, or "corresponds to" a u128, but in practice every part of the spec treats it as a list of 8 u16s.
This came up in #838.
If we want to change this we should probably look at how the various IETF specifications deal with IPv6 addresses again as we wouldn't want to define a type here that couldn't be reused in those layers of the stack.