Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 03 Aug 1999 07:24:43 +0100
From:      Brian Somers <brian@Awfulhak.org>
To:        Warner Losh <imp@village.org>
Cc:        Brian Somers <brian@Awfulhak.org>, Bill Fumerola <billf@jade.chc-chimes.com>, committers@FreeBSD.ORG, hackers@FreeBSD.ORG
Subject:   Re: Mentioning RFC numbers in /etc/services 
Message-ID:  <199908030624.HAA00958@keep.lan.Awfulhak.org>
In-Reply-To: Your message of "Mon, 02 Aug 1999 19:13:45 MDT." <199908030113.TAA10897@harmony.village.org> 

next in thread | previous in thread | raw e-mail | index | archive | help
> In message <199908022217.XAA02577@keep.lan.Awfulhak.org> Brian Somers writes:
> : Yes, but do it the other way 'round - strtol first, if it's not all 
> : numeric, getservbyname().
> 
> I did it getservbyname first in case there were any legacy services
> that were all numbers.  Traditionally, this is hwo things were done
> with IP addresses, although a quickie survey shows it to be a mixed
> bag.  The biggest reason for not doing getservbyname first is that it
> will hang (long timeout) if the databsae behind it goes away.

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.

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.

> Warner

-- 
Brian <brian@Awfulhak.org>                        <brian@FreeBSD.org>
      <http://www.Awfulhak.org>;                   <brian@OpenBSD.org>
Don't _EVER_ lose your sense of humour !          <brian@FreeBSD.org.uk>




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




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