|
|
@ -457,7 +457,7 @@ g_tcp_socket(void)
|
|
|
|
unsigned int option_len;
|
|
|
|
unsigned int option_len;
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
#if 0 && !defined(NO_ARPA_INET_H_IP6)
|
|
|
|
#if defined(XRDP_ENABLE_IPV6) && !defined(NO_ARPA_INET_H_IP6)
|
|
|
|
rv = (int)socket(AF_INET6, SOCK_STREAM, 0);
|
|
|
|
rv = (int)socket(AF_INET6, SOCK_STREAM, 0);
|
|
|
|
#else
|
|
|
|
#else
|
|
|
|
rv = (int)socket(AF_INET, SOCK_STREAM, 0);
|
|
|
|
rv = (int)socket(AF_INET, SOCK_STREAM, 0);
|
|
|
@ -466,7 +466,7 @@ g_tcp_socket(void)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return -1;
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#if 0 && !defined(NO_ARPA_INET_H_IP6)
|
|
|
|
#if defined(XRDP_ENABLE_IPV6) && !defined(NO_ARPA_INET_H_IP6)
|
|
|
|
option_len = sizeof(option_value);
|
|
|
|
option_len = sizeof(option_value);
|
|
|
|
if (getsockopt(rv, IPPROTO_IPV6, IPV6_V6ONLY, (char*)&option_value,
|
|
|
|
if (getsockopt(rv, IPPROTO_IPV6, IPV6_V6ONLY, (char*)&option_value,
|
|
|
|
&option_len) == 0)
|
|
|
|
&option_len) == 0)
|
|
|
@ -683,7 +683,7 @@ g_tcp_close(int sck)
|
|
|
|
|
|
|
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
/*****************************************************************************/
|
|
|
|
/* returns error, zero is good */
|
|
|
|
/* returns error, zero is good */
|
|
|
|
#if 0
|
|
|
|
#if defined(XRDP_ENABLE_IPV6) && !defined(NO_ARPA_INET_H_IP6)
|
|
|
|
int APP_CC
|
|
|
|
int APP_CC
|
|
|
|
g_tcp_connect(int sck, const char *address, const char *port)
|
|
|
|
g_tcp_connect(int sck, const char *address, const char *port)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -703,7 +703,6 @@ g_tcp_connect(int sck, const char *address, const char *port)
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
p.ai_socktype = SOCK_STREAM;
|
|
|
|
p.ai_socktype = SOCK_STREAM;
|
|
|
|
p.ai_protocol = IPPROTO_TCP;
|
|
|
|
p.ai_protocol = IPPROTO_TCP;
|
|
|
|
#if !defined(NO_ARPA_INET_H_IP6)
|
|
|
|
|
|
|
|
p.ai_flags = AI_ADDRCONFIG | AI_V4MAPPED;
|
|
|
|
p.ai_flags = AI_ADDRCONFIG | AI_V4MAPPED;
|
|
|
|
p.ai_family = AF_INET6;
|
|
|
|
p.ai_family = AF_INET6;
|
|
|
|
if (g_strcmp(address, "127.0.0.1") == 0)
|
|
|
|
if (g_strcmp(address, "127.0.0.1") == 0)
|
|
|
@ -714,11 +713,6 @@ g_tcp_connect(int sck, const char *address, const char *port)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
res = getaddrinfo(address, port, &p, &h);
|
|
|
|
res = getaddrinfo(address, port, &p, &h);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#else
|
|
|
|
|
|
|
|
p.ai_flags = AI_ADDRCONFIG;
|
|
|
|
|
|
|
|
p.ai_family = AF_INET;
|
|
|
|
|
|
|
|
res = getaddrinfo(address, port, &p, &h);
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
if (res > -1)
|
|
|
|
if (res > -1)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (h != NULL)
|
|
|
|
if (h != NULL)
|
|
|
@ -808,7 +802,7 @@ g_tcp_set_non_blocking(int sck)
|
|
|
|
return 0;
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#if 0
|
|
|
|
#if defined(XRDP_ENABLE_IPV6)
|
|
|
|
/*****************************************************************************/
|
|
|
|
/*****************************************************************************/
|
|
|
|
/* return boolean */
|
|
|
|
/* return boolean */
|
|
|
|
static int APP_CC
|
|
|
|
static int APP_CC
|
|
|
@ -876,7 +870,7 @@ address_match(const char *address, struct addrinfo *j)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
#if 0
|
|
|
|
#if defined(XRDP_ENABLE_IPV6)
|
|
|
|
/*****************************************************************************/
|
|
|
|
/*****************************************************************************/
|
|
|
|
/* returns error, zero is good */
|
|
|
|
/* returns error, zero is good */
|
|
|
|
static int APP_CC
|
|
|
|
static int APP_CC
|
|
|
@ -950,7 +944,7 @@ g_tcp_local_bind(int sck, const char *port)
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#if 0
|
|
|
|
#if defined(XRDP_ENABLE_IPV6)
|
|
|
|
/*****************************************************************************/
|
|
|
|
/*****************************************************************************/
|
|
|
|
/* returns error, zero is good */
|
|
|
|
/* returns error, zero is good */
|
|
|
|
int APP_CC
|
|
|
|
int APP_CC
|
|
|
|