3#include <gnunet/platform.h>
4#include <gnunet/gnunet_util_lib.h>
5#include <gnunet/gnunet_testbed_service.h>
6#include <gnunet/gnunet_dht_service.h>
10static struct GNUNET_TESTBED_Operation *
dht_op;
29 GNUNET_TESTBED_operation_done (
dht_op);
39 struct GNUNET_TESTBED_Operation *
op,
72 struct GNUNET_TESTBED_RunHandle *
h,
74 struct GNUNET_TESTBED_Peer **
peers,
75 unsigned int links_succeeded,
76 unsigned int links_failed)
79 dht_op = GNUNET_TESTBED_service_connect
80 (NULL,
peers[0],
"dht",
88main (
int argc,
char **argv)
93 ret = GNUNET_TESTBED_test_run
94 (
"awesome-test",
"template.conf",
static struct GNUNET_ARM_Operation * op
Current operation.
static struct GNUNET_ARM_Handle * h
Connection with ARM.
static int ret
Final status code.
static struct GNUNET_CONFIGURATION_Handle * cfg
Our configuration.
struct GNUNET_CONTAINER_MultiPeerMap * peers
Map from PIDs to struct CadetPeer entries.
static unsigned int num_peers
Number of peers.
struct GNUNET_DHT_Handle * GNUNET_DHT_connect(const struct GNUNET_CONFIGURATION_Handle *cfg, unsigned int ht_len)
Initialize the connection with the DHT service.
void GNUNET_DHT_disconnect(struct GNUNET_DHT_Handle *handle)
Shutdown connection with the DHT service.
#define GNUNET_assert(cond)
Use this for fatal errors that cannot be handled.
void GNUNET_SCHEDULER_shutdown(void)
Request the shutdown of a scheduler.
struct GNUNET_SCHEDULER_Task * GNUNET_SCHEDULER_add_shutdown(GNUNET_SCHEDULER_TaskCallback task, void *task_cls)
Schedule a new task to be run on shutdown, that is when a CTRL-C signal is received,...
Connection to the DHT service.
int main(int argc, char **argv)
static void test_master(void *cls, struct GNUNET_TESTBED_RunHandle *h, unsigned int num_peers, struct GNUNET_TESTBED_Peer **peers, unsigned int links_succeeded, unsigned int links_failed)
static void shutdown_task(void *cls)
static struct GNUNET_DHT_Handle * dht_handle
static void dht_da(void *cls, void *op_result)
static void * dht_ca(void *cls, const struct GNUNET_CONFIGURATION_Handle *cfg)
static void service_connect_comp(void *cls, struct GNUNET_TESTBED_Operation *op, void *ca_result, const char *emsg)
static struct GNUNET_TESTBED_Operation * dht_op