[PATCH] openbsc[master]: cosmetic: rename struct osmo_msc_data to bsc_msc_data

Neels Hofmeyr gerrit-no-reply at lists.osmocom.org
Thu Feb 23 21:03:42 UTC 2017


Review at  https://gerrit.osmocom.org/1892

cosmetic: rename struct osmo_msc_data to bsc_msc_data

With the OsmoMSC program coming up, the name osmo_msc_data becomes even
more confusing than it already is. Clearly indicate it as libbsc's data of
a remote MSC by prefixing with bsc_.

Also, the Osmocom community has in the meantime agreed to have the osmo_
prefix only in libosmocore, to avoid naming conflicts in case things are
moved there. So while renaming anyway, also drop the osmo_ prefix.

Change-Id: I0dfbcb7d1a579211180f71319982820d8700afab
---
M openbsc/include/openbsc/bsc_msc_data.h
M openbsc/include/openbsc/osmo_bsc.h
M openbsc/include/openbsc/osmo_bsc_grace.h
M openbsc/include/openbsc/signal.h
M openbsc/src/osmo-bsc/osmo_bsc_api.c
M openbsc/src/osmo-bsc/osmo_bsc_bssap.c
M openbsc/src/osmo-bsc/osmo_bsc_ctrl.c
M openbsc/src/osmo-bsc/osmo_bsc_filter.c
M openbsc/src/osmo-bsc/osmo_bsc_grace.c
M openbsc/src/osmo-bsc/osmo_bsc_main.c
M openbsc/src/osmo-bsc/osmo_bsc_msc.c
M openbsc/src/osmo-bsc/osmo_bsc_sccp.c
M openbsc/src/osmo-bsc/osmo_bsc_vty.c
M openbsc/tests/bsc/bsc_test.c
14 files changed, 107 insertions(+), 107 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/92/1892/1

diff --git a/openbsc/include/openbsc/bsc_msc_data.h b/openbsc/include/openbsc/bsc_msc_data.h
index 3168d91..38e87cf 100644
--- a/openbsc/include/openbsc/bsc_msc_data.h
+++ b/openbsc/include/openbsc/bsc_msc_data.h
@@ -49,7 +49,7 @@
 
 /*! /brief Information on a remote MSC for libbsc.
  */
-struct osmo_msc_data {
+struct bsc_msc_data {
 	struct llist_head entry;
 
 	/* Back pointer */
@@ -128,15 +128,15 @@
 };
 
 
-int osmo_bsc_msc_init(struct osmo_msc_data *msc);
+int osmo_bsc_msc_init(struct bsc_msc_data *msc);
 int osmo_bsc_sccp_init(struct gsm_network *gsmnet);
 int msc_queue_write(struct bsc_msc_connection *conn, struct msgb *msg, int proto);
 int msc_queue_write_with_ping(struct bsc_msc_connection *, struct msgb *msg, int proto);
 
 int osmo_bsc_audio_init(struct gsm_network *network);
 
-struct osmo_msc_data *osmo_msc_data_find(struct gsm_network *, int);
-struct osmo_msc_data *osmo_msc_data_alloc(struct gsm_network *, int);
+struct bsc_msc_data *osmo_msc_data_find(struct gsm_network *, int);
+struct bsc_msc_data *osmo_msc_data_alloc(struct gsm_network *, int);
 
 
 #endif
diff --git a/openbsc/include/openbsc/osmo_bsc.h b/openbsc/include/openbsc/osmo_bsc.h
index fd5303d..9e688fd 100644
--- a/openbsc/include/openbsc/osmo_bsc.h
+++ b/openbsc/include/openbsc/osmo_bsc.h
@@ -16,7 +16,7 @@
 };
 
 struct sccp_connection;
-struct osmo_msc_data;
+struct bsc_msc_data;
 struct bsc_msc_connection;
 
 struct osmo_bsc_sccp_con {
@@ -33,7 +33,7 @@
 
 	/* SCCP connection realted */
 	struct sccp_connection *sccp;
-	struct osmo_msc_data *msc;
+	struct bsc_msc_data *msc;
 	struct osmo_timer_list sccp_it_timeout;
 	struct osmo_timer_list sccp_cc_timeout;
 
@@ -51,15 +51,15 @@
 int bsc_queue_for_msc(struct osmo_bsc_sccp_con *conn, struct msgb *msg);
 int bsc_open_connection(struct osmo_bsc_sccp_con *sccp, struct msgb *msg);
 enum bsc_con bsc_create_new_connection(struct gsm_subscriber_connection *conn,
-				       struct osmo_msc_data *msc, int send_ping);
+				       struct bsc_msc_data *msc, int send_ping);
 int bsc_delete_connection(struct osmo_bsc_sccp_con *sccp);
 
-struct osmo_msc_data *bsc_find_msc(struct gsm_subscriber_connection *conn, struct msgb *);
+struct bsc_msc_data *bsc_find_msc(struct gsm_subscriber_connection *conn, struct msgb *);
 int bsc_scan_bts_msg(struct gsm_subscriber_connection *conn, struct msgb *msg);
 int bsc_scan_msc_msg(struct gsm_subscriber_connection *conn, struct msgb *msg);
 int bsc_send_welcome_ussd(struct gsm_subscriber_connection *conn);
 
-int bsc_handle_udt(struct osmo_msc_data *msc, struct msgb *msg, unsigned int length);
+int bsc_handle_udt(struct bsc_msc_data *msc, struct msgb *msg, unsigned int length);
 int bsc_handle_dt1(struct osmo_bsc_sccp_con *conn, struct msgb *msg, unsigned int len);
 
 int bsc_ctrl_cmds_install();
