GNUnet  0.10.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 
44 
49 
54 };
55 
56 
63 struct StatusMessage {
68 
73 
79 };
80 
81 
92 
96  int32_t rid GNUNET_PACKED;
97 };
98 
99 
109 
113  uint32_t type GNUNET_PACKED;
114 
118  uint64_t next_uid GNUNET_PACKED;
119 
123  uint32_t random GNUNET_PACKED;
124 
129 };
130 
131 
136 struct GetMessage {
141 
145  uint32_t type GNUNET_PACKED;
146 
150  uint64_t next_uid GNUNET_PACKED;
151 
155  uint32_t random GNUNET_PACKED;
156 };
157 
158 
168 
172  uint32_t type GNUNET_PACKED;
173 
177  uint64_t next_uid GNUNET_PACKED;
178 };
179 
180 
185 struct DataMessage {
193 
197  uint32_t rid GNUNET_PACKED;
198 
202  uint32_t size GNUNET_PACKED;
203 
207  uint32_t type GNUNET_PACKED;
208 
212  uint32_t priority GNUNET_PACKED;
213 
218 
223 
228 
235  uint64_t uid;
236 
241 
245  struct GNUNET_HashCode key;
246 };
248 
249 
250 
251 #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...
static char * expiration
Credential TTL.
uint32_t entries
Number of items to reserve.
Definition: datastore.h:48
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:87
static unsigned int replication
Message to the datastore service asking about specific content.
Definition: datastore.h:104
Message to the datastore service asking about zero anonymity content.
Definition: datastore.h:163
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:136
uint16_t status
See PRISM_STATUS_*-constants.
A 512-bit hashcode.
Message transmitting content from or to the datastore service.
Definition: datastore.h:185
struct GNUNET_HashCode key
The key used in the DHT.
static unsigned int size
Size of the "table".
Definition: peer.c:66
#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:235
#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:63
struct GNUNET_MessageHeader header
Type is GNUNET_MESSAGE_TYPE_DATASTORE_RESERVE.
Definition: datastore.h:43
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:53