Hrm.
Do you have a use case? Really, it's pretty easy to tell when the
mapped v4 presentation format should be used. See
ipv6_addr_v4mapped(). Otherwise the mapped v4 presentation format
should never be used.
A problem with the existing %p[iI] implementation is that each call
site has to have logic that figures out the address family of the
address before calling sprintf(). This makes it difficult to use this
facility with, for example, debugging messages, since you have to add
address family detection logic at every debugging message call site.
Lots of clutter and duplicated code.
With %p6ic4, each call site now has to see that it's an IPv6 address,
and then decide if the address is a mapped v4 address or not. It's
the same logic everywhere.
It seems to me it would be a lot more useful if we had a new %p6
formatter that handled all types of IPv6 addresses properly, the way
inet_ntop(3) does in user space. (Or even a new formatter that could
handle both address families).
--
Chuck Lever
chuck[dot]lever[at]oracle[dot]com
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html