*BSD News Article 98051


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!news.mel.connect.com.au!munnari.OZ.AU!news.Hawaii.Edu!news.caldera.com!enews.sgi.com!EU.net!news-peer.sprintlink.net!news.sprintlink.net!Sprint!feed1.news.erols.com!news1.cwix.net!not-for-mail
From: Andre Oppermann <oppermann@pipeline.ch>
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: Listening at a socket
Date: Thu, 19 Jun 1997 22:10:21 +0200
Organization: Internet Business Solutions Ltd. (AG)
Lines: 34
Message-ID: <33A9922D.7844@pipeline.ch>
References: <5oblqi$4re@ui-gate.utell.co.uk>
Reply-To: oppermann@pipeline.ch
NNTP-Posting-Host: opi.pipeline.ch
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 3.0 (WinNT; I)
Xref: euryale.cc.adfa.oz.au comp.unix.bsd.freebsd.misc:43165

Hi Brian

It uses the different port numbers of the FTP processes on
the FTP-client machine:

FTP-Client X           -------->      FTP-Server Y

ftp1 on port 12345      --
                          |-->       port 21
ftp2 on port 23456      --

Every outgoing connection has a unique port number.

> This *has* to be a dumb question, but can anyone tell me
> how an OS, once it's received a packet for a given port
> X, can distinguish which process of all the processes that
> are using that port should get that packet.
> 
> For example, if I run an ftp server, I have my ftpd
> listening on *.21.  If I currently have 2 established
> connections from the same remote machine, I'll have two
> additional ftpd processes running (forked from the first).
> When a packet is received from the other machine destined
> for port 21, how does the OS decide which process to deliver
> the packet to ?

-- 
Andre Oppermann

CEO / Geschaeftsfuehrer
Internet Business Solutions Ltd. (AG)
Hardstrasse 235, 8005 Zurich, Switzerland
Fon +41 1 277 75 75 / Fax +41 1 277 75 77
http://www.pipeline.ch    ibs@pipeline.ch