Commit Graph

131 Commits

Author SHA1 Message Date
Keith Winstein 9eb9a0386e Warn on congestion 2012-10-04 21:47:58 -04:00
Keith Winstein 9cf411ac3f Change server association timeout to 40 seconds 2012-10-04 21:45:42 -04:00
Keith Winstein 9ac3b65090 Respond to explicit congestion notification (slow down sender) 2012-09-28 19:07:31 -04:00
Keith Winstein 815aff9a73 Don't assert has_remote_addr, because can change between fragments. 2012-08-15 23:58:21 +03:00
Keith Winstein 5376ed1996 Use end-to-end-to-end connectivity (in transport layer) to control port hop.
Avoid playing games with network-layer timestamps.
2012-08-13 16:48:25 +03:00
Keith Winstein a21fed3dca Remove automatic hopping triggers from SSP. 2012-08-13 14:59:20 +03:00
Keith Winstein 82830344ca Hop ports when missing E2E2E connectivity, even if downlink working. 2012-08-13 14:26:53 +03:00
Keith Winstein 89da6105aa When not connected, (1) client hops port numbers (2) server stops sending. 2012-08-13 11:19:25 +03:00
Timo Sirainen 7117b61bf4 Don't do a 64bit read access from a string, since it may not be 64bit aligned.
Fixes crash with CPUs that require aligned access.

Signed-off-by: Timo Sirainen <tss@iki.fi>
2012-08-11 17:14:44 -04:00
Timo Sirainen 620152261e Don't use s_addr as parameter name. Fixes compiling with Solaris.
Signed-off-by: Timo Sirainen <tss@iki.fi>
2012-08-11 17:14:44 -04:00
Keith Winstein a744004bf6 Get system timestamp less often (only after sleeping/selecting) 2012-07-26 21:13:26 -04:00
Keith Winstein 92ecb99b71 Add OpenSSL licensing exception 2012-07-20 16:46:00 -04:00
Alexander Chernyakhovsky 0099f080ad Fix FTBFS on ARM on GCC 4.7.0
GCC v4.7.0, as found in Fedora 17 and newer, fails to build mosh on
ARM because of a narrowing warning, which is then promoted to an error
by -Werror.  This error message is new, and did not occur under
previous versions of GCC.

This patch corrects this error by explicitly casting to the desired
datatype the return value of the offending code, the result of a macro
from glibc to implement htobe16().
2012-06-20 01:24:08 -04:00
Keith Winstein 88bed3e94a Remove warning for IP_TOS failure 2012-06-12 14:39:36 -04:00
Keith Winstein 37f78d0e4c Disable out-of-order warning (fires too much on some 802.11n networks)
This reverts commit 682bbdfebd.
2012-05-30 02:04:32 -04:00
Keith Winstein ade0aaa3e8 Make IP_TOS failure non-fatal per Keegan. 2012-05-25 21:00:51 -04:00
Dave Taht 72e6c85e3d Set diffserv values to AF42 + ECT
AF42 has both the properties of CS42 and the IMM bit.

Whether this has the advantages or disadvantages of just one or
the other, I don't know. With most mac80211 stacks this will
force mosh packets in the VI queue on wireless.

