From a42855f09fc74bdc801fdd7adfef27e2cdf3f371 Mon Sep 17 00:00:00 2001 From: Neels Hofmeyr Date: Thu, 23 Feb 2017 21:49:55 +0100 Subject: cosmetic: rename osmo_msc_data.h to bsc_msc_data.h 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: I13554563ce9289de126ba0d4cf329bafcda35607 --- openbsc/include/openbsc/Makefile.am | 2 +- openbsc/include/openbsc/bsc_msc_data.h | 142 ++++++++++++++++++++++++++++++++ openbsc/include/openbsc/osmo_msc_data.h | 142 -------------------------------- 3 files changed, 143 insertions(+), 143 deletions(-) create mode 100644 openbsc/include/openbsc/bsc_msc_data.h delete mode 100644 openbsc/include/openbsc/osmo_msc_data.h (limited to 'openbsc/include/openbsc') diff --git a/openbsc/include/openbsc/Makefile.am b/openbsc/include/openbsc/Makefile.am index 2466ce859..5cd5afc4d 100644 --- a/openbsc/include/openbsc/Makefile.am +++ b/openbsc/include/openbsc/Makefile.am @@ -60,7 +60,7 @@ noinst_HEADERS = \ osmo_bsc_grace.h \ osmo_bsc_rf.h \ osmo_msc.h \ - osmo_msc_data.h \ + bsc_msc_data.h \ osmux.h \ paging.h \ rest_octets.h \ diff --git a/openbsc/include/openbsc/bsc_msc_data.h b/openbsc/include/openbsc/bsc_msc_data.h new file mode 100644 index 000000000..3168d911d --- /dev/null +++ b/openbsc/include/openbsc/bsc_msc_data.h @@ -0,0 +1,142 @@ +/* + * Data for the true BSC + * + * (C) 2010-2015 by Holger Hans Peter Freyther + * (C) 2010-2015 by On-Waves + * All Rights Reserved + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ + +/* + * NOTE: This is about a *remote* MSC for OsmoBSC and is not part of libmsc. + */ + +#ifndef _OSMO_MSC_DATA_H +#define _OSMO_MSC_DATA_H + +#include "bsc_msc.h" + +#include +#include + +#include + +struct osmo_bsc_rf; +struct gsm_network; + +struct gsm_audio_support { + uint8_t hr : 1, + ver : 7; +}; + +enum { + MSC_CON_TYPE_NORMAL, + MSC_CON_TYPE_LOCAL, +}; + +/*! /brief Information on a remote MSC for libbsc. + */ +struct osmo_msc_data { + struct llist_head entry; + + /* Back pointer */ + struct gsm_network *network; + + int allow_emerg; + int type; + + /* local call routing */ + char *local_pref; + regex_t local_pref_reg; + + + /* Connection data */ + char *bsc_token; + uint8_t bsc_key[16]; + uint8_t bsc_key_present; + + int ping_timeout; + int pong_timeout; + struct osmo_timer_list ping_timer; + struct osmo_timer_list pong_timer; + int advanced_ping; + struct bsc_msc_connection *msc_con; + int core_mnc; + int core_mcc; + int core_lac; + int core_ci; + int rtp_base; + + /* audio codecs */ + struct gsm48_multi_rate_conf amr_conf; + struct gsm_audio_support **audio_support; + int audio_length; + + /* destinations */ + struct llist_head dests; + + /* ussd welcome text */ + char *ussd_welcome_txt; + + /* mgcp agent */ + struct osmo_wqueue mgcp_agent; + + int nr; + + /* ussd msc connection lost text */ + char *ussd_msc_lost_txt; + + /* ussd text when MSC has entered the grace period */ + char *ussd_grace_txt; + + char *acc_lst_name; +}; + +/* + * Per BSC data. + */ +struct osmo_bsc_data { + struct gsm_network *network; + + /* msc configuration */ + struct llist_head mscs; + + /* rf ctl related bits */ + char *mid_call_txt; + int mid_call_timeout; + char *rf_ctrl_name; + struct osmo_bsc_rf *rf_ctrl; + int auto_off_timeout; + + /* ussd text when there is no MSC available */ + char *ussd_no_msc_txt; + + char *acc_lst_name; +}; + + +int osmo_bsc_msc_init(struct osmo_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); + + +#endif diff --git a/openbsc/include/openbsc/osmo_msc_data.h b/openbsc/include/openbsc/osmo_msc_data.h deleted file mode 100644 index 3168d911d..000000000 --- a/openbsc/include/openbsc/osmo_msc_data.h +++ /dev/null @@ -1,142 +0,0 @@ -/* - * Data for the true BSC - * - * (C) 2010-2015 by Holger Hans Peter Freyther - * (C) 2010-2015 by On-Waves - * All Rights Reserved - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - * - */ - -/* - * NOTE: This is about a *remote* MSC for OsmoBSC and is not part of libmsc. - */ - -#ifndef _OSMO_MSC_DATA_H -#define _OSMO_MSC_DATA_H - -#include "bsc_msc.h" - -#include -#include - -#include - -struct osmo_bsc_rf; -struct gsm_network; - -struct gsm_audio_support { - uint8_t hr : 1, - ver : 7; -}; - -enum { - MSC_CON_TYPE_NORMAL, - MSC_CON_TYPE_LOCAL, -}; - -/*! /brief Information on a remote MSC for libbsc. - */ -struct osmo_msc_data { - struct llist_head entry; - - /* Back pointer */ - struct gsm_network *network; - - int allow_emerg; - int type; - - /* local call routing */ - char *local_pref; - regex_t local_pref_reg; - - - /* Connection data */ - char *bsc_token; - uint8_t bsc_key[16]; - uint8_t bsc_key_present; - - int ping_timeout; - int pong_timeout; - struct osmo_timer_list ping_timer; - struct osmo_timer_list pong_timer; - int advanced_ping; - struct bsc_msc_connection *msc_con; - int core_mnc; - int core_mcc; - int core_lac; - int core_ci; - int rtp_base; - - /* audio codecs */ - struct gsm48_multi_rate_conf amr_conf; - struct gsm_audio_support **audio_support; - int audio_length; - - /* destinations */ - struct llist_head dests; - - /* ussd welcome text */ - char *ussd_welcome_txt; - - /* mgcp agent */ - struct osmo_wqueue mgcp_agent; - - int nr; - - /* ussd msc connection lost text */ - char *ussd_msc_lost_txt; - - /* ussd text when MSC has entered the grace period */ - char *ussd_grace_txt; - - char *acc_lst_name; -}; - -/* - * Per BSC data. - */ -struct osmo_bsc_data { - struct gsm_network *network; - - /* msc configuration */ - struct llist_head mscs; - - /* rf ctl related bits */ - char *mid_call_txt; - int mid_call_timeout; - char *rf_ctrl_name; - struct osmo_bsc_rf *rf_ctrl; - int auto_off_timeout; - - /* ussd text when there is no MSC available */ - char *ussd_no_msc_txt; - - char *acc_lst_name; -}; - - -int osmo_bsc_msc_init(struct osmo_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); - - -#endif -- cgit v1.2.3