aboutsummaryrefslogtreecommitdiff
path: root/src/util/socks.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/socks.c')
-rw-r--r--src/util/socks.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/util/socks.c b/src/util/socks.c
index 7ab297272..5c9f8a5f8 100644
--- a/src/util/socks.c
+++ b/src/util/socks.c
@@ -45,7 +45,7 @@
45#define SOCKS5_AUTH_MAF 0x08 /* Multi-Authentication Framework */ 45#define SOCKS5_AUTH_MAF 0x08 /* Multi-Authentication Framework */
46 46
47 47
48/* SOCKS5 connection responces */ 48/* SOCKS5 connection responses */
49#define SOCKS5_REP_SUCCEEDED 0x00 /* succeeded */ 49#define SOCKS5_REP_SUCCEEDED 0x00 /* succeeded */
50#define SOCKS5_REP_FAIL 0x01 /* general SOCKS serer failure */ 50#define SOCKS5_REP_FAIL 0x01 /* general SOCKS serer failure */
51#define SOCKS5_REP_NALLOWED 0x02 /* connection not allowed by ruleset */ 51#define SOCKS5_REP_NALLOWED 0x02 /* connection not allowed by ruleset */
@@ -55,7 +55,7 @@
55#define SOCKS5_REP_EXPIRED 0x06 /* TTL expired */ 55#define SOCKS5_REP_EXPIRED 0x06 /* TTL expired */
56#define SOCKS5_REP_CNOTSUP 0x07 /* Command not supported */ 56#define SOCKS5_REP_CNOTSUP 0x07 /* Command not supported */
57#define SOCKS5_REP_ANOTSUP 0x08 /* Address not supported */ 57#define SOCKS5_REP_ANOTSUP 0x08 /* Address not supported */
58#define SOCKS5_REP_INVADDR 0x09 /* Inalid address */ 58#define SOCKS5_REP_INVADDR 0x09 /* Invalid address */
59 59
60const char * 60const char *
61SOCKS5_REP_names (int rep) 61SOCKS5_REP_names (int rep)
@@ -155,12 +155,12 @@ struct GNUNET_SOCKS_Handshake
155 int step; 155 int step;
156 156
157 /** 157 /**
158 * Precomputed SOCKS5 handshake ouput buffer 158 * Precomputed SOCKS5 handshake output buffer
159 */ 159 */
160 unsigned char outbuf[1024]; 160 unsigned char outbuf[1024];
161 161
162 /** 162 /**
163 * Pointers delineating protoocol steps in the outbut buffer 163 * Pointers delineating protoocol steps in the output buffer
164 */ 164 */
165 unsigned char *(outstep[4]); 165 unsigned char *(outstep[4]);
166 166
@@ -177,7 +177,7 @@ struct GNUNET_SOCKS_Handshake
177}; 177};
178 178
179 179
180/* Regitering prototypes */ 180/* Registering prototypes */
181 181
182void 182void
183register_reciever (struct GNUNET_SOCKS_Handshake *ih, int want); 183register_reciever (struct GNUNET_SOCKS_Handshake *ih, int want);
@@ -255,7 +255,7 @@ SOCKS5_handshake_step (struct GNUNET_SOCKS_Handshake *ih)
255 b += 2; 255 b += 2;
256 break; 256 break;
257 257
258 case SOCKS5_step_auth: /* SOCKS5 server's responce to authentication */ 258 case SOCKS5_step_auth: /* SOCKS5 server's response to authentication */
259 if (b[1] != 0) 259 if (b[1] != 0)
260 { 260 {
261 LOG (GNUNET_ERROR_TYPE_ERROR, "SOCKS5 authentication failed\n"); 261 LOG (GNUNET_ERROR_TYPE_ERROR, "SOCKS5 authentication failed\n");
@@ -265,7 +265,7 @@ SOCKS5_handshake_step (struct GNUNET_SOCKS_Handshake *ih)
265 b += 2; 265 b += 2;
266 break; 266 break;
267 267
268 case SOCKS5_step_cmd: /* SOCKS5 server's responce to command */ 268 case SOCKS5_step_cmd: /* SOCKS5 server's response to command */
269 if (b[0] != 5) 269 if (b[0] != 5)
270 { 270 {
271 LOG (GNUNET_ERROR_TYPE_ERROR, "SOCKS5 protocol error\n"); 271 LOG (GNUNET_ERROR_TYPE_ERROR, "SOCKS5 protocol error\n");
@@ -326,7 +326,7 @@ SOCKS5_handshake_step (struct GNUNET_SOCKS_Handshake *ih)
326 * @param handler_cls closure for @a handler 326 * @param handler_cls closure for @a handler
327 */ 327 */
328void 328void
329reciever (void *cls, 329receiver (void *cls,
330 const void *buf, 330 const void *buf,
331 size_t available, 331 size_t available,
332 const struct sockaddr *addr, 332 const struct sockaddr *addr,
@@ -355,7 +355,7 @@ register_reciever (struct GNUNET_SOCKS_Handshake *ih, int want)
355 GNUNET_CONNECTION_receive (ih->socks5_connection, 355 GNUNET_CONNECTION_receive (ih->socks5_connection,
356 want, 356 want,
357 GNUNET_TIME_relative_get_minute_ (), 357 GNUNET_TIME_relative_get_minute_ (),
358 &reciever, 358 &receiver,
359 ih); 359 ih);
360} 360}
361 361
@@ -475,7 +475,7 @@ GNUNET_SOCKS_init_handshake (const char *user, const char *pass)
475 *(b++) = SOCKS5_AUTH_USERPASS; 475 *(b++) = SOCKS5_AUTH_USERPASS;
476 (*n)++; 476 (*n)++;
477 } 477 }
478 /* There is no apperent reason to support authentication methods beyond 478 /* There is no apparent reason to support authentication methods beyond
479 * username and password since afaik Tor does not support them. */ 479 * username and password since afaik Tor does not support them. */
480 480
481 /* We authenticate with an empty username and password if the server demands 481 /* We authenticate with an empty username and password if the server demands