diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2023-01-05 17:48:15 +0100 |
---|---|---|
committer | Pau Espin Pedrol <pespin@sysmocom.de> | 2023-01-05 17:48:17 +0100 |
commit | 0e707fc83a2cc632706c167e6a8725bee66afd8e (patch) | |
tree | f0bd1f430c0072374e27eb671fbaa8787fcfe097 | |
parent | ffd6e37eb537d93ce0e60793c14c149cfc76214e (diff) |
Move struct sgsn_subscriber_pdp_data to gprs_subscriber.h
The functions driving its lifcyecles are already in gprs_subscriber.c,
and are used mainly by functions in the same file, hence move it to the
related header to further shrink gprs_sgsn.h.
Change-Id: Iff7be91af130a3317d57d3649c17e3d5d2540e7a
-rw-r--r-- | include/osmocom/sgsn/gprs_sgsn.h | 14 | ||||
-rw-r--r-- | include/osmocom/sgsn/gprs_subscriber.h | 16 | ||||
-rw-r--r-- | tests/sgsn/sgsn_test.c | 3 |
3 files changed, 16 insertions, 17 deletions
diff --git a/include/osmocom/sgsn/gprs_sgsn.h b/include/osmocom/sgsn/gprs_sgsn.h index 6d51b303e..8aaabfd9b 100644 --- a/include/osmocom/sgsn/gprs_sgsn.h +++ b/include/osmocom/sgsn/gprs_sgsn.h @@ -382,20 +382,6 @@ struct imsi_acl_entry { char imsi[OSMO_IMSI_BUF_SIZE]; }; -/* 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]; - uint8_t qos_subscribed[20]; - size_t qos_subscribed_len; - uint8_t pdp_charg[2]; - bool has_pdp_charg; -}; - #define SGSN_ERROR_CAUSE_NONE (-1) #define LOGGSUBSCRP(level, subscr, fmt, args...) \ diff --git a/include/osmocom/sgsn/gprs_subscriber.h b/include/osmocom/sgsn/gprs_subscriber.h index 2e53bdf26..d84a5d615 100644 --- a/include/osmocom/sgsn/gprs_subscriber.h +++ b/include/osmocom/sgsn/gprs_subscriber.h @@ -48,6 +48,22 @@ struct sgsn_subscriber_data { bool has_pdp_charg; }; +/* 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]; + uint8_t qos_subscribed[20]; + size_t qos_subscribed_len; + uint8_t pdp_charg[2]; + bool has_pdp_charg; +}; + +struct sgsn_subscriber_pdp_data *sgsn_subscriber_pdp_data_alloc(struct sgsn_subscriber_data *sdata); + struct gprs_subscr { struct llist_head entry; int use_count; diff --git a/tests/sgsn/sgsn_test.c b/tests/sgsn/sgsn_test.c index 7d3bde576..e7f820f98 100644 --- a/tests/sgsn/sgsn_test.c +++ b/tests/sgsn/sgsn_test.c @@ -1435,9 +1435,6 @@ static void test_apn_matching(void) cleanup_test(); } -struct sgsn_subscriber_pdp_data* sgsn_subscriber_pdp_data_alloc( - struct sgsn_subscriber_data *sdata); - static void test_ggsn_selection(void) { struct apn_ctx *actxs[4]; |