-rename constants
authorChristian Grothoff <christian@grothoff.org>
Sat, 22 Nov 2014 20:34:13 +0000 (20:34 +0000)
committerChristian Grothoff <christian@grothoff.org>
Sat, 22 Nov 2014 20:34:13 +0000 (20:34 +0000)
src/transport/plugin_transport_http_client.c
src/transport/plugin_transport_http_server.c
src/transport/plugin_transport_tcp.c

index d6f8afdfd45c81d6f1030cea97cc21bbff9ca242..4cafaf2c04b061813dacb6425c5194b346cc55e5 100644 (file)
@@ -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);
index 3e5a8f24f48a0901c57994129b8bf803bd849dd9..00ee26d302b4eb397e3be594a11ba6c9d6aad2fd 100644 (file)
@@ -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,
index 7701b540fc02dbb6bcb79a0ba897e774263cd953..e249b9f083d33e778b48f3256352063ac82cce70 100644 (file)
@@ -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))) )
         {