Commit Graph

80 Commits

Author SHA1 Message Date
Harald Welte 9af6ddfcec License change: We are now AGPLv3+ instead of GPLv2+
The reason for this is quite simple: We want to make sure anyone
running a customized version of OpenBSC to operate a network will
have to release all custom modifiations to the source code.
2011-01-01 15:39:34 +01:00
Holger Hans Peter Freyther a37e3bc39a sms: Change the default values for the sms_queue
Increase the number of SMS we will try to send at a time and
decrease the failures we handle before going to the next item. With
the default timeout we will attempt to page the subscriber for 60
seconds and we can increase the queue speed by going to the next
item faster.
2010-12-26 09:40:48 +01:00
Holger Hans Peter Freyther 11b28f9c26 sms: Introduce a SMS queue that will be responsible for delivery
The SMSqueue will be responsible of sending to the user. It will
do so in a loop and will also try not to overload the BTS. This
means the throughput of SMS will be limited.
2010-12-26 09:40:03 +01:00
Holger Hans Peter Freyther adb6e1cce1 janitor: Move the * to the variable name 2010-09-18 06:44:24 +08:00
Holger Hans Peter Freyther 7a2c86b67d vty: Provide a is_config_node for the VTY and use it for the bsc
Right now only bsc_hack and osmo_bsc need to have a custom
config handling as they use the subscr/oml nodes.
2010-08-26 16:55:37 +08:00
Harald Welte 2c869efcd3 Introduce '-D' commandline option to daemonize processes
This uses the osmo_daemonize() function of libosmocore >= 0.1.18,
and is now implemented for bac_nat, osmo-bsc, bsc_hack, osmo-gbproxy
and bsc_mgcp.  This means only osmo-sgsn is missing, which currently
has no option parsing at all.
2010-08-25 19:43:54 +02:00
Holger Hans Peter Freyther ec4bfdc435 bsc_api: Move the API init into the main function.
The BSC API will not be used until the first iteration through
the event loop so it is safe to call it after the bootstrap.
2010-06-30 15:11:29 +08:00
Holger Hans Peter Freyther 57da4471d1 misc: Fix the return type of the go back vty function...
Without this we will get warnings about incompatible assignments
2010-06-09 21:40:44 +08:00
Holger Hans Peter Freyther 0c8aa73db7 [bsc_hack] Call handle_options before bootstrapping the network
Otherwise we can not specify which config file to use and -h will
not work when there is no openbsc.cfg in the cwd.
2010-05-31 21:42:53 +08:00
Harald Welte c31f480f08 [VTY] use new struct vty_app_info in libvty 2010-05-25 23:40:38 +02:00
Harald Welte 4b037e4117 Migrate VTY code to libosmovty 2010-05-25 23:40:38 +02:00
Harald Welte dcccb1818d VTY: decouple telnet_interface from 'struct gsmnet'
We want the VTY and telnet code to be independent from the BSC
application(s).  As a side note, we also like to eliminate static
global variables for 'struct gsm_network' all over the code.

As such, telnet_init() is now passed along a "private" pointer,
which getst stored in telnet_connection.priv.  This telnet_connection
is then stored in vty->priv, which in turn gets dereferenced if
anyone needs a reference to 'struct gsm_network' from the BSC vty
code.

Also:
 * vty_init() now calls cmd_init()
 * the ugliness that telnet_init() calls back into the application by means of
   bsc_vty_init() function has been removed.
 * telnet_init() now returns any errors, so the main program can exit
   e.g. if the port is already in use.
2010-05-16 20:52:23 +02:00
Harald Welte 1353f961ef VTY: pass program name, version and copyright to vty_init()
This enables us to make the VTY completely independent of any
compile-time program-specific information, i.e. one step closer
to using VTY as a shared library from multiple programs.
2010-05-16 19:20:24 +02:00
Harald Welte dc5062b185 move log/debug codebase to libosmocore
The logging/debugging code is generic enough to move it into libosmocore
while keeping OpenBSC specific definitions in openbsc itself.

