From d7fa0579995790840199ec86cb4d518f9d372fcd Mon Sep 17 00:00:00 2001 From: t3sserakt Date: Thu, 7 Oct 2021 13:07:30 +0200 Subject: - add generic topology configuration by file - cmd simple send using file configuration from file - added cmd to check the logs for backchannel encapsulation - added cmd which notifies the master loop of local loop being prepared to finish - added logging to helper.c - moved code from connecting peers cmd into global functions - added parameters given to the connecting peers cmd - added assertion when notifying the transport service about a new queue, if the communicator has no intial capacity - added optional valgrind cmd to test script - added flag für queues with unlimited length - added check for queues with higher priority - added attribute queue_capacity to struct Queue - bug fixing worker task for kce generation and transport notification about available queue in udp communicator - change value for unlimited queue length from 0 to UINT16_MAX in tcp communicator and service - added loop to stop the test system for the globally known peers in stop testsystem cmd - refactored endless growing array to handle further messages from the local loops, and added logic to handle the local test prepare msg - added utility methods in testing.c - added forwarding of all tests prepared msg in gnunet-cmds-helper.c - added cmd to end loop without shutdown - added without shutdown cmd to simple send testcase - added backchannel check, without shutdown and prepared cmd to udp backchannel testcase. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/transport/gnunet-communicator-tcp.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'src/transport/gnunet-communicator-tcp.c') diff --git a/src/transport/gnunet-communicator-tcp.c b/src/transport/gnunet-communicator-tcp.c index d8bf7c1a8..025326de7 100644 --- a/src/transport/gnunet-communicator-tcp.c +++ b/src/transport/gnunet-communicator-tcp.c @@ -1119,6 +1119,10 @@ pass_plaintext_to_core (struct Queue *queue, const struct GNUNET_MessageHeader *hdr = plaintext; int ret; + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "pass message from %s to core\n", + GNUNET_i2s (&queue->target)); + if (ntohs (hdr->size) != plaintext_len) { /* NOTE: If we ever allow multiple CORE messages in one @@ -1132,6 +1136,8 @@ pass_plaintext_to_core (struct Queue *queue, ADDRESS_VALIDITY_PERIOD, &core_read_finished_cb, queue); + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "passed to core\n"); if (GNUNET_OK == ret) queue->backpressure++; GNUNET_break (GNUNET_NO != ret); /* backpressure not working!? */ @@ -1795,7 +1801,7 @@ try_handle_plaintext (struct Queue *queue) queue->qh = GNUNET_TRANSPORT_communicator_mq_add (ch, &queue->target, foreign_addr, - UINT32_MAX, /* no MTU */ + UINT16_MAX, /* no MTU */ GNUNET_TRANSPORT_QUEUE_LENGTH_UNLIMITED, 0, /* Priority */ queue->nt, @@ -2444,7 +2450,7 @@ boot_queue (struct Queue *queue) * Generate and transmit our ephemeral key and the signature for * the initial KX with the other peer. Must be called first, before * any other bytes are ever written to the output buffer. Note that - * our cipher must already be initialized when calling this function. + * our cipher must already be initialized when calling thi function. * Helper function for #start_initial_kx_out(). * * @param queue queue to do KX for @@ -2725,6 +2731,9 @@ proto_read_kx (void *cls) queue->listen_sock = pq->listen_sock; queue->sock = pq->sock; + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "created queue with target %s\n", + GNUNET_i2s (&queue->target)); GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "start kx proto\n"); @@ -2984,6 +2993,9 @@ mq_init (void *cls, const struct GNUNET_PeerIdentity *peer, const char *address) queue->sock = sock; queue->cs = GNUNET_TRANSPORT_CS_OUTBOUND; boot_queue (queue); + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "booted queue with target %s\n", + GNUNET_i2s (&queue->target)); // queue->mq_awaits_continue = GNUNET_YES; queue->read_task = GNUNET_SCHEDULER_add_read_net (GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT, @@ -3646,6 +3658,10 @@ main (int argc, char *const *argv) }; int ret; + GNUNET_log_from_nocheck (GNUNET_ERROR_TYPE_DEBUG, + "transport", + "Starting tcp communicator\n"); + if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv)) return 2; -- cgit v1.2.3