From 35f0e664bf2a1c98ebd065f4d4483e542c4c7861 Mon Sep 17 00:00:00 2001 From: Pau Espin Pedrol Date: Mon, 2 Sep 2019 18:27:27 +0200 Subject: Split out GPRS SM layer into its own file Change-Id: Ie61d22e7868af6de73cdf9c731f07130b282599d --- include/osmocom/sgsn/Makefile.am | 1 + include/osmocom/sgsn/gprs_gmm.h | 12 +++--------- include/osmocom/sgsn/gprs_sm.h | 15 +++++++++++++++ 3 files changed, 19 insertions(+), 9 deletions(-) create mode 100644 include/osmocom/sgsn/gprs_sm.h (limited to 'include') diff --git a/include/osmocom/sgsn/Makefile.am b/include/osmocom/sgsn/Makefile.am index 9ddc2bc97..3fdb6b348 100644 --- a/include/osmocom/sgsn/Makefile.am +++ b/include/osmocom/sgsn/Makefile.am @@ -14,6 +14,7 @@ noinst_HEADERS = \ gprs_llc_xid.h \ gprs_ranap.h \ gprs_sgsn.h \ + gprs_sm.h \ gprs_sndcp_comp.h \ gprs_sndcp_dcomp.h \ gprs_sndcp.h \ diff --git a/include/osmocom/sgsn/gprs_gmm.h b/include/osmocom/sgsn/gprs_gmm.h index 982cd93d6..e2b17d217 100644 --- a/include/osmocom/sgsn/gprs_gmm.h +++ b/include/osmocom/sgsn/gprs_gmm.h @@ -6,21 +6,16 @@ #include -int gsm48_tx_gsm_deact_pdp_req(struct sgsn_pdp_ctx *pdp, uint8_t sm_cause, bool teardown); -int gsm48_tx_gsm_act_pdp_rej(struct sgsn_mm_ctx *mm, uint8_t tid, - uint8_t cause, uint8_t pco_len, uint8_t *pco_v); -int gsm48_tx_gsm_act_pdp_acc(struct sgsn_pdp_ctx *pdp); -int gsm48_tx_gsm_deact_pdp_acc(struct sgsn_pdp_ctx *pdp); int gsm48_tx_gmm_auth_ciph_req(struct sgsn_mm_ctx *mm, const struct osmo_auth_vector *vec, uint8_t key_seq, bool force_standby); int gsm0408_gprs_rcvmsg_gb(struct msgb *msg, struct gprs_llc_llme *llme, bool drop_cipherable); -int gsm0408_rcv_gsm(struct sgsn_mm_ctx *mmctx, struct msgb *msg, - struct gprs_llc_llme *llme); int gsm0408_rcv_gmm(struct sgsn_mm_ctx *mmctx, struct msgb *msg, struct gprs_llc_llme *llme, bool drop_cipherable); +int gsm48_gmm_sendmsg(struct msgb *msg, int command, + struct sgsn_mm_ctx *mm, bool encryptable); int gsm0408_gprs_force_reattach(struct sgsn_mm_ctx *mmctx); int gsm0408_gprs_force_reattach_oldmsg(struct msgb *msg, struct gprs_llc_llme *llme); @@ -47,7 +42,6 @@ int gsm48_gmm_authorize(struct sgsn_mm_ctx *ctx); void extract_subscr_msisdn(struct sgsn_mm_ctx *ctx); void extract_subscr_hlr(struct sgsn_mm_ctx *ctx); -void pdp_ctx_detach_mm_ctx(struct sgsn_pdp_ctx *pdp); - void msgid2mmctx(struct sgsn_mm_ctx *mm, const struct msgb *msg); +void mmctx2msgid(struct msgb *msg, const struct sgsn_mm_ctx *mm); #endif /* _GPRS_GMM_H */ diff --git a/include/osmocom/sgsn/gprs_sm.h b/include/osmocom/sgsn/gprs_sm.h new file mode 100644 index 000000000..55c95b89d --- /dev/null +++ b/include/osmocom/sgsn/gprs_sm.h @@ -0,0 +1,15 @@ +#pragma once + +#include +#include + +int gsm48_tx_gsm_deact_pdp_req(struct sgsn_pdp_ctx *pdp, uint8_t sm_cause, bool teardown); +int gsm48_tx_gsm_act_pdp_rej(struct sgsn_mm_ctx *mm, uint8_t tid, + uint8_t cause, uint8_t pco_len, uint8_t *pco_v); +int gsm48_tx_gsm_act_pdp_acc(struct sgsn_pdp_ctx *pdp); +int gsm48_tx_gsm_deact_pdp_acc(struct sgsn_pdp_ctx *pdp); + +void pdp_ctx_detach_mm_ctx(struct sgsn_pdp_ctx *pdp); + +int gsm0408_rcv_gsm(struct sgsn_mm_ctx *mmctx, struct msgb *msg, + struct gprs_llc_llme *llme); -- cgit v1.2.3