Mercurial > hg > nnchat
comparison 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 |
comparison
equal
deleted
inserted
replaced
603:0a30bf8db004 | 604:37ab4725e4f9 |
---|---|
50 NN_PROXY_LAST | 50 NN_PROXY_LAST |
51 }; | 51 }; |
52 | 52 |
53 enum | 53 enum |
54 { | 54 { |
55 SOCKS_CMD_CONNECT = 1, | 55 NN_PROXY_AUTH_NONE = 0, |
56 SOCKS_CMD_BIND = 2 | 56 // NN_PROXY_AUTH_GSSAPI = 1, // Not supported |
57 NN_PROXY_AUTH_USER = 2, | |
57 }; | 58 }; |
58 | 59 |
59 struct nn_socks_t | 60 enum |
60 { | 61 { |
61 uint8_t version; | 62 NN_PROXY_CMD_CONNECT = 1, |
62 uint8_t command; | 63 NN_PROXY_CMD_BIND = 2, |
63 in_port_t port; | 64 NN_PROXY_CMD_ASSOC_UDP = 3, |
64 in_addr_t addr; | 65 }; |
65 } __attribute__((__packed__)); | |
66 | 66 |
67 struct nn_socks_res_t | |
68 { | |
69 uint8_t nb; | |
70 uint8_t result; | |
71 in_port_t port; | |
72 in_addr_t addr; | |
73 } __attribute__((__packed__)); | |
74 | 67 |
75 typedef struct _nn_conn_t | 68 typedef struct _nn_conn_t |
76 { | 69 { |
77 struct | 70 struct |
78 { | 71 { |