2 This file is part of GNUnet.
3 (C) 2011 Christian Grothoff (and other contributing authors)
5 GNUnet is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published
7 by the Free Software Foundation; either version 3, or (at your
8 option) any later version.
10 GNUnet is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with GNUnet; see the file COPYING. If not, write to the
17 Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA.
22 * @file src/transport/gnunet-transport.c
23 * @brief Tool to help configure, measure and control the transport subsystem.
24 * @author Christian Grothoff
25 * @author Nathan Evans
27 * This utility can be used to test if a transport mechanism for
28 * GNUnet is properly configured.
32 #include "gnunet_util_lib.h"
33 #include "gnunet_resolver_service.h"
34 #include "gnunet_protocols.h"
35 #include "gnunet_transport_service.h"
36 #include "gnunet_nat_lib.h"
39 * How long do we wait for the NAT test to report success?
40 * Should match NAT_SERVER_TIMEOUT in 'nat_test.c'.
42 #define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 30)
43 #define RESOLUTION_TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 10)
44 #define OP_TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 5)
47 * Benchmarking block size in KB
53 * Which peer should we connect to?
58 * Handle to transport service.
60 static struct GNUNET_TRANSPORT_Handle *handle;
66 struct GNUNET_TRANSPORT_TryConnectHandle * tc_handle;
71 static int benchmark_send;
76 static int benchmark_receive;
81 static int benchmark_receive;
86 static int iterate_connections;
91 static int test_configuration;
96 static int monitor_connects;
101 static int monitor_connections;
106 static int try_connect;
114 * Global return value (0 success).
119 * Current number of connections in monitor mode
121 static int monitor_connect_counter;
124 * Number of bytes of traffic we received so far.
126 static unsigned long long traffic_received;
129 * Number of bytes of traffic we sent so far.
131 static unsigned long long traffic_sent;
134 * Starting time of transmitting/receiving data.
136 static struct GNUNET_TIME_Absolute start_time;
139 * Handle for current transmission request.
141 static struct GNUNET_TRANSPORT_TransmitHandle *th;
146 struct GNUNET_TRANSPORT_PeerIterateContext *pic;
149 * Identity of the peer we transmit to / connect to.
150 * (equivalent to 'cpid' string).
152 static struct GNUNET_PeerIdentity pid;
155 * Task scheduled for cleanup / termination of the process.
157 static GNUNET_SCHEDULER_TaskIdentifier end;
160 * Task for operation timeout
162 static GNUNET_SCHEDULER_TaskIdentifier op_timeout;
165 static struct GNUNET_CONTAINER_MultiHashMap *peers;
168 * Selected level of verbosity.
170 static int verbosity;
173 * Resolver process handle.
175 struct GNUNET_OS_Process *resolver;
178 * Number of tasks running that still need the resolver.
180 static unsigned int resolver_users;
183 * Number of address resolutions pending
185 static unsigned int address_resolutions;
188 * Address resolutions pending in progress
190 static unsigned int address_resolution_in_progress;
193 * Context for a plugin test.
199 * Handle to the active NAT test.
201 struct GNUNET_NAT_Test *tst;
204 * Task identifier for the timeout.
206 GNUNET_SCHEDULER_TaskIdentifier tsk;
209 * Name of plugin under test.
217 * Task run in monitor mode when the user presses CTRL-C to abort.
218 * Stops monitoring activity.
220 * @param cls the 'struct GNUNET_TRANSPORT_PeerIterateContext *'
221 * @param tc scheduler context
224 shutdown_task (void *cls,
225 const struct GNUNET_SCHEDULER_TaskContext *tc)
227 struct GNUNET_TIME_Relative duration;
228 end = GNUNET_SCHEDULER_NO_TASK;
229 if (GNUNET_SCHEDULER_NO_TASK != op_timeout)
231 GNUNET_SCHEDULER_cancel (op_timeout);
232 op_timeout = GNUNET_SCHEDULER_NO_TASK;
234 if (NULL != tc_handle)
236 GNUNET_TRANSPORT_try_connect_cancel (tc_handle);
241 GNUNET_TRANSPORT_peer_get_active_addresses_cancel (pic);
246 GNUNET_TRANSPORT_notify_transmit_ready_cancel(th);
251 GNUNET_TRANSPORT_disconnect(handle);
256 GNUNET_CONTAINER_multihashmap_destroy (peers);
261 duration = GNUNET_TIME_absolute_get_duration (start_time);
262 FPRINTF (stdout, _("Transmitted %llu bytes/s (%llu bytes in %s)\n"),
263 1000 * traffic_sent / (1 + duration.rel_value), traffic_sent,
264 GNUNET_STRINGS_relative_time_to_string (duration, GNUNET_YES));
266 if (benchmark_receive)
268 duration = GNUNET_TIME_absolute_get_duration (start_time);
269 FPRINTF (stdout, _("Received %llu bytes/s (%llu bytes in %s)\n"),
270 1000 * traffic_received / (1 + duration.rel_value),
272 GNUNET_STRINGS_relative_time_to_string (duration, GNUNET_YES));
279 operation_timeout (void *cls,
280 const struct GNUNET_SCHEDULER_TaskContext *tc)
282 op_timeout = GNUNET_SCHEDULER_NO_TASK;
283 if ((try_connect) || (benchmark_send) ||
286 FPRINTF (stdout, _("Failed to connect to `%s'\n"), GNUNET_h2s_full (&pid.hashPubKey));
287 if (GNUNET_SCHEDULER_NO_TASK != end)
288 GNUNET_SCHEDULER_cancel (end);
289 end = GNUNET_SCHEDULER_add_now (&shutdown_task, NULL);
293 if (iterate_connections)
295 FPRINTF (stdout, _("Failed to list connections, timeout occured\n"));
296 if (GNUNET_SCHEDULER_NO_TASK != end)
297 GNUNET_SCHEDULER_cancel (end);
298 end = GNUNET_SCHEDULER_add_now (&shutdown_task, NULL);
308 * Display the result of the test.
310 * @param tc test context
311 * @param result GNUNET_YES on success
314 display_test_result (struct TestContext *tc, int result)
316 if (GNUNET_YES != result)
318 FPRINTF (stderr, "Configuration for plugin `%s' did not work!\n", tc->name);
322 FPRINTF (stderr, "Configuration for plugin `%s' is working!\n", tc->name);
324 if (GNUNET_SCHEDULER_NO_TASK != tc->tsk)
326 GNUNET_SCHEDULER_cancel (tc->tsk);
327 tc->tsk = GNUNET_SCHEDULER_NO_TASK;
331 GNUNET_NAT_test_stop (tc->tst);
336 if ((0 == resolver_users) && (NULL != resolver))
338 GNUNET_break (0 == GNUNET_OS_process_kill (resolver, SIGTERM));
339 GNUNET_OS_process_destroy (resolver);
346 * Function called by NAT on success.
347 * Clean up and update GUI (with success).
349 * @param cls test context
350 * @param success currently always GNUNET_OK
353 result_callback (void *cls, int success)
355 struct TestContext *tc = cls;
357 display_test_result (tc, success);
362 * Function called if NAT failed to confirm success.
363 * Clean up and update GUI (with failure).
365 * @param cls test context
366 * @param tc scheduler callback
369 fail_timeout (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
371 struct TestContext *tstc = cls;
373 tstc->tsk = GNUNET_SCHEDULER_NO_TASK;
374 display_test_result (tstc, GNUNET_NO);
379 * Test our plugin's configuration (NAT traversal, etc.).
381 * @param cfg configuration to test
384 do_test_configuration (const struct GNUNET_CONFIGURATION_Handle *cfg)
388 unsigned long long bnd_port;
389 unsigned long long adv_port;
390 struct TestContext *tc;
393 GNUNET_CONFIGURATION_get_value_string (cfg, "transport", "plugins",
399 ("No transport plugins configured, peer will never communicate\n"));
403 for (tok = strtok (plugins, " "); tok != NULL; tok = strtok (NULL, " "))
405 char section[12 + strlen (tok)];
407 GNUNET_snprintf (section, sizeof (section), "transport-%s", tok);
409 GNUNET_CONFIGURATION_get_value_number (cfg, section, "PORT", &bnd_port))
412 _("No port configured for plugin `%s', cannot test it\n"), tok);
416 GNUNET_CONFIGURATION_get_value_number (cfg, section, "ADVERTISED_PORT",
419 if (NULL == resolver)
421 GNUNET_OS_start_process (GNUNET_YES, GNUNET_OS_INHERIT_STD_OUT_AND_ERR, NULL, NULL, "gnunet-service-resolver",
422 "gnunet-service-resolver", NULL);
424 GNUNET_RESOLVER_connect (cfg);
425 tc = GNUNET_malloc (sizeof (struct TestContext));
426 tc->name = GNUNET_strdup (tok);
428 GNUNET_NAT_test_start (cfg,
431 "udp")) ? GNUNET_NO : GNUNET_YES,
432 (uint16_t) bnd_port, (uint16_t) adv_port,
433 &result_callback, tc);
436 display_test_result (tc, GNUNET_SYSERR);
439 tc->tsk = GNUNET_SCHEDULER_add_delayed (TIMEOUT, &fail_timeout, tc);
441 GNUNET_free (plugins);
445 * Function called to notify a client about the socket
446 * begin ready to queue more data. "buf" will be
447 * NULL and "size" zero if the socket was closed for
448 * writing in the meantime.
451 * @param size number of bytes available in buf
452 * @param buf where the callee should write the message
453 * @return number of bytes written to buf
456 transmit_data (void *cls, size_t size, void *buf)
458 struct GNUNET_MessageHeader *m = buf;
460 if ((NULL == buf) && (0 == size))
466 GNUNET_assert (size >= sizeof (struct GNUNET_MessageHeader));
467 GNUNET_assert (size < GNUNET_SERVER_MAX_MESSAGE_SIZE);
468 m->size = ntohs (size);
469 m->type = ntohs (GNUNET_MESSAGE_TYPE_DUMMY);
470 memset (&m[1], 52, size - sizeof (struct GNUNET_MessageHeader));
471 traffic_sent += size;
472 th = GNUNET_TRANSPORT_notify_transmit_ready (handle, &pid, BLOCKSIZE * 1024, 0,
473 GNUNET_TIME_UNIT_FOREVER_REL,
474 &transmit_data, NULL);
476 FPRINTF (stdout, _("Transmitting %u bytes to %s\n"), (unsigned int) size,
483 * Function called to notify transport users that another
484 * peer connected to us.
487 * @param peer the peer that connected
488 * @param ats performance data
489 * @param ats_count number of entries in ats (excluding 0-termination)
492 notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer,
493 const struct GNUNET_ATS_Information *ats, uint32_t ats_count)
495 if (0 != memcmp (&pid, peer, sizeof (struct GNUNET_PeerIdentity)))
500 /* all done, terminate instantly */
501 FPRINTF (stdout, _("Successfully connected to `%s'\n"), GNUNET_h2s_full (&peer->hashPubKey));
504 if (GNUNET_SCHEDULER_NO_TASK != op_timeout)
506 GNUNET_SCHEDULER_cancel (op_timeout);
507 op_timeout = GNUNET_SCHEDULER_NO_TASK;
510 if (GNUNET_SCHEDULER_NO_TASK != end)
511 GNUNET_SCHEDULER_cancel (end);
512 end = GNUNET_SCHEDULER_add_now (&shutdown_task, NULL);
517 if (GNUNET_SCHEDULER_NO_TASK != op_timeout)
519 GNUNET_SCHEDULER_cancel (op_timeout);
520 op_timeout = GNUNET_SCHEDULER_NO_TASK;
523 FPRINTF (stdout, _("Successfully connected to `%s', starting to send benchmark data in %u Kb blocks\n"),
524 GNUNET_i2s (&pid), BLOCKSIZE);
525 start_time = GNUNET_TIME_absolute_get ();
527 th = GNUNET_TRANSPORT_notify_transmit_ready (handle, peer,
529 GNUNET_TIME_UNIT_FOREVER_REL,
530 &transmit_data, NULL);
539 * Function called to notify transport users that another
540 * peer disconnected from us.
543 * @param peer the peer that disconnected
546 notify_disconnect (void *cls, const struct GNUNET_PeerIdentity *peer)
548 if (0 != memcmp (&pid, peer, sizeof (struct GNUNET_PeerIdentity)))
553 GNUNET_TRANSPORT_notify_transmit_ready_cancel (th);
558 FPRINTF (stdout, _("Disconnected from peer `%s' while benchmarking\n"), GNUNET_i2s (&pid));
559 if (GNUNET_SCHEDULER_NO_TASK != end)
560 GNUNET_SCHEDULER_cancel (end);
566 * Function called to notify transport users that another
567 * peer connected to us.
570 * @param peer the peer that connected
571 * @param ats performance data
572 * @param ats_count number of entries in ats (excluding 0-termination)
575 monitor_notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer,
576 const struct GNUNET_ATS_Information *ats, uint32_t ats_count)
578 monitor_connect_counter ++;
579 struct GNUNET_TIME_Absolute now = GNUNET_TIME_absolute_get();
580 const char *now_str = GNUNET_STRINGS_absolute_time_to_string (now);
582 FPRINTF (stdout, _("%24s: %-17s %4s (%u connections in total)\n"),
586 monitor_connect_counter);
591 * Function called to notify transport users that another
592 * peer disconnected from us.
595 * @param peer the peer that disconnected
598 monitor_notify_disconnect (void *cls, const struct GNUNET_PeerIdentity *peer)
600 struct GNUNET_TIME_Absolute now = GNUNET_TIME_absolute_get();
601 const char *now_str = GNUNET_STRINGS_absolute_time_to_string (now);
603 GNUNET_assert (monitor_connect_counter > 0);
604 monitor_connect_counter --;
606 FPRINTF (stdout, _("%24s: %-17s %4s (%u connections in total)\n"),
608 _("Disconnected from"),
610 monitor_connect_counter);
616 * Function called by the transport for each received message.
619 * @param peer (claimed) identity of the other peer
620 * @param message the message
621 * @param ats performance data
622 * @param ats_count number of entries in ats
625 notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer,
626 const struct GNUNET_MessageHeader *message,
627 const struct GNUNET_ATS_Information *ats, uint32_t ats_count)
629 if (benchmark_receive)
631 if (GNUNET_MESSAGE_TYPE_DUMMY != ntohs (message->type))
634 FPRINTF (stdout, _("Received %u bytes from %s\n"),
635 (unsigned int) ntohs (message->size), GNUNET_i2s (peer));
637 if (traffic_received == 0)
638 start_time = GNUNET_TIME_absolute_get ();
639 traffic_received += ntohs (message->size);
644 struct ResolutionContext
646 struct GNUNET_HELLO_Address *addrcp;
653 process_string (void *cls, const char *address)
655 struct ResolutionContext *rc = cls;
656 struct GNUNET_HELLO_Address *addrcp = rc->addrcp;
660 FPRINTF (stdout, _("Peer `%s': %s %s\n"), GNUNET_i2s (&addrcp->peer), addrcp->transport_name, address);
661 rc->printed = GNUNET_YES;
666 GNUNET_assert (address_resolutions > 0);
667 address_resolutions --;
668 if (GNUNET_NO == rc->printed)
669 FPRINTF (stdout, _("Peer `%s': %s <unable to resolve address>\n"), GNUNET_i2s (&addrcp->peer), addrcp->transport_name);
670 GNUNET_free (rc->addrcp);
672 if ((0 == address_resolutions) && (iterate_connections))
674 if (GNUNET_SCHEDULER_NO_TASK != end)
676 GNUNET_SCHEDULER_cancel (end);
677 end = GNUNET_SCHEDULER_NO_TASK;
679 if (GNUNET_SCHEDULER_NO_TASK != op_timeout)
681 GNUNET_SCHEDULER_cancel (op_timeout);
682 op_timeout = GNUNET_SCHEDULER_NO_TASK;
685 end = GNUNET_SCHEDULER_add_now (&shutdown_task, NULL);
691 * Function to call with a binary address
694 * @param peer identity of the peer
695 * @param address binary address (NULL on disconnect)
698 process_address (void *cls, const struct GNUNET_PeerIdentity *peer,
699 const struct GNUNET_HELLO_Address *address)
701 const struct GNUNET_CONFIGURATION_Handle *cfg = cls;
702 struct ResolutionContext *rc;
707 address_resolution_in_progress = GNUNET_NO;
713 FPRINTF (stdout, _("Peer `%s' disconnected\n"), GNUNET_i2s (peer));
717 if (GNUNET_SCHEDULER_NO_TASK != op_timeout)
718 GNUNET_SCHEDULER_cancel (op_timeout);
719 op_timeout = GNUNET_SCHEDULER_add_delayed (OP_TIMEOUT,
720 &operation_timeout, NULL);
722 rc = GNUNET_malloc(sizeof (struct ResolutionContext));
723 rc->addrcp = GNUNET_HELLO_address_copy(address);
724 rc->printed = GNUNET_NO;
726 GNUNET_assert (NULL != rc);
727 address_resolutions ++;
728 /* Resolve address to string */
729 GNUNET_TRANSPORT_address_to_string (cfg, address, numeric,
730 RESOLUTION_TIMEOUT, &process_string,
734 void try_connect_cb (void *cls,
737 static int retries = 0;
738 if (GNUNET_OK == result)
745 tc_handle = GNUNET_TRANSPORT_try_connect (handle, &pid, try_connect_cb, NULL);
748 FPRINTF (stderr, "%s", _("Failed to send connect request to transport service\n"));
749 if (GNUNET_SCHEDULER_NO_TASK != end)
750 GNUNET_SCHEDULER_cancel (end);
752 end = GNUNET_SCHEDULER_add_now (&shutdown_task, NULL);
759 testservice_task (void *cls,
760 const struct GNUNET_SCHEDULER_TaskContext *tc)
762 struct GNUNET_CONFIGURATION_Handle *cfg = cls;
766 if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_TIMEOUT))
768 FPRINTF (stderr, _("Service `%s' is not running\n"), "transport");
772 if ((NULL != cpid) && (GNUNET_OK != GNUNET_CRYPTO_hash_from_string (cpid, &pid.hashPubKey)))
774 FPRINTF (stderr, _("Failed to parse peer identity `%s'\n"), cpid);
778 counter = benchmark_send + benchmark_receive + iterate_connections +
779 monitor_connections + monitor_connects + try_connect;
783 FPRINTF (stderr, _("Multiple operations given. Please choose only one operation: %s, %s, %s, %s, %s, %s\n"),
784 "connect", "benchmark send", "benchmark receive", "information", "monitor", "events");
789 FPRINTF (stderr, _("No operation given. Please choose one operation: %s, %s, %s, %s, %s, %s\n"),
790 "connect", "benchmark send", "benchmark receive", "information", "monitor", "events");
794 if (try_connect) /* -C: Connect to peer */
798 FPRINTF (stderr, _("Option `%s' makes no sense without option `%s'.\n"),
803 handle = GNUNET_TRANSPORT_connect (cfg, NULL, NULL,
809 FPRINTF (stderr, "%s", _("Failed to connect to transport service\n"));
813 tc_handle = GNUNET_TRANSPORT_try_connect (handle, &pid, try_connect_cb, NULL);
814 if (NULL == tc_handle)
816 FPRINTF (stderr, "%s", _("Failed to send request to transport service\n"));
820 op_timeout = GNUNET_SCHEDULER_add_delayed (OP_TIMEOUT,
821 &operation_timeout, NULL);
824 else if (benchmark_send) /* -s: Benchmark sending */
828 FPRINTF (stderr, _("Option `%s' makes no sense without option `%s'.\n"),
833 handle = GNUNET_TRANSPORT_connect (cfg, NULL, NULL,
839 FPRINTF (stderr, "%s", _("Failed to connect to transport service\n"));
843 tc_handle = GNUNET_TRANSPORT_try_connect (handle, &pid, try_connect_cb, NULL);
844 if (NULL == tc_handle)
846 FPRINTF (stderr, "%s", _("Failed to send request to transport service\n"));
850 start_time = GNUNET_TIME_absolute_get ();
851 op_timeout = GNUNET_SCHEDULER_add_delayed (OP_TIMEOUT,
852 &operation_timeout, NULL);
854 else if (benchmark_receive) /* -b: Benchmark receiving */
857 GNUNET_TRANSPORT_connect (cfg, NULL, NULL, ¬ify_receive,
861 FPRINTF (stderr, "%s", _("Failed to connect to transport service\n"));
866 FPRINTF (stdout, "%s", _("Starting to receive benchmark data\n"));
867 start_time = GNUNET_TIME_absolute_get ();
870 else if (iterate_connections) /* -i: List all active addresses once */
872 peers = GNUNET_CONTAINER_multihashmap_create (20, GNUNET_NO);
873 address_resolution_in_progress = GNUNET_YES;
874 pic = GNUNET_TRANSPORT_peer_get_active_addresses (cfg,
875 (NULL == cpid) ? NULL : &pid,
878 &process_address, (void *) cfg);
879 op_timeout = GNUNET_SCHEDULER_add_delayed (OP_TIMEOUT,
880 &operation_timeout, NULL);
882 else if (monitor_connections) /* -m: List all active addresses continously */
884 peers = GNUNET_CONTAINER_multihashmap_create (20, GNUNET_NO);
885 address_resolution_in_progress = GNUNET_YES;
886 pic = GNUNET_TRANSPORT_peer_get_active_addresses (cfg,
887 (NULL == cpid) ? NULL : &pid,
890 &process_address, (void *) cfg);
892 else if (monitor_connects) /* -e : Monitor (dis)connect events continously */
894 monitor_connect_counter = 0;
895 handle = GNUNET_TRANSPORT_connect (cfg, NULL, NULL, NULL,
896 &monitor_notify_connect,
897 &monitor_notify_disconnect);
900 FPRINTF (stderr, "%s", _("Failed to connect to transport service\n"));
912 end = GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL,
920 * Main function that will be run by the scheduler.
923 * @param args remaining command-line arguments
924 * @param cfgfile name of the configuration file used (for saving, can be NULL!)
925 * @param cfg configuration
928 run (void *cls, char *const *args, const char *cfgfile,
929 const struct GNUNET_CONFIGURATION_Handle *cfg)
931 if (test_configuration)
933 do_test_configuration (cfg);
937 GNUNET_CLIENT_service_test ("transport", cfg,
938 GNUNET_TIME_UNIT_SECONDS,
945 main (int argc, char *const *argv)
948 static const struct GNUNET_GETOPT_CommandLineOption options[] = {
949 {'b', "benchmark", NULL,
950 gettext_noop ("measure how fast we are receiving data from all peers (until CTRL-C)"),
951 0, &GNUNET_GETOPT_set_one, &benchmark_receive},
952 {'C', "connect", NULL,
953 gettext_noop ("connect to a peer"),
954 0, &GNUNET_GETOPT_set_one, &try_connect},
955 {'i', "information", NULL,
956 gettext_noop ("provide information about all current connections (once)"),
957 0, &GNUNET_GETOPT_set_one, &iterate_connections},
958 {'m', "monitor", NULL,
959 gettext_noop ("provide information about all current connections (continuously)"),
960 0, &GNUNET_GETOPT_set_one, &monitor_connections},
961 {'e', "events", NULL,
962 gettext_noop ("provide information about all connects and disconnect events (continuously)"),
963 0, &GNUNET_GETOPT_set_one, &monitor_connects},
964 {'n', "numeric", NULL,
965 gettext_noop ("do not resolve hostnames"),
966 0, &GNUNET_GETOPT_set_one, &numeric},
967 {'p', "peer", "PEER",
968 gettext_noop ("peer identity"),
969 1, &GNUNET_GETOPT_set_string, &cpid},
972 ("send data for benchmarking to the other peer (until CTRL-C)"),
973 0, &GNUNET_GETOPT_set_one, &benchmark_send},
975 gettext_noop ("test transport configuration (involves external server)"),
976 0, &GNUNET_GETOPT_set_one, &test_configuration},
977 GNUNET_GETOPT_OPTION_VERBOSE (&verbosity),
978 GNUNET_GETOPT_OPTION_END
981 if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv))
984 res = GNUNET_PROGRAM_run (argc, argv, "gnunet-transport",
986 ("Direct access to transport service."), options,
988 GNUNET_free ((void *) argv);
989 if (GNUNET_OK == res)
995 /* end of gnunet-transport.c */