Re: Telnet Negotiation Question!

From: Doug Mitton (doug_mitton_at_hotmail.x.com)
Date: 12/10/03


Date: Wed, 10 Dec 2003 15:07:35 -0500

mru@kth.se (Måns Rullgård) wrote:

>Doug Mitton <doug_mitton@hotmail.x.com> writes:
>
>> I am searching for "readable" telnet negotiation information but I
>> thought I'd ask here in the meantime in case someone has a reference
>> or suggestion handy.
>
>RFC854, http://www.rfc-editor.org/rfc/rfc854.txt, looks pretty
>readable to me.

I had been reading Googled answers to questions, source code snips and
whole source code downloads. I hadn't looked into RFC's before as
(for some reason) I thought they read like MAN pages ... which can be
rather cryptic. Yes, the first one I hit was RFC 0008 and it was
completely readable and told me my problem right near the end of the
document.

>> I guess my basic question is ... is it possible to put a telnet server
>> into RAW (?) mode so that it doesn't watch the transfering stream for
>> re-negotiation requests?
>
>I'll let someone else come with a definitive answer, but I doubt it.
>I can't remember ever reading about anything like that.

There is a BINARY mode BUT it still allows the xFF monitoring and it
must still be escaped.

>> I am having a problem in my application and it looks like a byte is
>> showing up in the data stream that the originator didn't send. I am
>> assuming that the telnet server is adding it as it looks very similar
>> to a negotiation request.
>>
>> The bytes in question (in the packet header) look like:
>>
>> sent by originator: x01 xFF x00
>> receiver gets: x01 xFF xFF x00
>
>A 0xff character means that the next character is a telnet command.
>To send a literal 0xff, it needs to be escaped with an extra 0xff.
>Thus, if the telnet server or client receives such a character as
>user/application input, it will add the escaping.
>
>> I'm not 100% certain telnetd is the culprit but I'm looking for
>
>I'd say that's the case. Is your program acting as either telnet
>server or client? Otherwise you shouldn't need to worry about these
>things.

My program is acting as a client to the Kegs emulator AND a client to
telnetd, I am simply "crossing" the sockets so the 2 can talk to each
other; that is an old Apple // terminal emulator program can now
actually get out on the internet as a telnet client.

I have modified my program to capture xFF bytes and escape/unescape as
required BUT the Xmodem protocol is still claiming a malformed header
when the transfer hits packet 254. So, I'm off to take a look at
Xmodem specs.

Thanks for the response and the link to RFC's!

--
------------------------------------------------
         http://www3.sympatico.ca/dmitton
  SPAM Reduction: Remove "x." from my domain.
------------------------------------------------


Relevant Pages

  • Re: How to implement a server socket compatible to telnet?
    ... But he wants to deal with Telnet. ... "GNAT.Sockets.ads " which deals with both server and client code. ... end loop; ... -- Read values from client-stream character by character. ...
    (comp.lang.ada)
  • Re: Telnet Client search
    ... keeps the cost of your license down. ... Telnet is a very simple protocol and, if you're experienced with WinSock, ... The main challenge of writing a Telnet client ... embedded Linux server is another level of complexity. ...
    (microsoft.public.windowsce.platbuilder)
  • Re: Still looking for a Ruby MUD client
    ... >>> telnet spec. ... IMO if the MUD ... client alter some of the MUD output, ... then pass it to the GUI which handles it as necessary. ...
    (comp.lang.ruby)
  • Re: SBS 2003 SP 1 on MSDN disks
    ... the PPPoE client, which I believe it operate as, even if Earthlink does not know it, and stop using the Windows Server 2003 PPPoE client to connect. ... I have started the Telnet service on my client computer ... I have started the Telnet service on the SBS2003 server. ...
    (microsoft.public.windows.server.sbs)
  • Re: Embedded XP telnet server programming
    ... to use gethostbynameI need to know the client hostname. ... How can an application running into a telnet session know it? ... a commercial telnet server I used in the past will ...
    (microsoft.public.win32.programmer.networks)