Date: Fri, 13 Aug 2004 08:53:06 -0500 From: Joseph M Link <freebsd@joelink.net> To: Nicolas B?rard Nault <nicobn@quebecbsd.org> Cc: freebsd-hackers@freebsd.org Subject: Re: inet_ntop( ) Message-ID: <411CC7C2.8000102@joelink.net> In-Reply-To: <20040812232902.GC7173@gothmog.gr> References: <4962.69.70.227.33.1092276363.squirrel@webmail.north-zone.net> <20040812232902.GC7173@gothmog.gr>
next in thread | previous in thread | raw e-mail | index | archive | help
>>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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?411CC7C2.8000102>