aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2009-10-27 03:41:09 +0100
committerHolger Hans Peter Freyther <zecke@selfish.org>2009-10-27 03:41:09 +0100
commit55aac6e868d4f3b565bba310598104c53c53da0a (patch)
treeab455572172fec863bd19a3e464506dbb9203dcb /openbsc
parent1f59ac4728906966d99f669b6157928d97064169 (diff)
ipaccess-config: Introduce stream-id/oml_tei to make it work again
ipaccess-config stopped working after the introduction of multi-TRX/RSL stream id support in commit 8175e95222cf1c83. Set the oml_tei to 0xff by default and add an option to set a different stream id.
Diffstat (limited to 'openbsc')
-rw-r--r--openbsc/src/ipaccess-config.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/openbsc/src/ipaccess-config.c b/openbsc/src/ipaccess-config.c
index 46043d571..add45f94b 100644
--- a/openbsc/src/ipaccess-config.c
+++ b/openbsc/src/ipaccess-config.c
@@ -281,13 +281,14 @@ static void print_help(void)
printf(" -n flags/mask\tSet NVRAM attributes.\n");
printf(" -l --listen testnr \tPerform speciified test number\n");
printf(" -h --help this text\n");
+ printf(" -s --stream-id ID\n");
}
int main(int argc, char **argv)
{
struct gsm_bts *bts;
struct sockaddr_in sin;
- int rc, option_index = 0;
+ int rc, option_index = 0, stream_id = 0xff;
printf("ipaccess-config (C) 2009 by Harald Welte\n");
printf("This is FREE SOFTWARE with ABSOLUTELY NO WARRANTY\n\n");
@@ -302,9 +303,10 @@ int main(int argc, char **argv)
{ "restart", 0, 0, 'r' },
{ "help", 0, 0, 'h' },
{ "listen", 1, 0, 'l' },
+ { "stream-id", 1, 0, 's' },
};
- c = getopt_long(argc, argv, "u:o:rn:l:h", long_options,
+ c = getopt_long(argc, argv, "u:o:rn:l:hs:", long_options,
&option_index);
if (c == -1)
@@ -332,6 +334,10 @@ int main(int argc, char **argv)
case 'l':
net_listen_testnr = atoi(optarg);
break;
+ case 's':
+ stream_id = atoi(optarg);
+ printf("foo: %d\n", stream_id);
+ break;
case 'h':
print_usage();
print_help();
@@ -350,6 +356,7 @@ int main(int argc, char **argv)
bts = gsm_bts_alloc(gsmnet, GSM_BTS_TYPE_NANOBTS, HARDCODED_TSC,
HARDCODED_BSIC);
+ bts->oml_tei = stream_id;
register_signal_handler(SS_NM, nm_sig_cb, NULL);
printf("Trying to connect to ip.access BTS ...\n");