diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-08-12 15:00:47 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-08-12 15:00:47 +0000 |
commit | 63d15aa9d1ea50933ff34fc42916024a5d3196bf (patch) | |
tree | 5f5dad8cabd420639867d630a0b92c000001fc06 /src/transport/gnunet-service-transport_neighbours.h | |
parent | e5a68574ecfc990eedae657c74e54dda3d96f599 (diff) | |
download | gnunet-63d15aa9d1ea50933ff34fc42916024a5d3196bf.tar.gz gnunet-63d15aa9d1ea50933ff34fc42916024a5d3196bf.zip |
no need for public key
Diffstat (limited to 'src/transport/gnunet-service-transport_neighbours.h')
-rw-r--r-- | src/transport/gnunet-service-transport_neighbours.h | 60 |
1 files changed, 16 insertions, 44 deletions
diff --git a/src/transport/gnunet-service-transport_neighbours.h b/src/transport/gnunet-service-transport_neighbours.h index 8c038ef20..281060913 100644 --- a/src/transport/gnunet-service-transport_neighbours.h +++ b/src/transport/gnunet-service-transport_neighbours.h | |||
@@ -103,6 +103,21 @@ GST_neighbours_send (const struct GNUNET_PeerIdentity *target, | |||
103 | GST_NeighbourSendContinuation cont, | 103 | GST_NeighbourSendContinuation cont, |
104 | void *cont_cls); | 104 | void *cont_cls); |
105 | 105 | ||
106 | |||
107 | /** | ||
108 | * We have received a message from the given sender. | ||
109 | * How long should we delay before receiving more? | ||
110 | * (Also used to keep the peer marked as live). | ||
111 | * | ||
112 | * @param sender sender of the message | ||
113 | * @param size size of the message | ||
114 | * @return how long to wait before reading more from this sender | ||
115 | */ | ||
116 | struct GNUNET_TIME_Relative | ||
117 | GST_neighbours_calculate_receive_delay (const struct GNUNET_PeerIdentity *sender, | ||
118 | ssize_t size); | ||
119 | |||
120 | |||
106 | /** | 121 | /** |
107 | * Change the incoming quota for the given peer. | 122 | * Change the incoming quota for the given peer. |
108 | * | 123 | * |
@@ -149,32 +164,8 @@ GST_neighbours_iterate (GST_NeighbourIterator cb, | |||
149 | 164 | ||
150 | 165 | ||
151 | /** | 166 | /** |
152 | * We have received a CONNECT. Set the peer to connected. | ||
153 | * | ||
154 | * @param sender peer sending the PONG | ||
155 | * @param hdr the PONG message (presumably) | ||
156 | * @param plugin_name name of transport that delivered the PONG | ||
157 | * @param sender_address address of the other peer, NULL if other peer | ||
158 | * connected to us | ||
159 | * @param sender_address_len number of bytes in sender_address | ||
160 | * @param ats performance data | ||
161 | * @param ats_count number of entries in ats (excluding 0-termination) | ||
162 | * @return GNUNET_OK if the message was well-formed, GNUNET_SYSERR if not | ||
163 | */ | ||
164 | int | ||
165 | GST_neighbours_handle_connect (const struct GNUNET_PeerIdentity *sender, | ||
166 | const struct GNUNET_MessageHeader *hdr, | ||
167 | const char *plugin_name, | ||
168 | const void *sender_address, | ||
169 | size_t sender_address_len, | ||
170 | struct Session *session, | ||
171 | const struct GNUNET_TRANSPORT_ATS_Information *ats, | ||
172 | uint32_t ats_count); | ||
173 | |||
174 | |||
175 | /** | ||
176 | * For an existing neighbour record, set the active connection to | 167 | * For an existing neighbour record, set the active connection to |
177 | * the given address. | 168 | * use the given address. |
178 | * | 169 | * |
179 | * @param plugin_name name of transport that delivered the PONG | 170 | * @param plugin_name name of transport that delivered the PONG |
180 | * @param address address of the other peer, NULL if other peer | 171 | * @param address address of the other peer, NULL if other peer |
@@ -193,24 +184,5 @@ GST_neighbours_switch_to_address (const struct GNUNET_PeerIdentity *peer, | |||
193 | uint32_t ats_count); | 184 | uint32_t ats_count); |
194 | 185 | ||
195 | 186 | ||
196 | /** | ||
197 | * We have received a DISCONNECT. Set the peer to disconnected. | ||
198 | * | ||
199 | * @param sender peer sending the PONG | ||
200 | * @param hdr the PONG message (presumably) | ||
201 | * @param plugin_name name of transport that delivered the PONG | ||
202 | * @param sender_address address of the other peer, NULL if other peer | ||
203 | * connected to us | ||
204 | * @param sender_address_len number of bytes in sender_address | ||
205 | * @return GNUNET_OK if the message was well-formed, GNUNET_SYSERR if not | ||
206 | */ | ||
207 | int | ||
208 | GST_neighbours_handle_disconnect (const struct GNUNET_PeerIdentity *sender, | ||
209 | const struct GNUNET_MessageHeader *hdr, | ||
210 | const char *plugin_name, | ||
211 | const void *sender_address, | ||
212 | size_t sender_address_len); | ||
213 | |||
214 | |||
215 | #endif | 187 | #endif |
216 | /* end of file gnunet-service-transport_neighbours.h */ | 188 | /* end of file gnunet-service-transport_neighbours.h */ |