aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_transport_communication_service.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2018-12-16 17:13:42 +0100
committerChristian Grothoff <christian@grothoff.org>2018-12-16 17:13:42 +0100
commitd37218d0b13292b78fcfc08d2903d6e415da0236 (patch)
treef9f354e6859b9868859cf421acbf747d8351ee7b /src/include/gnunet_transport_communication_service.h
parent18784b77764c56842ae59428f3ebea95c157ffab (diff)
downloadgnunet-d37218d0b13292b78fcfc08d2903d6e415da0236.tar.gz
gnunet-d37218d0b13292b78fcfc08d2903d6e415da0236.zip
more work on tng
Diffstat (limited to 'src/include/gnunet_transport_communication_service.h')
-rw-r--r--src/include/gnunet_transport_communication_service.h39
1 files changed, 24 insertions, 15 deletions
diff --git a/src/include/gnunet_transport_communication_service.h b/src/include/gnunet_transport_communication_service.h
index 2ba1f831a..a5547778e 100644
--- a/src/include/gnunet_transport_communication_service.h
+++ b/src/include/gnunet_transport_communication_service.h
@@ -105,15 +105,23 @@ enum GNUNET_TRANSPORT_CommunicatorCharacteristics {
105/** 105/**
106 * Function called when the transport service has received an 106 * Function called when the transport service has received an
107 * acknowledgement for this communicator (!) via a different return 107 * acknowledgement for this communicator (!) via a different return
108 * path. 108 * path.
109 *
110 * Typically used to receive messages of type
111 * #GNUNET_MESSAGE_TYPE_TRANSPORT_COMMUNICATOR_FC_LIMITS or
112 * #GNUNET_MESSAGE_TYPE_TRANSPORT_COMMUNICATOR_KX_CONFIRMATION
113 * as well as communicator-specific messages to assist with
114 * NAT traversal.
115 *
116 * @param cls closure
117 * @param sender which peer sent the notification
118 * @param msg payload
109 */ 119 */
110typedef void 120typedef void
111(*GNUNET_TRANSPORT_CommunicatorNotify) (void *cls, 121(*GNUNET_TRANSPORT_CommunicatorNotify) (void *cls,
112 const struct GNUNET_PeerIdentity *sender, 122 const struct GNUNET_PeerIdentity *sender,
113 struct GNUNET_TIME_Absolute monotonic_time, 123 const struct GNUNET_MessageHeader *msg);
114 struct GNUNET_TIME_Relative validity, 124
115 const struct GNUNET_HashCode *token
116 );
117 125
118/** 126/**
119 * Connect to the transport service. 127 * Connect to the transport service.
@@ -127,6 +135,8 @@ typedef void
127 * the address of another peer, can be NULL if the 135 * the address of another peer, can be NULL if the
128 * communicator only supports receiving messages 136 * communicator only supports receiving messages
129 * @param mq_init_cls closure for @a mq_init 137 * @param mq_init_cls closure for @a mq_init
138 * @param notify_cb function to pass backchannel messages to communicator
139 * @param notify_cb_cls closure for @a notify_cb
130 * @return NULL on error 140 * @return NULL on error
131 */ 141 */
132struct GNUNET_TRANSPORT_CommunicatorHandle * 142struct GNUNET_TRANSPORT_CommunicatorHandle *
@@ -135,9 +145,9 @@ GNUNET_TRANSPORT_communicator_connect (const struct GNUNET_CONFIGURATION_Handle
135 const char *addr_prefix, 145 const char *addr_prefix,
136 enum GNUNET_TRANSPORT_CommunicatorCharacteristics cc, 146 enum GNUNET_TRANSPORT_CommunicatorCharacteristics cc,
137 GNUNET_TRANSPORT_CommunicatorMqInit mq_init, 147 GNUNET_TRANSPORT_CommunicatorMqInit mq_init,
138 void *mq_init_cls); 148 void *mq_init_cls,
139// GNUNET_TRANSPORT_CommunicatorNotify notify_cb, 149 GNUNET_TRANSPORT_CommunicatorNotify notify_cb,
140// void *notify_cb_cls); 150 void *notify_cb_cls);
141 151
142 152
143/** 153/**
@@ -221,7 +231,7 @@ enum GNUNET_TRANSPORT_ConnectionStatus {
221 231
222 232
223/** 233/**
224 * Notify transport service that an MQ became available due to an 234 * Notify transport service that a MQ became available due to an
225 * "inbound" connection or because the communicator discovered the 235 * "inbound" connection or because the communicator discovered the
226 * presence of another peer. 236 * presence of another peer.
227 * 237 *
@@ -299,17 +309,16 @@ GNUNET_TRANSPORT_communicator_address_remove (struct GNUNET_TRANSPORT_AddressIde
299 * send the message back itself). 309 * send the message back itself).
300 * 310 *
301 * @param ch handle of this communicator 311 * @param ch handle of this communicator
302 * @param target_pid peer to send the message to 312 * @param pid peer to send the message to
303 * @param target_comm name of the communicator to send the message to 313 * @param comm name of the communicator to send the message to
314 * @param header header of the message to transmit and pass via the
315 * notify-API to @a pid's communicator @a comm
304 */ 316 */
305void 317void
306GNUNET_TRANSPORT_communicator_notify (struct GNUNET_TRANSPORT_CommunicatorHandle *ch, 318GNUNET_TRANSPORT_communicator_notify (struct GNUNET_TRANSPORT_CommunicatorHandle *ch,
307 const struct GNUNET_PeerIdentity *pid, 319 const struct GNUNET_PeerIdentity *pid,
308 const char *comm, 320 const char *comm,
309 struct GNUNET_TIME_Absolute monotonic_time, 321 const struct GNUNET_MessageHeader *header);
310 struct GNUNET_TIME_Relative validity,
311 const struct GNUNET_HashCode *token
312 );
313 322
314 323
315#if 0 /* keep Emacsens' auto-indent happy */ 324#if 0 /* keep Emacsens' auto-indent happy */