diff network.h @ 604:37ab4725e4f9

In preparation for SOCKS 5 support, move some structs etc. into network.c from the header file and rename them to socks4 specific.
author Matti Hamalainen <ccr@tnsp.org>
date Tue, 20 May 2014 02:10:52 +0300
parents 4bae14092b78
children ad00f2bbb615
line wrap: on
line diff
--- a/network.h	Tue May 20 01:29:41 2014 +0300
+++ b/network.h	Tue May 20 02:10:52 2014 +0300
@@ -52,25 +52,18 @@
 
 enum
 {
-    SOCKS_CMD_CONNECT = 1,
-    SOCKS_CMD_BIND = 2
+    NN_PROXY_AUTH_NONE = 0,
+//    NN_PROXY_AUTH_GSSAPI = 1,     // Not supported
+    NN_PROXY_AUTH_USER = 2,
 };
 
-struct nn_socks_t
+enum
 {
-    uint8_t version;
-    uint8_t command;
-    in_port_t port;
-    in_addr_t addr;
-} __attribute__((__packed__));
+    NN_PROXY_CMD_CONNECT = 1,
+    NN_PROXY_CMD_BIND = 2,
+    NN_PROXY_CMD_ASSOC_UDP = 3,
+};
 
-struct nn_socks_res_t
-{
-    uint8_t nb;
-    uint8_t result;
-    in_port_t port;
-    in_addr_t addr;
-} __attribute__((__packed__));
 
 typedef struct _nn_conn_t
 {