gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r33179 - gnunet/src/mesh


From: gnunet
Subject: [GNUnet-SVN] r33179 - gnunet/src/mesh
Date: Wed, 7 May 2014 12:42:47 +0200

Author: bartpolot
Date: 2014-05-07 12:42:47 +0200 (Wed, 07 May 2014)
New Revision: 33179

Modified:
   gnunet/src/mesh/gnunet-service-mesh_connection.c
   gnunet/src/mesh/gnunet-service-mesh_connection.h
Log:
- add PID getter

Modified: gnunet/src/mesh/gnunet-service-mesh_connection.c
===================================================================
--- gnunet/src/mesh/gnunet-service-mesh_connection.c    2014-05-07 10:42:44 UTC 
(rev 33178)
+++ gnunet/src/mesh/gnunet-service-mesh_connection.c    2014-05-07 10:42:47 UTC 
(rev 33179)
@@ -2704,6 +2704,25 @@
 
 
 /**
+ * Get next PID to use.
+ *
+ * @param c Connection.
+ * @param fwd Is query about FWD traffic?
+ *
+ * @return Last PID used + 1.
+ */
+unsigned int
+GMC_get_pid (struct MeshConnection *c, int fwd)
+{
+  struct MeshFlowControl *fc;
+
+  fc = fwd ? &c->fwd_fc : &c->bck_fc;
+
+  return fc->last_pid_sent + 1;
+}
+
+
+/**
  * Allow the connection to advertise a buffer of the given size.
  *
  * The connection will send an @c fwd ACK message (so: in direction !fwd)

Modified: gnunet/src/mesh/gnunet-service-mesh_connection.h
===================================================================
--- gnunet/src/mesh/gnunet-service-mesh_connection.h    2014-05-07 10:42:44 UTC 
(rev 33178)
+++ gnunet/src/mesh/gnunet-service-mesh_connection.h    2014-05-07 10:42:47 UTC 
(rev 33179)
@@ -368,6 +368,17 @@
 GMC_get_qn (struct MeshConnection *c, int fwd);
 
 /**
+ * Get next PID to use.
+ *
+ * @param c Connection.
+ * @param fwd Is query about FWD traffic?
+ *
+ * @return Last PID used + 1.
+ */
+unsigned int
+GMC_get_pid (struct MeshConnection *c, int fwd);
+
+/**
  * Allow the connection to advertise a buffer of the given size.
  *
  * The connection will send an @c fwd ACK message (so: in direction !fwd)




reply via email to

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