Return to BSD News archive
Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!simtel!news.kei.com!news.mathworks.com!tank.news.pipex.net!pipex!news.sprintlink.net!matlock.mindspring.com!usenet From: Robert Sanders <rsanders@mindspring.com> Newsgroups: comp.unix.bsd.freebsd.misc Subject: Re: /etc/services Date: 24 Aug 1995 00:39:57 -0400 Organization: MindSpring Enterprises, Inc. Lines: 37 Sender: rsanders@hrothgar.mindspring.com Message-ID: <87virn9aoy.fsf@hrothgar.mindspring.com> References: <41gtu9$knu@news.bu.edu> NNTP-Posting-Host: hrothgar.mindspring.com In-reply-to: mi@cs.bu.edu's message of 24 Aug 1995 04:07:37 GMT X-Newsreader: (ding) Gnus v0.99.11 On 24 Aug 1995 04:07:37 GMT, mi@cs.bu.edu (Mikhail Teterin) said: > If for any reason you wish to put the same service on more then one > port you have to name it differently for every port, and then list that > name in /etc/inet.conf, specifying the path to the executable, etc. Just to reach greater clarity, could you show how you expected it to work? > I tried to put plain telnet on port 80 (as well as the original, 23), > and it did not work until I renamed it to, say, banana, and explained > in /etc/inetd.conf what banana is -- same as telnet. > telnet stream .................... /usr/libexec/telnetd > banana stream .................... /usr/libexec/telnetd > Is that a bug or a feature? Why can not inetd accept same service > for different ports? Or if that's a feature, why does not it complaint > somewhere? Um, the leftmost argument specifies what port to put the service on. "telnet" causes inetd to look in /etc/services to find the port # (23), and "banana" causes inetd to look in /etc/services and find, presumably, port 80. If you have two lines that begin with "telnet", you have two definitions for port 23, which is in error. /etc/services is merely a mapping from symbolic names to port numbers, and implies nothing more about a particular service's gender, race, or religious affiliation. In other words, /etc/services should have been named /etc/portnumbers. It looks like you think the leftmost argument says something more, like what "type" of service it is. That's not the case. inetd cares about two major things; port# (the leftmost argument) and the program to run (the rightmost, excluding any arguments to the program). Regards, -- Robert