diff options
author | Neels Hofmeyr <nhofmeyr@sysmocom.de> | 2017-01-10 00:49:56 +0100 |
---|---|---|
committer | Neels Hofmeyr <nhofmeyr@sysmocom.de> | 2017-02-25 01:25:22 +0000 |
commit | 0e5d807297f4fd1222fafece864519c70f7965a3 (patch) | |
tree | e0842d19808a545e07ff8ce411f2a23739f0cf43 /openbsc/include/openbsc/gprs_subscriber.h | |
parent | a369e24cb9a583ef9906a8ef9125f6ca8c6f80bf (diff) |
add struct gprs_subscr, separating gprs from gsm_subscriber
Prepare for replacing gsm_subscriber with vlr_subscriber. vlr_subscriber will
not make sense to be used in gprs, so have a dedicated GPRS subscriber struct.
(Could change if the gprs code were to use libvlr; is currently independent).
Related: OS#1592
Change-Id: Ia8b391ee009c8545763cba04505be3947835120e
Diffstat (limited to 'openbsc/include/openbsc/gprs_subscriber.h')
-rw-r--r-- | openbsc/include/openbsc/gprs_subscriber.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/openbsc/include/openbsc/gprs_subscriber.h b/openbsc/include/openbsc/gprs_subscriber.h new file mode 100644 index 000000000..be78febff --- /dev/null +++ b/openbsc/include/openbsc/gprs_subscriber.h @@ -0,0 +1,31 @@ +/* GPRS subscriber details for use in SGSN land */ +#pragma once + +#include <stdint.h> + +#include <osmocom/core/linuxlist.h> +#include <osmocom/gsm/protocol/gsm_23_003.h> + +extern struct llist_head * const gprs_subscribers; + +struct gprs_subscr { + struct llist_head entry; + int use_count; + + char imsi[GSM23003_IMSI_MAX_DIGITS+1]; + uint32_t tmsi; + char imei[GSM23003_IMEISV_NUM_DIGITS+1]; + bool authorized; + bool keep_in_ram; + uint32_t flags; + uint16_t lac; + + struct sgsn_subscriber_data *sgsn_data; +}; + +struct gprs_subscr *_gprs_subscr_get(struct gprs_subscr *gsub, + const char *file, int line); +struct gprs_subscr *_gprs_subscr_put(struct gprs_subscr *gsub, + const char *file, int line); +#define gprs_subscr_get(gsub) _gprs_subscr_get(gsub, __BASE_FILE__, __LINE__) +#define gprs_subscr_put(gsub) _gprs_subscr_put(gsub, __BASE_FILE__, __LINE__) |