aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/include/openbsc/sgsn.h
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2015-05-05 22:25:48 +0200
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2015-05-06 17:43:15 +0200
commit4f5b8237ec2182861fbe075f4cce56a9c7caf904 (patch)
tree626fe9a60673c745f686840972f02bceaabb07c5 /openbsc/include/openbsc/sgsn.h
parentb100895557af0980d5910a3dc81903179dea615e (diff)
sgsn: Create an initial and limited CDR module
This is consuming the new signals and allows to install several different CDR/observing/event/audit modules in the future. For getting the bytes in/out the code would have had to undo what the rate counter is doing and at the same time adding a "total" to the ratecounter didn't look like a good idea, the same went for making it a plain counter. Begin writing the values one by one and open/closing a new FILE for every log messages. This is not efficient but easily deals with external truncation/rotation of the file (no fstat for and checking the links and size). As usual we will wait and see if this is an issue. Add some new members to our PDP context structure to see what it is about.
Diffstat (limited to 'openbsc/include/openbsc/sgsn.h')
-rw-r--r--openbsc/include/openbsc/sgsn.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/openbsc/include/openbsc/sgsn.h b/openbsc/include/openbsc/sgsn.h
index 7d3a68c43..0f9a59f25 100644
--- a/openbsc/include/openbsc/sgsn.h
+++ b/openbsc/include/openbsc/sgsn.h
@@ -16,6 +16,11 @@ enum sgsn_auth_policy {
SGSN_AUTH_POLICY_REMOTE
};
+struct sgsn_cdr {
+ char *filename;
+ int interval;
+};
+
struct sgsn_config {
/* parsed from config file */
@@ -33,6 +38,9 @@ struct sgsn_config {
int require_authentication;
int require_update_location;
+
+ /* CDR configuration */
+ struct sgsn_cdr cdr;
};
struct sgsn_instance {
@@ -85,4 +93,10 @@ int sndcp_unitdata_req(struct msgb *msg, struct gprs_llc_lle *lle, uint8_t nsapi
int sndcp_llunitdata_ind(struct msgb *msg, struct gprs_llc_lle *lle,
uint8_t *hdr, uint16_t len);
+
+/*
+ * CDR related functionality
+ */
+int sgsn_cdr_init(struct sgsn_instance *sgsn);
+
#endif