gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r13093 - gnunet/src/transport


From: gnunet
Subject: [GNUnet-SVN] r13093 - gnunet/src/transport
Date: Wed, 29 Sep 2010 11:49:20 +0200

Author: wachs
Date: 2010-09-29 11:49:19 +0200 (Wed, 29 Sep 2010)
New Revision: 13093

Modified:
   gnunet/src/transport/plugin_transport.h
Log:
uups...never commit things before having coffee


Modified: gnunet/src/transport/plugin_transport.h
===================================================================
--- gnunet/src/transport/plugin_transport.h     2010-09-29 09:41:39 UTC (rev 
13092)
+++ gnunet/src/transport/plugin_transport.h     2010-09-29 09:49:19 UTC (rev 
13093)
@@ -139,6 +139,26 @@
                                                       expires);
 
 /**
+ * Function that will be called whenever the plugin receives data over
+ * the network and wants to determine how long it should wait until
+ * the next time it reads from the given peer.  Note that some plugins
+ * (such as UDP) may not be able to wait (for a particular peer), so
+ * the waiting part is optional.  Plugins that can wait should call
+ * this function, sleep the given amount of time, and call it again
+ * (with zero bytes read) UNTIL it returns zero and only then read.
+ *
+ * @param cls closure
+ * @param peer which peer did we read data from
+ * @param amount_recved number of bytes read (can be zero)
+ * @return how long to wait until reading more from this peer
+ *         (to enforce inbound quotas)
+ */
+typedef struct GNUNET_TIME_Relative (*GNUNET_TRANSPORT_TrafficReport) (void 
*cls,
+                                                                      const 
struct
+                                                                      
GNUNET_PeerIdentity *peer,
+                                                                      size_t 
amount_recved);
+
+/**
  * Function called whenever the plugin has to notify ATS about costs for using 
this transport
  *
  * The cost will be passed as struct GNUNET_ATS_Cost_Information[]
@@ -152,10 +172,10 @@
  * @param cost pointer to the first element of struct 
GNUNET_ATS_Cost_Information[]
  */
 typedef void (*GNUNET_TRANSPORT_CostReport) (void *cls,
-                                             const struct GNUNET_PeerIdentity 
*peer,
+                                                                               
         const struct GNUNET_PeerIdentity *peer,
                                              const void *addr,
                                              uint16_t addrlen,
-                                            struct GNUNET_ATS_Cost_Information 
* cost);
+                                                                               
         struct GNUNET_ATS_Cost_Information * cost);
 
 /**
  * The transport service will pass a pointer to a struct
@@ -212,7 +232,7 @@
    * Inform service about traffic received, get information
    * about when we might be willing to receive more.
    */
-  /* FIXME: this wasn't defined anywhere... GNUNET_TRANSPORT_TrafficReport 
traffic_report;*/
+  GNUNET_TRANSPORT_TrafficReport traffic_report;
 
   /**
    * Function that must be called by the plugin when a non-NULL




reply via email to

[Prev in Thread] Current Thread [Next in Thread]