blob: 2d82efd6ea1087cc6bfd8fe263c68232f8b641c9 [file] [log] [blame]
Holger Hans Peter Freytheraafa7c72011-01-16 12:32:20 +01001/* Counter for the Link and Link-Set */
2/*
3 * (C) 2011 by Holger Hans Peter Freyther <zecke@selfish.org>
4 * (C) 2011 by On-Waves
5 * All Rights Reserved
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License along
18 * with this program; if not, write to the Free Software Foundation, Inc.,
19 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 */
22
23#include <counter.h>
24
25#include <osmocore/utils.h>
26
27static const struct rate_ctr_desc mtp_lset_cfg_description[] = {
28 [MTP_LSET_TOTA_IN_MSG] = { "total.in", "Total messages in "},
29 [MTP_LSET_SCCP_IN_MSG] = { "sccp.in", "SCCP messages in "},
30 [MTP_LSET_IUSP_IN_MSG] = { "isup.in", "ISUP messages in "},
31 [MTP_LSET_TOTA_OUT_MSG] = { "total.out", "Total messages out "},
Holger Hans Peter Freyther03fc6602011-02-23 17:41:23 +010032 [MTP_LSET_SCCP_OUT_MSG] = { "sccp.out", "SCCP messages out "},
33 [MTP_LSET_ISUP_OUT_MSG] = { "isup.out", "ISUP messages out "},
Holger Hans Peter Freytheraafa7c72011-01-16 12:32:20 +010034};
35
36static const struct rate_ctr_desc mtp_link_cfg_description[] = {
37 [MTP_LNK_IN] = { "total.in", "Messages in "},
38 [MTP_LNK_OUT] = { "total.out", "Messages out "},
39 [MTP_LNK_ERROR] = { "total.error", "Errors occured "},
40 [MTP_LNK_SLTM_TOUT] = { "sltm.timeouts", "SLTM timeouts "},
41};
42
43static const struct rate_ctr_group_desc mtp_lset_ctrg_desc = {
44 .group_name_prefix = "mtp_lset",
45 .group_description = "MTP LinkSet",
46 .num_ctr = ARRAY_SIZE(mtp_lset_cfg_description),
47 .ctr_desc = mtp_lset_cfg_description,
48};
49
50static const struct rate_ctr_group_desc mtp_link_ctrg_desc = {
51 .group_name_prefix = "mtp_link",
52 .group_description = "MTP Link",
53 .num_ctr = ARRAY_SIZE(mtp_link_cfg_description),
54 .ctr_desc = mtp_link_cfg_description,
55};
56
57const struct rate_ctr_group_desc *mtp_link_set_rate_ctr_desc()
58{
59 return &mtp_lset_ctrg_desc;
60}
61
62const struct rate_ctr_group_desc *mtp_link_rate_ctr_desc()
63{
64 return &mtp_link_ctrg_desc;
65}