Hi,
> Now I think I know how to deal with this... I need a to massage the
> existing builtin functions a little. I need
>
> (listen callback port)
>
> This function listens on PORT, returns an lsh_fd object (or NULL if
> listen failed). When connections arrive, they are passed to the
> CALLBACK function, as an instance of listen_value. Values returned
> from the CALLBACK are discarded, i.e. it could be a continuation
> instead of a command, but I think that would be less convenient.
I see. Is this accomplished using the old "return a command" trick?
e.g. (a b c) = ((a b) c) ?
>
> (open-forwarded-tcp port peer)
>
> This prepares opening of a forwarded-tcp channel. Port is the port we
> are forwarding, and peer is the originating port of the connection.
> For simplicity, let peer be of type listen_value rather than
rather than?
> This command returns a channel_open_command (i.e. a command accepting
> an ssh_connection as argument).
>
> Then we can define the port-forwarding mechanism as
>
> (lambda (connection port)
> (listen (lambda (peer) (open-forwarded-tcp port peer connection))
> port))
you wrote only two parameters for open-forwarded-tcp above, it quickly
became 3..
> When invoking this command, we pass a continuation function which
> checks the return value, sends a response back to the client, and, if
> successful, updates the list of forwarded ports.
I'll check your cvs tree.
--
Bazsi
PGP key: http://www.balabit.hu/pgpkey.txt, or finger [EMAIL PROTECTED]