aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/gprs
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2015-11-09 14:30:22 +0100
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2015-11-10 09:35:30 +0100
commit98fa3dc1c655033b31d90ed051cfa9144e30248c (patch)
treecd7d16a3acfb5c3084ecd629072609ace041b210 /openbsc/src/gprs
parent9270dc8ca347e775f25272aa2cd904e53c93de29 (diff)
gbproxy: Count more GSM 04.08 messages
Extend the ul/dl counting to count the usual messages on the Gb interface. Add counters for the attach, routing area update, pdp context activation and deactivation procedures. Update the test result with the new counters.
Diffstat (limited to 'openbsc/src/gprs')
-rw-r--r--openbsc/src/gprs/gb_proxy.c45
-rw-r--r--openbsc/src/gprs/gb_proxy_peer.c17
2 files changed, 62 insertions, 0 deletions
diff --git a/openbsc/src/gprs/gb_proxy.c b/openbsc/src/gprs/gb_proxy.c
index 8cdf9a45a..6cad651a5 100644
--- a/openbsc/src/gprs/gb_proxy.c
+++ b/openbsc/src/gprs/gb_proxy.c
@@ -593,6 +593,27 @@ static int gbprox_process_bssgp_ul(struct gbproxy_config *cfg,
case GSM48_MT_GMM_ATTACH_REQ:
rate_ctr_inc(&peer->ctrg->ctr[GBPROX_PEER_CTR_ATTACH_REQS]);
break;
+ case GSM48_MT_GMM_DETACH_REQ:
+ rate_ctr_inc(&peer->ctrg->ctr[GBPROX_PEER_CTR_DETACH_REQS]);
+ break;
+ case GSM48_MT_GMM_ATTACH_COMPL:
+ rate_ctr_inc(&peer->ctrg->ctr[GBPROX_PEER_CTR_ATTACH_COMPLS]);
+ break;
+ case GSM48_MT_GMM_RA_UPD_REQ:
+ rate_ctr_inc(&peer->ctrg->ctr[GBPROX_PEER_CTR_RA_UPD_REQS]);
+ break;
+ case GSM48_MT_GMM_RA_UPD_COMPL:
+ rate_ctr_inc(&peer->ctrg->ctr[GBPROX_PEER_CTR_RA_UPD_COMPLS]);
+ break;
+ case GSM48_MT_GMM_STATUS:
+ rate_ctr_inc(&peer->ctrg->ctr[GBPROX_PEER_CTR_GMM_STATUS_BSS]);
+ break;
+ case GSM48_MT_GSM_ACT_PDP_REQ:
+ rate_ctr_inc(&peer->ctrg->ctr[GBPROX_PEER_CTR_PDP_ACT_REQS]);
+ break;
+ case GSM48_MT_GSM_DEACT_PDP_REQ:
+ rate_ctr_inc(&peer->ctrg->ctr[GBPROX_PEER_CTR_PDP_DEACT_REQS]);
+ break;
default:
break;
@@ -678,9 +699,33 @@ static void gbprox_process_bssgp_dl(struct gbproxy_config *cfg,
if (parse_ctx.g48_hdr) {
switch (parse_ctx.g48_hdr->msg_type) {
+ case GSM48_MT_GMM_ATTACH_ACK:
+ rate_ctr_inc(&peer->ctrg->ctr[GBPROX_PEER_CTR_ATTACH_ACKS]);
+ break;
case GSM48_MT_GMM_ATTACH_REJ:
rate_ctr_inc(&peer->ctrg->ctr[GBPROX_PEER_CTR_ATTACH_REJS]);
break;
+ case GSM48_MT_GMM_DETACH_ACK:
+ rate_ctr_inc(&peer->ctrg->ctr[GBPROX_PEER_CTR_DETACH_ACKS]);
+ break;
+ case GSM48_MT_GMM_RA_UPD_ACK:
+ rate_ctr_inc(&peer->ctrg->ctr[GBPROX_PEER_CTR_RA_UPD_ACKS]);
+ break;
+ case GSM48_MT_GMM_RA_UPD_REJ:
+ rate_ctr_inc(&peer->ctrg->ctr[GBPROX_PEER_CTR_RA_UPD_REJS]);
+ break;
+ case GSM48_MT_GMM_STATUS:
+ rate_ctr_inc(&peer->ctrg->ctr[GBPROX_PEER_CTR_GMM_STATUS_SGSN]);
+ break;
+ case GSM48_MT_GSM_ACT_PDP_ACK:
+ rate_ctr_inc(&peer->ctrg->ctr[GBPROX_PEER_CTR_PDP_ACT_ACKS]);
+ break;
+ case GSM48_MT_GSM_ACT_PDP_REJ:
+ rate_ctr_inc(&peer->ctrg->ctr[GBPROX_PEER_CTR_PDP_ACT_REJS]);
+ break;
+ case GSM48_MT_GSM_DEACT_PDP_ACK:
+ rate_ctr_inc(&peer->ctrg->ctr[GBPROX_PEER_CTR_PDP_DEACT_ACKS]);
+ break;
default:
break;
diff --git a/openbsc/src/gprs/gb_proxy_peer.c b/openbsc/src/gprs/gb_proxy_peer.c
index b65fc178d..c2cdd0e67 100644
--- a/openbsc/src/gprs/gb_proxy_peer.c
+++ b/openbsc/src/gprs/gb_proxy_peer.c
@@ -51,10 +51,27 @@ static const struct rate_ctr_desc peer_ctr_description[] = {
{ "mod-err", "Patch error: other " },
{ "attach-reqs", "Attach Request count " },
{ "attach-rejs", "Attach Reject count " },
+ { "attach-acks", "Attach Accept count " },
+ { "attach-cpls", "Attach Completed count " },
+ { "ra-upd-reqs", "RoutingArea Update Request count" },
+ { "ra-upd-rejs", "RoutingArea Update Reject count " },
+ { "ra-upd-acks", "RoutingArea Update Accept count " },
+ { "ra-upd-cpls", "RoutingArea Update Compltd count" },
+ { "gmm-status", "GMM Status count (BSS)" },
+ { "gmm-status", "GMM Status count (SGSN)" },
+ { "detach-reqs", "Detach Request count " },
+ { "detach-acks", "Detach Accept count " },
+ { "pdp-act-reqs", "PDP Activation Request count " },
+ { "pdp-act-rejs", "PDP Activation Reject count " },
+ { "pdp-act-acks", "PDP Activation Accept count " },
+ { "pdp-deact-reqs","PDP Deactivation Request count " },
+ { "pdp-deact-acks","PDP Deactivation Accept count " },
{ "tlli-unknown", "TLLI from SGSN unknown " },
{ "tlli-cache", "TLLI cache size " },
};
+osmo_static_assert(ARRAY_SIZE(peer_ctr_description) == GBPROX_PEER_CTR_LAST, everything_described);
+
static const struct rate_ctr_group_desc peer_ctrg_desc = {
.group_name_prefix = "gbproxy.peer",
.group_description = "GBProxy Peer Statistics",