diff options
author | Holger Freyther <zecke@selfish.org> | 2009-04-22 22:07:07 +0000 |
---|---|---|
committer | Holger Freyther <zecke@selfish.org> | 2009-04-22 22:07:07 +0000 |
commit | 0a173bfe28ba4f6176a4ea571dc911cdd7faef44 (patch) | |
tree | 0921bb6040979e6380b83bf8f11926d2655eebbf /src/bsc_hack.c | |
parent | bcdebbfcab2458a45c5e2d6da385deb54fd96ffb (diff) |
[bsc_hack] Allow to set the location area code
Patch by Andreas Eversberg to allow to set the
location area code from the command line.
Diffstat (limited to 'src/bsc_hack.c')
-rw-r--r-- | src/bsc_hack.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/bsc_hack.c b/src/bsc_hack.c index 46e9e45b4..8b2514431 100644 --- a/src/bsc_hack.c +++ b/src/bsc_hack.c @@ -53,6 +53,7 @@ static struct gsm_network *gsmnet; /* MCC and MNC for the Location Area Identifier */ static int MCC = 1; static int MNC = 1; +static int LAC = 1; static int ARFCN = HARDCODED_ARFCN; static enum gsm_bts_type BTS_TYPE = GSM_BTS_TYPE_BS11; static const char *database_name = "hlr.sqlite3"; @@ -895,7 +896,7 @@ static int bootstrap_network(void) gsmnet->name_long = "OpenBSC"; gsmnet->name_short = "OpenBSC"; bts = &gsmnet->bts[0]; - bts->location_area_code = 1; + bts->location_area_code = LAC; bts->trx[0].arfcn = ARFCN; /* Control Channel Description */ @@ -955,6 +956,7 @@ static void print_help() printf(" -s --disable-color\n"); printf(" -n --network-code number(MNC) \n"); printf(" -c --country-code number (MCC) \n"); + printf(" -L --location-area-code number (LAC) \n"); printf(" -f --arfcn number The frequency ARFCN\n"); printf(" -l --database db-name The database to use\n"); printf(" -a --authorize-everyone Allow everyone into the network.\n"); @@ -974,6 +976,7 @@ static void handle_options(int argc, char** argv) {"disable-color", 0, 0, 's'}, {"network-code", 1, 0, 'n'}, {"country-code", 1, 0, 'c'}, + {"location-area-code", 1, 0, 'L'}, {"database", 1, 0, 'l'}, {"authorize-everyone", 0, 0, 'a'}, {"reject-cause", 1, 0, 'r'}, @@ -983,7 +986,7 @@ static void handle_options(int argc, char** argv) {0, 0, 0, 0} }; - c = getopt_long(argc, argv, "hc:n:d:sar:p:f:t:", + c = getopt_long(argc, argv, "hc:n:d:sar:p:f:t:L:", long_options, &option_index); if (c == -1) break; @@ -1005,6 +1008,9 @@ static void handle_options(int argc, char** argv) case 'c': MCC = atoi(optarg); break; + case 'L': + LAC = atoi(optarg); + break; case 'f': ARFCN = atoi(optarg); break; |