mirror of
				https://gitea.osmocom.org/cellular-infrastructure/osmo-smlc.git
				synced 2025-11-03 21:53:35 +00:00 
			
		
		
		
	Compare commits
	
		
			39 Commits
		
	
	
		
			neels/manu
			...
			0.3.0
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					ccfd8e40ea | ||
| 
						 | 
					ebf2429f39 | ||
| 
						 | 
					ddfea86880 | ||
| 
						 | 
					b9e204f3bd | ||
| 
						 | 
					7dbd34a37e | ||
| 
						 | 
					961e96bfd9 | ||
| 
						 | 
					4b739ac260 | ||
| 
						 | 
					f66763e891 | ||
| 
						 | 
					e7535a4a9b | ||
| 
						 | 
					7385427397 | ||
| 
						 | 
					81e12318ae | ||
| 
						 | 
					85f1cca096 | ||
| 
						 | 
					e8c4967639 | ||
| 
						 | 
					d09e87c645 | ||
| 
						 | 
					386d5acdbe | ||
| 
						 | 
					8c11b24ca0 | ||
| 
						 | 
					8bcac6f928 | ||
| 
						 | 
					74b4e61f36 | ||
| 
						 | 
					7118875839 | ||
| 
						 | 
					cf29f44722 | ||
| 
						 | 
					0fda654d29 | ||
| 
						 | 
					848316e9d4 | ||
| 
						 | 
					5ac8ab7cd9 | ||
| 
						 | 
					518550e404 | ||
| 
						 | 
					f2a03654bb | ||
| 
						 | 
					accb1d1b25 | ||
| 
						 | 
					f30a8a1133 | ||
| 
						 | 
					cd82cb23be | ||
| 
						 | 
					bc54ff06f8 | ||
| 
						 | 
					b9b65d953f | ||
| 
						 | 
					454047c586 | ||
| 
						 | 
					5b7f1fd5c8 | ||
| 
						 | 
					8ec775714c | ||
| 
						 | 
					ec37263a37 | ||
| 
						 | 
					44a2a85202 | ||
| 
						 | 
					ed87bd5c74 | ||
| 
						 | 
					14c9c7bcd7 | ||
| 
						 | 
					b36a18f139 | ||
| 
						 | 
					427fbbd541 | 
							
								
								
									
										1
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							@@ -34,6 +34,7 @@ stamp-h1
 | 
			
		||||
libtool
 | 
			
		||||
ltmain.sh
 | 
			
		||||
