starting re-implementation of CADET service
[oweals/gnunet.git] / src / cadet / gnunet-service-cadet-new_paths.c
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
7      it under the terms of the GNU General Public License as published
8      by the Free Software Foundation; either version 3, or (at your
9      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      General Public License for more details.
15
16      You should have received a copy of the GNU General Public License
17      along with GNUnet; see the file COPYING.  If not, write to the
18      Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19      Boston, MA 02110-1301, USA.
20 */
21
22 /**
23  * @file cadet/gnunet-service-cadet-new_paths.c
24  * @brief Information we track per path.
25  * @author Bartlomiej Polot
26  * @author Christian Grothoff
27  */
28 #include "platform.h"
29 #include "gnunet-service-cadet-new_paths.h"
30
31 /**
32  * Create a peer path based on the result of a DHT lookup.
33  *
34  * @param get_path path of the get request
35  * @param get_path_length lenght of @a get_path
36  * @param put_path path of the put request
37  * @param put_path_length length of the @a put_path
38  * @return a path through the network
39  */
40 struct CadetPeerPath *
41 GCPP_path_from_dht (const struct GNUNET_PeerIdentity *get_path,
42                     unsigned int get_path_length,
43                     const struct GNUNET_PeerIdentity *put_path,
44                     unsigned int put_path_length)
45 {
46   GNUNET_break (0);
47   return NULL;
48 }
49
50
51 /**
52  * Destroy a path, we no longer need it.
53  *
54  * @param p path to destroy.
55  */
56 void
57 GCPP_path_destroy (struct CadetPeerPath *p)
58 {
59   GNUNET_assert (0);
60 }
61
62
63 /**
64  * Return the length of the path.  Excludes one end of the
65  * path, so the loopback path has length 0.
66  *
67  * @param path path to return the length for
68  * @return number of peers on the path
69  */
70 unsigned int
71 GCPP_get_length (struct CadetPeerPath *path)
72 {
73   GNUNET_assert (0);
74   return -1;
75 }
76
77
78 /**
79  * Obtain the identity of the peer at offset @a off in @a path.
80  *
81  * @param path peer path to inspect
82  * @param off offset to return, must be smaller than path length
83  * @param[out] pid where to write the pid, must not be NULL
84  */
85 void
86 GCPP_get_pid_at_offset (struct CadetPeerPath *path,
87                         unsigned int off,
88                         struct GNUNET_PeerIdentity *pid)
89 {
90   GNUNET_assert (0);
91 }
92
93
94 /* end of gnunet-service-cadet-new_paths.c */