* x setup cadet on peer B listening on port "cadet_port"
* x create a channel from peer A to B
* x create method to find out KX initiator
- * - send a message over channel
- * - check if message was received
+ * x send a message over channel
+ * x check if message was received
* - breakup the connection without the receiver receiving a channel destroy message
* - assert tunnel is down
* - resume channel (second handshake for tunnel)
*
* Questions:
* - can we simulate hard breakups with TESTBED?
- * - yes, with GNUNET_TESTBED_underlay_configure_link
+ * - GNUNET_TESTBED_underlay_configure_link not implemented
+ * - GNUNET_TESTBED_underlaylinkmodel_set_link not usable
+ * - GNUNET_TESTBED_peer_stop evokes standard service disconnect
* - how can we test the sublayers of CADET, e.g. connection, tunnel, channel?
*
* Development
static int kx_initiator;
-void
-handle_message ()
+void
+handle_message (void *cls,
+ const struct GNUNET_MessageHeader *msg)
{
GNUNET_log (GNUNET_ERROR_TYPE_INFO, "%s\n", __func__);
}
GNUNET_log (GNUNET_ERROR_TYPE_INFO, "%s\n", __func__);
- envelope = GNUNET_MQ_msg (msg, GNUNET_MESSAGE_TYPE_DUMMY);
+ envelope = GNUNET_MQ_msg (msg,
+ GNUNET_MESSAGE_TYPE_DUMMY);
- GNUNET_MQ_send (GNUNET_CADET_get_mq (test_peers[0].channel), envelope);
+ GNUNET_MQ_send (GNUNET_CADET_get_mq (test_peers[0].channel),
+ envelope);
}
/**
GNUNET_log (GNUNET_ERROR_TYPE_INFO, "%s\n", __func__);
for (int i=0; i<REQUESTED_PEERS; i++)
+ {
GNUNET_TESTBED_operation_done (testbed_to_svc[i]);
+ GNUNET_TESTBED_operation_done (testbed_info_req[i]);
+ }
}
static void
{
struct GNUNET_CADET_Handle *cadet;
struct GNUNET_CADET_Channel *channel;
- struct GNUNET_MQ_MessageHandler msg_handlers[] = {
- GNUNET_MQ_hd_fixed_size (message,
- GNUNET_MESSAGE_TYPE_DUMMY,
- struct GNUNET_MessageHeader,
- NULL),
- GNUNET_MQ_handler_end ()
- };
GNUNET_log (GNUNET_ERROR_TYPE_INFO, "%s\n", __func__);
&hashed_portname,
NULL,
&disconnect_channel,
- msg_handlers);
+ NULL);
test_peers[0].channel = channel;
return cadet;
return (REQUESTED_PEERS == ++peerinfo_cnt) ? GNUNET_YES : GNUNET_NO;
}
-void
+static void
connect_to_service (void *cb_cls,
struct GNUNET_TESTBED_Operation *op,
const struct GNUNET_TESTBED_PeerInformation *pinfo,