Commit Graph

28 Commits

Author SHA1 Message Date
Pau Espin dba8b0c334 Provide libosmo-rua as a public shared library
It is needed by the new osmo-hnodeb project.

Related: SYS#5516
Change-Id: I8b800baacbfe3a3c424c51b418b5ac2e2848b3ba
2021-10-22 15:43:17 +02:00
Pau Espin 35f2bd60ae Provide libosmo-hnbap as a public shared library
It is needed by the new osmo-hnodeb project.

Related: SYS#5516
Change-Id: I0d0862e9d59d3b206f3f7dfae4b39ae4032bb762
2021-10-22 15:42:27 +02:00
Pau Espin 2127a71515 src/*/Makefile.am: Fix trailing whitespace
Change-Id: Ie22df146cfaf6aaf9c7cef884a964e6a3dfcc8ad
2021-10-22 15:42:05 +02:00
Pau Espin 40c1729c61 src/tests/Makefile.am: Drop reference to non-existent RANAP_FILES var
It was no longer needed since .la was used.

Change-Id: I3f196d5c2bb35826709bfc32d10e6b3683b552ee
2021-10-21 15:06:03 +02:00
Oliver Smith f601526970 tests: use -no-install libtool flag to avoid ./lt-* scripts
This ensures that the rpath of the generated binaries is set to use only
the just-compiled so-files and not any system-wide installed libraries
while avoiding the ugly shell script wrapper.

Change-Id: I92c7391631becc09d277981179c23f2e4dba3b54
2019-03-19 13:46:08 +01:00
Harald Welte 47bba70cec Add "-Wall" to the compile rules of the non-asn1c-generated source code
This is actually default in all other osmocom projects, and it's a
big surprise that it hadn't been enabled for osmo-iuh.  Now we finally
can see that there are e.g. unused static functions in the code.

Change-Id: I8d52b11e3f476ffd77f3ab185b679817cd3b2163
2017-11-21 08:25:52 +01:00
Neels Hofmeyr 0f88c11009 migrate osmo-hnbgw to libosmo-sigtran's SCCP/M3UA
libosmo-sigtran now has a "proper" SCCP/M3UA stack, so we can make our hnb-gw
3GPP compliant by switching from the old SUA code to the new universal SCCP
user API with support for (currently) M3UA and SUA.

Main changes:

Use one cn_link to STP: We will connect to the core network using an (Osmo)STP
instance that routes to MSC and SGSN, so we want one SCCP link instead of two.
The only difference between IuCS and IuPS is a different remote osmo_sccp_addr.

This has various effects through the messaging code; the patch is a bit larger
than I would like, but it is hard to separate out truly independent smaller
changes.

CS or PS domain was previously flagged in the separate cn_link, as ctx pointer
for two separate sccp_sap_up()s. Now there's just one such ctx, so determine
is_ps from the RANAP Domain Indicator, or from the conn's hnbgw_context_map:

- Add is_ps to context_map_alloc_by_hnb().
- To find a matching context, the RUA ID alone is no longer sufficient, also
  match is_ps (possible optimization todo: separate lists).

We would send separate CS or PS Reset messages based on the cn_link, instead
send both CS and PS Reset at the same time for the single cn_link. This could
be adjusted to detect presence of MSC or SGSN instead.

Pending: adjust the VTY config to reflect that there is only one remote
address. Place a TODO comment for that.

Smaller changes:

rua_to_scu(): populate called and calling addresses for N_CONNECT and
N_UNITDATA.

Remove DSUA.

Don't build dummy_cn, which is still implemented on SUA. Mark todo to maybe
re-include it based on M3UA later.

In hnbgw_cnlink, place sccp related items in a separate sub-struct.

Do not keep an llist of cn_links, just have the one. Remove iteration and list
management.

Change jenkins script to build libosmo-sccp master.

Patch-by: hwelte, nhofmeyr
Change-Id: I8ac15fa2fd25bedb26297177e416976a5389b573
2017-07-05 13:04:15 +02:00
Neels Hofmeyr 793b273a70 fix build: look for generated sources in builddir, not srcdir
Fixes 'make check' from a different dir than the source tree.

Change-Id: I97606dadef3c2184f9538b0198029047cc3af71c
2016-10-10 13:34:38 +02:00
Neels Hofmeyr a872421e43 build: parallel build: require ../libosmo-ranap.la from tests/
This rule is bad because it re-invokes $(MAKE), but it seems to fix the
parallel build. It should probably be done differently.

Change-Id: I8107e08e4c211f20d671f520bf6bab9356f3c90e
2016-09-09 06:43:32 +00:00
Neels Hofmeyr df63de2e37 build: move headers to include/osmocom/*
This came up while fixing 'make distcheck'; this is certainly not the easiest
way but it makes sense to have the headers in include/, like we do in openbsc.

The easy alternative might be to add -I$(top_srcdir)/src to src/Makefile.am.

Remove -I$(top_srcdir)/src from src/tests/Makefile.am, no longer needed.

Change-Id: I5a82e029dcdc4df0a60a31271a4883393fe59234
2016-09-09 06:43:32 +00:00
Neels Hofmeyr 2f1b1189da build: distcheck: add missing bits for testsuite distcheck
Got some errors during 'make distcheck', copying the way openbsc.git does these
things.

Change-Id: I13d76cd56dfb8fe4eb02d6fcada78a9e3311b51b
2016-09-09 06:43:32 +00:00
Neels Hofmeyr 347f8ef218 build: distcheck: add missing distclean files
Change-Id: I24d72b2b1bae52a1b2cf8a989396d2aac31d119e
2016-09-09 06:43:31 +00:00
Neels Hofmeyr d8013d1f8c ranap_parse_lai(): Fix wrong BCD decoding for MNC. Add test.
Fix the ranap_parse_lai() part that decodes the MNC: place the *10 at the
proper MNC digit.

Add a comprehensive test for ranap_parse_lai() in test-helpers.c. Because
ranap_parse_lai() logs things, add test_common.c to test-helpers compilation
and an expected stderr output to test-helpers' testsuite.at def.
2016-04-06 18:55:14 +02:00
Neels Hofmeyr 92b13bc875 fix build: move local include dir before sys installed one 2016-02-29 14:22:21 +01:00
Neels Hofmeyr b984f36f58 hnb-test: decode NAS pdu when receiving RUA from CN 2016-02-29 10:02:10 +01:00
Harald Welte 5c6bd5104e make ranap_common.cn.[ch] part of libosmo-ranap 2016-01-06 19:53:44 +01:00
Neels Hofmeyr f193c221cf Fix -I in tests/ (broken by include dir changes) 2016-01-05 12:54:25 +01:00
Harald Welte b66c5d0e62 move tests/rua_helper.[ch] to src directory
The RUA Helper is not test-specific.
2016-01-03 18:04:28 +01:00
Harald Welte 06bc548cee steps towards making 'make distcheck' work
'make distcheck' checks for out-of-source-tree builds and whether
the distribution tarball includes all source files.  This commit
fixes many problems, except some remaining with src/test still
to-be-fixd.
2016-01-03 17:54:24 +01:00
Harald Welte e8a4dc6b70 move asn1helpers.[ch] to libasn1c
Those helper functions are not specific to osmo-iuh, so I moved
them to libasn1c, which also resolves the problem that libosmo-ranap
is depending on those helpers (and subsequently external programs
linking libosmo-ranap will need to have access to the helpers)
2016-01-03 17:25:57 +01:00
Harald Welte 056984fab1 merge (+rename) iu_helpers.c into libosmo-ranap 2016-01-03 16:31:31 +01:00
Harald Welte 0322feb68c Introduce libosmo-ranap.so as shared RANAP lib
This shared RANAP library will be used not only by hnbgw, but also by
OsmoCSCN, OsmoSGSN.
2016-01-03 15:39:11 +01:00
Harald Welte 3aad6af6a4 add 'dummy cn' as a stub core netwrok element to which hnbgw connects 2015-12-26 08:43:04 +01:00
Harald Welte 87ffeb91dc factor out some common shared test init code 2015-12-25 15:34:22 +01:00
Alexander Huemer ef8934612c fix build if depenedencies are in distinct directories 2015-12-24 16:15:17 +01:00
Harald Welte c3851220db hnb-test: Add VTY to manually issue Iuh messages
We can now send Iuh messages with commands like 'hnbap hnb register',
'hnbap ue regiter imsi 12345', 'ranap reset cs', 'ranap reset ps',
and even establish connection-oriented RUA using
'channel cs lu imsi 12345'
2015-12-24 15:41:21 +01:00
Harald Welte f8db61b554 First compiling (and leak-free) RANAP message generation functions
encoding correctness still needs to be verified at this point.  At least
they generate some binary output without failing somewhere earlier in
the encoding process - and they don't leave any leaked memory behind,
see talloc_report() at the end of test-ranap.c:main().
2015-12-18 20:20:47 +01:00
Daniel Willmann 29b9e00355 Autotoolize the build
Use Autoconf/make for building and autotest for tests
2015-12-15 15:10:31 +01:00