This commit uses the logging support present in libosmocore-0.1.2,
you will have to update your library to this version.
2010-03-26 21:31:43 +08:00
Holger Hans Peter Freyther 009ad61dab bsc_hack: Add other known options to the list 2010-03-25 02:41:38 +01:00
Holger Hans Peter Freyther 829772d3c4 bsc_hack: Add option to set the global log level. 2010-03-25 02:39:15 +01:00
Holger Hans Peter Freyther 3e57388305 Make the compiler happy and use a puts 2010-03-24 10:21:00 +01:00
Holger Hans Peter Freyther a21a96f987 Move the copyright and version header to bsc_init.c
The copyright/version will be used from within the VTY code
which might be linked into binaries even when bsc_hack.c is
not linked into it.
2010-03-24 10:19:04 +01:00
Harald Welte 5a29c7fa89 automatically include program version and print it from vty and --version 2010-03-23 00:09:32 +08:00
Harald Welte dfe6c7d910 split 'libosmocore' from openbsc codebase
This library is intended to collect all generic/common funcitionality
of all Osmocom.org projects, including OpenBSC but also OsmocomBB

The library currently includes the following modules:

bitvec, comp128, gsm_utils, msgb, select, signal, statistics, talloc, timer,
tlv_parse, linuxlist

msgb allocation error debugging had to be temporarily disabled as it depends on
'debug.c' functionality which at the moment remains in OpenBSC
2010-02-20 16:27:23 +01:00
Daniel Willmann 604d851b89 Register GSM_BTS_TYPE_UNKNOWN in bsc_hack.c
The way the VTY configuration sytem works is that it first registers a
BTS of type GSM_BTS_TYPE_UNKNOWN and then sets the type correctly (after
encountering the type statement). This makes sure that registering a BTS
of type UNKNOWN succeeds.
2010-01-14 21:52:34 +01:00
Harald Welte 0677061757 update copyright statements
* include 2010
* add Andreas Eversberg and Sylvain
2010-01-12 10:46:27 +01:00
Harald Welte 39315c4798 [OML] parse attributes depending on BTS type
Some NM attributes are defined differently depending on
the BTS type.  Having one big nm_att_tlvdef[] table for
all BTS types is no longer sufficient.  This patch

* introduces 'struct gsm_bts_model' to describe a BTS model
* adds definitions of gsm_bts_model for BS-11 and nanoBTS
* changes the abis_nm_tlv_parse() function: include a bts pointer
2010-01-10 18:01:52 +01:00
Harald Welte 3cefa9aaa0 vty: sub-divide talloc contexts and include them in talloc report
The VTY code makes so many allocations that a full report is
simply too long to provide any useful information.  So we sub-divide
it in multiple contexts, and report only one level deep at SIGURS1.

We also introduce SIGUSR2 for the full detailed VTY report.
2009-12-24 10:51:56 +01:00
Holger Hans Peter Freyther 079353ad1f [statistics] Do the syncing to db from within the bsc_hack
Change the counters_store_db function to be a generic for_each
function taking a function pointer and data. Use that in bsc_hack
to store it to the DB.

This is removing the DB requirement and will allow to handle
the counter values in different ways without making the counter
list public.

I verified that the syncing is still taking place.
2009-12-23 05:30:47 +01:00
Holger Hans Peter Freyther b61e3b2158 Import the new logging architecture
This is the new logging architecture, including

* support for multiuple logging targets like stderr and vty
* log levels in addition to categories/subsystems
* filtering based on imsi, i.e. only see events for one subscriber
* dynamically change log level for each category for each vty
2009-12-22 22:32:51 +01:00
Harald Welte f88c8a02fc remove hand full of 'extern ipacc_rtp_direct' definitions
and instead declare it in gsm_data.h
2009-12-20 14:18:11 +01:00
Harald Welte f314f6899b add --help message about --rtp-proxy argument 2009-12-19 18:35:56 +01:00
Harald Welte 8d77b9540a [handover] first functional handover implementation
With this commit, we can successfully hand over a channel from one cell to
another cell.  We implement asynchronous intra-BSC (but inter-BTS) handover.

