aboutsummaryrefslogtreecommitdiff
path: root/src/cadet/gnunet-service-cadet_connection.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/cadet/gnunet-service-cadet_connection.h')
-rw-r--r--src/cadet/gnunet-service-cadet_connection.h78
1 files changed, 40 insertions, 38 deletions
diff --git a/src/cadet/gnunet-service-cadet_connection.h b/src/cadet/gnunet-service-cadet_connection.h
index 47b654cbb..b05c3b72c 100644
--- a/src/cadet/gnunet-service-cadet_connection.h
+++ b/src/cadet/gnunet-service-cadet_connection.h
@@ -57,7 +57,7 @@ typedef void
57 * @param cc connection to destroy 57 * @param cc connection to destroy
58 */ 58 */
59void 59void
60GCC_destroy_without_core(struct CadetConnection *cc); 60GCC_destroy_without_core (struct CadetConnection *cc);
61 61
62 62
63/** 63/**
@@ -68,7 +68,7 @@ GCC_destroy_without_core(struct CadetConnection *cc);
68 * @param cc connection to destroy 68 * @param cc connection to destroy
69 */ 69 */
70void 70void
71GCC_destroy_without_tunnel(struct CadetConnection *cc); 71GCC_destroy_without_tunnel (struct CadetConnection *cc);
72 72
73 73
74/** 74/**
@@ -78,7 +78,7 @@ GCC_destroy_without_tunnel(struct CadetConnection *cc);
78 * @return NULL if connection was not found 78 * @return NULL if connection was not found
79 */ 79 */
80struct CadetConnection * 80struct CadetConnection *
81GCC_lookup(const struct GNUNET_CADET_ConnectionTunnelIdentifier *cid); 81GCC_lookup (const struct GNUNET_CADET_ConnectionTunnelIdentifier *cid);
82 82
83 83
84/** 84/**
@@ -94,12 +94,12 @@ GCC_lookup(const struct GNUNET_CADET_ConnectionTunnelIdentifier *cid);
94 * @return handle to the connection 94 * @return handle to the connection
95 */ 95 */
96struct CadetConnection * 96struct CadetConnection *
97GCC_create(struct CadetPeer *destination, 97GCC_create (struct CadetPeer *destination,
98 struct CadetPeerPath *path, 98 struct CadetPeerPath *path,
99 unsigned int off, 99 unsigned int off,
100 struct CadetTConnection *ct, 100 struct CadetTConnection *ct,
101 GCC_ReadyCallback ready_cb, 101 GCC_ReadyCallback ready_cb,
102 void *ready_cb_cls); 102 void *ready_cb_cls);
103 103
104 104
105/** 105/**
@@ -116,12 +116,12 @@ GCC_create(struct CadetPeer *destination,
116 * a connection that takes precedence on @a path 116 * a connection that takes precedence on @a path
117 */ 117 */
118struct CadetConnection * 118struct CadetConnection *
119GCC_create_inbound(struct CadetPeer *destination, 119GCC_create_inbound (struct CadetPeer *destination,
120 struct CadetPeerPath *path, 120 struct CadetPeerPath *path,
121 struct CadetTConnection *ct, 121 struct CadetTConnection *ct,
122 const struct GNUNET_CADET_ConnectionTunnelIdentifier *cid, 122 const struct GNUNET_CADET_ConnectionTunnelIdentifier *cid,
123 GCC_ReadyCallback ready_cb, 123 GCC_ReadyCallback ready_cb,
124 void *ready_cb_cls); 124 void *ready_cb_cls);
125 125
126 126
127/** 127/**
@@ -137,8 +137,8 @@ GCC_create_inbound(struct CadetPeer *destination,
137 * connection identifier of this connection... 137 * connection identifier of this connection...
138 */ 138 */
139void 139void
140GCC_transmit(struct CadetConnection *cc, 140GCC_transmit (struct CadetConnection *cc,
141 struct GNUNET_MQ_Envelope *env); 141 struct GNUNET_MQ_Envelope *env);
142 142
143 143
144/** 144/**
@@ -147,7 +147,7 @@ GCC_transmit(struct CadetConnection *cc,
147 * @param cc the connection that got the ACK. 147 * @param cc the connection that got the ACK.
148 */ 148 */
149void 149void
150GCC_handle_connection_create_ack(struct CadetConnection *cc); 150GCC_handle_connection_create_ack (struct CadetConnection *cc);
151 151
152 152
153/** 153/**
@@ -158,7 +158,7 @@ GCC_handle_connection_create_ack(struct CadetConnection *cc);
158 * @param cc connection that got the duplicate CREATE 158 * @param cc connection that got the duplicate CREATE
159 */ 159 */
160void 160void
161GCC_handle_duplicate_create(struct CadetConnection *cc); 161GCC_handle_duplicate_create (struct CadetConnection *cc);
162 162
163 163
164/** 164/**
@@ -168,8 +168,8 @@ GCC_handle_duplicate_create(struct CadetConnection *cc);
168 * @param msg the key exchange message 168 * @param msg the key exchange message
169 */ 169 */
170void 170void
171GCC_handle_kx(struct CadetConnection *cc, 171GCC_handle_kx (struct CadetConnection *cc,
172 const struct GNUNET_CADET_TunnelKeyExchangeMessage *msg); 172 const struct GNUNET_CADET_TunnelKeyExchangeMessage *msg);
173 173
174 174
175/** 175/**
@@ -179,14 +179,16 @@ GCC_handle_kx(struct CadetConnection *cc,
179 * @param msg the key exchange message 179 * @param msg the key exchange message
180 */ 180 */
181void 181void
182GCC_handle_kx_auth(struct CadetConnection *cc, 182GCC_handle_kx_auth (struct CadetConnection *cc,
183 const struct GNUNET_CADET_TunnelKeyExchangeAuthMessage *msg); 183 const struct
184 GNUNET_CADET_TunnelKeyExchangeAuthMessage *msg);
184 185
185 186
186/** 187/**
187 * Performance metrics for a connection. 188 * Performance metrics for a connection.
188 */ 189 */
189struct CadetConnectionMetrics { 190struct CadetConnectionMetrics
191{
190 /** 192 /**
191 * Our current best estimate of the latency, based on a weighted 193 * Our current best estimate of the latency, based on a weighted
192 * average of at least @a latency_datapoints values. 194 * average of at least @a latency_datapoints values.
@@ -229,7 +231,7 @@ struct CadetConnectionMetrics {
229 * @return the metrics 231 * @return the metrics
230 */ 232 */
231const struct CadetConnectionMetrics * 233const struct CadetConnectionMetrics *
232GCC_get_metrics(struct CadetConnection *cc); 234GCC_get_metrics (struct CadetConnection *cc);
233 235
234 236
235/** 237/**
@@ -239,8 +241,8 @@ GCC_get_metrics(struct CadetConnection *cc);
239 * @param msg the encrypted message to decrypt 241 * @param msg the encrypted message to decrypt
240 */ 242 */
241void 243void
242GCC_handle_encrypted(struct CadetConnection *cc, 244GCC_handle_encrypted (struct CadetConnection *cc,
243 const struct GNUNET_CADET_TunnelEncryptedMessage *msg); 245 const struct GNUNET_CADET_TunnelEncryptedMessage *msg);
244 246
245 247
246/** 248/**
@@ -250,7 +252,7 @@ GCC_handle_encrypted(struct CadetConnection *cc,
250 * @param cid connection identifier where we expect an ACK 252 * @param cid connection identifier where we expect an ACK
251 */ 253 */
252void 254void
253GCC_ack_expected(const struct GNUNET_CADET_ConnectionTunnelIdentifier *cid); 255GCC_ack_expected (const struct GNUNET_CADET_ConnectionTunnelIdentifier *cid);
254 256
255 257
256/** 258/**
@@ -262,7 +264,7 @@ GCC_ack_expected(const struct GNUNET_CADET_ConnectionTunnelIdentifier *cid);
262 * may have gotten back to us via a different connection). 264 * may have gotten back to us via a different connection).
263 */ 265 */
264void 266void
265GCC_ack_observed(const struct GNUNET_CADET_ConnectionTunnelIdentifier *cid); 267GCC_ack_observed (const struct GNUNET_CADET_ConnectionTunnelIdentifier *cid);
266 268
267 269
268/** 270/**
@@ -274,8 +276,8 @@ GCC_ack_observed(const struct GNUNET_CADET_ConnectionTunnelIdentifier *cid);
274 * @param latency the observed latency 276 * @param latency the observed latency
275 */ 277 */
276void 278void
277GCC_latency_observed(const struct GNUNET_CADET_ConnectionTunnelIdentifier *cti, 279GCC_latency_observed (const struct GNUNET_CADET_ConnectionTunnelIdentifier *cti,
278 struct GNUNET_TIME_Relative latency); 280 struct GNUNET_TIME_Relative latency);
279 281
280 282
281/** 283/**
@@ -285,7 +287,7 @@ GCC_latency_observed(const struct GNUNET_CADET_ConnectionTunnelIdentifier *cti,
285 * @return corresponding entry in the tunnel's connection list 287 * @return corresponding entry in the tunnel's connection list
286 */ 288 */
287struct CadetTConnection * 289struct CadetTConnection *
288GCC_get_ct(struct CadetConnection *cc); 290GCC_get_ct (struct CadetConnection *cc);
289 291
290 292
291/** 293/**
@@ -296,8 +298,8 @@ GCC_get_ct(struct CadetConnection *cc);
296 * @return path to @a cc 298 * @return path to @a cc
297 */ 299 */
298struct CadetPeerPath * 300struct CadetPeerPath *
299GCC_get_path(struct CadetConnection *cc, 301GCC_get_path (struct CadetConnection *cc,
300 unsigned int *off); 302 unsigned int *off);
301 303
302 304
303/** 305/**
@@ -307,7 +309,7 @@ GCC_get_path(struct CadetConnection *cc,
307 * @return unique number of the connection 309 * @return unique number of the connection
308 */ 310 */
309const struct GNUNET_CADET_ConnectionTunnelIdentifier * 311const struct GNUNET_CADET_ConnectionTunnelIdentifier *
310GCC_get_id(struct CadetConnection *cc); 312GCC_get_id (struct CadetConnection *cc);
311 313
312 314
313/** 315/**
@@ -316,7 +318,7 @@ GCC_get_id(struct CadetConnection *cc);
316 * @param cc Connection. 318 * @param cc Connection.
317 */ 319 */
318const char * 320const char *
319GCC_2s(const struct CadetConnection *cc); 321GCC_2s (const struct CadetConnection *cc);
320 322
321 323
322/** 324/**
@@ -326,8 +328,8 @@ GCC_2s(const struct CadetConnection *cc);
326 * @param level Debug level to use. 328 * @param level Debug level to use.
327 */ 329 */
328void 330void
329GCC_debug(struct CadetConnection *cc, 331GCC_debug (struct CadetConnection *cc,
330 enum GNUNET_ErrorType level); 332 enum GNUNET_ErrorType level);
331 333
332 334
333#endif 335#endif