static void
start_test (void *cls)
{
- enum GNUNET_CADET_ChannelOption flags;
unsigned long i;
test_task = NULL;
GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Start profiler\n");
- flags = GNUNET_CADET_OPTION_DEFAULT;
+
for (i = 0; i < peers_pinging; i++)
{
peers[i].dest = select_random_peer (&peers[i]);
peers[i].ch = GNUNET_CADET_channel_create (peers[i].cadet, NULL,
&peers[i].dest->id,
- GC_u2h (1), flags);
+ GC_u2h (1));
if (NULL == peers[i].ch)
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Channel %lu failed\n", i);
i, get_index (peer));
peers[i].warmup_ch =
GNUNET_CADET_channel_create (peers[i].cadet, NULL, &peer->id,
- GC_u2h (1), GNUNET_CADET_OPTION_DEFAULT);
+ GC_u2h (1));
if (NULL == peers[i].warmup_ch)
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Warmup %u failed\n", i);
*/
unsigned int skip_ack_series;
+ /**
+ * Is the tunnel bufferless (minimum latency)?
+ */
+ int nobuffer;
+
+ /**
+ * Is the tunnel reliable?
+ */
+ int reliable;
+
+ /**
+ * Is the tunnel out-of-order?
+ */
+ int out_of_order;
+
/**
* Is this channel a loopback channel, where the destination is us again?
*/
GCCH_2s (ch));
msgcc.header.size = htons (sizeof (msgcc));
msgcc.header.type = htons (GNUNET_MESSAGE_TYPE_CADET_CHANNEL_OPEN);
+ //TODO This will be removed in a major release, because this will be a protocol breaking change. We shift here to be compatible with GNUNET_CADET_OPTION_RELIABLE that was removed, and to already use the newly introduced options.
+ msgcc.opt = GNUNET_MQ_PREF_RELIABLE >> 10;
msgcc.h_port = ch->h_port;
msgcc.ctn = ch->ctn;
ch->state = CADET_CHANNEL_OPEN_SENT;
ch = GNUNET_new (struct CadetChannel);
ch->mid_recv.mid = htonl (1); /* The OPEN_ACK counts as message 0! */
+ ch->nobuffer = GNUNET_NO ;
+ ch->reliable = GNUNET_YES;
+ ch->out_of_order = GNUNET_NO ;
ch->max_pending_messages = (ch->nobuffer) ? 1 : 4; /* FIXME: 4!? Do not hardcode! */
ch->owner = ccco;
ch->port = *port;
ch->t = t;
ch->ctn = ctn;
ch->retry_time = CADET_INITIAL_RETRANSMIT_TIME;
+ ch->nobuffer = GNUNET_NO;
+ ch->reliable = GNUNET_YES;
+ ch->out_of_order = GNUNET_NO;
ch->max_pending_messages = (ch->nobuffer) ? 1 : 4; /* FIXME: 4!? Do not hardcode! */
GNUNET_STATISTICS_update (stats,
"# channels",
env = GNUNET_MQ_msg_extra (create_msg,
(2 + cc->off) * sizeof (struct GNUNET_PeerIdentity),
GNUNET_MESSAGE_TYPE_CADET_CONNECTION_CREATE);
+ //TODO This will be removed in a major release, because this will be a protocol breaking change. We shift here to be compatible with GNUNET_CADET_OPTION_RELIABLE that was removed, and to already use the newly introduced options.
+ create_msg->options = GNUNET_MQ_PREF_RELIABLE >> 10;
create_msg->cid = cc->cid;
pids = (struct GNUNET_PeerIdentity *) &create_msg[1];
pids[0] = my_full_id;
};
long l = (long) cls;
struct CadetTestChannelWrapper *ch;
- enum GNUNET_CADET_ChannelOption flags;
reconnect_task = NULL;
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
GNUNET_CADET_channel_destroy (outgoing_ch);
outgoing_ch = NULL;
}
- flags = GNUNET_CADET_OPTION_DEFAULT;
ch = GNUNET_new (struct CadetTestChannelWrapper);
outgoing_ch = GNUNET_CADET_channel_create (h1,
ch,
p_id[1],
&port,
- flags,
NULL,
&disconnect_handler,
handlers);
GNUNET_MQ_handler_end ()
};
struct CadetTestChannelWrapper *ch;
- enum GNUNET_CADET_ChannelOption flags;
test_task = NULL;
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "start_test: %s\n", test_name);
disconnect_task = NULL;
}
- flags = GNUNET_CADET_OPTION_DEFAULT;
if (SPEED_REL == test)
{
test = SPEED;
- flags |= GNUNET_CADET_OPTION_RELIABLE;
}
ch = GNUNET_new (struct CadetTestChannelWrapper);
ch,
p_id[1],
&port,
- flags,
NULL,
&disconnect_handler,
handlers);
NULL, /* channel cls */
&id, /* destination */
GC_u2h (TEST_MESSAGE_TYPE), /* port */
- GNUNET_CADET_OPTION_DEFAULT, /* opt */
NULL, /* window change */
&disconnected, /* disconnect handler */
handlers /* traffic handlers */