Subject: Re: your mail

From: Markus Friedl <[email-masked]>
Date: Thu, 8 Nov 2001 12:25:19 +0100

hi,

if i understand you correctly your problem is that you and i disagree
about what 'window size' means and what data/length is included in the
'window'

if i send a
	byte      SSH_MSG_CHANNEL_DATA
	uint32    recipient channel
	string    data
packet in OpenSSH, i count only the actual size of the data,
and not the size of the complete packet as sent on the wire.

draft-ietf-secsh-connect-11.txt says:
	"The window size is decremented by the amount of data sent."

i don't think that the additional 1+4+4 bytes (byte,uint32,uint32)
should be included in the window size counter. but i could be wrong.
perhaps the draft is ambiguous about this.

what do other implementations do?

i think that only the size of the actual 'payload' data should be
included in the window size, because you usually send
SSH_MSG_CHANNEL_WINDOW_ADJUST messages if you have consumed the data
(e.g. written the data to a socket).

when forwarding/consuming the data received on a channel, OpenSSH does
no longer know over how many packets this data was originally
distributed. so only the length of the payload, the amount of data
written to the 'consumer-socket' can be used to caculate the size for
SSH_MSG_CHANNEL_WINDOW_ADJUST.

-m

---

From: Yavor G Georgiev <[email-masked]>
Date: Thu, 8 Nov 2001 13:34:43 +0100

Hello Markus,

Thursday, November 08, 2001, 12:25:19 PM, you wrote:

MF> hi,

MF> if i understand you correctly your problem is that you and i disagree
MF> about what 'window size' means and what data/length is included in the
MF> 'window'

MF> if i send a
MF>         byte      SSH_MSG_CHANNEL_DATA
MF>         uint32    recipient channel
MF>         string    data
MF> packet in OpenSSH, i count only the actual size of the data,
MF> and not the size of the complete packet as sent on the wire.

MF> draft-ietf-secsh-connect-11.txt says:
MF>         "The window size is decremented by the amount of data sent."

MF> i don't think that the additional 1+4+4 bytes (byte,uint32,uint32)
MF> should be included in the window size counter. but i could be wrong.
MF> perhaps the draft is ambiguous about this.

MF> what do other implementations do?

MF> i think that only the size of the actual 'payload' data should be
MF> included in the window size, because you usually send
MF> SSH_MSG_CHANNEL_WINDOW_ADJUST messages if you have consumed the data
MF> (e.g. written the data to a socket).

MF> when forwarding/consuming the data received on a channel, OpenSSH does
MF> no longer know over how many packets this data was originally
MF> distributed. so only the length of the payload, the amount of data
MF> written to the 'consumer-socket' can be used to caculate the size for
MF> SSH_MSG_CHANNEL_WINDOW_ADJUST.

MF> -m

Yes you got me right.
I assume the data to be the last part in the following example packet:
         byte      SSH_MSG_CHANNEL_DATA
         uint32    recipient channel
         string    data
the one that is type string, which includes 4 more bytes for the
length.
You asked me about other implementations. I have made many tests with
the PuTTY client. It sends window adjustment after every
recieved packet. The value of the adjustment is calculated as the data
field not the payload of the data.
 I am totally agreed with you that the draft is ambigious. Can we get
 some advice from the draft guys - what had they meant ?
 
 ---
Best regards,
 Yavor                            mailto:[email-masked]

---

From: Simon Tatham <[email-masked]>
Date: Thu, 08 Nov 2001 12:22:15 +0000

> (e.g. written the data to a socket).

Speaking for PuTTY: I agree with you, and in fact it hadn't occurred
to me that there was any other way to do it.
-- 
Simon Tatham         What do we want?        ROT13!
<[email-masked]>   When do we want it?     ABJ!

---

From: Markus Friedl <[email-masked]>
Date: Thu, 8 Nov 2001 13:48:29 +0100

> the one that is type string, which includes 4 more bytes for the

i think the 4 string-len bytes should _not_ be included, since
it should not matter for the window size whether a payload data
of 10 bytes arrives in one or in 4 messages.

if you include the 4 bytes in the window size then you count
packets.

-m

---

From: [email-masked] (Niels Möller)
Date: 08 Nov 2001 18:13:40 +0100

> of 10 bytes arrives in one or in 4 messages.

I agree with Markus. LSH and openssh have the same behaviour, I think.

Regards,
/Niels

---

From: "Joseph Galbraith" <[email-masked]>
Date: Thu, 8 Nov 2001 10:24:42 -0700

I believe VShell / SecureCRT also only bill the
actual length of data against the window size.

I do not think that the packet overhead should
be included; I believe the current behavior
is correct.

- Joseph

----- Original Message -----
From: "Niels Möller" <[email-masked]>
To: "Markus Friedl" <[email-masked]>
Cc: "Yavor G Georgiev" <[email-masked]>; <[email-masked]>;
<[email-masked]>
Sent: Thursday, November 08, 2001 10:13
Subject: Re: your mail