Changes:
* introduce new DHO log category
* extend rsl_chan_activate_lchan() with argument for HO reference
* introduce actual minimal handover decision making in handover_decision.c
* various fixes to bsc_handover_start() in  handover_logic.c
2009-12-17 00:31:10 +01:00
Harald Welte 1085c097e3 location updating reject cause now specified on VTY rather than command line argument 2009-12-06 12:22:59 +05:30
Holger Hans Peter Freyther f49fac2785 [bsc_hack] Ignore the sigpipe...
We might read or write on the OML link when the BTS is
reset and will get SIGPIPE interrupt and be gone... Just
ignore the SIGPIPE we will get the "exception" on the next
run of bsc_select and kill the (old) OML link.
2009-12-06 04:25:05 +01:00
Harald Welte 3961fcc031 Introduce new S_GLOBAL_SHUTDOWN signal
This is used to notify various parts of OpenBSC that we're shutting
down.
2009-12-01 17:58:26 +05:30
Holger Hans Peter Freyther 8b457fb350 [bsc_init] Create a bsc_init.c that can be used for setting up hings.
Share the initialization and bootstraping of the network by moving
the code to a new file and making boostrap_network and shutdown_net
external.

Cleanup the header list after the move and remove trailing whitespace.
2009-08-17 09:52:42 +02:00
Harald Welte (local) ee4410a4f3 actual code running at end of har2009 2009-08-17 09:39:55 +02:00
Harald Welte (local) b8afe81e96 trigger RRLP position requests after paging succeeded and after subscriber attach 2009-08-16 13:18:51 +02:00
Harald Welte (local) d19e58b13c move talloc context creation out of on_dso / constructors
the various constructors get called in a non-obvious, linker determined
order, which makes certain objects disappear from the talloc report.

This change moves the talloc context creation into a new talloc_ctx.c file
2009-08-15 02:30:58 +02:00
Harald Welte (local) efc92311e2 allow vty to set periodic location updating timer t3212 2009-08-14 23:09:25 +02:00
Daniel Willmann bc9e9f856b Merge commit 'har/laforge' 2009-08-13 20:30:46 +02:00
Harald Welte 7f69816144 disable emergency call bit (i.e. cell does not support emergency call) 2009-08-13 20:26:10 +02:00
Harald Welte (local) 50d127199d fix token auth implementation 2009-08-13 13:52:14 +02:00
Jan Luebbe 06513f26a1 replace the command line option -a with the auth-policy config option 2009-08-13 10:14:59 +02:00
Harald Welte (local) 0e451d0f2e add 'ms max power' vty command to set the maximum MS power in dBm 2009-08-13 10:14:26 +02:00
Harald Welte c70979a337 add help message about timestamp option 2009-08-12 21:52:11 +02:00
Harald Welte 61cd8831eb patch power reduction into NM attributes 2009-08-12 21:50:41 +02:00
Harald Welte 000c0f44f3 patch the SI and NM attr tables independently 2009-08-12 21:45:02 +02:00
Harald Welte (local) 7f28cd559a set nominal TRX power for BS-11 and nanoBTS 2009-08-12 20:56:16 +02:00
Harald Welte (local) 5dececfa41 implement bts->cell_barred feature, configurable in VTY 2009-08-12 20:55:00 +02:00
Harald Welte d069deabe4 Merge commit 'origin/master' 2009-08-10 14:45:08 +02:00
Holger Hans Peter Freyther 557ca78b49 bsc_hack.c: Unconditionally listen for the nanoBTS
As proposed on the mailinglist, initialize the socket once
and wait for the nanoBTS to connect.
2009-08-10 14:16:08 +02:00
Harald Welte e991c26387 BS11: send measurement report every 5 SACCH frames 2009-08-10 14:09:28 +02:00