aboutsummaryrefslogtreecommitdiff
path: root/src/dht/gnunet-service-dht_routing.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/dht/gnunet-service-dht_routing.h')
-rw-r--r--src/dht/gnunet-service-dht_routing.h87
1 files changed, 0 insertions, 87 deletions
diff --git a/src/dht/gnunet-service-dht_routing.h b/src/dht/gnunet-service-dht_routing.h
deleted file mode 100644
index 08c7de870..000000000
--- a/src/dht/gnunet-service-dht_routing.h
+++ /dev/null
@@ -1,87 +0,0 @@
1/*
2 This file is part of GNUnet.
3 Copyright (C) 2011, 2022 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
21/**
22 * @file dht/gnunet-service-dht_routing.h
23 * @brief GNUnet DHT tracking of requests for routing replies
24 * @author Christian Grothoff
25 */
26#ifndef GNUNET_SERVICE_DHT_ROUTING_H
27#define GNUNET_SERVICE_DHT_ROUTING_H
28
29#include "gnunet_util_lib.h"
30#include "gnunet_block_lib.h"
31#include "gnunet_dht_service.h"
32
33
34/**
35 * Handle a reply (route to origin). Only forwards the reply back to
36 * other peers waiting for it. Does not do local caching or
37 * forwarding to local clients. Essentially calls
38 * GDS_NEIGHBOURS_handle_reply() for all peers that sent us a matching
39 * request recently.
40 *
41 * @param bd block details
42 * @param query_hash query used in the inquiry
43 * @param get_path_length number of entries in @a get_path
44 * @param get_path peers this reply has traversed so far (if tracked)
45 */
46void
47GDS_ROUTING_process (const struct GNUNET_DATACACHE_Block *bd,
48 const struct GNUNET_HashCode *query_hash,
49 unsigned int get_path_length,
50 const struct GNUNET_DHT_PathElement *get_path);
51
52
53/**
54 * Add a new entry to our routing table.
55 *
56 * @param sender peer that originated the request
57 * @param type type of the block
58 * @param bg block group to evaluate replies, henceforth owned by routing
59 * @param options options for processing
60 * @param key key for the content
61 * @param xquery extended query
62 * @param xquery_size number of bytes in @a xquery
63 */
64void
65GDS_ROUTING_add (const struct GNUNET_PeerIdentity *sender,
66 enum GNUNET_BLOCK_Type type,
67 struct GNUNET_BLOCK_Group *bg,
68 enum GNUNET_DHT_RouteOption options,
69 const struct GNUNET_HashCode *key,
70 const void *xquery,
71 size_t xquery_size);
72
73
74/**
75 * Initialize routing subsystem.
76 */
77void
78GDS_ROUTING_init (void);
79
80
81/**
82 * Shutdown routing subsystem.
83 */
84void
85GDS_ROUTING_done (void);
86
87#endif