Subject: Re: telnet problem
To: Bill Studenmund <>
From: Ken Hornstein <>
List: current-users
Date: 06/29/1998 16:48:42
>Basically, it seems that the <CR> <0> to <CR> conversion, which is
>supposed to be happening in telnetd, isn't. Or else it's getting
>negotiated differently.

Okay, some of is starting to become clear.  This happens inside of
src/libexec/telnetd/state.c, in telrcv():

                case TS_CR:
                        state = TS_DATA;
                        /* Strip off \n or \0 after a \r */
                        if ((c == 0) || (c == '\n')) {

Also, a bit farther down:

                        if ((c == '\r') && his_state_is_wont(TELOPT_BINARY)) {
                                int nc = *netip;
#ifdef  LINEMODE
                                 * If we are operating in linemode,
                                 * convert to local end-of-line.
                                if (linemode && (ncc > 0) && (('\n' == nc) ||
                                         ((0 == nc) && tty_iscrnl())) ) {
                                        netip++; ncc--;
                                        c = '\n';
                                } else
                                        state = TS_CR;

So, I would guess this is a linemode issue.  Maybe the Mac is negotiating
binary mode by mistake?

This starts to get into the black art of telnet option negotiation.
You might try playing with different options on telnetd for linemode
negotiation.  Or perhaps there are some related options on the client?

Alternatively, you could always get a new Mac telnet client :-/