summaryrefslogtreecommitdiffstats
path: root/openbsc/src/gprs/sgsn_vty.c
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/src/gprs/sgsn_vty.c
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/src/gprs/sgsn_vty.c')
-rw-r--r--openbsc/src/gprs/sgsn_vty.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/openbsc/src/gprs/sgsn_vty.c b/openbsc/src/gprs/sgsn_vty.c
index ba71555ec..81b9d7f67 100644
--- a/openbsc/src/gprs/sgsn_vty.c
+++ b/openbsc/src/gprs/sgsn_vty.c
@@ -402,6 +402,7 @@ static void subscr_dump_full_vty(struct vty *vty, struct gsm_subscriber *subscr,
char expire_time[200];
struct gsm_auth_tuple *at;
int at_idx;
+ struct sgsn_subscriber_pdp_data *pdp;
vty_out(vty, " ID: %llu, Authorized: %d%s", subscr->id,
subscr->authorized, VTY_NEWLINE);
@@ -439,6 +440,12 @@ static void subscr_dump_full_vty(struct vty *vty, struct gsm_subscriber *subscr,
VTY_NEWLINE);
}
+ llist_for_each_entry(pdp, &subscr->sgsn_data->pdp_list, list) {
+ vty_out(vty, " PDP info: Id: %d, Type: 0x%04x, APN: '%s'%s",
+ pdp->context_id, pdp->pdp_type, pdp->apn_str,
+ VTY_NEWLINE);
+ }
+
/* print the expiration time of a subscriber */
if (subscr->expire_lu) {
strftime(expire_time, sizeof(expire_time),