diff --git a/openbsc/include/openbsc/osmo_bsc_grace.h b/openbsc/include/openbsc/osmo_bsc_grace.h
index af77b2f..ea5e4e2 100644
--- a/openbsc/include/openbsc/osmo_bsc_grace.h
+++ b/openbsc/include/openbsc/osmo_bsc_grace.h
@@ -23,9 +23,9 @@
 
 #include <openbsc/gsm_data.h>
 
-struct osmo_msc_data;
+struct bsc_msc_data;
 
 int bsc_grace_allow_new_connection(struct gsm_network *net, struct gsm_bts *bts);
-int bsc_grace_paging_request(struct gsm_subscriber *sub, int type, struct osmo_msc_data *msc);
+int bsc_grace_paging_request(struct gsm_subscriber *sub, int type, struct bsc_msc_data *msc);
 
 #endif
diff --git a/openbsc/include/openbsc/signal.h b/openbsc/include/openbsc/signal.h
index 8f27b38..be154a4 100644
--- a/openbsc/include/openbsc/signal.h
+++ b/openbsc/include/openbsc/signal.h
@@ -223,9 +223,9 @@
 	S_MSC_AUTHENTICATED,
 };
 
-struct osmo_msc_data;
+struct bsc_msc_data;
 struct msc_signal_data {
-	struct osmo_msc_data *data;
+	struct bsc_msc_data *data;
 };
 
 /* SS_CCCH signals */
diff --git a/openbsc/src/osmo-bsc/osmo_bsc_api.c b/openbsc/src/osmo-bsc/osmo_bsc_api.c
index c3d1384..bac5e47 100644
--- a/openbsc/src/osmo-bsc/osmo_bsc_api.c
+++ b/openbsc/src/osmo-bsc/osmo_bsc_api.c
@@ -49,30 +49,30 @@
 
 static int bsc_clear_request(struct gsm_subscriber_connection *conn, uint32_t cause);
 static int complete_layer3(struct gsm_subscriber_connection *conn,
-			   struct msgb *msg, struct osmo_msc_data *msc);
+			   struct msgb *msg, struct bsc_msc_data *msc);
 
-static uint16_t get_network_code_for_msc(struct osmo_msc_data *msc)
+static uint16_t get_network_code_for_msc(struct bsc_msc_data *msc)
 {
 	if (msc->core_mnc != -1)
 		return msc->core_mnc;
 	return msc->network->network_code;
 }
 
-static uint16_t get_country_code_for_msc(struct osmo_msc_data *msc)
+static uint16_t get_country_code_for_msc(struct bsc_msc_data *msc)
 {
 	if (msc->core_mcc != -1)
 		return msc->core_mcc;
 	return msc->network->country_code;
 }
 
-static uint16_t get_lac_for_msc(struct osmo_msc_data *msc, struct gsm_bts *bts)
+static uint16_t get_lac_for_msc(struct bsc_msc_data *msc, struct gsm_bts *bts)
 {
 	if (msc->core_lac != -1)
 		return msc->core_lac;
 	return bts->location_area_code;
 }
 
-static uint16_t get_ci_for_msc(struct osmo_msc_data *msc, struct gsm_bts *bts)
+static uint16_t get_ci_for_msc(struct bsc_msc_data *msc, struct gsm_bts *bts)
 {
 	if (msc->core_ci != -1)
 		return msc->core_ci;
@@ -98,7 +98,7 @@
 }
 
 static int bsc_filter_initial(struct osmo_bsc_data *bsc,
-				struct osmo_msc_data *msc,
+				struct bsc_msc_data *msc,
 				struct gsm_subscriber_connection *conn,
 				struct msgb *msg, char **imsi, int *con_type,
 				int *lu_cause)
