diff options
author | Bruno Cabral <bcabral@uw.edu> | 2015-08-22 06:24:03 +0000 |
---|---|---|
committer | Bruno Cabral <bcabral@uw.edu> | 2015-08-22 06:24:03 +0000 |
commit | 5475027f60525bcf22d75fb7f7ee721703e01cfd (patch) | |
tree | 374daa52fd9da6a975b7ef37dbf276fa152c7103 /src/nat/nat_test.c | |
parent | dd1927b960c7cea13733e061a11142274652ba27 (diff) | |
download | gnunet-5475027f60525bcf22d75fb7f7ee721703e01cfd.tar.gz gnunet-5475027f60525bcf22d75fb7f7ee721703e01cfd.zip |
gnunet-nat, tool to suggest changes to configure based on NAT configuration
Diffstat (limited to 'src/nat/nat_test.c')
-rw-r--r-- | src/nat/nat_test.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/nat/nat_test.c b/src/nat/nat_test.c index 3ee80ecae..b998d46a0 100644 --- a/src/nat/nat_test.c +++ b/src/nat/nat_test.c | |||
@@ -287,6 +287,8 @@ do_accept (void *cls, | |||
287 | struct GNUNET_NETWORK_Handle *s; | 287 | struct GNUNET_NETWORK_Handle *s; |
288 | struct NatActivity *wl; | 288 | struct NatActivity *wl; |
289 | 289 | ||
290 | printf("Inbound"); | ||
291 | |||
290 | tst->ltask = NULL; | 292 | tst->ltask = NULL; |
291 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | 293 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) |
292 | return; | 294 | return; |
@@ -333,6 +335,8 @@ addr_cb (void *cls, | |||
333 | struct GNUNET_NAT_TestMessage msg; | 335 | struct GNUNET_NAT_TestMessage msg; |
334 | const struct sockaddr_in *sa; | 336 | const struct sockaddr_in *sa; |
335 | 337 | ||
338 | printf("Addr callback"); | ||
339 | |||
336 | if (GNUNET_YES != add_remove) | 340 | if (GNUNET_YES != add_remove) |
337 | return; | 341 | return; |
338 | if (addrlen != sizeof (struct sockaddr_in)) | 342 | if (addrlen != sizeof (struct sockaddr_in)) |
@@ -448,6 +452,7 @@ GNUNET_NAT_test_start (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
448 | } | 452 | } |
449 | else | 453 | else |
450 | { | 454 | { |
455 | printf("Vou criar o socket"); | ||
451 | nh->lsock = | 456 | nh->lsock = |
452 | GNUNET_NETWORK_socket_create (AF_INET, | 457 | GNUNET_NETWORK_socket_create (AF_INET, |
453 | (is_tcp == | 458 | (is_tcp == |
@@ -484,7 +489,7 @@ GNUNET_NAT_test_start (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
484 | GNUNET_SCHEDULER_add_read_net (GNUNET_TIME_UNIT_FOREVER_REL, | 489 | GNUNET_SCHEDULER_add_read_net (GNUNET_TIME_UNIT_FOREVER_REL, |
485 | nh->lsock, &do_udp_read, nh); | 490 | nh->lsock, &do_udp_read, nh); |
486 | } | 491 | } |
487 | LOG (GNUNET_ERROR_TYPE_DEBUG, | 492 | LOG (GNUNET_ERROR_TYPE_INFO, |
488 | "NAT test listens on port %u (%s)\n", | 493 | "NAT test listens on port %u (%s)\n", |
489 | bnd_port, | 494 | bnd_port, |
490 | (GNUNET_YES == is_tcp) ? "tcp" : "udp"); | 495 | (GNUNET_YES == is_tcp) ? "tcp" : "udp"); |
@@ -493,7 +498,7 @@ GNUNET_NAT_test_start (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
493 | &addr_cb, NULL, nh, NULL); | 498 | &addr_cb, NULL, nh, NULL); |
494 | if (NULL == nh->nat) | 499 | if (NULL == nh->nat) |
495 | { | 500 | { |
496 | LOG (GNUNET_ERROR_TYPE_ERROR, | 501 | LOG (GNUNET_ERROR_TYPE_INFO, |
497 | _("NAT test failed to start NAT library\n")); | 502 | _("NAT test failed to start NAT library\n")); |
498 | if (NULL != nh->ltask) | 503 | if (NULL != nh->ltask) |
499 | { | 504 | { |