diff options
author | Harald Welte <laforge@gnumonks.org> | 2017-06-12 21:44:18 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2017-06-12 21:55:54 +0000 |
commit | 96e2a00d7a9044d0b1a83909c11d8f24955bc7c8 (patch) | |
tree | 4bbe6cb49a766df4cdefa9fffd56bb953d51da75 /src/vty/utils.c | |
parent | 7165880ac279a9d2d7403749f171eb9c60e70657 (diff) |
update/extend doxygen documentation
It's a pity that even with this patch we still are fare away from having
the whole API documented. However, at least we have a more solid
foundation. Updates not only extend the documentation, but also make
sure it is rendered properly in the doxygen HTML.
Change-Id: I1344bd1a6869fb00de7c1899a8db93bba9bafce3
Diffstat (limited to 'src/vty/utils.c')
-rw-r--r-- | src/vty/utils.c | 50 |
1 files changed, 31 insertions, 19 deletions
diff --git a/src/vty/utils.c b/src/vty/utils.c index 27c1a854..6772593d 100644 --- a/src/vty/utils.c +++ b/src/vty/utils.c @@ -82,6 +82,33 @@ void vty_out_rate_ctr_group(struct vty *vty, const char *prefix, rate_ctr_for_each_counter(ctrg, rate_ctr_handler, &vctx); } +static int rate_ctr_group_handler(struct rate_ctr_group *ctrg, void *vctx_) +{ + struct vty_out_context *vctx = vctx_; + struct vty *vty = vctx->vty; + + if (ctrg->desc->class_id > vctx->max_level) + return 0; + + if (ctrg->idx) + vty_out(vty, "%s%s (%d):%s", vctx->prefix, + ctrg->desc->group_description, ctrg->idx, VTY_NEWLINE); + else + vty_out(vty, "%s%s:%s", vctx->prefix, + ctrg->desc->group_description, VTY_NEWLINE); + + rate_ctr_for_each_counter(ctrg, rate_ctr_handler, vctx); + + return 0; +} + +/*! @} */ + + +/*! \addtogroup stats + * @{ + */ + static int osmo_stat_item_handler( struct osmo_stat_item_group *statg, struct osmo_stat_item *item, void *vctx_) { @@ -135,25 +162,11 @@ static int osmo_stat_item_group_handler(struct osmo_stat_item_group *statg, void return 0; } -static int rate_ctr_group_handler(struct rate_ctr_group *ctrg, void *vctx_) -{ - struct vty_out_context *vctx = vctx_; - struct vty *vty = vctx->vty; - - if (ctrg->desc->class_id > vctx->max_level) - return 0; - - if (ctrg->idx) - vty_out(vty, "%s%s (%d):%s", vctx->prefix, - ctrg->desc->group_description, ctrg->idx, VTY_NEWLINE); - else - vty_out(vty, "%s%s:%s", vctx->prefix, - ctrg->desc->group_description, VTY_NEWLINE); - - rate_ctr_for_each_counter(ctrg, rate_ctr_handler, vctx); +/*! @} */ - return 0; -} +/*! \addtogroup vty + * @{ + */ static int handle_counter(struct osmo_counter *counter, void *vctx_) { @@ -239,5 +252,4 @@ err: return str; } - /*! @} */ |