aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_transport_communication_service.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/gnunet_transport_communication_service.h')
-rw-r--r--src/include/gnunet_transport_communication_service.h27
1 files changed, 11 insertions, 16 deletions
diff --git a/src/include/gnunet_transport_communication_service.h b/src/include/gnunet_transport_communication_service.h
index ea1ff732e..e7c8be0c6 100644
--- a/src/include/gnunet_transport_communication_service.h
+++ b/src/include/gnunet_transport_communication_service.h
@@ -16,7 +16,7 @@
16 along with this program. If not, see <http://www.gnu.org/licenses/>. 16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17 17
18 SPDX-License-Identifier: AGPL3.0-or-later 18 SPDX-License-Identifier: AGPL3.0-or-later
19*/ 19 */
20 20
21/** 21/**
22 * @author Christian Grothoff 22 * @author Christian Grothoff
@@ -87,9 +87,7 @@ struct GNUNET_TRANSPORT_CommunicatorHandle;
87 * FIXME: may want to distinguish bi-directional as well, 87 * FIXME: may want to distinguish bi-directional as well,
88 * should we define a bit for that? Needed in DV logic (handle_dv_learn)! 88 * should we define a bit for that? Needed in DV logic (handle_dv_learn)!
89 */ 89 */
90enum GNUNET_TRANSPORT_CommunicatorCharacteristics 90enum GNUNET_TRANSPORT_CommunicatorCharacteristics {
91{
92
93 /** 91 /**
94 * Characteristics are unknown (i.e. DV). 92 * Characteristics are unknown (i.e. DV).
95 */ 93 */
@@ -104,7 +102,6 @@ enum GNUNET_TRANSPORT_CommunicatorCharacteristics
104 * Transmission is unreliable (i.e. UDP) 102 * Transmission is unreliable (i.e. UDP)
105 */ 103 */
106 GNUNET_TRANSPORT_CC_UNRELIABLE = 2 104 GNUNET_TRANSPORT_CC_UNRELIABLE = 2
107
108}; 105};
109 106
110 107
@@ -146,7 +143,7 @@ typedef void (*GNUNET_TRANSPORT_CommunicatorNotify) (
146 * @return NULL on error 143 * @return NULL on error
147 */ 144 */
148struct GNUNET_TRANSPORT_CommunicatorHandle * 145struct GNUNET_TRANSPORT_CommunicatorHandle *
149GNUNET_TRANSPORT_communicator_connect ( 146GNUNET_TRANSPORT_communicator_connect(
150 const struct GNUNET_CONFIGURATION_Handle *cfg, 147 const struct GNUNET_CONFIGURATION_Handle *cfg,
151 const char *config_section_name, 148 const char *config_section_name,
152 const char *addr_prefix, 149 const char *addr_prefix,
@@ -163,7 +160,7 @@ GNUNET_TRANSPORT_communicator_connect (
163 * @param ch handle returned from connect 160 * @param ch handle returned from connect
164 */ 161 */
165void 162void
166GNUNET_TRANSPORT_communicator_disconnect ( 163GNUNET_TRANSPORT_communicator_disconnect(
167 struct GNUNET_TRANSPORT_CommunicatorHandle *ch); 164 struct GNUNET_TRANSPORT_CommunicatorHandle *ch);
168 165
169 166
@@ -203,7 +200,7 @@ typedef void (*GNUNET_TRANSPORT_MessageCompletedCallback) (void *cls,
203 * the tranport service is not yet up 200 * the tranport service is not yet up
204 */ 201 */
205int 202int
206GNUNET_TRANSPORT_communicator_receive ( 203GNUNET_TRANSPORT_communicator_receive(
207 struct GNUNET_TRANSPORT_CommunicatorHandle *handle, 204 struct GNUNET_TRANSPORT_CommunicatorHandle *handle,
208 const struct GNUNET_PeerIdentity *sender, 205 const struct GNUNET_PeerIdentity *sender,
209 const struct GNUNET_MessageHeader *msg, 206 const struct GNUNET_MessageHeader *msg,
@@ -224,9 +221,7 @@ struct GNUNET_TRANSPORT_QueueHandle;
224/** 221/**
225 * Possible states of a connection. 222 * Possible states of a connection.
226 */ 223 */
227enum GNUNET_TRANSPORT_ConnectionStatus 224enum GNUNET_TRANSPORT_ConnectionStatus {
228{
229
230 /** 225 /**
231 * Connection is down. 226 * Connection is down.
232 */ 227 */
@@ -260,7 +255,7 @@ enum GNUNET_TRANSPORT_ConnectionStatus
260 * @return API handle identifying the new MQ 255 * @return API handle identifying the new MQ
261 */ 256 */
262struct GNUNET_TRANSPORT_QueueHandle * 257struct GNUNET_TRANSPORT_QueueHandle *
263GNUNET_TRANSPORT_communicator_mq_add ( 258GNUNET_TRANSPORT_communicator_mq_add(
264 struct GNUNET_TRANSPORT_CommunicatorHandle *ch, 259 struct GNUNET_TRANSPORT_CommunicatorHandle *ch,
265 const struct GNUNET_PeerIdentity *peer, 260 const struct GNUNET_PeerIdentity *peer,
266 const char *address, 261 const char *address,
@@ -277,7 +272,7 @@ GNUNET_TRANSPORT_communicator_mq_add (
277 * @param qh handle for the queue that must be invalidated 272 * @param qh handle for the queue that must be invalidated
278 */ 273 */
279void 274void
280GNUNET_TRANSPORT_communicator_mq_del (struct GNUNET_TRANSPORT_QueueHandle *qh); 275GNUNET_TRANSPORT_communicator_mq_del(struct GNUNET_TRANSPORT_QueueHandle *qh);
281 276
282 277
283/** 278/**
@@ -297,7 +292,7 @@ struct GNUNET_TRANSPORT_AddressIdentifier;
297 * @param expiration when does the communicator forsee this address expiring? 292 * @param expiration when does the communicator forsee this address expiring?
298 */ 293 */
299struct GNUNET_TRANSPORT_AddressIdentifier * 294struct GNUNET_TRANSPORT_AddressIdentifier *
300GNUNET_TRANSPORT_communicator_address_add ( 295GNUNET_TRANSPORT_communicator_address_add(
301 struct GNUNET_TRANSPORT_CommunicatorHandle *ch, 296 struct GNUNET_TRANSPORT_CommunicatorHandle *ch,
302 const char *address, 297 const char *address,
303 enum GNUNET_NetworkType nt, 298 enum GNUNET_NetworkType nt,
@@ -311,7 +306,7 @@ GNUNET_TRANSPORT_communicator_address_add (
311 * @param ai address that is no longer provided 306 * @param ai address that is no longer provided
312 */ 307 */
313void 308void
314GNUNET_TRANSPORT_communicator_address_remove ( 309GNUNET_TRANSPORT_communicator_address_remove(
315 struct GNUNET_TRANSPORT_AddressIdentifier *ai); 310 struct GNUNET_TRANSPORT_AddressIdentifier *ai);
316 311
317 312
@@ -334,7 +329,7 @@ GNUNET_TRANSPORT_communicator_address_remove (
334 * notify-API to @a pid's communicator @a comm 329 * notify-API to @a pid's communicator @a comm
335 */ 330 */
336void 331void
337GNUNET_TRANSPORT_communicator_notify ( 332GNUNET_TRANSPORT_communicator_notify(
338 struct GNUNET_TRANSPORT_CommunicatorHandle *ch, 333 struct GNUNET_TRANSPORT_CommunicatorHandle *ch,
339 const struct GNUNET_PeerIdentity *pid, 334 const struct GNUNET_PeerIdentity *pid,
340 const char *comm, 335 const char *comm,