m4/*.m4
 | 
			
		||||
*~
 | 
			
		||||
 | 
			
		||||
# git-version-gen magic
 | 
			
		||||
.tarball-version
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										4
									
								
								.gitreview
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								.gitreview
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,4 @@
 | 
			
		||||
[gerrit]
 | 
			
		||||
host=gerrit.osmocom.org
 | 
			
		||||
project=osmo-smlc
 | 
			
		||||
 | 
			
		||||
@@ -19,7 +19,7 @@ SUBDIRS = \
 | 
			
		||||
BUILT_SOURCES = $(top_srcdir)/.version
 | 
			
		||||
EXTRA_DIST = \
 | 
			
		||||
	     .version \
 | 
			
		||||
	     contrib/osmo-smlc.spec.in \
 | 
			
		||||
	     README.md \
 | 
			
		||||
	     debian \
 | 
			
		||||
	     git-version-gen \
 | 
			
		||||
	     osmoappdesc.py \
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										69
									
								
								README.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										69
									
								
								README.md
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,69 @@
 | 
			
		||||
osmo-smlc - Osmocom Serving Mobile Location Centre
 | 
			
		||||
==================================================
 | 
			
		||||
 | 
			
		||||
This repository contains a C-language implementation of a minimalistic
 | 
			
		||||
GSM Serving Mobile Location Centre (SMLC) for 2G (GSM).  It is part of the
 | 
			
		||||
[Osmocom](https://osmocom.org/) Open Source Mobile Communications project.
 | 
			
		||||
 | 
			
		||||
OsmoSMLC exposes
 | 
			
		||||
 * 3GPP Lb interface towards the BSC
 | 
			
		||||
 * The Osmocom typical telnet VTY and CTRL interfaces.
 | 
			
		||||
 * The Osmocom typical statsd exporter.
 | 
			
		||||
 | 
			
		||||
OsmoSMLC supports the following location methods:
 | 
			
		||||
 * currently only the Timing Advance based method of determining a mobile station; operator must configure the
 | 
			
		||||
   locations of the cells in the osmo-smlc configuration file
 | 
			
		||||
 | 
			
		||||
Homepage
 | 
			
		||||
--------
 | 
			
		||||
 | 
			
		||||
You can find the OsmoSMLC issue tracker and wiki online at
 | 
			
		||||
<https://osmocom.org/projects/osmo-smlc> and <https://osmocom.org/projects/osmo-smlc/wiki>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
GIT Repository
 | 
			
		||||
--------------
 | 
			
		||||
 | 
			
		||||
You can clone from the official osmo-smlc.git repository using
 | 
			
		||||
 | 
			
		||||
        git clone https://gitea.osmocom.org/cellular-infrastructure/osmo-smlc
 | 
			
		||||
 | 
			
		||||
There is a web interface at <https://gitea.osmocom.org/cellular-infrastructure/osmo-smlc>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Documentation
 | 
			
		||||
-------------
 | 
			
		||||
 | 
			
		||||
User Manuals and VTY reference manuals are [optionally] built in PDF form
 | 
			
		||||
as part of the build process.
 | 
			
		||||
 | 
			
		||||
Pre-rendered PDF version of the current "master" can be found at
 | 
			
		||||
[User Manual](https://ftp.osmocom.org/docs/latest/osmosmlc-usermanual.pdf)
 | 
			
		||||
as well as the [VTY Reference Manual](https://ftp.osmocom.org/docs/latest/osmosmlc-vty-reference.pdf)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Mailing List
 | 
			
		||||
------------
 | 
			
		||||
 | 
			
		||||
Discussions related to osmo-smlc are happening on the
 | 
			
		||||
openbsc@lists.osmocom.org mailing list, please see
 | 
			
		||||
<https://lists.osmocom.org/mailman/listinfo/openbsc> for subscription
 | 
			
		||||
options and the list archive.
 | 
			
		||||
 | 
			
		||||
Please observe the [Osmocom Mailing List
 | 
			
		||||
Rules](https://osmocom.org/projects/cellular-infrastructure/wiki/Mailing_List_Rules)
 | 
			
		||||
when posting.
 | 
			
		||||
 | 
			
		||||
Contributing
 | 
			
		||||
------------
 | 
			
		||||
 | 
			
		||||
Our coding standards are described at
 | 
			
		||||
<https://osmocom.org/projects/cellular-infrastructure/wiki/Coding_standards>
 | 
			
		||||
 | 
			
		||||
We use a Gerrit based patch submission/review process for managing
 | 
			
		||||
contributions.  Please see
 | 
			
		||||
<https://osmocom.org/projects/cellular-infrastructure/wiki/Gerrit> for
 | 
			
		||||
more details
 | 
			
		||||
 | 
			
		||||
The current patch queue for osmo-smlc can be seen at
 | 
			
		||||
<https://gerrit.osmocom.org/#/q/project:osmo-smlc+status:open>
 | 
			
		||||
							
								
								
									
										35
									
								
								configure.ac
									
									
									
									
									
								
							
							
						
						
									
										35
									
								
								configure.ac
									
									
									
									
									
								
							@@ -9,6 +9,8 @@ AC_CONFIG_AUX_DIR([.])
 | 
			
		||||
AM_INIT_AUTOMAKE([dist-bzip2])
 | 
			
		||||
AC_CONFIG_TESTDIR(tests)
 | 
			
		||||
 | 
			
		||||
CFLAGS="$CFLAGS -std=gnu11"
 | 
			
		||||
 | 
			
		||||
dnl kernel style compile messages
 | 
			
		||||
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
 | 
			
		||||
 | 
			
		||||
@@ -34,17 +36,12 @@ if test "x$PKG_CONFIG_INSTALLED" = "xno"; then
 | 
			
		||||
fi
 | 
			
		||||
PKG_PROG_PKG_CONFIG([0.20])
 | 
			
		||||
 | 
			
		||||
dnl check for AX_CHECK_COMPILE_FLAG
 | 
			
		||||
m4_ifdef([AX_CHECK_COMPILE_FLAG], [], [
 | 
			
		||||
	AC_MSG_ERROR([Please install autoconf-archive; re-run 'autoreconf -fi' for it to take effect.])
 | 
			
		||||
	])
 | 
			
		||||
 | 
			
		||||
PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 1.3.0)
 | 
			
		||||
PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty >= 1.3.0)
 | 
			
		||||
PKG_CHECK_MODULES(LIBOSMOCTRL, libosmoctrl >= 1.3.0)
 | 
			
		||||
PKG_CHECK_MODULES(LIBOSMOGSM, libosmogsm >= 1.3.0)
 | 
			
		||||
PKG_CHECK_MODULES(LIBOSMOSIGTRAN, libosmo-sigtran >= 0.10.0)
 | 
			
		||||
PKG_CHECK_MODULES(LIBOSMOSCCP, libosmo-sccp >= 0.10.0)
 | 
			
		||||
PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 1.10.0)
 | 
			
		||||
PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty >= 1.10.0)
 | 
			
		||||
PKG_CHECK_MODULES(LIBOSMOCTRL, libosmoctrl >= 1.10.0)
 | 
			
		||||
PKG_CHECK_MODULES(LIBOSMOGSM, libosmogsm >= 1.10.0)
 | 
			
		||||
PKG_CHECK_MODULES(LIBOSMOSIGTRAN, libosmo-sigtran >= 1.9.0)
 | 
			
		||||
PKG_CHECK_MODULES(LIBOSMOSCCP, libosmo-sccp >= 1.9.0)
 | 
			
		||||
 | 
			
		||||
dnl checks for header files
 | 
			
		||||
AC_HEADER_STDC
 | 
			
		||||
@@ -92,13 +89,6 @@ AC_COMPILE_IFELSE([AC_LANG_SOURCE([char foo;])],
 | 
			
		||||
CFLAGS="$saved_CFLAGS"
 | 
			
		||||
AC_SUBST(SYMBOL_VISIBILITY)
 | 
			
		||||
 | 
			
		||||
AX_CHECK_COMPILE_FLAG([-Werror=implicit], [CFLAGS="$CFLAGS -Werror=implicit"])
 | 
			
		||||
AX_CHECK_COMPILE_FLAG([-Werror=maybe-uninitialized], [CFLAGS="$CFLAGS -Werror=maybe-uninitialized"])
 | 
			
		||||
AX_CHECK_COMPILE_FLAG([-Werror=memset-transposed-args], [CFLAGS="$CFLAGS -Werror=memset-transposed-args"])
 | 
			
		||||
AX_CHECK_COMPILE_FLAG([-Wnull-dereference], [CFLAGS="$CFLAGS -Wnull-dereference"])
 | 
			
		||||
AX_CHECK_COMPILE_FLAG([-Werror=sizeof-array-argument], [CFLAGS="$CFLAGS -Werror=sizeof-array-argument"])
 | 
			
		||||
AX_CHECK_COMPILE_FLAG([-Werror=sizeof-pointer-memaccess], [CFLAGS="$CFLAGS -Werror=sizeof-pointer-memaccess"])
 | 
			
		||||
 | 
			
		||||
# Coverage build taken from WebKit's configure.in
 | 
			
		||||
AC_MSG_CHECKING([whether to enable code coverage support])
 | 
			
		||||
AC_ARG_ENABLE(coverage,
 | 
			
		||||
@@ -127,13 +117,13 @@ AC_ARG_ENABLE([external_tests],
 | 
			
		||||
				[Include the VTY/CTRL tests in make check [default=no]]),
 | 
			
		||||
		[enable_ext_tests="$enableval"],[enable_ext_tests="no"])
 | 
			
		||||
if test "x$enable_ext_tests" = "xyes" ; then
 | 
			
		||||
	AC_CHECK_PROG(PYTHON2_AVAIL,python2,yes)
 | 
			
		||||
	 if test "x$PYTHON2_AVAIL" != "xyes" ; then
 | 
			
		||||
		AC_MSG_ERROR([Please install python2 to run the VTY/CTRL tests.])
 | 
			
		||||
	AC_CHECK_PROG(PYTHON3_AVAIL,python3,yes)
 | 
			
		||||
	 if test "x$PYTHON3_AVAIL" != "xyes" ; then
 | 
			
		||||
		AC_MSG_ERROR([Please install python3 to run the VTY/CTRL tests.])
 | 
			
		||||
	fi
 | 
			
		||||
	AC_CHECK_PROG(OSMOTESTEXT_CHECK,osmotestvty.py,yes)
 | 
			
		||||
	 if test "x$OSMOTESTEXT_CHECK" != "xyes" ; then
 | 
			
		||||
		AC_MSG_ERROR([Please install git://osmocom.org/python/osmo-python-tests to run the VTY/CTRL tests.])
 | 
			
		||||
		AC_MSG_ERROR([Please install https://gitea.osmocom.org/cellular-infrastructure/osmo-python-tests to run the VTY/CTRL tests.])
 | 
			
		||||
	fi
 | 
			
		||||
fi
 | 
			
		||||
AC_MSG_CHECKING([whether to enable VTY/CTRL tests])
 | 
			
		||||
@@ -218,5 +208,4 @@ AC_OUTPUT(
 | 
			
		||||
    doc/manuals/Makefile
 | 
			
		||||
    contrib/Makefile
 | 
			
		||||
    contrib/systemd/Makefile
 | 
			
		||||
    contrib/osmo-smlc.spec
 | 
			
		||||
    Makefile)
 | 
			
		||||
 
 | 
			
		||||
@@ -58,12 +58,12 @@ LD_LIBRARY_PATH="$inst/lib" $MAKE check \
 | 
			
		||||
  || cat-testlogs.sh
 | 
			
		||||
LD_LIBRARY_PATH="$inst/lib" \
 | 
			
		||||
  DISTCHECK_CONFIGURE_FLAGS="--enable-vty-tests --enable-external-tests --enable-werror $CONFIG" \
 | 
			
		||||
  $MAKE distcheck \
 | 
			
		||||
  $MAKE $PARALLEL_MAKE distcheck \
 | 
			
		||||
  || cat-testlogs.sh
 | 
			
		||||
 | 
			
		||||
if [ "$WITH_MANUALS" = "1" ] && [ "$PUBLISH" = "1" ]; then
 | 
			
		||||
	make -C "$base/doc/manuals" publish
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
$MAKE maintainer-clean
 | 
			
		||||
$MAKE $PARALLEL_MAKE maintainer-clean
 | 
			
		||||
osmo-clean-workspace.sh
 | 
			
		||||
 
 | 
			
		||||
@@ -1,90 +0,0 @@
 | 
			
		||||
#
 | 
			
		||||
# spec file for package osmo-smlc
 | 
			
		||||
#
 | 
			
		||||
# Copyright (c) 2017, Martin Hauke <mardnh@gmx.de>
 | 
			
		||||
#
 | 
			
		||||
# All modifications and additions to the file contributed by third parties
 | 
			
		||||
# remain the property of their copyright owners, unless otherwise agreed
 | 
			
		||||
# upon. The license for this file, and modifications and additions to the
 | 
			
		||||
# file, is the same license as for the pristine package itself (unless the
 | 
			
		||||
# license for the pristine package is not an Open Source License, in which
 | 
			
		||||
# case the license is the MIT License). An "Open Source License" is a
 | 
			
		||||
# license that conforms to the Open Source Definition (Version 1.9)
 | 
			
		||||
# published by the Open Source Initiative.
 | 
			
		||||
 | 
			
		||||
## Disable LTO for now since it breaks compilation of the tests
 | 
			
		||||
## https://osmocom.org/issues/4113
 | 
			
		||||
%define _lto_cflags %{nil}
 | 
			
		||||
 | 
			
		||||
Name:           osmo-smlc
 | 
			
		||||
Version:        @VERSION@
 | 
			
		||||
Release:        0
 | 
			
		||||
Summary:        OsmoSMLC: Osmocom's Location Service Center
 | 
			
		||||
License:        AGPL-3.0-or-later
 | 
			
		||||
Group:          Hardware/Mobile
 | 
			
		||||
URL:            https://osmocom.org/projects/osmo-smlc
 | 
			
		||||
Source:         %{name}-%{version}.tar.xz
 | 
			
		||||
BuildRequires:  autoconf
 | 
			
		||||
BuildRequires:  autoconf-archive
 | 
			
		||||
BuildRequires:  automake >= 1.9
 | 
			
		||||
BuildRequires:  libtool >= 2
 | 
			
		||||
BuildRequires:  pkgconfig >= 0.20
 | 
			
		||||
%if 0%{?suse_version}
 | 
			
		||||
BuildRequires:  systemd-rpm-macros
 | 
			
		||||
%endif
 | 
			
		||||
BuildRequires:  pkgconfig(libosmo-netif) >= 0.6.0
 | 
			
		||||
BuildRequires:  pkgconfig(libosmo-sccp) >= 0.10.0
 | 
			
		||||
BuildRequires:  pkgconfig(libosmo-sigtran) >= 0.10.0
 | 
			
		||||
BuildRequires:  pkgconfig(libosmocore) >= 1.2.0
 | 
			
		||||
BuildRequires:  pkgconfig(libosmoctrl) >= 1.2.0
 | 
			
		||||
BuildRequires:  pkgconfig(libosmogsm) >= 1.2.0
 | 
			
		||||
BuildRequires:  pkgconfig(libosmovty) >= 1.2.0
 | 
			
		||||
BuildRequires:  pkgconfig(talloc)
 | 
			
		||||
%{?systemd_requires}
 | 
			
		||||
 | 
			
		||||
%description
 | 
			
		||||
OsmoBSC: Osmocom's Base Station Controller for 2G circuit-switched mobile networks.
 | 
			
		||||
 | 
			
		||||
%prep
 | 
			
		||||
%setup -q
 | 
			
		||||
 | 
			
		||||
%build
 | 
			
		||||
echo "%{version}" >.tarball-version
 | 
			
		||||
autoreconf -fi
 | 
			
		||||
%configure \
 | 
			
		||||
  --docdir=%{_docdir}/%{name} \
 | 
			
		||||
  --with-systemdsystemunitdir=%{_unitdir}
 | 
			
		||||
make %{?_smp_mflags}
 | 
			
		||||
 | 
			
		||||
%install
 | 
			
		||||
%make_install
 | 
			
		||||
 | 
			
		||||
%if 0%{?suse_version}
 | 
			
		||||
%preun
 | 
			
		||||
%service_del_preun %{name}.service
 | 
			
		||||
 | 
			
		||||
%postun
 | 
			
		||||
%service_del_postun %{name}.service
 | 
			
		||||
 | 
			
		||||
%pre
 | 
			
		||||
%service_add_pre %{name}.service
 | 
			
		||||
 | 
			
		||||
%post
 | 
			
		||||
%service_add_post %{name}.service
 | 
			
		||||
%endif
 | 
			
		||||
 | 
			
		||||
%check
 | 
			
		||||
make %{?_smp_mflags} check || (find . -name testsuite.log -exec cat {} +)
 | 
			
		||||
 | 
			
		||||
%files
 | 
			
		||||
%license COPYING
 | 
			
		||||
%doc AUTHORS README
 | 
			
		||||
%{_bindir}/osmo-smlc
 | 
			
		||||
%dir %{_docdir}/%{name}/examples
 | 
			
		||||
%dir %{_docdir}/%{name}/examples/osmo-smlc
 | 
			
		||||
%{_docdir}/%{name}/examples/osmo-smlc/osmo-smlc.cfg
 | 
			
		||||
%dir %{_sysconfdir}/osmocom
 | 
			
		||||
%config(noreplace) %{_sysconfdir}/osmocom/osmo-smlc.cfg
 | 
			
		||||
%{_unitdir}/%{name}.service
 | 
			
		||||
 | 
			
		||||
%changelog
 | 
			
		||||
@@ -1,9 +1,15 @@
 | 
			
		||||
[Unit]
 | 
			
		||||
Description=Osmocom Serving Mobile Location Center (SMLC)
 | 
			
		||||
After=network-online.target
 | 
			
		||||
Wants=network-online.target
 | 
			
		||||
 | 
			
		||||
[Service]
 | 
			
		||||
Type=simple
 | 
			
		||||
Restart=always
 | 
			
		||||
StateDirectory=osmocom
 | 
			
		||||
WorkingDirectory=%S/osmocom
 | 
			
		||||
User=osmocom
 | 
			
		||||
Group=osmocom
 | 
			
		||||
ExecStart=/usr/bin/osmo-smlc -c /etc/osmocom/osmo-smlc.cfg
 | 
			
		||||
RestartSec=2
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										106
									
								
								debian/changelog
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										106
									
								
								debian/changelog
									
									
									
									
										vendored
									
									
								
							@@ -1,3 +1,109 @@
 | 
			
		||||
osmo-smlc (0.3.0) unstable; urgency=medium
 | 
			
		||||
 | 
			
		||||
  [ Andreas Eversberg ]
 | 
			
		||||
  * Use uniform log format for default config files
 | 
			
		||||
 | 
			
		||||
  [ Vadim Yanitskiy ]
 | 
			
		||||
  * build: include README.md into the release tarball
 | 
			
		||||
  * README.md: cosmetic: fix a typo
 | 
			
		||||
 | 
			
		||||
  [ Max ]
 | 
			
		||||
  * .deb/.rpm: add osmocom user during package install
 | 
			
		||||
 | 
			
		||||
  [ Oliver Smith ]
 | 
			
		||||
  * .deb/.rpm: various fixes related to non-root
 | 
			
		||||
  * contrib: remove rpm spec file
 | 
			
		||||
  * debian/postinst: add checks, be verbose
 | 
			
		||||
 | 
			
		||||
 -- Oliver Smith <osmith@sysmocom.de>  Thu, 25 Jul 2024 09:49:50 +0200
 | 
			
		||||
 | 
			
		||||
osmo-smlc (0.2.4) unstable; urgency=medium
 | 
			
		||||
 | 
			
		||||
  [ arehbein ]
 | 
			
		||||
  * Transition to use of 'telnet_init_default'
 | 
			
		||||
 | 
			
		||||
  [ Vadim Yanitskiy ]
 | 
			
		||||
  * configure.ac: set -std=gnu11
 | 
			
		||||
  * Makefile.am: remove $(COVERAGE_LDFLAGS) from osmo_smlc_LDADD
 | 
			
		||||
  * Makefile.am: remove unneeded AM_LDFLAGS with LIBS
 | 
			
		||||
  * tests: $(BUILT_SOURCES) is not defined, depend on osmo-smlc
 | 
			
		||||
  * tests: execute osmotest{vty,config}.py against osmo-smlc
 | 
			
		||||
  * copyright: fix typo: sysmocom s/s.m.f.c./s.f.m.c./ GmbH
 | 
			
		||||
  * configure.ac: migrate from python2 to python3
 | 
			
		||||
 | 
			
		||||
  [ Oliver Smith ]
 | 
			
		||||
  * debian: set compat level to 10
 | 
			
		||||
  * systemd: depend on networking-online.target
 | 
			
		||||
 | 
			
		||||
  [ Neels Janosch Hofmeyr ]
 | 
			
		||||
  * ctrl-test: drop bogus 'rm -f $(CTRL_TEST_DB)'
 | 
			
		||||
 | 
			
		||||
  [ Pau Espin Pedrol ]
 | 
			
		||||
  * Write explicit role & sctp-role fields in ASP configurations
 | 
			
		||||
 | 
			
		||||
 -- Pau Espin Pedrol <pespin@sysmocom.de>  Tue, 12 Sep 2023 17:14:41 +0200
 | 
			
		||||
 | 
			
		||||
osmo-smlc (0.2.3) unstable; urgency=medium
 | 
			
		||||
 | 
			
		||||
  [ Vadim Yanitskiy ]
 | 
			
		||||
  * contrib/jenkins.sh: execute distcheck/maintainer-clean with $PARALLEL_MAKE
 | 
			
		||||
 | 
			
		||||
  [ Max ]
 | 
			
		||||
  * Add git-review config
 | 
			
		||||
  * Set working directory in systemd service file
 | 
			
		||||
  * ctrl: take both address and port from vty config
 | 
			
		||||
 | 
			
		||||
 -- Pau Espin Pedrol <pespin@sysmocom.de>  Tue, 07 Feb 2023 17:42:00 +0100
 | 
			
		||||
 | 
			
		||||
osmo-smlc (0.2.2) unstable; urgency=medium
 | 
			
		||||
 | 
			
		||||
  [ Oliver Smith ]
 | 
			
		||||
  * treewide: remove FSF address
 | 
			
		||||
 | 
			
		||||
  [ Pau Espin Pedrol ]
 | 
			
		||||
  * deb/rpm packaging: Drop dependency on autoconf-archive
 | 
			
		||||
 | 
			
		||||
  [ Vadim Yanitskiy ]
 | 
			
		||||
  * tests: use 'check_PROGRAMS' instead of 'noinst_PROGRAMS'
 | 
			
		||||
 | 
			
		||||
  [ Harald Welte ]
 | 
			
		||||
  * update git URLs (git -> https; gitea)
 | 
			
		||||
  * Fill README with content; convert to markdown
 | 
			
		||||
 | 
			
		||||
 -- Pau Espin Pedrol <pespin@sysmocom.de>  Wed, 29 Jun 2022 12:21:06 +0200
 | 
			
		||||
 | 
			
		||||
osmo-smlc (0.2.1) unstable; urgency=medium
 | 
			
		||||
 | 
			
		||||
  [ Pau Espin Pedrol ]
 | 
			
		||||
  * Use new stat item/ctr getter APIs
 | 
			
		||||
 | 
			
		||||
  [ Oliver Smith ]
 | 
			
		||||
  * configure: don't turn some warnings into errors
 | 
			
		||||
 | 
			
		||||
 -- Pau Espin Pedrol <pespin@sysmocom.de>  Tue, 16 Nov 2021 18:14:21 +0100
 | 
			
		||||
 | 
			
		||||
osmo-smlc (0.2.0) unstable; urgency=medium
 | 
			
		||||
 | 
			
		||||
  [ Harald Welte ]
 | 
			
		||||
  * contrib/jenkins.sh: Build libosmo-abis, a dependency of libosmo-netif
 | 
			
		||||
  * fix build of usermanual
 | 
			
		||||
  * update vty reference XML
 | 
			
		||||
  * debian/spec: Add build depedency to autoconf-archive
 | 
			
		||||
  * debian: the osmo-smlc example is not in the osmo-msc directory
 | 
			
		||||
  * osmo-smlc.spec.in:  Add dependency to autoconf-archive
 | 
			
		||||
  * fix osmo-smlc.service: drop unknown '-s' command line argument
 | 
			
		||||
 | 
			
		||||
  [ Neels Hofmeyr ]
 | 
			
		||||
  * initial working osmo-smlc implementation
 | 
			
		||||
  * manual: describe TA-based positioning and cell locations
 | 
			
		||||
 | 
			
		||||
  [ Pau Espin Pedrol ]
 | 
			
		||||
  * gitignore: Ignore autofoo files *~
 | 
			
		||||
  * main: Support setting cmdline --vty-ref-mode
 | 
			
		||||
  * smlc_subscr_test: Replace use of deprecated log_set_print_filename() API
 | 
			
		||||
 | 
			
		||||
 -- Pau Espin Pedrol <pespin@sysmocom.de>  Wed, 24 Feb 2021 14:30:56 +0100
 | 
			
		||||
 | 
			
		||||
osmo-smlc (0.0.1) unstable; urgency=medium
 | 
			
		||||
 | 
			
		||||
  [ Harald Welte ]
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										2
									
								
								debian/compat
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								debian/compat
									
									
									
									
										vendored
									
									
								
							@@ -1 +1 @@
 | 
			
		||||
9
 | 
			
		||||
10
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										15
									
								
								debian/control
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										15
									
								
								debian/control
									
									
									
									
										vendored
									
									
								
							@@ -2,23 +2,22 @@ Source: osmo-smlc
 | 
			
		||||
Section: net
 | 
			
		||||
Priority: extra
 | 
			
		||||
Maintainer: Osmocom team <openbsc@lists.osmocom.org>
 | 
			
		||||
Build-Depends: debhelper (>=9),
 | 
			
		||||
Build-Depends: debhelper (>= 10),
 | 
			
		||||
               dh-autoreconf,
 | 
			
		||||
               autotools-dev,
 | 
			
		||||
               autoconf,
 | 
			
		||||
               autoconf-archive,
 | 
			
		||||
               automake,
 | 
			
		||||
               libtool,
 | 
			
		||||
               pkg-config,
 | 
			
		||||
               libsctp-dev,
 | 
			
		||||
               libtalloc-dev,
 | 
			
		||||
               libosmocore-dev (>= 1.3.0),
 | 
			
		||||
               libosmo-sccp-dev (>= 1.1.0),
 | 
			
		||||
               libosmo-sigtran-dev (>= 1.1.0),
 | 
			
		||||
               osmo-gsm-manuals-dev (>= 0.2.0)
 | 
			
		||||
               libosmocore-dev (>= 1.10.0),
 | 
			
		||||
               libosmo-sccp-dev (>= 1.9.0),
 | 
			
		||||
               libosmo-sigtran-dev (>= 1.9.0),
 | 
			
		||||
               osmo-gsm-manuals-dev (>= 1.6.0)
 | 
			
		||||
Standards-Version: 3.9.8
 | 
			
		||||
Vcs-Git: git://git.osmocom.org/osmo-smlc.git
 | 
			
		||||
Vcs-Browser: https://git.osmocom.org/osmo-smlc/
 | 
			
		||||
Vcs-Git: https://gitea.osmocom.org/cellular-infrastructure/osmo-smlc
 | 
			
		||||
Vcs-Browser: https://gitea.osmocom.org/cellular-infrastructure/osmo-smlc
 | 
			
		||||
Homepage: https://osmocom.org/projects/osmo-smlc
 | 
			
		||||
 | 
			
		||||
Package: osmo-smlc
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										2
									
								
								debian/copyright
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								debian/copyright
									
									
									
									
										vendored
									
									
								
							@@ -1,6 +1,6 @@
 | 
			
		||||
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
 | 
			
		||||
Upstream-Name: osmo-smlc
 | 
			
		||||
Source: git://git.osmocom.org/osmo-smlc
 | 
			
		||||
Source: https://gitea.osmocom.org/cellular-infrastructure/osmo-smlc
 | 
			
		||||
 | 
			
		||||
Files:     *
 | 
			
		||||
Copyright: 2020 Harald Welte <laforge@osmocom.org>
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										38
									
								
								debian/postinst
									
									
									
									
										vendored
									
									
										Executable file
									
								
							
							
						
						
									
										38
									
								
								debian/postinst
									
									
									
									
										vendored
									
									
										Executable file
									
								
							@@ -0,0 +1,38 @@
 | 
			
		||||
#!/bin/sh -e
 | 
			
		||||
case "$1" in
 | 
			
		||||
	configure)
 | 
			
		||||
		# Create the osmocom group and user (if it doesn't exist yet)
 | 
			
		||||
		if ! getent group osmocom >/dev/null; then
 | 
			
		||||
			groupadd --system osmocom
 | 
			
		||||
		fi
 | 
			
		||||
		if ! getent passwd osmocom >/dev/null; then
 | 
			
		||||
			useradd \
 | 
			
		||||
				--system \
 | 
			
		||||
				--gid osmocom \
 | 
			
		||||
				--home-dir /var/lib/osmocom \
 | 
			
		||||
				--shell /sbin/nologin \
 | 
			
		||||
				--comment "Open Source Mobile Communications" \
 | 
			
		||||
				osmocom
 | 
			
		||||
		fi
 | 
			
		||||
 | 
			
		||||
		# Fix permissions of previous (root-owned) install (OS#4107)
 | 
			
		||||
		if dpkg --compare-versions "$2" le "0.3.0"; then
 | 
			
		||||
			if [ -e /etc/osmocom/osmo-smlc.cfg ]; then
 | 
			
		||||
				chown -v osmocom:osmocom /etc/osmocom/osmo-smlc.cfg
 | 
			
		||||
				chmod -v 0660 /etc/osmocom/osmo-smlc.cfg
 | 
			
		||||
			fi
 | 
			
		||||
 | 
			
		||||
			if [ -d /etc/osmocom ]; then
 | 
			
		||||
				chown -v root:osmocom /etc/osmocom
 | 
			
		||||
				chmod -v 2775 /etc/osmocom
 | 
			
		||||
			fi
 | 
			
		||||
 | 
			
		||||
			mkdir -p /var/lib/osmocom
 | 
			
		||||
			chown -R -v osmocom:osmocom /var/lib/osmocom
 | 
			
		||||
		fi
 | 
			
		||||
		;;
 | 
			
		||||
esac
 | 
			
		||||
 | 
			
		||||
# dh_installdeb(1) will replace this with shell code automatically
 | 
			
		||||
# generated by other debhelper scripts.
 | 
			
		||||
#DEBHELPER#
 | 
			
		||||
@@ -1,3 +1,11 @@
 | 
			
		||||
log stderr
 | 
			
		||||
 logging color 1
 | 
			
		||||
 logging print category-hex 0
 | 
			
		||||
 logging print category 1
 | 
			
		||||
 logging timestamp 0
 | 
			
		||||
 logging print file basename last
 | 
			
		||||
 logging print level 1
 | 
			
		||||
 | 
			
		||||
cells
 | 
			
		||||
 lac-ci 23 42 lat 12.34567 lon 34.56789
 | 
			
		||||
 cgi 262 42 17 5 lat 12.34765 lon 34.56987
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,3 @@
 | 
			
		||||
[[cell-locations]]
 | 
			
		||||
== Configure Cell Locations
 | 
			
		||||
 | 
			
		||||
To determine geographic location estimates based on the serving cell, OsmoSMLC
 | 
			
		||||
 
 | 
			
		||||
@@ -8,47 +8,3 @@ aspects of configuring and running the OsmoSMLC.
 | 
			
		||||
=== About OsmoSMLC
 | 
			
		||||
 | 
			
		||||
OsmoSMLC is the Osmocom implementation of a Serving Mobile Location Center.
 | 
			
		||||
 | 
			
		||||
A Perform Location Request is initiated by the MSC via BSSMAP on the
 | 
			
		||||
A-interface, for a specific subscriber. The request is typically passed on via
 | 
			
		||||
BSSMAP-LE on the Lb-interface to the SMLC. If required, the SMLC may request the
 | 
			
		||||
subscriber's Timing Advance (a.k.a. Access Delay) from the BSC via BSSLAP
 | 
			
		||||
(encapsulated BSSLAP APDU in a BSSMAP-LE Connection Oriented Information
 | 
			
		||||
message). The SMLC may combine several location and velocity estimate methods to
 | 
			
		||||
form a GAD PDU containing the resulting geographic location information.
 | 
			
		||||
 | 
			
		||||
So far, OsmoSMLC implements only Timing Advance based positioning. In TA-based
 | 
			
		||||
positioning, the Timing-Advance information received from the BSC is combined
 | 
			
		||||
with the preconfigured latitude and longitude of the serving cell to form a
 | 
			
		||||
location estimate. This is returned to the BSC via the Lb-interface, and in
 | 
			
		||||
turn to the MSC via the A-interface.
 | 
			
		||||
 | 
			
		||||
Location Services (LCS) are described in 3GPP TS 43.059 <<3gpp-ts-43-059>>.
 | 
			
		||||
Messages for LCS on the A-interface (BSSMAP, between BSC and MSC) are described
 | 
			
		||||
in 3GPP TS 48.008 <<3gpp-ts-48-008>>, on the Lb-interface (BSSMAP-LE between BSC
 | 
			
		||||
and SMLC) in 3GPP TS 49.031 <<3gpp-ts-49-031>>. The resulting geographic
 | 
			
		||||
location and possibly velocity information is encoded in GAD, described in 3GPP
 | 
			
		||||
TS 23.032 <<3gpp-ts-23-032>>.
 | 
			
		||||
 | 
			
		||||
== Lb Interface
 | 
			
		||||
 | 
			
		||||
The Lb interface connects BSC to SMLC and consists of BSSMAP-LE/SCCP/M3UA. It
 | 
			
		||||
is routed via an STP instance, as is typical for SCCP. The BSSMAP-LE messages
 | 
			
		||||
may encapsulate BSSLAP and GAD PDUs.
 | 
			
		||||
 | 
			
		||||
OsmoSMLC by default connects to an STP at 127.0.0.1:2905, and registers with
 | 
			
		||||
its own point-code, default is 0.23.6, on SSN "SMLC (BSSMAP-LE)" (SSN code
 | 
			
		||||
252).
 | 
			
		||||
 | 
			
		||||
A BSC on an Lb link typically uses SSN "BSC (BSSMAP-LE)" (SSN code 250). Each
 | 
			
		||||
BSC connecting to the SMLC must have a distinct own point-code. OsmoBSC's own
 | 
			
		||||
default point-code is 0.23.3, but when more than one BSC is in use, BSC point
 | 
			
		||||
codes should be configured explicitly.
 | 
			
		||||
 | 
			
		||||
OsmoSMLC waits for BSC instances to establish Lb interface connections. It does
 | 
			
		||||
not require knowledge of individual BSCs' point-codes (OsmoSMLC does require
 | 
			
		||||
preconfigured cell location information, see <<cell-locations>>).
 | 
			
		||||
 | 
			
		||||
On establishing the Lb link, a BSC should send a BSSMAP-LE RESET; the Lb link
 | 
			
		||||
is usable for per-subscriber connections as soon as OsmoSMLC responds with a
 | 
			
		||||
BSSMAP-LE RESET ACKNOWLEDGE.
 | 
			
		||||
 
 | 
			
		||||
@@ -74,6 +74,7 @@ cs7 instance 0
 | 
			
		||||
 point-code 1.23.6
 | 
			
		||||
 asp asp-clnt-msc-0 2905 0 m3ua
 | 
			
		||||
  remote-ip 127.0.0.1
 | 
			
		||||
  role asp
 | 
			
		||||
  sctp-role client
 | 
			
		||||
----
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -17,10 +17,6 @@
 | 
			
		||||
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | 
			
		||||
 * GNU General Public License for more details.
 | 
			
		||||
 *
 | 
			
		||||
 * You should have received a copy of the GNU General Public License along
 | 
			
		||||
 * with this program; if not, write to the Free Software Foundation, Inc.,
 | 
			
		||||
 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#pragma once
 | 
			
		||||
 
 | 
			
		||||
@@ -17,10 +17,6 @@
 | 
			
		||||
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | 
			
		||||
 * GNU General Public License for more details.
 | 
			
		||||
 *
 | 
			
		||||
 * You should have received a copy of the GNU General Public License along
 | 
			
		||||
 * with this program; if not, write to the Free Software Foundation, Inc.,
 | 
			
		||||
 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
#pragma once
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -14,12 +14,6 @@ AM_CFLAGS = \
 | 
			
		||||
	$(COVERAGE_CFLAGS) \
 | 
			
		||||
	$(NULL)
 | 
			
		||||
 | 
			
		||||
AM_LDFLAGS = \
 | 
			
		||||
	$(LIBOSMOCORE_LIBS) \
 | 
			
		||||
	$(LIBOSMOGSM_LIBS) \
 | 
			
		||||
	$(COVERAGE_LDFLAGS) \
 | 
			
		||||
	$(NULL)
 | 
			
		||||
 | 
			
		||||
SUBDIRS = \
 | 
			
		||||
	osmo-smlc \
 | 
			
		||||
	$(NULL)
 | 
			
		||||
 
 | 
			
		||||
@@ -39,6 +39,5 @@ osmo_smlc_LDADD = \
 | 
			
		||||
	$(LIBOSMOGSM_LIBS) \
 | 
			
		||||
	$(LIBOSMOVTY_LIBS) \
 | 
			
		||||
	$(LIBOSMOCTRL_LIBS) \
 | 
			
		||||
	$(COVERAGE_LDFLAGS) \
 | 
			
		||||
	$(LIBOSMOSIGTRAN_LIBS) \
 | 
			
		||||
	$(NULL)
 | 
			
		||||
 
 | 
			
		||||
@@ -17,10 +17,6 @@
 | 
			
		||||
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | 
			
		||||
 * GNU General Public License for more details.
 | 
			
		||||
 *
 | 
			
		||||
 * You should have received a copy of the GNU General Public License along
 | 
			
		||||
 * with this program; if not, write to the Free Software Foundation, Inc.,
 | 
			
		||||
 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include <limits.h>
 | 
			
		||||
 
 | 
			
		||||
@@ -1,7 +1,7 @@
 | 
			
		||||
/* SMLC Lb connection implementation */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * (C) 2020 by sysmocom s.m.f.c. <info@sysmocom.de>
 | 
			
		||||
 * (C) 2020 by sysmocom s.f.m.c. <info@sysmocom.de>
 | 
			
		||||
 * All Rights Reserved
 | 
			
		||||
 *
 | 
			
		||||
 * Author: Neels Hofmeyr
 | 
			
		||||
 
 | 
			
		||||
