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
This commit is contained in:
Neels Hofmeyr 2018-11-30 01:08:36 +01:00
parent c036b79918
commit 3c20a5ee74
15 changed files with 104 additions and 109 deletions

View File

@ -50,22 +50,20 @@ void ran_conn_complete_layer_3(struct ran_conn *conn);
int msc_vlr_alloc(struct gsm_network *net);
int msc_vlr_start(struct gsm_network *net);
void msc_sapi_n_reject(struct ran_conn *conn, int dlci);
int msc_clear_request(struct ran_conn *conn, uint32_t cause);
void msc_compl_l3(struct ran_conn *conn,
struct msgb *msg, uint16_t chosen_channel);
void msc_dtap(struct ran_conn *conn, struct msgb *msg);
int msc_classmark_request_then_cipher_mode_cmd(struct ran_conn *conn, bool umts_aka,
bool retrieve_imeisv);
int msc_geran_set_cipher_mode(struct ran_conn *conn, bool umts_aka, bool retrieve_imeisv);
void msc_cipher_mode_compl(struct ran_conn *conn,
struct msgb *msg, uint8_t alg_id);
void msc_rx_sec_mode_compl(struct ran_conn *conn);
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 msc_assign_fail(struct ran_conn *conn,
uint8_t cause, uint8_t *rr_cause);
void ran_conn_sapi_n_reject(struct ran_conn *conn, int dlci);
int ran_conn_clear_request(struct ran_conn *conn, uint32_t cause);
void ran_conn_compl_l3(struct ran_conn *conn,
struct msgb *msg, uint16_t chosen_channel);
void ran_conn_dtap(struct ran_conn *conn, struct msgb *msg);
int ran_conn_classmark_request_then_cipher_mode_cmd(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);
void ran_conn_cipher_mode_compl(struct ran_conn *conn, struct msgb *msg, uint8_t alg_id);
void ran_conn_rx_sec_mode_compl(struct ran_conn *conn);
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);
void ran_conn_assign_fail(struct ran_conn *conn, uint8_t cause, uint8_t *rr_cause);
void ran_conn_init(void);
bool ran_conn_is_accepted(const struct ran_conn *conn);
@ -79,16 +77,16 @@ void ran_conn_rx_bssmap_clear_complete(struct ran_conn *conn);
void ran_conn_rx_iu_release_complete(struct ran_conn *conn);
enum ran_conn_use {
MSC_CONN_USE_UNTRACKED = -1,
MSC_CONN_USE_COMPL_L3,
MSC_CONN_USE_DTAP,
MSC_CONN_USE_AUTH_CIPH,
MSC_CONN_USE_CM_SERVICE,
MSC_CONN_USE_TRANS_CC,
MSC_CONN_USE_TRANS_SMS,
MSC_CONN_USE_TRANS_NC_SS,
MSC_CONN_USE_SILENT_CALL,
MSC_CONN_USE_RELEASE,
RAN_CONN_USE_UNTRACKED = -1,
RAN_CONN_USE_COMPL_L3,
RAN_CONN_USE_DTAP,
RAN_CONN_USE_AUTH_CIPH,
RAN_CONN_USE_CM_SERVICE,
RAN_CONN_USE_TRANS_CC,
RAN_CONN_USE_TRANS_SMS,
RAN_CONN_USE_TRANS_NC_SS,
RAN_CONN_USE_SILENT_CALL,
RAN_CONN_USE_RELEASE,
};
extern const struct value_string ran_conn_use_names[];

View File

@ -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)) {

View File

@ -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;
}

View File

@ -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 = {};

View File

@ -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);
}

View File

@ -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;

View File

@ -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;
}

View File

@ -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;

View File

@ -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;
}

View File

@ -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},
};

View File

@ -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;
}

View File

@ -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);
}
}

View File

@ -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;
}

View File

@ -404,7 +404,7 @@ static void test_call_mt2()
cc_to_mncc_expect_tx("", MNCC_REL_CNF);
dtap_expect_tx("032d"); /* CC: Release */
expect_iu_release();
msc_clear_request(g_conn, 0);
ran_conn_clear_request(g_conn, 0);
OSMO_ASSERT(cc_to_mncc_tx_confirmed);
OSMO_ASSERT(iu_release_sent);

View File

@ -186,7 +186,7 @@ void conn_conclude_cm_service_req(struct ran_conn *conn,
OSMO_ASSERT(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);
ASSERT_RELEASE_CLEAR(via_ran);
}
@ -225,14 +225,14 @@ void rx_from_ms(struct msgb *msg)
g_conn = conn_new();
reset_l3_seq_nr();
patch_l3_seq_nr(msg);
msc_compl_l3(g_conn, msg, 23);
ran_conn_compl_l3(g_conn, msg, 23);
} else {
patch_l3_seq_nr(msg);
if ((gsm48_hdr_pdisc(gh) == GSM48_PDISC_RR)
&& (gsm48_hdr_msg_type(gh) == GSM48_MT_RR_CIPH_M_COMPL))
msc_cipher_mode_compl(g_conn, msg, 0);
ran_conn_cipher_mode_compl(g_conn, msg, 0);
else
msc_dtap(g_conn, msg);
ran_conn_dtap(g_conn, msg);
}
if (!conn_exists(g_conn))
@ -842,7 +842,7 @@ void ms_sends_security_mode_complete()
OSMO_ASSERT(g_conn);
OSMO_ASSERT(g_conn->via_ran == RAN_UTRAN_IU);
OSMO_ASSERT(g_conn->iu.ue_ctx);
msc_rx_sec_mode_compl(g_conn);
ran_conn_rx_sec_mode_compl(g_conn);
}
void bss_sends_clear_complete()