AN_SOCKS4_ENABLESOCKS4A

Section: Antinat Programmer's Manual (3)
Updated: 2005-05-22
Index Return to Main Contents
 

NAME

an_socks4_enablesocks4a - use server-side name resolution on SOCKS4 connections  

SYNOPSIS

#include <antinat.h>

int an_socks4_enablesocks4a(ANCONN s);  

DESCRIPTION

The an_socks4a_enablesocks4a(3) function is used to allow connections to SOCKS4 servers to leave hostname resolution to the server. Note that this is not supported in native SOCKS4, but by way of an extension, SOCKS4A. For this reason, this feature is disabled by default, unless this function is called. This function will only affect subsequent calls to the an_connect_tohostname(3) or an_bind_tohostname(3) functions; it will have no effect on the an_connect_tosockaddr(3) or an_bind_tosockaddr(3) functions. Enabling SOCKS4A where the server doesn't support it will result in connection failures.

s is a socket previously created with an_new_connection(3).  

RETURN VALUE

This call returns AN_ERROR_SUCCESS to indicate successful completion.  

ERRORS

AN_ERROR_INVALIDARG
The specified socket is not configured for a SOCKS4 proxy.
AN_ERROR_ORDER
The specified socket has already been connected to a remote server. This function must be called before any connection is attempted.
 

CONFORMING TO

This function appeared in Antinat 0.91.  

SEE ALSO

an_bind_tohostname(3), an_bind_tosockaddr(3), an_connect_tohostname(3), an_connect_tosockaddr(3), an_new_connection(3)  

AUTHOR

Malcolm Smith <malxau@users.sourceforge.net>


 

Index

NAME
SYNOPSIS
DESCRIPTION
RETURN VALUE
ERRORS
CONFORMING TO
SEE ALSO
AUTHOR

Time: 03:29:48 GMT, May 22, 2005