Subject: A simple TCP/socket/port question
To: None <current-users@NetBSD.ORG>
From: VaX#n8 <vax@linkdead.paranoia.com>
List: current-users
Date: 07/03/1996 00:44:15
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.

Why I question this is that the Firewalls book by Chapman *never* mentions
this, even when going into detail on how to set up packet screeners for
simple services like UUCP on page 237, or when discussing TCP/IP
fundamentals.

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?

If it *is* the case, how does the client know how to start sending messages
to the new port?

I feel like I'm missing something *really* basic here.