From owner-freebsd-net Wed Nov 28 1: 5:16 2001 Delivered-To: freebsd-net@freebsd.org Received: from scaup.prod.itd.earthlink.net (scaup.mail.pas.earthlink.net [207.217.120.49]) by hub.freebsd.org (Postfix) with ESMTP id E85D737B417 for ; Wed, 28 Nov 2001 01:05:13 -0800 (PST) Received: from dialup-209.245.139.76.dial1.sanjose1.level3.net ([209.245.139.76] helo=gohan.cjclark.org) by scaup.prod.itd.earthlink.net with esmtp (Exim 3.33 #1) id 1690eT-0002MI-00 for freebsd-net@freebsd.org; Wed, 28 Nov 2001 01:05:11 -0800 Received: (from cjc@localhost) by gohan.cjclark.org (8.11.6/8.11.1) id fARKX1S04069 for freebsd-net@freebsd.org; Tue, 27 Nov 2001 12:33:01 -0800 (PST) (envelope-from cjc) Date: Tue, 27 Nov 2001 12:33:01 -0800 From: "Crist J. Clark" To: freebsd-net@freebsd.org Subject: inet_pton(3) Does Not Replace inet_aton(3) Message-ID: <20011127123301.B3788@gohan.cjclark.org> Reply-To: cjclark@alum.mit.edu Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i X-URL: http://people.freebsd.org/~cjc/ Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org I am not at all sure whether this is a bug or feature. I was just surprised by the results. If it is a feature, the documentation is misleading. The issue is that inet_aton(3) will correctly understand, "127.1" To be the IP address, 127.0.0.1 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? -- Crist J. Clark cjclark@alum.mit.edu To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message