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.h92
1 files changed, 50 insertions, 42 deletions
diff --git a/src/cadet/gnunet-service-cadet_channel.h b/src/cadet/gnunet-service-cadet_channel.h
index a64d4058e..181c6e88b 100644
--- a/src/cadet/gnunet-service-cadet_channel.h
+++ b/src/cadet/gnunet-service-cadet_channel.h
@@ -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,9 @@ 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
183 GNUNET_CADET_ConnectionTunnelIdentifier *cti);
183 184
184 185
185 186
@@ -191,9 +192,11 @@ GCCH_handle_duplicate_open(struct CadetChannel *ch,
191 * @param msg message that was received 192 * @param msg message that was received
192 */ 193 */
193void 194void
194GCCH_handle_channel_plaintext_data(struct CadetChannel *ch, 195GCCH_handle_channel_plaintext_data (struct CadetChannel *ch,
195 const struct GNUNET_CADET_ConnectionTunnelIdentifier *cti, 196 const struct
196 const struct GNUNET_CADET_ChannelAppDataMessage *msg); 197 GNUNET_CADET_ConnectionTunnelIdentifier *cti,
198 const struct
199 GNUNET_CADET_ChannelAppDataMessage *msg);
197 200
198 201
199/** 202/**
@@ -205,9 +208,12 @@ GCCH_handle_channel_plaintext_data(struct CadetChannel *ch,
205 * @param ack details about what was received 208 * @param ack details about what was received
206 */ 209 */
207void 210void
208GCCH_handle_channel_plaintext_data_ack(struct CadetChannel *ch, 211GCCH_handle_channel_plaintext_data_ack (struct CadetChannel *ch,
209 const struct GNUNET_CADET_ConnectionTunnelIdentifier *cti, 212 const struct
210 const struct GNUNET_CADET_ChannelDataAckMessage *ack); 213 GNUNET_CADET_ConnectionTunnelIdentifier
214 *cti,
215 const struct
216 GNUNET_CADET_ChannelDataAckMessage *ack);
211 217
212 218
213/** 219/**
@@ -220,9 +226,10 @@ GCCH_handle_channel_plaintext_data_ack(struct CadetChannel *ch,
220 * @param port port number (needed to verify receiver knows the port) 226 * @param port port number (needed to verify receiver knows the port)
221 */ 227 */
222void 228void
223GCCH_handle_channel_open_ack(struct CadetChannel *ch, 229GCCH_handle_channel_open_ack (struct CadetChannel *ch,
224 const struct GNUNET_CADET_ConnectionTunnelIdentifier *cti, 230 const struct
225 const struct GNUNET_HashCode *port); 231 GNUNET_CADET_ConnectionTunnelIdentifier *cti,
232 const struct GNUNET_HashCode *port);
226 233
227 234
228/** 235/**
@@ -242,8 +249,9 @@ GCCH_handle_channel_open_ack(struct CadetChannel *ch,
242 * NULL during shutdown 249 * NULL during shutdown
243 */ 250 */
244void 251void
245GCCH_handle_remote_destroy(struct CadetChannel *ch, 252GCCH_handle_remote_destroy (struct CadetChannel *ch,
246 const struct GNUNET_CADET_ConnectionTunnelIdentifier *cti); 253 const struct
254 GNUNET_CADET_ConnectionTunnelIdentifier *cti);
247 255
248 256
249/** 257/**
@@ -261,10 +269,10 @@ GCCH_handle_remote_destroy(struct CadetChannel *ch,
261 * #GNUNET_SYSERR in case of an error. 269 * #GNUNET_SYSERR in case of an error.
262 */ 270 */
263int 271int
264GCCH_handle_local_data(struct CadetChannel *ch, 272GCCH_handle_local_data (struct CadetChannel *ch,
265 struct GNUNET_CADET_ClientChannelNumber sender_ccn, 273 struct GNUNET_CADET_ClientChannelNumber sender_ccn,
266 const char *buf, 274 const char *buf,
267 size_t buf_len); 275 size_t buf_len);
268 276
269 277
270/** 278/**
@@ -274,7 +282,7 @@ GCCH_handle_local_data(struct CadetChannel *ch,
274 * @param client_ccn ccn of the client sending the ack 282 * @param client_ccn ccn of the client sending the ack
275 */ 283 */
276void 284void
277GCCH_handle_local_ack(struct CadetChannel *ch, 285GCCH_handle_local_ack (struct CadetChannel *ch,
278 struct GNUNET_CADET_ClientChannelNumber client_ccn); 286 struct GNUNET_CADET_ClientChannelNumber client_ccn);
279 287
280#endif 288#endif