@@ -216,7 +216,7 @@
 static int bsc_compl_l3(struct gsm_subscriber_connection *conn, struct msgb *msg,
 			uint16_t chosen_channel)
 {
-	struct osmo_msc_data *msc;
+	struct bsc_msc_data *msc;
 
 	LOGP(DMSC, LOGL_INFO, "Tx MSC COMPL L3\n");
 
@@ -233,7 +233,7 @@
 }
 
 static int complete_layer3(struct gsm_subscriber_connection *conn,
-			   struct msgb *msg, struct osmo_msc_data *msc)
+			   struct msgb *msg, struct bsc_msc_data *msc)
 {
 	int con_type, rc, lu_cause;
 	char *imsi = NULL;
@@ -310,7 +310,7 @@
  * Plastic surgery... we want to give up the current connection
  */
 static int move_to_msc(struct gsm_subscriber_connection *_conn,
-		       struct msgb *msg, struct osmo_msc_data *msc)
+		       struct msgb *msg, struct bsc_msc_data *msc)
 {
 	struct osmo_bsc_sccp_con *old_con = _conn->sccp_con;
 
@@ -344,7 +344,7 @@
 	uint8_t pdisc = gsm48_hdr_pdisc(gh);
 	uint8_t mtype = gsm48_hdr_msg_type(gh);
 
-	struct osmo_msc_data *msc;
+	struct bsc_msc_data *msc;
 	struct gsm_mncc_number called;
 	struct tlv_parsed tp;
 	unsigned payload_len;
@@ -493,7 +493,7 @@
 static void bsc_mr_config(struct gsm_subscriber_connection *conn,
 				struct gsm_lchan *lchan, int full_rate)
 {
-	struct osmo_msc_data *msc;
+	struct bsc_msc_data *msc;
 	struct gsm48_multi_rate_conf *ms_conf, *bts_conf;
 
 	if (!conn->sccp_con) {
diff --git a/openbsc/src/osmo-bsc/osmo_bsc_bssap.c b/openbsc/src/osmo-bsc/osmo_bsc_bssap.c
index 67325b3..dcfef40 100644
--- a/openbsc/src/osmo-bsc/osmo_bsc_bssap.c
+++ b/openbsc/src/osmo-bsc/osmo_bsc_bssap.c
@@ -88,7 +88,7 @@
 	return GSM48_CMODE_SPEECH_AMR;
 }
 
-static int bssmap_handle_reset_ack(struct osmo_msc_data *msc,
+static int bssmap_handle_reset_ack(struct bsc_msc_data *msc,
 				   struct msgb *msg, unsigned int length)
 {
 	LOGP(DMSC, LOGL_NOTICE, "Reset ACK from MSC\n");
@@ -96,7 +96,7 @@
 }
 
 /* GSM 08.08 § 3.2.1.19 */
-static int bssmap_handle_paging(struct osmo_msc_data *msc,
+static int bssmap_handle_paging(struct bsc_msc_data *msc,
 				struct msgb *msg, unsigned int payload_length)
 {
 	struct gsm_subscriber *subscr;
@@ -286,7 +286,7 @@
 				     struct msgb *msg, unsigned int length)
 {
 	struct msgb *resp;
-	struct osmo_msc_data *msc;
+	struct bsc_msc_data *msc;
 	struct tlv_parsed tp;
 	uint8_t *data;
 	uint8_t timeslot;
@@ -384,7 +384,7 @@
 	return -1;
 }
 
-static int bssmap_rcvmsg_udt(struct osmo_msc_data *msc,
+static int bssmap_rcvmsg_udt(struct bsc_msc_data *msc,
 			     struct msgb *msg, unsigned int length)
 {
 	int ret = 0;
@@ -491,7 +491,7 @@
 	return dtap_rc;
 }
 
-int bsc_handle_udt(struct osmo_msc_data *msc,
+int bsc_handle_udt(struct bsc_msc_data *msc,
 		   struct msgb *msgb, unsigned int length)
 {
 	struct bssmap_header *bs;
diff --git a/openbsc/src/osmo-bsc/osmo_bsc_ctrl.c b/openbsc/src/osmo-bsc/osmo_bsc_ctrl.c
index ffde1b8..c23ed21 100644
--- a/openbsc/src/osmo-bsc/osmo_bsc_ctrl.c
+++ b/openbsc/src/osmo-bsc/osmo_bsc_ctrl.c
@@ -40,9 +40,9 @@
 {
 	struct ctrl_cmd *trap;
 	struct ctrl_handle *ctrl;
-	struct osmo_msc_data *msc_data;
+	struct bsc_msc_data *msc_data;
 
-	msc_data = (struct osmo_msc_data *) msc_con->write_queue.bfd.data;
+	msc_data = (struct bsc_msc_data *) msc_con->write_queue.bfd.data;
 	ctrl = msc_data->network->ctrl;
 
 	trap = ctrl_cmd_trap(cmd);
@@ -197,7 +197,7 @@
 
 void bsc_gen_location_state_trap(struct gsm_bts *bts)
 {
-	struct osmo_msc_data *msc;
+	struct bsc_msc_data *msc;
 
 	llist_for_each_entry(msc, &bts->network->bsc_data->mscs, entry)
 		generate_location_state_trap(bts, msc->msc_con);
@@ -517,7 +517,7 @@
 static int set_net_inform_msc(struct ctrl_cmd *cmd, void *data)
 {
 	struct gsm_network *net;
-	struct osmo_msc_data *msc;
+	struct bsc_msc_data *msc;
 
 	net = cmd->node;
 	llist_for_each_entry(msc, &net->bsc_data->mscs, entry) {
diff --git a/openbsc/src/osmo-bsc/osmo_bsc_filter.c b/openbsc/src/osmo-bsc/osmo_bsc_filter.c
index 5925d11..3443bbe 100644
--- a/openbsc/src/osmo-bsc/osmo_bsc_filter.c
+++ b/openbsc/src/osmo-bsc/osmo_bsc_filter.c
@@ -122,14 +122,14 @@
 	return cm->cm_service_type == GSM48_CMSERV_EMERGENCY;
 }
 
-struct osmo_msc_data *bsc_find_msc(struct gsm_subscriber_connection *conn,
+struct bsc_msc_data *bsc_find_msc(struct gsm_subscriber_connection *conn,
 				   struct msgb *msg)
 {
 	struct gsm48_hdr *gh;
 	int8_t pdisc;
 	uint8_t mtype;
 	struct osmo_bsc_data *bsc;
-	struct osmo_msc_data *msc, *pag_msc;
+	struct bsc_msc_data *msc, *pag_msc;
 	struct gsm_subscriber *subscr;
 	int is_emerg = 0;
 
@@ -315,7 +315,7 @@
 	return 0;
 }
 
-static int has_core_identity(struct osmo_msc_data *msc)
+static int has_core_identity(struct bsc_msc_data *msc)
 {
 	if (msc->core_mnc != -1)
 		return 1;
@@ -333,7 +333,7 @@
  */
 int bsc_scan_msc_msg(struct gsm_subscriber_connection *conn, struct msgb *msg)
 {
-	struct osmo_msc_data *msc;
+	struct bsc_msc_data *msc;
 	struct gsm_network *net;
 	struct gsm48_loc_area_id *lai;
 	struct gsm48_hdr *gh;
diff --git a/openbsc/src/osmo-bsc/osmo_bsc_grace.c b/openbsc/src/osmo-bsc/osmo_bsc_grace.c
index 9a63702..5709eea 100644
--- a/openbsc/src/osmo-bsc/osmo_bsc_grace.c
+++ b/openbsc/src/osmo-bsc/osmo_bsc_grace.c
@@ -35,7 +35,7 @@
 
 
 static int normal_paging(struct gsm_subscriber *subscr, int chan_needed,
-			struct osmo_msc_data *msc)
+			struct bsc_msc_data *msc)
 {
 	/* we can't page by lac.. we need to page everything */
 	if (msc->core_lac != -1) {
@@ -52,7 +52,7 @@
 }
 
 static int locked_paging(struct gsm_subscriber *subscr, int chan_needed,
-			struct osmo_msc_data *msc)
+			struct bsc_msc_data *msc)
 {
 	struct gsm_bts *bts = NULL;
 
@@ -85,7 +85,7 @@
  * Try to not page if everything the cell is not on.
  */
 int bsc_grace_paging_request(struct gsm_subscriber *subscr, int chan_needed,
-				struct osmo_msc_data *msc)
+				struct bsc_msc_data *msc)
 {
 	if (subscr->group->net->bsc_data->rf_ctrl->policy == S_RF_ON)
 		return normal_paging(subscr, chan_needed, msc);
diff --git a/openbsc/src/osmo-bsc/osmo_bsc_main.c b/openbsc/src/osmo-bsc/osmo_bsc_main.c
index 982f471..2f0b96d 100644
--- a/openbsc/src/osmo-bsc/osmo_bsc_main.c
+++ b/openbsc/src/osmo-bsc/osmo_bsc_main.c
@@ -156,7 +156,7 @@
 extern int bsc_shutdown_net(struct gsm_network *net);
 static void signal_handler(int signal)
 {
-	struct osmo_msc_data *msc;
+	struct bsc_msc_data *msc;
 
 	fprintf(stdout, "signal %u received\n", signal);
 
@@ -187,7 +187,7 @@
 
 int main(int argc, char **argv)
 {
-	struct osmo_msc_data *msc;
+	struct bsc_msc_data *msc;
 	struct osmo_bsc_data *data;
 	int rc;
 
diff --git a/openbsc/src/osmo-bsc/osmo_bsc_msc.c b/openbsc/src/osmo-bsc/osmo_bsc_msc.c
index e596d2a..42e8055 100644
--- a/openbsc/src/osmo-bsc/osmo_bsc_msc.c
+++ b/openbsc/src/osmo-bsc/osmo_bsc_msc.c
@@ -45,16 +45,16 @@
 
 static void initialize_if_needed(struct bsc_msc_connection *conn);
 static void send_lacs(struct gsm_network *net, struct bsc_msc_connection *conn);
-static void send_id_get_response(struct osmo_msc_data *data, int fd, struct msgb *inp);
-static void send_ping(struct osmo_msc_data *data);
-static void schedule_ping_pong(struct osmo_msc_data *data);
+static void send_id_get_response(struct bsc_msc_data *data, int fd, struct msgb *inp);
+static void send_ping(struct bsc_msc_data *data);
+static void schedule_ping_pong(struct bsc_msc_data *data);
 
 /*
  * MGCP forwarding code
  */
 static int mgcp_do_read(struct osmo_fd *fd)
 {
-	struct osmo_msc_data *data = (struct osmo_msc_data *) fd->data;
+	struct bsc_msc_data *data = (struct bsc_msc_data *) fd->data;
 	struct msgb *mgcp;
 	int ret;
 
@@ -93,7 +93,7 @@
 	return ret;
 }
 
-static void mgcp_forward(struct osmo_msc_data *data, struct msgb *msg)
+static void mgcp_forward(struct bsc_msc_data *data, struct msgb *msg)
 {
 	struct msgb *mgcp;
 
@@ -116,7 +116,7 @@
 	}
 }
 
-static int mgcp_create_port(struct osmo_msc_data *data)
+static int mgcp_create_port(struct bsc_msc_data *data)
 {
 	int on;
 	struct sockaddr_in addr;
@@ -186,7 +186,7 @@
 int msc_queue_write_with_ping(struct bsc_msc_connection *conn,
 			struct msgb *msg, int proto)
 {
-	struct osmo_msc_data *data;
+	struct bsc_msc_data *data;
 	uint8_t val;
 
 	/* prepend the header */
@@ -201,7 +201,7 @@
 	val = IPAC_MSGT_PING;
 	msgb_l16tv_put(msg, 1, IPAC_PROTO_IPACCESS, &val);
 
-	data = (struct osmo_msc_data *) conn->write_queue.bfd.data;
+	data = (struct bsc_msc_data *) conn->write_queue.bfd.data;
 	schedule_ping_pong(data);
 	return 0;
 }
@@ -220,7 +220,7 @@
 	return ret;
 }
 
-static void handle_ctrl(struct osmo_msc_data *msc, struct msgb *msg)
+static void handle_ctrl(struct bsc_msc_data *msc, struct msgb *msg)
 {
 	int ret;
 	struct ctrl_cmd *cmd;
@@ -249,7 +249,7 @@
 	talloc_free(cmd);
 }
 
-static void osmo_ext_handle(struct osmo_msc_data *msc, struct msgb *msg)
+static void osmo_ext_handle(struct bsc_msc_data *msc, struct msgb *msg)
 {
 	struct ipaccess_head *hh;
 	struct ipaccess_head_ext *hh_ext;
@@ -274,7 +274,7 @@
 {
 	struct msgb *msg = NULL;
 	struct ipaccess_head *hh;
-	struct osmo_msc_data *data = (struct osmo_msc_data *) bfd->data;
+	struct bsc_msc_data *data = (struct bsc_msc_data *) bfd->data;
 	int ret;
 
 	ret = ipa_msg_recv_buffered(bfd->fd, &msg, &data->msc_con->pending_msg);
@@ -319,7 +319,7 @@
 	return 0;
 }
 
-static void send_ping(struct osmo_msc_data *data)
+static void send_ping(struct bsc_msc_data *data)
 {
 	struct msgb *msg;
 
@@ -335,7 +335,7 @@
 	msc_queue_write(data->msc_con, msg, IPAC_PROTO_IPACCESS);
 }
 
-static void schedule_ping_pong(struct osmo_msc_data *data)
+static void schedule_ping_pong(struct bsc_msc_data *data)
 {
 	/* send another ping in 20 seconds */
 	osmo_timer_schedule(&data->ping_timer, data->ping_timeout, 0);
@@ -346,7 +346,7 @@
 
 static void msc_ping_timeout_cb(void *_data)
 {
-	struct osmo_msc_data *data = (struct osmo_msc_data *) _data;
+	struct bsc_msc_data *data = (struct bsc_msc_data *) _data;
 	if (data->ping_timeout <= 0)
 		return;
 
@@ -356,7 +356,7 @@
 
 static void msc_pong_timeout_cb(void *_data)
 {
-	struct osmo_msc_data *data = (struct osmo_msc_data *) _data;
+	struct bsc_msc_data *data = (struct bsc_msc_data *) _data;
 
 	LOGP(DMSC, LOGL_ERROR, "MSC didn't answer PING. Closing connection.\n");
 	bsc_msc_lost(data->msc_con);
@@ -365,14 +365,14 @@
 static void msc_connection_connected(struct bsc_msc_connection *con)
 {
 	struct msc_signal_data sig;
-	struct osmo_msc_data *data;
+	struct bsc_msc_data *data;
 	int ret, on;
 	on = 1;
 	ret = setsockopt(con->write_queue.bfd.fd, IPPROTO_TCP, TCP_NODELAY, &on, sizeof(on));
 	if (ret != 0)
                 LOGP(DMSC, LOGL_ERROR, "Failed to set TCP_NODELAY: %s\n", strerror(errno));
 
-	data = (struct osmo_msc_data *) con->write_queue.bfd.data;
+	data = (struct bsc_msc_data *) con->write_queue.bfd.data;
 	msc_ping_timeout_cb(data);
 
 	sig.data = data;
@@ -386,11 +386,11 @@
 static void msc_connection_was_lost(struct bsc_msc_connection *msc)
 {
 	struct msc_signal_data sig;
-	struct osmo_msc_data *data;
+	struct bsc_msc_data *data;
 
 	LOGP(DMSC, LOGL_ERROR, "Lost MSC connection. Freing stuff.\n");
 
-	data = (struct osmo_msc_data *) msc->write_queue.bfd.data;
+	data = (struct bsc_msc_data *) msc->write_queue.bfd.data;
 	osmo_timer_del(&data->ping_timer);
 	osmo_timer_del(&data->pong_timer);
 
@@ -452,7 +452,7 @@
 	}
 }
 
-static int answer_challenge(struct osmo_msc_data *data, struct msgb *inp, struct osmo_auth_vector *vec)
+static int answer_challenge(struct bsc_msc_data *data, struct msgb *inp, struct osmo_auth_vector *vec)
 {
 	int ret;
 	struct tlv_parsed tvp;
@@ -495,7 +495,7 @@
 }
 
 
-static void send_id_get_response(struct osmo_msc_data *data, int fd, struct msgb *inp)
+static void send_id_get_response(struct bsc_msc_data *data, int fd, struct msgb *inp)
 {
 	struct msc_signal_data sig;
 	struct msgb *msg;
@@ -515,7 +515,7 @@
 	osmo_signal_dispatch(SS_MSC, S_MSC_AUTHENTICATED, &sig);
 }
 
-int osmo_bsc_msc_init(struct osmo_msc_data *data)
+int osmo_bsc_msc_init(struct bsc_msc_data *data)
 {
 	if (mgcp_create_port(data) != 0)
 		return -1;
@@ -541,9 +541,9 @@
 	return 0;
 }
 
-struct osmo_msc_data *osmo_msc_data_find(struct gsm_network *net, int nr)
+struct bsc_msc_data *osmo_msc_data_find(struct gsm_network *net, int nr)
 {
-	struct osmo_msc_data *msc_data;
+	struct bsc_msc_data *msc_data;
 
 	llist_for_each_entry(msc_data, &net->bsc_data->mscs, entry)
 		if (msc_data->nr == nr)
@@ -551,16 +551,16 @@
 	return NULL;
 }
 
-struct osmo_msc_data *osmo_msc_data_alloc(struct gsm_network *net, int nr)
+struct bsc_msc_data *osmo_msc_data_alloc(struct gsm_network *net, int nr)
 {
-	struct osmo_msc_data *msc_data;
+	struct bsc_msc_data *msc_data;
 
 	/* check if there is already one */
 	msc_data = osmo_msc_data_find(net, nr);
 	if (msc_data)
 		return msc_data;
 
-	msc_data = talloc_zero(net, struct osmo_msc_data);
+	msc_data = talloc_zero(net, struct bsc_msc_data);
 	if (!msc_data)
 		return NULL;
 
diff --git a/openbsc/src/osmo-bsc/osmo_bsc_sccp.c b/openbsc/src/osmo-bsc/osmo_bsc_sccp.c
index 09efaf4..970d70e 100644
--- a/openbsc/src/osmo-bsc/osmo_bsc_sccp.c
+++ b/openbsc/src/osmo-bsc/osmo_bsc_sccp.c
@@ -166,7 +166,7 @@
 
 static int msc_sccp_read(struct msgb *msgb, unsigned int length, void *data)
 {
-	struct osmo_msc_data *msc = (struct osmo_msc_data *) msgb->cb[0];
+	struct bsc_msc_data *msc = (struct bsc_msc_data *) msgb->cb[0];
 	return bsc_handle_udt(msc, msgb, length);
 }
 
@@ -194,7 +194,7 @@
 }
 
 enum bsc_con bsc_create_new_connection(struct gsm_subscriber_connection *conn,
-			      struct osmo_msc_data *msc, int send_ping)
+			      struct bsc_msc_data *msc, int send_ping)
 {
 	struct osmo_bsc_sccp_con *bsc_con;
 	struct sccp_connection *sccp;
diff --git a/openbsc/src/osmo-bsc/osmo_bsc_vty.c b/openbsc/src/osmo-bsc/osmo_bsc_vty.c
index 8dabf95..d59c515 100644
--- a/openbsc/src/osmo-bsc/osmo_bsc_vty.c
+++ b/openbsc/src/osmo-bsc/osmo_bsc_vty.c
@@ -41,7 +41,7 @@
 	return bsc_gsmnet->bsc_data;
 }
 
-static struct osmo_msc_data *osmo_msc_data(struct vty *vty)
+static struct bsc_msc_data *bsc_msc_data(struct vty *vty)
 {
 	return vty->index;
 }
@@ -62,7 +62,7 @@
       "msc [<0-1000>]", "Configure MSC details\n" "MSC connection to configure\n")
 {
 	int index = argc == 1 ? atoi(argv[0]) : 0;
-	struct osmo_msc_data *msc;
+	struct bsc_msc_data *msc;
 
 	msc = osmo_msc_data_alloc(bsc_gsmnet, index);
 	if (!msc) {
@@ -82,7 +82,7 @@
 	return CMD_SUCCESS;
 }
 
-static void write_msc_amr_options(struct vty *vty, struct osmo_msc_data *msc)
+static void write_msc_amr_options(struct vty *vty, struct bsc_msc_data *msc)
 {
 #define WRITE_AMR(vty, msc, name, var) \
 	vty_out(vty, " amr-config %s %s%s", \
@@ -100,7 +100,7 @@
 #undef WRITE_AMR
 }
 
-static void write_msc(struct vty *vty, struct osmo_msc_data *msc)
+static void write_msc(struct vty *vty, struct bsc_msc_data *msc)
 {
 	struct bsc_msc_dest *dest;
 
@@ -188,7 +188,7 @@
 
 static int config_write_msc(struct vty *vty)
 {
-	struct osmo_msc_data *msc;
+	struct bsc_msc_data *msc;
 	struct osmo_bsc_data *bsc = osmo_bsc_data(vty);
 
 	llist_for_each_entry(msc, &bsc->mscs, entry)
@@ -228,7 +228,7 @@
       "token TOKEN",
       "A token for the BSC to be sent to the MSC\n" "A token\n")
 {
-	struct osmo_msc_data *data = osmo_msc_data(vty);
+	struct bsc_msc_data *data = bsc_msc_data(vty);
 
 	bsc_replace_string(osmo_bsc_data(vty), &data->bsc_token, argv[0]);
 	return CMD_SUCCESS;
@@ -240,7 +240,7 @@
       "Authentication (secret) key configuration\n"
       "Security key\n")
 {
-	struct osmo_msc_data *data = osmo_msc_data(vty);
+	struct bsc_msc_data *data = bsc_msc_data(vty);
 
 	osmo_hexparse(argv[0], data->bsc_key, sizeof(data->bsc_key));
 	data->bsc_key_present = 1;
@@ -251,7 +251,7 @@
       "no auth-key",
       NO_STR "Authentication (secret) key configuration\n")
 {
-	struct osmo_msc_data *data = osmo_msc_data(vty);
+	struct bsc_msc_data *data = bsc_msc_data(vty);
 
 	memset(data->bsc_key, 0, sizeof(data->bsc_key));
 	data->bsc_key_present = 0;
@@ -263,7 +263,7 @@
       "core-mobile-network-code <1-999>",
       "Use this network code for the core network\n" "MNC value\n")
 {
-	struct osmo_msc_data *data = osmo_msc_data(vty);
+	struct bsc_msc_data *data = bsc_msc_data(vty);
 	data->core_mnc = atoi(argv[0]);
 	return CMD_SUCCESS;
 }
@@ -273,7 +273,7 @@
       "core-mobile-country-code <1-999>",
       "Use this country code for the core network\n" "MCC value\n")
 {
-	struct osmo_msc_data *data = osmo_msc_data(vty);
+	struct bsc_msc_data *data = bsc_msc_data(vty);
 	data->core_mcc = atoi(argv[0]);
 	return CMD_SUCCESS;
 }
@@ -283,7 +283,7 @@
       "core-location-area-code <0-65535>",
       "Use this location area code for the core network\n" "LAC value\n")
 {
-	struct osmo_msc_data *data = osmo_msc_data(vty);
+	struct bsc_msc_data *data = bsc_msc_data(vty);
 	data->core_lac = atoi(argv[0]);
 	return CMD_SUCCESS;
 }
@@ -293,7 +293,7 @@
       "core-cell-identity <0-65535>",
       "Use this cell identity for the core network\n" "CI value\n")
 {
-	struct osmo_msc_data *data = osmo_msc_data(vty);
+	struct bsc_msc_data *data = bsc_msc_data(vty);
 	data->core_ci = atoi(argv[0]);
 	return CMD_SUCCESS;
 }
@@ -305,7 +305,7 @@
       "Set the rtp-base port for the RTP stream\n"
       "Port number\n")
 {
-	struct osmo_msc_data *data = osmo_msc_data(vty);
+	struct bsc_msc_data *data = bsc_msc_data(vty);
 	data->rtp_base = atoi(argv[0]);
 	return CMD_SUCCESS;
 }
@@ -316,7 +316,7 @@
       "Set the allowed audio codecs\n"
       "List of audio codecs, e.g. fr3 fr1 hr3\n")
 {
-	struct osmo_msc_data *data = osmo_msc_data(vty);
+	struct bsc_msc_data *data = bsc_msc_data(vty);
 	int saw_fr, saw_hr;
 	int i;
 
@@ -377,7 +377,7 @@
       "IP Address\n" "Port\n" "DSCP\n")
 {
 	struct bsc_msc_dest *dest;
-	struct osmo_msc_data *data = osmo_msc_data(vty);
+	struct bsc_msc_data *data = bsc_msc_data(vty);
 
 	dest = talloc_zero(osmo_bsc_data(vty), struct bsc_msc_dest);
 	if (!dest) {
@@ -405,7 +405,7 @@
       "IP Address\n" "Port\n" "DSCP\n")
 {
 	struct bsc_msc_dest *dest, *tmp;
-	struct osmo_msc_data *data = osmo_msc_data(vty);
+	struct bsc_msc_data *data = bsc_msc_data(vty);
 
 	int port = atoi(argv[1]);
 	int dscp = atoi(argv[2]);
@@ -427,7 +427,7 @@
       "no timeout-ping",
       NO_STR "Disable the ping/pong handling on A-link\n")
 {
-	struct osmo_msc_data *data = osmo_msc_data(vty);
+	struct bsc_msc_data *data = bsc_msc_data(vty);
 	data->ping_timeout = -1;
 	return CMD_SUCCESS;
 }
@@ -438,7 +438,7 @@
       "Set the PING interval, negative for not sending PING\n"
       "Timeout in seconds\n")
 {
-	struct osmo_msc_data *data = osmo_msc_data(vty);
+	struct bsc_msc_data *data = bsc_msc_data(vty);
 	data->ping_timeout = atoi(argv[0]);
 	return CMD_SUCCESS;
 }
@@ -448,7 +448,7 @@
       "timeout-pong <1-2147483647>",
       "Set the time to wait for a PONG\n" "Timeout in seconds\n")
 {
-	struct osmo_msc_data *data = osmo_msc_data(vty);
+	struct bsc_msc_data *data = bsc_msc_data(vty);
 	data->pong_timeout = atoi(argv[0]);
 	return CMD_SUCCESS;
 }
@@ -458,7 +458,7 @@
       "timeout-ping advanced",
       "Ping timeout handling\nEnable advanced mode during SCCP\n")
 {
-	struct osmo_msc_data *data = osmo_msc_data(vty);
+	struct bsc_msc_data *data = bsc_msc_data(vty);
 
 	if (data->ping_timeout == -1) {
 		vty_out(vty, "%%ping handling is disabled. Enable it first.%s",
@@ -475,7 +475,7 @@
       "no timeout-ping advanced",
       NO_STR "Ping timeout handling\nEnable advanced mode during SCCP\n")
 {
-	struct osmo_msc_data *data = osmo_msc_data(vty);
+	struct bsc_msc_data *data = bsc_msc_data(vty);
 	data->advanced_ping = 0;
 	return CMD_SUCCESS;
 }
@@ -485,7 +485,7 @@
       "bsc-welcome-text .TEXT",
       "Set the USSD notification to be sent\n" "Text to be sent\n")
 {
-	struct osmo_msc_data *data = osmo_msc_data(vty);
+	struct bsc_msc_data *data = bsc_msc_data(vty);
 	char *str = argv_concat(argv, argc, 0);
 	if (!str)
 		return CMD_WARNING;
@@ -500,7 +500,7 @@
       "no bsc-welcome-text",
       NO_STR "Clear the USSD notification to be sent\n")
 {
-	struct osmo_msc_data *data = osmo_msc_data(vty);
+	struct bsc_msc_data *data = bsc_msc_data(vty);
 
 	talloc_free(data->ussd_welcome_txt);
 	data->ussd_welcome_txt = NULL;
@@ -513,7 +513,7 @@
       "bsc-msc-lost-text .TEXT",
       "Set the USSD notification to be sent on MSC connection loss\n" "Text to be sent\n")
 {
-	struct osmo_msc_data *data = osmo_msc_data(vty);
+	struct bsc_msc_data *data = bsc_msc_data(vty);
 	char *str = argv_concat(argv, argc, 0);
 	if (!str)
 		return CMD_WARNING;
@@ -528,7 +528,7 @@
       "no bsc-msc-lost-text",
       NO_STR "Clear the USSD notification to be sent on MSC connection loss\n")
 {
-	struct osmo_msc_data *data = osmo_msc_data(vty);
+	struct bsc_msc_data *data = bsc_msc_data(vty);
 
 	talloc_free(data->ussd_msc_lost_txt);
 	data->ussd_msc_lost_txt = 0;
@@ -541,7 +541,7 @@
       "bsc-grace-text .TEXT",
       "Set the USSD notification to be sent when the MSC has entered the grace period\n" "Text to be sent\n")
 {
-	struct osmo_msc_data *data = osmo_msc_data(vty);
+	struct bsc_msc_data *data = bsc_msc_data(vty);
 	char *str = argv_concat(argv, argc, 0);
 	if (!str)
 		return CMD_WARNING;
@@ -556,7 +556,7 @@
       "no bsc-grace-text",
       NO_STR "Clear the USSD notification to be sent when the MSC has entered the grace period\n")
 {
-	struct osmo_msc_data *data = osmo_msc_data(vty);
+	struct bsc_msc_data *data = bsc_msc_data(vty);
 
 	talloc_free(data->ussd_grace_txt);
 	data->ussd_grace_txt = NULL;
@@ -599,7 +599,7 @@
       "Select the MSC type\n"
       "Plain GSM MSC\n" "Special MSC for local call routing\n")
 {
-	struct osmo_msc_data *data = osmo_msc_data(vty);
+	struct bsc_msc_data *data = bsc_msc_data(vty);
 
 	if (strcmp(argv[0], "normal") == 0)
 		data->type = MSC_CON_TYPE_NORMAL;
@@ -615,7 +615,7 @@
       "Allow CM ServiceRequests with type emergency\n"
       "Allow\n" "Deny\n")
 {
-	struct osmo_msc_data *data = osmo_msc_data(vty);
+	struct bsc_msc_data *data = bsc_msc_data(vty);
 	data->allow_emerg = strcmp("allow", argv[0]) == 0;
 	return CMD_SUCCESS;
 }
@@ -625,7 +625,7 @@
       "local-prefix REGEXP",
       "Prefix for local numbers\n" "REGEXP used\n")
 {
-	struct osmo_msc_data *msc = osmo_msc_data(vty);
+	struct bsc_msc_data *msc = bsc_msc_data(vty);
 
 	if (gsm_parse_reg(msc, &msc->local_pref_reg, &msc->local_pref, argc, argv) != 0) {
 		vty_out(vty, "%%Failed to parse the regexp: '%s'%s",
@@ -643,7 +643,7 @@
 	  "amr-config " #name "k (allowed|forbidden)",			\
 	  AMR_CONF_STR "Bitrate\n" "Allowed\n" "Forbidden\n")		\
 {									\
-	struct osmo_msc_data *msc = osmo_msc_data(vty);			\
+	struct bsc_msc_data *msc = bsc_msc_data(vty);			\
 									\
 	msc->amr_conf.m##name = strcmp(argv[0], "allowed") == 0; 	\
 	return CMD_SUCCESS;						\
@@ -664,7 +664,7 @@
       "Set the name of the access list to use.\n"
       "The name of the to be used access list.")
 {
-	struct osmo_msc_data *msc = osmo_msc_data(vty);
+	struct bsc_msc_data *msc = bsc_msc_data(vty);
 
 	bsc_replace_string(msc, &msc->acc_lst_name, argv[0]);
 	return CMD_SUCCESS;
@@ -675,7 +675,7 @@
       "no access-list-name",
       NO_STR "Remove the access list from the NAT.\n")
 {
-	struct osmo_msc_data *msc = osmo_msc_data(vty);
+	struct bsc_msc_data *msc = bsc_msc_data(vty);
 
 	if (msc->acc_lst_name) {
 		talloc_free(msc->acc_lst_name);
@@ -782,7 +782,7 @@
       "show mscs",
       SHOW_STR "MSC Connections and State\n")
 {
-	struct osmo_msc_data *msc;
+	struct bsc_msc_data *msc;
 	llist_for_each_entry(msc, &bsc_gsmnet->bsc_data->mscs, entry) {
 		vty_out(vty, "MSC Nr: %d is connected: %d auth: %d.%s",
 			msc->nr,
diff --git a/openbsc/tests/bsc/bsc_test.c b/openbsc/tests/bsc/bsc_test.c
index 1e3fdf7..20ed5b4 100644
--- a/openbsc/tests/bsc/bsc_test.c
+++ b/openbsc/tests/bsc/bsc_test.c
@@ -125,13 +125,13 @@
 	struct gsm_network *net;
 	struct gsm_bts *bts;
 	struct osmo_bsc_sccp_con *sccp_con;
-	struct osmo_msc_data *msc;
+	struct bsc_msc_data *msc;
 	struct gsm_subscriber_connection *conn;
 
 	net = talloc_zero(NULL, struct gsm_network);
 	bts = talloc_zero(net, struct gsm_bts);
 	sccp_con = talloc_zero(net, struct osmo_bsc_sccp_con);
-	msc = talloc_zero(net, struct osmo_msc_data);
+	msc = talloc_zero(net, struct bsc_msc_data);
 	conn = talloc_zero(net, struct gsm_subscriber_connection);
 
 	bts->network = net;

-- 
To view, visit https://gerrit.osmocom.org/1892
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0dfbcb7d1a579211180f71319982820d8700afab
Gerrit-PatchSet: 1
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>


More information about the gerrit-log mailing list