GNUnet  0.11.x
gnunet-service-dht.h
Go to the documentation of this file.
1 /*
2  This file is part of GNUnet.
3  Copyright (C) 2009-2016 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 
26 #ifndef GNUNET_SERVICE_DHT_H
27 #define GNUNET_SERVICE_DHT_H
28 
32 
33 
34 #define DEBUG_DHT GNUNET_EXTRA_LOGGING
35 
39 extern const struct GNUNET_CONFIGURATION_Handle *GDS_cfg;
40 
44 extern struct GNUNET_SERVICE_Handle *GDS_service;
45 
50 
54 extern struct GNUNET_STATISTICS_Handle *GDS_stats;
55 
59 extern struct GNUNET_MessageHeader *GDS_my_hello;
60 
61 
72 void
74  const struct GNUNET_HashCode *query_hash,
75  unsigned int get_path_length,
76  const struct GNUNET_DHT_PathElement *get_path);
77 
78 
91 void
94  uint32_t hop_count,
95  uint32_t desired_replication_level,
96  unsigned int path_length,
97  const struct GNUNET_DHT_PathElement *path,
98  const struct GNUNET_HashCode *key);
99 
100 
109 void
111  const struct GNUNET_DHT_PathElement *get_path,
112  unsigned int get_path_length);
113 
114 
125 void
127  const struct GDS_DATACACHE_BlockData *bd,
128  uint32_t hop_count,
129  uint32_t desired_replication_level);
130 
131 #endif
struct GNUNET_GETOPT_CommandLineOption options[]
Definition: 002.c:5
struct GNUNET_HashCode key
The key used in the DHT.
struct GNUNET_MessageHeader * GDS_my_hello
Our HELLO.
void GDS_CLIENTS_process_get(enum GNUNET_DHT_RouteOption options, enum GNUNET_BLOCK_Type type, uint32_t hop_count, uint32_t desired_replication_level, unsigned int path_length, const struct GNUNET_DHT_PathElement *path, const struct GNUNET_HashCode *key)
Check if some client is monitoring GET messages and notify them in that case.
void GDS_CLIENTS_handle_reply(const struct GDS_DATACACHE_BlockData *bd, const struct GNUNET_HashCode *query_hash, unsigned int get_path_length, const struct GNUNET_DHT_PathElement *get_path)
Handle a reply we've received from another peer.
struct GNUNET_STATISTICS_Handle * GDS_stats
Handle for the statistics service.
void GDS_CLIENTS_process_put(enum GNUNET_DHT_RouteOption options, const struct GDS_DATACACHE_BlockData *bd, uint32_t hop_count, uint32_t desired_replication_level)
Check if some client is monitoring PUT messages and notify them in that case.
struct GNUNET_BLOCK_Context * GDS_block_context
Our handle to the BLOCK library.
struct GNUNET_SERVICE_Handle * GDS_service
Handle for the service.
void GDS_CLIENTS_process_get_resp(const struct GDS_DATACACHE_BlockData *bd, const struct GNUNET_DHT_PathElement *get_path, unsigned int get_path_length)
Check if some client is monitoring GET RESP messages and notify them in that case.
const struct GNUNET_CONFIGURATION_Handle * GDS_cfg
Configuration we use.
GNUnet DHT service's datacache integration.
GNUNET_BLOCK_Type
Blocks in the datastore and the datacache must have a unique type.
GNUNET_DHT_RouteOption
Options for routing.
Information about a block stored in the datacache.
Handle to an initialized block library.
Definition: block.c:55
A (signed) path tracking a block's flow through the DHT is represented by an array of path elements,...
A 512-bit hashcode.
Header for all communications.
Handle to a service.
Definition: service.c:117
Handle for the service.
enum GNUNET_TESTBED_UnderlayLinkModelType type
the type of this model