summaryrefslogtreecommitdiff
path: root/src/ats/ats.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-01-22 21:25:54 +0000
committerChristian Grothoff <christian@grothoff.org>2015-01-22 21:25:54 +0000
commit750da2796162b92c533f9666104c47407ed09e46 (patch)
treeb1fe3ec2ca36854a15fd8e97760d05e9a54836b9 /src/ats/ats.h
parent9c95f4ea09fa61fc193fc45873f76bf6fe6d93f3 (diff)
downloadgnunet-750da2796162b92c533f9666104c47407ed09e46.tar.gz
gnunet-750da2796162b92c533f9666104c47407ed09e46.zip
simplifying IPC for address in use and address update
Diffstat (limited to 'src/ats/ats.h')
-rw-r--r--src/ats/ats.h61
1 files changed, 39 insertions, 22 deletions
diff --git a/src/ats/ats.h b/src/ats/ats.h
index a480f5d79..fd66013f4 100644
--- a/src/ats/ats.h
+++ b/src/ats/ats.h
@@ -86,7 +86,7 @@ struct AddressAddMessage
86 struct GNUNET_MessageHeader header; 86 struct GNUNET_MessageHeader header;
87 87
88 /** 88 /**
89 * Size of the `struct GNUNET_ATS_Information` array that follows this struct. 89 * Length of the `struct GNUNET_ATS_Information` array that follows this struct.
90 */ 90 */
91 uint32_t ats_count GNUNET_PACKED; 91 uint32_t ats_count GNUNET_PACKED;
92 92
@@ -126,51 +126,68 @@ struct AddressAddMessage
126}; 126};
127 127
128 128
129/**
130 * Message used to notify ATS that the performance
131 * characteristics for an address have changed.
132 */
129struct AddressUpdateMessage 133struct AddressUpdateMessage
130{ 134{
135 /**
136 * Message of type #GNUNET_MESSAGE_TYPE_ATS_ADDRESS_UPDATE.
137 */
131 struct GNUNET_MessageHeader header; 138 struct GNUNET_MessageHeader header;
132 139
140 /**
141 * Length of the `struct GNUNET_ATS_Information` array that follows.
142 */
133 uint32_t ats_count GNUNET_PACKED; 143 uint32_t ats_count GNUNET_PACKED;
134 144
145 /**
146 * Which peer is this about? (Technically redundant, as the
147 * @e session_id should be sufficient, but enables ATS service
148 * to find the session faster).
149 */
135 struct GNUNET_PeerIdentity peer; 150 struct GNUNET_PeerIdentity peer;
136 151
137 152 /**
138 uint16_t address_length GNUNET_PACKED; 153 * Internal number this client uses to refer to this address.
139 154 */
140 uint16_t plugin_name_length GNUNET_PACKED;
141
142 uint32_t session_id GNUNET_PACKED; 155 uint32_t session_id GNUNET_PACKED;
143 156
144 uint32_t address_local_info GNUNET_PACKED;
145
146 /* followed by: 157 /* followed by:
147 * - struct GNUNET_ATS_Information [ats_count]; 158 * - struct GNUNET_ATS_Information [ats_count];
148 * - char address[address_length]
149 * - char plugin_name[plugin_name_length] (including '\0'-termination).
150 */ 159 */
151 160
152}; 161};
153 162
163
164/**
165 * Message sent from ATS client to ATS service to notify
166 * it if we started (or stopped) using an address.
167 */
154struct AddressUseMessage 168struct AddressUseMessage
155{ 169{
170 /**
171 * Type is #GNUNET_MESSAGE_TYPE_ATS_ADDRESS_IN_USE.
172 */
156 struct GNUNET_MessageHeader header; 173 struct GNUNET_MessageHeader header;
157 174
158 struct GNUNET_PeerIdentity peer; 175 /**
159 176 * Internal number this client uses to refer to this address.
160 uint16_t in_use GNUNET_PACKED; 177 */
161
162 uint16_t address_length GNUNET_PACKED;
163
164 uint16_t plugin_name_length GNUNET_PACKED;
165
166 uint32_t session_id GNUNET_PACKED; 178 uint32_t session_id GNUNET_PACKED;
167 179
168 uint32_t address_local_info GNUNET_PACKED; 180 /**
181 * Which peer is this about? (Technically redundant, as the
182 * @e session_id should be sufficient, but enables ATS service
183 * to find the session faster).
184 */
185 struct GNUNET_PeerIdentity peer;
169 186
170 /* followed by: 187 /**
171 * - char address[address_length] 188 * #GNUNET_YES or #GNUNET_NO.
172 * - char plugin_name[plugin_name_length] (including '\0'-termination).
173 */ 189 */
190 uint32_t in_use GNUNET_PACKED;
174 191
175}; 192};
176 193