aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/include/openbsc
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2010-05-13 11:45:07 +0200
committerHarald Welte <laforge@gnumonks.org>2010-05-13 11:45:07 +0200
commitf2b4cd7b866286b905271283f3646a325417760a (patch)
tree4ff1287a99734d57a63fb64f524fa168ab2d2ee2 /openbsc/include/openbsc
parent0ab535bfc391a6f53b13a565bfe9464e77045165 (diff)
[GPRS] NS: Start to use rate_ctr_group code from libosmocore
Every NS-VC now has a set of counters for incoming and outgoing number of packets and bytes. We also split the VTY part of the gprs_ns.c implementation into gprs_ns_vty.c to make sure the protocol can actually be used without the VTY code being present.
Diffstat (limited to 'openbsc/include/openbsc')
-rw-r--r--openbsc/include/openbsc/db.h3
-rw-r--r--openbsc/include/openbsc/gprs_ns.h6
2 files changed, 9 insertions, 0 deletions
diff --git a/openbsc/include/openbsc/db.h b/openbsc/include/openbsc/db.h
index d0a1278ef..1782efb50 100644
--- a/openbsc/include/openbsc/db.h
+++ b/openbsc/include/openbsc/db.h
@@ -66,6 +66,9 @@ int db_apdu_blob_store(struct gsm_subscriber *subscr,
u_int8_t *apdu);
/* Statistics counter storage */
+struct counter;
int db_store_counter(struct counter *ctr);
+struct rate_ctr_group;
+int db_store_rate_ctr_group(struct rate_ctr_group *ctrg);
#endif /* _DB_H */
diff --git a/openbsc/include/openbsc/gprs_ns.h b/openbsc/include/openbsc/gprs_ns.h
index 847e8f9cc..34b1b62d2 100644
--- a/openbsc/include/openbsc/gprs_ns.h
+++ b/openbsc/include/openbsc/gprs_ns.h
@@ -163,6 +163,8 @@ struct gprs_nsvc {
unsigned int remote_end_is_sgsn:1;
unsigned int persistent:1;
+ struct rate_ctr_group *ctrg;
+
union {
struct {
struct sockaddr_in bts_addr;
@@ -200,6 +202,10 @@ struct gprs_nsvc *nsip_connect(struct gprs_ns_inst *nsi,
struct sockaddr_in *dest, uint16_t nsei,
uint16_t nsvci);
+struct gprs_nsvc *nsvc_create(struct gprs_ns_inst *nsi, uint16_t nsvci);
+void nsvc_delete(struct gprs_nsvc *nsvc);
+struct gprs_nsvc *nsvc_by_nsei(struct gprs_ns_inst *nsi, uint16_t nsei);
+
/* Add NS-specific VTY stuff */
int gprs_ns_vty_init(struct gprs_ns_inst *nsi);