aboutsummaryrefslogtreecommitdiff
path: root/src/transport/transport_api_monitoring.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2014-06-22 20:02:10 +0000
committerChristian Grothoff <christian@grothoff.org>2014-06-22 20:02:10 +0000
commit194669680385bd40ce7c84b11021b21b6ed6d295 (patch)
treedda0c95d15c0956efb37fdf4dc02ff83de10c5e6 /src/transport/transport_api_monitoring.c
parent658f44879747d23c92e30ca004b04e2dddac73d8 (diff)
downloadgnunet-194669680385bd40ce7c84b11021b21b6ed6d295.tar.gz
gnunet-194669680385bd40ce7c84b11021b21b6ed6d295.zip
-doxygen, indentation
Diffstat (limited to 'src/transport/transport_api_monitoring.c')
-rw-r--r--src/transport/transport_api_monitoring.c32
1 files changed, 20 insertions, 12 deletions
diff --git a/src/transport/transport_api_monitoring.c b/src/transport/transport_api_monitoring.c
index b44bf51b8..adea00278 100644
--- a/src/transport/transport_api_monitoring.c
+++ b/src/transport/transport_api_monitoring.c
@@ -48,7 +48,7 @@ struct GNUNET_TRANSPORT_PeerMonitoringContext
48 GNUNET_TRANSPORT_PeerIterateCallback cb; 48 GNUNET_TRANSPORT_PeerIterateCallback cb;
49 49
50 /** 50 /**
51 * Closure for cb. 51 * Closure for @e cb.
52 */ 52 */
53 void *cb_cls; 53 void *cb_cls;
54 54
@@ -100,7 +100,7 @@ struct GNUNET_TRANSPORT_ValidationMonitoringContext
100 GNUNET_TRANSPORT_ValidationIterateCallback cb; 100 GNUNET_TRANSPORT_ValidationIterateCallback cb;
101 101
102 /** 102 /**
103 * Closure for cb. 103 * Closure for @e cb.
104 */ 104 */
105 void *cb_cls; 105 void *cb_cls;
106 106
@@ -140,11 +140,12 @@ struct GNUNET_TRANSPORT_ValidationMonitoringContext
140 int one_shot; 140 int one_shot;
141}; 141};
142 142
143
143/** 144/**
144 * Check if a state is defined as connected 145 * Check if a state is defined as connected
145 * 146 *
146 * @param state the state value 147 * @param state the state value
147 * @return GNUNET_YES or GNUNET_NO 148 * @return #GNUNET_YES or #GNUNET_NO
148 */ 149 */
149int 150int
150GNUNET_TRANSPORT_is_connected (enum GNUNET_TRANSPORT_PeerState state) 151GNUNET_TRANSPORT_is_connected (enum GNUNET_TRANSPORT_PeerState state)
@@ -175,6 +176,7 @@ GNUNET_TRANSPORT_is_connected (enum GNUNET_TRANSPORT_PeerState state)
175 return GNUNET_SYSERR; 176 return GNUNET_SYSERR;
176} 177}
177 178
179
178/** 180/**
179 * Convert peer state to human-readable string. 181 * Convert peer state to human-readable string.
180 * 182 *
@@ -214,6 +216,7 @@ GNUNET_TRANSPORT_ps2s (enum GNUNET_TRANSPORT_PeerState state)
214 } 216 }
215} 217}
216 218
219
217/** 220/**
218 * Convert validation state to human-readable string. 221 * Convert validation state to human-readable string.
219 * 222 *
@@ -250,7 +253,8 @@ GNUNET_TRANSPORT_vs2s (enum GNUNET_TRANSPORT_ValidationState state)
250 * message with the human-readable address 253 * message with the human-readable address
251 */ 254 */
252static void 255static void
253peer_response_processor (void *cls, const struct GNUNET_MessageHeader *msg); 256peer_response_processor (void *cls,
257 const struct GNUNET_MessageHeader *msg);
254 258
255 259
256/** 260/**
@@ -261,7 +265,9 @@ peer_response_processor (void *cls, const struct GNUNET_MessageHeader *msg);
261 * message with the human-readable address 265 * message with the human-readable address
262 */ 266 */
263static void 267static void
264val_response_processor (void *cls, const struct GNUNET_MessageHeader *msg); 268val_response_processor (void *cls,
269 const struct GNUNET_MessageHeader *msg);
270
265 271
266/** 272/**
267 * Send our subscription request to the service. 273 * Send our subscription request to the service.
@@ -279,13 +285,14 @@ send_peer_mon_request (struct GNUNET_TRANSPORT_PeerMonitoringContext *pal_ctx)
279 msg.peer = pal_ctx->peer; 285 msg.peer = pal_ctx->peer;
280 GNUNET_assert (GNUNET_OK == 286 GNUNET_assert (GNUNET_OK ==
281 GNUNET_CLIENT_transmit_and_get_response (pal_ctx->client, 287 GNUNET_CLIENT_transmit_and_get_response (pal_ctx->client,
282 &msg.header, 288 &msg.header,
283 GNUNET_TIME_absolute_get_remaining (pal_ctx->timeout), 289 GNUNET_TIME_absolute_get_remaining (pal_ctx->timeout),
284 GNUNET_YES, 290 GNUNET_YES,
285 &peer_response_processor, 291 &peer_response_processor,
286 pal_ctx)); 292 pal_ctx));
287} 293}
288 294
295
289/** 296/**
290 * Send our subscription request to the service. 297 * Send our subscription request to the service.
291 * 298 *
@@ -312,12 +319,12 @@ send_val_mon_request (struct GNUNET_TRANSPORT_ValidationMonitoringContext *val_c
312/** 319/**
313 * Task run to re-establish the connection. 320 * Task run to re-establish the connection.
314 * 321 *
315 * @param cls our 'struct GNUNET_TRANSPORT_PeerAddressLookupContext*' 322 * @param cls our `struct GNUNET_TRANSPORT_PeerAddressLookupContext *`
316 * @param tc scheduler context, unused 323 * @param tc scheduler context, unused
317 */ 324 */
318static void 325static void
319do_peer_connect (void *cls, 326do_peer_connect (void *cls,
320 const struct GNUNET_SCHEDULER_TaskContext *tc) 327 const struct GNUNET_SCHEDULER_TaskContext *tc)
321{ 328{
322 struct GNUNET_TRANSPORT_PeerMonitoringContext *pal_ctx = cls; 329 struct GNUNET_TRANSPORT_PeerMonitoringContext *pal_ctx = cls;
323 330
@@ -367,6 +374,7 @@ do_val_connect (void *cls,
367 send_val_mon_request (val_ctx); 374 send_val_mon_request (val_ctx);
368} 375}
369 376
377
370/** 378/**
371 * Cut the existing connection and reconnect. 379 * Cut the existing connection and reconnect.
372 * 380 *