aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/osmo-bsc/osmo_bsc_main.c
AgeCommit message (Collapse)AuthorFilesLines
2018-06-28Rename bsc_msg_acc_lst_vty_init to have more uniform prefixPau Espin Pedrol1-1/+1
Back-port from osmo-bsc.git a0f1196eda79de0e838b29eb91d9f31839f2f447. Change-Id: I519fb945a99206dff6c4aeb476d527e632b7e751
2018-06-28Init access_lists before passing it as a parameterPau Espin Pedrol1-3/+1
Previous state is harmless because the pointer is stored but not used in that function. However, it's more clear this way. Back-port from osmo-bsc.git 9ab47eb52da73d25c4f94869385a4f836032362a. Change-Id: Ic17c38578587a774da29266302e7b201ecacd3a3
2018-06-15bsc-sccplite: Add -V param to print versionPau Espin Pedrol1-1/+7
Change-Id: Iad663d36d70196408806de664a39863f4d12238b
2017-10-26rename osmo-bsc to osmo-bsc-sccpliteHarald Welte1-1/+1
This is to avoid naming conflicts with the new osmo-bsc, which resides in its own git repository (osmo-bsc.git) and which uses libosmo-sigtran and implements (primarily) 3GPP AoIP. Change-Id: If10d1599b62d010726336134091a4e855c380d93
2017-10-26osmo-bsc: Initialize logging before initializing rate_ctrHarald Welte1-3/+3
The library code for rate counter initialization, which is called from the descendants of bsc_network_alloc() might already want to log something (particularly after Change-Id Ifc6ac824f5dae9a848bb4a5d067c64a69eb40b56 in libosmocore), so the logging framework must be initialized before. Change-Id: I1e893c97e023e63489fe8c46539b5e507d3cec8f
2017-08-20Treat SIGTERM just like SIGINT in our programsHarald Welte1-0/+2
When somebody kills the process, it's best to handle the signal and to use the opportunity for some cleanup. We always did this in the NITB on SIGINT, but never on SIGTERM. Let's change it. Change-Id: Iea6804325a6575ceab5edfd28dd20249462f143b
2017-06-09don't re-implement osmo_talloc_replace_string()Harald Welte1-1/+1
osmo_talloc_replace_string() was introducd into libosmocore in 2014, see commit f3c7e85d05f7b2b7bf093162b776f71b2bc6420d There's no reason for us to re-implement this as bsc_replace_string here. Change-Id: I6d2fcaabbc74730f6f491a2b2d5c784ccafc6602
2017-02-24cosmetic: rename struct osmo_msc_data to bsc_msc_dataNeels Hofmeyr1-2/+2
With the OsmoMSC program coming up, the name osmo_msc_data becomes even more confusing than it already is. Clearly indicate it as libbsc's data of a remote MSC by prefixing with bsc_. Also, the Osmocom community has in the meantime agreed to have the osmo_ prefix only in libosmocore, to avoid naming conflicts in case things are moved there. So while renaming anyway, also drop the osmo_ prefix. Change-Id: I0dfbcb7d1a579211180f71319982820d8700afab
2017-02-24cosmetic: rename osmo_msc_data.h to bsc_msc_data.hNeels Hofmeyr1-1/+1
With the OsmoMSC program coming up, the name osmo_msc_data becomes even more confusing than it already is. Clearly indicate it as libbsc's data of a remote MSC by prefixing with bsc_. Also, the Osmocom community has in the meantime agreed to have the osmo_ prefix only in libosmocore, to avoid naming conflicts in case things are moved there. So while renaming anyway, also drop the osmo_ prefix. Change-Id: I13554563ce9289de126ba0d4cf329bafcda35607
2017-02-08vty: remove ignored logging parametersMax1-1/+1
Since ce9fec3e896571835ac5bfd2980d6836f2b29f0d libosmocore ignores parameters to log_vty_command_* functions. Hence parameter of logging_vty_add_cmds() is ignored too. As we depend on much later libosmocore version anyway, we can simplify code somewhat by removing parameters which will be ignored anyway. Change-Id: I62f752fd88f1d8fefa563648f9864c7c31f87991
2016-12-02global gsm_network: move allocation further upNeels Hofmeyr1-5/+8
Now that bsc_network_alloc() is separate, move it to before the VTY init (a subsequent patch will pass the gsm_network instance as a parameter to vty_init()). bsc_hack.c: drop the comment that says about the VTY init: "This needs to precede handle_options()" -- it is not accurate. Actually move the handle_options() above both vty_init() and the bsc_network_alloc() calls, to be able to decide which mncc callback to pass to bsc_network_alloc. It would make sense to set this later on, but that would require further refactoring of the bsc_network_init() and gsm_network_init() signatures, so not in this patch. Change-Id: Ie6a7037e703b5a2d08ceeb20d35f197aaddc9d1b
2016-12-02split bsc_bootstrap_network() in alloc and configNeels Hofmeyr1-2/+6
For patch clarity, keep some code dup to be removed in a subsequent patch. In the same sense don't change the fact that mncc_sock_init()'s return value is ignored. The global gsm_network instance 'bsc_gsmnet' is basically only used by the VTY, and a future patch will "hide" that global in a vty .c file. In a nutshell, I want to - first allocate a gsm_network, - then initialize the VTY passing the gsm_network pointer, - and then read the config file using the initialized VTY. So far, bsc_bootstrap_network() allocates the gsm_network and reads the config file right away, which only works by sharing the extern bsc_gsmnet pointer, which I would like to uncouple. Change-Id: I480a09a31a79766ad07b627dd5238b7e37f3be7a
2016-10-13msgb talloc ctx: initialize in all main() scopesNeels Hofmeyr1-0/+1
Add msgb_talloc_ctx_init() call to many main() functions still lacking a msgb talloc context. Change-Id: Ib0d6751260659cabf18a7ce80680ba2fb4228ea1
2016-09-30log CTRL bind only onceNeels Hofmeyr1-2/+0
After libosmocore 38d232ee5d2ceb045d9ad6d3a23afcb4972523f7 which outputs 'CTRL at <ip> <port>' from ctrl_interface_setup_dynip(), there's no need to log the CTRL bind here anymore. Change-Id: I1a874efe365a1ecf8ec37b058215b95b9a635ec2
2016-09-26mscsplit: bsc_vty_init(): decouple from global bsc_gsmnetNeels Hofmeyr1-1/+1
Add an explicit gsm_network pointer instead of using the bsc_gsmnet global. This allows passing a gsm_network struct from the main() scope, which helps to decouple libmsc from libbsc. Change-Id: I9e2c0d9c18d4cebb5efb71565ad84df2bc2e0251
2016-02-25enable ctrl bind config for various programsNeels Hofmeyr1-1/+9
Add ctrl_vty_init() calls and feed the ctrl_vty_get_bind_addr() return value to ctrl_interface_setup() in the following programs: osmo-bsc osmo-bsc_nat osmo-nitb osmo-sgsn For osmo-sgsn, move the control interface setup invocation below the config parsing, so that the ctrl_vty_get_bind_addr() can return the configured address.
2016-02-24osmo-bsc: fix checking wrong pointer for ctrl setup successNeels Hofmeyr1-1/+1
2015-11-02stats: Enable stats for sgsn, gbproxy, nitb, bsc, natJacob Erlbeck1-0/+2
This commit initialises and enables the stats subsystem for the given binaries. Sponsored-by: On-Waves ehf
2015-09-24vty: Change the return type from enum to intHolger Hans Peter Freyther1-1/+1
clang complained that different enums are mixed with the return type and we actually want this to be an int now.
2015-05-03bsc: Add access list filtering to the BSCHolger Hans Peter Freyther1-1/+6
2015-05-03bsc: Add access lists to the MSC and the BSCHolger Hans Peter Freyther1-0/+4
It is a bit arbitary to decide which one is the global and which one is the local one. We might change it around. I don't think we want to introduce it based on BTS.
2014-08-24Use port number #defines for VTY and CTRL portsHarald Welte1-1/+2
.. as defined in libosmocore
2014-08-21move libctrl from openbsc to libosmoctrl (libosmocore.git)Harald Welte1-2/+3
2014-06-12bsc: Do not use strdup on argv parameterHolger Hans Peter Freyther1-1/+1
Fixes: Coverity CID 1206578
2014-03-23ctrl: Move the lookup into a separate file in preparation for GPRSHolger Hans Peter Freyther1-1/+1
For GPRS the look-up via bts/trx does not make any sense and would introduce bad depdencies for the SGSN. Move the look-up code to a new file and introduce new setup methods.
2014-02-08libbsc: Create the RF interface all the timeHolger Hans Peter Freyther1-7/+4
The interface can be accessed through CTRL and a socket. But currently it is only available when the socket interface has been configured. Create the interface all the time but only listen on the socket when a path has been specified.
2012-09-11osmo-bsc: Introduce command msc_connection_status and send TRAPs for itDaniel Willmann1-1/+1
2012-09-11ctrl: Improve error handling if controlif setup failsDaniel Willmann1-1/+9
2012-09-11osmo-bsc: Put the control commands in osmo_bsc_ctrl.cDaniel Willmann1-258/+1
2012-09-11osmo-bsc: Only send a TRAP if the location changesDaniel Willmann1-4/+14
2012-09-11osmo-bsc: Add support for traps to the location commandDaniel Willmann1-1/+31
2012-09-11osmo-bsc: Allow location tstamp to be zero if fix is invalidDaniel Willmann1-2/+2
2012-09-11libctrl: Change controlif_setup so it returns the ctrl handleDaniel Willmann1-2/+5
nat: Catch up with controlif_setup API change We now save a control handle reference in the nat osmo-bsc: Catch up with controlif_setup API change We now save a control handle reference in the gsm network
2012-03-16bsc: Prepare to have multiple MSC connectionsHolger Hans Peter Freyther1-8/+11
We now have a list of MSCs but in the code we will try to access the MSC with the nr 0.
2012-03-16bsc: Move more things to use osmo_msc_data* directlyHolger Hans Peter Freyther1-1/+1
2012-03-16bsc: Create a osmo_bsc_data and embed osmo_msc_dataHolger Hans Peter Freyther1-6/+6
We want to have multiple MSCs but we also have some data that is only present on a per BSC basis. Right now the MSC data is not allocated with talloc, so we have some change in the talloc contexts.
2012-03-16bsc: Address warnings about implicit declarationsHolger Hans Peter Freyther1-0/+3
osmo_bsc_main.c: In function ‘main’: osmo_bsc_main.c:398:2: warning: implicit declaration of function ‘bts_init’ [-Wimplicit-function-declaration] osmo_bsc_main.c:399:2: warning: implicit declaration of function ‘libosmo_abis_init’ [-Wimplicit-function-declaration] osmo_bsc_main.c:418:2: warning: implicit declaration of function ‘bsc_bootstrap_network’ [-Wimplicit-function-declaration]
2011-08-22libctrl: Mark the cmd set/get/verify functions staticDaniel Willmann1-10/+10
2011-08-19src: port openBSC over libosmo-abis0.9.15Pablo Neira Ayuso1-2/+2
This is a big patch that ports openBSC over libosmo-abis. Sorry, the changes that are included here are all dependent of libosmo-abis, splitting them into smaller pieces would leave the repository in some intermediate state, which is not desired. The main changes are: - The directory libabis/ has been removed as it now lives in libosmo-abis. - new configuration file format for nanoBTS and HSL femto, we need to define the virtual e1_line and attach it to the OML link. - all the existing BTS drivers (nanoBTS, hsl femto, Nokia site, BS11 and rbs2000) now use the new libosmo-abis framework. - use r232 input driver available in libosmo-abis for bs11_config. - use ipa_msg_recv instead of old ipaccess_read_msg function. - delete definition of gsm_e1_subslot and input_signal_data. These structures now lives in libosmo-abis. Most of this patch are deletions of libabis/ which has been moved to libosmo-abis. This patch also modifies openBSC to use all the new definitions available in libosmocore and libosmo-abis. In order to do that, we have replaced the following: - DINP, DMI, DMIB and DMUX by their respective DL* correspondences. - SS_GLOBAL by SS_L_GLOBAL - SS_INPUT by SS_L_INPUT - S_GLOBAL_SHUTDOWN by S_L_GLOBAL_SHUTDOWN - SS_INPUT by SS_L_INPUT - S_INP_* by S_L_INP_* sub-signals - E1INP_NODE by L_E1INP_NODE vty node This patch has been tested with: - one nanoBTS - the HSL femto with the examples available under libosmo-abis - BS11 with both dahdi and misdn drivers.
2011-07-19osmo-bsc: Only keep the newest of subsequent invalid positionsDaniel Willmann1-1/+12
2011-07-19osmo_bsc: Track the last three locations.Daniel Willmann1-7/+47
2011-07-19osmo-bsc: Add valid field to location commandDaniel Willmann1-6/+13
2011-07-19osmo-bsc: Improve return handling in verify_net_locDaniel Willmann1-3/+2
2011-07-19osmo-bsc: Compare char * with NULL instead of 0Daniel Willmann1-1/+2
2011-07-19bsc: Call the RF Control interface ctrl all the wayHolger Hans Peter Freyther1-6/+6
We had the rf_ctrl_name and the rf_ctl pointer, make both use the word ctrl.
2011-07-18misc: Remove the osmocom/core/process.h includeHolger Hans Peter Freyther1-1/+0
The osmo_daemonize moved from process.h to application.h (that is already included), remove the process.h include.
2011-07-13controlif: declare controlif_setup() in control_cmd.hHarald Welte1-2/+0
this avoids us to copy+paste external declarations over all 'main' files.
2011-07-13controlif: Adapt to minor data structure change regarding nm_stateHarald Welte1-1/+1
This was required due to master diverging from where controlif had last branched off.
2011-07-13osmo_bsc: Add some libctrl commandsDaniel Willmann1-0/+164
* net.location to get/set the geographical location of the network format is <tstamp>,<lat>,<lon>,<height> * per trx rf_locked command (net.bts0.trx0.rf_locked) * network-wide rf_locked command (net.rf_locked)
2011-07-13osmo_bsc: Use libctrl, handle ctrl cmds on port 4249 or from the natDaniel Willmann1-0/+4
This patch initializes libctrl to listen for connections on port 4249. Additionally, control messages arriving from the nat will also be processed.