Subject: Window size for channels

From: Anil Madhavapeddy <[email-masked]>
Date: Mon, 27 Dec 2004 22:06:03 +0000

I'm currently using
http://www.ietf.org/internet-drafts/draft-ietf-secsh-connect-23.txt
to implement an SSH2 server.

I just wanted to confirm that the 'window size' defined per-channel is
only affected by the 'data' field of an SSH_MSG_CHANNEL_DATA channel
packet, and that no other packets have any effect (including the other
fields in the SSH_MSG_CHANNEL_DATA or packet overhead such as padding).

Section 5.2 does say that "The maximum amount of data allowed is the
current window size.  The window size is decremented by the amount of
data sent".  This implies that only the contents of a data packet apply to
window size calculations.

But then in Section 5.3, the SSH_MSG_CHANNEL_CLOSE message says:
"This message does not consume window space and can be sent even if no
 window space is available."

Why say this if no other messages ever consume window space?  It implies
that this message is special with respect to window flow control.  Do
other channel-specific messages do take up window space then?

thanks for any comments,

-- 
Anil Madhavapeddy                                 http://anil.recoil.org
University of Cambridge                          http://www.cl.cam.ac.uk

---

From: der Mouse <[email-masked]>
Date: Mon, 27 Dec 2004 21:11:17 -0500 (EST)

> I just wanted to confirm that the 'window size' defined per-channel
> is only affected by the 'data' field of an SSH_MSG_CHANNEL_DATA
> channel packet, and that no other packets have any effect (including
> the other fields in the SSH_MSG_CHANNEL_DATA or packet overhead such
> as padding).

This is not so; of SSH_MSG_CHANNEL_EXTENDED_DATA messages, connect-23
writes

   Data sent with these messages consumes the same window as ordinary
   data.

> "This message does not consume window space and can be sent even if
>  no window space is available."

> Why say this if no other messages ever consume window space?

I don't know; I didn't write it - but I speculate it's to avoid
confusing people who know that in TCP, the FIN bit - the closest analog
to ssh's CLOSE message - _does_ consume sequence number space.

/~\ The ASCII				der Mouse
\ / Ribbon Campaign
 X  Against HTML	       [email-masked]
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B