From 3c20a5ee7483108fed857b61050b7282327d5c83 Mon Sep 17 00:00:00 2001 From: Neels Hofmeyr Date: Fri, 30 Nov 2018 01:08:36 +0100 Subject: rename some RAN conn related stuff to ran_conn_* Following previous rename of gsm_subscriber_connection: Some functions and #defines are still called like "msc_conn" or just "msc_", while they are clearly about a RAN conn. To avoid confusion with the future separate concepts of MSC roles and a RAN connection, rename all those to match the common "ran_conn" prefix. Change-Id: Ia17a0a35f11911e00e19cafb5d7828d729a69640 --- src/libmsc/a_iface.c | 2 +- src/libmsc/a_iface_bssap.c | 24 +++++++++---------- src/libmsc/gsm_04_08.c | 14 +++++------ src/libmsc/gsm_04_08_cc.c | 6 ++--- src/libmsc/gsm_04_11.c | 6 ++--- src/libmsc/gsm_09_11.c | 6 ++--- src/libmsc/iucs.c | 4 ++-- src/libmsc/iucs_ranap.c | 2 +- src/libmsc/osmo_msc.c | 59 ++++++++++++++++++++++------------------------ src/libmsc/silent_call.c | 4 ++-- src/libmsc/subscr_conn.c | 16 ++++++------- src/libmsc/transaction.c | 8 +++---- 12 files changed, 74 insertions(+), 77 deletions(-) (limited to 'src/libmsc') diff --git a/src/libmsc/a_iface.c b/src/libmsc/a_iface.c index fa0cb5f62..82519d62d 100644 --- a/src/libmsc/a_iface.c +++ b/src/libmsc/a_iface.c @@ -629,7 +629,7 @@ void a_clear_all(struct osmo_sccp_user *scu, const struct osmo_sccp_addr *bsc_ad uint32_t conn_id = conn->a.conn_id; LOGPCONN(conn, LOGL_NOTICE, "Dropping orphaned RAN connection\n"); /* This call will/may talloc_free(conn), so we must save conn_id above */ - msc_clear_request(conn, GSM48_CC_CAUSE_SWITCH_CONG); + ran_conn_clear_request(conn, GSM48_CC_CAUSE_SWITCH_CONG); /* If there is still an SCCP connection active, remove it now */ if (check_connection_active(conn_id)) { diff --git a/src/libmsc/a_iface_bssap.c b/src/libmsc/a_iface_bssap.c index 31cdb06ef..4d03d2303 100644 --- a/src/libmsc/a_iface_bssap.c +++ b/src/libmsc/a_iface_bssap.c @@ -343,7 +343,7 @@ static int bssmap_rx_l3_compl(struct osmo_sccp_user *scu, const struct a_conn_in conn = ran_conn_allocate_a(a_conn_info, network, lac, scu, a_conn_info->conn_id); /* Handover location update to the MSC code */ - msc_compl_l3(conn, msg, 0); + ran_conn_compl_l3(conn, msg, 0); return 0; } @@ -372,7 +372,7 @@ static int bssmap_rx_classmark_upd(struct ran_conn *conn, struct msgb *msg, } /* Inform MSC about the classmark change */ - msc_classmark_chg(conn, cm2, cm2_len, cm3, cm3_len); + ran_conn_classmark_chg(conn, cm2, cm2_len, cm3, cm3_len); return 0; } @@ -383,9 +383,9 @@ static int bssmap_rx_ciph_compl(struct ran_conn *conn, struct msgb *msg, { /* FIXME: The field GSM0808_IE_LAYER_3_MESSAGE_CONTENTS is optional by * means of the specification. So there can be messages without L3 info. - * In this case, the code will crash becrause msc_cipher_mode_compl() + * In this case, the code will crash becrause ran_conn_cipher_mode_compl() * is not able to deal with msg = NULL and apperently - * msc_cipher_mode_compl() was never meant to be used without L3 data. + * ran_conn_cipher_mode_compl() was never meant to be used without L3 data. * This needs to be discussed further! */ uint8_t alg_id = 1; @@ -407,7 +407,7 @@ static int bssmap_rx_ciph_compl(struct ran_conn *conn, struct msgb *msg, rate_ctr_inc(&msc->ctr[MSC_CTR_BSSMAP_CIPHER_MODE_COMPLETE]); /* Hand over cipher mode complete message to the MSC */ - msc_cipher_mode_compl(conn, msg, alg_id); + ran_conn_cipher_mode_compl(conn, msg, alg_id); return 0; } @@ -462,12 +462,12 @@ static int bssmap_rx_ass_fail(struct ran_conn *conn, struct msgb *msg, /* FIXME: In AoIP, the Assignment failure will carry also an optional * Codec List (BSS Supported) element. It has to be discussed if we - * can ignore this element. If not, The msc_assign_fail() function - * call has to change. However msc_assign_fail() does nothing in the + * can ignore this element. If not, The ran_conn_assign_fail() function + * call has to change. However ran_conn_assign_fail() does nothing in the * end. So probably we can just leave it as it is. Even for AoIP */ /* Inform the MSC about the assignment failure event */ - msc_assign_fail(conn, cause, rr_cause_ptr); + ran_conn_assign_fail(conn, cause, rr_cause_ptr); return 0; } @@ -494,7 +494,7 @@ static int bssmap_rx_sapi_n_rej(struct ran_conn *conn, struct msgb *msg, dlci = TLVP_VAL(tp, GSM0808_IE_DLCI)[0]; /* Inform the MSC about the sapi "n" reject event */ - msc_sapi_n_reject(conn, dlci); + ran_conn_sapi_n_reject(conn, dlci); return 0; } @@ -582,7 +582,7 @@ static int bssmap_rx_ass_compl(struct ran_conn *conn, struct msgb *msg, /* FIXME: Seems to be related to authentication or, encryption. Is this really in the right place? */ - msc_rx_sec_mode_compl(conn); + ran_conn_rx_sec_mode_compl(conn); return 0; } @@ -670,12 +670,12 @@ static int rx_dtap(const struct osmo_sccp_user *scu, const struct a_conn_info *a LOGPCONN(conn, LOGL_DEBUG, "Rx DTAP %s\n", msgb_hexdump_l2(msg)); - /* msc_dtap expects the dtap payload in l3h */ + /* ran_conn_dtap expects the dtap payload in l3h */ msg->l3h = msg->l2h + 3; OMSC_LINKID_CB(msg) = dtap->link_id; /* Forward dtap payload into the msc */ - msc_dtap(conn, msg); + ran_conn_dtap(conn, msg); return 0; } diff --git a/src/libmsc/gsm_04_08.c b/src/libmsc/gsm_04_08.c index 407144e9b..97a632b64 100644 --- a/src/libmsc/gsm_04_08.c +++ b/src/libmsc/gsm_04_08.c @@ -687,7 +687,7 @@ accept_reuse: if (!conn->received_cm_service_request) { conn->received_cm_service_request = true; - ran_conn_get(conn, MSC_CONN_USE_CM_SERVICE); + ran_conn_get(conn, RAN_CONN_USE_CM_SERVICE); } ran_conn_update_id(conn, conn->complete_layer3_type, mi_string); return conn->network->vlr->ops.tx_cm_serv_acc(conn); @@ -1332,7 +1332,7 @@ void cm_service_request_concludes(struct ran_conn *conn, gsm48_pdisc_msgtype_name(pdisc, msg_type)); } conn->received_cm_service_request = false; - ran_conn_put(conn, MSC_CONN_USE_CM_SERVICE); + ran_conn_put(conn, RAN_CONN_USE_CM_SERVICE); } /* TS 24.007 11.2.3.2.3 Message Type Octet / Duplicate Detection */ @@ -1584,7 +1584,7 @@ static int msc_vlr_tx_cm_serv_rej(void *msc_conn_ref, enum gsm48_reject_value ca if (conn->received_cm_service_request) { conn->received_cm_service_request = false; - ran_conn_put(conn, MSC_CONN_USE_CM_SERVICE); + ran_conn_put(conn, RAN_CONN_USE_CM_SERVICE); } return rc; @@ -1594,7 +1594,7 @@ static int msc_vlr_tx_cm_serv_rej(void *msc_conn_ref, enum gsm48_reject_value ca osmo_static_assert(sizeof(((struct gsm0808_encrypt_info*)0)->key) >= sizeof(((struct osmo_auth_vector*)0)->kc), gsm0808_encrypt_info_key_fits_osmo_auth_vec_kc); -int msc_geran_set_cipher_mode(struct ran_conn *conn, bool umts_aka, bool retrieve_imeisv) +int ran_conn_geran_set_cipher_mode(struct ran_conn *conn, bool umts_aka, bool retrieve_imeisv) { struct gsm_network *net = conn->network; struct gsm0808_encrypt_info ei; @@ -1640,7 +1640,7 @@ int msc_geran_set_cipher_mode(struct ran_conn *conn, bool umts_aka, bool retriev vlr_subscr_name(conn->vsub), request_classmark_for_a5_n, request_classmark); - return msc_classmark_request_then_cipher_mode_cmd(conn, umts_aka, retrieve_imeisv); + return ran_conn_classmark_request_then_cipher_mode_cmd(conn, umts_aka, retrieve_imeisv); } if (ei.perm_algo_len == 0) { @@ -1701,7 +1701,7 @@ int msc_vlr_set_ciph_mode(void *msc_conn_ref, switch (conn->via_ran) { case RAN_GERAN_A: - return msc_geran_set_cipher_mode(conn, umts_aka, retrieve_imeisv); + return ran_conn_geran_set_cipher_mode(conn, umts_aka, retrieve_imeisv); case RAN_UTRAN_IU: #ifdef BUILD_IU @@ -1723,7 +1723,7 @@ int msc_vlr_set_ciph_mode(void *msc_conn_ref, return -ENOTSUP; } -void msc_rx_sec_mode_compl(struct ran_conn *conn) +void ran_conn_rx_sec_mode_compl(struct ran_conn *conn) { struct vlr_ciph_result vlr_res = {}; diff --git a/src/libmsc/gsm_04_08_cc.c b/src/libmsc/gsm_04_08_cc.c index 516fc511d..8ac87c115 100644 --- a/src/libmsc/gsm_04_08_cc.c +++ b/src/libmsc/gsm_04_08_cc.c @@ -322,7 +322,7 @@ static int setup_trig_pag_evt(unsigned int hooknum, unsigned int event, vlr_subscr_msisdn_or_name(transt->vsub)); OSMO_ASSERT(conn); /* Assign conn */ - transt->conn = ran_conn_get(conn, MSC_CONN_USE_TRANS_CC); + transt->conn = ran_conn_get(conn, RAN_CONN_USE_TRANS_CC); transt->paging_request = NULL; /* send SETUP request to called party */ gsm48_cc_tx_setup(transt, &transt->cc.msg); @@ -2005,7 +2005,7 @@ int mncc_tx_to_cc(struct gsm_network *net, int msg_type, void *arg) } /* Assign conn */ - trans->conn = ran_conn_get(conn, MSC_CONN_USE_TRANS_CC); + trans->conn = ran_conn_get(conn, RAN_CONN_USE_TRANS_CC); trans->dlci = 0x00; /* SAPI=0, not SACCH */ vlr_subscr_put(vsub); } else { @@ -2160,7 +2160,7 @@ int gsm0408_rcv_cc(struct ran_conn *conn, struct msgb *msg) return -ENOMEM; } /* Assign transaction */ - trans->conn = ran_conn_get(conn, MSC_CONN_USE_TRANS_CC); + trans->conn = ran_conn_get(conn, RAN_CONN_USE_TRANS_CC); trans->dlci = OMSC_LINKID_CB(msg); /* DLCI as received from BSC */ cm_service_request_concludes(conn, msg); } diff --git a/src/libmsc/gsm_04_11.c b/src/libmsc/gsm_04_11.c index d214f2e86..d01244392 100644 --- a/src/libmsc/gsm_04_11.c +++ b/src/libmsc/gsm_04_11.c @@ -148,7 +148,7 @@ static int paging_cb_mmsms_est_req(unsigned int hooknum, unsigned int event, switch (event) { case GSM_PAGING_SUCCEEDED: /* Associate transaction with established connection */ - trans->conn = ran_conn_get(conn, MSC_CONN_USE_TRANS_SMS); + trans->conn = ran_conn_get(conn, RAN_CONN_USE_TRANS_SMS); /* Confirm successful connection establishment */ gsm411_smc_recv(&trans->sms.smc_inst, GSM411_MMSMS_EST_CNF, NULL, 0); @@ -1010,7 +1010,7 @@ static struct gsm_trans *gsm411_alloc_mt_trans(struct gsm_network *net, conn = connection_for_subscr(vsub); if (conn) { /* Associate transaction with connection */ - trans->conn = ran_conn_get(conn, MSC_CONN_USE_TRANS_SMS); + trans->conn = ran_conn_get(conn, RAN_CONN_USE_TRANS_SMS); /* Generate unique RP Message Reference */ trans->sms.sm_rp_mr = conn->next_rp_ref++; } @@ -1140,7 +1140,7 @@ int gsm0411_rcv_sms(struct ran_conn *conn, gsm411_smr_init(&trans->sms.smr_inst, 0, 1, gsm411_rl_recv, gsm411_mn_send); - trans->conn = ran_conn_get(conn, MSC_CONN_USE_TRANS_SMS); + trans->conn = ran_conn_get(conn, RAN_CONN_USE_TRANS_SMS); trans->dlci = OMSC_LINKID_CB(msg); /* DLCI as received from BSC */ new_trans = 1; diff --git a/src/libmsc/gsm_09_11.c b/src/libmsc/gsm_09_11.c index e1ea6817a..c0a0bddf0 100644 --- a/src/libmsc/gsm_09_11.c +++ b/src/libmsc/gsm_09_11.c @@ -113,7 +113,7 @@ int gsm0911_rcv_nc_ss(struct ran_conn *conn, struct msgb *msg) /* Count active NC SS/USSD sessions */ osmo_counter_inc(conn->network->active_nc_ss); - trans->conn = ran_conn_get(conn, MSC_CONN_USE_TRANS_NC_SS); + trans->conn = ran_conn_get(conn, RAN_CONN_USE_TRANS_NC_SS); trans->dlci = OMSC_LINKID_CB(msg); cm_service_request_concludes(conn, msg); } @@ -232,7 +232,7 @@ static int handle_paging_event(unsigned int hooknum, unsigned int event, vlr_subscr_msisdn_or_name(transt->vsub)); /* Assign connection */ - transt->conn = ran_conn_get(conn, MSC_CONN_USE_TRANS_NC_SS); + transt->conn = ran_conn_get(conn, RAN_CONN_USE_TRANS_NC_SS); transt->paging_request = NULL; /* Send stored message */ @@ -324,7 +324,7 @@ static struct gsm_trans *establish_nc_ss_trans(struct gsm_network *net, conn = connection_for_subscr(vsub); if (conn) { /* Assign connection */ - trans->conn = ran_conn_get(conn, MSC_CONN_USE_TRANS_NC_SS); + trans->conn = ran_conn_get(conn, RAN_CONN_USE_TRANS_NC_SS); trans->dlci = 0x00; /* SAPI=0, not SACCH */ return trans; } diff --git a/src/libmsc/iucs.c b/src/libmsc/iucs.c index f9ed75985..1e4ab1958 100644 --- a/src/libmsc/iucs.c +++ b/src/libmsc/iucs.c @@ -172,7 +172,7 @@ int gsm0408_rcvmsg_iucs(struct gsm_network *network, struct msgb *msg, uint8_t pdisc = gh->proto_discr & 0x0f; OSMO_ASSERT(pdisc != GSM48_PDISC_RR); - msc_dtap(conn, msg); + ran_conn_dtap(conn, msg); } else { /* allocate a new connection */ @@ -189,7 +189,7 @@ int gsm0408_rcvmsg_iucs(struct gsm_network *network, struct msgb *msg, abort(); /* ownership of conn hereby goes to the MSC: */ - msc_compl_l3(conn, msg, 0); + ran_conn_compl_l3(conn, msg, 0); } return 0; diff --git a/src/libmsc/iucs_ranap.c b/src/libmsc/iucs_ranap.c index 735808060..a6578575b 100644 --- a/src/libmsc/iucs_ranap.c +++ b/src/libmsc/iucs_ranap.c @@ -96,7 +96,7 @@ int iucs_rx_sec_mode_compl(struct ran_conn *conn, /* TODO evalute ies */ - msc_rx_sec_mode_compl(conn); + ran_conn_rx_sec_mode_compl(conn); return 0; } diff --git a/src/libmsc/osmo_msc.c b/src/libmsc/osmo_msc.c index f2fe85cb0..45dfd73f1 100644 --- a/src/libmsc/osmo_msc.c +++ b/src/libmsc/osmo_msc.c @@ -79,7 +79,7 @@ struct gsm_network *gsm_network_init(void *ctx, mncc_recv_cb_t mncc_recv) } /* Receive a SAPI-N-REJECT from BSC */ -void msc_sapi_n_reject(struct ran_conn *conn, int dlci) +void ran_conn_sapi_n_reject(struct ran_conn *conn, int dlci) { int sapi = dlci & 0x7; @@ -90,21 +90,21 @@ void msc_sapi_n_reject(struct ran_conn *conn, int dlci) /* receive a Level 3 Complete message. * Ownership of the conn is completely passed to the conn FSM, i.e. for both acceptance and rejection, * the conn FSM shall decide when to release this conn. It may already be discarded before this exits. */ -void msc_compl_l3(struct ran_conn *conn, - struct msgb *msg, uint16_t chosen_channel) +void ran_conn_compl_l3(struct ran_conn *conn, + struct msgb *msg, uint16_t chosen_channel) { - ran_conn_get(conn, MSC_CONN_USE_COMPL_L3); + ran_conn_get(conn, RAN_CONN_USE_COMPL_L3); gsm0408_dispatch(conn, msg); - ran_conn_put(conn, MSC_CONN_USE_COMPL_L3); + ran_conn_put(conn, RAN_CONN_USE_COMPL_L3); } /* Receive a DTAP message from BSC */ -void msc_dtap(struct ran_conn *conn, struct msgb *msg) +void ran_conn_dtap(struct ran_conn *conn, struct msgb *msg) { - ran_conn_get(conn, MSC_CONN_USE_DTAP); + ran_conn_get(conn, RAN_CONN_USE_DTAP); gsm0408_dispatch(conn, msg); - ran_conn_put(conn, MSC_CONN_USE_DTAP); + ran_conn_put(conn, RAN_CONN_USE_DTAP); } /* Receive an ASSIGNMENT COMPLETE from BSC */ @@ -116,16 +116,15 @@ void msc_assign_compl(struct ran_conn *conn, } /* Receive an ASSIGNMENT FAILURE from BSC */ -void msc_assign_fail(struct ran_conn *conn, - uint8_t cause, uint8_t *rr_cause) +void ran_conn_assign_fail(struct ran_conn *conn, uint8_t cause, uint8_t *rr_cause) { LOGP(DRR, LOGL_DEBUG, "MSC assign failure (do nothing).\n"); } /* Receive a CLASSMARK CHANGE from BSC */ -void msc_classmark_chg(struct ran_conn *conn, - const uint8_t *cm2, uint8_t cm2_len, - const uint8_t *cm3, uint8_t cm3_len) +void ran_conn_classmark_chg(struct ran_conn *conn, + const uint8_t *cm2, uint8_t cm2_len, + const uint8_t *cm3, uint8_t cm3_len) { struct gsm_classmark *cm; @@ -159,8 +158,7 @@ void msc_classmark_chg(struct ran_conn *conn, } /* Receive a CIPHERING MODE COMPLETE from BSC */ -void msc_cipher_mode_compl(struct ran_conn *conn, - struct msgb *msg, uint8_t alg_id) +void ran_conn_cipher_mode_compl(struct ran_conn *conn, struct msgb *msg, uint8_t alg_id) { struct vlr_ciph_result ciph_res = { .cause = VLR_CIPH_REJECT }; @@ -207,7 +205,7 @@ void msc_cipher_mode_compl(struct ran_conn *conn, } /* Receive a CLEAR REQUEST from BSC */ -int msc_clear_request(struct ran_conn *conn, uint32_t cause) +int ran_conn_clear_request(struct ran_conn *conn, uint32_t cause) { ran_conn_close(conn, cause); return 1; @@ -250,7 +248,7 @@ struct ran_conn *_ran_conn_get(struct ran_conn *conn, enum ran_conn_use balance_ { OSMO_ASSERT(conn); - if (balance_token != MSC_CONN_USE_UNTRACKED) { + if (balance_token != RAN_CONN_USE_UNTRACKED) { uint32_t flag = 1 << balance_token; OSMO_ASSERT(balance_token < 32); if (conn->use_tokens & flag) @@ -271,13 +269,12 @@ struct ran_conn *_ran_conn_get(struct ran_conn *conn, enum ran_conn_use balance_ } /* decrement the ref-count. Once it reaches zero, we release */ -void _ran_conn_put(struct ran_conn *conn, - enum ran_conn_use balance_token, - const char *file, int line) +void _ran_conn_put(struct ran_conn *conn, enum ran_conn_use balance_token, + const char *file, int line) { OSMO_ASSERT(conn); - if (balance_token != MSC_CONN_USE_UNTRACKED) { + if (balance_token != RAN_CONN_USE_UNTRACKED) { uint32_t flag = 1 << balance_token; OSMO_ASSERT(balance_token < 32); if (!(conn->use_tokens & flag)) @@ -312,16 +309,16 @@ bool ran_conn_used_by(struct ran_conn *conn, enum ran_conn_use token) } const struct value_string ran_conn_use_names[] = { - {MSC_CONN_USE_UNTRACKED, "UNTRACKED"}, - {MSC_CONN_USE_COMPL_L3, "compl_l3"}, - {MSC_CONN_USE_DTAP, "dtap"}, - {MSC_CONN_USE_AUTH_CIPH, "auth+ciph"}, - {MSC_CONN_USE_CM_SERVICE, "cm_service"}, - {MSC_CONN_USE_TRANS_CC, "trans_cc"}, - {MSC_CONN_USE_TRANS_SMS, "trans_sms"}, - {MSC_CONN_USE_TRANS_NC_SS, "trans_nc_ss"}, - {MSC_CONN_USE_SILENT_CALL, "silent_call"}, - {MSC_CONN_USE_RELEASE, "release"}, + {RAN_CONN_USE_UNTRACKED, "UNTRACKED"}, + {RAN_CONN_USE_COMPL_L3, "compl_l3"}, + {RAN_CONN_USE_DTAP, "dtap"}, + {RAN_CONN_USE_AUTH_CIPH, "auth+ciph"}, + {RAN_CONN_USE_CM_SERVICE, "cm_service"}, + {RAN_CONN_USE_TRANS_CC, "trans_cc"}, + {RAN_CONN_USE_TRANS_SMS, "trans_sms"}, + {RAN_CONN_USE_TRANS_NC_SS, "trans_nc_ss"}, + {RAN_CONN_USE_SILENT_CALL, "silent_call"}, + {RAN_CONN_USE_RELEASE, "release"}, {0, NULL}, }; diff --git a/src/libmsc/silent_call.c b/src/libmsc/silent_call.c index 6c6e217d2..c6c31a09e 100644 --- a/src/libmsc/silent_call.c +++ b/src/libmsc/silent_call.c @@ -57,7 +57,7 @@ static int paging_cb_silent(unsigned int hooknum, unsigned int event, conn->lchan->ts->nr, conn->lchan->ts->trx->arfcn); #endif conn->silent_call = 1; - ran_conn_get(conn, MSC_CONN_USE_SILENT_CALL); + ran_conn_get(conn, RAN_CONN_USE_SILENT_CALL); /* increment lchan reference count */ osmo_signal_dispatch(SS_SCALL, S_SCALL_SUCCESS, &sigdata); break; @@ -162,7 +162,7 @@ int gsm_silent_call_stop(struct vlr_subscr *vsub) #endif conn->silent_call = 0; - ran_conn_put(conn, MSC_CONN_USE_SILENT_CALL); + ran_conn_put(conn, RAN_CONN_USE_SILENT_CALL); return 0; } diff --git a/src/libmsc/subscr_conn.c b/src/libmsc/subscr_conn.c index b1c8bc9e9..5fab1c673 100644 --- a/src/libmsc/subscr_conn.c +++ b/src/libmsc/subscr_conn.c @@ -94,7 +94,7 @@ static void evaluate_acceptance_outcome(struct osmo_fsm_inst *fi, bool conn_acce if (conn->complete_layer3_type == COMPLETE_LAYER3_CM_SERVICE_REQ && conn_accepted) { conn->received_cm_service_request = true; - ran_conn_get(conn, MSC_CONN_USE_CM_SERVICE); + ran_conn_get(conn, RAN_CONN_USE_CM_SERVICE); } if (conn_accepted) @@ -163,7 +163,7 @@ static void ran_conn_fsm_auth_ciph(struct osmo_fsm_inst *fi, uint32_t event, voi } } -int msc_classmark_request_then_cipher_mode_cmd(struct ran_conn *conn, bool umts_aka, +int ran_conn_classmark_request_then_cipher_mode_cmd(struct ran_conn *conn, bool umts_aka, bool retrieve_imeisv) { int rc; @@ -190,14 +190,14 @@ static void ran_conn_fsm_wait_classmark_update(struct osmo_fsm_inst *fi, uint32_ * So far though, the only time we send a Classmark Request is during Ciphering. As soon * as more such situations arise, we need to add state to indicate what action should * follow after a Classmark Update is received (e.g. - * msc_classmark_request_then_cipher_mode_cmd() sets an enum value to indicate that + * ran_conn_classmark_request_then_cipher_mode_cmd() sets an enum value to indicate that * Ciphering should continue afterwards). But right now, it is accurate to always * continue with Ciphering: */ /* During Ciphering, we needed Classmark information. The Classmark Update has come in, * go back into the Set Ciphering Command procedure. */ osmo_fsm_inst_state_chg(fi, RAN_CONN_S_AUTH_CIPH, RAN_CONN_TIMEOUT, 0); - if (msc_geran_set_cipher_mode(conn, conn->geran_set_cipher_mode.umts_aka, + if (ran_conn_geran_set_cipher_mode(conn, conn->geran_set_cipher_mode.umts_aka, conn->geran_set_cipher_mode.retrieve_imeisv)) { LOGPFSML(fi, LOGL_ERROR, "Sending Cipher Mode Command failed, aborting attach\n"); @@ -341,13 +341,13 @@ static void ran_conn_fsm_releasing_onenter(struct osmo_fsm_inst *fi, uint32_t pr /* Use count for either conn->a.waiting_for_clear_complete or * conn->iu.waiting_for_release_complete. 'get' it early, so we don't deallocate after tearing * down active transactions. Safeguard against double-get (though it shouldn't happen). */ - if (!ran_conn_used_by(conn, MSC_CONN_USE_RELEASE)) - ran_conn_get(conn, MSC_CONN_USE_RELEASE); + if (!ran_conn_used_by(conn, RAN_CONN_USE_RELEASE)) + ran_conn_get(conn, RAN_CONN_USE_RELEASE); /* Cancel pending CM Service Requests */ if (conn->received_cm_service_request) { conn->received_cm_service_request = false; - ran_conn_put(conn, MSC_CONN_USE_CM_SERVICE); + ran_conn_put(conn, RAN_CONN_USE_CM_SERVICE); } /* Cancel all VLR FSMs, if any */ @@ -693,7 +693,7 @@ static void rx_close_complete(struct ran_conn *conn, const char *label, bool *fl } if (*flag) { *flag = false; - ran_conn_put(conn, MSC_CONN_USE_RELEASE); + ran_conn_put(conn, RAN_CONN_USE_RELEASE); } } diff --git a/src/libmsc/transaction.c b/src/libmsc/transaction.c index 5c80e5f3c..cf1206637 100644 --- a/src/libmsc/transaction.c +++ b/src/libmsc/transaction.c @@ -140,21 +140,21 @@ struct gsm_trans *trans_alloc(struct gsm_network *net, */ void trans_free(struct gsm_trans *trans) { - enum ran_conn_use conn_usage_token = MSC_CONN_USE_UNTRACKED; + enum ran_conn_use conn_usage_token = RAN_CONN_USE_UNTRACKED; struct ran_conn *conn; switch (trans->protocol) { case GSM48_PDISC_CC: _gsm48_cc_trans_free(trans); - conn_usage_token = MSC_CONN_USE_TRANS_CC; + conn_usage_token = RAN_CONN_USE_TRANS_CC; break; case GSM48_PDISC_SMS: _gsm411_sms_trans_free(trans); - conn_usage_token = MSC_CONN_USE_TRANS_SMS; + conn_usage_token = RAN_CONN_USE_TRANS_SMS; break; case GSM48_PDISC_NC_SS: _gsm911_nc_ss_trans_free(trans); - conn_usage_token = MSC_CONN_USE_TRANS_NC_SS; + conn_usage_token = RAN_CONN_USE_TRANS_NC_SS; break; } -- cgit v1.2.3