aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/libcommon
AgeCommit message (Collapse)AuthorFilesLines
2015-01-05Revert "debug.c: use new libosmocore features to print and save log filter"Harald Welte1-46/+0
This reverts commit c598e6e0a6d00827c2c974010d582815d66d0f14. It introduced a dependency from libcommon to libosmovty, which we don't want
2015-01-05debug.c: use new libosmocore features to print and save log filterHarald Welte1-0/+46
2015-01-02logging: Only compare the subscr addressHolger Hans Peter Freyther1-7/+11
Move the "logging filter imsi IMSI" into the BTS/NITB code to allow to set the gsm_subscriber and only compare it. This way we simply compare the subscriber address and don't have to care if the subscriber data is still valid.
2014-12-30move gsm_bts_get_cbch() to gsm_data_shared() as its needed in osmo-btsHarald Welte1-0/+21
2014-12-30Add basic support for CBCH / SMS-CB (Cell Brroadcast)Harald Welte1-3/+10
We can now configure the pyisical channel types for CBCH either in the CCCH+SDCCH4 or in the SDCCH8 chanel combination. Depending on whether a CBCH exists on the BTS, we also generate the SI4 with matching CBCH channel description to notify the phones of the existance of the CBCH. There is now a VTY command how a SMS-CB message can be sent to a given BTS. We do not yet have any logic at all for actual scheduling of multiple CBCH RSL messages towards one or multiple BTSs yet, though.
2014-12-17bts: When one link drops.. check what needs to be droppedHolger Hans Peter Freyther1-1/+1
In case a BTS is dropped, iterate over the list of BTS and check if a dependency is now missing and then drop the BTS. This check could lead to check of 256*256 checks (e.g. all BTS on each other in the chain and the master is being dropped). The performance aspect of it doesn't matter for our usecase. We expect to have pairs of BTS right now.
2014-12-17bts: Add some simple dependency between different BTSHolger Hans Peter Freyther1-0/+58
E.g. for the sysmoBTS2050 we have the requirement that the first board connects before the second due clocking. The easiest point to enforce this is the BSC. Add a simple bitmask based system to allow to express dependencies for IP based systems.
2014-12-09msc: Add per subscriber keep_in_ram flagJacob Erlbeck1-1/+3
Currently the keep_subscr flag in gsm_subscriber_group refers to a whole group of subscribers which makes it difficult to really delete single entries if the flag is set. This patch adds a keep_in_ram field to gsm_subscriber which allows for keeping subscriber objects in RAM while deleting others. Note that really deleting an entry requires that both flags (subscr_group->keep_subscr and subscr->keep_in_ram) are set to 0. So only the latter should be used if a specification requires the deletion of a subscriber entry. Sponsored-by: On-Waves ehf
2014-12-05msc: Add and use gsm_subscriber_groupJacob Erlbeck1-10/+12
Currently every subcriber object directly refers to the gsm_network which contains a flag shared by every related subscriber (keep_subscr). This adds a dependency on gsm_network even if only the function defined in gsm_subscriber_base.c are used. This patch adds a new struct gsm_subscriber_group which contains the keep_subscr flag and a back reference to the network object. The latter is not dereferenced in gsm_subscriber_base.c, so it can safely be set to NULL when only that part of the gsm_subscriber API is being used. It also changes that API to use gsm_subscriber_group instead of gsm_network parameters. Since there are some places where a pointer to the gsm_network is needed but where only a gsm_subscriber is available, a 'net' back pointer is added to the group struct, too. Nevertheless subscr group and network could be separated completely, but this is not the topic of this commit. Sponsored-by: On-Waves ehf
2014-11-21bts: Store the bcch_change_mark in the bts structureHolger Hans Peter Freyther1-0/+3
Store the BCCH change mark inside the BTS structure. This will allow us increment the number and re-generate the SIs. Related: SYS#739
2014-11-11bsc: Move gsm_subscriber_base.c to libcommonJacob Erlbeck2-1/+159
Since it is planned to use struct gsm_subscriber to manage subscriber data in the SGSN, this file which contains the generic subscriber related methods is moved to libcommon. Sponsored-by: On-Waves ehf
2014-11-11bsc: Move gsm_network_init function to libbscJacob Erlbeck1-80/+0
Currently libcommon depends on libbsc, because gsm_network_init (libcommon/gsm_data.c) directly calls gsm_net_update_ctype (libbsc/gsm_04_08_utils.c). This patch moves gsm_network_init to a new file libbsc/net_init.c. Sponsored-by: On-Waves ehf
2014-08-24move gsm_bts_num() to gsm_data_shared.[ch]Harald Welte2-15/+15
this way we can drop a copy of this function from osmo-bts.
2013-10-30vty: Use vty_install_default() instead of bsc_install_default()Jacob Erlbeck1-44/+0
Remove ournode_exit_cmd, ournode_end_cmd, and bsc_install_default() since this functionality is provided by the current libosmocore. Replace calls to bsc_install_default() by call to vty_install_default() with the following semantic patch: @rule1@ expression N; @@ - bsc_install_default(N); + vty_install_default(N); Ticket: OW#952 Sponsored-by: On-Waves ehf
2013-09-02vty: Use generic 'end' and 'exit' commandsJacob Erlbeck1-0/+10
Add bsc_install_default() and replace all install_default() This patch adds bsc_install_default() which calls install_default() and add 'exit' and 'end'. All other calls to install_default() are replaced by calls to bsc_install_default(). Since 'exit' and 'end' are now added automatically to each node, the explicit registrations of these commands are removed by this patch, too. The related tests succeed now without work-arounds (except for the 'config' node itself which is part of libosmocore).
2013-09-02vty: Generalize ournode_exit() and ournode_end()Jacob Erlbeck1-104/+36
ournode_exit() duplicates most of bsc_vty_go_parent(). This patch fixes the inconsistencies of both functions within bsc_vty_go_parent() and replaces the implementation of ournode_exit() by a call to it. This makes 'exit' behave exactly like ^D in all openbsc nodes. ournode_end() has been changed to walk through the intermediate nodes until one of the top nodes is reached. This allows for cleanups to be done on the way. Note that in config mode if the tree is searched along the nodes toward the config node and a command is not found this way, a rollback is done by just replacing the vty's node and index member variable by the saved old values which might break the whole thing, when there has been a free() on the way.
2013-07-18oml: Add a missing break switch for NM_OC_BS11Holger Hans Peter Freyther1-0/+1
It appears to me that for NM_OC_BS11 mo was either NULL or the one mo value from NM_OC_BS11_RACK. The break inside the nested switch case didn't break from the outer one. Fixes Coverity: CID 1040728
2013-07-03hsl: Remove the support for the HSL bts from OpenBSCHolger Hans Peter Freyther1-4/+0
The support has been implemented for an old model, we were told that newer versions would be made incompatible with OpenBSC. Ther are various warnings in the code and coverity has found some new ones. Just remove the code as we don't know of anyone using this code.
2013-06-12Makefile.am: Use AM_CPPFLAGSAlexander Huemer1-1/+1
Since automake 1.13 INCLUDES is depricates and causes a warning
2013-04-05sysmobts: Add the necessary data structure and init for the SAPI queueHolger Hans Peter Freyther1-0/+4
The sysmobts is now having a SAPI queue with all pending SAPI operations on the BTS. Add the llist_head to the lchan and make sure it is initialized by the shared code.
2013-02-08Fix of IMMIDIATE ASSIGNMENT REJECT messageAndreas Eversberg1-0/+1
The message was corrupt at several points. They are fixed now and successfully tested. A default T3122 timer value of 10 is defined by default now. If set to 0, the reject message will not be sent. Note that when using existing configs with T3122 value set to 0.
2013-01-15bsc: Auto RF Off in case of missing MSC connectionHolger Hans Peter Freyther1-0/+1
For short IP failures we want the RF to stay up and wait for the re-connect but in case the A-link is gone too long it is good to switch off the RF and wait for commands to enable it again.
2013-01-11debug: Fix typo in the debug categoryHolger Hans Peter Freyther1-1/+1
2013-01-01Stricter limits for T3212 (location update period)Daniel Willmann1-0/+1
libcommon: Default to 30min location update period libbsc: Limit VTY value for periodic update and disallow the value 0 According to GSM 04.08 Table 10.5.33 "The value 0 is used for infinite timeout value i.e. periodic updating shall not be used within the cell." This was the default value until now, but the code that deals with expiring inactive subscribers in the next commit can't handle that case so this remains a TODO for now.
2012-12-23lchan: Introduce a BROKEN state for the lchanHolger Hans Peter Freyther1-0/+1
If the CHAN ACTIV is NACKED we set the state backto NONE. This is problematic as our channel allocator will allocate from the front or from the back and if the channel is early in the list it might cause permanent failures. Introduce a BROKEN state and use it when the channel activation is failing for an unknown reason. Copy the cause so it can be inspected later.
2012-11-24SMPP: VTY configuration of SMPP code, authentication supportHarald Welte1-0/+12
2012-11-21sms: Use the DLSMS instead of the DSMS category throughout our codeHolger Hans Peter Freyther1-6/+0
2012-11-16Initial support of SMPP interface for MT-SMSHarald Welte1-0/+5
2012-10-18Allow setting of Control Channel Description parameters via VTYAndreas Eversberg1-0/+3
2012-09-29Fix: T3192 and T3193 must be similarAndreas Eversberg1-1/+1
In order to keep mobile at PACCH as long as possible the timer T3192 is set to 1500ms. This reduces the probablity of long lasting assignment process on CCCH for subsequent downlink TBFs.
2012-09-11bsc: Allow to configure more than one MSC in the VTYHolger Hans Peter Freyther1-0/+2
2012-09-11gsm_data: Include a structure for the geographical location in gsm_btsDaniel Willmann1-0/+2
2012-09-11gsm_data: Address compiler warning of unhandled switchHolger Hans Peter Freyther1-0/+1
gcc does not really know the _NR_OF_ELEMENTS_IN_ENUM approach, add the _NUM_GSM_BTS_TYPE to the handled cases. gsm_data.c: In function ‘gsm_set_bts_type’: gsm_data.c:349:2: warning: enumeration value ‘_NUM_GSM_BTS_TYPE’ not handled in switch [-Wswitch]
2012-08-17VTY: dynamically create BTS "type" command syntaxHarald Welte1-3/+14
2012-08-17dynamically generate a proper VTY reference for phys_chan_configHarald Welte1-5/+19
this uses vty_cmd_string_from_valstr() from _very_ recent libosmocore, so you have to update the library, sorry.
2012-07-02BSC: introduce new "sysmobts" BTS modelHarald Welte1-0/+2
so far, osmo-bts/sysmobts used to be entered as "sysmobts" type in the configuration file. However, there are some differences in the protocol/behaviour and we should reflect that by a new BTS plugin (with lots of code reuse from the nanobts driver).
2012-06-28gsm_data_shared: add structure for decoded parameters of RLC configHarald Welte1-0/+24
this is primarily needed on the BTS side, but we should also use it on the BSC side and make the parameters VTY-configurable.
2012-06-17libgb: prefix all NS related functions with gprs_Harald Welte1-22/+0
2012-06-16libgb: Remove dependency to openbsc/debug.hHarald Welte1-2/+3
2012-06-16libgb: remove dependencies to openbsc/vty.h and openbsc/gsm_data.hHarald Welte1-3/+0
Rather than using openbsc internal data/functions, we now use only internal and libosmocore-provided ones.
2012-06-03Allow VTY-based configuration of T3105Harald Welte1-0/+1
This timer will only be forwarded to BS11 and Ericsson Abis so far, not to Nokia and ip.access BTS yet.
2012-06-03update year in copyright stringHarald Welte1-1/+1
2012-04-08make sure we still build on systems that don't have IPPROTO_GREHarald Welte1-0/+2
2012-03-16bsc: Prepare to have multiple MSC connectionsHolger Hans Peter Freyther1-8/+1
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: Create a osmo_bsc_data and embed osmo_msc_dataHolger Hans Peter Freyther1-9/+10
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-02-03misc: gsm_data.c address compiler warningHolger Hans Peter Freyther1-3/+4
Assume nothing special needs to be done for the Nokia *site hardware. GCC warning: gsm_data.c: In function ‘gsm_set_bts_type’: gsm_data.c:342:2: warning: enumeration value ‘GSM_BTS_TYPE_NOKIA_SITE’ not handled in switch [-Wswitch]
2012-01-15abis: gsm_data_shared.h includes libosmo-abis header, add abis to cflagsHolger Hans Peter Freyther1-2/+2
gsm_data_shared.h includes e1_input.h of libosmo-abis, add the LIBOSMOABIS_CFLAGS to Makefile.am, remove AM_LDFLAGS at the same time as we only build .a archives.
2011-09-26gsm_data_shared: use 'const' whenever applicableHarald Welte1-7/+7
2011-09-03Add VTY command to specify default speech codecHarald Welte1-3/+4
In order to have the MNCC application reliably decide on the codec type, it needs to know if we are running on a TCH/F or TCH/H. Thus, we pass lchan_mode as a new parameter to the 'struct gsm_mncc'
2011-08-22misc: Move the bsc_parse_reg to libcommom and name it gsm_parse_regHolger Hans Peter Freyther1-0/+26
Move the regexp parsing code from the NAT to libcommon as it will be used by the NAT and BSC code. This also adds the #include <regex.h> include to gsm_data. This header should be split up.