[Simh] Question on telnet mantra in simh

Richard Cornwell skyvis at sky-visions.com
Wed Nov 10 23:37:18 EST 2010


Hi David,

> On Wednesday, November 10, 2010 at 23:08, Richard Cornwell wrote:
> 
> > Here is a patch I sent Bob back in a couple of years ago to fix
> > telnet support to handle correct negotiations.
> 
> I had tried your patch back in October of 2007 when I was looking at 
> improving the Telnet code, but it had two problems.  From my notes at
> the time:
> 
>  1. It causes SIMH to send a "WONT LINEMODE" upon connection, but the
> RFC prohibits this ("Parties may only request a change in option
> status; i.e., a party may not send out a 'request' merely to announce
> what mode it is in"). 

   Remove the first line of open string not to send WONT LINEMODE.

   I believe that servers are also allowed to send WONT strings too if
   they refuse to support something. The client should just log these
   and not respond.

>  2. It unconditionally responds to WONT with DO or DONT, which leads
> to negotiation loops (e.g., "DO BIN" from SIMH to client, "WONT BIN"
>     from client, "DONT BIN" to client, "WONT BIN" from client, etc.). 
  
    Add a 256 char array, and set them to WILL/WONT based on options you
    want. As you recieve echo option, if array is WILL send DO or send
    WONT, then change array to DO/DONT. If array is DO/DONT, you don't
    respond. 

> The negotiation loop showed up with the "QCTerm" HP terminal
> emulator.  As I recall, the RFC suggests that loops may be avoided by
> ensuring that a denied request is not repeated.

    I tested code with my own telnet client/ unix client and
    unix ckermit. This was quick hack to allow me to kermit into Unix 7
    from linux to transfer some files. 

Rich

-- 
==========================================================================
Richard Cornwell
skyvis at sky-visions.com
http://sky-visions.com
==========================================================================




More information about the Simh mailing list