Date: Sat, 10 Aug 2002 13:39:02 -0700 (PDT) From: Doug White <dwhite@gumbysoft.com> To: Antoine Beaupre <anarcat@anarcat.ath.cx> Cc: freebsd-arch@freebsd.org Subject: Re: implementation differences between inet_aton() and inet_pton() Message-ID: <20020810132127.O38270-100000@carver.gumbysoft.com> In-Reply-To: <3A565436-ABC5-11D6-BAC6-0050E4A0BB3F@anarcat.ath.cx>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 9 Aug 2002, Antoine Beaupre wrote: > I just stumbled upon some differences between the results given by > inet_aton() and inet_pton(). [...] > Is this difference there by design or accident? Reading the manpage, it appears to be by design. The API makes a distinction between a "presentation address" vs a standard address. A standard address can be multiple formats (assumably to allow for flexibility in a program's internal representation of an address), but a presentation address is assumed to be a dotted decimal quad in AF_INET since it will be printed or passed externally. The man page also mentions that addr2ascii(3) should be used in preference to the inet_Xton functions. Don't know how well thats been followed :) > In either case it should be documented how each function parses the > numbers, because it is rather important. A couple of sentences of clarification between the presentation & normal addresses would be useful, yes. -- Doug White | FreeBSD: The Power to Serve dwhite@gumbysoft.com | www.FreeBSD.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020810132127.O38270-100000>