* code and the higher level backend.
*/
-#include <windows.h>
-
#include <assert.h>
#include <ctype.h>
#include <string.h>
* so we have to check each time.
*/
while (!ps->freeze && bufchain_size(&ps->pending_input_data) > 0) {
- char * data;
+ void *data;
int len;
bufchain_prefix(&ps->pending_input_data, &data, &len);
plug_receive(ps->plug, 0, data, len);
int port, int privport,
int oobinline, int nodelay, Plug plug)
{
- static struct socket_function_table socket_fn_table = {
+ static const struct socket_function_table socket_fn_table = {
sk_proxy_plug,
sk_proxy_close,
sk_proxy_write,
sk_proxy_socket_error
};
- static struct plug_function_table plug_fn_table = {
+ static const struct plug_function_table plug_fn_table = {
plug_proxy_closing,
plug_proxy_receive,
plug_proxy_sent,
int length;
char * command;
- if (sk_addrtype(p->remote_addr) != AF_INET) {
+ if (sk_addrtype(p->remote_addr) != ADDRTYPE_IPV4) {
plug_closing(p->plug, "Proxy error: SOCKS version 4 does"
" not support IPv6", PROXY_ERROR_GENERAL, 0);
return 1;
char command[22];
int len;
- if (sk_addrtype(p->remote_addr) == AF_INET) {
+ if (sk_addrtype(p->remote_addr) == ADDRTYPE_IPV6) {
len = 10;
command[3] = 1; /* IPv4 */
} else {