aboutsummaryrefslogtreecommitdiff
path: root/src/service/namestore/namestore.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/service/namestore/namestore.h')
-rw-r--r--src/service/namestore/namestore.h120
1 files changed, 116 insertions, 4 deletions
diff --git a/src/service/namestore/namestore.h b/src/service/namestore/namestore.h
index 35d54d317..2ace6a83e 100644
--- a/src/service/namestore/namestore.h
+++ b/src/service/namestore/namestore.h
@@ -110,10 +110,10 @@ struct RecordStoreMessage
110/** 110/**
111 * Response to a record storage request. 111 * Response to a record storage request.
112 */ 112 */
113struct RecordStoreResponseMessage 113struct NamestoreResponseMessage
114{ 114{
115 /** 115 /**
116 * Type will be #GNUNET_MESSAGE_TYPE_NAMESTORE_RECORD_STORE_RESPONSE 116 * Type will be #GNUNET_MESSAGE_TYPE_NAMESTORE_GENERIC_RESPONSE
117 */ 117 */
118 struct GNUNET_NAMESTORE_Header gns_header; 118 struct GNUNET_NAMESTORE_Header gns_header;
119 119
@@ -124,6 +124,42 @@ struct RecordStoreResponseMessage
124 124
125}; 125};
126 126
127/**
128 * Response to RecordSetEditMessage.
129 */
130struct EditRecordSetResponseMessage
131{
132 /**
133 * Type will be #GNUNET_MESSAGE_TYPE_NAMESTORE_RECORD_SET_EDIT_RESPONSE
134 */
135 struct GNUNET_NAMESTORE_Header gns_header;
136
137 /**
138 * Length of the editor hint
139 */
140 uint16_t editor_hint_len GNUNET_PACKED;
141
142 /**
143 * Reserved
144 */
145 uint16_t ec GNUNET_PACKED;
146
147 /**
148 * Length of serialized record data
149 */
150 uint16_t rd_len GNUNET_PACKED;
151
152 /**
153 * Number of records contained
154 */
155 uint16_t rd_count GNUNET_PACKED;
156
157 /**
158 * Followed by editor hint
159 * Followed by record set
160 */
161};
162
127 163
128/** 164/**
129 * Lookup a label 165 * Lookup a label
@@ -141,9 +177,9 @@ struct LabelLookupMessage
141 uint16_t label_len GNUNET_PACKED; 177 uint16_t label_len GNUNET_PACKED;
142 178
143 /** 179 /**
144 * GNUNET_YES if this lookup corresponds to an edit request 180 * Unused
145 */ 181 */
146 uint16_t is_edit_request GNUNET_PACKED; 182 uint16_t unused GNUNET_PACKED;
147 183
148 /** 184 /**
149 * The record filter 185 * The record filter
@@ -161,6 +197,82 @@ struct LabelLookupMessage
161 */ 197 */
162}; 198};
163 199
200/**
201 * Edit a record set and set editor hint/advisory lock.
202 */
203struct EditRecordSetMessage
204{
205 /**
206 * Type will be #GNUNET_MESSAGE_TYPE_NAMESTORE_EDIT_RECORD_SET
207 */
208 struct GNUNET_NAMESTORE_Header gns_header;
209
210 /**
211 * Length of the name
212 */
213 uint16_t label_len GNUNET_PACKED;
214
215 /**
216 * Unused
217 */
218 uint16_t editor_hint_len GNUNET_PACKED;
219
220 /**
221 * Unused
222 */
223 uint16_t reserved GNUNET_PACKED;
224
225 /**
226 * Length of the zone key
227 */
228 uint16_t key_len GNUNET_PACKED;
229
230 /* followed by:
231 * the private zone key
232 * label with length label_len
233 * editor hint with length editor_hint_len
234 */
235};
236
237
238/**
239 * Edit a record set and set editor hint/advisory lock.
240 */
241struct EditRecordSetCancelMessage
242{
243 /**
244 * Type will be #GNUNET_MESSAGE_TYPE_NAMESTORE_EDIT_RECORD_SET_CANCEL
245 */
246 struct GNUNET_NAMESTORE_Header gns_header;
247
248 /**
249 * Length of the name
250 */
251 uint16_t label_len GNUNET_PACKED;
252
253 /**
254 * Unused
255 */
256 uint16_t editor_hint_len GNUNET_PACKED;
257
258 /**
259 * Unused
260 */
261 uint16_t editor_hint_replacement_len GNUNET_PACKED;
262
263 /**
264 * Length of the zone key
265 */
266 uint16_t key_len GNUNET_PACKED;
267
268 /* followed by:
269 * the private zone key
270 * label with length label_len
271 * editor hint with length editor_hint_len
272 * replacement editor hint with length editor_hint_replacement_len
273 */
274};
275
164 276
165/** 277/**
166 * Lookup a label 278 * Lookup a label