gnunet-svn
[Top][All Lists]
Advanced

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

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


From: gnunet
Subject: [GNUnet-SVN] r16381 - gnunet/src/transport
Date: Thu, 4 Aug 2011 23:11:17 +0200

Author: grothoff
Date: 2011-08-04 23:11:17 +0200 (Thu, 04 Aug 2011)
New Revision: 16381

Modified:
   gnunet/src/transport/gnunet-service-transport_neighbours.h
Log:
improved neighbour API

Modified: gnunet/src/transport/gnunet-service-transport_neighbours.h
===================================================================
--- gnunet/src/transport/gnunet-service-transport_neighbours.h  2011-08-04 
21:05:33 UTC (rev 16380)
+++ gnunet/src/transport/gnunet-service-transport_neighbours.h  2011-08-04 
21:11:17 UTC (rev 16381)
@@ -31,10 +31,7 @@
 #include "gnunet_util_lib.h"
 
 // TODO:
-// - have a way to access the currently 'connected' session
-//   (for sending and to notice disconnect of it!)
-// - have a way to access/update bandwidth/quota information per peer
-//   (for CostReport/TrafficReport callbacks)
+// - ATS and similar info is a bit lacking in the API right now...
 
 
 
@@ -78,6 +75,42 @@
 
 
 /**
+ * Function called after the transmission is done.
+ *
+ * @param cls closure
+ * @param success GNUNET_OK on success, GNUNET_NO on failure
+ */
+typedef void (*GST_NeighbourSendContinuation)(void *cls,
+                                             int success);
+
+
+/**
+ * Transmit a message to the given target using the active connection.
+ *
+ * @param target destination
+ * @param msg message to send
+ * @param cont function to call when done
+ * @param cont_cls closure for 'cont'
+ */
+void
+GST_neighbours_send (const struct GNUNET_PeerIdentity *target,
+                    const struct GNUNET_MessageHeader *msg,
+                    GST_NeighbourSendContinuation cont,
+                    void *cont_cls);
+
+/**
+ * Change the quota for the given peer.
+ * FIXME: inbound or outbound quota?
+ *
+ * @param neighbour identity of peer to change qutoa for
+ * @param quota new quota FIXME: fix type!
+ */
+void
+GST_neighbours_set_quota (const struct GNUNET_PeerIdentity *neighbour,
+                         const float quota);
+
+
+/**
  * If we have an active connection to the given target, it must be shutdown.
  *
  * @param target peer to disconnect from




reply via email to

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