[comp.windows.x] /etc/protocols

barmar@think.com (Barry Margolin) (12/06/90)

In article <1990Dec5.225824.10377@melba.bby.oz.au> gnb@bby.oz.au (Gregory N. Bond) writes:
>4.1 needs a file in /etc called protocols containing the following
>stuff:
...
>Now, why in EARTH put that in a file?  IS sun afraid that the protocol
>numbers are about to change.....????????

Neither are TCP and UDP port numbers, but they're in a file (actually, an
NIS map these days) as well.

One benefit of putting all these things in configuration files is that it
makes it easy to debug new implementations.  While debugging you might not
want to bother or be bothered by other implementations, so you could edit
/etc/protocols to specify your own protocol number.
--
Barry Margolin, Thinking Machines Corp.

barmar@think.com
{uunet,harvard}!think!barmar

mouse@LARRY.MCRCIM.MCGILL.EDU (12/06/90)

>> 4.1 needs a file in /etc called protocols containing the following
>> stuff:
...
>> Now, why in EARTH put that in a file?  IS sun afraid that the
>> protocol numbers are about to change.....????????

> Neither are TCP and UDP port numbers, but they're in a file
> (actually, an NIS map these days) as well.

> One benefit of putting all these things in configuration files is
> that it makes it easy to debug new implementations.  While debugging
> you might not want to bother or be bothered by other implementations,
> so you could edit /etc/protocols to specify your own protocol number.

This is a valid argument for a research machine, where debugging new
implementations is a normal or nearly-normal state.

Unfortunately, Sun doesn't make research machines (or rather, doesn't
sell research systems - the machine itself is not the problem).

It does seem a trifle silly to list all the protocol numbers in a file
like that, I agree.  (For TCP and UDP port numbers, you are perhaps
right as far as the universal port numbers, like smtp or echo, go, but
Suns aren't (yet) such anti-research systems that it's impractical to
play with creating your own network services, so *that* file is
actually useful.)

					der Mouse

			old: mcgill-vision!mouse
			new: mouse@larry.mcrcim.mcgill.edu

dhesi%cirrusl@oliveb.ATC.olivetti.com (Rahul Dhesi) (12/07/90)

>>Now, why in EARTH put that in a file?  IS sun afraid that the protocol
>>numbers are about to change.....????????

The /etc/protocols file originated with BSD networking.  At that time,
I'm sure which protocols would exist in the future was very uncertain.
(Some might claim that it's even more uncertain today.)

According to Nemeth, Snyder, and Seebass (Unix System Administration
Handbook, p 264), "if a user writes his own protocol using the raw
socket interface provided for such purposes, it will have to be listed
in the /etc/protocols file in order for inetd to manage daemons using
it."  So long as we allow protocols to be added to /etc/protocols, it
makes sense to put all of them there.

Perhaps the real question is, why sequential access of a text file
rather than quick look-up of a direct access database.  Perhaps the
answer is that the file is small and read infrequently (no more than
once by a process), and database style access is available, at least on
some machines, through YP/NIS.
--
Rahul Dhesi <dhesi%cirrusl@oliveb.ATC.olivetti.com>
UUCP:  oliveb!cirrusl!dhesi