Re: Telnet and carriage return.

2012-09-17 Thread Denys Vlasenko
On Thu, Sep 13, 2012 at 4:48 PM, Ralf Friedl wrote: >>> This sends a CR-LF End-of-Line, but as a response to Ctrl-M. >>> >> >> Is that wrong or what? I don't understand what you want to say. >> > > This change converts CR to CR-LF. But to type CR you have to press Ctrl-V > Ctrl-M, not the enter ke

RE: Telnet and carriage return.

2012-09-13 Thread Cathey, Jim
>> Another solution would be to use sed 's/$/^M/' | telnet ... >you don't want sed to buffer the data...not implemented in busybox sed The canonical cr<->lf translation is to use tr, not sed. -- Jim ___ busybox mailing list busybox@busybox.net http://l

Re: Telnet and carriage return.

2012-09-13 Thread Ralf Friedl
Denys Vlasenko wrote: On Thu, Sep 13, 2012 at 2:55 PM, Ralf Friedl wrote: Denys Vlasenko wrote: Changed it to this in git: else if (c == '\r') - outbuf[j++] = '\0'; /* CR -> CR NUL */ + /* See RFC 1123 3.3.1 Telnet End-of-Lin

Re: Telnet and carriage return.

2012-09-13 Thread Denys Vlasenko
On Thu, Sep 13, 2012 at 2:55 PM, Ralf Friedl wrote: > Denys Vlasenko wrote: >> >> Changed it to this in git: >> >> else if (c == '\r') >> - outbuf[j++] = '\0'; /* CR -> CR NUL */ >> + /* See RFC 1123 3.3.1 Telnet End-of-Line >> Convention

Re: Telnet and carriage return.

2012-09-13 Thread Ralf Friedl
Denys Vlasenko wrote: Changed it to this in git: else if (c == '\r') - outbuf[j++] = '\0'; /* CR -> CR NUL */ + /* See RFC 1123 3.3.1 Telnet End-of-Line Convention. +* Using CR LF instead of other allowed possibi

Re: Telnet and carriage return.

2012-09-13 Thread Denys Vlasenko
On Thu, Sep 13, 2012 at 12:37 PM, Denys Vlasenko wrote: >> The second thing is that there is this nasty piece of code in busybox >> telnet.c source: >> >> else if (c == '\r') >> outbuf[j++] = '\0'; /* CR -> CR NUL */ >> >> Hell ! For some reason, every CR has a

Re: Telnet and carriage return.

2012-09-13 Thread Denys Vlasenko
On Thu, Sep 13, 2012 at 10:29 AM, Arnaud Rébillout wrote: > Hi, > thanks a lot for your quick (and useful) answer Rich. > > >> There are lots of translation modes available at the terminal level, >> controllable with the stty command. There may be one to enable >> translation of carriage return ch

Re: Telnet and carriage return.

2012-09-13 Thread Ralf Friedl
Arnaud Rébillout wrote: Also, any SMTP server I've ever used accepts NL-only (with no CR) input, so for interactive use rather than script use (wherein the latter you would want to be fully robust against strict servers), it probably doesn't matter anyway... I'm experimenting with a gmail server

Re: Telnet and carriage return.

2012-09-13 Thread Arnaud Rébillout
Hi, thanks a lot for your quick (and useful) answer Rich. There are lots of translation modes available at the terminal level, controllable with the stty command. There may be one to enable translation of carriage return characters (the enter key) to CR+LF combinations rather than just NL (LF).

Re: Telnet and carriage return.

2012-09-12 Thread Rich Felker
On Wed, Sep 12, 2012 at 01:50:38PM +0200, Arnaud Rébillout wrote: > Hello, > > I'm wondering if there is a way to issue a carriage return with telnet. > > Here is the story: > This morning I used telnet to send a mail. It's quite easy to do > that, just telnet to the right SMTP server, the proced

Telnet and carriage return.

2012-09-12 Thread Arnaud Rébillout
Hello, I'm wondering if there is a way to issue a carriage return with telnet. Here is the story: This morning I used telnet to send a mail. It's quite easy to do that, just telnet to the right SMTP server, the procedure is quite straight-forward. The problem is that the SMTP protocol expect