summaryrefslogtreecommitdiff
path: root/src/include/gnunet_transport_plugin.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/gnunet_transport_plugin.h')
-rw-r--r--src/include/gnunet_transport_plugin.h42
1 files changed, 28 insertions, 14 deletions
diff --git a/src/include/gnunet_transport_plugin.h b/src/include/gnunet_transport_plugin.h
index 12ecb88f2..5ca9f5015 100644
--- a/src/include/gnunet_transport_plugin.h
+++ b/src/include/gnunet_transport_plugin.h
@@ -118,9 +118,11 @@ typedef void
118 */ 118 */
119typedef struct GNUNET_TIME_Relative 119typedef struct GNUNET_TIME_Relative
120(*GNUNET_TRANSPORT_PluginReceiveCallback) (void *cls, 120(*GNUNET_TRANSPORT_PluginReceiveCallback) (void *cls,
121 const struct GNUNET_HELLO_Address *address, 121 const struct
122 GNUNET_HELLO_Address *address,
122 struct GNUNET_ATS_Session *session, 123 struct GNUNET_ATS_Session *session,
123 const struct GNUNET_MessageHeader *message); 124 const struct
125 GNUNET_MessageHeader *message);
124 126
125 127
126/** 128/**
@@ -148,7 +150,8 @@ typedef enum GNUNET_NetworkType
148 */ 150 */
149typedef void 151typedef void
150(*GNUNET_TRANSPORT_UpdateAddressDistance) (void *cls, 152(*GNUNET_TRANSPORT_UpdateAddressDistance) (void *cls,
151 const struct GNUNET_HELLO_Address *address, 153 const struct
154 GNUNET_HELLO_Address *address,
152 uint32_t distance); 155 uint32_t distance);
153 156
154 157
@@ -164,7 +167,8 @@ typedef void
164typedef void 167typedef void
165(*GNUNET_TRANSPORT_AddressNotification) (void *cls, 168(*GNUNET_TRANSPORT_AddressNotification) (void *cls,
166 int add_remove, 169 int add_remove,
167 const struct GNUNET_HELLO_Address *address); 170 const struct
171 GNUNET_HELLO_Address *address);
168 172
169 173
170/** 174/**
@@ -203,7 +207,8 @@ typedef const struct GNUNET_MessageHeader *
203 * of this type as the first and only argument to the 207 * of this type as the first and only argument to the
204 * entry point of each transport plugin. 208 * entry point of each transport plugin.
205 */ 209 */
206struct GNUNET_TRANSPORT_PluginEnvironment { 210struct GNUNET_TRANSPORT_PluginEnvironment
211{
207 /** 212 /**
208 * Configuration to use. 213 * Configuration to use.
209 */ 214 */
@@ -300,7 +305,8 @@ struct GNUNET_TRANSPORT_PluginEnvironment {
300 */ 305 */
301typedef void 306typedef void
302(*GNUNET_TRANSPORT_TransmitContinuation) (void *cls, 307(*GNUNET_TRANSPORT_TransmitContinuation) (void *cls,
303 const struct GNUNET_PeerIdentity *target, 308 const struct
309 GNUNET_PeerIdentity *target,
304 int result, 310 int result,
305 size_t size_payload, 311 size_t size_payload,
306 size_t size_on_wire); 312 size_t size_on_wire);
@@ -360,7 +366,8 @@ typedef ssize_t
360 */ 366 */
361typedef int 367typedef int
362(*GNUNET_TRANSPORT_DisconnectSessionFunction) (void *cls, 368(*GNUNET_TRANSPORT_DisconnectSessionFunction) (void *cls,
363 struct GNUNET_ATS_Session *session); 369 struct GNUNET_ATS_Session *
370 session);
364 371
365 372
366/** 373/**
@@ -389,7 +396,8 @@ typedef unsigned int
389 */ 396 */
390typedef void 397typedef void
391(*GNUNET_TRANSPORT_DisconnectPeerFunction) (void *cls, 398(*GNUNET_TRANSPORT_DisconnectPeerFunction) (void *cls,
392 const struct GNUNET_PeerIdentity *target); 399 const struct
400 GNUNET_PeerIdentity *target);
393 401
394 402
395/** 403/**
@@ -433,7 +441,8 @@ typedef void
433 size_t addrlen, 441 size_t addrlen,
434 int numeric, 442 int numeric,
435 struct GNUNET_TIME_Relative timeout, 443 struct GNUNET_TIME_Relative timeout,
436 GNUNET_TRANSPORT_AddressStringCallback asc, 444 GNUNET_TRANSPORT_AddressStringCallback
445 asc,
437 void *asc_cls); 446 void *asc_cls);
438 447
439 448
@@ -482,7 +491,8 @@ typedef struct GNUNET_ATS_Session *
482 */ 491 */
483typedef void 492typedef void
484(*GNUNET_TRANSPORT_UpdateSessionTimeout) (void *cls, 493(*GNUNET_TRANSPORT_UpdateSessionTimeout) (void *cls,
485 const struct GNUNET_PeerIdentity *peer, 494 const struct
495 GNUNET_PeerIdentity *peer,
486 struct GNUNET_ATS_Session *session); 496 struct GNUNET_ATS_Session *session);
487 497
488 498
@@ -561,7 +571,8 @@ typedef enum GNUNET_NetworkType
561 */ 571 */
562typedef enum GNUNET_NetworkType 572typedef enum GNUNET_NetworkType
563(*GNUNET_TRANSPORT_GetNetworkTypeForAddress)(void *cls, 573(*GNUNET_TRANSPORT_GetNetworkTypeForAddress)(void *cls,
564 const struct GNUNET_HELLO_Address *address); 574 const struct
575 GNUNET_HELLO_Address *address);
565 576
566 577
567/** 578/**
@@ -579,7 +590,8 @@ typedef enum GNUNET_NetworkType
579typedef void 590typedef void
580(*GNUNET_TRANSPORT_SessionInfoCallback) (void *cls, 591(*GNUNET_TRANSPORT_SessionInfoCallback) (void *cls,
581 struct GNUNET_ATS_Session *session, 592 struct GNUNET_ATS_Session *session,
582 const struct GNUNET_TRANSPORT_SessionInfo *info); 593 const struct
594 GNUNET_TRANSPORT_SessionInfo *info);
583 595
584 596
585/** 597/**
@@ -596,7 +608,8 @@ typedef void
596 */ 608 */
597typedef void 609typedef void
598(*GNUNET_TRANSPORT_SessionMonitorSetup) (void *cls, 610(*GNUNET_TRANSPORT_SessionMonitorSetup) (void *cls,
599 GNUNET_TRANSPORT_SessionInfoCallback sic, 611 GNUNET_TRANSPORT_SessionInfoCallback
612 sic,
600 void *sic_cls); 613 void *sic_cls);
601 614
602 615
@@ -604,7 +617,8 @@ typedef void
604 * Each plugin is required to return a pointer to a struct of this 617 * Each plugin is required to return a pointer to a struct of this
605 * type as the return value from its entry point. 618 * type as the return value from its entry point.
606 */ 619 */
607struct GNUNET_TRANSPORT_PluginFunctions { 620struct GNUNET_TRANSPORT_PluginFunctions
621{
608 /** 622 /**
609 * Closure for all of the callbacks. 623 * Closure for all of the callbacks.
610 */ 624 */