aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/cadet/cadet_api.c23
-rw-r--r--src/cadet/gnunet-service-cadet_channel.c15
2 files changed, 23 insertions, 15 deletions
diff --git a/src/cadet/cadet_api.c b/src/cadet/cadet_api.c
index b16520429..825768034 100644
--- a/src/cadet/cadet_api.c
+++ b/src/cadet/cadet_api.c
@@ -32,6 +32,17 @@
32 32
33#define LOG(kind, ...) GNUNET_log_from (kind, "cadet-api", __VA_ARGS__) 33#define LOG(kind, ...) GNUNET_log_from (kind, "cadet-api", __VA_ARGS__)
34 34
35enum GNUNET_CADET_ChannelInfoOption
36{
37 /**
38 * Who is the peer at the other end of the channel.
39 * Only for use in @c GNUNET_CADET_channel_get_info
40 * struct GNUNET_PeerIdentity *peer
41 */
42 GNUNET_CADET_OPTION_PEER = 0x0
43
44};
45
35/** 46/**
36 * Opaque handle to the service. 47 * Opaque handle to the service.
37 */ 48 */
@@ -932,8 +943,20 @@ GNUNET_CADET_channel_destroy (struct GNUNET_CADET_Channel *channel)
932 */ 943 */
933const union GNUNET_CADET_ChannelInfo * 944const union GNUNET_CADET_ChannelInfo *
934GNUNET_CADET_channel_get_info (struct GNUNET_CADET_Channel *channel, 945GNUNET_CADET_channel_get_info (struct GNUNET_CADET_Channel *channel,
946 enum GNUNET_CADET_ChannelInfoOption option,
935 ...) 947 ...)
936{ 948{
949 static int bool_flag;
950
951 switch (option)
952 {
953 case GNUNET_CADET_OPTION_PEER:
954 return (const union GNUNET_CADET_ChannelInfo *) &channel->peer;
955 break;
956 default:
957 GNUNET_break (0);
958 return NULL;
959 }
937 return (const union GNUNET_CADET_ChannelInfo *) &channel->peer; 960 return (const union GNUNET_CADET_ChannelInfo *) &channel->peer;
938} 961}
939 962
diff --git a/src/cadet/gnunet-service-cadet_channel.c b/src/cadet/gnunet-service-cadet_channel.c
index 4136dd5dd..6e3f6ee5e 100644
--- a/src/cadet/gnunet-service-cadet_channel.c
+++ b/src/cadet/gnunet-service-cadet_channel.c
@@ -355,21 +355,6 @@ 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 /**
373 * Is this channel a loopback channel, where the destination is us again? 358 * Is this channel a loopback channel, where the destination is us again?
374 */ 359 */
375 int is_loopback; 360 int is_loopback;