#define MMR_F_IMSI 0x0001
#define MMR_F_CAUSE 0x0002
-struct gsm_mmr {
+struct gsm48_mmr {
u_int32_t msg_type;
u_int32_t fields;
#define MNSS_F_FACILITY 0x0002
#define MNSS_F_RELCOMPL 0x0004
-struct gsm_mnss {
+struct gsm48_mnss {
u_int32_t msg_type;
u_int32_t callref;
#define RR_ABORT_IND 0x8162
#define RR_ACT_REQ 0x8170
-struct gsm_rr {
+struct gsm48_rr {
u_int32_t msg_type; /* RR_* primitive */
struct msgb *msg; /* gsm48 msg */
u_int8_t cause;
#define GSM_MMSMSSTATE_REESTPEND 4
/* GSM 04.08 4.1.2.1 */
-#define GSM_MMSTATE_NULL 0
-#define GSM_MMSTATE_LOC_UPD_INIT 3
-#define GSM_MMSTATE_WAIT_OUT_MM_CONN 5
-#define GSM_MMSTATE_MM_CONN_ACTIVE 6
-#define GSM_MMSTATE_IMSI_DETACH_INIT 7
-#define GSM_MMSTATE_PROCESS_CM_SERV_P 8
-#define GSM_MMSTATE_WAIT_NETWORK_CMD 9
-#define GSM_MMSTATE_LOC_UPD_REJ 10
-#define GSM_MMSTATE_WAIT_RR_CONN_LUPD 13
-#define GSM_MMSTATE_WAIT_RR_CONN_MM_CON 14
-#define GSM_MMSTATE_WAIT_RR_CONN_IMSI_D 15
-#define GSM_MMSTATE_WAIT_REEST 17
-#define GSM_MMSTATE_WAIT_RR_ACTIVE 18
-#define GSM_MMSTATE_MM_IDLE 19
-#define GSM_MMSTATE_WAIT_ADD_OUT_MM_CON 20
-#define GSM_MMSTATE_MM_CONN_ACTIVE_VGCS 21
-#define GSM_MMSTATE_WAIT_RR_CONN_VGCS 22
-#define GSM_MMSTATE_LOC_UPD_PEND 23
-#define GSM_MMSTATE_IMSI_DETACH_PEND 24
-#define GSM_MMSTATE_RR_CONN_RELEASE_NA 25
+#define GSM48_MM_ST_NULL 0
+#define GSM48_MM_ST_LOC_UPD_INIT 3
+#define GSM48_MM_ST_WAIT_OUT_MM_CONN 5
+#define GSM48_MM_ST_MM_CONN_ACTIVE 6
+#define GSM48_MM_ST_IMSI_DETACH_INIT 7
+#define GSM48_MM_ST_PROCESS_CM_SERV_P 8
+#define GSM48_MM_ST_WAIT_NETWORK_CMD 9
+#define GSM48_MM_ST_LOC_UPD_REJ 10
+#define GSM48_MM_ST_WAIT_RR_CONN_LUPD 13
+#define GSM48_MM_ST_WAIT_RR_CONN_MM_CON 14
+#define GSM48_MM_ST_WAIT_RR_CONN_IMSI_D 15
+#define GSM48_MM_ST_WAIT_REEST 17
+#define GSM48_MM_ST_WAIT_RR_ACTIVE 18
+#define GSM48_MM_ST_MM_IDLE 19
+#define GSM48_MM_ST_WAIT_ADD_OUT_MM_CON 20
+#define GSM48_MM_ST_MM_CONN_ACTIVE_VGCS 21
+#define GSM48_MM_ST_WAIT_RR_CONN_VGCS 22
+#define GSM48_MM_ST_LOC_UPD_PEND 23
+#define GSM48_MM_ST_IMSI_DETACH_PEND 24
+#define GSM48_MM_ST_RR_CONN_RELEASE_NA 25
/* GSM 04.08 4.1.2.1 */
-#define GSM_MMIDLESS_NORMAL_SERVICE 1
-#define GSM_MMIDLESS_ATTEMPT_UPDATE 2
-#define GSM_MMIDLESS_LIMITED_SERVICE 3
-#define GSM_MMIDLESS_NO_IMSI 4
-#define GSM_MMIDLESS_NO_CELL_AVAIL 5
-#define GSM_MMIDLESS_LOC_UPD_NEEDED 6
-#define GSM_MMIDLESS_PLMN_SEARCH 7
-#define GSM_MMIDLESS_PLMN_SEARCH_NORMAL 8
-#define GSM_MMIDLESS_RX_VGCS_NORMAL 9
-#define GSM_MMIDLESS_RX_VGCS_LIMITED 10
-
-/* GSM 04.08 4.1.2.2 */
-#define GSM_MMUSTATE_U1_UPDATED 1
-#define GSM_MMUSTATE_U2_NOT_UPDATED 2
-#define GSM_MMUSTATE_U3_ROAMING_NA 3
+#define GSM48_MM_SST_NORMAL_SERVICE 1
+#define GSM48_MM_SST_ATTEMPT_UPDATE 2
+#define GSM48_MM_SST_LIMITED_SERVICE 3
+#define GSM48_MM_SST_NO_IMSI 4
+#define GSM48_MM_SST_NO_CELL_AVAIL 5
+#define GSM48_MM_SST_LOC_UPD_NEEDED 6
+#define GSM48_MM_SST_PLMN_SEARCH 7
+#define GSM48_MM_SST_PLMN_SEARCH_NORMAL 8
+#define GSM48_MM_SST_RX_VGCS_NORMAL 9
+#define GSM48_MM_SST_RX_VGCS_LIMITED 10
/* GSM 04.08 5.1.2.2 */
#define GSM_CCSTATE_NULL 0
#define GSM_CCSTATE_CONNECT_IND 28
/* MM events */
-#define MMEVENT_NEW_LAI 0xa001
-#define MMEVENT_TIMEOUT_T3211 0xa002
-#define MMEVENT_TIMEOUT_T3212 0xa003
-#define MMEVENT_TIMEOUT_T3213 0xa004
-#define MMEVENT_IMSI_DETACH 0xa005
-#define MMEVENT_IMSI_ATTACH 0xa006
-#define MMEVENT_POWER_OFF 0xa007
-#define MMEVENT_PAGING 0xa009
-#define MMEVENT_AUTH_RESPONSE 0xa00a
-
-struct gsm_mmevent {
+#define GSM48_MM_EVENT_NEW_LAI 0xa001
+#define GSM48_MM_EVENT_TIMEOUT_T3211 0xa002
+#define GSM48_MM_EVENT_TIMEOUT_T3212 0xa003
+#define GSM48_MM_EVENT_TIMEOUT_T3213 0xa004
+#define GSM48_MM_EVENT_IMSI_DETACH 0xa005
+#define GSM48_MM_EVENT_IMSI_ATTACH 0xa006
+#define GSM48_MM_EVENT_POWER_OFF 0xa007
+#define GSM48_MM_EVENT_PAGING 0xa009
+#define GSM48_MM_EVENT_AUTH_RESPONSE 0xa00a
+
+struct gsm48_mmevent {
u_int32_t msg_type;
u_int8_t sres[4];
struct osmocom_ms *ms;
int state;
int substate;
- int update_state;
struct timer_list t3211;
struct timer_list t3212;
struct timer_list t3213;
/* GSM 04.08 RR timers */
#define GSM_T3126_MS 5, 0
+struct gsm_rr_chan_desc {
+ struct gsm48_chan_desc chan_desc;
+ uint8_t power_command;
+ uint8_t frq_list_before[131];
+ uint8_t frq_list_after[131];
+ uint8_t cell_chan_desc[16];
+ uint8_t ...
+ uint8_t
+ uint8_t
+};
+
/* RR sublayer instance */
struct gsm_rrlayer {
struct osmocom_ms *ms;
int state;
+ struct timer_list t3122;
+ struct timer_list t3124;
struct timer_list t3126;
int t3126_value;
+
+ /* states if RR-EST-REQ was used */
int rr_est_req;
- struct gsm_msgb *rr_est_msg;
+ struct msgb *rr_est_msg;
+ /* channel request states */
u_int8_t chan_req;
/* cr_hist must be signed and greater 8 bit */
int cr_hist[3];
- uint8_t sc, alg_id;
+ /* collection of all channel descriptions */
+ struct gsm_rr_chan_desc chan_desc;
+
+ /* special states when changing channel */
+ int hando_susp_state;
+ int assign_susp_state;
+ int resume_last_state;
+ struct gsm_rr_chan_desc chan_last;
};