aboutsummaryrefslogtreecommitdiffstats
path: root/src/ipa.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@osmocom.org>2021-11-14 20:32:56 +0100
committerHarald Welte <laforge@osmocom.org>2021-11-15 18:05:01 +0100
commitff7404c742782c28f1b96f838f4f239c42d02c66 (patch)
treec30fff08eecbc404b6faf5b9952081008d9546ac /src/ipa.c
parent5ad97995e95f8d082e1d550f55a234bb11194eec (diff)
stp: Add basic RX/TX rate counters on AS and ASP level
This adds some very basic rx/px rate counters to the SS7 AS and ASP OsmoSTP> show rate-counters SIGTRAN Application Server 0 (as-rkm-1): rx:msu:total: 86078 (1888/s 86078/m 0/h 0/d) tx:msu:total: 0 (0/s 0/m 0/h 0/d) SIGTRAN Application Server Process 0 (asp-dyn-0): rx:packets:total: 86081 (1888/s 86081/m 0/h 0/d) tx:packets:total: 5 (0/s 5/m 0/h 0/d) Change-Id: Idb811ca81adfe47152d484f6b981e661dc569e15
Diffstat (limited to 'src/ipa.c')
-rw-r--r--src/ipa.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/ipa.c b/src/ipa.c
index 93edef8..5b1eb54 100644
--- a/src/ipa.c
+++ b/src/ipa.c
@@ -47,6 +47,7 @@
#include <osmocom/sigtran/protocol/mtp.h>
#include "xua_internal.h"
+#include "ss7_internal.h"
#include "xua_asp_fsm.h"
@@ -224,6 +225,8 @@ static int ipa_rx_msg_sccp(struct osmo_ss7_asp *asp, struct msgb *msg)
return -1;
}
+ rate_ctr_inc2(as->ctrg, SS7_AS_CTR_RX_MSU_TOTAL);
+
/* pull the IPA header */
msgb_pull_to_l2(msg);