Change in osmo-msc[master]: rename gsm_subscriber_connection to ran_conn

Neels Hofmeyr gerrit-no-reply at lists.osmocom.org
Thu Nov 29 22:05:36 UTC 2018


Neels Hofmeyr has uploaded this change for review. ( https://gerrit.osmocom.org/12015


Change subject: rename gsm_subscriber_connection to ran_conn
......................................................................

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.

Change-Id: Ic595f7a558d3553c067f77dc67543ab59659707a
---
M include/osmocom/msc/a_iface.h
M include/osmocom/msc/gsm_04_08.h
M include/osmocom/msc/gsm_04_11.h
M include/osmocom/msc/gsm_04_14.h
M include/osmocom/msc/gsm_04_80.h
M include/osmocom/msc/gsm_09_11.h
M include/osmocom/msc/gsm_data.h
M include/osmocom/msc/gsm_subscriber.h
M include/osmocom/msc/iucs.h
M include/osmocom/msc/msc_ifaces.h
M include/osmocom/msc/msc_mgcp.h
M include/osmocom/msc/osmo_msc.h
M include/osmocom/msc/signal.h
M include/osmocom/msc/silent_call.h
M include/osmocom/msc/transaction.h
M src/libmsc/a_iface.c
M src/libmsc/a_iface_bssap.c
M src/libmsc/gsm_04_08.c
M src/libmsc/gsm_04_08_cc.c
M src/libmsc/gsm_04_11.c
M src/libmsc/gsm_04_14.c
M src/libmsc/gsm_04_80.c
M src/libmsc/gsm_09_11.c
M src/libmsc/gsm_subscriber.c
M src/libmsc/iucs.c
M src/libmsc/iucs_ranap.c
M src/libmsc/msc_ifaces.c
M src/libmsc/msc_mgcp.c
M src/libmsc/msc_vty.c
M src/libmsc/osmo_msc.c
M src/libmsc/rrlp.c
M src/libmsc/silent_call.c
M src/libmsc/smpp_openbsc.c
M src/libmsc/smpp_smsc.h
M src/libmsc/subscr_conn.c
M src/libmsc/transaction.c
M tests/msc_vlr/msc_vlr_test_reject_concurrency.c
M tests/msc_vlr/msc_vlr_tests.c
M tests/msc_vlr/msc_vlr_tests.h
39 files changed, 285 insertions(+), 285 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/15/12015/1

diff --git a/include/osmocom/msc/a_iface.h b/include/osmocom/msc/a_iface.h
index 9a758d3..f66324e 100644
--- a/include/osmocom/msc/a_iface.h
+++ b/include/osmocom/msc/a_iface.h
@@ -66,7 +66,7 @@
 int a_iface_tx_dtap(struct msgb *msg);
 
 /* 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);
 
 /* Page a subscriber via A-interface */
@@ -76,9 +76,9 @@
 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_clear_cmd(struct ran_conn *conn);
 
-int a_iface_tx_classmark_request(const struct gsm_subscriber_connection *conn);
+int a_iface_tx_classmark_request(const struct ran_conn *conn);
 
 /* Clear all subscriber connections on a specified BSC
  * (Helper function for a_iface_bssap.c) */
diff --git a/include/osmocom/msc/gsm_04_08.h b/include/osmocom/msc/gsm_04_08.h
index 8767070..b93a4b4 100644
--- a/include/osmocom/msc/gsm_04_08.h
+++ b/include/osmocom/msc/gsm_04_08.h
@@ -9,7 +9,7 @@
 struct gsm_bts;
 struct gsm_network;
 struct gsm_trans;
-struct gsm_subscriber_connection;
+struct ran_conn;
 struct amr_multirate_conf;
 struct amr_mode;
 
@@ -22,30 +22,30 @@
 				   name);
 }
 
