GNUnet  0.11.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 
192 {
196  struct GNUNET_NAMESTORE_Header gns_header;
197 
202 
206  struct GNUNET_CRYPTO_EcdsaPublicKey value_zone;
207 };
208 
209 
214 {
218  struct GNUNET_NAMESTORE_Header gns_header;
219 
223  uint16_t name_len GNUNET_PACKED;
224 
228  uint16_t rd_len GNUNET_PACKED;
229 
233  uint16_t rd_count GNUNET_PACKED;
234 
240 
245 
246  /* followed by:
247  * name with length name_len
248  * serialized record data with rd_count records
249  */
250 };
251 
252 
257 {
261  struct GNUNET_NAMESTORE_Header gns_header;
262 
266  uint16_t name_len GNUNET_PACKED;
267 
271  uint16_t rd_len GNUNET_PACKED;
272 
276  uint16_t rd_count GNUNET_PACKED;
277 
282 
286  struct GNUNET_CRYPTO_EcdsaPrivateKey private_key;
287 
288  /* followed by:
289  * name with length name_len
290  * serialized record data with rd_count records
291  */
292 };
293 
294 
299 {
304 
309  uint32_t iterate_first GNUNET_PACKED;
310 
315 };
316 
317 
322 {
327 
331  uint32_t reserved;
332 
338  uint64_t limit;
339 };
340 
341 
346 {
350  struct GNUNET_NAMESTORE_Header gns_header;
351 
356 };
357 
358 
363 {
367  struct GNUNET_NAMESTORE_Header gns_header;
368 
374  uint64_t limit;
375 };
376 
377 
382 {
386  struct GNUNET_NAMESTORE_Header gns_header;
387 };
388 
389 
391 
392 
393 /* end of namestore.h */
394 #endif
Start monitoring a zone.
Definition: namestore.h:298
Ask for next result of zone iteration for the given operation.
Definition: namestore.h:362
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:245
Start a zone iteration for the given zone.
Definition: namestore.h:345
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:338
uint32_t reserved
Always zero.
Definition: namestore.h:331
Stop zone iteration for the given operation.
Definition: namestore.h:381
static int res
Ask for next result of zone iteration for the given operation.
Definition: namestore.h:321
#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:213
#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:191
Lookup a label.
Definition: namestore.h:122
Header for all communications.
Record is returned from the namestore (as authority).
Definition: namestore.h:256
uint64_t limit
Number of records to return to the iterator in one shot (before GNUNET_MESSAGE_TYPE_NAMESTORE_ZONE_IT...
Definition: namestore.h:374
static unsigned long long reserved
How much space have we currently reserved?
Lookup a label.
Definition: namestore.h:148