diff options
author | Nathan S. Evans <evans@in.tum.de> | 2010-09-14 08:18:41 +0000 |
---|---|---|
committer | Nathan S. Evans <evans@in.tum.de> | 2010-09-14 08:18:41 +0000 |
commit | a42bfc6e2b8770eaf9df1d6e15bede8fb7950ca4 (patch) | |
tree | 4dad61fce099f8891031a86e03abbb3e7073c00b /src | |
parent | 6d549a2b960c7a46ad4d9f9c42c5239b0167ad92 (diff) | |
download | gnunet-a42bfc6e2b8770eaf9df1d6e15bede8fb7950ca4.tar.gz gnunet-a42bfc6e2b8770eaf9df1d6e15bede8fb7950ca4.zip |
verbose debugging for NAT tests
Diffstat (limited to 'src')
-rw-r--r-- | src/transport/plugin_transport_tcp.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/transport/plugin_transport_tcp.c b/src/transport/plugin_transport_tcp.c index 7d104f371..ce6044f59 100644 --- a/src/transport/plugin_transport_tcp.c +++ b/src/transport/plugin_transport_tcp.c | |||
@@ -590,7 +590,7 @@ create_session (struct Plugin *plugin, | |||
590 | GNUNET_assert (client == NULL); | 590 | GNUNET_assert (client == NULL); |
591 | 591 | ||
592 | #if DEBUG_TCP | 592 | #if DEBUG_TCP |
593 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 593 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, |
594 | "Creating new session for peer `%4s'\n", | 594 | "Creating new session for peer `%4s'\n", |
595 | GNUNET_i2s (target)); | 595 | GNUNET_i2s (target)); |
596 | #endif | 596 | #endif |
@@ -1162,8 +1162,8 @@ tcp_plugin_send (void *cls, | |||
1162 | (GNUNET_NO == GNUNET_CONTAINER_multihashmap_contains(plugin->nat_wait_conns, &target->hashPubKey))) | 1162 | (GNUNET_NO == GNUNET_CONTAINER_multihashmap_contains(plugin->nat_wait_conns, &target->hashPubKey))) |
1163 | { | 1163 | { |
1164 | #if DEBUG_TCP_NAT | 1164 | #if DEBUG_TCP_NAT |
1165 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1165 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, |
1166 | _("Found valid IPv4 NAT address!\n")); | 1166 | _("Found valid IPv4 NAT address (creating session)!\n")); |
1167 | #endif | 1167 | #endif |
1168 | session = create_session (plugin, | 1168 | session = create_session (plugin, |
1169 | target, | 1169 | target, |
@@ -1189,7 +1189,7 @@ tcp_plugin_send (void *cls, | |||
1189 | 1189 | ||
1190 | GNUNET_assert(GNUNET_CONTAINER_multihashmap_put(plugin->nat_wait_conns, &target->hashPubKey, session, GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY) == GNUNET_OK); | 1190 | GNUNET_assert(GNUNET_CONTAINER_multihashmap_put(plugin->nat_wait_conns, &target->hashPubKey, session, GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY) == GNUNET_OK); |
1191 | #if DEBUG_TCP_NAT | 1191 | #if DEBUG_TCP_NAT |
1192 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1192 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, |
1193 | "Created NAT WAIT connection to `%4s' at `%s'\n", | 1193 | "Created NAT WAIT connection to `%4s' at `%s'\n", |
1194 | GNUNET_i2s (target), | 1194 | GNUNET_i2s (target), |
1195 | GNUNET_a2s (sb, sbs)); | 1195 | GNUNET_a2s (sb, sbs)); |
@@ -1219,7 +1219,7 @@ tcp_plugin_send (void *cls, | |||
1219 | return -1; | 1219 | return -1; |
1220 | } | 1220 | } |
1221 | #if DEBUG_TCP | 1221 | #if DEBUG_TCP |
1222 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1222 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, |
1223 | "Asked to transmit to `%4s', creating fresh session using address `%s'.\n", | 1223 | "Asked to transmit to `%4s', creating fresh session using address `%s'.\n", |
1224 | GNUNET_i2s (target), | 1224 | GNUNET_i2s (target), |
1225 | GNUNET_a2s (sb, sbs)); | 1225 | GNUNET_a2s (sb, sbs)); |
@@ -1585,7 +1585,7 @@ handle_tcp_nat_probe (void *cls, | |||
1585 | GNUNET_SERVER_client_get_address (client, &vaddr, &alen)) | 1585 | GNUNET_SERVER_client_get_address (client, &vaddr, &alen)) |
1586 | { | 1586 | { |
1587 | #if DEBUG_TCP_NAT | 1587 | #if DEBUG_TCP_NAT |
1588 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1588 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, |
1589 | "Found address `%s' for incoming connection %p\n", | 1589 | "Found address `%s' for incoming connection %p\n", |
1590 | GNUNET_a2s (vaddr, alen), | 1590 | GNUNET_a2s (vaddr, alen), |
1591 | client); | 1591 | client); |
@@ -1675,6 +1675,12 @@ handle_tcp_welcome (void *cls, | |||
1675 | if (session == NULL) | 1675 | if (session == NULL) |
1676 | { | 1676 | { |
1677 | GNUNET_SERVER_client_keep (client); | 1677 | GNUNET_SERVER_client_keep (client); |
1678 | #if DEBUG_TCP_NAT | ||
1679 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | ||
1680 | "Received %s message from a `%4s/%p', creating session\n", | ||
1681 | "WELCOME", | ||
1682 | GNUNET_i2s (&wm->clientIdentity), client); | ||
1683 | #endif | ||
1678 | session = create_session (plugin, | 1684 | session = create_session (plugin, |
1679 | &wm->clientIdentity, client, GNUNET_NO); | 1685 | &wm->clientIdentity, client, GNUNET_NO); |
1680 | session->inbound = GNUNET_YES; | 1686 | session->inbound = GNUNET_YES; |