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 };
117 
118 
123 {
128 
133 
138 
139  /* followed by:
140  * name with length name_len
141  */
142 };
143 
144 
149 {
154 
159 
164 
169 
175 
180 
181  /* followed by:
182  * name with length name_len
183  * serialized record data with rd_count records
184  */
185 };
186 
187 
192 {
197 
202 
207 };
208 
209 
214 {
219 
224 
229 
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 {
262 
267 
272 
277 
282 
287 
288  /* followed by:
289  * name with length name_len
290  * serialized record data with rd_count records
291  */
292 };
293 
294 
299 {
304 
310 
315 };
316 
317 
322 {
327 
331  uint32_t reserved;
332 
338  uint64_t limit;
339 };
340 
341 
346 {
351 
356 };
357 
358 
363 {
368 
374  uint64_t limit;
375 };
376 
377 
382 {
387 };
388 
389 
391 
392 
393 /* end of namestore.h */
394 #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:123
struct GNUNET_NAMESTORE_Header gns_header
Type will be GNUNET_MESSAGE_TYPE_NAMESTORE_RECORD_LOOKUP.
Definition: namestore.h:127
struct GNUNET_IDENTITY_PrivateKey zone
The private key of the zone to look up in.
Definition: namestore.h:137
uint32_t label_len
Length of the name.
Definition: namestore.h:132
uint16_t found
Was the label found in the database?? GNUNET_YES or GNUNET_NO.
Definition: namestore.h:174
uint16_t rd_len
Length of serialized record data.
Definition: namestore.h:163
struct GNUNET_NAMESTORE_Header gns_header
Type will be GNUNET_MESSAGE_TYPE_NAMESTORE_RECORD_LOOKUP_RESPONSE.
Definition: namestore.h:153
uint16_t rd_count
Number of records contained.
Definition: namestore.h:168
uint16_t name_len
Name length.
Definition: namestore.h:158
struct GNUNET_IDENTITY_PrivateKey private_key
The private key of the authority.
Definition: namestore.h:179
Record is returned from the namestore (as authority).
Definition: namestore.h:257
uint16_t rd_len
Length of serialized record data.
Definition: namestore.h:271
uint16_t reserved
always zero (for alignment)
Definition: namestore.h:281
uint16_t name_len
Name length.
Definition: namestore.h:266
struct GNUNET_IDENTITY_PrivateKey private_key
The private key of the authority.
Definition: namestore.h:286
uint16_t rd_count
Number of records contained.
Definition: namestore.h:276
struct GNUNET_NAMESTORE_Header gns_header
Type will be GNUNET_MESSAGE_TYPE_NAMESTORE_RECORD_RESULT.
Definition: namestore.h:261
Store a record to the namestore (as authority).
Definition: namestore.h:59
uint16_t reserved
always zero (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
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:363
struct GNUNET_NAMESTORE_Header gns_header
Type will be GNUNET_MESSAGE_TYPE_NAMESTORE_ZONE_ITERATION_NEXT.
Definition: namestore.h:367
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
Start a zone iteration for the given zone.
Definition: namestore.h:346
struct GNUNET_IDENTITY_PrivateKey zone
Zone key.
Definition: namestore.h:355
struct GNUNET_NAMESTORE_Header gns_header
Type will be GNUNET_MESSAGE_TYPE_NAMESTORE_ZONE_ITERATION_START.
Definition: namestore.h:350
Stop zone iteration for the given operation.
Definition: namestore.h:382
struct GNUNET_NAMESTORE_Header gns_header
Type will be GNUNET_MESSAGE_TYPE_NAMESTORE_ZONE_ITERATION_STOP.
Definition: namestore.h:386
Ask for next result of zone iteration for the given operation.
Definition: namestore.h:322
struct GNUNET_MessageHeader header
Type will be GNUNET_MESSAGE_TYPE_NAMESTORE_MONITOR_NEXT.
Definition: namestore.h:326
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
Start monitoring a zone.
Definition: namestore.h:299
uint32_t iterate_first
GNUNET_YES to first iterate over all records, GNUNET_NO to only monitor changes.o
Definition: namestore.h:309
struct GNUNET_MessageHeader header
Type will be GNUNET_MESSAGE_TYPE_NAMESTORE_MONITOR_START.
Definition: namestore.h:303
struct GNUNET_IDENTITY_PrivateKey zone
Zone key.
Definition: namestore.h:314
Lookup a name for a zone hash.
Definition: namestore.h:192
struct GNUNET_IDENTITY_PrivateKey zone
The private key of the zone to look up in.
Definition: namestore.h:201
struct GNUNET_IDENTITY_PublicKey value_zone
The public key of the target zone.
Definition: namestore.h:206
struct GNUNET_NAMESTORE_Header gns_header
Type will be GNUNET_MESSAGE_TYPE_NAMESTORE_ZONE_TO_NAME.
Definition: namestore.h:196
Respone for zone to name lookup.
Definition: namestore.h:214
int16_t res
result in NBO: GNUNET_OK on success, GNUNET_NO if there were no results, GNUNET_SYSERR on error
Definition: namestore.h:239
uint16_t name_len
Length of the name.
Definition: namestore.h:223
struct GNUNET_NAMESTORE_Header gns_header
Type will be GNUNET_MESSAGE_TYPE_NAMESTORE_ZONE_TO_NAME_RESPONSE.
Definition: namestore.h:218
struct GNUNET_IDENTITY_PrivateKey zone
The private key of the zone that contained the name.
Definition: namestore.h:244
uint16_t rd_count
Number of records contained.
Definition: namestore.h:233
uint16_t rd_len
Length of serialized record data.
Definition: namestore.h:228