aboutsummaryrefslogtreecommitdiff
path: root/src/transport/transport.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/transport/transport.h')
-rw-r--r--src/transport/transport.h56
1 files changed, 54 insertions, 2 deletions
diff --git a/src/transport/transport.h b/src/transport/transport.h
index d2a3a262b..ed89940cc 100644
--- a/src/transport/transport.h
+++ b/src/transport/transport.h
@@ -123,10 +123,21 @@ struct ConnectInfoMessage
123 */ 123 */
124 struct GNUNET_MessageHeader header; 124 struct GNUNET_MessageHeader header;
125 125
126#if (defined(GNUNET_TRANSPORT_COMMUNICATION_VERSION) || \
127 defined(GNUNET_TRANSPORT_CORE_VERSION))
128
129 /**
130 * Always zero, for alignment.
131 */
132 uint32_t reserved GNUNET_PACKED;
133
134#else
135
126 /** 136 /**
127 * Current outbound quota for this peer 137 * Current outbound quota for this peer
128 */ 138 */
129 struct GNUNET_BANDWIDTH_Value32NBO quota_out; 139 struct GNUNET_BANDWIDTH_Value32NBO quota_out;
140#endif
130 141
131 /** 142 /**
132 * Identity of the new neighbour. 143 * Identity of the new neighbour.
@@ -163,6 +174,8 @@ struct DisconnectInfoMessage
163 * Message used to set a particular bandwidth quota. Sent TO the 174 * Message used to set a particular bandwidth quota. Sent TO the
164 * service to set an incoming quota, sent FROM the service to update 175 * service to set an incoming quota, sent FROM the service to update
165 * an outgoing quota. 176 * an outgoing quota.
177 *
178 * NOTE: no longer used in TNG!
166 */ 179 */
167struct QuotaSetMessage 180struct QuotaSetMessage
168{ 181{
@@ -215,6 +228,13 @@ struct SendOkMessage
215 */ 228 */
216 struct GNUNET_MessageHeader header; 229 struct GNUNET_MessageHeader header;
217 230
231#if (defined(GNUNET_TRANSPORT_COMMUNICATION_VERSION) || \
232 defined(GNUNET_TRANSPORT_CORE_VERSION))
233
234 uint32_t reserved GNUNET_PACKED;
235
236#else
237
218 /** 238 /**
219 * #GNUNET_OK if the transmission succeeded, 239 * #GNUNET_OK if the transmission succeeded,
220 * #GNUNET_SYSERR if it failed (i.e. network disconnect); 240 * #GNUNET_SYSERR if it failed (i.e. network disconnect);
@@ -229,11 +249,13 @@ struct SendOkMessage
229 uint16_t bytes_msg GNUNET_PACKED; 249 uint16_t bytes_msg GNUNET_PACKED;
230 250
231 /** 251 /**
232 * Size of message sent over wire 252 * Size of message sent over wire.
233 * Includes plugin and protocol specific overhead 253 * Includes plugin and protocol specific overheads.
234 */ 254 */
235 uint32_t bytes_physical GNUNET_PACKED; 255 uint32_t bytes_physical GNUNET_PACKED;
236 256
257#endif
258
237 /** 259 /**
238 * Which peer can send more now? 260 * Which peer can send more now?
239 */ 261 */
@@ -242,6 +264,32 @@ struct SendOkMessage
242 264
243 265
244/** 266/**
267 * Message used to notify the transport API that it can
268 * send another message to the transport service.
269 * (Used to implement flow control.)
270 */
271struct RecvOkMessage
272{
273
274 /**
275 * Type will be #GNUNET_MESSAGE_TYPE_TRANSPORT_RECV_OK
276 */
277 struct GNUNET_MessageHeader header;
278
279 /**
280 * Number of messages by which to increase the window, greater or
281 * equal to one.
282 */
283 uint32_t increase_window_delta GNUNET_PACKED;
284
285 /**
286 * Which peer can CORE handle more from now?
287 */
288 struct GNUNET_PeerIdentity peer;
289};
290
291
292/**
245 * Message used to notify the transport service about a message 293 * Message used to notify the transport service about a message
246 * to be transmitted to another peer. The actual message follows. 294 * to be transmitted to another peer. The actual message follows.
247 */ 295 */
@@ -258,10 +306,14 @@ struct OutboundMessage
258 */ 306 */
259 uint32_t reserved GNUNET_PACKED; 307 uint32_t reserved GNUNET_PACKED;
260 308
309#if ! (defined(GNUNET_TRANSPORT_COMMUNICATION_VERSION) || \
310 defined(GNUNET_TRANSPORT_CORE_VERSION))
311
261 /** 312 /**
262 * Allowed delay. 313 * Allowed delay.
263 */ 314 */
264 struct GNUNET_TIME_RelativeNBO timeout; 315 struct GNUNET_TIME_RelativeNBO timeout;
316#endif
265 317
266 /** 318 /**
267 * Which peer should receive the message? 319 * Which peer should receive the message?