[DTrace-devel] [PATCH 7/7] Add support for inet_ntoa6() subroutine
Eugene Loh
eugene.loh at oracle.com
Wed Aug 2 19:29:16 UTC 2023
On 8/2/23 01:45, Kris Van Hees wrote:
> The problem is that there is no canonical way to make a determination
> here.
> One interpretation is that anything that has 6 leading zero-words is an IPv4
> address. But that is not true if the next two words are both 0 (unspecified
> address) or the one before last is 0 and the last is 1 (loopback). So that
> already shows this rule is not adequate.
>
> Now, RFC 4291 states that the IPv4 address in an IPv6 address must be 'a
> globally-unique IPv4 unicast address'. And valid IPv4 address must have a
> first octet that is not zero. So, it can be argued that if the last two words
> di not represent a valid IPv4 address, we do not try to interpret it as such.
>
> It is easy enough to make it consistent with the legacy version though so might
> as well.
My impression was that the legacy version was harder to do in BPF due to
lots of branching, but if it's "easy enough" that's great.
In general, if there is a reference implementation (glibc?
dtrace_dif.c?), it'd be great to mention that in the comments.
More information about the DTrace-devel
mailing list