Path: utzoo!utgpu!watserv1!watmath!att!linac!pacific.mps.ohio-state.edu!zaphod.mps.ohio-state.edu!wuarchive!cs.utexas.edu!uunet!nwnexus!amc-gw!quick!srg From: srg@quick.com (Spencer Garrett) Newsgroups: comp.protocols.tcp-ip Subject: Re: When is a link saturated? Message-ID: <1991Jan23.091506.9399@quick.com> Date: 23 Jan 91 09:15:06 GMT References: <9101150724.AA12358@mcsun.EU.net> <24@prang.TEST.Vitalink.COM> <1991Jan21.184716.18820@Think.COM> Organization: Quicksilver Engineering, Seattle USA Lines: 21 -> In article <1991Jan20.040130.18339@quick.com> srg@quick.com (Spencer Garrett) writes: -> >-> I don't understand why the "remember the first exchange" is necessary. -> >-> Both telnet and rlogin use a reserved port number that appears in either -> >-> the source or destination TCP port fields on *every* packet that is -> >-> routed for the entire session. -> >Alas, no. A server is free to answer the connection request -> >with a different port number, and they commonly do. -> In article <1991Jan21.184716.18820@Think.COM>, barmar@think.com (Barry Margolin) writes: -> Either I misunderstand completely, or the above response is just plain -> wrong. If a server were to respond with a different port number, how would -> the client's system tell which server sent the response? The original -> poster was correct. My mistake. The behavior I described is a part of the TFTP protocol, not TCP or even UDP in general. It is cleanly implementable, though. All you need do is accept any foreign port number (and record the one you accept) if the socket in question is in SYN_SENT state and the incoming packet contains a proper SYN. That being the case, the socket moves into the ESTABLISHED state and all is well. My tcp code is about to get a bit shorter. :-)