/* *Socks client 'method request' */ struct socksv5cli_meth_req { uint8_t version; /* socks version X'05' */ uint8_t n_methods; /* number of methods specified in method[..] */ uint8_t method[256]; /* client requesting method[n_methods] */ }; /* *Server selected 'method selection response' * from what client requested in his socksv5cli_req.method[...] */ struct socksv5serv_meth_sel_res { uint8_t version; /* socks version X'05' */ uint8_t meth_sel; /* method selected */ }; /* The values currently defined for METHOD are: o X'00' NO AUTHENTICATION REQUIRED o X'01' GSSAPI o X'02' USERNAME/PASSWORD o X'03' to X'7F' IANA ASSIGNED o X'80' to X'FE' RESERVED FOR PRIVATE METHODS o X'FF' NO ACCEPTABLE METHODS The client and server then enter a method-specific sub-negotiation. */ #define NOAUTH 0x00 /* no authen. required */ #define GSSAPI 0x01 /* GSSAPI */ #define USRPAS 0x02 /* user password */ #define NONEAC 0xFF /* no acceptable */