From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: Date: Fri, 20 Oct 2006 09:44:27 -0400 From: "Russ Cox" To: "Fans of the OS Plan 9 from Bell Labs" <9fans@cse.psu.edu> Subject: Re: [9fans] Re: ip(2) man page: return code of parseip() and parsemaskip() In-Reply-To: <9ce16737e7bc48959b13dcce37e7560d@coraid.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <82c890d00610200248l52bf5e88l87863a4fe04aeecb@mail.gmail.com> <9ce16737e7bc48959b13dcce37e7560d@coraid.com> Topicbox-Message-UUID: ce833df0-ead1-11e9-9d60-3106f5b1d025 The man page lies. There is no way to tell using those functions whether you have parsed a valid address. ::ffff:192.168.0.1 is *not* an IPv4 address, syntactically. IPv4 addresses don't have colons and hexadecimal in them. It may be an IPv6 address that is semantically equivalent to an IPv4 address, but parseip is just a poor little parser. Russ