@@ -1,5 +1,5 @@
 | 
			
		||||
/*
 | 
			
		||||
 * (C) 2019 by sysmocom - s.m.f.c. GmbH <info@sysmocom.de>
 | 
			
		||||
 * (C) 2019 by sysmocom - s.f.m.c. GmbH <info@sysmocom.de>
 | 
			
		||||
 * All Rights Reserved
 | 
			
		||||
 *
 | 
			
		||||
 * SPDX-License-Identifier: AGPL-3.0+
 | 
			
		||||
 
 | 
			
		||||
@@ -1,5 +1,5 @@
 | 
			
		||||
/*
 | 
			
		||||
 * (C) 2020 by sysmocom - s.m.f.c. GmbH <info@sysmocom.de>
 | 
			
		||||
 * (C) 2020 by sysmocom - s.f.m.c. GmbH <info@sysmocom.de>
 | 
			
		||||
 * All Rights Reserved
 | 
			
		||||
 *
 | 
			
		||||
 * SPDX-License-Identifier: AGPL-3.0+
 | 
			
		||||
@@ -186,14 +186,14 @@ static int sccp_lb_sap_down(struct sccp_lb_inst *sli, struct osmo_prim_hdr *oph)
 | 
			
		||||
{
 | 
			
		||||
	int rc;
 | 
			
		||||
	if (!sli->scu) {
 | 
			
		||||
		rate_ctr_inc(&g_smlc->ctrs->ctr[SMLC_CTR_BSSMAP_LE_TX_ERR_CONN_NOT_READY]);
 | 
			
		||||
		rate_ctr_inc(rate_ctr_group_get_ctr(g_smlc->ctrs, SMLC_CTR_BSSMAP_LE_TX_ERR_CONN_NOT_READY));
 | 
			
		||||
		return -EIO;
 | 
			
		||||
	}
 | 
			
		||||
	rc = osmo_sccp_user_sap_down_nofree(sli->scu, oph);
 | 
			
		||||
	if (rc >= 0)
 | 
			
		||||
		rate_ctr_inc(&g_smlc->ctrs->ctr[SMLC_CTR_BSSMAP_LE_TX_SUCCESS]);
 | 
			
		||||
		rate_ctr_inc(rate_ctr_group_get_ctr(g_smlc->ctrs, SMLC_CTR_BSSMAP_LE_TX_SUCCESS));
 | 
			
		||||
	else
 | 
			
		||||
		rate_ctr_inc(&g_smlc->ctrs->ctr[SMLC_CTR_BSSMAP_LE_TX_ERR_SEND]);
 | 
			
		||||
		rate_ctr_inc(rate_ctr_group_get_ctr(g_smlc->ctrs, SMLC_CTR_BSSMAP_LE_TX_ERR_SEND));
 | 
			
		||||
	return rc;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -17,10 +17,6 @@
 | 
			
		||||
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | 
			
		||||
 * GNU General Public License for more details.
 | 
			
		||||
 *
 | 
			
		||||
 * You should have received a copy of the GNU General Public License along
 | 
			
		||||
 * with this program; if not, write to the Free Software Foundation, Inc.,
 | 
			
		||||
 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include <osmocom/smlc/smlc_data.h>
 | 
			
		||||
@@ -96,7 +92,7 @@ static int smlc_loc_req_start(struct lb_conn *lb_conn, const struct bssmap_le_pe
 | 
			
		||||
{
 | 
			
		||||
	struct smlc_loc_req *smlc_loc_req;
 | 
			
		||||
 | 
			
		||||
	rate_ctr_inc(&g_smlc->ctrs->ctr[SMLC_CTR_BSSMAP_LE_RX_DT1_PERFORM_LOCATION_REQUEST]);
 | 
			
		||||
	rate_ctr_inc(rate_ctr_group_get_ctr(g_smlc->ctrs, SMLC_CTR_BSSMAP_LE_RX_DT1_PERFORM_LOCATION_REQUEST));
 | 
			
		||||
 | 
			
		||||
	if (lb_conn->smlc_loc_req) {
 | 
			
		||||
		/* Another request is already pending. If we send Perform Location Abort, the peer doesn't know which
 | 
			
		||||
 
 | 
			
		||||
@@ -78,6 +78,31 @@ static void print_help()
 | 
			
		||||
	printf("  --vty-ref-xml			Generate the VTY reference XML output and exit.\n");
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void handle_long_options(const char *prog_name, const int long_option)
 | 
			
		||||
{
 | 
			
		||||
	static int vty_ref_mode = VTY_REF_GEN_MODE_DEFAULT;
 | 
			
		||||
 | 
			
		||||
	switch (long_option) {
 | 
			
		||||
	case 1:
 | 
			
		||||
		vty_ref_mode = get_string_value(vty_ref_gen_mode_names, optarg);
 | 
			
		||||
		if (vty_ref_mode < 0) {
 | 
			
		||||
			fprintf(stderr, "%s: Unknown VTY reference generation "
 | 
			
		||||
				"mode '%s'\n", prog_name, optarg);
 | 
			
		||||
			exit(2);
 | 
			
		||||
		}
 | 
			
		||||
		break;
 | 
			
		||||
	case 2:
 | 
			
		||||
		fprintf(stderr, "Generating the VTY reference in mode '%s' (%s)\n",
 | 
			
		||||
			get_value_string(vty_ref_gen_mode_names, vty_ref_mode),
 | 
			
		||||
			get_value_string(vty_ref_gen_mode_desc, vty_ref_mode));
 | 
			
		||||
		vty_dump_xml_ref_mode(stdout, (enum vty_ref_gen_mode) vty_ref_mode);
 | 
			
		||||
		exit(0);
 | 
			
		||||
	default:
 | 
			
		||||
		fprintf(stderr, "%s: error parsing cmdline options\n", prog_name);
 | 
			
		||||
		exit(2);
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void handle_options(int argc, char **argv)
 | 
			
		||||
{
 | 
			
		||||
	while (1) {
 | 
			
		||||
@@ -90,7 +115,8 @@ static void handle_options(int argc, char **argv)
 | 
			
		||||
			{"config-file", 1, 0, 'c'},
 | 
			
		||||
			{"version", 0, 0, 'V' },
 | 
			
		||||
			{"log-level", 1, 0, 'e'},
 | 
			
		||||
			{"vty-ref-xml", 0, &long_option, 1},
 | 
			
		||||
			{"vty-ref-mode", 1, &long_option, 1},
 | 
			
		||||
			{"vty-ref-xml", 0, &long_option, 2},
 | 
			
		||||
			{0, 0, 0, 0}
 | 
			
		||||
		};
 | 
			
		||||
 | 
			
		||||
@@ -105,14 +131,8 @@ static void handle_options(int argc, char **argv)
 | 
			
		||||
			print_help();
 | 
			
		||||
			exit(0);
 | 
			
		||||
		case 0:
 | 
			
		||||
			switch (long_option) {
 | 
			
		||||
			case 1:
 | 
			
		||||
				vty_dump_xml_ref(stdout);
 | 
			
		||||
				exit(0);
 | 
			
		||||
			default:
 | 
			
		||||
				fprintf(stderr, "error parsing cmdline options\n");
 | 
			
		||||
				exit(2);
 | 
			
		||||
			}
 | 
			
		||||
			handle_long_options(argv[0], long_option);
 | 
			
		||||
			break;
 | 
			
		||||
		case 'd':
 | 
			
		||||
			log_parse_category_mask(osmo_stderr_target, optarg);
 | 
			
		||||
			break;
 | 
			
		||||
@@ -242,14 +262,13 @@ int main(int argc, char **argv)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	/* Start telnet interface after reading config for vty_get_bind_addr() */
 | 
			
		||||
	rc = telnet_init_dynif(tall_smlc_ctx, g_smlc, vty_get_bind_addr(), OSMO_VTY_PORT_SMLC);
 | 
			
		||||
	rc = telnet_init_default(tall_smlc_ctx, g_smlc, OSMO_VTY_PORT_SMLC);
 | 
			
		||||
	if (rc < 0)
 | 
			
		||||
		exit(1);
 | 
			
		||||
 | 
			
		||||
	/* start control interface after reading config for
 | 
			
		||||
	 * ctrl_vty_get_bind_addr() */
 | 
			
		||||
	g_smlc->ctrl = ctrl_interface_setup_dynip2(g_smlc, ctrl_vty_get_bind_addr(), OSMO_CTRL_PORT_SMLC,
 | 
			
		||||
						   smlc_ctrl_node_lookup, _LAST_CTRL_NODE_SMLC);
 | 
			
		||||
	g_smlc->ctrl = ctrl_interface_setup2(g_smlc, OSMO_CTRL_PORT_SMLC, smlc_ctrl_node_lookup, _LAST_CTRL_NODE_SMLC);
 | 
			
		||||
	if (!g_smlc->ctrl) {
 | 
			
		||||
		fprintf(stderr, "Failed to init the control interface. Exiting.\n");
 | 
			
		||||
		exit(1);
 | 
			
		||||
 
 | 
			
		||||
@@ -37,11 +37,13 @@ DISTCLEANFILES = \
 | 
			
		||||
	$(NULL)
 | 
			
		||||
 | 
			
		||||
if ENABLE_EXT_TESTS
 | 
			
		||||
python-tests: $(BUILT_SOURCES)
 | 
			
		||||
python-tests: $(top_builddir)/src/osmo-smlc/osmo-smlc
 | 
			
		||||
	$(MAKE) vty-test
 | 
			
		||||
	$(MAKE) ctrl-test
 | 
			
		||||
	osmotestvty.py -p $(abs_top_srcdir) -w $(abs_top_builddir) -v
 | 
			
		||||
	osmotestconfig.py -p $(abs_top_srcdir) -w $(abs_top_builddir) -v
 | 
			
		||||
else
 | 
			
		||||
python-tests: $(BUILT_SOURCES)
 | 
			
		||||
python-tests:
 | 
			
		||||
	echo "Not running python-based tests (determined at configure-time)"
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
@@ -51,7 +53,7 @@ VTY_TEST ?= *.vty
 | 
			
		||||
# To update the VTY script from current application behavior,
 | 
			
		||||
# pass -u to vty_script_runner.py by doing:
 | 
			
		||||
#   make vty-test U=-u
 | 
			
		||||
vty-test:
 | 
			
		||||
vty-test: $(top_builddir)/src/osmo-smlc/osmo-smlc
 | 
			
		||||
	osmo_verify_transcript_vty.py -v \
 | 
			
		||||
		-n OsmoSMLC -p 4271 \
 | 
			
		||||
		-r "$(top_builddir)/src/osmo-smlc/osmo-smlc -c $(top_srcdir)/tests/osmo-smlc.cfg" \
 | 
			
		||||
@@ -60,14 +62,11 @@ vty-test:
 | 
			
		||||
# To update the CTRL script from current application behavior,
 | 
			
		||||
# pass -u to ctrl_script_runner.py by doing:
 | 
			
		||||
#   make ctrl-test U=-u
 | 
			
		||||
ctrl-test:
 | 
			
		||||
	-rm -f $(CTRL_TEST_DB)
 | 
			
		||||
ctrl-test: $(top_builddir)/src/osmo-smlc/osmo-smlc
 | 
			
		||||
	osmo_verify_transcript_ctrl.py -v \
 | 
			
		||||
		-p 4272 \
 | 
			
		||||
		-r "$(top_builddir)/src/osmo-smlc/osmo-smlc -c $(top_srcdir)/tests/osmo-smlc.cfg" \
 | 
			
		||||
		$(U) $(srcdir)/*.ctrl
 | 
			
		||||
	-rm -f $(CTRL_TEST_DB)
 | 
			
		||||
	-rm $(CTRL_TEST_DB)-*
 | 
			
		||||
 | 
			
		||||
check-local: atconfig $(TESTSUITE)
 | 
			
		||||
	$(SHELL) '$(TESTSUITE)' $(TESTSUITEFLAGS)
 | 
			
		||||
 
 | 
			
		||||
@@ -20,7 +20,7 @@ EXTRA_DIST = \
 | 
			
		||||
	smlc_subscr_test.err \
 | 
			
		||||
	$(NULL)
 | 
			
		||||
 | 
			
		||||
noinst_PROGRAMS = \
 | 
			
		||||
check_PROGRAMS = \
 | 
			
		||||
	smlc_subscr_test \
 | 
			
		||||
	$(NULL)
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -140,10 +140,11 @@ int main()
 | 
			
		||||
	void *ctx = talloc_named_const(NULL, 0, "smlc_subscr_test");
 | 
			
		||||
 | 
			
		||||
	osmo_init_logging2(ctx, &log_info);
 | 
			
		||||
	log_set_print_filename(osmo_stderr_target, 0);
 | 
			
		||||
	log_set_print_filename2(osmo_stderr_target, LOG_FILENAME_NONE);
 | 
			
		||||
	log_set_print_timestamp(osmo_stderr_target, 0);
 | 
			
		||||
	log_set_use_color(osmo_stderr_target, 0);
 | 
			
		||||
	log_set_print_category(osmo_stderr_target, 1);
 | 
			
		||||
	log_set_print_category_hex(osmo_stderr_target, 0);
 | 
			
		||||
 | 
			
		||||
	g_smlc = smlc_state_alloc(ctx);
 | 
			
		||||
 | 
			
		||||
@@ -154,4 +155,3 @@ int main()
 | 
			
		||||
	printf("Done\n");
 | 
			
		||||
	return 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user