aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorChristian Grothoff <grothoff@gnunet.org>2021-09-19 23:35:17 +0200
committerChristian Grothoff <grothoff@gnunet.org>2021-09-19 23:35:17 +0200
commit48896731e966376ec6f256e175e0d12cd17afa42 (patch)
tree91d6e73d6861956831f22a644bef1026eecd8ec5 /src/include
parent10eac9bb7230973e2c37be9181c36bd086ca38de (diff)
downloadgnunet-48896731e966376ec6f256e175e0d12cd17afa42.tar.gz
gnunet-48896731e966376ec6f256e175e0d12cd17afa42.zip
more dhtu-gnunet basics
Diffstat (limited to 'src/include')
-rw-r--r--src/include/gnunet_hello_lib.h7
-rw-r--r--src/include/gnunet_mq_lib.h21
-rw-r--r--src/include/gnunet_transport_service.h21
3 files changed, 31 insertions, 18 deletions
diff --git a/src/include/gnunet_hello_lib.h b/src/include/gnunet_hello_lib.h
index fff0045aa..74eca999d 100644
--- a/src/include/gnunet_hello_lib.h
+++ b/src/include/gnunet_hello_lib.h
@@ -268,9 +268,10 @@ GNUNET_HELLO_add_address (const struct GNUNET_HELLO_Address *address,
268 * @return number of bytes written or 0, #GNUNET_SYSERR to signal the 268 * @return number of bytes written or 0, #GNUNET_SYSERR to signal the
269 * end of the iteration. 269 * end of the iteration.
270 */ 270 */
271typedef ssize_t (*GNUNET_HELLO_GenerateAddressListCallback) (void *cls, 271typedef ssize_t
272 size_t max, 272(*GNUNET_HELLO_GenerateAddressListCallback) (void *cls,
273 void *buf); 273 size_t max,
274 void *buf);
274 275
275 276
276/** 277/**
diff --git a/src/include/gnunet_mq_lib.h b/src/include/gnunet_mq_lib.h
index 37bba8c1b..765647a98 100644
--- a/src/include/gnunet_mq_lib.h
+++ b/src/include/gnunet_mq_lib.h
@@ -331,9 +331,10 @@ typedef int (*GNUNET_MQ_MessageValidationCallback) (
331 * @param msg the message to send 331 * @param msg the message to send
332 * @param impl_state state of the implementation 332 * @param impl_state state of the implementation
333 */ 333 */
334typedef void (*GNUNET_MQ_SendImpl) (struct GNUNET_MQ_Handle *mq, 334typedef void
335 const struct GNUNET_MessageHeader *msg, 335(*GNUNET_MQ_SendImpl) (struct GNUNET_MQ_Handle *mq,
336 void *impl_state); 336 const struct GNUNET_MessageHeader *msg,
337 void *impl_state);
337 338
338 339
339/** 340/**
@@ -345,8 +346,9 @@ typedef void (*GNUNET_MQ_SendImpl) (struct GNUNET_MQ_Handle *mq,
345 * @param mq the message queue to destroy 346 * @param mq the message queue to destroy
346 * @param impl_state state of the implementation 347 * @param impl_state state of the implementation
347 */ 348 */
348typedef void (*GNUNET_MQ_DestroyImpl) (struct GNUNET_MQ_Handle *mq, 349typedef void
349 void *impl_state); 350(*GNUNET_MQ_DestroyImpl) (struct GNUNET_MQ_Handle *mq,
351 void *impl_state);
350 352
351 353
352/** 354/**
@@ -355,8 +357,9 @@ typedef void (*GNUNET_MQ_DestroyImpl) (struct GNUNET_MQ_Handle *mq,
355 * @param mq message queue 357 * @param mq message queue
356 * @param impl_state state specific to the implementation 358 * @param impl_state state specific to the implementation
357 */ 359 */
358typedef void (*GNUNET_MQ_CancelImpl) (struct GNUNET_MQ_Handle *mq, 360typedef void
359 void *impl_state); 361(*GNUNET_MQ_CancelImpl) (struct GNUNET_MQ_Handle *mq,
362 void *impl_state);
360 363
361 364
362/** 365/**
@@ -368,7 +371,9 @@ typedef void (*GNUNET_MQ_CancelImpl) (struct GNUNET_MQ_Handle *mq,
368 * @param cls closure 371 * @param cls closure
369 * @param error error code 372 * @param error error code
370 */ 373 */
371typedef void (*GNUNET_MQ_ErrorHandler) (void *cls, enum GNUNET_MQ_Error error); 374typedef void
375(*GNUNET_MQ_ErrorHandler) (void *cls,
376 enum GNUNET_MQ_Error error);
372 377
373 378
374/** 379/**
diff --git a/src/include/gnunet_transport_service.h b/src/include/gnunet_transport_service.h
index d190eff92..545bb28d2 100644
--- a/src/include/gnunet_transport_service.h
+++ b/src/include/gnunet_transport_service.h
@@ -115,7 +115,8 @@ struct GNUNET_TRANSPORT_AddressToStringContext;
115 * if #GNUNET_NO: address was invalid (or not supported) 115 * if #GNUNET_NO: address was invalid (or not supported)
116 * if #GNUNET_SYSERR: communication error (IPC error) 116 * if #GNUNET_SYSERR: communication error (IPC error)
117 */ 117 */
118typedef void (*GNUNET_TRANSPORT_AddressToStringCallback) (void *cls, 118typedef void
119(*GNUNET_TRANSPORT_AddressToStringCallback) (void *cls,
119 const char *address, 120 const char *address,
120 int res); 121 int res);
121 122
@@ -326,7 +327,8 @@ struct GNUNET_TRANSPORT_PeerMonitoringContext;
326 * @param state current state this peer is in 327 * @param state current state this peer is in
327 * @param state_timeout timeout for the current state of the peer 328 * @param state_timeout timeout for the current state of the peer
328 */ 329 */
329typedef void (*GNUNET_TRANSPORT_PeerIterateCallback) ( 330typedef void
331(*GNUNET_TRANSPORT_PeerIterateCallback) (
330 void *cls, 332 void *cls,
331 const struct GNUNET_PeerIdentity *peer, 333 const struct GNUNET_PeerIdentity *peer,
332 const struct GNUNET_HELLO_Address *address, 334 const struct GNUNET_HELLO_Address *address,
@@ -394,7 +396,8 @@ struct GNUNET_TRANSPORT_Blacklist;
394 * @param pid peer to approve or disapproave 396 * @param pid peer to approve or disapproave
395 * @return #GNUNET_OK if the connection is allowed, #GNUNET_SYSERR if not 397 * @return #GNUNET_OK if the connection is allowed, #GNUNET_SYSERR if not
396 */ 398 */
397typedef int (*GNUNET_TRANSPORT_BlacklistCallback) ( 399typedef int
400(*GNUNET_TRANSPORT_BlacklistCallback) (
398 void *cls, 401 void *cls,
399 const struct GNUNET_PeerIdentity *pid); 402 const struct GNUNET_PeerIdentity *pid);
400 403
@@ -541,7 +544,8 @@ struct GNUNET_TRANSPORT_SessionInfo
541 * NULL with @a session being non-NULL if the monitor 544 * NULL with @a session being non-NULL if the monitor
542 * was being cancelled while sessions were active 545 * was being cancelled while sessions were active
543 */ 546 */
544typedef void (*GNUNET_TRANSPORT_SessionMonitorCallback) ( 547typedef void
548(*GNUNET_TRANSPORT_SessionMonitorCallback) (
545 void *cls, 549 void *cls,
546 struct GNUNET_TRANSPORT_PluginSession *session, 550 struct GNUNET_TRANSPORT_PluginSession *session,
547 void **session_ctx, 551 void **session_ctx,
@@ -593,7 +597,8 @@ struct GNUNET_TRANSPORT_CoreHandle;
593 * @param mq message queue to use to transmit to @a peer 597 * @param mq message queue to use to transmit to @a peer
594 * @return closure to use in MQ handlers 598 * @return closure to use in MQ handlers
595 */ 599 */
596typedef void *(*GNUNET_TRANSPORT_NotifyConnect) ( 600typedef void *
601(*GNUNET_TRANSPORT_NotifyConnect) (
597 void *cls, 602 void *cls,
598 const struct GNUNET_PeerIdentity *peer, 603 const struct GNUNET_PeerIdentity *peer,
599 struct GNUNET_MQ_Handle *mq); 604 struct GNUNET_MQ_Handle *mq);
@@ -610,7 +615,8 @@ typedef void *(*GNUNET_TRANSPORT_NotifyConnect) (
610 * @param handlers_cls closure of the handlers, was returned from the 615 * @param handlers_cls closure of the handlers, was returned from the
611 * connect notification callback 616 * connect notification callback
612 */ 617 */
613typedef void (*GNUNET_TRANSPORT_NotifyDisconnect) ( 618typedef void
619(*GNUNET_TRANSPORT_NotifyDisconnect) (
614 void *cls, 620 void *cls,
615 const struct GNUNET_PeerIdentity *peer, 621 const struct GNUNET_PeerIdentity *peer,
616 void *handler_cls); 622 void *handler_cls);
@@ -632,7 +638,8 @@ typedef void (*GNUNET_TRANSPORT_NotifyDisconnect) (
632 * @param handlers_cls closure of the handlers, was returned from the 638 * @param handlers_cls closure of the handlers, was returned from the
633 * connect notification callback 639 * connect notification callback
634 */ 640 */
635typedef void (*GNUNET_TRANSPORT_NotifyExcessBandwidth) ( 641typedef void
642(*GNUNET_TRANSPORT_NotifyExcessBandwidth) (
636 void *cls, 643 void *cls,
637 const struct GNUNET_PeerIdentity *neighbour, 644 const struct GNUNET_PeerIdentity *neighbour,
638 void *handlers_cls); 645 void *handlers_cls);