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
44 struct ClientStartMessage
46 struct GNUNET_MessageHeader header;
49 * NBO value of an 'enum StartFlag'.
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_TRANSPORT_ATS_Information [ats_count];
81 - char address[address_length]
82 - char plugin_name[plugin_name_length] (including '\0'-termination).
88 struct AddressDestroyedMessage
90 struct GNUNET_MessageHeader header;
92 uint32_t reserved GNUNET_PACKED;
94 struct GNUNET_PeerIdentity peer;
96 uint16_t address_length GNUNET_PACKED;
98 uint16_t plugin_name_length GNUNET_PACKED;
100 uint32_t session_id GNUNET_PACKED;
103 - char address[address_length]
104 - char plugin_name[plugin_name_length] (including '\0'-termination).
110 struct AddressSuggestionMessage
112 struct GNUNET_MessageHeader header;
114 uint32_t ats_count GNUNET_PACKED;
116 struct GNUNET_PeerIdentity peer;
118 uint16_t address_length GNUNET_PACKED;
120 uint16_t plugin_name_length GNUNET_PACKED;
122 uint32_t session_id GNUNET_PACKED;
124 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out;
126 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in;
129 - struct GNUNET_TRANSPORT_ATS_Information [ats_count];
130 - char address[address_length]
131 - char plugin_name[plugin_name_length] (including '\0'-termination).
137 struct PeerInformationMessage
139 struct GNUNET_MessageHeader header;
141 uint32_t ats_count GNUNET_PACKED;
143 struct GNUNET_PeerIdentity peer;
145 uint16_t address_length GNUNET_PACKED;
147 uint16_t plugin_name_length GNUNET_PACKED;
149 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out;
151 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in;
154 - struct GNUNET_TRANSPORT_ATS_Information [ats_count];
155 - char address[address_length]
156 - char plugin_name[plugin_name_length] (including '\0'-termination).
162 struct ReservationRequestMessage
164 struct GNUNET_MessageHeader header;
166 int32_t amount GNUNET_PACKED;
168 struct GNUNET_PeerIdentity peer;
172 struct ReservationResultMessage
174 struct GNUNET_MessageHeader header;
176 int32_t amount GNUNET_PACKED;
178 struct GNUNET_PeerIdentity peer;
180 struct GNUNET_TIME_RelativeNBO res_delay;
184 struct PreferenceInformation
187 uint32_t preference_kind GNUNET_PACKED;
189 float preference_value GNUNET_PACKED;
194 struct ChangePreferenceMessage
196 struct GNUNET_MessageHeader header;
198 uint32_t num_preferences GNUNET_PACKED;
200 struct GNUNET_PeerIdentity peer;
202 /* followed by 'num_preferences'
203 struct PreferenceInformation values */