Re: FTP data connection
From: Barry Margolin (barmar_at_alum.mit.edu)
Date: 04/29/04
- Next message: Barry Margolin: "Re: c program running 2 terminal windows, how to specify in which to write?"
- Previous message: Barry Margolin: "Re: Multiple threads in critical section"
- In reply to: David Schwartz: "Re: FTP data connection"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 28 Apr 2004 21:19:46 -0400
In article <c6p0e4$a3i$1@nntp.webmaster.com>,
"David Schwartz" <davids@webmaster.com> wrote:
> "Christian" <cgregoir99@yahoo.com> wrote in message
> news:c6olu0$pan$1@reader1.imaginet.fr...
>
> > When ftp'ing to a host, in active mode, the FTP server then connects back
> > to
> > the client using the TCP port 20 to send the data, no matter how many
> > connections are opened. Each one sees data coming from port 20.
> >
> > How is it performed programmatically ? I'm writing a FTP server, and i
> > can't
> > figure out how to connect to the client, given the port it sent me, using
> > always the same port.
>
> I'm not sure I understand what you think the problem is. Every TCP
> connection has a source port and a destination port. Usually, the
> destination port is selected based upon the service you want to connect to.
> The source port is usually random and it usually doesn't matter what it is.
> Just connect to the port you're supposed to connect to.
But that's not how the FTP protocol is specified. It says that the
source port of the data connection must be 20, and the destination is
the port the client specified.
-- Barry Margolin, barmar@alum.mit.edu Arlington, MA *** PLEASE post questions in newsgroups, not directly to me ***
- Next message: Barry Margolin: "Re: c program running 2 terminal windows, how to specify in which to write?"
- Previous message: Barry Margolin: "Re: Multiple threads in critical section"
- In reply to: David Schwartz: "Re: FTP data connection"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|