GNUnet 0.21.1
peerstore.h
Go to the documentation of this file.
1/*
2 This file is part of GNUnet
3 Copyright (C) 2012-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 */
26#ifndef PEERSTORE_H_
27#define PEERSTORE_H_
28
30
31
33
38{
43
48
53
58
63 uint32_t /* enum GNUNET_PEERSTORE_StoreOption */ options GNUNET_PACKED;
64
70
76
77
83
88
89 /* Followed by key and value */
90};
91
96{
101
106
112
113};
114
119{
124
129
134};
135
140{
145
150
155
161
166
172
177
178 /* Followed by key */
179};
180
185{
190
195
196};
197
202{
207
212
217
222
228
233
239
240 /* Followed by subsystem and key */
241};
242
243
248{
253
258
263};
264
266{
271
276};
277
279#endif
API to the peerstore service.
#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 512-bit hashcode.
Header for all communications.
The identity of the host (wraps the signing key of the peer).
Time for absolute time used by GNUnet, in microseconds and in network byte order.
Iteration next message.
Definition: peerstore.h:248
struct GNUNET_MessageHeader header
GNUnet message header.
Definition: peerstore.h:252
uint32_t rid
Request id.
Definition: peerstore.h:262
uint64_t limit
Number of records to return.
Definition: peerstore.h:257
Iteration start message.
Definition: peerstore.h:202
struct GNUNET_MessageHeader header
GNUnet message header.
Definition: peerstore.h:206
uint16_t peer_set
GNUNET_YES if peer id value set, GNUNET_NO otherwise
Definition: peerstore.h:221
struct GNUNET_PeerIdentity peer
Peer Identity.
Definition: peerstore.h:211
uint16_t reserved
reserved
Definition: peerstore.h:232
uint32_t rid
Request id.
Definition: peerstore.h:216
uint16_t sub_system_size
Size of the sub_system string Allocated at position 0 after this struct.
Definition: peerstore.h:227
uint16_t key_size
Size of the key string Allocated at position 1 after this struct.
Definition: peerstore.h:238
struct GNUNET_MessageHeader header
GNUnet message header.
Definition: peerstore.h:270
uint32_t rid
Request id.
Definition: peerstore.h:275
Iteration next message.
Definition: peerstore.h:185
struct GNUNET_MessageHeader header
GNUnet message header.
Definition: peerstore.h:189
uint64_t limit
Number of records to return.
Definition: peerstore.h:194
Iteration start message.
Definition: peerstore.h:140
uint16_t iterate_first
GNUNET_YES if iterate first, GNUNET_NO otherwise
Definition: peerstore.h:176
struct GNUNET_PeerIdentity peer
Peer Identity.
Definition: peerstore.h:149
uint16_t peer_set
GNUNET_YES if peer id value set, GNUNET_NO otherwise
Definition: peerstore.h:165
uint32_t rid
Request id.
Definition: peerstore.h:154
uint16_t key_size
Size of the key string Allocated at position 1 after this struct.
Definition: peerstore.h:160
uint16_t sub_system_size
Size of the sub_system string Allocated at position 0 after this struct.
Definition: peerstore.h:171
struct GNUNET_MessageHeader header
GNUnet message header.
Definition: peerstore.h:144
Message carrying a PEERSTORE record message.
Definition: peerstore.h:38
uint16_t value_size
Size of value blob Allocated at position 2 after this struct.
Definition: peerstore.h:75
uint16_t key_size
Size of the key string Allocated at position 1 after this struct.
Definition: peerstore.h:69
struct GNUNET_TIME_AbsoluteNBO expiry
Expiry time of entry.
Definition: peerstore.h:52
uint16_t reserved
reserved
Definition: peerstore.h:87
uint32_t rid
Request id.
Definition: peerstore.h:57
uint32_t options
Options, needed only in case of a store operation.
Definition: peerstore.h:63
uint16_t sub_system_size
Size of the sub_system string Allocated at position 0 after this struct.
Definition: peerstore.h:82
struct GNUNET_PeerIdentity peer
Peer Identity.
Definition: peerstore.h:47
struct GNUNET_MessageHeader header
GNUnet message header.
Definition: peerstore.h:42
Message carrying a PEERSTORE result message.
Definition: peerstore.h:96
uint32_t result
Options, needed only in case of a store operation.
Definition: peerstore.h:111
struct GNUNET_MessageHeader header
GNUnet message header.
Definition: peerstore.h:100
uint32_t rid
Request id.
Definition: peerstore.h:105
Message carrying record key hash.
Definition: peerstore.h:119
struct GNUNET_MessageHeader header
GNUnet message header.
Definition: peerstore.h:123
uint32_t rid
Request id.
Definition: peerstore.h:128
struct GNUNET_HashCode keyhash
Hash of a record key.
Definition: peerstore.h:133