aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/bsc_msc_ip.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-04-14 11:19:07 +0200
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-04-14 11:19:07 +0200
commit80b584bbe72c2d5aee39e521a33ec2c25962d77a (patch)
treee2a0ed5848e0943332285991e0087ddc1176aa61 /openbsc/src/bsc_msc_ip.c
parent15c21e8eecf14abf80114ba302a003e6d30b6be7 (diff)
[bsc_msc_ip] Implement a simple RF lock command interface
Right now this is using unix domain sockets and it only supports query, on and off as commands. In the future we want to have a vty<->snmp bridge or at least more status exposed via snmp.
Diffstat (limited to 'openbsc/src/bsc_msc_ip.c')
-rw-r--r--openbsc/src/bsc_msc_ip.c18
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);
}