]> andersk Git - openssh.git/commitdiff
- markus@cvs.openbsd.org 2002/02/14 23:28:00
authordjm <djm>
Tue, 19 Feb 2002 04:20:57 +0000 (04:20 +0000)
committerdjm <djm>
Tue, 19 Feb 2002 04:20:57 +0000 (04:20 +0000)
     [channels.h session.c ssh.c]
     increase the SSH v2 window size to 4 packets. comsumes a little
     bit more memory for slow receivers but increases througput.

ChangeLog
channels.h
session.c
ssh.c

index 7f08e0e9b92a4d746a3bd763e08ba1eecc267093..327aed9243bc4e9de298d49074140e4e15a40db0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -9,6 +9,10 @@
      [channels.c]
      increase the SSH v2 window size to 4 packets. comsumes a little
      bit more memory for slow receivers but increases througput.
+   - markus@cvs.openbsd.org 2002/02/14 23:28:00
+     [channels.h session.c ssh.c]
+     increase the SSH v2 window size to 4 packets. comsumes a little
+     bit more memory for slow receivers but increases througput.
 
 20020218
  - (tim) newer config.guess from ftp://ftp.gnu.org/gnu/config/config.guess
index 7cb0c367cbb3e8f892df9397728686eb9bf32004..b637ab32c5f39a7f53f4aecc4aca682b2ef42e11 100644 (file)
@@ -32,7 +32,7 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
-/* RCSID("$OpenBSD: channels.h,v 1.63 2002/02/05 14:32:55 markus Exp $"); */
+/* RCSID("$OpenBSD: channels.h,v 1.64 2002/02/14 23:28:00 markus Exp $"); */
 
 #ifndef CHANNEL_H
 #define CHANNEL_H
@@ -113,12 +113,12 @@ struct Channel {
 #define CHAN_EXTENDED_WRITE            2
 
 /* default window/packet sizes for tcp/x11-fwd-channel */
-#define CHAN_SES_WINDOW_DEFAULT        (32*1024)
-#define CHAN_SES_PACKET_DEFAULT        (CHAN_SES_WINDOW_DEFAULT/2)
-#define CHAN_TCP_WINDOW_DEFAULT        (32*1024)
-#define CHAN_TCP_PACKET_DEFAULT        (CHAN_TCP_WINDOW_DEFAULT/2)
-#define CHAN_X11_WINDOW_DEFAULT        (4*1024)
-#define CHAN_X11_PACKET_DEFAULT        (CHAN_X11_WINDOW_DEFAULT/2)
+#define CHAN_SES_PACKET_DEFAULT        (32*1024)
+#define CHAN_SES_WINDOW_DEFAULT        (4*CHAN_SES_PACKET_DEFAULT)
+#define CHAN_TCP_PACKET_DEFAULT        (32*1024)
+#define CHAN_TCP_WINDOW_DEFAULT        (4*CHAN_TCP_PACKET_DEFAULT)
+#define CHAN_X11_PACKET_DEFAULT        (16*1024)
+#define CHAN_X11_WINDOW_DEFAULT        (4*CHAN_X11_PACKET_DEFAULT)
 
 /* possible input states */
 #define CHAN_INPUT_OPEN                        0
@@ -139,7 +139,7 @@ struct Channel {
 
 Channel        *channel_lookup(int);
 Channel *channel_new(char *, int, int, int, int, int, int, int, char *, int);
-void    channel_set_fds(int, int, int, int, int, int);
+void    channel_set_fds(int, int, int, int, int, int, u_int);
 void    channel_free(Channel *);
 void    channel_free_all(void);
 void    channel_stop_listening(void);
index 441ff8cdbe9ed61a83d81f6ea6e318d7e396700d..f9f5da80e3ab4aaf300271859b585825269eb529 100644 (file)
--- a/session.c
+++ b/session.c
@@ -33,7 +33,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: session.c,v 1.125 2002/02/09 17:37:34 deraadt Exp $");
+RCSID("$OpenBSD: session.c,v 1.126 2002/02/14 23:28:00 markus Exp $");
 
 #include "ssh.h"
 #include "ssh1.h"
@@ -1781,7 +1781,8 @@ session_set_fds(Session *s, int fdin, int fdout, int fderr)
        channel_set_fds(s->chanid,
            fdout, fdin, fderr,
            fderr == -1 ? CHAN_EXTENDED_IGNORE : CHAN_EXTENDED_READ,
-           1);
+           1,
+           CHAN_SES_WINDOW_DEFAULT);
 }
 
 /*
diff --git a/ssh.c b/ssh.c
index 236f2b52206adc0e8348defc9dda7d63c79dbdfd..117a0930b0b4ef4529cd9e24e87e1340f24fb8de 100644 (file)
--- a/ssh.c
+++ b/ssh.c
@@ -39,7 +39,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: ssh.c,v 1.163 2002/02/07 09:35:39 markus Exp $");
+RCSID("$OpenBSD: ssh.c,v 1.164 2002/02/14 23:28:00 markus Exp $");
 
 #include <openssl/evp.h>
 #include <openssl/err.h>
@@ -1145,9 +1145,9 @@ ssh_session2_open(void)
 
        window = CHAN_SES_WINDOW_DEFAULT;
        packetmax = CHAN_SES_PACKET_DEFAULT;
-       if (!tty_flag) {
-               window *= 2;
-               packetmax *=2;
+       if (tty_flag) {
+               window >>= 1;
+               packetmax >>= 1;
        }
        c = channel_new(
            "session", SSH_CHANNEL_OPENING, in, out, err,
This page took 0.263992 seconds and 5 git commands to generate.