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;
82 uint16_t address_length GNUNET_PACKED;
84 uint16_t plugin_name_length GNUNET_PACKED;
86 uint32_t session_id GNUNET_PACKED;
89 * - struct GNUNET_ATS_Information [ats_count];
90 * - char address[address_length]
91 * - char plugin_name[plugin_name_length] (including '\0'-termination).
96 struct AddressUseMessage
98 struct GNUNET_MessageHeader header;
100 struct GNUNET_PeerIdentity peer;
102 uint16_t in_use GNUNET_PACKED;
104 uint16_t address_length GNUNET_PACKED;
106 uint16_t plugin_name_length GNUNET_PACKED;
108 uint32_t session_id GNUNET_PACKED;
111 * - char address[address_length]
112 * - char plugin_name[plugin_name_length] (including '\0'-termination).
118 struct AddressDestroyedMessage
120 struct GNUNET_MessageHeader header;
122 uint32_t reserved GNUNET_PACKED;
124 struct GNUNET_PeerIdentity peer;
126 uint16_t address_length GNUNET_PACKED;
128 uint16_t plugin_name_length GNUNET_PACKED;
130 uint32_t session_id GNUNET_PACKED;
133 * - char address[address_length]
134 * - char plugin_name[plugin_name_length] (including '\0'-termination).
140 struct AddressSuggestionMessage
142 struct GNUNET_MessageHeader header;
144 uint32_t ats_count GNUNET_PACKED;
146 struct GNUNET_PeerIdentity peer;
148 uint16_t address_length GNUNET_PACKED;
150 uint16_t plugin_name_length GNUNET_PACKED;
152 uint32_t session_id GNUNET_PACKED;
154 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out;
156 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in;
159 * - struct GNUNET_ATS_Information [ats_count];
160 * - char address[address_length]
161 * - char plugin_name[plugin_name_length] (including '\0'-termination).
167 struct PeerInformationMessage
169 struct GNUNET_MessageHeader header;
171 uint32_t ats_count GNUNET_PACKED;
173 uint32_t address_active GNUNET_PACKED;
175 uint32_t id GNUNET_PACKED;
177 struct GNUNET_PeerIdentity peer;
179 uint16_t address_length GNUNET_PACKED;
181 uint16_t plugin_name_length GNUNET_PACKED;
183 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out;
185 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in;
188 * - struct GNUNET_ATS_Information [ats_count];
189 * - char address[address_length]
190 * - char plugin_name[plugin_name_length] (including '\0'-termination).
196 struct AddressListRequestMessage
198 struct GNUNET_MessageHeader header;
200 uint32_t id GNUNET_PACKED;
202 int32_t all GNUNET_PACKED;
204 struct GNUNET_PeerIdentity peer;
208 struct ReservationRequestMessage
210 struct GNUNET_MessageHeader header;
212 int32_t amount GNUNET_PACKED;
214 struct GNUNET_PeerIdentity peer;
219 * Message sent by ATS service to client to confirm that it is done
220 * using the given session ID.
222 struct SessionReleaseMessage
224 struct GNUNET_MessageHeader header;
226 uint32_t session_id GNUNET_PACKED;
228 struct GNUNET_PeerIdentity peer;
232 struct ReservationResultMessage
234 struct GNUNET_MessageHeader header;
236 int32_t amount GNUNET_PACKED;
238 struct GNUNET_PeerIdentity peer;
240 struct GNUNET_TIME_RelativeNBO res_delay;
243 struct PreferenceInformation
246 uint32_t preference_kind GNUNET_PACKED;
248 float preference_value GNUNET_PACKED;
253 struct ChangePreferenceMessage
255 struct GNUNET_MessageHeader header;
257 uint32_t num_preferences GNUNET_PACKED;
259 struct GNUNET_PeerIdentity peer;
261 /* followed by 'num_preferences'
262 * struct PreferenceInformation values */
264 GNUNET_NETWORK_STRUCT_END