GNUnet  0.10.x
gnunet-service-dht_routing.h
Go to the documentation of this file.
1 /*
2  This file is part of GNUnet.
3  Copyright (C) 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 
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 
51 void
53  struct GNUNET_TIME_Absolute expiration_time,
54  const struct GNUNET_HashCode *key,
55  unsigned int put_path_length,
56  const struct GNUNET_PeerIdentity *put_path,
57  unsigned int get_path_length,
58  const struct GNUNET_PeerIdentity *get_path,
59  const void *data,
60  size_t data_size);
61 
62 
74 void
75 GDS_ROUTING_add (const struct GNUNET_PeerIdentity *sender,
77  struct GNUNET_BLOCK_Group *bg,
79  const struct GNUNET_HashCode * key,
80  const void *xquery,
81  size_t xquery_size);
82 
83 
87 void
88 GDS_ROUTING_init (void);
89 
90 
94 void
95 GDS_ROUTING_done (void);
96 
97 #endif
struct GNUNET_GETOPT_CommandLineOption options[]
Definition: 002.c:5
GNUNET_BLOCK_Type
Blocks in the datastore and the datacache must have a unique type.
void GDS_ROUTING_add(const struct GNUNET_PeerIdentity *sender, enum GNUNET_BLOCK_Type type, struct GNUNET_BLOCK_Group *bg, enum GNUNET_DHT_RouteOption options, const struct GNUNET_HashCode *key, const void *xquery, size_t xquery_size)
Add a new entry to our routing table.
A 512-bit hashcode.
GNUNET_DHT_RouteOption
Options for routing.
void GDS_ROUTING_process(enum GNUNET_BLOCK_Type type, struct GNUNET_TIME_Absolute expiration_time, const struct GNUNET_HashCode *key, unsigned int put_path_length, const struct GNUNET_PeerIdentity *put_path, unsigned int get_path_length, const struct GNUNET_PeerIdentity *get_path, const void *data, size_t data_size)
Handle a reply (route to origin).
struct GNUNET_BLOCK_Group * bg
Block group for filtering replies.
struct GNUNET_HashCode key
The key used in the DHT.
void GDS_ROUTING_done(void)
Shutdown routing subsystem.
The identity of the host (wraps the signing key of the peer).
Block group data.
enum GNUNET_TESTBED_UnderlayLinkModelType type
the type of this model
Time for absolute times used by GNUnet, in microseconds.
uint32_t data
The data value.
static size_t data_size
Number of bytes in data.
const void * xquery
extended query (see gnunet_block_lib.h).
void GDS_ROUTING_init(void)
Initialize routing subsystem.
size_t xquery_size
Number of bytes in xquery.