aboutsummaryrefslogtreecommitdiffstats
path: root/include/osmocom
diff options
context:
space:
mode:
Diffstat (limited to 'include/osmocom')
-rw-r--r--include/osmocom/sgsn/Makefile.am1
-rw-r--r--include/osmocom/sgsn/gprs_gmm.h2
-rw-r--r--include/osmocom/sgsn/gprs_mm_state_iu_fsm.h24
-rw-r--r--include/osmocom/sgsn/gprs_sgsn.h9
4 files changed, 26 insertions, 10 deletions
diff --git a/include/osmocom/sgsn/Makefile.am b/include/osmocom/sgsn/Makefile.am
index d6ee4451e..0ab00fe46 100644
--- a/include/osmocom/sgsn/Makefile.am
+++ b/include/osmocom/sgsn/Makefile.am
@@ -8,6 +8,7 @@ noinst_HEADERS = \
gprs_gmm.h \
gprs_gmm_attach.h \
gprs_mm_state_gb_fsm.h \
+ gprs_mm_state_iu_fsm.h \
gprs_llc.h \
gprs_llc_xid.h \
gprs_ranap.h \
diff --git a/include/osmocom/sgsn/gprs_gmm.h b/include/osmocom/sgsn/gprs_gmm.h
index 2fa12e597..982cd93d6 100644
--- a/include/osmocom/sgsn/gprs_gmm.h
+++ b/include/osmocom/sgsn/gprs_gmm.h
@@ -49,7 +49,5 @@ 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_mm_state_iu state);
-
void msgid2mmctx(struct sgsn_mm_ctx *mm, const struct msgb *msg);
#endif /* _GPRS_GMM_H */
diff --git a/include/osmocom/sgsn/gprs_mm_state_iu_fsm.h b/include/osmocom/sgsn/gprs_mm_state_iu_fsm.h
new file mode 100644
index 000000000..7f02bcc45
--- /dev/null
+++ b/include/osmocom/sgsn/gprs_mm_state_iu_fsm.h
@@ -0,0 +1,24 @@
+#pragma once
+
+#include <osmocom/core/fsm.h>
+
+struct sgsn_mm_ctx;
+
+
+/* TS 23.060 6.1.1 Mobility Management States (A/Gb mode) */
+enum mm_state_iu_fsm_states {
+ ST_PMM_DETACHED,
+ ST_PMM_CONNECTED,
+ ST_PMM_IDLE
+};
+
+enum mm_state_iu_fsm_events {
+ E_PMM_PS_ATTACH,
+ /* E_PS_DETACH, TODO: not used */
+ E_PMM_PS_CONN_RELEASE,
+ E_PMM_PS_CONN_ESTABLISH,
+ E_PMM_IMPLICIT_DETACH, /* = E_PS_ATTACH_REJECT, E_RAU_REJECT */
+ E_PMM_RA_UPDATE, /* = Serving RNC relocation */
+};
+
+extern struct osmo_fsm mm_state_iu_fsm;
diff --git a/include/osmocom/sgsn/gprs_sgsn.h b/include/osmocom/sgsn/gprs_sgsn.h
index 382019c2d..8f16c5b30 100644
--- a/include/osmocom/sgsn/gprs_sgsn.h
+++ b/include/osmocom/sgsn/gprs_sgsn.h
@@ -32,13 +32,6 @@ enum gprs_gmm_state {
GMM_DEREGISTERED_INIT, /* 4.1.3.3.1.4 */
};
-/* TS 23.060 6.1.2 Mobility Management States (Iu mode) */
-enum gprs_mm_state_iu {
- PMM_DETACHED,
- PMM_CONNECTED,
- PMM_IDLE
-};
-
enum gprs_mm_ctr {
GMM_CTR_PKTS_SIG_IN,
GMM_CTR_PKTS_SIG_OUT,
@@ -171,7 +164,7 @@ struct sgsn_mm_ctx {
struct ranap_ue_conn_ctx *ue_ctx;
struct service_info service;
/* TS 23.060 6.1.2 Mobility Management States (Iu mode) */
- enum gprs_mm_state_iu mm_state;
+ struct osmo_fsm_inst *mm_state_fsm;
} iu;
struct {
struct osmo_fsm_inst *fsm;