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
diff --git a/include/osmocom/sgsn/Makefile.am b/include/osmocom/sgsn/Makefile.am
index b4cd5db..b91c9f1 100644
--- a/include/osmocom/sgsn/Makefile.am
+++ b/include/osmocom/sgsn/Makefile.am
@@ -3,6 +3,7 @@
 	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 0000000..3bc3676
--- /dev/null
+++ b/include/osmocom/sgsn/gprs_gb.h
@@ -0,0 +1,9 @@
+#pragma once
+
+#include <stdbool.h>
+
+#include <osmocom/core/msgb.h>
+#include <osmocom/sgsn/gprs_rllc.h>
+
+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 047bd77..9316351 100644
--- a/include/osmocom/sgsn/gprs_gmm.h
+++ b/include/osmocom/sgsn/gprs_gmm.h
@@ -50,4 +50,8 @@
 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 */