From owner-freebsd-hackers Mon Aug 2 23:35:23 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from rover.village.org (rover.village.org [204.144.255.49]) by hub.freebsd.org (Postfix) with ESMTP id 88DA11526A; Mon, 2 Aug 1999 23:34:57 -0700 (PDT) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (harmony.village.org [10.0.0.6]) by rover.village.org (8.9.3/8.9.3) with ESMTP id AAA90220; Tue, 3 Aug 1999 00:34:35 -0600 (MDT) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (localhost.village.org [127.0.0.1]) by harmony.village.org (8.9.3/8.8.3) with ESMTP id AAA12006; Tue, 3 Aug 1999 00:34:46 -0600 (MDT) Message-Id: <199908030634.AAA12006@harmony.village.org> To: Brian Somers Subject: Re: Mentioning RFC numbers in /etc/services Cc: Bill Fumerola , committers@FreeBSD.ORG, hackers@FreeBSD.ORG In-reply-to: Your message of "Tue, 03 Aug 1999 07:24:43 BST." <199908030624.HAA00958@keep.lan.Awfulhak.org> References: <199908030624.HAA00958@keep.lan.Awfulhak.org> Date: Tue, 03 Aug 1999 00:34:46 -0600 From: Warner Losh Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In message <199908030624.HAA00958@keep.lan.Awfulhak.org> Brian Somers writes: : Exactly - ditto for gethostbyname(). In the case of gethostbyname(), : I believe that domain names can't have a number as the first : character - I would have thought this idea should follow through with : services. No. That is in error. 3com.com or 2112.com. See RFC 1123 for the loosening of the restriction. You have to parse the whole string to know if it is a valid IP address or not anyway. : I know I'd be pretty annoyed if I tried to do something like ``ssh -p : 1234 somewhere'' after configuring my interface in single-user modem : with nis in /etc/host.conf and found that ssh was looking up 1234 in : /etc/services. Even if this is right, it's not intuitive. But inetd isn't involved here at all. You do bring up a good point here in argument by analogy. However your rule for isdigit(arg[0]) breaks the following services: 3com-tsmux 106/tcp 3com-tsmux 106/udp 914c/g 211/tcp #Texas Instruments 914C/G Terminal 914c/g 211/udp #Texas Instruments 914C/G Terminal 9pfs 564/tcp #plan 9 file service 9pfs 564/udp #plan 9 file service 3l-l1 1511/tcp 3l-l1 1511/udp 3ds-lm 1538/tcp 3ds-lm 1538/udp 3m-image-lm 1550/tcp #Image Storage license manager 3M Company 3m-image-lm 1550/udp #Image Storage license manager 3M Company at least we know there are no all numeric service names in the standard /etc/services file. Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message