2016-05-20 19:59:55 +00:00
|
|
|
/* OsmoMSC - Circuit-Switched Core Network (MSC+VLR+HLR+SMSC) implementation
|
|
|
|
*/
|
2008-12-23 20:25:15 +00:00
|
|
|
|
2016-05-20 19:59:55 +00:00
|
|
|
/* (C) 2016 by sysmocom s.f.m.c. GmbH <info@sysmocom.de>
|
|
|
|
* All Rights Reserved
|
|
|
|
*
|
|
|
|
* Based on OsmoNITB:
|
|
|
|
* (C) 2008-2010 by Harald Welte <laforge@gnumonks.org>
|
2012-05-11 21:28:19 +00:00
|
|
|
* (C) 2009-2012 by Holger Hans Peter Freyther <zecke@selfish.org>
|
2008-12-23 20:25:15 +00:00
|
|
|
* All Rights Reserved
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
2011-01-01 14:25:50 +00:00
|
|
|
* 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
|
2008-12-23 20:25:15 +00:00
|
|
|
* (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
|
2011-01-01 14:25:50 +00:00
|
|
|
* GNU Affero General Public License for more details.
|
2008-12-23 20:25:15 +00:00
|
|
|
*
|
2011-01-01 14:25:50 +00:00
|
|
|
* You should have received a copy of the GNU Affero General Public License
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
2008-12-23 20:25:15 +00:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2008-12-26 00:05:11 +00:00
|
|
|
#include <unistd.h>
|
|
|
|
#include <time.h>
|
2008-12-26 10:20:07 +00:00
|
|
|
#include <errno.h>
|
2009-01-01 01:50:32 +00:00
|
|
|
#include <signal.h>
|
2009-01-02 00:40:15 +00:00
|
|
|
#include <fcntl.h>
|
|
|
|
#include <sys/stat.h>
|
2008-12-23 20:25:15 +00:00
|
|
|
|
2008-12-27 12:46:51 +00:00
|
|
|
#define _GNU_SOURCE
|
|
|
|
#include <getopt.h>
|
|
|
|
|
2016-05-20 19:59:55 +00:00
|
|
|
/* build switches from the configure script */
|
|
|
|
#include "../../bscconfig.h"
|
|
|
|
|
2017-09-04 13:04:35 +00:00
|
|
|
#include <osmocom/msc/db.h>
|
2011-05-12 14:02:07 +00:00
|
|
|
#include <osmocom/core/application.h>
|
2011-03-22 15:47:59 +00:00
|
|
|
#include <osmocom/core/select.h>
|
2015-10-26 15:25:37 +00:00
|
|
|
#include <osmocom/core/stats.h>
|
2017-09-04 13:04:35 +00:00
|
|
|
#include <osmocom/msc/debug.h>
|
src: port openBSC over libosmo-abis
This is a big patch that ports openBSC over libosmo-abis.
Sorry, the changes that are included here are all dependent
of libosmo-abis, splitting them into smaller pieces would
leave the repository in some intermediate state, which is
not desired.
The main changes are:
- The directory libabis/ has been removed as it now lives in
libosmo-abis.
- new configuration file format for nanoBTS and HSL femto, we
need to define the virtual e1_line and attach it to the OML
link.
- all the existing BTS drivers (nanoBTS, hsl femto, Nokia site,
BS11 and rbs2000) now use the new libosmo-abis framework.
- use r232 input driver available in libosmo-abis for bs11_config.
- use ipa_msg_recv instead of old ipaccess_read_msg function.
- delete definition of gsm_e1_subslot and input_signal_data.
These structures now lives in libosmo-abis.
Most of this patch are deletions of libabis/ which has been
moved to libosmo-abis.
This patch also modifies openBSC to use all the new definitions
available in libosmocore and libosmo-abis. In order to do that,
we have replaced the following:
- DINP, DMI, DMIB and DMUX by their respective DL* correspondences.
- SS_GLOBAL by SS_L_GLOBAL
- SS_INPUT by SS_L_INPUT
- S_GLOBAL_SHUTDOWN by S_L_GLOBAL_SHUTDOWN
- SS_INPUT by SS_L_INPUT
- S_INP_* by S_L_INP_* sub-signals
- E1INP_NODE by L_E1INP_NODE vty node
This patch has been tested with:
- one nanoBTS
- the HSL femto with the examples available under libosmo-abis
- BS11 with both dahdi and misdn drivers.
2011-08-17 20:44:07 +00:00
|
|
|
#include <osmocom/abis/abis.h>
|
|
|
|
#include <osmocom/abis/e1_input.h>
|
2011-03-22 15:47:59 +00:00
|
|
|
#include <osmocom/core/talloc.h>
|
2017-09-04 13:04:35 +00:00
|
|
|
#include <osmocom/msc/signal.h>
|
|
|
|
#include <osmocom/msc/osmo_msc.h>
|
|
|
|
#include <osmocom/msc/sms_queue.h>
|
2016-05-20 19:59:55 +00:00
|
|
|
#include <osmocom/vty/telnet_interface.h>
|
|
|
|
#include <osmocom/vty/ports.h>
|
|
|
|
#include <osmocom/vty/logging.h>
|
2018-02-13 23:40:05 +00:00
|
|
|
#include <osmocom/vty/misc.h>
|
2017-09-04 13:04:35 +00:00
|
|
|
#include <osmocom/msc/vty.h>
|
|
|
|
#include <osmocom/msc/mncc.h>
|
|
|
|
#include <osmocom/msc/rrlp.h>
|
2014-08-20 21:47:15 +00:00
|
|
|
#include <osmocom/ctrl/control_if.h>
|
2016-02-23 14:10:33 +00:00
|
|
|
#include <osmocom/ctrl/control_vty.h>
|
2016-05-20 19:59:55 +00:00
|
|
|
#include <osmocom/ctrl/ports.h>
|
2017-09-04 13:04:35 +00:00
|
|
|
#include <osmocom/msc/smpp.h>
|
2017-04-09 10:32:51 +00:00
|
|
|
#include <osmocom/sigtran/osmo_ss7.h>
|
2017-09-03 23:03:58 +00:00
|
|
|
#include <osmocom/mgcp_client/mgcp_client.h>
|
2016-05-20 19:59:55 +00:00
|
|
|
|
2017-07-05 13:19:52 +00:00
|
|
|
#ifdef BUILD_IU
|
|
|
|
#include <osmocom/ranap/iu_client.h>
|
|
|
|
#endif
|
2016-05-20 19:59:55 +00:00
|
|
|
|
2017-09-04 13:04:35 +00:00
|
|
|
#include <osmocom/msc/msc_ifaces.h>
|
|
|
|
#include <osmocom/msc/iucs.h>
|
|
|
|
#include <osmocom/msc/iucs_ranap.h>
|
|
|
|
#include <osmocom/msc/a_iface.h>
|
2016-05-20 19:59:55 +00:00
|
|
|
|
|
|
|
static const char * const osmomsc_copyright =
|
|
|
|
"OsmoMSC - Osmocom Circuit-Switched Core Network implementation\r\n"
|
|
|
|
"Copyright (C) 2016 by sysmocom s.f.m.c. GmbH <info@sysmocom.de>\r\n"
|
|
|
|
"Based on OsmoNITB:\r\n"
|
|
|
|
" (C) 2008-2010 by Harald Welte <laforge@gnumonks.org>\r\n"
|
|
|
|
" (C) 2009-2012 by Holger Hans Peter Freyther <zecke@selfish.org>\r\n"
|
|
|
|
"Contributions by Daniel Willmann, Jan Lübbe, Stefan Schmidt\r\n"
|
|
|
|
"Dieter Spaar, Andreas Eversberg, Sylvain Munaut, Neels Hofmeyr\r\n\r\n"
|
|
|
|
"License AGPLv3+: GNU AGPL version 3 or later <http://gnu.org/licenses/agpl-3.0.html>\r\n"
|
|
|
|
"This is free software: you are free to change and redistribute it.\r\n"
|
|
|
|
"There is NO WARRANTY, to the extent permitted by law.\r\n";
|
|
|
|
|
|
|
|
void *tall_msc_ctx = NULL;
|
|
|
|
|
|
|
|
/* satisfy deps from libbsc legacy.
|
|
|
|
TODO double check these */
|
|
|
|
void *tall_map_ctx = NULL;
|
|
|
|
/* end deps from libbsc legacy. */
|
|
|
|
|
|
|
|
static struct {
|
|
|
|
const char *database_name;
|
|
|
|
const char *config_file;
|
|
|
|
int daemonize;
|
|
|
|
const char *mncc_sock_path;
|
|
|
|
int use_db_counter;
|
|
|
|
} msc_cmdline_config = {
|
|
|
|
"sms.db",
|
|
|
|
"osmo-msc.cfg",
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
1
|
|
|
|
};
|
2009-12-23 04:29:04 +00:00
|
|
|
|
|
|
|
/* timer to store statistics */
|
|
|
|
#define DB_SYNC_INTERVAL 60, 0
|
2012-12-26 23:40:32 +00:00
|
|
|
#define EXPIRE_INTERVAL 10, 0
|
|
|
|
|
2011-05-06 10:11:06 +00:00
|
|
|
static struct osmo_timer_list db_sync_timer;
|
2009-12-23 04:29:04 +00:00
|
|
|
|
2018-08-13 14:29:50 +00:00
|
|
|
static int quit = 0;
|
|
|
|
|
2008-12-27 12:46:51 +00:00
|
|
|
static void print_usage()
|
|
|
|
{
|
2018-03-09 14:00:24 +00:00
|
|
|
printf("Usage: osmo-msc\n");
|
2008-12-27 12:46:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void print_help()
|
|
|
|
{
|
|
|
|
printf(" Some useful help...\n");
|
2015-09-15 09:50:50 +00:00
|
|
|
printf(" -h --help This text.\n");
|
2018-01-24 23:36:42 +00:00
|
|
|
printf(" -d option --debug=DCC:DMM:DRR: Enable debugging.\n");
|
2015-09-15 09:50:50 +00:00
|
|
|
printf(" -D --daemonize Fork the process into a background daemon.\n");
|
|
|
|
printf(" -c --config-file filename The config file to use.\n");
|
2010-03-25 01:41:38 +00:00
|
|
|
printf(" -s --disable-color\n");
|
2015-09-15 09:50:50 +00:00
|
|
|
printf(" -l --database db-name The database to use.\n");
|
|
|
|
printf(" -T --timestamp Prefix every log line with a timestamp.\n");
|
2018-06-15 12:58:33 +00:00
|
|
|
printf(" -V --version Print the version of OsmoMSC.\n");
|
2015-09-15 09:50:50 +00:00
|
|
|
printf(" -e --log-level number Set a global loglevel.\n");
|
2016-02-23 13:55:17 +00:00
|
|
|
printf(" -M --mncc-sock-path PATH Disable built-in MNCC handler and offer socket.\n");
|
2015-09-15 09:50:50 +00:00
|
|
|
printf(" -C --no-dbcounter Disable regular syncing of counters to database.\n");
|
2008-12-27 12:46:51 +00:00
|
|
|
}
|
|
|
|
|
2010-09-17 22:44:24 +00:00
|
|
|
static void handle_options(int argc, char **argv)
|
2008-12-27 12:46:51 +00:00
|
|
|
{
|
|
|
|
while (1) {
|
2009-06-20 20:36:41 +00:00
|
|
|
int option_index = 0, c;
|
2008-12-27 12:46:51 +00:00
|
|
|
static struct option long_options[] = {
|
|
|
|
{"help", 0, 0, 'h'},
|
|
|
|
{"debug", 1, 0, 'd'},
|
2010-08-25 17:43:54 +00:00
|
|
|
{"daemonize", 0, 0, 'D'},
|
2009-08-10 06:39:27 +00:00
|
|
|
{"config-file", 1, 0, 'c'},
|
2008-12-28 14:14:56 +00:00
|
|
|
{"disable-color", 0, 0, 's'},
|
2008-12-28 22:51:39 +00:00
|
|
|
{"database", 1, 0, 'l'},
|
2009-06-09 20:21:57 +00:00
|
|
|
{"timestamp", 0, 0, 'T'},
|
2010-03-22 16:09:32 +00:00
|
|
|
{"version", 0, 0, 'V' },
|
2010-03-25 01:39:15 +00:00
|
|
|
{"log-level", 1, 0, 'e'},
|
2016-02-23 13:55:17 +00:00
|
|
|
{"mncc-sock-path", 1, 0, 'M'},
|
2011-11-13 18:02:06 +00:00
|
|
|
{"no-dbcounter", 0, 0, 'C'},
|
2008-12-27 12:46:51 +00:00
|
|
|
{0, 0, 0, 0}
|
|
|
|
};
|
|
|
|
|
2017-12-05 11:14:47 +00:00
|
|
|
c = getopt_long(argc, argv, "hd:Dsl:TVc:e:CM:",
|
2008-12-27 12:46:51 +00:00
|
|
|
long_options, &option_index);
|
|
|
|
if (c == -1)
|
|
|
|
break;
|
|
|
|
|
|
|
|
switch (c) {
|
|
|
|
case 'h':
|
|
|
|
print_usage();
|
|
|
|
print_help();
|
|
|
|
exit(0);
|
2008-12-28 14:14:56 +00:00
|
|
|
case 's':
|
2011-05-12 14:02:07 +00:00
|
|
|
log_set_use_color(osmo_stderr_target, 0);
|
2008-12-27 12:46:51 +00:00
|
|
|
break;
|
|
|
|
case 'd':
|
2011-05-12 14:02:07 +00:00
|
|
|
log_parse_category_mask(osmo_stderr_target, optarg);
|
2008-12-27 12:46:51 +00:00
|
|
|
break;
|
2010-08-25 17:43:54 +00:00
|
|
|
case 'D':
|
2016-05-20 19:59:55 +00:00
|
|
|
msc_cmdline_config.daemonize = 1;
|
2010-08-25 17:43:54 +00:00
|
|
|
break;
|
2009-01-06 18:09:02 +00:00
|
|
|
case 'l':
|
2016-05-20 19:59:55 +00:00
|
|
|
msc_cmdline_config.database_name = optarg;
|
2008-12-28 22:51:39 +00:00
|
|
|
break;
|
2009-08-10 06:39:27 +00:00
|
|
|
case 'c':
|
2016-05-20 19:59:55 +00:00
|
|
|
msc_cmdline_config.config_file = optarg;
|
2009-08-10 06:39:27 +00:00
|
|
|
break;
|
2009-06-09 20:21:57 +00:00
|
|
|
case 'T':
|
2011-05-12 14:02:07 +00:00
|
|
|
log_set_print_timestamp(osmo_stderr_target, 1);
|
2009-06-09 20:21:57 +00:00
|
|
|
break;
|
2010-03-25 01:39:15 +00:00
|
|
|
case 'e':
|
2011-05-12 14:02:07 +00:00
|
|
|
log_set_log_level(osmo_stderr_target, atoi(optarg));
|
2010-03-25 01:39:15 +00:00
|
|
|
break;
|
2016-02-23 13:55:17 +00:00
|
|
|
case 'M':
|
2016-05-20 19:59:55 +00:00
|
|
|
msc_cmdline_config.mncc_sock_path = optarg;
|
2016-02-23 13:55:17 +00:00
|
|
|
break;
|
2011-11-13 18:02:06 +00:00
|
|
|
case 'C':
|
2016-05-20 19:59:55 +00:00
|
|
|
msc_cmdline_config.use_db_counter = 0;
|
2011-11-13 18:02:06 +00:00
|
|
|
break;
|
2010-03-22 16:09:32 +00:00
|
|
|
case 'V':
|
2010-05-16 17:20:24 +00:00
|
|
|
print_version(1);
|
2010-03-22 16:09:32 +00:00
|
|
|
exit(0);
|
|
|
|
break;
|
2008-12-27 12:46:51 +00:00
|
|
|
default:
|
2016-02-23 13:59:43 +00:00
|
|
|
/* catch unknown options *as well as* missing arguments. */
|
|
|
|
fprintf(stderr, "Error in command line options. Exiting.\n");
|
|
|
|
exit(-1);
|
2008-12-27 12:46:51 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-05-20 19:59:55 +00:00
|
|
|
struct gsm_network *msc_network_alloc(void *ctx,
|
|
|
|
mncc_recv_cb_t mncc_recv)
|
|
|
|
{
|
2018-02-27 11:59:45 +00:00
|
|
|
struct gsm_network *net = gsm_network_init(ctx, mncc_recv);
|
2016-05-20 19:59:55 +00:00
|
|
|
if (!net)
|
|
|
|
return NULL;
|
|
|
|
|
|
|
|
net->name_long = talloc_strdup(net, "OsmoMSC");
|
|
|
|
net->name_short = talloc_strdup(net, "OsmoMSC");
|
|
|
|
|
|
|
|
net->gsup_server_addr_str = talloc_strdup(net,
|
|
|
|
MSC_HLR_REMOTE_IP_DEFAULT);
|
|
|
|
net->gsup_server_port = MSC_HLR_REMOTE_PORT_DEFAULT;
|
|
|
|
|
2017-09-03 23:03:58 +00:00
|
|
|
mgcp_client_conf_init(&net->mgw.conf);
|
2016-05-20 19:59:55 +00:00
|
|
|
|
|
|
|
return net;
|
|
|
|
}
|
|
|
|
|
|
|
|
void msc_network_shutdown(struct gsm_network *net)
|
|
|
|
{
|
|
|
|
/* nothing here yet */
|
|
|
|
}
|
|
|
|
|
|
|
|
static struct gsm_network *msc_network = NULL;
|
|
|
|
|
2009-12-24 09:51:56 +00:00
|
|
|
extern void *tall_vty_ctx;
|
2009-01-01 01:50:32 +00:00
|
|
|
static void signal_handler(int signal)
|
|
|
|
{
|
|
|
|
fprintf(stdout, "signal %u received\n", signal);
|
|
|
|
|
|
|
|
switch (signal) {
|
2009-08-06 15:43:50 +00:00
|
|
|
case SIGINT:
|
2017-08-20 18:50:06 +00:00
|
|
|
case SIGTERM:
|
2018-08-13 14:29:50 +00:00
|
|
|
LOGP(DMSC, LOGL_NOTICE, "Terminating due to signal %d\n", signal);
|
|
|
|
quit++;
|
2009-01-01 01:50:32 +00:00
|
|
|
break;
|
2009-08-06 22:29:44 +00:00
|
|
|
case SIGABRT:
|
2016-08-25 07:35:26 +00:00
|
|
|
osmo_generate_backtrace();
|
2009-08-06 22:29:44 +00:00
|
|
|
/* in case of abort, we want to obtain a talloc report
|
|
|
|
* and then return to the caller, who will abort the process */
|
2009-06-20 20:36:41 +00:00
|
|
|
case SIGUSR1:
|
2009-12-24 09:51:56 +00:00
|
|
|
talloc_report(tall_vty_ctx, stderr);
|
2016-05-20 19:59:55 +00:00
|
|
|
talloc_report_full(tall_msc_ctx, stderr);
|
2009-06-20 20:36:41 +00:00
|
|
|
break;
|
2009-12-24 09:51:56 +00:00
|
|
|
case SIGUSR2:
|
|
|
|
talloc_report_full(tall_vty_ctx, stderr);
|
|
|
|
break;
|
2009-01-01 01:50:32 +00:00
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2009-12-23 04:29:04 +00:00
|
|
|
/* timer handling */
|
2011-05-06 10:13:10 +00:00
|
|
|
static int _db_store_counter(struct osmo_counter *counter, void *data)
|
2009-12-23 04:29:04 +00:00
|
|
|
{
|
|
|
|
return db_store_counter(counter);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void db_sync_timer_cb(void *data)
|
|
|
|
{
|
|
|
|
/* store counters to database and re-schedule */
|
2011-05-06 10:13:10 +00:00
|
|
|
osmo_counters_for_each(_db_store_counter, NULL);
|
2011-05-06 10:11:06 +00:00
|
|
|
osmo_timer_schedule(&db_sync_timer, DB_SYNC_INTERVAL);
|
2009-12-23 04:29:04 +00:00
|
|
|
}
|
|
|
|
|
2018-03-22 13:50:20 +00:00
|
|
|
static int msc_vty_go_parent(struct vty *vty)
|
|
|
|
{
|
|
|
|
switch (vty->node) {
|
|
|
|
case GSMNET_NODE:
|
|
|
|
vty->node = CONFIG_NODE;
|
|
|
|
vty->index = NULL;
|
|
|
|
break;
|
|
|
|
case SMPP_ESME_NODE:
|
|
|
|
vty->node = SMPP_NODE;
|
|
|
|
vty->index = NULL;
|
|
|
|
break;
|
|
|
|
case SMPP_NODE:
|
|
|
|
case MSC_NODE:
|
|
|
|
case MNCC_INT_NODE:
|
|
|
|
vty->node = CONFIG_NODE;
|
|
|
|
vty->index = NULL;
|
|
|
|
break;
|
|
|
|
case SUBSCR_NODE:
|
|
|
|
vty->node = ENABLE_NODE;
|
|
|
|
vty->index = NULL;
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
osmo_ss7_vty_go_parent(vty);
|
|
|
|
}
|
|
|
|
|
|
|
|
return vty->node;
|
|
|
|
}
|
|
|
|
|
|
|
|
static int msc_vty_is_config_node(struct vty *vty, int node)
|
|
|
|
{
|
|
|
|
/* Check if libosmo-sccp declares the node in
|
|
|
|
* question as config node */
|
|
|
|
if (osmo_ss7_is_config_node(vty, node))
|
|
|
|
return 1;
|
|
|
|
|
|
|
|
switch (node) {
|
|
|
|
/* add items that are not config */
|
|
|
|
case SUBSCR_NODE:
|
|
|
|
case CONFIG_NODE:
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
default:
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
}
|
2010-05-25 21:31:39 +00:00
|
|
|
|
2016-05-20 19:59:55 +00:00
|
|
|
static struct vty_app_info msc_vty_info = {
|
|
|
|
.name = "OsmoMSC",
|
2010-05-25 21:31:39 +00:00
|
|
|
.version = PACKAGE_VERSION,
|
2018-03-22 13:50:20 +00:00
|
|
|
.go_parent_cb = msc_vty_go_parent,
|
|
|
|
.is_config_node = msc_vty_is_config_node,
|
2010-05-25 21:31:39 +00:00
|
|
|
};
|
|
|
|
|
2017-07-05 13:19:52 +00:00
|
|
|
#ifdef BUILD_IU
|
2017-04-09 10:32:51 +00:00
|
|
|
static int rcvmsg_iu_cs(struct msgb *msg, struct gprs_ra_id *ra_id, uint16_t *sai)
|
2016-05-20 19:59:55 +00:00
|
|
|
{
|
2018-02-08 23:27:56 +00:00
|
|
|
DEBUGP(DIUCS, "got IuCS message %d bytes: %s\n", msg->len, msgb_hexdump(msg));
|
2016-05-20 19:59:55 +00:00
|
|
|
if (ra_id) {
|
2018-02-22 03:04:54 +00:00
|
|
|
DEBUGP(DIUCS, "got IuCS message on %s\n", osmo_rai_name(ra_id));
|
2016-05-20 19:59:55 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return gsm0408_rcvmsg_iucs(msc_network, msg, ra_id? &ra_id->lac : NULL);
|
|
|
|
}
|
|
|
|
|
2017-07-05 13:19:52 +00:00
|
|
|
static int rx_iu_event(struct ranap_ue_conn_ctx *ctx, enum ranap_iu_event_type type,
|
2016-05-20 19:59:55 +00:00
|
|
|
void *data)
|
|
|
|
{
|
|
|
|
DEBUGP(DIUCS, "got IuCS event %u: %s\n", type,
|
2017-07-05 13:19:52 +00:00
|
|
|
ranap_iu_event_type_str(type));
|
2016-05-20 19:59:55 +00:00
|
|
|
|
|
|
|
return iucs_rx_ranap_event(msc_network, ctx, type, data);
|
|
|
|
}
|
2017-07-05 13:19:52 +00:00
|
|
|
#endif
|
2016-05-20 19:59:55 +00:00
|
|
|
|
2017-04-09 10:32:51 +00:00
|
|
|
#define DEFAULT_M3UA_REMOTE_IP "127.0.0.1"
|
2017-11-24 03:36:35 +00:00
|
|
|
#define DEFAULT_PC "0.23.1"
|
2017-04-09 10:32:51 +00:00
|
|
|
|
|
|
|
static struct osmo_sccp_instance *sccp_setup(void *ctx, uint32_t cs7_instance,
|
|
|
|
const char *label, const char *default_pc_str)
|
|
|
|
{
|
|
|
|
int default_pc = osmo_ss7_pointcode_parse(NULL, default_pc_str);
|
|
|
|
if (default_pc < 0)
|
|
|
|
return NULL;
|
|
|
|
|
|
|
|
return osmo_sccp_simple_client_on_ss7_id(ctx, cs7_instance, label, default_pc,
|
|
|
|
OSMO_SS7_ASP_PROT_M3UA,
|
|
|
|
0, NULL, /* local: use arbitrary port and 0.0.0.0. */
|
|
|
|
0, /* remote: use protocol default port */
|
|
|
|
DEFAULT_M3UA_REMOTE_IP);
|
|
|
|
/* Note: If a differing remote IP is to be used, it was already entered in the vty config at
|
|
|
|
* 'cs7' / 'asp' / 'remote-ip', and this default remote IP has no effect.
|
|
|
|
* Similarly, 'cs7' / 'listen' can specify the local IP address. */
|
|
|
|
}
|
|
|
|
|
|
|
|
static int ss7_setup(void *ctx)
|
|
|
|
{
|
|
|
|
uint32_t cs7_instance_a = msc_network->a.cs7_instance;
|
|
|
|
#if BUILD_IU
|
|
|
|
uint32_t cs7_instance_iu = msc_network->iu.cs7_instance;
|
|
|
|
|
|
|
|
if (cs7_instance_a == cs7_instance_iu) {
|
|
|
|
/* Create one single SCCP instance which will be used for both,
|
|
|
|
* Iu and A at the same time, under the same point-code */
|
|
|
|
LOGP(DMSC, LOGL_NOTICE, "CS7 Instance identifiers: A = Iu = %u\n", cs7_instance_a);
|
|
|
|
|
2017-11-24 03:36:35 +00:00
|
|
|
msc_network->a.sccp = sccp_setup(ctx, cs7_instance_a, "OsmoMSC-A-Iu", DEFAULT_PC);
|
2017-04-09 10:32:51 +00:00
|
|
|
if (!msc_network->a.sccp)
|
|
|
|
return -EINVAL;
|
|
|
|
|
|
|
|
msc_network->iu.sccp = msc_network->a.sccp;
|
|
|
|
} else {
|
|
|
|
/* Create two separate SCCP instances to run A and Iu independently on different
|
|
|
|
* pointcodes */
|
|
|
|
LOGP(DMSC, LOGL_NOTICE, "CS7 Instance identifiers: A = %u, Iu = %u\n",
|
|
|
|
cs7_instance_a, cs7_instance_iu);
|
|
|
|
|
2017-11-24 03:36:35 +00:00
|
|
|
msc_network->a.sccp = sccp_setup(ctx, cs7_instance_a, "OsmoMSC-A", DEFAULT_PC);
|
2017-04-09 10:32:51 +00:00
|
|
|
if (!msc_network->a.sccp)
|
|
|
|
return -EINVAL;
|
|
|
|
|
2017-11-24 03:36:35 +00:00
|
|
|
msc_network->iu.sccp = sccp_setup(ctx, cs7_instance_iu, "OsmoMSC-Iu", DEFAULT_PC);
|
2017-04-09 10:32:51 +00:00
|
|
|
if (!msc_network->iu.sccp)
|
|
|
|
return -EINVAL;
|
|
|
|
}
|
|
|
|
#else
|
|
|
|
/* No Iu support, just open up an A instance */
|
2017-11-24 03:36:35 +00:00
|
|
|
msc_network->a.sccp = sccp_setup(ctx, cs7_instance_a, "OsmoMSC-A", DEFAULT_PC);
|
2017-04-09 10:32:51 +00:00
|
|
|
if (!msc_network->a.sccp)
|
|
|
|
return -EINVAL;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2018-03-22 14:51:22 +00:00
|
|
|
static const struct log_info_cat msc_default_categories[] = {
|
|
|
|
[DRLL] = {
|
|
|
|
.name = "DRLL",
|
|
|
|
.description = "A-bis Radio Link Layer (RLL)",
|
|
|
|
.color = "\033[1;31m",
|
|
|
|
.enabled = 1, .loglevel = LOGL_NOTICE,
|
|
|
|
},
|
|
|
|
[DCC] = {
|
|
|
|
.name = "DCC",
|
|
|
|
.description = "Layer3 Call Control (CC)",
|
|
|
|
.color = "\033[1;32m",
|
|
|
|
.enabled = 1, .loglevel = LOGL_NOTICE,
|
|
|
|
},
|
|
|
|
[DMM] = {
|
|
|
|
.name = "DMM",
|
|
|
|
.description = "Layer3 Mobility Management (MM)",
|
|
|
|
.color = "\033[1;33m",
|
|
|
|
.enabled = 1, .loglevel = LOGL_NOTICE,
|
|
|
|
},
|
|
|
|
[DRR] = {
|
|
|
|
.name = "DRR",
|
|
|
|
.description = "Layer3 Radio Resource (RR)",
|
|
|
|
.color = "\033[1;34m",
|
|
|
|
.enabled = 1, .loglevel = LOGL_NOTICE,
|
|
|
|
},
|
|
|
|
[DMNCC] = {
|
|
|
|
.name = "DMNCC",
|
|
|
|
.description = "MNCC API for Call Control application",
|
|
|
|
.color = "\033[1;39m",
|
|
|
|
.enabled = 1, .loglevel = LOGL_NOTICE,
|
|
|
|
},
|
|
|
|
[DPAG] = {
|
|
|
|
.name = "DPAG",
|
|
|
|
.description = "Paging Subsystem",
|
|
|
|
.color = "\033[1;38m",
|
|
|
|
.enabled = 1, .loglevel = LOGL_NOTICE,
|
|
|
|
},
|
|
|
|
[DMSC] = {
|
|
|
|
.name = "DMSC",
|
|
|
|
.description = "Mobile Switching Center",
|
|
|
|
.enabled = 1, .loglevel = LOGL_NOTICE,
|
|
|
|
},
|
|
|
|
[DMGCP] = {
|
|
|
|
.name = "DMGCP",
|
|
|
|
.description = "Media Gateway Control Protocol",
|
|
|
|
.enabled = 1, .loglevel = LOGL_NOTICE,
|
|
|
|
},
|
|
|
|
[DHO] = {
|
|
|
|
.name = "DHO",
|
|
|
|
.description = "Hand-Over",
|
|
|
|
.enabled = 1, .loglevel = LOGL_NOTICE,
|
|
|
|
},
|
|
|
|
[DDB] = {
|
|
|
|
.name = "DDB",
|
|
|
|
.description = "Database Layer",
|
|
|
|
.enabled = 1, .loglevel = LOGL_NOTICE,
|
|
|
|
},
|
|
|
|
[DREF] = {
|
|
|
|
.name = "DREF",
|
|
|
|
.description = "Reference Counting",
|
|
|
|
.enabled = 0, .loglevel = LOGL_NOTICE,
|
|
|
|
},
|
|
|
|
[DCTRL] = {
|
|
|
|
.name = "DCTRL",
|
|
|
|
.description = "Control interface",
|
|
|
|
.enabled = 1, .loglevel = LOGL_NOTICE,
|
|
|
|
},
|
|
|
|
[DSMPP] = {
|
|
|
|
.name = "DSMPP",
|
|
|
|
.description = "SMPP interface for external SMS apps",
|
|
|
|
.enabled = 1, .loglevel = LOGL_DEBUG,
|
|
|
|
},
|
|
|
|
[DRANAP] = {
|
|
|
|
.name = "DRANAP",
|
|
|
|
.description = "Radio Access Network Application Part Protocol",
|
|
|
|
.enabled = 1, .loglevel = LOGL_DEBUG,
|
|
|
|
},
|
|
|
|
[DVLR] = {
|
|
|
|
.name = "DVLR",
|
|
|
|
.description = "Visitor Location Register",
|
|
|
|
.enabled = 1, .loglevel = LOGL_DEBUG,
|
|
|
|
},
|
|
|
|
[DIUCS] = {
|
|
|
|
.name = "DIUCS",
|
|
|
|
.description = "Iu-CS Protocol",
|
|
|
|
.enabled = 1, .loglevel = LOGL_DEBUG,
|
|
|
|
},
|
|
|
|
[DBSSAP] = {
|
|
|
|
.name = "DBSSAP",
|
|
|
|
.description = "BSSAP Protocol (A Interface)",
|
|
|
|
.enabled = 1, .loglevel = LOGL_NOTICE,
|
|
|
|
},
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
static int filter_fn(const struct log_context *ctx, struct log_target *tar)
|
|
|
|
{
|
|
|
|
const struct vlr_subscr *vsub = ctx->ctx[LOG_CTX_VLR_SUBSCR];
|
|
|
|
|
|
|
|
if ((tar->filter_map & (1 << LOG_FLT_VLR_SUBSCR)) != 0
|
|
|
|
&& vsub && vsub == tar->filter_data[LOG_FLT_VLR_SUBSCR])
|
|
|
|
return 1;
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
const struct log_info log_info = {
|
|
|
|
.filter_fn = filter_fn,
|
|
|
|
.cat = msc_default_categories,
|
|
|
|
.num_cat = ARRAY_SIZE(msc_default_categories),
|
|
|
|
};
|
|
|
|
|
2018-03-22 14:56:49 +00:00
|
|
|
extern void *tall_gsms_ctx;
|
|
|
|
extern void *tall_call_ctx;
|
|
|
|
extern void *tall_trans_ctx;
|
|
|
|
|
2008-12-26 00:05:11 +00:00
|
|
|
int main(int argc, char **argv)
|
|
|
|
{
|
2009-02-09 18:13:26 +00:00
|
|
|
int rc;
|
|
|
|
|
2016-05-20 19:59:55 +00:00
|
|
|
msc_vty_info.copyright = osmomsc_copyright;
|
2010-05-25 21:31:39 +00:00
|
|
|
|
2016-05-20 19:59:55 +00:00
|
|
|
tall_msc_ctx = talloc_named_const(NULL, 1, "osmo_msc");
|
2018-02-13 23:40:05 +00:00
|
|
|
msc_vty_info.tall_ctx = tall_msc_ctx;
|
2011-05-12 14:02:07 +00:00
|
|
|
|
2018-03-22 14:56:49 +00:00
|
|
|
msgb_talloc_ctx_init(tall_msc_ctx, 0);
|
|
|
|
tall_gsms_ctx = talloc_named_const(tall_msc_ctx, 0, "sms");
|
|
|
|
tall_call_ctx = talloc_named_const(tall_msc_ctx, 0, "gsm_call");
|
|
|
|
tall_trans_ctx = talloc_named_const(tall_msc_ctx, 0, "transaction");
|
|
|
|
|
2018-03-30 21:04:04 +00:00
|
|
|
osmo_init_logging2(tall_msc_ctx, &log_info);
|
2016-05-20 19:59:55 +00:00
|
|
|
osmo_stats_init(tall_msc_ctx);
|
|
|
|
|
|
|
|
/* For --version, vty_init() must be called before handling options */
|
|
|
|
vty_init(&msc_vty_info);
|
2011-02-05 12:54:41 +00:00
|
|
|
|
2017-04-09 10:32:51 +00:00
|
|
|
osmo_ss7_init();
|
|
|
|
osmo_ss7_vty_init_asp(tall_msc_ctx);
|
|
|
|
|
2016-10-23 23:53:38 +00:00
|
|
|
/* Parse options */
|
|
|
|
handle_options(argc, argv);
|
|
|
|
|
|
|
|
/* Allocate global gsm_network struct; choose socket/internal MNCC */
|
2016-05-20 19:59:55 +00:00
|
|
|
msc_network = msc_network_alloc(tall_msc_ctx,
|
|
|
|
msc_cmdline_config.mncc_sock_path?
|
|
|
|
mncc_sock_from_cc
|
|
|
|
: int_mncc_recv);
|
|
|
|
if (!msc_network)
|
|
|
|
return -ENOMEM;
|
|
|
|
|
|
|
|
if (msc_vlr_alloc(msc_network)) {
|
2016-06-19 16:06:02 +00:00
|
|
|
fprintf(stderr, "Failed to allocate VLR\n");
|
|
|
|
exit(1);
|
|
|
|
}
|
2010-05-16 18:52:23 +00:00
|
|
|
|
2016-05-20 19:59:55 +00:00
|
|
|
ctrl_vty_init(tall_msc_ctx);
|
|
|
|
logging_vty_add_cmds(&log_info);
|
2018-02-13 23:40:05 +00:00
|
|
|
osmo_talloc_vty_add_cmds();
|
2016-05-20 19:59:55 +00:00
|
|
|
msc_vty_init(msc_network);
|
|
|
|
|
2012-11-20 21:22:04 +00:00
|
|
|
#ifdef BUILD_SMPP
|
2016-05-20 19:59:55 +00:00
|
|
|
if (smpp_openbsc_alloc_init(tall_msc_ctx) < 0)
|
2012-11-20 21:22:04 +00:00
|
|
|
return -1;
|
|
|
|
#endif
|
|
|
|
|
2016-05-20 19:59:55 +00:00
|
|
|
rc = vty_read_config_file(msc_cmdline_config.config_file, NULL);
|
2016-05-11 12:12:00 +00:00
|
|
|
if (rc < 0) {
|
2018-01-24 23:36:42 +00:00
|
|
|
LOGP(DMSC, LOGL_FATAL, "Failed to parse the config file: '%s'\n",
|
2016-05-20 19:59:55 +00:00
|
|
|
msc_cmdline_config.config_file);
|
|
|
|
return 1;
|
2016-05-11 12:12:00 +00:00
|
|
|
}
|
|
|
|
|
2016-05-20 19:59:55 +00:00
|
|
|
/* Initialize MNCC socket if appropriate */
|
|
|
|
if (msc_cmdline_config.mncc_sock_path) {
|
|
|
|
rc = mncc_sock_init(msc_network,
|
|
|
|
msc_cmdline_config.mncc_sock_path);
|
|
|
|
if (rc) {
|
|
|
|
fprintf(stderr, "MNCC socket initialization failed. exiting.\n");
|
|
|
|
exit(1);
|
|
|
|
}
|
|
|
|
} else
|
|
|
|
DEBUGP(DMNCC, "Using internal MNCC handler.\n");
|
|
|
|
|
|
|
|
/* start telnet after reading config for vty_get_bind_addr() */
|
|
|
|
rc = telnet_init_dynif(tall_msc_ctx, &msc_network,
|
|
|
|
vty_get_bind_addr(), OSMO_VTY_PORT_MSC);
|
|
|
|
if (rc < 0)
|
|
|
|
return 2;
|
|
|
|
|
|
|
|
/* BSC stuff is to be split behind an A-interface to be used with
|
|
|
|
* OsmoBSC, but there is no need to remove it yet. Most of the
|
|
|
|
* following code until iu_init() is legacy. */
|
|
|
|
|
2013-03-13 14:39:56 +00:00
|
|
|
#ifdef BUILD_SMPP
|
2016-05-20 19:59:55 +00:00
|
|
|
smpp_openbsc_start(msc_network);
|
2013-03-13 14:39:56 +00:00
|
|
|
#endif
|
2010-05-16 17:20:24 +00:00
|
|
|
|
2016-02-23 14:10:33 +00:00
|
|
|
/* start control interface after reading config for
|
|
|
|
* ctrl_vty_get_bind_addr() */
|
2016-05-20 19:59:55 +00:00
|
|
|
msc_network->ctrl = ctrl_interface_setup_dynip(msc_network, ctrl_vty_get_bind_addr(),
|
|
|
|
OSMO_CTRL_PORT_MSC, NULL);
|
|
|
|
if (!msc_network->ctrl) {
|
2011-08-05 10:22:35 +00:00
|
|
|
printf("Failed to initialize control interface. Exiting.\n");
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
|
2016-05-20 19:59:55 +00:00
|
|
|
#if 0
|
|
|
|
TODO: we probably want some of the _net_ ctrl commands from bsc_base_ctrl_cmds_install().
|
2013-01-09 16:03:27 +00:00
|
|
|
if (bsc_base_ctrl_cmds_install() != 0) {
|
2014-03-23 11:06:36 +00:00
|
|
|
printf("Failed to initialize the BSC control commands.\n");
|
|
|
|
return -1;
|
|
|
|
}
|
2016-05-20 19:59:55 +00:00
|
|
|
#endif
|
2014-03-23 11:06:36 +00:00
|
|
|
|
2016-05-20 19:59:55 +00:00
|
|
|
if (msc_ctrl_cmds_install(msc_network) != 0) {
|
2014-03-23 11:06:36 +00:00
|
|
|
printf("Failed to initialize the MSC control commands.\n");
|
2013-01-09 16:03:27 +00:00
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
|
2009-02-24 22:36:20 +00:00
|
|
|
/* seed the PRNG */
|
|
|
|
srand(time(NULL));
|
2016-05-20 19:59:55 +00:00
|
|
|
/* TODO: is this used for crypto?? Improve randomness, at least we
|
|
|
|
* should try to use the nanoseconds part of the current time. */
|
2009-02-24 22:36:20 +00:00
|
|
|
|
2016-05-20 19:59:55 +00:00
|
|
|
if (db_init(msc_cmdline_config.database_name)) {
|
|
|
|
printf("DB: Failed to init database: %s\n",
|
|
|
|
msc_cmdline_config.database_name);
|
|
|
|
return 4;
|
2012-05-11 21:28:19 +00:00
|
|
|
}
|
|
|
|
|
2016-06-19 16:06:02 +00:00
|
|
|
osmo_fsm_log_addr(true);
|
2016-05-20 19:59:55 +00:00
|
|
|
if (msc_vlr_start(msc_network)) {
|
2016-06-19 16:06:02 +00:00
|
|
|
fprintf(stderr, "Failed to start VLR\n");
|
|
|
|
exit(1);
|
|
|
|
}
|
|
|
|
|
|
|
|
msc_subscr_conn_init();
|
|
|
|
|
2009-08-17 04:55:10 +00:00
|
|
|
if (db_prepare()) {
|
|
|
|
printf("DB: Failed to prepare database.\n");
|
2016-05-20 19:59:55 +00:00
|
|
|
return 5;
|
2009-08-17 04:55:10 +00:00
|
|
|
}
|
|
|
|
|
2009-12-23 04:29:04 +00:00
|
|
|
/* setup the timer */
|
2017-05-08 18:57:52 +00:00
|
|
|
osmo_timer_setup(&db_sync_timer, db_sync_timer_cb, NULL);
|
2016-05-20 19:59:55 +00:00
|
|
|
if (msc_cmdline_config.use_db_counter)
|
2011-11-13 18:02:06 +00:00
|
|
|
osmo_timer_schedule(&db_sync_timer, DB_SYNC_INTERVAL);
|
2009-12-23 04:29:04 +00:00
|
|
|
|
2009-08-06 15:43:50 +00:00
|
|
|
signal(SIGINT, &signal_handler);
|
2017-08-20 18:50:06 +00:00
|
|
|
signal(SIGTERM, &signal_handler);
|
2009-01-01 01:50:32 +00:00
|
|
|
signal(SIGABRT, &signal_handler);
|
2009-06-20 20:36:41 +00:00
|
|
|
signal(SIGUSR1, &signal_handler);
|
2009-12-24 09:51:56 +00:00
|
|
|
signal(SIGUSR2, &signal_handler);
|
2011-05-12 14:02:07 +00:00
|
|
|
osmo_init_ignore_signals();
|
2009-01-01 01:50:32 +00:00
|
|
|
|
2010-12-24 12:48:27 +00:00
|
|
|
/* start the SMS queue */
|
2016-05-20 19:59:55 +00:00
|
|
|
if (sms_queue_start(msc_network, 20) != 0)
|
2010-12-24 12:48:27 +00:00
|
|
|
return -1;
|
2012-11-20 21:22:04 +00:00
|
|
|
|
2017-09-03 23:03:58 +00:00
|
|
|
msc_network->mgw.client = mgcp_client_init(
|
|
|
|
msc_network, &msc_network->mgw.conf);
|
2016-05-20 19:59:55 +00:00
|
|
|
|
2017-09-03 23:03:58 +00:00
|
|
|
if (mgcp_client_connect(msc_network->mgw.client)) {
|
2016-05-20 19:59:55 +00:00
|
|
|
printf("MGCPGW connect failed\n");
|
|
|
|
return 7;
|
|
|
|
}
|
|
|
|
|
2017-04-09 10:32:51 +00:00
|
|
|
if (ss7_setup(tall_msc_ctx)) {
|
|
|
|
printf("Setting up SCCP client failed.\n");
|
|
|
|
return 8;
|
|
|
|
}
|
2016-05-20 19:59:55 +00:00
|
|
|
|
|
|
|
#ifdef BUILD_IU
|
|
|
|
/* Set up IuCS */
|
2017-07-05 13:19:52 +00:00
|
|
|
ranap_iu_init(tall_msc_ctx, DRANAP, "OsmoMSC-IuCS", msc_network->iu.sccp, rcvmsg_iu_cs, rx_iu_event);
|
2016-05-20 19:59:55 +00:00
|
|
|
#endif
|
|
|
|
|
2017-04-09 10:32:51 +00:00
|
|
|
/* Set up A interface */
|
|
|
|
a_init(msc_network->a.sccp, msc_network);
|
|
|
|
|
2018-08-03 18:16:52 +00:00
|
|
|
/* Init RRLP handlers */
|
|
|
|
msc_rrlp_init();
|
|
|
|
|
2016-05-20 19:59:55 +00:00
|
|
|
if (msc_cmdline_config.daemonize) {
|
2010-08-25 17:43:54 +00:00
|
|
|
rc = osmo_daemonize();
|
|
|
|
if (rc < 0) {
|
|
|
|
perror("Error during daemonize");
|
2016-05-20 19:59:55 +00:00
|
|
|
return 6;
|
2010-08-25 17:43:54 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-08-13 14:29:50 +00:00
|
|
|
while (!quit) {
|
2010-03-26 13:28:59 +00:00
|
|
|
log_reset_context();
|
2011-05-06 10:11:23 +00:00
|
|
|
osmo_select_main(0);
|
2008-12-26 00:05:11 +00:00
|
|
|
}
|
2018-08-13 14:29:50 +00:00
|
|
|
|
|
|
|
msc_network_shutdown(msc_network);
|
|
|
|
osmo_signal_dispatch(SS_L_GLOBAL, S_L_GLOBAL_SHUTDOWN, NULL);
|
|
|
|
sleep(3);
|
|
|
|
|
|
|
|
log_fini();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Report the heap state of root context, then free,
|
|
|
|
* so both ASAN and Valgrind are happy...
|
|
|
|
*/
|
|
|
|
talloc_report_full(tall_msc_ctx, stderr);
|
|
|
|
talloc_free(tall_msc_ctx);
|
|
|
|
|
2018-08-14 12:13:15 +00:00
|
|
|
/* FIXME: VTY code still uses NULL-context */
|
|
|
|
talloc_free(tall_vty_ctx);
|
|
|
|
|
2018-08-13 14:29:50 +00:00
|
|
|
/**
|
|
|
|
* Report the heap state of NULL context, then free,
|
|
|
|
* so both ASAN and Valgrind are happy...
|
|
|
|
*/
|
|
|
|
talloc_report_full(NULL, stderr);
|
|
|
|
talloc_disable_null_tracking();
|
|
|
|
return 0;
|
2008-12-26 00:05:11 +00:00
|
|
|
}
|