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 {
64 
69 
74 
79 
84 
89 
94 
95  /* followed by:
96  * name with length name_len
97  * serialized record data with rd_count records
98  */
99 };
100 
101 
106 {
111 
116 
121 
126 
130 };
131 
132 
137 {
142 
147 
152 
153  /* followed by:
154  * name with length name_len
155  */
156 };
157 
158 
163 {
168 
173 
178 
183 
189 
194 
195  /* followed by:
196  * name with length name_len
197  * serialized record data with rd_count records
198  */
199 };
200 
201 
206 {
211 
216 
221 };
222 
223 
228 {
233 
238 
243 
248 
254 
259 
260  /* followed by:
261  * name with length name_len
262  * serialized record data with rd_count records
263  */
264 };
265 
266 
271 {
276 
281 
286 
291 
296 
301 
302  /* followed by:
303  * name with length name_len
304  * serialized record data with rd_count records
305  */
306 };
307 
308 
313 {
318 
324 
329 };
330 
331 
336 {
341 
345  uint32_t reserved;
346 
352  uint64_t limit;
353 };
354 
355 
360 {
365 
370 };
371 
372 
377 {
382 
388  uint64_t limit;
389 };
390 
391 
396 {
401 };
402 
403 
405 
406 
407 /* end of namestore.h */
408 #endif
#define GNUNET_NETWORK_STRUCT_BEGIN
Define as empty, GNUNET_PACKED should suffice, but this won't work on W32.
#define GNUNET_NETWORK_STRUCT_END
Define as empty, GNUNET_PACKED should suffice, but this won't work on W32;.
#define GNUNET_PACKED
gcc-ism to get packed structs.
A private key for an identity as per LSD0001.
An identity key as per LSD0001.
Header for all communications.
Generic namestore message with op id.
Definition: namestore.h:41
uint32_t r_id
Request ID in NBO.
Definition: namestore.h:51
struct GNUNET_MessageHeader header
header.type will be GNUNET_MESSAGE_TYPE_NAMESTORE_* header.size will be message size
Definition: namestore.h:46
Time for absolute time used by GNUnet, in microseconds and in network byte order.
Lookup a label.
Definition: namestore.h:137
struct GNUNET_NAMESTORE_Header gns_header
Type will be GNUNET_MESSAGE_TYPE_NAMESTORE_RECORD_LOOKUP.
Definition: namestore.h:141
struct GNUNET_IDENTITY_PrivateKey zone
The private key of the zone to look up in.
Definition: namestore.h:151
uint32_t label_len
Length of the name.
Definition: namestore.h:146
uint16_t rd_len
Length of serialized record data.
Definition: namestore.h:177
struct GNUNET_NAMESTORE_Header gns_header
Type will be GNUNET_MESSAGE_TYPE_NAMESTORE_RECORD_LOOKUP_RESPONSE.
Definition: namestore.h:167
uint16_t rd_count
Number of records contained.
Definition: namestore.h:182
uint16_t name_len
Name length.
Definition: namestore.h:172
int16_t found
Was the label found in the database?? GNUNET_YES or GNUNET_NO.
Definition: namestore.h:188
struct GNUNET_IDENTITY_PrivateKey private_key
The private key of the authority.
Definition: namestore.h:193
Record is returned from the namestore (as authority).
Definition: namestore.h:271
uint16_t rd_len
Length of serialized record data.
Definition: namestore.h:285
uint16_t reserved
always zero (for alignment)
Definition: namestore.h:295
uint16_t name_len
Name length.
Definition: namestore.h:280
struct GNUNET_IDENTITY_PrivateKey private_key
The private key of the authority.
Definition: namestore.h:300
uint16_t rd_count
Number of records contained.
Definition: namestore.h:290
struct GNUNET_NAMESTORE_Header gns_header
Type will be GNUNET_MESSAGE_TYPE_NAMESTORE_RECORD_RESULT.
Definition: namestore.h:275
Store a record to the namestore (as authority).
Definition: namestore.h:59
uint16_t reserved
Reserved for alignment.
Definition: namestore.h:88
struct GNUNET_NAMESTORE_Header gns_header
Type will be GNUNET_MESSAGE_TYPE_NAMESTORE_RECORD_STORE.
Definition: namestore.h:63
uint16_t rd_count
Number of records contained.
Definition: namestore.h:83
uint16_t rd_len
Length of serialized record data.
Definition: namestore.h:78
struct GNUNET_TIME_AbsoluteNBO expire
Expiration time.
Definition: namestore.h:68
struct GNUNET_IDENTITY_PrivateKey private_key
The private key of the authority.
Definition: namestore.h:93
uint16_t name_len
Name length.
Definition: namestore.h:73
Response to a record storage request.
Definition: namestore.h:106
uint16_t emsg_len
Error message length.
Definition: namestore.h:120
uint16_t reserved
Reserved for alignment.
Definition: namestore.h:125
struct GNUNET_NAMESTORE_Header gns_header
Type will be GNUNET_MESSAGE_TYPE_NAMESTORE_RECORD_STORE_RESPONSE.
Definition: namestore.h:110
int32_t op_result
GNUNET_SYSERR on failure, GNUNET_OK on success
Definition: namestore.h:115
Ask for next result of zone iteration for the given operation.
Definition: namestore.h:377
struct GNUNET_NAMESTORE_Header gns_header
Type will be GNUNET_MESSAGE_TYPE_NAMESTORE_ZONE_ITERATION_NEXT.
Definition: namestore.h:381
uint64_t limit
Number of records to return to the iterator in one shot (before GNUNET_MESSAGE_TYPE_NAMESTORE_ZONE_IT...
Definition: namestore.h:388
Start a zone iteration for the given zone.
Definition: namestore.h:360
struct GNUNET_IDENTITY_PrivateKey zone
Zone key.
Definition: namestore.h:369
struct GNUNET_NAMESTORE_Header gns_header
Type will be GNUNET_MESSAGE_TYPE_NAMESTORE_ZONE_ITERATION_START.
Definition: namestore.h:364
Stop zone iteration for the given operation.
Definition: namestore.h:396
struct GNUNET_NAMESTORE_Header gns_header
Type will be GNUNET_MESSAGE_TYPE_NAMESTORE_ZONE_ITERATION_STOP.
Definition: namestore.h:400
Ask for next result of zone iteration for the given operation.
Definition: namestore.h:336
struct GNUNET_MessageHeader header
Type will be GNUNET_MESSAGE_TYPE_NAMESTORE_MONITOR_NEXT.
Definition: namestore.h:340
uint64_t limit
Number of records to return to the iterator in one shot (before #GNUNET_MESSAGE_TYPE_NAMESTORE_ZONE_M...
Definition: namestore.h:352
uint32_t reserved
Always zero.
Definition: namestore.h:345
Start monitoring a zone.
Definition: namestore.h:313
uint32_t iterate_first
GNUNET_YES to first iterate over all records, GNUNET_NO to only monitor changes.o
Definition: namestore.h:323
struct GNUNET_MessageHeader header
Type will be GNUNET_MESSAGE_TYPE_NAMESTORE_MONITOR_START.
Definition: namestore.h:317
struct GNUNET_IDENTITY_PrivateKey zone
Zone key.
Definition: namestore.h:328
Lookup a name for a zone hash.
Definition: namestore.h:206
struct GNUNET_IDENTITY_PrivateKey zone
The private key of the zone to look up in.
Definition: namestore.h:215
struct GNUNET_IDENTITY_PublicKey value_zone
The public key of the target zone.
Definition: namestore.h:220
struct GNUNET_NAMESTORE_Header gns_header
Type will be GNUNET_MESSAGE_TYPE_NAMESTORE_ZONE_TO_NAME.
Definition: namestore.h:210
Respone for zone to name lookup.
Definition: namestore.h:228
int16_t res
result in NBO: GNUNET_OK on success, GNUNET_NO if there were no results, GNUNET_SYSERR on error
Definition: namestore.h:253
uint16_t name_len
Length of the name.
Definition: namestore.h:237
struct GNUNET_NAMESTORE_Header gns_header
Type will be GNUNET_MESSAGE_TYPE_NAMESTORE_ZONE_TO_NAME_RESPONSE.
Definition: namestore.h:232
struct GNUNET_IDENTITY_PrivateKey zone
The private key of the zone that contained the name.
Definition: namestore.h:258
uint16_t rd_count
Number of records contained.
Definition: namestore.h:247
uint16_t rd_len
Length of serialized record data.
Definition: namestore.h:242