diff options
author | Bart Polot <bart@net.in.tum.de> | 2011-11-12 00:33:15 +0000 |
---|---|---|
committer | Bart Polot <bart@net.in.tum.de> | 2011-11-12 00:33:15 +0000 |
commit | 4acf4de35680033d0a05463a7478bbfb4b407a94 (patch) | |
tree | 9b2592f6ba743ba483f21e89b3561efd14e0108a /src/mesh/mesh_tunnel_tree.h | |
parent | 60a5ec4e8707df05bf0645aff5086f193ae89643 (diff) | |
download | gnunet-4acf4de35680033d0a05463a7478bbfb4b407a94.tar.gz gnunet-4acf4de35680033d0a05463a7478bbfb4b407a94.zip |
Changed tree library: now assumes own short ID == 1, refactored code in library and mesh service, adapted and extended library testcase
Diffstat (limited to 'src/mesh/mesh_tunnel_tree.h')
-rw-r--r-- | src/mesh/mesh_tunnel_tree.h | 47 |
1 files changed, 13 insertions, 34 deletions
diff --git a/src/mesh/mesh_tunnel_tree.h b/src/mesh/mesh_tunnel_tree.h index 094a617cb..5060fa1a7 100644 --- a/src/mesh/mesh_tunnel_tree.h +++ b/src/mesh/mesh_tunnel_tree.h | |||
@@ -101,19 +101,6 @@ path_duplicate (struct MeshPeerPath *path); | |||
101 | 101 | ||
102 | 102 | ||
103 | /** | 103 | /** |
104 | * Find the first peer whom to send a packet to go down this path | ||
105 | * | ||
106 | * @param t The tunnel tree to use | ||
107 | * @param peer The peerinfo of the peer we are trying to reach | ||
108 | * | ||
109 | * @return peerinfo of the peer who is the first hop in the tunnel | ||
110 | * NULL on error | ||
111 | */ | ||
112 | struct GNUNET_PeerIdentity * | ||
113 | path_get_first_hop (struct MeshTunnelTree *t, GNUNET_PEER_Id peer); | ||
114 | |||
115 | |||
116 | /** | ||
117 | * Get the length of a path | 104 | * Get the length of a path |
118 | * | 105 | * |
119 | * @param p The path to measure, with the local peer at any point of it | 106 | * @param p The path to measure, with the local peer at any point of it |
@@ -172,27 +159,6 @@ tree_new (GNUNET_PEER_Id peer); | |||
172 | 159 | ||
173 | 160 | ||
174 | /** | 161 | /** |
175 | * Set own identity in the tree | ||
176 | * | ||
177 | * @param tree Tree. | ||
178 | * @param peer A short peer id of local peer. | ||
179 | */ | ||
180 | void | ||
181 | tree_set_me (struct MeshTunnelTree *tree, GNUNET_PEER_Id peer); | ||
182 | |||
183 | |||
184 | /** | ||
185 | * Get the id of the local id of the tree. | ||
186 | * | ||
187 | * @param tree Tree whose local id we want to now. | ||
188 | * | ||
189 | * @return Short peer id of local peer. | ||
190 | */ | ||
191 | GNUNET_PEER_Id | ||
192 | tree_get_me (struct MeshTunnelTree *tree); | ||
193 | |||
194 | |||
195 | /** | ||
196 | * Set the status of a node. | 162 | * Set the status of a node. |
197 | * | 163 | * |
198 | * @param tree Tree. | 164 | * @param tree Tree. |
@@ -226,6 +192,19 @@ tree_get_predecessor (struct MeshTunnelTree *tree); | |||
226 | 192 | ||
227 | 193 | ||
228 | /** | 194 | /** |
195 | * Find the first peer whom to send a packet to go down this path | ||
196 | * | ||
197 | * @param t The tunnel tree to use | ||
198 | * @param peer The peerinfo of the peer we are trying to reach | ||
199 | * | ||
200 | * @return peerinfo of the peer who is the first hop in the tunnel | ||
201 | * NULL on error | ||
202 | */ | ||
203 | struct GNUNET_PeerIdentity * | ||
204 | tree_get_first_hop (struct MeshTunnelTree *t, GNUNET_PEER_Id peer); | ||
205 | |||
206 | |||
207 | /** | ||
229 | * Find the given peer in the tree. | 208 | * Find the given peer in the tree. |
230 | * | 209 | * |
231 | * @param tree Tree where to look for the peer. | 210 | * @param tree Tree where to look for the peer. |