aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/include/openbsc/gprs_sgsn.h
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2014-12-17 14:03:35 +0100
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2015-02-06 09:55:39 +0100
commit0e8add601da35188eb155c8c279a9bdcaf4ba41b (patch)
tree734feace1bd63992e0d31d0a0414df79552a8cb8 /openbsc/include/openbsc/gprs_sgsn.h
parentf6f86b0eec18da165db136b14bf2db87fde4b4ac (diff)
sgsn: Add PDP info to subscriber data
Currently the PDP info that is transmitted via GSUP is just parsed and then discarded. This commit adds a new data structure sgsn_subscriber_pdp_data and maintains a list of those in sgsn_subscriber_data. The PDP data is copied from an incoming GSUP UpdateLocationResult message. If that message contains the PDPInfoComplete flag, the list is cleared before new entries are added. The 'show subscriber cache' output now also shows the PDP data entries. Note that the InsertSubscriberData message is still not supported. [hfreyther: Added talloc_free in gprs_subscr_pdp_data_clear] Sponsored-by: On-Waves ehf
Diffstat (limited to 'openbsc/include/openbsc/gprs_sgsn.h')
-rw-r--r--openbsc/include/openbsc/gprs_sgsn.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/openbsc/include/openbsc/gprs_sgsn.h b/openbsc/include/openbsc/gprs_sgsn.h
index f566ab9f9..516b6cda9 100644
--- a/openbsc/include/openbsc/gprs_sgsn.h
+++ b/openbsc/include/openbsc/gprs_sgsn.h
@@ -15,6 +15,7 @@
#define GSM_IMSI_LENGTH 17
#define GSM_IMEI_LENGTH 17
#define GSM_EXTENSION_LENGTH 15
+#define GSM_APN_LENGTH 102
struct gprs_llc_lle;
struct ctrl_handle;
@@ -273,6 +274,16 @@ struct imsi_acl_entry {
char imsi[16+1];
};
+/* see GSM 09.02, 17.7.1, PDP-Context and GPRSSubscriptionData */
+/* see GSM 09.02, B.1, gprsSubscriptionData */
+struct sgsn_subscriber_pdp_data {
+ struct llist_head list;
+
+ unsigned int context_id;
+ uint16_t pdp_type;
+ char apn_str[GSM_APN_LENGTH];
+};
+
enum sgsn_subscriber_proc {
SGSN_SUBSCR_PROC_NONE = 0,
SGSN_SUBSCR_PROC_PURGE,
@@ -284,6 +295,7 @@ struct sgsn_subscriber_data {
struct sgsn_mm_ctx *mm;
struct gsm_auth_tuple auth_triplets[5];
int auth_triplets_updated;
+ struct llist_head pdp_list;
int error_cause;
enum sgsn_subscriber_proc blocked_by;
};