GNUnet 0.21.1
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 rd_set_count;
97
102
107};
108
109
114{
119
124
125};
126
131{
136
141
146
151
156
161};
162
163
168{
173
178
183
187 uint16_t filter;
188
193
194 /* followed by:
195 * the private zone key
196 * name with length name_len
197 */
198};
199
204{
209
214
219
224
229
230 /* followed by:
231 * the private zone key
232 * label with length label_len
233 * editor hint with length editor_hint_len
234 */
235};
236
237
242{
247
252
257
262
267
268 /* followed by:
269 * the private zone key
270 * label with length label_len
271 * editor hint with length editor_hint_len
272 * replacement editor hint with length editor_hint_replacement_len
273 */
274};
275
276
281{
286
291
296
301
307
312
317
318 /* followed by:
319 * the private zone key
320 * name with length name_len
321 * serialized record data with rd_count records
322 */
323};
324
325
330{
335
340
345
351};
352
353
358{
363
371
376
381
386
391
392 /* followed by:
393 * the private zone key
394 * name with length name_len
395 * serialized record data with rd_count records
396 */
397};
398
399
404{
409
415
420
425
430
435
436 /* followed by:
437 * the private key of the authority
438 * name with length name_len
439 * serialized record data with rd_count records
440 */
441};
442
447{
452
457
462
463};
464
469{
474
479
480};
481
482
483
488{
493
499
504 uint16_t filter;
505
510
514};
515
516
521{
526
530 uint32_t reserved;
531
537 uint64_t limit;
538};
539
540
545{
550
555 uint16_t filter;
556
561
565};
566
567
572{
577
583 uint64_t limit;
584};
585
586
591{
596};
597
598
600
601
602/* end of namestore.h */
603#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:242
uint16_t editor_hint_replacement_len
Unused.
Definition: namestore.h:261
struct GNUNET_NAMESTORE_Header gns_header
Type will be #GNUNET_MESSAGE_TYPE_NAMESTORE_EDIT_RECORD_SET_CANCEL.
Definition: namestore.h:246
uint16_t editor_hint_len
Unused.
Definition: namestore.h:256
uint16_t label_len
Length of the name.
Definition: namestore.h:251
uint16_t key_len
Length of the zone key.
Definition: namestore.h:266
Edit a record set and set editor hint/advisory lock.
Definition: namestore.h:204
uint16_t reserved
Unused.
Definition: namestore.h:223
struct GNUNET_NAMESTORE_Header gns_header
Type will be #GNUNET_MESSAGE_TYPE_NAMESTORE_EDIT_RECORD_SET.
Definition: namestore.h:208
uint16_t editor_hint_len
Unused.
Definition: namestore.h:218
uint16_t label_len
Length of the name.
Definition: namestore.h:213
uint16_t key_len
Length of the zone key.
Definition: namestore.h:228
Response to RecordSetEditMessage.
Definition: namestore.h:131
struct GNUNET_NAMESTORE_Header gns_header
Type will be GNUNET_MESSAGE_TYPE_NAMESTORE_RECORD_SET_EDIT_RESPONSE.
Definition: namestore.h:135
uint16_t editor_hint_len
Length of the editor hint.
Definition: namestore.h:140
uint16_t rd_count
Number of records contained.
Definition: namestore.h:155
uint16_t ec
Reserved.
Definition: namestore.h:145
uint16_t rd_len
Length of serialized record data.
Definition: namestore.h:150
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:168
uint16_t unused
Unused.
Definition: namestore.h:182
struct GNUNET_NAMESTORE_Header gns_header
Type will be GNUNET_MESSAGE_TYPE_NAMESTORE_RECORD_LOOKUP.
Definition: namestore.h:172
uint16_t key_len
Length of the zone key.
Definition: namestore.h:192
uint16_t filter
The record filter.
Definition: namestore.h:187
uint16_t label_len
Length of the name.
Definition: namestore.h:177
uint16_t rd_len
Length of serialized record data.
Definition: namestore.h:295
struct GNUNET_NAMESTORE_Header gns_header
Type will be GNUNET_MESSAGE_TYPE_NAMESTORE_RECORD_LOOKUP_RESPONSE.
Definition: namestore.h:285
uint16_t reserved
Reserved (alignment)
Definition: namestore.h:311
uint16_t key_len
Length of the zone key.
Definition: namestore.h:316
uint16_t rd_count
Number of records contained.
Definition: namestore.h:300
uint16_t name_len
Name length.
Definition: namestore.h:290
int16_t found
Was the label found in the database?? GNUNET_YES or GNUNET_NO.
Definition: namestore.h:306
Response to a record storage request.
Definition: namestore.h:114
struct GNUNET_NAMESTORE_Header gns_header
Type will be GNUNET_MESSAGE_TYPE_NAMESTORE_GENERIC_RESPONSE.
Definition: namestore.h:118
uint32_t ec
GNUNET_ErrorCode.
Definition: namestore.h:123
Record is returned from the namestore (as authority).
Definition: namestore.h:404
uint16_t rd_len
Length of serialized record data.
Definition: namestore.h:424
uint16_t name_len
Name length.
Definition: namestore.h:419
uint16_t rd_count
Number of records contained.
Definition: namestore.h:429
struct GNUNET_TIME_AbsoluteNBO expire
Expiration time if the record result (if any).
Definition: namestore.h:414
struct GNUNET_NAMESTORE_Header gns_header
Type will be GNUNET_MESSAGE_TYPE_NAMESTORE_RECORD_RESULT.
Definition: namestore.h:408
uint16_t key_len
Length of the zone key.
Definition: namestore.h:434
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
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:96
uint16_t key_len
Length of the zone key.
Definition: namestore.h:101
Send a transaction control message.
Definition: namestore.h:447
uint16_t reserved
always zero (for alignment)
Definition: namestore.h:456
struct GNUNET_NAMESTORE_Header gns_header
Type will be #GNUNET_MESSAGE_TYPE_NAMESTORE_TX_CONTROL.
Definition: namestore.h:451
uint16_t control
The type of control message to send.
Definition: namestore.h:461
Result of a transaction control message.
Definition: namestore.h:469
uint32_t ec
Of type GNUNET_ErrorCode.
Definition: namestore.h:478
struct GNUNET_NAMESTORE_Header gns_header
Type will be #GNUNET_MESSAGE_TYPE_NAMESTORE_TX_CONTROL_RESULT.
Definition: namestore.h:473
Ask for next result of zone iteration for the given operation.
Definition: namestore.h:572
struct GNUNET_NAMESTORE_Header gns_header
Type will be GNUNET_MESSAGE_TYPE_NAMESTORE_ZONE_ITERATION_NEXT.
Definition: namestore.h:576
uint64_t limit
Number of records to return to the iterator in one shot (before GNUNET_MESSAGE_TYPE_NAMESTORE_ZONE_IT...
Definition: namestore.h:583
Start a zone iteration for the given zone.
Definition: namestore.h:545
uint16_t key_len
Length of the zone key.
Definition: namestore.h:560
uint16_t filter
Record set filter control flags.
Definition: namestore.h:555
struct GNUNET_NAMESTORE_Header gns_header
Type will be GNUNET_MESSAGE_TYPE_NAMESTORE_ZONE_ITERATION_START.
Definition: namestore.h:549
Stop zone iteration for the given operation.
Definition: namestore.h:591
struct GNUNET_NAMESTORE_Header gns_header
Type will be GNUNET_MESSAGE_TYPE_NAMESTORE_ZONE_ITERATION_STOP.
Definition: namestore.h:595
Ask for next result of zone iteration for the given operation.
Definition: namestore.h:521
struct GNUNET_MessageHeader header
Type will be GNUNET_MESSAGE_TYPE_NAMESTORE_MONITOR_NEXT.
Definition: namestore.h:525
uint64_t limit
Number of records to return to the iterator in one shot (before #GNUNET_MESSAGE_TYPE_NAMESTORE_ZONE_M...
Definition: namestore.h:537
uint32_t reserved
Always zero.
Definition: namestore.h:530
Start monitoring a zone.
Definition: namestore.h:488
uint32_t iterate_first
GNUNET_YES to first iterate over all records, GNUNET_NO to only monitor changes.o
Definition: namestore.h:498
uint16_t filter
Record set filter control flags.
Definition: namestore.h:504
uint16_t key_len
Length of the zone key.
Definition: namestore.h:509
struct GNUNET_MessageHeader header
Type will be GNUNET_MESSAGE_TYPE_NAMESTORE_MONITOR_START.
Definition: namestore.h:492
Lookup a name for a zone hash.
Definition: namestore.h:330
uint16_t pkey_len
Length of the public value zone key.
Definition: namestore.h:344
uint16_t key_len
Length of the zone key.
Definition: namestore.h:339
struct GNUNET_NAMESTORE_Header gns_header
Type will be GNUNET_MESSAGE_TYPE_NAMESTORE_ZONE_TO_NAME.
Definition: namestore.h:334
Respone for zone to name lookup.
Definition: namestore.h:358
uint16_t name_len
Length of the name.
Definition: namestore.h:375
int32_t ec
result in NBO: GNUNET_EC_NONE on success, GNUNET_EC_NAMESTORE_NO_RESULTS if there were no results.
Definition: namestore.h:370
uint16_t key_len
Length of the zone key.
Definition: namestore.h:390
struct GNUNET_NAMESTORE_Header gns_header
Type will be GNUNET_MESSAGE_TYPE_NAMESTORE_ZONE_TO_NAME_RESPONSE.
Definition: namestore.h:362
uint16_t rd_count
Number of records contained.
Definition: namestore.h:385
uint16_t rd_len
Length of serialized record data.
Definition: namestore.h:380