diff options
author | Christian Grothoff <christian@grothoff.org> | 2019-01-29 17:41:46 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2019-01-29 17:41:46 +0100 |
commit | a945c5532d3737d5ebe18395d3ec8a6fad344e01 (patch) | |
tree | 1d91dd0e013b7c8b5492d718e64449e5d44da9b1 /src/transport/gnunet-communicator-tcp.c | |
parent | d80214febe4e0e4cc64dddc74e990b3c5ca8a5df (diff) | |
download | gnunet-a945c5532d3737d5ebe18395d3ec8a6fad344e01.tar.gz gnunet-a945c5532d3737d5ebe18395d3ec8a6fad344e01.zip |
first draft of UDP communicator
Diffstat (limited to 'src/transport/gnunet-communicator-tcp.c')
-rw-r--r-- | src/transport/gnunet-communicator-tcp.c | 29 |
1 files changed, 9 insertions, 20 deletions
diff --git a/src/transport/gnunet-communicator-tcp.c b/src/transport/gnunet-communicator-tcp.c index 2980ad532..d0ee326b1 100644 --- a/src/transport/gnunet-communicator-tcp.c +++ b/src/transport/gnunet-communicator-tcp.c | |||
@@ -24,9 +24,13 @@ | |||
24 | * @author Christian Grothoff | 24 | * @author Christian Grothoff |
25 | * | 25 | * |
26 | * TODO: | 26 | * TODO: |
27 | * - support DNS names in BINDTO option | 27 | * - support DNS names in BINDTO option (#5528) |
28 | * - support NAT connection reversal method | 28 | * - support NAT connection reversal method (#5529) |
29 | * - support other TCP-specific NAT traversal methods | 29 | * - support other TCP-specific NAT traversal methods (#5531) |
30 | * - add replay protection support to the protocol by | ||
31 | * adding a nonce in the KX and requiring (!) a | ||
32 | * nounce ACK to be send within the first X bytes of | ||
33 | * data (#5530) | ||
30 | */ | 34 | */ |
31 | #include "platform.h" | 35 | #include "platform.h" |
32 | #include "gnunet_util_lib.h" | 36 | #include "gnunet_util_lib.h" |
@@ -1263,7 +1267,7 @@ tcp_address_to_sockaddr (const char *bindto, | |||
1263 | return in; | 1267 | return in; |
1264 | } | 1268 | } |
1265 | } | 1269 | } |
1266 | /* FIXME (feature!): maybe also try getnameinfo()? */ | 1270 | /* #5528 FIXME (feature!): maybe also try getnameinfo()? */ |
1267 | GNUNET_free (cp); | 1271 | GNUNET_free (cp); |
1268 | return NULL; | 1272 | return NULL; |
1269 | } | 1273 | } |
@@ -2348,7 +2352,7 @@ run (void *cls, | |||
2348 | (const struct sockaddr **) &in, | 2352 | (const struct sockaddr **) &in, |
2349 | &in_len, | 2353 | &in_len, |
2350 | &nat_address_cb, | 2354 | &nat_address_cb, |
2351 | NULL /* FIXME: support reversal! */, | 2355 | NULL /* FIXME: support reversal: #5529 */, |
2352 | NULL /* closure */); | 2356 | NULL /* closure */); |
2353 | } | 2357 | } |
2354 | 2358 | ||
@@ -2387,19 +2391,4 @@ main (int argc, | |||
2387 | } | 2391 | } |
2388 | 2392 | ||
2389 | 2393 | ||
2390 | #if defined(LINUX) && defined(__GLIBC__) | ||
2391 | #include <malloc.h> | ||
2392 | |||
2393 | /** | ||
2394 | * MINIMIZE heap size (way below 128k) since this process doesn't need much. | ||
2395 | */ | ||
2396 | void __attribute__ ((constructor)) | ||
2397 | GNUNET_ARM_memory_init () | ||
2398 | { | ||
2399 | mallopt (M_TRIM_THRESHOLD, 4 * 1024); | ||
2400 | mallopt (M_TOP_PAD, 1 * 1024); | ||
2401 | malloc_trim (0); | ||
2402 | } | ||
2403 | #endif | ||
2404 | |||
2405 | /* end of gnunet-communicator-tcp.c */ | 2394 | /* end of gnunet-communicator-tcp.c */ |