aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/ecore/src/lib/ecore_con/ecore_con_private.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--libraries/ecore/src/lib/ecore_con/ecore_con_private.h47
1 files changed, 26 insertions, 21 deletions
diff --git a/libraries/ecore/src/lib/ecore_con/ecore_con_private.h b/libraries/ecore/src/lib/ecore_con/ecore_con_private.h
index 35f2310..91f5d39 100644
--- a/libraries/ecore/src/lib/ecore_con/ecore_con_private.h
+++ b/libraries/ecore/src/lib/ecore_con/ecore_con_private.h
@@ -56,7 +56,7 @@ extern int _ecore_con_log_dom;
56 56
57typedef struct _Ecore_Con_Lookup Ecore_Con_Lookup; 57typedef struct _Ecore_Con_Lookup Ecore_Con_Lookup;
58typedef struct _Ecore_Con_Info Ecore_Con_Info; 58typedef struct _Ecore_Con_Info Ecore_Con_Info;
59typedef struct Ecore_Con_Socks_v4 Ecore_Con_Socks_v4; 59typedef struct Ecore_Con_Socks Ecore_Con_Socks_v4;
60typedef struct Ecore_Con_Socks_v5 Ecore_Con_Socks_v5; 60typedef struct Ecore_Con_Socks_v5 Ecore_Con_Socks_v5;
61typedef void (*Ecore_Con_Info_Cb)(void *data, Ecore_Con_Info *infos); 61typedef void (*Ecore_Con_Info_Cb)(void *data, Ecore_Con_Info *infos);
62 62
@@ -83,13 +83,18 @@ typedef enum _Ecore_Con_Ssl_Handshake
83 ECORE_CON_SSL_STATE_INIT 83 ECORE_CON_SSL_STATE_INIT
84} Ecore_Con_Ssl_State; 84} Ecore_Con_Ssl_State;
85 85
86typedef enum Ecore_Con_Socks_State 86typedef enum Ecore_Con_Proxy_State
87{ 87{ /* named PROXY instead of SOCKS in case some handsome and enterprising
88 ECORE_CON_SOCKS_STATE_DONE = 0, 88 * developer decides to add HTTP CONNECT support
89 ECORE_CON_SOCKS_STATE_RESOLVED, 89 */
90 ECORE_CON_SOCKS_STATE_INIT, 90 ECORE_CON_PROXY_STATE_DONE = 0,
91 ECORE_CON_SOCKS_STATE_READ 91 ECORE_CON_PROXY_STATE_RESOLVED,
92} Ecore_Con_Socks_State; 92 ECORE_CON_PROXY_STATE_INIT,
93 ECORE_CON_PROXY_STATE_READ,
94 ECORE_CON_PROXY_STATE_AUTH,
95 ECORE_CON_PROXY_STATE_REQUEST,
96 ECORE_CON_PROXY_STATE_CONFIRM,
97} Ecore_Con_Proxy_State;
93 98
94struct _Ecore_Con_Client 99struct _Ecore_Con_Client
95{ 100{
@@ -140,7 +145,7 @@ struct _Ecore_Con_Server
140 pid_t ppid; 145 pid_t ppid;
141 /* socks */ 146 /* socks */
142 Ecore_Con_Socks *ecs; 147 Ecore_Con_Socks *ecs;
143 Ecore_Con_Socks_State ecs_state; 148 Ecore_Con_Proxy_State ecs_state;
144 int ecs_addrlen; 149 int ecs_addrlen;
145 unsigned char ecs_addr[16]; 150 unsigned char ecs_addr[16];
146 unsigned int ecs_buf_offset; 151 unsigned int ecs_buf_offset;
@@ -202,6 +207,7 @@ struct _Ecore_Con_Url
202 Eina_List *response_headers; 207 Eina_List *response_headers;
203 const char *url; 208 const char *url;
204 long proxy_type; 209 long proxy_type;
210 int status;
205 211
206 Ecore_Timer *timer; 212 Ecore_Timer *timer;
207 213
@@ -213,6 +219,10 @@ struct _Ecore_Con_Url
213 219
214 int received; 220 int received;
215 int write_fd; 221 int write_fd;
222
223 unsigned int event_count;
224 Eina_Bool dead : 1;
225 Eina_Bool multi : 1;
216}; 226};
217#endif 227#endif
218 228
@@ -239,24 +249,14 @@ struct _Ecore_Con_Lookup
239 v5 = (Ecore_Con_Socks_v5*)(X); \ 249 v5 = (Ecore_Con_Socks_v5*)(X); \
240 else 250 else
241 251
242struct Ecore_Con_Socks 252struct Ecore_Con_Socks /* v4 */
243{
244 unsigned char version;
245
246 const char *ip;
247 int port;
248 const char *username;
249 Eina_Bool lookup : 1;
250 Eina_Bool bind : 1;
251};
252
253struct Ecore_Con_Socks_v4
254{ 253{
255 unsigned char version; 254 unsigned char version;
256 255
257 const char *ip; 256 const char *ip;
258 int port; 257 int port;
259 const char *username; 258 const char *username;
259 unsigned int ulen;
260 Eina_Bool lookup : 1; 260 Eina_Bool lookup : 1;
261 Eina_Bool bind : 1; 261 Eina_Bool bind : 1;
262}; 262};
@@ -268,8 +268,13 @@ struct Ecore_Con_Socks_v5
268 const char *ip; 268 const char *ip;
269 int port; 269 int port;
270 const char *username; 270 const char *username;
271 unsigned int ulen;
271 Eina_Bool lookup : 1; 272 Eina_Bool lookup : 1;
272 Eina_Bool bind : 1; 273 Eina_Bool bind : 1;
274 /* v5 only */
275 unsigned char method;
276 const char *password;
277 unsigned int plen;
273}; 278};
274 279
275extern Ecore_Con_Socks *_ecore_con_proxy_once; 280extern Ecore_Con_Socks *_ecore_con_proxy_once;