aboutsummaryrefslogtreecommitdiff
path: root/src/ats/ats.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/ats/ats.h')
-rw-r--r--src/ats/ats.h54
1 files changed, 25 insertions, 29 deletions
diff --git a/src/ats/ats.h b/src/ats/ats.h
index d5d5d6c3f..7e411fb98 100644
--- a/src/ats/ats.h
+++ b/src/ats/ats.h
@@ -27,6 +27,8 @@
27#define ATS_H 27#define ATS_H
28 28
29#include "gnunet_util_lib.h" 29#include "gnunet_util_lib.h"
30#include "gnunet_ats_service.h"
31
30 32
31/** 33/**
32 * Flag used to indicate which type of client is connecting 34 * Flag used to indicate which type of client is connecting
@@ -115,16 +117,6 @@ struct AddressAddMessage
115 struct GNUNET_MessageHeader header; 117 struct GNUNET_MessageHeader header;
116 118
117 /** 119 /**
118 * Length of the `struct GNUNET_ATS_Information` array that follows this struct.
119 */
120 uint32_t ats_count GNUNET_PACKED;
121
122 /**
123 * Identity of the peer that this address is for.
124 */
125 struct GNUNET_PeerIdentity peer;
126
127 /**
128 * Number of bytes in the address that follows this struct. 120 * Number of bytes in the address that follows this struct.
129 */ 121 */
130 uint16_t address_length GNUNET_PACKED; 122 uint16_t address_length GNUNET_PACKED;
@@ -135,6 +127,11 @@ struct AddressAddMessage
135 uint16_t plugin_name_length GNUNET_PACKED; 127 uint16_t plugin_name_length GNUNET_PACKED;
136 128
137 /** 129 /**
130 * Identity of the peer that this address is for.
131 */
132 struct GNUNET_PeerIdentity peer;
133
134 /**
138 * Internal number this client will henceforth use to 135 * Internal number this client will henceforth use to
139 * refer to this address. 136 * refer to this address.
140 */ 137 */
@@ -146,8 +143,12 @@ struct AddressAddMessage
146 */ 143 */
147 uint32_t address_local_info GNUNET_PACKED; 144 uint32_t address_local_info GNUNET_PACKED;
148 145
146 /**
147 * Performance properties of the address.
148 */
149 struct GNUNET_ATS_PropertiesNBO properties;
150
149 /* followed by: 151 /* followed by:
150 * - struct GNUNET_ATS_Information [ats_count];
151 * - char address[address_length] 152 * - char address[address_length]
152 * - char plugin_name[plugin_name_length] (including '\0'-termination). 153 * - char plugin_name[plugin_name_length] (including '\0'-termination).
153 */ 154 */
@@ -167,9 +168,9 @@ struct AddressUpdateMessage
167 struct GNUNET_MessageHeader header; 168 struct GNUNET_MessageHeader header;
168 169
169 /** 170 /**
170 * Length of the `struct GNUNET_ATS_Information` array that follows. 171 * Internal number this client uses to refer to this address.
171 */ 172 */
172 uint32_t ats_count GNUNET_PACKED; 173 uint32_t session_id GNUNET_PACKED;
173 174
174 /** 175 /**
175 * Which peer is this about? (Technically redundant, as the 176 * Which peer is this about? (Technically redundant, as the
@@ -179,13 +180,9 @@ struct AddressUpdateMessage
179 struct GNUNET_PeerIdentity peer; 180 struct GNUNET_PeerIdentity peer;
180 181
181 /** 182 /**
182 * Internal number this client uses to refer to this address. 183 * Performance properties of the address.
183 */
184 uint32_t session_id GNUNET_PACKED;
185
186 /* followed by:
187 * - struct GNUNET_ATS_Information [ats_count];
188 */ 184 */
185 struct GNUNET_ATS_PropertiesNBO properties;
189 186
190}; 187};
191 188
@@ -294,17 +291,12 @@ struct PeerInformationMessage
294 /** 291 /**
295 * 292 *
296 */ 293 */
297 uint32_t ats_count GNUNET_PACKED; 294 uint16_t address_length GNUNET_PACKED;
298
299 /**
300 *
301 */
302 uint32_t address_active GNUNET_PACKED;
303 295
304 /** 296 /**
305 * 297 *
306 */ 298 */
307 uint32_t id GNUNET_PACKED; 299 uint16_t plugin_name_length GNUNET_PACKED;
308 300
309 /** 301 /**
310 * 302 *
@@ -314,12 +306,12 @@ struct PeerInformationMessage
314 /** 306 /**
315 * 307 *
316 */ 308 */
317 uint16_t address_length GNUNET_PACKED; 309 uint32_t address_active GNUNET_PACKED;
318 310
319 /** 311 /**
320 * 312 *
321 */ 313 */
322 uint16_t plugin_name_length GNUNET_PACKED; 314 uint32_t id GNUNET_PACKED;
323 315
324 /** 316 /**
325 * 317 *
@@ -331,8 +323,12 @@ struct PeerInformationMessage
331 */ 323 */
332 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in; 324 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in;
333 325
326 /**
327 * Performance properties of the address.
328 */
329 struct GNUNET_ATS_PropertiesNBO properties;
330
334 /* followed by: 331 /* followed by:
335 * - struct GNUNET_ATS_Information [ats_count];
336 * - char address[address_length] 332 * - char address[address_length]
337 * - char plugin_name[plugin_name_length] (including '\0'-termination). 333 * - char plugin_name[plugin_name_length] (including '\0'-termination).
338 */ 334 */