aboutsummaryrefslogtreecommitdiff
path: root/src/cadet/gnunet-service-cadet_channel.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/cadet/gnunet-service-cadet_channel.h')
-rw-r--r--src/cadet/gnunet-service-cadet_channel.h90
1 files changed, 45 insertions, 45 deletions
diff --git a/src/cadet/gnunet-service-cadet_channel.h b/src/cadet/gnunet-service-cadet_channel.h
index 2eb28262d..a64d4058e 100644
--- a/src/cadet/gnunet-service-cadet_channel.h
+++ b/src/cadet/gnunet-service-cadet_channel.h
@@ -11,12 +11,12 @@
11 WITHOUT ANY WARRANTY; without even the implied warranty of 11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Affero General Public License for more details. 13 Affero General Public License for more details.
14 14
15 You should have received a copy of the GNU Affero General Public License 15 You should have received a copy of the GNU Affero General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>. 16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17 17
18 SPDX-License-Identifier: AGPL3.0-or-later 18 SPDX-License-Identifier: AGPL3.0-or-later
19*/ 19 */
20 20
21/** 21/**
22 * @file cadet/gnunet-service-cadet_channel.h 22 * @file cadet/gnunet-service-cadet_channel.h
@@ -44,7 +44,7 @@ struct CadetChannel;
44 44
45 45
46/** 46/**
47 * Hash the @a port and @a initiator and @a listener to 47 * Hash the @a port and @a initiator and @a listener to
48 * calculate the "challenge" @a h_port we send to the other 48 * calculate the "challenge" @a h_port we send to the other
49 * peer on #GNUNET_MESSAGE_TYPE_CADET_CHANNEL_OPEN. 49 * peer on #GNUNET_MESSAGE_TYPE_CADET_CHANNEL_OPEN.
50 * 50 *
@@ -53,9 +53,9 @@ struct CadetChannel;
53 * @param listener peer that is listining on @a port 53 * @param listener peer that is listining on @a port
54 */ 54 */
55void 55void
56GCCH_hash_port (struct GNUNET_HashCode *h_port, 56GCCH_hash_port(struct GNUNET_HashCode *h_port,
57 const struct GNUNET_HashCode *port, 57 const struct GNUNET_HashCode *port,
58 const struct GNUNET_PeerIdentity *listener); 58 const struct GNUNET_PeerIdentity *listener);
59 59
60 60
61/** 61/**
@@ -66,7 +66,7 @@ GCCH_hash_port (struct GNUNET_HashCode *h_port,
66 * @return Static string with the channel IDs. 66 * @return Static string with the channel IDs.
67 */ 67 */
68const char * 68const char *
69GCCH_2s (const struct CadetChannel *ch); 69GCCH_2s(const struct CadetChannel *ch);
70 70
71 71
72/** 72/**
@@ -76,8 +76,8 @@ GCCH_2s (const struct CadetChannel *ch);
76 * @param level Debug level to use. 76 * @param level Debug level to use.
77 */ 77 */
78void 78void
79GCCH_debug (struct CadetChannel *ch, 79GCCH_debug(struct CadetChannel *ch,
80 enum GNUNET_ErrorType level); 80 enum GNUNET_ErrorType level);
81 81
82 82
83/** 83/**
@@ -88,7 +88,7 @@ GCCH_debug (struct CadetChannel *ch,
88 * @return ID used to identify the channel with the remote peer. 88 * @return ID used to identify the channel with the remote peer.
89 */ 89 */
90struct GNUNET_CADET_ChannelTunnelNumber 90struct GNUNET_CADET_ChannelTunnelNumber
91GCCH_get_id (const struct CadetChannel *ch); 91GCCH_get_id(const struct CadetChannel *ch);
92 92
93 93
94/** 94/**
@@ -102,11 +102,11 @@ GCCH_get_id (const struct CadetChannel *ch);
102 * @return handle to the new channel 102 * @return handle to the new channel
103 */ 103 */
104struct CadetChannel * 104struct CadetChannel *
105GCCH_channel_local_new (struct CadetClient *owner, 105GCCH_channel_local_new(struct CadetClient *owner,
106 struct GNUNET_CADET_ClientChannelNumber owner_id, 106 struct GNUNET_CADET_ClientChannelNumber owner_id,
107 struct CadetPeer *destination, 107 struct CadetPeer *destination,
108 const struct GNUNET_HashCode *port, 108 const struct GNUNET_HashCode *port,
109 uint32_t options); 109 uint32_t options);
110 110
111 111
112/** 112/**
@@ -119,9 +119,9 @@ GCCH_channel_local_new (struct CadetClient *owner,
119 * @param port port number @a c is listening on 119 * @param port port number @a c is listening on
120 */ 120 */
121void 121void
122GCCH_bind (struct CadetChannel *ch, 122GCCH_bind(struct CadetChannel *ch,
123 struct CadetClient *c, 123 struct CadetClient *c,
124 const struct GNUNET_HashCode *port); 124 const struct GNUNET_HashCode *port);
125 125
126 126
127/** 127/**
@@ -133,9 +133,9 @@ GCCH_bind (struct CadetChannel *ch,
133 * @param ccn client number of the client @a c 133 * @param ccn client number of the client @a c
134 */ 134 */
135void 135void
136GCCH_channel_local_destroy (struct CadetChannel *ch, 136GCCH_channel_local_destroy(struct CadetChannel *ch,
137 struct CadetClient *c, 137 struct CadetClient *c,
138 struct GNUNET_CADET_ClientChannelNumber ccn); 138 struct GNUNET_CADET_ClientChannelNumber ccn);
139 139
140 140
141/** 141/**
@@ -149,7 +149,7 @@ GCCH_channel_local_destroy (struct CadetChannel *ch,
149 * @param ch the channel for which the tunnel is now ready 149 * @param ch the channel for which the tunnel is now ready
150 */ 150 */
151void 151void
152GCCH_tunnel_up (struct CadetChannel *ch); 152GCCH_tunnel_up(struct CadetChannel *ch);
153 153
154 154
155/** 155/**
@@ -163,10 +163,10 @@ GCCH_tunnel_up (struct CadetChannel *ch);
163 * @return handle to the new channel 163 * @return handle to the new channel
164 */ 164 */
165struct CadetChannel * 165struct CadetChannel *
166GCCH_channel_incoming_new (struct CadetTunnel *t, 166GCCH_channel_incoming_new(struct CadetTunnel *t,
167 struct GNUNET_CADET_ChannelTunnelNumber chid, 167 struct GNUNET_CADET_ChannelTunnelNumber chid,
168 const struct GNUNET_HashCode *h_port, 168 const struct GNUNET_HashCode *h_port,
169 uint32_t options); 169 uint32_t options);
170 170
171 171
172/** 172/**
@@ -178,8 +178,8 @@ GCCH_channel_incoming_new (struct CadetTunnel *t,
178 * @param cti identifier of the connection that delivered the message 178 * @param cti identifier of the connection that delivered the message
179 */ 179 */
180void 180void
181GCCH_handle_duplicate_open (struct CadetChannel *ch, 181GCCH_handle_duplicate_open(struct CadetChannel *ch,
182 const struct GNUNET_CADET_ConnectionTunnelIdentifier *cti); 182 const struct GNUNET_CADET_ConnectionTunnelIdentifier *cti);
183 183
184 184
185 185
@@ -191,9 +191,9 @@ GCCH_handle_duplicate_open (struct CadetChannel *ch,
191 * @param msg message that was received 191 * @param msg message that was received
192 */ 192 */
193void 193void
194GCCH_handle_channel_plaintext_data (struct CadetChannel *ch, 194GCCH_handle_channel_plaintext_data(struct CadetChannel *ch,
195 const struct GNUNET_CADET_ConnectionTunnelIdentifier *cti, 195 const struct GNUNET_CADET_ConnectionTunnelIdentifier *cti,
196 const struct GNUNET_CADET_ChannelAppDataMessage *msg); 196 const struct GNUNET_CADET_ChannelAppDataMessage *msg);
197 197
198 198
199/** 199/**
@@ -205,9 +205,9 @@ GCCH_handle_channel_plaintext_data (struct CadetChannel *ch,
205 * @param ack details about what was received 205 * @param ack details about what was received
206 */ 206 */
207void 207void
208GCCH_handle_channel_plaintext_data_ack (struct CadetChannel *ch, 208GCCH_handle_channel_plaintext_data_ack(struct CadetChannel *ch,
209 const struct GNUNET_CADET_ConnectionTunnelIdentifier *cti, 209 const struct GNUNET_CADET_ConnectionTunnelIdentifier *cti,
210 const struct GNUNET_CADET_ChannelDataAckMessage *ack); 210 const struct GNUNET_CADET_ChannelDataAckMessage *ack);
211 211
212 212
213/** 213/**
@@ -220,9 +220,9 @@ GCCH_handle_channel_plaintext_data_ack (struct CadetChannel *ch,
220 * @param port port number (needed to verify receiver knows the port) 220 * @param port port number (needed to verify receiver knows the port)
221 */ 221 */
222void 222void
223GCCH_handle_channel_open_ack (struct CadetChannel *ch, 223GCCH_handle_channel_open_ack(struct CadetChannel *ch,
224 const struct GNUNET_CADET_ConnectionTunnelIdentifier *cti, 224 const struct GNUNET_CADET_ConnectionTunnelIdentifier *cti,
225 const struct GNUNET_HashCode *port); 225 const struct GNUNET_HashCode *port);
226 226
227 227
228/** 228/**
@@ -242,8 +242,8 @@ GCCH_handle_channel_open_ack (struct CadetChannel *ch,
242 * NULL during shutdown 242 * NULL during shutdown
243 */ 243 */
244void 244void
245GCCH_handle_remote_destroy (struct CadetChannel *ch, 245GCCH_handle_remote_destroy(struct CadetChannel *ch,
246 const struct GNUNET_CADET_ConnectionTunnelIdentifier *cti); 246 const struct GNUNET_CADET_ConnectionTunnelIdentifier *cti);
247 247
248 248
249/** 249/**
@@ -261,10 +261,10 @@ GCCH_handle_remote_destroy (struct CadetChannel *ch,
261 * #GNUNET_SYSERR in case of an error. 261 * #GNUNET_SYSERR in case of an error.
262 */ 262 */
263int 263int
264GCCH_handle_local_data (struct CadetChannel *ch, 264GCCH_handle_local_data(struct CadetChannel *ch,
265 struct GNUNET_CADET_ClientChannelNumber sender_ccn, 265 struct GNUNET_CADET_ClientChannelNumber sender_ccn,
266 const char *buf, 266 const char *buf,
267 size_t buf_len); 267 size_t buf_len);
268 268
269 269
270/** 270/**
@@ -274,7 +274,7 @@ GCCH_handle_local_data (struct CadetChannel *ch,
274 * @param client_ccn ccn of the client sending the ack 274 * @param client_ccn ccn of the client sending the ack
275 */ 275 */
276void 276void
277GCCH_handle_local_ack (struct CadetChannel *ch, 277GCCH_handle_local_ack(struct CadetChannel *ch,
278 struct GNUNET_CADET_ClientChannelNumber client_ccn); 278 struct GNUNET_CADET_ClientChannelNumber client_ccn);
279 279
280#endif 280#endif