rename gsm_subscriber_connection to ran_conn
In preparation for inter-BSC and inter-MSC handover, we need to separate the
subscriber management logic from the actual RAN connections. What better time
to finally rename gsm_subscriber_connection.
* Name choice:
In 2G, this is a connection to the BSS, but even though 3GPP TS commonly talk
of "BSS-A" and "BSS-B" when explaining handover, it's not good to call it
"bss_conn": in 3G a BSS is called RNS, IIUC.
The overall term for 2G (GERAN) and 3G (UTRAN) is RAN: Radio Access Network.
* Rationale:
A subscriber in the MSC so far has only one RAN connection, but e.g. for
inter-BSC handover, a second one needs to be created to handover to. Most of
the items in the former gsm_subscriber_connection are actually related to the
RAN, with only a few MM and RTP related items. So, as a first step, just rename
it to ran_conn, to cosmetically prepare for moving the not strictly RAN related
items away later.
Also:
- Rename some functions from msc_subscr_conn_* to ran_conn_*
- Rename "Subscr_Conn" FSM instance name to "RAN_conn"
- Rename SUBSCR_CONN_* to RAN_CONN_*
Change-Id: Ic595f7a558d3553c067f77dc67543ab59659707a
diff --git a/src/libmsc/a_iface.c b/src/libmsc/a_iface.c
index bd9b890..fa0cb5f 100644
--- a/src/libmsc/a_iface.c
+++ b/src/libmsc/a_iface.c
@@ -142,12 +142,12 @@
/* Send DTAP message via A-interface, take ownership of msg */
int a_iface_tx_dtap(struct msgb *msg)
{
- struct gsm_subscriber_connection *conn;
+ struct ran_conn *conn;
struct msgb *msg_resp;
uint8_t link_id = OMSC_LINKID_CB(msg);
OSMO_ASSERT(msg);
- conn = (struct gsm_subscriber_connection *)msg->dst;
+ conn = (struct ran_conn *)msg->dst;
OSMO_ASSERT(conn);
OSMO_ASSERT(conn->a.scu);
@@ -171,7 +171,7 @@
}
/* Send Cipher mode command via A-interface */
-int a_iface_tx_cipher_mode(const struct gsm_subscriber_connection *conn,
+int a_iface_tx_cipher_mode(const struct ran_conn *conn,
struct gsm0808_encrypt_info *ei, int include_imeisv)
{
/* TODO generalize for A- and Iu interfaces, don't name after 08.08 */
@@ -358,7 +358,7 @@
/* Send assignment request via A-interface */
int a_iface_tx_assignment(const struct gsm_trans *trans)
{
- struct gsm_subscriber_connection *conn;
+ struct ran_conn *conn;
struct gsm0808_channel_type ct;
struct gsm0808_speech_codec_list scl;
uint32_t *ci_ptr = NULL;
@@ -412,7 +412,7 @@
}
/* Send clear command via A-interface */
-int a_iface_tx_clear_cmd(struct gsm_subscriber_connection *conn)
+int a_iface_tx_clear_cmd(struct ran_conn *conn)
{
struct msgb *msg;
@@ -422,7 +422,7 @@
return osmo_sccp_tx_data_msg(conn->a.scu, conn->a.conn_id, msg);
}
-int a_iface_tx_classmark_request(const struct gsm_subscriber_connection *conn)
+int a_iface_tx_classmark_request(const struct ran_conn *conn)
{
struct msgb *msg;
@@ -443,7 +443,7 @@
if (!gsm_network)
return;
- /* Clear all now orphaned subscriber connections */
+ /* Clear all now orphaned RAN connections */
a_clear_all(bsc_ctx->sccp_user, &bsc_ctx->bsc_addr);
/* Send reset to the remote BSC */
@@ -612,22 +612,22 @@
return rc;
}
-/* Clear all subscriber connections on a specified BSC */
+/* Clear all RAN connections on a specified BSC */
void a_clear_all(struct osmo_sccp_user *scu, const struct osmo_sccp_addr *bsc_addr)
{
- struct gsm_subscriber_connection *conn;
- struct gsm_subscriber_connection *conn_temp;
+ struct ran_conn *conn;
+ struct ran_conn *conn_temp;
struct gsm_network *network = gsm_network;
OSMO_ASSERT(scu);
OSMO_ASSERT(bsc_addr);
- llist_for_each_entry_safe(conn, conn_temp, &network->subscr_conns, entry) {
+ llist_for_each_entry_safe(conn, conn_temp, &network->ran_conns, entry) {
/* Clear only A connections and connections that actually
* belong to the specified BSC */
if (conn->via_ran == RAN_GERAN_A && memcmp(bsc_addr, &conn->a.bsc_addr, sizeof(conn->a.bsc_addr)) == 0) {
uint32_t conn_id = conn->a.conn_id;
- LOGPCONN(conn, LOGL_NOTICE, "Dropping orphaned subscriber connection\n");
+ 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);