2 This file is part of GNUnet.
3 (C) 2010,2011 Christian Grothoff (and other contributing authors)
5 GNUnet is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published
7 by the Free Software Foundation; either version 3, or (at your
8 option) any later version.
10 GNUnet is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with GNUnet; see the file COPYING. If not, write to the
17 Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA.
22 * @brief automatic transport selection messages
23 * @author Christian Grothoff
24 * @author Matthias Wachs
29 #include "gnunet_util_lib.h"
35 START_FLAG_SCHEDULING = 0,
37 START_FLAG_PERFORMANCE_WITH_PIC = 1,
39 START_FLAG_PERFORMANCE_NO_PIC = 2
42 GNUNET_NETWORK_STRUCT_BEGIN
44 struct ClientStartMessage
46 struct GNUNET_MessageHeader header;
49 * NBO value of an 'enum StartFlag'.
51 uint32_t start_flag GNUNET_PACKED;
55 struct RequestAddressMessage
57 struct GNUNET_MessageHeader header;
59 uint32_t reserved GNUNET_PACKED;
61 struct GNUNET_PeerIdentity peer;
64 struct ResetBackoffMessage
66 struct GNUNET_MessageHeader header;
68 uint32_t reserved GNUNET_PACKED;
70 struct GNUNET_PeerIdentity peer;
74 struct AddressUpdateMessage
76 struct GNUNET_MessageHeader header;
78 uint32_t ats_count GNUNET_PACKED;
80 struct GNUNET_PeerIdentity peer;
83 uint16_t address_length GNUNET_PACKED;
85 uint16_t plugin_name_length GNUNET_PACKED;
87 uint32_t session_id GNUNET_PACKED;
89 uint32_t address_local_info GNUNET_PACKED;
92 * - struct GNUNET_ATS_Information [ats_count];
93 * - char address[address_length]
94 * - char plugin_name[plugin_name_length] (including '\0'-termination).
99 struct AddressUseMessage
101 struct GNUNET_MessageHeader header;
103 struct GNUNET_PeerIdentity peer;
105 uint16_t in_use GNUNET_PACKED;
107 uint16_t address_length GNUNET_PACKED;
109 uint16_t plugin_name_length GNUNET_PACKED;
111 uint32_t session_id GNUNET_PACKED;
113 uint32_t address_local_info GNUNET_PACKED;
116 * - char address[address_length]
117 * - char plugin_name[plugin_name_length] (including '\0'-termination).
123 struct AddressDestroyedMessage
125 struct GNUNET_MessageHeader header;
127 uint32_t reserved GNUNET_PACKED;
129 struct GNUNET_PeerIdentity peer;
131 uint16_t address_length GNUNET_PACKED;
133 uint16_t plugin_name_length GNUNET_PACKED;
135 uint32_t session_id GNUNET_PACKED;
137 uint32_t address_local_info GNUNET_PACKED;
140 * - char address[address_length]
141 * - char plugin_name[plugin_name_length] (including '\0'-termination).
147 struct AddressSuggestionMessage
149 struct GNUNET_MessageHeader header;
151 uint32_t ats_count GNUNET_PACKED;
153 struct GNUNET_PeerIdentity peer;
155 uint16_t address_length GNUNET_PACKED;
157 uint16_t plugin_name_length GNUNET_PACKED;
159 uint32_t session_id GNUNET_PACKED;
161 uint32_t address_local_info GNUNET_PACKED;
163 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out;
165 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in;
168 * - struct GNUNET_ATS_Information [ats_count];
169 * - char address[address_length]
170 * - char plugin_name[plugin_name_length] (including '\0'-termination).
176 struct PeerInformationMessage
178 struct GNUNET_MessageHeader header;
180 uint32_t ats_count GNUNET_PACKED;
182 uint32_t address_active GNUNET_PACKED;
184 uint32_t id GNUNET_PACKED;
186 struct GNUNET_PeerIdentity peer;
188 uint16_t address_length GNUNET_PACKED;
190 uint16_t plugin_name_length GNUNET_PACKED;
192 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out;
194 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in;
197 * - struct GNUNET_ATS_Information [ats_count];
198 * - char address[address_length]
199 * - char plugin_name[plugin_name_length] (including '\0'-termination).
205 struct AddressListRequestMessage
207 struct GNUNET_MessageHeader header;
209 uint32_t id GNUNET_PACKED;
211 int32_t all GNUNET_PACKED;
213 struct GNUNET_PeerIdentity peer;
217 struct ReservationRequestMessage
219 struct GNUNET_MessageHeader header;
221 int32_t amount GNUNET_PACKED;
223 struct GNUNET_PeerIdentity peer;
228 * Message sent by ATS service to client to confirm that it is done
229 * using the given session ID.
231 struct SessionReleaseMessage
233 struct GNUNET_MessageHeader header;
235 uint32_t session_id GNUNET_PACKED;
237 struct GNUNET_PeerIdentity peer;
241 struct ReservationResultMessage
243 struct GNUNET_MessageHeader header;
245 int32_t amount GNUNET_PACKED;
247 struct GNUNET_PeerIdentity peer;
249 struct GNUNET_TIME_RelativeNBO res_delay;
252 struct PreferenceInformation
255 uint32_t preference_kind GNUNET_PACKED;
257 float preference_value GNUNET_PACKED;
262 struct ChangePreferenceMessage
264 struct GNUNET_MessageHeader header;
266 uint32_t num_preferences GNUNET_PACKED;
268 struct GNUNET_PeerIdentity peer;
270 /* followed by 'num_preferences'
271 * struct PreferenceInformation values */
276 * Message containing application feedback for a peer
278 struct FeedbackPreferenceMessage
280 struct GNUNET_MessageHeader header;
283 * Number of feedback values included
285 uint32_t num_feedback GNUNET_PACKED;
288 * Relative time describing for which time interval this feedback is
290 struct GNUNET_TIME_RelativeNBO scope;
293 * Peer this feedback is for
295 struct GNUNET_PeerIdentity peer;
297 /* followed by 'num_feedback'
298 * struct PreferenceInformation values */
301 GNUNET_NETWORK_STRUCT_END