-void cm_service_request_concludes(struct gsm_subscriber_connection *conn,
+void cm_service_request_concludes(struct ran_conn *conn,
 				  struct msgb *msg);
 
 /* config options controlling the behaviour of the lower leves */
 void gsm0408_allow_everyone(int allow);
 void gsm0408_clear_all_trans(struct gsm_network *net, int protocol);
-int gsm0408_dispatch(struct gsm_subscriber_connection *conn, struct msgb *msg);
+int gsm0408_dispatch(struct ran_conn *conn, struct msgb *msg);
 
 int gsm0408_rcvmsg(struct msgb *msg, uint8_t link_id);
 /* don't use "enum gsm_chreq_reason_t" to avoid circular dependency */
 void gsm_net_update_ctype(struct gsm_network *net);
 
-int gsm48_tx_simple(struct gsm_subscriber_connection *conn,
+int gsm48_tx_simple(struct ran_conn *conn,
 		    uint8_t pdisc, uint8_t msg_type);
-int gsm48_tx_mm_info(struct gsm_subscriber_connection *conn);
-int gsm48_tx_mm_auth_req(struct gsm_subscriber_connection *conn, uint8_t *rand,
+int gsm48_tx_mm_info(struct ran_conn *conn);
+int gsm48_tx_mm_auth_req(struct ran_conn *conn, uint8_t *rand,
 			 uint8_t *autn, int key_seq);
-int gsm48_tx_mm_auth_rej(struct gsm_subscriber_connection *conn);
-int gsm48_tx_mm_serv_ack(struct gsm_subscriber_connection *conn);
-int gsm48_tx_mm_serv_rej(struct gsm_subscriber_connection *conn,
+int gsm48_tx_mm_auth_rej(struct ran_conn *conn);
+int gsm48_tx_mm_serv_ack(struct ran_conn *conn);
+int gsm48_tx_mm_serv_rej(struct ran_conn *conn,
 				enum gsm48_reject_value value);
 int gsm48_send_rr_release(struct gsm_lchan *lchan);
 int gsm48_send_rr_ciph_mode(struct gsm_lchan *lchan, int want_imeisv);
-int gsm48_send_rr_app_info(struct gsm_subscriber_connection *conn, uint8_t apdu_id,
+int gsm48_send_rr_app_info(struct ran_conn *conn, uint8_t apdu_id,
 			   uint8_t apdu_len, const uint8_t *apdu);
 int gsm48_send_rr_ass_cmd(struct gsm_lchan *dest_lchan, struct gsm_lchan *lchan, uint8_t power_class);
 int gsm48_send_ho_cmd(struct gsm_lchan *old_lchan, struct gsm_lchan *new_lchan,
@@ -71,12 +71,12 @@
 void gsm48_lchan2chan_desc(struct gsm48_chan_desc *cd,
 			   const struct gsm_lchan *lchan);
 
-void release_security_operation(struct gsm_subscriber_connection *conn);
-void allocate_security_operation(struct gsm_subscriber_connection *conn);
+void release_security_operation(struct ran_conn *conn);
+void allocate_security_operation(struct ran_conn *conn);
 
 int gsm48_multirate_config(uint8_t *lv, const struct amr_multirate_conf *mr, const struct amr_mode *modes);
 
 int gsm48_tch_rtp_create(struct gsm_trans *trans);
-int gsm48_conn_sendmsg(struct msgb *msg, struct gsm_subscriber_connection *conn, struct gsm_trans *trans);
+int gsm48_conn_sendmsg(struct msgb *msg, struct ran_conn *conn, struct gsm_trans *trans);
 
 #endif
diff --git a/include/osmocom/msc/gsm_04_11.h b/include/osmocom/msc/gsm_04_11.h
index a368d46..95098c9 100644
--- a/include/osmocom/msc/gsm_04_11.h
+++ b/include/osmocom/msc/gsm_04_11.h
@@ -4,7 +4,7 @@
 #include <osmocom/gsm/protocol/gsm_04_11.h>
 
 struct vlr_subscr;
-struct gsm_subscriber_connection;
+struct ran_conn;
 struct gsm_trans;
 
 #define UM_SAPI_SMS 3	/* See GSM 04.05/04.06 */
@@ -30,7 +30,7 @@
 struct gsm_network;
 struct msgb;
 
-int gsm0411_rcv_sms(struct gsm_subscriber_connection *conn, struct msgb *msg);
+int gsm0411_rcv_sms(struct ran_conn *conn, struct msgb *msg);
 
 struct gsm_sms *sms_alloc(void);
 void sms_free(struct gsm_sms *sms);
@@ -41,7 +41,7 @@
 int gsm411_send_sms(struct gsm_network *net,
 		    struct vlr_subscr *vsub,
 		    struct gsm_sms *sms);
-void gsm411_sapi_n_reject(struct gsm_subscriber_connection *conn);
+void gsm411_sapi_n_reject(struct ran_conn *conn);
 
 int gsm411_send_rp_ack(struct gsm_trans *trans, uint8_t msg_ref);
 int gsm411_send_rp_error(struct gsm_trans *trans, uint8_t msg_ref,
diff --git a/include/osmocom/msc/gsm_04_14.h b/include/osmocom/msc/gsm_04_14.h
index 3cdbe04..a6bafce 100644
--- a/include/osmocom/msc/gsm_04_14.h
+++ b/include/osmocom/msc/gsm_04_14.h
@@ -2,14 +2,14 @@
 
 #include <osmocom/gsm/protocol/gsm_04_14.h>
 
-int gsm0414_tx_close_tch_loop_cmd(struct gsm_subscriber_connection *conn,
+int gsm0414_tx_close_tch_loop_cmd(struct ran_conn *conn,
 				  enum gsm414_tch_loop_mode loop_mode);
-int gsm0414_tx_open_loop_cmd(struct gsm_subscriber_connection *conn);
-int gsm0414_tx_act_emmi_cmd(struct gsm_subscriber_connection *conn);
-int gsm0414_tx_test_interface(struct gsm_subscriber_connection *conn,
+int gsm0414_tx_open_loop_cmd(struct ran_conn *conn);
+int gsm0414_tx_act_emmi_cmd(struct ran_conn *conn);
+int gsm0414_tx_test_interface(struct ran_conn *conn,
 			      uint8_t tested_devs);
-int gsm0414_tx_reset_ms_pos_store(struct gsm_subscriber_connection *conn,
+int gsm0414_tx_reset_ms_pos_store(struct ran_conn *conn,
 				  uint8_t technology);
 
-int gsm0414_rcv_test(struct gsm_subscriber_connection *conn,
+int gsm0414_rcv_test(struct ran_conn *conn,
 		     struct msgb *msg);
diff --git a/include/osmocom/msc/gsm_04_80.h b/include/osmocom/msc/gsm_04_80.h
index c448c91..29b800b 100644
--- a/include/osmocom/msc/gsm_04_80.h
+++ b/include/osmocom/msc/gsm_04_80.h
@@ -2,12 +2,12 @@
 
 #include <stdint.h>
 
-struct gsm_subscriber_connection;
+struct ran_conn;
 
-int msc_send_ussd_reject(struct gsm_subscriber_connection *conn,
+int msc_send_ussd_reject(struct ran_conn *conn,
 			     uint8_t transaction_id, int invoke_id,
 			     uint8_t problem_tag, uint8_t problem_code);
 
-int msc_send_ussd_notify(struct gsm_subscriber_connection *conn, int level,
+int msc_send_ussd_notify(struct ran_conn *conn, int level,
 			 const char *text);
-int msc_send_ussd_release_complete(struct gsm_subscriber_connection *conn);
+int msc_send_ussd_release_complete(struct ran_conn *conn);
diff --git a/include/osmocom/msc/gsm_09_11.h b/include/osmocom/msc/gsm_09_11.h
index 5e689fb..8fbe41b 100644
--- a/include/osmocom/msc/gsm_09_11.h
+++ b/include/osmocom/msc/gsm_09_11.h
@@ -3,5 +3,5 @@
 #include <osmocom/core/msgb.h>
 #include <osmocom/gsm/gsup.h>
 
-int gsm0911_rcv_nc_ss(struct gsm_subscriber_connection *conn, struct msgb *msg);
+int gsm0911_rcv_nc_ss(struct ran_conn *conn, struct msgb *msg);
 int gsm0911_gsup_handler(struct vlr_subscr *vsub, struct osmo_gsup_message *gsup);
diff --git a/include/osmocom/msc/gsm_data.h b/include/osmocom/msc/gsm_data.h
index 94a6ffd..5c167e1 100644
--- a/include/osmocom/msc/gsm_data.h
+++ b/include/osmocom/msc/gsm_data.h
@@ -90,7 +90,7 @@
 }
 
 /* active radio connection of a mobile subscriber */
-struct gsm_subscriber_connection {
+struct ran_conn {
 	/* global linked list of subscriber_connections */
 	struct llist_head entry;
 
diff --git a/include/osmocom/msc/gsm_subscriber.h b/include/osmocom/msc/gsm_subscriber.h
index 01d9c58..ec2d3a4 100644
--- a/include/osmocom/msc/gsm_subscriber.h
+++ b/include/osmocom/msc/gsm_subscriber.h
@@ -58,13 +58,13 @@
 
 void subscr_remove_request(struct subscr_request *req);
 int subscr_rx_paging_response(struct msgb *msg,
-			      struct gsm_subscriber_connection *conn);
+			      struct ran_conn *conn);
 
 void subscr_paging_cancel(struct vlr_subscr *vsub, enum gsm_paging_event event);
 int subscr_paging_dispatch(unsigned int hooknum, unsigned int event,
 			   struct msgb *msg, void *data, void *param);
 
 /* Find an allocated channel for a specified subscriber */
-struct gsm_subscriber_connection *connection_for_subscr(struct vlr_subscr *vsub);
+struct ran_conn *connection_for_subscr(struct vlr_subscr *vsub);
 
 #endif /* _GSM_SUBSCR_H */
diff --git a/include/osmocom/msc/iucs.h b/include/osmocom/msc/iucs.h
index 8b22104..baedc0e 100644
--- a/include/osmocom/msc/iucs.h
+++ b/include/osmocom/msc/iucs.h
@@ -5,7 +5,7 @@
 int gsm0408_rcvmsg_iucs(struct gsm_network *network, struct msgb *msg,
 			uint16_t *lac);
 
-struct gsm_subscriber_connection *subscr_conn_lookup_iu(struct gsm_network *network,
+struct ran_conn *subscr_conn_lookup_iu(struct gsm_network *network,
 							struct ranap_ue_conn_ctx *ue);
 int iu_rab_act_cs(struct gsm_trans *trans);
 
diff --git a/include/osmocom/msc/msc_ifaces.h b/include/osmocom/msc/msc_ifaces.h
index ca25e9d..94423ca 100644
--- a/include/osmocom/msc/msc_ifaces.h
+++ b/include/osmocom/msc/msc_ifaces.h
@@ -29,11 +29,11 @@
 /* Each main linkage must implement this function (see comment above). */
 extern int iu_tx(struct msgb *msg, uint8_t sapi);
 
-int msc_tx_dtap(struct gsm_subscriber_connection *conn,
+int msc_tx_dtap(struct ran_conn *conn,
 		struct msgb *msg);
 
-int msc_gsm48_tx_mm_serv_ack(struct gsm_subscriber_connection *conn);
-int msc_gsm48_tx_mm_serv_rej(struct gsm_subscriber_connection *conn,
+int msc_gsm48_tx_mm_serv_ack(struct ran_conn *conn);
+int msc_gsm48_tx_mm_serv_rej(struct ran_conn *conn,
 			     enum gsm48_reject_value value);
 
-int msc_tx_common_id(struct gsm_subscriber_connection *conn);
+int msc_tx_common_id(struct ran_conn *conn);
diff --git a/include/osmocom/msc/msc_mgcp.h b/include/osmocom/msc/msc_mgcp.h
index 3c4bc62..957f363 100644
--- a/include/osmocom/msc/msc_mgcp.h
+++ b/include/osmocom/msc/msc_mgcp.h
@@ -26,7 +26,7 @@
 /* MGCP state handler context. This context information stores all information
  * to handle the direction of the RTP streams via MGCP. There is one instance
  * of this context struct per subscriber connection.
- * (see also struct gsm_subscriber_connection) */
+ * (see also struct ran_conn) */
 struct mgcp_ctx {
 	/* FSM instance, which handles the connection switching procedure */
 	struct osmo_fsm_inst *fsm;
@@ -56,6 +56,6 @@
 };
 
 int msc_mgcp_call_assignment(struct gsm_trans *trans);
-int msc_mgcp_ass_complete(struct gsm_subscriber_connection *conn, uint16_t port, char *addr);
+int msc_mgcp_ass_complete(struct ran_conn *conn, uint16_t port, char *addr);
 int msc_mgcp_call_complete(struct gsm_trans *trans, uint16_t port, char *addr);
 int msc_mgcp_call_release(struct gsm_trans *trans);
diff --git a/include/osmocom/msc/osmo_msc.h b/include/osmocom/msc/osmo_msc.h
index a757a99..399236e 100644
--- a/include/osmocom/msc/osmo_msc.h
+++ b/include/osmocom/msc/osmo_msc.h
@@ -47,46 +47,46 @@
 	MSC_CONN_REJECT = 1,
 };
 
-struct gsm_subscriber_connection *msc_subscr_conn_alloc(struct gsm_network *network,
+struct ran_conn *msc_subscr_conn_alloc(struct gsm_network *network,
 							enum ran_type via_ran, uint16_t lac);
 
-void msc_subscr_conn_update_id(struct gsm_subscriber_connection *conn,
+void msc_subscr_conn_update_id(struct ran_conn *conn,
 			       enum complete_layer3_type from, const char *id);
-char *msc_subscr_conn_get_conn_id(struct gsm_subscriber_connection *conn);
+char *msc_subscr_conn_get_conn_id(struct ran_conn *conn);
 
-void msc_subscr_conn_complete_layer_3(struct gsm_subscriber_connection *conn);
+void msc_subscr_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 gsm_subscriber_connection *conn, int dlci);
-int msc_clear_request(struct gsm_subscriber_connection *conn, uint32_t cause);
-int msc_compl_l3(struct gsm_subscriber_connection *conn,
+void msc_sapi_n_reject(struct ran_conn *conn, int dlci);
+int msc_clear_request(struct ran_conn *conn, uint32_t cause);
+int msc_compl_l3(struct ran_conn *conn,
 		 struct msgb *msg, uint16_t chosen_channel);
-void msc_dtap(struct gsm_subscriber_connection *conn, struct msgb *msg);
-int msc_classmark_request_then_cipher_mode_cmd(struct gsm_subscriber_connection *conn, bool umts_aka,
+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 gsm_subscriber_connection *conn, bool umts_aka, bool retrieve_imeisv);
-void msc_cipher_mode_compl(struct gsm_subscriber_connection *conn,
+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 gsm_subscriber_connection *conn);
-void msc_classmark_chg(struct gsm_subscriber_connection *conn,
+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 gsm_subscriber_connection *conn,
+void msc_assign_fail(struct ran_conn *conn,
 		     uint8_t cause, uint8_t *rr_cause);
 
 void msc_subscr_conn_init(void);
-bool msc_subscr_conn_is_accepted(const struct gsm_subscriber_connection *conn);
-bool msc_subscr_conn_is_establishing_auth_ciph(const struct gsm_subscriber_connection *conn);
-void msc_subscr_conn_communicating(struct gsm_subscriber_connection *conn);
-void msc_subscr_conn_close(struct gsm_subscriber_connection *conn,
+bool msc_subscr_conn_is_accepted(const struct ran_conn *conn);
+bool msc_subscr_conn_is_establishing_auth_ciph(const struct ran_conn *conn);
+void msc_subscr_conn_communicating(struct ran_conn *conn);
+void msc_subscr_conn_close(struct ran_conn *conn,
 			   uint32_t cause);
-void msc_subscr_conn_mo_close(struct gsm_subscriber_connection *conn, uint32_t cause);
-bool msc_subscr_conn_in_release(struct gsm_subscriber_connection *conn);
+void msc_subscr_conn_mo_close(struct ran_conn *conn, uint32_t cause);
+bool msc_subscr_conn_in_release(struct ran_conn *conn);
 
-void msc_subscr_conn_rx_bssmap_clear_complete(struct gsm_subscriber_connection *conn);
-void msc_subscr_conn_rx_iu_release_complete(struct gsm_subscriber_connection *conn);
+void msc_subscr_conn_rx_bssmap_clear_complete(struct ran_conn *conn);
+void msc_subscr_conn_rx_iu_release_complete(struct ran_conn *conn);
 
 enum msc_subscr_conn_use {
 	MSC_CONN_USE_UNTRACKED = -1,
@@ -109,14 +109,14 @@
 	_msc_subscr_conn_get(conn, balance_token, __FILE__, __LINE__)
 #define msc_subscr_conn_put(conn, balance_token) \
 	_msc_subscr_conn_put(conn, balance_token, __FILE__, __LINE__)
-struct gsm_subscriber_connection *
-_msc_subscr_conn_get(struct gsm_subscriber_connection *conn,
+struct ran_conn *
+_msc_subscr_conn_get(struct ran_conn *conn,
 		     enum msc_subscr_conn_use balance_token,
 		     const char *file, int line);
-void _msc_subscr_conn_put(struct gsm_subscriber_connection *conn,
+void _msc_subscr_conn_put(struct ran_conn *conn,
 			  enum msc_subscr_conn_use balance_token,
 			  const char *file, int line);
-bool msc_subscr_conn_used_by(struct gsm_subscriber_connection *conn,
+bool msc_subscr_conn_used_by(struct ran_conn *conn,
 			     enum msc_subscr_conn_use token);
 
 void msc_stop_paging(struct vlr_subscr *vsub);
diff --git a/include/osmocom/msc/signal.h b/include/osmocom/msc/signal.h
index f630b27..5126976 100644
--- a/include/osmocom/msc/signal.h
+++ b/include/osmocom/msc/signal.h
@@ -83,11 +83,11 @@
 	int paging_result;
 
 	/* NULL in case the paging didn't work */
-	struct gsm_subscriber_connection *conn;
+	struct ran_conn *conn;
 };
 
 struct scall_signal_data {
-	struct gsm_subscriber_connection *conn;
+	struct ran_conn *conn;
 	void *data;
 };
 struct sms_signal_data {
diff --git a/include/osmocom/msc/silent_call.h b/include/osmocom/msc/silent_call.h
index 5fec77b..70324e5 100644
--- a/include/osmocom/msc/silent_call.h
+++ b/include/osmocom/msc/silent_call.h
@@ -1,15 +1,15 @@
 #ifndef _SILENT_CALL_H
 #define _SILENT_CALL_H
 
-struct gsm_subscriber_connection;
+struct ran_conn;
 
 extern int gsm_silent_call_start(struct vlr_subscr *vsub,
                                  void *data, int type);
 extern int gsm_silent_call_stop(struct vlr_subscr *vsub);
 
 #if 0
-extern int silent_call_rx(struct gsm_subscriber_connection *conn, struct msgb *msg);
-extern int silent_call_reroute(struct gsm_subscriber_connection *conn, struct msgb *msg);
+extern int silent_call_rx(struct ran_conn *conn, struct msgb *msg);
+extern int silent_call_reroute(struct ran_conn *conn, struct msgb *msg);
 #endif
 
 #endif /* _SILENT_CALL_H */
diff --git a/include/osmocom/msc/transaction.h b/include/osmocom/msc/transaction.h
index 762eeea..0760c07 100644
--- a/include/osmocom/msc/transaction.h
+++ b/include/osmocom/msc/transaction.h
@@ -38,7 +38,7 @@
 	struct vlr_subscr *vsub;
 
 	/* The associated connection we are using to transmit messages */
-	struct gsm_subscriber_connection *conn;
+	struct ran_conn *conn;
 
 	/* reference from MNCC or other application */
 	uint32_t callref;
@@ -98,11 +98,11 @@
 
 
 
-struct gsm_trans *trans_find_by_id(struct gsm_subscriber_connection *conn,
+struct gsm_trans *trans_find_by_id(struct ran_conn *conn,
 				   uint8_t proto, uint8_t trans_id);
 struct gsm_trans *trans_find_by_callref(struct gsm_network *net,
 					uint32_t callref);
-struct gsm_trans *trans_find_by_sm_rp_mr(struct gsm_subscriber_connection *conn,
+struct gsm_trans *trans_find_by_sm_rp_mr(struct ran_conn *conn,
 					 uint8_t sm_rp_mr);
 
 struct gsm_trans *trans_alloc(struct gsm_network *net,
@@ -113,7 +113,7 @@
 
 int trans_assign_trans_id(struct gsm_network *net, struct vlr_subscr *vsub,
 			  uint8_t protocol, uint8_t ti_flag);
-struct gsm_trans *trans_has_conn(const struct gsm_subscriber_connection *conn);
-void trans_conn_closed(struct gsm_subscriber_connection *conn);
+struct gsm_trans *trans_has_conn(const struct ran_conn *conn);
+void trans_conn_closed(struct ran_conn *conn);
 
 #endif
diff --git a/src/libmsc/a_iface.c b/src/libmsc/a_iface.c
index bd9b890..2829a39 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;
 
@@ -615,8 +615,8 @@
 /* Clear all subscriber 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);
diff --git a/src/libmsc/a_iface_bssap.c b/src/libmsc/a_iface_bssap.c
index 9a2333d..78a8c03 100644
--- a/src/libmsc/a_iface_bssap.c
+++ b/src/libmsc/a_iface_bssap.c
@@ -46,11 +46,11 @@
  */
 
 /* Allocate a new subscriber connection */
-static struct gsm_subscriber_connection *subscr_conn_allocate_a(const struct a_conn_info *a_conn_info,
+static struct ran_conn *subscr_conn_allocate_a(const struct a_conn_info *a_conn_info,
 								struct gsm_network *network,
 								uint16_t lac, struct osmo_sccp_user *scu, int conn_id)
 {
-	struct gsm_subscriber_connection *conn;
+	struct ran_conn *conn;
 
 	LOGP(DMSC, LOGL_DEBUG, "Allocating A-Interface subscriber conn: lac %i, conn_id %i\n", lac, conn_id);
 
@@ -71,9 +71,9 @@
 
 /* Return an existing A subscriber connection record for the given
  * connection IDs, or return NULL if not found. */
-static struct gsm_subscriber_connection *subscr_conn_lookup_a(const struct gsm_network *network, int conn_id)
+static struct ran_conn *subscr_conn_lookup_a(const struct gsm_network *network, int conn_id)
 {
-	struct gsm_subscriber_connection *conn;
+	struct ran_conn *conn;
 
 	OSMO_ASSERT(network);
 
@@ -213,7 +213,7 @@
  */
 
 /* Endpoint to handle BSSMAP clear request */
-static int bssmap_rx_clear_rqst(struct gsm_subscriber_connection *conn,
+static int bssmap_rx_clear_rqst(struct ran_conn *conn,
 				struct msgb *msg, struct tlv_parsed *tp)
 {
 	uint8_t cause;
@@ -234,7 +234,7 @@
 /* Endpoint to handle BSSMAP clear complete */
 static int bssmap_rx_clear_complete(struct osmo_sccp_user *scu,
 				    const struct a_conn_info *a_conn_info,
-				    struct gsm_subscriber_connection *conn)
+				    struct ran_conn *conn)
 {
 	int rc;
 
@@ -263,7 +263,7 @@
 	int rc;
 
 	struct gsm_network *network = a_conn_info->network;
-	struct gsm_subscriber_connection *conn;
+	struct ran_conn *conn;
 
 	LOGP(DBSSAP, LOGL_INFO, "Rx BSSMAP COMPLETE L3 INFO (conn_id=%i)\n", a_conn_info->conn_id);
 
@@ -359,7 +359,7 @@
 }
 
 /* Endpoint to handle BSSMAP classmark update */
-static int bssmap_rx_classmark_upd(struct gsm_subscriber_connection *conn, struct msgb *msg,
+static int bssmap_rx_classmark_upd(struct ran_conn *conn, struct msgb *msg,
 				   struct tlv_parsed *tp)
 {
 	const uint8_t *cm2 = NULL;
@@ -389,7 +389,7 @@
 }
 
 /* Endpoint to handle BSSMAP cipher mode complete */
-static int bssmap_rx_ciph_compl(struct gsm_subscriber_connection *conn, struct msgb *msg,
+static int bssmap_rx_ciph_compl(struct ran_conn *conn, struct msgb *msg,
 				struct tlv_parsed *tp)
 {
 	/* FIXME: The field GSM0808_IE_LAYER_3_MESSAGE_CONTENTS is optional by
@@ -424,7 +424,7 @@
 }
 
 /* Endpoint to handle BSSMAP cipher mode reject, 3GPP TS 08.08 §3.2.1.48 */
-static int bssmap_rx_ciph_rej(struct gsm_subscriber_connection *conn,
+static int bssmap_rx_ciph_rej(struct ran_conn *conn,
 			      struct msgb *msg, struct tlv_parsed *tp)
 {
 	int rc;
@@ -451,7 +451,7 @@
 }
 
 /* Endpoint to handle BSSMAP assignment failure */
-static int bssmap_rx_ass_fail(struct gsm_subscriber_connection *conn, struct msgb *msg,
+static int bssmap_rx_ass_fail(struct ran_conn *conn, struct msgb *msg,
 			      struct tlv_parsed *tp)
 {
 	uint8_t cause;
@@ -484,7 +484,7 @@
 }
 
 /* Endpoint to handle sapi "n" reject */
-static int bssmap_rx_sapi_n_rej(struct gsm_subscriber_connection *conn, struct msgb *msg,
+static int bssmap_rx_sapi_n_rej(struct ran_conn *conn, struct msgb *msg,
 				struct tlv_parsed *tp)
 {
 	uint8_t dlci;
@@ -549,7 +549,7 @@
 }
 
 /* Endpoint to handle assignment complete */
-static int bssmap_rx_ass_compl(struct gsm_subscriber_connection *conn, struct msgb *msg,
+static int bssmap_rx_ass_compl(struct ran_conn *conn, struct msgb *msg,
 			       struct tlv_parsed *tp)
 {
 	struct sockaddr_storage rtp_addr;
@@ -601,7 +601,7 @@
 /* Handle incoming connection oriented BSSMAP messages */
 static int rx_bssmap(struct osmo_sccp_user *scu, const struct a_conn_info *a_conn_info, struct msgb *msg)
 {
-	struct gsm_subscriber_connection *conn;
+	struct ran_conn *conn;
 	struct tlv_parsed tp;
 	int rc;
 	uint8_t msg_type;
@@ -671,7 +671,7 @@
 static int rx_dtap(const struct osmo_sccp_user *scu, const struct a_conn_info *a_conn_info, struct msgb *msg)
 {
 	struct gsm_network *network = a_conn_info->network;
-	struct gsm_subscriber_connection *conn;
+	struct ran_conn *conn;
 	struct dtap_header *dtap = (struct dtap_header *) msg->l2h;
 
 	conn = subscr_conn_lookup_a(network, a_conn_info->conn_id);
diff --git a/src/libmsc/gsm_04_08.c b/src/libmsc/gsm_04_08.c
index d5cc212..0a52b45 100644
--- a/src/libmsc/gsm_04_08.c
+++ b/src/libmsc/gsm_04_08.c
@@ -77,7 +77,7 @@
 void *tall_locop_ctx;
 void *tall_authciphop_ctx;
 
-static int gsm0408_loc_upd_acc(struct gsm_subscriber_connection *conn,
+static int gsm0408_loc_upd_acc(struct ran_conn *conn,
 			       uint32_t send_tmsi);
 
 /*! Send a simple GSM 04.08 message without any payload
@@ -86,7 +86,7 @@
  * \param[in]  msg_type  Message type
  * \return     result of \ref gsm48_conn_sendmsg
  */
-int gsm48_tx_simple(struct gsm_subscriber_connection *conn,
+int gsm48_tx_simple(struct ran_conn *conn,
 		    uint8_t pdisc, uint8_t msg_type)
 {
 	struct msgb *msg = gsm48_msgb_alloc_name("GSM 04.08 TX SIMPLE");
@@ -176,7 +176,7 @@
 	}
 }
 
-int gsm48_conn_sendmsg(struct msgb *msg, struct gsm_subscriber_connection *conn, struct gsm_trans *trans)
+int gsm48_conn_sendmsg(struct msgb *msg, struct ran_conn *conn, struct gsm_trans *trans)
 {
 	struct gsm48_hdr *gh = (struct gsm48_hdr *) msg->data;
 
@@ -206,7 +206,7 @@
 }
 
 /* Chapter 9.2.14 : Send LOCATION UPDATING REJECT */
-static int gsm0408_loc_upd_rej(struct gsm_subscriber_connection *conn, uint8_t cause)
+static int gsm0408_loc_upd_rej(struct ran_conn *conn, uint8_t cause)
 {
 	struct msgb *msg;
 
@@ -223,7 +223,7 @@
 }
 
 /* Chapter 9.2.13 : Send LOCATION UPDATE ACCEPT */
-static int gsm0408_loc_upd_acc(struct gsm_subscriber_connection *conn,
+static int gsm0408_loc_upd_acc(struct ran_conn *conn,
 			       uint32_t send_tmsi)
 {
 	struct msgb *msg = gsm48_msgb_alloc_name("GSM 04.08 LOC UPD ACC");
@@ -274,7 +274,7 @@
 }
 
 /* Transmit Chapter 9.2.10 Identity Request */
-static int mm_tx_identity_req(struct gsm_subscriber_connection *conn, uint8_t id_type)
+static int mm_tx_identity_req(struct ran_conn *conn, uint8_t id_type)
 {
 	struct msgb *msg = gsm48_msgb_alloc_name("GSM 04.08 ID REQ");
 	struct gsm48_hdr *gh;
@@ -288,7 +288,7 @@
 }
 
 /* Parse Chapter 9.2.11 Identity Response */
-static int mm_rx_id_resp(struct gsm_subscriber_connection *conn, struct msgb *msg)
+static int mm_rx_id_resp(struct ran_conn *conn, struct msgb *msg)
 {
 	struct gsm48_hdr *gh = msgb_l3(msg);
 	uint8_t mi_type = gh->data[1] & GSM_MI_TYPE_MASK;
@@ -319,7 +319,7 @@
 
 /* Chapter 9.2.15: Receive Location Updating Request.
  * Keep this function non-static for direct invocation by unit tests. */
-int mm_rx_loc_upd_req(struct gsm_subscriber_connection *conn, struct msgb *msg)
+int mm_rx_loc_upd_req(struct ran_conn *conn, struct msgb *msg)
 {
 	struct gsm_network *net = conn->network;
 	struct gsm48_hdr *gh = msgb_l3(msg);
@@ -451,7 +451,7 @@
 
 
 /* Section 9.2.15a */
-int gsm48_tx_mm_info(struct gsm_subscriber_connection *conn)
+int gsm48_tx_mm_info(struct ran_conn *conn)
 {
 	struct msgb *msg = gsm48_msgb_alloc_name("GSM 04.08 MM INF");
 	struct gsm48_hdr *gh;
@@ -610,7 +610,7 @@
  * 	send; must be 16 bytes long, or pass NULL for plain GSM auth.
  * \param[in] key_seq  auth tuple's sequence number.
  */
-int gsm48_tx_mm_auth_req(struct gsm_subscriber_connection *conn, uint8_t *rand,
+int gsm48_tx_mm_auth_req(struct ran_conn *conn, uint8_t *rand,
 			 uint8_t *autn, int key_seq)
 {
 	struct msgb *msg = gsm48_msgb_alloc_name("GSM 04.08 AUTH REQ");
@@ -640,7 +640,7 @@
 }
 
 /* Section 9.2.1 */
-int gsm48_tx_mm_auth_rej(struct gsm_subscriber_connection *conn)
+int gsm48_tx_mm_auth_rej(struct ran_conn *conn)
 {
 	DEBUGP(DMM, "-> AUTH REJECT\n");
 	return gsm48_tx_simple(conn, GSM48_PDISC_MM, GSM48_MT_MM_AUTH_REJ);
@@ -649,7 +649,7 @@
 static int msc_vlr_tx_cm_serv_acc(void *msc_conn_ref);
 static int msc_vlr_tx_cm_serv_rej(void *msc_conn_ref, enum gsm48_reject_value result);
 
-static int cm_serv_reuse_conn(struct gsm_subscriber_connection *conn, const uint8_t *mi_lv)
+static int cm_serv_reuse_conn(struct ran_conn *conn, const uint8_t *mi_lv)
 {
 	uint8_t mi_type;
 	char mi_string[GSM48_MI_SIZE];
@@ -704,7 +704,7 @@
  *
  * Keep this function non-static for direct invocation by unit tests.
  */
-int gsm48_rx_mm_serv_req(struct gsm_subscriber_connection *conn, struct msgb *msg)
+int gsm48_rx_mm_serv_req(struct ran_conn *conn, struct msgb *msg)
 {
 	struct gsm_network *net = conn->network;
 	uint8_t mi_type;
@@ -812,7 +812,7 @@
 }
 
 /* Receive a CM Re-establish Request */
-static int gsm48_rx_cm_reest_req(struct gsm_subscriber_connection *conn, struct msgb *msg)
+static int gsm48_rx_cm_reest_req(struct ran_conn *conn, struct msgb *msg)
 {
 	uint8_t mi_type;
 	char mi_string[GSM48_MI_SIZE];
@@ -831,7 +831,7 @@
 	return msc_gsm48_tx_mm_serv_rej(conn, GSM48_REJECT_SRV_OPT_NOT_SUPPORTED);
 }
 
-static int gsm48_rx_mm_imsi_detach_ind(struct gsm_subscriber_connection *conn, struct msgb *msg)
+static int gsm48_rx_mm_imsi_detach_ind(struct ran_conn *conn, struct msgb *msg)
 {
 	struct gsm_network *network = conn->network;
 	struct gsm48_hdr *gh = msgb_l3(msg);
@@ -898,7 +898,7 @@
 }
 
 static int parse_gsm_auth_resp(uint8_t *res, uint8_t *res_len,
-			       struct gsm_subscriber_connection *conn,
+			       struct ran_conn *conn,
 			       struct msgb *msg)
 {
 	struct gsm48_hdr *gh = msgb_l3(msg);
@@ -918,7 +918,7 @@
 }
 
 static int parse_umts_auth_resp(uint8_t *res, uint8_t *res_len,
-				struct gsm_subscriber_connection *conn,
+				struct ran_conn *conn,
 				struct msgb *msg)
 {
 	struct gsm48_hdr *gh;
@@ -970,7 +970,7 @@
 }
 
 /* Chapter 9.2.3: Authentication Response */
-static int gsm48_rx_mm_auth_resp(struct gsm_subscriber_connection *conn, struct msgb *msg)
+static int gsm48_rx_mm_auth_resp(struct ran_conn *conn, struct msgb *msg)
 {
 	uint8_t res[16];
 	uint8_t res_len;
@@ -1010,7 +1010,7 @@
 				       res, res_len);
 }
 
-static int gsm48_rx_mm_auth_fail(struct gsm_subscriber_connection *conn, struct msgb *msg)
+static int gsm48_rx_mm_auth_fail(struct ran_conn *conn, struct msgb *msg)
 {
 	struct gsm48_hdr *gh = msgb_l3(msg);
 	uint8_t cause;
@@ -1092,7 +1092,7 @@
 	return vlr_subscr_rx_auth_fail(conn->vsub, auts);
 }
 
-static int gsm48_rx_mm_tmsi_reall_compl(struct gsm_subscriber_connection *conn)
+static int gsm48_rx_mm_tmsi_reall_compl(struct ran_conn *conn)
 {
 	DEBUGP(DMM, "TMSI Reallocation Completed. Subscriber: %s\n",
 	       vlr_subscr_name(conn->vsub));
@@ -1105,7 +1105,7 @@
 }
 
 /* Receive a GSM 04.08 Mobility Management (MM) message */
-static int gsm0408_rcv_mm(struct gsm_subscriber_connection *conn, struct msgb *msg)
+static int gsm0408_rcv_mm(struct ran_conn *conn, struct msgb *msg)
 {
 	struct gsm48_hdr *gh = msgb_l3(msg);
 	int rc = 0;
@@ -1148,7 +1148,7 @@
 }
 
 /* Receive a PAGING RESPONSE message from the MS */
-static int gsm48_rx_rr_pag_resp(struct gsm_subscriber_connection *conn, struct msgb *msg)
+static int gsm48_rx_rr_pag_resp(struct ran_conn *conn, struct msgb *msg)
 {
 	struct gsm_network *net = conn->network;
 	struct gsm48_hdr *gh = msgb_l3(msg);
@@ -1211,7 +1211,7 @@
 	return 0;
 }
 
-static int gsm48_rx_rr_app_info(struct gsm_subscriber_connection *conn, struct msgb *msg)
+static int gsm48_rx_rr_app_info(struct ran_conn *conn, struct msgb *msg)
 {
 	struct gsm48_hdr *gh = msgb_l3(msg);
 	uint8_t apdu_id_flags;
@@ -1234,7 +1234,7 @@
 }
 
 /* Receive a GSM 04.08 Radio Resource (RR) message */
-static int gsm0408_rcv_rr(struct gsm_subscriber_connection *conn, struct msgb *msg)
+static int gsm0408_rcv_rr(struct ran_conn *conn, struct msgb *msg)
 {
 	struct gsm48_hdr *gh = msgb_l3(msg);
 	int rc = 0;
@@ -1255,7 +1255,7 @@
 	return rc;
 }
 
-int gsm48_send_rr_app_info(struct gsm_subscriber_connection *conn, uint8_t apdu_id,
+int gsm48_send_rr_app_info(struct ran_conn *conn, uint8_t apdu_id,
 			   uint8_t apdu_len, const uint8_t *apdu)
 {
 	struct msgb *msg = gsm48_msgb_alloc_name("GSM 04.08 APP INF");
@@ -1311,7 +1311,7 @@
 	return false;
 }
 
-void cm_service_request_concludes(struct gsm_subscriber_connection *conn,
+void cm_service_request_concludes(struct ran_conn *conn,
 				  struct msgb *msg)
 {
 
@@ -1393,7 +1393,7 @@
 }
 
 /* TS 24.007 11.2.3.2 Message Type Octet / Duplicate Detection */
-static bool gsm0407_is_duplicate(struct gsm_subscriber_connection *conn, struct msgb *msg)
+static bool gsm0407_is_duplicate(struct ran_conn *conn, struct msgb *msg)
 {
 	struct gsm48_hdr *gh;
 	uint8_t pdisc;
@@ -1425,10 +1425,10 @@
 	}
 }
 
-extern int gsm0408_rcv_cc(struct gsm_subscriber_connection *conn, struct msgb *msg);
+extern int gsm0408_rcv_cc(struct ran_conn *conn, struct msgb *msg);
 
 /* Main entry point for GSM 04.08/44.008 Layer 3 data (e.g. from the BSC). */
-int gsm0408_dispatch(struct gsm_subscriber_connection *conn, struct msgb *msg)
+int gsm0408_dispatch(struct ran_conn *conn, struct msgb *msg)
 {
 	struct gsm48_hdr *gh;
 	uint8_t pdisc;
@@ -1518,7 +1518,7 @@
 static int msc_vlr_tx_auth_req(void *msc_conn_ref, struct gsm_auth_tuple *at,
 			       bool send_autn)
 {
-	struct gsm_subscriber_connection *conn = msc_conn_ref;
+	struct ran_conn *conn = msc_conn_ref;
 	return gsm48_tx_mm_auth_req(conn, at->vec.rand,
 				    send_autn? at->vec.autn : NULL,
 				    at->key_seq);
@@ -1527,48 +1527,48 @@
 /* VLR asks us to send an authentication reject */
 static int msc_vlr_tx_auth_rej(void *msc_conn_ref)
 {
-	struct gsm_subscriber_connection *conn = msc_conn_ref;
+	struct ran_conn *conn = msc_conn_ref;
 	return gsm48_tx_mm_auth_rej(conn);
 }
 
 /* VLR asks us to transmit an Identity Request of given type */
 static int msc_vlr_tx_id_req(void *msc_conn_ref, uint8_t mi_type)
 {
-	struct gsm_subscriber_connection *conn = msc_conn_ref;
+	struct ran_conn *conn = msc_conn_ref;
 	return mm_tx_identity_req(conn, mi_type);
 }
 
 /* VLR asks us to transmit a Location Update Accept */
 static int msc_vlr_tx_lu_acc(void *msc_conn_ref, uint32_t send_tmsi)
 {
-	struct gsm_subscriber_connection *conn = msc_conn_ref;
+	struct ran_conn *conn = msc_conn_ref;
 	return gsm0408_loc_upd_acc(conn, send_tmsi);
 }
 
 /* VLR asks us to transmit a Location Update Reject */
 static int msc_vlr_tx_lu_rej(void *msc_conn_ref, enum gsm48_reject_value cause)
 {
-	struct gsm_subscriber_connection *conn = msc_conn_ref;
+	struct ran_conn *conn = msc_conn_ref;
 	return gsm0408_loc_upd_rej(conn, cause);
 }
 
 /* VLR asks us to transmit a CM Service Accept */
 static int msc_vlr_tx_cm_serv_acc(void *msc_conn_ref)
 {
-	struct gsm_subscriber_connection *conn = msc_conn_ref;
+	struct ran_conn *conn = msc_conn_ref;
 	return msc_gsm48_tx_mm_serv_ack(conn);
 }
 
 static int msc_vlr_tx_common_id(void *msc_conn_ref)
 {
-	struct gsm_subscriber_connection *conn = msc_conn_ref;
+	struct ran_conn *conn = msc_conn_ref;
 	return msc_tx_common_id(conn);
 }
 
 /* VLR asks us to transmit MM info. */
 static int msc_vlr_tx_mm_info(void *msc_conn_ref)
 {
-	struct gsm_subscriber_connection *conn = msc_conn_ref;
+	struct ran_conn *conn = msc_conn_ref;
 	if (!conn->network->send_mm_info)
 		return 0;
 	return gsm48_tx_mm_info(conn);
@@ -1577,7 +1577,7 @@
 /* VLR asks us to transmit a CM Service Reject */
 static int msc_vlr_tx_cm_serv_rej(void *msc_conn_ref, enum gsm48_reject_value cause)
 {
-	struct gsm_subscriber_connection *conn = msc_conn_ref;
+	struct ran_conn *conn = msc_conn_ref;
 	int rc;
 
 	rc = msc_gsm48_tx_mm_serv_rej(conn, cause);
@@ -1594,7 +1594,7 @@
 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 gsm_subscriber_connection *conn, bool umts_aka, bool retrieve_imeisv)
+int msc_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;
@@ -1672,7 +1672,7 @@
 			  bool umts_aka,
 			  bool retrieve_imeisv)
 {
-	struct gsm_subscriber_connection *conn = msc_conn_ref;
+	struct ran_conn *conn = msc_conn_ref;
 	struct vlr_subscr *vsub;
 	struct gsm_auth_tuple *tuple;
 
@@ -1716,7 +1716,7 @@
 	return -ENOTSUP;
 }
 
-void msc_rx_sec_mode_compl(struct gsm_subscriber_connection *conn)
+void msc_rx_sec_mode_compl(struct ran_conn *conn)
 {
 	struct vlr_ciph_result vlr_res = {};
 
@@ -1760,7 +1760,7 @@
 static void msc_vlr_subscr_assoc(void *msc_conn_ref,
 				 struct vlr_subscr *vsub)
 {
-	struct gsm_subscriber_connection *conn = msc_conn_ref;
+	struct ran_conn *conn = msc_conn_ref;
 	OSMO_ASSERT(vsub);
 	OSMO_ASSERT(!conn->vsub);
 	conn->vsub = vlr_subscr_get(vsub);
diff --git a/src/libmsc/gsm_04_08_cc.c b/src/libmsc/gsm_04_08_cc.c
index c9dffe3..557e218 100644
--- a/src/libmsc/gsm_04_08_cc.c
+++ b/src/libmsc/gsm_04_08_cc.c
@@ -310,7 +310,7 @@
 static int setup_trig_pag_evt(unsigned int hooknum, unsigned int event,
 			      struct msgb *msg, void *_conn, void *_transt)
 {
-	struct gsm_subscriber_connection *conn = _conn;
+	struct ran_conn *conn = _conn;
 	struct gsm_trans *transt = _transt;
 	enum gsm_paging_event paging_event = event;
 
@@ -1755,7 +1755,7 @@
 	 * mgcp-gw expects the incoming RTP stream from the remote
 	 * end (e.g. Asterisk) is known. */
 
-	struct gsm_subscriber_connection *conn = trans->conn;
+	struct ran_conn *conn = trans->conn;
 	struct gsm_network *network = conn->network;
 
 	mncc_recv_rtp_sock(network, trans, MNCC_RTP_CREATE);
@@ -1859,7 +1859,7 @@
 {
 	int i, rc = 0;
 	struct gsm_trans *trans = NULL, *transt;
-	struct gsm_subscriber_connection *conn = NULL;
+	struct ran_conn *conn = NULL;
 	struct gsm_mncc *data = arg, rel;
 
 	DEBUGP(DMNCC, "receive message %s\n", get_mncc_name(msg_type));
@@ -2112,7 +2112,7 @@
 #define DATASLLEN \
 	(sizeof(datastatelist) / sizeof(struct datastate))
 
-int gsm0408_rcv_cc(struct gsm_subscriber_connection *conn, struct msgb *msg)
+int gsm0408_rcv_cc(struct ran_conn *conn, struct msgb *msg)
 {
 	struct gsm48_hdr *gh = msgb_l3(msg);
 	uint8_t msg_type = gsm48_hdr_msg_type(gh);
diff --git a/src/libmsc/gsm_04_11.c b/src/libmsc/gsm_04_11.c
index 88dc433..40d0a99 100644
--- a/src/libmsc/gsm_04_11.c
+++ b/src/libmsc/gsm_04_11.c
@@ -120,7 +120,7 @@
 	osmo_signal_dispatch(SS_SMS, sig_no, &sig);
 }
 
-static int gsm411_sendmsg(struct gsm_subscriber_connection *conn, struct msgb *msg)
+static int gsm411_sendmsg(struct ran_conn *conn, struct msgb *msg)
 {
 	DEBUGP(DLSMS, "GSM4.11 TX %s\n", msgb_hexdump(msg));
 	msg->l3h = msg->data;
@@ -131,7 +131,7 @@
 static int paging_cb_mmsms_est_req(unsigned int hooknum, unsigned int event,
 				   struct msgb *msg, void *_conn, void *_trans)
 {
-	struct gsm_subscriber_connection *conn = _conn;
+	struct ran_conn *conn = _conn;
 	struct gsm_trans *trans = _trans;
 	struct gsm_sms *sms = trans->sms.sms;
 	int rc = 0;
@@ -406,7 +406,7 @@
 	return msg->len - old_msg_len;
 }
 
-static int sms_route_mt_sms(struct gsm_subscriber_connection *conn,
+static int sms_route_mt_sms(struct ran_conn *conn,
 			    struct gsm_sms *gsms)
 {
 	int rc;
@@ -477,7 +477,7 @@
 static int gsm340_rx_tpdu(struct gsm_trans *trans, struct msgb *msg,
 			  uint32_t gsm411_msg_ref)
 {
-	struct gsm_subscriber_connection *conn = trans->conn;
+	struct ran_conn *conn = trans->conn;
 	uint8_t *smsp = msgb_sms(msg);
 	struct gsm_sms *gsms;
 	unsigned int sms_alphabet;
@@ -755,7 +755,7 @@
 }
 
 static void sms_status_report(struct gsm_sms *gsms,
-			      struct gsm_subscriber_connection *conn)
+			      struct ran_conn *conn)
 {
 	struct gsm_sms *sms_report;
 	int rc;
@@ -982,7 +982,7 @@
 static struct gsm_trans *gsm411_alloc_mt_trans(struct gsm_network *net,
 					       struct vlr_subscr *vsub)
 {
-	struct gsm_subscriber_connection *conn;
+	struct ran_conn *conn;
 	struct gsm_trans *trans;
 	int tid;
 
@@ -1094,7 +1094,7 @@
 }
 
 /* Entry point for incoming GSM48_PDISC_SMS from abis_rsl.c */
-int gsm0411_rcv_sms(struct gsm_subscriber_connection *conn,
+int gsm0411_rcv_sms(struct ran_conn *conn,
 		    struct msgb *msg)
 {
 	struct gsm48_hdr *gh = msgb_l3(msg);
@@ -1199,7 +1199,7 @@
 }
 
 /* Process incoming SAPI N-REJECT from BSC */
-void gsm411_sapi_n_reject(struct gsm_subscriber_connection *conn)
+void gsm411_sapi_n_reject(struct ran_conn *conn)
 {
 	struct gsm_network *net;
 	struct gsm_trans *trans, *tmp;
diff --git a/src/libmsc/gsm_04_14.c b/src/libmsc/gsm_04_14.c
index 2be534c..8fe03a8 100644
--- a/src/libmsc/gsm_04_14.c
+++ b/src/libmsc/gsm_04_14.c
@@ -51,12 +51,12 @@
 	return msg;
 }
 
-static int gsm0414_conn_sendmsg(struct gsm_subscriber_connection *conn, struct msgb *msg)
+static int gsm0414_conn_sendmsg(struct ran_conn *conn, struct msgb *msg)
 {
 	return msc_tx_dtap(conn, msg);
 }
 
-static int gsm0414_tx_simple(struct gsm_subscriber_connection *conn, uint8_t msg_type)
+static int gsm0414_tx_simple(struct ran_conn *conn, uint8_t msg_type)
 {
 	struct msgb *msg = create_gsm0414_msg(msg_type);
 
@@ -65,7 +65,7 @@
 
 
 /* Send a CLOSE_TCH_LOOOP_CMD according to Section 8.1 */
-int gsm0414_tx_close_tch_loop_cmd(struct gsm_subscriber_connection *conn,
+int gsm0414_tx_close_tch_loop_cmd(struct ran_conn *conn,
 				  enum gsm414_tch_loop_mode loop_mode)
 {
 	struct msgb *msg = create_gsm0414_msg(GSM414_MT_CLOSE_TCH_LOOP_CMD);
@@ -78,25 +78,25 @@
 }
 
 /* Send a OPEN_LOOP_CMD according to Section 8.3 */
-int gsm0414_tx_open_loop_cmd(struct gsm_subscriber_connection *conn)
+int gsm0414_tx_open_loop_cmd(struct ran_conn *conn)
 {
 	return gsm0414_tx_simple(conn, GSM414_MT_OPEN_LOOP_CMD);
 }
 
 /* Send a ACT_EMMI_CMD according to Section 8.8 */
-int gsm0414_tx_act_emmi_cmd(struct gsm_subscriber_connection *conn)
+int gsm0414_tx_act_emmi_cmd(struct ran_conn *conn)
 {
 	return gsm0414_tx_simple(conn, GSM414_MT_ACT_EMMI_CMD);
 }
 
 /* Send a DEACT_EMMI_CMD according to Section 8.10 */
-int gsm0414_tx_deact_emmi_cmd(struct gsm_subscriber_connection *conn)
+int gsm0414_tx_deact_emmi_cmd(struct ran_conn *conn)
 {
 	return gsm0414_tx_simple(conn, GSM414_MT_DEACT_EMMI_CMD);
 }
 
 /* Send a TEST_INTERFACE according to Section 8.11 */
-int gsm0414_tx_test_interface(struct gsm_subscriber_connection *conn,
+int gsm0414_tx_test_interface(struct ran_conn *conn,
 			      uint8_t tested_devs)
 {
 	struct msgb *msg = create_gsm0414_msg(GSM414_MT_TEST_INTERFACE);
@@ -105,7 +105,7 @@
 }
 
 /* Send a RESET_MS_POSITION_STORED according to Section 8.11 */
-int gsm0414_tx_reset_ms_pos_store(struct gsm_subscriber_connection *conn,
+int gsm0414_tx_reset_ms_pos_store(struct ran_conn *conn,
 				  uint8_t technology)
 {
 	struct msgb *msg = create_gsm0414_msg(GSM414_MT_RESET_MS_POS_STORED);
@@ -116,7 +116,7 @@
 
 
 /* Entry point for incoming GSM48_PDISC_TEST received from MS */
-int gsm0414_rcv_test(struct gsm_subscriber_connection *conn,
+int gsm0414_rcv_test(struct ran_conn *conn,
 		     struct msgb *msg)
 {
 	struct gsm48_hdr *gh = msgb_l3(msg);
diff --git a/src/libmsc/gsm_04_80.c b/src/libmsc/gsm_04_80.c
index 81f2001..7bd50f3 100644
--- a/src/libmsc/gsm_04_80.c
+++ b/src/libmsc/gsm_04_80.c
@@ -47,7 +47,7 @@
  * failed, any incorrect value can be passed (0x00 > x > 0xff), so
  * the universal NULL-tag (see table 3.6) will be used instead.
  */
-int msc_send_ussd_reject(struct gsm_subscriber_connection *conn,
+int msc_send_ussd_reject(struct ran_conn *conn,
 			     uint8_t transaction_id, int invoke_id,
 			     uint8_t problem_tag, uint8_t problem_code)
 {
@@ -70,7 +70,7 @@
 	return msc_tx_dtap(conn, msg);
 }
 
-int msc_send_ussd_notify(struct gsm_subscriber_connection *conn, int level, const char *text)
+int msc_send_ussd_notify(struct ran_conn *conn, int level, const char *text)
 {
 	struct msgb *msg = gsm0480_create_ussd_notify(level, text);
 	if (!msg)
@@ -78,7 +78,7 @@
 	return msc_tx_dtap(conn, msg);
 }
 
-int msc_send_ussd_release_complete(struct gsm_subscriber_connection *conn)
+int msc_send_ussd_release_complete(struct ran_conn *conn)
 {
 	struct msgb *msg = gsm0480_create_ussd_release_complete();
 	if (!msg)
diff --git a/src/libmsc/gsm_09_11.c b/src/libmsc/gsm_09_11.c
index 63a1047..bd949ec 100644
--- a/src/libmsc/gsm_09_11.c
+++ b/src/libmsc/gsm_09_11.c
@@ -53,7 +53,7 @@
 static uint32_t new_callref = 0x20000001;
 
 /* Entry point for call independent MO SS messages */
-int gsm0911_rcv_nc_ss(struct gsm_subscriber_connection *conn, struct msgb *msg)
+int gsm0911_rcv_nc_ss(struct ran_conn *conn, struct msgb *msg)
 {
 	struct gsm48_hdr *gh = msgb_l3(msg);
 	struct osmo_gsup_message gsup_msg;
@@ -217,7 +217,7 @@
 static int handle_paging_event(unsigned int hooknum, unsigned int event,
 			      struct msgb *msg, void *_conn, void *_transt)
 {
-	struct gsm_subscriber_connection *conn = _conn;
+	struct ran_conn *conn = _conn;
 	enum gsm_paging_event paging_event = event;
 	struct gsm_trans *transt = _transt;
 	struct gsm48_hdr *gh;
@@ -272,7 +272,7 @@
 static struct gsm_trans *establish_nc_ss_trans(struct gsm_network *net,
 	struct vlr_subscr *vsub, struct osmo_gsup_message *gsup_msg)
 {
-	struct gsm_subscriber_connection *conn;
+	struct ran_conn *conn;
 	struct gsm_trans *trans, *transt;
 	int tid;
 
diff --git a/src/libmsc/gsm_subscriber.c b/src/libmsc/gsm_subscriber.c
index fb61209..6b66933 100644
--- a/src/libmsc/gsm_subscriber.c
+++ b/src/libmsc/gsm_subscriber.c
@@ -59,7 +59,7 @@
 			   struct msgb *msg, void *data, void *param)
 {
 	struct subscr_request *request, *tmp;
-	struct gsm_subscriber_connection *conn = data;
+	struct ran_conn *conn = data;
 	struct vlr_subscr *vsub = param;
 	struct paging_signal_data sig_data;
 
@@ -189,10 +189,10 @@
 	talloc_free(request);
 }
 
-struct gsm_subscriber_connection *connection_for_subscr(struct vlr_subscr *vsub)
+struct ran_conn *connection_for_subscr(struct vlr_subscr *vsub)
 {
 	struct gsm_network *net = vsub->vlr->user_ctx;
-	struct gsm_subscriber_connection *conn;
+	struct ran_conn *conn;
 
 	llist_for_each_entry(conn, &net->subscr_conns, entry) {
 		if (conn->vsub == vsub)
diff --git a/src/libmsc/iucs.c b/src/libmsc/iucs.c
index 95bbbee..7227b2a 100644
--- a/src/libmsc/iucs.c
+++ b/src/libmsc/iucs.c
@@ -48,11 +48,11 @@
 #endif /* BUILD_IU */
 
 /* For A-interface see libbsc/bsc_api.c subscr_con_allocate() */
-static struct gsm_subscriber_connection *subscr_conn_allocate_iu(struct gsm_network *network,
+static struct ran_conn *subscr_conn_allocate_iu(struct gsm_network *network,
 								 struct ranap_ue_conn_ctx *ue,
 								 uint16_t lac)
 {
-	struct gsm_subscriber_connection *conn;
+	struct ran_conn *conn;
 
 	DEBUGP(DIUCS, "Allocating IuCS subscriber conn: lac %d, conn_id %" PRIx32 "\n",
 	       lac, ue->conn_id);
@@ -78,7 +78,7 @@
 	if (!log_check_level(DIUCS, LOGL_DEBUG))
 		return;
 
-	struct gsm_subscriber_connection *conn;
+	struct ran_conn *conn;
 	int i = 0;
 	llist_for_each_entry(conn, &network->subscr_conns, entry) {
 		DEBUGP(DIUCS, "%3d: %s", i, vlr_subscr_name(conn->vsub));
@@ -110,11 +110,11 @@
 
 /* Return an existing IuCS subscriber connection record for the given
  * connection IDs, or return NULL if not found. */
-struct gsm_subscriber_connection *subscr_conn_lookup_iu(
+struct ran_conn *subscr_conn_lookup_iu(
 						struct gsm_network *network,
 						struct ranap_ue_conn_ctx *ue)
 {
-	struct gsm_subscriber_connection *conn;
+	struct ran_conn *conn;
 
 	DEBUGP(DIUCS, "Looking for IuCS subscriber: conn_id %" PRIx32 "\n",
 	       ue->conn_id);
@@ -144,7 +144,7 @@
 {
 	int rc;
 	struct ranap_ue_conn_ctx *ue_ctx;
-	struct gsm_subscriber_connection *conn;
+	struct ran_conn *conn;
 
 	ue_ctx = (struct ranap_ue_conn_ctx*)msg->dst;
 
@@ -199,7 +199,7 @@
 
 int iu_rab_act_cs(struct gsm_trans *trans)
 {
-	struct gsm_subscriber_connection *conn;
+	struct ran_conn *conn;
 	struct msgb *msg;
 	bool use_x213_nsap;
 	uint32_t conn_id;
diff --git a/src/libmsc/iucs_ranap.c b/src/libmsc/iucs_ranap.c
index ec0b569..d23cb41 100644
--- a/src/libmsc/iucs_ranap.c
+++ b/src/libmsc/iucs_ranap.c
@@ -43,9 +43,9 @@
 #include <asn1c/asn1helpers.h>
 
 /* To continue authorization after a Security Mode Complete */
-int gsm0408_authorize(struct gsm_subscriber_connection *conn);
+int gsm0408_authorize(struct ran_conn *conn);
 
-static int iucs_rx_rab_assign(struct gsm_subscriber_connection *conn, RANAP_RAB_SetupOrModifiedItemIEs_t * setup_ies)
+static int iucs_rx_rab_assign(struct ran_conn *conn, RANAP_RAB_SetupOrModifiedItemIEs_t * setup_ies)
 {
 	uint8_t rab_id;
 	RANAP_RAB_SetupOrModifiedItem_t *item = &setup_ies->raB_SetupOrModifiedItem;
@@ -89,7 +89,7 @@
 	return 0;
 }
 
-int iucs_rx_sec_mode_compl(struct gsm_subscriber_connection *conn,
+int iucs_rx_sec_mode_compl(struct ran_conn *conn,
 			   RANAP_SecurityModeCompleteIEs_t *ies)
 {
 	OSMO_ASSERT(conn->via_ran == RAN_UTRAN_IU);
@@ -103,7 +103,7 @@
 int iucs_rx_ranap_event(struct gsm_network *network,
 			struct ranap_ue_conn_ctx *ue_ctx, int type, void *data)
 {
-	struct gsm_subscriber_connection *conn;
+	struct ran_conn *conn;
 
 	conn = subscr_conn_lookup_iu(network, ue_ctx);
 
diff --git a/src/libmsc/msc_ifaces.c b/src/libmsc/msc_ifaces.c
index b76cdb4..8ae34fc 100644
--- a/src/libmsc/msc_ifaces.c
+++ b/src/libmsc/msc_ifaces.c
@@ -46,7 +46,7 @@
 	{ 0, NULL }
 };
 
-static int msc_tx(struct gsm_subscriber_connection *conn, struct msgb *msg)
+static int msc_tx(struct ran_conn *conn, struct msgb *msg)
 {
 	if (!msg)
 		return -EINVAL;
@@ -77,7 +77,7 @@
 }
 
 
-int msc_tx_dtap(struct gsm_subscriber_connection *conn,
+int msc_tx_dtap(struct ran_conn *conn,
 		struct msgb *msg)
 {
 	return msc_tx(conn, msg);
@@ -85,7 +85,7 @@
 
 
 /* 9.2.5 CM service accept */
-int msc_gsm48_tx_mm_serv_ack(struct gsm_subscriber_connection *conn)
+int msc_gsm48_tx_mm_serv_ack(struct ran_conn *conn)
 {
 	struct msgb *msg;
 	struct gsm48_hdr *gh;
@@ -106,7 +106,7 @@
 }
 
 /* 9.2.6 CM service reject */
-int msc_gsm48_tx_mm_serv_rej(struct gsm_subscriber_connection *conn,
+int msc_gsm48_tx_mm_serv_rej(struct ran_conn *conn,
 			     enum gsm48_reject_value value)
 {
 	struct msgb *msg;
@@ -125,7 +125,7 @@
 	return msc_tx_dtap(conn, msg);
 }
 
-int msc_tx_common_id(struct gsm_subscriber_connection *conn)
+int msc_tx_common_id(struct ran_conn *conn)
 {
 	if (!conn)
 		return -EINVAL;
diff --git a/src/libmsc/msc_mgcp.c b/src/libmsc/msc_mgcp.c
index c2bbe5f..8b6bf0e 100644
--- a/src/libmsc/msc_mgcp.c
+++ b/src/libmsc/msc_mgcp.c
@@ -280,7 +280,7 @@
 	struct msgb *msg;
 	int rc;
 	struct gsm_trans *trans;
-	struct gsm_subscriber_connection *conn;
+	struct ran_conn *conn;
 
 	OSMO_ASSERT(mgcp_ctx);
 	mgcp = mgcp_ctx->mgcp;
@@ -338,7 +338,7 @@
 	struct mgcp_ctx *mgcp_ctx = priv;
 	int rc;
 	struct gsm_trans *trans;
-	struct gsm_subscriber_connection *conn;
+	struct ran_conn *conn;
 
 	/* NOTE: In case of error, we will not be able to perform any DLCX
 	 * operation because until we either get a parseable message that
@@ -393,7 +393,7 @@
 	struct msgb *msg;
 	int rc;
 	struct gsm_trans *trans;
-	struct gsm_subscriber_connection *conn;
+	struct ran_conn *conn;
 
 	OSMO_ASSERT(mgcp_ctx);
 	mgcp = mgcp_ctx->mgcp;
@@ -447,7 +447,7 @@
 	struct mgcp_ctx *mgcp_ctx = priv;
 	int rc;
 	struct gsm_trans *trans;
-	struct gsm_subscriber_connection *conn;
+	struct ran_conn *conn;
 
 	OSMO_ASSERT(mgcp_ctx);
 	trans = mgcp_ctx->trans;
@@ -487,7 +487,7 @@
 {
 	struct mgcp_ctx *mgcp_ctx = data;
 	struct gsm_trans *trans;
-	struct gsm_subscriber_connection *conn;
+	struct ran_conn *conn;
 
 	OSMO_ASSERT(mgcp_ctx);
 	trans = mgcp_ctx->trans;
@@ -548,7 +548,7 @@
 	struct mgcp_ctx *mgcp_ctx = data;
 	struct mgcp_client *mgcp;
 	struct gsm_trans *trans;
-	struct gsm_subscriber_connection *conn;
+	struct ran_conn *conn;
 	struct mgcp_msg mgcp_msg;
 	struct msgb *msg;
 	int rc;
@@ -631,7 +631,7 @@
 static void fsm_mdcx_cn_compl_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data)
 {
 	struct mgcp_ctx *mgcp_ctx = data;
-	struct gsm_subscriber_connection *conn;
+	struct ran_conn *conn;
 	struct gsm_trans *trans;
 
 	OSMO_ASSERT(mgcp_ctx);
@@ -667,7 +667,7 @@
 	struct mgcp_ctx *mgcp_ctx = data;
 	struct mgcp_client *mgcp;
 	struct gsm_trans *trans;
-	struct gsm_subscriber_connection *conn;
+	struct ran_conn *conn;
 	struct mgcp_msg mgcp_msg;
 	struct msgb *msg;
 	int rc;
@@ -959,7 +959,7 @@
 	struct mgcp_ctx *mgcp_ctx;
 	char name[32];
 	static bool fsm_registered = false;
-	struct gsm_subscriber_connection *conn;
+	struct ran_conn *conn;
 	struct mgcp_client *mgcp;
 
 	OSMO_ASSERT(trans);
@@ -1031,7 +1031,7 @@
  * port: port number of the remote leg.
  * addr: IP-address of the remote leg.
  * Returns -EINVAL on error, 0 on success. */
-int msc_mgcp_ass_complete(struct gsm_subscriber_connection *conn, uint16_t port, char *addr)
+int msc_mgcp_ass_complete(struct ran_conn *conn, uint16_t port, char *addr)
 {
 	struct mgcp_ctx *mgcp_ctx;
 
@@ -1081,7 +1081,7 @@
 int msc_mgcp_call_complete(struct gsm_trans *trans, uint16_t port, char *addr)
 {
 	struct mgcp_ctx *mgcp_ctx;
-	struct gsm_subscriber_connection *conn;
+	struct ran_conn *conn;
 
 	OSMO_ASSERT(trans);
 	OSMO_ASSERT(addr);
diff --git a/src/libmsc/msc_vty.c b/src/libmsc/msc_vty.c
index 4f3ac04..9c82713 100644
--- a/src/libmsc/msc_vty.c
+++ b/src/libmsc/msc_vty.c
@@ -489,7 +489,7 @@
 		VTY_NEWLINE);
 }
 
-static void vty_dump_one_conn(struct vty *vty, const struct gsm_subscriber_connection *conn)
+static void vty_dump_one_conn(struct vty *vty, const struct ran_conn *conn)
 {
 	vty_out(vty, "%08x %22s %3s %5u %3u %08x %c /%1u %27s %s",
 		conn->a.conn_id,
@@ -507,7 +507,7 @@
 DEFUN(show_msc_conn, show_msc_conn_cmd,
 	"show connection", SHOW_STR "Subscriber Connections\n")
 {
-	struct gsm_subscriber_connection *conn;
+	struct ran_conn *conn;
 
 	vty_conn_hdr(vty);
 	llist_for_each_entry(conn, &gsmnet->subscr_conns, entry)
@@ -628,7 +628,7 @@
 
 	/* Connection */
 	if (vsub->msc_conn_ref) {
-		struct gsm_subscriber_connection *conn = vsub->msc_conn_ref;
+		struct ran_conn *conn = vsub->msc_conn_ref;
 		vty_conn_hdr(vty);
 		vty_dump_one_conn(vty, conn);
 	}
@@ -1003,7 +1003,7 @@
       "Text of USSD message to send\n")
 {
 	char *text;
-	struct gsm_subscriber_connection *conn;
+	struct ran_conn *conn;
 	struct vlr_subscr *vsub = get_vsub_by_argv(gsmnet, argv[0], argv[1]);
 	int level;
 
@@ -1095,7 +1095,7 @@
       "Loop Type F\n"
       "Loop Type I\n")
 {
-	struct gsm_subscriber_connection *conn;
+	struct ran_conn *conn;
 	struct vlr_subscr *vsub = get_vsub_by_argv(gsmnet, argv[0], argv[1]);
 	const char *loop_str;
 	int loop_mode;
@@ -1128,7 +1128,7 @@
       SUBSCR_HELP "Send a TS 04.14 MS Test Command to subscriber\n"
       "Open a TCH Loop inside the MS\n")
 {
-	struct gsm_subscriber_connection *conn;
+	struct ran_conn *conn;
 	struct vlr_subscr *vsub = get_vsub_by_argv(gsmnet, argv[0], argv[1]);
 
 	if (!vsub) {
diff --git a/src/libmsc/osmo_msc.c b/src/libmsc/osmo_msc.c
index f2c84e6..1c45b32 100644
--- a/src/libmsc/osmo_msc.c
+++ b/src/libmsc/osmo_msc.c
@@ -79,7 +79,7 @@
 }
 
 /* Receive a SAPI-N-REJECT from BSC */
-void msc_sapi_n_reject(struct gsm_subscriber_connection *conn, int dlci)
+void msc_sapi_n_reject(struct ran_conn *conn, int dlci)
 {
 	int sapi = dlci & 0x7;
 
@@ -89,7 +89,7 @@
 
 /* receive a Level 3 Complete message and return MSC_CONN_ACCEPT or
  * MSC_CONN_REJECT */
-int msc_compl_l3(struct gsm_subscriber_connection *conn,
+int msc_compl_l3(struct ran_conn *conn,
 		 struct msgb *msg, uint16_t chosen_channel)
 {
 	msc_subscr_conn_get(conn, MSC_CONN_USE_COMPL_L3);
@@ -121,7 +121,7 @@
 }
 
 /* Receive a DTAP message from BSC */
-void msc_dtap(struct gsm_subscriber_connection *conn, struct msgb *msg)
+void msc_dtap(struct ran_conn *conn, struct msgb *msg)
 {
 	msc_subscr_conn_get(conn, MSC_CONN_USE_DTAP);
 	gsm0408_dispatch(conn, msg);
@@ -130,7 +130,7 @@
 }
 
 /* Receive an ASSIGNMENT COMPLETE from BSC */
-void msc_assign_compl(struct gsm_subscriber_connection *conn,
+void msc_assign_compl(struct ran_conn *conn,
 		      uint8_t rr_cause, uint8_t chosen_channel,
 		      uint8_t encr_alg_id, uint8_t speec)
 {
@@ -138,14 +138,14 @@
 }
 
 /* Receive an ASSIGNMENT FAILURE from BSC */
-void msc_assign_fail(struct gsm_subscriber_connection *conn,
+void msc_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 gsm_subscriber_connection *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)
 {
@@ -181,7 +181,7 @@
 }
 
 /* Receive a CIPHERING MODE COMPLETE from BSC */
-void msc_cipher_mode_compl(struct gsm_subscriber_connection *conn,
+void msc_cipher_mode_compl(struct ran_conn *conn,
 			   struct msgb *msg, uint8_t alg_id)
 {
 	struct vlr_ciph_result ciph_res = { .cause = VLR_CIPH_REJECT };
@@ -227,13 +227,13 @@
 }
 
 /* Receive a CLEAR REQUEST from BSC */
-int msc_clear_request(struct gsm_subscriber_connection *conn, uint32_t cause)
+int msc_clear_request(struct ran_conn *conn, uint32_t cause)
 {
 	msc_subscr_conn_close(conn, cause);
 	return 1;
 }
 
-static const char *used_ref_counts_str(struct gsm_subscriber_connection *conn)
+static const char *used_ref_counts_str(struct ran_conn *conn)
 {
 	static char buf[256];
 	int bit_nr;
@@ -265,8 +265,8 @@
 }
 
 /* increment the ref-count. Needs to be called by every user */
-struct gsm_subscriber_connection *
-_msc_subscr_conn_get(struct gsm_subscriber_connection *conn,
+struct ran_conn *
+_msc_subscr_conn_get(struct ran_conn *conn,
 		     enum msc_subscr_conn_use balance_token,
 		     const char *file, int line)
 {
@@ -293,7 +293,7 @@
 }
 
 /* decrement the ref-count. Once it reaches zero, we release */
-void _msc_subscr_conn_put(struct gsm_subscriber_connection *conn,
+void _msc_subscr_conn_put(struct ran_conn *conn,
 			  enum msc_subscr_conn_use balance_token,
 			  const char *file, int line)
 {
@@ -328,7 +328,7 @@
 		osmo_fsm_inst_dispatch(conn->fi, SUBSCR_CONN_E_UNUSED, NULL);
 }
 
-bool msc_subscr_conn_used_by(struct gsm_subscriber_connection *conn, enum msc_subscr_conn_use token)
+bool msc_subscr_conn_used_by(struct ran_conn *conn, enum msc_subscr_conn_use token)
 {
 	return conn && (conn->use_tokens & (1 << token));
 }
diff --git a/src/libmsc/rrlp.c b/src/libmsc/rrlp.c
index 2a5c1aa..c0747cd 100644
--- a/src/libmsc/rrlp.c
+++ b/src/libmsc/rrlp.c
@@ -58,7 +58,7 @@
 	return get_value_string(rrlp_mode_names, mode);
 }
 
-static int send_rrlp_req(struct gsm_subscriber_connection *conn)
+static int send_rrlp_req(struct ran_conn *conn)
 {
 	struct gsm_network *net = conn->network;
 	const uint8_t *req;
@@ -89,7 +89,7 @@
 			 void *handler_data, void *signal_data)
 {
 	struct vlr_subscr *vsub;
-	struct gsm_subscriber_connection *conn;
+	struct ran_conn *conn;
 
 	switch (signal) {
 	case S_SUBSCR_ATTACHED:
diff --git a/src/libmsc/silent_call.c b/src/libmsc/silent_call.c
index 9888894..a5ebe50 100644
--- a/src/libmsc/silent_call.c
+++ b/src/libmsc/silent_call.c
@@ -36,7 +36,7 @@
 static int paging_cb_silent(unsigned int hooknum, unsigned int event,
 			    struct msgb *msg, void *_conn, void *_data)
 {
-	struct gsm_subscriber_connection *conn = _conn;
+	struct ran_conn *conn = _conn;
 	struct scall_signal_data sigdata;
 	int rc = 0;
 
@@ -76,7 +76,7 @@
 
 #if 0
 /* receive a layer 3 message from a silent call */
-int silent_call_rx(struct gsm_subscriber_connection *conn, struct msgb *msg)
+int silent_call_rx(struct ran_conn *conn, struct msgb *msg)
 {
 	/* FIXME: do something like sending it through a UDP port */
 	LOGP(DLSMS, LOGL_NOTICE, "Discarding L3 message from a silent call.\n");
@@ -95,7 +95,7 @@
 };
 
 /* decide if we need to reroute a message as part of a silent call */
-int silent_call_reroute(struct gsm_subscriber_connection *conn, struct msgb *msg)
+int silent_call_reroute(struct ran_conn *conn, struct msgb *msg)
 {
 	struct gsm48_hdr *gh = msgb_l3(msg);
 	uint8_t pdisc = gsm48_hdr_pdisc(gh);
@@ -138,7 +138,7 @@
 /* end a silent call with a given subscriber */
 int gsm_silent_call_stop(struct vlr_subscr *vsub)
 {
-	struct gsm_subscriber_connection *conn;
+	struct ran_conn *conn;
 
 	conn = connection_for_subscr(vsub);
 	if (!conn) {
diff --git a/src/libmsc/smpp_openbsc.c b/src/libmsc/smpp_openbsc.c
index 051372c..10f3cfa 100644
--- a/src/libmsc/smpp_openbsc.c
+++ b/src/libmsc/smpp_openbsc.c
@@ -536,7 +536,7 @@
 
 void smpp_cmd_ack(struct osmo_smpp_cmd *cmd)
 {
-	struct gsm_subscriber_connection *conn;
+	struct ran_conn *conn;
 	struct gsm_trans *trans;
 
 	if (cmd->is_report)
@@ -562,7 +562,7 @@
 
 void smpp_cmd_err(struct osmo_smpp_cmd *cmd, uint32_t status)
 {
-	struct gsm_subscriber_connection *conn;
+	struct ran_conn *conn;
 	struct gsm_trans *trans;
 	int gsm411_cause;
 
@@ -636,7 +636,7 @@
 }
 
 static int deliver_to_esme(struct osmo_esme *esme, struct gsm_sms *sms,
-			   struct gsm_subscriber_connection *conn)
+			   struct ran_conn *conn)
 {
 	struct deliver_sm_t deliver;
 	int mode, ret;
@@ -731,13 +731,13 @@
 
 static struct smsc *g_smsc;
 
-int smpp_route_smpp_first(struct gsm_sms *sms, struct gsm_subscriber_connection *conn)
+int smpp_route_smpp_first(struct gsm_sms *sms, struct ran_conn *conn)
 {
 	return g_smsc->smpp_first;
 }
 
 int smpp_try_deliver(struct gsm_sms *sms,
-		     struct gsm_subscriber_connection *conn)
+		     struct ran_conn *conn)
 {
 	struct osmo_esme *esme;
 	struct osmo_smpp_addr dst;
diff --git a/src/libmsc/smpp_smsc.h b/src/libmsc/smpp_smsc.h
index 755e685..27a2646 100644
--- a/src/libmsc/smpp_smsc.h
+++ b/src/libmsc/smpp_smsc.h
@@ -158,10 +158,10 @@
 
 
 struct gsm_sms;
-struct gsm_subscriber_connection;
+struct ran_conn;
 
 int smpp_route_smpp_first(struct gsm_sms *sms,
-			    struct gsm_subscriber_connection *conn);
+			    struct ran_conn *conn);
 int smpp_try_deliver(struct gsm_sms *sms,
-		     struct gsm_subscriber_connection *conn);
+		     struct ran_conn *conn);
 #endif
diff --git a/src/libmsc/subscr_conn.c b/src/libmsc/subscr_conn.c
index e6fa7e1..69bab25 100644
--- a/src/libmsc/subscr_conn.c
+++ b/src/libmsc/subscr_conn.c
@@ -57,7 +57,7 @@
 
 static void update_counters(struct osmo_fsm_inst *fi, bool conn_accepted)
 {
-	struct gsm_subscriber_connection *conn = fi->priv;
+	struct ran_conn *conn = fi->priv;
 	switch (conn->complete_layer3_type) {
 	case COMPLETE_LAYER3_LU:
 		rate_ctr_inc(&conn->network->msc_ctrs->ctr[
@@ -81,7 +81,7 @@
 
 static void evaluate_acceptance_outcome(struct osmo_fsm_inst *fi, bool conn_accepted)
 {
-	struct gsm_subscriber_connection *conn = fi->priv;
+	struct ran_conn *conn = fi->priv;
 
 	update_counters(fi, conn_accepted);
 
@@ -164,7 +164,7 @@
 	}
 }
 
-int msc_classmark_request_then_cipher_mode_cmd(struct gsm_subscriber_connection *conn, bool umts_aka,
+int msc_classmark_request_then_cipher_mode_cmd(struct ran_conn *conn, bool umts_aka,
 					       bool retrieve_imeisv)
 {
 	int rc;
@@ -184,7 +184,7 @@
 
 static void subscr_conn_fsm_wait_classmark_update(struct osmo_fsm_inst *fi, uint32_t event, void *data)
 {
-	struct gsm_subscriber_connection *conn = fi->priv;
+	struct ran_conn *conn = fi->priv;
 	switch (event) {
 	case SUBSCR_CONN_E_CLASSMARK_UPDATE:
 		/* Theoretically, this event can be used for requesting Classmark in various situations.
@@ -226,7 +226,7 @@
 
 static bool subscr_conn_fsm_has_active_transactions(struct osmo_fsm_inst *fi)
 {
-	struct gsm_subscriber_connection *conn = fi->priv;
+	struct ran_conn *conn = fi->priv;
 	struct gsm_trans *trans;
 
 	if (conn->silent_call) {
@@ -263,7 +263,7 @@
 
 static void subscr_conn_fsm_accepted_enter(struct osmo_fsm_inst *fi, uint32_t prev_state)
 {
-	struct gsm_subscriber_connection *conn = fi->priv;
+	struct ran_conn *conn = fi->priv;
 
 	/* Stop Location Update expiry for this subscriber. While the subscriber
 	 * has an open connection the LU expiry timer must remain disabled.
@@ -324,7 +324,7 @@
 
 static int subscr_conn_fsm_timeout(struct osmo_fsm_inst *fi)
 {
-	struct gsm_subscriber_connection *conn = fi->priv;
+	struct ran_conn *conn = fi->priv;
 	if (msc_subscr_conn_in_release(conn)) {
 		LOGPFSML(fi, LOGL_ERROR, "Timeout while releasing, discarding right now\n");
 		osmo_fsm_inst_term(fi, OSMO_FSM_TERM_TIMEOUT, NULL);
@@ -337,7 +337,7 @@
 
 static void subscr_conn_fsm_releasing_onenter(struct osmo_fsm_inst *fi, uint32_t prev_state)
 {
-	struct gsm_subscriber_connection *conn = fi->priv;
+	struct ran_conn *conn = fi->priv;
 
 	/* 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
@@ -397,7 +397,7 @@
 
 static void subscr_conn_fsm_released(struct osmo_fsm_inst *fi, uint32_t prev_state)
 {
-	/* Terminate, deallocate and also deallocate the gsm_subscriber_connection, which is allocated as
+	/* Terminate, deallocate and also deallocate the ran_conn, which is allocated as
 	 * a talloc child of fi. Also calls the cleanup function. */
 	osmo_fsm_inst_term(fi, OSMO_FSM_TERM_REGULAR, NULL);
 }
@@ -492,7 +492,7 @@
 	.timer_cb = subscr_conn_fsm_timeout,
 };
 
-char *msc_subscr_conn_get_conn_id(struct gsm_subscriber_connection *conn)
+char *msc_subscr_conn_get_conn_id(struct ran_conn *conn)
 {
 	char *id;
 
@@ -514,7 +514,7 @@
 /* Tidy up before the FSM deallocates */
 static void subscr_conn_fsm_cleanup(struct osmo_fsm_inst *fi, enum osmo_fsm_term_cause cause)
 {
-	struct gsm_subscriber_connection *conn = fi->priv;
+	struct ran_conn *conn = fi->priv;
 
 	if (subscr_conn_fsm_has_active_transactions(fi))
 		LOGPFSML(fi, LOGL_ERROR, "Deallocating despite active transactions\n");
@@ -537,14 +537,14 @@
 }
 
 /* Signal success of Complete Layer 3. Allow to keep the conn open for Auth and Ciph. */
-void msc_subscr_conn_complete_layer_3(struct gsm_subscriber_connection *conn)
+void msc_subscr_conn_complete_layer_3(struct ran_conn *conn)
 {
 	if (!conn)
 		return;
 	osmo_fsm_inst_dispatch(conn->fi, SUBSCR_CONN_E_COMPLETE_LAYER_3, NULL);
 }
 
-void subscr_conn_release_when_unused(struct gsm_subscriber_connection *conn)
+void subscr_conn_release_when_unused(struct ran_conn *conn)
 {
 	if (!conn)
 		return;
@@ -563,7 +563,7 @@
 	osmo_fsm_inst_dispatch(conn->fi, SUBSCR_CONN_E_RELEASE_WHEN_UNUSED, NULL);
 }
 
-static void conn_close(struct gsm_subscriber_connection *conn, uint32_t cause, uint32_t event)
+static void conn_close(struct ran_conn *conn, uint32_t cause, uint32_t event)
 {
 	if (!conn) {
 		LOGP(DMM, LOGL_ERROR, "Cannot release NULL connection\n");
@@ -577,17 +577,17 @@
 	osmo_fsm_inst_dispatch(conn->fi, event, &cause);
 }
 
-void msc_subscr_conn_close(struct gsm_subscriber_connection *conn, uint32_t cause)
+void msc_subscr_conn_close(struct ran_conn *conn, uint32_t cause)
 {
 	return conn_close(conn, cause, SUBSCR_CONN_E_CN_CLOSE);
 }
 
-void msc_subscr_conn_mo_close(struct gsm_subscriber_connection *conn, uint32_t cause)
+void msc_subscr_conn_mo_close(struct ran_conn *conn, uint32_t cause)
 {
 	return conn_close(conn, cause, SUBSCR_CONN_E_MO_CLOSE);
 }
 
-bool msc_subscr_conn_in_release(struct gsm_subscriber_connection *conn)
+bool msc_subscr_conn_in_release(struct ran_conn *conn)
 {
 	if (!conn || !conn->fi)
 		return true;
@@ -598,7 +598,7 @@
 	return false;
 }
 
-bool msc_subscr_conn_is_accepted(const struct gsm_subscriber_connection *conn)
+bool msc_subscr_conn_is_accepted(const struct ran_conn *conn)
 {
 	if (!conn)
 		return false;
@@ -612,7 +612,7 @@
 
 /* Indicate that *some* communication is happening with the phone, so that the conn FSM no longer times
  * out to release within a few seconds. */
-void msc_subscr_conn_communicating(struct gsm_subscriber_connection *conn)
+void msc_subscr_conn_communicating(struct ran_conn *conn)
 {
 	osmo_fsm_inst_dispatch(conn->fi, SUBSCR_CONN_E_COMMUNICATING, NULL);
 }
@@ -627,10 +627,10 @@
  * SUBSCR_CONN_E_RELEASE_COMPLETE event is dispatched, the FSM terminates and deallocates both FSM and
  * conn. As long as the FSM is waiting for responses from the subscriber, it will itself hold a use count
  * on the conn. */
-struct gsm_subscriber_connection *msc_subscr_conn_alloc(struct gsm_network *network,
+struct ran_conn *msc_subscr_conn_alloc(struct gsm_network *network,
 							enum ran_type via_ran, uint16_t lac)
 {
-	struct gsm_subscriber_connection *conn;
+	struct ran_conn *conn;
 	struct osmo_fsm_inst *fi;
 
 	fi = osmo_fsm_inst_alloc(&subscr_conn_fsm, network, NULL, LOGL_DEBUG, NULL);
@@ -639,13 +639,13 @@
 		return NULL;
 	}
 
-	conn = talloc_zero(fi, struct gsm_subscriber_connection);
+	conn = talloc_zero(fi, struct ran_conn);
 	if (!conn) {
 		osmo_fsm_inst_free(fi);
 		return NULL;
 	}
 
-	*conn = (struct gsm_subscriber_connection){
+	*conn = (struct ran_conn){
 		.network = network,
 		.via_ran = via_ran,
 		.lac = lac,
@@ -657,7 +657,7 @@
 	return conn;
 }
 
-bool msc_subscr_conn_is_establishing_auth_ciph(const struct gsm_subscriber_connection *conn)
+bool msc_subscr_conn_is_establishing_auth_ciph(const struct ran_conn *conn)
 {
 	if (!conn)
 		return false;
@@ -673,7 +673,7 @@
 	{ 0, NULL }
 };
 
-void msc_subscr_conn_update_id(struct gsm_subscriber_connection *conn,
+void msc_subscr_conn_update_id(struct ran_conn *conn,
 			       enum complete_layer3_type from, const char *id)
 {
        conn->complete_layer3_type = from;
@@ -681,7 +681,7 @@
        LOGPFSML(conn->fi, LOGL_DEBUG, "Updated ID\n");
 }
 
-static void rx_close_complete(struct gsm_subscriber_connection *conn, const char *label, bool *flag)
+static void rx_close_complete(struct ran_conn *conn, const char *label, bool *flag)
 {
 	if (!conn)
 		return;
@@ -698,12 +698,12 @@
 	}
 }
 
-void msc_subscr_conn_rx_bssmap_clear_complete(struct gsm_subscriber_connection *conn)
+void msc_subscr_conn_rx_bssmap_clear_complete(struct ran_conn *conn)
 {
 	rx_close_complete(conn, "BSSMAP Clear Complete", &conn->a.waiting_for_clear_complete);
 }
 
-void msc_subscr_conn_rx_iu_release_complete(struct gsm_subscriber_connection *conn)
+void msc_subscr_conn_rx_iu_release_complete(struct ran_conn *conn)
 {
 	rx_close_complete(conn, "Iu Release Complete", &conn->iu.waiting_for_release_complete);
 }
diff --git a/src/libmsc/transaction.c b/src/libmsc/transaction.c
index cffbe0d..51263e1 100644
--- a/src/libmsc/transaction.c
+++ b/src/libmsc/transaction.c
@@ -40,7 +40,7 @@
  * \param[in] trans_id Transaction ID of transaction
  * \returns Matching transaction, if any
  */
-struct gsm_trans *trans_find_by_id(struct gsm_subscriber_connection *conn,
+struct gsm_trans *trans_find_by_id(struct ran_conn *conn,
 				   uint8_t proto, uint8_t trans_id)
 {
 	struct gsm_trans *trans;
@@ -78,7 +78,7 @@
  * \param[in] sm_rp_mr RP Message Reference (see GSM TS 04.11, section 8.2.3)
  * \returns Matching transaction, NULL otherwise
  */
-struct gsm_trans *trans_find_by_sm_rp_mr(struct gsm_subscriber_connection *conn,
+struct gsm_trans *trans_find_by_sm_rp_mr(struct ran_conn *conn,
 					 uint8_t sm_rp_mr)
 {
 	struct gsm_network *net = conn->network;
@@ -141,7 +141,7 @@
 void trans_free(struct gsm_trans *trans)
 {
 	enum msc_subscr_conn_use conn_usage_token = MSC_CONN_USE_UNTRACKED;
-	struct gsm_subscriber_connection *conn;
+	struct ran_conn *conn;
 
 	switch (trans->protocol) {
 	case GSM48_PDISC_CC:
@@ -220,7 +220,7 @@
  * \param[in] conn Connection to check
  * \returns 1 in case there is a transaction, 0 otherwise
  */
-struct gsm_trans *trans_has_conn(const struct gsm_subscriber_connection *conn)
+struct gsm_trans *trans_has_conn(const struct ran_conn *conn)
 {
 	struct gsm_trans *trans;
 
@@ -236,7 +236,7 @@
  * facilities, which will then send the necessary release indications.
  * \param[in] conn Connection that is going to be closed.
  */
-void trans_conn_closed(struct gsm_subscriber_connection *conn)
+void trans_conn_closed(struct ran_conn *conn)
 {
 	struct gsm_trans *trans;
 
diff --git a/tests/msc_vlr/msc_vlr_test_reject_concurrency.c b/tests/msc_vlr/msc_vlr_test_reject_concurrency.c
index d206571..fcc8db7 100644
--- a/tests/msc_vlr/msc_vlr_test_reject_concurrency.c
+++ b/tests/msc_vlr/msc_vlr_test_reject_concurrency.c
@@ -25,7 +25,7 @@
 
 static void test_reject_2nd_conn()
 {
-	struct gsm_subscriber_connection *conn1;
+	struct ran_conn *conn1;
 	comment_start();
 
 	btw("Location Update Request on one connection");
diff --git a/tests/msc_vlr/msc_vlr_tests.c b/tests/msc_vlr/msc_vlr_tests.c
index 01f5974..9e7e518 100644
--- a/tests/msc_vlr/msc_vlr_tests.c
+++ b/tests/msc_vlr/msc_vlr_tests.c
@@ -161,9 +161,9 @@
 		OSMO_ASSERT(gsup_tx_confirmed);
 }
 
-bool conn_exists(const struct gsm_subscriber_connection *conn)
+bool conn_exists(const struct ran_conn *conn)
 {
-	struct gsm_subscriber_connection *c;
+	struct ran_conn *c;
 
 	if (!conn)
 		return false;
@@ -177,7 +177,7 @@
 }
 
 /* Simplified version of the cm_service_request_concludes() */
-void conn_conclude_cm_service_req(struct gsm_subscriber_connection *conn,
+void conn_conclude_cm_service_req(struct ran_conn *conn,
 				  enum ran_type via_ran)
 {
 	btw("Concluding CM Service Request");
@@ -193,9 +193,9 @@
 
 enum ran_type rx_from_ran = RAN_GERAN_A;
 
-struct gsm_subscriber_connection *conn_new(void)
+struct ran_conn *conn_new(void)
 {
-	struct gsm_subscriber_connection *conn;
+	struct ran_conn *conn;
 	conn = msc_subscr_conn_alloc(net, rx_from_ran, 23);
 	if (conn->via_ran == RAN_UTRAN_IU) {
 		struct ranap_ue_conn_ctx *ue_ctx = talloc_zero(conn, struct ranap_ue_conn_ctx);
@@ -207,7 +207,7 @@
 	return conn;
 }
 
-struct gsm_subscriber_connection *g_conn = NULL;
+struct ran_conn *g_conn = NULL;
 
 void rx_from_ms(struct msgb *msg)
 {
@@ -643,8 +643,8 @@
 }
 
 /* override, requires '-Wl,--wrap=a_iface_tx_clear_cmd' */
-int __real_a_iface_tx_clear_cmd(struct gsm_subscriber_connection *conn);
-int __wrap_a_iface_tx_clear_cmd(struct gsm_subscriber_connection *conn)
+int __real_a_iface_tx_clear_cmd(struct ran_conn *conn);
+int __wrap_a_iface_tx_clear_cmd(struct ran_conn *conn)
 {
 	btw("BSSAP Clear --%s--> MS", ran_type_name(RAN_GERAN_A));
 	OSMO_ASSERT(bssap_clear_expected);
@@ -679,7 +679,7 @@
 
 static int fake_vlr_tx_lu_acc(void *msc_conn_ref, uint32_t send_tmsi)
 {
-	struct gsm_subscriber_connection *conn = msc_conn_ref;
+	struct ran_conn *conn = msc_conn_ref;
 	if (send_tmsi == GSM_RESERVED_TMSI)
 		btw("sending LU Accept for %s", vlr_subscr_name(conn->vsub));
 	else
@@ -691,7 +691,7 @@
 
 static int fake_vlr_tx_lu_rej(void *msc_conn_ref, enum gsm48_reject_value cause)
 {
-	struct gsm_subscriber_connection *conn = msc_conn_ref;
+	struct ran_conn *conn = msc_conn_ref;
 	btw("sending LU Reject for %s, cause %u", vlr_subscr_name(conn->vsub), cause);
 	lu_result_sent |= RES_REJECT;
 	return 0;
@@ -699,7 +699,7 @@
 
 static int fake_vlr_tx_cm_serv_acc(void *msc_conn_ref)
 {
-	struct gsm_subscriber_connection *conn = msc_conn_ref;
+	struct ran_conn *conn = msc_conn_ref;
 	btw("sending CM Service Accept for %s", vlr_subscr_name(conn->vsub));
 	cm_service_result_sent |= RES_ACCEPT;
 	return 0;
@@ -707,7 +707,7 @@
 
 static int fake_vlr_tx_cm_serv_rej(void *msc_conn_ref, enum gsm48_reject_value cause)
 {
-	struct gsm_subscriber_connection *conn = msc_conn_ref;
+	struct ran_conn *conn = msc_conn_ref;
 	btw("sending CM Service Reject for %s, cause: %s",
 	    vlr_subscr_name(conn->vsub), gsm48_reject_value_name(cause));
 	cm_service_result_sent |= RES_REJECT;
@@ -717,7 +717,7 @@
 static int fake_vlr_tx_auth_req(void *msc_conn_ref, struct gsm_auth_tuple *at,
 				bool send_autn)
 {
-	struct gsm_subscriber_connection *conn = msc_conn_ref;
+	struct ran_conn *conn = msc_conn_ref;
 	char *hex;
 	bool ok = true;
 	btw("sending %s Auth Request for %s: tuple use_count=%d key_seq=%d auth_types=0x%x and...",
@@ -761,15 +761,15 @@
 
 static int fake_vlr_tx_auth_rej(void *msc_conn_ref)
 {
-	struct gsm_subscriber_connection *conn = msc_conn_ref;
+	struct ran_conn *conn = msc_conn_ref;
 	btw("sending Auth Reject for %s", vlr_subscr_name(conn->vsub));
 	return 0;
 }
 
 /* override, requires '-Wl,--wrap=a_iface_tx_cipher_mode' */
-int __real_a_iface_tx_cipher_mode(const struct gsm_subscriber_connection *conn,
+int __real_a_iface_tx_cipher_mode(const struct ran_conn *conn,
 				  struct gsm0808_encrypt_info *ei, int include_imeisv);
-int __wrap_a_iface_tx_cipher_mode(const struct gsm_subscriber_connection *conn,
+int __wrap_a_iface_tx_cipher_mode(const struct ran_conn *conn,
 				  struct gsm0808_encrypt_info *ei, int include_imeisv)
 {
 	int i;
@@ -824,7 +824,7 @@
 #ifndef BUILD_IU
 	/* If we built without support for IU, fake the IU part here. The root cause is that we don't
 	 * have differing sets of expected outputs for --enable-iu and --disable-iu. */
-	struct gsm_subscriber_connection *conn = msc_conn_ref;
+	struct ran_conn *conn = msc_conn_ref;
 	if (conn->via_ran == RAN_UTRAN_IU) {
 		DEBUGP(DMM, "-> SECURITY MODE CONTROL %s\n", vlr_subscr_name(conn->vsub));
 		rc = __wrap_ranap_iu_tx_sec_mode_cmd(conn->iu.ue_ctx, &conn->vsub->last_tuple->vec,
diff --git a/tests/msc_vlr/msc_vlr_tests.h b/tests/msc_vlr/msc_vlr_tests.h
index 40377c1..fd9ec91 100644
--- a/tests/msc_vlr/msc_vlr_tests.h
+++ b/tests/msc_vlr/msc_vlr_tests.h
@@ -49,7 +49,7 @@
 #define comment_start() fprintf(stderr, "===== %s\n", __func__);
 #define comment_end() fprintf(stderr, "===== %s: SUCCESS\n\n", __func__);
 
-extern struct gsm_subscriber_connection *g_conn;
+extern struct ran_conn *g_conn;
 extern struct gsm_network *net;
 extern struct gsm_bts *the_bts;
 extern void *msgb_ctx;
@@ -152,8 +152,8 @@
 struct msgb *msgb_from_hex(const char *label, uint16_t size, const char *hex);
 
 void clear_vlr();
-bool conn_exists(const struct gsm_subscriber_connection *conn);
-void conn_conclude_cm_service_req(struct gsm_subscriber_connection *conn,
+bool conn_exists(const struct ran_conn *conn);
+void conn_conclude_cm_service_req(struct ran_conn *conn,
 				  enum ran_type via_ran);
 
 void dtap_expect_tx(const char *hex);

-- 
To view, visit https://gerrit.osmocom.org/12015
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic595f7a558d3553c067f77dc67543ab59659707a
Gerrit-Change-Number: 12015
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20181129/b6353700/attachment-0001.html>


More information about the gerrit-log mailing list