aboutsummaryrefslogtreecommitdiff
path: root/src/cadet/gnunet-service-cadet_channel.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cadet/gnunet-service-cadet_channel.c')
-rw-r--r--src/cadet/gnunet-service-cadet_channel.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/cadet/gnunet-service-cadet_channel.c b/src/cadet/gnunet-service-cadet_channel.c
index 6e3f6ee5e..847a217c7 100644
--- a/src/cadet/gnunet-service-cadet_channel.c
+++ b/src/cadet/gnunet-service-cadet_channel.c
@@ -355,6 +355,21 @@ struct CadetChannel
355 unsigned int skip_ack_series; 355 unsigned int skip_ack_series;
356 356
357 /** 357 /**
358 * Is the tunnel bufferless (minimum latency)?
359 */
360 int nobuffer;
361
362 /**
363 * Is the tunnel reliable?
364 */
365 int reliable;
366
367 /**
368 * Is the tunnel out-of-order?
369 */
370 int out_of_order;
371
372 /**
358 * Is this channel a loopback channel, where the destination is us again? 373 * Is this channel a loopback channel, where the destination is us again?
359 */ 374 */
360 int is_loopback; 375 int is_loopback;
@@ -583,6 +598,8 @@ send_channel_open (void *cls)
583 GCCH_2s (ch)); 598 GCCH_2s (ch));
584 msgcc.header.size = htons (sizeof (msgcc)); 599 msgcc.header.size = htons (sizeof (msgcc));
585 msgcc.header.type = htons (GNUNET_MESSAGE_TYPE_CADET_CHANNEL_OPEN); 600 msgcc.header.type = htons (GNUNET_MESSAGE_TYPE_CADET_CHANNEL_OPEN);
601 //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.
602 msgcc.opt = GNUNET_MQ_PREF_RELIABLE >> 10;
586 msgcc.h_port = ch->h_port; 603 msgcc.h_port = ch->h_port;
587 msgcc.ctn = ch->ctn; 604 msgcc.ctn = ch->ctn;
588 ch->state = CADET_CHANNEL_OPEN_SENT; 605 ch->state = CADET_CHANNEL_OPEN_SENT;
@@ -646,6 +663,9 @@ GCCH_channel_local_new (struct CadetClient *owner,
646 663
647 ch = GNUNET_new (struct CadetChannel); 664 ch = GNUNET_new (struct CadetChannel);
648 ch->mid_recv.mid = htonl (1); /* The OPEN_ACK counts as message 0! */ 665 ch->mid_recv.mid = htonl (1); /* The OPEN_ACK counts as message 0! */
666 ch->nobuffer = GNUNET_NO ;
667 ch->reliable = GNUNET_YES;
668 ch->out_of_order = GNUNET_NO ;
649 ch->max_pending_messages = (ch->nobuffer) ? 1 : 4; /* FIXME: 4!? Do not hardcode! */ 669 ch->max_pending_messages = (ch->nobuffer) ? 1 : 4; /* FIXME: 4!? Do not hardcode! */
650 ch->owner = ccco; 670 ch->owner = ccco;
651 ch->port = *port; 671 ch->port = *port;
@@ -744,6 +764,9 @@ GCCH_channel_incoming_new (struct CadetTunnel *t,
744 ch->t = t; 764 ch->t = t;
745 ch->ctn = ctn; 765 ch->ctn = ctn;
746 ch->retry_time = CADET_INITIAL_RETRANSMIT_TIME; 766 ch->retry_time = CADET_INITIAL_RETRANSMIT_TIME;
767 ch->nobuffer = GNUNET_NO;
768 ch->reliable = GNUNET_YES;
769 ch->out_of_order = GNUNET_NO;
747 ch->max_pending_messages = (ch->nobuffer) ? 1 : 4; /* FIXME: 4!? Do not hardcode! */ 770 ch->max_pending_messages = (ch->nobuffer) ? 1 : 4; /* FIXME: 4!? Do not hardcode! */
748 GNUNET_STATISTICS_update (stats, 771 GNUNET_STATISTICS_update (stats,
749 "# channels", 772 "# channels",