GNUnet 0.22.2
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
52};
53
55{
60
65
70
75
76
77 /* followed by:
78 * name with length name_len
79 * serialized record data with rd_count records
80 */
81};
82
87{
92
96 uint16_t reserved;
97
103
107 uint16_t rd_set_count;
108
113
118};
119
120
125{
130
135
136};
137
142{
147
152
157
162
167
172};
173
174
179{
184
189
194
198 uint16_t filter;
199
204
205 /* followed by:
206 * the private zone key
207 * name with length name_len
208 */
209};
210
215{
220
225
230
235
240
241 /* followed by:
242 * the private zone key
243 * label with length label_len
244 * editor hint with length editor_hint_len
245 */
246};
247
248
253{
258
263
268
273
278
279 /* followed by:
280 * the private zone key
281 * label with length label_len
282 * editor hint with length editor_hint_len
283 * replacement editor hint with length editor_hint_replacement_len
284 */
285};
286
287
292{
297
302
307
312
318
323
328
329 /* followed by:
330 * the private zone key
331 * name with length name_len
332 * serialized record data with rd_count records
333 */
334};
335
336
341{
346
351
356
362};
363
364
369{
374
382
387
392
397
402
403 /* followed by:
404 * the private zone key
405 * name with length name_len
406 * serialized record data with rd_count records
407 */
408};
409
410
415{
420
426
431
436
441
446
447 /* followed by:
448 * the private key of the authority
449 * name with length name_len
450 * serialized record data with rd_count records
451 */
452};
453
458{
463
468
473
474};
475
480{
485
490
491};
492
493
494
499{
504
510
515 uint16_t filter;
516
521
525};
526
527
532{
537
541 uint32_t reserved;
542
548 uint64_t limit;
549};
550
551
556{
561
566 uint16_t filter;
567
572
576};
577
578
583{
588
594 uint64_t limit;
595};
596
597
602{
607};
608
609
611
612
613/* end of namestore.h */
614#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.
Edit a record set and set editor hint/advisory lock.
Definition: namestore.h:253
uint16_t editor_hint_replacement_len
Unused.
Definition: namestore.h:272
struct GNUNET_NAMESTORE_Header gns_header
Type will be #GNUNET_MESSAGE_TYPE_NAMESTORE_EDIT_RECORD_SET_CANCEL.
Definition: namestore.h:257
uint16_t editor_hint_len
Unused.
Definition: namestore.h:267
uint16_t label_len
Length of the name.
Definition: namestore.h:262
uint16_t key_len
Length of the zone key.
Definition: namestore.h:277
Edit a record set and set editor hint/advisory lock.
Definition: namestore.h:215
uint16_t reserved
Unused.
Definition: namestore.h:234
struct GNUNET_NAMESTORE_Header gns_header
Type will be #GNUNET_MESSAGE_TYPE_NAMESTORE_EDIT_RECORD_SET.
Definition: namestore.h:219
uint16_t editor_hint_len
Unused.
Definition: namestore.h:229
uint16_t label_len
Length of the name.
Definition: namestore.h:224
uint16_t key_len
Length of the zone key.
Definition: namestore.h:239
Response to RecordSetEditMessage.
Definition: namestore.h:142
struct GNUNET_NAMESTORE_Header gns_header
Type will be GNUNET_MESSAGE_TYPE_NAMESTORE_RECORD_SET_EDIT_RESPONSE.
Definition: namestore.h:146
uint16_t editor_hint_len
Length of the editor hint.
Definition: namestore.h:151
uint16_t rd_count
Number of records contained.
Definition: namestore.h:166
uint16_t ec
Reserved.
Definition: namestore.h:156
uint16_t rd_len
Length of serialized record data.
Definition: namestore.h:161
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:179
uint16_t unused
Unused.
Definition: namestore.h:193
struct GNUNET_NAMESTORE_Header gns_header
Type will be GNUNET_MESSAGE_TYPE_NAMESTORE_RECORD_LOOKUP.
Definition: namestore.h:183
uint16_t key_len
Length of the zone key.
Definition: namestore.h:203
uint16_t filter
The record filter.
Definition: namestore.h:198
uint16_t label_len
Length of the name.
Definition: namestore.h:188
uint16_t rd_len
Length of serialized record data.
Definition: namestore.h:306
struct GNUNET_NAMESTORE_Header gns_header
Type will be GNUNET_MESSAGE_TYPE_NAMESTORE_RECORD_LOOKUP_RESPONSE.
Definition: namestore.h:296
uint16_t reserved
Reserved (alignment)
Definition: namestore.h:322
uint16_t key_len
Length of the zone key.
Definition: namestore.h:327
uint16_t rd_count
Number of records contained.
Definition: namestore.h:311
uint16_t name_len
Name length.
Definition: namestore.h:301
int16_t found
Was the label found in the database?? GNUNET_YES or GNUNET_NO.
Definition: namestore.h:317
Response to a record storage request.
Definition: namestore.h:125
struct GNUNET_NAMESTORE_Header gns_header
Type will be GNUNET_MESSAGE_TYPE_NAMESTORE_GENERIC_RESPONSE.
Definition: namestore.h:129
uint32_t ec
GNUNET_ErrorCode.
Definition: namestore.h:134
Record is returned from the namestore (as authority).
Definition: namestore.h:415
uint16_t rd_len
Length of serialized record data.
Definition: namestore.h:435
uint16_t name_len
Name length.
Definition: namestore.h:430
uint16_t rd_count
Number of records contained.
Definition: namestore.h:440
struct GNUNET_TIME_AbsoluteNBO expire
Expiration time if the record result (if any).
Definition: namestore.h:425
struct GNUNET_NAMESTORE_Header gns_header
Type will be GNUNET_MESSAGE_TYPE_NAMESTORE_RECORD_RESULT.
Definition: namestore.h:419
uint16_t key_len
Length of the zone key.
Definition: namestore.h:445
uint16_t rd_len
Length of serialized record data.
Definition: namestore.h:64
uint16_t rd_count
Number of records contained.
Definition: namestore.h:69
uint16_t reserved
Reserved for alignment.
Definition: namestore.h:74
uint16_t name_len
Name length.
Definition: namestore.h:59
Store a record to the namestore (as authority).
Definition: namestore.h:87
uint16_t reserved
Reserved.
Definition: namestore.h:96
struct GNUNET_NAMESTORE_Header gns_header
Type will be GNUNET_MESSAGE_TYPE_NAMESTORE_RECORD_STORE.
Definition: namestore.h:91
uint16_t rd_set_count
Number of record sets.
Definition: namestore.h:107
uint16_t single_tx
GNUNET_YES if all sets should be stored in a single transaction (e.g.
Definition: namestore.h:102
uint16_t key_len
Length of the zone key.
Definition: namestore.h:112
Send a transaction control message.
Definition: namestore.h:458
uint16_t reserved
always zero (for alignment)
Definition: namestore.h:467
struct GNUNET_NAMESTORE_Header gns_header
Type will be #GNUNET_MESSAGE_TYPE_NAMESTORE_TX_CONTROL.
Definition: namestore.h:462
uint16_t control
The type of control message to send.
Definition: namestore.h:472
Result of a transaction control message.
Definition: namestore.h:480
uint32_t ec
Of type GNUNET_ErrorCode.
Definition: namestore.h:489
struct GNUNET_NAMESTORE_Header gns_header
Type will be #GNUNET_MESSAGE_TYPE_NAMESTORE_TX_CONTROL_RESULT.
Definition: namestore.h:484
Ask for next result of zone iteration for the given operation.
Definition: namestore.h:583
struct GNUNET_NAMESTORE_Header gns_header
Type will be GNUNET_MESSAGE_TYPE_NAMESTORE_ZONE_ITERATION_NEXT.
Definition: namestore.h:587
uint64_t limit
Number of records to return to the iterator in one shot (before GNUNET_MESSAGE_TYPE_NAMESTORE_ZONE_IT...
Definition: namestore.h:594
Start a zone iteration for the given zone.
Definition: namestore.h:556
uint16_t key_len
Length of the zone key.
Definition: namestore.h:571
uint16_t filter
Record set filter control flags.
Definition: namestore.h:566
struct GNUNET_NAMESTORE_Header gns_header
Type will be GNUNET_MESSAGE_TYPE_NAMESTORE_ZONE_ITERATION_START.
Definition: namestore.h:560
Stop zone iteration for the given operation.
Definition: namestore.h:602
struct GNUNET_NAMESTORE_Header gns_header
Type will be GNUNET_MESSAGE_TYPE_NAMESTORE_ZONE_ITERATION_STOP.
Definition: namestore.h:606
Ask for next result of zone iteration for the given operation.
Definition: namestore.h:532
struct GNUNET_MessageHeader header
Type will be GNUNET_MESSAGE_TYPE_NAMESTORE_MONITOR_NEXT.
Definition: namestore.h:536
uint64_t limit
Number of records to return to the iterator in one shot (before #GNUNET_MESSAGE_TYPE_NAMESTORE_ZONE_M...
Definition: namestore.h:548
uint32_t reserved
Always zero.
Definition: namestore.h:541
Start monitoring a zone.
Definition: namestore.h:499
uint32_t iterate_first
GNUNET_YES to first iterate over all records, GNUNET_NO to only monitor changes.o
Definition: namestore.h:509
uint16_t filter
Record set filter control flags.
Definition: namestore.h:515
uint16_t key_len
Length of the zone key.
Definition: namestore.h:520
struct GNUNET_MessageHeader header
Type will be GNUNET_MESSAGE_TYPE_NAMESTORE_MONITOR_START.
Definition: namestore.h:503
Lookup a name for a zone hash.
Definition: namestore.h:341
uint16_t pkey_len
Length of the public value zone key.
Definition: namestore.h:355
uint16_t key_len
Length of the zone key.
Definition: namestore.h:350
struct GNUNET_NAMESTORE_Header gns_header
Type will be GNUNET_MESSAGE_TYPE_NAMESTORE_ZONE_TO_NAME.
Definition: namestore.h:345
Response for zone to name lookup.
Definition: namestore.h:369
uint16_t name_len
Length of the name.
Definition: namestore.h:386
int32_t ec
result in NBO: GNUNET_EC_NONE on success, GNUNET_EC_NAMESTORE_NO_RESULTS if there were no results.
Definition: namestore.h:381
uint16_t key_len
Length of the zone key.
Definition: namestore.h:401
struct GNUNET_NAMESTORE_Header gns_header
Type will be GNUNET_MESSAGE_TYPE_NAMESTORE_ZONE_TO_NAME_RESPONSE.
Definition: namestore.h:373
uint16_t rd_count
Number of records contained.
Definition: namestore.h:396
uint16_t rd_len
Length of serialized record data.
Definition: namestore.h:391