Commit Graph

2656 Commits

Author SHA1 Message Date
Holger Hans Peter Freyther 384ef09920 nat: Add a test utility for the number rewriting 2011-05-31 00:37:48 +02:00
Holger Hans Peter Freyther 1d54c40dd6 nat: Allow to rewrite any non international number
Remove the arteficial limitation of the number format
of an unknown number.
2011-05-31 00:37:48 +02:00
Holger Hans Peter Freyther 20102b0c82 nat: Refactor the number patching code into a new method
Separate the code to patch the code and the code to find a
new number based on the old number. This will allow to add
multiple targets for number changing.
2011-05-31 00:37:47 +02:00
Holger Hans Peter Freyther f2c1f25612 abis: Get the structs and values from libosmocore
Remove the forward declarations for functions and structs
that have been moved to libosmocore.
2011-05-31 00:37:47 +02:00
Holger Hans Peter Freyther 4e318f5938 misc: Provide a uninstall-hook to remove the extra files
Fix make distcheck to uninstall files that were installed
by our custom hook.

This is fixing:
ERROR: files left after uninstall:
./share/doc/openbsc/examples/osmo-bsc_mgcp/mgcp.cfg
./share/doc/openbsc/examples/osmo-nitb/nanobts/openbsc.cfg
./share/doc/openbsc/examples/osmo-nitb/nanobts/openbsc-multitrx.cfg
./share/doc/openbsc/examples/osmo-nitb/bs11/openbsc-1bts-2trx.cfg
./share/doc/openbsc/examples/osmo-nitb/bs11/openbsc.cfg
./share/doc/openbsc/examples/osmo-nitb/bs11/openbsc-1bts-2trx-hopping.cfg
./share/doc/openbsc/examples/osmo-nitb/bs11/openbsc-2bts-2trx.cfg
./share/doc/openbsc/examples/osmo-nitb/rbs2308/openbsc.cfg
2011-05-31 00:37:47 +02:00
Harald Welte 4e4fa4ce9b move some more abis_nm related code into libosmocore
This syncs openbsc.git with libosmocore.git commit rev
11c7193ad8ceb4f3898799dc44b700b8b93a59b8
2011-05-24 17:24:44 +02:00
Alexander Huemer 792edebb4f libabis: fix segfault on malformed ipaccess RSL link
This patch fixes a segfault that occured when a ipaccess RSL link gets
closed unexpectedly.
The segfault can be provoked by connecting to the RSL port with ncat and
hitting ^C.
2011-05-24 17:21:32 +02:00
Alexander Huemer 9e26773167 openbsc: update .gitignore 2011-05-24 17:21:32 +02:00
Alexander Huemer 2b245c4f2b openbsc: rename configure.in -> configure.ac
rename autoconf input file to align with osmocom-bb host applications,
and because that suffix is preferred nowadays.
2011-05-24 17:21:32 +02:00
Alexander Huemer db1bd6998b openbsc: add missing AC_LANG_SOURCE for current autoconf
autoconf >=2.68 demands the body of an AC_COMPILE_IFELSE to be wrapped in
an AC_LANG_SOURCE macro, otherwise outputs annoying warnings on the
invocation of `autoreconf -i`. this patch follows that demand.
2011-05-24 17:21:32 +02:00
Harald Welte 80cffaf323 Move system information related defines and code to libosmocore
This brings openbsc in sync with the following libosmocore commit:
b5503136fa234690d5493b19a8aee3a4ef74190d
2011-05-24 15:02:20 +02:00
Harald Welte f142c97907 prepare gsm_data.h header file sharing with osmo-bts
This should not introduce any functional changes, it just re-arranges
some definitions in the header file, and introduces the ROLE_BSC
define that we enable for the BSC-specific fields.
2011-05-24 13:25:38 +02:00
Harald Welte cdc59ff5cc abis_nm: Some more fall-out from the abis_nm move to libosmocore
we want get_string_value(), not the equivalent of get_value_string()
2011-05-23 20:42:26 +02:00
Harald Welte 867d9f3985 abis_nm: fix some fallout regarding abis_nm migration to libosmocore
Thanks to Holger for noticing this.
2011-05-23 20:30:39 +02:00
Harald Welte 15c6172a8d abis_nm: Move lots of generic definitions + code to libosmocore 2011-05-22 22:45:37 +02:00
Harald Welte a85515bea5 use new libosmogsm ip.access protocol header file 2011-05-22 21:57:36 +02:00
Pablo Neira Ayuso 0d2881ad58 bsc: on-demand setup of nanoBTS and HSL femto sockets
The daemons set up nanoBTS and HSL femto sockets by default, ie. the
three sockets to support these two drivers are open even if we have
no BTS of that kind.

