aboutsummaryrefslogtreecommitdiffstats
path: root/src/rate_ctr.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/rate_ctr.c')
-rw-r--r--src/rate_ctr.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/rate_ctr.c b/src/rate_ctr.c
index 9043a2c6..c3a52867 100644
--- a/src/rate_ctr.c
+++ b/src/rate_ctr.c
@@ -263,6 +263,16 @@ void rate_ctr_group_free(struct rate_ctr_group *grp)
talloc_free(grp);
}
+/*! Get rate counter from group, identified by index idx
+ * \param[in] grp Rate counter group
+ * \param[in] idx Index of the counter to retrieve
+ * \returns rate counter requested
+ */
+struct rate_ctr *rate_ctr_group_get_ctr(struct rate_ctr_group *grp, unsigned int idx)
+{
+ return &grp->ctr[idx];
+}
+
/*! Add a number to the counter */
void rate_ctr_add(struct rate_ctr *ctr, int inc)
{