Port forwarding module now passes backend handles around properly.
[u/mdw/putty] / ssh.h
diff --git a/ssh.h b/ssh.h
index 9f9f1e6..2d2d0df 100644 (file)
--- a/ssh.h
+++ b/ssh.h
@@ -195,13 +195,16 @@ struct ssh_signkey {
 
 struct ssh_compress {
     char *name;
-    void (*compress_init) (void);
-    int (*compress) (unsigned char *block, int len,
+    void *(*compress_init) (void);
+    void (*compress_cleanup) (void *);
+    int (*compress) (void *, unsigned char *block, int len,
                     unsigned char **outblock, int *outlen);
-    void (*decompress_init) (void);
-    int (*decompress) (unsigned char *block, int len,
+    void *(*decompress_init) (void);
+    void (*decompress_cleanup) (void *);
+    int (*decompress) (void *, unsigned char *block, int len,
                       unsigned char **outblock, int *outlen);
-    int (*disable_compression) (void);
+    int (*disable_compression) (void *);
+    char *text_name;
 };
 
 struct ssh2_userkey {
@@ -249,8 +252,7 @@ void logevent(char *);
 
 /* Allocate and register a new channel for port forwarding */
 void *new_sock_channel(void *handle, Socket s);
-void ssh_send_port_open(void *handle, void *channel,
-                       char *hostname, int port, char *org);
+void ssh_send_port_open(void *channel, char *hostname, int port, char *org);
 
 Bignum copybn(Bignum b);
 Bignum bn_power_2(int n);
@@ -359,11 +361,13 @@ Bignum primegen(int bits, int modulus, int residue, Bignum factor,
 /*
  * zlib compression.
  */
-void zlib_compress_init(void);
-void zlib_decompress_init(void);
-int zlib_compress_block(unsigned char *block, int len,
+void *zlib_compress_init(void);
+void zlib_compress_cleanup(void *);
+void *zlib_decompress_init(void);
+void zlib_decompress_cleanup(void *);
+int zlib_compress_block(void *, unsigned char *block, int len,
                        unsigned char **outblock, int *outlen);
-int zlib_decompress_block(unsigned char *block, int len,
+int zlib_decompress_block(void *, unsigned char *block, int len,
                          unsigned char **outblock, int *outlen);
 
 /*