diff options
author | Jacob Erlbeck <jerlbeck@sysmocom.de> | 2014-11-12 10:12:11 +0100 |
---|---|---|
committer | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2014-12-09 09:23:11 +0100 |
commit | 33b6dadc884ec1060e401ba097523086ac34b552 (patch) | |
tree | d9b98c7a8f84f941b2830b81c03290ac020fa4cc /openbsc/include/openbsc | |
parent | 70d8e31a748026a92e5739147411dcf512df7205 (diff) |
sgsn: Add gprs_subscriber.c
This patch adds GPRS specific functions for gsm_subscriber objects
(allocation, retrieval, deletion) and subscriber data
requests/updates. The sgsn_update_subscriber_data callback is used to
notify the sgsn about updates and is extended by a parameter that
passes a reference to a gsm_subscriber.
Sponsored-by: On-Waves ehf
Diffstat (limited to 'openbsc/include/openbsc')
-rw-r--r-- | openbsc/include/openbsc/gprs_sgsn.h | 17 | ||||
-rw-r--r-- | openbsc/include/openbsc/gsm_subscriber.h | 1 |
2 files changed, 17 insertions, 1 deletions
diff --git a/openbsc/include/openbsc/gprs_sgsn.h b/openbsc/include/openbsc/gprs_sgsn.h index 3e80ae21f..b1358131a 100644 --- a/openbsc/include/openbsc/gprs_sgsn.h +++ b/openbsc/include/openbsc/gprs_sgsn.h @@ -287,8 +287,23 @@ int sgsn_auth_request(struct sgsn_mm_ctx *mm); enum sgsn_auth_state sgsn_auth_state(struct sgsn_mm_ctx *mm); void sgsn_auth_update(struct sgsn_mm_ctx *mm); +/* + * GPRS subscriber data + */ +#define GPRS_SUBSCRIBER_UPDATE_PENDING (1 << 16) +#define GPRS_SUBSCRIBER_CANCELLED (1 << 17) + +void gprs_subscr_init(struct sgsn_instance *sgi); +int gprs_subscr_request_update(struct sgsn_mm_ctx *mmctx); +void gprs_subscr_delete(struct gsm_subscriber *subscr); +struct gsm_subscriber *gprs_subscr_get_or_create(const char *imsi); +struct gsm_subscriber *gprs_subscr_get_by_imsi(const char *imsi); +void gprs_subscr_put_and_cancel(struct gsm_subscriber *subscr); +void gprs_subscr_update(struct gsm_subscriber *subscr); + /* Called on subscriber data updates */ -void sgsn_update_subscriber_data(struct sgsn_mm_ctx *mmctx); +void sgsn_update_subscriber_data(struct sgsn_mm_ctx *mmctx, + struct gsm_subscriber *subscr); int gprs_sndcp_vty_init(void); struct sgsn_instance; diff --git a/openbsc/include/openbsc/gsm_subscriber.h b/openbsc/include/openbsc/gsm_subscriber.h index 46fc87f51..195fa0fd0 100644 --- a/openbsc/include/openbsc/gsm_subscriber.h +++ b/openbsc/include/openbsc/gsm_subscriber.h @@ -13,6 +13,7 @@ #define GSM_MAX_EXTEN 49999 #define GSM_SUBSCRIBER_FIRST_CONTACT 0x00000001 +/* gprs_sgsn.h defines additional flags including and above bit 16 (0x10000) */ #define tmsi_from_string(str) strtoul(str, NULL, 10) #define GSM_SUBSCRIBER_NO_EXPIRATION 0x0 |