[mod.protocols.tcp-ip] 4.3 BSD TELNET vs. <CR>

GKN@SDSC-SDS.ARPA.UUCP (12/29/86)

[apologies if this has been brought up before, or if this is the wrong list
 to direct this query to...]

It seems that when the TELNET client program for 4.3 BSD Unix is in character
at a time mode it substitutes a <LF> for <CR>.  While this doesn't seem to be
in clear violation of RFC 854, it does seem a little strange to me.  RFC 854
simply says that a <NUL> should be inserted in the data stream after every <CR>
character which would not be followed by a <LF>.

There are operating systems out there where the <CR> character is important,
VMS and CTSS being two examples I have locally.  The <LF> character has a
legitimate, non-end-of-line use on each system.

Reading the manual page for 4.3 BSD TELNET doesn't seem to indicate that there
is any way to supress this behavior except to operate in line-at-a-time mode.

Is there someone out there who can tell me how to cause 4.3 BSD TELNET to
transmit a <CR><LF> (or <CR><NUL> a la RFC 854) when I type a <CR>?

gkn
--------------------------------------
Arpa:	GKN@SDSC.ARPA
Bitnet:	GKN@SDSC
Span:	SDSC::GKN (5.600)
USPS:	Gerard K. Newman
	San Diego Supercomputer Center
	P.O. Box 85608
	San Diego, CA 92138
AT&T:	619.534.5076
-------

ron@BRL.ARPA.UUCP (12/30/86)

The problem occurs only in local echo mode and is a bug in the code
rather than a design feature....


Description:
	TELNET sends \n in local echo mode rather than \r\n when
	\r is typed.
Repeat-By:
	Get into mode 3, character at a time with local echo in
	telnet and then type \r.
Fix:
	The code that decides what the user really meant when he
	the input character is \n has a bug.  It checks to see if
	the user was in CRMOD which would imply that he really
	pressed return rather than linefeed.  The test however is
	defective in that mode 2 has CRMOD set as well.

*** telnet.c	Tue Dec 23 21:50:35 1986
--- /tmp/foo	Tue Dec 30 11:29:50 1986
***************
*** 983,989 ****
  				 * on our local machine, then probably
  				 * a newline (unix) is CRLF (TELNET).
  				 */
! 				if (globalmode >= 3) {
  					NETADD('\r');
  				}
  				NETADD('\n');
--- 983,989 ----
  				 * on our local machine, then probably
  				 * a newline (unix) is CRLF (TELNET).
  				 */
! 				if (globalmode >= 2) {
  					NETADD('\r');
  				}
  				NETADD('\n');

GKN@SDSC.ARPA (Gerard K. Newman) (12/30/86)

	From:	 Ron Natalie <ron@BRL.ARPA>
	Subject: Re:  4.3 BSD TELNET vs. <CR>
	Date:	 Tue, 30 Dec 86 11:45:45 EST

	The problem occurs