GNUnet  0.10.x
dht.h
Go to the documentation of this file.
1 /*
2  This file is part of GNUnet.
3  Copyright (C) 2001, 2002, 2003, 2004, 2009, 2011 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 DHT_H
28 #define DHT_H
29 
30 
34 #define DHT_BLOOM_SIZE 128
35 
36 
38 
44 {
49 
54 
59 
64 
65 };
66 
67 
73 {
78 
83 
87  uint32_t desired_replication_level GNUNET_PACKED;
88 
93  uint32_t type GNUNET_PACKED;
94 
98  struct GNUNET_HashCode key GNUNET_PACKED;
99 
105 
106  /* Possibly followed by xquery, copied to end of this dealy do */
107 
108 };
109 
110 
116 {
121 
126 
131  struct GNUNET_HashCode key GNUNET_PACKED;
132 
137 
138  /* Followed by an array of the hash codes of known results */
139 
140 };
141 
142 
143 
148 {
153 
157  uint32_t type GNUNET_PACKED;
158 
163  uint32_t put_path_length GNUNET_PACKED;
164 
169  uint32_t get_path_length GNUNET_PACKED;
170 
175 
180 
184  struct GNUNET_HashCode key GNUNET_PACKED;
185 
186  /* put path, get path and actual data are copied to end of this dealy do */
187 
188 };
189 
190 
195 {
200 
204  uint32_t type GNUNET_PACKED;
205 
210 
214  uint32_t desired_replication_level GNUNET_PACKED;
215 
220 
224  struct GNUNET_HashCode key GNUNET_PACKED;
225 
226  /* DATA copied to end of this message */
227 
228 };
229 
230 
235 {
240 
245 
249  uint32_t type GNUNET_PACKED;
250 
254  uint32_t hop_count GNUNET_PACKED;
255 
259  uint32_t desired_replication_level GNUNET_PACKED;
260 
265  uint32_t put_path_length GNUNET_PACKED;
266 
270  struct GNUNET_TIME_AbsoluteNBO expiration_time;
271 
275  struct GNUNET_HashCode key GNUNET_PACKED;
276 
277  /* put path (if tracked) */
278 
279  /* Payload */
280 
281 };
282 
283 
288 {
294 
298  uint32_t type GNUNET_PACKED;
299 
303  int16_t get GNUNET_PACKED;
304 
308  int16_t get_resp GNUNET_PACKED;
309 
313  int16_t put GNUNET_PACKED;
314 
318  int16_t filter_key GNUNET_PACKED;
319 
323  struct GNUNET_HashCode key GNUNET_PACKED;
324 };
325 
326 
331 {
336 
341 
345  uint32_t type GNUNET_PACKED;
346 
350  uint32_t hop_count GNUNET_PACKED;
351 
355  uint32_t desired_replication_level GNUNET_PACKED;
356 
361  uint32_t get_path_length GNUNET_PACKED;
362 
366  struct GNUNET_HashCode key GNUNET_PACKED;
367 
368  /* get path (if tracked) */
369 
370 };
371 
376 {
381 
385  uint32_t type GNUNET_PACKED;
386 
390  uint32_t put_path_length GNUNET_PACKED;
391 
395  uint32_t get_path_length GNUNET_PACKED;
396 
400  struct GNUNET_TIME_AbsoluteNBO expiration_time;
401 
405  struct GNUNET_HashCode key GNUNET_PACKED;
406 
407  /* put path (if tracked) */
408 
409  /* get path (if tracked) */
410 
411  /* Payload */
412 
413 };
414 
416 
417 #endif
static char * expiration
Credential TTL.
DHT GET RESULTS KNOWN message sent from clients to service.
Definition: dht.h:115
struct GNUNET_GETOPT_CommandLineOption options[]
Definition: 002.c:5
Message to insert data into the DHT, sent from clients to DHT service.
Definition: dht.h:194
struct GNUNET_MessageHeader header
Type: GNUNET_MESSAGE_TYPE_DHT_CLIENT_GET_STOP.
Definition: dht.h:48
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.
uint64_t unique_id
Unique ID identifying this request.
Definition: dht.h:58
uint32_t reserved
Always zero.
Definition: dht.h:53
Message to monitor put requests going through peer, DHT service -> clients.
Definition: dht.h:234
Message to request monitoring messages, clients -> DHT service.
Definition: dht.h:287
A 512-bit hashcode.
#define GNUNET_NETWORK_STRUCT_END
Define as empty, GNUNET_PACKED should suffice, but this won&#39;t work on W32;.
struct GNUNET_HashCode key
Key of this request.
Definition: dht.h:63
#define GNUNET_PACKED
gcc-ism to get packed structs.
DHT GET message sent from clients to service.
Definition: dht.h:72
Message which indicates the DHT should cancel outstanding requests and discard any state...
Definition: dht.h:43
enum GNUNET_TESTBED_UnderlayLinkModelType type
the type of this model
Header for all communications.
Message to monitor get requests going through peer, DHT service -> clients.
Definition: dht.h:330
Message to monitor get results going through peer, DHT service -> clients.
Definition: dht.h:375
Reply to a GET send from the service to a client.
Definition: dht.h:147