aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bts-sysmo/main.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2014-05-25 14:43:03 +0200
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2014-07-31 16:57:39 +0200
commitb05d72d21b8cc91126cf45525f9010df6142e1c2 (patch)
treee620d3078f7c2176756c62fe94827d79a38add64 /src/osmo-bts-sysmo/main.c
parent9e1dbf532e4450f99797b7a8e580172449c615aa (diff)
sysmobts: Begin with an OML router that will be used by the manager
Begin with the basics of a OML Router. This is currently only capable of accepting a connection and read messages but it will evolve into a router in multiple stages. The first usage will be by the sysmobts-mgr. An OML Error Indication will be sent by the sysmobts-mgr and it will be forwarded to the BSC. In the second step we will set a relative power reduction from the sysmobts-mgr. In the long-term this code will be used to communicate with a second TRX.
Diffstat (limited to 'src/osmo-bts-sysmo/main.c')
-rw-r--r--src/osmo-bts-sysmo/main.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/osmo-bts-sysmo/main.c b/src/osmo-bts-sysmo/main.c
index fac45d9c..60a4a7ff 100644
--- a/src/osmo-bts-sysmo/main.c
+++ b/src/osmo-bts-sysmo/main.c
@@ -52,6 +52,7 @@
#include "eeprom.h"
#include "l1_if.h"
#include "hw_misc.h"
+#include "oml_router.h"
/* FIXME: read from real hardware */
const uint8_t abis_mac[6] = { 0,1,2,3,4,5 };
@@ -300,6 +301,7 @@ int main(int argc, char **argv)
struct gsm_bts_role_bts *btsb;
struct e1inp_line *line;
void *tall_msgb_ctx;
+ struct osmo_fd accept_fd, read_fd;
int rc;
tall_bts_ctx = talloc_named_const(NULL, 1, "OsmoBTS context");
@@ -367,6 +369,12 @@ int main(int argc, char **argv)
signal(SIGUSR2, &signal_handler);
osmo_init_ignore_signals();
+ rc = oml_router_init(bts, &accept_fd, &read_fd);
+ if (rc < 0) {
+ perror("Error creating the OML router\n");
+ exit(1);
+ }
+
if (!btsb->bsc_oml_host) {
fprintf(stderr, "Cannot start BTS without knowing BSC OML IP\n");
exit(1);