Commit Graph

58 Commits

Author SHA1 Message Date
Pau Espin f5a5e01feb Bump version: 1.2.0.24-de3c-dirty → 1.3.0
Change-Id: I7da0cc95d7b1a7198f1ae5ad5a4c0174dfd7381d
2022-06-28 18:59:56 +02:00
Philipp Maier 63a0cfe04e ranap_common_ran: add decoder for CN/MSC originated messages
Lets add a counterpart for ranap_common_cn that works the same, but
decodes CN/MSC originated messages.

Change-Id: Iad4c2743d4d1ddf8ad49002d1fe6866f22eb9e98
Related: OS#5152
2022-01-31 17:40:49 +01:00
Pau Espin e91b57d963 Drop osmo-hnbgw
OsmoHNBGW is now available in its own repository osmo-hnbgw.git.

Change-Id: I4e17c578b432f0c997ea4e13b1c468b112278854
2022-01-04 18:59:46 +01:00
Pau Espin ef1b61fc6c Bump version: 0.7.0.27-f8ed-dirty → 0.8.0
Change-Id: Ibbef3cc3bf1f468309e73f5dda497dca1a03c815
2021-11-16 17:13:10 +01:00
Pau Espin bc7c69d170 hnbap: Use specific prefix for HNBAP generated code
Other libraries already use ASN1C_PREFIX except the HNBAP one. Let's use
it here to avoid collisions.

