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 
46 
50  uint32_t r_id GNUNET_PACKED;
51 };
52 
53 
61  struct GNUNET_NAMESTORE_Header gns_header;
62 
67 
71  uint16_t name_len GNUNET_PACKED;
72 
76  uint16_t rd_len GNUNET_PACKED;
77 
81  uint16_t rd_count GNUNET_PACKED;
82 
87 
91  struct GNUNET_CRYPTO_EcdsaPrivateKey private_key;
92 
93  /* followed by:
94  * name with length name_len
95  * serialized record data with rd_count records
96  */
97 };
98 
99 
107  struct GNUNET_NAMESTORE_Header gns_header;
108 
113 };
114 
115 
123  struct GNUNET_NAMESTORE_Header gns_header;
124 
128  uint32_t label_len GNUNET_PACKED;
129 
134 
135  /* followed by:
136  * name with length name_len
137  */
138 };
139 
140 
148  struct GNUNET_NAMESTORE_Header gns_header;
149 
153  uint16_t name_len GNUNET_PACKED;
154 
158  uint16_t rd_len GNUNET_PACKED;
159 
163  uint16_t rd_count GNUNET_PACKED;
164 
169  uint16_t found GNUNET_PACKED;
170 
174  struct GNUNET_CRYPTO_EcdsaPrivateKey private_key;
175 
176  /* followed by:
177  * name with length name_len
178  * serialized record data with rd_count records
179  */
180 };
181 
182 
183 
191  struct GNUNET_NAMESTORE_Header gns_header;
192 
197 
201  struct GNUNET_CRYPTO_EcdsaPublicKey value_zone;
202 };
203 
204 
212  struct GNUNET_NAMESTORE_Header gns_header;
213 
217  uint16_t name_len GNUNET_PACKED;
218 
222  uint16_t rd_len GNUNET_PACKED;
223 
227  uint16_t rd_count GNUNET_PACKED;
228 
234 
239 
240  /* followed by:
241  * name with length name_len
242  * serialized record data with rd_count records
243  */
244 };
245 
246 
254  struct GNUNET_NAMESTORE_Header gns_header;
255 
259  uint16_t name_len GNUNET_PACKED;
260 
264  uint16_t rd_len GNUNET_PACKED;
265 
269  uint16_t rd_count GNUNET_PACKED;
270 
275 
279  struct GNUNET_CRYPTO_EcdsaPrivateKey private_key;
280 
281  /* followed by:
282  * name with length name_len
283  * serialized record data with rd_count records
284  */
285 };
286 
287 
296 
301  uint32_t iterate_first GNUNET_PACKED;
302 
307 };
308 
309 
318 
322  uint32_t reserved;
323 
329  uint64_t limit;
330 };
331 
332 
333 
341  struct GNUNET_NAMESTORE_Header gns_header;
342 
347 };
348 
349 
357  struct GNUNET_NAMESTORE_Header gns_header;
358 
364  uint64_t limit;
365 };
366 
367 
375  struct GNUNET_NAMESTORE_Header gns_header;
376 };
377 
378 
380 
381 
382 /* end of namestore.h */
383 #endif
Start monitoring a zone.
Definition: namestore.h:291
Ask for next result of zone iteration for the given operation.
Definition: namestore.h:353
static void expire(void *cls)
Expire a PooledConnection object.
uint32_t r_id
Request ID in NBO.
Definition: namestore.h:50
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:243
Start a zone iteration for the given zone.
Definition: namestore.h:337
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:45
uint64_t limit
Number of records to return to the iterator in one shot (before #GNUNET_MESSAGE_TYPE_NAMESTORE_ZONE_M...
Definition: namestore.h:329
uint32_t reserved
Always zero.
Definition: namestore.h:322
Stop zone iteration for the given operation.
Definition: namestore.h:371
static int res
Ask for next result of zone iteration for the given operation.
Definition: namestore.h:313
#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:57
Respone for zone to name lookup.
Definition: namestore.h:208
#define GNUNET_PACKED
gcc-ism to get packed structs.
Response to a record storage request.
Definition: namestore.h:103
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:187
Lookup a label.
Definition: namestore.h:119
Header for all communications.
Record is returned from the namestore (as authority).
Definition: namestore.h:250
uint64_t limit
Number of records to return to the iterator in one shot (before GNUNET_MESSAGE_TYPE_NAMESTORE_ZONE_IT...
Definition: namestore.h:364
static unsigned long long reserved
How much space have we currently reserved?
Lookup a label.
Definition: namestore.h:144