aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/osmocom/msc/a_iface.h2
-rw-r--r--include/osmocom/msc/gsm_data.h7
-rw-r--r--include/osmocom/msc/osmo_msc.h6
3 files changed, 15 insertions, 0 deletions
diff --git a/include/osmocom/msc/a_iface.h b/include/osmocom/msc/a_iface.h
index 217011d2e..9a758d36b 100644
--- a/include/osmocom/msc/a_iface.h
+++ b/include/osmocom/msc/a_iface.h
@@ -78,6 +78,8 @@ int a_iface_tx_assignment(const struct gsm_trans *trans);
/* Send clear command via A-interface */
int a_iface_tx_clear_cmd(struct gsm_subscriber_connection *conn);
+int a_iface_tx_classmark_request(const struct gsm_subscriber_connection *conn);
+
/* Clear all subscriber connections on a specified BSC
* (Helper function for a_iface_bssap.c) */
void a_clear_all(struct osmo_sccp_user *scu, const struct osmo_sccp_addr *bsc_addr);
diff --git a/include/osmocom/msc/gsm_data.h b/include/osmocom/msc/gsm_data.h
index ffe3afc6b..70ac93440 100644
--- a/include/osmocom/msc/gsm_data.h
+++ b/include/osmocom/msc/gsm_data.h
@@ -130,6 +130,13 @@ struct gsm_subscriber_connection {
uint16_t lac;
struct gsm_encr encr;
+ /* "Temporary" storage for the case the VLR asked for Cipher Mode Command, but the MSC still
+ * wants to request a Classmark Update first. */
+ struct {
+ bool umts_aka;
+ bool retrieve_imeisv;
+ } geran_set_cipher_mode;
+
/* N(SD) expected in the received frame, per flow (TS 24.007 11.2.3.2.3.2.2) */
uint8_t n_sd_next[4];
diff --git a/include/osmocom/msc/osmo_msc.h b/include/osmocom/msc/osmo_msc.h
index 7b3702abc..3ffb65c91 100644
--- a/include/osmocom/msc/osmo_msc.h
+++ b/include/osmocom/msc/osmo_msc.h
@@ -16,6 +16,8 @@ enum subscr_conn_fsm_event {
SUBSCR_CONN_E_INVALID = 0,
/* Accepted the initial Complete Layer 3 (starting to evaluate Authentication and Ciphering) */
SUBSCR_CONN_E_COMPLETE_LAYER_3,
+ /* Received Classmark Update, typically neede for Ciphering Mode Command */
+ SUBSCR_CONN_E_CLASSMARK_UPDATE,
/* LU or Process Access FSM has determined that this conn is good */
SUBSCR_CONN_E_ACCEPTED,
/* received first reply from MS in "real" CC, SMS, USSD communication */
@@ -33,6 +35,7 @@ enum subscr_conn_fsm_event {
enum subscr_conn_fsm_state {
SUBSCR_CONN_S_NEW,
SUBSCR_CONN_S_AUTH_CIPH,
+ SUBSCR_CONN_S_WAIT_CLASSMARK_UPDATE,
SUBSCR_CONN_S_ACCEPTED,
SUBSCR_CONN_S_COMMUNICATING,
SUBSCR_CONN_S_RELEASING,
@@ -62,6 +65,9 @@ int msc_compl_l3(struct gsm_subscriber_connection *conn,
struct msgb *msg, uint16_t chosen_channel);
void msc_dtap(struct gsm_subscriber_connection *conn, uint8_t link_id,
struct msgb *msg);
+int msc_classmark_request_then_cipher_mode_cmd(struct gsm_subscriber_connection *conn, bool umts_aka,
+ bool retrieve_imeisv);
+int msc_geran_set_cipher_mode(struct gsm_subscriber_connection *conn, bool umts_aka, bool retrieve_imeisv);
void msc_cipher_mode_compl(struct gsm_subscriber_connection *conn,
struct msgb *msg, uint8_t alg_id);
void msc_rx_sec_mode_compl(struct gsm_subscriber_connection *conn);