diff th_network.h @ 121:8c39e8e90dbd

More work on proxy handling.
author Matti Hamalainen <ccr@tnsp.org>
date Sun, 22 Jun 2014 02:12:17 +0300
parents bfae4758fa6f
children aa2d608fb3f3
line wrap: on
line diff
--- a/th_network.h	Sun Jun 22 01:25:35 2014 +0300
+++ b/th_network.h	Sun Jun 22 02:12:17 2014 +0300
@@ -66,6 +66,13 @@
 
 enum
 {
+    TH_PROXY_ADDR_IPV4 = 0,
+    TH_PROXY_ADDR_DOMAIN,
+    TH_PROXY_ADDR_IPV6,
+};
+
+enum
+{
     TH_PROXY_AUTH_NONE,
     TH_PROXY_AUTH_USER,
 };
@@ -89,6 +96,7 @@
         int port;
         struct in_addr addr;
         char *userid, *passwd;
+        int mode, addr_type;
     } proxy;
 
     // Target host data
@@ -129,6 +137,8 @@
 void        th_conn_msg(th_conn_t *conn, int loglevel, const char *fmt, ...);
 
 int         th_conn_set_proxy(th_conn_t *conn, int type, int port, const char *host, int auth_type);
+int         th_conn_set_proxy_mode(th_conn_t *conn, const int mode);
+int         th_conn_set_proxy_addr_type(th_conn_t *conn, const int atype);
 int         th_conn_set_proxy_auth_user(th_conn_t *conn, const char *userid, const char *passwd);
 int         th_conn_open(th_conn_t *conn, const int port, const char *host);
 int         th_conn_close(th_conn_t *);