Re-architected the top level of the SSH protocol handlers.
authorsimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Wed, 24 Nov 2004 20:35:15 +0000 (20:35 +0000)
committersimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Wed, 24 Nov 2004 20:35:15 +0000 (20:35 +0000)
commitb09eaa882ff7326733d487b1a88395b306ee3be4
tree90b08a0a8e513790bd5d7e2798d33692d2161292
parentbc0e1c6cb91cbf8bed2ba44e44c5e46209524e90
Re-architected the top level of the SSH protocol handlers.
ssh1_protocol() and ssh2_protocol() are now high-level functions
which see _every_ SSH packet and decide which lower-level function
to pass it to. Also, they each support a dispatch table of simple
handler functions for message types which can arrive at any time.
Results are:

 - ignore, debug and disconnect messages are now handled by the
   dispatch table rather than being warts in the rdpkt functions

 - SSH2_MSG_WINDOW_ADJUST is handled by the dispatch table, which
   means that do_ssh2_authconn doesn't have to explicitly
   special-case it absolutely every time it waits for a response to
   its latest channel request

 - the top-level SSH2 protocol function chooses whether messages get
   funnelled to the transport layer or the auth/conn layer based on
   the message number ranges defined in the SSH architecture draft -
   so things that should go to auth/conn go there even in the middle
   of a rekey (although a special case is that nothing goes to
   auth/conn until initial kex has finished). This should fix the
   other half of ssh2-kex-data.

git-svn-id: svn://svn.tartarus.org/sgt/putty@4901 cda61777-01e9-0310-a592-d414129be87e
ssh.c