As for pfifo_fast, have to look it up...
2012-05-25 20:40:49 -04:00
Keith Winstein 682bbdfebd Warn on out-of-order or duplicated packets (or missing nonce increment!) 2012-05-23 18:08:31 -04:00
Keith Winstein 7700984bbb Revert "Use protobuf's Gzip streams"
This reverts commit b0e05776f1.
2012-05-23 01:55:57 -04:00
Keith Winstein eca34ea0fd Make mandatory check for bad throwaway from sender 2012-05-22 23:12:48 -04:00
Keith Winstein e5f8ed7579 Cap state queue used by receiver, even if sender is malicious 2012-05-22 23:01:39 -04:00
Anders Kaseorg b0e05776f1 Use protobuf's Gzip streams
This reverts commit 63459ed1c7.
2012-05-16 00:24:21 -04:00
Keegan McAllister c258e0bc4e Make timing parameters public within namespace Network
So that UI timeouts can adjust accordingly.
2012-05-09 14:19:46 -04:00
Keegan McAllister 67a85eaf99 Deliver sendto() exceptions without disturbing control flow
This prevents the client from waking up every 200 ms while the network is down.
Addresses #243.
2012-05-09 14:19:46 -04:00
Keith Winstein 43182729ec More graceful output from failed verification 2012-05-05 01:53:28 -04:00
Keith Winstein 3573cec92a Enable round-trip verifier in verbose mode 2012-05-05 01:46:22 -04:00
Keith Winstein a82f50f085 Improve lossy connections by sending diff from "known" state if it's easy 2012-05-04 23:06:20 -04:00
Keith Winstein ce47d1f769 Fix bug in retransmission logic (improves performance on lossy links) 2012-05-02 23:55:13 -04:00
Keith Winstein 2ea3f3a347 Warn when server has not heard from us (even if we have heard from server) 2012-04-30 22:43:45 -04:00
Massimo Gengarelli 49fc21c8a3 Catch by const reference (remove Eclipse warnings)
(closes #245)
2012-04-29 02:24:31 -04:00
Keith Winstein 22e7cf60d3 Keep aligned buffers around, instead of allocing on each packet
Fixes #238 github issue.
Also fixes armel "Bad alignment" problem.
2012-04-24 18:40:01 -04:00
Keith Winstein 63459ed1c7 Revert use of protobuf's Gzip streams.
Unfortunately some Red Hat-based distributions lack the required header.
See https://bugzilla.redhat.com/show_bug.cgi?id=815587

This reverts commit 261a389a76.
This reverts commit b6736eb0a5.
2012-04-23 22:50:49 -04:00
Anders Kaseorg b6736eb0a5 Use protobuf’s Gzip{Input,Output}Stream wrapper around zlib
This removes our direct zlib dependency (although of course protobuf
still uses it internally), removes a fixed 4 MiB buffer and its
corresponding limit on the terminal size, reduces some string copying,
and deletes some code.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>

(Closes #230.)
2012-04-22 16:14:28 -04:00
Keith Winstein 8de74afb5f Restore 50 fps cap on frame rate (relevant to #222 github issue). 2012-04-19 23:00:12 -04:00
Keith Winstein 3c6e45a469 Adjust timing parameters in response to real-world trace data.
Also increases maximum frame rate from 50 fps to 100 fps.

Relevant to issue #222 on github.
2012-04-19 22:40:03 -04:00
Keith Winstein 58589787ea Make compressor take string references (closes #214 github issue) 2012-04-19 01:35:15 -04:00
Keith Winstein feb352c809 Optional verifier for round-trippability, and fix wrapping and tab bugs. 2012-04-16 09:09:20 -04:00
Keith Winstein a8c3df9c80 More robust shutdown sequence with warning on unclean shutdown. 2012-04-16 06:22:35 -04:00
Keith Winstein 99e8626a01 Tidy check for exception in Network::Connection::send(). 2012-04-15 23:29:05 -04:00
Keith Winstein aca69ef684 Server does not need to raise exception on failed sendto(). Fixes #183. 2012-04-15 23:13:58 -04:00
Keegan McAllister cd2d482484 Don't use *_t for our own typedefs
It's reserved by POSIX.

(closes #158 pull request)
2012-04-15 13:50:18 -04:00
Keegan McAllister 8bcc001b52 Remove Boost entirely 2012-04-15 13:49:15 -04:00
Keegan McAllister 83694977a7 Remove boost::lambda from transportsender.cc 2012-04-15 13:49:15 -04:00
Keegan McAllister 5904d4f5e6 Remove BOOST_AUTO from transportsender.cc 2012-04-15 13:49:15 -04:00
Keith Winstein 7be90ae244 Close server-related file descriptors before executing child process
Closes #170 github issue.
2012-04-13 13:48:56 -04:00
Keegan McAllister d2434d1a79 Check compiler support for -fno-default-inline and -pipe
clang was spewing warnings about the unrecognized -fno-default-inline.  (Oddly,
it warns only with -c, not when compiling directly to an executable.)  For
completeness we also check -pipe, even though clang is OK with that one.

It should be fine to omit either flag.  gcc -fno-default-inline drops the
implicit 'inline' annotation on functions defined inside a class scope, but
'inline' is only a hint anyway.  -fno-default-inline does not change linkage.
-pipe is merely a compile speed optimization.
2012-04-13 12:27:27 -04:00
Keegan McAllister 349e2d20c8 Use the hardening flags
Closes #79.
2012-04-13 12:25:09 -04:00
Alexander Chernyakhovsky 87d57c9567 Add unistd.h to network.cc to allow mosh to build on Fedora Rawhide (future Fedora 18) 2012-03-26 18:46:52 -04:00
Keegan McAllister 4eb3cace0b Use the PRNG class for chaff
In particular, srand( time( NULL ) ) is very predictable.

[keithw@mit.edu -- modified to use byte PRNG from /dev/urandom]
2012-03-19 23:12:07 -04:00
Keith Winstein 483bfe9f0f Make make_chaff() static class function to fix spurious clang warning 2012-03-18 14:11:49 -04:00