aboutsummaryrefslogtreecommitdiff
path: root/src/transport
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2010-09-29 09:49:19 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2010-09-29 09:49:19 +0000
commit7085295bc533a2aa972f4c47953be5712d404a83 (patch)
tree67cba0e38e8b01b646f0b5fe76ad7606b8e5f400 /src/transport
parent000194fb9558f04154728c3d0716a5f66e416868 (diff)
downloadgnunet-7085295bc533a2aa972f4c47953be5712d404a83.tar.gz
gnunet-7085295bc533a2aa972f4c47953be5712d404a83.zip
uups...never commit things before having coffee
Diffstat (limited to 'src/transport')
-rw-r--r--src/transport/plugin_transport.h26
1 files changed, 23 insertions, 3 deletions
diff --git a/src/transport/plugin_transport.h b/src/transport/plugin_transport.h
index 13bdcfa66..175905d80 100644
--- a/src/transport/plugin_transport.h
+++ b/src/transport/plugin_transport.h
@@ -139,6 +139,26 @@ typedef void (*GNUNET_TRANSPORT_AddressNotification) (void *cls,
139 expires); 139 expires);
140 140
141/** 141/**
142 * Function that will be called whenever the plugin receives data over
143 * the network and wants to determine how long it should wait until
144 * the next time it reads from the given peer. Note that some plugins
145 * (such as UDP) may not be able to wait (for a particular peer), so
146 * the waiting part is optional. Plugins that can wait should call
147 * this function, sleep the given amount of time, and call it again
148 * (with zero bytes read) UNTIL it returns zero and only then read.
149 *
150 * @param cls closure
151 * @param peer which peer did we read data from
152 * @param amount_recved number of bytes read (can be zero)
153 * @return how long to wait until reading more from this peer
154 * (to enforce inbound quotas)
155 */
156typedef struct GNUNET_TIME_Relative (*GNUNET_TRANSPORT_TrafficReport) (void *cls,
157 const struct
158 GNUNET_PeerIdentity *peer,
159 size_t amount_recved);
160
161/**
142 * Function called whenever the plugin has to notify ATS about costs for using this transport 162 * Function called whenever the plugin has to notify ATS about costs for using this transport
143 * 163 *
144 * The cost will be passed as struct GNUNET_ATS_Cost_Information[] 164 * The cost will be passed as struct GNUNET_ATS_Cost_Information[]
@@ -152,10 +172,10 @@ typedef void (*GNUNET_TRANSPORT_AddressNotification) (void *cls,
152 * @param cost pointer to the first element of struct GNUNET_ATS_Cost_Information[] 172 * @param cost pointer to the first element of struct GNUNET_ATS_Cost_Information[]
153 */ 173 */
154typedef void (*GNUNET_TRANSPORT_CostReport) (void *cls, 174typedef void (*GNUNET_TRANSPORT_CostReport) (void *cls,
155 const struct GNUNET_PeerIdentity *peer, 175 const struct GNUNET_PeerIdentity *peer,
156 const void *addr, 176 const void *addr,
157 uint16_t addrlen, 177 uint16_t addrlen,
158 struct GNUNET_ATS_Cost_Information * cost); 178 struct GNUNET_ATS_Cost_Information * cost);
159 179
160/** 180/**
161 * The transport service will pass a pointer to a struct 181 * The transport service will pass a pointer to a struct
@@ -212,7 +232,7 @@ struct GNUNET_TRANSPORT_PluginEnvironment
212 * Inform service about traffic received, get information 232 * Inform service about traffic received, get information
213 * about when we might be willing to receive more. 233 * about when we might be willing to receive more.
214 */ 234 */
215 /* FIXME: this wasn't defined anywhere... GNUNET_TRANSPORT_TrafficReport traffic_report;*/ 235 GNUNET_TRANSPORT_TrafficReport traffic_report;
216 236
217 /** 237 /**
218 * Function that must be called by the plugin when a non-NULL 238 * Function that must be called by the plugin when a non-NULL