Subject: Re: A simple TCP/socket/port question
To: VaX#n8 <vax@linkdead.paranoia.com>
From: Michael Graff <explorer@flame.org>
List: current-users
Date: 07/03/1996 12:42:17
>When a server or inetd forks off an individual process (say, uucpd) to
>deal with a particular client, I vaguely recall reading somewhere that
>although listening for requests is done on a well-known port, when the
>process accepts on the socket, it gets a different, higher-numbered port
>to work on.

Not that I'm aware of...

When you connect to port 21, you get a telnet connection which lasts
on that port.  Try telnetting between two machines, and run netstat -f
inet on the one you are telnetting into.

>If this is not the case, how does the kernel distinguish messages going to
>different uucpd's (or, if uucp is a bad example, ftpd command channels)
>running simultaneously?

The socket is a (local-addr, local-port, remote-addr, remote-port)
tuple, not just a (local-addr, local-port) tuple.

--Michael

--
Michael Graff <explorer@flame.org>        NetBSD is the way to go!
PGP key on a key-server near you!         Netshade the world!
Cthulhu for president:  Tired of voting for the *LESSER* of two evils?