This patch enables on-demand socket creation, ie. we only enable them
if we have one BTS at least that requires it.

I added two new attributes to the gsm_bts object, they are:

* the start() function includes the code that we need to run to start
the BTS. This new function contains the socket creation in the
particular case of nanoBTS and HSL femto.

* the started boolean, which is used to know if we have already
started the BTS, ie. we have already invoked start().

Note that, I have splitted the bts_model_*_init() function into two
functions, the _init() functions that register the BTS driver
and the _start() functions that start BTS driver on-demand.

While I was at it, I added several changes/cleanups to this patch:

* Group all bts_model_*_init() calls into one function bts_init(),
which is called in the initialization path of osmo-nitb and
osmo-bsc.

* Add openbsc/bss.h that contains the declaration of
bsc_bootstrap_network, bsc_shutdown_net and bts_init.

* Add missing e1inp_init() in osmo-bsc.

* Fix missing declaration of hsl_setup in openbsc/e1_input.h
2011-05-22 21:03:35 +02:00
Pablo Neira Ayuso c68f754b3b abis: add init function for emulated ipaccess/HSL emulated E1 input
This patch is a cleanup. It adds an init function for the ipaccess
and HSL emulated E1 input drivers.
2011-05-22 21:02:47 +02:00
Pablo Neira Ayuso 6e52b88a17 bsc: fix bail out in case of problems bootstrapping BTS or E1 input
The error message was missing in case of problems bootstrapping the BTS.
The E1 input driver initialization was displayed in the standard output,
now this error is reported via logs.
2011-05-22 21:02:04 +02:00
Pablo Neira Ayuso d2a7878b35 abis: skip e1_input nesting if empty
With this patch, we don't include e1_input if it's empty

[...]
    timeslot 7
     phys_chan_config TCH/F
     hopping enabled 0
e1_input <----------------- empty, it should not show up.
msc
[...]
2011-05-22 21:01:42 +02:00
Holger Hans Peter Freyther 1e9ae4be66 ipaccess: Fix the case of specifying the interface
Pablo pointed out that my previous commit was rubish. If we have
less than two arguments we want ifname to remain NULL and if we
have a second argument (or more) we want to use that as the interface
name to bind to.
2011-05-17 20:34:53 +02:00
Holger Hans Peter Freyther c0370e4399 nat: Use 'paging group' because we have paging forbidden.
Make paging-group deprecated and introduce the new paging group.
2011-05-17 19:28:07 +02:00
Holger Hans Peter Freyther d3080be131 ipaccess-find: Work without providing an interface name
This will use the default route of the operating system, e.g.
be able to use ipaccess-find without special permission.
2011-05-14 19:46:05 +02:00
Holger Hans Peter Freyther 67cd75f9fa misc: Use the osmo_init code for signals and logging
Use the libosmocore code to ignore certain signals by
default (e.g. SIGHUP, SIGPIPE) and use the new code to
create a default stderr logging target and initialize
it properly.
2011-05-12 16:11:14 +02:00
Harald Welte 99beb96fc0 debian: update Changelog 2011-05-11 22:31:49 +02:00
Harald Welte ebf8b0a291 debian: examples can now be installed with a single line in .examples 2011-05-11 22:31:19 +02:00
Harald Welte 0e1620ff4a debian: bsc_nat is now called osmo-bsc_nat 2011-05-11 22:30:43 +02:00
Harald Welte 5d41b90e60 add examples for osmocom-bsc 2011-05-11 22:30:30 +02:00
Harald Welte 52defe9506 osmocom-nitb.init: remove reference to old bsc_hack 2011-05-11 22:30:08 +02:00
Harald Welte eb113137c8 examples: automatically copy all examples in dist and install it to docdir 2011-05-11 22:14:59 +02:00
Harald Welte 88b6a1fa80 move config file examples to doc/examples/ 2011-05-11 20:48:29 +02:00
Harald Welte 66f27ed0cb add git-version-gen script to EXTRA_DIST 2011-05-11 20:37:18 +02:00
Holger Hans Peter Freyther 9cbdf1138f gprs: Add a lua script to collect buffers on the downlink.
This can be used to throw the data into GNUplot. It collects
the time (from the start of the trace), the buffer data in kbyte
and the number of buffered PDUs. It is assuming that no PDU
is delivered toward the target.
2011-05-10 18:45:35 +02:00
Harald Welte ef466d4f06 configure.in: Require libosmocore >= 0.3.0 for namespace changes 2011-05-08 09:41:45 +02:00
Pablo Neira Ayuso ab46cf38d4 src: rename msg_entr* to osmo_config_*
Summary of changes:

