GNUnet  0.10.x
namestore.h
Go to the documentation of this file.
1 /*
2  This file is part of GNUnet.
3  Copyright (C) 2011-2013 GNUnet e.V.
4 
5  GNUnet is free software: you can redistribute it and/or modify it
6  under the terms of the GNU Affero General Public License as published
7  by the Free Software Foundation, either version 3 of the License,
8  or (at your option) any later version.
9 
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  Affero General Public License for more details.
14 
15  You should have received a copy of the GNU Affero General Public License
16  along with this program. If not, see <http://www.gnu.org/licenses/>.
17 
18  SPDX-License-Identifier: AGPL3.0-or-later
19 */
20 
27 #ifndef NAMESTORE_H
28 #define NAMESTORE_H
29 
33 #define MAX_NAME_LEN 256
34 
36 
41 {
47 
51  uint32_t r_id GNUNET_PACKED;
52 };
53 
54 
59 {
63  struct GNUNET_NAMESTORE_Header gns_header;
64 
69 
73  uint16_t name_len GNUNET_PACKED;
74 
78  uint16_t rd_len GNUNET_PACKED;
79 
83  uint16_t rd_count GNUNET_PACKED;
84 
89 
93  struct GNUNET_CRYPTO_EcdsaPrivateKey private_key;
94 
95  /* followed by:
96  * name with length name_len
97  * serialized record data with rd_count records
98  */
99 };
100 
101 
106 {
110  struct GNUNET_NAMESTORE_Header gns_header;
111 
116 };
117 
118 
123 {
127  struct GNUNET_NAMESTORE_Header gns_header;
128 
132  uint32_t label_len GNUNET_PACKED;
133 
138 
139  /* followed by:
140  * name with length name_len
141  */
142 };
143 
144 
149 {
153  struct GNUNET_NAMESTORE_Header gns_header;
154 
158  uint16_t name_len GNUNET_PACKED;
159 
163  uint16_t rd_len GNUNET_PACKED;
164 
168  uint16_t rd_count GNUNET_PACKED;
169 
174  uint16_t found GNUNET_PACKED;
175 
179  struct GNUNET_CRYPTO_EcdsaPrivateKey private_key;
180 
181  /* followed by:
182  * name with length name_len
183  * serialized record data with rd_count records
184  */
185 };
186 
187 
188 
193 {
197  struct GNUNET_NAMESTORE_Header gns_header;
198 
203 
207  struct GNUNET_CRYPTO_EcdsaPublicKey value_zone;
208 };
209 
210 
215 {
219  struct GNUNET_NAMESTORE_Header gns_header;
220 
224  uint16_t name_len GNUNET_PACKED;
225 
229  uint16_t rd_len GNUNET_PACKED;
230 
234  uint16_t rd_count GNUNET_PACKED;
235 
241 
246 
247  /* followed by:
248  * name with length name_len
249  * serialized record data with rd_count records
250  */
251 
252 };
253 
254 
259 {
263  struct GNUNET_NAMESTORE_Header gns_header;
264 
268  uint16_t name_len GNUNET_PACKED;
269 
273  uint16_t rd_len GNUNET_PACKED;
274 
278  uint16_t rd_count GNUNET_PACKED;
279 
284 
288  struct GNUNET_CRYPTO_EcdsaPrivateKey private_key;
289 
290  /* followed by:
291  * name with length name_len
292  * serialized record data with rd_count records
293  */
294 };
295 
296 
301 {
306 
311  uint32_t iterate_first GNUNET_PACKED;
312 
317 
318 };
319 
320 
325 {
330 
334  uint32_t reserved;
335 
341  uint64_t limit;
342 
343 };
344 
345 
346 
351 {
355  struct GNUNET_NAMESTORE_Header gns_header;
356 
361 
362 };
363 
364 
369 {
373  struct GNUNET_NAMESTORE_Header gns_header;
374 
380  uint64_t limit;
381 
382 };
383 
384 
389 {
393  struct GNUNET_NAMESTORE_Header gns_header;
394 };
395 
396 
398 
399 
400 /* end of namestore.h */
401 #endif
Start monitoring a zone.
Definition: namestore.h:300
Ask for next result of zone iteration for the given operation.
Definition: namestore.h:368
static void expire(void *cls)
Expire a PooledConnection object.
uint32_t r_id
Request ID in NBO.
Definition: namestore.h:51
static int op_result(struct GNUNET_OP_Handle *h, uint64_t op_id, int64_t result_code, const void *data, uint16_t data_size, void **ctx, uint8_t cancel)
Remove an operation, and call its result callback (unless it was cancelled).
Definition: op.c:244
Start a zone iteration for the given zone.
Definition: namestore.h:350
Private ECC key encoded for transmission.
Time for absolute time used by GNUnet, in microseconds and in network byte order. ...
#define GNUNET_NETWORK_STRUCT_BEGIN
Define as empty, GNUNET_PACKED should suffice, but this won&#39;t work on W32.
static char * zone
Name of the zone we manage.
struct GNUNET_MessageHeader header
header.type will be GNUNET_MESSAGE_TYPE_NAMESTORE_* header.size will be message size ...
Definition: namestore.h:46
uint64_t limit
Number of records to return to the iterator in one shot (before #GNUNET_MESSAGE_TYPE_NAMESTORE_ZONE_M...
Definition: namestore.h:341
uint32_t reserved
Always zero.
Definition: namestore.h:334
Stop zone iteration for the given operation.
Definition: namestore.h:388
static int res
Ask for next result of zone iteration for the given operation.
Definition: namestore.h:324
#define GNUNET_NETWORK_STRUCT_END
Define as empty, GNUNET_PACKED should suffice, but this won&#39;t work on W32;.
Store a record to the namestore (as authority).
Definition: namestore.h:58
Respone for zone to name lookup.
Definition: namestore.h:214
#define GNUNET_PACKED
gcc-ism to get packed structs.
Response to a record storage request.
Definition: namestore.h:105
Public ECC key (always for Curve25519) encoded in a format suitable for network transmission and ECDS...
Generic namestore message with op id.
Definition: namestore.h:40
Lookup a name for a zone hash.
Definition: namestore.h:192
Lookup a label.
Definition: namestore.h:122
Header for all communications.
Record is returned from the namestore (as authority).
Definition: namestore.h:258
uint64_t limit
Number of records to return to the iterator in one shot (before GNUNET_MESSAGE_TYPE_NAMESTORE_ZONE_IT...
Definition: namestore.h:380
static unsigned long long reserved
How much space have we currently reserved?
Lookup a label.
Definition: namestore.h:148