Re: Computing window sizes and adjustments

This is a discussion on Re: Computing window sizes and adjustments within the OpenSSH Development forums, part of the Networking and Network Related category; On 7/16/07, Damien Miller <djm@mindrot.org> wrote: > On Mon, 16 Jul 2007, JCA wrote: &...


Go Back   Usenet Forums > Networking and Network Related > OpenSSH Development

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 07-17-2007
JCA
 
Posts: n/a
Default Re: Computing window sizes and adjustments

On 7/16/07, Damien Miller <djm@mindrot.org> wrote:
> On Mon, 16 Jul 2007, JCA wrote:
>
> > In SSHv2, the data that consumes window space is that sent in the
> > channel data and channel data extended messages. My question is, how
> > is the data that consumes window space reckoned? One would have
> > thought that it is the total length of the message itself, but the
> > standard seems to imply that only the data contained in the data
> > string field in the messages above is to be taken into account. That
> > is, things like eg the padding and HMAC fields do not consume window
> > space.

>
> Windows in the SSH protocol are per-channel, so it only makes sense to use
> the data that is sent over a channel. This does not include MAC and padding
> as these are protocol-level, not channel level.
>
> > What is it that OpenSSH does in this respect?

>
> OpenSSH counts the data sent over a channel against the window, not
> including the protocol-level framing used to send it.


Thanks for the feedback. Let me see if I can pin things down.

The structure of an SSHv2 packet is laid down in section 6 of RFC 4253:

uint32 packet_length
byte padding_length
byte[n1] payload; n1 = packet_length - padding_length - 1
byte[n2] random padding; n2 = padding_length
byte[m] mac (Message Authentication Code - MAC); m = mac_length

If I understand you correctly, the only field that is to be taken into
account when adjusting the window size is the payload. Now only two
packet types, namely, SSH_MSG_CHANNEL_DATA and
SSH_MSG_CHANNEL_DATA_EXTENDED, consume window space. The structures of
these packets are

byte SSH_MSG_CHANNEL_DATA
uint32 recipient channel
string data

and

byte SSH_MSG_CHANNEL_EXTENDED_DATA
uint32 recipient channel
uint32 data_type_code
string data

Are all the fields in the packets to be reckoned with for window space
consumption purposes, or only the data string? I mean, both the packet
ID and recipient channel can be considered to be protocol data;
probably the data_type_code as well; therefore, they should be left
out. Is this the case?
_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@mindrot.org
https://lists.mindrot.org/mailman/li...enssh-unix-dev
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 01:38 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0