inet_ntop( )
Joseph M Link
freebsd at joelink.net
Fri Aug 13 06:53:17 PDT 2004
>>I wondered, why does inet_ntop() returns addresses in the format
>>x:x:x:x:x:x:x.x.x.x ? This can be very annoying if that's not what you
>>want. Is there another standard function, other than inet_ntop(), to do
>>the same work ?
I am going to guess you're asking why you're getting that format instead
of the straight colon separated version. That format is a standard form
for ipv4 mapped or compatible addresses. You can detect this ahead of
time with the following macros:
IN6_IS_ADDR_V4MAPPED(struct in6_addr *)
IN6_IS_ADDR_V4COMPAT(struct in6_addr *)
Joe
More information about the freebsd-hackers
mailing list