Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 28 Nov 2001 16:52:59 -0800
From:      "Crist J. Clark" <cristjc@earthlink.net>
To:        Garrett Wollman <wollman@khavrinen.lcs.mit.edu>
Cc:        freebsd-net@FreeBSD.ORG
Subject:   Re: inet_pton(3) Does Not Replace inet_aton(3)
Message-ID:  <20011128165259.F3985@blossom.cjclark.org>
In-Reply-To: <200111281731.fASHV9948068@khavrinen.lcs.mit.edu>; from wollman@khavrinen.lcs.mit.edu on Wed, Nov 28, 2001 at 12:31:09PM -0500
References:  <20011127123301.B3788@gohan.cjclark.org> <200111281731.fASHV9948068@khavrinen.lcs.mit.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Nov 28, 2001 at 12:31:09PM -0500, Garrett Wollman wrote:
> <<On Tue, 27 Nov 2001 12:33:01 -0800, "Crist J. Clark" <cristjc@earthlink.net> said:
> 
> > Where inet_pton(3) will fail (return a 1). That is, inet_pton(3) only
> > understands dotted quads. The comments in src/lib/libc/net/inet_pton.c
> > clearly show this is the intended behavior. But is that what we want?
> 
> Yes.  The old format is deprecated, obsolete, legacy, however you want
> to put it.

OK. But I think it should be documented.

Index: inet.3
===================================================================
RCS file: /export/ncvs/src/lib/libc/net/inet.3,v
retrieving revision 1.19
diff -u -r1.19 inet.3
--- inet.3	1 Oct 2001 16:08:55 -0000	1.19
+++ inet.3	29 Nov 2001 00:47:28 -0000
@@ -203,6 +203,14 @@
 otherwise, the number is interpreted as decimal).
 .Pp
 The
+.Fn inet_pton
+function only understands Internet addresses written as dotted quads.
+Each
+.Dq part
+may only contain numeric characters and is always interpreted as a
+decimal value.
+.Pp
+The
 .Fn inet_aton
 and
 .Fn inet_ntoa

-- 
Crist J. Clark                     |     cjclark@alum.mit.edu
                                   |     cjclark@jhu.edu
http://people.freebsd.org/~cjc/    |     cjc@freebsd.org

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-net" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011128165259.F3985>