mirror of
https://gitea.osmocom.org/cellular-infrastructure/osmo-smlc.git
synced 2025-11-15 11:22:05 +00:00
Compare commits
13 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5b7f1fd5c8 | ||
|
|
8ec775714c | ||
|
|
ec37263a37 | ||
|
|
44a2a85202 | ||
|
|
ed87bd5c74 | ||
|
|
14c9c7bcd7 | ||
|
|
b36a18f139 | ||
|
|
427fbbd541 | ||
|
|
5dadf0ae6e | ||
|
|
8b6341b02f | ||
|
|
dbf98d5433 | ||
|
|
63ec8a9c59 | ||
|
|
fb2abb8f8c |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -34,6 +34,7 @@ stamp-h1
|
|||||||
libtool
|
libtool
|
||||||
ltmain.sh
|
ltmain.sh
|
||||||
m4/*.m4
|
m4/*.m4
|
||||||
|
*~
|
||||||
|
|
||||||
# git-version-gen magic
|
# git-version-gen magic
|
||||||
.tarball-version
|
.tarball-version
|
||||||
|
|||||||
24
configure.ac
24
configure.ac
@@ -34,17 +34,12 @@ if test "x$PKG_CONFIG_INSTALLED" = "xno"; then
|
|||||||
fi
|
fi
|
||||||
PKG_PROG_PKG_CONFIG([0.20])
|
PKG_PROG_PKG_CONFIG([0.20])
|
||||||
|
|
||||||
dnl check for AX_CHECK_COMPILE_FLAG
|
PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 1.6.0)
|
||||||
m4_ifdef([AX_CHECK_COMPILE_FLAG], [], [
|
PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty >= 1.6.0)
|
||||||
AC_MSG_ERROR([Please install autoconf-archive; re-run 'autoreconf -fi' for it to take effect.])
|
PKG_CHECK_MODULES(LIBOSMOCTRL, libosmoctrl >= 1.6.0)
|
||||||
])
|
PKG_CHECK_MODULES(LIBOSMOGSM, libosmogsm >= 1.6.0)
|
||||||
|
PKG_CHECK_MODULES(LIBOSMOSIGTRAN, libosmo-sigtran >= 1.5.0)
|
||||||
PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 1.3.0)
|
PKG_CHECK_MODULES(LIBOSMOSCCP, libosmo-sccp >= 1.5.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)
|
|
||||||
|
|
||||||
dnl checks for header files
|
dnl checks for header files
|
||||||
AC_HEADER_STDC
|
AC_HEADER_STDC
|
||||||
@@ -92,13 +87,6 @@ AC_COMPILE_IFELSE([AC_LANG_SOURCE([char foo;])],
|
|||||||
CFLAGS="$saved_CFLAGS"
|
CFLAGS="$saved_CFLAGS"
|
||||||
AC_SUBST(SYMBOL_VISIBILITY)
|
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
|
# Coverage build taken from WebKit's configure.in
|
||||||
AC_MSG_CHECKING([whether to enable code coverage support])
|
AC_MSG_CHECKING([whether to enable code coverage support])
|
||||||
AC_ARG_ENABLE(coverage,
|
AC_ARG_ENABLE(coverage,
|
||||||
|
|||||||
@@ -24,19 +24,21 @@ License: AGPL-3.0-or-later
|
|||||||
Group: Hardware/Mobile
|
Group: Hardware/Mobile
|
||||||
URL: https://osmocom.org/projects/osmo-smlc
|
URL: https://osmocom.org/projects/osmo-smlc
|
||||||
Source: %{name}-%{version}.tar.xz
|
Source: %{name}-%{version}.tar.xz
|
||||||
|
BuildRequires: autoconf
|
||||||
|
BuildRequires: autoconf-archive
|
||||||
BuildRequires: automake >= 1.9
|
BuildRequires: automake >= 1.9
|
||||||
BuildRequires: libtool >= 2
|
BuildRequires: libtool >= 2
|
||||||
BuildRequires: pkgconfig >= 0.20
|
BuildRequires: pkgconfig >= 0.20
|
||||||
%if 0%{?suse_version}
|
%if 0%{?suse_version}
|
||||||
BuildRequires: systemd-rpm-macros
|
BuildRequires: systemd-rpm-macros
|
||||||
%endif
|
%endif
|
||||||
BuildRequires: pkgconfig(libosmo-netif) >= 0.6.0
|
BuildRequires: pkgconfig(libosmo-netif) >= 1.1.0
|
||||||
BuildRequires: pkgconfig(libosmo-sccp) >= 0.10.0
|
BuildRequires: pkgconfig(libosmo-sccp) >= 1.5.0
|
||||||
BuildRequires: pkgconfig(libosmo-sigtran) >= 0.10.0
|
BuildRequires: pkgconfig(libosmo-sigtran) >= 1.5.0
|
||||||
BuildRequires: pkgconfig(libosmocore) >= 1.2.0
|
BuildRequires: pkgconfig(libosmocore) >= 1.6.0
|
||||||
BuildRequires: pkgconfig(libosmoctrl) >= 1.2.0
|
BuildRequires: pkgconfig(libosmoctrl) >= 1.6.0
|
||||||
BuildRequires: pkgconfig(libosmogsm) >= 1.2.0
|
BuildRequires: pkgconfig(libosmogsm) >= 1.6.0
|
||||||
BuildRequires: pkgconfig(libosmovty) >= 1.2.0
|
BuildRequires: pkgconfig(libosmovty) >= 1.6.0
|
||||||
BuildRequires: pkgconfig(talloc)
|
BuildRequires: pkgconfig(talloc)
|
||||||
%{?systemd_requires}
|
%{?systemd_requires}
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ Description=Osmocom Serving Mobile Location Center (SMLC)
|
|||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
Type=simple
|
||||||
Restart=always
|
Restart=always
|
||||||
ExecStart=/usr/bin/osmo-smlc -c /etc/osmocom/osmo-smlc.cfg -s
|
ExecStart=/usr/bin/osmo-smlc -c /etc/osmocom/osmo-smlc.cfg
|
||||||
RestartSec=2
|
RestartSec=2
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
|
|||||||
32
debian/changelog
vendored
32
debian/changelog
vendored
@@ -1,3 +1,35 @@
|
|||||||
|
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
|
osmo-smlc (0.0.1) unstable; urgency=medium
|
||||||
|
|
||||||
[ Harald Welte ]
|
[ Harald Welte ]
|
||||||
|
|||||||
9
debian/control
vendored
9
debian/control
vendored
@@ -6,15 +6,16 @@ Build-Depends: debhelper (>=9),
|
|||||||
dh-autoreconf,
|
dh-autoreconf,
|
||||||
autotools-dev,
|
autotools-dev,
|
||||||
autoconf,
|
autoconf,
|
||||||
|
autoconf-archive,
|
||||||
automake,
|
automake,
|
||||||
libtool,
|
libtool,
|
||||||
pkg-config,
|
pkg-config,
|
||||||
libsctp-dev,
|
libsctp-dev,
|
||||||
libtalloc-dev,
|
libtalloc-dev,
|
||||||
libosmocore-dev (>= 1.3.0),
|
libosmocore-dev (>= 1.6.0),
|
||||||
libosmo-sccp-dev (>= 1.1.0),
|
libosmo-sccp-dev (>= 1.5.0),
|
||||||
libosmo-sigtran-dev (>= 1.1.0),
|
libosmo-sigtran-dev (>= 1.5.0),
|
||||||
osmo-gsm-manuals-dev (>= 0.2.0)
|
osmo-gsm-manuals-dev (>= 1.2.0)
|
||||||
Standards-Version: 3.9.8
|
Standards-Version: 3.9.8
|
||||||
Vcs-Git: git://git.osmocom.org/osmo-smlc.git
|
Vcs-Git: git://git.osmocom.org/osmo-smlc.git
|
||||||
Vcs-Browser: https://git.osmocom.org/osmo-smlc/
|
Vcs-Browser: https://git.osmocom.org/osmo-smlc/
|
||||||
|
|||||||
2
debian/osmo-smlc.install
vendored
2
debian/osmo-smlc.install
vendored
@@ -1,4 +1,4 @@
|
|||||||
etc/osmocom/osmo-smlc.cfg
|
etc/osmocom/osmo-smlc.cfg
|
||||||
lib/systemd/system/osmo-smlc.service
|
lib/systemd/system/osmo-smlc.service
|
||||||
usr/bin/osmo-smlc
|
usr/bin/osmo-smlc
|
||||||
usr/share/doc/osmo-msc/examples/osmo-smlc/osmo-smlc.cfg usr/share/doc/osmo-smlc/examples
|
usr/share/doc/osmo-smlc/examples/osmo-smlc/osmo-smlc.cfg usr/share/doc/osmo-smlc/examples
|
||||||
|
|||||||
26
doc/manuals/chapters/cells.adoc
Normal file
26
doc/manuals/chapters/cells.adoc
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
== Configure Cell Locations
|
||||||
|
|
||||||
|
To determine geographic location estimates based on the serving cell, OsmoSMLC
|
||||||
|
needs preconfigured global positions by latitude and longitude, for each cell of
|
||||||
|
each BSC.
|
||||||
|
|
||||||
|
On the `cells` configuration node, cell locations can be indicated by LAC and
|
||||||
|
CI, or by Cell Global Identity. The following example configures the position
|
||||||
|
for a cell by LAC 23 and CI 42:
|
||||||
|
|
||||||
|
----
|
||||||
|
cells
|
||||||
|
lac-ci 23 42 lat 12.3456 lon 23.4567
|
||||||
|
----
|
||||||
|
|
||||||
|
The following example configures the position by a Cell Global Identity with
|
||||||
|
PLMN 001-01, LAC 2 and CI 3:
|
||||||
|
|
||||||
|
----
|
||||||
|
cells
|
||||||
|
cgi 001 01 2 3 lat 34.5678 lon 45.6789
|
||||||
|
----
|
||||||
|
|
||||||
|
If a cell's latitude and longitude is not configured, all location requests for
|
||||||
|
subscribers served by that cell are answered by a BSSMAP-LE Perform Location
|
||||||
|
Response without a Location Estimate and LCS Cause "Facility not supported".
|
||||||
11
doc/manuals/chapters/positioning.adoc
Normal file
11
doc/manuals/chapters/positioning.adoc
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
== Positioning Methods
|
||||||
|
|
||||||
|
So far, OsmoSMLC provides only TA-based positioning.
|
||||||
|
|
||||||
|
=== TA-Based Positioning
|
||||||
|
|
||||||
|
In TA-based positioning, the serving Cell Id and the Timing Advance (a.k.a.
|
||||||
|
Access Delay) are provided by the BSC. OsmoSMLC returns a GAD "ellipsoid point
|
||||||
|
with uncertainty circle" as location estimate. The ellipsoid point is the
|
||||||
|
latitude and longitude of the serving cell, and the uncertainty circle is the
|
||||||
|
maximum distance from that cell based on the Timing Advance information.
|
||||||
@@ -63,10 +63,11 @@ has to configure a distinct point-code. See <<cs7_config>>.
|
|||||||
===== Configure SCCP/M3UA (AoIP)
|
===== Configure SCCP/M3UA (AoIP)
|
||||||
|
|
||||||
OsmoSMLC acts as client to contact an STP instance and establish an SCCP/M3UA
|
OsmoSMLC acts as client to contact an STP instance and establish an SCCP/M3UA
|
||||||
link.
|
link. OsmoSMLC always uses the SSN "SMLC (BSSMAP-LE)" (SSN code 252). The
|
||||||
|
configurable point-code defaults to 0.23.6 (190).
|
||||||
|
|
||||||
An example configuration of OsmoSMLC's Lb SCCP link, assuming the SMLC at
|
An example configuration of OsmoSMLC's Lb SCCP link, assuming the SMLC at
|
||||||
point-code 1.23.6 via an SG listening for M3UA at 127.0.0.1:2905:
|
point-code 1.23.6, listening for M3UA at 127.0.0.1:2905:
|
||||||
|
|
||||||
----
|
----
|
||||||
cs7 instance 0
|
cs7 instance 0
|
||||||
|
|||||||
@@ -18,6 +18,10 @@ include::./common/chapters/logging.adoc[]
|
|||||||
|
|
||||||
include::./common/chapters/cs7-config.adoc[]
|
include::./common/chapters/cs7-config.adoc[]
|
||||||
|
|
||||||
|
include::{srcdir}/chapters/positioning.adoc[]
|
||||||
|
|
||||||
|
include::{srcdir}/chapters/cells.adoc[]
|
||||||
|
|
||||||
include::./common/chapters/counters-overview.adoc[]
|
include::./common/chapters/counters-overview.adoc[]
|
||||||
|
|
||||||
// include::{srcdir}/chapters/counters.adoc[]
|
// include::{srcdir}/chapters/counters.adoc[]
|
||||||
|
|||||||
@@ -17,10 +17,6 @@
|
|||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* 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
|
#pragma once
|
||||||
|
|||||||
@@ -17,10 +17,6 @@
|
|||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* 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
|
#pragma once
|
||||||
|
|
||||||
|
|||||||
@@ -17,10 +17,6 @@
|
|||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* 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>
|
#include <limits.h>
|
||||||
|
|||||||
@@ -186,14 +186,14 @@ static int sccp_lb_sap_down(struct sccp_lb_inst *sli, struct osmo_prim_hdr *oph)
|
|||||||
{
|
{
|
||||||
int rc;
|
int rc;
|
||||||
if (!sli->scu) {
|
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;
|
return -EIO;
|
||||||
}
|
}
|
||||||
rc = osmo_sccp_user_sap_down_nofree(sli->scu, oph);
|
rc = osmo_sccp_user_sap_down_nofree(sli->scu, oph);
|
||||||
if (rc >= 0)
|
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
|
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;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -17,10 +17,6 @@
|
|||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* 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>
|
#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;
|
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) {
|
if (lb_conn->smlc_loc_req) {
|
||||||
/* Another request is already pending. If we send Perform Location Abort, the peer doesn't know which
|
/* 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");
|
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)
|
static void handle_options(int argc, char **argv)
|
||||||
{
|
{
|
||||||
while (1) {
|
while (1) {
|
||||||
@@ -90,7 +115,8 @@ static void handle_options(int argc, char **argv)
|
|||||||
{"config-file", 1, 0, 'c'},
|
{"config-file", 1, 0, 'c'},
|
||||||
{"version", 0, 0, 'V' },
|
{"version", 0, 0, 'V' },
|
||||||
{"log-level", 1, 0, 'e'},
|
{"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}
|
{0, 0, 0, 0}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -105,14 +131,8 @@ static void handle_options(int argc, char **argv)
|
|||||||
print_help();
|
print_help();
|
||||||
exit(0);
|
exit(0);
|
||||||
case 0:
|
case 0:
|
||||||
switch (long_option) {
|
handle_long_options(argv[0], long_option);
|
||||||
case 1:
|
break;
|
||||||
vty_dump_xml_ref(stdout);
|
|
||||||
exit(0);
|
|
||||||
default:
|
|
||||||
fprintf(stderr, "error parsing cmdline options\n");
|
|
||||||
exit(2);
|
|
||||||
}
|
|
||||||
case 'd':
|
case 'd':
|
||||||
log_parse_category_mask(osmo_stderr_target, optarg);
|
log_parse_category_mask(osmo_stderr_target, optarg);
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -140,10 +140,11 @@ int main()
|
|||||||
void *ctx = talloc_named_const(NULL, 0, "smlc_subscr_test");
|
void *ctx = talloc_named_const(NULL, 0, "smlc_subscr_test");
|
||||||
|
|
||||||
osmo_init_logging2(ctx, &log_info);
|
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_print_timestamp(osmo_stderr_target, 0);
|
||||||
log_set_use_color(osmo_stderr_target, 0);
|
log_set_use_color(osmo_stderr_target, 0);
|
||||||
log_set_print_category(osmo_stderr_target, 1);
|
log_set_print_category(osmo_stderr_target, 1);
|
||||||
|
log_set_print_category_hex(osmo_stderr_target, 0);
|
||||||
|
|
||||||
g_smlc = smlc_state_alloc(ctx);
|
g_smlc = smlc_state_alloc(ctx);
|
||||||
|
|
||||||
@@ -154,4 +155,3 @@ int main()
|
|||||||
printf("Done\n");
|
printf("Done\n");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user