diff options
author | Christian Grothoff <christian@grothoff.org> | 2015-01-22 21:43:13 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2015-01-22 21:43:13 +0000 |
commit | 03c7d2c186ae7371ce5be6fddd376faf90c44e53 (patch) | |
tree | 1a961bd69ed3f758a218df2d5166ffea7a000870 /src/ats/ats.h | |
parent | 8c0022803d0a2f74b8f8e3fbbbb9afddf2b621bc (diff) | |
download | gnunet-03c7d2c186ae7371ce5be6fddd376faf90c44e53.tar.gz gnunet-03c7d2c186ae7371ce5be6fddd376faf90c44e53.zip |
also simplify message format for AddressSuggestionMessage
Diffstat (limited to 'src/ats/ats.h')
-rw-r--r-- | src/ats/ats.h | 39 |
1 files changed, 24 insertions, 15 deletions
diff --git a/src/ats/ats.h b/src/ats/ats.h index 5e5d16a90..0ff5e950e 100644 --- a/src/ats/ats.h +++ b/src/ats/ats.h | |||
@@ -219,31 +219,40 @@ struct AddressDestroyedMessage | |||
219 | }; | 219 | }; |
220 | 220 | ||
221 | 221 | ||
222 | /** | ||
223 | * ATS Service suggests to the transport service to use the address | ||
224 | * identified by the given @e session_id for the given @e peer with | ||
225 | * the given @e bandwidth_in and @e bandwidth_out limits from now on. | ||
226 | */ | ||
222 | struct AddressSuggestionMessage | 227 | struct AddressSuggestionMessage |
223 | { | 228 | { |
229 | /** | ||
230 | * A message of type #GNUNET_MESSAGE_TYPE_ATS_ADDRESS_SUGGESTION. | ||
231 | */ | ||
224 | struct GNUNET_MessageHeader header; | 232 | struct GNUNET_MessageHeader header; |
225 | 233 | ||
226 | uint32_t ats_count GNUNET_PACKED; | 234 | /** |
227 | 235 | * Internal number this client uses to refer to the address this | |
228 | struct GNUNET_PeerIdentity peer; | 236 | * suggestion is about. |
229 | 237 | */ | |
230 | uint16_t address_length GNUNET_PACKED; | ||
231 | |||
232 | uint16_t plugin_name_length GNUNET_PACKED; | ||
233 | |||
234 | uint32_t session_id GNUNET_PACKED; | 238 | uint32_t session_id GNUNET_PACKED; |
235 | 239 | ||
236 | uint32_t address_local_info GNUNET_PACKED; | 240 | /** |
241 | * Which peer is this about? (Technically redundant, as the | ||
242 | * @e session_id should be sufficient, but may enable client | ||
243 | * to find the session faster and/or check consistency). | ||
244 | */ | ||
245 | struct GNUNET_PeerIdentity peer; | ||
237 | 246 | ||
247 | /** | ||
248 | * How much bandwidth we are allowed for sending. | ||
249 | */ | ||
238 | struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out; | 250 | struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out; |
239 | 251 | ||
240 | struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in; | 252 | /** |
241 | 253 | * How much bandwidth we are allowed for receiving. | |
242 | /* followed by: | ||
243 | * - struct GNUNET_ATS_Information [ats_count]; | ||
244 | * - char address[address_length] | ||
245 | * - char plugin_name[plugin_name_length] (including '\0'-termination). | ||
246 | */ | 254 | */ |
255 | struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in; | ||
247 | 256 | ||
248 | }; | 257 | }; |
249 | 258 | ||