]> asedeno.scripts.mit.edu Git - PuTTY.git/blobdiff - proxy.c
Merge tag '0.65'
[PuTTY.git] / proxy.c
diff --git a/proxy.c b/proxy.c
index c22f30f4c8b95d49164e529da8d761fedf569607..3104ef0d8922f8dfd33028b8e1b989d4a5608252 100644 (file)
--- a/proxy.c
+++ b/proxy.c
@@ -267,8 +267,8 @@ static int plug_proxy_accepting(Plug p,
  * This function can accept a NULL pointer as `addr', in which case
  * it will only check the host name.
  */
-static int proxy_for_destination (SockAddr addr, const char *hostname,
-                                  int port, Conf *conf)
+int proxy_for_destination (SockAddr addr, const char *hostname,
+                           int port, Conf *conf)
 {
     int s = 0, e = 0;
     char hostip[64];
@@ -362,7 +362,7 @@ static int proxy_for_destination (SockAddr addr, const char *hostname,
     return 1;
 }
 
-SockAddr name_lookup(char *host, int port, char **canonicalname,
+SockAddr name_lookup(const char *host, int port, char **canonicalname,
                     Conf *conf, int addressfamily)
 {
     if (conf_get_int(conf, CONF_proxy_type) != PROXY_NONE &&
@@ -375,7 +375,7 @@ SockAddr name_lookup(char *host, int port, char **canonicalname,
     return sk_namelookup(host, canonicalname, addressfamily);
 }
 
-Socket new_connection(SockAddr addr, char *hostname,
+Socket new_connection(SockAddr addr, const char *hostname,
                      int port, int privport,
                      int oobinline, int nodelay, int keepalive,
                      Plug plug, Conf *conf)
@@ -388,7 +388,8 @@ Socket new_connection(SockAddr addr, char *hostname,
        sk_proxy_write_eof,
        sk_proxy_flush,
        sk_proxy_set_frozen,
-       sk_proxy_socket_error
+       sk_proxy_socket_error,
+        NULL, /* peer_info */
     };
 
     static const struct plug_function_table plug_fn_table = {
@@ -488,8 +489,8 @@ Socket new_connection(SockAddr addr, char *hostname,
     return sk_new(addr, port, privport, oobinline, nodelay, keepalive, plug);
 }
 
-Socket new_listener(char *srcaddr, int port, Plug plug, int local_host_only,
-                   Conf *conf, int addressfamily)
+Socket new_listener(const char *srcaddr, int port, Plug plug,
+                    int local_host_only, Conf *conf, int addressfamily)
 {
     /* TODO: SOCKS (and potentially others) support inbound
      * TODO: connections via the proxy. support them.