9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: erik quanstrom <quanstro@coraid.com>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] Re: ip(2) man page: return code of parseip() and parsemaskip()
Date: Fri, 20 Oct 2006 08:56:15 -0400	[thread overview]
Message-ID: <9ce16737e7bc48959b13dcce37e7560d@coraid.com> (raw)
In-Reply-To: <82c890d00610200248l52bf5e88l87863a4fe04aeecb@mail.gmail.com>

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


  reply	other threads:[~2006-10-20 12:56 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-20  9:04 [9fans] " Gabriel Diaz
2006-10-20  9:48 ` [9fans] " Gabriel Diaz
2006-10-20 12:56   ` erik quanstrom [this message]
2006-10-20 13:44     ` Russ Cox
2006-10-20 13:56       ` erik quanstrom
2006-10-20 14:38         ` Russ Cox
2006-10-20 15:20           ` erik quanstrom

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9ce16737e7bc48959b13dcce37e7560d@coraid.com \
    --to=quanstro@coraid.com \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).