diff options
Diffstat (limited to 'src/include/gnunet_transport_application_service.h')
-rw-r--r-- | src/include/gnunet_transport_application_service.h | 46 |
1 files changed, 19 insertions, 27 deletions
diff --git a/src/include/gnunet_transport_application_service.h b/src/include/gnunet_transport_application_service.h index 31097b88e..bbd4e3ddf 100644 --- a/src/include/gnunet_transport_application_service.h +++ b/src/include/gnunet_transport_application_service.h | |||
@@ -34,6 +34,7 @@ | |||
34 | 34 | ||
35 | #include "gnunet_constants.h" | 35 | #include "gnunet_constants.h" |
36 | #include "gnunet_util_lib.h" | 36 | #include "gnunet_util_lib.h" |
37 | #include "gnunet_nt_lib.h" | ||
37 | 38 | ||
38 | /** | 39 | /** |
39 | * Handle to the TRANSPORT subsystem for making suggestions about | 40 | * Handle to the TRANSPORT subsystem for making suggestions about |
@@ -62,37 +63,28 @@ GNUNET_TRANSPORT_application_done (struct GNUNET_TRANSPORT_ApplicationHandle *ch | |||
62 | 63 | ||
63 | 64 | ||
64 | /** | 65 | /** |
65 | * Handle for suggestion requests. | 66 | * An application (or a communicator) has received a HELLO (or other address |
66 | */ | 67 | * data of another peer) and wants TRANSPORT to validate that the address is |
67 | struct GNUNET_TRANSPORT_ApplicationSuggestHandle; | 68 | * correct. The result is NOT returned, in fact TRANSPORT may do nothing |
68 | 69 | * (i.e. if it has too many active validations or recently tried this one | |
69 | 70 | * already). If the @a addr validates, TRANSPORT will persist the address | |
70 | /** | 71 | * with PEERSTORE. |
71 | * An application would like to communicate with a peer. TRANSPORT should | ||
72 | * allocate bandwith using a suitable address for requiremetns @a pk | ||
73 | * to transport. | ||
74 | * | 72 | * |
75 | * @param ch handle | 73 | * @param ch handle |
76 | * @param peer identity of the peer we need an address for | 74 | * @param peer identity of the peer we have an address for |
77 | * @param pk what kind of application will the application require (can be | 75 | * @param expiration when does @a addr expire; used by TRANSPORT to know when |
78 | * #GNUNET_MQ_PREFERENCE_NONE, we will still try to connect) | 76 | * to definitively give up attempting to validate |
79 | * @param bw desired bandwith, can be zero (we will still try to connect) | 77 | * @param nt network type of @a addr (as claimed by the other peer); |
80 | * @return suggestion handle, NULL if request is already pending | 78 | * used by TRANSPORT to avoid trying @a addr's that really cannot work |
81 | */ | 79 | * due to network type missmatches |
82 | struct GNUNET_TRANSPORT_ApplicationSuggestHandle * | 80 | * @param addr address to validate |
83 | GNUNET_TRANSPORT_application_suggest (struct GNUNET_TRANSPORT_ApplicationHandle *ch, | ||
84 | const struct GNUNET_PeerIdentity *peer, | ||
85 | enum GNUNET_MQ_PreferenceKind pk, | ||
86 | struct GNUNET_BANDWIDTH_Value32NBO bw); | ||
87 | |||
88 | |||
89 | /** | ||
90 | * We no longer care about communicating with a peer. | ||
91 | * | ||
92 | * @param sh handle | ||
93 | */ | 81 | */ |
94 | void | 82 | void |
95 | GNUNET_TRANSPORT_application_suggest_cancel (struct GNUNET_TRANSPORT_ApplicationSuggestHandle *sh); | 83 | GNUNET_TRANSPORT_application_validate (struct GNUNET_TRANSPORT_ApplicationHandle *ch, |
84 | const struct GNUNET_PeerIdentity *peer, | ||
85 | struct GNUNET_TIME_Absolute expiration, | ||
86 | enum GNUNET_NetworkType nt, | ||
87 | const char *addr); | ||
96 | 88 | ||
97 | /** @} */ /* end of group */ | 89 | /** @} */ /* end of group */ |
98 | 90 | ||