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;
65 struct AddressUpdateMessage
67 struct GNUNET_MessageHeader header;
69 uint32_t ats_count GNUNET_PACKED;
71 struct GNUNET_PeerIdentity peer;
73 uint16_t address_length GNUNET_PACKED;
75 uint16_t plugin_name_length GNUNET_PACKED;
77 uint32_t session_id GNUNET_PACKED;
80 * - struct GNUNET_ATS_Information [ats_count];
81 * - char address[address_length]
82 * - char plugin_name[plugin_name_length] (including '\0'-termination).
87 struct AddressUseMessage
89 struct GNUNET_MessageHeader header;
91 struct GNUNET_PeerIdentity peer;
93 uint16_t in_use GNUNET_PACKED;
95 uint16_t address_length GNUNET_PACKED;
97 uint16_t plugin_name_length GNUNET_PACKED;
99 uint32_t session_id GNUNET_PACKED;
102 * - char address[address_length]
103 * - char plugin_name[plugin_name_length] (including '\0'-termination).
109 struct AddressDestroyedMessage
111 struct GNUNET_MessageHeader header;
113 uint32_t reserved GNUNET_PACKED;
115 struct GNUNET_PeerIdentity peer;
117 uint16_t address_length GNUNET_PACKED;
119 uint16_t plugin_name_length GNUNET_PACKED;
121 uint32_t session_id GNUNET_PACKED;
124 * - char address[address_length]
125 * - char plugin_name[plugin_name_length] (including '\0'-termination).
131 struct AddressSuggestionMessage
133 struct GNUNET_MessageHeader header;
135 uint32_t ats_count GNUNET_PACKED;
137 struct GNUNET_PeerIdentity peer;
139 uint16_t address_length GNUNET_PACKED;
141 uint16_t plugin_name_length GNUNET_PACKED;
143 uint32_t session_id GNUNET_PACKED;
145 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out;
147 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in;
150 * - struct GNUNET_ATS_Information [ats_count];
151 * - char address[address_length]
152 * - char plugin_name[plugin_name_length] (including '\0'-termination).
158 struct PeerInformationMessage
160 struct GNUNET_MessageHeader header;
162 uint32_t ats_count GNUNET_PACKED;
164 struct GNUNET_PeerIdentity peer;
166 uint16_t address_length GNUNET_PACKED;
168 uint16_t plugin_name_length GNUNET_PACKED;
170 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out;
172 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in;
175 * - struct GNUNET_ATS_Information [ats_count];
176 * - char address[address_length]
177 * - char plugin_name[plugin_name_length] (including '\0'-termination).
183 struct ReservationRequestMessage
185 struct GNUNET_MessageHeader header;
187 int32_t amount GNUNET_PACKED;
189 struct GNUNET_PeerIdentity peer;
194 * Message sent by ATS service to client to confirm that it is done
195 * using the given session ID.
197 struct SessionReleaseMessage
199 struct GNUNET_MessageHeader header;
201 uint32_t session_id GNUNET_PACKED;
203 struct GNUNET_PeerIdentity peer;
207 struct ReservationResultMessage
209 struct GNUNET_MessageHeader header;
211 int32_t amount GNUNET_PACKED;
213 struct GNUNET_PeerIdentity peer;
215 struct GNUNET_TIME_RelativeNBO res_delay;
218 struct PreferenceInformation
221 uint32_t preference_kind GNUNET_PACKED;
223 float preference_value GNUNET_PACKED;
228 struct ChangePreferenceMessage
230 struct GNUNET_MessageHeader header;
232 uint32_t num_preferences GNUNET_PACKED;
234 struct GNUNET_PeerIdentity peer;
236 /* followed by 'num_preferences'
237 * struct PreferenceInformation values */
239 GNUNET_NETWORK_STRUCT_END