diff include/freeDiameter/libfdcore.h @ 939:1bc052ef961f

Add a function to access this counter
author Sebastien Decugis <sdecugis@freediameter.net>
date Tue, 12 Mar 2013 15:27:59 +0100
parents b839a1b1c1da
children 652713ce3596
line wrap: on
line diff
--- a/include/freeDiameter/libfdcore.h	Tue Mar 12 15:27:30 2013 +0100
+++ b/include/freeDiameter/libfdcore.h	Tue Mar 12 15:27:59 2013 +0100
@@ -384,6 +384,23 @@
  */
 int fd_peer_get_state(struct peer_hdr *peer);
 
+/* 
+ * FUNCTION:	fd_peer_get_load_pending
+ *
+ * PARAMETERS:
+ *  peer	: The peer which load to read
+ *
+ * DESCRIPTION: 
+ *   Returns the current number of requests sent to this peer
+ *  that have not been answered yet. This is an empirical indication
+ *  of the workload of this peer.
+ *
+ * RETURN VALUE:
+ *  0  : The load parameter has been updated. (it should have a positive value always)
+ * !0  : An error occurred
+ */
+int fd_peer_get_load_pending(struct peer_hdr *peer, int * load);
+
 /*
  * FUNCTION:	fd_peer_validate_register
  *
"Welcome to our mercurial repository"