Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!ucbvax!OPUS.CRAY.COM!dab From: dab@OPUS.CRAY.COM (Dave Borman) Newsgroups: comp.protocols.tcp-ip Subject: Re: Question about telnet RFC Message-ID: <8912041645.AA26970@opus.cray.com> Date: 4 Dec 89 16:45:22 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 55 > I am reading over RFC854, the telnet protocol specification and have come > upon a confusing paragraph. This excerpt is from from section 3b of > GENERAL CONSIDERATIONS: > > b. If a party receives what appears to be a request to enter some > mode it is already in, the request should not be acknowledged. > This non-response is essential to prevent endless loops in the > negotiation. It is required that a response be sent to requests > for a change of mode -- even if the mode is not changed. > > The last sentence seems to contradict the remainder of the paragaph. The 1st > line says "If the requested mode is already present, do not send an > acknowledgement", but the last sentence says "an acknowledgement should be > sent EVEN if the mode is not changed". > > Could someone explain this ambiguity?? > > Mark Andrews If you receive a request for a state that you are in, you don't reply. If you receive a request for a state that you are not in, you MUST reply, and that reply may either be to aggree or disagree with the requested state. If you are WILL(DO/WONT/DONT) OPT, and you receive DO(WILL/DONT/WONT) OPT, you do nothing, because you are already in the requested state. If you are WONT(DONT) OPT, and you receive DO(WILL) OPT, you MUST respond with either WILL(DO) OPT (to acknowledge that you will go to the requested state) or WONT(DONT) OPT (to refuse to go into the requested state) If you are WILL(DO) OPT, and you receive DONT(WONT) OPT, you MUST respond with WONT(DONT) OPT, and turn off the option. The unclear point about option negotiation is when one sends a request to enable and option, and a refusal comes back (i.e., if I send DO OPT and get back a WONT OPT). Do I then respond with a DONT OPT, or do I just end the negotiation there? It can be argued both ways. If my state changed when I sent DO OPT, then it seems reasonable that I should send a DONT OPT if I receive a WONT OPT, to confirm that I have disabled the option. But if I don't change my state until I get the WILL OPT, then I it seems reasonable that I do NOT send the DONT OPT, since that is what state we are already in. As it turns out, from the view of the protocol, when you are doing proper option negotiation, both cases will work just fine, and neither side of the connection should have any dependencies on it happening one way or the other. -Dave Borman dab@cray.com Brought to you by Super Global Mega Corp .com