From 4b6729873ec13239a73b2858a51bd71ec32bed5e Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 22 Nov 2014 20:34:13 +0000 Subject: -rename constants --- src/transport/plugin_transport_http_client.c | 8 ++++---- src/transport/plugin_transport_http_server.c | 6 +++--- src/transport/plugin_transport_tcp.c | 16 ++++++++-------- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/transport/plugin_transport_http_client.c b/src/transport/plugin_transport_http_client.c index d6f8afdfd..4cafaf2c0 100644 --- a/src/transport/plugin_transport_http_client.c +++ b/src/transport/plugin_transport_http_client.c @@ -1452,7 +1452,7 @@ client_run (void *cls, } -#ifdef SO_TCPSTEALTH +#ifdef TCP_STEALTH /** * Open TCP socket with TCP STEALTH enabled. * @@ -1483,7 +1483,7 @@ open_tcp_stealth_socket_cb (void *clientp, return (curl_socket_t) ret; if ( (0 != setsockopt (ret, IPPROTO_TCP, - SO_TCPSTEALTH, + TCP_STEALTH, &s->address->peer, sizeof (struct GNUNET_PeerIdentity))) ) { @@ -1528,7 +1528,7 @@ client_connect_get (struct Session *s) s->get.s = s; if (0 != (options & HTTP_OPTIONS_TCP_STEALTH)) { -#ifdef SO_TCPSTEALTH +#ifdef TCP_STEALTH curl_easy_setopt (s->get.easyhandle, CURLOPT_OPENSOCKETFUNCTION, &open_tcp_stealth_socket_cb); @@ -1722,7 +1722,7 @@ client_connect_put (struct Session *s) #endif if (0 != (options & HTTP_OPTIONS_TCP_STEALTH)) { -#ifdef SO_TCPSTEALTH +#ifdef TCP_STEALTH curl_easy_setopt (s->put.easyhandle, CURLOPT_OPENSOCKETFUNCTION, &open_tcp_stealth_socket_cb); diff --git a/src/transport/plugin_transport_http_server.c b/src/transport/plugin_transport_http_server.c index 3e5a8f24f..00ee26d30 100644 --- a/src/transport/plugin_transport_http_server.c +++ b/src/transport/plugin_transport_http_server.c @@ -2252,7 +2252,7 @@ run_mhd_start_daemon (struct HTTP_Server_Plugin *plugin, MHD_OPTION_EXTERNAL_LOGGER, &server_log, NULL, MHD_OPTION_END); -#ifdef SO_TCPSTEALTH +#ifdef TCP_STEALTH if ( (NULL != server) && (0 != (plugin->options & HTTP_OPTIONS_TCP_STEALTH)) ) { @@ -2263,7 +2263,7 @@ run_mhd_start_daemon (struct HTTP_Server_Plugin *plugin, NULL); if ( (0 != setsockopt ((int) di->listen_fd, IPPROTO_TCP, - SO_TCPSTEALTH, + TCP_STEALTH, plugin->env->my_identity, sizeof (struct GNUNET_PeerIdentity))) ) { @@ -3429,7 +3429,7 @@ LIBGNUNET_PLUGIN_TRANSPORT_INIT (void *cls) plugin->name, "TCP_STEALTH")) { -#ifdef SO_TCPSTEALTH +#ifdef TCP_STEALTH plugin->options |= HTTP_OPTIONS_TCP_STEALTH; #else GNUNET_log (GNUNET_ERROR_TYPE_ERROR, diff --git a/src/transport/plugin_transport_tcp.c b/src/transport/plugin_transport_tcp.c index 7701b540f..e249b9f08 100644 --- a/src/transport/plugin_transport_tcp.c +++ b/src/transport/plugin_transport_tcp.c @@ -1522,7 +1522,7 @@ tcp_plugin_get_session (void *cls, struct GNUNET_ATS_Information ats; unsigned int is_natd = GNUNET_NO; size_t addrlen; -#ifdef SO_TCPSTEALTH +#ifdef TCP_STEALTH struct GNUNET_NETWORK_Handle *s; #endif @@ -1679,7 +1679,7 @@ tcp_plugin_get_session (void *cls, if (0 != (options & TCP_OPTIONS_TCP_STEALTH)) { -#ifdef SO_TCPSTEALTH +#ifdef TCP_STEALTH s = GNUNET_NETWORK_socket_create (af, SOCK_STREAM, 0); if (NULL == s) { @@ -1692,13 +1692,13 @@ tcp_plugin_get_session (void *cls, if ( (GNUNET_OK != GNUNET_NETWORK_socket_setsockopt (s, IPPROTO_TCP, - SO_TCPSTEALTH, + TCP_STEALTH, &session->target, sizeof (struct GNUNET_PeerIdentity))) || (GNUNET_OK != GNUNET_NETWORK_socket_setsockopt (s, IPPROTO_TCP, - SO_TCPSTEALTH_INTEGRITY, + TCP_STEALTH_INTEGRITY, &plugin->my_welcome, sizeof (struct WelcomeMessage))) ) { @@ -2712,7 +2712,7 @@ libgnunet_plugin_transport_tcp_init (void *cls) unsigned long long max_connections; unsigned int i; struct GNUNET_TIME_Relative idle_timeout; -#ifdef SO_TCPSTEALTH +#ifdef TCP_STEALTH struct GNUNET_NETWORK_Handle *const*lsocks; #endif int ret; @@ -2792,7 +2792,7 @@ libgnunet_plugin_transport_tcp_init (void *cls) "transport-tcp", "TCP_STEALTH")) ) { -#ifdef SO_TCPSTEALTH +#ifdef TCP_STEALTH plugin->myoptions |= TCP_OPTIONS_TCP_STEALTH; lsocks = GNUNET_SERVICE_get_listen_sockets (service); if (NULL != lsocks) @@ -2804,13 +2804,13 @@ libgnunet_plugin_transport_tcp_init (void *cls) if ( (GNUNET_OK != GNUNET_NETWORK_socket_setsockopt (lsocks[i], IPPROTO_TCP, - SO_TCPSTEALTH, + TCP_STEALTH, env->my_identity, sizeof (struct GNUNET_PeerIdentity))) || (GNUNET_OK != GNUNET_NETWORK_socket_setsockopt (lsocks[i], IPPROTO_TCP, - SO_TCPSTEALTH_INTEGRITY_LEN, + TCP_STEALTH_INTEGRITY_LEN, &len, sizeof (len))) ) { -- cgit v1.2.3