diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2014-01-13 16:56:29 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2014-01-13 16:56:29 +0000 |
commit | 10cb35698e245a9f02e577d60541d7e09d7f05ca (patch) | |
tree | 0dc33499c14624870cf1034e5195b613557a8dc1 /src/include/gnunet_transport_plugin.h | |
parent | dd610f2588f8c53cb677722377301fb641da5c23 (diff) | |
download | gnunet-10cb35698e245a9f02e577d60541d7e09d7f05ca.tar.gz gnunet-10cb35698e245a9f02e577d60541d7e09d7f05ca.zip |
implementing 0003268
Diffstat (limited to 'src/include/gnunet_transport_plugin.h')
-rw-r--r-- | src/include/gnunet_transport_plugin.h | 47 |
1 files changed, 14 insertions, 33 deletions
diff --git a/src/include/gnunet_transport_plugin.h b/src/include/gnunet_transport_plugin.h index 62c8f1638..bf84819ad 100644 --- a/src/include/gnunet_transport_plugin.h +++ b/src/include/gnunet_transport_plugin.h | |||
@@ -82,26 +82,17 @@ typedef void | |||
82 | struct Session *session); | 82 | struct Session *session); |
83 | 83 | ||
84 | /** | 84 | /** |
85 | * Function that will be called whenever the plugin internally | 85 | * Plugin tells transport service about a new inbound session |
86 | * creates a new session and hence transport need to tell ATS. | ||
87 | * This happens when we have a inbound connection we did not | ||
88 | * initiate. | ||
89 | * | 86 | * |
90 | * @param cls closure | 87 | * @param cls unused |
91 | * @param peer peer | 88 | * @param address the address |
92 | * @param plugin plugin | 89 | * @param session the new session |
93 | * @param address address | 90 | * @param ats ats information |
94 | * @param address_len length of the @a address | 91 | * @param ats_count number of @a ats information |
95 | * @param session session | ||
96 | * @param ats ATS information | ||
97 | * @param ats_count number of entries in @a ats array | ||
98 | */ | 92 | */ |
99 | typedef void | 93 | typedef void |
100 | (*GNUNET_TRANSPORT_SessionStart) (void *cls, | 94 | (*GNUNET_TRANSPORT_SessionStart) (void *cls, |
101 | const struct GNUNET_PeerIdentity *peer, | 95 | struct GNUNET_HELLO_Address *address, |
102 | const char *plugin, | ||
103 | const void *address, | ||
104 | uint16_t address_len, | ||
105 | struct Session *session, | 96 | struct Session *session, |
106 | const struct GNUNET_ATS_Information *ats, | 97 | const struct GNUNET_ATS_Information *ats, |
107 | uint32_t ats_count); | 98 | uint32_t ats_count); |
@@ -130,11 +121,9 @@ typedef void | |||
130 | */ | 121 | */ |
131 | typedef struct GNUNET_TIME_Relative | 122 | typedef struct GNUNET_TIME_Relative |
132 | (*GNUNET_TRANSPORT_PluginReceiveCallback) (void *cls, | 123 | (*GNUNET_TRANSPORT_PluginReceiveCallback) (void *cls, |
133 | const struct GNUNET_PeerIdentity *peer, | 124 | const struct GNUNET_HELLO_Address *address, |
134 | const struct GNUNET_MessageHeader *message, | 125 | struct Session *session, |
135 | struct Session *session, | 126 | const struct GNUNET_MessageHeader *message); |
136 | const char *sender_address, | ||
137 | uint16_t sender_address_len); | ||
138 | 127 | ||
139 | 128 | ||
140 | /** | 129 | /** |
@@ -165,9 +154,7 @@ typedef struct GNUNET_ATS_Information | |||
165 | */ | 154 | */ |
166 | typedef void | 155 | typedef void |
167 | (*GNUNET_TRANSPORT_UpdateAddressMetrics) (void *cls, | 156 | (*GNUNET_TRANSPORT_UpdateAddressMetrics) (void *cls, |
168 | const struct GNUNET_PeerIdentity *peer, | 157 | const struct GNUNET_HELLO_Address *address, |
169 | const void *address, | ||
170 | uint16_t address_len, | ||
171 | struct Session *session, | 158 | struct Session *session, |
172 | const struct GNUNET_ATS_Information *ats, | 159 | const struct GNUNET_ATS_Information *ats, |
173 | uint32_t ats_count); | 160 | uint32_t ats_count); |
@@ -179,17 +166,11 @@ typedef void | |||
179 | * @param cls closure | 166 | * @param cls closure |
180 | * @param add_remove should the address added (#GNUNET_YES) or removed (#GNUNET_NO) from the | 167 | * @param add_remove should the address added (#GNUNET_YES) or removed (#GNUNET_NO) from the |
181 | * set of valid addresses? | 168 | * set of valid addresses? |
182 | * @param addr one of the addresses of the host | 169 | * @param address the address to add or remove |
183 | * the specific address format depends on the transport | ||
184 | * @param addrlen length of the @a addr | ||
185 | * @param dest_plugin plugin to use this address with | ||
186 | */ | 170 | */ |
187 | typedef void | 171 | typedef void |
188 | (*GNUNET_TRANSPORT_AddressNotification) (void *cls, | 172 | (*GNUNET_TRANSPORT_AddressNotification) (void *cls, int add_remove, |
189 | int add_remove, | 173 | const struct GNUNET_HELLO_Address *address); |
190 | const void *addr, | ||
191 | size_t addrlen, | ||
192 | const char *dest_plugin); | ||
193 | 174 | ||
194 | 175 | ||
195 | /** | 176 | /** |