Re: Maximum packet size



In article <pan.2007.11.05.17.58.39@xxxxxxxxxxxxxx>,
K. Jennings <kjennings@xxxxxxxxxxxxxx> wrote:
In version 2 of the SSH protocol, how is the value of the maximum
packet size M in an SSH_MSG_CHANNEL_OPEN packet to be understood? I see
two possibilities:

1) M is the maximum value admissible for the packet length field
in a packet; maximum value as far as the party who has sent the
SSH_MSG_CHANNEL_OPEN packet is concerned.

2) M is the value in the packet length field, plus the length of
that field (always 4), plus the length of the MAC field. That is, M is
the total length of the data actually exchanged when a packet is sent/
received.

Neither. It's the maximum amount of channel data in a packet. i.e.,
it's the maximum value for the length field of the string embedded in an
SSH_MSG_CHANNEL_DATA or SSH_MSG_CHANNEL_EXTENDED_DATA. The RFC is not
well-worded here, but the giveaway is in section 5.2:

The maximum amount of data allowed is determined by the maximum
packet size for the channel, and the current window size, whichever
is smaller.

Since the window size must (to be meaningful) only cover channel data,
to make this comparison meaningful the maximum packet size must also.

More pragmatically, this is what PuTTY and OpenSSH do.

--
Ben Harris
.



Relevant Pages

  • Re: Maximum packet size
    ... packet size M in an SSH_MSG_CHANNEL_OPEN packet to be understood? ... It's the maximum amount of channel data in a packet. ... Since the window size must only cover channel data, ... to make this comparison meaningful the maximum packet size must also. ...
    (comp.security.ssh)
  • Re: Creating a simple windows messaging app
    ... a broker app that receives packets from a canbus and pushes them out to ... each application thread a copy of the packet. ... consists of putting the message into a queue to be sent to the bus (no ... targeted at a specific window. ...
    (microsoft.public.vc.mfc)
  • Re: Creating a simple windows messaging app
    ... each application thread a copy of the packet. ... appThread responds to: ... consists of putting the message into a queue to be sent to the bus (no ... targeted at a specific window. ...
    (microsoft.public.vc.mfc)
  • Re: TV Card setup (repost) - baskitcaise, help please! :-)
    ... >> These are messages from your firewall and can get a bit out of hand the ... >> number your DNS server by any chance? ... "Don't fragment" this IP packet if it's too big, drop it and send an ICMP ... Window size? ...
    (alt.os.linux.suse)
  • Re: Application, dll and driver design
    ... But there is one problem with replacing window messages with packet reading ... I have 15 processes all talking to each other and Dll process. ... > each app that blocks while trying to read from the shared buffer of ...
    (microsoft.public.win32.programmer.ui)