On 2013/02/15 14:18, Jérémie Courrèges-Anglas wrote:
> Hi folks,
>
> Here's a port for mosh[1]; while I've only tested it lightly, it seems
> to work just fine. I don't think that importing it right now would cause
> problems, but *shrug*. I'm just posting it here so that people can test
> it.
>
> mosh needs p5-IO-Tty, you'll find both ports attached.
>
> Some notes about the mosh port:
> - mosh comes with two "test programs". They don't fail but I don't
> really understand what they're supposed to test. 8)
> - mosh would likely benefit from IUTF8[2].
> - there are two setsockopt calls that I haven't yet translated to
> OpenBSD syntax (src/network/network.cc:Connection::Socket::Socket());
> If someone has a clue...
>
> regress passes for p5-IO-Tty
>
> [1] http://mosh.mit.edu/
> [2] http://marc.info/?l=openbsd-tech&m=133423484832731&w=2
> --
> Jérémie Courrèges-Anglas
> GPG Key fingerprint: 61DB D9A0 00A4 67CF 2A90 8961 6191 8FBF 06A1 1494
>
p5-IO-Tty is ok with me for after unlock.
I don't like DESCR for mosh; 'Mosh is a "replacement" for SSH' - no
it isn't..
: /* Disable path MTU discovery */
: #ifdef HAVE_IP_MTU_DISCOVER
: char flag = IP_PMTUDISC_DONT;
: socklen_t optlen = sizeof( flag );
: if ( setsockopt( _fd, IPPROTO_IP, IP_MTU_DISCOVER, &flag, optlen ) < 0 ) {
: throw NetworkException( "setsockopt", errno );
: }
: #endif
: /* request explicit congestion notification on received datagrams */
: #ifdef HAVE_IP_RECVTOS
: char tosflag = true;
: socklen_t tosoptlen = sizeof( tosflag );
: if ( setsockopt( _fd, IPPROTO_IP, IP_RECVTOS, &tosflag, tosoptlen ) < 0 ) {
: perror( "setsockopt( IP_RECVTOS )" );
: }
: #endif
I don't believe we support either receiving the tos bits for a
received datagram, or forcing pmtu to be disabled per-socket.