[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug-inetutils] Weird telnet behaviour

From: Franc Grootjen
Subject: [bug-inetutils] Weird telnet behaviour
Date: Mon, 01 Aug 2016 14:44:06 +0200

While writing a small telnet server application I stumbled upon some (for me) 
unexplainable telnet behaviour.
The culprit is the behaviour of telnet program receiving a linefeed character 
(ascii 10). As far as I understand (from RFC854) telnet should as unconfigured 
NVT handle a linefeed as:

Moves the printer to the next print line, keeping the same horizontal position

So, that explicitly means without performing a carriage return.
I created a small program, that writes “a\nb\n” to a connected telnet session. 
The result is that the a and b characters are directly under each other, which 
is not according to the above rule.
I tested this on linux (ubuntu) and under macos.
Funny is that after switching the telnet local echo off, (by sending IAC, WILL, 
ECHO) the behaviour changes, and the linefeed character keeps the same 
horizontal position.
(See the commented line in the example source)
So my questions are:
- is this behaviour incorrect?
- why does the behaviour changes after switching off the local echo

Really curious about your thoughts about this!


Attachment: server.c
Description: Binary data

Dr. F.A. Grootjen
Associate Professor Artificial Intelligence
Radboud University Nijmegen

reply via email to

[Prev in Thread] Current Thread [Next in Thread]