aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/include
diff options
context:
space:
mode:
authorAlexander Couzens <lynxis@fe80.eu>2016-07-05 09:52:52 +0200
committerHolger Freyther <holger@freyther.de>2016-07-25 00:15:53 +0000
commit14314bd808369f0da32860412acfcd775e5c7b24 (patch)
tree112de17ea15dae8a0ab62ee510c9684e188e6677 /openbsc/include
parentb1c227e5abbe023615c591ccaf865a3dcb9c742e (diff)
sgsn: add statistics counter for GPRS and PDP packets
Changing the test to allow still allocated block from the rate counters. Change-Id: Ie30e4c3084ee3a138d6b39bb5000234ac814e65f
Diffstat (limited to 'openbsc/include')
-rw-r--r--openbsc/include/openbsc/gprs_sgsn.h2
-rw-r--r--openbsc/include/openbsc/sgsn.h26
2 files changed, 28 insertions, 0 deletions
diff --git a/openbsc/include/openbsc/gprs_sgsn.h b/openbsc/include/openbsc/gprs_sgsn.h
index 723c91448..b0dd75f7f 100644
--- a/openbsc/include/openbsc/gprs_sgsn.h
+++ b/openbsc/include/openbsc/gprs_sgsn.h
@@ -453,4 +453,6 @@ int gprs_sndcp_vty_init(void);
struct sgsn_instance;
int sgsn_gtp_init(struct sgsn_instance *sgi);
+void sgsn_rate_ctr_init();
+
#endif /* _GPRS_SGSN_H */
diff --git a/openbsc/include/openbsc/sgsn.h b/openbsc/include/openbsc/sgsn.h
index fe1659357..59126fe9b 100644
--- a/openbsc/include/openbsc/sgsn.h
+++ b/openbsc/include/openbsc/sgsn.h
@@ -20,6 +20,30 @@ enum sgsn_auth_policy {
SGSN_AUTH_POLICY_REMOTE
};
+
+enum sgsn_rate_ctr_keys {
+ CTR_GPRS_ATTACH_REQUEST,
+ CTR_GPRS_ATTACH_ACKED,
+ CTR_GPRS_ATTACH_REJECTED,
+ CTR_GPRS_DETACH_REQUEST,
+ CTR_GPRS_DETACH_ACKED,
+ CTR_GPRS_ROUTING_AREA_REQUEST,
+ CTR_GPRS_ROUTING_AREA_ACKED,
+ CTR_GPRS_ROUTING_AREA_REJECT,
+ /* PDP single packet counter / GSM 04.08 9.5.1 - 9.5.9 */
+ CTR_PDP_ACTIVATE_REQUEST,
+ CTR_PDP_ACTIVATE_REJECT,
+ CTR_PDP_ACTIVATE_ACCEPT,
+ CTR_PDP_REQUEST_ACTIVATE, /* unused */
+ CTR_PDP_REQUEST_ACTIVATE_REJ, /* unused */
+ CTR_PDP_MODIFY_REQUEST, /* unsued */
+ CTR_PDP_MODIFY_ACCEPT, /* unused */
+ CTR_PDP_DL_DEACTIVATE_REQUEST,
+ CTR_PDP_DL_DEACTIVATE_ACCEPT,
+ CTR_PDP_UL_DEACTIVATE_REQUEST,
+ CTR_PDP_UL_DEACTIVATE_ACCEPT,
+};
+
struct sgsn_cdr {
char *filename;
int interval;
@@ -88,6 +112,8 @@ struct sgsn_instance {
struct llist_head ares_fds;
ares_channel ares_channel;
struct ares_addr_node *ares_servers;
+
+ struct rate_ctr_group *rate_ctrs;
};
extern struct sgsn_instance *sgsn;