diff options
Diffstat (limited to 'openbsc/src/bsc_msc_ip.c')
-rw-r--r-- | openbsc/src/bsc_msc_ip.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/openbsc/src/bsc_msc_ip.c b/openbsc/src/bsc_msc_ip.c index 87f8a4442..deba7d3ba 100644 --- a/openbsc/src/bsc_msc_ip.c +++ b/openbsc/src/bsc_msc_ip.c @@ -44,6 +44,7 @@ #include <openbsc/chan_alloc.h> #include <openbsc/bsc_msc.h> #include <openbsc/bsc_nat.h> +#include <openbsc/bsc_msc_rf.h> #include <osmocore/select.h> #include <osmocore/talloc.h> @@ -63,6 +64,7 @@ static struct bsc_msc_connection *msc_con; static struct in_addr local_addr; static LLIST_HEAD(active_connections); static struct write_queue mgcp_agent; +static const char *rf_ctl = NULL; extern int ipacc_rtp_direct; extern int bsc_bootstrap_network(int (*layer4)(struct gsm_network *, int, void *), const char *cfg_file); @@ -890,6 +892,7 @@ static void print_help() printf(" -m --msc=IP. The address of the MSC.\n"); printf(" -l --local=IP. The local address of the MGCP.\n"); printf(" -e --log-level number. Set a global loglevel.\n"); + printf(" -r --rf-ctl NAME. A unix domain socket to listen for cmds.\n"); } static void handle_options(int argc, char** argv) @@ -905,10 +908,11 @@ static void handle_options(int argc, char** argv) {"msc", 1, 0, 'm'}, {"local", 1, 0, 'l'}, {"log-level", 1, 0, 'e'}, + {"rf-ctl", 1, 0, 'r'}, {0, 0, 0, 0} }; - c = getopt_long(argc, argv, "hd:sTc:m:l:e:", + c = getopt_long(argc, argv, "hd:sTc:m:l:e:r:", long_options, &option_index); if (c == -1) break; @@ -942,6 +946,9 @@ static void handle_options(int argc, char** argv) case 'e': log_set_log_level(stderr_target, atoi(optarg)); break; + case 'r': + rf_ctl = optarg; + break; default: /* ignore */ break; @@ -1084,6 +1091,15 @@ int main(int argc, char **argv) exit(1); } + if (rf_ctl) { + struct bsc_msc_rf *rf; + rf = bsc_msc_rf_create(rf_ctl, bsc_gsmnet); + if (!rf) { + fprintf(stderr, "Failed to create the RF service.\n"); + exit(1); + } + } + while (1) { bsc_select_main(0); } |