diff options
author | Christian Grothoff <christian@grothoff.org> | 2014-11-22 20:34:13 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2014-11-22 20:34:13 +0000 |
commit | 4b6729873ec13239a73b2858a51bd71ec32bed5e (patch) | |
tree | 0006e9344a81cf05eee1b196a17a36ef24ab34b9 /src | |
parent | f65f40d0d8162e31b32fdc2595b7e5088cd0a5b3 (diff) | |
download | gnunet-4b6729873ec13239a73b2858a51bd71ec32bed5e.tar.gz gnunet-4b6729873ec13239a73b2858a51bd71ec32bed5e.zip |
-rename constants
Diffstat (limited to 'src')
-rw-r--r-- | src/transport/plugin_transport_http_client.c | 8 | ||||
-rw-r--r-- | src/transport/plugin_transport_http_server.c | 6 | ||||
-rw-r--r-- | 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, | |||
1452 | } | 1452 | } |
1453 | 1453 | ||
1454 | 1454 | ||
1455 | #ifdef SO_TCPSTEALTH | 1455 | #ifdef TCP_STEALTH |
1456 | /** | 1456 | /** |
1457 | * Open TCP socket with TCP STEALTH enabled. | 1457 | * Open TCP socket with TCP STEALTH enabled. |
1458 | * | 1458 | * |
@@ -1483,7 +1483,7 @@ open_tcp_stealth_socket_cb (void *clientp, | |||
1483 | return (curl_socket_t) ret; | 1483 | return (curl_socket_t) ret; |
1484 | if ( (0 != setsockopt (ret, | 1484 | if ( (0 != setsockopt (ret, |
1485 | IPPROTO_TCP, | 1485 | IPPROTO_TCP, |
1486 | SO_TCPSTEALTH, | 1486 | TCP_STEALTH, |
1487 | &s->address->peer, | 1487 | &s->address->peer, |
1488 | sizeof (struct GNUNET_PeerIdentity))) ) | 1488 | sizeof (struct GNUNET_PeerIdentity))) ) |
1489 | { | 1489 | { |
@@ -1528,7 +1528,7 @@ client_connect_get (struct Session *s) | |||
1528 | s->get.s = s; | 1528 | s->get.s = s; |
1529 | if (0 != (options & HTTP_OPTIONS_TCP_STEALTH)) | 1529 | if (0 != (options & HTTP_OPTIONS_TCP_STEALTH)) |
1530 | { | 1530 | { |
1531 | #ifdef SO_TCPSTEALTH | 1531 | #ifdef TCP_STEALTH |
1532 | curl_easy_setopt (s->get.easyhandle, | 1532 | curl_easy_setopt (s->get.easyhandle, |
1533 | CURLOPT_OPENSOCKETFUNCTION, | 1533 | CURLOPT_OPENSOCKETFUNCTION, |
1534 | &open_tcp_stealth_socket_cb); | 1534 | &open_tcp_stealth_socket_cb); |
@@ -1722,7 +1722,7 @@ client_connect_put (struct Session *s) | |||
1722 | #endif | 1722 | #endif |
1723 | if (0 != (options & HTTP_OPTIONS_TCP_STEALTH)) | 1723 | if (0 != (options & HTTP_OPTIONS_TCP_STEALTH)) |
1724 | { | 1724 | { |
1725 | #ifdef SO_TCPSTEALTH | 1725 | #ifdef TCP_STEALTH |
1726 | curl_easy_setopt (s->put.easyhandle, | 1726 | curl_easy_setopt (s->put.easyhandle, |
1727 | CURLOPT_OPENSOCKETFUNCTION, | 1727 | CURLOPT_OPENSOCKETFUNCTION, |
1728 | &open_tcp_stealth_socket_cb); | 1728 | &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, | |||
2252 | MHD_OPTION_EXTERNAL_LOGGER, | 2252 | MHD_OPTION_EXTERNAL_LOGGER, |
2253 | &server_log, NULL, | 2253 | &server_log, NULL, |
2254 | MHD_OPTION_END); | 2254 | MHD_OPTION_END); |
2255 | #ifdef SO_TCPSTEALTH | 2255 | #ifdef TCP_STEALTH |
2256 | if ( (NULL != server) && | 2256 | if ( (NULL != server) && |
2257 | (0 != (plugin->options & HTTP_OPTIONS_TCP_STEALTH)) ) | 2257 | (0 != (plugin->options & HTTP_OPTIONS_TCP_STEALTH)) ) |
2258 | { | 2258 | { |
@@ -2263,7 +2263,7 @@ run_mhd_start_daemon (struct HTTP_Server_Plugin *plugin, | |||
2263 | NULL); | 2263 | NULL); |
2264 | if ( (0 != setsockopt ((int) di->listen_fd, | 2264 | if ( (0 != setsockopt ((int) di->listen_fd, |
2265 | IPPROTO_TCP, | 2265 | IPPROTO_TCP, |
2266 | SO_TCPSTEALTH, | 2266 | TCP_STEALTH, |
2267 | plugin->env->my_identity, | 2267 | plugin->env->my_identity, |
2268 | sizeof (struct GNUNET_PeerIdentity))) ) | 2268 | sizeof (struct GNUNET_PeerIdentity))) ) |
2269 | { | 2269 | { |
@@ -3429,7 +3429,7 @@ LIBGNUNET_PLUGIN_TRANSPORT_INIT (void *cls) | |||
3429 | plugin->name, | 3429 | plugin->name, |
3430 | "TCP_STEALTH")) | 3430 | "TCP_STEALTH")) |
3431 | { | 3431 | { |
3432 | #ifdef SO_TCPSTEALTH | 3432 | #ifdef TCP_STEALTH |
3433 | plugin->options |= HTTP_OPTIONS_TCP_STEALTH; | 3433 | plugin->options |= HTTP_OPTIONS_TCP_STEALTH; |
3434 | #else | 3434 | #else |
3435 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 3435 | 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, | |||
1522 | struct GNUNET_ATS_Information ats; | 1522 | struct GNUNET_ATS_Information ats; |
1523 | unsigned int is_natd = GNUNET_NO; | 1523 | unsigned int is_natd = GNUNET_NO; |
1524 | size_t addrlen; | 1524 | size_t addrlen; |
1525 | #ifdef SO_TCPSTEALTH | 1525 | #ifdef TCP_STEALTH |
1526 | struct GNUNET_NETWORK_Handle *s; | 1526 | struct GNUNET_NETWORK_Handle *s; |
1527 | #endif | 1527 | #endif |
1528 | 1528 | ||
@@ -1679,7 +1679,7 @@ tcp_plugin_get_session (void *cls, | |||
1679 | 1679 | ||
1680 | if (0 != (options & TCP_OPTIONS_TCP_STEALTH)) | 1680 | if (0 != (options & TCP_OPTIONS_TCP_STEALTH)) |
1681 | { | 1681 | { |
1682 | #ifdef SO_TCPSTEALTH | 1682 | #ifdef TCP_STEALTH |
1683 | s = GNUNET_NETWORK_socket_create (af, SOCK_STREAM, 0); | 1683 | s = GNUNET_NETWORK_socket_create (af, SOCK_STREAM, 0); |
1684 | if (NULL == s) | 1684 | if (NULL == s) |
1685 | { | 1685 | { |
@@ -1692,13 +1692,13 @@ tcp_plugin_get_session (void *cls, | |||
1692 | if ( (GNUNET_OK != | 1692 | if ( (GNUNET_OK != |
1693 | GNUNET_NETWORK_socket_setsockopt (s, | 1693 | GNUNET_NETWORK_socket_setsockopt (s, |
1694 | IPPROTO_TCP, | 1694 | IPPROTO_TCP, |
1695 | SO_TCPSTEALTH, | 1695 | TCP_STEALTH, |
1696 | &session->target, | 1696 | &session->target, |
1697 | sizeof (struct GNUNET_PeerIdentity))) || | 1697 | sizeof (struct GNUNET_PeerIdentity))) || |
1698 | (GNUNET_OK != | 1698 | (GNUNET_OK != |
1699 | GNUNET_NETWORK_socket_setsockopt (s, | 1699 | GNUNET_NETWORK_socket_setsockopt (s, |
1700 | IPPROTO_TCP, | 1700 | IPPROTO_TCP, |
1701 | SO_TCPSTEALTH_INTEGRITY, | 1701 | TCP_STEALTH_INTEGRITY, |
1702 | &plugin->my_welcome, | 1702 | &plugin->my_welcome, |
1703 | sizeof (struct WelcomeMessage))) ) | 1703 | sizeof (struct WelcomeMessage))) ) |
1704 | { | 1704 | { |
@@ -2712,7 +2712,7 @@ libgnunet_plugin_transport_tcp_init (void *cls) | |||
2712 | unsigned long long max_connections; | 2712 | unsigned long long max_connections; |
2713 | unsigned int i; | 2713 | unsigned int i; |
2714 | struct GNUNET_TIME_Relative idle_timeout; | 2714 | struct GNUNET_TIME_Relative idle_timeout; |
2715 | #ifdef SO_TCPSTEALTH | 2715 | #ifdef TCP_STEALTH |
2716 | struct GNUNET_NETWORK_Handle *const*lsocks; | 2716 | struct GNUNET_NETWORK_Handle *const*lsocks; |
2717 | #endif | 2717 | #endif |
2718 | int ret; | 2718 | int ret; |
@@ -2792,7 +2792,7 @@ libgnunet_plugin_transport_tcp_init (void *cls) | |||
2792 | "transport-tcp", | 2792 | "transport-tcp", |
2793 | "TCP_STEALTH")) ) | 2793 | "TCP_STEALTH")) ) |
2794 | { | 2794 | { |
2795 | #ifdef SO_TCPSTEALTH | 2795 | #ifdef TCP_STEALTH |
2796 | plugin->myoptions |= TCP_OPTIONS_TCP_STEALTH; | 2796 | plugin->myoptions |= TCP_OPTIONS_TCP_STEALTH; |
2797 | lsocks = GNUNET_SERVICE_get_listen_sockets (service); | 2797 | lsocks = GNUNET_SERVICE_get_listen_sockets (service); |
2798 | if (NULL != lsocks) | 2798 | if (NULL != lsocks) |
@@ -2804,13 +2804,13 @@ libgnunet_plugin_transport_tcp_init (void *cls) | |||
2804 | if ( (GNUNET_OK != | 2804 | if ( (GNUNET_OK != |
2805 | GNUNET_NETWORK_socket_setsockopt (lsocks[i], | 2805 | GNUNET_NETWORK_socket_setsockopt (lsocks[i], |
2806 | IPPROTO_TCP, | 2806 | IPPROTO_TCP, |
2807 | SO_TCPSTEALTH, | 2807 | TCP_STEALTH, |
2808 | env->my_identity, | 2808 | env->my_identity, |
2809 | sizeof (struct GNUNET_PeerIdentity))) || | 2809 | sizeof (struct GNUNET_PeerIdentity))) || |
2810 | (GNUNET_OK != | 2810 | (GNUNET_OK != |
2811 | GNUNET_NETWORK_socket_setsockopt (lsocks[i], | 2811 | GNUNET_NETWORK_socket_setsockopt (lsocks[i], |
2812 | IPPROTO_TCP, | 2812 | IPPROTO_TCP, |
2813 | SO_TCPSTEALTH_INTEGRITY_LEN, | 2813 | TCP_STEALTH_INTEGRITY_LEN, |
2814 | &len, | 2814 | &len, |
2815 | sizeof (len))) ) | 2815 | sizeof (len))) ) |
2816 | { | 2816 | { |