diff options
Diffstat (limited to 'src/include/gnunet_transport_communication_service.h')
-rw-r--r-- | src/include/gnunet_transport_communication_service.h | 39 |
1 files changed, 38 insertions, 1 deletions
diff --git a/src/include/gnunet_transport_communication_service.h b/src/include/gnunet_transport_communication_service.h index f81ee6d9a..8cf275660 100644 --- a/src/include/gnunet_transport_communication_service.h +++ b/src/include/gnunet_transport_communication_service.h | |||
@@ -103,6 +103,19 @@ enum GNUNET_TRANSPORT_CommunicatorCharacteristics { | |||
103 | 103 | ||
104 | 104 | ||
105 | /** | 105 | /** |
106 | * Function called when the transport service has received an | ||
107 | * acknowledgement for this communicator (!) via a different return | ||
108 | * path. | ||
109 | */ | ||
110 | typedef void | ||
111 | (*GNUNET_TRANSPORT_CommunicatorNotify) (void *cls, | ||
112 | const struct GNUNET_PeerIdentity *sender, | ||
113 | struct GNUNET_TIME_Absolute monotonic_time, | ||
114 | struct GNUNET_TIME_Relative validity, | ||
115 | const struct GNUNET_HashCode *token | ||
116 | ); | ||
117 | |||
118 | /** | ||
106 | * Connect to the transport service. | 119 | * Connect to the transport service. |
107 | * | 120 | * |
108 | * @param cfg configuration to use | 121 | * @param cfg configuration to use |
@@ -122,7 +135,9 @@ GNUNET_TRANSPORT_communicator_connect (const struct GNUNET_CONFIGURATION_Handle | |||
122 | const char *addr_prefix, | 135 | const char *addr_prefix, |
123 | enum GNUNET_TRANSPORT_CommunicatorCharacteristics cc, | 136 | enum GNUNET_TRANSPORT_CommunicatorCharacteristics cc, |
124 | GNUNET_TRANSPORT_CommunicatorMqInit mq_init, | 137 | GNUNET_TRANSPORT_CommunicatorMqInit mq_init, |
125 | void *mq_init_cls); | 138 | void *mq_init_cls, |
139 | GNUNET_TRANSPORT_CommunicatorNotify notify_cb, | ||
140 | void *notify_cb_cls); | ||
126 | 141 | ||
127 | 142 | ||
128 | /** | 143 | /** |
@@ -275,6 +290,28 @@ void | |||
275 | GNUNET_TRANSPORT_communicator_address_remove (struct GNUNET_TRANSPORT_AddressIdentifier *ai); | 290 | GNUNET_TRANSPORT_communicator_address_remove (struct GNUNET_TRANSPORT_AddressIdentifier *ai); |
276 | 291 | ||
277 | 292 | ||
293 | /** | ||
294 | * The communicator asks the transport service to route a message via | ||
295 | * a different path to another communicator service at another peer. | ||
296 | * This must only be done for special control traffic (as there is no | ||
297 | * flow control for this API), such as acknowledgements, and generally | ||
298 | * only be done if the communicator is uni-directional (i.e. cannot | ||
299 | * send the message back itself). | ||
300 | * | ||
301 | * @param ch handle of this communicator | ||
302 | * @param target_pid peer to send the message to | ||
303 | * @param target_comm name of the communicator to send the message to | ||
304 | */ | ||
305 | void | ||
306 | GNUNET_TRANSPORT_communicator_notify (struct GNUNET_TRANSPORT_CommunicatorHandle *ch, | ||
307 | const struct GNUNET_PeerIdentity *pid, | ||
308 | const char *comm, | ||
309 | struct GNUNET_TIME_Absolute monotonic_time, | ||
310 | struct GNUNET_TIME_Relative validity, | ||
311 | const struct GNUNET_HashCode *token | ||
312 | ); | ||
313 | |||
314 | |||
278 | #if 0 /* keep Emacsens' auto-indent happy */ | 315 | #if 0 /* keep Emacsens' auto-indent happy */ |
279 | { | 316 | { |
280 | #endif | 317 | #endif |