tessel / t1-runtime

[UNMAINTAINED] Tessel 1 JavaScript runtime.
Other
117 stars 33 forks source link

TCP socket remoteAddress is backwards #619

Open natevw opened 10 years ago

natevw commented 10 years ago

Using the script in #618 I noticed something funny in the output:

connection 114.4.168.192 29188

…the remote machine's IP address is 192.168.4.114!

The logic looks right to me:

UPDATE: and when testing against colony posix I see the expected:

connection 127.0.0.1 32512

…so I almost wonder if either ntohl is broken when compiling firmware, or if (wouldn't be surprised…) the CC3K library structs themselves are not [consistently?] in network endianness.