All new include/osmocom/hnbap/HNBAP_*.h and src/hnbap/HNBAP_*.c are
generated using the updated src/hnbap/Makefile.am.
Files such as src/*.c, test/* and include/osmocom/hnbap/hnbap_common.h
are modified manually to update structs/enums to new prefix.

Related: SYS#5516
Change-Id: I6c062f631527ae42811bfec134933671c05ecba6
2021-10-26 16:42:07 +02:00
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 c1385f2986 Bump version: 0.6.0.49-356f-dirty → 0.7.0
Change-Id: I3b592c39646a77681efde5debb5ac2a844208949
2021-02-23 20:11:59 +01:00
Pau Espin 67d32a0386 Bump version: 0.5.0.23-11a1 → 0.6.0
Change-Id: I5f42c0ad1a930004415f097d984e1fd1b2d277e6
2020-01-03 17:04:15 +01:00
Harald Welte e844bf7828 sabp: Generate C/H files for SABP; create libosmo-sabp
This uses the (modified) Osmocom asn1c on the (modified) SABP ASN.1
syntax to generate C code + header files for SABP parsing/encoding.

It also adds some helper code for message encoding and decoding as well
as a new libosmo-sabp shared library which can be used by programs to
implement SABP related functionality.

Change-Id: Ib9580d1af96354398da4c9f97b28a0e23d56e275
2019-09-23 20:23:51 +02:00
Pau Espin 505fa9eae7 Bump version: 0.4.0.14-92ea-dirty → 0.5.0
Change-Id: I53c1743eda203bf075f93f891e336ca4ec6866a8
2019-08-07 21:23:57 +02:00
Harald Welte 92a88ee73f Bump version: 0.3.0.10-9e66-dirty → 0.4.0
Change-Id: Ib2943b7fd0a1f7ca79f761116cba30aa3aa29b88
2019-01-20 21:46:06 +01:00
Pau Espin ba941e553d Bump version: 0.2.0.57-cf5f-dirty → 0.3.0
Change-Id: Id5d2f749bca46e8b81cc2934447707e3db80ea18
2018-05-03 18:29:14 +02:00
Max ef727410b2 Add control interface
* add libosmoctrl dependency
* bind control interface

Change-Id: I4637e88da00bac1ab0237c29ac73806d024863ba
2017-12-31 11:02:07 +00:00
Neels Hofmeyr 66d6d760aa hnbgw: hnb info: record MCC, MNC, show on 'show hnb'
Before, MCC and MNC were always reported as zero, now the output of 'show hnb all' looks like:

  OsmoHNBGW> show hnb all
  HNB "000295-0000154153@ap.ipaccess.com" MCC 901 MNC 70 LAC 11111 RAC 99 SAC 65535 CID 1048575
     HNBAP ID 0 RUA ID 0

Change-Id: Iae094b36fa1cf18e07ed33914b9425368d7cd34b
2017-12-20 23:17:57 +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 dfc75df199 src/Makefile.am: drop unused COMMON_LDADD
unused since change-id Ic6a645a93406670d58eb5edf5f2f2e1266168c92
"osmo-hnbgw: Avoid useless linking to libosmogsm and libsctp"

Change-Id: I4241a1d84b54a77a6a6dad809f8ec921f45ba4bc
2017-11-16 10:01:13 +01:00
Harald Welte 493366ec7b Link libosmo-ranap against libosmovty
This fixes the following dh-shlibdeps warnings:

Change-Id: I08be684c45c7e95315dba6ccf9892fe6fc7c3f24
dpkg-shlibdeps: warning: symbol install_element used by debian/libosmo-ranap1/usr/lib/x86_64-linux-gnu/libosmo-ranap.so.1.0.0 found in none of the libraries
dpkg-shlibdeps: warning: symbol vty_out used by debian/libosmo-ranap1/usr/lib/x86_64-linux-gnu/libosmo-ranap.so.1.0.0 found in none of the libraries
2017-11-03 14:04:25 +00:00
Harald Welte 7235ea02d7 osmo-hnbgw: Avoid useless linking to libosmogsm and libsctp
This fixes the following dpkg-shlibeps warnings:

Change-Id: Ic6a645a93406670d58eb5edf5f2f2e1266168c92
dpkg-shlibdeps: warning: package could avoid a useless dependency if debian/osmo-hnbgw/usr/bin/osmo-hnbgw was not linked against libosmogsm.so.8 (it uses none of the library's symbols)
dpkg-shlibdeps: warning: package could avoid a useless dependency if debian/osmo-hnbgw/usr/bin/osmo-hnbgw was not linked against libsctp.so.1 (it uses none of the library's symbols)
2017-11-03 14:04:11 +00:00
Harald Welte cc1afdfb7e Tag/Release 0.2.0 + Update LIBVERSION + Debian packaging
Change-Id: I4fe653fdde6acda59485c73cee63bfc5326edf28
2017-10-27 22:35:49 +02:00
Harald Welte a3f4e79a9d Makefile.am: Link libosmo-ranap against libosmo-sigtran
In Change-Id I6a3f7ad15be03fb94689b4af6ccfa828c25f45c0 we introduced
the somewhat arguable combination of Iu code in libosmo-ranap.  This Iu
code uses functions provided by libosmo-sigtran.

However, at the time it was overlooked to explicitly link libosmo-ranap
against libosmo-sigtran, which caused linking failures of programs
using libosmo-ranap, such as the unit tests included in this package.

Below example is from building using contrib/jenkins.sh on Ubuntu 17.04:

  CCLD     test-ranap
../../src/.libs/libosmo-ranap.so: undefined reference to `osmo_sccp_local_addr_by_instance'
../../src/.libs/libosmo-ranap.so: undefined reference to `osmo_sccp_tx_unitdata_msg'
../../src/.libs/libosmo-ranap.so: undefined reference to `vty_out'
../../src/.libs/libosmo-ranap.so: undefined reference to `install_element'
../../src/.libs/libosmo-ranap.so: undefined reference to `osmo_sccp_user_bind'
../../src/.libs/libosmo-ranap.so: undefined reference to `osmo_sccp_user_sap_down'
../../src/.libs/libosmo-ranap.so: undefined reference to `osmo_scu_prim_name'
../../src/.libs/libosmo-ranap.so: undefined reference to `osmo_sccp_addr_dump'
collect2: error: ld returned 1 exit status
Makefile:418: recipe for target 'test-ranap' failed

Change-Id: Ibfbcafd31c91dc630d406ec39b3b076bdb1f4c19
2017-10-04 11:49:29 +08:00
Neels Hofmeyr aae68b2791 move openbsc.git's iu.h, iu.c, iu_vty.c here as iu_client
To help split openbsc.git to separate MSC and SGSN repositories, place the
common Iu interface related code here in libosmo-ranap. Also apply various
improvements while moving (from intermittent code review).

The code depends on libosmo-ranap tightly. One reason to want this separate
from libosmo-ranap could be that it uses libosmo-sigtran, accepting an sccp
instance. However, including in libosmo-ranap is the simplest way to go. The
osmo-iuh build depends on libosmo-sigtran anyway because of OsmoHNBGW, and all
current users of libosmo-ranap also naturally link libosmo-sigtran already.

Apply prefix ranap_iu_ and RANAP_IU_ to allow smooth transition from the
openbsc.git iu_ to the libranap ranap_iu_ implementations.

Prune unneeded #include statements.

Instead of sccp_addr, store an rnc pointer in the ue_conn_ctx. To facilitate,
also:
- Move iu_rnc struct to iu_client.h (as ranap_iu_rnc).
- Instead of sccp_addr, pass rnc to ue_conn_ctx_alloc().
- Pass a local struct new_ue_conn_ctx containing the sccp_addr and conn_id up
  the RANAP handling stack in case of an InitialUE message.
- Separate the InitialUE message handling from cn_ranap_handle_co(), by moving
  to new and separate cn_ranap_handle_co_initial(), so we can still pass a
  looked-up ue_conn_ctx to all other cn_ranap_handle_co() code paths.
- Allocate the ue_conn_ctx only in ranap_handle_co_initial_ue(), not as early
  as before.
Note that we are not actually ever using the rnc pointer now present in
ue_conn_ctx. It could be used for more concise paging, to first page only the
RNC where we last saw the subscriber. So far we page all matching LAC/RACs.

Tweak error logging: use __func__ instead of writing the function names as
string constants.

In iu_client_vty.c:
- Move the asn.1 debug commands from logging over to the iu node. They are not
  specific to the logging target. They could qualify for an entirely separate
  'asn1' root node, but for simplicity place under 'iu'.
- Add the 'asn1' commands to ranap_iu_vty_config_write(), so far missing.
- remove the legacy "net." from a VTY error message, it is not known which name
  the parent node of 'iu' has.

Depends: libosmo-sccp I85b46269dbe7909e52873ace3f720f6292a4516c,
	 libosmo-sccp Ie1aedd7894acd69ddc887cd65a8a0df4b888838c
Change-Id: I6a3f7ad15be03fb94689b4af6ccfa828c25f45c0
2017-07-31 13:20:00 +02: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 ba03c430a6 build: distcheck: look for asn1 in top_srcdir, not top_builddir
Change-Id: Iebcff240ba2fae964dad2a2c481fcbfd29e14e69
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 8345792281 build: fix ranap gen, use same for gen hnbap and rua gen
fix extraneous rebuild for each make invocation: touch the ranap.stamp file in
src/ as the make target suggests.

fix for 'make distcheck': ranap gen: move generated sources to builddir, not
srcdir. Thus we also -I the builddir include to pick up those headers.

hnbap and rua have the same situation as ranap (they generate numerous files
from a single make rule). Use the same makefile semantics for those two
(commit for ranap gen omitted the same changes for hnbap and rua).

The generated headers are thus moved to include/osmocom/*/, so adjust #include
statements accordingly (*_common.h, *_ies_defs.h).

