Commit Graph

47 Commits

Author SHA1 Message Date
Vadim Yanitskiy 2acc7b94d2 Makefile.am: remove unneeded AM_LDFLAGS with LIBS
Change-Id: I10150c00dbe69648b95ea4c414db0ad6c6bdd254
2023-03-11 03:56:01 +07:00
Neels Hofmeyr 5cda1d01b4 drop IMSI filter and libfilter completely
Filtering by IMSI in osmo-bsc is a legacy use case with questionable
usefulness. Remove.

Do not keep deprecated VTY commands: those could be dangerous, since
(presumably non-existing) users might assume that the filtering would still be
in place. Rather fail to start osmo-bsc for config with an IMSI ACL.

The IMSI filtering did, if present, provide the logging with an IMSI to print
for the bsc_subscriber. TMSIs should have ended up in logging likewise, which
has never been implemented. The proper way to learn the IMSI would be by the
Common Id message from the MSC. Furthermore, the upcoming MSC pooling feature
will extract the mobile identity again, and will hence make sure that both IMSI
and TMSI identities, as available, end up in the bsc_subscriber and will be
logged again.

So long, IMSI ACL, and thanks for all the fish.

Change-Id: I89727af5387e8360362e995fdee959883c37d89a
2020-05-27 01:56:06 +02:00
Pau Espin ed1dcbb551 configure.ac: Add flag to enable/disable build of ipaccess related utils
Change-Id: Iff70dc46c77b2ac58351ad9a91caf3f524c6fd89
2019-03-14 17:07:45 +01:00
Neels Hofmeyr 958f259f95 dissolve libbsc: move all to src/osmo-bsc, link .o files
Move all of libbsc/ into osmo-bsc/, and separate/move some implementations to
allow linking from utils/* and ipaccess/* without pulling in unccessary
dependencies.

Some utilities use gsm_network and gsm_bts structs, which already include data
structures for fairly advanced uses. Move initialization that only osmo-bsc
needs into new bsc_network_init() and bsc_bts_alloc_register() functions, so
that the leaner tools can use the old gsm_* versions without the need to link
everything (e.g. handover and lchan alloc code).

In some instances, there need to be stubs if to cut off linking "just before
the RSL level" and prevent dependencies from creeping in.
- abis_rsl_rcvmsg(): the only program currently interpreting RSL messages is
  osmo-bsc, the utils are merely concerned with OML, if at all.
- paging_flush_bts(): ip.access nanobts models call this when the RSL link is
  dropped. Only osmo-bsc actually needs to do anything there.
- on_gsm_ts_init(): the mechanism to trigger timeslot initialization is related
  to OML, while this action to take on init would pull in RSL dependencies.
utils/ and ipaccess/ each have a stubs.c file to implement these stubs. Tests
implement stubs inline where required.

From src/utils/, src/ipaccess/ and tests/*/, link in .o files from osmo-bsc/.
In order for this to work, the osmo-bsc subdir must be built before the other
source trees. (An alternative would be to include the .c files as sources, but
that would re-compile them in every source tree. Not a large burden really, but
unless linking .o files gives problems, let's have the quicker build.)

Minor obvious cleanups creep in with this patch, I will not bother to name them
individually now unless code review asks me to.

Rationale:

1) libbsc has been separate to use it for osmo-nitb and osmo-bsc in the old
openbsc.git. This is no longer required, and spreading over libbsc and osmo-bsc
is distracting.

