aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authort3sserakt <t3ss@posteo.de>2019-06-24 11:47:25 +0200
committert3sserakt <t3ss@posteo.de>2019-06-24 11:47:25 +0200
commitd2ed51b63d955a590a461e911a3d6fa6a9248fe5 (patch)
tree3a9b7293435e61706986d84d0f6b80f385657ebb
parenta31cd73472ac1b4c899a6e1d7e53851c20677f7d (diff)
downloadgnunet-d2ed51b63d955a590a461e911a3d6fa6a9248fe5.tar.gz
gnunet-d2ed51b63d955a590a461e911a3d6fa6a9248fe5.zip
removed GNUNET_CADET_ChannelOption
-rw-r--r--src/cadet/cadet_api.c31
-rw-r--r--src/cadet/gnunet-cadet.c3
-rw-r--r--src/cadet/gnunet-service-cadet_channel.c21
-rw-r--r--src/cadet/gnunet-service-cadet_connection.c15
-rw-r--r--src/cadet/gnunet-service-cadet_connection.h5
-rw-r--r--src/cadet/gnunet-service-cadet_core.c7
-rw-r--r--src/cadet/gnunet-service-cadet_tunnels.h2
-rw-r--r--src/include/gnunet_cadet_service.h47
8 files changed, 3 insertions, 128 deletions
diff --git a/src/cadet/cadet_api.c b/src/cadet/cadet_api.c
index b0016d2a8..8638be27d 100644
--- a/src/cadet/cadet_api.c
+++ b/src/cadet/cadet_api.c
@@ -135,11 +135,6 @@ struct GNUNET_CADET_Channel
135 struct GNUNET_CADET_ClientChannelNumber ccn; 135 struct GNUNET_CADET_ClientChannelNumber ccn;
136 136
137 /** 137 /**
138 * Channel options: reliability, etc.
139 */
140 enum GNUNET_CADET_ChannelOption options;
141
142 /**
143 * How many messages are we allowed to send to the service right now? 138 * How many messages are we allowed to send to the service right now?
144 */ 139 */
145 unsigned int allow_send; 140 unsigned int allow_send;
@@ -592,7 +587,6 @@ handle_channel_created (void *cls,
592 &ccn); 587 &ccn);
593 ch->peer = msg->peer; 588 ch->peer = msg->peer;
594 ch->incoming_port = port; 589 ch->incoming_port = port;
595 ch->options = ntohl (msg->opt);
596 LOG (GNUNET_ERROR_TYPE_DEBUG, 590 LOG (GNUNET_ERROR_TYPE_DEBUG,
597 "Creating incoming channel %X [%s] %p\n", 591 "Creating incoming channel %X [%s] %p\n",
598 ntohl (ccn.channel_of_client), 592 ntohl (ccn.channel_of_client),
@@ -982,29 +976,9 @@ GNUNET_CADET_channel_destroy (struct GNUNET_CADET_Channel *channel)
982 */ 976 */
983const union GNUNET_CADET_ChannelInfo * 977const union GNUNET_CADET_ChannelInfo *
984GNUNET_CADET_channel_get_info (struct GNUNET_CADET_Channel *channel, 978GNUNET_CADET_channel_get_info (struct GNUNET_CADET_Channel *channel,
985 enum GNUNET_CADET_ChannelOption option,
986 ...) 979 ...)
987{ 980{
988 static int bool_flag; 981 return (const union GNUNET_CADET_ChannelInfo *) &channel->peer;
989
990 switch (option)
991 {
992 case GNUNET_CADET_OPTION_NOBUFFER:
993 case GNUNET_CADET_OPTION_RELIABLE:
994 case GNUNET_CADET_OPTION_OUT_OF_ORDER:
995 if (0 != (option & channel->options))
996 bool_flag = GNUNET_YES;
997 else
998 bool_flag = GNUNET_NO;
999 return (const union GNUNET_CADET_ChannelInfo *) &bool_flag;
1000 break;
1001 case GNUNET_CADET_OPTION_PEER:
1002 return (const union GNUNET_CADET_ChannelInfo *) &channel->peer;
1003 break;
1004 default:
1005 GNUNET_break (0);
1006 return NULL;
1007 }
1008} 982}
1009 983
1010 984
@@ -1140,7 +1114,6 @@ GNUNET_CADET_channel_create (struct GNUNET_CADET_Handle *h,
1140 void *channel_cls, 1114 void *channel_cls,
1141 const struct GNUNET_PeerIdentity *destination, 1115 const struct GNUNET_PeerIdentity *destination,
1142 const struct GNUNET_HashCode *port, 1116 const struct GNUNET_HashCode *port,
1143 enum GNUNET_CADET_ChannelOption options,
1144 GNUNET_CADET_WindowSizeEventHandler window_changes, 1117 GNUNET_CADET_WindowSizeEventHandler window_changes,
1145 GNUNET_CADET_DisconnectEventHandler disconnects, 1118 GNUNET_CADET_DisconnectEventHandler disconnects,
1146 const struct GNUNET_MQ_MessageHandler *handlers) 1119 const struct GNUNET_MQ_MessageHandler *handlers)
@@ -1158,7 +1131,6 @@ GNUNET_CADET_channel_create (struct GNUNET_CADET_Handle *h,
1158 NULL); 1131 NULL);
1159 ch->ctx = channel_cls; 1132 ch->ctx = channel_cls;
1160 ch->peer = *destination; 1133 ch->peer = *destination;
1161 ch->options = options;
1162 ch->window_changes = window_changes; 1134 ch->window_changes = window_changes;
1163 ch->disconnects = disconnects; 1135 ch->disconnects = disconnects;
1164 1136
@@ -1179,7 +1151,6 @@ GNUNET_CADET_channel_create (struct GNUNET_CADET_Handle *h,
1179 msg->ccn = ch->ccn; 1151 msg->ccn = ch->ccn;
1180 msg->port = *port; 1152 msg->port = *port;
1181 msg->peer = *destination; 1153 msg->peer = *destination;
1182 msg->opt = htonl (options);
1183 GNUNET_MQ_send (h->mq, 1154 GNUNET_MQ_send (h->mq,
1184 env); 1155 env);
1185 return ch; 1156 return ch;
diff --git a/src/cadet/gnunet-cadet.c b/src/cadet/gnunet-cadet.c
index 932d069a1..262cdf64d 100644
--- a/src/cadet/gnunet-cadet.c
+++ b/src/cadet/gnunet-cadet.c
@@ -784,7 +784,6 @@ run (void *cls,
784 if (NULL != target_id) 784 if (NULL != target_id)
785 { 785 {
786 struct GNUNET_PeerIdentity pid; 786 struct GNUNET_PeerIdentity pid;
787 enum GNUNET_CADET_ChannelOption opt;
788 787
789 if (GNUNET_OK != 788 if (GNUNET_OK !=
790 GNUNET_CRYPTO_eddsa_public_key_from_string (target_id, 789 GNUNET_CRYPTO_eddsa_public_key_from_string (target_id,
@@ -801,7 +800,6 @@ run (void *cls,
801 "Connecting to `%s:%s'\n", 800 "Connecting to `%s:%s'\n",
802 target_id, 801 target_id,
803 target_port); 802 target_port);
804 opt = GNUNET_CADET_OPTION_DEFAULT | GNUNET_CADET_OPTION_RELIABLE;
805 GNUNET_CRYPTO_hash (target_port, 803 GNUNET_CRYPTO_hash (target_port,
806 strlen(target_port), 804 strlen(target_port),
807 &porthash); 805 &porthash);
@@ -809,7 +807,6 @@ run (void *cls,
809 NULL, 807 NULL,
810 &pid, 808 &pid,
811 &porthash, 809 &porthash,
812 opt,
813 NULL /* window changes */, 810 NULL /* window changes */,
814 &channel_ended, 811 &channel_ended,
815 handlers); 812 handlers);
diff --git a/src/cadet/gnunet-service-cadet_channel.c b/src/cadet/gnunet-service-cadet_channel.c
index a1f6e37c2..4136dd5dd 100644
--- a/src/cadet/gnunet-service-cadet_channel.c
+++ b/src/cadet/gnunet-service-cadet_channel.c
@@ -591,22 +591,13 @@ send_channel_open (void *cls)
591{ 591{
592 struct CadetChannel *ch = cls; 592 struct CadetChannel *ch = cls;
593 struct GNUNET_CADET_ChannelOpenMessage msgcc; 593 struct GNUNET_CADET_ChannelOpenMessage msgcc;
594 uint32_t options;
595 594
596 ch->retry_control_task = NULL; 595 ch->retry_control_task = NULL;
597 LOG (GNUNET_ERROR_TYPE_DEBUG, 596 LOG (GNUNET_ERROR_TYPE_DEBUG,
598 "Sending CHANNEL_OPEN message for %s\n", 597 "Sending CHANNEL_OPEN message for %s\n",
599 GCCH_2s (ch)); 598 GCCH_2s (ch));
600 options = 0;
601 if (ch->nobuffer)
602 options |= GNUNET_CADET_OPTION_NOBUFFER;
603 if (ch->reliable)
604 options |= GNUNET_CADET_OPTION_RELIABLE;
605 if (ch->out_of_order)
606 options |= GNUNET_CADET_OPTION_OUT_OF_ORDER;
607 msgcc.header.size = htons (sizeof (msgcc)); 599 msgcc.header.size = htons (sizeof (msgcc));
608 msgcc.header.type = htons (GNUNET_MESSAGE_TYPE_CADET_CHANNEL_OPEN); 600 msgcc.header.type = htons (GNUNET_MESSAGE_TYPE_CADET_CHANNEL_OPEN);
609 msgcc.opt = htonl (options);
610 msgcc.h_port = ch->h_port; 601 msgcc.h_port = ch->h_port;
611 msgcc.ctn = ch->ctn; 602 msgcc.ctn = ch->ctn;
612 ch->state = CADET_CHANNEL_OPEN_SENT; 603 ch->state = CADET_CHANNEL_OPEN_SENT;
@@ -670,9 +661,6 @@ GCCH_channel_local_new (struct CadetClient *owner,
670 661
671 ch = GNUNET_new (struct CadetChannel); 662 ch = GNUNET_new (struct CadetChannel);
672 ch->mid_recv.mid = htonl (1); /* The OPEN_ACK counts as message 0! */ 663 ch->mid_recv.mid = htonl (1); /* The OPEN_ACK counts as message 0! */
673 ch->nobuffer = (0 != (options & GNUNET_CADET_OPTION_NOBUFFER));
674 ch->reliable = (0 != (options & GNUNET_CADET_OPTION_RELIABLE));
675 ch->out_of_order = (0 != (options & GNUNET_CADET_OPTION_OUT_OF_ORDER));
676 ch->max_pending_messages = (ch->nobuffer) ? 1 : 4; /* FIXME: 4!? Do not hardcode! */ 664 ch->max_pending_messages = (ch->nobuffer) ? 1 : 4; /* FIXME: 4!? Do not hardcode! */
677 ch->owner = ccco; 665 ch->owner = ccco;
678 ch->port = *port; 666 ch->port = *port;
@@ -771,9 +759,6 @@ GCCH_channel_incoming_new (struct CadetTunnel *t,
771 ch->t = t; 759 ch->t = t;
772 ch->ctn = ctn; 760 ch->ctn = ctn;
773 ch->retry_time = CADET_INITIAL_RETRANSMIT_TIME; 761 ch->retry_time = CADET_INITIAL_RETRANSMIT_TIME;
774 ch->nobuffer = (0 != (options & GNUNET_CADET_OPTION_NOBUFFER));
775 ch->reliable = (0 != (options & GNUNET_CADET_OPTION_RELIABLE));
776 ch->out_of_order = (0 != (options & GNUNET_CADET_OPTION_OUT_OF_ORDER));
777 ch->max_pending_messages = (ch->nobuffer) ? 1 : 4; /* FIXME: 4!? Do not hardcode! */ 762 ch->max_pending_messages = (ch->nobuffer) ? 1 : 4; /* FIXME: 4!? Do not hardcode! */
778 GNUNET_STATISTICS_update (stats, 763 GNUNET_STATISTICS_update (stats,
779 "# channels", 764 "# channels",
@@ -998,12 +983,6 @@ GCCH_bind (struct CadetChannel *ch,
998 ch->retry_control_task = NULL; 983 ch->retry_control_task = NULL;
999 } 984 }
1000 options = 0; 985 options = 0;
1001 if (ch->nobuffer)
1002 options |= GNUNET_CADET_OPTION_NOBUFFER;
1003 if (ch->reliable)
1004 options |= GNUNET_CADET_OPTION_RELIABLE;
1005 if (ch->out_of_order)
1006 options |= GNUNET_CADET_OPTION_OUT_OF_ORDER;
1007 cccd = GNUNET_new (struct CadetChannelClient); 986 cccd = GNUNET_new (struct CadetChannelClient);
1008 GNUNET_assert (NULL == ch->dest); 987 GNUNET_assert (NULL == ch->dest);
1009 ch->dest = cccd; 988 ch->dest = cccd;
diff --git a/src/cadet/gnunet-service-cadet_connection.c b/src/cadet/gnunet-service-cadet_connection.c
index 1f7e86d60..7b3a0b975 100644
--- a/src/cadet/gnunet-service-cadet_connection.c
+++ b/src/cadet/gnunet-service-cadet_connection.c
@@ -161,11 +161,6 @@ struct CadetConnection
161 enum CadetConnectionState state; 161 enum CadetConnectionState state;
162 162
163 /** 163 /**
164 * Options for the route, control buffering.
165 */
166 enum GNUNET_CADET_ChannelOption options;
167
168 /**
169 * How many latency observations did we make for this connection? 164 * How many latency observations did we make for this connection?
170 */ 165 */
171 unsigned int latency_datapoints; 166 unsigned int latency_datapoints;
@@ -635,7 +630,6 @@ send_create (void *cls)
635 env = GNUNET_MQ_msg_extra (create_msg, 630 env = GNUNET_MQ_msg_extra (create_msg,
636 (2 + cc->off) * sizeof (struct GNUNET_PeerIdentity), 631 (2 + cc->off) * sizeof (struct GNUNET_PeerIdentity),
637 GNUNET_MESSAGE_TYPE_CADET_CONNECTION_CREATE); 632 GNUNET_MESSAGE_TYPE_CADET_CONNECTION_CREATE);
638 create_msg->options = htonl ((uint32_t) cc->options);
639 create_msg->cid = cc->cid; 633 create_msg->cid = cc->cid;
640 pids = (struct GNUNET_PeerIdentity *) &create_msg[1]; 634 pids = (struct GNUNET_PeerIdentity *) &create_msg[1];
641 pids[0] = my_full_id; 635 pids[0] = my_full_id;
@@ -825,7 +819,6 @@ manage_first_hop_mq (void *cls,
825 * @param destination where to go 819 * @param destination where to go
826 * @param path which path to take (may not be the full path) 820 * @param path which path to take (may not be the full path)
827 * @param off offset of @a destination on @a path 821 * @param off offset of @a destination on @a path
828 * @param options options for the connection
829 * @param ct which tunnel uses this connection 822 * @param ct which tunnel uses this connection
830 * @param init_state initial state for the connection 823 * @param init_state initial state for the connection
831 * @param ready_cb function to call when ready to transmit 824 * @param ready_cb function to call when ready to transmit
@@ -836,7 +829,6 @@ static struct CadetConnection *
836connection_create (struct CadetPeer *destination, 829connection_create (struct CadetPeer *destination,
837 struct CadetPeerPath *path, 830 struct CadetPeerPath *path,
838 unsigned int off, 831 unsigned int off,
839 enum GNUNET_CADET_ChannelOption options,
840 struct CadetTConnection *ct, 832 struct CadetTConnection *ct,
841 const struct GNUNET_CADET_ConnectionTunnelIdentifier *cid, 833 const struct GNUNET_CADET_ConnectionTunnelIdentifier *cid,
842 enum CadetConnectionState init_state, 834 enum CadetConnectionState init_state,
@@ -847,7 +839,6 @@ connection_create (struct CadetPeer *destination,
847 struct CadetPeer *first_hop; 839 struct CadetPeer *first_hop;
848 840
849 cc = GNUNET_new (struct CadetConnection); 841 cc = GNUNET_new (struct CadetConnection);
850 cc->options = options;
851 cc->state = init_state; 842 cc->state = init_state;
852 cc->ct = ct; 843 cc->ct = ct;
853 cc->cid = *cid; 844 cc->cid = *cid;
@@ -890,7 +881,6 @@ connection_create (struct CadetPeer *destination,
890 * 881 *
891 * @param destination where to go 882 * @param destination where to go
892 * @param path which path to take (may not be the full path) 883 * @param path which path to take (may not be the full path)
893 * @param options options for the connection
894 * @param ct which tunnel uses this connection 884 * @param ct which tunnel uses this connection
895 * @param ready_cb function to call when ready to transmit 885 * @param ready_cb function to call when ready to transmit
896 * @param ready_cb_cls closure for @a cb 886 * @param ready_cb_cls closure for @a cb
@@ -900,7 +890,6 @@ connection_create (struct CadetPeer *destination,
900struct CadetConnection * 890struct CadetConnection *
901GCC_create_inbound (struct CadetPeer *destination, 891GCC_create_inbound (struct CadetPeer *destination,
902 struct CadetPeerPath *path, 892 struct CadetPeerPath *path,
903 enum GNUNET_CADET_ChannelOption options,
904 struct CadetTConnection *ct, 893 struct CadetTConnection *ct,
905 const struct GNUNET_CADET_ConnectionTunnelIdentifier *cid, 894 const struct GNUNET_CADET_ConnectionTunnelIdentifier *cid,
906 GCC_ReadyCallback ready_cb, 895 GCC_ReadyCallback ready_cb,
@@ -956,7 +945,6 @@ GCC_create_inbound (struct CadetPeer *destination,
956 return connection_create (destination, 945 return connection_create (destination,
957 path, 946 path,
958 off, 947 off,
959 options,
960 ct, 948 ct,
961 cid, 949 cid,
962 CADET_CONNECTION_CREATE_RECEIVED, 950 CADET_CONNECTION_CREATE_RECEIVED,
@@ -972,7 +960,6 @@ GCC_create_inbound (struct CadetPeer *destination,
972 * @param destination where to go 960 * @param destination where to go
973 * @param path which path to take (may not be the full path) 961 * @param path which path to take (may not be the full path)
974 * @param off offset of @a destination on @a path 962 * @param off offset of @a destination on @a path
975 * @param options options for the connection
976 * @param ct tunnel that uses the connection 963 * @param ct tunnel that uses the connection
977 * @param ready_cb function to call when ready to transmit 964 * @param ready_cb function to call when ready to transmit
978 * @param ready_cb_cls closure for @a cb 965 * @param ready_cb_cls closure for @a cb
@@ -982,7 +969,6 @@ struct CadetConnection *
982GCC_create (struct CadetPeer *destination, 969GCC_create (struct CadetPeer *destination,
983 struct CadetPeerPath *path, 970 struct CadetPeerPath *path,
984 unsigned int off, 971 unsigned int off,
985 enum GNUNET_CADET_ChannelOption options,
986 struct CadetTConnection *ct, 972 struct CadetTConnection *ct,
987 GCC_ReadyCallback ready_cb, 973 GCC_ReadyCallback ready_cb,
988 void *ready_cb_cls) 974 void *ready_cb_cls)
@@ -995,7 +981,6 @@ GCC_create (struct CadetPeer *destination,
995 return connection_create (destination, 981 return connection_create (destination,
996 path, 982 path,
997 off, 983 off,
998 options,
999 ct, 984 ct,
1000 &cid, 985 &cid,
1001 CADET_CONNECTION_NEW, 986 CADET_CONNECTION_NEW,
diff --git a/src/cadet/gnunet-service-cadet_connection.h b/src/cadet/gnunet-service-cadet_connection.h
index 7cdbc9dee..d3de3347c 100644
--- a/src/cadet/gnunet-service-cadet_connection.h
+++ b/src/cadet/gnunet-service-cadet_connection.h
@@ -1,4 +1,3 @@
1
2/* 1/*
3 This file is part of GNUnet. 2 This file is part of GNUnet.
4 Copyright (C) 2001-2017 GNUnet e.V. 3 Copyright (C) 2001-2017 GNUnet e.V.
@@ -89,7 +88,6 @@ GCC_lookup (const struct GNUNET_CADET_ConnectionTunnelIdentifier *cid);
89 * @param destination where to go 88 * @param destination where to go
90 * @param path which path to take (may not be the full path) 89 * @param path which path to take (may not be the full path)
91 * @param off offset of @a destination on @a path 90 * @param off offset of @a destination on @a path
92 * @param options options for the connection
93 * @param ct which tunnel uses this connection 91 * @param ct which tunnel uses this connection
94 * @param ready_cb function to call when ready to transmit 92 * @param ready_cb function to call when ready to transmit
95 * @param ready_cb_cls closure for @a cb 93 * @param ready_cb_cls closure for @a cb
@@ -99,7 +97,6 @@ struct CadetConnection *
99GCC_create (struct CadetPeer *destination, 97GCC_create (struct CadetPeer *destination,
100 struct CadetPeerPath *path, 98 struct CadetPeerPath *path,
101 unsigned int off, 99 unsigned int off,
102 enum GNUNET_CADET_ChannelOption options,
103 struct CadetTConnection *ct, 100 struct CadetTConnection *ct,
104 GCC_ReadyCallback ready_cb, 101 GCC_ReadyCallback ready_cb,
105 void *ready_cb_cls); 102 void *ready_cb_cls);
@@ -112,7 +109,6 @@ GCC_create (struct CadetPeer *destination,
112 * 109 *
113 * @param destination where to go 110 * @param destination where to go
114 * @param path which path to take (may not be the full path) 111 * @param path which path to take (may not be the full path)
115 * @param options options for the connection
116 * @param ct which tunnel uses this connection 112 * @param ct which tunnel uses this connection
117 * @param ready_cb function to call when ready to transmit 113 * @param ready_cb function to call when ready to transmit
118 * @param ready_cb_cls closure for @a cb 114 * @param ready_cb_cls closure for @a cb
@@ -122,7 +118,6 @@ GCC_create (struct CadetPeer *destination,
122struct CadetConnection * 118struct CadetConnection *
123GCC_create_inbound (struct CadetPeer *destination, 119GCC_create_inbound (struct CadetPeer *destination,
124 struct CadetPeerPath *path, 120 struct CadetPeerPath *path,
125 enum GNUNET_CADET_ChannelOption options,
126 struct CadetTConnection *ct, 121 struct CadetTConnection *ct,
127 const struct GNUNET_CADET_ConnectionTunnelIdentifier *cid, 122 const struct GNUNET_CADET_ConnectionTunnelIdentifier *cid,
128 GCC_ReadyCallback ready_cb, 123 GCC_ReadyCallback ready_cb,
diff --git a/src/cadet/gnunet-service-cadet_core.c b/src/cadet/gnunet-service-cadet_core.c
index 879230d29..c5d2f195a 100644
--- a/src/cadet/gnunet-service-cadet_core.c
+++ b/src/cadet/gnunet-service-cadet_core.c
@@ -180,10 +180,7 @@ struct CadetRoute
180 */ 180 */
181 struct GNUNET_CONTAINER_HeapNode *hn; 181 struct GNUNET_CONTAINER_HeapNode *hn;
182 182
183 /** 183
184 * Options for the route, control buffering.
185 */
186 enum GNUNET_CADET_ChannelOption options;
187}; 184};
188 185
189 186
@@ -899,7 +896,7 @@ handle_connection_create (void *cls,
899 GCP_2s (origin), 896 GCP_2s (origin),
900 GNUNET_sh2s (&msg->cid.connection_of_tunnel)); 897 GNUNET_sh2s (&msg->cid.connection_of_tunnel));
901 path = GCPP_get_path_from_route (path_length - 1, 898 path = GCPP_get_path_from_route (path_length - 1,
902 pids); 899 pids);
903 if (GNUNET_OK != 900 if (GNUNET_OK !=
904 GCT_add_inbound_connection (GCP_get_tunnel (origin, 901 GCT_add_inbound_connection (GCP_get_tunnel (origin,
905 GNUNET_YES), 902 GNUNET_YES),
diff --git a/src/cadet/gnunet-service-cadet_tunnels.h b/src/cadet/gnunet-service-cadet_tunnels.h
index c1bf2fcd5..47d9f98bf 100644
--- a/src/cadet/gnunet-service-cadet_tunnels.h
+++ b/src/cadet/gnunet-service-cadet_tunnels.h
@@ -119,7 +119,6 @@ GCT_destroy_tunnel_now (struct CadetTunnel *t);
119 * 119 *
120 * @param t a tunnel 120 * @param t a tunnel
121 * @param cid connection identifer to use for the connection 121 * @param cid connection identifer to use for the connection
122 * @param options options for the connection
123 * @param path path to use for the connection 122 * @param path path to use for the connection
124 * @return #GNUNET_OK on success, 123 * @return #GNUNET_OK on success,
125 * #GNUNET_SYSERR on failure (duplicate connection) 124 * #GNUNET_SYSERR on failure (duplicate connection)
@@ -127,7 +126,6 @@ GCT_destroy_tunnel_now (struct CadetTunnel *t);
127int 126int
128GCT_add_inbound_connection (struct CadetTunnel *t, 127GCT_add_inbound_connection (struct CadetTunnel *t,
129 const struct GNUNET_CADET_ConnectionTunnelIdentifier *cid, 128 const struct GNUNET_CADET_ConnectionTunnelIdentifier *cid,
130 enum GNUNET_CADET_ChannelOption options,
131 struct CadetPeerPath *path); 129 struct CadetPeerPath *path);
132 130
133 131
diff --git a/src/include/gnunet_cadet_service.h b/src/include/gnunet_cadet_service.h
index a11c5f3cb..fd591924a 100644
--- a/src/include/gnunet_cadet_service.h
+++ b/src/include/gnunet_cadet_service.h
@@ -93,49 +93,6 @@ struct GNUNET_CADET_ChannelTunnelNumber
93 uint32_t cn GNUNET_PACKED; 93 uint32_t cn GNUNET_PACKED;
94}; 94};
95 95
96
97/**
98 * Channel options. Second line indicates filed in the
99 * CadetChannelInfo union carrying the answer.
100 *
101 * @deprecated we should replace channel options with per-envelope
102 * options, and then re-use the options from `enum GNUNET_MQ_PriorityPreferences`.
103 */
104enum GNUNET_CADET_ChannelOption
105{
106 /**
107 * Default options: unreliable, default buffering, not out of order.
108 */
109 GNUNET_CADET_OPTION_DEFAULT = 0x0,
110
111 /**
112 * Disable buffering on intermediate nodes (for minimum latency).
113 * Yes/No.
114 */
115 GNUNET_CADET_OPTION_NOBUFFER = 0x1,
116
117 /**
118 * Enable channel reliability, lost messages will be retransmitted.
119 * Yes/No.
120 */
121 GNUNET_CADET_OPTION_RELIABLE = 0x2,
122
123 /**
124 * Enable out of order delivery of messages.
125 * Set bit for out-of-order delivery.
126 */
127 GNUNET_CADET_OPTION_OUT_OF_ORDER = 0x4,
128
129 /**
130 * Who is the peer at the other end of the channel.
131 * Only for use in @c GNUNET_CADET_channel_get_info
132 * struct GNUNET_PeerIdentity *peer
133 */
134 GNUNET_CADET_OPTION_PEER = 0x8
135
136};
137
138
139/** 96/**
140 * Method called whenever a peer connects to a port in MQ-based CADET. 97 * Method called whenever a peer connects to a port in MQ-based CADET.
141 * 98 *
@@ -259,7 +216,6 @@ GNUNET_CADET_close_port (struct GNUNET_CADET_Port *p);
259 * - Each message type callback in @a handlers 216 * - Each message type callback in @a handlers
260 * @param destination Peer identity the channel should go to. 217 * @param destination Peer identity the channel should go to.
261 * @param port Identification of the destination port. 218 * @param port Identification of the destination port.
262 * @param options CadetOption flag field, with all desired option bits set to 1.
263 * @param window_changes Function called when the transmit window size changes. 219 * @param window_changes Function called when the transmit window size changes.
264 * Can be NULL if this data is of no interest. 220 * Can be NULL if this data is of no interest.
265 * TODO Not yet implemented. 221 * TODO Not yet implemented.
@@ -272,7 +228,6 @@ GNUNET_CADET_channel_create (struct GNUNET_CADET_Handle *h,
272 void *channel_cls, 228 void *channel_cls,
273 const struct GNUNET_PeerIdentity *destination, 229 const struct GNUNET_PeerIdentity *destination,
274 const struct GNUNET_HashCode *port, 230 const struct GNUNET_HashCode *port,
275 enum GNUNET_CADET_ChannelOption options,
276 GNUNET_CADET_WindowSizeEventHandler window_changes, 231 GNUNET_CADET_WindowSizeEventHandler window_changes,
277 GNUNET_CADET_DisconnectEventHandler disconnects, 232 GNUNET_CADET_DisconnectEventHandler disconnects,
278 const struct GNUNET_MQ_MessageHandler *handlers); 233 const struct GNUNET_MQ_MessageHandler *handlers);
@@ -347,13 +302,11 @@ union GNUNET_CADET_ChannelInfo
347 * Get information about a channel. 302 * Get information about a channel.
348 * 303 *
349 * @param channel Channel handle. 304 * @param channel Channel handle.
350 * @param option Query type GNUNET_CADET_OPTION_*
351 * @param ... dependant on option, currently not used 305 * @param ... dependant on option, currently not used
352 * @return Union with an answer to the query. 306 * @return Union with an answer to the query.
353 */ 307 */
354const union GNUNET_CADET_ChannelInfo * 308const union GNUNET_CADET_ChannelInfo *
355GNUNET_CADET_channel_get_info (struct GNUNET_CADET_Channel *channel, 309GNUNET_CADET_channel_get_info (struct GNUNET_CADET_Channel *channel,
356 enum GNUNET_CADET_ChannelOption option,
357 ...); 310 ...);
358 311
359 312