simon-svn: putty: simon

tartarus-commits at lists.tartarus.org tartarus-commits at lists.tartarus.org
Tue Dec 28 14:05:00 GMT 2004


SVN root:       svn://ixion.tartarus.org/main
Changes by:     simon
Revision:       5029
Date:           2004-12-28 14:04:58 +0000 (Tue, 28 Dec 2004)

Log message (17 lines):
Abstracted out the rather large port-forwarding setup code into a
routine which is common between SSH1 and SSH2. Since this routine is
not part of the coroutine system, this means it can't sit and wait
to get its various success/failure responses back. Hence, I've
introduced a system of queued packet handlers, each of which waits
for exactly one of a pair of messages (SSH1_SMSG_{SUCCESS,FAILURE}
or SSH2_MSG_REQUEST_{SUCCESS,FAILURE}), handles it when it arrives,
and automatically de-registers itself. Hence the port-forwarding
setup code can be called once, and then subsequent packets related
to it will automatically be handled as they arrive.

The real purpose of all this is that the infrastructure is now there
for me to arrange mid-session configurability of port forwarding.
However, a side benefit is that fewer round trips are involved in
session startup. I'd quite like to move more of the connection setup
(X forwarding, agent forwarding, pty allocation etc) to using the
new queued handler mechanism for this reason.

Modified files:
U   putty/ssh.c

Links:
http://www.tartarus.org/~simon-anonsvn/viewcvs.cgi/putty/ssh.c?rev=5029&r1=5028&r2=5029



More information about the tartarus-commits mailing list