diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/osmocom/sgsn/Makefile.am | 1 | ||||
-rw-r--r-- | include/osmocom/sgsn/apn.h | 22 | ||||
-rw-r--r-- | include/osmocom/sgsn/gprs_sgsn.h | 16 | ||||
-rw-r--r-- | include/osmocom/sgsn/gprs_subscriber.h | 2 |
4 files changed, 26 insertions, 15 deletions
diff --git a/include/osmocom/sgsn/Makefile.am b/include/osmocom/sgsn/Makefile.am index fc4f5978c..4d43c6dde 100644 --- a/include/osmocom/sgsn/Makefile.am +++ b/include/osmocom/sgsn/Makefile.am @@ -1,4 +1,5 @@ noinst_HEADERS = \ + apn.h \ common.h \ crc24.h \ debug.h \ diff --git a/include/osmocom/sgsn/apn.h b/include/osmocom/sgsn/apn.h new file mode 100644 index 000000000..adf62e21f --- /dev/null +++ b/include/osmocom/sgsn/apn.h @@ -0,0 +1,22 @@ +#pragma once + +#include <osmocom/core/linuxlist.h> + +struct sgsn_ggsn_ctx; + +#define GSM_APN_LENGTH 102 + +extern struct llist_head sgsn_apn_ctxts; + +struct apn_ctx { + struct llist_head list; + struct sgsn_ggsn_ctx *ggsn; + char *name; + char *imsi_prefix; + char *description; +}; + +struct apn_ctx *sgsn_apn_ctx_find_alloc(const char *name, const char *imsi_prefix); +void sgsn_apn_ctx_free(struct apn_ctx *actx); +struct apn_ctx *sgsn_apn_ctx_by_name(const char *name, const char *imsi_prefix); +struct apn_ctx *sgsn_apn_ctx_match(const char *name, const char *imsi_prefix); diff --git a/include/osmocom/sgsn/gprs_sgsn.h b/include/osmocom/sgsn/gprs_sgsn.h index 541d854ae..6d51b303e 100644 --- a/include/osmocom/sgsn/gprs_sgsn.h +++ b/include/osmocom/sgsn/gprs_sgsn.h @@ -14,10 +14,10 @@ #include <osmocom/gsm/protocol/gsm_23_003.h> #include <osmocom/crypt/auth.h> +#include <osmocom/sgsn/apn.h> #include <osmocom/sgsn/gprs_subscriber.h> #define GSM_EXTENSION_LENGTH 15 -#define GSM_APN_LENGTH 102 struct gprs_llc_lle; struct ctrl_handle; @@ -362,21 +362,7 @@ struct sgsn_pdp_ctx *sgsn_pdp_ctx_alloc(struct sgsn_mm_ctx *mm, void sgsn_pdp_ctx_terminate(struct sgsn_pdp_ctx *pdp); void sgsn_pdp_ctx_free(struct sgsn_pdp_ctx *pdp); -struct apn_ctx { - struct llist_head list; - struct sgsn_ggsn_ctx *ggsn; - char *name; - char *imsi_prefix; - char *description; -}; - -struct apn_ctx *sgsn_apn_ctx_find_alloc(const char *name, const char *imsi_prefix); -void sgsn_apn_ctx_free(struct apn_ctx *actx); -struct apn_ctx *sgsn_apn_ctx_by_name(const char *name, const char *imsi_prefix); -struct apn_ctx *sgsn_apn_ctx_match(const char *name, const char *imsi_prefix); - extern struct llist_head sgsn_mm_ctxts; -extern struct llist_head sgsn_apn_ctxts; extern struct llist_head sgsn_pdp_ctxts; uint32_t sgsn_alloc_ptmsi(void); diff --git a/include/osmocom/sgsn/gprs_subscriber.h b/include/osmocom/sgsn/gprs_subscriber.h index a961c4581..2e53bdf26 100644 --- a/include/osmocom/sgsn/gprs_subscriber.h +++ b/include/osmocom/sgsn/gprs_subscriber.h @@ -6,6 +6,8 @@ #include <osmocom/core/linuxlist.h> #include <osmocom/gsm/protocol/gsm_23_003.h> +#include <osmocom/sgsn/apn.h> + struct sgsn_instance; struct sgsn_mm_ctx; |