Also move hnbap_common.h to include/osmocom/hnbap and rua_common.h to
include/osmocom/rua, since the *_ies_defs.h want to include them; and since
*_ies_defs.h are now in include/osmocom/*, we want a '<foo>' include now.

Also adjust gitignore.

Change-Id: I32213666fcdfc144008fa7d46497c0938d093e86
2016-09-09 06:43:31 +00:00
Neels Hofmeyr 4d8eb4cbd7 hnbgw: move vty commands out to new hnbgw_vty.c
Pass g_hnb_gw and tall_hnb_ctx to hnbgw_vty_init() as they are no longer
statically available.

Change-Id: If85c1b97a240bd1dcf9f367ea6fca857d542ab22
2016-08-18 03:21:22 +02:00
Neels Hofmeyr fef2e86003 make regen: fix: use $(MAKE) instead of make
On FreeBSD, we use gmake, so calling 'make -C ...' won't work here.
We need to invoke $(MAKE) so gmake is used again.

Change-Id: If8d09889db2c101eca66675fff8f820d6d1d7a65
2016-07-12 00:44:18 +02:00
Alexander Huemer 156fa393fc attempt to fix parallel build, improve AM logic
The formerly existing make rule caused a race condition in parallel builds and
wrongly stated the .c files as targets, which caused make to execute the
rule twice (once for each target). This was actually only fallout of the
attempt to express the fact that those two files are generated by the rule.

The generated file ranap_ies_defs.h was moved by one make job, another
job then tried to access the file in the old location and failed.

parallel build verified with:
$ for i in $(seq 1 10)
do
	echo "XXXX iteration $i"
	git clean -xfd
	autoreconf -i
	./configure
	make -j${i} || break
done

Coauthored by Andreas Rottmann <mail@rotty.xx.vu>

Change-Id: I439edcb4b7742de861c99ed401114f51061f8088
Reviewed-on: https://gerrit.osmocom.org/65
Tested-by: Jenkins Builder
Reviewed-by: Harald Welte <laforge@gnumonks.org>
2016-05-15 23:28:14 +00:00
Neels Hofmeyr 3da8608b6a Move sccp_helpers.[hc] to libosmo-sigtran 2016-03-30 14:10:39 +02:00
Neels Hofmeyr f67803684f build: use $top_srcdir instead of ../ 2016-02-29 14:28:00 +01:00
Neels Hofmeyr 92b13bc875 fix build: move local include dir before sys installed one 2016-02-29 14:22:21 +01:00
Daniel Willmann 6480cadd8e hnbgw: Use libosmo-netif for SCCP connection handling 2016-01-07 11:01:12 +01:00
Daniel Willmann 8fda362dd8 Correct postprocessing of generated files
Rewrite ranap_common.h include path in ranap_ies_defs.h as well
Don't move ranap_ies_defs.h to the install directory, but move it inside
the source tree
2016-01-07 10:52:52 +01:00
Harald Welte f3d2c74250 also 'sed' the include path of the ranap_common.h file 2016-01-06 19:53:48 +01:00
Harald Welte 5c6bd5104e make ranap_common.cn.[ch] part of libosmo-ranap 2016-01-06 19:53:44 +01:00
Neels Hofmeyr 96979af054 move ranap_*.h,iu_helpers.h to include/osmocom/ranap/
A bit hacky: the ranap_ies_defs.h is generated together with the
ranap_encoder.c and ranap_decoder.c. See comments in src/Makefile.am and
include/osmocom/ranap/Makefile.am.
2016-01-05 15:37:23 +01:00
Neels Hofmeyr 0de6b94d71 rebuild en/decoders when asn1tostruct.py changed
Add asn1tostruct.py as dependency for the targets that use it, so that any
modification to the asn1tostruct.py regenerates everything related
automatically.
2016-01-05 12:59:58 +01:00
Neels Hofmeyr c04a96c476 move asn1 headers to include/ dir (5/5)
Do all remaining changes necessary for a working build.

Add Makefile.am files in include/... subdirs.

Remove noinst_HEADERS directives from src/*/Makefile.am, but keep the headers
list to feed to move-asn1-header-files.sh.

