diff options
author | Andreas Eversberg <jolly@eversberg.eu> | 2012-07-08 20:50:02 +0200 |
---|---|---|
committer | Andreas Eversberg <jolly@eversberg.eu> | 2012-07-08 20:50:02 +0200 |
commit | 744f745d7a508605254afa8f78412ad410d153b0 (patch) | |
tree | 59f1e90276375ee4a21d60b436e80e0bfb1f657a /src/osmo-bts-sysmo/main.c | |
parent | 8169b0bd853c0d3a9e69b166f3a271556f84767f (diff) |
PCU: Add PCU socket interface to BTS.
A special command line option "-P" is used to enable socket interface
and signal available GPRS MO object to BSC.
Diffstat (limited to 'src/osmo-bts-sysmo/main.c')
-rw-r--r-- | src/osmo-bts-sysmo/main.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/osmo-bts-sysmo/main.c b/src/osmo-bts-sysmo/main.c index 03db2382..2203309d 100644 --- a/src/osmo-bts-sysmo/main.c +++ b/src/osmo-bts-sysmo/main.c @@ -43,6 +43,7 @@ #include <osmo-bts/bts.h> #include <osmo-bts/vty.h> #include <osmo-bts/bts_model.h> +#include <osmo-bts/pcu_if.h> #define SYSMOBTS_RF_LOCK_PATH "/var/lock/bts_rf_lock" @@ -50,6 +51,7 @@ /* FIXME: read from real hardware */ const uint8_t abis_mac[6] = { 0,1,2,3,4,5 }; +int gprs_enabled = 0; static const char *config_file = "osmo-bts.cfg"; static int daemonize = 0; @@ -107,6 +109,7 @@ static void print_help() " -e --log-level Set a global log-level\n" " -p --dsp-trace Set DSP trace flags\n" " -w --hw-version Print the targeted HW Version\n" + " -P --pcu Enable PCU L1 socket interface\n" ); } @@ -136,10 +139,11 @@ static void handle_options(int argc, char **argv) { "log-level", 1, 0, 'e' }, { "dsp-trace", 1, 0, 'p' }, { "hw-version", 0, 0, 'w' }, + { "pcu", 0, 0, 'P' }, { 0, 0, 0, 0 } }; - c = getopt_long(argc, argv, "hc:d:Dc:sTVe:p:w", + c = getopt_long(argc, argv, "hc:d:Dc:sTVe:p:w:P", long_options, &option_idx); if (c == -1) break; @@ -164,6 +168,13 @@ static void handle_options(int argc, char **argv) case 'T': log_set_print_timestamp(osmo_stderr_target, 1); break; + case 'P': + if (pcu_sock_init()) { + fprintf(stderr, "PCU L1 socket failed\n"); + exit(-1); + } + gprs_enabled = 1; + break; case 'V': print_version(1); exit(0); |