GNUnet  0.11.x
datastore.h
Go to the documentation of this file.
1 /*
2  This file is part of GNUnet
3  Copyright (C) 2004, 2005, 2006, 2007, 2009 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 DATASTORE_H
28 #define DATASTORE_H
29 
30 
31 #include "gnunet_util_lib.h"
32 
34 
40 {
45 
50 
55 };
56 
57 
65 {
70 
75 
81 };
82 
83 
90 {
95 
99  int32_t rid GNUNET_PACKED;
100 };
101 
102 
108 {
113 
117  uint32_t type GNUNET_PACKED;
118 
122  uint64_t next_uid GNUNET_PACKED;
123 
127  uint32_t random GNUNET_PACKED;
128 
133 };
134 
135 
141 {
146 
150  uint32_t type GNUNET_PACKED;
151 
155  uint64_t next_uid GNUNET_PACKED;
156 
160  uint32_t random GNUNET_PACKED;
161 };
162 
163 
169 {
174 
178  uint32_t type GNUNET_PACKED;
179 
183  uint64_t next_uid GNUNET_PACKED;
184 };
185 
186 
192 {
200 
204  uint32_t rid GNUNET_PACKED;
205 
209  uint32_t size GNUNET_PACKED;
210 
214  uint32_t type GNUNET_PACKED;
215 
219  uint32_t priority GNUNET_PACKED;
220 
225 
230 
235 
242  uint64_t uid;
243 
248 
252  struct GNUNET_HashCode key;
253 };
255 
256 
257 #endif
static struct GNUNET_TIME_Absolute min_expiration
Minimum time that content should have to not be discarded instantly (time stamp of any content that w...
uint32_t entries
Number of items to reserve.
Definition: datastore.h:49
Message from datastore service informing client about the current size of the datastore.
Definition: datastore.h:39
Message from datastore client informing service that the remainder of the reserved bytes can now be r...
Definition: datastore.h:89
static unsigned int replication
Message to the datastore service asking about specific content.
Definition: datastore.h:107
Message to the datastore service asking about zero anonymity content.
Definition: datastore.h:168
Time for absolute time used by GNUnet, in microseconds and in network byte order. ...
#define GNUNET_NETWORK_STRUCT_BEGIN
Define as empty, GNUNET_PACKED should suffice, but this won&#39;t work on W32.
Message to the datastore service asking about specific content.
Definition: datastore.h:140
uint16_t status
See PRISM_STATUS_*-constants.
A 512-bit hashcode.
static char * expiration
Credential TTL.
Definition: gnunet-abd.c:96
Message transmitting content from or to the datastore service.
Definition: datastore.h:191
struct GNUNET_HashCode key
The key used in the DHT.
static unsigned int size
Size of the "table".
Definition: peer.c:67
#define GNUNET_NETWORK_STRUCT_END
Define as empty, GNUNET_PACKED should suffice, but this won&#39;t work on W32;.
uint64_t uid
Unique ID for the content (can be used for UPDATE); can be zero for remove (which indicates that the ...
Definition: datastore.h:242
#define GNUNET_PACKED
gcc-ism to get packed structs.
Message from datastore service informing client about the success or failure of a requested operation...
Definition: datastore.h:64
struct GNUNET_MessageHeader header
Type is GNUNET_MESSAGE_TYPE_DATASTORE_RESERVE.
Definition: datastore.h:44
enum GNUNET_TESTBED_UnderlayLinkModelType type
the type of this model
Header for all communications.
static unsigned int anonymity
static unsigned long long reserved
How much space have we currently reserved?
uint64_t amount
Number of bytes to reserve.
Definition: datastore.h:54