aboutsummaryrefslogtreecommitdiff
path: root/src/testbed/gnunet-daemon-testbed-underlay.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2016-07-29 21:32:09 +0000
committerChristian Grothoff <christian@grothoff.org>2016-07-29 21:32:09 +0000
commitc5bf6746a62e43d0c96fed6bc474f1e42f4c1540 (patch)
treeb625b1d7a7f18221a38fe3aca198a40d9ce5a082 /src/testbed/gnunet-daemon-testbed-underlay.c
parenta0d960700a3dca5bf07f0cc1dc13a1801c4a7c3b (diff)
downloadgnunet-c5bf6746a62e43d0c96fed6bc474f1e42f4c1540.tar.gz
gnunet-c5bf6746a62e43d0c96fed6bc474f1e42f4c1540.zip
-convert to new transport API
Diffstat (limited to 'src/testbed/gnunet-daemon-testbed-underlay.c')
-rw-r--r--src/testbed/gnunet-daemon-testbed-underlay.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/testbed/gnunet-daemon-testbed-underlay.c b/src/testbed/gnunet-daemon-testbed-underlay.c
index 93006d35e..0b6c44710 100644
--- a/src/testbed/gnunet-daemon-testbed-underlay.c
+++ b/src/testbed/gnunet-daemon-testbed-underlay.c
@@ -29,6 +29,7 @@
29#include "platform.h" 29#include "platform.h"
30#include "gnunet_util_lib.h" 30#include "gnunet_util_lib.h"
31#include "gnunet_transport_service.h" 31#include "gnunet_transport_service.h"
32#include "gnunet_transport_manipulation_service.h"
32#include "gnunet_ats_service.h" 33#include "gnunet_ats_service.h"
33#include "gnunet_testing_lib.h" 34#include "gnunet_testing_lib.h"
34#include <sqlite3.h> 35#include <sqlite3.h>
@@ -94,7 +95,7 @@ static void *hostkeys_data;
94/** 95/**
95 * Handle to the transport service. This is used for setting link metrics 96 * Handle to the transport service. This is used for setting link metrics
96 */ 97 */
97static struct GNUNET_TRANSPORT_Handle *transport; 98static struct GNUNET_TRANSPORT_ManipulationHandle *transport;
98 99
99/** 100/**
100 * The number of hostkeys in the hostkeys array 101 * The number of hostkeys in the hostkeys array
@@ -287,7 +288,7 @@ do_shutdown (void *cls)
287{ 288{
288 if (NULL != transport) 289 if (NULL != transport)
289 { 290 {
290 GNUNET_TRANSPORT_disconnect (transport); 291 GNUNET_TRANSPORT_manipulation_disconnect (transport);
291 transport = NULL; 292 transport = NULL;
292 } 293 }
293 cleanup_map (); 294 cleanup_map ();
@@ -398,7 +399,7 @@ run (void *cls, char *const *args, const char *cfgfile,
398 if (GNUNET_OK != load_keys (c)) 399 if (GNUNET_OK != load_keys (c))
399 goto close_db; 400 goto close_db;
400 401
401 transport = GNUNET_TRANSPORT_connect (c, NULL, NULL, NULL, NULL, NULL); 402 transport = GNUNET_TRANSPORT_manipulation_connect (c);
402 if (NULL == transport) 403 if (NULL == transport)
403 { 404 {
404 GNUNET_break (0); 405 GNUNET_break (0);
@@ -410,7 +411,7 @@ run (void *cls, char *const *args, const char *cfgfile,
410 nrows = db_read_whitelist (db, pid, &wl_head); 411 nrows = db_read_whitelist (db, pid, &wl_head);
411 if ((GNUNET_SYSERR == nrows) || (0 == nrows)) 412 if ((GNUNET_SYSERR == nrows) || (0 == nrows))
412 { 413 {
413 GNUNET_TRANSPORT_disconnect (transport); 414 GNUNET_TRANSPORT_manipulation_disconnect (transport);
414 goto close_db; 415 goto close_db;
415 } 416 }
416 map = GNUNET_CONTAINER_multipeermap_create (nrows, GNUNET_NO); 417 map = GNUNET_CONTAINER_multipeermap_create (nrows, GNUNET_NO);
@@ -426,11 +427,11 @@ run (void *cls, char *const *args, const char *cfgfile,
426 DEBUG ("Setting %u ms latency to peer `%s'\n", 427 DEBUG ("Setting %u ms latency to peer `%s'\n",
427 wl_entry->latency, 428 wl_entry->latency,
428 GNUNET_i2s (&identity)); 429 GNUNET_i2s (&identity));
429 GNUNET_TRANSPORT_set_traffic_metric (transport, 430 GNUNET_TRANSPORT_manipulation_set (transport,
430 &identity, 431 &identity,
431 &prop, 432 &prop,
432 delay, 433 delay,
433 delay); 434 delay);
434 GNUNET_free (wl_entry); 435 GNUNET_free (wl_entry);
435 } 436 }
436 bh = GNUNET_TRANSPORT_blacklist (c, &check_access, NULL); 437 bh = GNUNET_TRANSPORT_blacklist (c, &check_access, NULL);