Subject: Re: telnet problem
To: Ken Nakata <kenn@synap.ne.jp>
From: Bill Studenmund <skippy@macro.stanford.edu>
List: current-users
Date: 06/29/1998 20:45:25
On Tue, 30 Jun 1998, Ken Nakata wrote:

> Ty Sarna wrote:
> > I see the same thing with the NetBSD telnet client. But here's something
> > interesting:
> [...]
> > 000a vs 0a00, on different endian systems. Hmmmmmmm....
> 
> Here's some more that might interest you:
> 
> [~]$ uname -mr
> 1.3E mac68k
> [~]$ telnet localhost
> Trying 127.0.0.1...
> Connected to localhost.
> Escape character is '^]'.
> [...]
> [~]$ hexdump
> [here I type enter and ^D]
> 0000000 0a00
> 0000001
> [~]$ hexdump 
> [here I type enter twice and ^D]
> 0000000 0a0a                                   
> 0000002

And here's the same thing on an i386 (just telnetting in from another
host):
landau> hexdump
[one CR, then a ^D]
0000000 000a
0000001
landau> hexdump
[two CRs, then a ^D]
0000000 0a0a
0000002
landau> hexdump
[three CRs, then a ^D]
0000000 0a0a 000a
0000003

Looks like hexdump has problems with the last word on little-endian
systems. hexdump -c and hexdump -b both give correct (no "spurious"
characters) responses.

I wish it were this simple. :-(

Take care,

Bill