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 
48 
53 
58 
63 };
64 
65 
75 
80 
84  uint32_t desired_replication_level GNUNET_PACKED;
85 
90  uint32_t type GNUNET_PACKED;
91 
95  struct GNUNET_HashCode key GNUNET_PACKED;
96 
102 
103  /* Possibly followed by xquery, copied to end of this dealy do */
104 };
105 
106 
116 
121 
126  struct GNUNET_HashCode key GNUNET_PACKED;
127 
132 
133  /* Followed by an array of the hash codes of known results */
134 };
135 
136 
137 
146 
150  uint32_t type GNUNET_PACKED;
151 
156  uint32_t put_path_length GNUNET_PACKED;
157 
162  uint32_t get_path_length GNUNET_PACKED;
163 
168 
173 
177  struct GNUNET_HashCode key GNUNET_PACKED;
178 
179  /* put path, get path and actual data are copied to end of this dealy do */
180 };
181 
182 
191 
195  uint32_t type GNUNET_PACKED;
196 
201 
205  uint32_t desired_replication_level GNUNET_PACKED;
206 
211 
215  struct GNUNET_HashCode key GNUNET_PACKED;
216 
217  /* DATA copied to end of this message */
218 };
219 
220 
229 
234 
238  uint32_t type GNUNET_PACKED;
239 
243  uint32_t hop_count GNUNET_PACKED;
244 
248  uint32_t desired_replication_level GNUNET_PACKED;
249 
254  uint32_t put_path_length GNUNET_PACKED;
255 
259  struct GNUNET_TIME_AbsoluteNBO expiration_time;
260 
264  struct GNUNET_HashCode key GNUNET_PACKED;
265 
266  /* put path (if tracked) */
267 
268  /* Payload */
269 };
270 
271 
281 
285  uint32_t type GNUNET_PACKED;
286 
290  int16_t get GNUNET_PACKED;
291 
295  int16_t get_resp GNUNET_PACKED;
296 
300  int16_t put GNUNET_PACKED;
301 
305  int16_t filter_key GNUNET_PACKED;
306 
310  struct GNUNET_HashCode key GNUNET_PACKED;
311 };
312 
313 
322 
327 
331  uint32_t type GNUNET_PACKED;
332 
336  uint32_t hop_count GNUNET_PACKED;
337 
341  uint32_t desired_replication_level GNUNET_PACKED;
342 
347  uint32_t get_path_length GNUNET_PACKED;
348 
352  struct GNUNET_HashCode key GNUNET_PACKED;
353 
354  /* get path (if tracked) */
355 };
356 
365 
369  uint32_t type GNUNET_PACKED;
370 
374  uint32_t put_path_length GNUNET_PACKED;
375 
379  uint32_t get_path_length GNUNET_PACKED;
380 
384  struct GNUNET_TIME_AbsoluteNBO expiration_time;
385 
389  struct GNUNET_HashCode key GNUNET_PACKED;
390 
391  /* put path (if tracked) */
392 
393  /* get path (if tracked) */
394 
395  /* Payload */
396 };
397 
399 
400 #endif
static char * expiration
Credential TTL.
DHT GET RESULTS KNOWN message sent from clients to service.
Definition: dht.h:111
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:186
struct GNUNET_MessageHeader header
Type: GNUNET_MESSAGE_TYPE_DHT_CLIENT_GET_STOP.
Definition: dht.h:47
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:57
uint32_t reserved
Always zero.
Definition: dht.h:52
Message to monitor put requests going through peer, DHT service -> clients.
Definition: dht.h:224
Message to request monitoring messages, clients -> DHT service.
Definition: dht.h:275
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:62
#define GNUNET_PACKED
gcc-ism to get packed structs.
DHT GET message sent from clients to service.
Definition: dht.h:70
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:317
Message to monitor get results going through peer, DHT service -> clients.
Definition: dht.h:360
Reply to a GET send from the service to a client.
Definition: dht.h:141