diff options
author | Bart Polot <bart@net.in.tum.de> | 2013-10-08 10:30:26 +0000 |
---|---|---|
committer | Bart Polot <bart@net.in.tum.de> | 2013-10-08 10:30:26 +0000 |
commit | d83640d04d57f6388b37d19a814eb6770ea4c485 (patch) | |
tree | 09bcf5d5702aced1c504031dbfbaf787f84a0890 /src/mesh/gnunet-service-mesh_connection.h | |
parent | 45072973ee81ffa01a2fc3450a5a7dcbf57c0464 (diff) | |
download | gnunet-d83640d04d57f6388b37d19a814eb6770ea4c485.tar.gz gnunet-d83640d04d57f6388b37d19a814eb6770ea4c485.zip |
- move all core/PeerIdentity interacting code to _peer, remove GNUNET_PeerIdentity from _connection
Diffstat (limited to 'src/mesh/gnunet-service-mesh_connection.h')
-rw-r--r-- | src/mesh/gnunet-service-mesh_connection.h | 34 |
1 files changed, 23 insertions, 11 deletions
diff --git a/src/mesh/gnunet-service-mesh_connection.h b/src/mesh/gnunet-service-mesh_connection.h index 4e423e7ee..8395010fd 100644 --- a/src/mesh/gnunet-service-mesh_connection.h +++ b/src/mesh/gnunet-service-mesh_connection.h | |||
@@ -109,20 +109,17 @@ void | |||
109 | GMC_change_state (struct MeshConnection* c, enum MeshConnectionState state); | 109 | GMC_change_state (struct MeshConnection* c, enum MeshConnectionState state); |
110 | 110 | ||
111 | /** | 111 | /** |
112 | * Iterator to notify all connections of a broken link. Mark connections | 112 | * Notify other peers on a connection of a broken link. Mark connections |
113 | * to destroy after all traffic has been sent. | 113 | * to destroy after all traffic has been sent. |
114 | * | 114 | * |
115 | * @param cls Closure (peer disconnected). | 115 | * @param c Connection on which there has been a disconnection. |
116 | * @param key Current key code (tid). | 116 | * @param peer Peer that disconnected. |
117 | * @param value Value in the hash map (connection). | 117 | * @param my_full_id My ID (to send to other peers). |
118 | * | ||
119 | * @return GNUNET_YES if we should continue to iterate, | ||
120 | * GNUNET_NO if not. | ||
121 | */ | 118 | */ |
122 | int | 119 | void |
123 | GMC_notify_broken (void *cls, | 120 | GMC_notify_broken (struct MeshConnection *c, |
124 | const struct GNUNET_HashCode *key, | 121 | struct MeshPeer *peer, |
125 | void *value); | 122 | struct GNUNET_PeerIdentity *my_full_id); |
126 | 123 | ||
127 | /** | 124 | /** |
128 | * @brief Queue and pass message to core when possible. | 125 | * @brief Queue and pass message to core when possible. |
@@ -192,6 +189,21 @@ GMC_is_origin (struct MeshConnection *c, int fwd); | |||
192 | int | 189 | int |
193 | GMC_is_terminal (struct MeshConnection *c, int fwd); | 190 | GMC_is_terminal (struct MeshConnection *c, int fwd); |
194 | 191 | ||
192 | /** | ||
193 | * Sends an already built message on a connection, properly registering | ||
194 | * all used resources. | ||
195 | * | ||
196 | * @param message Message to send. Function makes a copy of it. | ||
197 | * If message is not hop-by-hop, decrements TTL of copy. | ||
198 | * @param c Connection on which this message is transmitted. | ||
199 | * @param ch Channel on which this message is transmitted, or NULL. | ||
200 | * @param fwd Is this a fwd message? | ||
201 | */ | ||
202 | void | ||
203 | GMC_send_prebuilt_message (const struct GNUNET_MessageHeader *message, | ||
204 | struct MeshConnection *c, | ||
205 | struct MeshChannel *ch, | ||
206 | int fwd); | ||
195 | 207 | ||
196 | 208 | ||
197 | #if 0 /* keep Emacsens' auto-indent happy */ | 209 | #if 0 /* keep Emacsens' auto-indent happy */ |