[mosh-devel] Solaris support

Timo Sirainen tss at iki.fi
Tue Apr 10 10:36:30 EDT 2012


Hi,

Thanks. The examples seem to be useful.

 - encrypt fails with: "Bad alignment.". The __aligned__(16) attribute doesn't seem to work. Attached patch works around it. After that I can encrypt and decrypt data, also across Solaris/Linux.
 - parse and termemu kind of works, but not very well. the terminal clearly isn't in raw mode, because nothing gets outputed until enter has been pressed a few times.

The __STRING error went away with:
#ifndef __STRING 
#define __STRING(x) #x 
#endif

But fixing the encrypt didn't fix mosh to actually work. It still can't connect to the server. I tried the mosh-client + mosh-server combination, and I see from mosh-server that:

Server now attached to client at IP:38849

But the client still stays at "Connecting...". Also I see that if I try to use the client with a wrong key, it detects that correctly:

Crypto exception: Packet failed integrity check.

Can I use the ntester example somehow to debug this?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: diff
Type: application/octet-stream
Size: 1364 bytes
Desc: not available
Url : http://mailman.mit.edu/pipermail/mosh-devel/attachments/20120410/54ba00ff/attachment.obj
-------------- next part --------------

On 10.4.2012, at 16.36, Quentin Smith wrote:

> Hi Timo,
> 
> The place I would start is to get the examples running on Solaris. You can do ./configure --enable-examples to get them to build.
> 
> Does termemu give you a working terminal?
> 
> Beyond that, I would try running mosh-server by hand and seeing if it produces any errors. There are instructions on mosh.mit.edu under "How do I run the mosh client and server separately?"
> 
> As to your other changes, the only thing I can really help with is that the "converting of negative value" warnings also happen on older versions of OS X, and the resulting binary still seems to work fine.
> 
> --Quentin
> 
> On Tue, 10 Apr 2012, Timo Sirainen wrote:
> 
>> I've mosh working fine with Linux and OSX, but my IRC client runs on a Solaris server, so I tried to make it work there as well. After a few hours I managed to get it compiled, but I can't verify if it actually works, since the client simply says:
>> 
>> mosh: Connecting... (39 s without contact.) [To quit: Ctrl-^ .]
>> 
>> I'm not entirely sure if this is a network problem or something else. I thought first it was the NAT, but when bypassing it it still didn't work. Is there some debug option where I can see on the server side what it does?
>> 
>> The list of things I changed:
>> 
>> - not using curses.h and term.h, but ncurses/ncurses.h and ncurses/term.h, had to also change configure script since term.h can't be used at all
>> 
>> - remove #include <stdbool.h> in base64.h:
>> /usr/include/stdbool.h:42:2: #error "Use of <stdbool.h> is valid only in a c99 compilation environment."
>> 
>> - Added dummy macros for byteorder.h. I've Sparc CPU so these should work fine:
>> #define htobe64(x) x
>> #define be64toh(x) x
>> #define htobe16(x) x
>> #define be16toh(x) x
>> 
>> - forkpty() doesn't exist, so I copied one from http://bugs.mysql.com/bug.php?id=22429
>> 
>> - cfmakeraw() doesn't exist, I used the code from http://linux.die.net/man/3/cfmakeraw
>> 
>> - there are many warnings about wint_t, but since it's the same size as int I guess it doesn't matter:
>> parseraction.cc: In member function `std::string Parser::Action::str()':
>> parseraction.cc:32: warning: wint_t format, int arg (arg 4)
>> 
>> - I'm not sure about this:
>> crypto.cc: In member function `std::string Crypto::Session::encrypt(Crypto::Message)':
>> crypto.cc:201: warning: cast from pointer to integer of different size
>> 
>> - network.h/cc try_bind() can't use "s_addr" parameter since it's a macro. I changed it to "addr".
>> 
>> - A lot of warnings like these:
>> network.cc: In constructor `Network::Packet::Packet(std::string, Crypto::Session*)':
>> network.cc:56: warning: converting of negative value `-0x00000000000000001' to `uint64_t'
>> network.cc:56: warning: converting of negative value `-0x00000000000000001' to `uint16_t'
>> network.cc:56: warning: converting of negative value `-0x00000000000000001' to `uint16_t'
>> 
>> - I commented out many (all?) asserts, since they don't compile:
>> network.cc:62: error: `__STRING' undeclared (first use this function)
>> network.cc:62: error: (Each undeclared identifier is reported only once for each function it appears in.)
>> 
>> - frontend needs -lnsl -lsocket to link mosh-client / mosh-server
>> 
>> 
>> _______________________________________________
>> mosh-devel mailing list
>> mosh-devel at mit.edu
>> http://mailman.mit.edu/mailman/listinfo/mosh-devel
>> 
> 



More information about the mosh-devel mailing list