From 43b0909394e78d908038495f98d9b51739b01213 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Tue, 15 Jun 2010 11:52:51 +0800 Subject: bsc_api: Create osmo_msc, and initialize the MSC API in the bsc_init. --- openbsc/include/openbsc/Makefile.am | 2 +- openbsc/include/openbsc/osmo_msc.h | 10 ++++++++++ openbsc/src/Makefile.am | 3 ++- openbsc/src/bsc_init.c | 2 ++ openbsc/src/osmo_msc.c | 38 +++++++++++++++++++++++++++++++++++++ 5 files changed, 53 insertions(+), 2 deletions(-) create mode 100644 openbsc/include/openbsc/osmo_msc.h create mode 100644 openbsc/src/osmo_msc.c (limited to 'openbsc') diff --git a/openbsc/include/openbsc/Makefile.am b/openbsc/include/openbsc/Makefile.am index 2c5db5b7e..5957d71c6 100644 --- a/openbsc/include/openbsc/Makefile.am +++ b/openbsc/include/openbsc/Makefile.am @@ -9,7 +9,7 @@ noinst_HEADERS = abis_nm.h abis_rsl.h db.h gsm_04_08.h gsm_data.h \ vty.h socket.h \ crc24.h gprs_bssgp.h gprs_llc.h gprs_ns.h gprs_gmm.h \ gb_proxy.h gprs_sgsn.h gsm_04_08_gprs.h sgsn.h \ - gprs_ns_frgre.h auth.h + gprs_ns_frgre.h auth.h osmo_msc.h openbsc_HEADERS = gsm_04_08.h meas_rep.h bsc_api.h openbscdir = $(includedir)/openbsc diff --git a/openbsc/include/openbsc/osmo_msc.h b/openbsc/include/openbsc/osmo_msc.h new file mode 100644 index 000000000..d5d8917df --- /dev/null +++ b/openbsc/include/openbsc/osmo_msc.h @@ -0,0 +1,10 @@ +/* Routines for the MSC handling */ + +#ifndef OSMO_MSC_H +#define OSMO_MSC_H + +#include "bsc_api.h" + +struct bsc_api *msc_bsc_api(); + +#endif diff --git a/openbsc/src/Makefile.am b/openbsc/src/Makefile.am index 03f62ab18..87cd0ea6e 100644 --- a/openbsc/src/Makefile.am +++ b/openbsc/src/Makefile.am @@ -23,7 +23,8 @@ libbsc_a_SOURCES = abis_rsl.c abis_nm.c gsm_data.c gsm_04_08_utils.c \ libmsc_a_SOURCES = gsm_subscriber.c db.c \ mncc.c gsm_04_08.c gsm_04_11.c transaction.c \ token_auth.c rrlp.c gsm_04_80.c ussd.c silent_call.c \ - handover_logic.c handover_decision.c meas_rep.c auth.c + handover_logic.c handover_decision.c meas_rep.c auth.c \ + osmo_msc.c libvty_a_SOURCES = common_vty.c diff --git a/openbsc/src/bsc_init.c b/openbsc/src/bsc_init.c index 55bb882f1..ddb53ba04 100644 --- a/openbsc/src/bsc_init.c +++ b/openbsc/src/bsc_init.c @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include @@ -1081,6 +1082,7 @@ int bsc_bootstrap_network(int (*mncc_recv)(struct gsm_network *, int, void *), bsc_gsmnet->name_long = talloc_strdup(bsc_gsmnet, "OpenBSC"); bsc_gsmnet->name_short = talloc_strdup(bsc_gsmnet, "OpenBSC"); + bsc_api_init(bsc_gsmnet, msc_bsc_api()); /* our vty command code expects vty->priv to point to a telnet_connection */ dummy_conn.priv = bsc_gsmnet; diff --git a/openbsc/src/osmo_msc.c b/openbsc/src/osmo_msc.c new file mode 100644 index 000000000..97f6e6fac --- /dev/null +++ b/openbsc/src/osmo_msc.c @@ -0,0 +1,38 @@ +/* main MSC management code... */ + +/* + * (C) 2010 by Holger Hans Peter Freyther + * (C) 2010 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 General Public License as published by + * the Free Software Foundation; either version 2 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + */ + +#include +#include + +static void msc_sapi_n_reject(struct gsm_subscriber_connection* conn, int dlci) +{ +} + +static struct bsc_api msc_handler = { + .sapi_n_reject = msc_sapi_n_reject, +}; + +struct bsc_api *msc_bsc_api() { + return &msc_handler; +} -- cgit v1.2.3