From 8333ef10c9e2a3806e04dd9512dbb141d6cb13cc Mon Sep 17 00:00:00 2001 From: Pau Espin Pedrol Date: Thu, 29 Aug 2019 19:26:12 +0200 Subject: Move llc->MM/SM Gb specific glue code to its own file Now that we have RANAP/Iu handling specificities in its own file, let's have also Gb specific glue code for messages coming from llc up to MM/SM layer in its own file. This way same entry points in gprs_gmm.c are used by Gb and Iu: gsm0408_rcv_gmm() (for MM) and gsm0408_rcv_gsm() (for SM). Change-Id: Iaf57922a0970c1d03f6f1d6337d27ae3d4aaf32c --- include/osmocom/sgsn/Makefile.am | 1 + include/osmocom/sgsn/gprs_gb.h | 9 +++++++++ include/osmocom/sgsn/gprs_gmm.h | 4 ++++ 3 files changed, 14 insertions(+) create mode 100644 include/osmocom/sgsn/gprs_gb.h (limited to 'include') diff --git a/include/osmocom/sgsn/Makefile.am b/include/osmocom/sgsn/Makefile.am index b4cd5db06..b91c9f19e 100644 --- a/include/osmocom/sgsn/Makefile.am +++ b/include/osmocom/sgsn/Makefile.am @@ -3,6 +3,7 @@ noinst_HEADERS = \ crc24.h \ debug.h \ gb_proxy.h \ + gprs_gb.h \ gprs_gb_parse.h \ gprs_gmm.h \ gprs_gmm_attach.h \ diff --git a/include/osmocom/sgsn/gprs_gb.h b/include/osmocom/sgsn/gprs_gb.h new file mode 100644 index 000000000..3bc367613 --- /dev/null +++ b/include/osmocom/sgsn/gprs_gb.h @@ -0,0 +1,9 @@ +#pragma once + +#include + +#include +#include + +int gsm0408_gprs_rcvmsg_gb(struct msgb *msg, struct gprs_llc_llme *llme, + bool drop_cipherable); diff --git a/include/osmocom/sgsn/gprs_gmm.h b/include/osmocom/sgsn/gprs_gmm.h index 047bd7748..93163515a 100644 --- a/include/osmocom/sgsn/gprs_gmm.h +++ b/include/osmocom/sgsn/gprs_gmm.h @@ -50,4 +50,8 @@ void extract_subscr_hlr(struct sgsn_mm_ctx *ctx); void pdp_ctx_detach_mm_ctx(struct sgsn_pdp_ctx *pdp); void mmctx_set_pmm_state(struct sgsn_mm_ctx *ctx, enum gprs_pmm_state state); +void mmctx_state_timer_start(struct sgsn_mm_ctx *mm, unsigned int T); +void mmctx_set_mm_state(struct sgsn_mm_ctx *ctx, enum gprs_pmm_state state); + +void msgid2mmctx(struct sgsn_mm_ctx *mm, const struct msgb *msg); #endif /* _GPRS_GMM_H */ -- cgit v1.2.3