summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2017-02-23 21:57:23 +0100
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2017-02-24 21:01:55 +0100
commita369e24cb9a583ef9906a8ef9125f6ca8c6f80bf (patch)
tree5bf4c8a82cfedf24d39fe63e4d0f0774361f7897
parenta42855f09fc74bdc801fdd7adfef27e2cdf3f371 (diff)
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
-rw-r--r--openbsc/include/openbsc/bsc_msc_data.h8
-rw-r--r--openbsc/include/openbsc/osmo_bsc.h10
-rw-r--r--openbsc/include/openbsc/osmo_bsc_grace.h4
-rw-r--r--openbsc/include/openbsc/signal.h4
-rw-r--r--openbsc/src/osmo-bsc/osmo_bsc_api.c22
-rw-r--r--openbsc/src/osmo-bsc/osmo_bsc_bssap.c10
-rw-r--r--openbsc/src/osmo-bsc/osmo_bsc_ctrl.c8
-rw-r--r--openbsc/src/osmo-bsc/osmo_bsc_filter.c8
-rw-r--r--openbsc/src/osmo-bsc/osmo_bsc_grace.c6
-rw-r--r--openbsc/src/osmo-bsc/osmo_bsc_main.c4
-rw-r--r--openbsc/src/osmo-bsc/osmo_bsc_msc.c54
-rw-r--r--openbsc/src/osmo-bsc/osmo_bsc_sccp.c4
-rw-r--r--openbsc/src/osmo-bsc/osmo_bsc_vty.c68
-rw-r--r--openbsc/tests/bsc/bsc_test.c4
14 files changed, 107 insertions, 107 deletions
diff --git a/openbsc/include/openbsc/bsc_msc_data.h b/openbsc/include/openbsc/bsc_msc_data.h
index 3168d911d..38e87cfb9 100644
--- a/openbsc/include/openbsc/bsc_msc_data.h
+++ b/openbsc/include/openbsc/bsc_msc_data.h
@@ -49,7 +49,7 @@ enum {
/*! /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 @@ struct osmo_bsc_data {
};
-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 fd5303dc6..9e688fd59 100644
--- a/openbsc/include/openbsc/osmo_bsc.h
+++ b/openbsc/include/openbsc/osmo_bsc.h
@@ -16,7 +16,7 @@ enum bsc_con {
};
struct sccp_connection;
-struct osmo_msc_data;
+struct bsc_msc_data;
struct bsc_msc_connection;
struct osmo_bsc_sccp_con {
@@ -33,7 +33,7 @@ struct osmo_bsc_sccp_con {
/* 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 @@ struct bsc_api *osmo_bsc_api();
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 af77b2f3b..ea5e4e2ab 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 c862b2192..d4ccf80da 100644
--- a/openbsc/include/openbsc/signal.h
+++ b/openbsc/include/openbsc/signal.h
@@ -222,9 +222,9 @@ enum signal_msc {
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 c3d13841a..bac5e4717 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 void bsc_maybe_lu_reject(struct gsm_subscriber_connection *conn, int con_
}
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 void bsc_send_ussd_no_srv(struct gsm_subscriber_connection *conn,
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 bsc_compl_l3(struct gsm_subscriber_connection *conn, struct msgb *msg
}
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 @@ static int complete_layer3(struct gsm_subscriber_connection *conn,
* 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 @@ static int handle_cc_setup(struct gsm_subscriber_connection *conn,
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_cm_update(struct gsm_subscriber_connection *conn,
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 67325b3b3..dcfef4079 100644
--- a/openbsc/src/osmo-bsc/osmo_bsc_bssap.c
+++ b/openbsc/src/osmo-bsc/osmo_bsc_bssap.c
@@ -88,7 +88,7 @@ enum gsm48_chan_mode gsm88_to_chan_mode(enum gsm0808_permitted_speech speech)
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 @@ static int bssmap_handle_reset_ack(struct osmo_msc_data *msc,
}
/* 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 @@ static int bssmap_handle_assignm_req(struct osmo_bsc_sccp_con *conn,
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 @@ reject:
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 @@ static int dtap_rcvmsg(struct osmo_bsc_sccp_con *conn,
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 ffde1b82d..c23ed2187 100644
--- a/openbsc/src/osmo-bsc/osmo_bsc_ctrl.c
+++ b/openbsc/src/osmo-bsc/osmo_bsc_ctrl.c
@@ -40,9 +40,9 @@ void osmo_bsc_send_trap(struct ctrl_cmd *cmd, struct bsc_msc_connection *msc_con
{
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 @@ static void generate_location_state_trap(struct gsm_bts *bts, struct bsc_msc_con
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 get_net_inform_msc(struct ctrl_cmd *cmd, void *data)
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 5925d115c..3443bbed4 100644
--- a/openbsc/src/osmo-bsc/osmo_bsc_filter.c
+++ b/openbsc/src/osmo-bsc/osmo_bsc_filter.c
@@ -122,14 +122,14 @@ static int is_cm_service_for_emerg(struct msgb *msg)
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 @@ static int bsc_patch_mm_info(struct gsm_subscriber_connection *conn,
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 @@ static int has_core_identity(struct osmo_msc_data *msc)
*/
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 9a637029d..5709eeac5 100644
--- a/openbsc/src/osmo-bsc/osmo_bsc_grace.c
+++ b/openbsc/src/osmo-bsc/osmo_bsc_grace.c
@@ -35,7 +35,7 @@ int bsc_grace_allow_new_connection(struct gsm_network *network, struct gsm_bts *
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 normal_paging(struct gsm_subscriber *subscr, int chan_needed,
}
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 @@ static int locked_paging(struct gsm_subscriber *subscr, int chan_needed,
* 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 982f471fa..2f0b96de2 100644
--- a/openbsc/src/osmo-bsc/osmo_bsc_main.c
+++ b/openbsc/src/osmo-bsc/osmo_bsc_main.c
@@ -156,7 +156,7 @@ static struct vty_app_info vty_info = {
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 @@ static void signal_handler(int signal)
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 e596d2ad8..42e805515 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 @@ static int mgcp_do_write(struct osmo_fd *fd, struct msgb *msg)
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 void mgcp_forward(struct osmo_msc_data *data, struct msgb *msg)
}
}
-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(struct bsc_msc_connection *conn, struct msgb *msg, int proto
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 @@ int msc_queue_write_with_ping(struct bsc_msc_connection *conn,
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 @@ static int msc_alink_do_write(struct osmo_fd *fd, struct msgb *msg)
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 @@ static void handle_ctrl(struct osmo_msc_data *msc, struct msgb *msg)
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 @@ static int ipaccess_a_fd_cb(struct osmo_fd *bfd)
{
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 @@ static int ipaccess_a_fd_cb(struct osmo_fd *bfd)
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 @@ static void send_ping(struct osmo_msc_data *data)
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 schedule_ping_pong(struct osmo_msc_data *data)
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_ping_timeout_cb(void *_data)
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_pong_timeout_cb(void *_data)
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_connected(struct bsc_msc_connection *con)
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 void initialize_if_needed(struct bsc_msc_connection *conn)
}
}
-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 int answer_challenge(struct osmo_msc_data *data, struct msgb *inp, struct
}
-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 @@ static void send_id_get_response(struct osmo_msc_data *data, int fd, struct msgb
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 @@ int osmo_bsc_msc_init(struct osmo_msc_data *data)
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 @@ struct osmo_msc_data *osmo_msc_data_find(struct gsm_network *net, int nr)
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 09efaf443..970d70e82 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_accept(struct sccp_connection *connection, void *data)
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 @@ int bsc_queue_for_msc(struct osmo_bsc_sccp_con *conn, 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)
{
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 8dabf95b2..d59c51577 100644
--- a/openbsc/src/osmo-bsc/osmo_bsc_vty.c
+++ b/openbsc/src/osmo-bsc/osmo_bsc_vty.c
@@ -41,7 +41,7 @@ static struct osmo_bsc_data *osmo_bsc_data(struct vty *vty)
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 @@ DEFUN(cfg_net_msc, cfg_net_msc_cmd,
"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 @@ DEFUN(cfg_net_bsc, cfg_net_bsc_cmd,
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 @@ static void write_msc_amr_options(struct vty *vty, struct osmo_msc_data *msc)
#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 void write_msc(struct vty *vty, struct osmo_msc_data *msc)
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 @@ DEFUN(cfg_net_bsc_token,
"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 @@ DEFUN(cfg_net_bsc_key,
"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 @@ DEFUN(cfg_net_no_bsc_key, cfg_net_bsc_no_key_cmd,
"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 @@ DEFUN(cfg_net_bsc_ncc,
"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 @@ DEFUN(cfg_net_bsc_mcc,
"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 @@ DEFUN(cfg_net_bsc_lac,
"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 @@ DEFUN(cfg_net_bsc_ci,
"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 @@ DEFUN(cfg_net_bsc_rtp_base,
"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 @@ DEFUN(cfg_net_bsc_codec_list,
"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 @@ DEFUN(cfg_net_msc_dest,
"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 @@ DEFUN(cfg_net_msc_no_dest,
"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 @@ DEFUN(cfg_net_msc_no_ping_time,
"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 @@ DEFUN(cfg_net_msc_ping_time,
"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 @@ DEFUN(cfg_net_msc_pong_time,
"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 @@ DEFUN(cfg_net_msc_advanced_ping,
"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 @@ DEFUN(cfg_no_net_msc_advanced_ping,
"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 @@ DEFUN(cfg_net_msc_welcome_ussd,
"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 @@ DEFUN(cfg_net_msc_no_welcome_ussd,
"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 @@ DEFUN(cfg_net_msc_lost_ussd,
"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 @@ DEFUN(cfg_net_msc_no_lost_ussd,
"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 @@ DEFUN(cfg_net_msc_grace_ussd,
"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 @@ DEFUN(cfg_net_msc_no_grace_ussd,
"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 @@ DEFUN(cfg_net_msc_type,
"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 @@ DEFUN(cfg_net_msc_emerg,
"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 @@ DEFUN(cfg_net_msc_local_prefix,
"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 @@ DEFUN(cfg_net_msc_local_prefix,
"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 @@ DEFUN(cfg_msc_acc_lst_name,
"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 @@ DEFUN(cfg_msc_no_acc_lst_name,
"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 @@ DEFUN(show_mscs,
"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 1e3fdf7f8..20ed5b43b 100644
--- a/openbsc/tests/bsc/bsc_test.c
+++ b/openbsc/tests/bsc/bsc_test.c
@@ -125,13 +125,13 @@ static void test_scan(void)
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;