aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/libmsc/vty_interface_layer3.c
AgeCommit message (Collapse)AuthorFilesLines
2016-05-04debug log for SMSNeels Hofmeyr1-0/+1
2016-04-20cscn: enable 'subscriber' vty commands for libmscNeels Hofmeyr1-1/+0
This involves removing the openbsc_vty_print_statistics() from vty_interface_layer3.c, as this would link across the MSC/BSC border.
2016-04-05vty l3 help: fix typo 'comamnds'; fix english s/his//Neels Hofmeyr1-5/+5
2016-03-04rename nitb vty config to cscn, move to cscn_vty.cNeels Hofmeyr1-68/+0
2016-03-03mscplit: try to clarify root talloc ctx and global gsm_network.Neels Hofmeyr1-2/+0
The aim is to allow osmo-cscn to pass its own root talloc context and global gsm_network struct instance cleanly. This may stir up some old and dusty globals, but I hope it's for the better, since not all is a BSC. To ensure that a global gsm_network pointer for the bsc_vty is set, have it as argument to bsc_vty_init(). The vty configuration commands are added only after bsc_vty_init(), which are needed to configure the network struct. So split up the bsc_bootstrap_network() function into bsc_network_init() to allocate a gsm_struct, and bsc_network_configure() to read the config file once the vty commands are in place. In this way, no global bsc_gsmnet pointer is needed for the bsc vty. The atomic super glue is dissolved and osmo-cscn will be allowed to have a different name for it. Admitted, it's still called the bsc_vty, but a split thereof is probably coming soon, because the CSCN doesn't want any of the BSC nor BTS specific vty commands.
2016-03-03mscsplit: remove bts and lchan pointers from libmscNeels Hofmeyr1-0/+10
The diff between this and master will probably need a lot of review and fixes. The current state does compile, but I expect pretty much everything to be broken now. Future development will reinstate proper functionality piecemeal. The first goal is to get basic signalling to work, then SMS. The voice control (RTP) is completely disabled now (see "#if BEFORE_MSCSPLIT") and will be fixed last AFAICT.
2015-08-08paging: Provide information about pending requestsHolger Hans Peter Freyther1-2/+8
For debugging it is nice to know how many requests are pending. Simply count it and print it besides the paging part.
2015-08-0364bit: Fix compiler warnings in regard to 64bitHolger Hans Peter Freyther1-2/+2
vty_interface_layer3.c:584:4: warning: format '%d' expects argument of type 'int', but argument 3 has type 'long unsigned int' [-Wformat=] sizeof(subscr->extension)-1, VTY_NEWLINE);
2015-08-01nitb: Add a mode to not use TMSI for normal operationHolger Hans Peter Freyther1-0/+22
In case foreign simcards are used we can not do authentication and ciphering. In case a TMSI is re-used too early and we do page using TMSI we can't know which of the two MS is responding to us. We could change the "secure channel" routine to ask for the IMSI and only then stop the paging. As we don't have ciphering there is not much use in using the TMSI. Add a mode "no assign-tmsi" that will not assign the TMSI during LU. Now CM Service Request and Paging Response will work using the IMSI. There can't be a clash with that. [ciaby fixed the vty write to use the right name]
2015-04-29sub: Remove the queue from the subscriber codeHolger Hans Peter Freyther1-0/+2
The idea of "subscriber_get_channel" was that different requests would be coordinated. At the same time we have seen that the "queue" can get stuck at both 31C3 and the rhizomatica installations. Voice calls and SMS do not need coordination. We should be able to send SMS on a voice channel and switch the MS from a SDCCH to a TCH in case we establish a voice call. The SMS code itself needs to coordinate to obey the limit of one SMS per direction but this should be enforced in the sms layer and not on the subscriber. Modify the code to have a simple paging coordination. The subscriber code will schedule the paging and register who would like to know about success/failure. This allowed to greatly simplify the paging response handling for the transaction code (and in fact we could move the transaction list into the subscriber structure now). The code gained to support to cancel the notification of a request (but not the paging itself yet). TODO: Cancel paging request in case no one cares about it anymore.
2015-04-29sub: Remove introspection of the "channel queue"Holger Hans Peter Freyther1-77/+4
Over the next commits the queuing of commits will be completely modified to remove the queue and move the scheduling/limits to the outer callers.
2015-04-07nitb: Check source string length before calling strncpy (Coverity)Jacob Erlbeck1-0/+14
Currently some VTY command do neither check the length of the source string before calling strncpy nor ensure NUL-termination afterwards. This can to destination string buffers whose contents are not NUL-teminated. This commit adds checks and corresponding warnings to the VTY commands 'subscriber TYPE ID name .NAME" and "subscriber TYPE ID extension EXTENSION". Fixes: Coverity CID 1206570, 1206569 Sponsored-by: On-Waves ehf
2015-01-31meas: Install the scenario command and test itHolger Hans Peter Freyther1-0/+6
2015-01-31meas: Add VTY documentation for the measurement commandsHolger Hans Peter Freyther1-2/+3
Document the parameters that can be passed on.
2015-01-27nitb: Make the last change configurableHolger Hans Peter Freyther1-0/+47
Introduce a NITB node and add the subscriber creation as config name in there.
2015-01-02logging: Only compare the subscr addressHolger Hans Peter Freyther1-0/+28
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.
2015-01-01Initial support for export + curses-visualization of measurementsHarald Welte1-0/+35
This extends osmo_nitb to offer a UDP feed of real-time measurement reports, which can be used by (a variety of) external tools for visualization or other processing. We also add a small ncurses based tool (meas_vis) which shows a baragraph display of the last few mobile stations that were active, indicating their uplink/downlink receive level and quality. <WARNING> This sends non-portable structures like gsm_meas_rep over UDP and assumes the receiver has identical alignment and endianness! Before this feature is merged, it either needs to be converted to a unix domain socket (but they don't do multicast, which would be nice) or the wire format needs to change into something portable with defined alignment and encoding </WARNING>
2014-12-05msc: Add and use gsm_subscriber_groupJacob Erlbeck1-7/+7
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-10-03nitb: Add subscriber delete commandRuben Pollan1-1/+33
2014-08-02vty: Fix interactive VTY help for silent-sms transmissionHarald Welte1-3/+3
2014-06-18nitb: Only print channel activations once in show statisticsHolger Hans Peter Freyther1-3/+0
openbsc_vty_print_statistics will already print these counters for us. No need to print them again.
2014-04-04bsc/msc: Extension can never be NULL use strlen insteadHolger Hans Peter Freyther1-1/+1
Fixes: Coverity CID 1040717
2014-04-04msc: Name is never NULL use strlen to check if it is emptyHolger Hans Peter Freyther1-1/+1
Fixes: Coverity CID 1040716
2013-10-30vty: Use vty_install_default() instead of bsc_install_default()Jacob Erlbeck1-1/+1
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-10-13db: Remove the struct gsm_network from the database layerHolger Hans Peter Freyther1-1/+1
The database code should not know about the network. Move the setting of the network pointer into the subscriber layer.
2013-10-05nitb: Add "subscriber create" VTY command.Alexander Chemeris1-0/+27
It may be useful in production, but it's really required for VTY testing of subscriber related commands.
2013-09-02vty: Use generic 'end' and 'exit' commandsJacob Erlbeck1-3/+1
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-07-27expiration: Print the "expire_lu" time in show subscriberHolger Hans Peter Freyther1-0/+9
This can help with debugging subscriber expiration issues.
2013-07-14nitb: The subscr->imsi is an array will never be NULLHolger Hans Peter Freyther1-2/+1
Array compared against 0 (NO_EFFECT) array_null: Comparing an array to null is not useful: "subscr->imsi" Fixes: Coverity CID 1040716
2013-07-04nitb: Add a missing NULL check for searching the subscriberHolger Hans Peter Freyther1-1/+8
"subscriber " SUBSCR_TYPES " ID sms pending-send could fail with an invalid ID/IMSI for the subscriber. Fixes: Coverity CID 1040715
2013-03-03vty: Document some previously undocumented parametersHolger Hans Peter Freyther1-2/+4
Katerina pointed out that some nodes are not fully documented and proposed some messages. The token/timeout messages were correct, I have modified the other messages. I removed the full-stop from the PING/PONG documentation as we are normally not using a full sentence.
2013-02-12VTY: backwards compatibility for 'logging level sms'Harald Welte1-0/+14
when the SMS code was moved into libosmocore, its logging prefix was changed from 'sms' to 'lsms', which breaks existing config files. This introduces a deprecated/hidden vty command to make sure those config files are still parsed OK, and will simply print a warning message about the config needing some update.
2013-01-01libmsc: Allow to set sender id when sending SMS from the VTYSylvain Munaut1-12/+42
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2012-12-25nitb: Add a VTY command to initiate a handover to another BTSHolger Hans Peter Freyther1-0/+53
2012-11-21sms: Use the DLSMS instead of the DSMS category throughout our codeHolger Hans Peter Freyther1-1/+1
2012-08-17VTY: improve VTY prompt and make sure exit/end works everywhereHarald Welte1-1/+3
Some nodes below 'config' didn't have ournode_exit / ournode_end, and thus were not able to properly perform this function. exit should always only go back one level, while end drops us back to ENABLE_NODE. The prompt now represents the nesting level, and there's one consistent space after the final prompt character (typically #).
2012-08-17Some more VTY documentation / help fixesHarald Welte1-1/+0
2012-08-16complete the VTY help messages so we don't get "null" in the manualHarald Welte1-4/+8
2012-07-21nitb: Document missing parameters, reword documentation, combine paramHolger Hans Peter Freyther1-3/+3
Change "pending send" to "pending-send" as there is no other pending command right now, add missing documentation for parameters.
2011-09-03Add VTY command to specify default speech codecHarald Welte1-0/+70
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-19src: port openBSC over libosmo-abisopenbsc/0.9.150.9.15Pablo Neira Ayuso1-1/+1
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-05-07src: use namespace prefix osmo_* for misc utilsPablo Neira Ayuso1-5/+5
Summary of changes: s/bcd2char/osmo_bcd2char/g s/char2bcd/osmo_char2bcd/g s/hexparse/osmo_hexparse/g s/hexdump/osmo_hexdump/g s/hexdump_nospc/osmo_hexdump_nospc/g s/ubit_dump/osmo_ubit_dump/g s/static_assert/osmo_static_assert/g
2011-05-06src: use namespace prefix osmo_counter*Pablo Neira Ayuso1-22/+22
Summary of changes: s/struct counter/struct osmo_counter/g s/counter_inc/osmo_counter_inc/g s/counter_get/osmo_counter_get/g s/counter_reset/osmo_counter_reset/g s/counter_alloc/osmo_counter_alloc/g s/counter_free/osmo_counter_free
2011-05-06src: use namespace prefix osmo_signal*Pablo Neira Ayuso1-1/+1
Summary of changes: s/signal_cbfn/osmo_signal_cbfn/g s/register_signal_handler/osmo_signal_register_handler/g s/unregister_signal_handler/osmo_signal_unregister_handler/g s/dispatch_signal/osmo_signal_dispatch/g
2011-05-04msc: bail out if subscriber VTY command failsPablo Neira Ayuso1-1/+10
This patch adds several messages that would be displayed if: * the Ki argument is missing. * you pass an invalid Ki. * the database fails to perform the operation (add/delete/update). Before this patch, no messages were spotted on this errors. I noticed this while adding Ki to the existing subscribers in the nanoBTS setup: I introduced a wrong Ki but the VTY command line did not report any error. A quick look at the database via sqlite command confirmed that the new authkey information was not added.
2011-04-18misc: Fix possible crash with setting an extensionHolger Hans Peter Freyther1-3/+3
2011-04-18misc: Remove sys/types.h includes from the filesHolger Hans Peter Freyther1-1/+0
These are not needed any more. We used them for u_int types but we now use uint which comes from stdint.h
2011-04-18misc: Move from u_int to uint types of stdint.hHolger Hans Peter Freyther1-1/+1
This was done with sed on the files.
2011-03-23src: use new library libosmogsm and new path to headers in libosmocorePablo Neira Ayuso1-4/+4
libosmogsm is a new library that is distributed in the libosmocore. Now, openbsc depends on it. This patch gets openbsc with this change. This patch also rewrites all include path to the new osmocom/[gsm|core] Signed-off-by: Pablo Neira Ayuso <pablo@gnumonks.org>
2011-03-04prefix sub-directories containing libraries with 'lib'Harald Welte1-0/+790
... and make sure tests work again after restructuring