diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2019-08-30 17:06:36 +0200 |
---|---|---|
committer | Pau Espin Pedrol <pespin@sysmocom.de> | 2019-09-02 11:44:58 +0200 |
commit | ccd1252bd76169439cb66f3a50e4575e0f03ec0b (patch) | |
tree | fe1bb807c01383609b0d74ad1ac25759952d8d69 /include | |
parent | 02514bc592923b9c082942d64fcf06db2e4bfd44 (diff) |
Introduce FSM mm_state_iu_fsm
Implement TS 23.060 6.1.2 Mobility Management States (Iu mode) using
osmocom FSM and drop old implementation.
Most of the logic on each state is still kept in gprs_gmm.c, will be
inserted into the FSM later.
Change-Id: I4c9cf8c27194817c56e8949af0205e1cc14af317
Diffstat (limited to 'include')
-rw-r--r-- | include/osmocom/sgsn/Makefile.am | 1 | ||||
-rw-r--r-- | include/osmocom/sgsn/gprs_gmm.h | 2 | ||||
-rw-r--r-- | include/osmocom/sgsn/gprs_mm_state_iu_fsm.h | 24 | ||||
-rw-r--r-- | include/osmocom/sgsn/gprs_sgsn.h | 9 |
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; |