Wireshark mailing list archives
Re: IPv6 longest representation vs INET6_ADDRSTRLEN
From: Gerald Combs <gerald () wireshark org>
Date: Thu, 05 May 2011 10:41:42 -0700
On 5/5/11 6:01 AM, Jakub Zawadzki wrote:
On Thu, May 05, 2011 at 02:01:06PM +0200, Jakub Zawadzki wrote:IMHO when IPv4-mapping is used the longest address is: ::ffff:255.255.255.255 (22B) Anyone knows inet_ntop(AF_INET6, ..) implementation which can actually use 46 bytes?Maybe some inet_ntop() implementation don't generate short addresses? (0000 instead of ::) so ipv4 mapped address would be: "0000:0000:0000:0000:0000:0000:255.255.255.255" I think I'll just copy inet_ntop6() from wsutil/inet_ntop.c to address_to_str.c...
RFC 2553 section 6.6 and MSDN's InetNtop documentation both specify 46 characters, but you'd think that if an implementation was smart enough to check for v4-mapped addresses it would be smart enough to compress zeroes. -- Join us for Sharkfest ’11! · Wireshark® Developer and User Conference Stanford University, June 13-16 · http://sharkfest.wireshark.org ___________________________________________________________________________ Sent via: Wireshark-dev mailing list <wireshark-dev () wireshark org> Archives: http://www.wireshark.org/lists/wireshark-dev Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev mailto:wireshark-dev-request () wireshark org?subject=unsubscribe
Current thread:
- IPv6 longest representation vs INET6_ADDRSTRLEN Jakub Zawadzki (May 05)
- Re: IPv6 longest representation vs INET6_ADDRSTRLEN Jakub Zawadzki (May 05)
- Re: IPv6 longest representation vs INET6_ADDRSTRLEN Gerald Combs (May 05)
- Re: IPv6 longest representation vs INET6_ADDRSTRLEN Sake Blok (May 14)
- Re: IPv6 longest representation vs INET6_ADDRSTRLEN Gerald Combs (May 05)
- Re: IPv6 longest representation vs INET6_ADDRSTRLEN Jakub Zawadzki (May 05)