Subject: Definition of "packet"

From: Henrick Hellström <[email-masked]>
Date: Fri, 28 Oct 2005 16:05:22 +0200

This ought to be a simple question, but it seems it is not spelled out 
anywhere in specification:

Exactly what is to be included in the calculation of the length of a 
"packet", when checking if it exceeds the Maximum Packet Size parameter 
sent during SSH Connection establishment?

a) Just the raw packet load
b) Packet load + SSH specific formatting (e.g. 4 for the length 
specifier of a "string")
c) Packet load + formatting + channel packet header (e.g. 5 for byte 
SSH_MSG_CHANNEL_DATA; uint32 recipient channel)
d) Packet load + formatting + channel packet header + transport packet 
formatting (as per SSH Transport Layer Protocol draft paragraph 6)
e) Packet load + formatting + channel packet header + transport packet 
formatting + TCP/IP headers
...etc

---

From: Jacob Nevins <[email-masked]>
Date: Sat, 29 Oct 2005 23:50:03 +0100

> sent during SSH Connection establishment?

I assume that you're referring to the parameter in the
SSH_MSG_CHANNEL_OPEN packet.

> formatting + TCP/IP headers

I agree this is not absolutely clear.

I think, given the context, that I'd expect it to refer to the maximum
amount of actual channel data in a packet (i.e., the maximum length of
the `data' field, not including the string length, in the
SSH_MSG_CHANNEL_DATA packet), and similar for related types of packet. I
think this is your option `a'.

PuTTY at least appears to agree with this.

If there's consensus on this, can we get a note into the RFC before it's
published?

---

From: Jacob Nevins <[email-masked]>
Date: Sun, 30 Oct 2005 12:26:12 +0000

> SSH_MSG_CHANNEL_OPEN packet.
  [...]
> PuTTY at least appears to agree with this.

From my brief reading of the source, OpenSSH (4.2p1) also appears to
take this interpretation.

> If there's consensus on this, can we get a note into the RFC before it's

How about the following change to secsh-connect 5.1, which makes the
'maximum packet size' language match that used for 'initial window
size'?:

                          The 'maximum packet size' specifies the
   maximum number of bytes of channel data that may be sent to the
   sender in a single SSH packet.