Commit Graph

3381 Commits

Author SHA1 Message Date
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
Holger Hans Peter Freyther 2a9eeaa588 bsc: Allow the NAT to query the list of LACs
Right now the code assumes that any request coming
from the NAT is a query and the code responds to with
a list of configured LACs.
2011-04-26 09:35:31 +02:00
Holger Hans Peter Freyther a78b6026c9 bsc: Handle MGCP coming from Osmo Extensions header
Start using the new Osmo Extension header and forward MGCP
to the MGCP GW.
2011-04-26 09:33:47 +02:00
Daniel Willmann 163f612326 bsc: Point back from struct osmo_msc_data to struct gsm_network 2011-04-26 09:33:47 +02:00
Holger Hans Peter Freyther de2b860dff nat: Introduce a block on the NAT to slowly get rid of BSCs
For restarting the NAT we can now block it, it will not accept
new connections and for existing connections it will attempt
to drop them over time. A blocked NAT will end up with no BSC
connections left and then can be safely restarted.
2011-04-26 09:33:47 +02:00
Holger Hans Peter Freyther c3f28320c2 ipa: Reserve two new values for the Osmo IPA extensions
We want to send MGCP through the Osmo Extension and also
want to send the list of local LACs to it.
2011-04-26 09:33:47 +02:00
Holger Hans Peter Freyther 5deb6c3c5f abis: Use LOGL_ERROR for the Failure Event Report
It is not an error of the BSC but we will treat a
BTS error like an error of the BSC for now.
2011-04-26 09:33:47 +02:00
Holger Hans Peter Freyther 0b03f16cdb ussd: Ignore connection release/clear from the MSC
In case this is a local USSD connection we will ignore
the clear command and respond with a RLC to any RLSD but
will never forward that to the BSC. This way the external
USSD is fully in charge of the connection.
There are theoretical issues if there are multiple transactions
on the same SCCP Connection but this can not be solved properly
right now.
2011-04-21 17:13:51 +02:00
Holger Hans Peter Freyther 71dd06cfcb crc24: Include stdint.h as a possible compile fix 2011-04-19 20:06:26 +02:00
Holger Hans Peter Freyther 123bc32834 ussd: Keep track of used TIs for USSD and forward messages
Keep track of the used transaction identifier and always forward
messages to the USSD provider. E.g. this can be used to have a
dialogue going. Right now it is still possible that the MSC will
close down the connection.
2011-04-19 13:06:47 +02:00
Holger Hans Peter Freyther 91b9a45be4 nat: Inform the USSD Provider about lost connections 2011-04-18 17:32:40 +02:00
Holger Hans Peter Freyther e5d324981d nat: Remove magic numbers, use enum values for conn classification
Remove the usage of 0, 1, 2 and start using enum values. We can
still assume con_local is a number.
2011-04-18 17:32:38 +02:00
Holger Hans Peter Freyther a64037cd4a nat: Clarify the documentation of the allow/deny regexp 2011-04-18 17:31:40 +02:00
Holger Hans Peter Freyther 80352e03ca ho: Initialize nmp_worst as it was not initialized
The compiler can't know that on the first iteration we will
assign nmp_worst as we have used a high average value.
2011-04-18 17:31:40 +02:00
Holger Hans Peter Freyther d447e99587 bsc: Move transaction.c from the libbsc to the libmsc
The BSC code does not use transactions, move it to the libmsc.
2011-04-18 17:31:40 +02:00
Holger Hans Peter Freyther 0e7d071e47 misc: Fix possible crash with setting an extension 2011-04-18 17:31:40 +02:00
Holger Hans Peter Freyther a8a09df6a6 misc: Remove sys/types.h includes from the files
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-18 17:31:39 +02:00
Holger Hans Peter Freyther c42ad8b686 misc: Move from u_int to uint types of stdint.h
This was done with sed on the files.
2011-04-18 17:31:39 +02:00
Holger Hans Peter Freyther 5cde92cb0e nat: And out the skip_indicator/transaction id from the gsm48 header
We need to and out the protocol discriminator as call control
might have use transactions. This has only failed for the USSD
filter so far as this must deal with transactions.
2011-04-13 18:56:13 +02:00
Holger Hans Peter Freyther 06009c8d5a bsc: Remove the handling of the RTP option from the switch/case stmt
The 'P' code was not present in the getopt call anyway.
2011-04-13 09:18:49 +02:00
Holger Hans Peter Freyther fede54c821 bsc: Use the new name in the usage statement 2011-04-13 09:18:09 +02:00
Pablo Neira Ayuso 7e737007d9 ipaccess-proxy: get rid of make_gprs_sock()
It is similar to make_sock() available in openbsc/libcommon.
2011-04-12 21:50:47 +02:00
Pablo Neira Ayuso 4c80a516f8 ipaccess-proxy: remove leftover option `--udp'
It seems it remains unimplemented, remove it.
2011-04-12 21:50:47 +02:00
Pablo Neira Ayuso 25ffe54118 ipaccess-proxy: more robust option parsing and checking
With this patch, ipaccess-proxy makes more robust option checking:

$ ./ipaccess-proxy -l 1.1.1.1 -b 2.2.2.2 -e
ERROR: missing mandatory argument for `-e' option

And we return to shell to enforce the user to try again with the
appropriate invocation.

Before this patch, the default getopt_long() error handling was
enabled which displayed this message:

./ipaccess-proxy: option requires an argument -- 'e'

and ipaccess-proxy continued working.

This is generic enough to cover other option that require mandatory
arguments like `--bsc' and `--listen'.
2011-04-12 21:50:47 +02:00
Pablo Neira Ayuso 23b1b808f1 ipaccess-find: get rid of ipac_idtag_name()
Use generic ipaccess_idtag_name() available in libabis instead.
2011-04-12 21:50:47 +02:00
Pablo Neira Ayuso 91afbbc56a libabis: ipaccess: use log instead of debug under errors in ipaccess_send()
This patch was suggested by Zecke.
2011-04-12 21:50:46 +02:00
Pablo Neira Ayuso ca05d432d7 src: more robust ipaccess_idtag_parse()
Now ipaccess_idtag_parse() returns -EINVAL instead of -1. We also
check for the return value of this function in every invocation to
skip further processing in case of messages with malformed TLVs.

This idea was suggested by Zecke.
2011-04-12 21:50:46 +02:00
Pablo Neira Ayuso 0d20b63574 libabis: ipaccess: more robust ipaccess_idtag_name()
ipaccess_idtag_name() now takes a uint8_t as parameter which is the
length of the type tag.

This patch was suggested by Zecke.
2011-04-12 21:50:46 +02:00
Holger Hans Peter Freyther 81863cde82 db: The forward declaration of the enum does not work with C++
We need to include this directly to help LCR in building.
2011-04-12 21:33:35 +02:00
Holger Hans Peter Freyther 090493863b mncc: Do not permanently disable the listening socket in case of error
When we have no other MNCC connection but the registeration of the
new fd is failing we should not disable reading from the listen_fd
for ever as the situation might not be permanent.
2011-04-12 20:14:51 +02:00