aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBart Polot <bart@net.in.tum.de>2014-05-07 10:42:47 +0000
committerBart Polot <bart@net.in.tum.de>2014-05-07 10:42:47 +0000
commitee677929b0582716e218bb97e4d7f7aca5bf8bb8 (patch)
tree5a4d776714e50c6da041977cc4b678bc41bd2fde /src
parent4ef6d2d4498d015bec1e2375acfd7caefccbfe1a (diff)
downloadgnunet-ee677929b0582716e218bb97e4d7f7aca5bf8bb8.tar.gz
gnunet-ee677929b0582716e218bb97e4d7f7aca5bf8bb8.zip
- add PID getter
Diffstat (limited to 'src')
-rw-r--r--src/mesh/gnunet-service-mesh_connection.c19
-rw-r--r--src/mesh/gnunet-service-mesh_connection.h11
2 files changed, 30 insertions, 0 deletions
diff --git a/src/mesh/gnunet-service-mesh_connection.c b/src/mesh/gnunet-service-mesh_connection.c
index ebd3388ef..b043615ed 100644
--- a/src/mesh/gnunet-service-mesh_connection.c
+++ b/src/mesh/gnunet-service-mesh_connection.c
@@ -2704,6 +2704,25 @@ GMC_get_qn (struct MeshConnection *c, int fwd)
2704 2704
2705 2705
2706/** 2706/**
2707 * Get next PID to use.
2708 *
2709 * @param c Connection.
2710 * @param fwd Is query about FWD traffic?
2711 *
2712 * @return Last PID used + 1.
2713 */
2714unsigned int
2715GMC_get_pid (struct MeshConnection *c, int fwd)
2716{
2717 struct MeshFlowControl *fc;
2718
2719 fc = fwd ? &c->fwd_fc : &c->bck_fc;
2720
2721 return fc->last_pid_sent + 1;
2722}
2723
2724
2725/**
2707 * Allow the connection to advertise a buffer of the given size. 2726 * Allow the connection to advertise a buffer of the given size.
2708 * 2727 *
2709 * The connection will send an @c fwd ACK message (so: in direction !fwd) 2728 * The connection will send an @c fwd ACK message (so: in direction !fwd)
diff --git a/src/mesh/gnunet-service-mesh_connection.h b/src/mesh/gnunet-service-mesh_connection.h
index b97f61194..78d807817 100644
--- a/src/mesh/gnunet-service-mesh_connection.h
+++ b/src/mesh/gnunet-service-mesh_connection.h
@@ -368,6 +368,17 @@ unsigned int
368GMC_get_qn (struct MeshConnection *c, int fwd); 368GMC_get_qn (struct MeshConnection *c, int fwd);
369 369
370/** 370/**
371 * Get next PID to use.
372 *
373 * @param c Connection.
374 * @param fwd Is query about FWD traffic?
375 *
376 * @return Last PID used + 1.
377 */
378unsigned int
379GMC_get_pid (struct MeshConnection *c, int fwd);
380
381/**
371 * Allow the connection to advertise a buffer of the given size. 382 * Allow the connection to advertise a buffer of the given size.
372 * 383 *
373 * The connection will send an @c fwd ACK message (so: in direction !fwd) 384 * The connection will send an @c fwd ACK message (so: in direction !fwd)