-fix, mhd start
[oweals/gnunet.git] / src / gns / gns_proxy_proto.h
1
2 #define SOCKS_VERSION_5 0x05
3 #define SOCKS_AUTH_NONE 0
4
5 /* The socks phases */
6 enum
7 {
8   SOCKS5_INIT,
9   SOCKS5_REQUEST,
10   SOCKS5_DATA_TRANSFER
11 };
12
13 /* Client hello */
14 struct socks5_client_hello
15 {
16   uint8_t version;
17   uint8_t num_auth_methods;
18   char* auth_methods;
19 };
20
21 /* Client socks request */
22 struct socks5_client_request
23 {
24   uint8_t version;
25   uint8_t command;
26   uint8_t resvd;
27   uint8_t addr_type;
28   /* 
29    * followed by either an ip4/ipv6 address
30    * or a domain name with a length field in front
31    */
32 };
33
34 /* Server hello */
35 struct socks5_server_hello
36 {
37   uint8_t version;
38   uint8_t auth_method;
39 };
40
41 /* Server response to client requests */
42 struct socks5_server_response
43 {
44   uint8_t version;
45   uint8_t reply;
46   uint8_t reserved;
47   uint8_t addr_type;
48   uint8_t add_port[18];
49 };