2) Recently, ridiculous linking requirements have made adding new functions
cumbersome, because libbsc has started depending on osmo-bsc/*.c
implementations: on gscon FSM and bssap functions. For example, neither
bs11_config nor ipaccess-config nor bts_test need handover_cfg or BSSMAP
message composition. It makes no sense to link the entire osmo-bsc to it, nor
do we want to keep adding stubs to each linking realm.

Change-Id: I36a586726f5818121abe54d25654819fc451d3bf
2018-06-07 19:09:06 +02:00
Neels Hofmeyr d23ce86c25 drop libcommon-cs completely
Change-Id: I07d4a48af3154ee4d904686f230a51b8b8a94ff9
2018-02-14 12:55:45 +01:00
Neels Hofmeyr 421059a2c0 drop libcommon completely, move remaining files to libbsc
Move gsm_data.c and handover_cfg.c to libbsc, where they belong.

This leaves libcommon utterly empty, drop it.

Change-Id: I6178061fa30c7e1a4c22c29d3c8f508b1033569f
2018-02-14 12:54:38 +01:00
Harald Welte d9956d91ba Remove dead code left over from NITB split
There still is a lot of dead code that we inherited from the NITB
days, let's remove more of it.

libtrau will be re-introduced as part of osmo-mgw later.

Change-Id: I8e0af56a158f25a4f1384d667c03eb20e72df5b8
2017-12-19 17:53:13 +00:00
Max 115e2672fe OML: expand status reporting checks
* check GPRS state: if GPRS is enabled for the BTS but NSE, CELL or both
  NSVC are locked than report it as degraded
* check TRX usability: use already available function to check that TRX
  is actually usable when reporting OML status via CTRL
* fix tests linking: libbsc is using gsm48_create_mm_serv_rej() which is
  defined in libcommon-cs but neither libbsc itself nor tests using it
  are actually linked against libcommon-cs

Related: OS#2486
Change-Id: I9dce1d3b0cabe149a90cfca58a3fe55f8d6a72bc
2017-12-10 14:18:41 +00:00
Philipp Maier 39c609b7c9 mgcp: use osmo-mgw to switch RTP streams
osmo-bsc currently negotiates the RTP stream directly with the
BTS and reports back the RTP IP/Port on the BTS. This works fine
for a single BTS, but for Handover the port/ip pointing to the
MSC side must not change, so an entity in between the BTSs and
the MSC is required.

Integrate the mgcp-client and use osmo-mgw to switch the RTP
streams.

Depends: osmo-mgw Ib5fcc72775bf72b489ff79ade36fb345d8d20736
Depends: osmo-mgw I44b338b09de45e1675cedf9737fa72dde72e979a
Depends: osmo-mgw I29c5e2fb972896faeb771ba040f015592487fcbe

Change-Id: Ia2882b7ca31a3219c676986e85045fa08a425d7a
2017-11-07 20:57:51 +00:00
Harald Welte 1861b55516 configure.ac: remove --enable-osmo-bsc, --enable-nat
This is the OsmoBSC project.  Disabling the build of the BSC would be
somewhat odd, so let's remove the option.

Also, OsmoBSC depends on libosmo-sccp now, so we must unconditionally
depend on it.  As a result, we can remove the --enable-nat option,
as this was only to avoid a mandatory libosmo-sccp requirement in
historical times.

Change-Id: Icfee8a904d33b7c13ab8d185d64fb5c2337d8640
2017-09-03 22:57:31 +02:00
Neels Hofmeyr 7b656884cf split off osmo-bsc: remove files, apply build
Change-Id: I64d84c52f6e38e98144eb9be8f0ab82e0e1f6cca
2017-08-30 14:11:25 +02:00
Neels Hofmeyr becfc4cb1b move to osmo-mgw.git: osmo-bsc_mgcp and libmgcp as libosmo-legacy-mgcp
Rewire build and includes to libosmo-legacy-mgcp.

Drop osmo-bsc_mgcp and related python tests, now found in osmo-mgw.git.

libosmo-legacy-mgcp is installed from osmo-mgw, hence add the dependency to
jenkins.sh (so far using the pre_release branch).

Change-Id: Ic99d681759edce11564da62500c2aac5cf5fffe2
2017-08-30 14:09:31 +02:00
Neels Hofmeyr eb228bd430 move libiu to osmo-iuh/libosmo-ranap
Remove libiu here, use the functions from libosmo-ranap instead, by applying
the ranap_ / RANAP_ prefix.

Corresponding change-id in osmo-iuh.git is I6a3f7ad15be03fb94689b4af6ccfa828c25f45c0

To be able to run the msc_vlr tests for RAN_UTRAN_IU without Iu client headers
available, add iu_dummy.h, containing mere function signatures that match
iu_dummy.c and a mostly empty struct ranap_ue_conn_ctx.

Make sure we can build with and without --enable-iu: include osmo-iuh headers
only with --enable-iu.

Change-Id: Ib8c4fcdb4766c5e575618b95ce16dce51063206b
2017-08-30 14:09:31 +02:00
Neels Hofmeyr c29505e1d1 Implement IuCS (large refactoring and addition)
osmo-nitb becomes osmo-msc
add DIUCS debug log constant
add iucs.[hc]
add msc vty, remove nitb vty
add libiudummy, to avoid linking Iu deps in tests
Use new msc_tx_dtap() instead of gsm0808_submit_dtap()
libmgcp: add mgcpgw client API
bridge calls via mgcpgw

Enable MSC specific CTRL commands, bsc_base_ctrl_cmds_install() still needs to
be split up.

Change-Id: I5b5b6a9678b458affa86800afb1ec726e66eed88
2017-08-27 03:52:44 +02:00
Harald Welte 774a2a7e39 Add libvlr implementation
Original libvlr code is by Harald Welte <laforge@gnumonks.org>,
polished and tweaked by Neels Hofmeyr <nhofmeyr@sysmocom.de>.

This is a long series of trial-and-error development collapsed in one patch.
This may be split in smaller commits if reviewers prefer that. If we can keep
it as one, we have saved ourselves the additional separation work.

Related: OS#1592
Change-Id: Ie303c98f8c18e40c87c1b68474b35de332033622
2017-08-27 03:52:44 +02:00
Neels Hofmeyr 218e4b4aa0 move openbsc/* to repos root
This is the first step in creating this repository from the legacy openbsc.git.

Like all other Osmocom repositories, keep the autoconf and automake files in
the repository root. openbsc.git has been the sole exception, which ends now.

Change-Id: I9c6f2a448d9cb1cc088cf1cf6918b69d7e69b4e7
2017-08-27 03:52:43 +02:00
Harald Welte 13e10daa33 move openbsc into its own subdirectory 2009-06-10 05:40:52 +08:00
Holger Freyther 3cf00fb954 Add the isdnsync program which enable layer1 and layer2 on a card
this small tool is used to enable layer 1 and 2 on a given isdn card.
the card can be used to retrieve clock signal from a network. layer 2
(PTP) is required to keep layer 1 without interruption. this tool works
on e1 and s0 cards. to use the clock signal with other cards,
interconnection with a clock-slave-card is required.

(Andreas Eversberg)
2009-06-08 10:33:06 +00:00
Holger Freyther 2e99605b7e [misc] Search for the crypt symbol to conditionally enable crypt in VTY
It will define -DVTY_CRYPT_PW= if crypt is found. If -lcrypt is
needed, $(LIB_CRYPT) will be -lcrypt.

Compiles on OS X and Linux and reenables crypt.

Patch by: Lars Immisch
2009-06-02 04:04:36 +00:00
Harald Welte d6cab81175 vty: disable password encryption, remove dependency to lcrypt 2009-05-21 07:31:48 +00:00
Harald Welte 6dafb7ba37 bs11_config build fix 2009-05-01 15:40:14 +00:00
Harald Welte 25de99170f add new 'ipaccess-config' program to set Unit ID and primary OML NVRAM parameters of ip.access BTS 2009-04-30 15:53:07 +00:00
Holger Freyther 1047940dce [misc] Make distcheck work again 2009-03-11 03:29:43 +00:00
Harald Welte 404cdd8951 make telnet interface use VTY code 2009-03-10 12:21:45 +00:00
Harald Welte 955049f191 import VTY code from zebra/quagga (from my cardshell project) 2009-03-10 12:16:51 +00:00
Holger Freyther 3281f6e233 [build] Create a libbsc.a as noinst_LIBRARY, link bsc_hack and tests against it
Link the tests against the libbsc.a to avoid most of the breakage
when creating new symbols.
2009-02-20 18:33:00 +00:00
Harald Welte ad2a12a4c3 we need tlv_parse.c in bs11_config now 2009-02-19 03:11:48 +00:00
Holger Freyther 76c9569021 [utils] Create gsm_utils for 7bit encoding and decoding... 2009-02-17 20:31:30 +00:00
Holger Freyther 2b2d2e350e [signal] Add generic signal registration and dispatch...
This will be used for generic registration and dispatching
of any kind of event. We will have different areas (like
with the debug interface) and each layer can define their
own struct for the event message... This is not tested yet
2009-02-14 22:51:00 +00:00
Harald Welte 09d38d3b61 add tlv_parser code to Makefile.am 2009-02-14 19:46:31 +00:00
Harald Welte 923a3bdbe5 add new program to use UDP broadcast packets to find ip.access BTS in the network 2009-02-14 12:51:36 +00:00
Harald Welte 5fd8a545c8 preliminary ip.access BTS support, as of now only OML singalling works 2009-02-13 02:43:36 +00:00
Harald Welte 1fa60c8ab0 * add trau_mux implementation to relay from one incoming TRAU
channel to another one (simple voice call switching)
* add a way more generic E1 input layer, abstracting out the misdn
  low-level interface. This also adds infrastructure for multiple TRX
  in one BTS, as well as multiple BTS on one E1 link
* add a E1 subchannel multiplexer for sending multiple 16kbit sub-channels
  one one 64kBps E1 channel
* add TRAU IDLE frame generation
* terminate bsc_hack in case there is a E1 / mISDN init error
* introduce 'e1_config.c' file with static configuration of our
  E1 setup (which TRX/BTS is configured for which TEI/SAPI/E1). This should
  later become a config file rather than a compiled C file.

WARNING: all this compiles but is not tested yet.  Expect fix-up committs over
the next hours or so
2009-02-09 18:13:26 +00:00
Harald Welte c12d52bae4 * improve parsing of status/phase response from BTS
* split rs232 support into separate file (like misdn.c)
2009-02-01 21:39:06 +00:00
Harald Welte 14f0934f0b * use select loop based rx/tx processing in bs11_config
* improve parsing/generation of fake lapd header
2009-01-29 19:28:38 +00:00
Harald Welte 61e42ad7fd add bs11_config as LMT alternative 2009-01-18 19:10:46 +00:00
Harald Welte b68899d3e3 Start creating a paging layer...
You can request to open a channel to a MS and the paging layer
will call you once the channel is allocated. Internally the CCCH
Load Indication will be handled and retry to page a terminal.
2009-01-06 21:47:18 +00:00
Harald Welte 196a366e30 make sure we build (even if not use) subchan_demux and trau_frame code 2009-01-05 19:01:56 +00:00
Holger Freyther 219518d064 Add simplistic telnet control interface
This might turn into a complete wire protocol with special
client software. For now it will be a simple client interface
that you can use with telnet to do certain things.

This is using flex to implement the parsing. Implementation
and more commands will follow.
2009-01-02 22:04:43 +00:00
Holger Freyther dbede4e414 Move the db_test.c to a specific test directory 2008-12-31 23:25:05 +00:00
Daniel Willmann 8b3390effd Start implementing GSM 04.11 (short message service) 2008-12-28 00:31:09 +00:00
Jan Luebbe 5c15c85be3 rewrite db backend 2008-12-27 15:59:25 +00:00
Holger Freyther 32636e8910 Move the debug code to a separate debug.c 2008-12-27 11:07:15 +00:00
Holger Freyther 5f75598c28 Introduce a simple timer API....
One can use add_timer or schedule_timer to add a timer. After
the timeout time has been reached the callback will be called.
One can call add_time/schedule_timer and del_timer from within
the callback.
2008-12-27 09:42:59 +00:00
Jan Luebbe faaa49ca51 db: add GPL headers and integrate with autofoo 2008-12-27 01:07:07 +00:00
Harald Welte 0e2a5f2bca add channel allocator to makefile 2008-12-25 23:50:01 +00:00
Harald Welte de729a139e autoconf 2008-12-23 21:01:25 +00:00