aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/include/openbsc/gsm_subscriber.h
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2014-11-12 09:53:45 +0100
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2014-11-14 10:26:49 +0100
commit02ab91e6a73e16da51918b52548a0f4be4c6a0f6 (patch)
treee3d80ec9d8b4e52f32354aa6910e72b196fb23c7 /openbsc/include/openbsc/gsm_subscriber.h
parenta0b6efb3685ea90190cfbd9423a74c181ea4f12f (diff)
sgsn: Cross-link gsm_subscriber and sgsn_mm_ctx
To implement subscriber based authorization a data structure is needed that keeps the subscriber data. The MSC already uses a similar struct named gsm_subscriber whose implementation is split into a generic part (allocation, retrieval, reference counting, list maintenance) and MSC related parts. For GPRS, only the generic part will be used and specific fields may be added when needed. This patch adds a field mm to struct gsm_subscriber that will be used by the SGSN to store a reference to the current MM context (or NULL if there is none). This also adds a field subscr to struct sgsn_mm_ctx that reversely points to a gsm_subscriber (or NULL if there is none). Either both fields are NULL or both fields are non-NULL. Note that subscr is being reference counted. Sponsored-by: On-Waves ehf
Diffstat (limited to 'openbsc/include/openbsc/gsm_subscriber.h')
-rw-r--r--openbsc/include/openbsc/gsm_subscriber.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/openbsc/include/openbsc/gsm_subscriber.h b/openbsc/include/openbsc/gsm_subscriber.h
index 7aae4c332..7e0a419ae 100644
--- a/openbsc/include/openbsc/gsm_subscriber.h
+++ b/openbsc/include/openbsc/gsm_subscriber.h
@@ -18,6 +18,7 @@
#define GSM_SUBSCRIBER_NO_EXPIRATION 0x0
struct vty;
+struct sgsn_mm_ctx;
struct gsm_equipment {
long long unsigned int id;
@@ -56,6 +57,9 @@ struct gsm_subscriber {
/* pending requests */
int in_callback;
struct llist_head requests;
+
+ /* GPRS/SGSN related fields */
+ struct sgsn_mm_ctx *mm;
};
enum gsm_subscriber_field {