s/msg_entry_parse/osmo_config_list_parse/g
s/msg_entry/osmo_config_entry/g
s/msg_entries/osmo_config_list/g
2011-05-07 13:15:11 +02:00
Pablo Neira Ayuso c0d17f2266 src: use namespace prefix osmo_* for misc utils
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-07 12:58:59 +02:00
Pablo Neira Ayuso dfb342c19a src: use namespace prefix osmo_counter*
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-06 12:14:16 +02:00
Pablo Neira Ayuso e1273b1f3c src: use namespace prefix osmo_wqueue*
Summary of changes:

s/struct write_queue/struct osmo_wqueue/g
s/write_queue_init/osmo_wqueue_init/g
s/write_queue_clear/osmo_wqueue_clear/g
s/write_queue_enqueue/osmo_wqueue_enqueue/g
s/write_queue_bfd_cb/osmo_wqueue_bfd_cb/g
2011-05-06 12:12:49 +02:00
Pablo Neira Ayuso bbc5b99a6b src: use namespace prefix osmo_signal*
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-06 12:12:31 +02:00
Pablo Neira Ayuso 4db9299286 src: use namespace prefix osmo_fd* and osmo_select*
Summary of changes:

s/struct bsc_fd/struct osmo_fd/g
s/bsc_register_fd/osmo_fd_register/g
s/bsc_unregister_fd/osmo_fd_unregister/g
s/bsc_select_main/osmo_select_main/g
2011-05-06 12:11:23 +02:00
Pablo Neira Ayuso bf540cb7c3 src: use namespace prefix osmo_timer* for timer functions
Summary of changes:

s/struct timer_list/struct osmo_timer_list/g
s/bsc_add_timer/osmo_timer_add/g
s/bsc_schedule_timer/osmo_timer_schedule/g
s/bsc_del_timer/osmo_timer_del/g
s/bsc_timer_pending/osmo_timer_pending/g
s/bsc_nearest_timer/osmo_timers_nearest/g
s/bsc_prepare_timers/osmo_timers_prepare/g
s/bsc_update_timers/osmo_timers_update/g
s/bsc_timer_check/osmo_timers_check/g
2011-05-06 12:11:06 +02:00
Holger Hans Peter Freyther 286ba0e68f bsc: Provide a show statistics command 2011-05-04 11:34:44 +02:00
Holger Hans Peter Freyther 0dc36f1e3a nat: Keep track of the error message. 2011-05-04 11:34:44 +02:00
Pablo Neira Ayuso ef1e587008 msc: bail out if subscriber VTY command fails
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-05-04 11:03:55 +02:00
Holger Hans Peter Freyther 6860c44071 nat: Create a Paging Group that BSCs can refer to
Introduce a paging group that a BSC can refer to and is used
during the LAC lookup. This way paging can be flooded through
the network and just filtered at the last element in the core.
2011-05-02 19:19:15 +02:00
Holger Hans Peter Freyther 474698abef nat: Introduce the concept of a paging group and use it
A paging group is a list of LACs, different BSCs can point
to a paging group and use it for the LAC lookup.
2011-05-02 19:19:15 +02:00
Holger Hans Peter Freyther 1ffe98c175 nat: Rewrite the paging handling.
The current code tries to find _one_ bsc for a paging message
and then continues. The new code will try to find multiple BSCs
for each LAC. This is done in preparation of having two BSCs
handle the same LAC. This code right now is O(m*n) but it will
be worse once paging groups are landed.
The code to test the function was reduced to just test the lac
lookup code as the other part can not be tested in a standalone
setup anymore.
2011-05-02 19:19:15 +02:00
Holger Hans Peter Freyther 66e14cdda6 paging: Provide the number of pending requests
Address the FIXME and take code from the on-waves/bsc-master
branch. This will count the number of requests.
2011-05-02 19:19:15 +02:00
Holger Hans Peter Freyther 5a081bbb1d paging: Initialize structs internally to avoid a crash
The code to create the struct gsm_bts is in libcommon right now
and we can not call paging_init from there. Right now it appears
to be the easiest of doing the init internally.
2011-05-02 19:19:15 +02:00
Holger Hans Peter Freyther e188010512 bsc: Allow to have a list of MSCs/MUXs to connect to
Be able to configure a list of destinations (duplicates allowed)
that will be tried in a round robin fashion. The change is in
the bsc_msc_connection to operate on a list. We achieve the
round robin nature with the same trick used in the paging code
to delete and append the current entry. The nat code was updated
to compile but one can only configure one destination.
2011-04-26 09:36:19 +02:00