diff options
Diffstat (limited to 'src/cadet/gnunet-service-cadet_connection.h')
-rw-r--r-- | src/cadet/gnunet-service-cadet_connection.h | 78 |
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 | */ |
59 | void | 59 | void |
60 | GCC_destroy_without_core(struct CadetConnection *cc); | 60 | GCC_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 | */ |
70 | void | 70 | void |
71 | GCC_destroy_without_tunnel(struct CadetConnection *cc); | 71 | GCC_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 | */ |
80 | struct CadetConnection * | 80 | struct CadetConnection * |
81 | GCC_lookup(const struct GNUNET_CADET_ConnectionTunnelIdentifier *cid); | 81 | GCC_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 | */ |
96 | struct CadetConnection * | 96 | struct CadetConnection * |
97 | GCC_create(struct CadetPeer *destination, | 97 | GCC_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 | */ |
118 | struct CadetConnection * | 118 | struct CadetConnection * |
119 | GCC_create_inbound(struct CadetPeer *destination, | 119 | GCC_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 | */ |
139 | void | 139 | void |
140 | GCC_transmit(struct CadetConnection *cc, | 140 | GCC_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 | */ |
149 | void | 149 | void |
150 | GCC_handle_connection_create_ack(struct CadetConnection *cc); | 150 | GCC_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 | */ |
160 | void | 160 | void |
161 | GCC_handle_duplicate_create(struct CadetConnection *cc); | 161 | GCC_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 | */ |
170 | void | 170 | void |
171 | GCC_handle_kx(struct CadetConnection *cc, | 171 | GCC_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 | */ |
181 | void | 181 | void |
182 | GCC_handle_kx_auth(struct CadetConnection *cc, | 182 | GCC_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 | */ |
189 | struct CadetConnectionMetrics { | 190 | struct 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 | */ |
231 | const struct CadetConnectionMetrics * | 233 | const struct CadetConnectionMetrics * |
232 | GCC_get_metrics(struct CadetConnection *cc); | 234 | GCC_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 | */ |
241 | void | 243 | void |
242 | GCC_handle_encrypted(struct CadetConnection *cc, | 244 | GCC_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 | */ |
252 | void | 254 | void |
253 | GCC_ack_expected(const struct GNUNET_CADET_ConnectionTunnelIdentifier *cid); | 255 | GCC_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 | */ |
264 | void | 266 | void |
265 | GCC_ack_observed(const struct GNUNET_CADET_ConnectionTunnelIdentifier *cid); | 267 | GCC_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 | */ |
276 | void | 278 | void |
277 | GCC_latency_observed(const struct GNUNET_CADET_ConnectionTunnelIdentifier *cti, | 279 | GCC_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 | */ |
287 | struct CadetTConnection * | 289 | struct CadetTConnection * |
288 | GCC_get_ct(struct CadetConnection *cc); | 290 | GCC_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 | */ |
298 | struct CadetPeerPath * | 300 | struct CadetPeerPath * |
299 | GCC_get_path(struct CadetConnection *cc, | 301 | GCC_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 | */ |
309 | const struct GNUNET_CADET_ConnectionTunnelIdentifier * | 311 | const struct GNUNET_CADET_ConnectionTunnelIdentifier * |
310 | GCC_get_id(struct CadetConnection *cc); | 312 | GCC_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 | */ |
318 | const char * | 320 | const char * |
319 | GCC_2s(const struct CadetConnection *cc); | 321 | GCC_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 | */ |
328 | void | 330 | void |
329 | GCC_debug(struct CadetConnection *cc, | 331 | GCC_debug (struct CadetConnection *cc, |
330 | enum GNUNET_ErrorType level); | 332 | enum GNUNET_ErrorType level); |
331 | 333 | ||
332 | 334 | ||
333 | #endif | 335 | #endif |