Adjust all #includes in src/*_common.h and elsewhere. In hnbap_common.h,
separate the ASN.1 "primitive" headers from the others, and include them
without a subdir path, as before.
2016-01-04 18:11:19 +01:00
Neels Hofmeyr 5aabad1380 move asn1 headers to include/ dir (1/5)
Add move-asn1-header-files.sh to do header file moving and sed'ding the include
statements. The file moving part is disabled until a later commit, to make
reading the diffs easier.

Call shell script from src/{hnbap,ranap,rua}/Makefile.am regen targets.

Add convenience regen target to src/Makefile.am, calling regen in the three subdirs.

This change is split over several commits to ease diff reading. Subsequent
commits show, in steps:
- the "unmoved" effect of sed,
- header moves,
- adjust build system and include statements.
2016-01-04 18:09:37 +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 a95d5a5f51 Makefile restructuring; install ranap header files 2016-01-03 16:22:16 +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
Alexander Huemer ef8934612c fix build if depenedencies are in distinct directories 2015-12-24 16:15:17 +01:00
Harald Welte c4338deee9 hnbgw: Bring all parts together
We now have the RUA and SUA parts interconnected by the
context ID mapper, and should be able to pass messages back and forward
between both sides.

Unfortunately this touches a bit of everything, but the structures are
all still very much in flux.  Hopefully they will start to stabilize at
some point soon...
2015-12-24 00:41:45 +01:00
Harald Welte 90256bad58 Add a context mapper to map RUA ContextIDs <-> SUA Connection IDs 2015-12-23 22:13:53 +01:00
Alexander Huemer f6d0138d76 fix copy/paste mistake in src/Makefile.am 2015-12-23 13:56:23 +01:00