GNUnet  0.10.x
gnunet-service-cadet_paths.h
Go to the documentation of this file.
1 
2 /*
3  This file is part of GNUnet.
4  Copyright (C) 2001-2017 GNUnet e.V.
5 
6  GNUnet is free software: you can redistribute it and/or modify it
7  under the terms of the GNU Affero General Public License as published
8  by the Free Software Foundation, either version 3 of the License,
9  or (at your option) any later version.
10 
11  GNUnet is distributed in the hope that it will be useful, but
12  WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  Affero General Public License for more details.
15 
16  You should have received a copy of the GNU Affero General Public License
17  along with this program. If not, see <http://www.gnu.org/licenses/>.
18 
19  SPDX-License-Identifier: AGPL3.0-or-later
20 */
21 
28 #ifndef GNUNET_SERVICE_CADET_PATHS_H
29 #define GNUNET_SERVICE_CADET_PATHS_H
30 
31 #include "gnunet_util_lib.h"
32 #include "gnunet-service-cadet.h"
33 
45 void
46 GCPP_try_path_from_dht (const struct GNUNET_PeerIdentity *get_path,
47  unsigned int get_path_length,
48  const struct GNUNET_PeerIdentity *put_path,
49  unsigned int put_path_length);
50 
51 
59 struct CadetPeerPath *
60 GCPP_get_path_from_route (unsigned int path_length,
61  const struct GNUNET_PeerIdentity *pids);
62 
63 
71 unsigned int
72 GCPP_get_length (struct CadetPeerPath *path);
73 
74 
85 struct CadetConnection *
87  struct CadetPeer *destination,
88  unsigned int off);
89 
90 
99 void
101  unsigned int off,
102  struct CadetConnection *cc);
103 
104 
113 void
115  unsigned int off,
116  struct CadetConnection *cc);
117 
118 
126 unsigned int
128  struct CadetPeer *cp);
129 
130 
146 
147 
156 void
158 
159 
167 struct CadetPeer *
169  unsigned int off);
170 
171 
178 const char *
179 GCPP_2s (struct CadetPeerPath *p);
180 
181 
182 #endif
Peer description.
GNUNET_CONTAINER_HeapCostType GCPP_get_desirability(const struct CadetPeerPath *path)
Return how much we like keeping the path.
const char * GCPP_2s(struct CadetPeerPath *p)
Convert a path to a human-readable string.
Low-level connection to a destination.
struct CadetPeerPath * path
Path we are using to our destination.
struct CadetPeer * destination
To which peer does this connection go?
void GCPP_del_connection(struct CadetPeerPath *path, unsigned int off, struct CadetConnection *cc)
Notify path that it is no longer used for connection cc which ended at the path&#39;s offset off...
void GCPP_release(struct CadetPeerPath *path)
The given peer cp used to own this path.
struct CadetPeer * GCPP_get_peer_at_offset(struct CadetPeerPath *path, unsigned int off)
Obtain the peer at offset off in path.
static struct GNUNET_OS_Process * p
Helper process we started.
Definition: gnunet-qr.c:59
void GCPP_try_path_from_dht(const struct GNUNET_PeerIdentity *get_path, unsigned int get_path_length, const struct GNUNET_PeerIdentity *put_path, unsigned int put_path_length)
Create a peer path based on the result of a DHT lookup.
struct CadetConnection * GCPP_get_connection(struct CadetPeerPath *path, struct CadetPeer *destination, unsigned int off)
Return connection to destination using path, or return NULL if no such connection exists...
struct CadetPeerPath * GCPP_get_path_from_route(unsigned int path_length, const struct GNUNET_PeerIdentity *pids)
We got an incoming connection, obtain the corresponding path.
uint64_t GNUNET_CONTAINER_HeapCostType
Cost by which elements in a heap can be ordered.
The identity of the host (wraps the signing key of the peer).
unsigned int GCPP_find_peer(struct CadetPeerPath *path, struct CadetPeer *cp)
Find peer&#39;s offset on path.
void GCPP_add_connection(struct CadetPeerPath *path, unsigned int off, struct CadetConnection *cc)
Notify path that it is used for connection cc which ends at the path&#39;s offset off.
unsigned int GCPP_get_length(struct CadetPeerPath *path)
Return the length of the path.
Information regarding a possible path to reach a peer.
unsigned int off
Offset of our destination in path.
Information we track per peer.