From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <9ce16737e7bc48959b13dcce37e7560d@coraid.com> From: erik quanstrom Date: Fri, 20 Oct 2006 08:56:15 -0400 To: 9fans@cse.psu.edu Subject: Re: [9fans] Re: ip(2) man page: return code of parseip() and parsemaskip() In-Reply-To: <82c890d00610200248l52bf5e88l87863a4fe04aeecb@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Topicbox-Message-UUID: ce7c7d9e-ead1-11e9-9d60-3106f5b1d025 the man page doesn't appear to be correct ~0UL (i.e. -1) won't be returned unless the address given is 255.255.255.255. the code also does not appear to recognize ::ffff:192.168.0.1 or ::0.0:ffff:192.168.0.1 as an ip4 address. perhaps it's returning 6 if it was entered in the ip6 style, but that doesn't seem that useful. perhaps the line with if(ip4) should be if(ip4 || memcmp(to, v4prefix, IPaddrlen-IPv4addrlen) == 0) - erik