GNUnet  0.11.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 
72 {
77 
82 
86  uint32_t desired_replication_level GNUNET_PACKED;
87 
92  uint32_t type GNUNET_PACKED;
93 
97  struct GNUNET_HashCode key GNUNET_PACKED;
98 
104 
105  /* Possibly followed by xquery, copied to end of this dealy do */
106 };
107 
108 
114 {
119 
124 
129  struct GNUNET_HashCode key GNUNET_PACKED;
130 
135 
136  /* Followed by an array of the hash codes of known results */
137 };
138 
139 
144 {
149 
153  uint32_t type GNUNET_PACKED;
154 
159  uint32_t put_path_length GNUNET_PACKED;
160 
165  uint32_t get_path_length GNUNET_PACKED;
166 
171 
176 
180  struct GNUNET_HashCode key GNUNET_PACKED;
181 
182  /* put path, get path and actual data are copied to end of this dealy do */
183 };
184 
185 
190 {
195 
199  uint32_t type GNUNET_PACKED;
200 
205 
209  uint32_t desired_replication_level GNUNET_PACKED;
210 
215 
219  struct GNUNET_HashCode key GNUNET_PACKED;
220 
221  /* DATA copied to end of this message */
222 };
223 
224 
229 {
234 
239 
243  uint32_t type GNUNET_PACKED;
244 
248  uint32_t hop_count GNUNET_PACKED;
249 
253  uint32_t desired_replication_level GNUNET_PACKED;
254 
259  uint32_t put_path_length GNUNET_PACKED;
260 
264  struct GNUNET_TIME_AbsoluteNBO expiration_time;
265 
269  struct GNUNET_HashCode key GNUNET_PACKED;
270 
271  /* put path (if tracked) */
272 
273  /* Payload */
274 };
275 
276 
281 {
287 
291  uint32_t type GNUNET_PACKED;
292 
296  int16_t get GNUNET_PACKED;
297 
301  int16_t get_resp GNUNET_PACKED;
302 
306  int16_t put GNUNET_PACKED;
307 
311  int16_t filter_key GNUNET_PACKED;
312 
316  struct GNUNET_HashCode key GNUNET_PACKED;
317 };
318 
319 
324 {
329 
334 
338  uint32_t type GNUNET_PACKED;
339 
343  uint32_t hop_count GNUNET_PACKED;
344 
348  uint32_t desired_replication_level GNUNET_PACKED;
349 
354  uint32_t get_path_length GNUNET_PACKED;
355 
359  struct GNUNET_HashCode key GNUNET_PACKED;
360 
361  /* get path (if tracked) */
362 };
363 
368 {
373 
377  uint32_t type GNUNET_PACKED;
378 
382  uint32_t put_path_length GNUNET_PACKED;
383 
387  uint32_t get_path_length GNUNET_PACKED;
388 
392  struct GNUNET_TIME_AbsoluteNBO expiration_time;
393 
397  struct GNUNET_HashCode key GNUNET_PACKED;
398 
399  /* put path (if tracked) */
400 
401  /* get path (if tracked) */
402 
403  /* Payload */
404 };
405 
407 
408 #endif
DHT GET RESULTS KNOWN message sent from clients to service.
Definition: dht.h:113
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:189
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:228
Message to request monitoring messages, clients -> DHT service.
Definition: dht.h:280
A 512-bit hashcode.
static char * expiration
Credential TTL.
Definition: gnunet-abd.c:96
#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:71
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:323
Message to monitor get results going through peer, DHT service -> clients.
Definition: dht.h:367
Reply to a GET send from the service to a client.
Definition: dht.h:143