rocksock_ssl: respect timeouts
[rofl0r-rocksock.git] / rocksock_variables.c
blobdfff07231bf8b896618b0661d065eae817af178f
1 #ifdef ROCKSOCK_FILENAME
2 const char* rs_errorMap[] = {
3 "0" , "1" , "2" , "3" , "4" , "5" , "6" , "7",
4 "8" , "9" , "10", "11", "12", "13", "14", "15",
5 "16", "17", "18", "19", "20", "21", "22", "23"
6 };
8 #else
9 #define ROCKSOCK_FILENAME __FILE__
11 const char* rs_errorMap[] = {
12 // RS_E_NO_ERROR,
13 "no error",
14 //RS_E_NULL,
15 "NULL pointer passed",
16 //RS_E_EXCEED_PROXY_LIMIT,
17 "exceeding maximum number of proxies",
18 //RS_E_NO_SSL,
19 "can not establish SSL connection, since library was not compiled with USE_SSL define",
20 // RS_E_NO_SOCKET
21 "socket is not set up, maybe you should call connect first",
22 // RS_E_HIT_TIMEOUT
23 "timeout reached on operation",
24 //RS_E_OUT_OF_BUFFER
25 "supplied buffer is too small",
26 // RS_E_SSL_GENERIC
27 "generic SSL error, see STDERR",
28 // RS_E_SOCKS4_NOAUTH
29 "SOCKS4 authentication not implemented",
30 // RS_E_SOCKS5_AUTH_EXCEEDSIZE
31 "maximum length for SOCKS5 servername/password/username is 255",
32 // RS_E_SOCKS4_NO_IP6
33 "SOCKS4 is not compatible with IPv6",
34 // RS_E_PROXY_UNEXPECTED_RESPONSE
35 "the proxy sent an unexpected response",
36 // RS_E_TARGETPROXY_CONNECT_FAILED
37 "could not connect to target proxy",
38 // RS_E_PROXY_AUTH_FAILED
39 "proxy authentication failed or authd not enabled",
40 //RS_E_HIT_READTIMEOUT = 14,
41 "timeout reached on read operation",
42 //RS_E_HIT_WRITETIMEOUT = 15,
43 "timeout reached on write operation",
44 //RS_E_HIT_CONNECTTIMEOUT = 16,
45 "timeout reached on connect operation",
46 //RS_E_PROXY_GENERAL_FAILURE = 17,
47 "proxy general failure",
48 //RS_E_TARGETPROXY_NET_UNREACHABLE = 18,
49 "proxy-target: net unreachable",
50 //RS_E_TARGETPROXY_HOST_UNREACHABLE = 19,
51 "proxy-target: host unreachable",
52 //RS_E_TARGETPROXY_CONN_REFUSED = 20,
53 "proxy-target: connection refused",
54 //RS_E_TARGETPROXY_TTL_EXPIRED = 21,
55 "proxy-target: TTL expired",
56 //RS_E_PROXY_COMMAND_NOT_SUPPORTED = 22,
57 "proxy: command not supported",
58 //RS_E_PROXY_ADDRESSTYPE_NOT_SUPPORTED = 23,
59 "proxy: addresstype not supported",
62 #endif