diff -Nru libosmocore-1.6.0/configure.ac libosmocore-1.7.0/configure.ac --- libosmocore-1.6.0/configure.ac 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/configure.ac 2022-06-28 15:00:51.000000000 +0000 @@ -78,6 +78,24 @@ # check for pthread (PTHREAD_CFLAGS, PTHREAD_LIBS) AX_PTHREAD +AC_MSG_CHECKING(for pthread_getname_np(pthread_t, char*, size_t)) +saved_CFLAGS="$CFLAGS" +saved_LIBS="$LIBS" +CFLAGS="$CFLAGS $PTHREAD_CFLAGS" +LIBS="$LIBS $PTHREAD_LIBS" +AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [#define _GNU_SOURCE + #include ], + [pthread_getname_np(pthread_self(),"example",0)])], + [AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_PTHREAD_GETNAME_NP,1, + [Have function pthread_setname_np(const char*)])], + [AC_MSG_RESULT(no)]) +CFLAGS="$saved_CFLAGS" +LIBS="$saved_LIBS" + + # check for old glibc < 2.17 to get clock_gettime AC_SEARCH_LIBS([clock_gettime], [rt posix4], [AC_DEFINE(HAVE_CLOCK_GETTIME, 1, [Define if clock_gettime is available]) @@ -223,16 +241,22 @@ [ENABLE_LIBSCTP=$enableval], [ENABLE_LIBSCTP="yes"]) AM_CONDITIONAL(ENABLE_LIBSCTP, test x"$ENABLE_LIBSCTP" = x"yes") AS_IF([test "x$ENABLE_LIBSCTP" = "xyes"], [ - old_LIBS=$LIBS - AC_SEARCH_LIBS([sctp_bindx], [sctp], [ - AC_DEFINE(HAVE_LIBSCTP, 1, [Define 1 to enable SCTP support]) - AC_SUBST(HAVE_LIBSCTP, [1]) - if test -n "$ac_lib"; then - AC_SUBST(LIBSCTP_LIBS, [-l$ac_lib]) - fi - ], [ - AC_MSG_ERROR([sctp_bindx not found in searched libs])]) - LIBS=$old_LIBS + AC_DEFINE(HAVE_LIBSCTP, 1, [Define 1 to enable SCTP support]) + # Attempt finding .pc, otherwise set manually (<1.0.17 have no .pc file) + PKG_CHECK_MODULES(LIBSCTP, libsctp, + [AC_SUBST(LIBSCTP_PC, [libsctp])], + [ + AC_MSG_NOTICE([libsctp.pc not found (building against <1.0.17 ?), attempting manual lib lookup]) + old_LIBS=$LIBS + AC_SEARCH_LIBS([sctp_bindx], [sctp], [ + AC_SUBST(HAVE_LIBSCTP, [1]) + if test -n "$ac_lib"; then + AC_SUBST(LIBSCTP_LIBS, [-l$ac_lib]) + fi + ], [ + AC_MSG_ERROR([sctp_bindx not found in searched libs])]) + LIBS=$old_LIBS + ]) ]) AC_ARG_ENABLE([sctp-tests], [AS_HELP_STRING([--disable-sctp-tests], [Do not run socket tests requiring system SCTP support])], @@ -357,7 +381,9 @@ AM_CONDITIONAL(ENABLE_UTILITIES, false) AM_CONDITIONAL(ENABLE_GB, false) AM_CONDITIONAL(ENABLE_GNUTLS, false) + AM_CONDITIONAL(ENABLE_LIBMNL, false) AM_CONDITIONAL(ENABLE_LIBSCTP, false) + AM_CONDITIONAL(ENABLE_LIBUSB, false) AM_CONDITIONAL(ENABLE_PCSC, false) AM_CONDITIONAL(ENABLE_PSEUDOTALLOC, true) AM_CONDITIONAL(ENABLE_SERCOM_STUB, true) @@ -366,6 +392,17 @@ AC_DEFINE([PANIC_INFLOOP],[1],[Use infinite loop on panic rather than fprintf/abort]) fi +AC_ARG_ENABLE(log_macros, + [AS_HELP_STRING( + [--disable-log-macros], + [Disable logging macros that are also used internally to print information] + )], + [log_macros="yes"], [log_macros="no"]) +if test x"$log_macros" == x"yes" +then + AC_DEFINE([LIBOSMOCORE_NO_LOGGING],[1],[Disable logging macros]) +fi + AC_ARG_ENABLE(sanitize, [AS_HELP_STRING( [--enable-sanitize], @@ -404,7 +441,7 @@ AM_PATH_PYTHON AC_CHECK_PROG(OSMOTESTEXT_CHECK,osmo_verify_transcript_vty.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]) @@ -505,6 +542,35 @@ CHECK_BUILTIN_SUPPORT([__builtin_cpu_supports], [Runtime SIMD detection will be disabled]) +dnl There are some members in struct tcp_info that might not exist on all linux versions +AC_CHECK_MEMBER([struct tcp_info.tcpi_notsent_bytes], + AC_DEFINE([HAVE_TCP_INFO_TCPI_NOTSENT_BYTES], + [1], + [Define to 1 if your header file have the tcpi_notsent_bytes member in struct tcp_info]), + [], + [#include ]) + +AC_CHECK_MEMBER([struct tcp_info.tcpi_rwnd_limited], + AC_DEFINE([HAVE_TCP_INFO_TCPI_RWND_LIMITED], + [1], + [Define to 1 if your header file have the tcpi_rwnd_limited member in struct tcp_info]), + [], + [#include ]) + +AC_CHECK_MEMBER([struct tcp_info.tcpi_sndbuf_limited], + AC_DEFINE([HAVE_TCP_INFO_TCPI_SNDBUF_LIMITED], + [1], + [Define to 1 if your header file have the tcpi_sndbuf_limited member in struct tcp_info]), + [], + [#include ]) + +AC_CHECK_MEMBER([struct tcp_info.tcpi_reord_seen], + AC_DEFINE([HAVE_TCP_INFO_TCPI_REORD_SEEN], + [1], + [Define to 1 if your header file have the tcpi_reord_seen member in struct tcp_info]), + [], + [#include ]) + AC_MSG_RESULT([CFLAGS="$CFLAGS"]) AC_MSG_RESULT([CPPFLAGS="$CPPFLAGS"]) diff -Nru libosmocore-1.6.0/contrib/jenkins_amd64.sh libosmocore-1.7.0/contrib/jenkins_amd64.sh --- libosmocore-1.6.0/contrib/jenkins_amd64.sh 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/contrib/jenkins_amd64.sh 2022-06-28 15:00:51.000000000 +0000 @@ -3,19 +3,13 @@ . $(dirname "$0")/jenkins_common.sh -ENABLE_SANITIZE="--enable-sanitize" - -if [ "x$label" = "xFreeBSD_amd64" ]; then - ENABLE_SANITIZE="" -fi - src_dir="$PWD" build() { build_dir="$1" prep_build "$src_dir" "$build_dir" - "$src_dir"/configure --disable-silent-rules --enable-static $ENABLE_SANITIZE --enable-werror \ + "$src_dir"/configure --disable-silent-rules --enable-static --enable-sanitize --enable-werror \ --enable-external-tests run_make diff -Nru libosmocore-1.6.0/contrib/jenkins_common.sh libosmocore-1.7.0/contrib/jenkins_common.sh --- libosmocore-1.6.0/contrib/jenkins_common.sh 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/contrib/jenkins_common.sh 2022-06-28 15:00:51.000000000 +0000 @@ -12,6 +12,37 @@ verify_value_string_arrays_are_terminated.py +# Validate enum fields in header are added to tlv_definition in source file (SYS#5891): + +verify_gsm0808_tlv_definition() { + set +x; + enums=$(grep "GSM0808_IE_" include/osmocom/gsm/protocol/gsm_08_08.h | grep "=" | awk '{ print $1 }') + counted_enums=$(for f in $enums; do printf "%-60s %s\n" "$f" "$(grep -c "\[$f\]" src/gsm/gsm0808.c)"; done) + missing_enums=$(echo "$counted_enums" | grep -v GSM0808_IE_RESERVED | grep "0$" || true) + if [ "x$missing_enums" != "x" ]; then + echo "Missing IEs in src/gsm/gsm0808.c!" + echo "$missing_enums" + exit 1 + fi + set -x; +} +verify_gsm0808_tlv_definition + +verify_gsm_08_05_tlv_definition() { + set +x; + enums=$(grep "RSL_IE_" include/osmocom/gsm/protocol/gsm_08_58.h | grep -e "=" -e ",$" | awk '{ print $1 }' | tr -d ',') + counted_enums=$(for f in $enums; do printf "%-60s %s\n" "$f" "$(grep -c "\[$f\]" src/gsm/rsl.c)"; done) + # TODO: Add RSL_IE_SIEMENS_* to the tlv struct definitions. + missing_enums=$(echo "$counted_enums" | grep -v RSL_IE_SIEMENS |grep "0$" || true) + if [ "x$missing_enums" != "x" ]; then + echo "Missing IEs in src/gsm/rsl.c!" + echo "$missing_enums" + exit 1 + fi + set -x; +} +verify_gsm_08_05_tlv_definition + prep_build() { _src_dir="$1" _build_dir="$2" diff -Nru libosmocore-1.6.0/contrib/libosmocore.spec.in libosmocore-1.7.0/contrib/libosmocore.spec.in --- libosmocore-1.6.0/contrib/libosmocore.spec.in 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/contrib/libosmocore.spec.in 2022-06-28 15:00:51.000000000 +0000 @@ -54,7 +54,8 @@ This package contains a program for frequency calculation for GSM called "osmo-arfcn", and a program called "osmo-auc-gen" that is used -for testing GSM authentication. +for testing GSM authentication, as well as "osmo-config-merge", a tool +for merging Osmocom configuration files. %package -n libosmocodec0 Summary: GSM 06.10, 06.20, 06.60, 06.90 codec library @@ -111,13 +112,13 @@ This subpackage contains libraries and header files for developing applications that want to make use of libosmocoding. -%package -n libosmocore18 +%package -n libosmocore19 Summary: Osmocom core library # crc16.c has GPL2-only clauses, the rest (*.c) is GPL-2.0+ License: GPL-2.0-only AND GPL-2.0-or-later Group: System/Libraries -%description -n libosmocore18 +%description -n libosmocore19 libosmocore is a library with various utility functions shared between OpenBSC and OsmocomBB. @@ -126,8 +127,9 @@ # crc16.h has GPL2-only clauses, the rest (*.h) is GPL-2.0+ License: GPL-2.0-only AND GPL-2.0-or-later Group: Development/Libraries/C and C++ -Requires: libosmocore18 = %version +Requires: libosmocore19 = %version Requires: libtalloc-devel +Requires: lksctp-tools-devel %description -n libosmocore-devel libosmocore is a library with various utility functions shared @@ -163,12 +165,12 @@ This subpackage contains libraries and header files for developing applications that want to make use of libosmoctrl. -%package -n libosmogb12 +%package -n libosmogb14 Summary: Osmocom GPRS Gb Interface (NS/BSSGP) library License: AGPL-3.0-or-later Group: System/Libraries -%description -n libosmogb12 +%description -n libosmogb14 libosmocore is a package with various utility functions that were originally developed as part of the OpenBSC project. @@ -179,7 +181,7 @@ License: AGPL-3.0-or-later Group: Development/Libraries/C and C++ Requires: libosmocore-devel = %version -Requires: libosmogb12 = %version +Requires: libosmogb14 = %version Requires: libosmovty-devel = %version %description -n libosmogb-devel @@ -188,12 +190,12 @@ This subpackage contains libraries and header files for developing applications that want to make use of libosmogb. -%package -n libosmogsm17 +%package -n libosmogsm18 Summary: Osmocom GSM utility library License: GPL-2.0-or-later AND AGPL-3.0-or-later Group: System/Libraries -%description -n libosmogsm17 +%description -n libosmogsm18 libosmocore is a package with various utility functions that were originally developed as part of the OpenBSC project. @@ -208,7 +210,7 @@ License: GPL-2.0-or-later AND AGPL-3.0-or-later Group: Development/Libraries/C and C++ Requires: libosmocore-devel = %version -Requires: libosmogsm17 = %version +Requires: libosmogsm18 = %version %description -n libosmogsm-devel The libosmogsm library in particular is a collection of common code @@ -322,14 +324,14 @@ %postun -n libosmocodec0 -p /sbin/ldconfig %post -n libosmocoding0 -p /sbin/ldconfig %postun -n libosmocoding0 -p /sbin/ldconfig -%post -n libosmocore18 -p /sbin/ldconfig -%postun -n libosmocore18 -p /sbin/ldconfig +%post -n libosmocore19 -p /sbin/ldconfig +%postun -n libosmocore19 -p /sbin/ldconfig %post -n libosmoctrl0 -p /sbin/ldconfig %postun -n libosmoctrl0 -p /sbin/ldconfig -%post -n libosmogb12 -p /sbin/ldconfig -%postun -n libosmogb12 -p /sbin/ldconfig -%post -n libosmogsm17 -p /sbin/ldconfig -%postun -n libosmogsm17 -p /sbin/ldconfig +%post -n libosmogb14 -p /sbin/ldconfig +%postun -n libosmogb14 -p /sbin/ldconfig +%post -n libosmogsm18 -p /sbin/ldconfig +%postun -n libosmogsm18 -p /sbin/ldconfig %post -n libosmosim2 -p /sbin/ldconfig %postun -n libosmosim2 -p /sbin/ldconfig %post -n libosmovty9 -p /sbin/ldconfig @@ -365,9 +367,9 @@ %_libdir/libosmocoding.so %_libdir/pkgconfig/libosmocoding.pc -%files -n libosmocore18 +%files -n libosmocore19 %defattr(-,root,root) -%_libdir/libosmocore.so.18* +%_libdir/libosmocore.so.19* %files -n libosmocore-devel %defattr(-,root,root) @@ -391,9 +393,9 @@ %_libdir/libosmoctrl.so %_libdir/pkgconfig/libosmoctrl.pc -%files -n libosmogb12 +%files -n libosmogb14 %defattr(-,root,root) -%_libdir/libosmogb.so.12* +%_libdir/libosmogb.so.14* %files -n libosmogb-devel %defattr(-,root,root) @@ -403,9 +405,9 @@ %_libdir/libosmogb.so %_libdir/pkgconfig/libosmogb.pc -%files -n libosmogsm17 +%files -n libosmogsm18 %defattr(-,root,root) -%_libdir/libosmogsm.so.17* +%_libdir/libosmogsm.so.18* %files -n libosmogsm-devel %defattr(-,root,root) diff -Nru libosmocore-1.6.0/debian/changelog libosmocore-1.7.0/debian/changelog --- libosmocore-1.6.0/debian/changelog 2022-03-29 22:14:49.000000000 +0000 +++ libosmocore-1.7.0/debian/changelog 2022-10-09 07:16:43.000000000 +0000 @@ -1,8 +1,23 @@ -libosmocore (1.6.0-3build1) jammy; urgency=medium +libosmocore (1.7.0-3) unstable; urgency=medium - * No change rebuild + * upload to unstable - -- Bryce Harrington Tue, 29 Mar 2022 22:14:49 +0000 + -- Thorsten Alteholz Sun, 09 Oct 2022 09:16:43 +0200 + +libosmocore (1.7.0-2) experimental; urgency=medium + + * debian/control: add libsctp-dev as dependency of libosmocore-dev + + -- Thorsten Alteholz Sun, 02 Oct 2022 17:50:00 +0200 + +libosmocore (1.7.0-1) experimental; urgency=medium + + * New upstream release. + * adapt 0003-Setting-library-version-explicitly.patch to + this version + * refresh patches + + -- Thorsten Alteholz Sun, 04 Sep 2022 00:57:00 +0200 libosmocore (1.6.0-3) unstable; urgency=medium diff -Nru libosmocore-1.6.0/debian/control libosmocore-1.7.0/debian/control --- libosmocore-1.6.0/debian/control 2022-03-29 20:38:07.000000000 +0000 +++ libosmocore-1.7.0/debian/control 2022-10-09 07:16:10.000000000 +0000 @@ -1,6 +1,5 @@ Source: libosmocore -Maintainer: Ubuntu Developers -XSBC-Original-Maintainer: Debian Mobcom Maintainers +Maintainer: Debian Mobcom Maintainers Uploaders: Ruben Undheim , Thorsten Alteholz Section: libs @@ -26,9 +25,9 @@ Architecture: any Multi-Arch: same Depends: libosmocodec0 (= ${binary:Version}), - libosmocore18 (= ${binary:Version}), - libosmogb12 (= ${binary:Version}), - libosmogsm17 (= ${binary:Version}), + libosmocore19 (= ${binary:Version}), + libosmogb14 (= ${binary:Version}), + libosmogsm18 (= ${binary:Version}), libosmovty9 (= ${binary:Version}), libosmoctrl0 (= ${binary:Version}), libosmosim2 (= ${binary:Version}), @@ -109,7 +108,7 @@ . This package contains the documentation for the libosmocoding library. -Package: libosmocore18 +Package: libosmocore19 Architecture: any Multi-Arch: same Depends: ${shlibs:Depends}, @@ -129,7 +128,7 @@ Architecture: all Section: doc Depends: ${misc:Depends}, - libosmocore18, + libosmocore19, libjs-jquery, libosmocodec-doc, libosmogsm-doc, @@ -143,7 +142,7 @@ . This package contains the documentation for the libosmocore library. -Package: libosmogb12 +Package: libosmogb14 Architecture: any Multi-Arch: same Depends: ${shlibs:Depends}, @@ -159,7 +158,7 @@ The libosmogb library in particular contains a GPRS BSSGP protocol implementation. -Package: libosmogsm17 +Package: libosmogsm18 Architecture: any Multi-Arch: same Depends: ${shlibs:Depends}, @@ -182,7 +181,7 @@ Architecture: all Section: doc Depends: ${misc:Depends}, - libosmogsm17, + libosmogsm18, libjs-jquery Description: Documentation for the Osmo GSM utility library This is part of the libosmocore "meta"-library. The libosmocore library @@ -274,14 +273,15 @@ Multi-Arch: same Section: libdevel Depends: libosmocodec0 (= ${binary:Version}), - libosmocore18 (= ${binary:Version}), - libosmogb12 (= ${binary:Version}), - libosmogsm17 (= ${binary:Version}), + libosmocore19 (= ${binary:Version}), + libosmogb14 (= ${binary:Version}), + libosmogsm18 (= ${binary:Version}), libosmovty9 (= ${binary:Version}), libosmoctrl0 (= ${binary:Version}), libosmosim2 (= ${binary:Version}), libosmocoding0 (= ${binary:Version}), libtalloc-dev, + libsctp-dev, ${misc:Depends} Description: Development headers for Open Source MObile COMmunications CORE library The header files provided by this package may be used to develop diff -Nru libosmocore-1.6.0/debian/libosmocoding0.symbols libosmocore-1.7.0/debian/libosmocoding0.symbols --- libosmocore-1.6.0/debian/libosmocoding0.symbols 2022-03-13 20:16:43.000000000 +0000 +++ libosmocore-1.7.0/debian/libosmocoding0.symbols 2022-10-09 07:16:10.000000000 +0000 @@ -9,7 +9,9 @@ gsm0503_amr_crc6@LIBOSMOCODING_1.0 0.11.0 gsm0503_amr_dtx_frame_names@LIBOSMOCODING_1.0 1.4.0 gsm0503_cs234_crc16@LIBOSMOCODING_1.0 0.11.0 + gsm0503_detect_afs_dtx_frame2@LIBOSMOCODING_1.0 1.7.0 gsm0503_detect_afs_dtx_frame@LIBOSMOCODING_1.0 1.4.0 + gsm0503_detect_ahs_dtx_frame2@LIBOSMOCODING_1.0 1.7.0 gsm0503_detect_ahs_dtx_frame@LIBOSMOCODING_1.0 1.4.0 gsm0503_fire_crc40@LIBOSMOCODING_1.0 0.11.0 gsm0503_gsm_efr_protected_bits@LIBOSMOCODING_1.0 0.11.0 diff -Nru libosmocore-1.6.0/debian/libosmocore18.install libosmocore-1.7.0/debian/libosmocore18.install --- libosmocore-1.6.0/debian/libosmocore18.install 2022-03-13 20:16:43.000000000 +0000 +++ libosmocore-1.7.0/debian/libosmocore18.install 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -usr/lib/*/libosmocore*.so.* diff -Nru libosmocore-1.6.0/debian/libosmocore18.symbols libosmocore-1.7.0/debian/libosmocore18.symbols --- libosmocore-1.6.0/debian/libosmocore18.symbols 2022-03-13 20:16:43.000000000 +0000 +++ libosmocore-1.7.0/debian/libosmocore18.symbols 1970-01-01 00:00:00.000000000 +0000 @@ -1,520 +0,0 @@ -libosmocore.so.18 libosmocore18 #MINVER# -* Build-Depends-Package: libosmocore-dev - _msgb_eq@Base 1.3.0 - _osmo_fsm_inst_broadcast_children@Base 1.5.1 - _osmo_fsm_inst_dispatch@Base 0.10.2 - _osmo_fsm_inst_state_chg@Base 0.10.2 - _osmo_fsm_inst_state_chg_keep_or_start_timer@Base 1.3.0 - _osmo_fsm_inst_state_chg_keep_or_start_timer_ms@Base 1.3.0 - _osmo_fsm_inst_state_chg_keep_timer@Base 0.12.0 - _osmo_fsm_inst_state_chg_ms@Base 1.3.0 - _osmo_fsm_inst_term@Base 0.10.2 - _osmo_fsm_inst_term_children@Base 0.10.2 - _osmo_it_q_dequeue@Base 1.5.1 - _osmo_it_q_enqueue@Base 1.5.1 - _osmo_strrb_is_bufindex_valid@Base 0.10.2 - _osmo_tdef_fsm_inst_state_chg@Base 1.3.0 - _osmo_use_count_get_put@Base 1.3.0 - assert_loginfo@Base 1.3.0 - bit_value_to_char@Base 0.10.2 - bitvec_add_array@Base 0.10.2 - bitvec_alloc@Base 0.10.2 - bitvec_fill@Base 0.10.2 - bitvec_find_bit_pos@Base 0.10.2 - bitvec_free@Base 0.10.2 - bitvec_get_bit_high@Base 0.10.2 - bitvec_get_bit_pos@Base 0.10.2 - bitvec_get_bit_pos_high@Base 0.10.2 - bitvec_get_bytes@Base 0.10.2 - bitvec_get_int16_msb@Base 0.10.2 - bitvec_get_nth_set_bit@Base 0.10.2 - bitvec_get_uint@Base 0.10.2 - bitvec_pack@Base 0.10.2 - bitvec_read_field@Base 0.10.2 - bitvec_rl@Base 0.10.2 - bitvec_rl_curbit@Base 0.10.2 - bitvec_set_bit@Base 0.10.2 - bitvec_set_bit_pos@Base 0.10.2 - bitvec_set_bits@Base 0.10.2 - bitvec_set_bytes@Base 0.10.2 - bitvec_set_u64@Base 0.10.2 - bitvec_set_uint@Base 0.10.2 - bitvec_shiftl@Base 0.10.2 - bitvec_spare_padding@Base 0.10.2 - bitvec_to_string_r@Base 0.10.2 - bitvec_unhex@Base 0.10.2 - bitvec_unpack@Base 0.10.2 - bitvec_write_field@Base 0.10.2 - bitvec_zero@Base 0.10.2 - chantype_gsmtap2rsl@Base 0.10.2 - chantype_rsl2gsmtap2@Base 1.4.0 - chantype_rsl2gsmtap@Base 0.10.2 - get_string_value@Base 0.10.2 - get_value_string@Base 0.10.2 - get_value_string_or_null@Base 0.10.2 - gsmtap_gsm_channel_names@Base 0.10.2 - gsmtap_makemsg@Base 0.10.2 - gsmtap_makemsg_ex@Base 0.10.2 - gsmtap_send@Base 0.10.2 - gsmtap_send_ex@Base 0.10.2 - gsmtap_sendmsg@Base 0.10.2 - gsmtap_source_add_sink@Base 0.10.2 - gsmtap_source_add_sink_fd@Base 0.10.2 - gsmtap_source_init@Base 0.10.2 - gsmtap_source_init_fd@Base 0.10.2 - gsmtap_type_names@Base 0.10.2 - log_add_target@Base 0.10.2 - log_category_name@Base 0.10.2 - log_check_level@Base 0.10.2 - log_del_target@Base 0.10.2 - log_enable_multithread@Base 1.3.0 - log_fini@Base 0.10.2 - log_init@Base 0.10.2 - log_level_str@Base 0.10.2 - log_parse_category@Base 0.10.2 - log_parse_category_mask@Base 0.10.2 - log_parse_level@Base 0.10.2 - log_reset_context@Base 0.10.2 - log_set_all_filter@Base 0.10.2 - log_set_category_filter@Base 0.10.2 - log_set_context@Base 0.10.2 - log_set_log_level@Base 0.10.2 - log_set_print_category@Base 0.10.2 - log_set_print_category_hex@Base 0.11.0 - log_set_print_extended_timestamp@Base 0.10.2 - log_set_print_filename2@Base 0.11.0 - log_set_print_filename@Base 0.10.2 - log_set_print_filename_pos@Base 1.3.0 - log_set_print_level@Base 0.11.0 - log_set_print_tid@Base 1.5.1 - log_set_print_timestamp@Base 0.10.2 - log_set_use_color@Base 0.10.2 - log_target_create@Base 0.10.2 - log_target_create_file@Base 0.10.2 - log_target_create_file_stream@Base 1.6.0 - log_target_create_gsmtap@Base 0.10.2 - log_target_create_rb@Base 0.10.2 - log_target_create_stderr@Base 0.10.2 - log_target_create_syslog@Base 0.10.2 - log_target_destroy@Base 0.10.2 - log_target_file_reopen@Base 0.10.2 - log_target_file_switch_to_stream@Base 1.6.0 - log_target_file_switch_to_wqueue@Base 1.6.0 - log_target_find@Base 0.10.2 - log_target_rb_avail_size@Base 0.10.2 - log_target_rb_get@Base 0.10.2 - log_target_rb_used_size@Base 0.10.2 - log_targets_reopen@Base 0.10.2 - log_tgt_mutex_lock_impl@Base 1.3.0 - log_tgt_mutex_unlock_impl@Base 1.3.0 - loglevel_strs@Base 1.3.0 - logp2@Base 0.10.2 - logp@Base 0.10.2 - msgb_alloc@Base 0.10.2 - msgb_alloc_c@Base 1.3.0 - msgb_copy@Base 0.10.2 - msgb_copy_c@Base 1.3.0 - msgb_data@Base 0.10.2 - msgb_dequeue@Base 0.10.2 - msgb_enqueue@Base 0.10.2 - msgb_free@Base 0.10.2 - msgb_hexdump@Base 0.10.2 - msgb_hexdump_buf@Base 1.3.0 - msgb_hexdump_c@Base 1.3.0 - msgb_length@Base 0.10.2 - msgb_printf@Base 0.10.2 - msgb_reset@Base 0.10.2 - msgb_resize_area@Base 0.10.2 - msgb_set_talloc_ctx@Base 0.10.2 - msgb_talloc_ctx_init@Base 0.10.2 - osmo_base64_decode@Base 1.6.0 - osmo_base64_encode@Base 1.6.0 - osmo_bcd2char@Base 0.10.2 - osmo_bcd2str@Base 1.3.0 - osmo_bit_reversal@Base 0.10.2 - osmo_char2bcd@Base 0.10.2 - osmo_clock_gettime@Base 0.11.0 - osmo_clock_override_add@Base 0.11.0 - osmo_clock_override_enable@Base 0.11.0 - osmo_clock_override_gettimespec@Base 0.11.0 - osmo_close_all_fds_above@Base 1.3.0 - osmo_config_list_parse@Base 0.10.2 - osmo_constant_time_cmp@Base 0.10.2 - osmo_conv_decode@Base 0.10.2 - osmo_conv_decode_acc@Base 0.10.2 - osmo_conv_decode_deinit@Base 0.10.2 - osmo_conv_decode_flush@Base 0.10.2 - osmo_conv_decode_get_output@Base 0.10.2 - osmo_conv_decode_init@Base 0.10.2 - osmo_conv_decode_reset@Base 0.10.2 - osmo_conv_decode_rewind@Base 0.10.2 - osmo_conv_decode_scan@Base 0.10.2 - osmo_conv_encode@Base 0.10.2 - osmo_conv_encode_flush@Base 0.10.2 - osmo_conv_encode_init@Base 0.10.2 - osmo_conv_encode_load_state@Base 0.10.2 - osmo_conv_encode_raw@Base 0.10.2 - osmo_conv_get_input_length@Base 0.10.2 - osmo_conv_get_output_length@Base 0.10.2 - osmo_conv_metrics_k5_n2@Base 0.10.2 - osmo_conv_metrics_k5_n3@Base 0.10.2 - osmo_conv_metrics_k5_n4@Base 0.10.2 - osmo_conv_metrics_k7_n2@Base 0.10.2 - osmo_conv_metrics_k7_n3@Base 0.10.2 - osmo_conv_metrics_k7_n4@Base 0.10.2 - osmo_counter_alloc@Base 0.10.2 - osmo_counter_difference@Base 0.10.2 - osmo_counter_free@Base 0.10.2 - osmo_counter_get_by_name@Base 0.10.2 - osmo_counters_count@Base 0.11.0 - osmo_counters_for_each@Base 0.10.2 - osmo_crc16@Base 0.10.2 - osmo_crc16_ccitt@Base 0.10.2 - osmo_crc16_ccitt_table@Base 0.10.2 - osmo_crc16_table@Base 0.10.2 - osmo_crc16gen_check_bits@Base 0.10.2 - osmo_crc16gen_compute_bits@Base 0.10.2 - osmo_crc16gen_set_bits@Base 0.10.2 - osmo_crc32gen_check_bits@Base 0.10.2 - osmo_crc32gen_compute_bits@Base 0.10.2 - osmo_crc32gen_set_bits@Base 0.10.2 - osmo_crc64gen_check_bits@Base 0.10.2 - osmo_crc64gen_compute_bits@Base 0.10.2 - osmo_crc64gen_set_bits@Base 0.10.2 - osmo_crc8gen_check_bits@Base 0.10.2 - osmo_crc8gen_compute_bits@Base 0.10.2 - osmo_crc8gen_set_bits@Base 0.10.2 - osmo_ctx@Base 1.3.0 - osmo_ctx_init@Base 1.3.0 - osmo_daemonize@Base 0.10.2 - osmo_decode_big_endian@Base 0.10.2 - osmo_encode_big_endian@Base 0.10.2 - osmo_environment_append@Base 1.3.0 - osmo_environment_filter@Base 1.3.0 - osmo_environment_whitelist@Base 1.3.0 - osmo_escape_cstr_buf@Base 1.3.0 - osmo_escape_cstr_c@Base 1.3.0 - osmo_escape_str@Base 0.11.0 - osmo_escape_str_buf2@Base 1.3.0 - osmo_escape_str_buf@Base 0.11.0 - osmo_escape_str_c@Base 1.3.0 - osmo_event_for_prim@Base 0.10.2 - osmo_fd_close@Base 0.10.2 - osmo_fd_disp_fds@Base 0.10.2 - osmo_fd_fill_fds@Base 0.10.2 - osmo_fd_get_by_fd@Base 0.10.2 - osmo_fd_is_registered@Base 0.10.2 - osmo_fd_register@Base 0.10.2 - osmo_fd_setup@Base 0.10.2 - osmo_fd_unregister@Base 0.10.2 - osmo_fd_update_when@Base 1.5.1 - osmo_float_str_to_int@Base 1.5.1 - osmo_fsm_event_name@Base 0.10.2 - osmo_fsm_find_by_name@Base 0.10.2 - osmo_fsm_inst_alloc@Base 0.10.2 - osmo_fsm_inst_alloc_child@Base 0.10.2 - osmo_fsm_inst_change_parent@Base 0.11.0 - osmo_fsm_inst_find_by_id@Base 0.10.2 - osmo_fsm_inst_find_by_name@Base 0.10.2 - osmo_fsm_inst_free@Base 0.10.2 - osmo_fsm_inst_name@Base 0.10.2 - osmo_fsm_inst_unlink_parent@Base 0.11.0 - osmo_fsm_inst_update_id@Base 0.11.0 - osmo_fsm_inst_update_id_f@Base 0.11.0 - osmo_fsm_inst_update_id_f_sanitize@Base 1.3.0 - osmo_fsm_log_addr@Base 0.10.2 - osmo_fsm_log_timeouts@Base 1.3.0 - osmo_fsm_register@Base 0.10.2 - osmo_fsm_set_dealloc_ctx@Base 1.3.0 - osmo_fsm_state_name@Base 0.10.2 - osmo_fsm_term_cause_names@Base 0.10.2 - osmo_fsm_term_safely@Base 1.3.0 - osmo_fsm_unregister@Base 0.10.2 - osmo_g_fsms@Base 0.10.2 - osmo_generate_backtrace@Base 0.10.2 - osmo_get_macaddr@Base 0.10.2 - osmo_gettid@Base 1.5.1 - osmo_gettimeofday@Base 0.10.2 - osmo_gettimeofday_override@Base 0.10.2 - osmo_gettimeofday_override_add@Base 0.10.2 - osmo_gettimeofday_override_time@Base 0.10.2 - osmo_hexdump@Base 0.10.2 - osmo_hexdump_buf@Base 1.3.0 - osmo_hexdump_c@Base 1.3.0 - osmo_hexdump_nospc@Base 0.10.2 - osmo_hexdump_nospc_c@Base 1.3.0 - osmo_hexparse@Base 0.10.2 - osmo_identifier_sanitize_buf@Base 1.3.0 - osmo_identifier_valid@Base 0.10.2 - osmo_init_ignore_signals@Base 0.10.2 - osmo_init_logging2@Base 0.11.0 - osmo_init_logging@Base 0.10.2 - osmo_int_to_float_str_buf@Base 1.5.1 - osmo_int_to_float_str_c@Base 1.5.1 - osmo_ip_str_type@Base 1.3.0 - osmo_is_hexstr@Base 0.10.2 - osmo_isdnhdlc_decode@Base 0.12.0 - osmo_isdnhdlc_encode@Base 0.12.0 - osmo_isdnhdlc_out_init@Base 0.12.0 - osmo_isdnhdlc_rcv_init@Base 0.12.0 - osmo_isqrt32@Base 0.12.0 - osmo_it_q_alloc@Base 1.5.1 - osmo_it_q_by_name@Base 1.5.1 - osmo_it_q_destroy@Base 1.5.1 - osmo_it_q_flush@Base 1.5.1 - osmo_log_backtrace@Base 0.10.2 - osmo_log_info@Base 0.10.2 - osmo_log_target_list@Base 0.10.2 - osmo_luhn@Base 1.3.0 - osmo_macaddr_parse@Base 0.10.2 - osmo_mnl_destroy@Base 1.5.1 - osmo_mnl_init@Base 1.5.1 - osmo_nibble_shift_left_unal@Base 0.10.2 - osmo_nibble_shift_right@Base 0.10.2 - osmo_osmo_hexdump_nospc@Base 0.10.2 - osmo_panic@Base 0.10.2 - osmo_pbit2ubit@Base 0.10.2 - osmo_pbit2ubit_ext@Base 0.10.2 - osmo_plugin_load_all@Base 0.10.2 - osmo_prbs11@Base 0.10.2 - osmo_prbs15@Base 0.10.2 - osmo_prbs7@Base 0.10.2 - osmo_prbs9@Base 0.10.2 - osmo_prbs_get_ubit@Base 0.10.2 - osmo_prbs_get_ubits@Base 0.10.2 - osmo_prbs_state_init@Base 0.10.2 - osmo_prim_op_names@Base 0.10.2 - osmo_print_n@Base 1.3.0 - osmo_quote_cstr_buf@Base 1.3.0 - osmo_quote_cstr_c@Base 1.3.0 - osmo_quote_str@Base 0.11.0 - osmo_quote_str_buf2@Base 1.3.0 - osmo_quote_str_buf@Base 0.11.0 - osmo_quote_str_c@Base 1.3.0 - osmo_revbytebits_32@Base 0.10.2 - osmo_revbytebits_8@Base 0.10.2 - osmo_revbytebits_buf@Base 0.10.2 - osmo_sbit2ubit@Base 0.10.2 - osmo_select_init@Base 1.3.0 - osmo_select_main@Base 0.10.2 - osmo_select_main_ctx@Base 1.3.0 - osmo_select_shutdown_done@Base 1.6.0 - osmo_select_shutdown_request@Base 1.6.0 - osmo_select_shutdown_requested@Base 1.6.0 - osmo_separated_identifiers_valid@Base 0.11.0 - osmo_sercomm_change_speed@Base 0.10.2 - osmo_sercomm_drv_pull@Base 0.10.2 - osmo_sercomm_drv_rx_char@Base 0.10.2 - osmo_sercomm_init@Base 0.10.2 - osmo_sercomm_initialized@Base 0.10.2 - osmo_sercomm_register_rx_cb@Base 0.10.2 - osmo_sercomm_sendmsg@Base 0.10.2 - osmo_sercomm_tx_queue_depth@Base 0.10.2 - osmo_serial_clear_custom_baudrate@Base 0.10.2 - osmo_serial_init@Base 0.10.2 - osmo_serial_set_baudrate@Base 0.10.2 - osmo_serial_set_custom_baudrate@Base 0.10.2 - osmo_serial_speed_t@Base 1.5.1 - osmo_set_panic_handler@Base 0.10.2 - osmo_signal_dispatch@Base 0.10.2 - osmo_signal_register_handler@Base 0.10.2 - osmo_signal_talloc_ctx_init@Base 1.3.0 - osmo_signal_unregister_handler@Base 0.10.2 - osmo_signalfd_setup@Base 1.4.0 - osmo_sock_get_ip_and_port@Base 1.3.0 - osmo_sock_get_local_ip@Base 1.3.0 - osmo_sock_get_local_ip_port@Base 1.3.0 - osmo_sock_get_name2@Base 1.3.0 - osmo_sock_get_name2_c@Base 1.3.0 - osmo_sock_get_name@Base 0.10.2 - osmo_sock_get_name_buf@Base 1.3.0 - osmo_sock_get_remote_ip@Base 1.3.0 - osmo_sock_get_remote_ip_port@Base 1.3.0 - osmo_sock_init2@Base 0.10.2 - osmo_sock_init2_multiaddr@Base 1.3.0 - osmo_sock_init2_ofd@Base 0.10.2 - osmo_sock_init@Base 0.10.2 - osmo_sock_init_ofd@Base 0.10.2 - osmo_sock_init_osa@Base 1.5.1 - osmo_sock_init_osa_ofd@Base 1.5.1 - osmo_sock_init_sa@Base 0.10.2 - osmo_sock_local_ip@Base 0.10.2 - osmo_sock_mcast_all_set@Base 0.10.2 - osmo_sock_mcast_iface_set@Base 1.4.0 - osmo_sock_mcast_loop_set@Base 0.10.2 - osmo_sock_mcast_subscribe@Base 0.10.2 - osmo_sock_mcast_ttl_set@Base 0.10.2 - osmo_sock_set_dscp@Base 1.6.0 - osmo_sock_set_priority@Base 1.6.0 - osmo_sock_unix_init@Base 0.10.2 - osmo_sock_unix_init_ofd@Base 0.10.2 - osmo_sockaddr_cmp@Base 1.5.1 - osmo_sockaddr_in_to_str_and_uint@Base 1.3.0 - osmo_sockaddr_is_local@Base 0.10.2 - osmo_sockaddr_local_ip@Base 1.5.1 - osmo_sockaddr_ntop@Base 1.5.1 - osmo_sockaddr_port@Base 1.5.1 - osmo_sockaddr_str_cmp@Base 1.3.0 - osmo_sockaddr_str_from_32@Base 1.3.0 - osmo_sockaddr_str_from_32h@Base 1.3.0 - osmo_sockaddr_str_from_32n@Base 1.3.0 - osmo_sockaddr_str_from_in6_addr@Base 1.3.0 - osmo_sockaddr_str_from_in_addr@Base 1.3.0 - osmo_sockaddr_str_from_sockaddr@Base 1.3.0 - osmo_sockaddr_str_from_sockaddr_in6@Base 1.3.0 - osmo_sockaddr_str_from_sockaddr_in@Base 1.3.0 - osmo_sockaddr_str_from_str2@Base 1.5.1 - osmo_sockaddr_str_from_str@Base 1.3.0 - osmo_sockaddr_str_is_nonzero@Base 1.3.0 - osmo_sockaddr_str_is_set@Base 1.3.0 - osmo_sockaddr_str_to_32@Base 1.3.0 - osmo_sockaddr_str_to_32h@Base 1.3.0 - osmo_sockaddr_str_to_32n@Base 1.3.0 - osmo_sockaddr_str_to_in6_addr@Base 1.3.0 - osmo_sockaddr_str_to_in_addr@Base 1.3.0 - osmo_sockaddr_str_to_sockaddr@Base 1.3.0 - osmo_sockaddr_str_to_sockaddr_in6@Base 1.3.0 - osmo_sockaddr_str_to_sockaddr_in@Base 1.3.0 - osmo_sockaddr_to_str@Base 1.5.1 - osmo_sockaddr_to_str_and_uint@Base 0.12.0 - osmo_sockaddr_to_str_buf@Base 1.5.1 - osmo_stat_item_dec@Base 1.3.0 -#MISSING: 1.6.0# osmo_stat_item_discard@Base 0.10.2 -#MISSING: 1.6.0# osmo_stat_item_discard_all@Base 0.10.2 - osmo_stat_item_flush@Base 1.6.0 - osmo_stat_item_for_each_group@Base 0.10.2 - osmo_stat_item_for_each_item@Base 0.10.2 - osmo_stat_item_get_by_name@Base 0.10.2 - osmo_stat_item_get_desc@Base 1.6.0 - osmo_stat_item_get_group_by_name_idx@Base 0.10.2 - osmo_stat_item_get_group_by_name_idxname@Base 1.6.0 - osmo_stat_item_get_last@Base 1.6.0 -#MISSING: 1.6.0# osmo_stat_item_get_next@Base 0.10.2 - osmo_stat_item_group_alloc@Base 0.10.2 - osmo_stat_item_group_free@Base 0.10.2 - osmo_stat_item_group_get_item@Base 1.6.0 - osmo_stat_item_group_reset@Base 1.4.0 - osmo_stat_item_group_set_name@Base 1.6.0 - osmo_stat_item_inc@Base 1.3.0 - osmo_stat_item_init@Base 0.10.2 - osmo_stat_item_reset@Base 1.4.0 - osmo_stat_item_set@Base 0.10.2 - osmo_stats_config@Base 0.10.2 - osmo_stats_init@Base 0.10.2 - osmo_stats_report@Base 0.10.2 - osmo_stats_reporter_alloc@Base 0.10.2 - osmo_stats_reporter_create_log@Base 0.10.2 - osmo_stats_reporter_create_statsd@Base 0.10.2 - osmo_stats_reporter_disable@Base 0.10.2 - osmo_stats_reporter_enable@Base 0.10.2 - osmo_stats_reporter_find@Base 0.10.2 - osmo_stats_reporter_free@Base 0.10.2 - osmo_stats_reporter_list@Base 1.6.0 - osmo_stats_reporter_send@Base 0.10.2 - osmo_stats_reporter_send_buffer@Base 0.10.2 - osmo_stats_reporter_set_flush_period@Base 1.4.0 - osmo_stats_reporter_set_local_addr@Base 0.10.2 - osmo_stats_reporter_set_max_class@Base 0.10.2 - osmo_stats_reporter_set_mtu@Base 0.10.2 - osmo_stats_reporter_set_name_prefix@Base 0.10.2 - osmo_stats_reporter_set_remote_addr@Base 0.10.2 - osmo_stats_reporter_set_remote_port@Base 0.10.2 - osmo_stats_reporter_udp_close@Base 0.10.2 - osmo_stats_reporter_udp_open@Base 0.10.2 - osmo_stats_set_interval@Base 0.10.2 - osmo_stderr_target@Base 0.10.2 - osmo_str2bcd@Base 1.4.0 - osmo_str2lower@Base 0.10.2 - osmo_str2upper@Base 0.10.2 - osmo_str_startswith@Base 1.3.0 - osmo_str_to_int64@Base 1.6.0 - osmo_str_to_int@Base 1.6.0 - osmo_str_tolower@Base 1.3.0 - osmo_str_tolower_buf@Base 1.3.0 - osmo_str_tolower_c@Base 1.3.0 - osmo_str_toupper@Base 1.3.0 - osmo_str_toupper_buf@Base 1.3.0 - osmo_str_toupper_c@Base 1.3.0 - osmo_strlcpy@Base 0.10.2 - osmo_strnchr@Base 1.3.0 - osmo_strrb_add@Base 0.10.2 - osmo_strrb_create@Base 0.10.2 - osmo_strrb_elements@Base 0.10.2 - osmo_strrb_get_nth@Base 0.10.2 - osmo_strrb_is_empty@Base 0.10.2 - osmo_system_nowait2@Base 1.4.0 - osmo_system_nowait@Base 1.3.0 - osmo_t4_encode@Base 0.10.2 - osmo_talloc_replace_string_fmt@Base 1.6.0 - osmo_tdef_get@Base 1.3.0 - osmo_tdef_get_entry@Base 1.3.0 - osmo_tdef_get_state_timeout@Base 1.3.0 - osmo_tdef_range_str_buf@Base 1.3.0 - osmo_tdef_set@Base 1.3.0 - osmo_tdef_unit_names@Base 1.3.0 - osmo_tdef_val_in_range@Base 1.3.0 - osmo_tdefs_reset@Base 1.3.0 - osmo_time_cc_cleanup@Base 1.6.0 - osmo_time_cc_init@Base 1.6.0 - osmo_time_cc_set_flag@Base 1.6.0 - osmo_timer_add@Base 0.10.2 - osmo_timer_del@Base 0.10.2 - osmo_timer_pending@Base 0.10.2 - osmo_timer_remaining@Base 0.10.2 - osmo_timer_schedule@Base 0.10.2 - osmo_timer_setup@Base 0.10.2 - osmo_timerfd_disable@Base 0.12.0 - osmo_timerfd_schedule@Base 0.12.0 - osmo_timerfd_setup@Base 0.12.0 - osmo_timers_check@Base 0.10.2 - osmo_timers_nearest@Base 0.10.2 - osmo_timers_nearest_ms@Base 1.5.1 - osmo_timers_prepare@Base 0.10.2 - osmo_timers_update@Base 0.10.2 - osmo_ubit2pbit@Base 0.10.2 - osmo_ubit2pbit_ext@Base 0.10.2 - osmo_ubit2sbit@Base 0.10.2 - osmo_ubit_dump@Base 0.10.2 - osmo_ubit_dump_buf@Base 1.3.0 - osmo_use_count_by@Base 1.3.0 - osmo_use_count_find@Base 1.3.0 - osmo_use_count_free@Base 1.3.0 - osmo_use_count_make_static_entries@Base 1.3.0 - osmo_use_count_name_buf@Base 1.3.0 - osmo_use_count_to_str_buf@Base 1.5.1 - osmo_use_count_to_str_c@Base 1.5.1 - osmo_use_count_total@Base 1.3.0 - osmo_vlogp@Base 0.10.2 - osmo_wqueue_bfd_cb@Base 0.10.2 - osmo_wqueue_clear@Base 0.10.2 - osmo_wqueue_enqueue@Base 0.10.2 - osmo_wqueue_enqueue_quiet@Base 1.5.1 - osmo_wqueue_init@Base 0.10.2 - rate_ctr_add@Base 0.10.2 - rate_ctr_difference@Base 0.10.2 - rate_ctr_for_each_counter@Base 0.10.2 - rate_ctr_for_each_group@Base 0.10.2 - rate_ctr_get_by_name@Base 0.10.2 - rate_ctr_get_group_by_name_idx@Base 0.10.2 - rate_ctr_group_alloc@Base 0.10.2 - rate_ctr_group_free@Base 0.10.2 - rate_ctr_group_get_ctr@Base 1.6.0 - rate_ctr_group_reset@Base 1.4.0 - rate_ctr_group_set_name@Base 1.6.0 - rate_ctr_init@Base 0.10.2 - rate_ctr_reset@Base 1.4.0 - rb_erase@Base 0.10.2 - rb_first@Base 0.10.2 - rb_insert_color@Base 0.10.2 - rb_last@Base 0.10.2 - rb_next@Base 0.10.2 - rb_prev@Base 0.10.2 - rb_replace_node@Base 0.10.2 - sercomm_drv_baudrate_chg@Base 0.10.2 - sercomm_drv_lock@Base 0.10.2 - sercomm_drv_start_tx@Base 0.10.2 - sercomm_drv_unlock@Base 0.10.2 - tall_ctr_ctx@Base 0.10.2 - tall_log_ctx@Base 1.3.0 - tall_msgb_ctx@Base 0.10.2 - tall_sigh_ctx@Base 0.10.2 diff -Nru libosmocore-1.6.0/debian/libosmocore19.install libosmocore-1.7.0/debian/libosmocore19.install --- libosmocore-1.6.0/debian/libosmocore19.install 1970-01-01 00:00:00.000000000 +0000 +++ libosmocore-1.7.0/debian/libosmocore19.install 2022-10-09 07:16:10.000000000 +0000 @@ -0,0 +1 @@ +usr/lib/*/libosmocore*.so.* diff -Nru libosmocore-1.6.0/debian/libosmocore19.symbols libosmocore-1.7.0/debian/libosmocore19.symbols --- libosmocore-1.6.0/debian/libosmocore19.symbols 1970-01-01 00:00:00.000000000 +0000 +++ libosmocore-1.7.0/debian/libosmocore19.symbols 2022-10-09 07:16:10.000000000 +0000 @@ -0,0 +1,536 @@ +libosmocore.so.19 libosmocore19 #MINVER# +* Build-Depends-Package: libosmocore-dev + _msgb_eq@Base 1.3.0 + _osmo_fsm_inst_broadcast_children@Base 1.5.1 + _osmo_fsm_inst_dispatch@Base 0.10.2 + _osmo_fsm_inst_state_chg@Base 0.10.2 + _osmo_fsm_inst_state_chg_keep_or_start_timer@Base 1.3.0 + _osmo_fsm_inst_state_chg_keep_or_start_timer_ms@Base 1.3.0 + _osmo_fsm_inst_state_chg_keep_timer@Base 0.12.0 + _osmo_fsm_inst_state_chg_ms@Base 1.3.0 + _osmo_fsm_inst_term@Base 0.10.2 + _osmo_fsm_inst_term_children@Base 0.10.2 + _osmo_it_q_dequeue@Base 1.5.1 + _osmo_it_q_enqueue@Base 1.5.1 + _osmo_strrb_is_bufindex_valid@Base 0.10.2 + _osmo_tdef_fsm_inst_state_chg@Base 1.3.0 + _osmo_use_count_get_put@Base 1.3.0 + assert_loginfo@Base 1.3.0 + bit_value_to_char@Base 0.10.2 + bitvec_add_array@Base 0.10.2 + bitvec_alloc@Base 0.10.2 + bitvec_fill@Base 0.10.2 + bitvec_find_bit_pos@Base 0.10.2 + bitvec_free@Base 0.10.2 + bitvec_get_bit_high@Base 0.10.2 + bitvec_get_bit_pos@Base 0.10.2 + bitvec_get_bit_pos_high@Base 0.10.2 + bitvec_get_bytes@Base 0.10.2 + bitvec_get_int16_msb@Base 0.10.2 + bitvec_get_nth_set_bit@Base 0.10.2 + bitvec_get_uint@Base 0.10.2 + bitvec_pack@Base 0.10.2 + bitvec_read_field@Base 0.10.2 + bitvec_rl@Base 0.10.2 + bitvec_rl_curbit@Base 0.10.2 + bitvec_set_bit@Base 0.10.2 + bitvec_set_bit_pos@Base 0.10.2 + bitvec_set_bits@Base 0.10.2 + bitvec_set_bytes@Base 0.10.2 + bitvec_set_u64@Base 0.10.2 + bitvec_set_uint@Base 0.10.2 + bitvec_shiftl@Base 0.10.2 + bitvec_spare_padding@Base 0.10.2 + bitvec_to_string_r@Base 0.10.2 + bitvec_unhex@Base 0.10.2 + bitvec_unpack@Base 0.10.2 + bitvec_write_field@Base 0.10.2 + bitvec_zero@Base 0.10.2 + chantype_gsmtap2rsl@Base 0.10.2 + chantype_rsl2gsmtap2@Base 1.4.0 + chantype_rsl2gsmtap@Base 0.10.2 + get_string_value@Base 0.10.2 + get_value_string@Base 0.10.2 + get_value_string_or_null@Base 0.10.2 + gsmtap_gsm_channel_names@Base 0.10.2 + gsmtap_makemsg@Base 0.10.2 + gsmtap_makemsg_ex@Base 0.10.2 + gsmtap_send@Base 0.10.2 + gsmtap_send_ex@Base 0.10.2 + gsmtap_sendmsg@Base 0.10.2 + gsmtap_sendmsg_free@Base 1.7.0 + gsmtap_source_add_sink@Base 0.10.2 + gsmtap_source_add_sink_fd@Base 0.10.2 + gsmtap_source_free@Base 1.7.0 + gsmtap_source_init@Base 0.10.2 + gsmtap_source_init_fd@Base 0.10.2 + gsmtap_type_names@Base 0.10.2 + log_add_target@Base 0.10.2 + log_category_name@Base 0.10.2 + log_check_level@Base 0.10.2 + log_del_target@Base 0.10.2 + log_enable_multithread@Base 1.3.0 + log_fini@Base 0.10.2 + log_init@Base 0.10.2 + log_level_str@Base 0.10.2 + log_parse_category@Base 0.10.2 + log_parse_category_mask@Base 0.10.2 + log_parse_level@Base 0.10.2 + log_reset_context@Base 0.10.2 + log_set_all_filter@Base 0.10.2 + log_set_category_filter@Base 0.10.2 + log_set_context@Base 0.10.2 + log_set_log_level@Base 0.10.2 + log_set_print_category@Base 0.10.2 + log_set_print_category_hex@Base 0.11.0 + log_set_print_extended_timestamp@Base 0.10.2 + log_set_print_filename2@Base 0.11.0 + log_set_print_filename@Base 0.10.2 + log_set_print_filename_pos@Base 1.3.0 + log_set_print_level@Base 0.11.0 + log_set_print_tid@Base 1.5.1 + log_set_print_timestamp@Base 0.10.2 + log_set_use_color@Base 0.10.2 + log_target_create@Base 0.10.2 + log_target_create_file@Base 0.10.2 + log_target_create_file_stream@Base 1.6.0 + log_target_create_gsmtap@Base 0.10.2 + log_target_create_rb@Base 0.10.2 + log_target_create_stderr@Base 0.10.2 + log_target_create_syslog@Base 0.10.2 + log_target_destroy@Base 0.10.2 + log_target_file_reopen@Base 0.10.2 + log_target_file_switch_to_stream@Base 1.6.0 + log_target_file_switch_to_wqueue@Base 1.6.0 + log_target_find@Base 0.10.2 + log_target_rb_avail_size@Base 0.10.2 + log_target_rb_get@Base 0.10.2 + log_target_rb_used_size@Base 0.10.2 + log_targets_reopen@Base 0.10.2 + log_tgt_mutex_lock_impl@Base 1.3.0 + log_tgt_mutex_unlock_impl@Base 1.3.0 + loglevel_strs@Base 1.3.0 + logp2@Base 0.10.2 + logp@Base 0.10.2 + logp_stub@Base 1.7.0 + msgb_alloc@Base 0.10.2 + msgb_alloc_c@Base 1.3.0 + msgb_copy@Base 0.10.2 + msgb_copy_c@Base 1.3.0 + msgb_data@Base 0.10.2 + msgb_dequeue@Base 0.10.2 + msgb_enqueue@Base 0.10.2 + msgb_free@Base 0.10.2 + msgb_hexdump@Base 0.10.2 + msgb_hexdump_buf@Base 1.3.0 + msgb_hexdump_c@Base 1.3.0 + msgb_length@Base 0.10.2 + msgb_printf@Base 0.10.2 + msgb_reset@Base 0.10.2 + msgb_resize_area@Base 0.10.2 + msgb_set_talloc_ctx@Base 0.10.2 + msgb_talloc_ctx_init@Base 0.10.2 + osmo_base64_decode@Base 1.6.0 + osmo_base64_encode@Base 1.6.0 + osmo_bcd2char@Base 0.10.2 + osmo_bcd2str@Base 1.3.0 + osmo_bit_reversal@Base 0.10.2 + osmo_char2bcd@Base 0.10.2 + osmo_clock_gettime@Base 0.11.0 + osmo_clock_override_add@Base 0.11.0 + osmo_clock_override_enable@Base 0.11.0 + osmo_clock_override_gettimespec@Base 0.11.0 + osmo_close_all_fds_above@Base 1.3.0 + osmo_config_list_parse@Base 0.10.2 + osmo_constant_time_cmp@Base 0.10.2 + osmo_conv_decode@Base 0.10.2 + osmo_conv_decode_acc@Base 0.10.2 + osmo_conv_decode_deinit@Base 0.10.2 + osmo_conv_decode_flush@Base 0.10.2 + osmo_conv_decode_get_best_end_state@Base 1.7.0 + osmo_conv_decode_get_output@Base 0.10.2 + osmo_conv_decode_init@Base 0.10.2 + osmo_conv_decode_reset@Base 0.10.2 + osmo_conv_decode_rewind@Base 0.10.2 + osmo_conv_decode_scan@Base 0.10.2 + osmo_conv_encode@Base 0.10.2 + osmo_conv_encode_flush@Base 0.10.2 + osmo_conv_encode_init@Base 0.10.2 + osmo_conv_encode_load_state@Base 0.10.2 + osmo_conv_encode_raw@Base 0.10.2 + osmo_conv_get_input_length@Base 0.10.2 + osmo_conv_get_output_length@Base 0.10.2 + osmo_conv_metrics_k5_n2@Base 0.10.2 + osmo_conv_metrics_k5_n3@Base 0.10.2 + osmo_conv_metrics_k5_n4@Base 0.10.2 + osmo_conv_metrics_k7_n2@Base 0.10.2 + osmo_conv_metrics_k7_n3@Base 0.10.2 + osmo_conv_metrics_k7_n4@Base 0.10.2 + osmo_counter_alloc@Base 0.10.2 + osmo_counter_difference@Base 0.10.2 + osmo_counter_free@Base 0.10.2 + osmo_counter_get_by_name@Base 0.10.2 + osmo_counters_count@Base 0.11.0 + osmo_counters_for_each@Base 0.10.2 + osmo_crc16@Base 0.10.2 + osmo_crc16_ccitt@Base 0.10.2 + osmo_crc16_ccitt_table@Base 0.10.2 + osmo_crc16_table@Base 0.10.2 + osmo_crc16gen_check_bits@Base 0.10.2 + osmo_crc16gen_compute_bits@Base 0.10.2 + osmo_crc16gen_set_bits@Base 0.10.2 + osmo_crc32gen_check_bits@Base 0.10.2 + osmo_crc32gen_compute_bits@Base 0.10.2 + osmo_crc32gen_set_bits@Base 0.10.2 + osmo_crc64gen_check_bits@Base 0.10.2 + osmo_crc64gen_compute_bits@Base 0.10.2 + osmo_crc64gen_set_bits@Base 0.10.2 + osmo_crc8gen_check_bits@Base 0.10.2 + osmo_crc8gen_compute_bits@Base 0.10.2 + osmo_crc8gen_set_bits@Base 0.10.2 + osmo_ctx@Base 1.3.0 + osmo_ctx_init@Base 1.3.0 + osmo_daemonize@Base 0.10.2 + osmo_decode_big_endian@Base 0.10.2 + osmo_encode_big_endian@Base 0.10.2 + osmo_environment_append@Base 1.3.0 + osmo_environment_filter@Base 1.3.0 + osmo_environment_whitelist@Base 1.3.0 + osmo_escape_cstr_buf@Base 1.3.0 + osmo_escape_cstr_c@Base 1.3.0 + osmo_escape_str@Base 0.11.0 + osmo_escape_str_buf2@Base 1.3.0 + osmo_escape_str_buf3@Base 1.7.0 + osmo_escape_str_buf@Base 0.11.0 + osmo_escape_str_c@Base 1.3.0 + osmo_event_for_prim@Base 0.10.2 + osmo_fd_close@Base 0.10.2 + osmo_fd_disp_fds@Base 0.10.2 + osmo_fd_fill_fds@Base 0.10.2 + osmo_fd_get_by_fd@Base 0.10.2 + osmo_fd_is_registered@Base 0.10.2 + osmo_fd_register@Base 0.10.2 + osmo_fd_setup@Base 0.10.2 + osmo_fd_unregister@Base 0.10.2 + osmo_fd_update_when@Base 1.5.1 + osmo_float_str_to_int@Base 1.5.1 + osmo_fsm_event_name@Base 0.10.2 + osmo_fsm_find_by_name@Base 0.10.2 + osmo_fsm_inst_alloc@Base 0.10.2 + osmo_fsm_inst_alloc_child@Base 0.10.2 + osmo_fsm_inst_change_parent@Base 0.11.0 + osmo_fsm_inst_find_by_id@Base 0.10.2 + osmo_fsm_inst_find_by_name@Base 0.10.2 + osmo_fsm_inst_free@Base 0.10.2 + osmo_fsm_inst_name@Base 0.10.2 + osmo_fsm_inst_unlink_parent@Base 0.11.0 + osmo_fsm_inst_update_id@Base 0.11.0 + osmo_fsm_inst_update_id_f@Base 0.11.0 + osmo_fsm_inst_update_id_f_sanitize@Base 1.3.0 + osmo_fsm_log_addr@Base 0.10.2 + osmo_fsm_log_timeouts@Base 1.3.0 + osmo_fsm_register@Base 0.10.2 + osmo_fsm_set_dealloc_ctx@Base 1.3.0 + osmo_fsm_state_name@Base 0.10.2 + osmo_fsm_term_cause_names@Base 0.10.2 + osmo_fsm_term_safely@Base 1.3.0 + osmo_fsm_unregister@Base 0.10.2 + osmo_g_fsms@Base 0.10.2 + osmo_generate_backtrace@Base 0.10.2 + osmo_get_macaddr@Base 0.10.2 + osmo_gettid@Base 1.5.1 + osmo_gettimeofday@Base 0.10.2 + osmo_gettimeofday_override@Base 0.10.2 + osmo_gettimeofday_override_add@Base 0.10.2 + osmo_gettimeofday_override_time@Base 0.10.2 + osmo_hexdump@Base 0.10.2 + osmo_hexdump_buf@Base 1.3.0 + osmo_hexdump_c@Base 1.3.0 + osmo_hexdump_nospc@Base 0.10.2 + osmo_hexdump_nospc_c@Base 1.3.0 + osmo_hexparse@Base 0.10.2 + osmo_identifier_sanitize_buf@Base 1.3.0 + osmo_identifier_valid@Base 0.10.2 + osmo_init_ignore_signals@Base 0.10.2 + osmo_init_logging2@Base 0.11.0 + osmo_init_logging@Base 0.10.2 + osmo_int_to_float_str_buf@Base 1.5.1 + osmo_int_to_float_str_c@Base 1.5.1 + osmo_ip_str_type@Base 1.3.0 + osmo_is_hexstr@Base 0.10.2 + osmo_isdnhdlc_decode@Base 0.12.0 + osmo_isdnhdlc_encode@Base 0.12.0 + osmo_isdnhdlc_out_init@Base 0.12.0 + osmo_isdnhdlc_rcv_init@Base 0.12.0 + osmo_isqrt32@Base 0.12.0 + osmo_it_q_alloc@Base 1.5.1 + osmo_it_q_by_name@Base 1.5.1 + osmo_it_q_destroy@Base 1.5.1 + osmo_it_q_flush@Base 1.5.1 + osmo_log_backtrace@Base 0.10.2 + osmo_log_info@Base 0.10.2 + osmo_log_target_list@Base 0.10.2 + osmo_luhn@Base 1.3.0 + osmo_macaddr_parse@Base 0.10.2 + osmo_mnl_destroy@Base 1.5.1 + osmo_mnl_init@Base 1.5.1 + osmo_nibble_shift_left_unal@Base 0.10.2 + osmo_nibble_shift_right@Base 0.10.2 + osmo_osmo_hexdump_nospc@Base 0.10.2 + osmo_panic@Base 0.10.2 + osmo_pbit2ubit@Base 0.10.2 + osmo_pbit2ubit_ext@Base 0.10.2 + osmo_plugin_load_all@Base 0.10.2 + osmo_prbs11@Base 0.10.2 + osmo_prbs15@Base 0.10.2 + osmo_prbs7@Base 0.10.2 + osmo_prbs9@Base 0.10.2 + osmo_prbs_get_ubit@Base 0.10.2 + osmo_prbs_get_ubits@Base 0.10.2 + osmo_prbs_state_init@Base 0.10.2 + osmo_prim_op_names@Base 0.10.2 + osmo_print_n@Base 1.3.0 + osmo_quote_cstr_buf@Base 1.3.0 + osmo_quote_cstr_c@Base 1.3.0 + osmo_quote_str@Base 0.11.0 + osmo_quote_str_buf2@Base 1.3.0 + osmo_quote_str_buf3@Base 1.7.0 + osmo_quote_str_buf@Base 0.11.0 + osmo_quote_str_c@Base 1.3.0 + osmo_revbytebits_32@Base 0.10.2 + osmo_revbytebits_8@Base 0.10.2 + osmo_revbytebits_buf@Base 0.10.2 + osmo_sbit2ubit@Base 0.10.2 + osmo_select_init@Base 1.3.0 + osmo_select_main@Base 0.10.2 + osmo_select_main_ctx@Base 1.3.0 + osmo_select_shutdown_done@Base 1.6.0 + osmo_select_shutdown_request@Base 1.6.0 + osmo_select_shutdown_requested@Base 1.6.0 + osmo_separated_identifiers_valid@Base 0.11.0 + osmo_sercomm_change_speed@Base 0.10.2 + osmo_sercomm_drv_pull@Base 0.10.2 + osmo_sercomm_drv_rx_char@Base 0.10.2 + osmo_sercomm_init@Base 0.10.2 + osmo_sercomm_initialized@Base 0.10.2 + osmo_sercomm_register_rx_cb@Base 0.10.2 + osmo_sercomm_sendmsg@Base 0.10.2 + osmo_sercomm_tx_queue_depth@Base 0.10.2 + osmo_serial_clear_custom_baudrate@Base 0.10.2 + osmo_serial_init@Base 0.10.2 + osmo_serial_set_baudrate@Base 0.10.2 + osmo_serial_set_custom_baudrate@Base 0.10.2 + osmo_serial_speed_t@Base 1.5.1 + osmo_set_panic_handler@Base 0.10.2 + osmo_signal_dispatch@Base 0.10.2 + osmo_signal_register_handler@Base 0.10.2 + osmo_signal_talloc_ctx_init@Base 1.3.0 + osmo_signal_unregister_handler@Base 0.10.2 + osmo_signalfd_setup@Base 1.4.0 + osmo_sock_get_ip_and_port@Base 1.3.0 + osmo_sock_get_local_ip@Base 1.3.0 + osmo_sock_get_local_ip_port@Base 1.3.0 + osmo_sock_get_name2@Base 1.3.0 + osmo_sock_get_name2_c@Base 1.3.0 + osmo_sock_get_name@Base 0.10.2 + osmo_sock_get_name_buf@Base 1.3.0 + osmo_sock_get_remote_ip@Base 1.3.0 + osmo_sock_get_remote_ip_port@Base 1.3.0 + osmo_sock_init2@Base 0.10.2 + osmo_sock_init2_multiaddr@Base 1.3.0 + osmo_sock_init2_ofd@Base 0.10.2 + osmo_sock_init@Base 0.10.2 + osmo_sock_init_ofd@Base 0.10.2 + osmo_sock_init_osa@Base 1.5.1 + osmo_sock_init_osa_ofd@Base 1.5.1 + osmo_sock_init_sa@Base 0.10.2 + osmo_sock_local_ip@Base 0.10.2 + osmo_sock_mcast_all_set@Base 0.10.2 + osmo_sock_mcast_iface_set@Base 1.4.0 + osmo_sock_mcast_loop_set@Base 0.10.2 + osmo_sock_mcast_subscribe@Base 0.10.2 + osmo_sock_mcast_ttl_set@Base 0.10.2 + osmo_sock_set_dscp@Base 1.6.0 + osmo_sock_set_priority@Base 1.6.0 + osmo_sock_unix_init@Base 0.10.2 + osmo_sock_unix_init_ofd@Base 0.10.2 + osmo_sockaddr_cmp@Base 1.5.1 + osmo_sockaddr_from_octets@Base 1.7.0 + osmo_sockaddr_in_to_str_and_uint@Base 1.3.0 + osmo_sockaddr_is_local@Base 0.10.2 + osmo_sockaddr_local_ip@Base 1.5.1 + osmo_sockaddr_ntop@Base 1.5.1 + osmo_sockaddr_port@Base 1.5.1 + osmo_sockaddr_set_port@Base 1.7.0 + osmo_sockaddr_str_cmp@Base 1.3.0 + osmo_sockaddr_str_from_32@Base 1.3.0 + osmo_sockaddr_str_from_32h@Base 1.3.0 + osmo_sockaddr_str_from_32n@Base 1.3.0 + osmo_sockaddr_str_from_in6_addr@Base 1.3.0 + osmo_sockaddr_str_from_in_addr@Base 1.3.0 + osmo_sockaddr_str_from_sockaddr@Base 1.3.0 + osmo_sockaddr_str_from_sockaddr_in6@Base 1.3.0 + osmo_sockaddr_str_from_sockaddr_in@Base 1.3.0 + osmo_sockaddr_str_from_str2@Base 1.5.1 + osmo_sockaddr_str_from_str@Base 1.3.0 + osmo_sockaddr_str_is_nonzero@Base 1.3.0 + osmo_sockaddr_str_is_set@Base 1.3.0 + osmo_sockaddr_str_to_32@Base 1.3.0 + osmo_sockaddr_str_to_32h@Base 1.3.0 + osmo_sockaddr_str_to_32n@Base 1.3.0 + osmo_sockaddr_str_to_in6_addr@Base 1.3.0 + osmo_sockaddr_str_to_in_addr@Base 1.3.0 + osmo_sockaddr_str_to_sockaddr@Base 1.3.0 + osmo_sockaddr_str_to_sockaddr_in6@Base 1.3.0 + osmo_sockaddr_str_to_sockaddr_in@Base 1.3.0 + osmo_sockaddr_to_octets@Base 1.7.0 + osmo_sockaddr_to_str@Base 1.5.1 + osmo_sockaddr_to_str_and_uint@Base 0.12.0 + osmo_sockaddr_to_str_buf2@Base 1.7.0 + osmo_sockaddr_to_str_buf@Base 1.5.1 + osmo_sockaddr_to_str_c@Base 1.7.0 + osmo_stat_item_dec@Base 1.3.0 +#MISSING: 1.6.0# osmo_stat_item_discard@Base 0.10.2 +#MISSING: 1.6.0# osmo_stat_item_discard_all@Base 0.10.2 + osmo_stat_item_flush@Base 1.6.0 + osmo_stat_item_for_each_group@Base 0.10.2 + osmo_stat_item_for_each_item@Base 0.10.2 + osmo_stat_item_get_by_name@Base 0.10.2 + osmo_stat_item_get_desc@Base 1.6.0 + osmo_stat_item_get_group_by_name_idx@Base 0.10.2 + osmo_stat_item_get_group_by_name_idxname@Base 1.6.0 + osmo_stat_item_get_last@Base 1.6.0 +#MISSING: 1.6.0# osmo_stat_item_get_next@Base 0.10.2 + osmo_stat_item_group_alloc@Base 0.10.2 + osmo_stat_item_group_free@Base 0.10.2 + osmo_stat_item_group_get_item@Base 1.6.0 + osmo_stat_item_group_reset@Base 1.4.0 + osmo_stat_item_group_set_name@Base 1.6.0 + osmo_stat_item_inc@Base 1.3.0 + osmo_stat_item_init@Base 0.10.2 + osmo_stat_item_reset@Base 1.4.0 + osmo_stat_item_set@Base 0.10.2 + osmo_stats_config@Base 0.10.2 + osmo_stats_init@Base 0.10.2 + osmo_stats_report@Base 0.10.2 + osmo_stats_reporter_alloc@Base 0.10.2 + osmo_stats_reporter_create_log@Base 0.10.2 + osmo_stats_reporter_create_statsd@Base 0.10.2 + osmo_stats_reporter_disable@Base 0.10.2 + osmo_stats_reporter_enable@Base 0.10.2 + osmo_stats_reporter_find@Base 0.10.2 + osmo_stats_reporter_free@Base 0.10.2 + osmo_stats_reporter_list@Base 1.6.0 + osmo_stats_reporter_send@Base 0.10.2 + osmo_stats_reporter_send_buffer@Base 0.10.2 + osmo_stats_reporter_set_flush_period@Base 1.4.0 + osmo_stats_reporter_set_local_addr@Base 0.10.2 + osmo_stats_reporter_set_max_class@Base 0.10.2 + osmo_stats_reporter_set_mtu@Base 0.10.2 + osmo_stats_reporter_set_name_prefix@Base 0.10.2 + osmo_stats_reporter_set_remote_addr@Base 0.10.2 + osmo_stats_reporter_set_remote_port@Base 0.10.2 + osmo_stats_reporter_udp_close@Base 0.10.2 + osmo_stats_reporter_udp_open@Base 0.10.2 + osmo_stats_set_interval@Base 0.10.2 + osmo_stats_tcp_osmo_fd_register@Base 1.7.0 + osmo_stats_tcp_osmo_fd_unregister@Base 1.7.0 + osmo_stats_tcp_set_interval@Base 1.7.0 + osmo_stderr_target@Base 0.10.2 + osmo_str2bcd@Base 1.4.0 + osmo_str2lower@Base 0.10.2 + osmo_str2upper@Base 0.10.2 + osmo_str_startswith@Base 1.3.0 + osmo_str_to_int64@Base 1.6.0 + osmo_str_to_int@Base 1.6.0 + osmo_str_tolower@Base 1.3.0 + osmo_str_tolower_buf@Base 1.3.0 + osmo_str_tolower_c@Base 1.3.0 + osmo_str_toupper@Base 1.3.0 + osmo_str_toupper_buf@Base 1.3.0 + osmo_str_toupper_c@Base 1.3.0 + osmo_strlcpy@Base 0.10.2 + osmo_strnchr@Base 1.3.0 + osmo_strrb_add@Base 0.10.2 + osmo_strrb_create@Base 0.10.2 + osmo_strrb_elements@Base 0.10.2 + osmo_strrb_get_nth@Base 0.10.2 + osmo_strrb_is_empty@Base 0.10.2 + osmo_system_nowait2@Base 1.4.0 + osmo_system_nowait@Base 1.3.0 + osmo_t4_encode@Base 0.10.2 + osmo_talloc_replace_string_fmt@Base 1.6.0 + osmo_tcp_stats_config@Base 1.7.0 + osmo_tdef_get@Base 1.3.0 + osmo_tdef_get_entry@Base 1.3.0 + osmo_tdef_get_state_timeout@Base 1.3.0 + osmo_tdef_range_str_buf@Base 1.3.0 + osmo_tdef_set@Base 1.3.0 + osmo_tdef_unit_names@Base 1.3.0 + osmo_tdef_val_in_range@Base 1.3.0 + osmo_tdefs_reset@Base 1.3.0 + osmo_time_cc_cleanup@Base 1.6.0 + osmo_time_cc_init@Base 1.6.0 + osmo_time_cc_set_flag@Base 1.6.0 + osmo_timer_add@Base 0.10.2 + osmo_timer_del@Base 0.10.2 + osmo_timer_pending@Base 0.10.2 + osmo_timer_remaining@Base 0.10.2 + osmo_timer_schedule@Base 0.10.2 + osmo_timer_setup@Base 0.10.2 + osmo_timerfd_disable@Base 0.12.0 + osmo_timerfd_schedule@Base 0.12.0 + osmo_timerfd_setup@Base 0.12.0 + osmo_timers_check@Base 0.10.2 + osmo_timers_nearest@Base 0.10.2 + osmo_timers_nearest_ms@Base 1.5.1 + osmo_timers_prepare@Base 0.10.2 + osmo_timers_update@Base 0.10.2 + osmo_ubit2pbit@Base 0.10.2 + osmo_ubit2pbit_ext@Base 0.10.2 + osmo_ubit2sbit@Base 0.10.2 + osmo_ubit_dump@Base 0.10.2 + osmo_ubit_dump_buf@Base 1.3.0 + osmo_use_count_by@Base 1.3.0 + osmo_use_count_find@Base 1.3.0 + osmo_use_count_free@Base 1.3.0 + osmo_use_count_make_static_entries@Base 1.3.0 + osmo_use_count_name_buf@Base 1.3.0 + osmo_use_count_to_str_buf@Base 1.5.1 + osmo_use_count_to_str_c@Base 1.5.1 + osmo_use_count_total@Base 1.3.0 + osmo_vlogp@Base 0.10.2 + osmo_wqueue_bfd_cb@Base 0.10.2 + osmo_wqueue_clear@Base 0.10.2 + osmo_wqueue_enqueue@Base 0.10.2 + osmo_wqueue_enqueue_quiet@Base 1.5.1 + osmo_wqueue_init@Base 0.10.2 + rate_ctr_add@Base 0.10.2 + rate_ctr_difference@Base 0.10.2 + rate_ctr_for_each_counter@Base 0.10.2 + rate_ctr_for_each_group@Base 0.10.2 + rate_ctr_get_by_name@Base 0.10.2 + rate_ctr_get_group_by_name_idx@Base 0.10.2 + rate_ctr_group_alloc@Base 0.10.2 + rate_ctr_group_free@Base 0.10.2 + rate_ctr_group_get_ctr@Base 1.6.0 + rate_ctr_group_reset@Base 1.4.0 + rate_ctr_group_set_name@Base 1.6.0 + rate_ctr_init@Base 0.10.2 + rate_ctr_reset@Base 1.4.0 + rb_erase@Base 0.10.2 + rb_first@Base 0.10.2 + rb_insert_color@Base 0.10.2 + rb_last@Base 0.10.2 + rb_next@Base 0.10.2 + rb_prev@Base 0.10.2 + rb_replace_node@Base 0.10.2 + sercomm_drv_baudrate_chg@Base 0.10.2 + sercomm_drv_lock@Base 0.10.2 + sercomm_drv_start_tx@Base 0.10.2 + sercomm_drv_unlock@Base 0.10.2 + stats_tcp_lock@Base 1.7.0 + tall_ctr_ctx@Base 0.10.2 + tall_log_ctx@Base 1.3.0 + tall_msgb_ctx@Base 0.10.2 + tall_sigh_ctx@Base 0.10.2 diff -Nru libosmocore-1.6.0/debian/libosmogb12.install libosmocore-1.7.0/debian/libosmogb12.install --- libosmocore-1.6.0/debian/libosmogb12.install 2022-03-13 20:16:43.000000000 +0000 +++ libosmocore-1.7.0/debian/libosmogb12.install 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -usr/lib/*/libosmogb*.so.* diff -Nru libosmocore-1.6.0/debian/libosmogb12.symbols libosmocore-1.7.0/debian/libosmogb12.symbols --- libosmocore-1.6.0/debian/libosmogb12.symbols 2022-03-13 20:16:43.000000000 +0000 +++ libosmocore-1.7.0/debian/libosmogb12.symbols 1970-01-01 00:00:00.000000000 +0000 @@ -1,203 +0,0 @@ -libosmogb.so.12 libosmogb12 #MINVER# -* Build-Depends-Package: libosmocore-dev - LIBOSMOGB_1.0@LIBOSMOGB_1.0 0.10.2 - bssgp2_dec_fc_bvc@LIBOSMOGB_1.0 1.5.1 - bssgp2_dec_fc_ms@LIBOSMOGB_1.0 1.5.1 - bssgp2_enc_bvc_block@LIBOSMOGB_1.0 1.5.1 - bssgp2_enc_bvc_block_ack@LIBOSMOGB_1.0 1.5.1 - bssgp2_enc_bvc_reset@LIBOSMOGB_1.0 1.5.1 - bssgp2_enc_bvc_reset_ack@LIBOSMOGB_1.0 1.5.1 - bssgp2_enc_bvc_unblock@LIBOSMOGB_1.0 1.5.1 - bssgp2_enc_bvc_unblock_ack@LIBOSMOGB_1.0 1.5.1 - bssgp2_enc_fc_bvc@LIBOSMOGB_1.0 1.5.1 - bssgp2_enc_fc_bvc_ack@LIBOSMOGB_1.0 1.5.1 - bssgp2_enc_fc_ms@LIBOSMOGB_1.0 1.5.1 - bssgp2_enc_fc_ms_ack@LIBOSMOGB_1.0 1.5.1 - bssgp2_enc_status@LIBOSMOGB_1.0 1.5.1 - bssgp2_nsi_tx_ptp@LIBOSMOGB_1.0 1.5.1 - bssgp2_nsi_tx_sig@LIBOSMOGB_1.0 1.5.1 - bssgp_bvc_ctx_free@LIBOSMOGB_1.0 1.3.0 - bssgp_bvc_fsm_alloc_ptp_bss@LIBOSMOGB_1.0 1.5.1 - bssgp_bvc_fsm_alloc_ptp_sgsn@LIBOSMOGB_1.0 1.5.1 - bssgp_bvc_fsm_alloc_sig_bss@LIBOSMOGB_1.0 1.5.1 - bssgp_bvc_fsm_alloc_sig_sgsn@LIBOSMOGB_1.0 1.5.1 - bssgp_bvc_fsm_get_block_cause@LIBOSMOGB_1.0 1.5.1 - bssgp_bvc_fsm_get_features_advertised@LIBOSMOGB_1.0 1.5.1 - bssgp_bvc_fsm_get_features_negotiated@LIBOSMOGB_1.0 1.5.1 - bssgp_bvc_fsm_get_features_received@LIBOSMOGB_1.0 1.5.1 - bssgp_bvc_fsm_get_max_pdu_len@LIBOSMOGB_1.0 1.5.1 - bssgp_bvc_fsm_is_unblocked@LIBOSMOGB_1.0 1.5.1 - bssgp_bvc_fsm_set_max_pdu_len@LIBOSMOGB_1.0 1.5.1 - bssgp_bvc_fsm_set_ops@LIBOSMOGB_1.0 1.5.1 - bssgp_cause_str@LIBOSMOGB_1.0 0.10.2 - bssgp_create_cell_id@LIBOSMOGB_1.0 0.10.2 - bssgp_create_rim_ri@LIBOSMOGB_1.0 1.5.1 - bssgp_dec_app_err_cont_nacc@LIBOSMOGB_1.0 1.5.1 - bssgp_dec_ran_inf_ack_rim_cont@LIBOSMOGB_1.0 1.5.1 - bssgp_dec_ran_inf_app_cont_nacc@LIBOSMOGB_1.0 1.5.1 - bssgp_dec_ran_inf_app_err_rim_cont@LIBOSMOGB_1.0 1.5.1 - bssgp_dec_ran_inf_err_rim_cont@LIBOSMOGB_1.0 1.5.1 - bssgp_dec_ran_inf_req_app_cont_nacc@LIBOSMOGB_1.0 1.5.1 - bssgp_dec_ran_inf_req_rim_cont@LIBOSMOGB_1.0 1.5.1 - bssgp_dec_ran_inf_rim_cont@LIBOSMOGB_1.0 1.5.1 - bssgp_enc_app_err_cont_nacc@LIBOSMOGB_1.0 1.5.1 - bssgp_enc_ran_inf_ack_rim_cont@LIBOSMOGB_1.0 1.5.1 - bssgp_enc_ran_inf_app_cont_nacc@LIBOSMOGB_1.0 1.5.1 - bssgp_enc_ran_inf_app_err_rim_cont@LIBOSMOGB_1.0 1.5.1 - bssgp_enc_ran_inf_err_rim_cont@LIBOSMOGB_1.0 1.5.1 - bssgp_enc_ran_inf_req_app_cont_nacc@LIBOSMOGB_1.0 1.5.1 - bssgp_enc_ran_inf_req_rim_cont@LIBOSMOGB_1.0 1.5.1 - bssgp_enc_ran_inf_rim_cont@LIBOSMOGB_1.0 1.5.1 - bssgp_encode_rim_pdu@LIBOSMOGB_1.0 1.6.0 - bssgp_fc_flush_queue@LIBOSMOGB_1.0 1.3.0 - bssgp_fc_in@LIBOSMOGB_1.0 0.10.2 - bssgp_fc_init@LIBOSMOGB_1.0 0.10.2 - bssgp_fc_ms_init@LIBOSMOGB_1.0 0.10.2 - bssgp_flush_all_queues@LIBOSMOGB_1.0 1.3.0 - bssgp_msgb_alloc@LIBOSMOGB_1.0 0.10.2 - bssgp_msgb_copy@LIBOSMOGB_1.0 0.10.2 - bssgp_msgb_ra_put@LIBOSMOGB_1.0 0.11.0 - bssgp_msgb_tlli_put@LIBOSMOGB_1.0 0.10.2 - bssgp_nacc_cause_strs@LIBOSMOGB_1.0 1.5.1 - bssgp_nsi@LIBOSMOGB_1.0 0.10.2 - bssgp_parse_cell_id@LIBOSMOGB_1.0 0.10.2 - bssgp_parse_rim_pdu@LIBOSMOGB_1.0 1.5.1 - bssgp_parse_rim_ri@LIBOSMOGB_1.0 1.5.1 - bssgp_pdu_str@LIBOSMOGB_1.0 0.10.2 - bssgp_ran_inf_app_id_strs@LIBOSMOGB_1.0 1.5.1 - bssgp_rcvmsg@LIBOSMOGB_1.0 0.10.2 - bssgp_rim_ri_name@LIBOSMOGB_1.0 1.5.1 - bssgp_rim_ri_name_buf@LIBOSMOGB_1.0 1.5.1 - bssgp_rim_routing_info_discr_strs@LIBOSMOGB_1.0 1.5.1 - bssgp_rx_paging@LIBOSMOGB_1.0 0.10.2 - bssgp_set_bssgp_callback@LIBOSMOGB_1.0 1.4.0 - bssgp_set_log_ss@LIBOSMOGB_1.0 0.10.2 - bssgp_tx_bvc_block@LIBOSMOGB_1.0 0.10.2 - bssgp_tx_bvc_ptp_reset@LIBOSMOGB_1.0 0.10.2 - bssgp_tx_bvc_reset2@LIBOSMOGB_1.0 1.4.0 - bssgp_tx_bvc_reset@LIBOSMOGB_1.0 0.10.2 - bssgp_tx_bvc_reset_nsei_bvci@LIBOSMOGB_1.0 1.5.1 - bssgp_tx_bvc_unblock@LIBOSMOGB_1.0 0.10.2 - bssgp_tx_dl_ud@LIBOSMOGB_1.0 0.10.2 - bssgp_tx_fc_bvc@LIBOSMOGB_1.0 0.10.2 - bssgp_tx_fc_ms@LIBOSMOGB_1.0 0.10.2 - bssgp_tx_flush_ll_ack@LIBOSMOGB_1.0 0.10.2 - bssgp_tx_llc_discarded@LIBOSMOGB_1.0 0.10.2 - bssgp_tx_paging@LIBOSMOGB_1.0 0.10.2 - bssgp_tx_ra_capa_upd@LIBOSMOGB_1.0 0.10.2 - bssgp_tx_radio_status_imsi@LIBOSMOGB_1.0 0.10.2 - bssgp_tx_radio_status_tlli@LIBOSMOGB_1.0 0.10.2 - bssgp_tx_radio_status_tmsi@LIBOSMOGB_1.0 0.10.2 - bssgp_tx_resume@LIBOSMOGB_1.0 0.10.2 - bssgp_tx_resume_ack@LIBOSMOGB_1.0 0.10.2 - bssgp_tx_resume_nack@LIBOSMOGB_1.0 0.10.2 - bssgp_tx_rim@LIBOSMOGB_1.0 1.5.1 - bssgp_tx_simple_bvci@LIBOSMOGB_1.0 0.10.2 - bssgp_tx_status@LIBOSMOGB_1.0 0.10.2 - bssgp_tx_suspend@LIBOSMOGB_1.0 0.10.2 - bssgp_tx_suspend_ack@LIBOSMOGB_1.0 0.10.2 - bssgp_tx_suspend_nack@LIBOSMOGB_1.0 0.10.2 - bssgp_tx_ul_ud@LIBOSMOGB_1.0 0.10.2 - bssgp_vty_init@LIBOSMOGB_1.0 0.10.2 - btsctx_alloc@LIBOSMOGB_1.0 0.10.2 - btsctx_by_bvci_nsei@LIBOSMOGB_1.0 0.10.2 - btsctx_by_raid_cid@LIBOSMOGB_1.0 0.10.2 - gprs_log_filter_fn@LIBOSMOGB_1.0 0.10.2 - gprs_ns2_aff_cause_prim_strs@LIBOSMOGB_1.0 1.5.1 - gprs_ns2_bind_by_name@LIBOSMOGB_1.0 1.5.1 - gprs_ns2_cause_strs@LIBOSMOGB_1.0 1.5.1 - gprs_ns2_create_nse2@LIBOSMOGB_1.0 1.6.0 - gprs_ns2_create_nse@LIBOSMOGB_1.0 1.5.1 - gprs_ns2_find_vc_by_dlci@LIBOSMOGB_1.0 1.5.1 - gprs_ns2_fr_bind@LIBOSMOGB_1.0 1.5.1 - gprs_ns2_fr_bind_by_netif@LIBOSMOGB_1.0 1.5.1 - gprs_ns2_fr_bind_netif@LIBOSMOGB_1.0 1.5.1 - gprs_ns2_fr_connect@LIBOSMOGB_1.0 1.5.1 - gprs_ns2_fr_nsvc_by_dlci@LIBOSMOGB_1.0 1.5.1 - gprs_ns2_fr_nsvc_dlci@LIBOSMOGB_1.0 1.5.1 - gprs_ns2_free@LIBOSMOGB_1.0 1.5.1 - gprs_ns2_free_bind@LIBOSMOGB_1.0 1.5.1 - gprs_ns2_free_binds@LIBOSMOGB_1.0 1.5.1 - gprs_ns2_free_nse@LIBOSMOGB_1.0 1.5.1 - gprs_ns2_free_nses@LIBOSMOGB_1.0 1.5.1 - gprs_ns2_free_nsvc@LIBOSMOGB_1.0 1.5.1 - gprs_ns2_free_nsvcs@LIBOSMOGB_1.0 1.5.1 - gprs_ns2_frgre_bind@LIBOSMOGB_1.0 1.5.1 - gprs_ns2_instantiate@LIBOSMOGB_1.0 1.5.1 - gprs_ns2_ip_bind@LIBOSMOGB_1.0 1.5.1 - gprs_ns2_ip_bind_by_sockaddr@LIBOSMOGB_1.0 1.5.1 - gprs_ns2_ip_bind_set_dscp@LIBOSMOGB_1.0 1.5.1 - gprs_ns2_ip_bind_set_priority@LIBOSMOGB_1.0 1.6.0 - gprs_ns2_ip_bind_set_sns_weight@LIBOSMOGB_1.0 1.5.1 - gprs_ns2_ip_bind_sockaddr@LIBOSMOGB_1.0 1.5.1 - gprs_ns2_ip_connect2@LIBOSMOGB_1.0 1.5.1 - gprs_ns2_ip_connect@LIBOSMOGB_1.0 1.5.1 - gprs_ns2_ip_connect_inactive@LIBOSMOGB_1.0 1.5.1 - gprs_ns2_ip_vc_equal@LIBOSMOGB_1.0 1.5.1 - gprs_ns2_ip_vc_local@LIBOSMOGB_1.0 1.5.1 - gprs_ns2_ip_vc_remote@LIBOSMOGB_1.0 1.5.1 - gprs_ns2_is_fr_bind@LIBOSMOGB_1.0 1.5.1 - gprs_ns2_is_frgre_bind@LIBOSMOGB_1.0 1.5.1 - gprs_ns2_is_ip_bind@LIBOSMOGB_1.0 1.5.1 - gprs_ns2_ll_str@LIBOSMOGB_1.0 1.5.1 - gprs_ns2_ll_str_buf@LIBOSMOGB_1.0 1.5.1 - gprs_ns2_ll_str_c@LIBOSMOGB_1.0 1.5.1 - gprs_ns2_lltype_strs@LIBOSMOGB_1.0 1.5.1 - gprs_ns2_nse_by_nsei@LIBOSMOGB_1.0 1.5.1 - gprs_ns2_nse_foreach_nsvc@LIBOSMOGB_1.0 1.5.1 - gprs_ns2_nse_nsei@LIBOSMOGB_1.0 1.5.1 - gprs_ns2_nse_sns_remote@LIBOSMOGB_1.0 1.5.1 - gprs_ns2_nsvc_by_nsvci@LIBOSMOGB_1.0 1.5.1 - gprs_ns2_nsvc_state_name@LIBOSMOGB_1.0 1.5.1 - gprs_ns2_prim_strs@LIBOSMOGB_1.0 1.5.1 - gprs_ns2_recv_prim@LIBOSMOGB_1.0 1.5.1 - gprs_ns2_sns_add_bind@LIBOSMOGB_1.0 1.5.1 - gprs_ns2_sns_add_endpoint@LIBOSMOGB_1.0 1.5.1 - gprs_ns2_sns_del_bind@LIBOSMOGB_1.0 1.5.1 - gprs_ns2_sns_del_endpoint@LIBOSMOGB_1.0 1.5.1 - gprs_ns2_start_alive_all_nsvcs@LIBOSMOGB_1.0 1.5.1 - gprs_ns2_vty_init@LIBOSMOGB_1.0 1.5.1 - gprs_ns2_vty_init_reduced@LIBOSMOGB_1.0 1.5.1 - gprs_ns_cause_str@LIBOSMOGB_1.0 0.10.2 - gprs_ns_close@LIBOSMOGB_1.0 0.10.2 - gprs_ns_destroy@LIBOSMOGB_1.0 0.10.2 - gprs_ns_frgre_listen@LIBOSMOGB_1.0 0.10.2 - gprs_ns_frgre_sendmsg@LIBOSMOGB_1.0 0.10.2 - gprs_ns_instantiate@LIBOSMOGB_1.0 0.10.2 - gprs_ns_ll_clear@LIBOSMOGB_1.0 0.10.2 - gprs_ns_ll_copy@LIBOSMOGB_1.0 0.10.2 - gprs_ns_ll_str@LIBOSMOGB_1.0 0.10.2 - gprs_ns_ll_str_buf@LIBOSMOGB_1.0 1.3.0 - gprs_ns_ll_str_c@LIBOSMOGB_1.0 1.3 - gprs_ns_msgb_alloc@LIBOSMOGB_1.0 0.10.2 - gprs_ns_nsip_connect@LIBOSMOGB_1.0 0.10.2 - gprs_ns_nsip_connect_sns@LIBOSMOGB_1.0 1.3.0 - gprs_ns_nsip_listen@LIBOSMOGB_1.0 0.10.2 - gprs_ns_pdu_strings@LIBOSMOGB_1.0 0.10.2 - gprs_ns_rcvmsg@LIBOSMOGB_1.0 0.10.2 - gprs_ns_sendmsg@LIBOSMOGB_1.0 0.10.2 - gprs_ns_set_log_ss@LIBOSMOGB_1.0 0.10.2 - gprs_ns_signal_ns_names@LIBOSMOGB_1.0 0.10.2 - gprs_ns_tx_alive@LIBOSMOGB_1.0 0.10.2 - gprs_ns_tx_alive_ack@LIBOSMOGB_1.0 0.10.2 - gprs_ns_tx_block@LIBOSMOGB_1.0 0.10.2 - gprs_ns_tx_reset@LIBOSMOGB_1.0 0.10.2 - gprs_ns_tx_status@LIBOSMOGB_1.0 0.10.2 - gprs_ns_tx_unblock@LIBOSMOGB_1.0 0.10.2 - gprs_ns_vty_init@LIBOSMOGB_1.0 0.10.2 - gprs_nsvc_by_nsei@LIBOSMOGB_1.0 0.10.2 - gprs_nsvc_by_nsvci@LIBOSMOGB_1.0 0.10.2 - gprs_nsvc_create2@LIBOSMOGB_1.0 1.4.0 -#MISSING: 1.4.0# gprs_nsvc_create@LIBOSMOGB_1.0 0.10.2 - gprs_nsvc_delete@LIBOSMOGB_1.0 0.10.2 - gprs_nsvc_reset@LIBOSMOGB_1.0 0.10.2 - gprs_nsvc_state_append@LIBOSMOGB_1.0 0.12.0 - osmo_fr_dlc_alloc@LIBOSMOGB_1.0 1.5.1 - osmo_fr_link_alloc@LIBOSMOGB_1.0 1.5.1 - osmo_fr_link_free@LIBOSMOGB_1.0 1.5.1 - osmo_fr_network_alloc@LIBOSMOGB_1.0 1.5.1 - osmo_fr_network_free@LIBOSMOGB_1.0 1.6.0 - osmo_fr_role_names@LIBOSMOGB_1.0 1.5.1 - osmo_fr_rx@LIBOSMOGB_1.0 1.5.1 - osmo_fr_tx_dlc@LIBOSMOGB_1.0 1.5.1 - osmo_pdef_bssgp@LIBOSMOGB_1.0 1.5.1 diff -Nru libosmocore-1.6.0/debian/libosmogb14.install libosmocore-1.7.0/debian/libosmogb14.install --- libosmocore-1.6.0/debian/libosmogb14.install 1970-01-01 00:00:00.000000000 +0000 +++ libosmocore-1.7.0/debian/libosmogb14.install 2022-10-09 07:16:10.000000000 +0000 @@ -0,0 +1 @@ +usr/lib/*/libosmogb*.so.* diff -Nru libosmocore-1.6.0/debian/libosmogb14.symbols libosmocore-1.7.0/debian/libosmogb14.symbols --- libosmocore-1.6.0/debian/libosmogb14.symbols 1970-01-01 00:00:00.000000000 +0000 +++ libosmocore-1.7.0/debian/libosmogb14.symbols 2022-10-09 07:16:10.000000000 +0000 @@ -0,0 +1,203 @@ +libosmogb.so.14 libosmogb14 #MINVER# +* Build-Depends-Package: libosmocore-dev + LIBOSMOGB_1.0@LIBOSMOGB_1.0 0.10.2 + bssgp2_dec_fc_bvc@LIBOSMOGB_1.0 1.5.1 + bssgp2_dec_fc_ms@LIBOSMOGB_1.0 1.5.1 + bssgp2_enc_bvc_block@LIBOSMOGB_1.0 1.5.1 + bssgp2_enc_bvc_block_ack@LIBOSMOGB_1.0 1.5.1 + bssgp2_enc_bvc_reset@LIBOSMOGB_1.0 1.5.1 + bssgp2_enc_bvc_reset_ack@LIBOSMOGB_1.0 1.5.1 + bssgp2_enc_bvc_unblock@LIBOSMOGB_1.0 1.5.1 + bssgp2_enc_bvc_unblock_ack@LIBOSMOGB_1.0 1.5.1 + bssgp2_enc_fc_bvc@LIBOSMOGB_1.0 1.5.1 + bssgp2_enc_fc_bvc_ack@LIBOSMOGB_1.0 1.5.1 + bssgp2_enc_fc_ms@LIBOSMOGB_1.0 1.5.1 + bssgp2_enc_fc_ms_ack@LIBOSMOGB_1.0 1.5.1 + bssgp2_enc_status@LIBOSMOGB_1.0 1.5.1 + bssgp2_nsi_tx_ptp@LIBOSMOGB_1.0 1.5.1 + bssgp2_nsi_tx_sig@LIBOSMOGB_1.0 1.5.1 + bssgp_bvc_ctx_free@LIBOSMOGB_1.0 1.3.0 + bssgp_bvc_fsm_alloc_ptp_bss@LIBOSMOGB_1.0 1.5.1 + bssgp_bvc_fsm_alloc_ptp_sgsn@LIBOSMOGB_1.0 1.5.1 + bssgp_bvc_fsm_alloc_sig_bss@LIBOSMOGB_1.0 1.5.1 + bssgp_bvc_fsm_alloc_sig_sgsn@LIBOSMOGB_1.0 1.5.1 + bssgp_bvc_fsm_get_block_cause@LIBOSMOGB_1.0 1.5.1 + bssgp_bvc_fsm_get_features_advertised@LIBOSMOGB_1.0 1.5.1 + bssgp_bvc_fsm_get_features_negotiated@LIBOSMOGB_1.0 1.5.1 + bssgp_bvc_fsm_get_features_received@LIBOSMOGB_1.0 1.5.1 + bssgp_bvc_fsm_get_max_pdu_len@LIBOSMOGB_1.0 1.5.1 + bssgp_bvc_fsm_is_unblocked@LIBOSMOGB_1.0 1.5.1 + bssgp_bvc_fsm_set_max_pdu_len@LIBOSMOGB_1.0 1.5.1 + bssgp_bvc_fsm_set_ops@LIBOSMOGB_1.0 1.5.1 + bssgp_cause_str@LIBOSMOGB_1.0 0.10.2 + bssgp_create_cell_id@LIBOSMOGB_1.0 0.10.2 + bssgp_create_rim_ri@LIBOSMOGB_1.0 1.5.1 + bssgp_dec_app_err_cont_nacc@LIBOSMOGB_1.0 1.5.1 + bssgp_dec_ran_inf_ack_rim_cont@LIBOSMOGB_1.0 1.5.1 + bssgp_dec_ran_inf_app_cont_nacc@LIBOSMOGB_1.0 1.5.1 + bssgp_dec_ran_inf_app_err_rim_cont@LIBOSMOGB_1.0 1.5.1 + bssgp_dec_ran_inf_err_rim_cont@LIBOSMOGB_1.0 1.5.1 + bssgp_dec_ran_inf_req_app_cont_nacc@LIBOSMOGB_1.0 1.5.1 + bssgp_dec_ran_inf_req_rim_cont@LIBOSMOGB_1.0 1.5.1 + bssgp_dec_ran_inf_rim_cont@LIBOSMOGB_1.0 1.5.1 + bssgp_enc_app_err_cont_nacc@LIBOSMOGB_1.0 1.5.1 + bssgp_enc_ran_inf_ack_rim_cont@LIBOSMOGB_1.0 1.5.1 + bssgp_enc_ran_inf_app_cont_nacc@LIBOSMOGB_1.0 1.5.1 + bssgp_enc_ran_inf_app_err_rim_cont@LIBOSMOGB_1.0 1.5.1 + bssgp_enc_ran_inf_err_rim_cont@LIBOSMOGB_1.0 1.5.1 + bssgp_enc_ran_inf_req_app_cont_nacc@LIBOSMOGB_1.0 1.5.1 + bssgp_enc_ran_inf_req_rim_cont@LIBOSMOGB_1.0 1.5.1 + bssgp_enc_ran_inf_rim_cont@LIBOSMOGB_1.0 1.5.1 + bssgp_encode_rim_pdu@LIBOSMOGB_1.0 1.6.0 + bssgp_fc_flush_queue@LIBOSMOGB_1.0 1.3.0 + bssgp_fc_in@LIBOSMOGB_1.0 0.10.2 + bssgp_fc_init@LIBOSMOGB_1.0 0.10.2 + bssgp_fc_ms_init@LIBOSMOGB_1.0 0.10.2 + bssgp_flush_all_queues@LIBOSMOGB_1.0 1.3.0 + bssgp_msgb_alloc@LIBOSMOGB_1.0 0.10.2 + bssgp_msgb_copy@LIBOSMOGB_1.0 0.10.2 + bssgp_msgb_ra_put@LIBOSMOGB_1.0 0.11.0 + bssgp_msgb_tlli_put@LIBOSMOGB_1.0 0.10.2 + bssgp_nacc_cause_strs@LIBOSMOGB_1.0 1.5.1 + bssgp_nsi@LIBOSMOGB_1.0 0.10.2 + bssgp_parse_cell_id@LIBOSMOGB_1.0 0.10.2 + bssgp_parse_rim_pdu@LIBOSMOGB_1.0 1.5.1 + bssgp_parse_rim_ri@LIBOSMOGB_1.0 1.5.1 + bssgp_pdu_str@LIBOSMOGB_1.0 0.10.2 + bssgp_ran_inf_app_id_strs@LIBOSMOGB_1.0 1.5.1 + bssgp_rcvmsg@LIBOSMOGB_1.0 0.10.2 + bssgp_rim_ri_name@LIBOSMOGB_1.0 1.5.1 + bssgp_rim_ri_name_buf@LIBOSMOGB_1.0 1.5.1 + bssgp_rim_routing_info_discr_strs@LIBOSMOGB_1.0 1.5.1 + bssgp_rx_paging@LIBOSMOGB_1.0 0.10.2 + bssgp_set_bssgp_callback@LIBOSMOGB_1.0 1.4.0 + bssgp_set_log_ss@LIBOSMOGB_1.0 0.10.2 + bssgp_tx_bvc_block@LIBOSMOGB_1.0 0.10.2 + bssgp_tx_bvc_ptp_reset@LIBOSMOGB_1.0 0.10.2 + bssgp_tx_bvc_reset2@LIBOSMOGB_1.0 1.4.0 + bssgp_tx_bvc_reset@LIBOSMOGB_1.0 0.10.2 + bssgp_tx_bvc_reset_nsei_bvci@LIBOSMOGB_1.0 1.5.1 + bssgp_tx_bvc_unblock@LIBOSMOGB_1.0 0.10.2 + bssgp_tx_dl_ud@LIBOSMOGB_1.0 0.10.2 + bssgp_tx_fc_bvc@LIBOSMOGB_1.0 0.10.2 + bssgp_tx_fc_ms@LIBOSMOGB_1.0 0.10.2 + bssgp_tx_flush_ll_ack@LIBOSMOGB_1.0 0.10.2 + bssgp_tx_llc_discarded@LIBOSMOGB_1.0 0.10.2 + bssgp_tx_paging@LIBOSMOGB_1.0 0.10.2 + bssgp_tx_ra_capa_upd@LIBOSMOGB_1.0 0.10.2 + bssgp_tx_radio_status_imsi@LIBOSMOGB_1.0 0.10.2 + bssgp_tx_radio_status_tlli@LIBOSMOGB_1.0 0.10.2 + bssgp_tx_radio_status_tmsi@LIBOSMOGB_1.0 0.10.2 + bssgp_tx_resume@LIBOSMOGB_1.0 0.10.2 + bssgp_tx_resume_ack@LIBOSMOGB_1.0 0.10.2 + bssgp_tx_resume_nack@LIBOSMOGB_1.0 0.10.2 + bssgp_tx_rim@LIBOSMOGB_1.0 1.5.1 + bssgp_tx_simple_bvci@LIBOSMOGB_1.0 0.10.2 + bssgp_tx_status@LIBOSMOGB_1.0 0.10.2 + bssgp_tx_suspend@LIBOSMOGB_1.0 0.10.2 + bssgp_tx_suspend_ack@LIBOSMOGB_1.0 0.10.2 + bssgp_tx_suspend_nack@LIBOSMOGB_1.0 0.10.2 + bssgp_tx_ul_ud@LIBOSMOGB_1.0 0.10.2 + bssgp_vty_init@LIBOSMOGB_1.0 0.10.2 + btsctx_alloc@LIBOSMOGB_1.0 0.10.2 + btsctx_by_bvci_nsei@LIBOSMOGB_1.0 0.10.2 + btsctx_by_raid_cid@LIBOSMOGB_1.0 0.10.2 + gprs_log_filter_fn@LIBOSMOGB_1.0 0.10.2 + gprs_ns2_aff_cause_prim_strs@LIBOSMOGB_1.0 1.5.1 + gprs_ns2_bind_by_name@LIBOSMOGB_1.0 1.5.1 + gprs_ns2_cause_strs@LIBOSMOGB_1.0 1.5.1 + gprs_ns2_create_nse2@LIBOSMOGB_1.0 1.6.0 + gprs_ns2_create_nse@LIBOSMOGB_1.0 1.5.1 + gprs_ns2_find_vc_by_dlci@LIBOSMOGB_1.0 1.5.1 + gprs_ns2_fr_bind@LIBOSMOGB_1.0 1.5.1 + gprs_ns2_fr_bind_by_netif@LIBOSMOGB_1.0 1.5.1 + gprs_ns2_fr_bind_netif@LIBOSMOGB_1.0 1.5.1 + gprs_ns2_fr_connect@LIBOSMOGB_1.0 1.5.1 + gprs_ns2_fr_nsvc_by_dlci@LIBOSMOGB_1.0 1.5.1 + gprs_ns2_fr_nsvc_dlci@LIBOSMOGB_1.0 1.5.1 + gprs_ns2_free@LIBOSMOGB_1.0 1.5.1 + gprs_ns2_free_bind@LIBOSMOGB_1.0 1.5.1 + gprs_ns2_free_binds@LIBOSMOGB_1.0 1.5.1 + gprs_ns2_free_nse@LIBOSMOGB_1.0 1.5.1 + gprs_ns2_free_nses@LIBOSMOGB_1.0 1.5.1 + gprs_ns2_free_nsvc@LIBOSMOGB_1.0 1.5.1 + gprs_ns2_free_nsvcs@LIBOSMOGB_1.0 1.5.1 + gprs_ns2_frgre_bind@LIBOSMOGB_1.0 1.5.1 + gprs_ns2_instantiate@LIBOSMOGB_1.0 1.5.1 + gprs_ns2_ip_bind@LIBOSMOGB_1.0 1.5.1 + gprs_ns2_ip_bind_by_sockaddr@LIBOSMOGB_1.0 1.5.1 + gprs_ns2_ip_bind_set_dscp@LIBOSMOGB_1.0 1.5.1 + gprs_ns2_ip_bind_set_priority@LIBOSMOGB_1.0 1.6.0 + gprs_ns2_ip_bind_set_sns_weight@LIBOSMOGB_1.0 1.5.1 + gprs_ns2_ip_bind_sockaddr@LIBOSMOGB_1.0 1.5.1 + gprs_ns2_ip_connect2@LIBOSMOGB_1.0 1.5.1 + gprs_ns2_ip_connect@LIBOSMOGB_1.0 1.5.1 + gprs_ns2_ip_connect_inactive@LIBOSMOGB_1.0 1.5.1 + gprs_ns2_ip_vc_equal@LIBOSMOGB_1.0 1.5.1 + gprs_ns2_ip_vc_local@LIBOSMOGB_1.0 1.5.1 + gprs_ns2_ip_vc_remote@LIBOSMOGB_1.0 1.5.1 + gprs_ns2_is_fr_bind@LIBOSMOGB_1.0 1.5.1 + gprs_ns2_is_frgre_bind@LIBOSMOGB_1.0 1.5.1 + gprs_ns2_is_ip_bind@LIBOSMOGB_1.0 1.5.1 + gprs_ns2_ll_str@LIBOSMOGB_1.0 1.5.1 + gprs_ns2_ll_str_buf@LIBOSMOGB_1.0 1.5.1 + gprs_ns2_ll_str_c@LIBOSMOGB_1.0 1.5.1 + gprs_ns2_lltype_strs@LIBOSMOGB_1.0 1.5.1 + gprs_ns2_nse_by_nsei@LIBOSMOGB_1.0 1.5.1 + gprs_ns2_nse_foreach_nsvc@LIBOSMOGB_1.0 1.5.1 + gprs_ns2_nse_nsei@LIBOSMOGB_1.0 1.5.1 + gprs_ns2_nse_sns_remote@LIBOSMOGB_1.0 1.5.1 + gprs_ns2_nsvc_by_nsvci@LIBOSMOGB_1.0 1.5.1 + gprs_ns2_nsvc_state_name@LIBOSMOGB_1.0 1.5.1 + gprs_ns2_prim_strs@LIBOSMOGB_1.0 1.5.1 + gprs_ns2_recv_prim@LIBOSMOGB_1.0 1.5.1 + gprs_ns2_sns_add_bind@LIBOSMOGB_1.0 1.5.1 + gprs_ns2_sns_add_endpoint@LIBOSMOGB_1.0 1.5.1 + gprs_ns2_sns_del_bind@LIBOSMOGB_1.0 1.5.1 + gprs_ns2_sns_del_endpoint@LIBOSMOGB_1.0 1.5.1 + gprs_ns2_start_alive_all_nsvcs@LIBOSMOGB_1.0 1.5.1 + gprs_ns2_vty_init@LIBOSMOGB_1.0 1.5.1 + gprs_ns2_vty_init_reduced@LIBOSMOGB_1.0 1.5.1 + gprs_ns_cause_str@LIBOSMOGB_1.0 0.10.2 + gprs_ns_close@LIBOSMOGB_1.0 0.10.2 + gprs_ns_destroy@LIBOSMOGB_1.0 0.10.2 + gprs_ns_frgre_listen@LIBOSMOGB_1.0 0.10.2 + gprs_ns_frgre_sendmsg@LIBOSMOGB_1.0 0.10.2 + gprs_ns_instantiate@LIBOSMOGB_1.0 0.10.2 + gprs_ns_ll_clear@LIBOSMOGB_1.0 0.10.2 + gprs_ns_ll_copy@LIBOSMOGB_1.0 0.10.2 + gprs_ns_ll_str@LIBOSMOGB_1.0 0.10.2 + gprs_ns_ll_str_buf@LIBOSMOGB_1.0 1.3.0 + gprs_ns_ll_str_c@LIBOSMOGB_1.0 1.3 + gprs_ns_msgb_alloc@LIBOSMOGB_1.0 0.10.2 + gprs_ns_nsip_connect@LIBOSMOGB_1.0 0.10.2 + gprs_ns_nsip_connect_sns@LIBOSMOGB_1.0 1.3.0 + gprs_ns_nsip_listen@LIBOSMOGB_1.0 0.10.2 + gprs_ns_pdu_strings@LIBOSMOGB_1.0 0.10.2 + gprs_ns_rcvmsg@LIBOSMOGB_1.0 0.10.2 + gprs_ns_sendmsg@LIBOSMOGB_1.0 0.10.2 + gprs_ns_set_log_ss@LIBOSMOGB_1.0 0.10.2 + gprs_ns_signal_ns_names@LIBOSMOGB_1.0 0.10.2 + gprs_ns_tx_alive@LIBOSMOGB_1.0 0.10.2 + gprs_ns_tx_alive_ack@LIBOSMOGB_1.0 0.10.2 + gprs_ns_tx_block@LIBOSMOGB_1.0 0.10.2 + gprs_ns_tx_reset@LIBOSMOGB_1.0 0.10.2 + gprs_ns_tx_status@LIBOSMOGB_1.0 0.10.2 + gprs_ns_tx_unblock@LIBOSMOGB_1.0 0.10.2 + gprs_ns_vty_init@LIBOSMOGB_1.0 0.10.2 + gprs_nsvc_by_nsei@LIBOSMOGB_1.0 0.10.2 + gprs_nsvc_by_nsvci@LIBOSMOGB_1.0 0.10.2 + gprs_nsvc_create2@LIBOSMOGB_1.0 1.4.0 +#MISSING: 1.4.0# gprs_nsvc_create@LIBOSMOGB_1.0 0.10.2 + gprs_nsvc_delete@LIBOSMOGB_1.0 0.10.2 + gprs_nsvc_reset@LIBOSMOGB_1.0 0.10.2 + gprs_nsvc_state_append@LIBOSMOGB_1.0 0.12.0 + osmo_fr_dlc_alloc@LIBOSMOGB_1.0 1.5.1 + osmo_fr_link_alloc@LIBOSMOGB_1.0 1.5.1 + osmo_fr_link_free@LIBOSMOGB_1.0 1.5.1 + osmo_fr_network_alloc@LIBOSMOGB_1.0 1.5.1 + osmo_fr_network_free@LIBOSMOGB_1.0 1.6.0 + osmo_fr_role_names@LIBOSMOGB_1.0 1.5.1 + osmo_fr_rx@LIBOSMOGB_1.0 1.5.1 + osmo_fr_tx_dlc@LIBOSMOGB_1.0 1.5.1 + osmo_pdef_bssgp@LIBOSMOGB_1.0 1.5.1 diff -Nru libosmocore-1.6.0/debian/libosmogsm17.install libosmocore-1.7.0/debian/libosmogsm17.install --- libosmocore-1.6.0/debian/libosmogsm17.install 2022-03-13 20:16:43.000000000 +0000 +++ libosmocore-1.7.0/debian/libosmogsm17.install 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -usr/lib/*/libosmogsm*.so.* diff -Nru libosmocore-1.6.0/debian/libosmogsm17.symbols libosmocore-1.7.0/debian/libosmogsm17.symbols --- libosmocore-1.6.0/debian/libosmogsm17.symbols 2022-03-13 20:16:43.000000000 +0000 +++ libosmocore-1.7.0/debian/libosmogsm17.symbols 1970-01-01 00:00:00.000000000 +0000 @@ -1,713 +0,0 @@ -libosmogsm.so.17 libosmogsm17 #MINVER# -* Build-Depends-Package: libosmocore-dev - LIBOSMOGSM_1.0@LIBOSMOGSM_1.0 0.10.2 - _osmo_mncc_log@LIBOSMOGSM_1.0 0.11.0 - abis_mm_event_cause_names@LIBOSMOGSM_1.0 0.10.2 - abis_nm_adm_state_names@LIBOSMOGSM_1.0 0.10.2 - abis_nm_att_names@LIBOSMOGSM_1.0 0.10.2 - abis_nm_att_settable@LIBOSMOGSM_1.0 0.10.2 - abis_nm_att_tlvdef@LIBOSMOGSM_1.0 0.10.2 - abis_nm_att_tlvdef_ipa@LIBOSMOGSM_1.0 0.10.2 - abis_nm_avail_name@LIBOSMOGSM_1.0 0.10.2 - abis_nm_chcomb4pchan@LIBOSMOGSM_1.0 0.10.2 - abis_nm_debugp_foh@LIBOSMOGSM_1.0 0.10.2 - abis_nm_dump_foh@LIBOSMOGSM_1.0 0.11.0 - abis_nm_dump_foh_buf@LIBOSMOGSM_1.0 1.3.0 - abis_nm_dump_foh_c@LIBOSMOGSM_1.0 1.3.0 - abis_nm_event_type_name@LIBOSMOGSM_1.0 0.10.2 - abis_nm_fail_evt_rep@LIBOSMOGSM_1.0 0.10.2 - abis_nm_fail_evt_vrep@LIBOSMOGSM_1.0 0.10.2 - abis_nm_get_sw_conf@LIBOSMOGSM_1.0 0.10.2 - abis_nm_get_sw_desc_len@LIBOSMOGSM_1.0 0.10.2 - abis_nm_ipa_magic@LIBOSMOGSM_1.0 0.10.2 - abis_nm_msg_disc_names@LIBOSMOGSM_1.0 0.10.2 - abis_nm_msgtype_names@LIBOSMOGSM_1.0 0.10.2 - abis_nm_nack_cause_name@LIBOSMOGSM_1.0 0.10.2 - abis_nm_nack_name@LIBOSMOGSM_1.0 0.10.2 - abis_nm_nacks@LIBOSMOGSM_1.0 0.10.2 - abis_nm_no_ack_nack@LIBOSMOGSM_1.0 0.10.2 - abis_nm_obj_class_names@LIBOSMOGSM_1.0 0.10.2 - abis_nm_opstate_name@LIBOSMOGSM_1.0 0.10.2 - abis_nm_osmo_att_tlvdef@LIBOSMOGSM_1.0 0.10.2 - abis_nm_osmo_magic@LIBOSMOGSM_1.0 0.10.2 - abis_nm_pcause_type_names@LIBOSMOGSM_1.0 0.10.2 - abis_nm_pchan4chcomb@LIBOSMOGSM_1.0 0.10.2 - abis_nm_put_sw_desc@LIBOSMOGSM_1.0 0.10.2 - abis_nm_put_sw_file@LIBOSMOGSM_1.0 0.10.2 - abis_nm_reports@LIBOSMOGSM_1.0 0.10.2 - abis_nm_severity_name@LIBOSMOGSM_1.0 0.10.2 - abis_nm_sw_desc_len@LIBOSMOGSM_1.0 0.10.2 - abis_nm_sw_load_msgs@LIBOSMOGSM_1.0 0.10.2 - abis_nm_t200_ms@LIBOSMOGSM_1.0 0.10.2 - abis_nm_test_name@LIBOSMOGSM_1.0 0.10.2 - bitvec_add_range1024@LIBOSMOGSM_1.0 0.10.2 - cbsp_att_tlvdef@LIBOSMOGSM_1.0 1.3.0 - cbsp_category_names@LIBOSMOGSM_1.0 1.3.0 - cbsp_iei_names@LIBOSMOGSM_1.0 1.3.0 - cbsp_msg_type_names@LIBOSMOGSM_1.0 1.3.0 - comp128@LIBOSMOGSM_1.0 0.10.2 - comp128v2@LIBOSMOGSM_1.0 0.10.2 - comp128v3@LIBOSMOGSM_1.0 0.10.2 - dbm2rxlev@LIBOSMOGSM_1.0 0.10.2 - egprs_get_cps@LIBOSMOGSM_1.0 0.10.2 - gan_msgt_vals@LIBOSMOGSM_1.0 0.10.2 - gan_pdisc_vals@LIBOSMOGSM_1.0 0.10.2 - gprs_att_t_strs@LIBOSMOGSM_1.0 0.10.2 - gprs_cipher_gen_input_i@LIBOSMOGSM_1.0 0.10.2 - gprs_cipher_gen_input_ui@LIBOSMOGSM_1.0 0.10.2 - gprs_cipher_key_length@LIBOSMOGSM_1.0 0.10.2 - gprs_cipher_load@LIBOSMOGSM_1.0 0.10.2 - gprs_cipher_names@LIBOSMOGSM_1.0 0.10.2 - gprs_cipher_register@LIBOSMOGSM_1.0 0.10.2 - gprs_cipher_run@LIBOSMOGSM_1.0 0.10.2 - gprs_cipher_supported@LIBOSMOGSM_1.0 0.10.2 - gprs_det_t_mo_strs@LIBOSMOGSM_1.0 0.10.2 - gprs_det_t_mt_strs@LIBOSMOGSM_1.0 0.10.2 - gprs_ms_net_cap_gea_supported@LIBOSMOGSM_1.0 0.10.2 - gprs_msgt_gmm_names@LIBOSMOGSM_1.0 0.10.2 - gprs_service_t_strs@LIBOSMOGSM_1.0 0.10.2 - gprs_tlli_type@LIBOSMOGSM_1.0 0.10.2 - gprs_tmsi2tlli@LIBOSMOGSM_1.0 0.10.2 - gprs_upd_t_strs@LIBOSMOGSM_1.0 0.10.2 - gsm0341_build_msg@LIBOSMOGSM_1.0 0.10.2 - gsm0406_dlci_sapi_names@LIBOSMOGSM_1.0 1.3.0 - gsm0480_comp_type_names@LIBOSMOGSM_1.0 0.12.0 - gsm0480_create_notifySS@LIBOSMOGSM_1.0 0.10.2 - gsm0480_create_release_complete@LIBOSMOGSM_1.0 1.3.0 - gsm0480_create_unstructuredSS_Notify@LIBOSMOGSM_1.0 0.10.2 - gsm0480_create_ussd_notify@LIBOSMOGSM_1.0 0.10.2 - gsm0480_create_ussd_release_complete@LIBOSMOGSM_1.0 0.10.2 - gsm0480_create_ussd_resp@LIBOSMOGSM_1.0 0.10.2 - gsm0480_decode_ss_request@LIBOSMOGSM_1.0 0.10.2 - gsm0480_decode_ussd_request@LIBOSMOGSM_1.0 0.10.2 - gsm0480_extract_ie_by_tag@LIBOSMOGSM_1.0 0.12.0 - gsm0480_gen_reject@LIBOSMOGSM_1.0 1.3.0 - gsm0480_gen_return_error@LIBOSMOGSM_1.0 1.3.0 - gsm0480_gen_ussd_resp_7bit@LIBOSMOGSM_1.0 1.3.0 - gsm0480_msgb_alloc_name@LIBOSMOGSM_1.0 1.3.0 - gsm0480_op_code_names@LIBOSMOGSM_1.0 0.12.0 - gsm0480_parse_facility_ie@LIBOSMOGSM_1.0 0.12.0 - gsm0480_wrap_facility@LIBOSMOGSM_1.0 0.10.2 - gsm0480_wrap_invoke@LIBOSMOGSM_1.0 0.10.2 - gsm0502_calc_paging_group@LIBOSMOGSM_1.0 0.10.2 - gsm0502_fn_remap@LIBOSMOGSM_1.0 1.3.0 - gsm0502_hop_seq_gen@LIBOSMOGSM_1.0 1.4.0 - gsm0503_cs2@LIBOSMOGSM_1.0 0.10.2 - gsm0503_cs2_np@LIBOSMOGSM_1.0 0.10.2 - gsm0503_cs3@LIBOSMOGSM_1.0 0.10.2 - gsm0503_cs3_np@LIBOSMOGSM_1.0 0.10.2 - gsm0503_mcs1@LIBOSMOGSM_1.0 0.10.2 - gsm0503_mcs1_dl_hdr@LIBOSMOGSM_1.0 0.10.2 - gsm0503_mcs1_ul_hdr@LIBOSMOGSM_1.0 0.10.2 - gsm0503_mcs2@LIBOSMOGSM_1.0 0.10.2 - gsm0503_mcs3@LIBOSMOGSM_1.0 0.10.2 - gsm0503_mcs4@LIBOSMOGSM_1.0 0.10.2 - gsm0503_mcs5@LIBOSMOGSM_1.0 0.10.2 - gsm0503_mcs5_dl_hdr@LIBOSMOGSM_1.0 0.10.2 - gsm0503_mcs5_ul_hdr@LIBOSMOGSM_1.0 0.10.2 - gsm0503_mcs6@LIBOSMOGSM_1.0 0.10.2 - gsm0503_mcs7@LIBOSMOGSM_1.0 0.10.2 - gsm0503_mcs7_dl_hdr@LIBOSMOGSM_1.0 0.10.2 - gsm0503_mcs7_ul_hdr@LIBOSMOGSM_1.0 0.10.2 - gsm0503_mcs8@LIBOSMOGSM_1.0 0.10.2 - gsm0503_mcs9@LIBOSMOGSM_1.0 0.10.2 - gsm0503_rach@LIBOSMOGSM_1.0 0.10.2 - gsm0503_rach_ext@LIBOSMOGSM_1.0 0.11.0 - gsm0503_sch@LIBOSMOGSM_1.0 0.10.2 - gsm0503_tch_afs_10_2@LIBOSMOGSM_1.0 0.10.2 - gsm0503_tch_afs_12_2@LIBOSMOGSM_1.0 0.10.2 - gsm0503_tch_afs_4_75@LIBOSMOGSM_1.0 0.10.2 - gsm0503_tch_afs_5_15@LIBOSMOGSM_1.0 0.10.2 - gsm0503_tch_afs_5_9@LIBOSMOGSM_1.0 0.10.2 - gsm0503_tch_afs_6_7@LIBOSMOGSM_1.0 0.10.2 - gsm0503_tch_afs_7_4@LIBOSMOGSM_1.0 0.10.2 - gsm0503_tch_afs_7_95@LIBOSMOGSM_1.0 0.10.2 - gsm0503_tch_ahs_4_75@LIBOSMOGSM_1.0 0.10.2 - gsm0503_tch_ahs_5_15@LIBOSMOGSM_1.0 0.10.2 - gsm0503_tch_ahs_5_9@LIBOSMOGSM_1.0 0.10.2 - gsm0503_tch_ahs_6_7@LIBOSMOGSM_1.0 0.10.2 - gsm0503_tch_ahs_7_4@LIBOSMOGSM_1.0 0.10.2 - gsm0503_tch_ahs_7_95@LIBOSMOGSM_1.0 0.10.2 - gsm0503_tch_axs_sid_update@LIBOSMOGSM_1.0 1.4.0 - gsm0503_tch_fr@LIBOSMOGSM_1.0 0.10.2 - gsm0503_tch_hr@LIBOSMOGSM_1.0 0.10.2 - gsm0503_xcch@LIBOSMOGSM_1.0 0.10.2 - gsm0808_att_tlvdef@LIBOSMOGSM_1.0 0.10.2 - gsm0808_bssap_name@LIBOSMOGSM_1.0 0.10.2 - gsm0808_bssmap_name@LIBOSMOGSM_1.0 0.10.2 - gsm0808_cause_class_name@LIBOSMOGSM_1.0 1.3.0 - gsm0808_cause_name@LIBOSMOGSM_1.0 0.11.0 - gsm0808_cell_id_discr_names@LIBOSMOGSM_1.0 0.11.0 - gsm0808_cell_id_from_cgi@LIBOSMOGSM_1.0 1.3.0 - gsm0808_cell_id_list_add@LIBOSMOGSM_1.0 0.11.0 - gsm0808_cell_id_list_name@LIBOSMOGSM_1.0 0.11.0 - gsm0808_cell_id_list_name_buf@LIBOSMOGSM_1.0 0.11.0 - gsm0808_cell_id_list_name_c@LIBOSMOGSM_1.0 1.3.0 - gsm0808_cell_id_matches_list@LIBOSMOGSM_1.0 1.3.0 - gsm0808_cell_id_name2@LIBOSMOGSM_1.0 0.11.0 - gsm0808_cell_id_name@LIBOSMOGSM_1.0 0.11.0 - gsm0808_cell_id_name_buf@LIBOSMOGSM_1.0 1.3.0 - gsm0808_cell_id_name_c@LIBOSMOGSM_1.0 1.3.0 - gsm0808_cell_id_to_cgi@LIBOSMOGSM_1.0 1.3.0 - gsm0808_cell_id_to_list@LIBOSMOGSM_1.0 0.12.0 - gsm0808_cell_id_u_name@LIBOSMOGSM_1.0 0.11.0 - gsm0808_cell_ids_match@LIBOSMOGSM_1.0 1.3.0 - gsm0808_chan_type_to_speech_codec@LIBOSMOGSM_1.0 0.10.2 - gsm0808_channel_type_name@LIBOSMOGSM_1.0 0.12.0 - gsm0808_channel_type_name_buf@LIBOSMOGSM_1.0 1.3.0 - gsm0808_channel_type_name_c@LIBOSMOGSM_1.0 1.3.0 - gsm0808_chosen_enc_alg_names@LIBOSMOGSM_1.0 0.12.0 - gsm0808_create_ass2@LIBOSMOGSM_1.0 1.3.0 - gsm0808_create_ass@LIBOSMOGSM_1.0 0.10.2 - gsm0808_create_ass_compl2@LIBOSMOGSM_1.0 1.3.0 - gsm0808_create_ass_compl@LIBOSMOGSM_1.0 0.10.2 - gsm0808_create_ass_fail@LIBOSMOGSM_1.0 0.10.2 - gsm0808_create_assignment_completed@LIBOSMOGSM_1.0 0.10.2 - gsm0808_create_assignment_failure@LIBOSMOGSM_1.0 0.10.2 - gsm0808_create_cipher2@LIBOSMOGSM_1.0 1.6.0 - gsm0808_create_cipher@LIBOSMOGSM_1.0 0.10.2 - gsm0808_create_cipher_complete@LIBOSMOGSM_1.0 0.10.2 - gsm0808_create_cipher_reject@LIBOSMOGSM_1.0 0.10.2 - gsm0808_create_cipher_reject_ext@LIBOSMOGSM_1.0 1.3.0 - gsm0808_create_classmark_request@LIBOSMOGSM_1.0 1.3.0 - gsm0808_create_classmark_update@LIBOSMOGSM_1.0 0.10.2 - gsm0808_create_clear_command2@LIBOSMOGSM_1.0 1.3.0 - gsm0808_create_clear_command@LIBOSMOGSM_1.0 0.10.2 - gsm0808_create_clear_complete@LIBOSMOGSM_1.0 0.10.2 - gsm0808_create_clear_rqst@LIBOSMOGSM_1.0 0.10.2 - gsm0808_create_common_id@LIBOSMOGSM_1.0 1.4.0 - gsm0808_create_dtap@LIBOSMOGSM_1.0 0.10.2 - gsm0808_create_handover_command@LIBOSMOGSM_1.0 1.3.0 - gsm0808_create_handover_complete@LIBOSMOGSM_1.0 0.12.0 - gsm0808_create_handover_detect@LIBOSMOGSM_1.0 0.12.0 - gsm0808_create_handover_failure@LIBOSMOGSM_1.0 0.12.0 - gsm0808_create_handover_performed@LIBOSMOGSM_1.0 1.3.0 - gsm0808_create_handover_request@LIBOSMOGSM_1.0 1.3.0 - gsm0808_create_handover_request_ack2@LIBOSMOGSM_1.0 1.3.0 - gsm0808_create_handover_request_ack@LIBOSMOGSM_1.0 0.12.0 - gsm0808_create_handover_required@LIBOSMOGSM_1.0 0.12.0 - gsm0808_create_handover_required_reject@LIBOSMOGSM_1.0 1.3.0 - gsm0808_create_handover_succeeded@LIBOSMOGSM_1.0 1.3.0 - gsm0808_create_layer3@LIBOSMOGSM_1.0 0.10.2 - gsm0808_create_layer3_2@LIBOSMOGSM_1.0 0.11.0 - gsm0808_create_layer3_aoip@LIBOSMOGSM_1.0 0.10.2 - gsm0808_create_lcls_conn_ctrl@LIBOSMOGSM_1.0 0.12.0 - gsm0808_create_lcls_conn_ctrl_ack@LIBOSMOGSM_1.0 0.12.0 - gsm0808_create_lcls_notification@LIBOSMOGSM_1.0 0.12.0 - gsm0808_create_paging2@LIBOSMOGSM_1.0 0.11.0 - gsm0808_create_paging@LIBOSMOGSM_1.0 0.10.2 - gsm0808_create_perform_location_abort@LIBOSMOGSM_1.0 1.5.1 - gsm0808_create_perform_location_request@LIBOSMOGSM_1.0 1.5.1 - gsm0808_create_perform_location_response@LIBOSMOGSM_1.0 1.5.1 - gsm0808_create_reset@LIBOSMOGSM_1.0 0.10.2 - gsm0808_create_reset_ack@LIBOSMOGSM_1.0 0.10.2 - gsm0808_create_sapi_reject@LIBOSMOGSM_1.0 0.10.2 - gsm0808_create_sapi_reject_cause@LIBOSMOGSM_1.0 1.5.1 - gsm0808_dec_aoip_trasp_addr@LIBOSMOGSM_1.0 0.10.2 - gsm0808_dec_cell_id@LIBOSMOGSM_1.0 0.11.0 - gsm0808_dec_cell_id_list2@LIBOSMOGSM_1.0 0.11.0 - gsm0808_dec_cell_id_list@LIBOSMOGSM_1.0 0.10.2 - gsm0808_dec_channel_type@LIBOSMOGSM_1.0 0.10.2 - gsm0808_dec_encrypt_info@LIBOSMOGSM_1.0 0.10.2 - gsm0808_dec_kc128@LIBOSMOGSM_1.0 1.6.0 - gsm0808_dec_lcls@LIBOSMOGSM_1.0 1.3.0 - gsm0808_dec_osmux_cid@LIBOSMOGSM_1.0 1.3.0 - gsm0808_dec_speech_codec@LIBOSMOGSM_1.0 0.10.2 - gsm0808_dec_speech_codec_list@LIBOSMOGSM_1.0 0.10.2 - gsm0808_decode_cell_id_u@LIBOSMOGSM_1.0 1.3.0 - gsm0808_diagnostics_bit_location_str@LIBOSMOGSM_1.0 1.4.0 - gsm0808_diagnostics_octet_location_str@LIBOSMOGSM_1.0 1.4.0 - gsm0808_enc_aoip_trasp_addr@LIBOSMOGSM_1.0 0.10.2 - gsm0808_enc_cause@LIBOSMOGSM_1.0 1.3.0 - gsm0808_enc_cell_id@LIBOSMOGSM_1.0 0.11.0 - gsm0808_enc_cell_id_list2@LIBOSMOGSM_1.0 0.11.0 - gsm0808_enc_cell_id_list@LIBOSMOGSM_1.0 0.10.2 - gsm0808_enc_channel_type@LIBOSMOGSM_1.0 0.10.2 - gsm0808_enc_encrypt_info@LIBOSMOGSM_1.0 0.10.2 - gsm0808_enc_kc128@LIBOSMOGSM_1.0 1.6.0 - gsm0808_enc_lcls@LIBOSMOGSM_1.0 1.3.0 - gsm0808_enc_speech_codec@LIBOSMOGSM_1.0 0.10.2 - gsm0808_enc_speech_codec_list@LIBOSMOGSM_1.0 0.10.2 - gsm0808_get_cause@LIBOSMOGSM_1.0 1.4.0 - gsm0808_get_cipher_reject_cause@LIBOSMOGSM_1.0 1.3.0 - gsm0808_lcls_config_names@LIBOSMOGSM_1.0 0.12.0 - gsm0808_lcls_control_names@LIBOSMOGSM_1.0 0.12.0 - gsm0808_lcls_status_names@LIBOSMOGSM_1.0 0.12.0 - gsm0808_msgb_put_cell_id_u@LIBOSMOGSM_1.0 1.3.0 - gsm0808_old_bss_to_new_bss_info_att_tlvdef@LIBOSMOGSM_1.0 1.6.0 - gsm0808_permitted_speech_names@LIBOSMOGSM_1.0 0.12.0 - gsm0808_prepend_dtap_header@LIBOSMOGSM_1.0 0.10.2 - gsm0808_sc_cfg_from_gsm48_mr_cfg@LIBOSMOGSM_1.0 1.3.0 - gsm0808_speech_codec_from_chan_type@LIBOSMOGSM_1.0 0.10.2 - gsm0808_speech_codec_type_names@LIBOSMOGSM_1.0 0.11.0 - gsm0858_rsl_ul_meas_enc@LIBOSMOGSM_1.0 0.10.2 - gsm29118_create_alert_req@LIBOSMOGSM_1.0 1.3.0 - gsm29118_create_dl_ud@LIBOSMOGSM_1.0 1.3.0 - gsm29118_create_eps_det_ack@LIBOSMOGSM_1.0 1.3.0 - gsm29118_create_imsi_det_ack@LIBOSMOGSM_1.0 1.3.0 - gsm29118_create_lu_ack@LIBOSMOGSM_1.0 1.3.0 - gsm29118_create_lu_rej@LIBOSMOGSM_1.0 1.3.0 - gsm29118_create_mm_info_req@LIBOSMOGSM_1.0 1.3.0 - gsm29118_create_paging_req@LIBOSMOGSM_1.0 1.3.0 - gsm29118_create_release_req@LIBOSMOGSM_1.0 1.3.0 - gsm29118_create_reset_ack@LIBOSMOGSM_1.0 1.3.0 - gsm29118_create_reset_ind@LIBOSMOGSM_1.0 1.3.0 - gsm29118_create_service_abort_req@LIBOSMOGSM_1.0 1.3.0 - gsm29118_create_status@LIBOSMOGSM_1.0 1.3.0 - gsm29118_msgb_alloc@LIBOSMOGSM_1.0 1.3.0 - gsm338_get_sms_alphabet@LIBOSMOGSM_1.0 0.10.2 - gsm340_gen_oa@LIBOSMOGSM_1.0 0.10.2 - gsm340_gen_scts@LIBOSMOGSM_1.0 0.10.2 - gsm340_scts@LIBOSMOGSM_1.0 0.10.2 - gsm340_validity_period@LIBOSMOGSM_1.0 0.10.2 - gsm411_bcdify@LIBOSMOGSM_1.0 0.10.2 - gsm411_cp_cause_strs@LIBOSMOGSM_1.0 0.10.2 - gsm411_cp_state_names@LIBOSMOGSM_1.0 0.11.0 - gsm411_msgb_alloc@LIBOSMOGSM_1.0 0.10.2 - gsm411_push_cp_header@LIBOSMOGSM_1.0 0.10.2 - gsm411_push_rp_header@LIBOSMOGSM_1.0 0.10.2 - gsm411_rp_cause_strs@LIBOSMOGSM_1.0 0.10.2 - gsm411_rp_state_names@LIBOSMOGSM_1.0 0.11.0 - gsm411_smc_clear@LIBOSMOGSM_1.0 0.10.2 - gsm411_smc_init@LIBOSMOGSM_1.0 0.10.2 - gsm411_smc_recv@LIBOSMOGSM_1.0 0.10.2 - gsm411_smc_send@LIBOSMOGSM_1.0 0.10.2 - gsm411_smr_clear@LIBOSMOGSM_1.0 0.10.2 - gsm411_smr_init@LIBOSMOGSM_1.0 0.10.2 - gsm411_smr_recv@LIBOSMOGSM_1.0 0.10.2 - gsm411_smr_send@LIBOSMOGSM_1.0 0.10.2 - gsm411_unbcdify@LIBOSMOGSM_1.0 0.10.2 - gsm414_msgt_names@LIBOSMOGSM_1.0 0.10.2 - gsm48_att_tlvdef@LIBOSMOGSM_1.0 0.10.2 - gsm48_cc_cause_names@LIBOSMOGSM_1.0 1.3.0 - gsm48_cc_msg_name@LIBOSMOGSM_1.0 0.10.2 - gsm48_cc_msgtype_names@LIBOSMOGSM_1.0 0.10.2 - gsm48_cc_state_name@LIBOSMOGSM_1.0 0.10.2 - gsm48_chan_mode_names@LIBOSMOGSM_1.0 0.10.2 - gsm48_chan_mode_to_non_vamos@LIBOSMOGSM_1.0 1.6.0 - gsm48_chan_mode_to_vamos@LIBOSMOGSM_1.0 1.6.0 - gsm48_construct_ra@LIBOSMOGSM_1.0 0.10.2 - gsm48_decode_bcd_number2@LIBOSMOGSM_1.0 1.3.0 - gsm48_decode_bcd_number@LIBOSMOGSM_1.0 0.10.2 - gsm48_decode_bearer_cap@LIBOSMOGSM_1.0 0.10.2 - gsm48_decode_called@LIBOSMOGSM_1.0 0.10.2 - gsm48_decode_callerid@LIBOSMOGSM_1.0 0.10.2 - gsm48_decode_calling@LIBOSMOGSM_1.0 0.10.2 - gsm48_decode_cause@LIBOSMOGSM_1.0 0.10.2 - gsm48_decode_cccap@LIBOSMOGSM_1.0 0.10.2 - gsm48_decode_classmark3@LIBOSMOGSM_1.0 1.5.1 - gsm48_decode_connected@LIBOSMOGSM_1.0 0.10.2 - gsm48_decode_facility@LIBOSMOGSM_1.0 0.10.2 - gsm48_decode_freq_list@LIBOSMOGSM_1.0 0.10.2 - gsm48_decode_keypad@LIBOSMOGSM_1.0 0.10.2 - gsm48_decode_lai2@LIBOSMOGSM_1.0 0.11.0 - gsm48_decode_lai@LIBOSMOGSM_1.0 0.10.2 - gsm48_decode_notify@LIBOSMOGSM_1.0 0.10.2 - gsm48_decode_progress@LIBOSMOGSM_1.0 0.10.2 - gsm48_decode_redirecting@LIBOSMOGSM_1.0 0.10.2 - gsm48_decode_signal@LIBOSMOGSM_1.0 0.10.2 - gsm48_decode_ssversion@LIBOSMOGSM_1.0 0.10.2 - gsm48_decode_useruser@LIBOSMOGSM_1.0 0.10.2 - gsm48_encode_bcd_number@LIBOSMOGSM_1.0 0.10.2 - gsm48_encode_bearer_cap@LIBOSMOGSM_1.0 0.10.2 - gsm48_encode_called@LIBOSMOGSM_1.0 0.10.2 - gsm48_encode_callerid@LIBOSMOGSM_1.0 0.10.2 - gsm48_encode_calling@LIBOSMOGSM_1.0 0.10.2 - gsm48_encode_cause@LIBOSMOGSM_1.0 0.10.2 - gsm48_encode_cccap@LIBOSMOGSM_1.0 0.10.2 - gsm48_encode_connected@LIBOSMOGSM_1.0 0.10.2 - gsm48_encode_facility@LIBOSMOGSM_1.0 0.10.2 - gsm48_encode_keypad@LIBOSMOGSM_1.0 0.10.2 - gsm48_encode_more@LIBOSMOGSM_1.0 0.10.2 - gsm48_encode_notify@LIBOSMOGSM_1.0 0.10.2 - gsm48_encode_progress@LIBOSMOGSM_1.0 0.10.2 - gsm48_encode_ra@LIBOSMOGSM_1.0 0.11.0 - gsm48_encode_redirecting@LIBOSMOGSM_1.0 0.10.2 - gsm48_encode_signal@LIBOSMOGSM_1.0 0.10.2 - gsm48_encode_ssversion@LIBOSMOGSM_1.0 0.10.2 - gsm48_encode_useruser@LIBOSMOGSM_1.0 0.10.2 - gsm48_generate_lai2@LIBOSMOGSM_1.0 0.11.0 - gsm48_generate_lai@LIBOSMOGSM_1.0 0.10.2 - gsm48_generate_mid@LIBOSMOGSM_1.0 0.11.0 - gsm48_generate_mid_from_imsi@LIBOSMOGSM_1.0 0.10.2 - gsm48_generate_mid_from_tmsi@LIBOSMOGSM_1.0 0.10.2 - gsm48_gmm_cause_names@LIBOSMOGSM_1.0 0.10.2 - gsm48_gsm_cause_names@LIBOSMOGSM_1.0 0.10.2 - gsm48_hdr_gmm_cipherable@LIBOSMOGSM_1.0 0.10.2 - gsm48_mcc_mnc_from_bcd@LIBOSMOGSM_1.0 0.10.2 - gsm48_mcc_mnc_to_bcd@LIBOSMOGSM_1.0 0.10.2 - gsm48_mi_to_string@LIBOSMOGSM_1.0 0.10.2 - gsm48_mi_type_name@LIBOSMOGSM_1.0 0.10.2 - gsm48_mm_att_tlvdef@LIBOSMOGSM_1.0 0.10.2 - gsm48_mm_msgtype_names@LIBOSMOGSM_1.0 0.10.2 - gsm48_mr_cfg_from_gsm0808_sc_cfg@LIBOSMOGSM_1.0 1.3.0 - gsm48_number_of_paging_subchannels@LIBOSMOGSM_1.0 0.10.2 - gsm48_parse_ra@LIBOSMOGSM_1.0 0.10.2 - gsm48_pdisc_msgtype_name@LIBOSMOGSM_1.0 0.10.2 - gsm48_pdisc_msgtype_name_buf@LIBOSMOGSM_1.0 1.3.0 - gsm48_pdisc_msgtype_name_c@LIBOSMOGSM_1.0 1.3.0 - gsm48_pdisc_names@LIBOSMOGSM_1.0 0.10.2 - gsm48_push_l3hdr@LIBOSMOGSM_1.0 1.3.0 - gsm48_ra_equal@LIBOSMOGSM_1.0 1.5.1 - gsm48_reject_value_names@LIBOSMOGSM_1.0 0.11.0 - gsm48_rr_att_tlvdef@LIBOSMOGSM_1.0 0.10.2 - gsm48_rr_msg_name@LIBOSMOGSM_1.0 0.10.2 - gsm48_rr_msgtype_names@LIBOSMOGSM_1.0 0.10.2 - gsm48_set_dtx@LIBOSMOGSM_1.0 0.10.2 - gsm_7bit_decode@LIBOSMOGSM_1.0 0.10.2 - gsm_7bit_decode_n@LIBOSMOGSM_1.0 0.10.2 - gsm_7bit_decode_n_hdr@LIBOSMOGSM_1.0 0.10.2 - gsm_7bit_decode_n_ussd@LIBOSMOGSM_1.0 0.10.2 - gsm_7bit_decode_ussd@LIBOSMOGSM_1.0 0.10.2 - gsm_7bit_encode@LIBOSMOGSM_1.0 0.10.2 - gsm_7bit_encode_n@LIBOSMOGSM_1.0 0.10.2 - gsm_7bit_encode_n_ussd@LIBOSMOGSM_1.0 0.10.2 - gsm_7bit_encode_oct@LIBOSMOGSM_1.0 0.10.2 - gsm_7bit_encode_ussd@LIBOSMOGSM_1.0 0.10.2 - gsm_arfcn2band@LIBOSMOGSM_1.0 0.10.2 - gsm_arfcn2band_rc@LIBOSMOGSM_1.0 1.3.0 - gsm_arfcn2freq10@LIBOSMOGSM_1.0 0.10.2 - gsm_band_name@LIBOSMOGSM_1.0 0.10.2 - gsm_band_parse@LIBOSMOGSM_1.0 0.10.2 - gsm_chan_t_names@LIBOSMOGSM_1.0 0.10.2 - gsm_fn2gsmtime@LIBOSMOGSM_1.0 0.10.2 - gsm_fn_as_gsmtime_str@LIBOSMOGSM_1.0 0.10.2 - gsm_freq102arfcn@LIBOSMOGSM_1.0 0.10.2 - gsm_get_octet_len@LIBOSMOGSM_1.0 0.10.2 - gsm_gsmtime2fn@LIBOSMOGSM_1.0 0.10.2 - gsm_milenage@LIBOSMOGSM_1.0 0.10.2 - gsm_septet_encode@LIBOSMOGSM_1.0 0.10.2 - gsm_septet_pack@LIBOSMOGSM_1.0 1.5.1 - gsm_septets2octets@LIBOSMOGSM_1.0 0.10.2 - ipa_ccm_id_get_parse@LIBOSMOGSM_1.0 1.3.0 - ipa_ccm_id_resp_parse@LIBOSMOGSM_1.0 1.3.0 - ipa_ccm_idtag_name@LIBOSMOGSM_1.0 0.10.2 - ipa_ccm_idtag_parse@LIBOSMOGSM_1.0 0.10.2 - ipa_ccm_idtag_parse_off@LIBOSMOGSM_1.0 0.10.2 - ipa_ccm_make_id_resp@LIBOSMOGSM_1.0 0.10.2 - ipa_ccm_make_id_resp_from_req@LIBOSMOGSM_1.0 0.10.2 - ipa_ccm_rcvmsg_base@LIBOSMOGSM_1.0 0.10.2 - ipa_ccm_rcvmsg_bts_base@LIBOSMOGSM_1.0 0.10.2 - ipa_ccm_send_id_ack@LIBOSMOGSM_1.0 0.10.2 - ipa_ccm_send_id_req@LIBOSMOGSM_1.0 0.10.2 - ipa_ccm_send_pong@LIBOSMOGSM_1.0 0.10.2 - ipa_ccm_tlv_to_unitdata@LIBOSMOGSM_1.0 0.10.2 - ipa_msg_alloc@LIBOSMOGSM_1.0 0.10.2 - ipa_msg_recv@LIBOSMOGSM_1.0 0.10.2 - ipa_msg_recv_buffered@LIBOSMOGSM_1.0 0.10.2 - ipa_parse_unitid@LIBOSMOGSM_1.0 0.10.2 - ipa_prepend_header@LIBOSMOGSM_1.0 0.10.2 - ipa_prepend_header_ext@LIBOSMOGSM_1.0 0.10.2 - ipa_send@LIBOSMOGSM_1.0 0.10.2 - lapd_dl_exit@LIBOSMOGSM_1.0 0.10.2 - lapd_dl_init2@LIBOSMOGSM_1.0 1.4.0 - lapd_dl_init@LIBOSMOGSM_1.0 0.10.2 - lapd_dl_reset@LIBOSMOGSM_1.0 0.10.2 - lapd_dl_set_name@LIBOSMOGSM_1.0 1.4.0 - lapd_msgb_alloc@LIBOSMOGSM_1.0 0.10.2 - lapd_ph_data_ind@LIBOSMOGSM_1.0 0.10.2 - lapd_recv_dlsap@LIBOSMOGSM_1.0 0.10.2 - lapd_set_mode@LIBOSMOGSM_1.0 0.10.2 - lapd_state_names@LIBOSMOGSM_1.0 0.10.2 - lapdm_channel_exit@LIBOSMOGSM_1.0 0.10.2 - lapdm_channel_init2@LIBOSMOGSM_1.0 1.3.0 - lapdm_channel_init3@LIBOSMOGSM_1.0 1.4.0 - lapdm_channel_init@LIBOSMOGSM_1.0 0.10.2 - lapdm_channel_reset@LIBOSMOGSM_1.0 0.10.2 - lapdm_channel_set_flags@LIBOSMOGSM_1.0 0.10.2 - lapdm_channel_set_l1@LIBOSMOGSM_1.0 0.10.2 - lapdm_channel_set_l3@LIBOSMOGSM_1.0 0.10.2 - lapdm_channel_set_mode@LIBOSMOGSM_1.0 0.10.2 - lapdm_datalink_for_sapi@LIBOSMOGSM_1.0 0.10.2 - lapdm_entity_exit@LIBOSMOGSM_1.0 0.10.2 - lapdm_entity_init2@LIBOSMOGSM_1.0 1.3.0 - lapdm_entity_init3@LIBOSMOGSM_1.0 1.4.0 - lapdm_entity_init@LIBOSMOGSM_1.0 0.10.2 - lapdm_entity_reset@LIBOSMOGSM_1.0 0.10.2 - lapdm_entity_set_flags@LIBOSMOGSM_1.0 0.10.2 - lapdm_entity_set_mode@LIBOSMOGSM_1.0 0.10.2 - lapdm_phsap_dequeue_prim@LIBOSMOGSM_1.0 0.10.2 - lapdm_phsap_up@LIBOSMOGSM_1.0 0.10.2 - lapdm_rslms_recvmsg@LIBOSMOGSM_1.0 0.10.2 - milenage_auts@LIBOSMOGSM_1.0 0.10.2 - milenage_check@LIBOSMOGSM_1.0 0.10.2 - milenage_f1@LIBOSMOGSM_1.0 0.10.2 - milenage_f2345@LIBOSMOGSM_1.0 0.10.2 - milenage_generate@LIBOSMOGSM_1.0 0.10.2 - milenage_opc_gen@LIBOSMOGSM_1.0 0.10.2 - ms_class_gmsk_dbm@LIBOSMOGSM_1.0 0.10.2 - ms_pwr_ctl_lvl@LIBOSMOGSM_1.0 0.10.2 - ms_pwr_dbm@LIBOSMOGSM_1.0 0.10.2 - osmo_a5@LIBOSMOGSM_1.0 0.10.2 - osmo_a5_1@LIBOSMOGSM_1.0 0.10.2 - osmo_a5_2@LIBOSMOGSM_1.0 0.10.2 - osmo_apn_from_str@LIBOSMOGSM_1.0 0.10.2 - osmo_apn_qualify@LIBOSMOGSM_1.0 0.10.2 - osmo_apn_qualify_buf@LIBOSMOGSM_1.0 1.3.0 - osmo_apn_qualify_c@LIBOSMOGSM_1.0 1.3.0 - osmo_apn_qualify_from_imsi@LIBOSMOGSM_1.0 0.10.2 - osmo_apn_qualify_from_imsi_buf@LIBOSMOGSM_1.0 1.3.0 - osmo_apn_qualify_from_imsi_c@LIBOSMOGSM_1.0 1.3.0 - osmo_apn_to_str@LIBOSMOGSM_1.0 0.10.2 - osmo_auth_3g_from_2g@LIBOSMOGSM_1.0 0.10.2 - osmo_auth_alg_name@LIBOSMOGSM_1.0 0.10.2 - osmo_auth_alg_parse@LIBOSMOGSM_1.0 0.10.2 - osmo_auth_c3@LIBOSMOGSM_1.0 0.11.0 - osmo_auth_gen_vec@LIBOSMOGSM_1.0 0.10.2 - osmo_auth_gen_vec_auts@LIBOSMOGSM_1.0 0.10.2 - osmo_auth_load@LIBOSMOGSM_1.0 0.10.2 - osmo_auth_register@LIBOSMOGSM_1.0 0.10.2 - osmo_auth_supported@LIBOSMOGSM_1.0 0.10.2 - osmo_bssap_le_dec@LIBOSMOGSM_1.0 1.5.1 - osmo_bssap_le_enc@LIBOSMOGSM_1.0 1.5.1 - osmo_bssap_le_pdu_to_str_buf@LIBOSMOGSM_1.0 1.5.1 - osmo_bssap_le_pdu_to_str_c@LIBOSMOGSM_1.0 1.5.1 - osmo_bsslap_dec@LIBOSMOGSM_1.0 1.5.1 - osmo_bsslap_enc@LIBOSMOGSM_1.0 1.5.1 - osmo_bsslap_msgt_names@LIBOSMOGSM_1.0 1.5.1 - osmo_bssmap_le_ie_dec_location_type@LIBOSMOGSM_1.0 1.5.1 - osmo_bssmap_le_ie_enc_location_type@LIBOSMOGSM_1.0 1.5.1 - osmo_bssmap_le_msgt@LIBOSMOGSM_1.0 1.5.1 - osmo_bssmap_le_msgt_names@LIBOSMOGSM_1.0 1.5.1 - osmo_bts_feature_name@LIBOSMOGSM_1.0 0.11.0 - osmo_bts_features_descs@LIBOSMOGSM_1.0 0.11.0 - osmo_bts_features_names@LIBOSMOGSM_1.0 1.6.0 - osmo_c4@LIBOSMOGSM_1.0 0.10.2 - osmo_cbsp_decode@LIBOSMOGSM_1.0 1.3.0 - osmo_cbsp_decoded_alloc@LIBOSMOGSM_1.0 1.3.0 - osmo_cbsp_encode@LIBOSMOGSM_1.0 1.3.0 - osmo_cbsp_errstr@LIBOSMOGSM_1.0 1.3.0 - osmo_cbsp_init_struct@LIBOSMOGSM_1.0 1.3.0 - osmo_cbsp_msgb_alloc@LIBOSMOGSM_1.0 1.3.0 - osmo_cbsp_recv_buffered@LIBOSMOGSM_1.0 1.3.0 - osmo_cgi_cmp@LIBOSMOGSM_1.0 1.5.1 - osmo_cgi_name2@LIBOSMOGSM_1.0 0.11.0 - osmo_cgi_name@LIBOSMOGSM_1.0 0.11.0 - osmo_cgi_name_buf@LIBOSMOGSM_1.0 1.3.0 - osmo_cgi_name_c@LIBOSMOGSM_1.0 1.3.0 - osmo_cgi_ps_cmp@LIBOSMOGSM_1.0 1.5.1 - osmo_cgi_ps_name2@LIBOSMOGSM_1.0 1.5.1 - osmo_cgi_ps_name@LIBOSMOGSM_1.0 1.5.1 - osmo_cgi_ps_name_buf@LIBOSMOGSM_1.0 1.5.1 - osmo_cgi_ps_name_c@LIBOSMOGSM_1.0 1.5.1 - osmo_cm_service_type_names@LIBOSMOGSM_1.0 1.3.0 - osmo_dec_gcr@LIBOSMOGSM_1.0 1.3.0 - osmo_dump_gsmtime@LIBOSMOGSM_1.0 0.10.2 - osmo_dump_gsmtime_buf@LIBOSMOGSM_1.0 1.3.0 - osmo_dump_gsmtime_c@LIBOSMOGSM_1.0 1.3.0 - osmo_earfcn_add@LIBOSMOGSM_1.0 0.10.2 - osmo_earfcn_bit_size@LIBOSMOGSM_1.0 0.10.2 - osmo_earfcn_bit_size_ext@LIBOSMOGSM_1.0 0.10.2 - osmo_earfcn_del@LIBOSMOGSM_1.0 0.10.2 - osmo_earfcn_init@LIBOSMOGSM_1.0 0.10.2 - osmo_enc_gcr@LIBOSMOGSM_1.0 1.3.0 - osmo_gad_dec@LIBOSMOGSM_1.0 1.5.1 - osmo_gad_dec_lat@LIBOSMOGSM_1.0 1.5.1 - osmo_gad_dec_lon@LIBOSMOGSM_1.0 1.5.1 - osmo_gad_dec_unc@LIBOSMOGSM_1.0 1.5.1 - osmo_gad_enc@LIBOSMOGSM_1.0 1.5.1 - osmo_gad_enc_lat@LIBOSMOGSM_1.0 1.5.1 - osmo_gad_enc_lon@LIBOSMOGSM_1.0 1.5.1 - osmo_gad_enc_unc@LIBOSMOGSM_1.0 1.5.1 - osmo_gad_raw_read@LIBOSMOGSM_1.0 1.5.1 - osmo_gad_raw_write@LIBOSMOGSM_1.0 1.5.1 - osmo_gad_to_str_buf@LIBOSMOGSM_1.0 1.5.1 - osmo_gad_to_str_c@LIBOSMOGSM_1.0 1.5.1 - osmo_gad_type_names@LIBOSMOGSM_1.0 1.5.1 - osmo_gcr_dump@LIBOSMOGSM_1.0 1.3.0 - osmo_gcr_dump_buf@LIBOSMOGSM_1.0 1.3.0 - osmo_gcr_eq@LIBOSMOGSM_1.0 1.3.0 - osmo_gen_home_network_domain@LIBOSMOGSM_1.0 1.3.0 - osmo_gen_mme_domain@LIBOSMOGSM_1.0 1.3.0 - osmo_gen_mme_group_domain@LIBOSMOGSM_1.0 1.3.0 - osmo_get_rand_id@LIBOSMOGSM_1.0 0.10.2 - osmo_gprs_dl_block_size_bits@LIBOSMOGSM_1.0 0.10.2 - osmo_gprs_dl_block_size_bytes@LIBOSMOGSM_1.0 0.10.2 - osmo_gprs_dl_cs_by_block_bytes@LIBOSMOGSM_1.0 0.10.2 - osmo_gprs_ul_block_size_bits@LIBOSMOGSM_1.0 0.10.2 - osmo_gprs_ul_block_size_bytes@LIBOSMOGSM_1.0 0.10.2 - osmo_gprs_ul_cs_by_block_bytes@LIBOSMOGSM_1.0 0.10.2 - osmo_gsm48_classmark1_is_r99@LIBOSMOGSM_1.0 1.3.0 - osmo_gsm48_classmark2_is_r99@LIBOSMOGSM_1.0 1.3.0 - osmo_gsm48_classmark_a5_name@LIBOSMOGSM_1.0 1.3.0 - osmo_gsm48_classmark_a5_name_buf@LIBOSMOGSM_1.0 1.3.0 - osmo_gsm48_classmark_a5_name_c@LIBOSMOGSM_1.0 1.3.0 - osmo_gsm48_classmark_is_r99@LIBOSMOGSM_1.0 1.3.0 - osmo_gsm48_classmark_supports_a5@LIBOSMOGSM_1.0 1.3.0 - osmo_gsm48_classmark_update@LIBOSMOGSM_1.0 1.3.0 - osmo_gsm48_range_enc_1024@LIBOSMOGSM_1.0 1.3.0 - osmo_gsm48_range_enc_128@LIBOSMOGSM_1.0 1.3.0 - osmo_gsm48_range_enc_256@LIBOSMOGSM_1.0 1.3.0 - osmo_gsm48_range_enc_512@LIBOSMOGSM_1.0 1.3.0 - osmo_gsm48_range_enc_arfcns@LIBOSMOGSM_1.0 1.3.0 - osmo_gsm48_range_enc_determine_range@LIBOSMOGSM_1.0 1.3.0 - osmo_gsm48_range_enc_filter_arfcns@LIBOSMOGSM_1.0 1.3.0 - osmo_gsm48_range_enc_find_index@LIBOSMOGSM_1.0 1.3.0 - osmo_gsm48_rest_octets_si13_decode@LIBOSMOGSM_1.0 1.5.1 - osmo_gsm48_rest_octets_si13_encode@LIBOSMOGSM_1.0 1.3.0 - osmo_gsm48_rest_octets_si1_encode@LIBOSMOGSM_1.0 1.3.0 - osmo_gsm48_rest_octets_si2quater_encode@LIBOSMOGSM_1.0 1.3.0 - osmo_gsm48_rest_octets_si3_decode@LIBOSMOGSM_1.0 1.3.0 - osmo_gsm48_rest_octets_si3_encode@LIBOSMOGSM_1.0 1.3.0 - osmo_gsm48_rest_octets_si4_decode@LIBOSMOGSM_1.0 1.5.1 - osmo_gsm48_rest_octets_si4_encode@LIBOSMOGSM_1.0 1.3.0 - osmo_gsm48_rest_octets_si6_encode@LIBOSMOGSM_1.0 1.3.0 - osmo_gsm48_rfpowercap2powerclass@LIBOSMOGSM_1.0 1.3.0 - osmo_gsup_decode@LIBOSMOGSM_1.0 0.10.2 - osmo_gsup_encode@LIBOSMOGSM_1.0 0.10.2 - osmo_gsup_get_err_msg_type@LIBOSMOGSM_1.0 0.12.0 - osmo_gsup_message_class_names@LIBOSMOGSM_1.0 1.3.0 - osmo_gsup_message_type_names@LIBOSMOGSM_1.0 0.10.2 - osmo_gsup_session_state_names@LIBOSMOGSM_1.0 0.12.0 - osmo_gsup_sms_decode_sm_rp_da@LIBOSMOGSM_1.0 1.3.0 - osmo_gsup_sms_decode_sm_rp_oa@LIBOSMOGSM_1.0 1.3.0 - osmo_gsup_sms_encode_sm_rp_da@LIBOSMOGSM_1.0 1.3.0 - osmo_gsup_sms_encode_sm_rp_oa@LIBOSMOGSM_1.0 1.3.0 - osmo_gummei_name@LIBOSMOGSM_1.0 1.3.0 - osmo_gummei_name_buf@LIBOSMOGSM_1.0 1.3.0 - osmo_gummei_name_c@LIBOSMOGSM_1.0 1.3.0 - osmo_i460_demux_in@LIBOSMOGSM_1.0 1.4.0 - osmo_i460_mux_enqueue@LIBOSMOGSM_1.0 1.4.0 - osmo_i460_mux_out@LIBOSMOGSM_1.0 1.4.0 - osmo_i460_subchan_add@LIBOSMOGSM_1.0 1.4.0 - osmo_i460_subchan_del@LIBOSMOGSM_1.0 1.4.0 - osmo_i460_ts_init@LIBOSMOGSM_1.0 1.4.0 - osmo_imei_str_valid@LIBOSMOGSM_1.0 1.3.0 - osmo_imsi_str_valid@LIBOSMOGSM_1.0 0.10.2 - osmo_kdf_enb@LIBOSMOGSM_1.0 1.6.0 - osmo_kdf_kasme@LIBOSMOGSM_1.0 1.6.0 - osmo_kdf_kc128@LIBOSMOGSM_1.0 1.6.0 - osmo_kdf_nas@LIBOSMOGSM_1.0 1.6.0 - osmo_kdf_nh@LIBOSMOGSM_1.0 1.6.0 - osmo_lai_cmp@LIBOSMOGSM_1.0 1.5.1 - osmo_lai_name@LIBOSMOGSM_1.0 0.11.0 - osmo_lai_name_buf@LIBOSMOGSM_1.0 1.3.0 - osmo_lai_name_c@LIBOSMOGSM_1.0 1.3.0 - osmo_lcls_dump@LIBOSMOGSM_1.0 1.3.0 - osmo_lcls_dump_buf@LIBOSMOGSM_1.0 1.3.0 - osmo_lcls_dump_c@LIBOSMOGSM_1.0 1.3.0 - osmo_lcs_cause_dec@LIBOSMOGSM_1.0 1.5.1 - osmo_lcs_cause_enc@LIBOSMOGSM_1.0 1.5.1 - osmo_lu_type_names@LIBOSMOGSM_1.0 1.3.0 - osmo_match_shift_tlv@LIBOSMOGSM_1.0 0.10.2 - osmo_match_shift_tv_fixed@LIBOSMOGSM_1.0 0.10.2 - osmo_mcc_name@LIBOSMOGSM_1.0 0.11.0 - osmo_mcc_name_buf@LIBOSMOGSM_1.0 1.3.0 - osmo_mcc_name_c@LIBOSMOGSM_1.0 1.3.0 - osmo_mi_name@LIBOSMOGSM_1.0 1.3.0 - osmo_mi_name_buf@LIBOSMOGSM_1.0 1.3.0 - osmo_mi_name_c@LIBOSMOGSM_1.0 1.3.0 - osmo_mnc_cmp@LIBOSMOGSM_1.0 0.11.0 - osmo_mnc_from_str@LIBOSMOGSM_1.0 0.11.0 - osmo_mnc_name@LIBOSMOGSM_1.0 0.11.0 - osmo_mnc_name_buf@LIBOSMOGSM_1.0 1.3.0 - osmo_mnc_name_c@LIBOSMOGSM_1.0 1.3.0 - osmo_mncc_names@LIBOSMOGSM_1.0 0.12.0 - osmo_mncc_stringify@LIBOSMOGSM_1.0 0.11.0 - osmo_mobile_identity_cmp@LIBOSMOGSM_1.0 1.4.0 - osmo_mobile_identity_decode@LIBOSMOGSM_1.0 1.4.0 - osmo_mobile_identity_decode_from_l3@LIBOSMOGSM_1.0 1.4.0 - osmo_mobile_identity_encode_buf@LIBOSMOGSM_1.0 1.4.0 - osmo_mobile_identity_encode_msgb@LIBOSMOGSM_1.0 1.4.0 - osmo_mobile_identity_encoded_len@LIBOSMOGSM_1.0 1.4.0 - osmo_mobile_identity_to_str_buf@LIBOSMOGSM_1.0 1.4.0 - osmo_mobile_identity_to_str_c@LIBOSMOGSM_1.0 1.4.0 - osmo_msisdn_str_valid@LIBOSMOGSM_1.0 0.10.2 - osmo_nri_range_overlaps_ranges@LIBOSMOGSM_1.0 1.4.0 - osmo_nri_range_validate@LIBOSMOGSM_1.0 1.4.0 - osmo_nri_ranges_add@LIBOSMOGSM_1.0 1.4.0 - osmo_nri_ranges_alloc@LIBOSMOGSM_1.0 1.4.0 - osmo_nri_ranges_del@LIBOSMOGSM_1.0 1.4.0 - osmo_nri_ranges_free@LIBOSMOGSM_1.0 1.4.0 - osmo_nri_ranges_to_str_buf@LIBOSMOGSM_1.0 1.4.0 - osmo_nri_ranges_to_str_c@LIBOSMOGSM_1.0 1.4.0 - osmo_nri_ranges_vty_add@LIBOSMOGSM_1.0 1.4.0 - osmo_nri_ranges_vty_del@LIBOSMOGSM_1.0 1.4.0 - osmo_nri_v_limit_by_ranges@LIBOSMOGSM_1.0 1.4.0 - osmo_nri_v_matches_ranges@LIBOSMOGSM_1.0 1.4.0 - osmo_nri_v_validate@LIBOSMOGSM_1.0 1.4.0 - osmo_oap_client_encoded@LIBOSMOGSM_1.0 1.3.0 - osmo_oap_client_handle@LIBOSMOGSM_1.0 1.3.0 - osmo_oap_client_init@LIBOSMOGSM_1.0 1.3.0 - osmo_oap_client_register@LIBOSMOGSM_1.0 1.3.0 - osmo_oap_decode@LIBOSMOGSM_1.0 0.10.2 - osmo_oap_encode@LIBOSMOGSM_1.0 0.10.2 - osmo_parse_home_network_domain@LIBOSMOGSM_1.0 1.3.0 - osmo_parse_mme_domain@LIBOSMOGSM_1.0 1.3.0 - osmo_ph_prim_names@LIBOSMOGSM_1.0 0.10.2 - osmo_plmn_cmp@LIBOSMOGSM_1.0 0.11.0 - osmo_plmn_from_bcd@LIBOSMOGSM_1.0 0.11.0 - osmo_plmn_name2@LIBOSMOGSM_1.0 0.11.0 - osmo_plmn_name@LIBOSMOGSM_1.0 0.11.0 - osmo_plmn_name_buf@LIBOSMOGSM_1.0 1.3.0 - osmo_plmn_name_c@LIBOSMOGSM_1.0 1.3.0 - osmo_plmn_to_bcd@LIBOSMOGSM_1.0 0.11.0 - osmo_rai_cmp@LIBOSMOGSM_1.0 1.5.1 - osmo_rai_name2@LIBOSMOGSM_1.0 1.5.1 - osmo_rai_name2_buf@LIBOSMOGSM_1.0 1.5.1 - osmo_rai_name2_c@LIBOSMOGSM_1.0 1.5.1 - osmo_rai_name@LIBOSMOGSM_1.0 0.11.0 - osmo_rai_name_buf@LIBOSMOGSM_1.0 1.3.0 - osmo_rai_name_c@LIBOSMOGSM_1.0 1.3.0 - osmo_rat_type_names@LIBOSMOGSM_1.0 1.3.0 - osmo_rsl2sitype@LIBOSMOGSM_1.0 0.10.2 - osmo_shift_lv@LIBOSMOGSM_1.0 0.10.2 - osmo_shift_tlv@LIBOSMOGSM_1.0 0.10.2 - osmo_shift_v_fixed@LIBOSMOGSM_1.0 0.10.2 - osmo_sitype2rsl@LIBOSMOGSM_1.0 0.10.2 - osmo_sitype_strs@LIBOSMOGSM_1.0 0.10.2 - osmo_sub_auth_type_names@LIBOSMOGSM_1.0 0.10.2 - osmo_tlv_prot_ie_name@LIBOSMOGSM_1.0 1.5.1 - osmo_tlv_prot_msg_name@LIBOSMOGSM_1.0 1.5.1 - osmo_tlv_prot_parse@LIBOSMOGSM_1.0 1.5.1 - osmo_tlv_prot_validate_tp@LIBOSMOGSM_1.0 1.5.1 - osmo_tlvp_copy@LIBOSMOGSM_1.0 0.10.2 - osmo_tlvp_merge@LIBOSMOGSM_1.0 0.10.2 - osmo_tmsi_nri_v_get@LIBOSMOGSM_1.0 1.4.0 - osmo_tmsi_nri_v_limit_by_ranges@LIBOSMOGSM_1.0 1.4.0 - osmo_tmsi_nri_v_set@LIBOSMOGSM_1.0 1.4.0 - rr_cause_name@LIBOSMOGSM_1.0 0.10.2 - rsl_act_type_names@LIBOSMOGSM_1.0 0.10.2 - rsl_att_tlvdef@LIBOSMOGSM_1.0 0.10.2 - rsl_ccch_conf_to_bs_cc_chans@LIBOSMOGSM_1.0 0.10.2 - rsl_ccch_conf_to_bs_ccch_sdcch_comb@LIBOSMOGSM_1.0 0.10.2 - rsl_chan_nr_str@LIBOSMOGSM_1.0 0.10.2 - rsl_chan_nr_str_buf@LIBOSMOGSM_1.0 1.3.0 - rsl_chan_nr_str_c@LIBOSMOGSM_1.0 1.3.0 - rsl_dec_chan_nr@LIBOSMOGSM_1.0 0.10.2 - rsl_enc_chan_nr@LIBOSMOGSM_1.0 0.10.2 - rsl_err_name@LIBOSMOGSM_1.0 0.10.2 - rsl_init_cchan_hdr@LIBOSMOGSM_1.0 0.10.2 - rsl_init_rll_hdr@LIBOSMOGSM_1.0 0.10.2 - rsl_ipac_eie_tlvdef@LIBOSMOGSM_1.0 0.10.2 - rsl_ipac_msg_name@LIBOSMOGSM_1.0 0.10.2 - rsl_msg_name@LIBOSMOGSM_1.0 0.10.2 - rsl_or_ipac_msg_name@LIBOSMOGSM_1.0 0.10.2 - rsl_rll_push_hdr@LIBOSMOGSM_1.0 0.10.2 - rsl_rll_push_l3@LIBOSMOGSM_1.0 0.10.2 - rsl_rll_simple@LIBOSMOGSM_1.0 0.10.2 - rsl_rlm_cause_name@LIBOSMOGSM_1.0 0.10.2 - rxlev2dbm@LIBOSMOGSM_1.0 0.10.2 - rxlev_stat_dump@LIBOSMOGSM_1.0 0.10.2 - rxlev_stat_get_next@LIBOSMOGSM_1.0 0.10.2 - rxlev_stat_input@LIBOSMOGSM_1.0 0.10.2 - rxlev_stat_reset@LIBOSMOGSM_1.0 0.10.2 - sgsap_eps_lu_type_names@LIBOSMOGSM_1.0 1.3.0 - sgsap_ie_tlvdef@LIBOSMOGSM_1.0 1.3.0 - sgsap_iei_names@LIBOSMOGSM_1.0 1.3.0 - sgsap_ismi_det_eps_type_names@LIBOSMOGSM_1.0 1.3.0 - sgsap_ismi_det_noneps_type_names@LIBOSMOGSM_1.0 1.3.0 - sgsap_msg_type_names@LIBOSMOGSM_1.0 1.3.0 - sgsap_service_ind_names@LIBOSMOGSM_1.0 1.3.0 - sgsap_sgs_cause_names@LIBOSMOGSM_1.0 1.3.0 - sgsap_ue_emm_mode_names@LIBOSMOGSM_1.0 1.3.0 - tlv_def_patch@LIBOSMOGSM_1.0 0.10.2 - tlv_dump@LIBOSMOGSM_1.0 0.10.2 - tlv_encode@LIBOSMOGSM_1.0 1.3.0 - tlv_encode_one@LIBOSMOGSM_1.0 1.3.0 - tlv_encode_ordered@LIBOSMOGSM_1.0 1.3.0 - tlv_parse2@LIBOSMOGSM_1.0 0.11.0 - tlv_parse@LIBOSMOGSM_1.0 0.10.2 - tlv_parse_one@LIBOSMOGSM_1.0 0.10.2 - tvlv_att_def@LIBOSMOGSM_1.0 0.10.2 - vtvlv_gan_att_def@LIBOSMOGSM_1.0 0.10.2 diff -Nru libosmocore-1.6.0/debian/libosmogsm18.install libosmocore-1.7.0/debian/libosmogsm18.install --- libosmocore-1.6.0/debian/libosmogsm18.install 1970-01-01 00:00:00.000000000 +0000 +++ libosmocore-1.7.0/debian/libosmogsm18.install 2022-10-09 07:16:10.000000000 +0000 @@ -0,0 +1 @@ +usr/lib/*/libosmogsm*.so.* diff -Nru libosmocore-1.6.0/debian/libosmogsm18.symbols libosmocore-1.7.0/debian/libosmogsm18.symbols --- libosmocore-1.6.0/debian/libosmogsm18.symbols 1970-01-01 00:00:00.000000000 +0000 +++ libosmocore-1.7.0/debian/libosmogsm18.symbols 2022-10-09 07:16:10.000000000 +0000 @@ -0,0 +1,723 @@ +libosmogsm.so.18 libosmogsm18 #MINVER# +* Build-Depends-Package: libosmocore-dev + LIBOSMOGSM_1.0@LIBOSMOGSM_1.0 0.10.2 + _osmo_mncc_log@LIBOSMOGSM_1.0 0.11.0 + abis_mm_event_cause_names@LIBOSMOGSM_1.0 0.10.2 + abis_nm_adm_state_names@LIBOSMOGSM_1.0 0.10.2 + abis_nm_att_names@LIBOSMOGSM_1.0 0.10.2 + abis_nm_att_settable@LIBOSMOGSM_1.0 0.10.2 + abis_nm_att_tlvdef@LIBOSMOGSM_1.0 0.10.2 + abis_nm_att_tlvdef_ipa@LIBOSMOGSM_1.0 0.10.2 + abis_nm_avail_name@LIBOSMOGSM_1.0 0.10.2 + abis_nm_chcomb4pchan@LIBOSMOGSM_1.0 0.10.2 + abis_nm_debugp_foh@LIBOSMOGSM_1.0 0.10.2 + abis_nm_dump_foh@LIBOSMOGSM_1.0 0.11.0 + abis_nm_dump_foh_buf@LIBOSMOGSM_1.0 1.3.0 + abis_nm_dump_foh_c@LIBOSMOGSM_1.0 1.3.0 + abis_nm_event_type_name@LIBOSMOGSM_1.0 0.10.2 + abis_nm_fail_evt_rep@LIBOSMOGSM_1.0 0.10.2 + abis_nm_fail_evt_vrep@LIBOSMOGSM_1.0 0.10.2 + abis_nm_get_sw_conf@LIBOSMOGSM_1.0 0.10.2 + abis_nm_get_sw_desc_len@LIBOSMOGSM_1.0 0.10.2 + abis_nm_ipa_magic@LIBOSMOGSM_1.0 0.10.2 + abis_nm_msg_disc_names@LIBOSMOGSM_1.0 0.10.2 + abis_nm_msgtype_names@LIBOSMOGSM_1.0 0.10.2 + abis_nm_nack_cause_name@LIBOSMOGSM_1.0 0.10.2 + abis_nm_nack_name@LIBOSMOGSM_1.0 0.10.2 + abis_nm_nacks@LIBOSMOGSM_1.0 0.10.2 + abis_nm_no_ack_nack@LIBOSMOGSM_1.0 0.10.2 + abis_nm_obj_class_names@LIBOSMOGSM_1.0 0.10.2 + abis_nm_opstate_name@LIBOSMOGSM_1.0 0.10.2 + abis_nm_osmo_att_tlvdef@LIBOSMOGSM_1.0 0.10.2 + abis_nm_osmo_magic@LIBOSMOGSM_1.0 0.10.2 + abis_nm_pcause_type_names@LIBOSMOGSM_1.0 0.10.2 + abis_nm_pchan4chcomb@LIBOSMOGSM_1.0 0.10.2 + abis_nm_put_sw_desc@LIBOSMOGSM_1.0 0.10.2 + abis_nm_put_sw_file@LIBOSMOGSM_1.0 0.10.2 + abis_nm_reports@LIBOSMOGSM_1.0 0.10.2 + abis_nm_severity_name@LIBOSMOGSM_1.0 0.10.2 + abis_nm_sw_desc_len@LIBOSMOGSM_1.0 0.10.2 + abis_nm_sw_load_msgs@LIBOSMOGSM_1.0 0.10.2 + abis_nm_t200_ms@LIBOSMOGSM_1.0 0.10.2 + abis_nm_test_name@LIBOSMOGSM_1.0 0.10.2 + bitvec_add_range1024@LIBOSMOGSM_1.0 0.10.2 + cbsp_att_tlvdef@LIBOSMOGSM_1.0 1.3.0 + cbsp_category_names@LIBOSMOGSM_1.0 1.3.0 + cbsp_iei_names@LIBOSMOGSM_1.0 1.3.0 + cbsp_msg_type_names@LIBOSMOGSM_1.0 1.3.0 + comp128@LIBOSMOGSM_1.0 0.10.2 + comp128v2@LIBOSMOGSM_1.0 0.10.2 + comp128v3@LIBOSMOGSM_1.0 0.10.2 + dbm2rxlev@LIBOSMOGSM_1.0 0.10.2 + egprs_get_cps@LIBOSMOGSM_1.0 0.10.2 + gan_msgt_vals@LIBOSMOGSM_1.0 0.10.2 + gan_pdisc_vals@LIBOSMOGSM_1.0 0.10.2 + gprs_att_t_strs@LIBOSMOGSM_1.0 0.10.2 + gprs_cipher_gen_input_i@LIBOSMOGSM_1.0 0.10.2 + gprs_cipher_gen_input_ui@LIBOSMOGSM_1.0 0.10.2 + gprs_cipher_key_length@LIBOSMOGSM_1.0 0.10.2 + gprs_cipher_load@LIBOSMOGSM_1.0 0.10.2 + gprs_cipher_names@LIBOSMOGSM_1.0 0.10.2 + gprs_cipher_register@LIBOSMOGSM_1.0 0.10.2 + gprs_cipher_run@LIBOSMOGSM_1.0 0.10.2 + gprs_cipher_supported@LIBOSMOGSM_1.0 0.10.2 + gprs_det_t_mo_strs@LIBOSMOGSM_1.0 0.10.2 + gprs_det_t_mt_strs@LIBOSMOGSM_1.0 0.10.2 + gprs_ms_net_cap_gea_supported@LIBOSMOGSM_1.0 0.10.2 + gprs_msgt_gmm_names@LIBOSMOGSM_1.0 0.10.2 + gprs_service_t_strs@LIBOSMOGSM_1.0 0.10.2 + gprs_tlli_type@LIBOSMOGSM_1.0 0.10.2 + gprs_tmsi2tlli@LIBOSMOGSM_1.0 0.10.2 + gprs_upd_t_strs@LIBOSMOGSM_1.0 0.10.2 + gsm0341_build_msg@LIBOSMOGSM_1.0 0.10.2 + gsm0406_dlci_sapi_names@LIBOSMOGSM_1.0 1.3.0 + gsm0480_comp_type_names@LIBOSMOGSM_1.0 0.12.0 + gsm0480_create_notifySS@LIBOSMOGSM_1.0 0.10.2 + gsm0480_create_release_complete@LIBOSMOGSM_1.0 1.3.0 + gsm0480_create_unstructuredSS_Notify@LIBOSMOGSM_1.0 0.10.2 + gsm0480_create_ussd_notify@LIBOSMOGSM_1.0 0.10.2 + gsm0480_create_ussd_release_complete@LIBOSMOGSM_1.0 0.10.2 + gsm0480_create_ussd_resp@LIBOSMOGSM_1.0 0.10.2 + gsm0480_decode_ss_request@LIBOSMOGSM_1.0 0.10.2 + gsm0480_decode_ussd_request@LIBOSMOGSM_1.0 0.10.2 + gsm0480_extract_ie_by_tag@LIBOSMOGSM_1.0 0.12.0 + gsm0480_gen_reject@LIBOSMOGSM_1.0 1.3.0 + gsm0480_gen_return_error@LIBOSMOGSM_1.0 1.3.0 + gsm0480_gen_ussd_resp_7bit@LIBOSMOGSM_1.0 1.3.0 + gsm0480_msgb_alloc_name@LIBOSMOGSM_1.0 1.3.0 + gsm0480_op_code_names@LIBOSMOGSM_1.0 0.12.0 + gsm0480_parse_facility_ie@LIBOSMOGSM_1.0 0.12.0 + gsm0480_wrap_facility@LIBOSMOGSM_1.0 0.10.2 + gsm0480_wrap_invoke@LIBOSMOGSM_1.0 0.10.2 + gsm0502_calc_paging_group@LIBOSMOGSM_1.0 0.10.2 + gsm0502_fn_remap@LIBOSMOGSM_1.0 1.3.0 + gsm0502_hop_seq_gen@LIBOSMOGSM_1.0 1.4.0 + gsm0503_cs2@LIBOSMOGSM_1.0 0.10.2 + gsm0503_cs2_np@LIBOSMOGSM_1.0 0.10.2 + gsm0503_cs3@LIBOSMOGSM_1.0 0.10.2 + gsm0503_cs3_np@LIBOSMOGSM_1.0 0.10.2 + gsm0503_mcs1@LIBOSMOGSM_1.0 0.10.2 + gsm0503_mcs1_dl_hdr@LIBOSMOGSM_1.0 0.10.2 + gsm0503_mcs1_ul_hdr@LIBOSMOGSM_1.0 0.10.2 + gsm0503_mcs2@LIBOSMOGSM_1.0 0.10.2 + gsm0503_mcs3@LIBOSMOGSM_1.0 0.10.2 + gsm0503_mcs4@LIBOSMOGSM_1.0 0.10.2 + gsm0503_mcs5@LIBOSMOGSM_1.0 0.10.2 + gsm0503_mcs5_dl_hdr@LIBOSMOGSM_1.0 0.10.2 + gsm0503_mcs5_ul_hdr@LIBOSMOGSM_1.0 0.10.2 + gsm0503_mcs6@LIBOSMOGSM_1.0 0.10.2 + gsm0503_mcs7@LIBOSMOGSM_1.0 0.10.2 + gsm0503_mcs7_dl_hdr@LIBOSMOGSM_1.0 0.10.2 + gsm0503_mcs7_ul_hdr@LIBOSMOGSM_1.0 0.10.2 + gsm0503_mcs8@LIBOSMOGSM_1.0 0.10.2 + gsm0503_mcs9@LIBOSMOGSM_1.0 0.10.2 + gsm0503_rach@LIBOSMOGSM_1.0 0.10.2 + gsm0503_rach_ext@LIBOSMOGSM_1.0 0.11.0 + gsm0503_sch@LIBOSMOGSM_1.0 0.10.2 + gsm0503_tch_afs_10_2@LIBOSMOGSM_1.0 0.10.2 + gsm0503_tch_afs_12_2@LIBOSMOGSM_1.0 0.10.2 + gsm0503_tch_afs_4_75@LIBOSMOGSM_1.0 0.10.2 + gsm0503_tch_afs_5_15@LIBOSMOGSM_1.0 0.10.2 + gsm0503_tch_afs_5_9@LIBOSMOGSM_1.0 0.10.2 + gsm0503_tch_afs_6_7@LIBOSMOGSM_1.0 0.10.2 + gsm0503_tch_afs_7_4@LIBOSMOGSM_1.0 0.10.2 + gsm0503_tch_afs_7_95@LIBOSMOGSM_1.0 0.10.2 + gsm0503_tch_ahs_4_75@LIBOSMOGSM_1.0 0.10.2 + gsm0503_tch_ahs_5_15@LIBOSMOGSM_1.0 0.10.2 + gsm0503_tch_ahs_5_9@LIBOSMOGSM_1.0 0.10.2 + gsm0503_tch_ahs_6_7@LIBOSMOGSM_1.0 0.10.2 + gsm0503_tch_ahs_7_4@LIBOSMOGSM_1.0 0.10.2 + gsm0503_tch_ahs_7_95@LIBOSMOGSM_1.0 0.10.2 + gsm0503_tch_axs_sid_update@LIBOSMOGSM_1.0 1.4.0 + gsm0503_tch_fr@LIBOSMOGSM_1.0 0.10.2 + gsm0503_tch_hr@LIBOSMOGSM_1.0 0.10.2 + gsm0503_xcch@LIBOSMOGSM_1.0 0.10.2 + gsm0808_att_tlvdef@LIBOSMOGSM_1.0 0.10.2 + gsm0808_bssap_name@LIBOSMOGSM_1.0 0.10.2 + gsm0808_bssmap_name@LIBOSMOGSM_1.0 0.10.2 + gsm0808_cause_class_name@LIBOSMOGSM_1.0 1.3.0 + gsm0808_cause_name@LIBOSMOGSM_1.0 0.11.0 + gsm0808_cell_id_discr_names@LIBOSMOGSM_1.0 0.11.0 + gsm0808_cell_id_from_cgi@LIBOSMOGSM_1.0 1.3.0 + gsm0808_cell_id_list_add@LIBOSMOGSM_1.0 0.11.0 + gsm0808_cell_id_list_name@LIBOSMOGSM_1.0 0.11.0 + gsm0808_cell_id_list_name_buf@LIBOSMOGSM_1.0 0.11.0 + gsm0808_cell_id_list_name_c@LIBOSMOGSM_1.0 1.3.0 + gsm0808_cell_id_matches_list@LIBOSMOGSM_1.0 1.3.0 + gsm0808_cell_id_name2@LIBOSMOGSM_1.0 0.11.0 + gsm0808_cell_id_name@LIBOSMOGSM_1.0 0.11.0 + gsm0808_cell_id_name_buf@LIBOSMOGSM_1.0 1.3.0 + gsm0808_cell_id_name_c@LIBOSMOGSM_1.0 1.3.0 + gsm0808_cell_id_to_cgi@LIBOSMOGSM_1.0 1.3.0 + gsm0808_cell_id_to_list@LIBOSMOGSM_1.0 0.12.0 + gsm0808_cell_id_u_name@LIBOSMOGSM_1.0 0.11.0 + gsm0808_cell_ids_match@LIBOSMOGSM_1.0 1.3.0 + gsm0808_chan_type_to_speech_codec@LIBOSMOGSM_1.0 0.10.2 + gsm0808_channel_type_name@LIBOSMOGSM_1.0 0.12.0 + gsm0808_channel_type_name_buf@LIBOSMOGSM_1.0 1.3.0 + gsm0808_channel_type_name_c@LIBOSMOGSM_1.0 1.3.0 + gsm0808_chosen_enc_alg_names@LIBOSMOGSM_1.0 0.12.0 + gsm0808_create_ass2@LIBOSMOGSM_1.0 1.3.0 + gsm0808_create_ass@LIBOSMOGSM_1.0 0.10.2 + gsm0808_create_ass_compl2@LIBOSMOGSM_1.0 1.3.0 + gsm0808_create_ass_compl@LIBOSMOGSM_1.0 0.10.2 + gsm0808_create_ass_fail@LIBOSMOGSM_1.0 0.10.2 + gsm0808_create_assignment_completed@LIBOSMOGSM_1.0 0.10.2 + gsm0808_create_assignment_failure@LIBOSMOGSM_1.0 0.10.2 + gsm0808_create_cipher2@LIBOSMOGSM_1.0 1.6.0 + gsm0808_create_cipher@LIBOSMOGSM_1.0 0.10.2 + gsm0808_create_cipher_complete@LIBOSMOGSM_1.0 0.10.2 + gsm0808_create_cipher_reject@LIBOSMOGSM_1.0 0.10.2 + gsm0808_create_cipher_reject_ext@LIBOSMOGSM_1.0 1.3.0 + gsm0808_create_classmark_request@LIBOSMOGSM_1.0 1.3.0 + gsm0808_create_classmark_update@LIBOSMOGSM_1.0 0.10.2 + gsm0808_create_clear_command2@LIBOSMOGSM_1.0 1.3.0 + gsm0808_create_clear_command@LIBOSMOGSM_1.0 0.10.2 + gsm0808_create_clear_complete@LIBOSMOGSM_1.0 0.10.2 + gsm0808_create_clear_rqst@LIBOSMOGSM_1.0 0.10.2 + gsm0808_create_common_id@LIBOSMOGSM_1.0 1.4.0 + gsm0808_create_dtap@LIBOSMOGSM_1.0 0.10.2 + gsm0808_create_handover_command@LIBOSMOGSM_1.0 1.3.0 + gsm0808_create_handover_complete@LIBOSMOGSM_1.0 0.12.0 + gsm0808_create_handover_detect@LIBOSMOGSM_1.0 0.12.0 + gsm0808_create_handover_failure@LIBOSMOGSM_1.0 0.12.0 + gsm0808_create_handover_performed@LIBOSMOGSM_1.0 1.3.0 + gsm0808_create_handover_request@LIBOSMOGSM_1.0 1.3.0 + gsm0808_create_handover_request_ack2@LIBOSMOGSM_1.0 1.3.0 + gsm0808_create_handover_request_ack@LIBOSMOGSM_1.0 0.12.0 + gsm0808_create_handover_required@LIBOSMOGSM_1.0 0.12.0 + gsm0808_create_handover_required_reject@LIBOSMOGSM_1.0 1.3.0 + gsm0808_create_handover_succeeded@LIBOSMOGSM_1.0 1.3.0 + gsm0808_create_layer3@LIBOSMOGSM_1.0 0.10.2 + gsm0808_create_layer3_2@LIBOSMOGSM_1.0 0.11.0 + gsm0808_create_layer3_aoip@LIBOSMOGSM_1.0 0.10.2 + gsm0808_create_lcls_conn_ctrl@LIBOSMOGSM_1.0 0.12.0 + gsm0808_create_lcls_conn_ctrl_ack@LIBOSMOGSM_1.0 0.12.0 + gsm0808_create_lcls_notification@LIBOSMOGSM_1.0 0.12.0 + gsm0808_create_paging2@LIBOSMOGSM_1.0 0.11.0 + gsm0808_create_paging@LIBOSMOGSM_1.0 0.10.2 + gsm0808_create_perform_location_abort@LIBOSMOGSM_1.0 1.5.1 + gsm0808_create_perform_location_request@LIBOSMOGSM_1.0 1.5.1 + gsm0808_create_perform_location_response@LIBOSMOGSM_1.0 1.5.1 + gsm0808_create_reset@LIBOSMOGSM_1.0 0.10.2 + gsm0808_create_reset_ack@LIBOSMOGSM_1.0 0.10.2 + gsm0808_create_sapi_reject@LIBOSMOGSM_1.0 0.10.2 + gsm0808_create_sapi_reject_cause@LIBOSMOGSM_1.0 1.5.1 + gsm0808_dec_aoip_trasp_addr@LIBOSMOGSM_1.0 0.10.2 + gsm0808_dec_cell_id@LIBOSMOGSM_1.0 0.11.0 + gsm0808_dec_cell_id_list2@LIBOSMOGSM_1.0 0.11.0 + gsm0808_dec_cell_id_list@LIBOSMOGSM_1.0 0.10.2 + gsm0808_dec_channel_type@LIBOSMOGSM_1.0 0.10.2 + gsm0808_dec_encrypt_info@LIBOSMOGSM_1.0 0.10.2 + gsm0808_dec_kc128@LIBOSMOGSM_1.0 1.6.0 + gsm0808_dec_lcls@LIBOSMOGSM_1.0 1.3.0 + gsm0808_dec_osmux_cid@LIBOSMOGSM_1.0 1.3.0 + gsm0808_dec_speech_codec@LIBOSMOGSM_1.0 0.10.2 + gsm0808_dec_speech_codec_list@LIBOSMOGSM_1.0 0.10.2 + gsm0808_decode_cell_id_u@LIBOSMOGSM_1.0 1.3.0 + gsm0808_diagnostics_bit_location_str@LIBOSMOGSM_1.0 1.4.0 + gsm0808_diagnostics_octet_location_str@LIBOSMOGSM_1.0 1.4.0 + gsm0808_enc_aoip_trasp_addr@LIBOSMOGSM_1.0 0.10.2 + gsm0808_enc_cause@LIBOSMOGSM_1.0 1.3.0 + gsm0808_enc_cell_id@LIBOSMOGSM_1.0 0.11.0 + gsm0808_enc_cell_id_list2@LIBOSMOGSM_1.0 0.11.0 + gsm0808_enc_cell_id_list@LIBOSMOGSM_1.0 0.10.2 + gsm0808_enc_channel_type@LIBOSMOGSM_1.0 0.10.2 + gsm0808_enc_encrypt_info@LIBOSMOGSM_1.0 0.10.2 + gsm0808_enc_kc128@LIBOSMOGSM_1.0 1.6.0 + gsm0808_enc_lcls@LIBOSMOGSM_1.0 1.3.0 + gsm0808_enc_speech_codec@LIBOSMOGSM_1.0 0.10.2 + gsm0808_enc_speech_codec_list@LIBOSMOGSM_1.0 0.10.2 + gsm0808_get_cause@LIBOSMOGSM_1.0 1.4.0 + gsm0808_get_cipher_reject_cause@LIBOSMOGSM_1.0 1.3.0 + gsm0808_lcls_config_names@LIBOSMOGSM_1.0 0.12.0 + gsm0808_lcls_control_names@LIBOSMOGSM_1.0 0.12.0 + gsm0808_lcls_status_names@LIBOSMOGSM_1.0 0.12.0 + gsm0808_msgb_put_cell_id_u@LIBOSMOGSM_1.0 1.3.0 + gsm0808_old_bss_to_new_bss_info_att_tlvdef@LIBOSMOGSM_1.0 1.6.0 + gsm0808_permitted_speech_names@LIBOSMOGSM_1.0 0.12.0 + gsm0808_prepend_dtap_header@LIBOSMOGSM_1.0 0.10.2 + gsm0808_sc_cfg_from_gsm48_mr_cfg@LIBOSMOGSM_1.0 1.3.0 + gsm0808_speech_codec_from_chan_type@LIBOSMOGSM_1.0 0.10.2 + gsm0808_speech_codec_type_names@LIBOSMOGSM_1.0 0.11.0 + gsm0858_rsl_ul_meas_enc@LIBOSMOGSM_1.0 0.10.2 + gsm29118_create_alert_req@LIBOSMOGSM_1.0 1.3.0 + gsm29118_create_dl_ud@LIBOSMOGSM_1.0 1.3.0 + gsm29118_create_eps_det_ack@LIBOSMOGSM_1.0 1.3.0 + gsm29118_create_imsi_det_ack@LIBOSMOGSM_1.0 1.3.0 + gsm29118_create_lu_ack@LIBOSMOGSM_1.0 1.3.0 + gsm29118_create_lu_rej@LIBOSMOGSM_1.0 1.3.0 + gsm29118_create_mm_info_req@LIBOSMOGSM_1.0 1.3.0 + gsm29118_create_paging_req@LIBOSMOGSM_1.0 1.3.0 + gsm29118_create_release_req@LIBOSMOGSM_1.0 1.3.0 + gsm29118_create_reset_ack@LIBOSMOGSM_1.0 1.3.0 + gsm29118_create_reset_ind@LIBOSMOGSM_1.0 1.3.0 + gsm29118_create_service_abort_req@LIBOSMOGSM_1.0 1.3.0 + gsm29118_create_status@LIBOSMOGSM_1.0 1.3.0 + gsm29118_msgb_alloc@LIBOSMOGSM_1.0 1.3.0 + gsm338_get_sms_alphabet@LIBOSMOGSM_1.0 0.10.2 + gsm340_gen_oa@LIBOSMOGSM_1.0 0.10.2 + gsm340_gen_scts@LIBOSMOGSM_1.0 0.10.2 + gsm340_scts@LIBOSMOGSM_1.0 0.10.2 + gsm340_validity_period@LIBOSMOGSM_1.0 0.10.2 + gsm411_bcdify@LIBOSMOGSM_1.0 0.10.2 + gsm411_cp_cause_strs@LIBOSMOGSM_1.0 0.10.2 + gsm411_cp_state_names@LIBOSMOGSM_1.0 0.11.0 + gsm411_msgb_alloc@LIBOSMOGSM_1.0 0.10.2 + gsm411_push_cp_header@LIBOSMOGSM_1.0 0.10.2 + gsm411_push_rp_header@LIBOSMOGSM_1.0 0.10.2 + gsm411_rp_cause_strs@LIBOSMOGSM_1.0 0.10.2 + gsm411_rp_state_names@LIBOSMOGSM_1.0 0.11.0 + gsm411_smc_clear@LIBOSMOGSM_1.0 0.10.2 + gsm411_smc_init@LIBOSMOGSM_1.0 0.10.2 + gsm411_smc_recv@LIBOSMOGSM_1.0 0.10.2 + gsm411_smc_send@LIBOSMOGSM_1.0 0.10.2 + gsm411_smr_clear@LIBOSMOGSM_1.0 0.10.2 + gsm411_smr_init@LIBOSMOGSM_1.0 0.10.2 + gsm411_smr_recv@LIBOSMOGSM_1.0 0.10.2 + gsm411_smr_send@LIBOSMOGSM_1.0 0.10.2 + gsm411_unbcdify@LIBOSMOGSM_1.0 0.10.2 + gsm414_msgt_names@LIBOSMOGSM_1.0 0.10.2 + gsm48_att_tlvdef@LIBOSMOGSM_1.0 0.10.2 + gsm48_cc_cause_names@LIBOSMOGSM_1.0 1.3.0 + gsm48_cc_msg_name@LIBOSMOGSM_1.0 0.10.2 + gsm48_cc_msgtype_names@LIBOSMOGSM_1.0 0.10.2 + gsm48_cc_state_name@LIBOSMOGSM_1.0 0.10.2 + gsm48_chan_mode_names@LIBOSMOGSM_1.0 0.10.2 + gsm48_chan_mode_to_non_vamos@LIBOSMOGSM_1.0 1.6.0 + gsm48_chan_mode_to_vamos@LIBOSMOGSM_1.0 1.6.0 + gsm48_construct_ra@LIBOSMOGSM_1.0 0.10.2 + gsm48_decode_bcd_number2@LIBOSMOGSM_1.0 1.3.0 + gsm48_decode_bcd_number@LIBOSMOGSM_1.0 0.10.2 + gsm48_decode_bearer_cap@LIBOSMOGSM_1.0 0.10.2 + gsm48_decode_called@LIBOSMOGSM_1.0 0.10.2 + gsm48_decode_callerid@LIBOSMOGSM_1.0 0.10.2 + gsm48_decode_calling@LIBOSMOGSM_1.0 0.10.2 + gsm48_decode_cause@LIBOSMOGSM_1.0 0.10.2 + gsm48_decode_cccap@LIBOSMOGSM_1.0 0.10.2 + gsm48_decode_classmark3@LIBOSMOGSM_1.0 1.5.1 + gsm48_decode_connected@LIBOSMOGSM_1.0 0.10.2 + gsm48_decode_facility@LIBOSMOGSM_1.0 0.10.2 + gsm48_decode_freq_list@LIBOSMOGSM_1.0 0.10.2 + gsm48_decode_keypad@LIBOSMOGSM_1.0 0.10.2 + gsm48_decode_lai2@LIBOSMOGSM_1.0 0.11.0 + gsm48_decode_lai@LIBOSMOGSM_1.0 0.10.2 + gsm48_decode_notify@LIBOSMOGSM_1.0 0.10.2 + gsm48_decode_progress@LIBOSMOGSM_1.0 0.10.2 + gsm48_decode_redirecting@LIBOSMOGSM_1.0 0.10.2 + gsm48_decode_signal@LIBOSMOGSM_1.0 0.10.2 + gsm48_decode_ssversion@LIBOSMOGSM_1.0 0.10.2 + gsm48_decode_useruser@LIBOSMOGSM_1.0 0.10.2 + gsm48_encode_bcd_number@LIBOSMOGSM_1.0 0.10.2 + gsm48_encode_bearer_cap@LIBOSMOGSM_1.0 0.10.2 + gsm48_encode_called@LIBOSMOGSM_1.0 0.10.2 + gsm48_encode_callerid@LIBOSMOGSM_1.0 0.10.2 + gsm48_encode_calling@LIBOSMOGSM_1.0 0.10.2 + gsm48_encode_cause@LIBOSMOGSM_1.0 0.10.2 + gsm48_encode_cccap@LIBOSMOGSM_1.0 0.10.2 + gsm48_encode_connected@LIBOSMOGSM_1.0 0.10.2 + gsm48_encode_facility@LIBOSMOGSM_1.0 0.10.2 + gsm48_encode_keypad@LIBOSMOGSM_1.0 0.10.2 + gsm48_encode_more@LIBOSMOGSM_1.0 0.10.2 + gsm48_encode_notify@LIBOSMOGSM_1.0 0.10.2 + gsm48_encode_progress@LIBOSMOGSM_1.0 0.10.2 + gsm48_encode_ra@LIBOSMOGSM_1.0 0.11.0 + gsm48_encode_redirecting@LIBOSMOGSM_1.0 0.10.2 + gsm48_encode_signal@LIBOSMOGSM_1.0 0.10.2 + gsm48_encode_ssversion@LIBOSMOGSM_1.0 0.10.2 + gsm48_encode_useruser@LIBOSMOGSM_1.0 0.10.2 + gsm48_generate_lai2@LIBOSMOGSM_1.0 0.11.0 + gsm48_generate_lai@LIBOSMOGSM_1.0 0.10.2 + gsm48_generate_mid@LIBOSMOGSM_1.0 0.11.0 + gsm48_generate_mid_from_imsi@LIBOSMOGSM_1.0 0.10.2 + gsm48_generate_mid_from_tmsi@LIBOSMOGSM_1.0 0.10.2 + gsm48_gmm_cause_names@LIBOSMOGSM_1.0 0.10.2 + gsm48_gsm_cause_names@LIBOSMOGSM_1.0 0.10.2 + gsm48_hdr_gmm_cipherable@LIBOSMOGSM_1.0 0.10.2 + gsm48_mcc_mnc_from_bcd@LIBOSMOGSM_1.0 0.10.2 + gsm48_mcc_mnc_to_bcd@LIBOSMOGSM_1.0 0.10.2 + gsm48_mi_to_string@LIBOSMOGSM_1.0 0.10.2 + gsm48_mi_type_name@LIBOSMOGSM_1.0 0.10.2 + gsm48_mm_att_tlvdef@LIBOSMOGSM_1.0 0.10.2 + gsm48_mm_msgtype_names@LIBOSMOGSM_1.0 0.10.2 + gsm48_mr_cfg_from_gsm0808_sc_cfg@LIBOSMOGSM_1.0 1.3.0 + gsm48_number_of_paging_subchannels@LIBOSMOGSM_1.0 0.10.2 + gsm48_parse_ra@LIBOSMOGSM_1.0 0.10.2 + gsm48_pdisc_msgtype_name@LIBOSMOGSM_1.0 0.10.2 + gsm48_pdisc_msgtype_name_buf@LIBOSMOGSM_1.0 1.3.0 + gsm48_pdisc_msgtype_name_c@LIBOSMOGSM_1.0 1.3.0 + gsm48_pdisc_names@LIBOSMOGSM_1.0 0.10.2 + gsm48_push_l3hdr@LIBOSMOGSM_1.0 1.3.0 + gsm48_ra_equal@LIBOSMOGSM_1.0 1.5.1 + gsm48_reject_value_names@LIBOSMOGSM_1.0 0.11.0 + gsm48_rr_att_tlvdef@LIBOSMOGSM_1.0 0.10.2 + gsm48_rr_msg_name@LIBOSMOGSM_1.0 0.10.2 + gsm48_rr_msgtype_names@LIBOSMOGSM_1.0 0.10.2 + gsm48_set_dtx@LIBOSMOGSM_1.0 0.10.2 + gsm_7bit_decode@LIBOSMOGSM_1.0 0.10.2 + gsm_7bit_decode_n@LIBOSMOGSM_1.0 0.10.2 + gsm_7bit_decode_n_hdr@LIBOSMOGSM_1.0 0.10.2 + gsm_7bit_decode_n_ussd@LIBOSMOGSM_1.0 0.10.2 + gsm_7bit_decode_ussd@LIBOSMOGSM_1.0 0.10.2 + gsm_7bit_encode@LIBOSMOGSM_1.0 0.10.2 + gsm_7bit_encode_n@LIBOSMOGSM_1.0 0.10.2 + gsm_7bit_encode_n_ussd@LIBOSMOGSM_1.0 0.10.2 + gsm_7bit_encode_oct@LIBOSMOGSM_1.0 0.10.2 + gsm_7bit_encode_ussd@LIBOSMOGSM_1.0 0.10.2 + gsm_arfcn2band@LIBOSMOGSM_1.0 0.10.2 + gsm_arfcn2band_rc@LIBOSMOGSM_1.0 1.3.0 + gsm_arfcn2freq10@LIBOSMOGSM_1.0 0.10.2 + gsm_band_name@LIBOSMOGSM_1.0 0.10.2 + gsm_band_parse@LIBOSMOGSM_1.0 0.10.2 + gsm_chan_t_names@LIBOSMOGSM_1.0 0.10.2 + gsm_fn2gsmtime@LIBOSMOGSM_1.0 0.10.2 + gsm_fn_as_gsmtime_str@LIBOSMOGSM_1.0 0.10.2 + gsm_freq102arfcn@LIBOSMOGSM_1.0 0.10.2 + gsm_get_octet_len@LIBOSMOGSM_1.0 0.10.2 + gsm_gsmtime2fn@LIBOSMOGSM_1.0 0.10.2 + gsm_milenage@LIBOSMOGSM_1.0 0.10.2 + gsm_septet_encode@LIBOSMOGSM_1.0 0.10.2 + gsm_septet_pack@LIBOSMOGSM_1.0 1.5.1 + gsm_septets2octets@LIBOSMOGSM_1.0 0.10.2 + ipa_ccm_id_get_parse@LIBOSMOGSM_1.0 1.3.0 + ipa_ccm_id_resp_parse@LIBOSMOGSM_1.0 1.3.0 + ipa_ccm_idtag_name@LIBOSMOGSM_1.0 0.10.2 + ipa_ccm_idtag_parse@LIBOSMOGSM_1.0 0.10.2 + ipa_ccm_idtag_parse_off@LIBOSMOGSM_1.0 0.10.2 + ipa_ccm_make_id_resp@LIBOSMOGSM_1.0 0.10.2 + ipa_ccm_make_id_resp_from_req@LIBOSMOGSM_1.0 0.10.2 + ipa_ccm_rcvmsg_base@LIBOSMOGSM_1.0 0.10.2 + ipa_ccm_rcvmsg_bts_base@LIBOSMOGSM_1.0 0.10.2 + ipa_ccm_send_id_ack@LIBOSMOGSM_1.0 0.10.2 + ipa_ccm_send_id_req@LIBOSMOGSM_1.0 0.10.2 + ipa_ccm_send_pong@LIBOSMOGSM_1.0 0.10.2 + ipa_ccm_tlv_to_unitdata@LIBOSMOGSM_1.0 0.10.2 + ipa_msg_alloc@LIBOSMOGSM_1.0 0.10.2 + ipa_msg_recv@LIBOSMOGSM_1.0 0.10.2 + ipa_msg_recv_buffered@LIBOSMOGSM_1.0 0.10.2 + ipa_parse_unitid@LIBOSMOGSM_1.0 0.10.2 + ipa_prepend_header@LIBOSMOGSM_1.0 0.10.2 + ipa_prepend_header_ext@LIBOSMOGSM_1.0 0.10.2 + ipa_send@LIBOSMOGSM_1.0 0.10.2 + lapd_dl_exit@LIBOSMOGSM_1.0 0.10.2 + lapd_dl_init2@LIBOSMOGSM_1.0 1.4.0 + lapd_dl_init@LIBOSMOGSM_1.0 0.10.2 + lapd_dl_reset@LIBOSMOGSM_1.0 0.10.2 + lapd_dl_set_name@LIBOSMOGSM_1.0 1.4.0 + lapd_msgb_alloc@LIBOSMOGSM_1.0 0.10.2 + lapd_ph_data_ind@LIBOSMOGSM_1.0 0.10.2 + lapd_recv_dlsap@LIBOSMOGSM_1.0 0.10.2 + lapd_set_mode@LIBOSMOGSM_1.0 0.10.2 + lapd_state_names@LIBOSMOGSM_1.0 0.10.2 + lapdm_channel_exit@LIBOSMOGSM_1.0 0.10.2 + lapdm_channel_init2@LIBOSMOGSM_1.0 1.3.0 + lapdm_channel_init3@LIBOSMOGSM_1.0 1.4.0 + lapdm_channel_init@LIBOSMOGSM_1.0 0.10.2 + lapdm_channel_reset@LIBOSMOGSM_1.0 0.10.2 + lapdm_channel_set_flags@LIBOSMOGSM_1.0 0.10.2 + lapdm_channel_set_l1@LIBOSMOGSM_1.0 0.10.2 + lapdm_channel_set_l3@LIBOSMOGSM_1.0 0.10.2 + lapdm_channel_set_mode@LIBOSMOGSM_1.0 0.10.2 + lapdm_datalink_for_sapi@LIBOSMOGSM_1.0 0.10.2 + lapdm_entity_exit@LIBOSMOGSM_1.0 0.10.2 + lapdm_entity_init2@LIBOSMOGSM_1.0 1.3.0 + lapdm_entity_init3@LIBOSMOGSM_1.0 1.4.0 + lapdm_entity_init@LIBOSMOGSM_1.0 0.10.2 + lapdm_entity_reset@LIBOSMOGSM_1.0 0.10.2 + lapdm_entity_set_flags@LIBOSMOGSM_1.0 0.10.2 + lapdm_entity_set_mode@LIBOSMOGSM_1.0 0.10.2 + lapdm_phsap_dequeue_prim@LIBOSMOGSM_1.0 0.10.2 + lapdm_phsap_up@LIBOSMOGSM_1.0 0.10.2 + lapdm_rslms_recvmsg@LIBOSMOGSM_1.0 0.10.2 + milenage_auts@LIBOSMOGSM_1.0 0.10.2 + milenage_check@LIBOSMOGSM_1.0 0.10.2 + milenage_f1@LIBOSMOGSM_1.0 0.10.2 + milenage_f2345@LIBOSMOGSM_1.0 0.10.2 + milenage_generate@LIBOSMOGSM_1.0 0.10.2 + milenage_opc_gen@LIBOSMOGSM_1.0 0.10.2 + ms_class_gmsk_dbm@LIBOSMOGSM_1.0 0.10.2 + ms_pwr_ctl_lvl@LIBOSMOGSM_1.0 0.10.2 + ms_pwr_dbm@LIBOSMOGSM_1.0 0.10.2 + osmo_a5@LIBOSMOGSM_1.0 0.10.2 + osmo_a5_1@LIBOSMOGSM_1.0 0.10.2 + osmo_a5_2@LIBOSMOGSM_1.0 0.10.2 + osmo_apn_from_str@LIBOSMOGSM_1.0 0.10.2 + osmo_apn_qualify@LIBOSMOGSM_1.0 0.10.2 + osmo_apn_qualify_buf@LIBOSMOGSM_1.0 1.3.0 + osmo_apn_qualify_c@LIBOSMOGSM_1.0 1.3.0 + osmo_apn_qualify_from_imsi@LIBOSMOGSM_1.0 0.10.2 + osmo_apn_qualify_from_imsi_buf@LIBOSMOGSM_1.0 1.3.0 + osmo_apn_qualify_from_imsi_c@LIBOSMOGSM_1.0 1.3.0 + osmo_apn_to_str@LIBOSMOGSM_1.0 0.10.2 + osmo_auth_3g_from_2g@LIBOSMOGSM_1.0 0.10.2 + osmo_auth_alg_name@LIBOSMOGSM_1.0 0.10.2 + osmo_auth_alg_parse@LIBOSMOGSM_1.0 0.10.2 + osmo_auth_c3@LIBOSMOGSM_1.0 0.11.0 + osmo_auth_gen_vec@LIBOSMOGSM_1.0 0.10.2 + osmo_auth_gen_vec_auts@LIBOSMOGSM_1.0 0.10.2 + osmo_auth_load@LIBOSMOGSM_1.0 0.10.2 + osmo_auth_register@LIBOSMOGSM_1.0 0.10.2 + osmo_auth_supported@LIBOSMOGSM_1.0 0.10.2 + osmo_bssap_le_dec@LIBOSMOGSM_1.0 1.5.1 + osmo_bssap_le_enc@LIBOSMOGSM_1.0 1.5.1 + osmo_bssap_le_pdu_to_str_buf@LIBOSMOGSM_1.0 1.5.1 + osmo_bssap_le_pdu_to_str_c@LIBOSMOGSM_1.0 1.5.1 + osmo_bsslap_dec@LIBOSMOGSM_1.0 1.5.1 + osmo_bsslap_enc@LIBOSMOGSM_1.0 1.5.1 + osmo_bsslap_msgt_names@LIBOSMOGSM_1.0 1.5.1 + osmo_bssmap_le_ie_dec_location_type@LIBOSMOGSM_1.0 1.5.1 + osmo_bssmap_le_ie_enc_location_type@LIBOSMOGSM_1.0 1.5.1 + osmo_bssmap_le_msgt@LIBOSMOGSM_1.0 1.5.1 + osmo_bssmap_le_msgt_names@LIBOSMOGSM_1.0 1.5.1 + osmo_bts_feature_name@LIBOSMOGSM_1.0 0.11.0 + osmo_bts_features_descs@LIBOSMOGSM_1.0 0.11.0 + osmo_bts_features_names@LIBOSMOGSM_1.0 1.6.0 + osmo_c4@LIBOSMOGSM_1.0 0.10.2 + osmo_cbsp_decode@LIBOSMOGSM_1.0 1.3.0 + osmo_cbsp_decoded_alloc@LIBOSMOGSM_1.0 1.3.0 + osmo_cbsp_encode@LIBOSMOGSM_1.0 1.3.0 + osmo_cbsp_errstr@LIBOSMOGSM_1.0 1.3.0 + osmo_cbsp_init_struct@LIBOSMOGSM_1.0 1.3.0 + osmo_cbsp_msgb_alloc@LIBOSMOGSM_1.0 1.3.0 + osmo_cbsp_recv_buffered@LIBOSMOGSM_1.0 1.3.0 + osmo_cgi_cmp@LIBOSMOGSM_1.0 1.5.1 + osmo_cgi_name2@LIBOSMOGSM_1.0 0.11.0 + osmo_cgi_name@LIBOSMOGSM_1.0 0.11.0 + osmo_cgi_name_buf@LIBOSMOGSM_1.0 1.3.0 + osmo_cgi_name_c@LIBOSMOGSM_1.0 1.3.0 + osmo_cgi_ps_cmp@LIBOSMOGSM_1.0 1.5.1 + osmo_cgi_ps_name2@LIBOSMOGSM_1.0 1.5.1 + osmo_cgi_ps_name@LIBOSMOGSM_1.0 1.5.1 + osmo_cgi_ps_name_buf@LIBOSMOGSM_1.0 1.5.1 + osmo_cgi_ps_name_c@LIBOSMOGSM_1.0 1.5.1 + osmo_cm_service_type_names@LIBOSMOGSM_1.0 1.3.0 + osmo_dec_gcr@LIBOSMOGSM_1.0 1.3.0 + osmo_dump_gsmtime@LIBOSMOGSM_1.0 0.10.2 + osmo_dump_gsmtime_buf@LIBOSMOGSM_1.0 1.3.0 + osmo_dump_gsmtime_c@LIBOSMOGSM_1.0 1.3.0 + osmo_earfcn_add@LIBOSMOGSM_1.0 0.10.2 + osmo_earfcn_bit_size@LIBOSMOGSM_1.0 0.10.2 + osmo_earfcn_bit_size_ext@LIBOSMOGSM_1.0 0.10.2 + osmo_earfcn_del@LIBOSMOGSM_1.0 0.10.2 + osmo_earfcn_init@LIBOSMOGSM_1.0 0.10.2 + osmo_enc_gcr@LIBOSMOGSM_1.0 1.3.0 + osmo_gad_dec@LIBOSMOGSM_1.0 1.5.1 + osmo_gad_dec_lat@LIBOSMOGSM_1.0 1.5.1 + osmo_gad_dec_lon@LIBOSMOGSM_1.0 1.5.1 + osmo_gad_dec_unc@LIBOSMOGSM_1.0 1.5.1 + osmo_gad_enc@LIBOSMOGSM_1.0 1.5.1 + osmo_gad_enc_lat@LIBOSMOGSM_1.0 1.5.1 + osmo_gad_enc_lon@LIBOSMOGSM_1.0 1.5.1 + osmo_gad_enc_unc@LIBOSMOGSM_1.0 1.5.1 + osmo_gad_raw_read@LIBOSMOGSM_1.0 1.5.1 + osmo_gad_raw_write@LIBOSMOGSM_1.0 1.5.1 + osmo_gad_to_str_buf@LIBOSMOGSM_1.0 1.5.1 + osmo_gad_to_str_c@LIBOSMOGSM_1.0 1.5.1 + osmo_gad_type_names@LIBOSMOGSM_1.0 1.5.1 + osmo_gcr_dump@LIBOSMOGSM_1.0 1.3.0 + osmo_gcr_dump_buf@LIBOSMOGSM_1.0 1.3.0 + osmo_gcr_eq@LIBOSMOGSM_1.0 1.3.0 + osmo_gen_home_network_domain@LIBOSMOGSM_1.0 1.3.0 + osmo_gen_mme_domain@LIBOSMOGSM_1.0 1.3.0 + osmo_gen_mme_group_domain@LIBOSMOGSM_1.0 1.3.0 + osmo_get_rand_id@LIBOSMOGSM_1.0 0.10.2 + osmo_gprs_dl_block_size_bits@LIBOSMOGSM_1.0 0.10.2 + osmo_gprs_dl_block_size_bytes@LIBOSMOGSM_1.0 0.10.2 + osmo_gprs_dl_cs_by_block_bytes@LIBOSMOGSM_1.0 0.10.2 + osmo_gprs_ul_block_size_bits@LIBOSMOGSM_1.0 0.10.2 + osmo_gprs_ul_block_size_bytes@LIBOSMOGSM_1.0 0.10.2 + osmo_gprs_ul_cs_by_block_bytes@LIBOSMOGSM_1.0 0.10.2 + osmo_gsm48_classmark1_is_r99@LIBOSMOGSM_1.0 1.3.0 + osmo_gsm48_classmark2_is_r99@LIBOSMOGSM_1.0 1.3.0 + osmo_gsm48_classmark_a5_name@LIBOSMOGSM_1.0 1.3.0 + osmo_gsm48_classmark_a5_name_buf@LIBOSMOGSM_1.0 1.3.0 + osmo_gsm48_classmark_a5_name_c@LIBOSMOGSM_1.0 1.3.0 + osmo_gsm48_classmark_is_r99@LIBOSMOGSM_1.0 1.3.0 + osmo_gsm48_classmark_supports_a5@LIBOSMOGSM_1.0 1.3.0 + osmo_gsm48_classmark_update@LIBOSMOGSM_1.0 1.3.0 + osmo_gsm48_range_enc_1024@LIBOSMOGSM_1.0 1.3.0 + osmo_gsm48_range_enc_128@LIBOSMOGSM_1.0 1.3.0 + osmo_gsm48_range_enc_256@LIBOSMOGSM_1.0 1.3.0 + osmo_gsm48_range_enc_512@LIBOSMOGSM_1.0 1.3.0 + osmo_gsm48_range_enc_arfcns@LIBOSMOGSM_1.0 1.3.0 + osmo_gsm48_range_enc_determine_range@LIBOSMOGSM_1.0 1.3.0 + osmo_gsm48_range_enc_filter_arfcns@LIBOSMOGSM_1.0 1.3.0 + osmo_gsm48_range_enc_find_index@LIBOSMOGSM_1.0 1.3.0 + osmo_gsm48_rest_octets_si13_decode@LIBOSMOGSM_1.0 1.5.1 + osmo_gsm48_rest_octets_si13_encode@LIBOSMOGSM_1.0 1.3.0 + osmo_gsm48_rest_octets_si1_encode@LIBOSMOGSM_1.0 1.3.0 + osmo_gsm48_rest_octets_si2quater_encode@LIBOSMOGSM_1.0 1.3.0 + osmo_gsm48_rest_octets_si3_decode@LIBOSMOGSM_1.0 1.3.0 + osmo_gsm48_rest_octets_si3_encode@LIBOSMOGSM_1.0 1.3.0 + osmo_gsm48_rest_octets_si4_decode@LIBOSMOGSM_1.0 1.5.1 + osmo_gsm48_rest_octets_si4_encode@LIBOSMOGSM_1.0 1.3.0 + osmo_gsm48_rest_octets_si6_encode@LIBOSMOGSM_1.0 1.3.0 + osmo_gsm48_rfpowercap2powerclass@LIBOSMOGSM_1.0 1.3.0 + osmo_gsup_decode@LIBOSMOGSM_1.0 0.10.2 + osmo_gsup_encode@LIBOSMOGSM_1.0 0.10.2 + osmo_gsup_get_err_msg_type@LIBOSMOGSM_1.0 0.12.0 + osmo_gsup_message_class_names@LIBOSMOGSM_1.0 1.3.0 + osmo_gsup_message_type_names@LIBOSMOGSM_1.0 0.10.2 + osmo_gsup_session_state_names@LIBOSMOGSM_1.0 0.12.0 + osmo_gsup_sms_decode_sm_rp_da@LIBOSMOGSM_1.0 1.3.0 + osmo_gsup_sms_decode_sm_rp_oa@LIBOSMOGSM_1.0 1.3.0 + osmo_gsup_sms_encode_sm_rp_da@LIBOSMOGSM_1.0 1.3.0 + osmo_gsup_sms_encode_sm_rp_oa@LIBOSMOGSM_1.0 1.3.0 + osmo_gummei_name@LIBOSMOGSM_1.0 1.3.0 + osmo_gummei_name_buf@LIBOSMOGSM_1.0 1.3.0 + osmo_gummei_name_c@LIBOSMOGSM_1.0 1.3.0 + osmo_i460_demux_in@LIBOSMOGSM_1.0 1.4.0 + osmo_i460_mux_enqueue@LIBOSMOGSM_1.0 1.4.0 + osmo_i460_mux_out@LIBOSMOGSM_1.0 1.4.0 + osmo_i460_subchan_add@LIBOSMOGSM_1.0 1.4.0 + osmo_i460_subchan_del@LIBOSMOGSM_1.0 1.4.0 + osmo_i460_ts_init@LIBOSMOGSM_1.0 1.4.0 + osmo_imei_str_valid@LIBOSMOGSM_1.0 1.3.0 + osmo_imsi_str_valid@LIBOSMOGSM_1.0 0.10.2 + osmo_iuup_compute_header_crc@LIBOSMOGSM_1.0 1.7.0 + osmo_iuup_compute_payload_crc@LIBOSMOGSM_1.0 1.7.0 + osmo_iuup_instance_alloc@LIBOSMOGSM_1.0 1.7.0 + osmo_iuup_instance_free@LIBOSMOGSM_1.0 1.7.0 + osmo_iuup_instance_set_transport_prim_cb@LIBOSMOGSM_1.0 1.7.0 + osmo_iuup_instance_set_user_prim_cb@LIBOSMOGSM_1.0 1.7.0 + osmo_iuup_rnl_prim_alloc@LIBOSMOGSM_1.0 1.7.0 + osmo_iuup_rnl_prim_down@LIBOSMOGSM_1.0 1.7.0 + osmo_iuup_tnl_prim_alloc@LIBOSMOGSM_1.0 1.7.0 + osmo_iuup_tnl_prim_up@LIBOSMOGSM_1.0 1.7.0 + osmo_kdf_enb@LIBOSMOGSM_1.0 1.6.0 + osmo_kdf_kasme@LIBOSMOGSM_1.0 1.6.0 + osmo_kdf_kc128@LIBOSMOGSM_1.0 1.6.0 + osmo_kdf_nas@LIBOSMOGSM_1.0 1.6.0 + osmo_kdf_nh@LIBOSMOGSM_1.0 1.6.0 + osmo_lai_cmp@LIBOSMOGSM_1.0 1.5.1 + osmo_lai_name@LIBOSMOGSM_1.0 0.11.0 + osmo_lai_name_buf@LIBOSMOGSM_1.0 1.3.0 + osmo_lai_name_c@LIBOSMOGSM_1.0 1.3.0 + osmo_lcls_dump@LIBOSMOGSM_1.0 1.3.0 + osmo_lcls_dump_buf@LIBOSMOGSM_1.0 1.3.0 + osmo_lcls_dump_c@LIBOSMOGSM_1.0 1.3.0 + osmo_lcs_cause_dec@LIBOSMOGSM_1.0 1.5.1 + osmo_lcs_cause_enc@LIBOSMOGSM_1.0 1.5.1 + osmo_lu_type_names@LIBOSMOGSM_1.0 1.3.0 + osmo_match_shift_tlv@LIBOSMOGSM_1.0 0.10.2 + osmo_match_shift_tv_fixed@LIBOSMOGSM_1.0 0.10.2 + osmo_mcc_name@LIBOSMOGSM_1.0 0.11.0 + osmo_mcc_name_buf@LIBOSMOGSM_1.0 1.3.0 + osmo_mcc_name_c@LIBOSMOGSM_1.0 1.3.0 + osmo_mi_name@LIBOSMOGSM_1.0 1.3.0 + osmo_mi_name_buf@LIBOSMOGSM_1.0 1.3.0 + osmo_mi_name_c@LIBOSMOGSM_1.0 1.3.0 + osmo_mnc_cmp@LIBOSMOGSM_1.0 0.11.0 + osmo_mnc_from_str@LIBOSMOGSM_1.0 0.11.0 + osmo_mnc_name@LIBOSMOGSM_1.0 0.11.0 + osmo_mnc_name_buf@LIBOSMOGSM_1.0 1.3.0 + osmo_mnc_name_c@LIBOSMOGSM_1.0 1.3.0 + osmo_mncc_names@LIBOSMOGSM_1.0 0.12.0 + osmo_mncc_stringify@LIBOSMOGSM_1.0 0.11.0 + osmo_mobile_identity_cmp@LIBOSMOGSM_1.0 1.4.0 + osmo_mobile_identity_decode@LIBOSMOGSM_1.0 1.4.0 + osmo_mobile_identity_decode_from_l3@LIBOSMOGSM_1.0 1.4.0 + osmo_mobile_identity_encode_buf@LIBOSMOGSM_1.0 1.4.0 + osmo_mobile_identity_encode_msgb@LIBOSMOGSM_1.0 1.4.0 + osmo_mobile_identity_encoded_len@LIBOSMOGSM_1.0 1.4.0 + osmo_mobile_identity_to_str_buf@LIBOSMOGSM_1.0 1.4.0 + osmo_mobile_identity_to_str_c@LIBOSMOGSM_1.0 1.4.0 + osmo_msisdn_str_valid@LIBOSMOGSM_1.0 0.10.2 + osmo_nri_range_overlaps_ranges@LIBOSMOGSM_1.0 1.4.0 + osmo_nri_range_validate@LIBOSMOGSM_1.0 1.4.0 + osmo_nri_ranges_add@LIBOSMOGSM_1.0 1.4.0 + osmo_nri_ranges_alloc@LIBOSMOGSM_1.0 1.4.0 + osmo_nri_ranges_del@LIBOSMOGSM_1.0 1.4.0 + osmo_nri_ranges_free@LIBOSMOGSM_1.0 1.4.0 + osmo_nri_ranges_to_str_buf@LIBOSMOGSM_1.0 1.4.0 + osmo_nri_ranges_to_str_c@LIBOSMOGSM_1.0 1.4.0 + osmo_nri_ranges_vty_add@LIBOSMOGSM_1.0 1.4.0 + osmo_nri_ranges_vty_del@LIBOSMOGSM_1.0 1.4.0 + osmo_nri_v_limit_by_ranges@LIBOSMOGSM_1.0 1.4.0 + osmo_nri_v_matches_ranges@LIBOSMOGSM_1.0 1.4.0 + osmo_nri_v_validate@LIBOSMOGSM_1.0 1.4.0 + osmo_oap_client_encoded@LIBOSMOGSM_1.0 1.3.0 + osmo_oap_client_handle@LIBOSMOGSM_1.0 1.3.0 + osmo_oap_client_init@LIBOSMOGSM_1.0 1.3.0 + osmo_oap_client_register@LIBOSMOGSM_1.0 1.3.0 + osmo_oap_decode@LIBOSMOGSM_1.0 0.10.2 + osmo_oap_encode@LIBOSMOGSM_1.0 0.10.2 + osmo_parse_home_network_domain@LIBOSMOGSM_1.0 1.3.0 + osmo_parse_mme_domain@LIBOSMOGSM_1.0 1.3.0 + osmo_ph_prim_names@LIBOSMOGSM_1.0 0.10.2 + osmo_plmn_cmp@LIBOSMOGSM_1.0 0.11.0 + osmo_plmn_from_bcd@LIBOSMOGSM_1.0 0.11.0 + osmo_plmn_name2@LIBOSMOGSM_1.0 0.11.0 + osmo_plmn_name@LIBOSMOGSM_1.0 0.11.0 + osmo_plmn_name_buf@LIBOSMOGSM_1.0 1.3.0 + osmo_plmn_name_c@LIBOSMOGSM_1.0 1.3.0 + osmo_plmn_to_bcd@LIBOSMOGSM_1.0 0.11.0 + osmo_rai_cmp@LIBOSMOGSM_1.0 1.5.1 + osmo_rai_name2@LIBOSMOGSM_1.0 1.5.1 + osmo_rai_name2_buf@LIBOSMOGSM_1.0 1.5.1 + osmo_rai_name2_c@LIBOSMOGSM_1.0 1.5.1 + osmo_rai_name@LIBOSMOGSM_1.0 0.11.0 + osmo_rai_name_buf@LIBOSMOGSM_1.0 1.3.0 + osmo_rai_name_c@LIBOSMOGSM_1.0 1.3.0 + osmo_rat_type_names@LIBOSMOGSM_1.0 1.3.0 + osmo_rsl2sitype@LIBOSMOGSM_1.0 0.10.2 + osmo_shift_lv@LIBOSMOGSM_1.0 0.10.2 + osmo_shift_tlv@LIBOSMOGSM_1.0 0.10.2 + osmo_shift_v_fixed@LIBOSMOGSM_1.0 0.10.2 + osmo_sitype2rsl@LIBOSMOGSM_1.0 0.10.2 + osmo_sitype_strs@LIBOSMOGSM_1.0 0.10.2 + osmo_sub_auth_type_names@LIBOSMOGSM_1.0 0.10.2 + osmo_tlv_prot_ie_name@LIBOSMOGSM_1.0 1.5.1 + osmo_tlv_prot_msg_name@LIBOSMOGSM_1.0 1.5.1 + osmo_tlv_prot_parse@LIBOSMOGSM_1.0 1.5.1 + osmo_tlv_prot_validate_tp@LIBOSMOGSM_1.0 1.5.1 + osmo_tlvp_copy@LIBOSMOGSM_1.0 0.10.2 + osmo_tlvp_merge@LIBOSMOGSM_1.0 0.10.2 + osmo_tmsi_nri_v_get@LIBOSMOGSM_1.0 1.4.0 + osmo_tmsi_nri_v_limit_by_ranges@LIBOSMOGSM_1.0 1.4.0 + osmo_tmsi_nri_v_set@LIBOSMOGSM_1.0 1.4.0 + rr_cause_name@LIBOSMOGSM_1.0 0.10.2 + rsl_act_type_names@LIBOSMOGSM_1.0 0.10.2 + rsl_att_tlvdef@LIBOSMOGSM_1.0 0.10.2 + rsl_ccch_conf_to_bs_cc_chans@LIBOSMOGSM_1.0 0.10.2 + rsl_ccch_conf_to_bs_ccch_sdcch_comb@LIBOSMOGSM_1.0 0.10.2 + rsl_chan_nr_str@LIBOSMOGSM_1.0 0.10.2 + rsl_chan_nr_str_buf@LIBOSMOGSM_1.0 1.3.0 + rsl_chan_nr_str_c@LIBOSMOGSM_1.0 1.3.0 + rsl_dec_chan_nr@LIBOSMOGSM_1.0 0.10.2 + rsl_enc_chan_nr@LIBOSMOGSM_1.0 0.10.2 + rsl_err_name@LIBOSMOGSM_1.0 0.10.2 + rsl_init_cchan_hdr@LIBOSMOGSM_1.0 0.10.2 + rsl_init_rll_hdr@LIBOSMOGSM_1.0 0.10.2 + rsl_ipac_eie_tlvdef@LIBOSMOGSM_1.0 0.10.2 + rsl_ipac_msg_name@LIBOSMOGSM_1.0 0.10.2 + rsl_msg_name@LIBOSMOGSM_1.0 0.10.2 + rsl_or_ipac_msg_name@LIBOSMOGSM_1.0 0.10.2 + rsl_rll_push_hdr@LIBOSMOGSM_1.0 0.10.2 + rsl_rll_push_l3@LIBOSMOGSM_1.0 0.10.2 + rsl_rll_simple@LIBOSMOGSM_1.0 0.10.2 + rsl_rlm_cause_name@LIBOSMOGSM_1.0 0.10.2 + rxlev2dbm@LIBOSMOGSM_1.0 0.10.2 + rxlev_stat_dump@LIBOSMOGSM_1.0 0.10.2 + rxlev_stat_get_next@LIBOSMOGSM_1.0 0.10.2 + rxlev_stat_input@LIBOSMOGSM_1.0 0.10.2 + rxlev_stat_reset@LIBOSMOGSM_1.0 0.10.2 + sgsap_eps_lu_type_names@LIBOSMOGSM_1.0 1.3.0 + sgsap_ie_tlvdef@LIBOSMOGSM_1.0 1.3.0 + sgsap_iei_names@LIBOSMOGSM_1.0 1.3.0 + sgsap_ismi_det_eps_type_names@LIBOSMOGSM_1.0 1.3.0 + sgsap_ismi_det_noneps_type_names@LIBOSMOGSM_1.0 1.3.0 + sgsap_msg_type_names@LIBOSMOGSM_1.0 1.3.0 + sgsap_service_ind_names@LIBOSMOGSM_1.0 1.3.0 + sgsap_sgs_cause_names@LIBOSMOGSM_1.0 1.3.0 + sgsap_ue_emm_mode_names@LIBOSMOGSM_1.0 1.3.0 + tlv_def_patch@LIBOSMOGSM_1.0 0.10.2 + tlv_dump@LIBOSMOGSM_1.0 0.10.2 + tlv_encode@LIBOSMOGSM_1.0 1.3.0 + tlv_encode_one@LIBOSMOGSM_1.0 1.3.0 + tlv_encode_ordered@LIBOSMOGSM_1.0 1.3.0 + tlv_parse2@LIBOSMOGSM_1.0 0.11.0 + tlv_parse@LIBOSMOGSM_1.0 0.10.2 + tlv_parse_one@LIBOSMOGSM_1.0 0.10.2 + tvlv_att_def@LIBOSMOGSM_1.0 0.10.2 + vtvlv_gan_att_def@LIBOSMOGSM_1.0 0.10.2 diff -Nru libosmocore-1.6.0/debian/libosmovty9.symbols libosmocore-1.7.0/debian/libosmovty9.symbols --- libosmocore-1.6.0/debian/libosmovty9.symbols 2022-03-13 20:16:43.000000000 +0000 +++ libosmocore-1.7.0/debian/libosmovty9.symbols 2022-10-09 07:16:10.000000000 +0000 @@ -126,10 +126,15 @@ vty_out_fsm_inst2@Base 1.5.1 vty_out_fsm_inst@Base 1.5.1 vty_out_newline@Base 1.5.1 + vty_out_rate_ctr_group2@Base 1.7.0 vty_out_rate_ctr_group@Base 1.5.1 + vty_out_rate_ctr_group_fmt2@Base 1.7.0 vty_out_rate_ctr_group_fmt@Base 1.5.1 + vty_out_stat_item_group2@Base 1.7.0 vty_out_stat_item_group@Base 1.5.1 + vty_out_statistics_full2@Base 1.7.0 vty_out_statistics_full@Base 1.5.1 + vty_out_statistics_partial2@Base 1.7.0 vty_out_statistics_partial@Base 1.5.1 vty_out_uptime@Base 1.6.0 vty_out_va@Base 1.5.1 diff -Nru libosmocore-1.6.0/debian/patches/0001-Removed-illegal-pkg-config-directive.patch libosmocore-1.7.0/debian/patches/0001-Removed-illegal-pkg-config-directive.patch --- libosmocore-1.6.0/debian/patches/0001-Removed-illegal-pkg-config-directive.patch 2022-03-13 20:16:43.000000000 +0000 +++ libosmocore-1.7.0/debian/patches/0001-Removed-illegal-pkg-config-directive.patch 2022-10-09 07:16:10.000000000 +0000 @@ -1,20 +1,20 @@ From: Ruben Undheim Date: Wed, 16 Sep 2015 19:01:00 +0200 Subject: Removed illegal pkg-config directive +Forwarded: not-needed Gets rid of pkg-config-bad-directive lintian --- libosmogb.pc.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/libosmogb.pc.in b/libosmogb.pc.in -index a163cc4..a97ce32 100644 ---- a/libosmogb.pc.in -+++ b/libosmogb.pc.in -@@ -7,5 +7,5 @@ Name: Osmocom GPRS Gb Library - Description: Osmocom GPRS Gb Interface (NS/BSSGP) Library +Index: libosmocore-1.7.0/libosmogb.pc.in +=================================================================== +--- libosmocore-1.7.0.orig/libosmogb.pc.in 2022-09-04 01:00:24.857950888 +0200 ++++ libosmocore-1.7.0/libosmogb.pc.in 2022-09-04 01:00:45.769963462 +0200 +@@ -8,4 +8,4 @@ Version: @VERSION@ - Libs: -L${libdir} @TALLOC_LIBS@ -losmogb -losmovty -losmocore + Requires: talloc, libosmocore, libosmovty + Libs: -L${libdir} -losmogb -Cflags: -I${includedir}/ -fno-strict-aliasing +Cflags: -I${includedir}/ - diff -Nru libosmocore-1.6.0/debian/patches/0003-Setting-library-version-explicitly.patch libosmocore-1.7.0/debian/patches/0003-Setting-library-version-explicitly.patch --- libosmocore-1.6.0/debian/patches/0003-Setting-library-version-explicitly.patch 2022-03-13 20:16:43.000000000 +0000 +++ libosmocore-1.7.0/debian/patches/0003-Setting-library-version-explicitly.patch 2022-10-09 07:16:10.000000000 +0000 @@ -1,6 +1,7 @@ From: Ruben Undheim Date: Sun, 6 Dec 2015 14:44:46 +0100 Subject: Setting library version explicitly +Forwarded: not-needed --- configure.ac | 2 +- @@ -13,7 +14,7 @@ @@ -1,5 +1,5 @@ AC_INIT([libosmocore], - m4_esyscmd([./git-version-gen .tarball-version]), -+ 1.6.0, ++ 1.7.0, [openbsc@lists.osmocom.org]) dnl *This* is the root dir, even if an install-sh exists in ../ or ../../ diff -Nru libosmocore-1.6.0/debian/patches/0005-Set-HTML_TIMESTAMP-to-NO-to-make-build-reproducible.patch libosmocore-1.7.0/debian/patches/0005-Set-HTML_TIMESTAMP-to-NO-to-make-build-reproducible.patch --- libosmocore-1.6.0/debian/patches/0005-Set-HTML_TIMESTAMP-to-NO-to-make-build-reproducible.patch 2022-03-13 20:16:43.000000000 +0000 +++ libosmocore-1.7.0/debian/patches/0005-Set-HTML_TIMESTAMP-to-NO-to-make-build-reproducible.patch 2022-10-09 07:16:10.000000000 +0000 @@ -1,6 +1,7 @@ From: Ruben Undheim Date: Wed, 10 Feb 2016 20:34:39 +0100 Subject: Set HTML_TIMESTAMP to NO to make build reproducible +Forwarded: not-needed --- Doxyfile.vty.in | 2 +- diff -Nru libosmocore-1.6.0/debian/patches/0006-Fix-some-byte-ordering-for-big-endian-architectures.patch libosmocore-1.7.0/debian/patches/0006-Fix-some-byte-ordering-for-big-endian-architectures.patch --- libosmocore-1.6.0/debian/patches/0006-Fix-some-byte-ordering-for-big-endian-architectures.patch 2022-03-13 20:16:43.000000000 +0000 +++ libosmocore-1.7.0/debian/patches/0006-Fix-some-byte-ordering-for-big-endian-architectures.patch 2022-10-09 07:16:10.000000000 +0000 @@ -1,6 +1,7 @@ From: Ruben Undheim Date: Wed, 14 Nov 2018 22:22:26 +0100 Subject: Fix some byte ordering for big-endian architectures +Forwarded: not-needed --- src/gsm/gsm0808_utils.c | 6 +++--- diff -Nru libosmocore-1.6.0/debian/patches/0007-TIMER-constants-not-on-some-architectures.patch libosmocore-1.7.0/debian/patches/0007-TIMER-constants-not-on-some-architectures.patch --- libosmocore-1.6.0/debian/patches/0007-TIMER-constants-not-on-some-architectures.patch 2022-03-13 20:16:43.000000000 +0000 +++ libosmocore-1.7.0/debian/patches/0007-TIMER-constants-not-on-some-architectures.patch 2022-10-09 07:16:10.000000000 +0000 @@ -1,17 +1,18 @@ From: Ruben Undheim Date: Sun, 18 Nov 2018 12:37:57 +0100 Subject: TIMER constants not on some architectures +Forwarded: not-needed --- src/timer_clockgettime.c | 18 ++++++++++++------ tests/timer/clk_override_test.c | 3 +++ 2 files changed, 15 insertions(+), 6 deletions(-) -diff --git a/src/timer_clockgettime.c b/src/timer_clockgettime.c -index 7b17fd1..b610b30 100644 ---- a/src/timer_clockgettime.c -+++ b/src/timer_clockgettime.c -@@ -75,20 +75,26 @@ static struct fakeclock* clkid_to_fakeclock(clockid_t clk_id) +Index: libosmocore-1.7.0/src/timer_clockgettime.c +=================================================================== +--- libosmocore-1.7.0.orig/src/timer_clockgettime.c 2022-09-04 01:01:02.133973228 +0200 ++++ libosmocore-1.7.0/src/timer_clockgettime.c 2022-09-04 01:01:02.129973226 +0200 +@@ -71,20 +71,26 @@ switch(clk_id) { case CLOCK_REALTIME: return &realtime; @@ -44,11 +45,11 @@ default: return NULL; } -diff --git a/tests/timer/clk_override_test.c b/tests/timer/clk_override_test.c -index 308e821..73673a2 100644 ---- a/tests/timer/clk_override_test.c -+++ b/tests/timer/clk_override_test.c -@@ -40,12 +40,15 @@ int main(int argc, char *argv[]) +Index: libosmocore-1.7.0/tests/timer/clk_override_test.c +=================================================================== +--- libosmocore-1.7.0.orig/tests/timer/clk_override_test.c 2022-09-04 01:01:02.133973228 +0200 ++++ libosmocore-1.7.0/tests/timer/clk_override_test.c 2022-09-04 01:01:02.129973226 +0200 +@@ -36,12 +36,15 @@ struct timespec read1, read2, res; struct timespec *mono; diff -Nru libosmocore-1.6.0/debian/patches/0008-MAXPATHLEN-set-if-not-defined.patch libosmocore-1.7.0/debian/patches/0008-MAXPATHLEN-set-if-not-defined.patch --- libosmocore-1.6.0/debian/patches/0008-MAXPATHLEN-set-if-not-defined.patch 2022-03-13 20:16:43.000000000 +0000 +++ libosmocore-1.7.0/debian/patches/0008-MAXPATHLEN-set-if-not-defined.patch 2022-10-09 07:16:10.000000000 +0000 @@ -1,6 +1,7 @@ From: Ruben Undheim Date: Sun, 18 Nov 2018 13:02:47 +0100 Subject: MAXPATHLEN set if not defined +Forwarded: not-needed --- src/vty/command.c | 5 +++++ diff -Nru libosmocore-1.6.0/debian/patches/0009-remove-dependency-on-unversioned-python.patch libosmocore-1.7.0/debian/patches/0009-remove-dependency-on-unversioned-python.patch --- libosmocore-1.6.0/debian/patches/0009-remove-dependency-on-unversioned-python.patch 2022-03-13 20:16:43.000000000 +0000 +++ libosmocore-1.7.0/debian/patches/0009-remove-dependency-on-unversioned-python.patch 2022-10-09 07:16:10.000000000 +0000 @@ -1,4 +1,5 @@ Description: there had been some links to unversioned python left +Forwarded: not-needed Index: libosmocore-1.3.2/contrib/fsm-to-dot.py =================================================================== --- libosmocore-1.3.2.orig/contrib/fsm-to-dot.py 2020-08-11 20:40:31.154719238 +0000 diff -Nru libosmocore-1.6.0/debian/patches/0010-spelling.patch libosmocore-1.7.0/debian/patches/0010-spelling.patch --- libosmocore-1.6.0/debian/patches/0010-spelling.patch 2022-03-13 20:16:43.000000000 +0000 +++ libosmocore-1.7.0/debian/patches/0010-spelling.patch 2022-10-09 07:16:10.000000000 +0000 @@ -1,8 +1,9 @@ Description: fix some typos -Index: libosmocore-1.6.0/src/gb/frame_relay.c +Forwarded: not-needed +Index: libosmocore-1.7.0/src/gb/frame_relay.c =================================================================== ---- libosmocore-1.6.0.orig/src/gb/frame_relay.c 2022-01-02 00:17:29.669739402 +0100 -+++ libosmocore-1.6.0/src/gb/frame_relay.c 2022-01-02 00:17:29.669739402 +0100 +--- libosmocore-1.7.0.orig/src/gb/frame_relay.c 2022-09-04 01:01:11.693978911 +0200 ++++ libosmocore-1.7.0/src/gb/frame_relay.c 2022-09-04 01:01:11.693978911 +0200 @@ -668,7 +668,7 @@ } @@ -12,10 +13,10 @@ return -1; } link_int_rx = TLVP_VAL(tp, Q933_IEI_LINK_INT_VERIF); -Index: libosmocore-1.6.0/src/gb/gprs_ns2_vty.c +Index: libosmocore-1.7.0/src/gb/gprs_ns2_vty.c =================================================================== ---- libosmocore-1.6.0.orig/src/gb/gprs_ns2_vty.c 2022-01-02 00:17:29.669739402 +0100 -+++ libosmocore-1.6.0/src/gb/gprs_ns2_vty.c 2022-01-02 00:17:29.669739402 +0100 +--- libosmocore-1.7.0.orig/src/gb/gprs_ns2_vty.c 2022-09-04 01:01:11.693978911 +0200 ++++ libosmocore-1.7.0/src/gb/gprs_ns2_vty.c 2022-09-04 01:01:11.693978911 +0200 @@ -751,7 +751,7 @@ DEFUN(cfg_ns_bind_ipaccess, cfg_ns_bind_ipaccess_cmd, @@ -25,11 +26,11 @@ ) { struct vty_bind *vbind = vty->index; -Index: libosmocore-1.6.0/src/sim/card_fs_usim.c +Index: libosmocore-1.7.0/src/sim/card_fs_usim.c =================================================================== ---- libosmocore-1.6.0.orig/src/sim/card_fs_usim.c 2022-01-02 00:17:29.669739402 +0100 -+++ libosmocore-1.6.0/src/sim/card_fs_usim.c 2022-01-02 00:17:29.669739402 +0100 -@@ -365,7 +365,7 @@ +--- libosmocore-1.7.0.orig/src/sim/card_fs_usim.c 2022-09-04 01:01:11.693978911 +0200 ++++ libosmocore-1.7.0/src/sim/card_fs_usim.c 2022-09-04 01:01:11.693978911 +0200 +@@ -361,7 +361,7 @@ EF_LIN_FIX_N(0x4F07, 0x07, "EF.PROSE_POLICY", F_OPTIONAL, 1, 64, "ProSe Direct Discovery Announcing Radio Parameters"), EF_LIN_FIX_N(0x4F08, 0x08, "EF.PROSE_PLMN", F_OPTIONAL, 1, 64, diff -Nru libosmocore-1.6.0/debian/patches/path-max.patch libosmocore-1.7.0/debian/patches/path-max.patch --- libosmocore-1.6.0/debian/patches/path-max.patch 2022-03-13 20:16:43.000000000 +0000 +++ libosmocore-1.7.0/debian/patches/path-max.patch 2022-10-09 07:16:10.000000000 +0000 @@ -2,17 +2,18 @@ Date: Thu, 9 Aug 2018 14:23:10 +0200 Subject: path-max +Forwarded: not-needed =================================================================== --- src/plugin.c | 5 +++++ 1 file changed, 5 insertions(+) -diff --git a/src/plugin.c b/src/plugin.c -index 40de4f8..8691d65 100644 ---- a/src/plugin.c -+++ b/src/plugin.c -@@ -46,7 +46,12 @@ +Index: libosmocore-1.7.0/src/plugin.c +=================================================================== +--- libosmocore-1.7.0.orig/src/plugin.c 2022-09-04 01:00:53.857968294 +0200 ++++ libosmocore-1.7.0/src/plugin.c 2022-09-04 01:00:53.857968294 +0200 +@@ -42,7 +42,12 @@ int osmo_plugin_load_all(const char *directory) { unsigned int num = 0; diff -Nru libosmocore-1.6.0/.gitignore libosmocore-1.7.0/.gitignore --- libosmocore-1.6.0/.gitignore 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/.gitignore 2022-06-28 15:00:51.000000000 +0000 @@ -70,6 +70,7 @@ utils/osmo-auc-gen utils/osmo-config-merge utils/osmo-sim-test +utils/osmo-aka-verify doc/codec doc/coding diff -Nru libosmocore-1.6.0/include/Makefile.am libosmocore-1.7.0/include/Makefile.am --- libosmocore-1.6.0/include/Makefile.am 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/include/Makefile.am 2022-06-28 15:00:51.000000000 +0000 @@ -46,6 +46,7 @@ osmocom/core/process.h \ osmocom/core/rate_ctr.h \ osmocom/core/stat_item.h \ + osmocom/core/stats_tcp.h \ osmocom/core/select.h \ osmocom/core/sercomm.h \ osmocom/core/signal.h \ @@ -125,6 +126,7 @@ osmocom/gsm/gsup_sms.h \ osmocom/gsm/i460_mux.h \ osmocom/gsm/ipa.h \ + osmocom/gsm/iuup.h \ osmocom/gsm/lapd_core.h \ osmocom/gsm/lapdm.h \ osmocom/gsm/meas_rep.h \ @@ -148,6 +150,7 @@ osmocom/gsm/protocol/gsm_12_21.h \ osmocom/gsm/protocol/gsm_23_003.h \ osmocom/gsm/protocol/gsm_23_041.h \ + osmocom/gsm/protocol/gsm_25_415.h \ osmocom/gsm/protocol/gsm_29_118.h \ osmocom/gsm/protocol/gsm_44_004.h \ osmocom/gsm/protocol/gsm_44_318.h \ diff -Nru libosmocore-1.6.0/include/osmocom/coding/gsm0503_amr_dtx.h libosmocore-1.7.0/include/osmocom/coding/gsm0503_amr_dtx.h --- libosmocore-1.6.0/include/osmocom/coding/gsm0503_amr_dtx.h 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/include/osmocom/coding/gsm0503_amr_dtx.h 2022-06-28 15:00:51.000000000 +0000 @@ -34,7 +34,14 @@ return get_value_string(gsm0503_amr_dtx_frame_names, frame); } -enum gsm0503_amr_dtx_frames gsm0503_detect_afs_dtx_frame(int *n_errors, int *n_bits_total, const ubit_t *ubits); -enum gsm0503_amr_dtx_frames gsm0503_detect_ahs_dtx_frame(int *n_errors, int *n_bits_total, const ubit_t *ubits); +enum gsm0503_amr_dtx_frames gsm0503_detect_afs_dtx_frame(int *n_errors, int *n_bits_total, const ubit_t *ubits) + OSMO_DEPRECATED("Use gsm0503_detect_afs_dtx_frame2() instead"); +enum gsm0503_amr_dtx_frames gsm0503_detect_ahs_dtx_frame(int *n_errors, int *n_bits_total, const ubit_t *ubits) + OSMO_DEPRECATED("Use gsm0503_detect_ahs_dtx_frame2() instead"); + +enum gsm0503_amr_dtx_frames gsm0503_detect_afs_dtx_frame2(int *n_errors, int *n_bits_total, + int *mode_id, const sbit_t *sbits); +enum gsm0503_amr_dtx_frames gsm0503_detect_ahs_dtx_frame2(int *n_errors, int *n_bits_total, + int *mode_id, const sbit_t *sbits); /*! @} */ diff -Nru libosmocore-1.6.0/include/osmocom/core/base64.h libosmocore-1.7.0/include/osmocom/core/base64.h --- libosmocore-1.6.0/include/osmocom/core/base64.h 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/include/osmocom/core/base64.h 2022-06-28 15:00:51.000000000 +0000 @@ -16,10 +16,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * 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 diff -Nru libosmocore-1.6.0/include/osmocom/core/bitcomp.h libosmocore-1.7.0/include/osmocom/core/bitcomp.h --- libosmocore-1.6.0/include/osmocom/core/bitcomp.h 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/include/osmocom/core/bitcomp.h 2022-06-28 15:00:51.000000000 +0000 @@ -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 diff -Nru libosmocore-1.6.0/include/osmocom/core/bitvec.h libosmocore-1.7.0/include/osmocom/core/bitvec.h --- libosmocore-1.6.0/include/osmocom/core/bitvec.h 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/include/osmocom/core/bitvec.h 2022-06-28 15:00:51.000000000 +0000 @@ -14,10 +14,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 @@ -77,7 +73,7 @@ void bitvec_to_string_r(const struct bitvec *bv, char *str); void bitvec_zero(struct bitvec *bv); unsigned bitvec_rl(const struct bitvec *bv, bool b); -unsigned bitvec_rl_curbit(struct bitvec *bv, bool b, int max_bits); +unsigned bitvec_rl_curbit(struct bitvec *bv, bool b, unsigned int max_bits); void bitvec_shiftl(struct bitvec *bv, unsigned int n); int16_t bitvec_get_int16_msb(const struct bitvec *bv, unsigned int num_bits); unsigned int bitvec_add_array(struct bitvec *bv, const uint32_t *array, diff -Nru libosmocore-1.6.0/include/osmocom/core/bitXXgen.h.tpl libosmocore-1.7.0/include/osmocom/core/bitXXgen.h.tpl --- libosmocore-1.6.0/include/osmocom/core/bitXXgen.h.tpl 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/include/osmocom/core/bitXXgen.h.tpl 2022-06-28 15:00:51.000000000 +0000 @@ -14,10 +14,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * 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 diff -Nru libosmocore-1.6.0/include/osmocom/core/conv.h libosmocore-1.7.0/include/osmocom/core/conv.h --- libosmocore-1.6.0/include/osmocom/core/conv.h 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/include/osmocom/core/conv.h 2022-06-28 15:00:51.000000000 +0000 @@ -14,10 +14,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * 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. */ /*! \defgroup conv Convolutional encoding and decoding routines @@ -128,6 +124,7 @@ const sbit_t *input, int n); int osmo_conv_decode_flush(struct osmo_conv_decoder *decoder, const sbit_t *input); +int osmo_conv_decode_get_best_end_state(struct osmo_conv_decoder *decoder); int osmo_conv_decode_get_output(struct osmo_conv_decoder *decoder, ubit_t *output, int has_flush, int end_state); diff -Nru libosmocore-1.6.0/include/osmocom/core/crcgen.h libosmocore-1.7.0/include/osmocom/core/crcgen.h --- libosmocore-1.6.0/include/osmocom/core/crcgen.h 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/include/osmocom/core/crcgen.h 2022-06-28 15:00:51.000000000 +0000 @@ -14,10 +14,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * 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 diff -Nru libosmocore-1.6.0/include/osmocom/core/crcXXgen.h.tpl libosmocore-1.7.0/include/osmocom/core/crcXXgen.h.tpl --- libosmocore-1.6.0/include/osmocom/core/crcXXgen.h.tpl 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/include/osmocom/core/crcXXgen.h.tpl 2022-06-28 15:00:51.000000000 +0000 @@ -14,10 +14,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * 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 diff -Nru libosmocore-1.6.0/include/osmocom/core/exec.h libosmocore-1.7.0/include/osmocom/core/exec.h --- libosmocore-1.6.0/include/osmocom/core/exec.h 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/include/osmocom/core/exec.h 2022-06-28 15:00:51.000000000 +0000 @@ -15,10 +15,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. - * */ extern const char *osmo_environment_whitelist[]; diff -Nru libosmocore-1.6.0/include/osmocom/core/gsmtap_util.h libosmocore-1.7.0/include/osmocom/core/gsmtap_util.h --- libosmocore-1.6.0/include/osmocom/core/gsmtap_util.h 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/include/osmocom/core/gsmtap_util.h 2022-06-28 15:00:51.000000000 +0000 @@ -44,10 +44,12 @@ struct gsmtap_inst *gsmtap_source_init(const char *host, uint16_t port, int ofd_wq_mode); +void gsmtap_source_free(struct gsmtap_inst *gti); int gsmtap_source_add_sink(struct gsmtap_inst *gti); int gsmtap_sendmsg(struct gsmtap_inst *gti, struct msgb *msg); +int gsmtap_sendmsg_free(struct gsmtap_inst *gti, struct msgb *msg); int gsmtap_send_ex(struct gsmtap_inst *gti, uint8_t type, uint16_t arfcn, uint8_t ts, uint8_t chan_type, uint8_t ss, uint32_t fn, diff -Nru libosmocore-1.6.0/include/osmocom/core/isdnhdlc.h libosmocore-1.7.0/include/osmocom/core/isdnhdlc.h --- libosmocore-1.6.0/include/osmocom/core/isdnhdlc.h 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/include/osmocom/core/isdnhdlc.h 2022-06-28 15:00:51.000000000 +0000 @@ -20,10 +20,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * 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., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef __ISDNHDLC_H__ diff -Nru libosmocore-1.6.0/include/osmocom/core/linuxlist.h libosmocore-1.7.0/include/osmocom/core/linuxlist.h --- libosmocore-1.6.0/include/osmocom/core/linuxlist.h 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/include/osmocom/core/linuxlist.h 2022-06-28 15:00:51.000000000 +0000 @@ -328,8 +328,7 @@ pos = llist_entry(pos->member.next, typeof(*pos), member), \ prefetch(pos->member.next)) -/*! Iterate over llist of given type, safe against removal of - * non-consecutive(!) llist entries. +/*! Iterate over llist of given type, safe against removal of llist entry. * \param pos the 'type *' to use as a loop counter. * \param n another 'type *' to use as temporary storage. * \param head the head of the list over which to iterate. diff -Nru libosmocore-1.6.0/include/osmocom/core/linuxrbtree.h libosmocore-1.7.0/include/osmocom/core/linuxrbtree.h --- libosmocore-1.6.0/include/osmocom/core/linuxrbtree.h 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/include/osmocom/core/linuxrbtree.h 2022-06-28 15:00:51.000000000 +0000 @@ -12,11 +12,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. - linux/include/linux/rbtree.h To use rbtrees you'll have to implement your own insert and search cores. diff -Nru libosmocore-1.6.0/include/osmocom/core/logging.h libosmocore-1.7.0/include/osmocom/core/logging.h --- libosmocore-1.6.0/include/osmocom/core/logging.h 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/include/osmocom/core/logging.h 2022-06-28 15:00:51.000000000 +0000 @@ -11,10 +11,16 @@ #include #include +extern struct log_info *osmo_log_info; + #ifndef DEBUG #define DEBUG #endif +#ifdef LIBOSMOCORE_NO_LOGGING +#undef DEBUG +#endif + #ifdef DEBUG /*! Log a debug message through the Osmocom logging framework * \param[in] ss logging subsystem (e.g. \ref DLGLOBAL) @@ -49,11 +55,19 @@ * \param[in] fmt format string * \param[in] args variable argument list */ +#ifndef LIBOSMOCORE_NO_LOGGING #define LOGPC(ss, level, fmt, args...) \ do { \ + if (!osmo_log_info) { \ + logp_stub(__FILE__, __LINE__, 1, fmt, ##args); \ + break; \ + } \ if (log_check_level(ss, level)) \ logp2(ss, level, __FILE__, __LINE__, 1, fmt, ##args); \ } while(0) +#else +#define LOGPC(ss, level, fmt, args...) +#endif /*! Log through the Osmocom logging framework with explicit source. * If caller_file is passed as NULL, __FILE__ and __LINE__ are used @@ -83,8 +97,16 @@ * \param[in] fmt format string * \param[in] args variable argument list */ +#ifndef LIBOSMOCORE_NO_LOGGING #define LOGPSRCC(ss, level, caller_file, caller_line, cont, fmt, args...) \ do { \ + if (!osmo_log_info) { \ + if (caller_file) \ + logp_stub(caller_file, caller_line, cont, fmt, ##args); \ + else \ + logp_stub(__FILE__, __LINE__, cont, fmt, ##args); \ + break; \ + } \ if (log_check_level(ss, level)) {\ if (caller_file) \ logp2(ss, level, caller_file, caller_line, cont, fmt, ##args); \ @@ -92,6 +114,9 @@ logp2(ss, level, __FILE__, __LINE__, cont, fmt, ##args); \ }\ } while(0) +#else +#define LOGPSRCC(ss, level, caller_file, caller_line, cont, fmt, args...) +#endif /*! different log levels */ #define LOGL_DEBUG 1 /*!< debugging information */ @@ -124,7 +149,9 @@ #define DLBSSGP -21 /*!< Osmocom BSSGP layer */ #define DLNSDATA -22 /*!< Osmocom NS layer data pdus */ #define DLNSSIGNAL -23 /*!< Osmocom NS layer signal pdus */ -#define OSMO_NUM_DLIB 23 /*!< Number of logging sub-systems in libraries */ +#define DLIUUP -24 /*!< Osmocom IuUP layer */ +#define DLPFCP -25 /*!< Osmocom Packet Forwarding Control Protocol */ +#define OSMO_NUM_DLIB 25 /*!< Number of logging sub-systems in libraries */ /* Colors that can be used in log_info_cat.color */ #define OSMO_LOGCOLOR_NORMAL NULL @@ -267,7 +294,7 @@ /*! structure representing a logging target */ struct log_target { - struct llist_head entry; /*!< linked list */ + struct llist_head entry; /*!< linked list */ /*! Internal data for filtering */ int filter_map; @@ -367,7 +394,9 @@ void logp2(int subsys, unsigned int level, const char *file, int line, int cont, const char *format, ...) __attribute__ ((format (printf, 6, 7))); +void logp_stub(const char *file, int line, int cont, const char *format, ...); int log_init(const struct log_info *inf, void *talloc_ctx); +int log_initialized(void); void log_fini(void); int log_check_level(int subsys, unsigned int level); @@ -418,7 +447,7 @@ void log_add_target(struct log_target *target); void log_del_target(struct log_target *target); -struct log_target *log_target_find(int type, const char *fname); +struct log_target *log_target_find(enum log_target_type type, const char *fname); void log_enable_multithread(void); diff -Nru libosmocore-1.6.0/include/osmocom/core/loggingrb.h libosmocore-1.7.0/include/osmocom/core/loggingrb.h --- libosmocore-1.6.0/include/osmocom/core/loggingrb.h 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/include/osmocom/core/loggingrb.h 2022-06-28 15:00:51.000000000 +0000 @@ -11,10 +11,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 diff -Nru libosmocore-1.6.0/include/osmocom/core/msgb.h libosmocore-1.7.0/include/osmocom/core/msgb.h --- libosmocore-1.6.0/include/osmocom/core/msgb.h 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/include/osmocom/core/msgb.h 2022-06-28 15:00:51.000000000 +0000 @@ -13,10 +13,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 @@ -238,7 +234,7 @@ static inline unsigned char *msgb_put(struct msgb *msgb, unsigned int len) { unsigned char *tmp = msgb->tail; - if (msgb_tailroom(msgb) < (int) len) + if (OSMO_UNLIKELY(msgb_tailroom(msgb) < (int) len)) MSGB_ABORT(msgb, "Not enough tailroom msgb_put" " (allocated %u, head at %u, len %u, tailroom %u < want tailroom %u)\n", msgb->data_len - sizeof(struct msgb), @@ -286,7 +282,7 @@ */ static inline unsigned char *msgb_get(struct msgb *msgb, unsigned int len) { - if (msgb_length(msgb) < len) + if (OSMO_UNLIKELY(msgb_length(msgb) < len)) MSGB_ABORT(msgb, "msgb too small to get %u (len %u)\n", len, msgb_length(msgb)); msgb->tail -= len; @@ -338,7 +334,7 @@ */ static inline unsigned char *msgb_push(struct msgb *msgb, unsigned int len) { - if (msgb_headroom(msgb) < (int) len) + if (OSMO_UNLIKELY(msgb_headroom(msgb) < (int) len)) MSGB_ABORT(msgb, "Not enough headroom msgb_push" " (allocated %u, head at %u < want headroom %u, len %u, tailroom %u)\n", msgb->data_len - sizeof(struct msgb), @@ -401,7 +397,7 @@ */ static inline unsigned char *msgb_pull(struct msgb *msgb, unsigned int len) { - if (msgb_length(msgb) < len) + if (OSMO_UNLIKELY(msgb_length(msgb) < len)) MSGB_ABORT(msgb, "msgb too small to pull %u (len %u)\n", len, msgb_length(msgb)); msgb->len -= len; @@ -492,9 +488,9 @@ */ static inline int msgb_trim(struct msgb *msg, int len) { - if (len < 0) + if (OSMO_UNLIKELY(len < 0)) MSGB_ABORT(msg, "Negative length is not allowed\n"); - if (len > msg->data_len) + if (OSMO_UNLIKELY(len > msg->data_len)) return -1; msg->len = len; @@ -530,7 +526,7 @@ osmo_static_assert(size >= headroom, headroom_bigger); struct msgb *msg = msgb_alloc_c(ctx, size, name); - if (msg) + if (OSMO_LIKELY(msg)) msgb_reserve(msg, headroom); return msg; } @@ -552,7 +548,7 @@ osmo_static_assert(size >= headroom, headroom_bigger); struct msgb *msg = msgb_alloc(size, name); - if (msg) + if (OSMO_LIKELY(msg)) msgb_reserve(msg, headroom); return msg; } diff -Nru libosmocore-1.6.0/include/osmocom/core/msgfile.h libosmocore-1.7.0/include/osmocom/core/msgfile.h --- libosmocore-1.6.0/include/osmocom/core/msgfile.h 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/include/osmocom/core/msgfile.h 2022-06-28 15:00:51.000000000 +0000 @@ -14,10 +14,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 diff -Nru libosmocore-1.6.0/include/osmocom/core/serial.h libosmocore-1.7.0/include/osmocom/core/serial.h --- libosmocore-1.6.0/include/osmocom/core/serial.h 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/include/osmocom/core/serial.h 2022-06-28 15:00:51.000000000 +0000 @@ -14,10 +14,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * 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. */ /*! \defgroup serial Utility functions to deal with serial ports diff -Nru libosmocore-1.6.0/include/osmocom/core/sockaddr_str.h libosmocore-1.7.0/include/osmocom/core/sockaddr_str.h --- libosmocore-1.6.0/include/osmocom/core/sockaddr_str.h 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/include/osmocom/core/sockaddr_str.h 2022-06-28 15:00:51.000000000 +0000 @@ -20,10 +20,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 diff -Nru libosmocore-1.6.0/include/osmocom/core/socket.h libosmocore-1.7.0/include/osmocom/core/socket.h --- libosmocore-1.6.0/include/osmocom/core/socket.h 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/include/osmocom/core/socket.h 2022-06-28 15:00:51.000000000 +0000 @@ -96,6 +96,7 @@ const char *osmo_sockaddr_ntop(const struct sockaddr *sa, char *dst); uint16_t osmo_sockaddr_port(const struct sockaddr *sa); +void osmo_sockaddr_set_port(struct sockaddr *sa, uint16_t port); int osmo_sock_unix_init(uint16_t type, uint8_t proto, const char *socket_path, unsigned int flags); @@ -127,9 +128,14 @@ int osmo_sockaddr_cmp(const struct osmo_sockaddr *a, const struct osmo_sockaddr *b); +int osmo_sockaddr_to_octets(uint8_t *dst, size_t dst_maxlen, const struct osmo_sockaddr *os); +int osmo_sockaddr_from_octets(struct osmo_sockaddr *os, const void *src, size_t src_len); + const char *osmo_sockaddr_to_str(const struct osmo_sockaddr *sockaddr); char *osmo_sockaddr_to_str_buf(char *buf, size_t buf_len, const struct osmo_sockaddr *sockaddr); +int osmo_sockaddr_to_str_buf2(char *buf, size_t buf_len, const struct osmo_sockaddr *sockaddr); +char *osmo_sockaddr_to_str_c(void *ctx, const struct osmo_sockaddr *sockaddr); int osmo_sock_set_dscp(int fd, uint8_t dscp); int osmo_sock_set_priority(int fd, int prio); diff -Nru libosmocore-1.6.0/include/osmocom/core/stats.h libosmocore-1.7.0/include/osmocom/core/stats.h --- libosmocore-1.6.0/include/osmocom/core/stats.h 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/include/osmocom/core/stats.h 2022-06-28 15:00:51.000000000 +0000 @@ -13,10 +13,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 @@ -112,7 +108,7 @@ extern struct osmo_stats_config *osmo_stats_config; void osmo_stats_init(void *ctx); -int osmo_stats_report(); +int osmo_stats_report(void); int osmo_stats_set_interval(int interval); diff -Nru libosmocore-1.6.0/include/osmocom/core/stats_tcp.h libosmocore-1.7.0/include/osmocom/core/stats_tcp.h --- libosmocore-1.6.0/include/osmocom/core/stats_tcp.h 1970-01-01 00:00:00.000000000 +0000 +++ libosmocore-1.7.0/include/osmocom/core/stats_tcp.h 2022-06-28 15:00:51.000000000 +0000 @@ -0,0 +1,16 @@ +#pragma once + +#define TCP_STATS_DEFAULT_INTERVAL 0 /* secs */ +#define TCP_STATS_DEFAULT_BATCH_SIZE 5 /* sockets per interval */ + +struct osmo_tcp_stats_config { + /* poll interval in seconds, use osmo_stats_tcp_set_interval() to manipulate this value */ + int interval; + /* specify how many sockets are processed when the interval timer expires */ + int batch_size; +}; +extern struct osmo_tcp_stats_config *osmo_tcp_stats_config; + +int osmo_stats_tcp_osmo_fd_register(const struct osmo_fd *fd, const char *name); +int osmo_stats_tcp_osmo_fd_unregister(const struct osmo_fd *fd); +int osmo_stats_tcp_set_interval(int interval); diff -Nru libosmocore-1.6.0/include/osmocom/core/strrb.h libosmocore-1.7.0/include/osmocom/core/strrb.h --- libosmocore-1.6.0/include/osmocom/core/strrb.h 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/include/osmocom/core/strrb.h 2022-06-28 15:00:51.000000000 +0000 @@ -14,10 +14,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 diff -Nru libosmocore-1.6.0/include/osmocom/core/thread.h libosmocore-1.7.0/include/osmocom/core/thread.h --- libosmocore-1.6.0/include/osmocom/core/thread.h 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/include/osmocom/core/thread.h 2022-06-28 15:00:51.000000000 +0000 @@ -16,10 +16,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. - * */ /*! \defgroup thread Osmocom thread helpers diff -Nru libosmocore-1.6.0/include/osmocom/core/timer_compat.h libosmocore-1.7.0/include/osmocom/core/timer_compat.h --- libosmocore-1.6.0/include/osmocom/core/timer_compat.h 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/include/osmocom/core/timer_compat.h 2022-06-28 15:00:51.000000000 +0000 @@ -15,10 +15,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. - * */ /*! \defgroup timer Osmocom timers diff -Nru libosmocore-1.6.0/include/osmocom/core/timer.h libosmocore-1.7.0/include/osmocom/core/timer.h --- libosmocore-1.6.0/include/osmocom/core/timer.h 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/include/osmocom/core/timer.h 2022-06-28 15:00:51.000000000 +0000 @@ -14,10 +14,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. - * */ /*! \defgroup timer Osmocom timers diff -Nru libosmocore-1.6.0/include/osmocom/core/use_count.h libosmocore-1.7.0/include/osmocom/core/use_count.h --- libosmocore-1.6.0/include/osmocom/core/use_count.h 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/include/osmocom/core/use_count.h 2022-06-28 15:00:51.000000000 +0000 @@ -19,10 +19,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * 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 diff -Nru libosmocore-1.6.0/include/osmocom/core/utils.h libosmocore-1.7.0/include/osmocom/core/utils.h --- libosmocore-1.6.0/include/osmocom/core/utils.h 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/include/osmocom/core/utils.h 2022-06-28 15:00:51.000000000 +0000 @@ -38,9 +38,18 @@ /*! Copy a C-string into a sized buffer using sizeof to detect buffer's size */ #define OSMO_STRLCPY_ARRAY(array, src) osmo_strlcpy(array, src, sizeof(array)) +/*! Branch prediction optimizations */ +#if defined(__GNUC__) +#define OSMO_LIKELY(exp) __builtin_expect(!!(exp), 1) +#define OSMO_UNLIKELY(exp) __builtin_expect(!!(exp), 0) +#else +#define OSMO_LIKELY(exp) exp +#define OSMO_UNLIKELY(exp) exp +#endif + /*! A mapping between human-readable string and numeric value */ struct value_string { - int value; /*!< numeric value */ + uint32_t value; /*!< numeric value */ const char *str; /*!< human-readable string */ }; @@ -57,7 +66,7 @@ int osmo_bcd2str(char *dst, size_t dst_size, const uint8_t *bcd, int start_nibble, int end_nibble, bool allow_hex); int osmo_str2bcd(uint8_t *dst, size_t dst_size, const char *digits, int start_nibble, int end_nibble, bool allow_hex); -int osmo_hexparse(const char *str, uint8_t *b, int max_len); +int osmo_hexparse(const char *str, uint8_t *b, unsigned int max_len); char *osmo_ubit_dump_buf(char *buf, size_t buf_len, const uint8_t *bits, unsigned int len); char *osmo_ubit_dump(const uint8_t *bits, unsigned int len); @@ -102,9 +111,11 @@ * the predicate evaluates to false (0). */ #define OSMO_ASSERT(exp) \ - if (!(exp)) { \ +do { \ + if (OSMO_UNLIKELY(!(exp))) { \ osmo_panic("Assert failed %s %s:%d\n", #exp, __FILE__, __LINE__); \ - } + } \ +} while (0); /* some code invokes OSMO_ASSERT() without the semicolon */ /*! duplicate a string using talloc and release its prior content (if any) * \param[in] ctx Talloc context to use for allocation @@ -157,10 +168,12 @@ char *osmo_quote_cstr_c(void *ctx, const char *str, int in_len); const char *osmo_escape_str(const char *str, int len); +int osmo_escape_str_buf3(char *buf, size_t bufsize, const char *str, int in_len); char *osmo_escape_str_buf2(char *buf, size_t bufsize, const char *str, int in_len); const char *osmo_escape_str_buf(const char *str, int in_len, char *buf, size_t bufsize); char *osmo_escape_str_c(const void *ctx, const char *str, int in_len); const char *osmo_quote_str(const char *str, int in_len); +int osmo_quote_str_buf3(char *buf, size_t bufsize, const char *str, int in_len); char *osmo_quote_str_buf2(char *buf, size_t bufsize, const char *str, int in_len); const char *osmo_quote_str_buf(const char *str, int in_len, char *buf, size_t bufsize); char *osmo_quote_str_c(const void *ctx, const char *str, int in_len); @@ -323,7 +336,7 @@ _needed = FUNC_BUF(_str, _len, ## FUNC_BUF_ARGS); \ if (_needed < 0) \ goto OSMO_NAME_C_on_error; \ - if (_needed < _len) \ + if ((unsigned int) _needed < _len) \ return _str; \ _len = _needed + 1; \ if (_str) \ diff -Nru libosmocore-1.6.0/include/osmocom/core/write_queue.h libosmocore-1.7.0/include/osmocom/core/write_queue.h --- libosmocore-1.6.0/include/osmocom/core/write_queue.h 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/include/osmocom/core/write_queue.h 2022-06-28 15:00:51.000000000 +0000 @@ -16,10 +16,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 diff -Nru libosmocore-1.6.0/include/osmocom/ctrl/ports.h libosmocore-1.7.0/include/osmocom/ctrl/ports.h --- libosmocore-1.6.0/include/osmocom/ctrl/ports.h 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/include/osmocom/ctrl/ports.h 2022-06-28 15:00:51.000000000 +0000 @@ -30,4 +30,8 @@ #define OSMO_CTRL_PORT_SMLC 4272 /* 4273 used by VTY interface */ #define OSMO_CTRL_PORT_HNODEB 4274 +/* 4275: OSMO_VTY_PORT_UPF */ +#define OSMO_CTRL_PORT_UPF 4276 +/* 4277: OSMO_VTY_PORT_PFCP_TOOL */ +#define OSMO_CTRL_PORT_PFCP_TOOL 4278 /* When adding/changing port numbers, keep docs and wiki in sync. See above. */ diff -Nru libosmocore-1.6.0/include/osmocom/gprs/bssgp_bvc_fsm.h libosmocore-1.7.0/include/osmocom/gprs/bssgp_bvc_fsm.h --- libosmocore-1.6.0/include/osmocom/gprs/bssgp_bvc_fsm.h 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/include/osmocom/gprs/bssgp_bvc_fsm.h 2022-06-28 15:00:51.000000000 +0000 @@ -40,6 +40,8 @@ void (*reset_notification)(uint16_t nsei, uint16_t bvci, const struct gprs_ra_id *ra_id, uint16_t cell_id, uint8_t cause, void *priv); void (*rx_fc_bvc)(uint16_t nsei, uint16_t bvci, const struct bssgp2_flow_ctrl *fc, void *priv); + void (*reset_ack_notification)(uint16_t nsei, uint16_t bvci, const struct gprs_ra_id *ra_id, + uint16_t cell_id, uint8_t cause, void *priv); }; struct osmo_fsm_inst * diff -Nru libosmocore-1.6.0/include/osmocom/gprs/protocol/gsm_08_18.h libosmocore-1.7.0/include/osmocom/gprs/protocol/gsm_08_18.h --- libosmocore-1.6.0/include/osmocom/gprs/protocol/gsm_08_18.h 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/include/osmocom/gprs/protocol/gsm_08_18.h 2022-06-28 15:00:51.000000000 +0000 @@ -362,13 +362,12 @@ /* RIM PDU Indications * 3GPP TS 48.018, section 11.3.65.0 */ struct bssgp_rim_pdu_ind { -#if OSMO_IS_BIG_ENDIAN - uint8_t reserved:4, - pdu_type_ext:3, - ack_requested:1; -#elif OSMO_IS_LITTLE_ENDIAN +#if OSMO_IS_LITTLE_ENDIAN uint8_t ack_requested:1, pdu_type_ext:3, reserved:4; +#elif OSMO_IS_BIG_ENDIAN +/* auto-generated from the little endian part above (libosmocore/contrib/struct_endianess.py) */ + uint8_t reserved:4, pdu_type_ext:3, ack_requested:1; #endif } __attribute__ ((packed)); diff -Nru libosmocore-1.6.0/include/osmocom/gsm/a5.h libosmocore-1.7.0/include/osmocom/gsm/a5.h --- libosmocore-1.6.0/include/osmocom/gsm/a5.h 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/include/osmocom/gsm/a5.h 2022-06-28 15:00:51.000000000 +0000 @@ -12,10 +12,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * 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 diff -Nru libosmocore-1.6.0/include/osmocom/gsm/bsslap.h libosmocore-1.7.0/include/osmocom/gsm/bsslap.h --- libosmocore-1.6.0/include/osmocom/gsm/bsslap.h 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/include/osmocom/gsm/bsslap.h 2022-06-28 15:00:51.000000000 +0000 @@ -21,10 +21,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 diff -Nru libosmocore-1.6.0/include/osmocom/gsm/bssmap_le.h libosmocore-1.7.0/include/osmocom/gsm/bssmap_le.h --- libosmocore-1.6.0/include/osmocom/gsm/bssmap_le.h 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/include/osmocom/gsm/bssmap_le.h 2022-06-28 15:00:51.000000000 +0000 @@ -21,10 +21,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 diff -Nru libosmocore-1.6.0/include/osmocom/gsm/cbsp.h libosmocore-1.7.0/include/osmocom/gsm/cbsp.h --- libosmocore-1.6.0/include/osmocom/gsm/cbsp.h 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/include/osmocom/gsm/cbsp.h 2022-06-28 15:00:51.000000000 +0000 @@ -24,10 +24,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * 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. */ /* Decoded 8.2.3 Message Content */ @@ -75,7 +71,7 @@ struct llist_head list; /* entry in a fail_list below */ enum CELL_IDENT id_discr; union gsm0808_cell_id_u cell_id; - uint8_t cause; + uint8_t cause; /* enum osmo_cbsp_cause */ }; @@ -245,6 +241,30 @@ enum cbsp_channel_ind *channel_ind; }; +/* 8.2.13 Cause */ +enum osmo_cbsp_cause { + OSMO_CBSP_CAUSE_PARAM_NOT_RECOGNISED = 0, + OSMO_CBSP_CAUSE_PARAM_VALUE_INVALID, + OSMO_CBSP_CAUSE_MSG_REF_NOT_IDENTIFIED, + OSMO_CBSP_CAUSE_CELL_ID_NOT_VALID, + OSMO_CBSP_CAUSE_UNRECOGNISED_MESSAGE, + OSMO_CBSP_CAUSE_MISSING_MANDATORY_ELEMENT, + OSMO_CBSP_CAUSE_BSC_CAPACITY_EXCEEDED, + OSMO_CBSP_CAUSE_CELL_MEMORY_EXCEEDED, + OSMO_CBSP_CAUSE_BSC_MEMORY_EXCEEDED, + OSMO_CBSP_CAUSE_CELL_BROADCAST_NOT_SUPPORTED, + OSMO_CBSP_CAUSE_CELL_BROADCAST_NOT_OPERATIONAL, + OSMO_CBSP_CAUSE_INCOMPATIBLE_DRX_PARAM, + OSMO_CBSP_CAUSE_EXT_CHAN_NOT_SUPPORTED, + OSMO_CBSP_CAUSE_MSG_REF_ALREADY_USED, + OSMO_CBSP_CAUSE_UNSPECIFIED_ERROR, + OSMO_CBSP_CAUSE_LAI_OR_LAC_NOT_VALID, +}; +extern const struct value_string osmo_cbsp_cause_names[]; +static inline const char *osmo_cbsp_cause_name(enum osmo_cbsp_cause cause) +{ + return get_value_string(osmo_cbsp_cause_names, cause); +} /* decoded CBSP message */ struct osmo_cbsp_decoded { diff -Nru libosmocore-1.6.0/include/osmocom/gsm/gsm0808.h libosmocore-1.7.0/include/osmocom/gsm/gsm0808.h --- libosmocore-1.6.0/include/osmocom/gsm/gsm0808.h 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/include/osmocom/gsm/gsm0808.h 2022-06-28 15:00:51.000000000 +0000 @@ -16,10 +16,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 @@ -250,8 +246,12 @@ const struct sockaddr_storage *aoip_transport_layer; + bool more_items; /*!< set this to true iff any fields below are used */ + + struct gsm0808_speech_codec_list codec_list_bss_supported; /*< omit when .len == 0 */ + /* more items are defined in the spec and may be added later */ - bool more_items; /*!< always set this to false */ + bool more_items2; /*!< always set this to false */ }; struct msgb *gsm0808_create_handover_request_ack2(const struct gsm0808_handover_request_ack *params); diff -Nru libosmocore-1.6.0/include/osmocom/gsm/gsm0808_lcs.h libosmocore-1.7.0/include/osmocom/gsm/gsm0808_lcs.h --- libosmocore-1.6.0/include/osmocom/gsm/gsm0808_lcs.h 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/include/osmocom/gsm/gsm0808_lcs.h 2022-06-28 15:00:51.000000000 +0000 @@ -20,10 +20,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 diff -Nru libosmocore-1.6.0/include/osmocom/gsm/gsm0808_utils.h libosmocore-1.7.0/include/osmocom/gsm/gsm0808_utils.h --- libosmocore-1.6.0/include/osmocom/gsm/gsm0808_utils.h 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/include/osmocom/gsm/gsm0808_utils.h 2022-06-28 15:00:51.000000000 +0000 @@ -44,6 +44,8 @@ uint16_t ci; struct osmo_location_area_id lai_and_lac; uint16_t lac; + struct osmo_service_area_id sai; + /* osmocom specific: */ struct osmo_cell_global_id_ps global_ps; }; diff -Nru libosmocore-1.6.0/include/osmocom/gsm/gsm23003.h libosmocore-1.7.0/include/osmocom/gsm/gsm23003.h --- libosmocore-1.6.0/include/osmocom/gsm/gsm23003.h 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/include/osmocom/gsm/gsm23003.h 2022-06-28 15:00:51.000000000 +0000 @@ -30,6 +30,9 @@ uint16_t cell_identity; }; +/* 3GPP TS 48.018: + * 8c.1.4.1.1 GERAN BSS identification (RIM) + * sec 11.3.9 Cell Identifier */ struct osmo_cell_global_id_ps { struct osmo_routing_area_id rai; uint16_t cell_identity; @@ -134,6 +137,10 @@ const char *osmo_cgi_ps_name2(const struct osmo_cell_global_id_ps *cgi_ps); char *osmo_cgi_ps_name_buf(char *buf, size_t buf_len, const struct osmo_cell_global_id_ps *cgi_ps); char *osmo_cgi_ps_name_c(const void *ctx, const struct osmo_cell_global_id_ps *cgi_ps); +const char *osmo_sai_name(const struct osmo_service_area_id *sai); +const char *osmo_sai_name2(const struct osmo_service_area_id *sai); +char *osmo_sai_name_buf(char *buf, size_t buf_len, const struct osmo_service_area_id *sai); +char *osmo_sai_name_c(const void *ctx, const struct osmo_service_area_id *sai); const char *osmo_gummei_name(const struct osmo_gummei *gummei); char *osmo_gummei_name_buf(char *buf, size_t buf_len, const struct osmo_gummei *gummei); char *osmo_gummei_name_c(const void *ctx, const struct osmo_gummei *gummei); diff -Nru libosmocore-1.6.0/include/osmocom/gsm/gsm29118.h libosmocore-1.7.0/include/osmocom/gsm/gsm29118.h --- libosmocore-1.6.0/include/osmocom/gsm/gsm29118.h 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/include/osmocom/gsm/gsm29118.h 2022-06-28 15:00:51.000000000 +0000 @@ -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 diff -Nru libosmocore-1.6.0/include/osmocom/gsm/gsm29205.h libosmocore-1.7.0/include/osmocom/gsm/gsm29205.h --- libosmocore-1.6.0/include/osmocom/gsm/gsm29205.h 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/include/osmocom/gsm/gsm29205.h 2022-06-28 15:00:51.000000000 +0000 @@ -15,10 +15,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 diff -Nru libosmocore-1.6.0/include/osmocom/gsm/gsm_utils.h libosmocore-1.7.0/include/osmocom/gsm/gsm_utils.h --- libosmocore-1.6.0/include/osmocom/gsm/gsm_utils.h 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/include/osmocom/gsm/gsm_utils.h 2022-06-28 15:00:51.000000000 +0000 @@ -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 @@ -156,6 +152,13 @@ const int tbl[4] = { 1, 2, 4, 7 }; return tbl[raw & 3]; } +static inline uint8_t rach_tx_integer_raw2val(uint8_t raw) { + const int tbl[6] = { 14, 16, 20, 25, 32, 50 }; + raw &= 0x0f; + if (raw <= 9) + return raw + 3; + return tbl[raw - 10]; +} #define ARFCN_PCS 0x8000 #define ARFCN_UPLINK 0x4000 diff -Nru libosmocore-1.6.0/include/osmocom/gsm/i460_mux.h libosmocore-1.7.0/include/osmocom/gsm/i460_mux.h --- libosmocore-1.6.0/include/osmocom/gsm/i460_mux.h 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/include/osmocom/gsm/i460_mux.h 2022-06-28 15:00:51.000000000 +0000 @@ -14,11 +14,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * 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 diff -Nru libosmocore-1.6.0/include/osmocom/gsm/iuup.h libosmocore-1.7.0/include/osmocom/gsm/iuup.h --- libosmocore-1.6.0/include/osmocom/gsm/iuup.h 1970-01-01 00:00:00.000000000 +0000 +++ libosmocore-1.7.0/include/osmocom/gsm/iuup.h 2022-06-28 15:00:51.000000000 +0000 @@ -0,0 +1,129 @@ +#pragma once + +#include + +#include +#include + +/*********************************************************************** + * Primitives towards the lower layers (typically RTP transport) + ***********************************************************************/ +enum osmo_iuup_tnl_prim_type { + OSMO_IUUP_TNL_UNITDATA, +}; + +struct osmo_iuup_tnl_prim { + struct osmo_prim_hdr oph; +}; + +/*********************************************************************** + * Primitives towards the upper layers at the RNL SAP + ***********************************************************************/ + +/* 3GPP TS 25.415 Section 7.2.1 */ +enum osmo_iuup_rnl_prim_type { + OSMO_IUUP_RNL_CONFIG, + OSMO_IUUP_RNL_DATA, + OSMO_IUUP_RNL_STATUS, + OSMO_IUUP_RNL_UNIT_DATA, +}; + +/* TS 25.413 9.2.1.3*/ +#define IUUP_MAX_SUBFLOWS 7 +#define IUUP_MAX_RFCIS 64 + +#define IUUP_TIMER_INIT_T_DEFAULT 1000 +#define IUUP_TIMER_TA_T_DEFAULT 500 +#define IUUP_TIMER_RC_T_DEFAULT 500 +#define IUUP_TIMER_INIT_N_DEFAULT 3 +#define IUUP_TIMER_TA_N_DEFAULT 1 +#define IUUP_TIMER_RC_N_DEFAULT 1 +struct osmo_iuup_rnl_config_timer { + uint32_t t_ms; /* time in ms */ + uint32_t n_max; /* max number of repetitions */ +}; +struct osmo_iuup_rfci { + uint8_t used:1, + spare1:1, + id:6; + uint8_t spare2:4, + IPTI:4; /* values range 0-15, 4 bits */; + uint16_t subflow_sizes[IUUP_MAX_SUBFLOWS]; +}; +struct osmo_iuup_rnl_config { + /* transparent (true) or SMpSDU (false): */ + bool transparent; + + /* should we actively transmit INIT in SmpSDU mode? */ + bool active; + + /* Currently Version 0 or 1: */ + uint8_t data_pdu_type; + + /* Supported mode versions */ + uint16_t supported_versions_mask; + uint8_t num_rfci; + uint8_t num_subflows; + bool IPTIs_present; + struct osmo_iuup_rfci rfci[IUUP_MAX_RFCIS]; + + /* TODO: Indication of delivery of erroneous SDUs*/ + struct osmo_iuup_rnl_config_timer t_init; + struct osmo_iuup_rnl_config_timer t_ta; + struct osmo_iuup_rnl_config_timer t_rc; +}; + +struct osmo_iuup_rnl_data { + uint8_t rfci; + uint8_t frame_nr; + uint8_t fqc; +}; + +struct osmo_iuup_rnl_status { + enum iuup_procedure procedure; + union { + struct { + enum iuup_error_cause cause; + enum iuup_error_distance distance; + } error_event; + struct { + uint16_t mode_version; + uint8_t data_pdu_type; + uint8_t num_rfci; + uint8_t num_subflows; + bool IPTIs_present; + struct osmo_iuup_rfci rfci[IUUP_MAX_RFCIS]; + } initialization; + struct { + } rate_control; + struct { + } time_alignment; + } u; +}; + +/* SAP on the upper side of IuUP, towards the user */ +struct osmo_iuup_rnl_prim { + struct osmo_prim_hdr oph; + union { + struct osmo_iuup_rnl_config config; + struct osmo_iuup_rnl_data data; + struct osmo_iuup_rnl_status status; + //struct osmo_iuup_rnl_unitdata unitdata; + } u; +}; + +struct osmo_iuup_instance; +struct osmo_iuup_instance *osmo_iuup_instance_alloc(void *ctx, const char *id); +void osmo_iuup_instance_free(struct osmo_iuup_instance *iui); + +void osmo_iuup_instance_set_user_prim_cb(struct osmo_iuup_instance *iui, osmo_prim_cb func, void *priv); +void osmo_iuup_instance_set_transport_prim_cb(struct osmo_iuup_instance *iui, osmo_prim_cb func, void *priv); +int osmo_iuup_tnl_prim_up(struct osmo_iuup_instance *iui, struct osmo_iuup_tnl_prim *itp); +int osmo_iuup_rnl_prim_down(struct osmo_iuup_instance *inst, struct osmo_iuup_rnl_prim *irp); + + +int osmo_iuup_compute_header_crc(const uint8_t *iuup_pdu, unsigned int pdu_len); +int osmo_iuup_compute_payload_crc(const uint8_t *iuup_pdu, unsigned int pdu_len); + +struct osmo_iuup_rnl_prim *osmo_iuup_rnl_prim_alloc(void *ctx, unsigned int primitive, unsigned int operation, unsigned int size); +struct osmo_iuup_tnl_prim *osmo_iuup_tnl_prim_alloc(void *ctx, unsigned int primitive, unsigned int operation, unsigned int size); diff -Nru libosmocore-1.6.0/include/osmocom/gsm/prim.h libosmocore-1.7.0/include/osmocom/gsm/prim.h --- libosmocore-1.6.0/include/osmocom/gsm/prim.h 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/include/osmocom/gsm/prim.h 2022-06-28 15:00:51.000000000 +0000 @@ -18,4 +18,7 @@ SAP_NS, SAP_BSSGP_RIM, + + SAP_IUUP_TNL, + SAP_IUUP_RNL, }; diff -Nru libosmocore-1.6.0/include/osmocom/gsm/protocol/gsm_08_08.h libosmocore-1.7.0/include/osmocom/gsm/protocol/gsm_08_08.h --- libosmocore-1.6.0/include/osmocom/gsm/protocol/gsm_08_08.h 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/include/osmocom/gsm/protocol/gsm_08_08.h 2022-06-28 15:00:51.000000000 +0000 @@ -25,9 +25,10 @@ CELL_IDENT_UTRAN_PLMN_LAC_RNC = 8, CELL_IDENT_UTRAN_RNC = 9, CELL_IDENT_UTRAN_LAC_RNC = 10, + CELL_IDENT_SAI = 11, - /* Not in 03.03 nor 08.08 */ - CELL_IDENT_WHOLE_GLOBAL_PS = 11, /* CGI with + RAC */ + /* Not in 03.03 nor 08.08. Place them > 0x0f (discr_id is 4 bits) */ + CELL_IDENT_WHOLE_GLOBAL_PS = 128, /* CGI + RAC, TS 48.018 8c.1.4.1.1 */ }; /* Keep this misnamed CELL_IDENT for API backwards compatibility (see OS#3124). */ #define CELL_IDENT_LAI_AND_LAC CELL_IDENT_LAI @@ -265,7 +266,7 @@ GSM0808_IE_SEGMENTATION = 79, GSM0808_IE_SERVICE_HANDOVER = 80, GSM0808_IE_SOURCE_RNC_TO_TARGET_RNC_TRANSPARENT_UMTS = 81, - GSM0808_IE_SOURCE_RNC_TO_TARGET_RNC_TRANSPARENT_CDMA2000= 82, + GSM0808_IE_SOURCE_RNC_TO_TARGET_RNC_TRANSPARENT_CDMA2000 = 82, GSM0808_IE_RESERVED_5 = 65, GSM0808_IE_RESERVED_6 = 66, GSM0808_IE_GERAN_CLASSMARK = 0x53, diff -Nru libosmocore-1.6.0/include/osmocom/gsm/protocol/gsm_08_58.h libosmocore-1.7.0/include/osmocom/gsm/protocol/gsm_08_58.h --- libosmocore-1.6.0/include/osmocom/gsm/protocol/gsm_08_58.h 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/include/osmocom/gsm/protocol/gsm_08_58.h 2022-06-28 15:00:51.000000000 +0000 @@ -15,10 +15,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 @@ -122,35 +118,29 @@ /* Osmocom specific IE to negotiate repeated ACCH capabilities */ struct abis_rsl_osmo_rep_acch_cap { -#if OSMO_IS_BIG_ENDIAN - uint8_t reserved:1, - rxqual:3, - ul_sacch:1, - dl_sacch:1, - dl_facch_all:1, - dl_facch_cmd:1; -#elif OSMO_IS_LITTLE_ENDIAN +#if OSMO_IS_LITTLE_ENDIAN uint8_t dl_facch_cmd:1, dl_facch_all:1, dl_sacch:1, ul_sacch:1, rxqual:3, reserved:1; +#elif OSMO_IS_BIG_ENDIAN +/* auto-generated from the little endian part above (libosmocore/contrib/struct_endianess.py) */ + uint8_t reserved:1, rxqual:3, ul_sacch:1, dl_sacch:1, dl_facch_all:1, dl_facch_cmd:1; #endif } __attribute__ ((packed)); /* Osmocom specific IE to negotiate temporary overpower of ACCH channels */ struct abis_rsl_osmo_temp_ovp_acch_cap { -#if OSMO_IS_BIG_ENDIAN - uint8_t sacch_enable:1, - facch_enable:1, - rxqual:3, - overpower_db:3; -#elif OSMO_IS_LITTLE_ENDIAN +#if OSMO_IS_LITTLE_ENDIAN uint8_t overpower_db:3, rxqual:3, facch_enable:1, sacch_enable:1; +#elif OSMO_IS_BIG_ENDIAN +/* auto-generated from the little endian part above (libosmocore/contrib/struct_endianess.py) */ + uint8_t sacch_enable:1, facch_enable:1, rxqual:3, overpower_db:3; #endif } __attribute__ ((packed)); @@ -395,9 +385,9 @@ RSL_IE_IPAC_RTP_CSD_FMT = 0xf9, RSL_IE_IPAC_RTP_JIT_BUF = 0xfa, RSL_IE_IPAC_RTP_COMPR = 0xfb, - RSL_IE_IPAC_RTP_PAYLOAD2= 0xfc, + RSL_IE_IPAC_RTP_PAYLOAD2 = 0xfc, RSL_IE_IPAC_RTP_MPLEX = 0xfd, - RSL_IE_IPAC_RTP_MPLEX_ID= 0xfe, + RSL_IE_IPAC_RTP_MPLEX_ID = 0xfe, }; /* Ericsson specific IEs, clash with above partially, so they're not @@ -866,10 +856,10 @@ uint8_t u_rxqual:3, reserved_u_rxqual:1, l_rxqual:3, reserved_l_rxqual:1; #elif OSMO_IS_BIG_ENDIAN +/* auto-generated from the little endian part above (libosmocore/contrib/struct_endianess.py) */ uint8_t reserved_l_rxlev:2, l_rxlev:6; uint8_t reserved_u_rxlev:2, u_rxlev:6; - uint8_t reserved_l_rxqual:1, l_rxqual:3, - reserved_u_rxqual:1, u_rxqual:3; + uint8_t reserved_l_rxqual:1, l_rxqual:3, reserved_u_rxqual:1, u_rxqual:3; #endif }__attribute__ ((packed)); @@ -926,6 +916,7 @@ uint8_t pc_interval:5, reserved_pc:3; uint8_t red_step_size:4, inc_step_size:4; #elif OSMO_IS_BIG_ENDIAN +/* auto-generated from the little endian part above (libosmocore/contrib/struct_endianess.py) */ uint8_t reserved_p1:3, p1:5; uint8_t reserved_n1:3, n1:5; uint8_t reserved_p2:3, p2:5; @@ -947,11 +938,12 @@ uint8_t upper_p:5, reserved_upper_p:3; uint8_t upper_n:5, reserved_upper_n:3; #elif OSMO_IS_BIG_ENDIAN +/* auto-generated from the little endian part above (libosmocore/contrib/struct_endianess.py) */ uint8_t reserved_lower_p:3, lower_p:5; uint8_t reserved_lower_n:3, lower_n:5; uint8_t reserved_upper_p:3, upper_p:5; uint8_t reserved_upper_n:3, upper_n:5; - #endif +#endif }__attribute__ ((packed)); struct osmo_preproc_pc_comp { /* Used for Carrier-to-Interference (C/I), in dB: */ @@ -1055,18 +1047,16 @@ }; struct rsl_l1_info { -#if OSMO_IS_BIG_ENDIAN - uint8_t ms_pwr:5, - fpc_epc:1, - srr_sro:1, - reserved:1; - uint8_t ta; -#elif OSMO_IS_LITTLE_ENDIAN +#if OSMO_IS_LITTLE_ENDIAN uint8_t reserved:1, srr_sro:1, fpc_epc:1, ms_pwr:5; uint8_t ta; +#elif OSMO_IS_BIG_ENDIAN +/* auto-generated from the little endian part above (libosmocore/contrib/struct_endianess.py) */ + uint8_t ms_pwr:5, fpc_epc:1, srr_sro:1, reserved:1; + uint8_t ta; #endif } __attribute__ ((packed)); diff -Nru libosmocore-1.6.0/include/osmocom/gsm/protocol/gsm_12_21.h libosmocore-1.7.0/include/osmocom/gsm/protocol/gsm_12_21.h --- libosmocore-1.6.0/include/osmocom/gsm/protocol/gsm_12_21.h 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/include/osmocom/gsm/protocol/gsm_12_21.h 2022-06-28 15:00:51.000000000 +0000 @@ -1,3 +1,4 @@ +/* 3GPP TS 12.21, nowadays 3GPP TS 52.021 */ /* * (C) 2008-2009 by Harald Welte * All Rights Reserved @@ -12,10 +13,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 @@ -526,9 +523,11 @@ /*! OML Availability State (Section 9.4.7) */ enum abis_nm_avail_state { - NM_AVSTATE_IN_TEST = 1, + NM_AVSTATE_IN_TEST = 0, + NM_AVSTATE_FAILED = 1, NM_AVSTATE_POWER_OFF = 2, NM_AVSTATE_OFF_LINE = 3, + /* = 4, */ NM_AVSTATE_DEPENDENCY = 5, NM_AVSTATE_DEGRADED = 6, NM_AVSTATE_NOT_INSTALLED= 7, diff -Nru libosmocore-1.6.0/include/osmocom/gsm/protocol/gsm_25_415.h libosmocore-1.7.0/include/osmocom/gsm/protocol/gsm_25_415.h --- libosmocore-1.6.0/include/osmocom/gsm/protocol/gsm_25_415.h 1970-01-01 00:00:00.000000000 +0000 +++ libosmocore-1.7.0/include/osmocom/gsm/protocol/gsm_25_415.h 2022-06-28 15:00:51.000000000 +0000 @@ -0,0 +1,222 @@ +#pragma once +/* Iu User Plane (IuUP) Definitions as per 3GPP TS 25.415 */ +/* (C) 2017 by Harald Welte + * All Rights Reserved. + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#include +#include + +/* 3GPP TS 25.415 Section 6.6.2.1 */ +struct iuup_pdutype0_hdr { +#if OSMO_IS_LITTLE_ENDIAN + /* control part */ + uint8_t frame_nr:4, + pdu_type:4; + uint8_t rfci:6, + fqc:2; + /* checksum part */ + uint8_t payload_crc_hi:2, header_crc:6; + uint8_t payload_crc_lo; + + /* payload part */ + uint8_t payload[0]; +#elif OSMO_IS_BIG_ENDIAN +/* auto-generated from the little endian part above (libosmocore/contrib/struct_endianess.py) */ + uint8_t pdu_type:4, frame_nr:4; + uint8_t fqc:2, rfci:6; + uint8_t header_crc:6, payload_crc_hi:2; + uint8_t payload_crc_lo; + uint8_t payload[0]; +#endif +} __attribute__((packed)); + +/* 3GPP TS 25.415 Section 6.6.2.2 */ +struct iuup_pdutype1_hdr { +#if OSMO_IS_LITTLE_ENDIAN + /* control part */ + uint8_t frame_nr:4, + pdu_type:4; + uint8_t rfci:6, + fqc:2; + /* checksum part */ + uint8_t spare:2, + header_crc:6; + /* payload part */ + uint8_t payload[0]; +#elif OSMO_IS_BIG_ENDIAN +/* auto-generated from the little endian part above (libosmocore/contrib/struct_endianess.py) */ + uint8_t pdu_type:4, frame_nr:4; + uint8_t fqc:2, rfci:6; + uint8_t header_crc:6, spare:2; + uint8_t payload[0]; +#endif +} __attribute__((packed)); + +/* 3GPP TS 25.415 Section 6.6.2.3 */ +struct iuup_pdutype14_hdr { +#if OSMO_IS_LITTLE_ENDIAN + /* control part */ + uint8_t frame_nr:2, + ack_nack:2, + pdu_type:4; + uint8_t proc_ind:4, + mode_version:4; + /* checksum part */ + uint8_t payload_crc_hi:2, header_crc:6; + uint8_t payload_crc_lo; + /* payload part */ + uint8_t payload[0]; +#elif OSMO_IS_BIG_ENDIAN +/* auto-generated from the little endian part above (libosmocore/contrib/struct_endianess.py) */ + uint8_t pdu_type:4, ack_nack:2, frame_nr:2; + uint8_t mode_version:4, proc_ind:4; + uint8_t header_crc:6, payload_crc_hi:2; + uint8_t payload_crc_lo; + uint8_t payload[0]; +#endif +} __attribute__((packed)); + +/* 3GPP TS 25.415 Section 6.6.2.3.4.1 */ +struct iuup_ctrl_init_rfci_hdr { +#if OSMO_IS_LITTLE_ENDIAN + uint8_t rfci:6, + li:1, + lri:1; + uint8_t subflow_length[0]; /* 1 or 2 bytes depending on li */ +#elif OSMO_IS_BIG_ENDIAN +/* auto-generated from the little endian part above (libosmocore/contrib/struct_endianess.py) */ + uint8_t lri:1, li:1, rfci:6; + uint8_t subflow_length[0]; +#endif +} __attribute__((packed)); +struct iuup_ctrl_init_hdr { +#if OSMO_IS_LITTLE_ENDIAN + uint8_t chain_ind:1, + num_subflows_per_rfci:3, + ti:1, + spare:3; + uint8_t rfci_data[0]; /* struct iuup_ctrl_init_rfci_hdr* */ +#elif OSMO_IS_BIG_ENDIAN +/* auto-generated from the little endian part above (libosmocore/contrib/struct_endianess.py) */ + uint8_t spare:3, ti:1, num_subflows_per_rfci:3, chain_ind:1; + uint8_t rfci_data[0]; /* struct iuup_ctrl_init_rfci_hdr* */ +; +#endif +} __attribute__((packed)); +struct iuup_ctrl_init_tail { +#if OSMO_IS_LITTLE_ENDIAN + uint16_t versions_supported; + uint8_t spare:4, + data_pdu_type:4; + uint8_t spare_extension[0]; +#elif OSMO_IS_BIG_ENDIAN +/* auto-generated from the little endian part above (libosmocore/contrib/struct_endianess.py) */ + uint16_t versions_supported; + uint8_t data_pdu_type:4, spare:4; + uint8_t spare_extension[0]; +#endif +} __attribute__((packed)); + +/* 3GPP TS 25.415 Section 6.6.2.3.4.4 */ +struct iuup_ctrl_error_event { +#if OSMO_IS_LITTLE_ENDIAN + struct iuup_pdutype14_hdr hdr; + uint8_t error_cause:6, + error_distance:2; + uint8_t spare_extension[0]; +#elif OSMO_IS_BIG_ENDIAN +/* auto-generated from the little endian part above (libosmocore/contrib/struct_endianess.py) */ + struct iuup_pdutype14_hdr hdr; + uint8_t error_distance:2, error_cause:6; + uint8_t spare_extension[0]; +#endif +} __attribute__((packed)); + +/* 3GPP TS 25.415 Section 6.6.2.3.2 */ +struct iuup_ctrl_ack { + struct iuup_pdutype14_hdr hdr; + uint8_t spare_extension[0]; +} __attribute__((packed)); + +/* 3GPP TS 25.415 Section 6.6.2.3.3 */ +struct iuup_ctrl_nack { +#if OSMO_IS_LITTLE_ENDIAN + struct iuup_pdutype14_hdr hdr; + uint8_t spare:2, + error_cause:6; + uint8_t spare_extension[0]; +#elif OSMO_IS_BIG_ENDIAN +/* auto-generated from the little endian part above (libosmocore/contrib/struct_endianess.py) */ + struct iuup_pdutype14_hdr hdr; + uint8_t error_cause:6, spare:2; + uint8_t spare_extension[0]; +#endif +} __attribute__((packed)); + +/* 3GPP TS 25.415 Section 6.6.2 + 6.6.3.1 */ +enum iuup_pdu_type { + IUUP_PDU_T_DATA_CRC = 0, + IUUP_PDU_T_DATA_NOCRC = 1, + IUUP_PDU_T_CONTROL = 14, +}; + +/* 3GPP TS 25.415 Section 6.6.3.2 */ +enum iuup_ack_nack { + IUUP_AN_PROCEDURE = 0, + IUUP_AN_ACK = 1, + IUUP_AN_NACK = 2, +}; + +/* 3GPP TS 25.415 Section 6.6.3.5 */ +enum iuup_fqc { + IUUP_FQC_FRAME_GOOD = 0, + IUUP_FQC_FRAME_BAD = 1, + IUUP_FQC_FRAME_BAD_RADIO = 2, +}; + +/* 3GPP TS 25.415 Section 6.6.3.7 */ +enum iuup_procedure { + IUUP_PROC_INIT = 0, + IUUP_PROC_RATE_CTRL = 1, + IUUP_PROC_TIME_ALIGN = 2, + IUUP_PROC_ERR_EVENT = 3, +}; + + +/* 3GPP TS 25.415 Section 6.6.3.15 */ +enum iuup_error_distance { + IUUP_ERR_DIST_LOCAL = 0, + IUUP_ERR_DIST_FIRST_FWD = 1, + IUUP_ERR_DIST_SECOND_FWD = 2, + IUUP_ERR_DIST_RESERVED = 3, +}; + + +/* 3GPP TS 25.415 Section 6.6.3.16 */ +enum iuup_error_cause { + IUUP_ERR_CAUSE_CRC_ERR_HDR = 0, + IUUP_ERR_CAUSE_CRC_ERR_DATA = 1, + IUUP_ERR_CAUSE_UNEXPECTED_FN = 2, + IUUP_ERR_CAUSE_FRAME_LOSS = 3, + IUUP_ERR_CAUSE_UNKNOWN_PDUTYPE = 4, + IUUP_ERR_CAUSE_UNKNOWN_PROC = 5, + IUUP_ERR_CAUSE_UNKNNOWN_RES_VAL = 6, + IUUP_ERR_CAUSE_UNKNNOWN_FIELD = 7, + IUUP_ERR_CAUSE_FRAME_TOO_SHORT = 8, + IUUP_ERR_CAUSE_MISSING_FIELDS = 9, + IUUP_ERR_CAUSE_UNEXPECTED_PDU_T = 16, + IUUP_ERR_CAUSE_UNEXPECTED_PROC = 18, + IUUP_ERR_CAUSE_UNEXPECTED_RFCI = 19, + IUUP_ERR_CAUSE_UNEXPECTED_VALUE = 20, + IUUP_ERR_CAUSE_INIT_FAILURE = 42, + IUUP_ERR_CAUSE_INIT_FAILURE_NET_TMR = 43, + IUUP_ERR_CAUSE_INIT_FAILURE_REP_NACK = 44, + IUUP_ERR_CAUSE_RATE_CTRL_FAILURE = 45, + IUUP_ERR_CAUSE_ERR_EVENT_FAIL = 46, + IUUP_ERR_CAUSE_TIME_ALIGN_NOTSUPP = 47, + IUUP_ERR_CAUSE_REQ_TIME_ALIGN_NOTPOSS = 48, + IUUP_ERR_CAUSE_MODE_VERSION_NOT_SUPPORTED = 49, +}; diff -Nru libosmocore-1.6.0/include/osmocom/gsm/protocol/gsm_44_004.h libosmocore-1.7.0/include/osmocom/gsm/protocol/gsm_44_004.h --- libosmocore-1.6.0/include/osmocom/gsm/protocol/gsm_44_004.h 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/include/osmocom/gsm/protocol/gsm_44_004.h 2022-06-28 15:00:51.000000000 +0000 @@ -5,17 +5,15 @@ /* TS 44.004 Section 7.1 */ struct gsm_sacch_l1_hdr { -#if OSMO_IS_BIG_ENDIAN - uint8_t reserved:1, - srr_sro:1, - fpc_epc:1, - ms_pwr:5; - uint8_t ta; -#elif OSMO_IS_LITTLE_ENDIAN +#if OSMO_IS_LITTLE_ENDIAN uint8_t ms_pwr:5, fpc_epc:1, srr_sro:1, reserved:1; uint8_t ta; +#elif OSMO_IS_BIG_ENDIAN +/* auto-generated from the little endian part above (libosmocore/contrib/struct_endianess.py) */ + uint8_t reserved:1, srr_sro:1, fpc_epc:1, ms_pwr:5; + uint8_t ta; #endif } __attribute__ ((packed)); diff -Nru libosmocore-1.6.0/include/osmocom/gsm/protocol/gsm_48_071.h libosmocore-1.7.0/include/osmocom/gsm/protocol/gsm_48_071.h --- libosmocore-1.6.0/include/osmocom/gsm/protocol/gsm_48_071.h 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/include/osmocom/gsm/protocol/gsm_48_071.h 2022-06-28 15:00:51.000000000 +0000 @@ -20,10 +20,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 diff -Nru libosmocore-1.6.0/include/osmocom/gsm/protocol/gsm_49_031.h libosmocore-1.7.0/include/osmocom/gsm/protocol/gsm_49_031.h --- libosmocore-1.6.0/include/osmocom/gsm/protocol/gsm_49_031.h 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/include/osmocom/gsm/protocol/gsm_49_031.h 2022-06-28 15:00:51.000000000 +0000 @@ -20,15 +20,13 @@ * 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 #include #include + +#include #include #include #include @@ -62,6 +60,21 @@ uint8_t diag_val; }; +/* 3GPP TS 49.031 10.16 LCS QoS IE */ +struct osmo_bssmap_le_lcs_qos { +#if OSMO_IS_LITTLE_ENDIAN + uint8_t vert:1, vel:1, spare1:6; + uint8_t ha_val:7, ha_ind:1; + uint8_t va_val:7, va_ind:1; + uint8_t spare3:6, rt:2; +#elif OSMO_IS_BIG_ENDIAN + uint8_t spare1:6, vel:1, vert:1; + uint8_t ha_ind:1, ha_val:7; + uint8_t va_ind:1, va_val:7; + uint8_t rt:2, spare3:6; +#endif +} __attribute__ ((packed)); + enum bssap_le_msg_discr { BSSAP_LE_MSG_DISCR_BSSMAP_LE = 0, }; @@ -171,7 +184,15 @@ bool apdu_present; struct bsslap_pdu apdu; - bool more_items; /*!< always set this to false */ + bool more_items; /*!< set this to true iff any fields below are used */ + + bool lcs_priority_present; + uint8_t lcs_priority; /*!< see in 3GPP TS 29.002 */ + + bool lcs_qos_present; + struct osmo_bssmap_le_lcs_qos lcs_qos; + + bool more_items2; /*!< always set this to false */ }; struct bssmap_le_perform_loc_resp { diff -Nru libosmocore-1.6.0/include/osmocom/sim/class_tables.h libosmocore-1.7.0/include/osmocom/sim/class_tables.h --- libosmocore-1.6.0/include/osmocom/sim/class_tables.h 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/include/osmocom/sim/class_tables.h 2022-06-28 15:00:51.000000000 +0000 @@ -11,10 +11,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #pragma once diff -Nru libosmocore-1.6.0/include/osmocom/usb/libusb.h libosmocore-1.7.0/include/osmocom/usb/libusb.h --- libosmocore-1.6.0/include/osmocom/usb/libusb.h 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/include/osmocom/usb/libusb.h 2022-06-28 15:00:51.000000000 +0000 @@ -12,10 +12,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * 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 diff -Nru libosmocore-1.6.0/include/osmocom/vty/misc.h libosmocore-1.7.0/include/osmocom/vty/misc.h --- libosmocore-1.6.0/include/osmocom/vty/misc.h 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/include/osmocom/vty/misc.h 2022-06-28 15:00:51.000000000 +0000 @@ -14,15 +14,23 @@ void vty_out_rate_ctr_group(struct vty *vty, const char *prefix, struct rate_ctr_group *ctrg); +void vty_out_rate_ctr_group2(struct vty *vty, const char *prefix, + struct rate_ctr_group *ctrg, bool skip_zero); void vty_out_rate_ctr_group_fmt(struct vty *vty, const char *fmt, struct rate_ctr_group *ctrg); +void vty_out_rate_ctr_group_fmt2(struct vty *vty, const char *fmt, + struct rate_ctr_group *ctrg, bool skip_zero); + void vty_out_stat_item_group(struct vty *vty, const char *prefix, struct osmo_stat_item_group *statg); +void vty_out_stat_item_group2(struct vty *vty, const char *prefix, + struct osmo_stat_item_group *statg, bool skip_zero); void vty_out_statistics_full(struct vty *vty, const char *prefix); -void vty_out_statistics_partial(struct vty *vty, const char *prefix, - int max_level); +void vty_out_statistics_full2(struct vty *vty, const char *prefix, bool skip_zero); +void vty_out_statistics_partial(struct vty *vty, const char *prefix, int max_level); +void vty_out_statistics_partial2(struct vty *vty, const char *prefix, int max_level, bool skip_zero); struct osmo_fsm; diff -Nru libosmocore-1.6.0/include/osmocom/vty/ports.h libosmocore-1.7.0/include/osmocom/vty/ports.h --- libosmocore-1.6.0/include/osmocom/vty/ports.h 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/include/osmocom/vty/ports.h 2022-06-28 15:00:51.000000000 +0000 @@ -42,4 +42,8 @@ /* 4272 used by control interface */ #define OSMO_VTY_PORT_HNODEB 4273 /* 4274 used by control interface */ +#define OSMO_VTY_PORT_UPF 4275 +/* 4276: OSMO_CTRL_PORT_UPF */ +#define OSMO_VTY_PORT_PFCP_TOOL 4277 +/* 4278: OSMO_CTRL_PORT_UPF */ /* When adding/changing port numbers, keep docs and wiki in sync. See above. */ diff -Nru libosmocore-1.6.0/include/osmocom/vty/telnet_interface.h libosmocore-1.7.0/include/osmocom/vty/telnet_interface.h --- libosmocore-1.6.0/include/osmocom/vty/telnet_interface.h 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/include/osmocom/vty/telnet_interface.h 2022-06-28 15:00:51.000000000 +0000 @@ -14,10 +14,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 diff -Nru libosmocore-1.6.0/include/osmocom/vty/vector.h libosmocore-1.7.0/include/osmocom/vty/vector.h --- libosmocore-1.6.0/include/osmocom/vty/vector.h 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/include/osmocom/vty/vector.h 2022-06-28 15:00:51.000000000 +0000 @@ -14,11 +14,6 @@ * WITHOUT ANY WARRANTY; without even the implied warranty of * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. */ #pragma once diff -Nru libosmocore-1.6.0/libosmocodec.pc.in libosmocore-1.7.0/libosmocodec.pc.in --- libosmocore-1.6.0/libosmocodec.pc.in 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/libosmocodec.pc.in 2022-06-28 15:00:51.000000000 +0000 @@ -6,6 +6,6 @@ Name: Osmocom Codec related utilities Library Description: C Utility Library Version: @VERSION@ -Libs: -L${libdir} @TALLOC_LIBS@ -losmocodec -Cflags: -I${includedir}/ @TALLOC_CFLAGS@ - +Requires: talloc, libosmocore +Libs: -L${libdir} -losmocodec +Cflags: -I${includedir}/ diff -Nru libosmocore-1.6.0/libosmocoding.pc.in libosmocore-1.7.0/libosmocoding.pc.in --- libosmocore-1.6.0/libosmocoding.pc.in 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/libosmocoding.pc.in 2022-06-28 15:00:51.000000000 +0000 @@ -6,6 +6,6 @@ Name: Osmocom L1 transcoding Library Description: C Utility Library Version: @VERSION@ -Libs: -L${libdir} @TALLOC_LIBS@ -losmocoding -losmocodec -losmogsm -losmocore -Cflags: -I${includedir}/ @TALLOC_CFLAGS@ - +Requires: talloc, libosmocore, libosmogsm, libosmocodec +Libs: -L${libdir} -losmocoding +Cflags: -I${includedir}/ diff -Nru libosmocore-1.6.0/libosmocore.pc.in libosmocore-1.7.0/libosmocore.pc.in --- libosmocore-1.6.0/libosmocore.pc.in 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/libosmocore.pc.in 2022-06-28 15:00:51.000000000 +0000 @@ -6,6 +6,8 @@ Name: Osmocom Core Library Description: C Utility Library Version: @VERSION@ -Libs: -L${libdir} @TALLOC_LIBS@ -losmocore +Requires: talloc +Requires.private: @LIBSCTP_PC@ +Libs: -L${libdir} -losmocore Libs.private: @PTHREAD_LIBS@ @LIBSCTP_LIBS@ -Cflags: -I${includedir}/ @TALLOC_CFLAGS@ @PTHREAD_CFLAGS@ +Cflags: -I${includedir}/ @PTHREAD_CFLAGS@ diff -Nru libosmocore-1.6.0/libosmoctrl.pc.in libosmocore-1.7.0/libosmoctrl.pc.in --- libosmocore-1.6.0/libosmoctrl.pc.in 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/libosmoctrl.pc.in 2022-06-28 15:00:51.000000000 +0000 @@ -6,6 +6,6 @@ Name: Osmocom Control Interface Library Description: C Utility Library Version: @VERSION@ -Libs: -L${libdir} @TALLOC_LIBS@ -losmoctrl -losmogsm -losmocore +Requires: talloc, libosmocore, libosmogsm +Libs: -L${libdir} -losmoctrl Cflags: -I${includedir}/ - diff -Nru libosmocore-1.6.0/libosmogb.pc.in libosmocore-1.7.0/libosmogb.pc.in --- libosmocore-1.6.0/libosmogb.pc.in 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/libosmogb.pc.in 2022-06-28 15:00:51.000000000 +0000 @@ -6,6 +6,6 @@ Name: Osmocom GPRS Gb Library Description: Osmocom GPRS Gb Interface (NS/BSSGP) Library Version: @VERSION@ -Libs: -L${libdir} @TALLOC_LIBS@ -losmogb -losmovty -losmocore +Requires: talloc, libosmocore, libosmovty +Libs: -L${libdir} -losmogb Cflags: -I${includedir}/ -fno-strict-aliasing - diff -Nru libosmocore-1.6.0/libosmogsm.pc.in libosmocore-1.7.0/libosmogsm.pc.in --- libosmocore-1.6.0/libosmogsm.pc.in 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/libosmogsm.pc.in 2022-06-28 15:00:51.000000000 +0000 @@ -6,6 +6,6 @@ Name: Osmocom GSM Core Library Description: GSM Core Library Version: @VERSION@ -Libs: -L${libdir} @TALLOC_LIBS@ -losmogsm -losmocore +Requires: talloc, libosmocore +Libs: -L${libdir} -losmogsm Cflags: -I${includedir}/ - diff -Nru libosmocore-1.6.0/libosmosim.pc.in libosmocore-1.7.0/libosmosim.pc.in --- libosmocore-1.6.0/libosmosim.pc.in 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/libosmosim.pc.in 2022-06-28 15:00:51.000000000 +0000 @@ -6,6 +6,6 @@ Name: Osmocom SIM card related utilities Library Description: C Utility Library Version: @VERSION@ -Libs: -L${libdir} @TALLOC_LIBS@ -losmosim -losmocore +Requires: talloc, libosmocore +Libs: -L${libdir} -losmosim Cflags: -I${includedir}/ - diff -Nru libosmocore-1.6.0/libosmousb.pc.in libosmocore-1.7.0/libosmousb.pc.in --- libosmocore-1.6.0/libosmousb.pc.in 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/libosmousb.pc.in 2022-06-28 15:00:51.000000000 +0000 @@ -6,6 +6,6 @@ Name: Osmocom libusb (USB) integration Description: C Utility Library Version: @VERSION@ -Libs: -L${libdir} @TALLOC_LIBS@ -losmousb -losmocore +Requires: talloc, libusb-1.0, libosmocore +Libs: -L${libdir} -losmousb Cflags: -I${includedir}/ - diff -Nru libosmocore-1.6.0/libosmovty.pc.in libosmocore-1.7.0/libosmovty.pc.in --- libosmocore-1.6.0/libosmovty.pc.in 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/libosmovty.pc.in 2022-06-28 15:00:51.000000000 +0000 @@ -6,6 +6,6 @@ Name: Osmocom VTY Interface Library Description: C Utility Library Version: @VERSION@ -Libs: -L${libdir} @TALLOC_LIBS@ -losmovty -losmocore +Requires: talloc, libosmocore +Libs: -L${libdir} -losmovty Cflags: -I${includedir}/ - diff -Nru libosmocore-1.6.0/Makefile.am libosmocore-1.7.0/Makefile.am --- libosmocore-1.6.0/Makefile.am 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/Makefile.am 2022-06-28 15:00:51.000000000 +0000 @@ -1,7 +1,22 @@ ACLOCAL_AMFLAGS = -I m4 AM_CPPFLAGS = $(all_includes) -I$(top_srcdir)/include -SUBDIRS = include src src/vty src/codec src/gsm src/coding src/gb src/ctrl src/sim src/pseudotalloc src/usb utils tapset tests +SUBDIRS = \ + include \ + src \ + src/vty \ + src/codec \ + src/gsm \ + src/coding \ + src/gb \ + src/ctrl \ + src/sim \ + src/pseudotalloc \ + src/usb \ + utils \ + tapset \ + tests \ + $(NULL) pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = libosmocore.pc libosmocodec.pc libosmovty.pc libosmogsm.pc \ diff -Nru libosmocore-1.6.0/osmo-release.sh libosmocore-1.7.0/osmo-release.sh --- libosmocore-1.6.0/osmo-release.sh 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/osmo-release.sh 2022-06-28 15:00:51.000000000 +0000 @@ -279,7 +279,7 @@ --new-version="$NEW_VER_WITH_EPOCH" dch -r -m --distribution "unstable" "" git add ${GIT_TOPDIR}/debian/changelog -bumpversion --current-version $VERSION $REL --tag --commit --tag-name $NEW_VER --allow-dirty +$BUMPVER --current-version $VERSION $REL --tag --commit --tag-name $NEW_VER --allow-dirty git commit --amend # let the user add extra information to the release commit. git tag -s $NEW_VER -f -m "Release v$NEW_VER on $ISODATE." echo "Release $NEW_VER prepared, tagged and signed." diff -Nru libosmocore-1.6.0/README.md libosmocore-1.7.0/README.md --- libosmocore-1.6.0/README.md 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/README.md 2022-06-28 15:00:51.000000000 +0000 @@ -41,9 +41,9 @@ You can clone from the official libosmocore.git repository using - git clone git://git.osmocom.org/libosmocore.git + git clone https://gitea.osmocom.org/osmocom/libosmocore -There is a cgit interface at +There is a web interface at Documentation ------------- diff -Nru libosmocore-1.6.0/src/application.c libosmocore-1.7.0/src/application.c --- libosmocore-1.6.0/src/application.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/application.c 2022-06-28 15:00:51.000000000 +0000 @@ -18,10 +18,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. - * */ /*! \mainpage libosmocore Documentation diff -Nru libosmocore-1.6.0/src/backtrace.c libosmocore-1.7.0/src/backtrace.c --- libosmocore-1.6.0/src/backtrace.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/backtrace.c 2022-06-28 15:00:51.000000000 +0000 @@ -18,10 +18,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 diff -Nru libosmocore-1.6.0/src/base64.c libosmocore-1.7.0/src/base64.c --- libosmocore-1.6.0/src/base64.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/base64.c 2022-06-28 15:00:51.000000000 +0000 @@ -14,10 +14,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * 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 diff -Nru libosmocore-1.6.0/src/bitcomp.c libosmocore-1.7.0/src/bitcomp.c --- libosmocore-1.6.0/src/bitcomp.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/bitcomp.c 2022-06-28 15:00:51.000000000 +0000 @@ -18,10 +18,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. - * */ /*! \defgroup bitcomp Bit compression diff -Nru libosmocore-1.6.0/src/bits.c libosmocore-1.7.0/src/bits.c --- libosmocore-1.6.0/src/bits.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/bits.c 2022-06-28 15:00:51.000000000 +0000 @@ -16,10 +16,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 @@ -192,7 +188,7 @@ const ubit_t *in, unsigned int in_ofs, unsigned int num_bits, int lsb_mode) { - int i, op, bn; + unsigned int i, op, bn; for (i=0; i= bv->data_len) { + errno = EOVERFLOW; + return 0; + } + bv->cur_bit = *read_index; + errno = 0; for (i = 0; i < len; i++) { - int bit = bitvec_get_bit_pos((const struct bitvec *)bv, bv->cur_bit); - if (bit < 0) - return bit; - if (bit) + unsigned int bytenum = bytenum_from_bitnum(bv->cur_bit); + unsigned int bitnum = 7 - (bv->cur_bit % 8); + + if (bv->data[bytenum] & (1 << bitnum)) ui |= ((uint64_t)1 << (len - i - 1)); bv->cur_bit++; } @@ -597,7 +604,7 @@ * \returns Number of consecutive bits of \p b in \p bv and cur_bit will * \go to cur_bit + number of consecutive bit */ -unsigned bitvec_rl_curbit(struct bitvec *bv, bool b, int max_bits) +unsigned bitvec_rl_curbit(struct bitvec *bv, bool b, unsigned int max_bits) { unsigned i = 0; unsigned j = 8; diff -Nru libosmocore-1.6.0/src/codec/ecu.c libosmocore-1.7.0/src/codec/ecu.c --- libosmocore-1.6.0/src/codec/ecu.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/codec/ecu.c 2022-06-28 15:00:51.000000000 +0000 @@ -14,10 +14,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. - * */ /* As the developer and copyright holder of the related code, I hereby diff -Nru libosmocore-1.6.0/src/codec/ecu_fr.c libosmocore-1.7.0/src/codec/ecu_fr.c --- libosmocore-1.6.0/src/codec/ecu_fr.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/codec/ecu_fr.c 2022-06-28 15:00:51.000000000 +0000 @@ -14,10 +14,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 diff -Nru libosmocore-1.6.0/src/codec/gsm610.c libosmocore-1.7.0/src/codec/gsm610.c --- libosmocore-1.6.0/src/codec/gsm610.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/codec/gsm610.c 2022-06-28 15:00:51.000000000 +0000 @@ -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 diff -Nru libosmocore-1.6.0/src/codec/gsm620.c libosmocore-1.7.0/src/codec/gsm620.c --- libosmocore-1.6.0/src/codec/gsm620.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/codec/gsm620.c 2022-06-28 15:00:51.000000000 +0000 @@ -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 @@ -268,12 +264,6 @@ 81, /* Code 3:7 */ }; -static inline uint16_t mask(const uint8_t msb) -{ - const uint16_t m = (uint16_t)1 << (msb - 1); - return (m - 1) ^ m; -} - /*! Check whether RTP frame contains HR SID code word according to * TS 101 318 §5.2.2 * \param[in] rtp_payload Buffer with RTP payload @@ -282,15 +272,15 @@ */ bool osmo_hr_check_sid(const uint8_t *rtp_payload, size_t payload_len) { - uint8_t i, bits[] = { 1, 2, 8, 9, 5, 4, 9, 5, 4, 9, 5, 4, 9, 5 }; - struct bitvec bv; - bv.data = (uint8_t *) rtp_payload; - bv.data_len = payload_len; - bv.cur_bit = 33; + struct bitvec bv = { + .data = (uint8_t *)rtp_payload, + .data_len = payload_len, + }; - /* code word is all 1 at given bits, numbered from 1, MODE is always 3 */ - for (i = 0; i < ARRAY_SIZE(bits); i++) - if (bitvec_get_uint(&bv, bits[i]) != mask(bits[i])) + /* A SID frame is identified by a SID codeword consisting of 79 bits which are all 1, + * so we basically check if all bits in range r34..r112 (inclusive) are 1. */ + for (bv.cur_bit = 33; bv.cur_bit < bv.data_len * 8; bv.cur_bit++) + if (bitvec_get_bit_pos(&bv, bv.cur_bit) != ONE) return false; return true; diff -Nru libosmocore-1.6.0/src/codec/gsm660.c libosmocore-1.7.0/src/codec/gsm660.c --- libosmocore-1.6.0/src/codec/gsm660.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/codec/gsm660.c 2022-06-28 15:00:51.000000000 +0000 @@ -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 diff -Nru libosmocore-1.6.0/src/codec/gsm690.c libosmocore-1.7.0/src/codec/gsm690.c --- libosmocore-1.6.0/src/codec/gsm690.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/codec/gsm690.c 2022-06-28 15:00:51.000000000 +0000 @@ -18,10 +18,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 diff -Nru libosmocore-1.6.0/src/codec/Makefile.am libosmocore-1.7.0/src/codec/Makefile.am --- libosmocore-1.6.0/src/codec/Makefile.am 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/codec/Makefile.am 2022-06-28 15:00:51.000000000 +0000 @@ -1,7 +1,7 @@ # This is _NOT_ the library release version, it's an API version. # Please read chapter "Library interface versions" of the libtool documentation # before making any modifications: https://www.gnu.org/software/libtool/manual/html_node/Versioning.html -LIBVERSION=3:0:3 +LIBVERSION=3:1:3 AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include $(TALLOC_CFLAGS) AM_CFLAGS = -Wall diff -Nru libosmocore-1.6.0/src/coding/gsm0503_amr_dtx.c libosmocore-1.7.0/src/coding/gsm0503_amr_dtx.c --- libosmocore-1.6.0/src/coding/gsm0503_amr_dtx.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/coding/gsm0503_amr_dtx.c 2022-06-28 15:00:51.000000000 +0000 @@ -1,5 +1,5 @@ /* - * (C) 2020 by sysmocom - s.f.m.c. GmbH, Author: Philipp Maier + * (C) 2020-2022 by sysmocom - s.f.m.c. GmbH, Author: Philipp Maier * All Rights Reserved * * SPDX-License-Identifier: GPL-2.0+ @@ -32,6 +32,8 @@ #include #include +#define S2U(b) ((b) < 0) + /* See also: 3GPP TS 05.03, chapter 3.10.1.3, 3.10.5.2 Identification marker */ static const ubit_t id_marker_1[] = { 1, 0, 1, 1, 0, 0, 0, 0, 1 }; @@ -60,7 +62,7 @@ { 0, NULL } }; -static bool detect_afs_id_marker(int *n_errors, int *n_bits_total, const ubit_t * ubits, uint8_t offset, uint8_t count, +static bool detect_afs_id_marker(int *n_errors, int *n_bits_total, const sbit_t *sbits, uint8_t offset, uint8_t count, const ubit_t * id_marker, uint8_t id_marker_len) { unsigned int i, k; @@ -69,20 +71,20 @@ int bits = 0; /* Override coded in-band data */ - ubits += offset; + sbits += offset; /* Check for identification marker bits */ for (i = 0; i < count; i++) { for (k = 0; k < 4; k++) { - if (id_marker[id_bit_nr % id_marker_len] != *ubits) + if (*sbits == 0 || id_marker[id_bit_nr % id_marker_len] != S2U(*sbits)) errors++; id_bit_nr++; - ubits++; + sbits++; bits++; } /* Jump to the next block of 4 bits */ - ubits += 4; + sbits += 4; } *n_errors = errors; @@ -92,30 +94,30 @@ return *n_errors < *n_bits_total / 8; } -static bool detect_ahs_id_marker(int *n_errors, int *n_bits_total, const ubit_t * ubits, const ubit_t * id_marker) +static bool detect_ahs_id_marker(int *n_errors, int *n_bits_total, const sbit_t *sbits, const ubit_t *id_marker) { unsigned int i, k; int errors = 0; int bits = 0; /* Override coded in-band data */ - ubits += 16; + sbits += 16; /* Check first identification marker bits (23*9 bits) */ for (i = 0; i < 23; i++) { for (k = 0; k < 9; k++) { - if (id_marker[k] != *ubits) + if (*sbits == 0 || id_marker[k] != S2U(*sbits)) errors++; - ubits++; + sbits++; bits++; } } /* Check remaining identification marker bits (5 bits) */ for (k = 0; k < 5; k++) { - if (id_marker[k] != *ubits) + if (*sbits == 0 || id_marker[k] != S2U(*sbits)) errors++; - ubits++; + sbits++; bits++; } @@ -126,7 +128,7 @@ return *n_errors < *n_bits_total / 8; } -static bool detect_interleaved_ahs_id_marker(int *n_errors, int *n_bits_total, const ubit_t * ubits, uint8_t offset, +static bool detect_interleaved_ahs_id_marker(int *n_errors, int *n_bits_total, const sbit_t *sbits, uint8_t offset, uint8_t n_bits, const ubit_t * id_marker, uint8_t id_marker_len) { unsigned int i, k; @@ -136,23 +138,23 @@ uint8_t remainder = n_bits % id_marker_len; /* Override coded in-band data */ - ubits += offset; + sbits += offset; /* Check first identification marker bits (23*9 bits) */ for (i = 0; i < full_rounds; i++) { for (k = 0; k < id_marker_len; k++) { - if (id_marker[k] != *ubits) + if (*sbits == 0 || id_marker[k] != S2U(*sbits)) errors++; - ubits += 2; + sbits += 2; bits++; } } /* Check remaining identification marker bits (5 bits) */ for (k = 0; k < remainder; k++) { - if (id_marker[k] != *ubits) + if (*sbits == 0 || id_marker[k] != S2U(*sbits)) errors++; - ubits += 2; + sbits += 2; bits++; } @@ -163,126 +165,128 @@ return *n_errors < *n_bits_total / 8; } -/* Detect a an FR AMR SID_FIRST frame by its identifcation marker */ -static bool detect_afs_sid_first(int *n_errors, int *n_bits_total, const ubit_t * ubits) +/* Detect an FR AMR SID_FIRST frame by its identifcation marker */ +static bool detect_afs_sid_first(int *n_errors, int *n_bits_total, const sbit_t *sbits) { - return detect_afs_id_marker(n_errors, n_bits_total, ubits, 32, 53, id_marker_0, 9); + return detect_afs_id_marker(n_errors, n_bits_total, sbits, 32, 53, id_marker_0, 9); } -/* Detect an FR AMR SID_FIRST frame by its identification marker */ -static bool detect_afs_sid_update(int *n_errors, int *n_bits_total, const ubit_t * ubits) +/* Detect an FR AMR SID_UPDATE frame by its identification marker */ +static bool detect_afs_sid_update(int *n_errors, int *n_bits_total, const sbit_t *sbits) { - return detect_afs_id_marker(n_errors, n_bits_total, ubits, 36, 53, id_marker_0, 9); + return detect_afs_id_marker(n_errors, n_bits_total, sbits, 36, 53, id_marker_0, 9); } -/* Detect an FR AMR SID_FIRST frame by its repeating coded inband data */ -static bool detect_afs_onset(int *n_errors, int *n_bits_total, const ubit_t * ubits) +/* Detect an FR AMR ONSET frame by its repeating coded inband data */ +static int detect_afs_onset(int *n_errors, int *n_bits_total, const sbit_t *sbits) { bool rc; - rc = detect_afs_id_marker(n_errors, n_bits_total, ubits, 4, 57, codec_mode_1_sid, 16); + rc = detect_afs_id_marker(n_errors, n_bits_total, sbits, 4, 57, codec_mode_1_sid, 16); if (rc) - return true; + return 0; - rc = detect_afs_id_marker(n_errors, n_bits_total, ubits, 4, 57, codec_mode_2_sid, 16); + rc = detect_afs_id_marker(n_errors, n_bits_total, sbits, 4, 57, codec_mode_2_sid, 16); if (rc) - return true; + return 1; - rc = detect_afs_id_marker(n_errors, n_bits_total, ubits, 4, 57, codec_mode_3_sid, 16); + rc = detect_afs_id_marker(n_errors, n_bits_total, sbits, 4, 57, codec_mode_3_sid, 16); if (rc) - return true; + return 2; - rc = detect_afs_id_marker(n_errors, n_bits_total, ubits, 4, 57, codec_mode_4_sid, 16); + rc = detect_afs_id_marker(n_errors, n_bits_total, sbits, 4, 57, codec_mode_4_sid, 16); if (rc) - return true; + return 3; - return false; + return -1; } /* Detect an HR AMR SID UPDATE frame by its identification marker */ -static bool detect_ahs_sid_update(int *n_errors, int *n_bits_total, const ubit_t * ubits) +static bool detect_ahs_sid_update(int *n_errors, int *n_bits_total, const sbit_t *sbits) { - return detect_ahs_id_marker(n_errors, n_bits_total, ubits, id_marker_1); + return detect_ahs_id_marker(n_errors, n_bits_total, sbits, id_marker_1); } /* Detect an HR AMR SID FIRST (part 1) frame by its identification marker */ -static bool detect_ahs_sid_first_p1(int *n_errors, int *n_bits_total, const ubit_t * ubits) +static bool detect_ahs_sid_first_p1(int *n_errors, int *n_bits_total, const sbit_t *sbits) { - return detect_ahs_id_marker(n_errors, n_bits_total, ubits, id_marker_0); + return detect_ahs_id_marker(n_errors, n_bits_total, sbits, id_marker_0); } /* Detect an HR AMR SID FIRST (part 2) frame by its repeating coded inband data */ -static bool detect_ahs_sid_first_p2(int *n_errors, int *n_bits_total, const ubit_t * ubits) +static int detect_ahs_sid_first_p2(int *n_errors, int *n_bits_total, const sbit_t *sbits) { bool rc; - rc = detect_interleaved_ahs_id_marker(n_errors, n_bits_total, ubits, 0, 114, codec_mode_1_sid, 16); + rc = detect_interleaved_ahs_id_marker(n_errors, n_bits_total, sbits, 0, 114, codec_mode_1_sid, 16); if (rc) - return true; + return 0; - rc = detect_interleaved_ahs_id_marker(n_errors, n_bits_total, ubits, 0, 114, codec_mode_2_sid, 16); + rc = detect_interleaved_ahs_id_marker(n_errors, n_bits_total, sbits, 0, 114, codec_mode_2_sid, 16); if (rc) - return true; + return 1; - rc = detect_interleaved_ahs_id_marker(n_errors, n_bits_total, ubits, 0, 114, codec_mode_3_sid, 16); + rc = detect_interleaved_ahs_id_marker(n_errors, n_bits_total, sbits, 0, 114, codec_mode_3_sid, 16); if (rc) - return true; + return 2; - rc = detect_interleaved_ahs_id_marker(n_errors, n_bits_total, ubits, 0, 114, codec_mode_4_sid, 16); + rc = detect_interleaved_ahs_id_marker(n_errors, n_bits_total, sbits, 0, 114, codec_mode_4_sid, 16); if (rc) - return true; + return 3; - return false; + return -1; } /* Detect an HR AMR ONSET frame by its repeating coded inband data */ -static bool detect_ahs_onset(int *n_errors, int *n_bits_total, const ubit_t * ubits) +static int detect_ahs_onset(int *n_errors, int *n_bits_total, const sbit_t *sbits) { bool rc; - rc = detect_interleaved_ahs_id_marker(n_errors, n_bits_total, ubits, 1, 114, codec_mode_1_sid, 16); + rc = detect_interleaved_ahs_id_marker(n_errors, n_bits_total, sbits, 1, 114, codec_mode_1_sid, 16); if (rc) - return true; + return 0; - rc = detect_interleaved_ahs_id_marker(n_errors, n_bits_total, ubits, 1, 114, codec_mode_2_sid, 16); + rc = detect_interleaved_ahs_id_marker(n_errors, n_bits_total, sbits, 1, 114, codec_mode_2_sid, 16); if (rc) - return true; + return 1; - rc = detect_interleaved_ahs_id_marker(n_errors, n_bits_total, ubits, 1, 114, codec_mode_3_sid, 16); + rc = detect_interleaved_ahs_id_marker(n_errors, n_bits_total, sbits, 1, 114, codec_mode_3_sid, 16); if (rc) - return true; + return 2; - rc = detect_interleaved_ahs_id_marker(n_errors, n_bits_total, ubits, 1, 114, codec_mode_4_sid, 16); + rc = detect_interleaved_ahs_id_marker(n_errors, n_bits_total, sbits, 1, 114, codec_mode_4_sid, 16); if (rc) - return true; + return 3; - return false; + return -1; } /* Detect an HR AMR SID FIRST INHIBIT frame by its identification marker */ -static bool detect_ahs_sid_first_inh(int *n_errors, int *n_bits_total, const ubit_t * ubits) +static bool detect_ahs_sid_first_inh(int *n_errors, int *n_bits_total, const sbit_t *sbits) { - return detect_interleaved_ahs_id_marker(n_errors, n_bits_total, ubits, 33, 212, id_marker_1, 9); + return detect_interleaved_ahs_id_marker(n_errors, n_bits_total, sbits, 33, 212, id_marker_1, 9); } /* Detect an HR AMR SID UPDATE INHIBIT frame by its identification marker */ -static bool detect_ahs_sid_update_inh(int *n_errors, int *n_bits_total, const ubit_t * ubits) +static bool detect_ahs_sid_update_inh(int *n_errors, int *n_bits_total, const sbit_t *sbits) { - return detect_interleaved_ahs_id_marker(n_errors, n_bits_total, ubits, 33, 212, id_marker_0, 9); + return detect_interleaved_ahs_id_marker(n_errors, n_bits_total, sbits, 33, 212, id_marker_0, 9); } /*! Detect FR AMR DTX frame in unmapped, deinterleaved frame bits. - * \param[in] ubits input bits (456 bit). * \param[out] n_errors number of errornous bits. * \param[out] n_bits_total number of checked bits. + * \param[out] mode_id codec mode ID (0..3 or -1). + * \param[in] sbits input soft-bits (456 bit). * \returns dtx frame type. */ -enum gsm0503_amr_dtx_frames gsm0503_detect_afs_dtx_frame(int *n_errors, int *n_bits_total, const ubit_t * ubits) +enum gsm0503_amr_dtx_frames gsm0503_detect_afs_dtx_frame2(int *n_errors, int *n_bits_total, + int *mode_id, const sbit_t *sbits) { - if (detect_afs_sid_first(n_errors, n_bits_total, ubits)) + if (detect_afs_sid_first(n_errors, n_bits_total, sbits)) return AFS_SID_FIRST; - if (detect_afs_sid_update(n_errors, n_bits_total, ubits)) + if (detect_afs_sid_update(n_errors, n_bits_total, sbits)) return AFS_SID_UPDATE; - if (detect_afs_onset(n_errors, n_bits_total, ubits)) + if ((*mode_id = detect_afs_onset(n_errors, n_bits_total, sbits)) != -1) return AFS_ONSET; *n_errors = 0; @@ -290,27 +294,62 @@ return AMR_OTHER; } -/*! Detect HR AMR DTX frame in unmapped, deinterleaved frame bits. +/*! Detect FR AMR DTX frame in unmapped, deinterleaved frame bits. + * DEPRECATED: use gsm0503_detect_afs_dtx_frame2() instead. + * \param[out] n_errors number of errornous bits. + * \param[out] n_bits_total number of checked bits. * \param[in] ubits input bits (456 bit). + * \returns dtx frame type. */ +enum gsm0503_amr_dtx_frames gsm0503_detect_afs_dtx_frame(int *n_errors, int *n_bits_total, + const ubit_t *ubits) +{ + int mode_id; /* unused */ + sbit_t sbits[456]; + + osmo_ubit2sbit(&sbits[0], &ubits[0], sizeof(sbits)); + return gsm0503_detect_afs_dtx_frame2(n_errors, n_bits_total, &mode_id, &sbits[0]); +} + +/*! Detect HR AMR DTX frame in unmapped, deinterleaved frame bits. * \param[out] n_errors number of errornous bits. * \param[out] n_bits_total number of checked bits. + * \param[out] mode_id codec ID (CMI or CMC/CMR). + * \param[out] mode_id codec mode ID (0..3 or -1). + * \param[in] sbits input soft-bits (456 bit). * \returns dtx frame type, */ -enum gsm0503_amr_dtx_frames gsm0503_detect_ahs_dtx_frame(int *n_errors, int *n_bits_total, const ubit_t * ubits) +enum gsm0503_amr_dtx_frames gsm0503_detect_ahs_dtx_frame2(int *n_errors, int *n_bits_total, + int *mode_id, const sbit_t *sbits) { - if (detect_ahs_sid_update(n_errors, n_bits_total, ubits)) + if (detect_ahs_sid_update(n_errors, n_bits_total, sbits)) return AHS_SID_UPDATE; - if (detect_ahs_sid_first_inh(n_errors, n_bits_total, ubits)) + if (detect_ahs_sid_first_inh(n_errors, n_bits_total, sbits)) return AHS_SID_FIRST_INH; - if (detect_ahs_sid_update_inh(n_errors, n_bits_total, ubits)) + if (detect_ahs_sid_update_inh(n_errors, n_bits_total, sbits)) return AHS_SID_UPDATE_INH; - if (detect_ahs_sid_first_p1(n_errors, n_bits_total, ubits)) + if (detect_ahs_sid_first_p1(n_errors, n_bits_total, sbits)) return AHS_SID_FIRST_P1; - if (detect_ahs_sid_first_p2(n_errors, n_bits_total, ubits)) + if ((*mode_id = detect_ahs_sid_first_p2(n_errors, n_bits_total, sbits)) != -1) return AHS_SID_FIRST_P2; - if (detect_ahs_onset(n_errors, n_bits_total, ubits)) + if ((*mode_id = detect_ahs_onset(n_errors, n_bits_total, sbits)) != -1) return AHS_ONSET; *n_errors = 0; *n_bits_total = 0; return AMR_OTHER; } + +/*! Detect HR AMR DTX frame in unmapped, deinterleaved frame bits. + * DEPRECATED: use gsm0503_detect_ahs_dtx_frame2() instead. + * \param[out] n_errors number of errornous bits. + * \param[out] n_bits_total number of checked bits. + * \param[in] ubits input bits (456 bit). + * \returns dtx frame type, */ +enum gsm0503_amr_dtx_frames gsm0503_detect_ahs_dtx_frame(int *n_errors, int *n_bits_total, + const ubit_t *ubits) +{ + int mode_id; /* unused */ + sbit_t sbits[456]; + + osmo_ubit2sbit(&sbits[0], &ubits[0], sizeof(sbits)); + return gsm0503_detect_ahs_dtx_frame2(n_errors, n_bits_total, &mode_id, &sbits[0]); +} diff -Nru libosmocore-1.6.0/src/coding/gsm0503_coding.c libosmocore-1.7.0/src/coding/gsm0503_coding.c --- libosmocore-1.6.0/src/coding/gsm0503_coding.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/coding/gsm0503_coding.c 2022-06-28 15:00:51.000000000 +0000 @@ -17,10 +17,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * 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 @@ -547,10 +543,11 @@ res = osmo_conv_decode(code, input, output); - if (n_bits_total || n_errors) { - coded_len = osmo_conv_encode(code, output, recoded); - OSMO_ASSERT(sizeof(recoded) / sizeof(recoded[0]) >= coded_len); - } + if (!n_bits_total && !n_errors) + return res; + + coded_len = osmo_conv_encode(code, output, recoded); + OSMO_ASSERT(ARRAY_SIZE(recoded) >= coded_len); /* Count bit errors */ if (n_errors) { @@ -2118,6 +2115,26 @@ return 0; } +/* TCH/AFS: parse codec ID (CMI or CMC/CMR) from coded in-band data (16 bit) */ +static uint8_t gsm0503_tch_afs_decode_inband(const sbit_t *cB) +{ + unsigned int id = 0, best = 0; + unsigned int i, j, k; + + for (i = 0; i < 4; i++) { + /* FIXME: why not using remaining (16 - 8) soft-bits here? */ + for (j = 0, k = 0; j < 8; j++) + k += abs(((int)gsm0503_afs_ic_sbit[i][j]) - ((int)cB[j])); + + if (i == 0 || k < best) { + best = k; + id = i; + } + } + + return id; +} + /*! Perform channel decoding of a TCH/AFS channel according TS 05.03 * \param[out] tch_data Codec frame in RTP payload format * \param[in] bursts buffer containing the symbols of 8 bursts @@ -2160,12 +2177,10 @@ { sbit_t iB[912], cB[456], h; ubit_t d[244], p[6], conv[250]; - int i, j, k, best = 0, rv, len, steal = 0, id = 0; - ubit_t cBd[456]; + int i, rv, len, steal = 0, id = -1; *n_errors = 0; *n_bits_total = 0; static ubit_t sid_first_dummy[64] = { 0 }; sbit_t sid_update_enc[256]; - uint8_t dtx_prev; for (i=0; i<8; i++) { gsm0503_tch_burst_unmap(&iB[i * 114], &bursts[i * 116], &h, i >> 2); @@ -2175,6 +2190,12 @@ gsm0503_tch_fr_deinterleave(cB, iB); if (steal > 0) { + /* If not NULL, dtx indicates type of previously decoded TCH/AFS frame. + * It's normally updated by gsm0503_detect_afs_dtx_frame2(), which is not + * reached in case of FACCH. Reset it here to avoid FACCH/F frames being + * misinterpreted as AMR's special DTX frames. */ + if (dtx != NULL) + *dtx = AMR_OTHER; rv = _xcch_decode_cB(tch_data, cB, n_errors, n_bits_total); if (rv) { /* Error decoding FACCH frame */ @@ -2186,16 +2207,20 @@ /* Determine the DTX frame type (SID_UPDATE, ONSET etc...) */ if (dtx) { - osmo_sbit2ubit(cBd, cB, 456); - dtx_prev = *dtx; - *dtx = gsm0503_detect_afs_dtx_frame(n_errors, n_bits_total, cBd); + const enum gsm0503_amr_dtx_frames dtx_prev = *dtx; + + *dtx = gsm0503_detect_afs_dtx_frame2(n_errors, n_bits_total, &id, cB); - if (dtx_prev == AFS_SID_UPDATE && *dtx == AMR_OTHER) { + switch (*dtx) { + case AMR_OTHER: /* NOTE: The AFS_SID_UPDATE frame is splitted into * two half rate frames. If the id marker frame * (AFS_SID_UPDATE) is detected the following frame * contains the actual comfort noised data part of * (AFS_SID_UPDATE_CN). */ + if (dtx_prev != AFS_SID_UPDATE) + break; + /* TODO: parse CMI _and_ CMC/CMR (16 + 16 bit) */ *dtx = AFS_SID_UPDATE_CN; extract_afs_sid_update(sid_update_enc, cB); @@ -2211,35 +2236,28 @@ tch_amr_sid_update_append(conv, 1, (codec_mode_req) ? codec[*ft] - : codec[id]); + : codec[id > 0 ? id : 0]); tch_amr_reassemble(tch_data, conv, 39); len = 5; goto out; - } else if (*dtx == AFS_SID_FIRST) { + case AFS_SID_FIRST: /* TODO: parse CMI or CMC/CMR (16 bit) */ tch_amr_sid_update_append(sid_first_dummy, 0, (codec_mode_req) ? codec[*ft] - : codec[id]); + : codec[id > 0 ? id : 0]); tch_amr_reassemble(tch_data, conv, 39); len = 5; goto out; - } else if (*dtx == AFS_ONSET) { + case AFS_SID_UPDATE: /* TODO: parse CMI _and_ CMC/CMR (16 + 16 bit) */ + case AFS_ONSET: len = 0; goto out; + default: + break; } } - for (i = 0; i < 4; i++) { - for (j = 0, k = 0; j < 8; j++) - k += abs(((int)gsm0503_afs_ic_sbit[i][j]) - ((int)cB[j])); - - if (i == 0 || k < best) { - best = k; - id = i; - } - } - - /* Check if indicated codec fits into range of codecs */ - if (id >= codecs) { + /* Parse codec ID (CMI or CMC/CMR) and check if it fits into range of codecs */ + if ((id = gsm0503_tch_afs_decode_inband(&cB[0])) >= codecs) { /* Codec mode out of range, return id */ return id; } @@ -2390,10 +2408,12 @@ out: /* Change codec request / indication, if frame is valid */ - if (codec_mode_req) - *cmr = id; - else - *ft = id; + if (id != -1) { + if (codec_mode_req) + *cmr = id; + else + *ft = id; + } return len; } @@ -2568,6 +2588,26 @@ return -1; } +/* TCH/AHS: parse codec ID (CMI or CMC/CMR) from coded in-band data (16 bit) */ +static uint8_t gsm0503_tch_ahs_decode_inband(const sbit_t *cB) +{ + unsigned int id = 0, best = 0; + unsigned int i, j, k; + + for (i = 0, k = 0; i < 4; i++) { + /* FIXME: why not using remaining (16 - 4) soft-bits here? */ + for (j = 0, k = 0; j < 4; j++) + k += abs(((int)gsm0503_ahs_ic_sbit[i][j]) - ((int)cB[j])); + + if (i == 0 || k < best) { + best = k; + id = i; + } + } + + return id; +} + /*! Perform channel decoding of a TCH/AFS channel according TS 05.03 * \param[out] tch_data Codec frame in RTP payload format * \param[in] bursts buffer containing the symbols of 8 bursts @@ -2612,10 +2652,8 @@ { sbit_t iB[912], cB[456], h; ubit_t d[244], p[6], conv[135]; - int i, j, k, best = 0, rv, len, steal = 0, id = 0; - ubit_t cBd[456]; + int i, rv, len, steal = 0, id = -1; static ubit_t sid_first_dummy[64] = { 0 }; - uint8_t dtx_prev; /* only unmap the stealing bits */ if (!odd) { @@ -2631,6 +2669,13 @@ /* if we found a stole FACCH, but only at correct alignment */ if (steal > 0) { + /* If not NULL, dtx indicates type of previously decoded TCH/AHS frame. + * It's normally updated by gsm0503_detect_ahs_dtx_frame2(), which is not + * reached in case of FACCH. Reset it here to avoid FACCH/H frames being + * misinterpreted as AMR's special DTX frames. */ + if (dtx != NULL) + *dtx = AMR_OTHER; + for (i = 0; i < 6; i++) { gsm0503_tch_burst_unmap(&iB[i * 114], &bursts[i * 116], NULL, i >> 2); @@ -2661,21 +2706,37 @@ /* Determine the DTX frame type (SID_UPDATE, ONSET etc...) */ if (dtx) { - osmo_sbit2ubit(cBd, cB, 456); - dtx_prev = *dtx; - *dtx = gsm0503_detect_ahs_dtx_frame(n_errors, n_bits_total, cBd); + int n_bits_total_sid; + int n_errors_sid; - if (dtx_prev == AHS_SID_UPDATE && *dtx == AMR_OTHER) { - /* NOTE: The AHS_SID_UPDATE frame is splitted into - * two half rate frames. If the id marker frame - * (AHS_SID_UPDATE) is detected the following frame - * contains the actual comfort noised data part of - * (AHS_SID_UPDATE_CN). */ + *dtx = gsm0503_detect_ahs_dtx_frame2(n_errors, n_bits_total, &id, cB); + /* TODO: detect and handle AHS_SID_UPDATE + AHS_SID_UPDATE_INH */ + + switch (*dtx) { + case AHS_SID_UPDATE: /* TODO: parse CMI _and_ CMC/CMR (16 + 16 bit) */ + /* cB[] contains 16 bits of coded in-band data and 212 bits containing + * the identification marker. We need to unmap/deinterleave 114 odd + * bits from the last two blocks, 114 even bits from the first two + * blocks and combine them together. */ + gsm0503_tch_burst_unmap(&iB[0 * 114], &bursts[2 * 116], NULL, 0); + gsm0503_tch_burst_unmap(&iB[1 * 114], &bursts[3 * 116], NULL, 0); + gsm0503_tch_burst_unmap(&iB[2 * 114], &bursts[0 * 116], NULL, 1); + gsm0503_tch_burst_unmap(&iB[3 * 114], &bursts[1 * 116], NULL, 1); + gsm0503_tch_hr_deinterleave(cB, iB); + + /* cB[] is expected to contain 16 bits of coded in-band data and + * 212 bits containing the coded data (53 bits coded at 1/4 rate). */ *dtx = AHS_SID_UPDATE_CN; osmo_conv_decode_ber(&gsm0503_tch_axs_sid_update, - cB + 16, conv, n_errors, - n_bits_total); + cB + 16, conv, &n_errors_sid, + &n_bits_total_sid); + /* gsm0503_detect_ahs_dtx_frame2() calculates BER for the marker, + * osmo_conv_decode_ber() calculates BER for the coded data. */ + if (n_errors != NULL) + *n_errors += n_errors_sid; + if (n_bits_total != NULL) + *n_bits_total += n_bits_total_sid; rv = osmo_crc16gen_check_bits(&gsm0503_amr_crc14, conv, 35, conv + 35); if (rv != 0) { @@ -2685,38 +2746,30 @@ tch_amr_sid_update_append(conv, 1, (codec_mode_req) ? codec[*ft] - : codec[id]); + : codec[id > 0 ? id : 0]); tch_amr_reassemble(tch_data, conv, 39); len = 5; goto out; - } else if (*dtx == AHS_SID_FIRST_P2) { + case AHS_SID_FIRST_P2: tch_amr_sid_update_append(sid_first_dummy, 0, (codec_mode_req) ? codec[*ft] - : codec[id]); + : codec[id > 0 ? id : 0]); tch_amr_reassemble(tch_data, sid_first_dummy, 39); len = 5; goto out; - } else if (*dtx == AHS_SID_UPDATE || *dtx == AHS_ONSET - || *dtx == AHS_SID_FIRST_INH - || *dtx == AHS_SID_UPDATE_INH - || *dtx == AHS_SID_FIRST_P1) { + case AHS_ONSET: + case AHS_SID_FIRST_INH: /* TODO: parse CMI or CMC/CMR (16 bit) */ + case AHS_SID_UPDATE_INH: /* TODO: parse CMI or CMC/CMR (16 bit) */ + case AHS_SID_FIRST_P1: /* TODO: parse CMI or CMC/CMR (16 bit) */ len = 0; goto out; + default: + break; } } - for (i = 0; i < 4; i++) { - for (j = 0, k = 0; j < 4; j++) - k += abs(((int)gsm0503_ahs_ic_sbit[i][j]) - ((int)cB[j])); - - if (i == 0 || k < best) { - best = k; - id = i; - } - } - - /* Check if indicated codec fits into range of codecs */ - if (id >= codecs) { + /* Parse codec ID (CMI or CMC/CMR) and check if it fits into range of codecs */ + if ((id = gsm0503_tch_ahs_decode_inband(&cB[0])) >= codecs) { /* Codec mode out of range, return id */ return id; } @@ -2851,10 +2904,12 @@ out: /* Change codec request / indication, if frame is valid */ - if (codec_mode_req) - *cmr = id; - else - *ft = id; + if (id != -1) { + if (codec_mode_req) + *cmr = id; + else + *ft = id; + } return len; } diff -Nru libosmocore-1.6.0/src/coding/gsm0503_interleaving.c libosmocore-1.7.0/src/coding/gsm0503_interleaving.c --- libosmocore-1.6.0/src/coding/gsm0503_interleaving.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/coding/gsm0503_interleaving.c 2022-06-28 15:00:51.000000000 +0000 @@ -16,10 +16,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * 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 diff -Nru libosmocore-1.6.0/src/coding/gsm0503_mapping.c libosmocore-1.7.0/src/coding/gsm0503_mapping.c --- libosmocore-1.6.0/src/coding/gsm0503_mapping.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/coding/gsm0503_mapping.c 2022-06-28 15:00:51.000000000 +0000 @@ -15,10 +15,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * 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 diff -Nru libosmocore-1.6.0/src/coding/gsm0503_parity.c libosmocore-1.7.0/src/coding/gsm0503_parity.c --- libosmocore-1.6.0/src/coding/gsm0503_parity.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/coding/gsm0503_parity.c 2022-06-28 15:00:51.000000000 +0000 @@ -15,10 +15,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * 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 diff -Nru libosmocore-1.6.0/src/coding/gsm0503_tables.c libosmocore-1.7.0/src/coding/gsm0503_tables.c --- libosmocore-1.6.0/src/coding/gsm0503_tables.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/coding/gsm0503_tables.c 2022-06-28 15:00:51.000000000 +0000 @@ -15,10 +15,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * 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 diff -Nru libosmocore-1.6.0/src/coding/libosmocoding.map libosmocore-1.7.0/src/coding/libosmocoding.map --- libosmocore-1.6.0/src/coding/libosmocoding.map 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/coding/libosmocoding.map 2022-06-28 15:00:51.000000000 +0000 @@ -123,6 +123,8 @@ gsm0503_amr_dtx_frame_name; gsm0503_detect_afs_dtx_frame; gsm0503_detect_ahs_dtx_frame; +gsm0503_detect_afs_dtx_frame2; +gsm0503_detect_ahs_dtx_frame2; local: *; }; diff -Nru libosmocore-1.6.0/src/coding/Makefile.am libosmocore-1.7.0/src/coding/Makefile.am --- libosmocore-1.6.0/src/coding/Makefile.am 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/coding/Makefile.am 2022-06-28 15:00:51.000000000 +0000 @@ -1,7 +1,7 @@ # This is _NOT_ the library release version, it's an API version. # Please read Chapter 6 "Library interface versions" of the libtool # documentation before making any modification -LIBVERSION=1:2:1 +LIBVERSION=2:0:2 AM_CPPFLAGS = \ -I"$(top_srcdir)/include" \ diff -Nru libosmocore-1.6.0/src/context.c libosmocore-1.7.0/src/context.c --- libosmocore-1.6.0/src/context.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/context.c 2022-06-28 15:00:51.000000000 +0000 @@ -15,11 +15,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * 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 #include diff -Nru libosmocore-1.6.0/src/conv_acc.c libosmocore-1.7.0/src/conv_acc.c --- libosmocore-1.6.0/src/conv_acc.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/conv_acc.c 2022-06-28 15:00:51.000000000 +0000 @@ -16,10 +16,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * 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 @@ -487,10 +483,27 @@ */ static int traceback(struct vdecoder *dec, uint8_t *out, int term, int len) { - int i, sum, max = -1; - unsigned path, state = 0; + int i, j, sum, max = -1; + unsigned path, state = 0, state_scan; - if (term != CONV_TERM_FLUSH) { + if (term == CONV_TERM_TAIL_BITING) { + for (i = 0; i < dec->trellis.num_states; i++) { + state_scan = i; + for (j = len - 1; j >= 0; j--) { + path = dec->paths[j][state_scan] + 1; + state_scan = vstate_lshift(state_scan, dec->k, path); + } + if (state_scan != i) + continue; + sum = dec->trellis.sums[i]; + if (sum > max) { + max = sum; + state = i; + } + } + } + + if ((max < 0) && (term != CONV_TERM_FLUSH)) { for (i = 0; i < dec->trellis.num_states; i++) { sum = dec->trellis.sums[i]; if (sum > max) { diff -Nru libosmocore-1.6.0/src/conv_acc_generic.c libosmocore-1.7.0/src/conv_acc_generic.c --- libosmocore-1.6.0/src/conv_acc_generic.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/conv_acc_generic.c 2022-06-28 15:00:51.000000000 +0000 @@ -17,10 +17,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * 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 diff -Nru libosmocore-1.6.0/src/conv_acc_neon.c libosmocore-1.7.0/src/conv_acc_neon.c --- libosmocore-1.6.0/src/conv_acc_neon.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/conv_acc_neon.c 2022-06-28 15:00:51.000000000 +0000 @@ -18,10 +18,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * 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 diff -Nru libosmocore-1.6.0/src/conv_acc_neon_impl.h libosmocore-1.7.0/src/conv_acc_neon_impl.h --- libosmocore-1.6.0/src/conv_acc_neon_impl.h 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/conv_acc_neon_impl.h 2022-06-28 15:00:51.000000000 +0000 @@ -18,10 +18,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * 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. */ /* Some distributions (notably Alpine Linux) for some strange reason diff -Nru libosmocore-1.6.0/src/conv_acc_sse_avx.c libosmocore-1.7.0/src/conv_acc_sse_avx.c --- libosmocore-1.6.0/src/conv_acc_sse_avx.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/conv_acc_sse_avx.c 2022-06-28 15:00:51.000000000 +0000 @@ -17,10 +17,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * 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 diff -Nru libosmocore-1.6.0/src/conv_acc_sse.c libosmocore-1.7.0/src/conv_acc_sse.c --- libosmocore-1.6.0/src/conv_acc_sse.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/conv_acc_sse.c 2022-06-28 15:00:51.000000000 +0000 @@ -17,10 +17,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * 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 diff -Nru libosmocore-1.6.0/src/conv_acc_sse_impl.h libosmocore-1.7.0/src/conv_acc_sse_impl.h --- libosmocore-1.6.0/src/conv_acc_sse_impl.h 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/conv_acc_sse_impl.h 2022-06-28 15:00:51.000000000 +0000 @@ -18,10 +18,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * 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. */ /* Some distributions (notably Alpine Linux) for some strange reason diff -Nru libosmocore-1.6.0/src/conv.c libosmocore-1.7.0/src/conv.c --- libosmocore-1.6.0/src/conv.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/conv.c 2022-06-28 15:00:51.000000000 +0000 @@ -16,10 +16,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * 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. */ /*! \addtogroup conv @@ -67,7 +63,7 @@ /* Count punctured bits */ if (code->puncture) { - for (pbits=0; code->puncture[pbits] >= 0; pbits++); + for (pbits = 0; code->puncture[pbits] >= 0; pbits++) {} out_len -= pbits; } @@ -85,7 +81,7 @@ */ void osmo_conv_encode_init(struct osmo_conv_encoder *encoder, - const struct osmo_conv_code *code) + const struct osmo_conv_code *code) { memset(encoder, 0x00, sizeof(struct osmo_conv_encoder)); OSMO_ASSERT(code != NULL); @@ -94,12 +90,12 @@ void osmo_conv_encode_load_state(struct osmo_conv_encoder *encoder, - const ubit_t *input) + const ubit_t *input) { int i; uint8_t state = 0; - for (i=0; i<(encoder->code->K-1); i++) + for (i = 0; i < (encoder->code->K - 1); i++) state = (state << 1) | input[i]; encoder->state = state; @@ -107,15 +103,14 @@ static inline int _conv_encode_do_output(struct osmo_conv_encoder *encoder, - uint8_t out, ubit_t *output) + uint8_t out, ubit_t *output) { const struct osmo_conv_code *code = encoder->code; int o_idx = 0; int j; if (code->puncture) { - for (j=0; jN; j++) - { + for (j = 0; j < code->N; j++) { int bit_no = code->N - j - 1; int r_idx = encoder->i_idx * code->N + j; @@ -125,8 +120,7 @@ output[o_idx++] = (out >> bit_no) & 1; } } else { - for (j=0; jN; j++) - { + for (j = 0; j < code->N; j++) { int bit_no = code->N - j - 1; output[o_idx++] = (out >> bit_no) & 1; } @@ -137,7 +131,7 @@ int osmo_conv_encode_raw(struct osmo_conv_encoder *encoder, - const ubit_t *input, ubit_t *output, int n) + const ubit_t *input, ubit_t *output, int n) { const struct osmo_conv_code *code = encoder->code; uint8_t state; @@ -147,11 +141,11 @@ o_idx = 0; state = encoder->state; - for (i=0; inext_output[state][bit]; + out = code->next_output[state][bit]; state = code->next_state[state][bit]; o_idx += _conv_encode_do_output(encoder, out, &output[o_idx]); @@ -165,8 +159,7 @@ } int -osmo_conv_encode_flush(struct osmo_conv_encoder *encoder, - ubit_t *output) +osmo_conv_encode_flush(struct osmo_conv_encoder *encoder, ubit_t *output) { const struct osmo_conv_code *code = encoder->code; uint8_t state; @@ -179,14 +172,14 @@ o_idx = 0; state = encoder->state; - for (i=0; inext_term_output) { - out = code->next_term_output[state]; + out = code->next_term_output[state]; state = code->next_term_state[state]; } else { - out = code->next_output[state][0]; + out = code->next_output[state][0]; state = code->next_state[state][0]; } @@ -212,7 +205,7 @@ */ int osmo_conv_encode(const struct osmo_conv_code *code, - const ubit_t *input, ubit_t *output) + const ubit_t *input, ubit_t *output) { struct osmo_conv_encoder encoder; int l; @@ -242,17 +235,18 @@ /* Forward declaration for accerlated decoding with certain codes */ int osmo_conv_decode_acc(const struct osmo_conv_code *code, - const sbit_t *input, ubit_t *output); + const sbit_t *input, ubit_t *output); void osmo_conv_decode_init(struct osmo_conv_decoder *decoder, - const struct osmo_conv_code *code, int len, int start_state) + const struct osmo_conv_code *code, int len, + int start_state) { int n_states; /* Init */ if (len <= 0) - len = code->len; + len = code->len; n_states = 1 << (code->K - 1); @@ -263,7 +257,7 @@ decoder->len = len; /* Allocate arrays */ - decoder->ae = malloc(sizeof(unsigned int) * n_states); + decoder->ae = malloc(sizeof(unsigned int) * n_states); decoder->ae_next = malloc(sizeof(unsigned int) * n_states); decoder->state_history = malloc(sizeof(uint8_t) * n_states * (len + decoder->code->K - 1)); @@ -287,7 +281,7 @@ memset(decoder->ae, 0x00, sizeof(unsigned int) * decoder->n_states); } else { /* Fixed start state */ - for (i=0; in_states; i++) { + for (i = 0; i < decoder->n_states; i++) { decoder->ae[i] = (i == start_state) ? 0 : MAX_AE; } } @@ -304,12 +298,12 @@ decoder->p_idx = 0; /* Initial error normalize (remove constant) */ - for (i=0; in_states; i++) { + for (i = 0; i < decoder->n_states; i++) { if (decoder->ae[i] < min_ae) min_ae = decoder->ae[i]; } - for (i=0; in_states; i++) + for (i = 0; i < decoder->n_states; i++) decoder->ae[i] -= min_ae; } @@ -325,7 +319,7 @@ int osmo_conv_decode_scan(struct osmo_conv_decoder *decoder, - const sbit_t *input, int n) + const sbit_t *input, int n) { const struct osmo_conv_code *code = decoder->code; @@ -342,27 +336,25 @@ /* Prepare */ n_states = decoder->n_states; - ae = decoder->ae; + ae = decoder->ae; ae_next = decoder->ae_next; state_history = &decoder->state_history[n_states * decoder->o_idx]; - in_sym = alloca(sizeof(sbit_t) * code->N); + in_sym = alloca(sizeof(sbit_t) * code->N); i_idx = 0; p_idx = decoder->p_idx; /* Scan the treillis */ - for (i=0; ipuncture) { /* Hard way ... */ - for (j=0; jN; j++) { + for (j = 0; j < code->N; j++) { int idx = ((decoder->o_idx + i) * code->N) + j; if (idx == code->puncture[p_idx]) { in_sym[j] = 0; /* Undefined */ @@ -379,23 +371,21 @@ } /* Scan all state */ - for (s=0; snext_output[s][b]; + uint8_t out = code->next_output[s][b]; uint8_t state = code->next_state[s][b]; /* New error for this path */ nae = ae[s]; /* start from last error */ m = 1 << (code->N - 1); /* mask for 'out' bit selection */ - for (j=0; jN; j++) { + for (j = 0; j < code->N; j++) { int is = (int)in_sym[j]; if (is) { ov = (out & m) ? -127 : 127; /* sbit_t value for it */ @@ -425,8 +415,7 @@ } int -osmo_conv_decode_flush(struct osmo_conv_decoder *decoder, - const sbit_t *input) +osmo_conv_decode_flush(struct osmo_conv_decoder *decoder, const sbit_t *input) { const struct osmo_conv_code *code = decoder->code; @@ -443,27 +432,25 @@ /* Prepare */ n_states = decoder->n_states; - ae = decoder->ae; + ae = decoder->ae; ae_next = decoder->ae_next; state_history = &decoder->state_history[n_states * decoder->o_idx]; - in_sym = alloca(sizeof(sbit_t) * code->N); + in_sym = alloca(sizeof(sbit_t) * code->N); i_idx = 0; p_idx = decoder->p_idx; /* Scan the treillis */ - for (i=0; iK-1; i++) - { + for (i = 0; i < code->K - 1; i++) { /* Reset next accumulated error */ - for (s=0; spuncture) { /* Hard way ... */ - for (j=0; jN; j++) { + for (j = 0; j < code->N; j++) { int idx = ((decoder->o_idx + i) * code->N) + j; if (idx == code->puncture[p_idx]) { in_sym[j] = 0; /* Undefined */ @@ -480,8 +467,7 @@ } /* Scan all state */ - for (s=0; snext_term_output) { - out = code->next_term_output[s]; + out = code->next_term_output[s]; state = code->next_term_state[s]; } else { - out = code->next_output[s][0]; + out = code->next_output[s][0]; state = code->next_state[s][0]; } @@ -501,7 +487,7 @@ nae = ae[s]; /* start from last error */ m = 1 << (code->N - 1); /* mask for 'out' bit selection */ - for (j=0; jN; j++) { + for (j = 0; j < code->N; j++) { int is = (int)in_sym[j]; if (is) { ov = (out & m) ? -127 : 127; /* sbit_t value for it */ @@ -530,38 +516,86 @@ } int -osmo_conv_decode_get_output(struct osmo_conv_decoder *decoder, - ubit_t *output, int has_flush, int end_state) +osmo_conv_decode_get_best_end_state(struct osmo_conv_decoder *decoder) { const struct osmo_conv_code *code = decoder->code; - int min_ae; - uint8_t min_state, cur_state; - int i, s, n; + int min_ae, min_state; + int s; - uint8_t *sh_ptr; + /* If flushed, we _know_ the end state */ + if (code->term == CONV_TERM_FLUSH) + return 0; - /* End state ? */ - if (end_state < 0) { - /* Find state with least error */ - min_ae = MAX_AE; - min_state = 0xff; + /* Search init */ + min_state = -1; + min_ae = MAX_AE; - for (s=0; sn_states; s++) - { + /* If tail biting, we search for the minimum path metric that + * gives a circular traceback (i.e. start_state == end_state */ + if (code->term == CONV_TERM_TAIL_BITING) { + int t, n, i; + uint8_t *sh_ptr; + + for (s = 0; s < decoder->n_states; s++) { + /* Check if that state traces back to itself */ + n = decoder->o_idx; + sh_ptr = &decoder->state_history[decoder->n_states * (n-1)]; + t = s; + + for (i = n - 1; i >= 0; i--) { + t = sh_ptr[t]; + sh_ptr -= decoder->n_states; + } + + if (s != t) + continue; + + /* If it does, consider it */ if (decoder->ae[s] < min_ae) { min_ae = decoder->ae[s]; min_state = s; } } - if (min_state == 0xff) - return -1; - } else { - min_state = (uint8_t) end_state; - min_ae = decoder->ae[end_state]; + if (min_ae < MAX_AE) + return min_state; + } + + /* Finally, just the lowest path metric */ + for (s = 0; s < decoder->n_states; s++) { + /* Is it smaller ? */ + if (decoder->ae[s] < min_ae) { + min_ae = decoder->ae[s]; + min_state = s; + } } + return min_state; +} + +int +osmo_conv_decode_get_output(struct osmo_conv_decoder *decoder, + ubit_t *output, int has_flush, int end_state) +{ + const struct osmo_conv_code *code = decoder->code; + + int min_ae; + uint8_t min_state, cur_state; + int i, n; + + uint8_t *sh_ptr; + + /* End state ? */ + if (end_state < 0) + end_state = osmo_conv_decode_get_best_end_state(decoder); + + if (end_state < 0) + return -1; + + min_state = (uint8_t) end_state; + min_ae = decoder->ae[end_state]; + /* Traceback */ cur_state = min_state; @@ -571,16 +605,15 @@ /* No output for the K-1 termination input bits */ if (has_flush) { - for (i=0; iK-1; i++) { + for (i = 0; i < code->K - 1; i++) { cur_state = sh_ptr[cur_state]; sh_ptr -= decoder->n_states; } n -= code->K - 1; } - /* Generate output backward */ - for (i=n-1; i>=0; i--) - { + /* Generate output backward */ + for (i = n - 1; i >= 0; i--) { min_state = cur_state; cur_state = sh_ptr[cur_state]; @@ -602,12 +635,12 @@ * * This is an all-in-one function, taking care of * \ref osmo_conv_decode_init, \ref osmo_conv_decode_scan, - * \ref osmo_conv_decode_flush, \ref osmo_conv_decode_get_output and - * \ref osmo_conv_decode_deinit. + * \ref osmo_conv_decode_flush, \ref osmo_conv_decode_get_best_end_state, + * \ref osmo_conv_decode_get_output and \ref osmo_conv_decode_deinit. */ int osmo_conv_decode(const struct osmo_conv_code *code, - const sbit_t *input, ubit_t *output) + const sbit_t *input, ubit_t *output) { struct osmo_conv_decoder decoder; int rv, l; @@ -630,7 +663,7 @@ rv = osmo_conv_decode_get_output(&decoder, output, code->term == CONV_TERM_FLUSH, /* has_flush */ - code->term == CONV_TERM_FLUSH ? 0 : -1 /* end_state */ + -1 /* end_state */ ); osmo_conv_decode_deinit(&decoder); diff -Nru libosmocore-1.6.0/src/counter.c libosmocore-1.7.0/src/counter.c --- libosmocore-1.6.0/src/counter.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/counter.c 2022-06-28 15:00:51.000000000 +0000 @@ -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 diff -Nru libosmocore-1.6.0/src/crcXXgen.c.tpl libosmocore-1.7.0/src/crcXXgen.c.tpl --- libosmocore-1.6.0/src/crcXXgen.c.tpl 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/crcXXgen.c.tpl 2022-06-28 15:00:51.000000000 +0000 @@ -16,10 +16,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * 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. */ /*! \addtogroup crc diff -Nru libosmocore-1.6.0/src/ctrl/control_cmd.c libosmocore-1.7.0/src/ctrl/control_cmd.c --- libosmocore-1.6.0/src/ctrl/control_cmd.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/ctrl/control_cmd.c 2022-06-28 15:00:51.000000000 +0000 @@ -20,10 +20,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 diff -Nru libosmocore-1.6.0/src/ctrl/control_if.c libosmocore-1.7.0/src/ctrl/control_if.c --- libosmocore-1.6.0/src/ctrl/control_if.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/ctrl/control_if.c 2022-06-28 15:00:51.000000000 +0000 @@ -20,10 +20,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 "config.h" diff -Nru libosmocore-1.6.0/src/ctrl/control_vty.c libosmocore-1.7.0/src/ctrl/control_vty.c --- libosmocore-1.6.0/src/ctrl/control_vty.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/ctrl/control_vty.c 2022-06-28 15:00:51.000000000 +0000 @@ -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 diff -Nru libosmocore-1.6.0/src/ctrl/Makefile.am libosmocore-1.7.0/src/ctrl/Makefile.am --- libosmocore-1.6.0/src/ctrl/Makefile.am 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/ctrl/Makefile.am 2022-06-28 15:00:51.000000000 +0000 @@ -1,7 +1,7 @@ # This is _NOT_ the library release version, it's an API version. # Please read chapter "Library interface versions" of the libtool documentation # before making any modifications: https://www.gnu.org/software/libtool/manual/html_node/Versioning.html -LIBVERSION=6:0:6 +LIBVERSION=7:0:7 AM_CFLAGS = -Wall $(all_includes) -I$(top_srcdir)/include -I$(top_builddir)/include $(TALLOC_CFLAGS) diff -Nru libosmocore-1.6.0/src/exec.c libosmocore-1.7.0/src/exec.c --- libosmocore-1.6.0/src/exec.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/exec.c 2022-06-28 15:00:51.000000000 +0000 @@ -14,10 +14,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 "config.h" diff -Nru libosmocore-1.6.0/src/fsm.c libosmocore-1.7.0/src/fsm.c --- libosmocore-1.6.0/src/fsm.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/fsm.c 2022-06-28 15:00:51.000000000 +0000 @@ -14,11 +14,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * 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 diff -Nru libosmocore-1.6.0/src/gb/bssgp_bvc_fsm.c libosmocore-1.7.0/src/gb/bssgp_bvc_fsm.c --- libosmocore-1.6.0/src/gb/bssgp_bvc_fsm.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/gb/bssgp_bvc_fsm.c 2022-06-28 15:00:51.000000000 +0000 @@ -375,6 +375,7 @@ struct bvc_fsm_priv *bfp = fi->priv; const struct tlv_parsed *tp = NULL; struct msgb *rx = NULL, *tx; + uint8_t cause; switch (event) { case BSSGP_BVCFSM_E_RX_RESET: @@ -385,6 +386,7 @@ /* fall-through */ case BSSGP_BVCFSM_E_RX_RESET_ACK: rx = data; + cause = bfp->last_reset_cause; tp = (const struct tlv_parsed *) msgb_bcid(rx); if (bfp->bvci == 0) update_negotiated_features(fi, tp); @@ -398,6 +400,8 @@ osmo_fsm_inst_state_chg(fi, BSSGP_BVCFSM_S_BLOCKED, T1_SECS, T1); } else osmo_fsm_inst_state_chg(fi, BSSGP_BVCFSM_S_UNBLOCKED, 0, 0); + if (bfp->ops && bfp->ops->reset_ack_notification) + bfp->ops->reset_ack_notification(bfp->nsei, bfp->bvci, &bfp->ra_id, bfp->cell_id, cause, bfp->ops_priv); break; } } @@ -415,8 +419,8 @@ rx = data; tp = (const struct tlv_parsed *) msgb_bcid(rx); /* If BVC-UNBLOCK-ACK PDU is received by an BSS for the signalling BVC, the PDU is ignored. */ - LOGPFSML(fi, LOGL_ERROR, "Rx BVC-UNBLOCK-ACK on BVCI=0 is illegal\n"); if (bfp->bvci == 0) { + LOGPFSML(fi, LOGL_ERROR, "Rx BVC-UNBLOCK-ACK on BVCI=0 is illegal\n"); if (!bfp->role_sgsn) break; _tx_status(fi, BSSGP_CAUSE_SEM_INCORR_PDU, rx); diff -Nru libosmocore-1.6.0/src/gb/Makefile.am libosmocore-1.7.0/src/gb/Makefile.am --- libosmocore-1.6.0/src/gb/Makefile.am 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/gb/Makefile.am 2022-06-28 15:00:51.000000000 +0000 @@ -1,7 +1,7 @@ # This is _NOT_ the library release version, it's an API version. # Please read chapter "Library interface versions" of the libtool documentation # before making any modifications: https://www.gnu.org/software/libtool/manual/html_node/Versioning.html -LIBVERSION=13:0:1 +LIBVERSION=14:0:0 AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include AM_CFLAGS = -Wall ${GCC_FVISIBILITY_HIDDEN} -fno-strict-aliasing \ diff -Nru libosmocore-1.6.0/src/gsm/a5.c libosmocore-1.7.0/src/gsm/a5.c --- libosmocore-1.6.0/src/gsm/a5.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/gsm/a5.c 2022-06-28 15:00:51.000000000 +0000 @@ -14,10 +14,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * 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. */ /*! \addtogroup a5 diff -Nru libosmocore-1.6.0/src/gsm/apn.c libosmocore-1.7.0/src/gsm/apn.c --- libosmocore-1.6.0/src/gsm/apn.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/gsm/apn.c 2022-06-28 15:00:51.000000000 +0000 @@ -24,8 +24,8 @@ #include #include #include -#include +#include #include #define APN_OI_GPRS_FMT "mnc%03u.mcc%03u.gprs" diff -Nru libosmocore-1.6.0/src/gsm/auth_comp128v1.c libosmocore-1.7.0/src/gsm/auth_comp128v1.c --- libosmocore-1.6.0/src/gsm/auth_comp128v1.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/gsm/auth_comp128v1.c 2022-06-28 15:00:51.000000000 +0000 @@ -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 diff -Nru libosmocore-1.6.0/src/gsm/auth_comp128v23.c libosmocore-1.7.0/src/gsm/auth_comp128v23.c --- libosmocore-1.6.0/src/gsm/auth_comp128v23.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/gsm/auth_comp128v23.c 2022-06-28 15:00:51.000000000 +0000 @@ -19,10 +19,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 diff -Nru libosmocore-1.6.0/src/gsm/auth_core.c libosmocore-1.7.0/src/gsm/auth_core.c --- libosmocore-1.6.0/src/gsm/auth_core.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/gsm/auth_core.c 2022-06-28 15:00:51.000000000 +0000 @@ -14,10 +14,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 "config.h" diff -Nru libosmocore-1.6.0/src/gsm/auth_milenage.c libosmocore-1.7.0/src/gsm/auth_milenage.c --- libosmocore-1.6.0/src/gsm/auth_milenage.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/gsm/auth_milenage.c 2022-06-28 15:00:51.000000000 +0000 @@ -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 diff -Nru libosmocore-1.6.0/src/gsm/auth_xor.c libosmocore-1.7.0/src/gsm/auth_xor.c --- libosmocore-1.6.0/src/gsm/auth_xor.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/gsm/auth_xor.c 2022-06-28 15:00:51.000000000 +0000 @@ -20,10 +20,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 diff -Nru libosmocore-1.6.0/src/gsm/bsslap.c libosmocore-1.7.0/src/gsm/bsslap.c --- libosmocore-1.6.0/src/gsm/bsslap.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/gsm/bsslap.c 2022-06-28 15:00:51.000000000 +0000 @@ -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 diff -Nru libosmocore-1.6.0/src/gsm/bssmap_le.c libosmocore-1.7.0/src/gsm/bssmap_le.c --- libosmocore-1.6.0/src/gsm/bssmap_le.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/gsm/bssmap_le.c 2022-06-28 15:00:51.000000000 +0000 @@ -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 @@ -265,6 +261,57 @@ } } +/*! Encode full BSSMAP-LE LCS Priority IE, including IEI tag and length. + * \param[inout] msg Message buffer to append to. + * \param[in] priority Value to enconde. + * \returns length of bytes written to the msgb. + */ +static uint8_t osmo_bssmap_le_ie_enc_lcs_priority(struct msgb *msg, uint8_t priority) +{ + OSMO_ASSERT(msg); + msgb_put_u8(msg, BSSMAP_LE_IEI_LCS_PRIORITY); + /* length */ + msgb_put_u8(msg, 1); + msgb_put_u8(msg, priority); + return 3; +} + +static int osmo_bssmap_le_ie_dec_lcs_priority(uint8_t *priority, + enum bssmap_le_msgt msgt, enum bssmap_le_iei iei, + struct osmo_bssmap_le_err **err, void *err_ctx, + const uint8_t *elem, uint8_t len) +{ + if (!elem || len != 1) + DEC_ERR(-EINVAL, msgt, iei, LCS_CAUSE_UNSPECIFIED, "unexpected length"); + + *priority = elem[0]; + return 0; +} + +/*! Encode full BSSMAP-LE LCS QoS IE, including IEI tag and length. + * \param[inout] msg Message buffer to append to. + * \param[in] priority Value to enconde. + * \returns length of bytes written to the msgb. + */ +static uint8_t osmo_bssmap_le_ie_enc_lcs_qos(struct msgb *msg, const struct osmo_bssmap_le_lcs_qos *qos) +{ + OSMO_ASSERT(msg); + msgb_tlv_put(msg, BSSMAP_LE_IEI_LCS_QoS, sizeof(*qos), (const uint8_t *)qos); + return 2 + sizeof(*qos); +} + +static int osmo_bssmap_le_ie_dec_lcs_qos(struct osmo_bssmap_le_lcs_qos *qos, + enum bssmap_le_msgt msgt, enum bssmap_le_iei iei, + struct osmo_bssmap_le_err **err, void *err_ctx, + const uint8_t *elem, uint8_t len) +{ + if (!elem || len != sizeof(*qos)) + DEC_ERR(-EINVAL, msgt, iei, LCS_CAUSE_UNSPECIFIED, "unexpected length"); + + memcpy(qos, elem, len); + return 0; +} + /*! Encode the value part of 3GPP TS 49.031 10.13 LCS Cause, without IEI and len. * Identically used in 3GPP TS 48.008 3.2.2.66. Usage example: * @@ -476,6 +523,12 @@ if (params->lcs_client_type_present) osmo_bssmap_le_ie_enc_lcs_client_type(msg, params->lcs_client_type); + if (params->more_items && params->lcs_priority_present) + osmo_bssmap_le_ie_enc_lcs_priority(msg, params->lcs_priority); + + if (params->more_items && params->lcs_qos_present) + osmo_bssmap_le_ie_enc_lcs_qos(msg, ¶ms->lcs_qos); + if (params->apdu_present) { int rc = osmo_bssmap_le_ie_enc_apdu(msg, ¶ms->apdu); if (rc < 0) @@ -513,11 +566,18 @@ ¶ms->cell_id); DEC_IE_OPTIONAL_FLAG(msgt, BSSMAP_LE_IEI_LCS_CLIENT_TYPE, osmo_bssmap_le_ie_dec_lcs_client_type, ¶ms->lcs_client_type, params->lcs_client_type_present); + DEC_IE_OPTIONAL_FLAG(msgt, BSSMAP_LE_IEI_LCS_PRIORITY, osmo_bssmap_le_ie_dec_lcs_priority, + ¶ms->lcs_priority, params->lcs_priority_present); + DEC_IE_OPTIONAL_FLAG(msgt, BSSMAP_LE_IEI_LCS_QoS, osmo_bssmap_le_ie_dec_lcs_qos, + ¶ms->lcs_qos, params->lcs_qos_present); DEC_IE_OPTIONAL_FLAG(msgt, BSSMAP_LE_IEI_APDU, osmo_bssmap_le_ie_dec_apdu, ¶ms->apdu, params->apdu_present); DEC_IE_OPTIONAL(msgt, BSSMAP_LE_IEI_IMSI, osmo_bssmap_le_ie_dec_imsi, ¶ms->imsi); DEC_IE_OPTIONAL(msgt, BSSMAP_LE_IEI_IMEI, osmo_bssmap_le_ie_dec_imei, ¶ms->imei); + if (params->lcs_priority_present || params->lcs_qos_present) + params->more_items = true; + return 0; } diff -Nru libosmocore-1.6.0/src/gsm/bts_features.c libosmocore-1.7.0/src/gsm/bts_features.c --- libosmocore-1.6.0/src/gsm/bts_features.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/gsm/bts_features.c 2022-06-28 15:00:51.000000000 +0000 @@ -14,11 +14,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * 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 diff -Nru libosmocore-1.6.0/src/gsm/cbsp.c libosmocore-1.7.0/src/gsm/cbsp.c --- libosmocore-1.6.0/src/gsm/cbsp.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/gsm/cbsp.c 2022-06-28 15:00:51.000000000 +0000 @@ -15,10 +15,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * 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 "config.h" @@ -1481,4 +1477,25 @@ return rc; } +/*! value_string[] for enum osmo_cbsp_cause. */ +const struct value_string osmo_cbsp_cause_names[] = { + { OSMO_CBSP_CAUSE_PARAM_NOT_RECOGNISED, "Parameter-not-recognised" }, + { OSMO_CBSP_CAUSE_PARAM_VALUE_INVALID, "Parameter-value-invalid" }, + { OSMO_CBSP_CAUSE_MSG_REF_NOT_IDENTIFIED, "Message-reference-not-identified" }, + { OSMO_CBSP_CAUSE_CELL_ID_NOT_VALID, "Cell-identity-not-valid" }, + { OSMO_CBSP_CAUSE_UNRECOGNISED_MESSAGE, "Unrecognised-message" }, + { OSMO_CBSP_CAUSE_MISSING_MANDATORY_ELEMENT, "Missing-mandatory-element" }, + { OSMO_CBSP_CAUSE_BSC_CAPACITY_EXCEEDED, "BSC-capacity-exceeded" }, + { OSMO_CBSP_CAUSE_CELL_MEMORY_EXCEEDED, "Cell-memory-exceeded" }, + { OSMO_CBSP_CAUSE_BSC_MEMORY_EXCEEDED, "BSC-memory-exceeded" }, + { OSMO_CBSP_CAUSE_CELL_BROADCAST_NOT_SUPPORTED, "Cell-broadcast-not-supported" }, + { OSMO_CBSP_CAUSE_CELL_BROADCAST_NOT_OPERATIONAL, "Cell-broadcast-not-operational" }, + { OSMO_CBSP_CAUSE_INCOMPATIBLE_DRX_PARAM, "Incompatible-DRX-parameter:"}, + { OSMO_CBSP_CAUSE_EXT_CHAN_NOT_SUPPORTED, "Extended-channel-not-supported"}, + { OSMO_CBSP_CAUSE_MSG_REF_ALREADY_USED, "Message-reference-already-used"}, + { OSMO_CBSP_CAUSE_UNSPECIFIED_ERROR, "Unspecified-error"}, + { OSMO_CBSP_CAUSE_LAI_OR_LAC_NOT_VALID, "LAI-or-LAC-not-valid"}, + { 0, NULL } +}; + #endif /* HAVE_SYS_SOCKET_H */ diff -Nru libosmocore-1.6.0/src/gsm/comp128.c libosmocore-1.7.0/src/gsm/comp128.c --- libosmocore-1.6.0/src/gsm/comp128.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/gsm/comp128.c 2022-06-28 15:00:51.000000000 +0000 @@ -58,10 +58,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 diff -Nru libosmocore-1.6.0/src/gsm/comp128v23.c libosmocore-1.7.0/src/gsm/comp128v23.c --- libosmocore-1.6.0/src/gsm/comp128v23.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/gsm/comp128v23.c 2022-06-28 15:00:51.000000000 +0000 @@ -23,10 +23,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 diff -Nru libosmocore-1.6.0/src/gsm/gea.c libosmocore-1.7.0/src/gsm/gea.c --- libosmocore-1.6.0/src/gsm/gea.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/gsm/gea.c 2022-06-28 15:00:51.000000000 +0000 @@ -12,10 +12,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * 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 diff -Nru libosmocore-1.6.0/src/gsm/gprs_cipher_core.c libosmocore-1.7.0/src/gsm/gprs_cipher_core.c --- libosmocore-1.6.0/src/gsm/gprs_cipher_core.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/gsm/gprs_cipher_core.c 2022-06-28 15:00:51.000000000 +0000 @@ -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 "config.h" diff -Nru libosmocore-1.6.0/src/gsm/gprs_gea.c libosmocore-1.7.0/src/gsm/gprs_gea.c --- libosmocore-1.6.0/src/gsm/gprs_gea.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/gsm/gprs_gea.c 2022-06-28 15:00:51.000000000 +0000 @@ -16,10 +16,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * 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 diff -Nru libosmocore-1.6.0/src/gsm/gsm0341.c libosmocore-1.7.0/src/gsm/gsm0341.c --- libosmocore-1.6.0/src/gsm/gsm0341.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/gsm/gsm0341.c 2022-06-28 15:00:51.000000000 +0000 @@ -14,10 +14,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. - * */ diff -Nru libosmocore-1.6.0/src/gsm/gsm0480.c libosmocore-1.7.0/src/gsm/gsm0480.c --- libosmocore-1.6.0/src/gsm/gsm0480.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/gsm/gsm0480.c 2022-06-28 15:00:51.000000000 +0000 @@ -19,10 +19,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 diff -Nru libosmocore-1.6.0/src/gsm/gsm0808.c libosmocore-1.7.0/src/gsm/gsm0808.c --- libosmocore-1.6.0/src/gsm/gsm0808.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/gsm/gsm0808.c 2022-06-28 15:00:51.000000000 +0000 @@ -15,10 +15,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 @@ -1049,6 +1045,12 @@ if (params->aoip_transport_layer) gsm0808_enc_aoip_trasp_addr(msg, params->aoip_transport_layer); + /* AoIP: add Codec List (BSS Supported) 3.2.2.103. + * (codec_list_bss_supported was added to struct gsm0808_handover_request_ack later than speech_codec_chosen + * below, but it needs to come before it in the message coding). */ + if (params->more_items && params->codec_list_bss_supported.len) + gsm0808_enc_speech_codec_list(msg, ¶ms->codec_list_bss_supported); + /* AoIP: Speech Codec (Chosen) 3.2.2.104 */ if (params->speech_codec_chosen_present) gsm0808_enc_speech_codec(msg, ¶ms->speech_codec_chosen); @@ -1523,6 +1525,7 @@ [GSM0808_IE_LOCATION_ESTIMATE] = { TLV_TYPE_TLV }, [GSM0808_IE_POSITIONING_DATA] = { TLV_TYPE_TLV }, [GSM0808_IE_LCS_CAUSE] = { TLV_TYPE_TLV }, + [GSM0808_IE_LCS_CLIENT_TYPE] = { TLV_TYPE_TLV }, [GSM0808_IE_APDU] = { TLV_TYPE_TLV }, [GSM0808_IE_NETWORK_ELEMENT_IDENTITY] = { TLV_TYPE_TLV }, [GSM0808_IE_GPS_ASSISTANCE_DATA] = { TLV_TYPE_TLV }, @@ -1539,6 +1542,7 @@ [GSM0800_IE_INTER_SYSTEM_INFO] = { TLV_TYPE_TLV }, [GSM0808_IE_SNA_ACCESS_INFO] = { TLV_TYPE_TLV }, [GSM0808_IE_VSTK_RAND_INFO] = { TLV_TYPE_TLV }, + [GSM0808_IE_VSTK_INFO] = { TLV_TYPE_TLV }, [GSM0808_IE_PAGING_INFO] = { TLV_TYPE_TV }, [GSM0808_IE_IMEI] = { TLV_TYPE_TLV }, [GSM0808_IE_VELOCITY_ESTIMATE] = { TLV_TYPE_TLV }, @@ -1581,6 +1585,11 @@ [GSM0808_IE_CN_TO_MS_TRANSP_INFO] = { TLV_TYPE_TLV }, [GSM0808_IE_SELECTED_PLMN_ID] = { TLV_TYPE_FIXED, 3 }, [GSM0808_IE_LAST_USED_EUTRAN_PLMN_ID] = { TLV_TYPE_FIXED, 3 }, + [GSM0808_IE_OLD_LAI] = { TLV_TYPE_FIXED, 5 }, + [GSM0808_IE_ATTACH_INDICATOR] = { TLV_TYPE_T }, + [GSM0808_IE_SELECTED_OPERATOR] = { TLV_TYPE_FIXED, 3 }, + [GSM0808_IE_PS_REGISTERED_OPERATOR] = { TLV_TYPE_FIXED, 3 }, + [GSM0808_IE_CS_REGISTERED_OPERATOR] = { TLV_TYPE_FIXED, 3 }, /* Osmocom extensions */ [GSM0808_IE_OSMO_OSMUX_SUPPORT] = { TLV_TYPE_T }, diff -Nru libosmocore-1.6.0/src/gsm/gsm0808_utils.c libosmocore-1.7.0/src/gsm/gsm0808_utils.c --- libosmocore-1.6.0/src/gsm/gsm0808_utils.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/gsm/gsm0808_utils.c 2022-06-28 15:00:51.000000000 +0000 @@ -831,6 +831,10 @@ dst->lai.lac = u->lac; return; + case CELL_IDENT_SAI: + dst->lai = u->sai.lai; + return; + case CELL_IDENT_NO_CELL: case CELL_IDENT_BSS: case CELL_IDENT_UTRAN_PLMN_LAC_RNC: @@ -858,6 +862,8 @@ case CELL_IDENT_BSS: case CELL_IDENT_NO_CELL: return 0; + case CELL_IDENT_SAI: + return 7; case CELL_IDENT_WHOLE_GLOBAL_PS: return 8; default: @@ -904,6 +910,12 @@ case CELL_IDENT_NO_CELL: /* Does not have any list items */ break; + case CELL_IDENT_SAI: + if (len < 7) + return -EINVAL; + decode_lai(buf, &out->sai.lai); + out->sai.sac = osmo_load16be(buf + sizeof(struct gsm48_loc_area_id)); + break; case CELL_IDENT_WHOLE_GLOBAL_PS: /* 3GPP TS 48.018 sec 11.3.9 "Cell Identifier" */ if (len < 8) @@ -953,6 +965,16 @@ case CELL_IDENT_NO_CELL: /* Does not have any list items */ break; + + case CELL_IDENT_SAI: { + const struct osmo_service_area_id *id = &u->sai; + struct gsm48_loc_area_id lai; + gsm48_generate_lai2(&lai, &id->lai); + memcpy(msgb_put(msg, sizeof(lai)), &lai, sizeof(lai)); + msgb_put_u16(msg, id->sac); + break; + } + case CELL_IDENT_WHOLE_GLOBAL_PS: { /* 3GPP TS 48.018 sec 11.3.9 "Cell Identifier" */ const struct osmo_cell_global_id_ps *id = &u->global_ps; @@ -1166,6 +1188,31 @@ return i; } +static int parse_cell_id_sai_list(struct gsm0808_cell_id_list2 *cil, const uint8_t *data, size_t remain, size_t *consumed) +{ + struct osmo_service_area_id *id; + uint16_t *sac_be; + size_t lai_offset; + int i = 0; + const size_t elemlen = sizeof(struct gsm48_loc_area_id) + sizeof(*sac_be); + + *consumed = 0; + while (remain >= elemlen) { + if (i >= GSM0808_CELL_ID_LIST2_MAXLEN) + return -ENOSPC; + id = &cil->id_list[i].sai; + lai_offset = i * elemlen; + decode_lai(&data[lai_offset], &id->lai); + sac_be = (uint16_t *)(&data[lai_offset + sizeof(struct gsm48_loc_area_id)]); + id->sac = osmo_load16be(sac_be); + *consumed += elemlen; + remain -= elemlen; + i++; + } + + return i; +} + /*! Decode Cell Identifier List IE * \param[out] cil Caller-provided memory to store Cell ID list * \param[in] elem IE value to be decoded @@ -1210,6 +1257,12 @@ case CELL_IDENT_NO_CELL: /* Does not have any list items */ break; + case CELL_IDENT_SAI: + list_len = parse_cell_id_sai_list(cil, elem, len, &bytes_elem); + break; + case CELL_IDENT_UTRAN_PLMN_LAC_RNC: + case CELL_IDENT_UTRAN_RNC: + case CELL_IDENT_UTRAN_LAC_RNC: default: /* Remaining cell identification types are not implemented. */ return -EINVAL; @@ -1703,6 +1756,8 @@ return snprintf(buf, buflen, "%s", osmo_cgi_name(&u->global)); case CELL_IDENT_WHOLE_GLOBAL_PS: return snprintf(buf, buflen, "%s", osmo_cgi_ps_name(&u->global_ps)); + case CELL_IDENT_SAI: + return snprintf(buf, buflen, "%s", osmo_sai_name(&u->sai)); default: /* For CELL_IDENT_BSS and CELL_IDENT_NO_CELL, just print the discriminator. * Same for kinds we have no string representation of yet. */ @@ -1859,6 +1914,12 @@ cid->id.lac = cgi->lai.lac; return; + case CELL_IDENT_SAI: + cid->id.sai = (struct osmo_service_area_id){ + .lai = cgi->lai, + }; + return; + case CELL_IDENT_NO_CELL: case CELL_IDENT_BSS: case CELL_IDENT_UTRAN_PLMN_LAC_RNC: @@ -1905,6 +1966,10 @@ cgi->lai.lac = cid->id.lac; return OSMO_CGI_PART_LAC; + case CELL_IDENT_SAI: + cgi->lai = cid->id.sai.lai; + return OSMO_CGI_PART_PLMN | OSMO_CGI_PART_LAC; + case CELL_IDENT_NO_CELL: case CELL_IDENT_BSS: case CELL_IDENT_UTRAN_PLMN_LAC_RNC: @@ -1927,6 +1992,7 @@ { CELL_IDENT_UTRAN_PLMN_LAC_RNC, "UTRAN-PLMN-LAC-RNC" }, { CELL_IDENT_UTRAN_RNC, "UTRAN-RNC" }, { CELL_IDENT_UTRAN_LAC_RNC, "UTRAN-LAC-RNC" }, + { CELL_IDENT_SAI, "SAI" }, { CELL_IDENT_WHOLE_GLOBAL_PS, "CGI-PS"}, { 0, NULL } }; diff -Nru libosmocore-1.6.0/src/gsm/gsm23003.c libosmocore-1.7.0/src/gsm/gsm23003.c --- libosmocore-1.6.0/src/gsm/gsm23003.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/gsm/gsm23003.c 2022-06-28 15:00:51.000000000 +0000 @@ -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 @@ -372,6 +368,51 @@ return osmo_cgi_ps_name_buf(buf, 32, cgi_ps); } +/*! Return MCC-MNC-LAC-SAC as string, in caller-provided output buffer. + * \param[out] buf caller-allocated output buffer + * \param[in] buf_len size of buf in bytes + * \param[in] sai SAI to encode. + * \returns buf + */ +char *osmo_sai_name_buf(char *buf, size_t buf_len, const struct osmo_service_area_id *sai) +{ + snprintf(buf, buf_len, "%s-%u", osmo_lai_name(&sai->lai), sai->sac); + return buf; +} + +/*! Return MCC-MNC-LAC-SAC as string, in a static buffer. + * \param[in] sai SAI to encode. + * \returns Static string buffer. + */ +const char *osmo_sai_name(const struct osmo_service_area_id *sai) +{ + static __thread char buf[32]; + return osmo_sai_name_buf(buf, sizeof(buf), sai); +} + +/*! Same as osmo_cgi_name(), but uses a different static buffer. + * Useful for printing two distinct CGIs in the same printf format. + * \param[in] sai SAI to encode. + * \returns Static string buffer. + */ +const char *osmo_sai_name2(const struct osmo_service_area_id *sai) +{ + static __thread char buf[32]; + return osmo_sai_name_buf(buf, sizeof(buf), sai); +} + +/*! Return MCC-MNC-LAC-SAC as string, in a talloc-allocated output buffer. + * \param[in] ctx talloc context from which to allocate output buffer + * \param[in] sai SAI to encode. + * \returns string representation of CGI in dynamically-allocated buffer. + */ +char *osmo_sai_name_c(const void *ctx, const struct osmo_service_area_id *sai) +{ + char *buf = talloc_size(ctx, 32); + return osmo_sai_name_buf(buf, 32, sai); +} + + static void to_bcd(uint8_t *bcd, uint16_t val) { bcd[2] = val % 10; @@ -449,14 +490,12 @@ } } -/* Convert given 3-byte BCD buffer to integers and write results to *mcc and - * *mnc. The first three BCD digits result in the MCC and the remaining ones in - * the MNC. Return mnc_3_digits as false if the MNC's most significant digit is encoded as 0xF, true - * otherwise; i.e. true if MNC > 99 or if it is represented with leading zeros instead of 0xF. +/* Convert given 3-byte BCD buffer to integers and write results to plmn->mcc and plmn->mnc. The first three BCD digits + * result in the MCC and the remaining ones in the MNC. Set plmn->mnc_3_digits as false if the MNC's most significant + * digit is encoded as 0xF, true otherwise; i.e. true if MNC > 99 or if it is represented with leading zeros instead of + * 0xF. * \param[in] bcd_src 3-byte BCD buffer containing MCC+MNC representations. - * \param[out] mcc MCC result buffer, or NULL. - * \param[out] mnc MNC result buffer, or NULL. - * \param[out] mnc_3_digits Result buffer for 3-digit flag, or NULL. + * \param[out] plmn user provided memory to store the result. */ void osmo_plmn_from_bcd(const uint8_t *bcd_src, struct osmo_plmn_id *plmn) { diff -Nru libosmocore-1.6.0/src/gsm/gsm23236.c libosmocore-1.7.0/src/gsm/gsm23236.c --- libosmocore-1.6.0/src/gsm/gsm23236.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/gsm/gsm23236.c 2022-06-28 15:00:51.000000000 +0000 @@ -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 diff -Nru libosmocore-1.6.0/src/gsm/gsm29118.c libosmocore-1.7.0/src/gsm/gsm29118.c --- libosmocore-1.6.0/src/gsm/gsm29118.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/gsm/gsm29118.c 2022-06-28 15:00:51.000000000 +0000 @@ -14,10 +14,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * 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 diff -Nru libosmocore-1.6.0/src/gsm/gsm29205.c libosmocore-1.7.0/src/gsm/gsm29205.c --- libosmocore-1.6.0/src/gsm/gsm29205.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/gsm/gsm29205.c 2022-06-28 15:00:51.000000000 +0000 @@ -14,10 +14,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 "config.h" diff -Nru libosmocore-1.6.0/src/gsm/gsm48.c libosmocore-1.7.0/src/gsm/gsm48.c --- libosmocore-1.6.0/src/gsm/gsm48.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/gsm/gsm48.c 2022-06-28 15:00:51.000000000 +0000 @@ -19,10 +19,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 diff -Nru libosmocore-1.6.0/src/gsm/gsm48_ie.c libosmocore-1.7.0/src/gsm/gsm48_ie.c --- libosmocore-1.6.0/src/gsm/gsm48_ie.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/gsm/gsm48_ie.c 2022-06-28 15:00:51.000000000 +0000 @@ -19,10 +19,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. - * */ diff -Nru libosmocore-1.6.0/src/gsm/gsm_utils.c libosmocore-1.7.0/src/gsm/gsm_utils.c --- libosmocore-1.6.0/src/gsm/gsm_utils.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/gsm/gsm_utils.c 2022-06-28 15:00:51.000000000 +0000 @@ -19,10 +19,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. - * */ /*! \mainpage libosmogsm Documentation @@ -329,12 +325,13 @@ int i = 0, z = 0; uint8_t cb, nb; int shift = 0; - uint8_t *data = calloc(septet_len + 1, sizeof(uint8_t)); + uint8_t *data = malloc(septet_len + 1); if (padding) { shift = 7 - padding; /* the first zero is needed for padding */ memcpy(data + 1, rdata, septet_len); + data[0] = 0x00; septet_len++; } else memcpy(data, rdata, septet_len); @@ -388,7 +385,7 @@ size_t max_septets = n * 8 / 7; /* prepare for the worst case, every character expanding to two bytes */ - uint8_t *rdata = calloc(strlen(data) * 2, sizeof(uint8_t)); + uint8_t *rdata = malloc(strlen(data) * 2); y = gsm_septet_encode(rdata, data); if (y > max_septets) { diff -Nru libosmocore-1.6.0/src/gsm/i460_mux.c libosmocore-1.7.0/src/gsm/i460_mux.c --- libosmocore-1.6.0/src/gsm/i460_mux.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/gsm/i460_mux.c 2022-06-28 15:00:51.000000000 +0000 @@ -14,11 +14,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * 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 diff -Nru libosmocore-1.6.0/src/gsm/iuup.c libosmocore-1.7.0/src/gsm/iuup.c --- libosmocore-1.6.0/src/gsm/iuup.c 1970-01-01 00:00:00.000000000 +0000 +++ libosmocore-1.7.0/src/gsm/iuup.c 2022-06-28 15:00:51.000000000 +0000 @@ -0,0 +1,1062 @@ +/*! \file iu_up.c + * IuUP (Iu User Plane) according to 3GPP TS 25.415 */ +/* + * (C) 2017 by Harald Welte + * + * SPDX-License-Identifier: GPL-2.0+ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include +#include + +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +/*********************************************************************** + * CRC Calculation + ***********************************************************************/ + +/* Section 6.6.3.8 Header CRC */ +const struct osmo_crc8gen_code iuup_hdr_crc_code = { + .bits = 6, + .poly = 47, + .init = 0, + .remainder = 0, +}; + +/* Section 6.6.3.9 Payload CRC */ +const struct osmo_crc16gen_code iuup_data_crc_code = { + .bits = 10, + .poly = 563, + .init = 0, + .remainder = 0, +}; + +static int iuup_get_payload_offset(const uint8_t *iuup_pdu) +{ + uint8_t pdu_type = iuup_pdu[0] >> 4; + switch (pdu_type) { + case 0: + case 14: + return 4; + case 1: + return 3; + default: + return -1; + } +} + +int osmo_iuup_compute_payload_crc(const uint8_t *iuup_pdu, unsigned int pdu_len) +{ + ubit_t buf[1024*8]; + uint8_t pdu_type; + int offset, payload_len_bytes; + + if (pdu_len < 1) + return -1; + + pdu_type = iuup_pdu[0] >> 4; + + /* Type 1 has no CRC */ + if (pdu_type == 1) + return 0; + + offset = iuup_get_payload_offset(iuup_pdu); + if (offset < 0) + return offset; + + if (pdu_len < offset) + return -1; + + payload_len_bytes = pdu_len - offset; + osmo_pbit2ubit(buf, iuup_pdu+offset, payload_len_bytes*8); + return osmo_crc16gen_compute_bits(&iuup_data_crc_code, buf, payload_len_bytes*8); +} + +int osmo_iuup_compute_header_crc(const uint8_t *iuup_pdu, unsigned int pdu_len) +{ + ubit_t buf[2*8]; + + if (pdu_len < 2) + return -1; + + osmo_pbit2ubit(buf, iuup_pdu, 2*8); + return osmo_crc8gen_compute_bits(&iuup_hdr_crc_code, buf, 2*8); +} + +/*********************************************************************** + * Internal State / FSM (Annex B) + ***********************************************************************/ + +#define S(x) (1 << (x)) + +#define IUUP_TIMER_INIT 1 +#define IUUP_TIMER_TA 2 +#define IUUP_TIMER_RC 3 + +struct osmo_timer_nt { + uint32_t n; /* number of repetitions */ + struct osmo_iuup_tnl_prim *retrans_itp; + struct osmo_timer_list timer; +}; + +struct osmo_iuup_instance { + struct osmo_iuup_rnl_config config; + struct osmo_fsm_inst *fi; + + uint8_t mode_version; + + struct { + struct osmo_timer_nt init; + struct osmo_timer_nt ta; + struct osmo_timer_nt rc; + } timer; + /* call-back function to pass primitives up to the user */ + osmo_prim_cb user_prim_cb; + void *user_prim_priv; + osmo_prim_cb transport_prim_cb; + void *transport_prim_priv; + uint8_t type14_fn; /* 2 bits */ +}; + +enum iuup_fsm_state { + IUUP_FSM_ST_NULL, + IUUP_FSM_ST_INIT, + IUUP_FSM_ST_TrM_DATA_XFER_READY, + IUUP_FSM_ST_SMpSDU_DATA_XFER_READY, +}; + +enum iuup_fsm_event { + IUUP_FSM_EVT_IUUP_CONFIG_REQ, + IUUP_FSM_EVT_IUUP_DATA_REQ, + IUUP_FSM_EVT_IUUP_DATA_IND, + IUUP_FSM_EVT_IUUP_STATUS_REQ, + IUUP_FSM_EVT_IUUP_STATUS_IND, + IUUP_FSM_EVT_SSASAR_UNITDATA_REQ, + IUUP_FSM_EVT_SSASAR_UNITDATA_IND, + IUUP_FSM_EVT_IUUP_UNITDATA_REQ, + IUUP_FSM_EVT_IUUP_UNITDATA_IND, + IUUP_FSM_EVT_INIT, + IUUP_FSM_EVT_LAST_INIT_ACK, + IUUP_FSM_EVT_INIT_NACK, +}; + +static const struct value_string iuup_fsm_event_names[] = { + { IUUP_FSM_EVT_IUUP_CONFIG_REQ, "IuUP-CONFIG-req" }, + { IUUP_FSM_EVT_IUUP_DATA_REQ, "IuUP-DATA-req" }, + { IUUP_FSM_EVT_IUUP_DATA_IND, "IuUP-DATA-ind" }, + { IUUP_FSM_EVT_IUUP_STATUS_REQ, "IuUP-STATUS-req" }, + { IUUP_FSM_EVT_IUUP_STATUS_IND, "IuUP-STATUS-ind" }, + { IUUP_FSM_EVT_SSASAR_UNITDATA_REQ, "SSSAR-UNITDATA-req" }, + { IUUP_FSM_EVT_SSASAR_UNITDATA_IND, "SSSAR-UNITDATA-ind" }, + { IUUP_FSM_EVT_IUUP_UNITDATA_REQ, "IuUP-UNITDATA-req" }, + { IUUP_FSM_EVT_IUUP_UNITDATA_IND, "IuUP-UNITDATA-ind" }, + { IUUP_FSM_EVT_INIT, "INIT" }, + { IUUP_FSM_EVT_LAST_INIT_ACK, "LAST_INIT_ACK" }, + { IUUP_FSM_EVT_INIT_NACK, "INIT_NACK" }, + { 0, NULL } +}; + +static inline uint8_t iuup_get_pdu_type(const uint8_t *data) +{ + return data[0] >> 4; +} + +static inline uint8_t iuup_get_hdr_crc(const uint8_t *data) +{ + return data[2] >> 2; +} + +/* Helper functions to store non-packed structs in msgb so that pointers are properly aligned: */ +#define IUUP_MSGB_SIZE 4096 +#define PTR_ALIGNMENT_BYTES 8 +#define IUUP_MSGB_HEADROOM_MIN_REQUIRED (OSMO_MAX(sizeof(struct osmo_iuup_tnl_prim), sizeof(struct osmo_iuup_rnl_prim)) + (PTR_ALIGNMENT_BYTES - 1)) +static inline struct msgb *osmo_iuup_msgb_alloc_c(void *ctx, size_t size) +{ + osmo_static_assert(size > IUUP_MSGB_HEADROOM_MIN_REQUIRED, iuup_msgb_alloc_headroom_bigger); + return msgb_alloc_headroom_c(ctx, size, IUUP_MSGB_HEADROOM_MIN_REQUIRED, "iuup-msgb"); +} + +/* push data so that the resulting pointer to write to is aligned to 8 byte */ +static inline __attribute__((assume_aligned(PTR_ALIGNMENT_BYTES))) +unsigned char *aligned_msgb_push(struct msgb *msg, unsigned int len) +{ + uint8_t *ptr = (msgb_data(msg) - len); + size_t extra_size = ((uintptr_t)ptr & (PTR_ALIGNMENT_BYTES - 1)); + + return msgb_push(msg, len + extra_size); +} + +struct osmo_iuup_rnl_prim *osmo_iuup_rnl_prim_alloc(void *ctx, unsigned int primitive, unsigned int operation, unsigned int size) +{ + struct msgb *msg; + struct osmo_iuup_rnl_prim *irp; + + msg = osmo_iuup_msgb_alloc_c(ctx, size); + irp = (struct osmo_iuup_rnl_prim *)aligned_msgb_push(msg, sizeof(*irp)); + osmo_prim_init(&irp->oph, SAP_IUUP_RNL, primitive, operation, msg); + return irp; +} + +struct osmo_iuup_tnl_prim *osmo_iuup_tnl_prim_alloc(void *ctx, unsigned int primitive, unsigned int operation, unsigned int size) +{ + struct msgb *msg; + struct osmo_iuup_tnl_prim *itp; + + msg = osmo_iuup_msgb_alloc_c(ctx, size); + itp = (struct osmo_iuup_tnl_prim *) aligned_msgb_push(msg, sizeof(*itp)); + osmo_prim_init(&itp->oph, SAP_IUUP_TNL, primitive, operation, msg); + return itp; +} + +/* 6.6.2.3.2 */ +static struct osmo_iuup_tnl_prim *itp_ctrl_ack_alloc(struct osmo_iuup_instance *iui, enum iuup_procedure proc_ind, uint8_t fn) +{ + struct osmo_iuup_tnl_prim *itp; + struct iuup_ctrl_ack *ack; + itp = osmo_iuup_tnl_prim_alloc(iui, OSMO_IUUP_TNL_UNITDATA, PRIM_OP_REQUEST, IUUP_MSGB_SIZE); + itp->oph.msg->l2h = msgb_put(itp->oph.msg, sizeof(struct iuup_ctrl_ack)); + ack = (struct iuup_ctrl_ack *) msgb_l2(itp->oph.msg); + *ack = (struct iuup_ctrl_ack){ + .hdr = { + .frame_nr = fn, + .ack_nack = IUUP_AN_ACK, + .pdu_type = IUUP_PDU_T_CONTROL, + .proc_ind = proc_ind, + .mode_version = iui->mode_version, + .payload_crc_hi = 0, + .header_crc = 0, + .payload_crc_lo = 0, + }, + }; + ack->hdr.header_crc = osmo_iuup_compute_header_crc(msgb_l2(itp->oph.msg), msgb_l2len(itp->oph.msg)); + return itp; +} + +/* 6.6.2.3.3 */ +static struct osmo_iuup_tnl_prim *tnp_ctrl_nack_alloc(struct osmo_iuup_instance *iui, enum iuup_procedure proc_ind, enum iuup_error_cause error_cause, uint8_t fn) +{ + struct osmo_iuup_tnl_prim *itp; + struct iuup_ctrl_nack *nack; + itp = osmo_iuup_tnl_prim_alloc(iui, OSMO_IUUP_TNL_UNITDATA, PRIM_OP_REQUEST, IUUP_MSGB_SIZE); + itp->oph.msg->l2h = msgb_put(itp->oph.msg, sizeof(struct iuup_ctrl_nack)); + nack = (struct iuup_ctrl_nack *) msgb_l2(itp->oph.msg); + *nack = (struct iuup_ctrl_nack){ + .hdr = { + .frame_nr = fn, + .ack_nack = IUUP_AN_NACK, + .pdu_type = IUUP_PDU_T_CONTROL, + .proc_ind = proc_ind, + .mode_version = iui->mode_version, + .payload_crc_hi = 0, + .header_crc = 0, + .payload_crc_lo = 0, + }, + .spare = 0, + .error_cause = error_cause, + }; + nack->hdr.header_crc = osmo_iuup_compute_header_crc(msgb_l2(itp->oph.msg), msgb_l2len(itp->oph.msg)); + return itp; +} + +/* 6.6.2.3.4.1 */ +static struct osmo_iuup_tnl_prim *tnp_ctrl_init_alloc(struct osmo_iuup_instance *iui) +{ + struct osmo_iuup_tnl_prim *itp; + struct iuup_pdutype14_hdr *hdr; + struct iuup_ctrl_init_hdr *ihdr; + struct iuup_ctrl_init_rfci_hdr *ihdr_rfci; + struct iuup_ctrl_init_tail *itail; + unsigned int i, j; + uint16_t payload_crc; + uint8_t rfci_cnt; + struct msgb *msg; + + itp = osmo_iuup_tnl_prim_alloc(iui, OSMO_IUUP_TNL_UNITDATA, PRIM_OP_REQUEST, IUUP_MSGB_SIZE); + msg = itp->oph.msg; + + msg->l2h = msgb_put(msg, sizeof(*hdr)); + hdr = (struct iuup_pdutype14_hdr *)msgb_l2(msg); + hdr->frame_nr = iui->type14_fn++; + hdr->ack_nack = IUUP_AN_PROCEDURE; + hdr->pdu_type = IUUP_PDU_T_CONTROL; + hdr->proc_ind = IUUP_PROC_INIT; + hdr->mode_version = 0; /* Use here the minimum version required to negotiate */ + hdr->header_crc = osmo_iuup_compute_header_crc(msgb_l2(msg), msgb_l2len(msg)); + + ihdr = (struct iuup_ctrl_init_hdr *)msgb_put(msg, sizeof(*ihdr)); + ihdr->chain_ind = 0; /* this frame is the last frame for the procedure. TODO: support several */ + ihdr->num_subflows_per_rfci = iui->config.num_subflows; + ihdr->ti = iui->config.IPTIs_present ? 1 : 0; + ihdr->spare = 0; + + /* RFCI + subflow size part: */ + rfci_cnt = 0; + for (i = 0; i < ARRAY_SIZE(iui->config.rfci); i++) { + bool last; + uint8_t len_size; + struct osmo_iuup_rfci *rfci = &iui->config.rfci[i]; + if (!rfci->used) + continue; + rfci_cnt++; + last = (rfci_cnt == iui->config.num_rfci); + + len_size = 1; + for (j = 0; j < iui->config.num_subflows; j++) { + if (rfci->subflow_sizes[j] > UINT8_MAX) + len_size = 2; + } + + ihdr_rfci = (struct iuup_ctrl_init_rfci_hdr *)msgb_put(msg, sizeof(*ihdr_rfci) + len_size * iui->config.num_subflows); + ihdr_rfci->rfci = rfci->id; + ihdr_rfci->li = len_size - 1; + ihdr_rfci->lri = last; + if (len_size == 2) { + uint16_t *buf = (uint16_t *)&ihdr_rfci->subflow_length[0]; + for (j = 0; j < iui->config.num_subflows; j++) + osmo_store16be(rfci->subflow_sizes[j], buf++); + } else { + for (j = 0; j < iui->config.num_subflows; j++) + ihdr_rfci->subflow_length[j] = rfci->subflow_sizes[j]; + } + /* early loop termination: */ + if (last) + break; + } + /* Sanity check: */ + if (rfci_cnt != iui->config.num_rfci) { + LOGP(DLIUUP, LOGL_ERROR, "rfci_cnt %u != num_rfci %u\n", + rfci_cnt, iui->config.num_rfci); + msgb_free(msg); + return NULL; + } + + if (iui->config.IPTIs_present) { + uint8_t num_bytes = (iui->config.num_rfci + 1) / 2; + uint8_t *buf = msgb_put(msg, num_bytes); + rfci_cnt = 0; + for (i = 0; i < ARRAY_SIZE(iui->config.rfci); i++) { + struct osmo_iuup_rfci *rfci = &iui->config.rfci[i]; + if (!rfci->used) + continue; + if (!(rfci_cnt & 0x01)) /* is even: */ + buf[rfci_cnt / 2] = (((uint8_t)rfci->IPTI) << 4); + else + buf[rfci_cnt / 2] |= (rfci->IPTI & 0x0F); + rfci_cnt++; + /* early loop termination: */ + if (rfci_cnt == iui->config.num_rfci) + break; + } + } + + itail = (struct iuup_ctrl_init_tail *)msgb_put(msg, sizeof(*itail)); + osmo_store16be(iui->config.supported_versions_mask, &itail->versions_supported); + itail->spare = 0; + itail->data_pdu_type = iui->config.data_pdu_type; + + payload_crc = osmo_iuup_compute_payload_crc(msgb_l2(msg), msgb_l2len(msg)); + hdr->payload_crc_hi = (payload_crc >> 8) & 0x03; + hdr->payload_crc_lo = payload_crc & 0xff; + + + return itp; +} + +static struct osmo_iuup_rnl_prim *irp_init_ind_alloc(struct osmo_iuup_instance *iui) +{ + struct osmo_iuup_rnl_prim *irp; + + irp = osmo_iuup_rnl_prim_alloc(iui, OSMO_IUUP_RNL_STATUS, PRIM_OP_INDICATION, IUUP_MSGB_SIZE); + irp->u.status.procedure = IUUP_PROC_INIT; + irp->u.status.u.initialization.mode_version = iui->mode_version; + irp->u.status.u.initialization.data_pdu_type = iui->config.data_pdu_type; + irp->u.status.u.initialization.num_subflows = iui->config.num_subflows; + irp->u.status.u.initialization.num_rfci = iui->config.num_rfci; + irp->u.status.u.initialization.IPTIs_present = iui->config.IPTIs_present; + memcpy(irp->u.status.u.initialization.rfci, iui->config.rfci, sizeof(iui->config.rfci)); + return irp; +} + +/* transform a RNL data primitive into a TNL data primitive (down the stack) */ +static struct osmo_iuup_tnl_prim *rnl_to_tnl_data(struct osmo_iuup_instance *iui, + struct osmo_iuup_rnl_prim *irp) +{ + struct osmo_iuup_tnl_prim *itp; + struct osmo_iuup_rnl_data dt; + struct msgb *msg; + uint16_t payload_crc; + struct iuup_pdutype0_hdr *h0; + struct iuup_pdutype1_hdr *h1; + + OSMO_ASSERT(OSMO_PRIM_HDR(&irp->oph) == OSMO_PRIM(OSMO_IUUP_RNL_DATA, PRIM_OP_REQUEST)); + + msg = irp->oph.msg; + dt = irp->u.data; + + /* pull up to the IuUP payload and push a new primitive header in front */ + msgb_pull_to_l3(msg); + + /* push the PDU TYPE 0 / 1 header in front of the payload */ + switch (iui->config.data_pdu_type) { + case 0: + msg->l2h = msgb_push(msg, sizeof(*h0)); + h0 = (struct iuup_pdutype0_hdr *)msg->l2h; + h0->frame_nr = dt.frame_nr; + h0->pdu_type = IUUP_PDU_T_DATA_CRC; + h0->rfci = dt.rfci; + h0->fqc = dt.fqc; + h0->header_crc = osmo_iuup_compute_header_crc(msgb_l2(msg), msgb_l2len(msg)); + payload_crc = osmo_iuup_compute_payload_crc(msgb_l2(msg), msgb_l2len(msg)); + h0->payload_crc_hi = (payload_crc >> 8) & 0x03; + h0->payload_crc_lo = payload_crc & 0xff; + break; + case 1: + msg->l2h = msgb_push(msg, sizeof(*h1)); + h1 = (struct iuup_pdutype1_hdr *)msg->l2h; + h1->frame_nr = dt.frame_nr; + h1->pdu_type = IUUP_PDU_T_DATA_NOCRC; + h1->rfci = dt.rfci; + h1->fqc = dt.fqc; + h1->header_crc = osmo_iuup_compute_header_crc(msgb_l2(msg), msgb_l2len(msg)); + h1->spare = 0; + break; + default: + OSMO_ASSERT(0); + } + + /* Avoid allocating irp out of 8byte-aligned address, Asan is not happy with it */ + itp = (struct osmo_iuup_tnl_prim *) aligned_msgb_push(msg, sizeof(*itp)); + osmo_prim_init(&itp->oph, SAP_IUUP_TNL, OSMO_IUUP_TNL_UNITDATA, PRIM_OP_REQUEST, msg); + + return itp; +} + +/* transform a TNL primitive into a RNL primitive (up the stack) */ +static struct osmo_iuup_rnl_prim *tnl_to_rnl_data(struct osmo_iuup_tnl_prim *itp) +{ + struct msgb *msg; + struct iuup_pdutype0_hdr *h0; + struct iuup_pdutype1_hdr *h1; + struct osmo_iuup_rnl_data dt; + struct osmo_iuup_rnl_prim *irp; + + msg = itp->oph.msg; + + OSMO_ASSERT(OSMO_PRIM_HDR(&itp->oph) == OSMO_PRIM(OSMO_IUUP_TNL_UNITDATA, PRIM_OP_INDICATION)); + + switch (iuup_get_pdu_type(msgb_l2(msg))) { + case IUUP_PDU_T_DATA_CRC: + h0 = (struct iuup_pdutype0_hdr *) msgb_l2(msg); + dt.rfci = h0->rfci; + dt.frame_nr = h0->frame_nr; + dt.fqc = h0->fqc; + break; + case IUUP_PDU_T_DATA_NOCRC: + h1 = (struct iuup_pdutype1_hdr *) msgb_l2(msg); + dt.rfci = h1->rfci; + dt.frame_nr = h1->frame_nr; + dt.fqc = h1->fqc; + break; + } + + /* pull up to the IuUP payload and push a new primitive header in front */ + msgb_pull_to_l3(msg); + + /* Avoid allocating irp out of 8byte-aligned address, Asan is not happy with it */ + irp = (struct osmo_iuup_rnl_prim *) aligned_msgb_push(msg, sizeof(*irp)); + osmo_prim_init(&irp->oph, SAP_IUUP_RNL, OSMO_IUUP_RNL_DATA, PRIM_OP_INDICATION, msg); + irp->u.data = dt; + + return irp; +} + +static struct osmo_iuup_rnl_prim *irp_error_event_alloc_c(void *ctx, enum iuup_error_cause cause, enum iuup_error_distance distance) +{ + struct osmo_iuup_rnl_prim *irp; + struct msgb *msg; + msg = msgb_alloc_c(ctx, sizeof(*irp), "iuup-tx"); + irp = (struct osmo_iuup_rnl_prim *) msgb_put(msg, sizeof(*irp)); + osmo_prim_init(&irp->oph, SAP_IUUP_RNL, OSMO_IUUP_RNL_STATUS, PRIM_OP_INDICATION, msg); + irp->u.status.procedure = IUUP_PROC_ERR_EVENT; + irp->u.status.u.error_event.cause = cause; + irp->u.status.u.error_event.distance = distance; + return irp; +} + +static struct osmo_iuup_tnl_prim *itp_copy_c(void *ctx, const struct osmo_iuup_tnl_prim *src_itp) +{ + struct msgb *msg; + struct osmo_iuup_tnl_prim *dst_itp; + + msg = msgb_copy_c(ctx, src_itp->oph.msg, "iuup-tx-retrans"); + dst_itp = (struct osmo_iuup_tnl_prim *)msgb_data(msg); + dst_itp->oph.msg = msg; + return dst_itp; +} + +static void retransmit_initialization(struct osmo_iuup_instance *iui) +{ + struct osmo_iuup_tnl_prim *itp; + iui->fi->T = IUUP_TIMER_INIT; + osmo_timer_schedule(&iui->fi->timer, iui->config.t_init.t_ms / 1000, (iui->config.t_init.t_ms % 1000) * 1000); + itp = itp_copy_c(iui, iui->timer.init.retrans_itp); + iui->transport_prim_cb(&itp->oph, iui->transport_prim_priv); +} + +/* return: whether the last Init was Acked correctly and hence can transition to next state */ +static bool iuup_rx_initialization(struct osmo_iuup_instance *iui, struct osmo_iuup_tnl_prim *itp) +{ + struct iuup_pdutype14_hdr *hdr; + struct iuup_ctrl_init_hdr *ihdr; + struct iuup_ctrl_init_rfci_hdr *ihdr_rfci; + struct iuup_ctrl_init_tail *itail; + enum iuup_error_cause err_cause; + uint8_t num_rfci = 0; + int i; + bool is_last; + uint16_t remote_mask, match_mask; + struct osmo_iuup_rnl_prim *irp; + struct osmo_iuup_tnl_prim *resp; + + /* TODO: whenever we check message boundaries, length, etc. and we fail, send NACK */ + + hdr = (struct iuup_pdutype14_hdr *)msgb_l2(itp->oph.msg); + ihdr = (struct iuup_ctrl_init_hdr *)hdr->payload; + if (ihdr->num_subflows_per_rfci == 0) { + LOGPFSML(iui->fi, LOGL_NOTICE, "Initialization: Unexpected num_subflows=0 received\n"); + err_cause = IUUP_ERR_CAUSE_UNEXPECTED_VALUE; + goto send_nack; + } + ihdr_rfci = (struct iuup_ctrl_init_rfci_hdr *)ihdr->rfci_data; + + do { + struct osmo_iuup_rfci *rfci = &iui->config.rfci[num_rfci]; + uint8_t l_size_bytes = ihdr_rfci->li + 1; + is_last = ihdr_rfci->lri; + if (num_rfci >= IUUP_MAX_RFCIS) { + LOGPFSML(iui->fi, LOGL_NOTICE, "Initialization: Too many RFCIs received (%u)\n", + num_rfci); + err_cause = IUUP_ERR_CAUSE_UNEXPECTED_RFCI; + goto send_nack; + } + rfci->used = 1; + rfci->id = ihdr_rfci->rfci; + if (l_size_bytes == 2) { + uint16_t *subflow_size = (uint16_t *)ihdr_rfci->subflow_length; + for (i = 0; i < ihdr->num_subflows_per_rfci; i++) { + rfci->subflow_sizes[i] = osmo_load16be(subflow_size); + subflow_size++; + } + } else { + uint8_t *subflow_size = ihdr_rfci->subflow_length; + for (i = 0; i < ihdr->num_subflows_per_rfci; i++) { + rfci->subflow_sizes[i] = *subflow_size; + subflow_size++; + } + } + num_rfci++; + ihdr_rfci++; + ihdr_rfci = (struct iuup_ctrl_init_rfci_hdr *)(((uint8_t *)ihdr_rfci) + ihdr->num_subflows_per_rfci * l_size_bytes); + } while (!is_last); + + if (ihdr->ti) { /* Timing information present */ + uint8_t *buf = (uint8_t *)ihdr_rfci; + uint8_t num_bytes = (num_rfci + 1) / 2; + iui->config.IPTIs_present = true; + for (i = 0; i < num_bytes - 1; i++) { + iui->config.rfci[i*2].IPTI = *buf >> 4; + iui->config.rfci[i*2 + 1].IPTI = *buf & 0x0f; + buf++; + } + iui->config.rfci[i*2].IPTI = *buf >> 4; + if (!(num_rfci & 0x01)) /* is even: */ + iui->config.rfci[i*2 + 1].IPTI = *buf & 0x0f; + buf++; + itail = (struct iuup_ctrl_init_tail *)buf; + } else { + iui->config.IPTIs_present = false; + itail = (struct iuup_ctrl_init_tail *)ihdr_rfci; + } + if (itail->data_pdu_type > 1) { + LOGPFSML(iui->fi, LOGL_NOTICE, "Initialization: Unexpected Data PDU Type %u received\n", itail->data_pdu_type); + err_cause = IUUP_ERR_CAUSE_UNEXPECTED_VALUE; + goto send_nack; + } + + remote_mask = osmo_load16be(&itail->versions_supported); + match_mask = (remote_mask & iui->config.supported_versions_mask); + if (match_mask == 0x0000) { + LOGPFSML(iui->fi, LOGL_NOTICE, + "Initialization: No match in supported versions local=0x%04x vs remote=0x%04x\n", + iui->config.supported_versions_mask, remote_mask); + err_cause = IUUP_ERR_CAUSE_UNEXPECTED_VALUE; + goto send_nack; + } + for (i = 15; i >= 0; i--) { + if (match_mask & (1<mode_version = i; + break; + } + } + + iui->config.num_rfci = num_rfci; + iui->config.num_subflows = ihdr->num_subflows_per_rfci; + iui->config.data_pdu_type = itail->data_pdu_type; + + irp = irp_init_ind_alloc(iui); + iui->user_prim_cb(&irp->oph, iui->user_prim_priv); + + LOGPFSML(iui->fi, LOGL_DEBUG, "Tx Initialization ACK\n"); + resp = itp_ctrl_ack_alloc(iui, IUUP_PROC_INIT, hdr->frame_nr); + iui->transport_prim_cb(&resp->oph, iui->transport_prim_priv); + return ihdr->chain_ind == 0; +send_nack: + LOGPFSML(iui->fi, LOGL_NOTICE, "Tx Initialization NACK cause=%u orig_message=%s\n", + err_cause, osmo_hexdump((const unsigned char *) msgb_l2(itp->oph.msg), msgb_l2len(itp->oph.msg))); + resp = tnp_ctrl_nack_alloc(iui, IUUP_PROC_INIT, err_cause, hdr->frame_nr); + iui->transport_prim_cb(&resp->oph, iui->transport_prim_priv); + return false; +} + +/********************** + * FSM STATE FUNCTIONS + **********************/ +static void iuup_fsm_null(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct osmo_iuup_instance *iui = fi->priv; + struct osmo_iuup_rnl_prim *user_prim = NULL; + + switch (event) { + case IUUP_FSM_EVT_IUUP_CONFIG_REQ: + user_prim = data; + iui->config = user_prim->u.config; + iui->config.supported_versions_mask &= 0x0003; /* We only support versions 1 and 2 ourselves */ + //TODO: if supported_versions_mask == 0x0000,no supported versions, send error to upper layers + + if (iui->config.transparent) + osmo_fsm_inst_state_chg(fi, IUUP_FSM_ST_TrM_DATA_XFER_READY, 0, 0); + else { + osmo_fsm_inst_state_chg(fi, IUUP_FSM_ST_INIT, 0, 0); + } + break; + } +} + +/* transparent mode data transfer */ +static void iuup_fsm_trm_data(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + //struct osmo_iuup_instance *iui = fi->priv; + + switch (event) { + case IUUP_FSM_EVT_IUUP_CONFIG_REQ: + osmo_fsm_inst_state_chg(fi, IUUP_FSM_ST_NULL, 0, 0); + break; + case IUUP_FSM_EVT_IUUP_DATA_REQ: + /* Data coming down from RNL (user) towards TNL (transport) */ + break; + case IUUP_FSM_EVT_IUUP_DATA_IND: + /* Data coming up from TNL (transport) towards RNL (user) */ + break; + case IUUP_FSM_EVT_IUUP_UNITDATA_REQ: + case IUUP_FSM_EVT_IUUP_UNITDATA_IND: + case IUUP_FSM_EVT_SSASAR_UNITDATA_REQ: + case IUUP_FSM_EVT_SSASAR_UNITDATA_IND: + /* no state change */ + break; + } +} + +static void iuup_fsm_init_on_enter(struct osmo_fsm_inst *fi, uint32_t prev_state) +{ + struct osmo_iuup_instance *iui = fi->priv; + + iui->type14_fn = 0; + if (iui->config.active) { + iui->timer.init.n = 0; + iui->timer.init.retrans_itp = tnp_ctrl_init_alloc(iui); + retransmit_initialization(iui); + } +} + +static void iuup_fsm_init(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct osmo_iuup_instance *iui = fi->priv; + struct osmo_iuup_rnl_prim *irp; + struct osmo_iuup_tnl_prim *itp; + + switch (event) { + case IUUP_FSM_EVT_IUUP_CONFIG_REQ: + /* the only permitted 'config req' type is the request to release the instance */ + osmo_fsm_inst_state_chg(fi, IUUP_FSM_ST_NULL, 0, 0); + break; + case IUUP_FSM_EVT_INIT: + itp = data; + if (iuup_rx_initialization(iui, itp)) + osmo_fsm_inst_state_chg(fi, IUUP_FSM_ST_SMpSDU_DATA_XFER_READY, 0, 0); + break; + case IUUP_FSM_EVT_LAST_INIT_ACK: + /* last INIT ACK was received, transition to DATA_XFER_READY state */ + osmo_fsm_inst_state_chg(fi, IUUP_FSM_ST_SMpSDU_DATA_XFER_READY, 0, 0); + break; + case IUUP_FSM_EVT_INIT_NACK: + LOGPFSML(fi, LOGL_NOTICE, "Rx Initialization NACK N=%" PRIu32 "/%" PRIu32 "\n", + iui->timer.init.n, iui->config.t_init.n_max); + osmo_timer_del(&fi->timer); + if (iui->timer.init.n == iui->config.t_init.n_max) { + irp = irp_error_event_alloc_c(iui, IUUP_ERR_CAUSE_INIT_FAILURE_REP_NACK, IUUP_ERR_DIST_SECOND_FWD); + iui->user_prim_cb(&irp->oph, iui->user_prim_priv); + return; + } + iui->timer.init.n++; + retransmit_initialization(iui); + break; + default: + OSMO_ASSERT(false); + } +} + +/* 3GPP TS 25.415 B.2.3 "Support Mode Data Transfer Ready State" */ +static void iuup_fsm_smpsdu_data(struct osmo_fsm_inst *fi, uint32_t event, void *data) +{ + struct osmo_iuup_instance *iui = fi->priv; + struct osmo_iuup_rnl_prim *irp = NULL; + struct osmo_iuup_tnl_prim *itp = NULL; + + switch (event) { + case IUUP_FSM_EVT_IUUP_CONFIG_REQ: + irp = data; + osmo_fsm_inst_state_chg(fi, IUUP_FSM_ST_NULL, 0, 0); + break; + case IUUP_FSM_EVT_INIT: + /* "In case of handover or relocation, Initialisation procedures + * may have to be performed and Iu UP instance may have to enter + * the initialisation state." */ + itp = data; + if (!iuup_rx_initialization(iui, itp)) + osmo_fsm_inst_state_chg(fi, IUUP_FSM_ST_INIT, 0, 0); + break; + case IUUP_FSM_EVT_IUUP_DATA_REQ: + /* Data coming down from RNL (user) towards TNL (transport) */ + irp = data; + itp = rnl_to_tnl_data(iui, irp); + iui->transport_prim_cb(&itp->oph, iui->transport_prim_priv); + break; + case IUUP_FSM_EVT_IUUP_DATA_IND: + /* Data coming up from TNL (transport) towards RNL (user) */ + itp = data; + irp = tnl_to_rnl_data(itp); + iui->user_prim_cb(&irp->oph, iui->user_prim_priv); + break; + } +} + +static int iuup_fsm_timer_cb(struct osmo_fsm_inst *fi) +{ + struct osmo_iuup_instance *iui = fi->priv; + struct osmo_iuup_rnl_prim *irp; + + switch (fi->T) { + case IUUP_TIMER_INIT: + OSMO_ASSERT(fi->state == IUUP_FSM_ST_INIT); + if (iui->timer.init.n == iui->config.t_init.n_max) { + irp = irp_error_event_alloc_c(iui, IUUP_ERR_CAUSE_INIT_FAILURE_NET_TMR, IUUP_ERR_DIST_LOCAL); + iui->user_prim_cb(&irp->oph, iui->user_prim_priv); + return 0; + } + iui->timer.init.n++; + retransmit_initialization(iui); + break; + case IUUP_TIMER_TA: + break; + case IUUP_TIMER_RC: + break; + default: + OSMO_ASSERT(0); + } + return 0; +} + + +static const struct osmo_fsm_state iuup_fsm_states[] = { + [IUUP_FSM_ST_NULL] = { + .in_event_mask = S(IUUP_FSM_EVT_IUUP_CONFIG_REQ), + .out_state_mask = S(IUUP_FSM_ST_INIT) | + S(IUUP_FSM_ST_TrM_DATA_XFER_READY), + .name = "NULL", + .action = iuup_fsm_null, + }, + [IUUP_FSM_ST_TrM_DATA_XFER_READY] = { + .in_event_mask = S(IUUP_FSM_EVT_IUUP_CONFIG_REQ) | + S(IUUP_FSM_EVT_IUUP_STATUS_REQ) | + S(IUUP_FSM_EVT_IUUP_DATA_REQ) | + S(IUUP_FSM_EVT_IUUP_DATA_IND) | + S(IUUP_FSM_EVT_IUUP_UNITDATA_REQ) | + S(IUUP_FSM_EVT_IUUP_UNITDATA_IND) | + S(IUUP_FSM_EVT_SSASAR_UNITDATA_REQ) | + S(IUUP_FSM_EVT_SSASAR_UNITDATA_IND), + .out_state_mask = S(IUUP_FSM_ST_NULL), + .name = "TrM_Data_Transfer_Ready", + .action = iuup_fsm_trm_data, + }, + [IUUP_FSM_ST_INIT] = { + .in_event_mask = S(IUUP_FSM_EVT_IUUP_CONFIG_REQ) | + S(IUUP_FSM_EVT_INIT) | + S(IUUP_FSM_EVT_LAST_INIT_ACK) | + S(IUUP_FSM_EVT_INIT_NACK), + .out_state_mask = S(IUUP_FSM_ST_NULL) | + S(IUUP_FSM_ST_SMpSDU_DATA_XFER_READY), + .name = "Initialisation", + .onenter = iuup_fsm_init_on_enter, + .action = iuup_fsm_init, + }, + [IUUP_FSM_ST_SMpSDU_DATA_XFER_READY] = { + .in_event_mask = S(IUUP_FSM_EVT_IUUP_CONFIG_REQ) | + S(IUUP_FSM_EVT_INIT) | + S(IUUP_FSM_EVT_IUUP_DATA_REQ) | + S(IUUP_FSM_EVT_IUUP_DATA_IND), + .out_state_mask = S(IUUP_FSM_ST_NULL) | + S(IUUP_FSM_ST_INIT), + .name = "SMpSDU_Data_Transfer_Ready", + .action = iuup_fsm_smpsdu_data, + }, +}; + +static struct osmo_fsm iuup_fsm = { + .name = "IuUP", + .states = iuup_fsm_states, + .num_states = ARRAY_SIZE(iuup_fsm_states), + .timer_cb = iuup_fsm_timer_cb, + .log_subsys = DLIUUP, + .event_names = iuup_fsm_event_names, +}; + +static int iuup_verify_pdu(const uint8_t *data, unsigned int len) +{ + int header_crc_computed, payload_crc_computed; + uint16_t payload_crc; + uint8_t pdu_type = iuup_get_pdu_type(data); + struct iuup_pdutype0_hdr *t0h; + struct iuup_pdutype14_hdr *t14h; + + if (len < 3) + return -EINVAL; + + header_crc_computed = osmo_iuup_compute_header_crc(data, len); + if (iuup_get_hdr_crc(data) != header_crc_computed) { + LOGP(DLIUUP, LOGL_NOTICE, "Header Checksum error: rx 0x%02x vs exp 0x%02x\n", + iuup_get_hdr_crc(data), header_crc_computed); + return -EIO; + } + switch (pdu_type) { + case IUUP_PDU_T_DATA_NOCRC: + if (len < 4) + return -EINVAL; + break; + case IUUP_PDU_T_DATA_CRC: + t0h = (struct iuup_pdutype0_hdr *) data; + payload_crc = ((uint16_t)t0h->payload_crc_hi << 8) | t0h->payload_crc_lo; + payload_crc_computed = osmo_iuup_compute_payload_crc(data, len); + if (payload_crc != payload_crc_computed) + goto payload_crc_err; + break; + case IUUP_PDU_T_CONTROL: + t14h = (struct iuup_pdutype14_hdr *) data; + if (t14h->ack_nack == IUUP_AN_PROCEDURE) { + payload_crc = ((uint16_t)t14h->payload_crc_hi << 8) | t14h->payload_crc_lo; + payload_crc_computed = osmo_iuup_compute_payload_crc(data, len); + if (payload_crc != payload_crc_computed) + goto payload_crc_err; + } + break; + default: + return -EINVAL; + } + return 0; + +payload_crc_err: + LOGP(DLIUUP, LOGL_NOTICE, "Payload Checksum error (pdu type %u): rx 0x%02x vs exp 0x%02x\n", + pdu_type, payload_crc, payload_crc_computed); + return -EIO; +} + +/* A IuUP TNL SAP primitive from transport (lower layer) */ +int osmo_iuup_tnl_prim_up(struct osmo_iuup_instance *inst, struct osmo_iuup_tnl_prim *itp) +{ + struct osmo_prim_hdr *oph = &itp->oph; + struct iuup_pdutype14_hdr *t14h; + int rc = 0; + + OSMO_ASSERT(oph->sap == SAP_IUUP_TNL); + + switch (OSMO_PRIM_HDR(oph)) { + case OSMO_PRIM(OSMO_IUUP_TNL_UNITDATA, PRIM_OP_INDICATION): + if (iuup_verify_pdu(msgb_l2(oph->msg), msgb_l2len(oph->msg)) < 0) { + LOGPFSML(inst->fi, LOGL_NOTICE, "Discarding invalid IuUP PDU: %s\n", + osmo_hexdump((const unsigned char *) msgb_l2(oph->msg), msgb_l2len(oph->msg))); + /* don't return error as the caller is not responsible for the PDU which + * was transmitted from some remote peer */ + return 0; + } + switch (iuup_get_pdu_type(msgb_l2(oph->msg))) { + case IUUP_PDU_T_DATA_CRC: + oph->msg->l3h = msgb_l2(oph->msg) + sizeof(struct iuup_pdutype0_hdr); + rc = osmo_fsm_inst_dispatch(inst->fi, IUUP_FSM_EVT_IUUP_DATA_IND, itp); + break; + case IUUP_PDU_T_DATA_NOCRC: + oph->msg->l3h = msgb_l2(oph->msg) + sizeof(struct iuup_pdutype1_hdr); + rc = osmo_fsm_inst_dispatch(inst->fi, IUUP_FSM_EVT_IUUP_DATA_IND, itp); + break; + case IUUP_PDU_T_CONTROL: + t14h = (struct iuup_pdutype14_hdr *) msgb_l2(oph->msg); + switch (t14h->ack_nack) { + case IUUP_AN_PROCEDURE: + switch (t14h->proc_ind) { + case IUUP_PROC_INIT: + rc = osmo_fsm_inst_dispatch(inst->fi, IUUP_FSM_EVT_INIT, itp); + break; + case IUUP_PROC_RATE_CTRL: + case IUUP_PROC_TIME_ALIGN: + case IUUP_PROC_ERR_EVENT: + LOGPFSML(inst->fi, LOGL_NOTICE, "Received Request for " + "unsupported IuUP procedure %u\n", t14h->proc_ind); + break; + default: + LOGPFSML(inst->fi, LOGL_NOTICE, "Received Request for " + "unknown IuUP procedure %u\n", t14h->proc_ind); + break; + } + break; + case IUUP_AN_ACK: + switch (t14h->proc_ind) { + case IUUP_PROC_INIT: + rc = osmo_fsm_inst_dispatch(inst->fi, + IUUP_FSM_EVT_LAST_INIT_ACK, itp); + break; + default: + LOGPFSML(inst->fi, LOGL_ERROR, "Received ACK for " + "unknown IuUP procedure %u\n", t14h->proc_ind); + break; + } + break; + case IUUP_AN_NACK: + switch (t14h->proc_ind) { + case IUUP_PROC_INIT: + rc = osmo_fsm_inst_dispatch(inst->fi, + IUUP_FSM_EVT_INIT_NACK, itp); + break; + default: + LOGPFSML(inst->fi, LOGL_ERROR, "Received NACK for " + "unknown IuUP procedure %u\n", t14h->proc_ind); + break; + } + break; + default: + LOGPFSML(inst->fi, LOGL_ERROR, "Received unknown IuUP ACK/NACK\n"); + break; + } + break; + default: + LOGPFSML(inst->fi, LOGL_NOTICE, "Received unknown IuUP PDU type %u\n", + iuup_get_pdu_type(msgb_l2(oph->msg))); + break; + } + break; + default: + /* exception: return an error code due to a wrong primitive */ + return -EINVAL; + } + + return rc; +} + +/* A IuUP RNL SAP primitive from user (higher layer) */ +int osmo_iuup_rnl_prim_down(struct osmo_iuup_instance *inst, struct osmo_iuup_rnl_prim *irp) +{ + struct osmo_prim_hdr *oph = &irp->oph; + int rc; + + OSMO_ASSERT(oph->sap == SAP_IUUP_RNL); + + switch (OSMO_PRIM_HDR(oph)) { + case OSMO_PRIM(OSMO_IUUP_RNL_CONFIG, PRIM_OP_REQUEST): + rc = osmo_fsm_inst_dispatch(inst->fi, IUUP_FSM_EVT_IUUP_CONFIG_REQ, irp); + msgb_free(irp->oph.msg); + break; + case OSMO_PRIM(OSMO_IUUP_RNL_DATA, PRIM_OP_REQUEST): + rc = osmo_fsm_inst_dispatch(inst->fi, IUUP_FSM_EVT_IUUP_DATA_REQ, irp); + if (rc != 0) + msgb_free(irp->oph.msg); + break; + case OSMO_PRIM(OSMO_IUUP_RNL_STATUS, PRIM_OP_REQUEST): + rc = osmo_fsm_inst_dispatch(inst->fi, IUUP_FSM_EVT_IUUP_STATUS_REQ, irp); + msgb_free(irp->oph.msg); + break; + default: + rc = -EINVAL; + msgb_free(irp->oph.msg); + } + return rc; +} + +struct osmo_iuup_instance *osmo_iuup_instance_alloc(void *ctx, const char *id) +{ + struct osmo_iuup_instance *iui; + iui = talloc_zero(ctx, struct osmo_iuup_instance); + if (!iui) + return NULL; + + iui->fi = osmo_fsm_inst_alloc(&iuup_fsm, NULL, iui, LOGL_DEBUG, id); + if (!iui->fi) + goto free_ret; + + return iui; +free_ret: + talloc_free(iui); + return NULL; +} + +void osmo_iuup_instance_free(struct osmo_iuup_instance *iui) +{ + if (!iui) + return; + + if (iui->fi) + osmo_fsm_inst_free(iui->fi); + iui->fi = NULL; + talloc_free(iui); +} + +void osmo_iuup_instance_set_user_prim_cb(struct osmo_iuup_instance *iui, osmo_prim_cb func, void *priv) +{ + iui->user_prim_cb = func; + iui->user_prim_priv = priv; +} +void osmo_iuup_instance_set_transport_prim_cb(struct osmo_iuup_instance *iui, osmo_prim_cb func, void *priv) +{ + iui->transport_prim_cb = func; + iui->transport_prim_priv = priv; +} + +static __attribute__((constructor)) void on_dso_load_iuup_fsm(void) +{ + OSMO_ASSERT(osmo_fsm_register(&iuup_fsm) == 0); +} diff -Nru libosmocore-1.6.0/src/gsm/kasumi.c libosmocore-1.7.0/src/gsm/kasumi.c --- libosmocore-1.6.0/src/gsm/kasumi.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/gsm/kasumi.c 2022-06-28 15:00:51.000000000 +0000 @@ -16,10 +16,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 diff -Nru libosmocore-1.6.0/src/gsm/kdf.c libosmocore-1.7.0/src/gsm/kdf.c --- libosmocore-1.6.0/src/gsm/kdf.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/gsm/kdf.c 2022-06-28 15:00:51.000000000 +0000 @@ -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 diff -Nru libosmocore-1.6.0/src/gsm/lapd_core.c libosmocore-1.7.0/src/gsm/lapd_core.c --- libosmocore-1.6.0/src/gsm/lapd_core.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/gsm/lapd_core.c 2022-06-28 15:00:51.000000000 +0000 @@ -18,10 +18,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. - * */ /*! \addtogroup lapd @@ -946,7 +942,7 @@ dl->cont_res = lapd_msgb_alloc(length, "CONT RES"); memcpy(msgb_put(dl->cont_res, length), msg->l3h, length); - LOGDL(dl, LOGL_NOTICE, "Store content res.\n"); + LOGDL(dl, LOGL_INFO, "Store content res.\n"); } /* send notification to L3 */ if (length == 0) { diff -Nru libosmocore-1.6.0/src/gsm/lapdm.c libosmocore-1.7.0/src/gsm/lapdm.c --- libosmocore-1.6.0/src/gsm/lapdm.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/gsm/lapdm.c 2022-06-28 15:00:51.000000000 +0000 @@ -19,10 +19,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. - * */ /*! \addtogroup lapdm diff -Nru libosmocore-1.6.0/src/gsm/libosmogsm.map libosmocore-1.7.0/src/gsm/libosmogsm.map --- libosmocore-1.6.0/src/gsm/libosmogsm.map 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/gsm/libosmogsm.map 2022-06-28 15:00:51.000000000 +0000 @@ -771,5 +771,16 @@ osmo_gad_raw_write; osmo_gad_type_names; +osmo_iuup_compute_header_crc; +osmo_iuup_compute_payload_crc; +osmo_iuup_instance_alloc; +osmo_iuup_instance_free; +osmo_iuup_instance_set_user_prim_cb; +osmo_iuup_instance_set_transport_prim_cb; +osmo_iuup_tnl_prim_up; +osmo_iuup_rnl_prim_down; +osmo_iuup_rnl_prim_alloc; +osmo_iuup_tnl_prim_alloc; + local: *; }; diff -Nru libosmocore-1.6.0/src/gsm/Makefile.am libosmocore-1.7.0/src/gsm/Makefile.am --- libosmocore-1.6.0/src/gsm/Makefile.am 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/gsm/Makefile.am 2022-06-28 15:00:51.000000000 +0000 @@ -1,7 +1,7 @@ # This is _NOT_ the library release version, it's an API version. # Please read chapter "Library interface versions" of the libtool documentation # before making any modifications: https://www.gnu.org/software/libtool/manual/html_node/Versioning.html -LIBVERSION=17:0:0 +LIBVERSION=18:0:0 AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include $(TALLOC_CFLAGS) AM_CFLAGS = -Wall ${GCC_FVISIBILITY_HIDDEN} @@ -33,7 +33,7 @@ gsup.c gsup_sms.c gprs_gea.c gsm0503_conv.c oap.c gsm0808_utils.c \ gsm23003.c gsm23236.c mncc.c bts_features.c oap_client.c \ gsm29118.c gsm48_rest_octets.c cbsp.c gsm48049.c i460_mux.c \ - gad.c bsslap.c bssmap_le.c kdf.c + gad.c bsslap.c bssmap_le.c kdf.c iuup.c libgsmint_la_LDFLAGS = -no-undefined libgsmint_la_LIBADD = $(top_builddir)/src/libosmocore.la diff -Nru libosmocore-1.6.0/src/gsm/rsl.c libosmocore-1.7.0/src/gsm/rsl.c --- libosmocore-1.6.0/src/gsm/rsl.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/gsm/rsl.c 2022-06-28 15:00:51.000000000 +0000 @@ -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 @@ -129,6 +125,7 @@ [RSL_IE_OSMO_REP_ACCH_CAP] = { TLV_TYPE_TLV }, [RSL_IE_OSMO_TRAINING_SEQUENCE] = { TLV_TYPE_TLV }, [RSL_IE_OSMO_TEMP_OVP_ACCH_CAP] = { TLV_TYPE_TLV }, + [RSL_IE_IPAC_SRTP_CONFIG] = { TLV_TYPE_TLV }, [RSL_IE_IPAC_PROXY_UDP] = { TLV_TYPE_FIXED, 2 }, [RSL_IE_IPAC_BSCMPL_TOUT] = { TLV_TYPE_TV }, [RSL_IE_IPAC_REMOTE_IP] = { TLV_TYPE_FIXED, 4 }, @@ -137,6 +134,8 @@ [RSL_IE_IPAC_LOCAL_PORT] = { TLV_TYPE_FIXED, 2 }, [RSL_IE_IPAC_SPEECH_MODE] = { TLV_TYPE_TV }, [RSL_IE_IPAC_LOCAL_IP] = { TLV_TYPE_FIXED, 4 }, + [RSL_IE_IPAC_CONN_STAT] = { TLV_TYPE_TLV, 28 }, + [RSL_IE_IPAC_HO_C_PARMS] = { TLV_TYPE_TLV }, [RSL_IE_IPAC_CONN_ID] = { TLV_TYPE_FIXED, 2 }, [RSL_IE_IPAC_RTP_CSD_FMT] = { TLV_TYPE_TV }, [RSL_IE_IPAC_RTP_JIT_BUF] = { TLV_TYPE_FIXED, 2 }, diff -Nru libosmocore-1.6.0/src/gsm/rxlev_stat.c libosmocore-1.7.0/src/gsm/rxlev_stat.c --- libosmocore-1.6.0/src/gsm/rxlev_stat.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/gsm/rxlev_stat.c 2022-06-28 15:00:51.000000000 +0000 @@ -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 diff -Nru libosmocore-1.6.0/src/gsmtap_util.c libosmocore-1.7.0/src/gsmtap_util.c --- libosmocore-1.6.0/src/gsmtap_util.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/gsmtap_util.c 2022-06-28 15:00:51.000000000 +0000 @@ -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 "../config.h" @@ -323,6 +319,20 @@ } } +/*! Send a \ref msgb through a GSMTAP source; free the message even if tx queue full. + * \param[in] gti GSMTAP instance + * \param[in] msg message buffer; always freed, caller must not reference it later. + * \return 0 in case of success; negative in case of error + */ +int gsmtap_sendmsg_free(struct gsmtap_inst *gti, struct msgb *msg) +{ + int rc; + rc = gsmtap_sendmsg(gti, msg); + if (rc < 0) + msgb_free(msg); + return rc; +} + /*! send an arbitrary type through GSMTAP. * See \ref gsmtap_makemsg_ex for arguments */ @@ -476,6 +486,22 @@ return gti; } +void gsmtap_source_free(struct gsmtap_inst *gti) +{ + if (gti->ofd_wq_mode) { + osmo_fd_unregister(>i->wq.bfd); + osmo_wqueue_clear(>i->wq); + + if (gti->sink_ofd.fd != -1) { + osmo_fd_unregister(>i->sink_ofd); + close(gti->sink_ofd.fd); + } + } + + close(gti->wq.bfd.fd); + talloc_free(gti); +} + #endif /* HAVE_SYS_SOCKET_H */ const struct value_string gsmtap_gsm_channel_names[] = { diff -Nru libosmocore-1.6.0/src/isdnhdlc.c libosmocore-1.7.0/src/isdnhdlc.c --- libosmocore-1.6.0/src/isdnhdlc.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/isdnhdlc.c 2022-06-28 15:00:51.000000000 +0000 @@ -18,10 +18,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * 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., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include diff -Nru libosmocore-1.6.0/src/it_q.c libosmocore-1.7.0/src/it_q.c --- libosmocore-1.6.0/src/it_q.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/it_q.c 2022-06-28 15:00:51.000000000 +0000 @@ -14,11 +14,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * 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. */ /*! \addtogroup it_q diff -Nru libosmocore-1.6.0/src/logging.c libosmocore-1.7.0/src/logging.c --- libosmocore-1.6.0/src/logging.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/logging.c 2022-06-28 15:00:51.000000000 +0000 @@ -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. - * */ /*! \addtogroup logging @@ -71,6 +67,7 @@ #include #include #include +#include #include /* for LOGGING_STR. */ @@ -298,6 +295,18 @@ .enabled = 1, .loglevel = LOGL_NOTICE, .color = "\033[38;5;63m", }, + [INT2IDX(DLIUUP)] = { + .name = "DLIUUP", + .description = "Iu UP layer", + .enabled = 1, .loglevel = LOGL_NOTICE, + .color = "\033[38;5;65m", + }, + [INT2IDX(DLPFCP)] = { + .name = "DLPFCP", + .description = "libosmo-pfcp Packet Forwarding Control Protocol", + .enabled = 1, .loglevel = LOGL_NOTICE, + .color = "\033[38;5;51m", + }, }; void assert_loginfo(const char *src) @@ -571,19 +580,21 @@ * message in '\n'. If so, nip the last '\n' away, insert the source file info and re-append an * '\n'. All this to allow LOGP("start..."); LOGPC("...end\n") constructs. */ if (target->print_filename_pos == LOG_FILENAME_POS_LINE_END - && offset > 0 && buf[offset-1] == '\n') { + && offset > 0 && buf[offset - 1] == '\n') { switch (target->print_filename2) { case LOG_FILENAME_NONE: break; case LOG_FILENAME_PATH: - offset --; + offset--; + len--; ret = snprintf(buf + offset, rem, " (%s:%d)\n", file, line); if (ret < 0) goto err; OSMO_SNPRINTF_RET(ret, rem, offset, len); break; case LOG_FILENAME_BASENAME: - offset --; + offset--; + len--; ret = snprintf(buf + offset, rem, " (%s:%d)\n", const_basename(file), line); if (ret < 0) goto err; @@ -599,7 +610,8 @@ OSMO_SNPRINTF_RET(ret, rem, offset, len); } err: - buf[buf_len-1] = '\0'; + len = OSMO_MIN(buf_len - 1, len); + buf[len] = '\0'; return len; } @@ -744,6 +756,18 @@ TRACE(LIBOSMOCORE_LOG_DONE()); } +/* This logging function is used as a fallback when the logging framework is + * not is not properly initialized. */ +void logp_stub(const char *file, int line, int cont, const char *format, ...) +{ + va_list ap; + if (!cont) + fprintf(stderr, "%s:%d ", file, line); + va_start(ap, format); + vfprintf(stderr, format, ap); + va_end(ap); +} + /*! Register a new log target with the logging core * \param[in] target Log target to be registered */ @@ -992,7 +1016,10 @@ } /* if we reach here, either we already had elements in the write_queue, or the synchronous write * failed: enqueue the message to the write_queue (backlog) */ - osmo_wqueue_enqueue_quiet(target->tgt_file.wqueue, msg); + if (osmo_wqueue_enqueue_quiet(target->tgt_file.wqueue, msg) < 0) { + msgb_free(msg); + /* TODO: increment some counter so we can see that messages were dropped */ + } } #endif @@ -1252,7 +1279,7 @@ * \returns Log target (if found), NULL otherwise * Must be called with mutex osmo_log_tgt_mutex held, see log_tgt_mutex_lock. */ -struct log_target *log_target_find(int type, const char *fname) +struct log_target *log_target_find(enum log_target_type type, const char *fname) { struct log_target *tgt; @@ -1307,6 +1334,9 @@ talloc_free((void *)target->tgt_file.fname); target->tgt_file.fname = NULL; break; + case LOG_TGT_TYPE_GSMTAP: + gsmtap_source_free(target->tgt_gsmtap.gsmtap_inst); + break; #ifdef HAVE_SYSLOG_H case LOG_TGT_TYPE_SYSLOG: closelog(); diff -Nru libosmocore-1.6.0/src/logging_gsmtap.c libosmocore-1.7.0/src/logging_gsmtap.c --- libosmocore-1.6.0/src/logging_gsmtap.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/logging_gsmtap.c 2022-06-28 15:00:51.000000000 +0000 @@ -21,10 +21,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. - * */ /*! \addtogroup logging diff -Nru libosmocore-1.6.0/src/loggingrb.c libosmocore-1.7.0/src/loggingrb.c --- libosmocore-1.6.0/src/loggingrb.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/loggingrb.c 2022-06-28 15:00:51.000000000 +0000 @@ -16,10 +16,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. - * */ /*! \addtogroup loggingrb diff -Nru libosmocore-1.6.0/src/logging_syslog.c libosmocore-1.7.0/src/logging_syslog.c --- libosmocore-1.6.0/src/logging_syslog.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/logging_syslog.c 2022-06-28 15:00:51.000000000 +0000 @@ -16,10 +16,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. - * */ /*! \addtogroup logging diff -Nru libosmocore-1.6.0/src/logging_systemd.c libosmocore-1.7.0/src/logging_systemd.c --- libosmocore-1.6.0/src/logging_systemd.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/logging_systemd.c 2022-06-28 15:00:51.000000000 +0000 @@ -14,10 +14,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. - * */ /*! \addtogroup logging diff -Nru libosmocore-1.6.0/src/macaddr.c libosmocore-1.7.0/src/macaddr.c --- libosmocore-1.6.0/src/macaddr.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/macaddr.c 2022-06-28 15:00:51.000000000 +0000 @@ -18,10 +18,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. - * */ /*! \addtogroup utils diff -Nru libosmocore-1.6.0/src/Makefile.am libosmocore-1.7.0/src/Makefile.am --- libosmocore-1.6.0/src/Makefile.am 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/Makefile.am 2022-06-28 15:00:51.000000000 +0000 @@ -1,7 +1,7 @@ # This is _NOT_ the library release version, it's an API version. # Please read chapter "Library interface versions" of the libtool documentation # before making any modifications: https://www.gnu.org/software/libtool/manual/html_node/Versioning.html -LIBVERSION=18:0:0 +LIBVERSION=19:0:0 AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include AM_CFLAGS = -Wall $(TALLOC_CFLAGS) $(PTHREAD_CFLAGS) $(LIBSCTP_CFLAGS) $(LIBMNL_CFLAGS) @@ -22,6 +22,7 @@ conv.c application.c rbtree.c strrb.c \ loggingrb.c crc8gen.c crc16gen.c crc32gen.c crc64gen.c \ macaddr.c stat_item.c stats.c stats_statsd.c prim.c \ + stats_tcp.c \ conv_acc.c conv_acc_generic.c sercomm.c prbs.c \ isdnhdlc.c \ tdef.c \ diff -Nru libosmocore-1.6.0/src/mnl.c libosmocore-1.7.0/src/mnl.c --- libosmocore-1.6.0/src/mnl.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/mnl.c 2022-06-28 15:00:51.000000000 +0000 @@ -21,11 +21,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * 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 diff -Nru libosmocore-1.6.0/src/msgb.c libosmocore-1.7.0/src/msgb.c --- libosmocore-1.6.0/src/msgb.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/msgb.c 2022-06-28 15:00:51.000000000 +0000 @@ -14,10 +14,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. - * */ /*! \addtogroup msgb @@ -430,11 +426,11 @@ */ char *msgb_hexdump_buf(char *buf, size_t buf_len, const struct msgb *msg) { - int buf_offs = 0; + unsigned int buf_offs = 0; int nchars; const unsigned char *start = msg->data; const unsigned char *lxhs[4]; - int i; + unsigned int i; lxhs[0] = msg->l1h; lxhs[1] = msg->l2h; diff -Nru libosmocore-1.6.0/src/msgfile.c libosmocore-1.7.0/src/msgfile.c --- libosmocore-1.6.0/src/msgfile.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/msgfile.c 2022-06-28 15:00:51.000000000 +0000 @@ -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. - * */ #define _WITH_GETLINE diff -Nru libosmocore-1.6.0/src/panic.c libosmocore-1.7.0/src/panic.c --- libosmocore-1.6.0/src/panic.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/panic.c 2022-06-28 15:00:51.000000000 +0000 @@ -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. - * */ /*! \addtogroup utils diff -Nru libosmocore-1.6.0/src/plugin.c libosmocore-1.7.0/src/plugin.c --- libosmocore-1.6.0/src/plugin.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/plugin.c 2022-06-28 15:00:51.000000000 +0000 @@ -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. - * */ /*! \addtogroup utils diff -Nru libosmocore-1.6.0/src/rate_ctr.c libosmocore-1.7.0/src/rate_ctr.c --- libosmocore-1.6.0/src/rate_ctr.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/rate_ctr.c 2022-06-28 15:00:51.000000000 +0000 @@ -14,10 +14,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. - * */ /*! \addtogroup rate_ctr diff -Nru libosmocore-1.6.0/src/rbtree.c libosmocore-1.7.0/src/rbtree.c --- libosmocore-1.6.0/src/rbtree.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/rbtree.c 2022-06-28 15:00:51.000000000 +0000 @@ -15,11 +15,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 - linux/lib/rbtree.c */ diff -Nru libosmocore-1.6.0/src/select.c libosmocore-1.7.0/src/select.c --- libosmocore-1.6.0/src/select.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/select.c 2022-06-28 15:00:51.000000000 +0000 @@ -18,11 +18,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * 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 @@ -38,6 +33,8 @@ #include #include #include +#include +#include #include "../config.h" @@ -186,6 +183,9 @@ #ifndef FORCE_IO_SELECT g_poll.num_registered--; #endif /* FORCE_IO_SELECT */ + + /* If existent, free any statistical data */ + osmo_stats_tcp_osmo_fd_unregister(fd); } /*! Close a file descriptor, mark it as closed + unregister from select loop abstraction @@ -316,7 +316,7 @@ } /* iterate over first n_fd entries of g_poll.poll + dispatch */ -static int poll_disp_fds(int n_fd) +static int poll_disp_fds(unsigned int n_fd) { struct osmo_fd *ufd; unsigned int i; @@ -372,14 +372,20 @@ { unsigned int n_poll; int rc; + int timeout = 0; /* prepare read and write fdsets */ n_poll = poll_fill_fds(); - if (!polling) + if (!polling) { osmo_timers_prepare(); + timeout = osmo_timers_nearest_ms(); + + if (_osmo_select_shutdown_requested && timeout == -1) + timeout = 0; + } - rc = poll(g_poll.poll, n_poll, polling ? 0 : osmo_timers_nearest_ms()); + rc = poll(g_poll.poll, n_poll, timeout); if (rc < 0) return 0; diff -Nru libosmocore-1.6.0/src/sercomm.c libosmocore-1.7.0/src/sercomm.c --- libosmocore-1.6.0/src/sercomm.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/sercomm.c 2022-06-28 15:00:51.000000000 +0000 @@ -14,10 +14,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. - * */ /*! \addtogroup sercomm diff -Nru libosmocore-1.6.0/src/serial.c libosmocore-1.7.0/src/serial.c --- libosmocore-1.6.0/src/serial.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/serial.c 2022-06-28 15:00:51.000000000 +0000 @@ -16,10 +16,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * 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. */ /*! \addtogroup serial diff -Nru libosmocore-1.6.0/src/signal.c libosmocore-1.7.0/src/signal.c --- libosmocore-1.6.0/src/signal.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/signal.c 2022-06-28 15:00:51.000000000 +0000 @@ -16,10 +16,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 diff -Nru libosmocore-1.6.0/src/sim/card_fs_hpsim.c libosmocore-1.7.0/src/sim/card_fs_hpsim.c --- libosmocore-1.6.0/src/sim/card_fs_hpsim.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/sim/card_fs_hpsim.c 2022-06-28 15:00:51.000000000 +0000 @@ -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. - * */ diff -Nru libosmocore-1.6.0/src/sim/card_fs_isim.c libosmocore-1.7.0/src/sim/card_fs_isim.c --- libosmocore-1.6.0/src/sim/card_fs_isim.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/sim/card_fs_isim.c 2022-06-28 15:00:51.000000000 +0000 @@ -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. - * */ diff -Nru libosmocore-1.6.0/src/sim/card_fs_sim.c libosmocore-1.7.0/src/sim/card_fs_sim.c --- libosmocore-1.6.0/src/sim/card_fs_sim.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/sim/card_fs_sim.c 2022-06-28 15:00:51.000000000 +0000 @@ -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 diff -Nru libosmocore-1.6.0/src/sim/card_fs_tetra.c libosmocore-1.7.0/src/sim/card_fs_tetra.c --- libosmocore-1.6.0/src/sim/card_fs_tetra.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/sim/card_fs_tetra.c 2022-06-28 15:00:51.000000000 +0000 @@ -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 diff -Nru libosmocore-1.6.0/src/sim/card_fs_uicc.c libosmocore-1.7.0/src/sim/card_fs_uicc.c --- libosmocore-1.6.0/src/sim/card_fs_uicc.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/sim/card_fs_uicc.c 2022-06-28 15:00:51.000000000 +0000 @@ -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. - * */ diff -Nru libosmocore-1.6.0/src/sim/card_fs_usim.c libosmocore-1.7.0/src/sim/card_fs_usim.c --- libosmocore-1.6.0/src/sim/card_fs_usim.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/sim/card_fs_usim.c 2022-06-28 15:00:51.000000000 +0000 @@ -15,10 +15,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. - * */ diff -Nru libosmocore-1.6.0/src/sim/class_tables.c libosmocore-1.7.0/src/sim/class_tables.c --- libosmocore-1.6.0/src/sim/class_tables.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/sim/class_tables.c 2022-06-28 15:00:51.000000000 +0000 @@ -13,10 +13,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include @@ -177,6 +173,24 @@ return 0; } +static int gp_cla_ins_helper(const struct osim_cla_ins_case *cic, + const uint8_t *hdr) +{ + uint8_t ins = hdr[1]; + uint8_t p1 = hdr[2]; + + switch (ins) { + case 0xE2: /* STORE DATA */ + switch (p1 & 0x01) { + case 1: + return 4; + default: + return 3; + } + } + return 0; +} + /* ETSI TS 102 221, Table 10.5, CLA = 0x8x, 0xCx or 0xEx */ static const uint8_t uicc_ins_tbl_8ce[256] = { [0xF2] = 2, /* STATUS */ @@ -194,6 +208,19 @@ [0x14] = 3, /* TERMINAL RESPONSE */ }; +/* Card Specification v2.3.1*/ +static const uint8_t gp_ins_tbl_8ce[256] = { + [0xE4] = 4, /* DELETE */ + [0xE2] = 0x80, /* STORE DATA */ + [0xCA] = 4, /* GET DATA */ + [0xCB] = 4, /* GET DATA */ + [0xF2] = 4, /* GET STATUS */ + [0xE6] = 4, /* INSTALL */ + [0xE8] = 4, /* LOAD */ + [0xD8] = 4, /* PUT KEY */ + [0xF0] = 3, /* SET STATUS */ +}; + static const struct osim_cla_ins_case uicc_ins_case[] = { { .cla = 0x80, @@ -226,6 +253,21 @@ .cla = 0xE0, .cla_mask = 0xF0, .ins_tbl = uicc_ins_tbl_8ce, + }, { + .cla = 0x80, + .cla_mask = 0xF0, + .helper = gp_cla_ins_helper, + .ins_tbl = gp_ins_tbl_8ce, + }, { + .cla = 0xC0, + .cla_mask = 0xF0, + .helper = gp_cla_ins_helper, + .ins_tbl = gp_ins_tbl_8ce, + }, { + .cla = 0xE0, + .cla_mask = 0xF0, + .helper = gp_cla_ins_helper, + .ins_tbl = gp_ins_tbl_8ce, }, }; @@ -273,7 +315,23 @@ .cla = 0xE0, .cla_mask = 0xF0, .ins_tbl = uicc_ins_tbl_8ce, + }, { + .cla = 0x80, + .cla_mask = 0xF0, + .helper = gp_cla_ins_helper, + .ins_tbl = gp_ins_tbl_8ce, + }, { + .cla = 0xC0, + .cla_mask = 0xF0, + .helper = gp_cla_ins_helper, + .ins_tbl = gp_ins_tbl_8ce, + }, { + .cla = 0xE0, + .cla_mask = 0xF0, + .helper = gp_cla_ins_helper, + .ins_tbl = gp_ins_tbl_8ce, }, + }; const struct osim_cla_ins_card_profile osim_uicc_sim_cic_profile = { @@ -305,7 +363,7 @@ case 0x80: return cic->helper(cic, hdr); case 0x00: - /* continue with fruther cic, rather than abort + /* continue with further cic, rather than abort * now */ continue; default: diff -Nru libosmocore-1.6.0/src/sim/core.c libosmocore-1.7.0/src/sim/core.c --- libosmocore-1.6.0/src/sim/core.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/sim/core.c 2022-06-28 15:00:51.000000000 +0000 @@ -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. - * */ diff -Nru libosmocore-1.6.0/src/sim/Makefile.am libosmocore-1.7.0/src/sim/Makefile.am --- libosmocore-1.6.0/src/sim/Makefile.am 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/sim/Makefile.am 2022-06-28 15:00:51.000000000 +0000 @@ -1,7 +1,7 @@ # This is _NOT_ the library release version, it's an API version. # Please read chapter "Library interface versions" of the libtool documentation # before making any modifications: https://www.gnu.org/software/libtool/manual/html_node/Versioning.html -LIBVERSION=3:0:1 +LIBVERSION=3:1:1 AM_CPPFLAGS = $(all_includes) -I$(top_srcdir)/include -I$(top_builddir)/include AM_CFLAGS = -fPIC -Wall $(TALLOC_CFLAGS) diff -Nru libosmocore-1.6.0/src/sim/reader.c libosmocore-1.7.0/src/sim/reader.c --- libosmocore-1.6.0/src/sim/reader.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/sim/reader.c 2022-06-28 15:00:51.000000000 +0000 @@ -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. - * */ @@ -44,7 +40,7 @@ { int ret; - if (!msgb_apdu_de(resp) || msgb_apdu_le(resp) < 2) + if (!resp->l2h || msgb_apdu_le(resp) < 2) return -EIO; ret = msgb_get_u16(resp); diff -Nru libosmocore-1.6.0/src/sim/reader_pcsc.c libosmocore-1.7.0/src/sim/reader_pcsc.c --- libosmocore-1.6.0/src/sim/reader_pcsc.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/sim/reader_pcsc.c 2022-06-28 15:00:51.000000000 +0000 @@ -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. - * */ diff -Nru libosmocore-1.6.0/src/sockaddr_str.c libosmocore-1.7.0/src/sockaddr_str.c --- libosmocore-1.6.0/src/sockaddr_str.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/sockaddr_str.c 2022-06-28 15:00:51.000000000 +0000 @@ -20,10 +20,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 "config.h" diff -Nru libosmocore-1.6.0/src/socket.c libosmocore-1.7.0/src/socket.c --- libosmocore-1.6.0/src/socket.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/socket.c 2022-06-28 15:00:51.000000000 +0000 @@ -15,10 +15,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 "../config.h" @@ -118,7 +114,7 @@ static int addrinfo_helper_multi(struct addrinfo **addrinfo, uint16_t family, uint16_t type, uint8_t proto, const char **hosts, size_t host_cnt, uint16_t port, bool passive) { - int i, j; + unsigned int i, j; for (i = 0; i < host_cnt; i++) { addrinfo[i] = addrinfo_helper(family, type, proto, hosts[i], port, passive); @@ -214,7 +210,8 @@ static int multiaddr_snprintf(char* buf, size_t buf_len, const char **hosts, size_t host_cnt) { int len = 0, offset = 0, rem = buf_len; - int ret, i; + size_t i; + int ret; char *after; if (buf_len < 3) @@ -487,8 +484,8 @@ } #define _SOCKADDR_TO_STR(dest, sockaddr) do { \ - if (osmo_sockaddr_str_from_sockaddr(&dest, &sockaddr->u.sas)) \ - osmo_strlcpy(dest.ip, "Invalid IP", 11); \ + if (osmo_sockaddr_str_from_sockaddr(dest, &sockaddr->u.sas)) \ + osmo_strlcpy((dest)->ip, "Invalid IP", 11); \ } while (0) /*! Initialize a socket (including bind and/or connect) @@ -523,7 +520,8 @@ unsigned int flags) { int sfd = -1, rc, on = 1; - struct osmo_sockaddr_str sastr = {}; + struct osmo_sockaddr_str _sastr = {}; + struct osmo_sockaddr_str *sastr = &_sastr; if ((flags & (OSMO_SOCK_F_BIND | OSMO_SOCK_F_CONNECT)) == 0) { LOGP(DLGLOBAL, LOGL_ERROR, "invalid: you have to specify either " @@ -554,8 +552,8 @@ sfd = socket_helper_osa(local, type, proto, flags); if (sfd < 0) { _SOCKADDR_TO_STR(sastr, local); - LOGP(DLGLOBAL, LOGL_ERROR, "no suitable local addr found for: %s:%u\n", - sastr.ip, sastr.port); + LOGP(DLGLOBAL, LOGL_ERROR, "no suitable local addr found for: " OSMO_SOCKADDR_STR_FMT "\n", + OSMO_SOCKADDR_STR_FMT_ARGS(sastr)); return -ENODEV; } @@ -565,10 +563,8 @@ if (rc < 0) { _SOCKADDR_TO_STR(sastr, local); LOGP(DLGLOBAL, LOGL_ERROR, - "cannot setsockopt socket:" - " %s:%u: %s\n", - sastr.ip, sastr.port, - strerror(errno)); + "cannot setsockopt socket: " OSMO_SOCKADDR_STR_FMT ": %s\n", + OSMO_SOCKADDR_STR_FMT_ARGS(sastr), strerror(errno)); close(sfd); return rc; } @@ -576,8 +572,8 @@ if (bind(sfd, &local->u.sa, sizeof(struct osmo_sockaddr)) == -1) { _SOCKADDR_TO_STR(sastr, local); - LOGP(DLGLOBAL, LOGL_ERROR, "unable to bind socket: %s:%u: %s\n", - sastr.ip, sastr.port, strerror(errno)); + LOGP(DLGLOBAL, LOGL_ERROR, "unable to bind socket: " OSMO_SOCKADDR_STR_FMT ": %s\n", + OSMO_SOCKADDR_STR_FMT_ARGS(sastr), strerror(errno)); close(sfd); return -1; } @@ -599,8 +595,8 @@ rc = connect(sfd, &remote->u.sa, sizeof(struct osmo_sockaddr)); if (rc != 0 && errno != EINPROGRESS) { _SOCKADDR_TO_STR(sastr, remote); - LOGP(DLGLOBAL, LOGL_ERROR, "unable to connect socket: %s:%u: %s\n", - sastr.ip, sastr.port, strerror(errno)); + LOGP(DLGLOBAL, LOGL_ERROR, "unable to connect socket: " OSMO_SOCKADDR_STR_FMT ": %s\n", + OSMO_SOCKADDR_STR_FMT_ARGS(sastr), strerror(errno)); close(sfd); return rc; } @@ -669,7 +665,7 @@ /* Build array of addresses taking first addrinfo result of the requested family * for each host in addrs_buf. */ static int addrinfo_to_sockaddr(uint16_t family, const struct addrinfo **result, - const char **hosts, int host_cont, + const char **hosts, unsigned int host_cont, uint8_t *addrs_buf, size_t addrs_buf_len) { size_t host_idx, offset = 0; const struct addrinfo *rp; @@ -725,7 +721,7 @@ { struct addrinfo *res_loc[OSMO_SOCK_MAX_ADDRS], *res_rem[OSMO_SOCK_MAX_ADDRS]; int sfd = -1, rc, on = 1; - int i; + unsigned int i; bool loc_has_v4addr, rem_has_v4addr; bool loc_has_v6addr, rem_has_v6addr; struct sockaddr_in6 addrs_buf[OSMO_SOCK_MAX_ADDRS]; @@ -1258,6 +1254,23 @@ return 0; } +/*! Set sockaddr port content (to network byte order). + * \param[out] sa sockaddr to set the port of. + * \param[in] port port nr to set. + */ +void osmo_sockaddr_set_port(struct sockaddr *sa, uint16_t port) +{ + struct osmo_sockaddr *osa = (struct osmo_sockaddr *)sa; + switch (osa->u.sa.sa_family) { + case AF_INET6: + osa->u.sin6.sin6_port = htons(port); + return; + case AF_INET: + osa->u.sin.sin_port = htons(port); + return; + } +} + /*! Initialize a unix domain socket (including bind/connect) * \param[in] type Socket type like SOCK_DGRAM, SOCK_STREAM * \param[in] proto Protocol like IPPROTO_TCP, IPPROTO_UDP @@ -1737,6 +1750,65 @@ return rc; } +/*! Copy the addr part, the IP address octets in network byte order, to a buffer. + * Useful for encoding network protocols. + * \param[out] dst Write octets to this buffer. + * \param[in] dst_maxlen Space available in buffer. + * \param[in] os Sockaddr to copy IP of. + * \return nr of octets written on success, negative on error. + */ +int osmo_sockaddr_to_octets(uint8_t *dst, size_t dst_maxlen, const struct osmo_sockaddr *os) +{ + const void *addr; + size_t len; + switch (os->u.sa.sa_family) { + case AF_INET: + addr = &os->u.sin.sin_addr; + len = sizeof(os->u.sin.sin_addr); + break; + case AF_INET6: + addr = &os->u.sin6.sin6_addr; + len = sizeof(os->u.sin6.sin6_addr); + break; + default: + return -ENOTSUP; + } + if (dst_maxlen < len) + return -ENOSPC; + memcpy(dst, addr, len); + return len; +} + +/*! Copy the addr part, the IP address octets in network byte order, from a buffer. + * Useful for decoding network protocols. + * \param[out] os Write IP address to this sockaddr. + * \param[in] src Source buffer to read IP address octets from. + * \param[in] src_len Number of octets to copy. + * \return number of octets read on success, negative on error. + */ +int osmo_sockaddr_from_octets(struct osmo_sockaddr *os, const void *src, size_t src_len) +{ + void *addr; + size_t len; + *os = (struct osmo_sockaddr){0}; + switch (src_len) { + case sizeof(os->u.sin.sin_addr): + os->u.sa.sa_family = AF_INET; + addr = &os->u.sin.sin_addr; + len = sizeof(os->u.sin.sin_addr); + break; + case sizeof(os->u.sin6.sin6_addr): + os->u.sin6.sin6_family = AF_INET6; + addr = &os->u.sin6.sin6_addr; + len = sizeof(os->u.sin6.sin6_addr); + break; + default: + return -ENOTSUP; + } + memcpy(addr, src, len); + return len; +} + /*! Compare two osmo_sockaddr. * \param[in] a * \param[in] b @@ -1779,52 +1851,68 @@ return osmo_sockaddr_to_str_buf(buf, sizeof(buf), sockaddr); } -/*! string-format a given osmo_sockaddr address into a user-supplied buffer +/*! string-format a given osmo_sockaddr address into a user-supplied buffer. + * Same as osmo_sockaddr_to_str_buf() but returns a would-be length in snprintf() style. * \param[in] buf user-supplied output buffer * \param[in] buf_len size of the user-supplied output buffer in bytes * \param[in] sockaddr the osmo_sockaddr to print - * \return pointer to the string on success; NULL on error + * \return number of characters that would be written if the buffer is large enough, like snprintf(). */ -char *osmo_sockaddr_to_str_buf(char *buf, size_t buf_len, - const struct osmo_sockaddr *sockaddr) +int osmo_sockaddr_to_str_buf2(char *buf, size_t buf_len, const struct osmo_sockaddr *sockaddr) { + struct osmo_strbuf sb = { .buf = buf, .len = buf_len }; uint16_t port = 0; - size_t written; - if (buf_len < 5) - return NULL; - if (!sockaddr) - return NULL; + if (!sockaddr) { + OSMO_STRBUF_PRINTF(sb, "NULL"); + return sb.chars_needed; + } switch (sockaddr->u.sa.sa_family) { case AF_INET: - written = osmo_sockaddr_to_str_and_uint(buf, buf_len, &port, &sockaddr->u.sa); - if (written + 1 >= buf_len && port) - return NULL; + OSMO_STRBUF_APPEND(sb, osmo_sockaddr_to_str_and_uint, &port, &sockaddr->u.sa); if (port) - snprintf(buf + written, buf_len - written, ":%u", port); + OSMO_STRBUF_PRINTF(sb, ":%u", port); break; case AF_INET6: - buf[0] = '['; - written = osmo_sockaddr_to_str_and_uint(buf + 1, buf_len - 1, &port, &sockaddr->u.sa); - if (written + 2 >= buf_len) - return NULL; - - if (written + 3 >= buf_len && port) - return NULL; - + OSMO_STRBUF_PRINTF(sb, "["); + OSMO_STRBUF_APPEND(sb, osmo_sockaddr_to_str_and_uint, &port, &sockaddr->u.sa); + OSMO_STRBUF_PRINTF(sb, "]"); if (port) - snprintf(buf + 1 + written, buf_len - written - 1, "]:%u", port); - else { - buf[written + 1] = ']'; - buf[written + 2] = 0; - } + OSMO_STRBUF_PRINTF(sb, ":%u", port); break; default: - snprintf(buf, buf_len, "unsupported family %d", sockaddr->u.sa.sa_family); - return buf; + OSMO_STRBUF_PRINTF(sb, "unsupported family %d", sockaddr->u.sa.sa_family); + break; } + return sb.chars_needed; +} + +/*! string-format a given osmo_sockaddr address into a talloc allocated buffer. + * Like osmo_sockaddr_to_str_buf2() but returns a talloc allocated string. + * \param[in] ctx talloc context to allocate from, e.g. OTC_SELECT. + * \param[in] sockaddr the osmo_sockaddr to print. + * \return human readable string. + */ +char *osmo_sockaddr_to_str_c(void *ctx, const struct osmo_sockaddr *sockaddr) +{ + OSMO_NAME_C_IMPL(ctx, 64, "ERROR", osmo_sockaddr_to_str_buf2, sockaddr) +} + +/*! string-format a given osmo_sockaddr address into a user-supplied buffer. + * Like osmo_sockaddr_to_str_buf2() but returns buf, or NULL if too short. + * \param[in] buf user-supplied output buffer + * \param[in] buf_len size of the user-supplied output buffer in bytes + * \param[in] sockaddr the osmo_sockaddr to print + * \return pointer to the string on success; NULL on error + */ +char *osmo_sockaddr_to_str_buf(char *buf, size_t buf_len, + const struct osmo_sockaddr *sockaddr) +{ + int chars_needed = osmo_sockaddr_to_str_buf2(buf, buf_len, sockaddr); + if (chars_needed >= buf_len) + return NULL; return buf; } diff -Nru libosmocore-1.6.0/src/stat_item.c libosmocore-1.7.0/src/stat_item.c --- libosmocore-1.6.0/src/stat_item.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/stat_item.c 2022-06-28 15:00:51.000000000 +0000 @@ -18,10 +18,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. - * */ /*! \addtogroup osmo_stat_item @@ -228,6 +224,9 @@ /*! Free the memory for the specified group of stat items */ void osmo_stat_item_group_free(struct osmo_stat_item_group *grp) { + if (!grp) + return; + llist_del(&grp->list); talloc_free(grp); } diff -Nru libosmocore-1.6.0/src/stats.c libosmocore-1.7.0/src/stats.c --- libosmocore-1.6.0/src/stats.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/stats.c 2022-06-28 15:00:51.000000000 +0000 @@ -16,10 +16,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. - * */ /*! \addtogroup stats @@ -89,6 +85,7 @@ #include #include #include +#include #ifdef HAVE_SYSTEMTAP /* include the generated probes header and put markers in code */ @@ -178,7 +175,7 @@ return 0; } -static int start_timer() +static int start_timer(void) { int rc; int interval = osmo_stats_config->interval; @@ -217,7 +214,9 @@ { struct osmo_stats_reporter *srep; srep = talloc_zero(osmo_stats_ctx, struct osmo_stats_reporter); - OSMO_ASSERT(srep); + if (!srep) + return NULL; + srep->type = type; if (name) srep->name = talloc_strdup(srep, name); @@ -244,6 +243,10 @@ osmo_stats_ctx = ctx; is_initialised = 1; start_timer(); + + /* Make sure that the tcp-stats interval timer also runs at its + * preconfigured rate. The vty might change this setting later. */ + osmo_stats_tcp_set_interval(osmo_tcp_stats_config->interval); } /*! Find a stats_reporter of given \a type and \a name. @@ -411,7 +414,7 @@ /*! Set the name prefix of a given stats_reporter. * \param[in] srep stats_reporter whose name prefix is to be set - * \param[in] prefix NAme perfix to pre-pend for any reported value + * \param[in] prefix Name prefix to pre-pend for any reported value * \returns 0 on success; negative on error */ int osmo_stats_reporter_set_name_prefix(struct osmo_stats_reporter *srep, const char *prefix) { @@ -485,6 +488,8 @@ } srep->buffer = msgb_alloc(buffer_size, "stats buffer"); + if (!srep->buffer) + goto failed; return 0; @@ -568,6 +573,8 @@ { struct osmo_stats_reporter *srep; srep = osmo_stats_reporter_alloc(OSMO_STATS_REPORTER_LOG, name); + if (!srep) + return NULL; srep->have_net_config = 0; @@ -757,7 +764,7 @@ /*** main reporting function ***/ -static void flush_all_reporters() +static void flush_all_reporters(void) { struct osmo_stats_reporter *srep; @@ -780,7 +787,7 @@ } } -int osmo_stats_report() +int osmo_stats_report(void) { /* per group actions */ TRACE(LIBOSMOCORE_STATS_START()); diff -Nru libosmocore-1.6.0/src/stats_statsd.c libosmocore-1.7.0/src/stats_statsd.c --- libosmocore-1.6.0/src/stats_statsd.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/stats_statsd.c 2022-06-28 15:00:51.000000000 +0000 @@ -15,10 +15,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. - * */ /*! \addtogroup stats @@ -58,6 +54,8 @@ { struct osmo_stats_reporter *srep; srep = osmo_stats_reporter_alloc(OSMO_STATS_REPORTER_STATSD, name); + if (!srep) + return NULL; srep->have_net_config = 1; diff -Nru libosmocore-1.6.0/src/stats_tcp.c libosmocore-1.7.0/src/stats_tcp.c --- libosmocore-1.6.0/src/stats_tcp.c 1970-01-01 00:00:00.000000000 +0000 +++ libosmocore-1.7.0/src/stats_tcp.c 2022-06-28 15:00:51.000000000 +0000 @@ -0,0 +1,325 @@ +/* + * (C) 2021 by sysmocom - s.f.m.c. GmbH + * Author: Philipp Maier + * All Rights Reserved + * + * SPDX-License-Identifier: GPL-2.0+ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + */ + +/*! \addtogroup stats + * @{ + * \file stats_tcp.c */ + +#include "config.h" +#if !defined(EMBEDDED) + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +static struct osmo_tcp_stats_config s_tcp_stats_config = { + .interval = TCP_STATS_DEFAULT_INTERVAL, +}; + +struct osmo_tcp_stats_config *osmo_tcp_stats_config = &s_tcp_stats_config; + +static struct osmo_timer_list stats_tcp_poll_timer; + +static LLIST_HEAD(stats_tcp); +static struct stats_tcp_entry *stats_tcp_entry_cur; +pthread_mutex_t stats_tcp_lock; + +struct stats_tcp_entry { + struct llist_head entry; + const struct osmo_fd *fd; + struct osmo_stat_item_group *stats_tcp; + const char *name; +}; + +enum { + STATS_TCP_UNACKED, + STATS_TCP_LOST, + STATS_TCP_RETRANS, + STATS_TCP_RTT, + STATS_TCP_RCV_RTT, + STATS_TCP_NOTSENT_BYTES, + STATS_TCP_RWND_LIMITED, + STATS_TCP_SNDBUF_LIMITED, + STATS_TCP_REORD_SEEN, +}; + +static struct osmo_stat_item_desc stats_tcp_item_desc[] = { + [STATS_TCP_UNACKED] = { "tcp:unacked", "unacknowledged packets", "", 60, 0 }, + [STATS_TCP_LOST] = { "tcp:lost", "lost packets", "", 60, 0 }, + [STATS_TCP_RETRANS] = { "tcp:retrans", "retransmitted packets", "", 60, 0 }, + [STATS_TCP_RTT] = { "tcp:rtt", "roundtrip-time", "", 60, 0 }, + [STATS_TCP_RCV_RTT] = { "tcp:rcv_rtt", "roundtrip-time (receive)", "", 60, 0 }, + [STATS_TCP_NOTSENT_BYTES] = { "tcp:notsent_bytes", "bytes not yet sent", "", 60, 0 }, + [STATS_TCP_RWND_LIMITED] = { "tcp:rwnd_limited", "time (usec) limited by receive window", "", 60, 0 }, + [STATS_TCP_SNDBUF_LIMITED] = { "tcp:sndbuf_limited", "Time (usec) limited by send buffer", "", 60, 0 }, + [STATS_TCP_REORD_SEEN] = { "tcp:reord_seen", "reordering events seen", "", 60, 0 }, +}; + +static struct osmo_stat_item_group_desc stats_tcp_desc = { + .group_name_prefix = "tcp", + .group_description = "stats tcp", + .class_id = OSMO_STATS_CLASS_GLOBAL, + .num_items = ARRAY_SIZE(stats_tcp_item_desc), + .item_desc = stats_tcp_item_desc, +}; + +static void fill_stats(struct stats_tcp_entry *stats_tcp_entry) +{ + int rc; + struct tcp_info tcp_info; + socklen_t tcp_info_len = sizeof(tcp_info); + char stat_name[256]; + + /* Do not fill in anything before the socket is connected to a remote end */ + if (osmo_sock_get_ip_and_port(stats_tcp_entry->fd->fd, NULL, 0, NULL, 0, false) != 0) + return; + + /* Gather TCP statistics and update the stats items */ + rc = getsockopt(stats_tcp_entry->fd->fd, IPPROTO_TCP, TCP_INFO, &tcp_info, &tcp_info_len); + if (rc < 0) + return; + + /* Create stats items if they do not exist yet */ + if (!stats_tcp_entry->stats_tcp) { + stats_tcp_entry->stats_tcp = + osmo_stat_item_group_alloc(stats_tcp_entry, &stats_tcp_desc, stats_tcp_entry->fd->fd); + OSMO_ASSERT(stats_tcp_entry->stats_tcp); + } + + /* Update statistics */ + if (stats_tcp_entry->name) + snprintf(stat_name, sizeof(stat_name), "%s", stats_tcp_entry->name); + else + snprintf(stat_name, sizeof(stat_name), "%s", osmo_sock_get_name2(stats_tcp_entry->fd->fd)); + osmo_stat_item_group_set_name(stats_tcp_entry->stats_tcp, stat_name); + + osmo_stat_item_set(osmo_stat_item_group_get_item(stats_tcp_entry->stats_tcp, STATS_TCP_UNACKED), + tcp_info.tcpi_unacked); + osmo_stat_item_set(osmo_stat_item_group_get_item(stats_tcp_entry->stats_tcp, STATS_TCP_LOST), + tcp_info.tcpi_lost); + osmo_stat_item_set(osmo_stat_item_group_get_item(stats_tcp_entry->stats_tcp, STATS_TCP_RETRANS), + tcp_info.tcpi_retrans); + osmo_stat_item_set(osmo_stat_item_group_get_item(stats_tcp_entry->stats_tcp, STATS_TCP_RTT), tcp_info.tcpi_rtt); + osmo_stat_item_set(osmo_stat_item_group_get_item(stats_tcp_entry->stats_tcp, STATS_TCP_RCV_RTT), + tcp_info.tcpi_rcv_rtt); +#if HAVE_TCP_INFO_TCPI_NOTSENT_BYTES == 1 + osmo_stat_item_set(osmo_stat_item_group_get_item(stats_tcp_entry->stats_tcp, STATS_TCP_NOTSENT_BYTES), + tcp_info.tcpi_notsent_bytes); +#else + osmo_stat_item_set(osmo_stat_item_group_get_item(stats_tcp_entry->stats_tcp, STATS_TCP_NOTSENT_BYTES), -1); +#endif + +#if HAVE_TCP_INFO_TCPI_RWND_LIMITED == 1 + osmo_stat_item_set(osmo_stat_item_group_get_item(stats_tcp_entry->stats_tcp, STATS_TCP_RWND_LIMITED), + tcp_info.tcpi_rwnd_limited); +#else + osmo_stat_item_set(osmo_stat_item_group_get_item(stats_tcp_entry->stats_tcp, STATS_TCP_RWND_LIMITED), -1); +#endif + +#if STATS_TCP_SNDBUF_LIMITED == 1 + osmo_stat_item_set(osmo_stat_item_group_get_item(stats_tcp_entry->stats_tcp, STATS_TCP_REORD_SEEN), + tcp_info.tcpi_sndbuf_limited); +#else + osmo_stat_item_set(osmo_stat_item_group_get_item(stats_tcp_entry->stats_tcp, STATS_TCP_REORD_SEEN), -1); +#endif + +#if HAVE_TCP_INFO_TCPI_REORD_SEEN == 1 + osmo_stat_item_set(osmo_stat_item_group_get_item(stats_tcp_entry->stats_tcp, STATS_TCP_REORD_SEEN), + tcp_info.tcpi_reord_seen); +#else + osmo_stat_item_set(osmo_stat_item_group_get_item(stats_tcp_entry->stats_tcp, STATS_TCP_REORD_SEEN), -1); +#endif + +} + +static bool is_tcp(const struct osmo_fd *fd) +{ + int rc; + struct stat fd_stat; + int so_protocol = 0; + socklen_t so_protocol_len = sizeof(so_protocol); + + /* Is this a socket? */ + rc = fstat(fd->fd, &fd_stat); + if (rc < 0) + return false; + if (!S_ISSOCK(fd_stat.st_mode)) + return false; + + /* Is it a TCP socket? */ + rc = getsockopt(fd->fd, SOL_SOCKET, SO_PROTOCOL, &so_protocol, &so_protocol_len); + if (rc < 0) + return false; + if (so_protocol == IPPROTO_TCP) + return true; + + return false; +} + +/*! Register an osmo_fd for TCP stats monitoring. + * \param[in] fd osmocom file descriptor to be registered. + * \param[in] human readbla name that is used as prefix for the related stats item. + * \returns 0 on success; negative in case of error. */ +int osmo_stats_tcp_osmo_fd_register(const struct osmo_fd *fd, const char *name) +{ + struct stats_tcp_entry *stats_tcp_entry; + + /* Only TCP sockets can be registered for monitoring, anything else will fall through. */ + if (!is_tcp(fd)) + return -EINVAL; + + /* When the osmo_fd is registered and unregistered properly there shouldn't be any leftovers from already closed + * osmo_fds in the stats_tcp list. But lets proactively make sure that any leftovers are cleaned up. */ + osmo_stats_tcp_osmo_fd_unregister(fd); + + /* Make a new list object, attach the osmo_fd... */ + stats_tcp_entry = talloc_zero(OTC_GLOBAL, struct stats_tcp_entry); + OSMO_ASSERT(stats_tcp_entry); + stats_tcp_entry->fd = fd; + stats_tcp_entry->name = talloc_strdup(stats_tcp_entry, name); + + pthread_mutex_lock(&stats_tcp_lock); + llist_add_tail(&stats_tcp_entry->entry, &stats_tcp); + pthread_mutex_unlock(&stats_tcp_lock); + + return 0; +} + +static void next_stats_tcp_entry(void) +{ + struct stats_tcp_entry *last; + + if (llist_empty(&stats_tcp)) { + stats_tcp_entry_cur = NULL; + return; + } + + last = (struct stats_tcp_entry *)llist_last_entry(&stats_tcp, struct stats_tcp_entry, entry); + + if (!stats_tcp_entry_cur || stats_tcp_entry_cur == last) + stats_tcp_entry_cur = + (struct stats_tcp_entry *)llist_first_entry(&stats_tcp, struct stats_tcp_entry, entry); + else + stats_tcp_entry_cur = + (struct stats_tcp_entry *)llist_entry(stats_tcp_entry_cur->entry.next, struct stats_tcp_entry, + entry); +} + +/*! Register an osmo_fd for TCP stats monitoring. + * \param[in] fd osmocom file descriptor to be unregistered. + * \returns 0 on success; negative in case of error. */ +int osmo_stats_tcp_osmo_fd_unregister(const struct osmo_fd *fd) +{ + struct stats_tcp_entry *stats_tcp_entry; + int rc = -EINVAL; + + pthread_mutex_lock(&stats_tcp_lock); + llist_for_each_entry(stats_tcp_entry, &stats_tcp, entry) { + if (fd->fd == stats_tcp_entry->fd->fd) { + /* In case we want to remove exactly that item which is also selected as the current itemy, we + * must designate either a different item or invalidate the current item. */ + if (stats_tcp_entry == stats_tcp_entry_cur) { + if (llist_count(&stats_tcp) > 2) + next_stats_tcp_entry(); + else + stats_tcp_entry_cur = NULL; + } + + /* Date item from list */ + llist_del(&stats_tcp_entry->entry); + osmo_stat_item_group_free(stats_tcp_entry->stats_tcp); + talloc_free(stats_tcp_entry); + rc = 0; + break; + } + } + pthread_mutex_unlock(&stats_tcp_lock); + + return rc; +} + +static void stats_tcp_poll_timer_cb(void *data) +{ + int i; + int batch_size; + int llist_size; + + pthread_mutex_lock(&stats_tcp_lock); + + /* Make sure we do not run over the same sockets multiple times if the + * configured llist_size is larger then the actual list */ + batch_size = osmo_tcp_stats_config->batch_size; + llist_size = llist_count(&stats_tcp); + if (llist_size < batch_size) + batch_size = llist_size; + + /* Process a batch of sockets */ + for (i = 0; i < batch_size; i++) { + next_stats_tcp_entry(); + if (stats_tcp_entry_cur) + fill_stats(stats_tcp_entry_cur); + } + + pthread_mutex_unlock(&stats_tcp_lock); + + if (osmo_tcp_stats_config->interval > 0) + osmo_timer_schedule(&stats_tcp_poll_timer, osmo_tcp_stats_config->interval, 0); +} + +/*! Set the polling interval (common for all sockets) + * \param[in] interval Poll interval in seconds + * \returns 0 on success; negative on error */ +int osmo_stats_tcp_set_interval(int interval) +{ + osmo_tcp_stats_config->interval = interval; + if (osmo_tcp_stats_config->interval > 0) + osmo_timer_schedule(&stats_tcp_poll_timer, osmo_tcp_stats_config->interval, 0); + return 0; +} + +static __attribute__((constructor)) +void on_dso_load_stats_tcp(void) +{ + stats_tcp_entry_cur = NULL; + pthread_mutex_init(&stats_tcp_lock, NULL); + + osmo_tcp_stats_config->interval = TCP_STATS_DEFAULT_INTERVAL; + osmo_tcp_stats_config->batch_size = TCP_STATS_DEFAULT_BATCH_SIZE; + + osmo_timer_setup(&stats_tcp_poll_timer, stats_tcp_poll_timer_cb, NULL); +} + +#endif /* !EMBEDDED */ + +/* @} */ diff -Nru libosmocore-1.6.0/src/strrb.c libosmocore-1.7.0/src/strrb.c --- libosmocore-1.6.0/src/strrb.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/strrb.c 2022-06-28 15:00:51.000000000 +0000 @@ -31,10 +31,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. - * */ /*! \addtogroup utils diff -Nru libosmocore-1.6.0/src/tdef.c libosmocore-1.7.0/src/tdef.c --- libosmocore-1.6.0/src/tdef.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/tdef.c 2022-06-28 15:00:51.000000000 +0000 @@ -52,18 +52,18 @@ * By keeping separate osmo_tdef arrays, several groups of timers can be kept * separately. The VTY tests in tests/tdef/ showcase different schemes: * - * - \ref tests/vty/tdef_vty_test_config_root.c: + * - \ref tests/tdef/tdef_vty_config_root_test.c: * Keep several timer definitions in separately named groups: showcase the * osmo_tdef_vty_groups*() API. Each timer group exists exactly once. * - * - \ref tests/vty/tdef_vty_test_config_subnode.c: + * - \ref tests/tdef/tdef_vty_config_subnode_test.c: * Keep a single list of timers without separate grouping. * Put this list on a specific subnode below the CONFIG_NODE. * There could be several separate subnodes with timers like this, i.e. * continuing from this example, sets of timers could be separated by placing * timers in specific config subnodes instead of using the global group name. * - * - \ref tests/vty/tdef_vty_test_dynamic.c: + * - \ref tests/tdef/tdef_vty_dynamic_test.c: * Dynamically allocate timer definitions per each new created object. * Thus there can be an arbitrary number of independent timer definitions, one * per allocated object. diff -Nru libosmocore-1.6.0/src/thread.c libosmocore-1.7.0/src/thread.c --- libosmocore-1.6.0/src/thread.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/thread.c 2022-06-28 15:00:51.000000000 +0000 @@ -14,10 +14,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. - * */ /*! \addtogroup thread diff -Nru libosmocore-1.6.0/src/time_cc.c libosmocore-1.7.0/src/time_cc.c --- libosmocore-1.6.0/src/time_cc.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/time_cc.c 2022-06-28 15:00:51.000000000 +0000 @@ -120,8 +120,6 @@ { uint64_t delta; uint64_t n; - if (!tc->cfg.rate_ctr) - return; /* We report a sum "rounded up", ahead of time. If the granularity period has not yet elapsed after the last * reporting, do not report again yet. */ if (tc->reported_sum > tc->sum) @@ -139,7 +137,8 @@ /* integer sanity, since rate_ctr_add() takes an int argument. */ if (n > INT_MAX) n = INT_MAX; - rate_ctr_add(tc->cfg.rate_ctr, n); + if (tc->cfg.rate_ctr) + rate_ctr_add(tc->cfg.rate_ctr, n); /* Store the increments of gran_usec that were counted. */ tc->reported_sum += n * GRAN_USEC(tc); } @@ -205,7 +204,7 @@ next_event = OSMO_MIN(next_event, next_forget_time); } /* Next rate_ctr increment? */ - if (tc->flag_state && tc->cfg.rate_ctr) { + if (tc->flag_state) { uint64_t next_inc = now + (tc->reported_sum - tc->sum) + ROUND_THRESHOLD_USEC(tc); next_event = OSMO_MIN(next_event, next_inc); } diff -Nru libosmocore-1.6.0/src/timer.c libosmocore-1.7.0/src/timer.c --- libosmocore-1.6.0/src/timer.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/timer.c 2022-06-28 15:00:51.000000000 +0000 @@ -19,10 +19,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. - * */ diff -Nru libosmocore-1.6.0/src/timer_clockgettime.c libosmocore-1.7.0/src/timer_clockgettime.c --- libosmocore-1.6.0/src/timer_clockgettime.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/timer_clockgettime.c 2022-06-28 15:00:51.000000000 +0000 @@ -14,10 +14,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. - * */ /*! \addtogroup timer diff -Nru libosmocore-1.6.0/src/timer_gettimeofday.c libosmocore-1.7.0/src/timer_gettimeofday.c --- libosmocore-1.6.0/src/timer_gettimeofday.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/timer_gettimeofday.c 2022-06-28 15:00:51.000000000 +0000 @@ -15,10 +15,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. - * */ /*! \addtogroup timer diff -Nru libosmocore-1.6.0/src/usb/Makefile.am libosmocore-1.7.0/src/usb/Makefile.am --- libosmocore-1.6.0/src/usb/Makefile.am 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/usb/Makefile.am 2022-06-28 15:00:51.000000000 +0000 @@ -1,7 +1,7 @@ # This is _NOT_ the library release version, it's an API version. # Please read chapter "Library interface versions" of the libtool documentation # before making any modifications: https://www.gnu.org/software/libtool/manual/html_node/Versioning.html -LIBVERSION=0:0:0 +LIBVERSION=0:1:0 AM_CPPFLAGS = $(all_includes) -I$(top_srcdir)/include -I$(top_builddir)/include AM_CFLAGS = -fPIC -Wall $(LIBUSB_CFLAGS) $(TALLOC_CFLAGS) diff -Nru libosmocore-1.6.0/src/usb/osmo_libusb.c libosmocore-1.7.0/src/usb/osmo_libusb.c --- libosmocore-1.6.0/src/usb/osmo_libusb.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/usb/osmo_libusb.c 2022-06-28 15:00:51.000000000 +0000 @@ -14,10 +14,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * 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 #include @@ -103,7 +99,7 @@ static void osmo_usb_removed_cb(int fd, void *user_data) { struct osmo_fd *ofd = osmo_fd_get_by_fd(fd); - if (!fd) + if (!ofd) return; osmo_fd_unregister(ofd); talloc_free(ofd); @@ -541,7 +537,8 @@ addr = libusb_get_device_address(*dev); path = osmo_libusb_dev_get_path_buf(pathbuf, sizeof(pathbuf), *dev); if ((ifm->addr && addr == ifm->addr) || - (strlen(ifm->path) && !strcmp(path, ifm->path))) { + (strlen(ifm->path) && !strcmp(path, ifm->path)) || + (!ifm->addr && !strlen(ifm->path) && !list[1] /* only one device */)) { rc = libusb_open(*dev, &usb_devh); if (rc < 0) { fprintf(stderr, "Cannot open device: %s\n", libusb_error_name(rc)); @@ -739,11 +736,15 @@ int osmo_libusb_init(libusb_context **pluctx) { libusb_context *luctx = NULL; + const struct libusb_pollfd **pfds; + int rc; rc = libusb_init(pluctx); - if (rc != 0) + if (rc != 0) { + LOGP(DLUSB, LOGL_ERROR, "Error initializing libusb: %s\n", libusb_strerror(rc)); return rc; + } if (pluctx) luctx = *pluctx; @@ -754,6 +755,17 @@ libusb_set_pollfd_notifiers(luctx, osmo_usb_added_cb, osmo_usb_removed_cb, luctx); + /* get the initial file descriptors which were created even before during libusb_init() */ + pfds = libusb_get_pollfds(luctx); + if (pfds) { + const struct libusb_pollfd **pfds2 = pfds; + const struct libusb_pollfd *pfd; + /* synthesize 'add' call-backs. not sure why libusb doesn't do that by itself? */ + for (pfd = *pfds2; pfd; pfd = *++pfds2) + osmo_usb_added_cb(pfd->fd, pfd->events, luctx); + libusb_free_pollfds(pfds); + } + return 0; } diff -Nru libosmocore-1.6.0/src/use_count.c libosmocore-1.7.0/src/use_count.c --- libosmocore-1.6.0/src/use_count.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/use_count.c 2022-06-28 15:00:51.000000000 +0000 @@ -19,10 +19,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * 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 diff -Nru libosmocore-1.6.0/src/utils.c libosmocore-1.7.0/src/utils.c --- libosmocore-1.6.0/src/utils.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/utils.c 2022-06-28 15:00:51.000000000 +0000 @@ -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. - * */ @@ -206,7 +202,7 @@ if (end_nibble & 1) end_nibble++; } - if ((end_nibble / 2) > dst_size) + if ((unsigned int) (end_nibble / 2) > dst_size) return -ENOMEM; for (nibble_i = start_nibble; nibble_i < end_nibble; nibble_i++) { @@ -241,7 +237,7 @@ * \param[in] max_len maximum space in output buffer * \returns number of parsed octets, or -1 on error */ -int osmo_hexparse(const char *str, uint8_t *b, int max_len) +int osmo_hexparse(const char *str, uint8_t *b, unsigned int max_len) { char c; @@ -316,7 +312,7 @@ for (i = 0; i < len; i++) { const char *delimp = delim; int len_remain = out_buf_size - (cur - out_buf) - 1; - if (len_remain < (2 + delim_len) + if (len_remain < (int) (2 + delim_len) && !(!delim_after_last && i == (len - 1) && len_remain >= 2)) break; @@ -344,7 +340,7 @@ */ char *osmo_ubit_dump_buf(char *buf, size_t buf_len, const uint8_t *bits, unsigned int len) { - int i; + unsigned int i; if (len > buf_len-1) len = buf_len-1; @@ -758,7 +754,7 @@ * the non-legacy format also escapes those as "\xNN" sequences. * \return Number of characters that would be written if bufsize were large enough excluding '\0' (like snprintf()). */ -static size_t _osmo_escape_str_buf(char *buf, size_t bufsize, const char *str, int in_len, bool legacy_format) +static int _osmo_escape_str_buf(char *buf, size_t bufsize, const char *str, int in_len, bool legacy_format) { struct osmo_strbuf sb = { .buf = buf, .len = bufsize }; int in_pos = 0; @@ -830,6 +826,18 @@ * \param[in] bufsize sizeof(buf). * \param[in] str A string that may contain any characters. * \param[in] in_len Pass -1 to print until nul char, or >= 0 to force a length (also past nul chars). + * \return Number of characters that would be written if bufsize were large enough excluding '\0' (like snprintf()). + */ +int osmo_escape_str_buf3(char *buf, size_t bufsize, const char *str, int in_len) +{ + return _osmo_escape_str_buf(buf, bufsize, str, in_len, false); +} + +/*! Return the string with all non-printable characters escaped. + * \param[out] buf string buffer to write escaped characters to. + * \param[in] bufsize sizeof(buf). + * \param[in] str A string that may contain any characters. + * \param[in] in_len Pass -1 to print until nul char, or >= 0 to force a length (also past nul chars). * \return The output buffer (buf). */ char *osmo_escape_str_buf2(char *buf, size_t bufsize, const char *str, int in_len) @@ -887,6 +895,20 @@ return sb.chars_needed; } +/*! Like osmo_escape_str_buf3(), but returns double-quotes around a string, or "NULL" for a NULL string. + * This allows passing any char* value and get its C representation as string. + * The function signature is suitable for OSMO_STRBUF_APPEND_NOLEN(). + * \param[out] buf string buffer to write escaped characters to. + * \param[in] bufsize sizeof(buf). + * \param[in] str A string that may contain any characters. + * \param[in] in_len Pass -1 to print until nul char, or >= 0 to force a length. + * \return Number of characters that would be written if bufsize were large enough excluding '\0' (like snprintf()). + */ +int osmo_quote_str_buf3(char *buf, size_t bufsize, const char *str, int in_len) +{ + return _osmo_quote_str_buf(buf, bufsize, str, in_len, false); +} + /*! Like osmo_escape_str_buf2(), but returns double-quotes around a string, or "NULL" for a NULL string. * This allows passing any char* value and get its C representation as string. * The function signature is suitable for OSMO_STRBUF_APPEND_NOLEN(). @@ -1226,7 +1248,7 @@ int64_t precision_factor; int64_t integer_max; int64_t decimal_max; - int i; + unsigned int i; OSMO_ASSERT(val); *val = 0; @@ -1250,7 +1272,7 @@ if (point) return -EINVAL; point = p; - } else if (!isdigit(*p)) + } else if (!isdigit((unsigned char)*p)) return -EINVAL; } diff -Nru libosmocore-1.6.0/src/vty/command.c libosmocore-1.7.0/src/vty/command.c --- libosmocore-1.6.0/src/vty/command.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/vty/command.c 2022-06-28 15:00:51.000000000 +0000 @@ -1092,6 +1092,7 @@ static vector cmd_node_vector(vector v, enum node_type ntype) { struct cmd_node *cnode = vector_slot(v, ntype); + OSMO_ASSERT(cnode != NULL); return cnode->cmd_vector; } diff -Nru libosmocore-1.6.0/src/vty/cpu_sched_vty.c libosmocore-1.7.0/src/vty/cpu_sched_vty.c --- libosmocore-1.6.0/src/vty/cpu_sched_vty.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/vty/cpu_sched_vty.c 2022-06-28 15:00:51.000000000 +0000 @@ -25,6 +25,8 @@ #define _GNU_SOURCE +#include "../../config.h" + #include #include #include @@ -637,8 +639,10 @@ return 0; } +#ifdef HAVE_PTHREAD_GETNAME_NP if (pthread_getname_np(pthread_self(), name, sizeof(name)) == 0) has_name = true; +#endif /* Get latest matching mask for the thread */ pthread_mutex_lock(&sched_vty_opts->cpu_affinity_li_mutex); diff -Nru libosmocore-1.6.0/src/vty/fsm_vty.c libosmocore-1.7.0/src/vty/fsm_vty.c --- libosmocore-1.6.0/src/vty/fsm_vty.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/vty/fsm_vty.c 2022-06-28 15:00:51.000000000 +0000 @@ -14,10 +14,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 @@ -65,7 +61,7 @@ if (fsm->event_names) { for (evt_name = fsm->event_names; evt_name->str != NULL; evt_name++) { vty_out(vty, "%s Event %02u (0x%08x): '%s'%s", prefix, evt_name->value, - (1 << evt_name->value), evt_name->str, VTY_NEWLINE); + (1U << evt_name->value), evt_name->str, VTY_NEWLINE); } } else vty_out(vty, "%s No event names are defined for this FSM! Please fix!%s", prefix, VTY_NEWLINE); diff -Nru libosmocore-1.6.0/src/vty/logging_vty.c libosmocore-1.7.0/src/vty/logging_vty.c --- libosmocore-1.6.0/src/vty/logging_vty.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/vty/logging_vty.c 2022-06-28 15:00:51.000000000 +0000 @@ -15,10 +15,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 @@ -834,6 +830,27 @@ RET_WITH_UNLOCK(CMD_SUCCESS); } +DEFUN(cfg_no_log_gsmtap, cfg_no_log_gsmtap_cmd, + "no log gsmtap [HOSTNAME]", + NO_STR LOG_STR "Logging via GSMTAP\n" + "Host name to send the GSMTAP logging to (UDP port 4729)\n") +{ + const char *hostname = argc ? argv[0] : "127.0.0.1"; + struct log_target *tgt; + + log_tgt_mutex_lock(); + tgt = log_target_find(LOG_TGT_TYPE_GSMTAP, hostname); + if (tgt == NULL) { + vty_out(vty, "%% Unable to find GSMTAP log target for %s%s", + hostname, VTY_NEWLINE); + RET_WITH_UNLOCK(CMD_WARNING); + } + + log_target_destroy(tgt); + + RET_WITH_UNLOCK(CMD_SUCCESS); +} + DEFUN(cfg_log_stderr, cfg_log_stderr_cmd, "log stderr [blocking-io]", LOG_STR "Logging via STDERR of the process\n" @@ -1249,4 +1266,5 @@ install_lib_element(CONFIG_NODE, &cfg_log_systemd_journal_cmd); install_lib_element(CONFIG_NODE, &cfg_no_log_systemd_journal_cmd); install_lib_element(CONFIG_NODE, &cfg_log_gsmtap_cmd); + install_lib_element(CONFIG_NODE, &cfg_no_log_gsmtap_cmd); } diff -Nru libosmocore-1.6.0/src/vty/Makefile.am libosmocore-1.7.0/src/vty/Makefile.am --- libosmocore-1.6.0/src/vty/Makefile.am 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/vty/Makefile.am 2022-06-28 15:00:51.000000000 +0000 @@ -1,10 +1,10 @@ # This is _NOT_ the library release version, it's an API version. # Please read chapter "Library interface versions" of the libtool documentation # before making any modifications: https://www.gnu.org/software/libtool/manual/html_node/Versioning.html -LIBVERSION=10:0:1 +LIBVERSION=11:0:2 AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include -AM_CFLAGS = -Wall $(TALLOC_CFLAGS) +AM_CFLAGS = -Wall $(TALLOC_CFLAGS) $(PTHREAD_CFLAGS) if ENABLE_VTY lib_LTLIBRARIES = libosmovty.la @@ -14,5 +14,5 @@ fsm_vty.c talloc_ctx_vty.c \ cpu_sched_vty.c tdef_vty.c libosmovty_la_LDFLAGS = -version-info $(LIBVERSION) -no-undefined -libosmovty_la_LIBADD = $(top_builddir)/src/libosmocore.la $(TALLOC_LIBS) +libosmovty_la_LIBADD = $(top_builddir)/src/libosmocore.la $(TALLOC_LIBS) $(PTHREAD_LIBS) endif diff -Nru libosmocore-1.6.0/src/vty/stats_vty.c libosmocore-1.7.0/src/vty/stats_vty.c --- libosmocore-1.6.0/src/vty/stats_vty.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/vty/stats_vty.c 2022-06-28 15:00:51.000000000 +0000 @@ -1,5 +1,5 @@ /* - * (C) 2009-2010 by Harald Welte + * (C) 2009-2022 by Harald Welte * (C) 2009-2014 by Holger Hans Peter Freyther * (C) 2015 by sysmocom - s.f.m.c. GmbH * All Rights Reserved @@ -16,10 +16,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 @@ -37,11 +33,13 @@ #include #include #include +#include #define CFG_STATS_STR "Configure stats sub-system\n" #define CFG_REPORTER_STR "Configure a stats reporter\n" #define SHOW_STATS_STR "Show statistical values\n" +#define SKIP_ZERO_STR "Skip items with total count zero\n" #define STATS_STR "Stats related commands\n" @@ -393,27 +391,60 @@ return CMD_SUCCESS; } +DEFUN(cfg_tcp_stats_interval, cfg_tcp_stats_interval_cmd, + "stats-tcp interval <0-65535>", + CFG_STATS_STR "Set the tcp socket stats polling interval\n" + "Interval in seconds (0 disables the polling interval)\n") +{ + int rc; + int interval = atoi(argv[0]); + rc = osmo_stats_tcp_set_interval(interval); + if (rc < 0) { + vty_out(vty, "%% Unable to set interval: %s%s", + strerror(-rc), VTY_NEWLINE); + return CMD_WARNING; + } + + return CMD_SUCCESS; +} + +DEFUN(cfg_tcp_stats_batch_size, cfg_tcp_stats_batch_size_cmd, + "stats-tcp batch-size <1-65535>", + CFG_STATS_STR "Set the number of tcp sockets that are processed per stats polling interval\n" + "Number of sockets per interval\n") +{ + osmo_tcp_stats_config->batch_size = atoi(argv[0]); + return CMD_SUCCESS; +} + DEFUN(show_stats, show_stats_cmd, - "show stats", - SHOW_STR SHOW_STATS_STR) + "show stats [skip-zero]", + SHOW_STR SHOW_STATS_STR SKIP_ZERO_STR) { - vty_out_statistics_full(vty, ""); + bool skip_zero = false; + if (argc > 0) + skip_zero = true; + + vty_out_statistics_full2(vty, "", skip_zero); return CMD_SUCCESS; } DEFUN(show_stats_level, show_stats_level_cmd, - "show stats level (global|peer|subscriber)", + "show stats level (global|peer|subscriber) [skip-zero]", SHOW_STR SHOW_STATS_STR "Set the maximum group level\n" "Show global groups only\n" "Show global and network peer related groups\n" - "Show global, peer, and subscriber groups\n") + "Show global, peer, and subscriber groups\n" SKIP_ZERO_STR) { int level = get_string_value(stats_class_strs, argv[0]); - vty_out_statistics_partial(vty, "", level); + bool skip_zero = false; + if (argc > 1) + skip_zero = true; + vty_out_statistics_partial2(vty, "", level, skip_zero); return CMD_SUCCESS; } @@ -576,23 +607,32 @@ return CMD_SUCCESS; } +struct rctr_vty_ctx { + struct vty *vty; + bool skip_zero; +}; + static int rate_ctr_group_handler(struct rate_ctr_group *ctrg, void *sctx_) { - struct vty *vty = sctx_; + struct rctr_vty_ctx *sctx = sctx_; + struct vty *vty = sctx->vty; vty_out(vty, "%s %u", ctrg->desc->group_description, ctrg->idx); if (ctrg->name != NULL) vty_out(vty, " (%s)", ctrg->name); vty_out(vty, ":%s", VTY_NEWLINE); - vty_out_rate_ctr_group_fmt(vty, "%25n: %10c (%S/s %M/m %H/h %D/d) %d", ctrg); + vty_out_rate_ctr_group_fmt2(vty, "%25n: %10c (%S/s %M/m %H/h %D/d) %d", ctrg, sctx->skip_zero); return 0; } DEFUN(show_rate_counters, show_rate_counters_cmd, - "show rate-counters", - SHOW_STR "Show all rate counters\n") + "show rate-counters [skip-zero]", + SHOW_STR "Show all rate counters\n" SKIP_ZERO_STR) { - rate_ctr_for_each_group(rate_ctr_group_handler, vty); + struct rctr_vty_ctx rctx = { .vty = vty, .skip_zero = false }; + if (argc > 0) + rctx.skip_zero = true; + rate_ctr_for_each_group(rate_ctr_group_handler, &rctx); return CMD_SUCCESS; } @@ -631,6 +671,11 @@ case OSMO_STATS_REPORTER_LOG: type = "log"; break; + default: + /* don't try to save unknown stats reporters to the VTY. Imagine some + * application registering a new application specific stats reporter that + * this VTY code knows nothing about! */ + return 0; } vty_out(vty, "stats reporter %s", type); @@ -681,6 +726,10 @@ struct osmo_stats_reporter *srep; vty_out(vty, "stats interval %d%s", osmo_stats_config->interval, VTY_NEWLINE); + if (osmo_tcp_stats_config->interval != TCP_STATS_DEFAULT_INTERVAL) + vty_out(vty, "stats-tcp interval %d%s", osmo_tcp_stats_config->interval, VTY_NEWLINE); + if (osmo_tcp_stats_config->batch_size != TCP_STATS_DEFAULT_BATCH_SIZE) + vty_out(vty, "stats-tcp batch-size %d%s", osmo_tcp_stats_config->batch_size, VTY_NEWLINE); /* Loop through all reporters */ llist_for_each_entry(srep, &osmo_stats_reporter_list, list) @@ -703,6 +752,8 @@ install_lib_element(CONFIG_NODE, &cfg_stats_reporter_log_cmd); install_lib_element(CONFIG_NODE, &cfg_no_stats_reporter_log_cmd); install_lib_element(CONFIG_NODE, &cfg_stats_interval_cmd); + install_lib_element(CONFIG_NODE, &cfg_tcp_stats_interval_cmd); + install_lib_element(CONFIG_NODE, &cfg_tcp_stats_batch_size_cmd); install_node(&cfg_stats_node, config_write_stats); diff -Nru libosmocore-1.6.0/src/vty/talloc_ctx_vty.c libosmocore-1.7.0/src/vty/talloc_ctx_vty.c --- libosmocore-1.6.0/src/vty/talloc_ctx_vty.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/vty/talloc_ctx_vty.c 2022-06-28 15:00:51.000000000 +0000 @@ -17,17 +17,13 @@ * 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 #include #include -#include +#include #include #include @@ -151,6 +147,8 @@ /* Determine a context for report */ if (!strncmp(ctx, "app", 3)) talloc_ctx = host.app_info->tall_ctx; + else if (!strcmp(ctx, "global")) + talloc_ctx = OTC_GLOBAL; else if (!strncmp(ctx, "all", 3)) talloc_ctx = NULL; @@ -167,11 +165,12 @@ } #define BASE_CMD_STR \ - "show talloc-context (application|all) (full|brief|DEPTH)" + "show talloc-context (application|global|all) (full|brief|DEPTH)" #define BASE_CMD_DESCR \ SHOW_STR "Show talloc memory hierarchy\n" \ "Application's context\n" \ + "Global context (OTC_GLOBAL)\n" \ "All contexts, if NULL-context tracking is enabled\n" \ "Display a full talloc memory hierarchy\n" \ "Display a brief talloc memory hierarchy\n" \ diff -Nru libosmocore-1.6.0/src/vty/tdef_vty.c libosmocore-1.7.0/src/vty/tdef_vty.c --- libosmocore-1.6.0/src/vty/tdef_vty.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/vty/tdef_vty.c 2022-06-28 15:00:51.000000000 +0000 @@ -242,7 +242,7 @@ /*! Write current timer configuration arguments to the vty. Skip all entries that reflect their default value. * The passed prefix string must contain both necessary indent and the VTY command the specific implementation is using. - * See tdef_vty_test_config_subnode.c and tdef_vty_test_dynamic.c for examples. + * See tdef_vty_config_subnode_test.c and tdef_vty_dynamic_test.c for examples. * \param[in] vty VTY context. * \param[in] tdefs Array of timers to print, ended with a fully zero-initialized entry. * \param[in] prefix_fmt Arbitrary string to start each line with, with variable printf like arguments. diff -Nru libosmocore-1.6.0/src/vty/telnet_interface.c libosmocore-1.7.0/src/vty/telnet_interface.c --- libosmocore-1.6.0/src/vty/telnet_interface.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/vty/telnet_interface.c 2022-06-28 15:00:51.000000000 +0000 @@ -14,10 +14,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 diff -Nru libosmocore-1.6.0/src/vty/utils.c libosmocore-1.7.0/src/vty/utils.c --- libosmocore-1.6.0/src/vty/utils.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/vty/utils.c 2022-06-28 15:00:51.000000000 +0000 @@ -18,13 +18,10 @@ * 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 +#include #include #include #include @@ -48,6 +45,7 @@ struct vty *vty; const char *prefix; int max_level; + bool skip_zero; }; static int rate_ctr_handler( @@ -57,6 +55,9 @@ struct vty_out_context *vctx = vctx_; struct vty *vty = vctx->vty; + if (vctx->skip_zero && ctr->current == 0) + return 0; + vty_out(vty, " %s%s: %8" PRIu64 " " "(%" PRIu64 "/s %" PRIu64 "/m %" PRIu64 "/h %" PRIu64 "/d)%s", vctx->prefix, desc->description, ctr->current, @@ -73,17 +74,24 @@ * \param[in] vty The VTY to which it should be printed * \param[in] prefix Any additional log prefix ahead of each line * \param[in] ctrg Rate counter group to be printed + * \param[in] skip_zero Skip all zero-valued counters */ -void vty_out_rate_ctr_group(struct vty *vty, const char *prefix, - struct rate_ctr_group *ctrg) +void vty_out_rate_ctr_group2(struct vty *vty, const char *prefix, + struct rate_ctr_group *ctrg, bool skip_zero) { - struct vty_out_context vctx = {vty, prefix}; + struct vty_out_context vctx = {vty, prefix, 0, skip_zero}; vty_out(vty, "%s%s:%s", prefix, ctrg->desc->group_description, VTY_NEWLINE); rate_ctr_for_each_counter(ctrg, rate_ctr_handler, &vctx); } +void vty_out_rate_ctr_group(struct vty *vty, const char *prefix, + struct rate_ctr_group *ctrg) +{ + vty_out_rate_ctr_group2(vty, prefix, ctrg, false); +} + static char * pad_append_str(char *s, const char *a, int minwidth) { @@ -107,7 +115,12 @@ struct vty_out_context *vctx = vctx_; struct vty *vty = vctx->vty; const char *fmt = vctx->prefix; - char *s = talloc_strdup(vty, ""); + char *s; + + if (vctx->skip_zero && ctr->current == 0) + return 0; + + s = talloc_strdup(vty, ""); OSMO_ASSERT(s); while (*fmt) { @@ -209,14 +222,20 @@ * \param[in] vty The VTY to which it should be printed * \param[in] ctrg Rate counter group to be printed * \param[in] fmt A format which may contain the above directives. + * \param[in] skip_zero Skip all zero-valued counters */ -void vty_out_rate_ctr_group_fmt(struct vty *vty, const char *fmt, - struct rate_ctr_group *ctrg) +void vty_out_rate_ctr_group_fmt2(struct vty *vty, const char *fmt, + struct rate_ctr_group *ctrg, bool skip_zero) { - struct vty_out_context vctx = {vty, fmt}; + struct vty_out_context vctx = {vty, fmt, 0, skip_zero}; rate_ctr_for_each_counter(ctrg, rate_ctr_handler_fmt, &vctx); } +void vty_out_rate_ctr_group_fmt(struct vty *vty, const char *fmt, + struct rate_ctr_group *ctrg) +{ + vty_out_rate_ctr_group_fmt2(vty, fmt, ctrg, false); +} static int rate_ctr_group_handler(struct rate_ctr_group *ctrg, void *vctx_) { struct vty_out_context *vctx = vctx_; @@ -248,12 +267,14 @@ struct vty_out_context *vctx = vctx_; struct vty *vty = vctx->vty; const struct osmo_stat_item_desc *desc = osmo_stat_item_get_desc(item); + int32_t value = osmo_stat_item_get_last(item); const char *unit = (desc->unit != OSMO_STAT_ITEM_NO_UNIT) ? desc->unit : ""; + if (vctx->skip_zero && value == 0) + return 0; + vty_out(vty, " %s%s: %8" PRIi32 " %s%s", - vctx->prefix, desc->description, - osmo_stat_item_get_last(item), - unit, VTY_NEWLINE); + vctx->prefix, desc->description, value, unit, VTY_NEWLINE); return 0; } @@ -262,17 +283,24 @@ * \param[in] vty The VTY to which it should be printed * \param[in] prefix Any additional log prefix ahead of each line * \param[in] statg Stat item group to be printed + * \param[in] skip_zero Skip all zero-valued counters */ -void vty_out_stat_item_group(struct vty *vty, const char *prefix, - struct osmo_stat_item_group *statg) +void vty_out_stat_item_group2(struct vty *vty, const char *prefix, + struct osmo_stat_item_group *statg, bool skip_zero) { - struct vty_out_context vctx = {vty, prefix}; + struct vty_out_context vctx = {vty, prefix, 0, skip_zero}; vty_out(vty, "%s%s:%s", prefix, statg->desc->group_description, VTY_NEWLINE); osmo_stat_item_for_each_item(statg, osmo_stat_item_handler, &vctx); } +void vty_out_stat_item_group(struct vty *vty, const char *prefix, + struct osmo_stat_item_group *statg) +{ + return vty_out_stat_item_group2(vty, prefix, statg, false); +} + static int osmo_stat_item_group_handler(struct osmo_stat_item_group *statg, void *vctx_) { struct vty_out_context *vctx = vctx_; @@ -302,21 +330,22 @@ struct vty_out_context *vctx = vctx_; struct vty *vty = vctx->vty; const char *description = counter->description; + unsigned long value = osmo_counter_get(counter); + + if (vctx->skip_zero && value == 0) + return 0; if (!counter->description) description = counter->name; - vty_out(vty, " %s%s: %8lu%s", - vctx->prefix, description, - osmo_counter_get(counter), VTY_NEWLINE); + vty_out(vty, " %s%s: %8lu%s", vctx->prefix, description, value, VTY_NEWLINE); return 0; } -void vty_out_statistics_partial(struct vty *vty, const char *prefix, - int max_level) +void vty_out_statistics_partial2(struct vty *vty, const char *prefix, int max_level, bool skip_zero) { - struct vty_out_context vctx = {vty, prefix, max_level}; + struct vty_out_context vctx = {vty, prefix, max_level, skip_zero}; vty_out(vty, "%sUngrouped counters:%s", prefix, VTY_NEWLINE); osmo_counters_for_each(handle_counter, &vctx); @@ -324,9 +353,19 @@ osmo_stat_item_for_each_group(osmo_stat_item_group_handler, &vctx); } +void vty_out_statistics_partial(struct vty *vty, const char *prefix, int max_level) +{ + return vty_out_statistics_partial2(vty, prefix, max_level, false); +} + +void vty_out_statistics_full2(struct vty *vty, const char *prefix, bool skip_zero) +{ + vty_out_statistics_partial2(vty, prefix, INT_MAX, skip_zero); +} + void vty_out_statistics_full(struct vty *vty, const char *prefix) { - vty_out_statistics_partial(vty, prefix, INT_MAX); + vty_out_statistics_full2(vty, prefix, false); } /*! Generate a VTY command string from value_string */ diff -Nru libosmocore-1.6.0/src/vty/vector.c libosmocore-1.7.0/src/vty/vector.c --- libosmocore-1.6.0/src/vty/vector.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/vty/vector.c 2022-06-28 15:00:51.000000000 +0000 @@ -16,11 +16,6 @@ * WITHOUT ANY WARRANTY; without even the implied warranty of * 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 GNU Zebra; see the file COPYING. If not, write to the Free - * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. */ #include diff -Nru libosmocore-1.6.0/src/write_queue.c libosmocore-1.7.0/src/write_queue.c --- libosmocore-1.6.0/src/write_queue.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/src/write_queue.c 2022-06-28 15:00:51.000000000 +0000 @@ -16,10 +16,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 @@ -106,7 +102,7 @@ /*! Enqueue a new \ref msgb into a write queue (without logging full queue events) * \param[in] queue Write queue to be used * \param[in] data to-be-enqueued message buffer - * \returns 0 on success; negative on error + * \returns 0 on success; negative on error (MESSAGE NOT FREED IN CASE OF ERROR). */ int osmo_wqueue_enqueue_quiet(struct osmo_wqueue *queue, struct msgb *data) { @@ -122,7 +118,7 @@ /*! Enqueue a new \ref msgb into a write queue * \param[in] queue Write queue to be used * \param[in] data to-be-enqueued message buffer - * \returns 0 on success; negative on error + * \returns 0 on success; negative on error (MESSAGE NOT FREED IN CASE OF ERROR). */ int osmo_wqueue_enqueue(struct osmo_wqueue *queue, struct msgb *data) { diff -Nru libosmocore-1.6.0/tests/abis/abis_test.c libosmocore-1.7.0/tests/abis/abis_test.c --- libosmocore-1.6.0/tests/abis/abis_test.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/tests/abis/abis_test.c 2022-06-28 15:00:51.000000000 +0000 @@ -13,10 +13,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 @@ -197,6 +193,52 @@ msgb_free(msg); } +/* Test decode IPAC_DLCX_IND obtained from SYS#5915 */ +static void test_dec_ipac_dlc_indx() +{ +/* Radio Signalling Link (RSL) + 0111 111. = Message discriminator: ip.access Vendor Specific messages (63) + .... ...0 = T bit: Not considered transparent by BTS + .111 0110 = Message type: ip.access DLCX INDication (0x76) + Channel number IE + Element identifier: Channel Number (0x01) + 0000 1... = C-bits: Bm + ACCH (1) + .... .110 = Time slot number (TN): 6 + Element identifier: Connection Identifier (0xf8) + ip.access Connection ID: 0 + Element identifier: Connection Statistics (0xf6) + [1 byte length here, val = 28 (0x1c)] + Packets Sent: 1202 + Octets Sent: 45052 + Packets Received: 556 + Octets Received: 24580 + Packets Lost: 0 + Inter-arrival Jitter: 0 + Average Tx Delay: 0 + Cause IE + Element identifier: Cause (0x1a) + Length: 1 + 0... .... = Extension: No Extension + .000 .... = Class: Normal event (0) + .000 1111 = Cause Value: normal event, unspecified (15) +*/ + const uint8_t hex[] = { + 0x7e, 0x76, 0x01, 0x0e, 0xf8, 0x00, 0x00, 0xf6, 0x1c, 0x00, 0x00, 0x04, 0xb2, 0x00, 0x00, 0xaf, + 0xfc, 0x00, 0x00, 0x02, 0x2c, 0x00, 0x00, 0x60, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x01, 0x0f + }; + struct abis_rsl_dchan_hdr *dh = (struct abis_rsl_dchan_hdr *)&hex[0]; + + struct tlv_parsed tp; + int rc; + + printf("Testing decoding IPAC_DLCX_IND\n"); + + rc = rsl_tlv_parse(&tp, dh->data, sizeof(hex) - sizeof(*dh)); + + OSMO_ASSERT(rc == 3); +} + int main(int argc, char **argv) { void *ctx = talloc_named_const(NULL, 0, "abis_test"); @@ -206,6 +248,7 @@ test_simple_sw_config(); test_simple_sw_short(); test_dual_sw_config(); + test_dec_ipac_dlc_indx(); printf("OK.\n"); diff -Nru libosmocore-1.6.0/tests/abis/abis_test.ok libosmocore-1.7.0/tests/abis/abis_test.ok --- libosmocore-1.6.0/tests/abis/abis_test.ok 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/tests/abis/abis_test.ok 2022-06-28 15:00:51.000000000 +0000 @@ -38,4 +38,5 @@ file_id: 09 07 05 file_ver: 06 07 08 test_dual_sw_config(): OK +Testing decoding IPAC_DLCX_IND OK. diff -Nru libosmocore-1.6.0/tests/bitvec/bitvec_test.c libosmocore-1.7.0/tests/bitvec/bitvec_test.c --- libosmocore-1.6.0/tests/bitvec/bitvec_test.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/tests/bitvec/bitvec_test.c 2022-06-28 15:00:51.000000000 +0000 @@ -237,7 +237,8 @@ #define _bitvec_read_field(idx, len) \ readIndex = idx; \ field = bitvec_read_field(&bv, &readIndex, len); \ - printf("bitvec_read_field(idx=%u, len=%u) => %" PRIx64 "\n", idx, len, field); + printf("bitvec_read_field(idx=%u, len=%u) => %" PRIx64 " (%s)\n", \ + idx, len, field, errno == 0 ? "success" : "error"); _bitvec_read_field(0, 64); _bitvec_read_field(0, 32); diff -Nru libosmocore-1.6.0/tests/bitvec/bitvec_test.ok libosmocore-1.7.0/tests/bitvec/bitvec_test.ok --- libosmocore-1.6.0/tests/bitvec/bitvec_test.ok 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/tests/bitvec/bitvec_test.ok 2022-06-28 15:00:51.000000000 +0000 @@ -171,21 +171,21 @@ bitvec bytes used. test bitvec_read_field(): -bitvec_read_field(idx=0, len=64) => deadbeeffeebdaed -bitvec_read_field(idx=0, len=32) => deadbeef -bitvec_read_field(idx=0, len=16) => dead -bitvec_read_field(idx=0, len=8) => de -bitvec_read_field(idx=0, len=0) => 0 -bitvec_read_field(idx=8, len=8) => ad -bitvec_read_field(idx=8, len=4) => a -bitvec_read_field(idx=8, len=0) => 0 -bitvec_read_field(idx=10, len=9) => 16d -bitvec_read_field(idx=10, len=7) => 5b -bitvec_read_field(idx=10, len=5) => 16 -bitvec_read_field(idx=10, len=3) => 5 -bitvec_read_field(idx=10, len=1) => 1 -bitvec_read_field(idx=512, len=16) => ffffffffffffffea -bitvec_read_field(idx=0, len=65) => ffffffffffffffea -bitvec_read_field(idx=64, len=16) => ffffffffffffffea +bitvec_read_field(idx=0, len=64) => deadbeeffeebdaed (success) +bitvec_read_field(idx=0, len=32) => deadbeef (success) +bitvec_read_field(idx=0, len=16) => dead (success) +bitvec_read_field(idx=0, len=8) => de (success) +bitvec_read_field(idx=0, len=0) => 0 (success) +bitvec_read_field(idx=8, len=8) => ad (success) +bitvec_read_field(idx=8, len=4) => a (success) +bitvec_read_field(idx=8, len=0) => 0 (success) +bitvec_read_field(idx=10, len=9) => 16d (success) +bitvec_read_field(idx=10, len=7) => 5b (success) +bitvec_read_field(idx=10, len=5) => 16 (success) +bitvec_read_field(idx=10, len=3) => 5 (success) +bitvec_read_field(idx=10, len=1) => 1 (success) +bitvec_read_field(idx=512, len=16) => 0 (error) +bitvec_read_field(idx=0, len=65) => 0 (error) +bitvec_read_field(idx=64, len=16) => 0 (error) bitvec ok. diff -Nru libosmocore-1.6.0/tests/bssmap_le/bssmap_le_test.c libosmocore-1.7.0/tests/bssmap_le/bssmap_le_test.c --- libosmocore-1.6.0/tests/bssmap_le/bssmap_le_test.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/tests/bssmap_le/bssmap_le_test.c 2022-06-28 15:00:51.000000000 +0000 @@ -118,6 +118,36 @@ }, }, }, + { + .msg_type = BSSMAP_LE_MSGT_PERFORM_LOC_REQ, + .perform_loc_req = { + .location_type = { + .location_information = BSSMAP_LE_LOC_INFO_CURRENT_GEOGRAPHIC, + }, + + .cell_id = { + .id_discr = CELL_IDENT_LAC_AND_CI, + .id.lac_and_ci = { + .lac = 23, + .ci = 42, + }, + }, + + .lcs_client_type_present = true, + .lcs_client_type = BSSMAP_LE_LCS_CTYPE_EMERG_SVC_UNSPECIFIED, + + .more_items = true, + + .lcs_priority_present = true, + .lcs_priority = 0x00, /* highest */ + + .lcs_qos_present = true, + .lcs_qos = { + .ha_ind = 1, + .ha_val = 0x12, + }, + }, + }, }; void test_bssmap_le_enc_dec() diff -Nru libosmocore-1.6.0/tests/bssmap_le/bssmap_le_test.ok libosmocore-1.7.0/tests/bssmap_le/bssmap_le_test.ok --- libosmocore-1.6.0/tests/bssmap_le/bssmap_le_test.ok 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/tests/bssmap_le/bssmap_le_test.ok 2022-06-28 15:00:51.000000000 +0000 @@ -9,3 +9,4 @@ [7] CONNECTION ORIENTED INFORMATON: ok (encoded len = 8) [8] CONNECTION ORIENTED INFORMATON: ok (encoded len = 13) [9] CONNECTION ORIENTED INFORMATON: ok (encoded len = 10) +[10] PERFORM LOCATION REQUEST: ok (encoded len = 25) diff -Nru libosmocore-1.6.0/tests/coding/coding_test.c libosmocore-1.7.0/tests/coding/coding_test.c --- libosmocore-1.6.0/tests/coding/coding_test.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/tests/coding/coding_test.c 2022-06-28 15:00:51.000000000 +0000 @@ -13,10 +13,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * 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 diff -Nru libosmocore-1.6.0/tests/dtx/dtx_gsm0503_test.c libosmocore-1.7.0/tests/dtx/dtx_gsm0503_test.c --- libosmocore-1.6.0/tests/dtx/dtx_gsm0503_test.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/tests/dtx/dtx_gsm0503_test.c 2022-06-28 15:00:51.000000000 +0000 @@ -15,18 +15,18 @@ * 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 #include #include #include +#include #include +/* Length of payload bits in a Normal Burst */ +#define BURST_PLEN (57 * 2 + 2) + char sample_afs_sid_frame[] = { "111111110000000011001100101010100100010011111111001000100111011110011001001100111100110010011001111011100100010011111111001000100111011110011001001100111100110010011001111011100100010011111111001000100111011110011001001100111100110010011001111011100100010011111111001000100111011110011001001100111100110010011001111011100100010011111111001000100111011110011001001100111100110010011001111011100100010011111111001000100111011110011001001100111100110010011001" @@ -72,7 +72,7 @@ "xBxBxBxBxBxBxBxBxBxBxBxBxBxBxBxBx0x1x0x0x1x1x1x1x0x0x1x0x0x1x1x1x1x0x0x1x0x0x1x1x1x1x0x0x1x0x0x1x1x1x1x0x0x1x0x0x1x1x1x1x0x0x1x0x0x1x1x1x1x0x0x1x0x0x1x1x1x1x0x0x1x0x0x1x1x1x1x0x0x1x0x0x1x1x1x1x0x0x1x0x0x1x1x1x1x0x0x1x0x0x1x1x1x1x0x0x1x0x0x1x1x1x1x0x0x1x0x0x1x1x1x1x0x0x1x0x0x1x1x1x1x0x0x1x0x0x1x1x1x1x0x0x1x0x0x1x1x1x1x0x0x1x0x0x1x1x1x1x0x0x1x0x0x1x1x1x1x0x0x1x0x0x1x1x1x1x0x0x1x0x0x1x1x1x1x0x0x1x0x0x1x1x1x1x0x0x1x0x0x1x1x1x1x0x0x1x0x0x1x1x1x1x0x0x1x0x0x1" }; -unsigned int string_to_ubit(ubit_t * ubits, char *string) +unsigned int string_to_sbit(sbit_t *sbits, char *string) { unsigned int len; unsigned int i; @@ -80,7 +80,7 @@ len = strlen(string); for (i = 0; i < len; i++) { - ubits[i] = string[i] & 1; + sbits[i] = string[i] == '1' ? -127 : 127; } return len; @@ -88,28 +88,161 @@ void test_gsm0503_detect_afs_dtx_frame(char *string) { - ubit_t ubits[512]; + sbit_t sbits[512]; uint8_t dtx_frame_type; int n_errors; int n_bits_total; + int mode_id = -1; - string_to_ubit(ubits, string); - dtx_frame_type = gsm0503_detect_afs_dtx_frame(&n_errors, &n_bits_total, ubits); - printf(" ==> %s, n_errors=%i, n_bits_total=%i\n", gsm0503_amr_dtx_frame_name(dtx_frame_type), - n_errors, n_bits_total); + string_to_sbit(sbits, string); + dtx_frame_type = gsm0503_detect_afs_dtx_frame2(&n_errors, &n_bits_total, &mode_id, sbits); + printf(" ==> %s, n_errors=%d, n_bits_total=%d, mode_id=%d\n", + gsm0503_amr_dtx_frame_name(dtx_frame_type), + n_errors, n_bits_total, mode_id); } void test_gsm0503_detect_ahs_dtx_frame(char *string) { - ubit_t ubits[512]; + sbit_t sbits[512]; uint8_t dtx_frame_type; int n_errors; int n_bits_total; + int mode_id = -1; - string_to_ubit(ubits, string); - dtx_frame_type = gsm0503_detect_ahs_dtx_frame(&n_errors, &n_bits_total, ubits); - printf(" ==> %s, n_errors=%i, n_bits_total=%i\n", gsm0503_amr_dtx_frame_name(dtx_frame_type), - n_errors, n_bits_total); + string_to_sbit(sbits, string); + dtx_frame_type = gsm0503_detect_ahs_dtx_frame2(&n_errors, &n_bits_total, &mode_id, sbits); + printf(" ==> %s, n_errors=%d, n_bits_total=%d, mode_id=%d\n", + gsm0503_amr_dtx_frame_name(dtx_frame_type), + n_errors, n_bits_total, mode_id); +} + +static void test_gsm0503_tch_afhs_decode_dtx(const sbit_t *bursts, size_t offset, + enum gsm0503_amr_dtx_frames *amr_last_dtx, + bool full_rate, const char *test_desc) +{ + uint8_t tch_data[128]; /* just to be safe */ + int n_errors = 0, n_bits_total = 0; + int rc; + + printf("Running %s(at offset=%zu): testing %s\n", __func__, offset, test_desc); + + /* Dummy (not really important) values */ + uint8_t codec[4] = { 0, 1, 2, 3 }; + int codecs = ARRAY_SIZE(codec); + uint8_t ul_cmr = 0; + uint8_t ul_ft = 0; + + if (full_rate) { + rc = gsm0503_tch_afs_decode_dtx(&tch_data[0], &bursts[offset], false, + codec, codecs, &ul_ft, &ul_cmr, + &n_errors, &n_bits_total, + (uint8_t *)amr_last_dtx); + } else { + rc = gsm0503_tch_ahs_decode_dtx(&tch_data[0], &bursts[offset], false, false, + codec, codecs, &ul_ft, &ul_cmr, + &n_errors, &n_bits_total, + (uint8_t *)amr_last_dtx); + } + printf(" ==> gsm0503_tch_a%cs_decode_dtx() yields '%s' (rc=%d, BER %d/%d)\n", + full_rate ? 'f' : 'h', gsm0503_amr_dtx_frame_name(*amr_last_dtx), + rc, n_errors, n_bits_total); + if (rc > 0) + printf(" ====> tch_data[] = { %s }\n", osmo_hexdump_nospc(tch_data, rc)); +} + +static void test_gsm0503_tch_afhs_decode_dtx_sid_update(void) +{ + enum gsm0503_amr_dtx_frames amr_last_dtx = AMR_OTHER; + sbit_t bursts[BURST_PLEN * 12]; /* 12 bursts */ + int rc; + + /* 456 soft-bits containing an AFS_SID_UPDATE frame (captured on the air) */ + const char *afs_sid_update = \ + "94 81 83 76 7b 81 6b 7f 76 8c 81 81 81 86 71 7f 75 81 6d 7a 81 6b 7f 78 8a 87 70 75 8e" + "81 8d 7f 81 70 72 81 7f 85 86 7f 93 81 8a 74 7f 71 89 8a 75 7f 7f 78 8c 81 8b 7f 81 7f" + "7f 7f 70 8a 8b 7f 90 81 81 81 8a 77 7f 7f 70 81 70 71 86 8e 7f 81 7f 81 75 72 87 8c 76" + "7f 72 8e 81 81 81 81 92 7f 8c 81 92 7f 8c 89 7f 81 7f 8f 8b 77 76 86 8c 78 73 88 81 8b" + "81 7f 8c 85 77 7b 8d 81 81 81 8b 7f 81 7f 8e 81 8e 7f 8a 8a 7f 93 85 6b 7f 7f 72 81 6f" + "76 89 81 81 81 8a 73 7f 72 88 87 73 7f 73 81 7f 81 7f 92 87 73 78 81 6f 7f 71 81 76 77" + "6f 81 7f 81 71 7f 6e 81 75 77 83 81 81 90 7f 8b 88 76 76 8a 8d 76 74 81 7f 92 81 81 8b" + "78 72 81 77 76 81 6c 7c 8b 81 81 8d 7f 8b 81 8e 74 7f 7f 72 81 7f 81 74 7f 71 81 75 7f" + "8e 81 81 8c 72 79 85 8c 78 75 8c 8a 7f 90 81 8e 77 77 81 70 7f 7f 71 81 7f 81 7f 8e 89" + "7f 8f 81 8f 7f 8c 8d 7f 81 7f 81 6f 7f 71 8a 87 7f 81 6f 77 81 7f 8d 88 73 79 8a 8a 7f" + "7f 7f 7f 7f 76 8b 81 8c 77 7c 8a 81 91 7f 81 76 79 81 71 7f 7f 6f 84 8e 78 7f 7f 7f 74" + "88 86 7b 77 81 6f 7f 7f 7f 7f 7f 75 81 70 7f 76 89 81 81 81 8d 78 74 84 81 8e 7f 8d 8a" + "7f 79 8c 87 7f 81 7f 81 6f 7f 75 8d 8a 7f 81 7f 92 81 81 85 76 7f 6f 8c 88 6c 7f 73 91" + "81 8d 71 7f 7f 73 8d 88 7f 81 7f 91 86 6f 7f 73 8e 81 8d 79 78 81 72 74 8c 86 72 7f 77" + "6e 81 7f 81 77 76 81 72 74 81 6f 7f 6f 8d 81 91 7f 81 6d 7f 6d 81 6c 7f 6c 81 7f 81 7f" + "8c 8b 7f 8e 89 74 74 8c 81 81 81 81 81 92 7f 8e 8b 7f 93 81 8f 7f 90 81 8d 74 7b 8b 89"; + + memset(&bursts[0], 0, sizeof(bursts)); + rc = osmo_hexparse(afs_sid_update, (uint8_t *)&bursts[BURST_PLEN * 4], BURST_PLEN * 8); + OSMO_ASSERT(rc == BURST_PLEN * 4); + + /* Test detection of AFS_SID_UPDATE (marker) */ + test_gsm0503_tch_afhs_decode_dtx(&bursts[0], BURST_PLEN * 0, &amr_last_dtx, true /* AFS */, + "detection of AFS_SID_UPDATE"); + + /* Test decoding of AFS_SID_UPDATE_CN (actual SID) */ + test_gsm0503_tch_afhs_decode_dtx(&bursts[0], BURST_PLEN * 4, &amr_last_dtx, true /* AFS */, + "decoding of AFS_SID_UPDATE"); + + /* 456 soft-bits containing an AHS_SID_UPDATE frame (captured on the air) */ + const char *ahs_sid_update = \ + "81 67 7f 7f 7f 71 8f 88 6f 73 81 7e 81 6b 7f 7e 7d 6f 8f 8a 72 76 92 81 82 81 8f 6d 6f" + "81 7f 92 8c 7f 97 81 8e 6f 7f 7c 7f 6e 81 7e 81 6e 73 81 7f 93 8d 6f 7f 6c 81 6b 7f 72" + "7c 7c 7d 7f 6f 8f 81 94 7f 92 8d 6e 7d 7d 7f 6c 8b 8e 73 71 81 7f 92 90 7f 81 6e 6e 81" + "7f 94 8e 70 7f 6e 8c 8d 77 7f 6a 81 7f 81 70 6d 81 6c 71 8c 91 7f 90 8e 73 6e 81 6d 7f" + "81 8b 71 6e 81 7f 82 7c 81 7f 81 6d 73 81 6c 6d 81 6d 7f 6e 81 7e 81 6b 7f 7f 7f 6b 81" + "6e 6f 81 68 7f 71 91 81 82 81 8e 70 7f 7c 7d 7f 70 81 7f 91 8f 7f 81 6c 7f 71 81 6d 74" + "6f 8f 81 92 7f 82 7f 91 8b 7f 81 6b 7f 6d 81 6b 6f 81 6f 6e 90 81 81 92 7f 94 81 95 7f" + "96 81 96 70 7f 72 8f 81 95 7f 81 6f 70 81 7f 90 92 7f 81 6c 70 81 6b 7f 6f 8d 8d 7f 81" + "77 81 6a 7e 7e 73 92 8c 7f 81 6a 7f 6c 8e 8e 6e 7f 71 8e 8d 7e 81 6d 7f 6c 81 6d 6c 81" + "7f 94 81 92 7f 97 81 92 6e 7f 70 8c 8b 73 73 91 81 93 7f 81 70 72 81 7d 81 71 70 81 7f" + "7d 7f 6d 90 8d 73 76 92 81 92 6f 7d 7d 70 91 81 8f 73 75 8c 90 7f 94 81 91 70 7f 7d 7e" + "70 8d 8d 73 7f 7c 7e 6a 81 7e 81 6d 7f 6a 81 6f 7f 7f 71 8e 81 82 81 81 81 96 72 7e 7d" + "81 8d 7f 81 68 7f 7e 7c 7b 7f 6c 81 6a 7f 7f 71 8f 8d 7f 81 6c 72 8e 88 70 70 81 6d 70" + "8d 90 7f 81 7e 95 81 94 7f 92 8b 6e 7f 7f 70 8c 8c 73 75 91 81 91 6d 7d 7e 7b 7c 7d 71" + "6c 89 91 7f 81 7f 95 81 93 7f 95 90 7f 81 6d 70 81 6f 75 8c 8e 75 71 81 6e 70 8d 8d 7f" + "91 92 7f 81 7f 94 8d 70 71 81 6e 6d 81 6e 75 8e 81 93 70 7f 70 8f 8c 7f 81 6d 6f 81 6a"; + + memset(&bursts[0], 0, sizeof(bursts)); + rc = osmo_hexparse(ahs_sid_update, (uint8_t *)&bursts[BURST_PLEN * 2], BURST_PLEN * 10); + OSMO_ASSERT(rc == BURST_PLEN * 4); + + /* Test detection and decoding of AHS_SID_UPDATE */ + test_gsm0503_tch_afhs_decode_dtx(&bursts[0], BURST_PLEN * 0, &amr_last_dtx, false /* AHS */, + "detection/decoding of AHS_SID_UPDATE"); + test_gsm0503_tch_afhs_decode_dtx(&bursts[0], BURST_PLEN * 2, &amr_last_dtx, false /* AHS */, + "detection/decoding of AHS_SID_UPDATE"); + test_gsm0503_tch_afhs_decode_dtx(&bursts[0], BURST_PLEN * 4, &amr_last_dtx, false /* AHS */, + "detection/decoding of AHS_SID_UPDATE"); +} + +static void test_gsm0503_tch_afhs_decode_dtx_facch(void) +{ + enum gsm0503_amr_dtx_frames amr_last_dtx; + sbit_t bursts[BURST_PLEN * 8]; /* 8 bursts */ + unsigned int i; + + /* Set stealing bits to provoke FACCH/[FH] detection */ + for (i = 0; i < 8; i++) { + sbit_t *burst = &bursts[BURST_PLEN * i]; + memset(&burst[0], 0, BURST_PLEN); + burst[i >> 2 ? 57 : 58] = -127; + } + + amr_last_dtx = AFS_SID_UPDATE; + test_gsm0503_tch_afhs_decode_dtx(&bursts[0], BURST_PLEN * 0, + &amr_last_dtx, true /* AFS */, + "tagging of FACCH/F"); + OSMO_ASSERT(amr_last_dtx == AMR_OTHER); + + amr_last_dtx = AHS_SID_UPDATE; + test_gsm0503_tch_afhs_decode_dtx(&bursts[0], BURST_PLEN * 0, + &amr_last_dtx, false /* AHS */, + "tagging of FACCH/H"); + OSMO_ASSERT(amr_last_dtx == AMR_OTHER); } int main(int argc, char **argv) @@ -126,5 +259,8 @@ test_gsm0503_detect_ahs_dtx_frame(sample_sid_first_inh_frame); test_gsm0503_detect_ahs_dtx_frame(sample_sid_update_inh_frame); + test_gsm0503_tch_afhs_decode_dtx_sid_update(); + test_gsm0503_tch_afhs_decode_dtx_facch(); + return EXIT_SUCCESS; } diff -Nru libosmocore-1.6.0/tests/dtx/dtx_gsm0503_test.ok libosmocore-1.7.0/tests/dtx/dtx_gsm0503_test.ok --- libosmocore-1.6.0/tests/dtx/dtx_gsm0503_test.ok 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/tests/dtx/dtx_gsm0503_test.ok 2022-06-28 15:00:51.000000000 +0000 @@ -1,11 +1,27 @@ FR AMR DTX FRAMES: - ==> AFS_SID_FIRST, n_errors=0, n_bits_total=212 - ==> AFS_SID_UPDATE (marker), n_errors=0, n_bits_total=212 - ==> AFS_ONSET, n_errors=0, n_bits_total=228 + ==> AFS_SID_FIRST, n_errors=0, n_bits_total=212, mode_id=-1 + ==> AFS_SID_UPDATE (marker), n_errors=0, n_bits_total=212, mode_id=-1 + ==> AFS_ONSET, n_errors=0, n_bits_total=228, mode_id=0 HR AMR DTX FRAMES: - ==> AHS_SID_UPDATE (marker), n_errors=0, n_bits_total=212 - ==> AHS_SID_FIRST_P1, n_errors=0, n_bits_total=212 - ==> AHS_SID_FIRST_P2, n_errors=0, n_bits_total=114 - ==> AHS_ONSET, n_errors=0, n_bits_total=114 - ==> AHS_SID_FIRST_INH, n_errors=0, n_bits_total=212 - ==> AHS_SID_UPDATE_INH, n_errors=0, n_bits_total=212 + ==> AHS_SID_UPDATE (marker), n_errors=0, n_bits_total=212, mode_id=-1 + ==> AHS_SID_FIRST_P1, n_errors=0, n_bits_total=212, mode_id=-1 + ==> AHS_SID_FIRST_P2, n_errors=0, n_bits_total=114, mode_id=0 + ==> AHS_ONSET, n_errors=0, n_bits_total=114, mode_id=0 + ==> AHS_SID_FIRST_INH, n_errors=0, n_bits_total=212, mode_id=-1 + ==> AHS_SID_UPDATE_INH, n_errors=0, n_bits_total=212, mode_id=-1 +Running test_gsm0503_tch_afhs_decode_dtx(at offset=0): testing detection of AFS_SID_UPDATE + ==> gsm0503_tch_afs_decode_dtx() yields 'AFS_SID_UPDATE (marker)' (rc=0, BER 0/212) +Running test_gsm0503_tch_afhs_decode_dtx(at offset=464): testing decoding of AFS_SID_UPDATE + ==> gsm0503_tch_afs_decode_dtx() yields 'AFS_SID_UPDATE_CN (audio)' (rc=5, BER 0/212) + ====> tch_data[] = { 26e9b1d2b0 } +Running test_gsm0503_tch_afhs_decode_dtx(at offset=0): testing detection/decoding of AHS_SID_UPDATE + ==> gsm0503_tch_ahs_decode_dtx() yields 'AMR_OTHER (audio)' (rc=-1, BER 109/212) +Running test_gsm0503_tch_afhs_decode_dtx(at offset=232): testing detection/decoding of AHS_SID_UPDATE + ==> gsm0503_tch_ahs_decode_dtx() yields 'AHS_SID_UPDATE_CN (audio)' (rc=5, BER 0/424) + ====> tch_data[] = { 6003ccb270 } +Running test_gsm0503_tch_afhs_decode_dtx(at offset=464): testing detection/decoding of AHS_SID_UPDATE + ==> gsm0503_tch_ahs_decode_dtx() yields 'AMR_OTHER (audio)' (rc=-1, BER 111/212) +Running test_gsm0503_tch_afhs_decode_dtx(at offset=0): testing tagging of FACCH/F + ==> gsm0503_tch_afs_decode_dtx() yields 'AMR_OTHER (audio)' (rc=-1, BER 456/456) +Running test_gsm0503_tch_afhs_decode_dtx(at offset=0): testing tagging of FACCH/H + ==> gsm0503_tch_ahs_decode_dtx() yields 'AMR_OTHER (audio)' (rc=-1, BER 456/456) diff -Nru libosmocore-1.6.0/tests/fr/fr_test.c libosmocore-1.7.0/tests/fr/fr_test.c --- libosmocore-1.6.0/tests/fr/fr_test.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/tests/fr/fr_test.c 2022-06-28 15:00:51.000000000 +0000 @@ -12,10 +12,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. - * */ #define _GNU_SOURCE diff -Nru libosmocore-1.6.0/tests/gsm0408/gsm0408_test.c libosmocore-1.7.0/tests/gsm0408/gsm0408_test.c --- libosmocore-1.6.0/tests/gsm0408/gsm0408_test.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/tests/gsm0408/gsm0408_test.c 2022-06-28 15:00:51.000000000 +0000 @@ -12,10 +12,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 GCC diagnostic ignored "-Wdeprecated-declarations" @@ -1736,6 +1732,16 @@ VERIFY(rc, <, 0); } +static void test_rach_tx_integer_raw2val() +{ + unsigned int raw; + for (raw = 0; raw <= 0x0f; raw++) { + unsigned int val = rach_tx_integer_raw2val(raw); + printf("rach_tx_integer_raw2val(0x0%x): %u slots used to spread transmission\n", + raw, val); + } +} + int main(int argc, char **argv) { test_bearer_cap(); @@ -1754,6 +1760,7 @@ test_print_encoding(); test_range_encoding(); test_power_ctrl(); + test_rach_tx_integer_raw2val(); return EXIT_SUCCESS; } diff -Nru libosmocore-1.6.0/tests/gsm0408/gsm0408_test.ok libosmocore-1.7.0/tests/gsm0408/gsm0408_test.ok --- libosmocore-1.6.0/tests/gsm0408/gsm0408_test.ok 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/tests/gsm0408/gsm0408_test.ok 2022-06-28 15:00:51.000000000 +0000 @@ -791,3 +791,19 @@ Random range test: range 255, max num ARFCNs 22 Random range test: range 511, max num ARFCNs 18 Random range test: range 1023, max num ARFCNs 16 +rach_tx_integer_raw2val(0x00): 3 slots used to spread transmission +rach_tx_integer_raw2val(0x01): 4 slots used to spread transmission +rach_tx_integer_raw2val(0x02): 5 slots used to spread transmission +rach_tx_integer_raw2val(0x03): 6 slots used to spread transmission +rach_tx_integer_raw2val(0x04): 7 slots used to spread transmission +rach_tx_integer_raw2val(0x05): 8 slots used to spread transmission +rach_tx_integer_raw2val(0x06): 9 slots used to spread transmission +rach_tx_integer_raw2val(0x07): 10 slots used to spread transmission +rach_tx_integer_raw2val(0x08): 11 slots used to spread transmission +rach_tx_integer_raw2val(0x09): 12 slots used to spread transmission +rach_tx_integer_raw2val(0x0a): 14 slots used to spread transmission +rach_tx_integer_raw2val(0x0b): 16 slots used to spread transmission +rach_tx_integer_raw2val(0x0c): 20 slots used to spread transmission +rach_tx_integer_raw2val(0x0d): 25 slots used to spread transmission +rach_tx_integer_raw2val(0x0e): 32 slots used to spread transmission +rach_tx_integer_raw2val(0x0f): 50 slots used to spread transmission diff -Nru libosmocore-1.6.0/tests/gsm0502/gsm0502_test.c libosmocore-1.7.0/tests/gsm0502/gsm0502_test.c --- libosmocore-1.6.0/tests/gsm0502/gsm0502_test.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/tests/gsm0502/gsm0502_test.c 2022-06-28 15:00:51.000000000 +0000 @@ -15,10 +15,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 diff -Nru libosmocore-1.6.0/tests/gsm0808/gsm0808_test.c libosmocore-1.7.0/tests/gsm0808/gsm0808_test.c --- libosmocore-1.6.0/tests/gsm0808/gsm0808_test.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/tests/gsm0808/gsm0808_test.c 2022-06-28 15:00:51.000000000 +0000 @@ -12,10 +12,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 @@ -428,6 +424,59 @@ osmo_hexdump(diag->msg, diag_len-2)); } +/* Test Perform Location Report SYS#5891 */ +static void test_dec_perform_location_report_sys5891() +{ +/* Message Type Perform Location Request + Location Type + Element ID: 0x44 + Length: 1 + Location Information: current geographic location (0x00) + Cell Identifier/CI (25911) + Element ID: 0x05 + Length: 8 + 0000 .... = Spare bit(s): 0x00 + .... 0000 = Cell identification discriminator: The whole Cell Global Identification, CGI, is used to identify the cells. (0) + Mobile Country Code (MCC): (removed)) + Mobile Network Code (MNC): (removed)) + Cell LAC: 0x001e (30) + Cell CI: 0x6537 (25911) + LCS Client Type + Element ID: 0x48 + Length: 1 + 0011 .... = Client Category: Emergency Services (0x03) + .... 0000 = Client Subtype: unspecified (0x00) + LCS Priority + Element ID: 0x43 + Length: 1 + Periodicity: highest (0) + LCS QoS + Element ID: 0x3e + Length: 4 + 0000 00.. = Spare: 0x00 + .... ..0. = Velocity Requested: do not report velocity (0x00) + .... ...0 = Vertical Coordinate Indicator: vertical coordinate not requested (0x00) + 1... .... = Horizontal Accuracy Indicator: horizontal accuracy is specified (0x01) + .001 0010 = Horizontal Accuracy: 0x12 + 0... .... = Vertical Accuracy Indicator: vertical accuracy is not specified (0x00) + .000 0000 = Spare: 0x00 + 00.. .... = Response Time Category: Response Time is not specified (0x00) +*/ + const uint8_t hex[] = { + 0x2b, 0x44, 0x01, 0x00, 0x05, 0x08, 0x00, 0xab, 0xbc, 0xcd, 0x00, 0x1e, + 0x65, 0x37, 0x48, 0x01, 0x30, 0x43, 0x01, 0x00, 0x3e, 0x04, 0x00, 0x92, + 0x00, 0x00 + }; + + struct tlv_parsed tp; + int rc; + + printf("Testing decoding Perform Location Report SYS#5891\n"); + + rc = tlv_parse(&tp, gsm0808_att_tlvdef(), hex+1, sizeof(hex)-1, 0, 0); + OSMO_ASSERT(rc == 5); +} + static void test_create_ass() { static const uint8_t res1[] = @@ -1076,6 +1125,19 @@ msgb_free(msg); } +static void test_gsm0808_dec_cell_id_list_srvcc() +{ + /* taken from a pcap file of a real-world 3rd party MSC (SYS#5838) */ + const uint8_t enc_cil[] = { 0x0b, 0x2, 0xf2, 0x10, 0x4e, 0x20, 0x15, 0xbe}; + struct gsm0808_cell_id_list2 dec_cil; + int rc; + + rc = gsm0808_dec_cell_id_list2(&dec_cil, enc_cil, sizeof(enc_cil)); + OSMO_ASSERT(rc == sizeof(enc_cil)); + OSMO_ASSERT(dec_cil.id_discr = CELL_IDENT_SAI); + OSMO_ASSERT(dec_cil.id_list_len = 1); +} + static void test_gsm0808_enc_dec_cell_id_list_lac() { struct gsm0808_cell_id_list2 enc_cil; @@ -2494,6 +2556,7 @@ test_gsm0808_enc_dec_cell_id_list_multi_ci(); test_gsm0808_enc_dec_cell_id_list_multi_lac_and_ci(); test_gsm0808_enc_dec_cell_id_list_multi_global(); + test_gsm0808_dec_cell_id_list_srvcc(); test_cell_id_list_add(); @@ -2515,6 +2578,7 @@ test_gsm0808_cell_id_to_from_cgi(); test_dec_confusion(); + test_dec_perform_location_report_sys5891(); printf("Done\n"); return EXIT_SUCCESS; diff -Nru libosmocore-1.6.0/tests/gsm0808/gsm0808_test.ok libosmocore-1.7.0/tests/gsm0808/gsm0808_test.ok --- libosmocore-1.6.0/tests/gsm0808/gsm0808_test.ok 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/tests/gsm0808/gsm0808_test.ok 2022-06-28 15:00:51.000000000 +0000 @@ -916,4 +916,5 @@ Diagnostics error octet location 0 (Error location not determined) Diagnostics error bit location 15 (Reserved value) Diagnostics message that provoked the error: 00 03 25 03 25 +Testing decoding Perform Location Report SYS#5891 Done diff -Nru libosmocore-1.6.0/tests/gsm23003/gsm23003_test.c libosmocore-1.7.0/tests/gsm23003/gsm23003_test.c --- libosmocore-1.6.0/tests/gsm23003/gsm23003_test.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/tests/gsm23003/gsm23003_test.c 2022-06-28 15:00:51.000000000 +0000 @@ -15,10 +15,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 diff -Nru libosmocore-1.6.0/tests/gsm23236/gsm23236_test.c libosmocore-1.7.0/tests/gsm23236/gsm23236_test.c --- libosmocore-1.6.0/tests/gsm23236/gsm23236_test.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/tests/gsm23236/gsm23236_test.c 2022-06-28 15:00:51.000000000 +0000 @@ -15,10 +15,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 diff -Nru libosmocore-1.6.0/tests/gsm29205/gsm29205_test.c libosmocore-1.7.0/tests/gsm29205/gsm29205_test.c --- libosmocore-1.6.0/tests/gsm29205/gsm29205_test.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/tests/gsm29205/gsm29205_test.c 2022-06-28 15:00:51.000000000 +0000 @@ -12,10 +12,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 diff -Nru libosmocore-1.6.0/tests/gsm48/rest_octets_test.c libosmocore-1.7.0/tests/gsm48/rest_octets_test.c --- libosmocore-1.6.0/tests/gsm48/rest_octets_test.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/tests/gsm48/rest_octets_test.c 2022-06-28 15:00:51.000000000 +0000 @@ -13,10 +13,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 diff -Nru libosmocore-1.6.0/tests/iuup/iuup_test.c libosmocore-1.7.0/tests/iuup/iuup_test.c --- libosmocore-1.6.0/tests/iuup/iuup_test.c 1970-01-01 00:00:00.000000000 +0000 +++ libosmocore-1.7.0/tests/iuup/iuup_test.c 2022-06-28 15:00:51.000000000 +0000 @@ -0,0 +1,764 @@ +#include +#include + +#include +#include +#include +#include +#include +#include + +#include +#include + +static void *iuup_test_ctx; + +static struct osmo_iuup_rnl_config def_configure_req = { + .transparent = false, + .active = true, + .supported_versions_mask = 0x0001, + .num_rfci = 3, + .num_subflows = 3, + .IPTIs_present = true, + .rfci = { + {.used = 1, .id = 0, .IPTI = 1, .subflow_sizes = {81, 103, 60} }, + {.used = 1, .id = 1, .IPTI = 7, .subflow_sizes = {39, 0, 0} }, + {.used = 1, .id = 2, .IPTI = 1, .subflow_sizes = {0, 0, 0} }, + }, + /* .delivery_err_sdu = All set to 0 (YES) by default, */ + .IPTIs_present = true, + .t_init = { .t_ms = IUUP_TIMER_INIT_T_DEFAULT, .n_max = IUUP_TIMER_INIT_N_DEFAULT }, + .t_ta = { .t_ms = IUUP_TIMER_TA_T_DEFAULT, .n_max = IUUP_TIMER_TA_N_DEFAULT }, + .t_rc = { .t_ms = IUUP_TIMER_RC_T_DEFAULT, .n_max = IUUP_TIMER_RC_N_DEFAULT }, +}; + +/* Frame 33, "Initialization", OS#4744 3g_call_23112021.pcapng +IuUP + 1110 .... = PDU Type: Control Procedure (14) + .... 00.. = Ack/Nack: Procedure (0) + .... ..00 = Frame Number: 0 + 0000 .... = Mode Version: 0x0 + .... 0000 = Procedure: Initialization (0) + 1101 11.. = Header CRC: 0x37 [correct] + .... ..11 1001 1001 = Payload CRC: 0x399 + 000. .... = Spare: 0x0 + ...1 .... = TI: IPTIs present in frame (1) + .... 011. = Subflows: 3 + .... ...0 = Chain Indicator: this frame is the last frame for the procedure (0) + RFCI 0 Initialization + 0... .... = RFCI 0 LRI: Not last RFCI (0x0) + .0.. .... = RFCI 0 LI: one octet used (0x0) + ..00 0000 = RFCI 0: 0 + RFCI 0 Flow 0 Len: 81 + RFCI 0 Flow 1 Len: 103 + RFCI 0 Flow 2 Len: 60 + RFCI 1 Initialization + 0... .... = RFCI 1 LRI: Not last RFCI (0x0) + .0.. .... = RFCI 1 LI: one octet used (0x0) + ..00 0001 = RFCI 1: 1 + RFCI 1 Flow 0 Len: 39 + RFCI 1 Flow 1 Len: 0 + RFCI 1 Flow 2 Len: 0 + RFCI 2 Initialization + 1... .... = RFCI 2 LRI: Last RFCI in current frame (0x1) + .0.. .... = RFCI 2 LI: one octet used (0x0) + ..00 0010 = RFCI 2: 2 + RFCI 2 Flow 0 Len: 0 + RFCI 2 Flow 1 Len: 0 + RFCI 2 Flow 2 Len: 0 + IPTIs + 0001 .... = RFCI 0 IPTI: 0x1 + .... 0111 = RFCI 1 IPTI: 0x7 + 0001 .... = RFCI 2 IPTI: 0x1 + Iu UP Mode Versions Supported: 0x0001 + 0... .... .... .... = Version 16: not supported (0x0) + .0.. .... .... .... = Version 15: not supported (0x0) + ..0. .... .... .... = Version 14: not supported (0x0) + ...0 .... .... .... = Version 13: not supported (0x0) + .... 0... .... .... = Version 12: not supported (0x0) + .... .0.. .... .... = Version 11: not supported (0x0) + .... ..0. .... .... = Version 10: not supported (0x0) + .... ...0 .... .... = Version 9: not supported (0x0) + .... .... 0... .... = Version 8: not supported (0x0) + .... .... .0.. .... = Version 7: not supported (0x0) + .... .... ..0. .... = Version 6: not supported (0x0) + .... .... ...0 .... = Version 5: not supported (0x0) + .... .... .... 0... = Version 4: not supported (0x0) + .... .... .... .0.. = Version 3: not supported (0x0) + .... .... .... ..0. = Version 2: not supported (0x0) + .... .... .... ...1 = Version 1: supported (0x1) + 0000 .... = RFCI Data Pdu Type: PDU type 0 (0x0) +*/ +static const uint8_t iuup_initialization[] = { + 0xe0, 0x00, 0xdf, 0x99, 0x16, 0x00, 0x51, 0x67, 0x3c, 0x01, 0x27, 0x00, + 0x00, 0x82, 0x00, 0x00, 0x00, 0x17, 0x10, 0x00, 0x01, 0x00 +}; + +/* Frame 87, "Data RFCI=0 FN = 1", OS#4744 3g_call_23112021.pcapng +IuUP + 0000 .... = PDU Type: Data with CRC (0) + .... 0001 = Frame Number: 1 + 00.. .... = FQC: Frame Good (0) + ..00 0000 = RFCI: 0x00 + 1110 00.. = Header CRC: 0x38 [correct] + .... ..11 1111 1111 = Payload CRC: 0x3ff + Payload Data: 08556d944c71a1a081e7ead204244480000ecd82b81118000097c4794e7740 +*/ +static const uint8_t iuup_data[] = { + 0x01, 0x00, 0xe3, 0xff, /*payload starts here: */ 0x08, 0x55, 0x6d, 0x94, 0x4c, 0x71, 0xa1, 0xa0, + 0x81, 0xe7, 0xea, 0xd2, 0x04, 0x24, 0x44, 0x80, 0x00, 0x0e, 0xcd, 0x82, + 0xb8, 0x11, 0x18, 0x00, 0x00, 0x97, 0xc4, 0x79, 0x4e, 0x77, 0x40 +}; + +#define IUUP_MSGB_SIZE 4096 + +static struct osmo_iuup_tnl_prim *itp_ctrl_nack_alloc(enum iuup_procedure proc_ind, enum iuup_error_cause error_cause, uint8_t fn) +{ + struct osmo_iuup_tnl_prim *tnp; + struct iuup_ctrl_nack *nack; + tnp = osmo_iuup_tnl_prim_alloc(iuup_test_ctx, OSMO_IUUP_TNL_UNITDATA, PRIM_OP_INDICATION, IUUP_MSGB_SIZE); + tnp->oph.msg->l2h = msgb_put(tnp->oph.msg, sizeof(struct iuup_ctrl_nack)); + nack = (struct iuup_ctrl_nack *) msgb_l2(tnp->oph.msg); + *nack = (struct iuup_ctrl_nack){ + .hdr = { + .frame_nr = fn, + .ack_nack = IUUP_AN_NACK, + .pdu_type = IUUP_PDU_T_CONTROL, + .proc_ind = proc_ind, + .mode_version = 0, + .payload_crc_hi = 0, + .header_crc = 0, + .payload_crc_lo = 0, + }, + .spare = 0, + .error_cause = error_cause, + }; + nack->hdr.header_crc = osmo_iuup_compute_header_crc(msgb_l2(tnp->oph.msg), msgb_l2len(tnp->oph.msg)); + return tnp; +} + +static struct osmo_iuup_tnl_prim *itp_ctrl_ack_alloc(enum iuup_procedure proc_ind, uint8_t fn) +{ + struct osmo_iuup_tnl_prim *tnp; + struct iuup_ctrl_ack *ack; + tnp = osmo_iuup_tnl_prim_alloc(iuup_test_ctx, OSMO_IUUP_TNL_UNITDATA, PRIM_OP_INDICATION, IUUP_MSGB_SIZE); + tnp->oph.msg->l2h = msgb_put(tnp->oph.msg, sizeof(struct iuup_ctrl_ack)); + ack = (struct iuup_ctrl_ack *) msgb_l2(tnp->oph.msg); + *ack = (struct iuup_ctrl_ack){ + .hdr = { + .frame_nr = fn, + .ack_nack = IUUP_AN_ACK, + .pdu_type = IUUP_PDU_T_CONTROL, + .proc_ind = proc_ind, + .mode_version = 0, + .payload_crc_hi = 0, + .header_crc = 0, + .payload_crc_lo = 0, + }, + }; + ack->hdr.header_crc = osmo_iuup_compute_header_crc(msgb_l2(tnp->oph.msg), msgb_l2len(tnp->oph.msg)); + return tnp; +} + +static void clock_override_set(long sec, long usec) +{ + osmo_gettimeofday_override_time.tv_sec = sec + usec / (1000*1000); + osmo_gettimeofday_override_time.tv_usec = usec % (1000*1000); + printf("sys={%lu.%06lu}, %s\n", osmo_gettimeofday_override_time.tv_sec, + osmo_gettimeofday_override_time.tv_usec, __func__); +} + +void test_crc(void) +{ + int rc; + + /* Frame 34, "Initialization ACK", OS#4744 3g_call_23112021.pcapng */ + static const uint8_t iuup_initialization_ack[] = { + 0xe4, 0x00, 0xdf, 0x99, 0x16, 0x00, 0x51, 0x67, 0x3c, 0x01, 0x27, 0x00, + 0x00, 0x82, 0x00, 0x00, 0x00, 0x17, 0x10, 0x00, 0x01, 0x00 + }; + + printf("=== start: %s ===\n", __func__); + + rc = osmo_iuup_compute_header_crc(iuup_initialization, sizeof(iuup_initialization)); + printf("iuup_initialization: Header CRC = 0x%02x\n", rc); + rc = osmo_iuup_compute_payload_crc(iuup_initialization, sizeof(iuup_initialization)); + printf("iuup_initialization: Payload CRC = 0x%03x\n", rc); + + rc = osmo_iuup_compute_header_crc(iuup_initialization_ack, sizeof(iuup_initialization_ack)); + printf("iuup_initialization_ack: Header CRC = 0x%02x\n", rc); + rc = osmo_iuup_compute_payload_crc(iuup_initialization_ack, sizeof(iuup_initialization_ack)); + printf("iuup_initialization_ack: Payload CRC = 0x%03x\n", rc); + + printf("=== end: %s ===\n", __func__); +} + + +/**************************** + * test_tinit_timeout_retrans + ****************************/ +static unsigned int _tinit_timeout_retrans_user_rx_prim = 0; +static int _tinit_timeout_retrans_user_prim_cb(struct osmo_prim_hdr *oph, void *ctx) +{ + struct osmo_iuup_rnl_prim *irp = (struct osmo_iuup_rnl_prim *)oph; + printf("%s()\n", __func__); + + OSMO_ASSERT(OSMO_PRIM_HDR(&irp->oph) == OSMO_PRIM(OSMO_IUUP_RNL_STATUS, PRIM_OP_INDICATION)); + + OSMO_ASSERT(irp->u.status.procedure == IUUP_PROC_ERR_EVENT); + OSMO_ASSERT(irp->u.status.u.error_event.cause == IUUP_ERR_CAUSE_INIT_FAILURE_NET_TMR); + OSMO_ASSERT(irp->u.status.u.error_event.distance == IUUP_ERR_DIST_LOCAL); + _tinit_timeout_retrans_user_rx_prim++; + msgb_free(oph->msg); + return 0; +} +static unsigned int _tinit_timeout_retrans_transport_rx_prim = 0; +static int _tinit_timeout_retrans_transport_prim_cb(struct osmo_prim_hdr *oph, void *ctx) +{ + struct osmo_iuup_tnl_prim *itp = (struct osmo_iuup_tnl_prim *)oph; + struct msgb *msg = oph->msg; + + printf("%s()\n", __func__); + OSMO_ASSERT(OSMO_PRIM_HDR(&itp->oph) == OSMO_PRIM(OSMO_IUUP_TNL_UNITDATA, PRIM_OP_REQUEST)); + printf("Transport: DL len=%u: %s\n", msgb_l2len(msg), + osmo_hexdump((const unsigned char *) msgb_l2(msg), msgb_l2len(msg))); + _tinit_timeout_retrans_transport_rx_prim++; + + msgb_free(msg); + return 0; +} +void test_tinit_timeout_retrans(void) +{ + struct osmo_iuup_instance *iui; + struct osmo_iuup_rnl_prim *rnp; + int rc, i; + + iui = osmo_iuup_instance_alloc(iuup_test_ctx, __func__); + OSMO_ASSERT(iui); + osmo_iuup_instance_set_user_prim_cb(iui, _tinit_timeout_retrans_user_prim_cb, NULL); + osmo_iuup_instance_set_transport_prim_cb(iui, _tinit_timeout_retrans_transport_prim_cb, NULL); + + clock_override_set(0, 0); + + /* Tx CONFIG.req */ + rnp = osmo_iuup_rnl_prim_alloc(iuup_test_ctx, OSMO_IUUP_RNL_CONFIG, PRIM_OP_REQUEST, IUUP_MSGB_SIZE); + rnp->u.config = def_configure_req; + OSMO_ASSERT((rc = osmo_iuup_rnl_prim_down(iui, rnp)) == 0); + /* STATUS-INIT.req is transmitted automatically: */ + OSMO_ASSERT(_tinit_timeout_retrans_transport_rx_prim == 1); + + /* After one sec, INITIALIZATION msg is retransmitted */ + for (i = 1; i < IUUP_TIMER_INIT_N_DEFAULT + 1; i++) { + clock_override_set(0, IUUP_TIMER_INIT_T_DEFAULT*1000 * i); + osmo_select_main(0); + OSMO_ASSERT(_tinit_timeout_retrans_transport_rx_prim == i + 1); + } + /* Last one should send an error event: */ + OSMO_ASSERT(_tinit_timeout_retrans_user_rx_prim == 0); + clock_override_set(0, IUUP_TIMER_INIT_T_DEFAULT*1000 * i); + osmo_select_main(0); + OSMO_ASSERT(_tinit_timeout_retrans_transport_rx_prim == i); + OSMO_ASSERT(_tinit_timeout_retrans_user_rx_prim == 1); + + /* Nothing else is received afterwards. osmo_select_main() will block forever. */ + /*clock_override_set(i + 1, 0); + osmo_select_main(0); + OSMO_ASSERT(_tinit_timeout_retrans_transport_rx_prim == i); + OSMO_ASSERT(_tinit_timeout_retrans_user_rx_prim == 1);*/ + + osmo_iuup_instance_free(iui); +} + +/**************************** + * test_tinit_nack + ****************************/ +static unsigned int _init_nack_retrans_user_rx_prim = 0; +static int _init_nack_retrans_user_prim_cb(struct osmo_prim_hdr *oph, void *ctx) +{ + struct osmo_iuup_rnl_prim *irp = (struct osmo_iuup_rnl_prim *)oph; + + printf("%s()\n", __func__); + + OSMO_ASSERT(OSMO_PRIM_HDR(&irp->oph) == OSMO_PRIM(OSMO_IUUP_RNL_STATUS, PRIM_OP_INDICATION)); + + OSMO_ASSERT(irp->u.status.procedure == IUUP_PROC_ERR_EVENT); + OSMO_ASSERT(irp->u.status.u.error_event.cause == IUUP_ERR_CAUSE_INIT_FAILURE_REP_NACK); + OSMO_ASSERT(irp->u.status.u.error_event.distance == IUUP_ERR_DIST_SECOND_FWD); + _init_nack_retrans_user_rx_prim++; + msgb_free(oph->msg); + return 0; +} +static int _init_nack_retrans_transport_rx_prim = 0; +static int _init_nack_retrans_transport_prim_cb(struct osmo_prim_hdr *oph, void *ctx) +{ + struct osmo_iuup_tnl_prim *itp = (struct osmo_iuup_tnl_prim *)oph; + struct msgb *msg = oph->msg; + + printf("%s()\n", __func__); + OSMO_ASSERT(OSMO_PRIM_HDR(&itp->oph) == OSMO_PRIM(OSMO_IUUP_TNL_UNITDATA, PRIM_OP_REQUEST)); + printf("Transport: DL len=%u: %s\n", msgb_l2len(msg), + osmo_hexdump((const unsigned char *) msgb_l2(msg), msgb_l2len(msg))); + _init_nack_retrans_transport_rx_prim++; + + msgb_free(msg); + return 0; +} +void test_init_nack_retrans(void) +{ + struct osmo_iuup_instance *iui; + struct osmo_iuup_rnl_prim *rnp; + struct osmo_iuup_tnl_prim *tnp; + int rc, i; + + iui = osmo_iuup_instance_alloc(iuup_test_ctx, __func__); + OSMO_ASSERT(iui); + osmo_iuup_instance_set_user_prim_cb(iui, _init_nack_retrans_user_prim_cb, NULL); + osmo_iuup_instance_set_transport_prim_cb(iui, _init_nack_retrans_transport_prim_cb, NULL); + + clock_override_set(0, 0); + + /* Tx CONFIG.req */ + rnp = osmo_iuup_rnl_prim_alloc(iuup_test_ctx, OSMO_IUUP_RNL_CONFIG, PRIM_OP_REQUEST, IUUP_MSGB_SIZE); + rnp->u.config = def_configure_req; + OSMO_ASSERT((rc = osmo_iuup_rnl_prim_down(iui, rnp)) == 0); + /* STATUS-INIT.req is transmitted automatically: */ + OSMO_ASSERT(_init_nack_retrans_transport_rx_prim == 1); + + /* After one sec, INITIALIZATION msg is retransmitted */ + for (i = 1; i < IUUP_TIMER_INIT_N_DEFAULT + 1; i++) { + /* Send NACK: */ + tnp = itp_ctrl_nack_alloc(IUUP_PROC_INIT, IUUP_ERR_CAUSE_MODE_VERSION_NOT_SUPPORTED, 0); + OSMO_ASSERT((rc = osmo_iuup_tnl_prim_up(iui, tnp)) == 0); + /* A new INIT is retransmitted: */ + OSMO_ASSERT(_init_nack_retrans_transport_rx_prim == i + 1); + } + /* Last one should send an error event: */ + OSMO_ASSERT(_init_nack_retrans_user_rx_prim == 0); + tnp = itp_ctrl_nack_alloc(IUUP_PROC_INIT, IUUP_ERR_CAUSE_MODE_VERSION_NOT_SUPPORTED, 0); + OSMO_ASSERT((rc = osmo_iuup_tnl_prim_up(iui, tnp)) == 0); + OSMO_ASSERT(_init_nack_retrans_transport_rx_prim == i); + OSMO_ASSERT(_init_nack_retrans_user_rx_prim == 1); + + /* Nothing else is received afterwards. osmo_select_main() will block forever. */ + + osmo_iuup_instance_free(iui); +} + + +/**************************** + * test_init_ack + ****************************/ +static unsigned int _init_ack_user_rx_prim = 0; +static int _init_ack_user_prim_cb(struct osmo_prim_hdr *oph, void *ctx) +{ + struct osmo_iuup_rnl_prim *irp = (struct osmo_iuup_rnl_prim *)oph; + struct msgb *msg = oph->msg; + + printf("%s()\n", __func__); + + OSMO_ASSERT(OSMO_PRIM_HDR(&irp->oph) == OSMO_PRIM(OSMO_IUUP_RNL_DATA, PRIM_OP_INDICATION)); + printf("User: UL len=%u: %s\n", msgb_l3len(msg), + osmo_hexdump((const unsigned char *) msgb_l3(msg), msgb_l3len(msg))); + + _init_ack_user_rx_prim++; + msgb_free(oph->msg); + return 0; +} +static int _init_ack_transport_rx_prim = 0; +static int _init_ack_transport_prim_cb(struct osmo_prim_hdr *oph, void *ctx) +{ + struct osmo_iuup_tnl_prim *itp = (struct osmo_iuup_tnl_prim *)oph; + struct msgb *msg = oph->msg; + + printf("%s()\n", __func__); + OSMO_ASSERT(OSMO_PRIM_HDR(&itp->oph) == OSMO_PRIM(OSMO_IUUP_TNL_UNITDATA, PRIM_OP_REQUEST)); + printf("Transport: DL len=%u: %s\n", msgb_l2len(msg), + osmo_hexdump((const unsigned char *) msgb_l2(msg), msgb_l2len(msg))); + _init_ack_transport_rx_prim++; + + msgb_free(msg); + return 0; +} +void test_init_ack(void) +{ + struct osmo_iuup_instance *iui; + struct osmo_iuup_rnl_prim *rnp; + struct osmo_iuup_tnl_prim *tnp; + struct iuup_pdutype0_hdr *hdr0; + int rc; + + iui = osmo_iuup_instance_alloc(iuup_test_ctx, __func__); + OSMO_ASSERT(iui); + osmo_iuup_instance_set_user_prim_cb(iui, _init_ack_user_prim_cb, NULL); + osmo_iuup_instance_set_transport_prim_cb(iui, _init_ack_transport_prim_cb, NULL); + + clock_override_set(0, 0); + + /* Tx CONFIG.req */ + rnp = osmo_iuup_rnl_prim_alloc(iuup_test_ctx, OSMO_IUUP_RNL_CONFIG, PRIM_OP_REQUEST, IUUP_MSGB_SIZE); + rnp->u.config = def_configure_req; + OSMO_ASSERT((rc = osmo_iuup_rnl_prim_down(iui, rnp)) == 0); + /* STATUS-INIT.req is transmitted automatically: */ + OSMO_ASSERT(_init_ack_transport_rx_prim == 1); + + /* Send ACK: */ + tnp = itp_ctrl_ack_alloc(IUUP_PROC_INIT, 0); + OSMO_ASSERT((rc = osmo_iuup_tnl_prim_up(iui, tnp)) == 0); + OSMO_ASSERT(_init_ack_transport_rx_prim == 1); /* Make sure there's no retrans */ + OSMO_ASSERT(_init_ack_user_rx_prim == 0); /* Make sure there's no error event */ + + /* Send IuUP incoming data to the implementation: */ + tnp = osmo_iuup_tnl_prim_alloc(iuup_test_ctx, OSMO_IUUP_TNL_UNITDATA, PRIM_OP_INDICATION, IUUP_MSGB_SIZE); + tnp->oph.msg->l2h = msgb_put(tnp->oph.msg, sizeof(iuup_data)); + hdr0 = (struct iuup_pdutype0_hdr *)msgb_l2(tnp->oph.msg); + memcpy(hdr0, iuup_data, sizeof(iuup_data)); + OSMO_ASSERT((rc = osmo_iuup_tnl_prim_up(iui, tnp)) == 0); + /* We receive it in RNL: */ + OSMO_ASSERT(_init_ack_user_rx_prim == 1); + + /* Now in opposite direction, RNL->[IuuP]->TNL: */ + rnp = osmo_iuup_rnl_prim_alloc(iuup_test_ctx, OSMO_IUUP_RNL_DATA, PRIM_OP_REQUEST, IUUP_MSGB_SIZE); + rnp->u.data.rfci = 0; + rnp->u.data.frame_nr = 1; + rnp->u.data.fqc = IUUP_FQC_FRAME_GOOD; + rnp->oph.msg->l3h = msgb_put(rnp->oph.msg, sizeof(iuup_data) - 4); + memcpy(rnp->oph.msg->l3h, iuup_data + 4, sizeof(iuup_data) - 4); + OSMO_ASSERT((rc = osmo_iuup_rnl_prim_down(iui, rnp)) == 0); + OSMO_ASSERT(_init_ack_transport_rx_prim == 2); /* We receive data in TNL */ + + osmo_iuup_instance_free(iui); +} + +/**************************** + * test_passive_init + ****************************/ +static unsigned int _passive_init_user_rx_prim = 0; +static int _passive_init_user_prim_cb(struct osmo_prim_hdr *oph, void *ctx) +{ + struct osmo_iuup_rnl_prim *irp = (struct osmo_iuup_rnl_prim *)oph; + struct msgb *msg = oph->msg; + + printf("%s()\n", __func__); + + switch (_passive_init_user_rx_prim) { + case 0: + OSMO_ASSERT(OSMO_PRIM_HDR(&irp->oph) == OSMO_PRIM(OSMO_IUUP_RNL_STATUS, PRIM_OP_INDICATION)); + OSMO_ASSERT(irp->u.status.procedure == IUUP_PROC_INIT); + break; + case 1: + default: + OSMO_ASSERT(OSMO_PRIM_HDR(&irp->oph) == OSMO_PRIM(OSMO_IUUP_RNL_DATA, PRIM_OP_INDICATION)); + printf("User: UL len=%u: %s\n", msgb_l3len(msg), + osmo_hexdump((const unsigned char *) msgb_l3(msg), msgb_l3len(msg))); + } + + _passive_init_user_rx_prim++; + msgb_free(oph->msg); + return 0; +} +static int _passive_init_transport_rx_prim = 0; +static int _passive_init_transport_prim_cb(struct osmo_prim_hdr *oph, void *ctx) +{ + struct osmo_iuup_tnl_prim *itp = (struct osmo_iuup_tnl_prim *)oph; + struct msgb *msg; + + printf("%s()\n", __func__); + msg = oph->msg; + OSMO_ASSERT(OSMO_PRIM_HDR(&itp->oph) == OSMO_PRIM(OSMO_IUUP_TNL_UNITDATA, PRIM_OP_REQUEST)); + printf("Transport: DL len=%u: %s\n", msgb_l2len(msg), + osmo_hexdump((const unsigned char *) msgb_l2(msg), msgb_l2len(msg))); + _passive_init_transport_rx_prim++; + + msgb_free(msg); + return 0; +} +void test_passive_init(void) +{ + /* Here we check the passive INIT code path, aka receiving INIT and returning INIT_ACK/NACK */ + struct osmo_iuup_instance *iui; + struct osmo_iuup_rnl_prim *rnp; + struct osmo_iuup_tnl_prim *tnp; + struct iuup_pdutype14_hdr *hdr14; + struct iuup_pdutype0_hdr *hdr0; + int rc; + + iui = osmo_iuup_instance_alloc(iuup_test_ctx, __func__); + OSMO_ASSERT(iui); + osmo_iuup_instance_set_user_prim_cb(iui, _passive_init_user_prim_cb, NULL); + osmo_iuup_instance_set_transport_prim_cb(iui, _passive_init_transport_prim_cb, NULL); + + clock_override_set(0, 0); + + /* Tx CONFIG.req */ + rnp = osmo_iuup_rnl_prim_alloc(iuup_test_ctx, OSMO_IUUP_RNL_CONFIG, PRIM_OP_REQUEST, IUUP_MSGB_SIZE); + rnp->u.config = def_configure_req; + rnp->u.config.active = false; + OSMO_ASSERT((rc = osmo_iuup_rnl_prim_down(iui, rnp)) == 0); + /* STATUS-INIT.req is NOT transmitted automatically: */ + OSMO_ASSERT(_passive_init_transport_rx_prim == 0); + + /* Send Init: */ + tnp = osmo_iuup_tnl_prim_alloc(iuup_test_ctx, OSMO_IUUP_TNL_UNITDATA, PRIM_OP_INDICATION, IUUP_MSGB_SIZE); + tnp->oph.msg->l2h = msgb_put(tnp->oph.msg, sizeof(iuup_initialization)); + hdr14 = (struct iuup_pdutype14_hdr *)msgb_l2(tnp->oph.msg); + memcpy(hdr14, iuup_initialization, sizeof(iuup_initialization)); + OSMO_ASSERT((rc = osmo_iuup_tnl_prim_up(iui, tnp)) == 0); + OSMO_ASSERT(_passive_init_transport_rx_prim == 1); /* We receive an Init ACK */ + OSMO_ASSERT(_passive_init_user_rx_prim == 1); /* We receive the Status-Init.ind */ + + /* Send IuUP incoming data to the implementation: */ + tnp = osmo_iuup_tnl_prim_alloc(iuup_test_ctx, OSMO_IUUP_TNL_UNITDATA, PRIM_OP_INDICATION, IUUP_MSGB_SIZE); + tnp->oph.msg->l2h = msgb_put(tnp->oph.msg, sizeof(iuup_data)); + hdr0 = (struct iuup_pdutype0_hdr *)msgb_l2(tnp->oph.msg); + memcpy(hdr0, iuup_data, sizeof(iuup_data)); + OSMO_ASSERT((rc = osmo_iuup_tnl_prim_up(iui, tnp)) == 0); + /* We receive it in RNL: */ + OSMO_ASSERT(_passive_init_user_rx_prim == 2); + + /* Now in opposite direction, RNL->[IuuP]->TNL: */ + rnp = osmo_iuup_rnl_prim_alloc(iuup_test_ctx, OSMO_IUUP_RNL_DATA, PRIM_OP_REQUEST, IUUP_MSGB_SIZE); + rnp->u.data.rfci = 0; + rnp->u.data.frame_nr = 1; + rnp->u.data.fqc = IUUP_FQC_FRAME_GOOD; + rnp->oph.msg->l3h = msgb_put(rnp->oph.msg, sizeof(iuup_data) - 4); + memcpy(rnp->oph.msg->l3h, iuup_data + 4, sizeof(iuup_data) - 4); + OSMO_ASSERT((rc = osmo_iuup_rnl_prim_down(iui, rnp)) == 0); + OSMO_ASSERT(_passive_init_transport_rx_prim == 2); /* We receive data in TNL */ + + osmo_iuup_instance_free(iui); +} + +/**************************** + * test_passive_init_retrans + ****************************/ +static unsigned int _passive_init_retrans_user_rx_prim = 0; +static int _passive_init_retrans_user_prim_cb(struct osmo_prim_hdr *oph, void *ctx) +{ + struct osmo_iuup_rnl_prim *irp = (struct osmo_iuup_rnl_prim *)oph; + struct msgb *msg = oph->msg; + + printf("%s()\n", __func__); + + switch (_passive_init_retrans_user_rx_prim) { + case 0: + case 1: + OSMO_ASSERT(OSMO_PRIM_HDR(&irp->oph) == OSMO_PRIM(OSMO_IUUP_RNL_STATUS, PRIM_OP_INDICATION)); + OSMO_ASSERT(irp->u.status.procedure == IUUP_PROC_INIT); + break; + case 2: + default: + OSMO_ASSERT(OSMO_PRIM_HDR(&irp->oph) == OSMO_PRIM(OSMO_IUUP_RNL_DATA, PRIM_OP_INDICATION)); + printf("User: UL len=%u: %s\n", msgb_l3len(msg), + osmo_hexdump((const unsigned char *) msgb_l3(msg), msgb_l3len(msg))); + } + + _passive_init_retrans_user_rx_prim++; + msgb_free(oph->msg); + return 0; +} +void test_passive_init_retrans(void) +{ + /* Here we check the passive INIT code path, aka receiving INIT and + * returning INIT_ACK/NACK. We emulate the peer not receiving the INIT + * ACK and hence retransmitting the INIT. The IuUP stack should then + * push the new INIT info up the stack and ACK it. */ + struct osmo_iuup_instance *iui; + struct osmo_iuup_rnl_prim *rnp; + struct osmo_iuup_tnl_prim *tnp; + struct iuup_pdutype14_hdr *hdr14; + struct iuup_pdutype0_hdr *hdr0; + int rc; + + /* reset global var, we reuse it together wth callback from test_passive_init(): */ + _passive_init_transport_rx_prim = 0; + + iui = osmo_iuup_instance_alloc(iuup_test_ctx, __func__); + OSMO_ASSERT(iui); + osmo_iuup_instance_set_user_prim_cb(iui, _passive_init_retrans_user_prim_cb, NULL); + osmo_iuup_instance_set_transport_prim_cb(iui, _passive_init_transport_prim_cb, NULL); + + clock_override_set(0, 0); + + /* Tx CONFIG.req */ + rnp = osmo_iuup_rnl_prim_alloc(iuup_test_ctx, OSMO_IUUP_RNL_CONFIG, PRIM_OP_REQUEST, IUUP_MSGB_SIZE); + rnp->u.config = def_configure_req; + rnp->u.config.active = false; + OSMO_ASSERT((rc = osmo_iuup_rnl_prim_down(iui, rnp)) == 0); + /* STATUS-INIT.req is NOT transmitted automatically: */ + OSMO_ASSERT(_passive_init_transport_rx_prim == 0); + + /* Send Init: */ + tnp = osmo_iuup_tnl_prim_alloc(iuup_test_ctx, OSMO_IUUP_TNL_UNITDATA, PRIM_OP_INDICATION, IUUP_MSGB_SIZE); + tnp->oph.msg->l2h = msgb_put(tnp->oph.msg, sizeof(iuup_initialization)); + hdr14 = (struct iuup_pdutype14_hdr *)msgb_l2(tnp->oph.msg); + memcpy(hdr14, iuup_initialization, sizeof(iuup_initialization)); + OSMO_ASSERT((rc = osmo_iuup_tnl_prim_up(iui, tnp)) == 0); + OSMO_ASSERT(_passive_init_transport_rx_prim == 1); /* We receive an Init ACK */ + OSMO_ASSERT(_passive_init_retrans_user_rx_prim == 1); /* We receive the Status-Init.ind */ + + /* Send Init (retrans): */ + tnp = osmo_iuup_tnl_prim_alloc(iuup_test_ctx, OSMO_IUUP_TNL_UNITDATA, PRIM_OP_INDICATION, IUUP_MSGB_SIZE); + tnp->oph.msg->l2h = msgb_put(tnp->oph.msg, sizeof(iuup_initialization)); + hdr14 = (struct iuup_pdutype14_hdr *)msgb_l2(tnp->oph.msg); + memcpy(hdr14, iuup_initialization, sizeof(iuup_initialization)); + OSMO_ASSERT((rc = osmo_iuup_tnl_prim_up(iui, tnp)) == 0); + OSMO_ASSERT(_passive_init_transport_rx_prim == 2); /* We receive another Init ACK */ + OSMO_ASSERT(_passive_init_retrans_user_rx_prim == 2); /* We receive another Status-Init.ind */ + + /* Send IuUP incoming data to the implementation: */ + tnp = osmo_iuup_tnl_prim_alloc(iuup_test_ctx, OSMO_IUUP_TNL_UNITDATA, PRIM_OP_INDICATION, IUUP_MSGB_SIZE); + tnp->oph.msg->l2h = msgb_put(tnp->oph.msg, sizeof(iuup_data)); + hdr0 = (struct iuup_pdutype0_hdr *)msgb_l2(tnp->oph.msg); + memcpy(hdr0, iuup_data, sizeof(iuup_data)); + OSMO_ASSERT((rc = osmo_iuup_tnl_prim_up(iui, tnp)) == 0); + /* We receive it in RNL: */ + OSMO_ASSERT(_passive_init_retrans_user_rx_prim == 3); + + /* Now in opposite direction, RNL->[IuuP]->TNL: */ + rnp = osmo_iuup_rnl_prim_alloc(iuup_test_ctx, OSMO_IUUP_RNL_DATA, PRIM_OP_REQUEST, IUUP_MSGB_SIZE); + rnp->u.data.rfci = 0; + rnp->u.data.frame_nr = 1; + rnp->u.data.fqc = IUUP_FQC_FRAME_GOOD; + rnp->oph.msg->l3h = msgb_put(rnp->oph.msg, sizeof(iuup_data) - 4); + memcpy(rnp->oph.msg->l3h, iuup_data + 4, sizeof(iuup_data) - 4); + OSMO_ASSERT((rc = osmo_iuup_rnl_prim_down(iui, rnp)) == 0); + OSMO_ASSERT(_passive_init_transport_rx_prim == 3); /* We receive data in TNL */ + + osmo_iuup_instance_free(iui); +} + +static int _decode_passive_init_2_rfci_no_iptis_user_prim_cb(struct osmo_prim_hdr *oph, void *ctx) +{ + struct osmo_iuup_rnl_prim *irp = (struct osmo_iuup_rnl_prim *)oph; + printf("%s(): Initialization decoded fine!\n", __func__); + OSMO_ASSERT(OSMO_PRIM_HDR(&irp->oph) == OSMO_PRIM(OSMO_IUUP_RNL_STATUS, PRIM_OP_INDICATION)); + OSMO_ASSERT(irp->u.status.procedure == IUUP_PROC_INIT); + OSMO_ASSERT(irp->u.status.u.initialization.num_rfci == 2); + OSMO_ASSERT(irp->u.status.u.initialization.num_subflows == 3); + OSMO_ASSERT(irp->u.status.u.initialization.data_pdu_type == 0); + OSMO_ASSERT(irp->u.status.u.initialization.IPTIs_present == false); + msgb_free(oph->msg); + return 0; +} +static int _decode_passive_init_2_rfci_no_iptis_transport_prim_cb(struct osmo_prim_hdr *oph, void *ctx) +{ + struct osmo_iuup_tnl_prim *itp = (struct osmo_iuup_tnl_prim *)oph; + struct msgb *msg; + struct iuup_pdutype14_hdr *hdr; + + printf("%s()\n", __func__); + msg = oph->msg; + OSMO_ASSERT(OSMO_PRIM_HDR(&itp->oph) == OSMO_PRIM(OSMO_IUUP_TNL_UNITDATA, PRIM_OP_REQUEST)); + printf("Transport: DL len=%u: %s\n", msgb_l2len(msg), + osmo_hexdump((const unsigned char *) msgb_l2(msg), msgb_l2len(msg))); + hdr = msgb_l2(msg); + OSMO_ASSERT(hdr->pdu_type == IUUP_PDU_T_CONTROL); + OSMO_ASSERT(hdr->ack_nack == IUUP_AN_ACK); + msgb_free(msg); + return 0; +} +void test_decode_passive_init_2_rfci_no_iptis(void) +{ + /* Here we check the passive INIT code path, aka receiving INIT and returning INIT_ACK/NACK */ + struct osmo_iuup_instance *iui; + struct osmo_iuup_rnl_prim *rnp; + struct osmo_iuup_tnl_prim *tnp; + struct iuup_pdutype14_hdr *hdr14; + int rc; + + /* Frame 46, "Initialization", SYS#5969 call4_Iu_Iuh.pcap + 1110 .... = PDU Type: Control Procedure (14) + .... 00.. = Ack/Nack: Procedure (0) + .... ..00 = Frame Number: 0 + 0000 .... = Mode Version: 0x0 + .... 0000 = Procedure: Initialization (0) + 1101 11.. = Header CRC: 0x37 [correct] + .... ..01 1011 0100 = Payload CRC: 0x1b4 + 000. .... = Spare: 0x0 + ...0 .... = TI: IPTIs not present (0) + .... 011. = Subflows: 3 + .... ...0 = Chain Indicator: this frame is the last frame for the procedure (0) + RFCI 1 Initialization + 0... .... = RFCI 0 LRI: Not last RFCI (0x0) + .0.. .... = RFCI 0 LI: one octet used (0x0) + ..00 0001 = RFCI 0: 1 + RFCI 0 Flow 0 Len: 81 + RFCI 0 Flow 1 Len: 103 + RFCI 0 Flow 2 Len: 60 + RFCI 6 Initialization + 1... .... = RFCI 1 LRI: Last RFCI in current frame (0x1) + .0.. .... = RFCI 1 LI: one octet used (0x0) + ..00 0110 = RFCI 1: 6 + RFCI 1 Flow 0 Len: 39 + RFCI 1 Flow 1 Len: 0 + RFCI 1 Flow 2 Len: 0 + Iu UP Mode Versions Supported: 0x0001 + 0... .... .... .... = Version 16: not supported (0x0) + .0.. .... .... .... = Version 15: not supported (0x0) + ..0. .... .... .... = Version 14: not supported (0x0) + ...0 .... .... .... = Version 13: not supported (0x0) + .... 0... .... .... = Version 12: not supported (0x0) + .... .0.. .... .... = Version 11: not supported (0x0) + .... ..0. .... .... = Version 10: not supported (0x0) + .... ...0 .... .... = Version 9: not supported (0x0) + .... .... 0... .... = Version 8: not supported (0x0) + .... .... .0.. .... = Version 7: not supported (0x0) + .... .... ..0. .... = Version 6: not supported (0x0) + .... .... ...0 .... = Version 5: not supported (0x0) + .... .... .... 0... = Version 4: not supported (0x0) + .... .... .... .0.. = Version 3: not supported (0x0) + .... .... .... ..0. = Version 2: not supported (0x0) + .... .... .... ...1 = Version 1: supported (0x1) + 0000 .... = RFCI Data Pdu Type: PDU type 0 (0x0) + */ + const uint8_t iuup_init[] = { + 0xe0, 0x00, 0xdd, 0xb4, 0x06, 0x01, 0x51, 0x67, 0x3c, 0x86, 0x27, + 0x00, 0x00, 0x00, 0x01, 0x00 + }; + + iui = osmo_iuup_instance_alloc(iuup_test_ctx, __func__); + OSMO_ASSERT(iui); + osmo_iuup_instance_set_user_prim_cb(iui, _decode_passive_init_2_rfci_no_iptis_user_prim_cb, NULL); + osmo_iuup_instance_set_transport_prim_cb(iui, _decode_passive_init_2_rfci_no_iptis_transport_prim_cb, NULL); + + clock_override_set(0, 0); + + /* Tx CONFIG.req */ + rnp = osmo_iuup_rnl_prim_alloc(iuup_test_ctx, OSMO_IUUP_RNL_CONFIG, PRIM_OP_REQUEST, IUUP_MSGB_SIZE); + rnp->u.config = def_configure_req; + rnp->u.config.active = false; + OSMO_ASSERT((rc = osmo_iuup_rnl_prim_down(iui, rnp)) == 0); + + /* Send Init: */ + tnp = osmo_iuup_tnl_prim_alloc(iuup_test_ctx, OSMO_IUUP_TNL_UNITDATA, PRIM_OP_INDICATION, IUUP_MSGB_SIZE); + tnp->oph.msg->l2h = msgb_put(tnp->oph.msg, sizeof(iuup_init)); + hdr14 = (struct iuup_pdutype14_hdr *)msgb_l2(tnp->oph.msg); + memcpy(hdr14, iuup_init, sizeof(iuup_init)); + OSMO_ASSERT((rc = osmo_iuup_tnl_prim_up(iui, tnp)) == 0); + + osmo_iuup_instance_free(iui); +} + +int main(int argc, char **argv) +{ + iuup_test_ctx = talloc_named_const(NULL, 0, "iuup_test"); + osmo_init_logging2(iuup_test_ctx, NULL); + log_set_print_filename2(osmo_stderr_target, LOG_FILENAME_NONE); + log_set_print_category(osmo_stderr_target, 1); + log_set_print_category_hex(osmo_stderr_target, 0); + log_set_use_color(osmo_stderr_target, 0); + log_set_category_filter(osmo_stderr_target, DLIUUP, 1, LOGL_DEBUG); + osmo_fsm_log_addr(false); + + osmo_gettimeofday_override = true; + + test_crc(); + test_tinit_timeout_retrans(); + test_init_nack_retrans(); + test_init_ack(); + test_passive_init(); + test_passive_init_retrans(); + test_decode_passive_init_2_rfci_no_iptis(); + + printf("OK.\n"); +} diff -Nru libosmocore-1.6.0/tests/iuup/iuup_test.ok libosmocore-1.7.0/tests/iuup/iuup_test.ok --- libosmocore-1.6.0/tests/iuup/iuup_test.ok 1970-01-01 00:00:00.000000000 +0000 +++ libosmocore-1.7.0/tests/iuup/iuup_test.ok 2022-06-28 15:00:51.000000000 +0000 @@ -0,0 +1,61 @@ +=== start: test_crc === +iuup_initialization: Header CRC = 0x37 +iuup_initialization: Payload CRC = 0x399 +iuup_initialization_ack: Header CRC = 0x09 +iuup_initialization_ack: Payload CRC = 0x399 +=== end: test_crc === +sys={0.000000}, clock_override_set +_tinit_timeout_retrans_transport_prim_cb() +Transport: DL len=22: e0 00 df 99 16 00 51 67 3c 01 27 00 00 82 00 00 00 17 10 00 01 00 +sys={1.000000}, clock_override_set +_tinit_timeout_retrans_transport_prim_cb() +Transport: DL len=22: e0 00 df 99 16 00 51 67 3c 01 27 00 00 82 00 00 00 17 10 00 01 00 +sys={2.000000}, clock_override_set +_tinit_timeout_retrans_transport_prim_cb() +Transport: DL len=22: e0 00 df 99 16 00 51 67 3c 01 27 00 00 82 00 00 00 17 10 00 01 00 +sys={3.000000}, clock_override_set +_tinit_timeout_retrans_transport_prim_cb() +Transport: DL len=22: e0 00 df 99 16 00 51 67 3c 01 27 00 00 82 00 00 00 17 10 00 01 00 +sys={4.000000}, clock_override_set +_tinit_timeout_retrans_user_prim_cb() +sys={0.000000}, clock_override_set +_init_nack_retrans_transport_prim_cb() +Transport: DL len=22: e0 00 df 99 16 00 51 67 3c 01 27 00 00 82 00 00 00 17 10 00 01 00 +_init_nack_retrans_transport_prim_cb() +Transport: DL len=22: e0 00 df 99 16 00 51 67 3c 01 27 00 00 82 00 00 00 17 10 00 01 00 +_init_nack_retrans_transport_prim_cb() +Transport: DL len=22: e0 00 df 99 16 00 51 67 3c 01 27 00 00 82 00 00 00 17 10 00 01 00 +_init_nack_retrans_transport_prim_cb() +Transport: DL len=22: e0 00 df 99 16 00 51 67 3c 01 27 00 00 82 00 00 00 17 10 00 01 00 +_init_nack_retrans_user_prim_cb() +sys={0.000000}, clock_override_set +_init_ack_transport_prim_cb() +Transport: DL len=22: e0 00 df 99 16 00 51 67 3c 01 27 00 00 82 00 00 00 17 10 00 01 00 +_init_ack_user_prim_cb() +User: UL len=31: 08 55 6d 94 4c 71 a1 a0 81 e7 ea d2 04 24 44 80 00 0e cd 82 b8 11 18 00 00 97 c4 79 4e 77 40 +_init_ack_transport_prim_cb() +Transport: DL len=35: 01 00 e3 ff 08 55 6d 94 4c 71 a1 a0 81 e7 ea d2 04 24 44 80 00 0e cd 82 b8 11 18 00 00 97 c4 79 4e 77 40 +sys={0.000000}, clock_override_set +_passive_init_user_prim_cb() +_passive_init_transport_prim_cb() +Transport: DL len=4: e4 00 24 00 +_passive_init_user_prim_cb() +User: UL len=31: 08 55 6d 94 4c 71 a1 a0 81 e7 ea d2 04 24 44 80 00 0e cd 82 b8 11 18 00 00 97 c4 79 4e 77 40 +_passive_init_transport_prim_cb() +Transport: DL len=35: 01 00 e3 ff 08 55 6d 94 4c 71 a1 a0 81 e7 ea d2 04 24 44 80 00 0e cd 82 b8 11 18 00 00 97 c4 79 4e 77 40 +sys={0.000000}, clock_override_set +_passive_init_retrans_user_prim_cb() +_passive_init_transport_prim_cb() +Transport: DL len=4: e4 00 24 00 +_passive_init_retrans_user_prim_cb() +_passive_init_transport_prim_cb() +Transport: DL len=4: e4 00 24 00 +_passive_init_retrans_user_prim_cb() +User: UL len=31: 08 55 6d 94 4c 71 a1 a0 81 e7 ea d2 04 24 44 80 00 0e cd 82 b8 11 18 00 00 97 c4 79 4e 77 40 +_passive_init_transport_prim_cb() +Transport: DL len=35: 01 00 e3 ff 08 55 6d 94 4c 71 a1 a0 81 e7 ea d2 04 24 44 80 00 0e cd 82 b8 11 18 00 00 97 c4 79 4e 77 40 +sys={0.000000}, clock_override_set +_decode_passive_init_2_rfci_no_iptis_user_prim_cb(): Initialization decoded fine! +_decode_passive_init_2_rfci_no_iptis_transport_prim_cb() +Transport: DL len=4: e4 00 24 00 +OK. diff -Nru libosmocore-1.6.0/tests/lapd/lapd_test.c libosmocore-1.7.0/tests/lapd/lapd_test.c --- libosmocore-1.6.0/tests/lapd/lapd_test.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/tests/lapd/lapd_test.c 2022-06-28 15:00:51.000000000 +0000 @@ -16,10 +16,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 diff -Nru libosmocore-1.6.0/tests/logging/logging_test.c libosmocore-1.7.0/tests/logging/logging_test.c --- libosmocore-1.6.0/tests/logging/logging_test.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/tests/logging/logging_test.c 2022-06-28 15:00:51.000000000 +0000 @@ -13,10 +13,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 @@ -82,6 +78,11 @@ log_set_print_category(stderr_target, 1); log_set_use_color(stderr_target, 0); + if (argc > 1 && !strcmp(argv[1], "wqueue")) + log_target_file_switch_to_wqueue(stderr_target); + else + log_target_file_switch_to_stream(stderr_target); + log_parse_category_mask(stderr_target, "DRLL:DCC"); log_parse_category_mask(stderr_target, "DRLL"); @@ -129,5 +130,13 @@ log_set_category_filter(stderr_target, DLGLOBAL, 1, LOGL_DEBUG); DEBUGP(DLGLOBAL, "You should see this (DLGLOBAL on DEBUG)\n"); + /* Test printing of the filename */ + log_set_print_filename2(stderr_target, LOG_FILENAME_BASENAME); + + log_set_print_filename_pos(stderr_target, LOG_FILENAME_POS_HEADER_END); + DEBUGP(DLGLOBAL, "A message with source info printed first\n"); + log_set_print_filename_pos(stderr_target, LOG_FILENAME_POS_LINE_END); + DEBUGP(DLGLOBAL, "A message with source info printed last\n"); + return 0; } diff -Nru libosmocore-1.6.0/tests/logging/logging_test.err libosmocore-1.7.0/tests/logging/logging_test.err --- libosmocore-1.6.0/tests/logging/logging_test.err 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/tests/logging/logging_test.err 2022-06-28 15:00:51.000000000 +0000 @@ -7,3 +7,5 @@ DLGLOBAL You should see this on DLGLOBAL (d) DLGLOBAL You should see this on DLGLOBAL (e) DLGLOBAL You should see this (DLGLOBAL on DEBUG) +DLGLOBAL logging_test.c:137 A message with source info printed first +DLGLOBAL A message with source info printed last (logging_test.c:139) diff -Nru libosmocore-1.6.0/tests/logging/logging_vty_test.c libosmocore-1.7.0/tests/logging/logging_vty_test.c --- libosmocore-1.6.0/tests/logging/logging_vty_test.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/tests/logging/logging_vty_test.c 2022-06-28 15:00:51.000000000 +0000 @@ -15,10 +15,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. - * */ #define _GNU_SOURCE diff -Nru libosmocore-1.6.0/tests/logging/logging_vty_test.vty libosmocore-1.7.0/tests/logging/logging_vty_test.vty --- libosmocore-1.6.0/tests/logging/logging_vty_test.vty 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/tests/logging/logging_vty_test.vty 2022-06-28 15:00:51.000000000 +0000 @@ -54,7 +54,7 @@ logging print level (0|1) logging print file (0|1|basename) [last] logging set-log-mask MASK - logging level (aa|bb|ccc|dddd|eee|lglobal|llapd|linp|lmux|lmi|lmib|lsms|lctrl|lgtp|lstats|lgsup|loap|lss7|lsccp|lsua|lm3ua|lmgcp|ljibuf|lrspro|lns|lbssgp|lnsdata|lnssignal) (debug|info|notice|error|fatal) + logging level (aa|bb|ccc|dddd|eee|lglobal|llapd|linp|lmux|lmi|lmib|lsms|lctrl|lgtp|lstats|lgsup|loap|lss7|lsccp|lsua|lm3ua|lmgcp|ljibuf|lrspro|lns|lbssgp|lnsdata|lnssignal|liuup|lpfcp) (debug|info|notice|error|fatal) logging level set-all (debug|info|notice|error|fatal) logging level force-all (debug|info|notice|error|fatal) no logging level force-all @@ -472,7 +472,7 @@ logging_vty_test# list ... - logp (aa|bb|ccc|dddd|eee|lglobal|llapd|linp|lmux|lmi|lmib|lsms|lctrl|lgtp|lstats|lgsup|loap|lss7|lsccp|lsua|lm3ua|lmgcp|ljibuf|lrspro|lns|lbssgp|lnsdata|lnssignal) (debug|info|notice|error|fatal) .LOGMESSAGE + logp (aa|bb|ccc|dddd|eee|lglobal|llapd|linp|lmux|lmi|lmib|lsms|lctrl|lgtp|lstats|lgsup|loap|lss7|lsccp|lsua|lm3ua|lmgcp|ljibuf|lrspro|lns|lbssgp|lnsdata|lnssignal|liuup|lpfcp) (debug|info|notice|error|fatal) .LOGMESSAGE ... logging_vty_test# logp? @@ -507,6 +507,8 @@ lbssgp GPRS BSSGP layer lnsdata GPRS NS layer data PDU lnssignal GPRS NS layer signal PDU + liuup Iu UP layer + lpfcp libosmo-pfcp Packet Forwarding Control Protocol logging_vty_test# logp lglobal ? debug Log debug messages and higher levels diff -Nru libosmocore-1.6.0/tests/loggingrb/loggingrb_test.c libosmocore-1.7.0/tests/loggingrb/loggingrb_test.c --- libosmocore-1.6.0/tests/loggingrb/loggingrb_test.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/tests/loggingrb/loggingrb_test.c 2022-06-28 15:00:51.000000000 +0000 @@ -14,10 +14,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 diff -Nru libosmocore-1.6.0/tests/Makefile.am libosmocore-1.7.0/tests/Makefile.am --- libosmocore-1.6.0/tests/Makefile.am 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/tests/Makefile.am 2022-06-28 15:00:51.000000000 +0000 @@ -28,9 +28,9 @@ oap/oap_client_test gsm29205/gsm29205_test \ logging/logging_vty_test \ vty/vty_transcript_test \ - tdef/tdef_test tdef/tdef_vty_test_config_root \ - tdef/tdef_vty_test_config_subnode \ - tdef/tdef_vty_test_dynamic \ + tdef/tdef_test tdef/tdef_vty_config_root_test \ + tdef/tdef_vty_config_subnode_test \ + tdef/tdef_vty_dynamic_test \ sockaddr_str/sockaddr_str_test \ use_count/use_count_test \ context/context_test \ @@ -45,6 +45,7 @@ time_cc/time_cc_test \ gsm48/rest_octets_test \ base64/base64_test \ + iuup/iuup_test \ $(NULL) if ENABLE_MSGFILE @@ -286,14 +287,14 @@ tdef_tdef_test_SOURCES = tdef/tdef_test.c tdef_tdef_test_LDADD = $(LDADD) -tdef_tdef_vty_test_config_root_SOURCES = tdef/tdef_vty_test_config_root.c -tdef_tdef_vty_test_config_root_LDADD = $(LDADD) $(top_builddir)/src/vty/libosmovty.la +tdef_tdef_vty_config_root_test_SOURCES = tdef/tdef_vty_config_root_test.c +tdef_tdef_vty_config_root_test_LDADD = $(LDADD) $(top_builddir)/src/vty/libosmovty.la -tdef_tdef_vty_test_config_subnode_SOURCES = tdef/tdef_vty_test_config_subnode.c -tdef_tdef_vty_test_config_subnode_LDADD = $(LDADD) $(top_builddir)/src/vty/libosmovty.la +tdef_tdef_vty_config_subnode_test_SOURCES = tdef/tdef_vty_config_subnode_test.c +tdef_tdef_vty_config_subnode_test_LDADD = $(LDADD) $(top_builddir)/src/vty/libosmovty.la -tdef_tdef_vty_test_dynamic_SOURCES = tdef/tdef_vty_test_dynamic.c -tdef_tdef_vty_test_dynamic_LDADD = $(LDADD) $(top_builddir)/src/vty/libosmovty.la +tdef_tdef_vty_dynamic_test_SOURCES = tdef/tdef_vty_dynamic_test.c +tdef_tdef_vty_dynamic_test_LDADD = $(LDADD) $(top_builddir)/src/vty/libosmovty.la sockaddr_str_sockaddr_str_test_SOURCES = sockaddr_str/sockaddr_str_test.c sockaddr_str_sockaddr_str_test_LDADD = $(LDADD) @@ -328,6 +329,9 @@ time_cc_time_cc_test_SOURCES = time_cc/time_cc_test.c time_cc_time_cc_test_LDADD = $(LDADD) +iuup_iuup_test_SOURCES = iuup/iuup_test.c +iuup_iuup_test_LDADD = $(LDADD) $(top_builddir)/src/gsm/libosmogsm.la + # The `:;' works around a Bash 3.2 bug when the output is not writeable. $(srcdir)/package.m4: $(top_srcdir)/configure.ac :;{ \ @@ -402,9 +406,9 @@ vty/vty_transcript_test.vty \ tdef/tdef_test.ok \ tdef/tdef_test_range_64bit.ok \ - tdef/tdef_vty_test_config_root.vty \ - tdef/tdef_vty_test_config_subnode.vty \ - tdef/tdef_vty_test_dynamic.vty \ + tdef/tdef_vty_config_root_test.vty \ + tdef/tdef_vty_config_subnode_test.vty \ + tdef/tdef_vty_dynamic_test.vty \ sockaddr_str/sockaddr_str_test.ok \ use_count/use_count_test.ok use_count/use_count_test.err \ context/context_test.ok \ @@ -420,6 +424,7 @@ time_cc/time_cc_test.ok \ gsm48/rest_octets_test.ok \ base64/base64_test.ok \ + iuup/iuup_test.ok \ $(NULL) if ENABLE_LIBSCTP @@ -616,6 +621,8 @@ >$(srcdir)/it_q/it_q_test.ok time_cc/time_cc_test \ >$(srcdir)/time_cc/time_cc_test.ok + iuup/iuup_test \ + >$(srcdir)/iuup/iuup_test.ok check-local: atconfig $(TESTSUITE) [ -e /proc/cpuinfo ] && cat /proc/cpuinfo @@ -678,16 +685,16 @@ vty-test-tdef: osmo_verify_transcript_vty.py -v \ -p 42042 \ - -r "$(top_builddir)/tests/tdef/tdef_vty_test_config_root" \ - $(U) $(srcdir)/tdef/tdef_vty_test_config_root.vty + -r "$(top_builddir)/tests/tdef/tdef_vty_config_root_test" \ + $(U) $(srcdir)/tdef/tdef_vty_config_root_test.vty osmo_verify_transcript_vty.py -v \ -p 42042 \ - -r "$(top_builddir)/tests/tdef/tdef_vty_test_config_subnode" \ - $(U) $(srcdir)/tdef/tdef_vty_test_config_subnode.vty + -r "$(top_builddir)/tests/tdef/tdef_vty_config_subnode_test" \ + $(U) $(srcdir)/tdef/tdef_vty_config_subnode_test.vty osmo_verify_transcript_vty.py -v \ -p 42042 \ - -r "$(top_builddir)/tests/tdef/tdef_vty_test_dynamic" \ - $(U) $(srcdir)/tdef/tdef_vty_test_dynamic.vty + -r "$(top_builddir)/tests/tdef/tdef_vty_dynamic_test" \ + $(U) $(srcdir)/tdef/tdef_vty_dynamic_test.vty vty-test-stats: osmo_verify_transcript_vty.py -v \ diff -Nru libosmocore-1.6.0/tests/msgb/msgb_test.c libosmocore-1.7.0/tests/msgb/msgb_test.c --- libosmocore-1.6.0/tests/msgb/msgb_test.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/tests/msgb/msgb_test.c 2022-06-28 15:00:51.000000000 +0000 @@ -12,10 +12,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 diff -Nru libosmocore-1.6.0/tests/msgfile/msgfile_test.c libosmocore-1.7.0/tests/msgfile/msgfile_test.c --- libosmocore-1.6.0/tests/msgfile/msgfile_test.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/tests/msgfile/msgfile_test.c 2022-06-28 15:00:51.000000000 +0000 @@ -13,10 +13,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 diff -Nru libosmocore-1.6.0/tests/oap/oap_test.c libosmocore-1.7.0/tests/oap/oap_test.c --- libosmocore-1.6.0/tests/oap/oap_test.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/tests/oap/oap_test.c 2022-06-28 15:00:51.000000000 +0000 @@ -15,10 +15,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 diff -Nru libosmocore-1.6.0/tests/sercomm/sercomm_test.c libosmocore-1.7.0/tests/sercomm/sercomm_test.c --- libosmocore-1.6.0/tests/sercomm/sercomm_test.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/tests/sercomm/sercomm_test.c 2022-06-28 15:00:51.000000000 +0000 @@ -13,10 +13,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 diff -Nru libosmocore-1.6.0/tests/sim/sim_test.c libosmocore-1.7.0/tests/sim/sim_test.c --- libosmocore-1.6.0/tests/sim/sim_test.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/tests/sim/sim_test.c 2022-06-28 15:00:51.000000000 +0000 @@ -12,10 +12,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 diff -Nru libosmocore-1.6.0/tests/sms/sms_test.c libosmocore-1.7.0/tests/sms/sms_test.c --- libosmocore-1.6.0/tests/sms/sms_test.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/tests/sms/sms_test.c 2022-06-28 15:00:51.000000000 +0000 @@ -13,10 +13,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 diff -Nru libosmocore-1.6.0/tests/smscb/gsm0341_test.c libosmocore-1.7.0/tests/smscb/gsm0341_test.c --- libosmocore-1.6.0/tests/smscb/gsm0341_test.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/tests/smscb/gsm0341_test.c 2022-06-28 15:00:51.000000000 +0000 @@ -12,10 +12,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 diff -Nru libosmocore-1.6.0/tests/smscb/smscb_test.c libosmocore-1.7.0/tests/smscb/smscb_test.c --- libosmocore-1.6.0/tests/smscb/smscb_test.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/tests/smscb/smscb_test.c 2022-06-28 15:00:51.000000000 +0000 @@ -12,10 +12,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 diff -Nru libosmocore-1.6.0/tests/sockaddr_str/sockaddr_str_test.c libosmocore-1.7.0/tests/sockaddr_str/sockaddr_str_test.c --- libosmocore-1.6.0/tests/sockaddr_str/sockaddr_str_test.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/tests/sockaddr_str/sockaddr_str_test.c 2022-06-28 15:00:51.000000000 +0000 @@ -18,10 +18,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 diff -Nru libosmocore-1.6.0/tests/socket/socket_sctp_test.c libosmocore-1.7.0/tests/socket/socket_sctp_test.c --- libosmocore-1.6.0/tests/socket/socket_sctp_test.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/tests/socket/socket_sctp_test.c 2022-06-28 15:00:51.000000000 +0000 @@ -12,10 +12,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 diff -Nru libosmocore-1.6.0/tests/socket/socket_test.c libosmocore-1.7.0/tests/socket/socket_test.c --- libosmocore-1.6.0/tests/socket/socket_test.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/tests/socket/socket_test.c 2022-06-28 15:00:51.000000000 +0000 @@ -12,10 +12,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 @@ -349,9 +345,11 @@ OSMO_ASSERT(!strncmp("[::1]:42", result, sizeof(buf))); memset(&buf[0], 0, sizeof(buf)); - result = osmo_sockaddr_to_str_buf(buf, 8, &localhost6); printf("Checking osmo_sockaddr_to_str_buf too short IPv6\n"); - OSMO_ASSERT(!strncmp("[::1]:4", result, sizeof(buf))); + result = osmo_sockaddr_to_str_buf(buf, 8, &localhost6); + OSMO_ASSERT(result == NULL); + osmo_sockaddr_to_str_buf2(buf, 8, &localhost6); + OSMO_ASSERT(!strncmp("[::1]:4", buf, sizeof(buf))); memset(&buf[0], 0, sizeof(buf)); result = osmo_sockaddr_to_str_buf(buf, 5, &localhost6); diff -Nru libosmocore-1.6.0/tests/stats/stats_test.c libosmocore-1.7.0/tests/stats/stats_test.c --- libosmocore-1.6.0/tests/stats/stats_test.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/tests/stats/stats_test.c 2022-06-28 15:00:51.000000000 +0000 @@ -16,10 +16,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 diff -Nru libosmocore-1.6.0/tests/stats/stats_vty_test.vty libosmocore-1.7.0/tests/stats/stats_vty_test.vty --- libosmocore-1.6.0/tests/stats/stats_vty_test.vty 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/tests/stats/stats_vty_test.vty 2022-06-28 15:00:51.000000000 +0000 @@ -7,6 +7,7 @@ stats reporter log [NAME] no stats reporter log [NAME] stats interval <0-65535> + stats-tcp interval <0-65535> ... stats_vty_test(config)# ### No reporters shall be configured by default diff -Nru libosmocore-1.6.0/tests/strrb/strrb_test.c libosmocore-1.7.0/tests/strrb/strrb_test.c --- libosmocore-1.6.0/tests/strrb/strrb_test.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/tests/strrb/strrb_test.c 2022-06-28 15:00:51.000000000 +0000 @@ -13,10 +13,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 diff -Nru libosmocore-1.6.0/tests/tdef/tdef_test.c libosmocore-1.7.0/tests/tdef/tdef_test.c --- libosmocore-1.6.0/tests/tdef/tdef_test.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/tests/tdef/tdef_test.c 2022-06-28 15:00:51.000000000 +0000 @@ -17,10 +17,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * 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 diff -Nru libosmocore-1.6.0/tests/tdef/tdef_vty_config_root_test.c libosmocore-1.7.0/tests/tdef/tdef_vty_config_root_test.c --- libosmocore-1.6.0/tests/tdef/tdef_vty_config_root_test.c 1970-01-01 00:00:00.000000000 +0000 +++ libosmocore-1.7.0/tests/tdef/tdef_vty_config_root_test.c 2022-06-28 15:00:51.000000000 +0000 @@ -0,0 +1,291 @@ +/* Test implementation for osmo_tdef VTY configuration API. */ +/* + * (C) 2019 by sysmocom s.f.m.c. GmbH + * + * All Rights Reserved + * + * SPDX-License-Identifier: GPL-2.0+ + * + * Author: Neels Hofmeyr + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#define _GNU_SOURCE +#include +#include +#include +#include + +#include + +#include +#include +#include + +#include +#include + +#include + +#include "config.h" + +/* ------------------- HERE IS THE INTERESTING TDEF RELEVANT PART ------------------- */ + +/* This example keeps several separate timer groups and offers 'timer' VTY commands at the root of the config node. See + * the tdef_vty_config_root_test.vty transcript test. + */ + +static struct osmo_tdef tdefs_test[] = { + { .T=1, .default_val=100, .desc="Testing a hundred seconds" }, // default is .unit=OSMO_TDEF_S == 0 + { .T=2, .default_val=100, .unit=OSMO_TDEF_MS, .desc="Testing a hundred milliseconds" }, + { .T=3, .default_val=100, .unit=OSMO_TDEF_M, .desc="Testing a hundred minutes" }, + { .T=4, .default_val=100, .unit=OSMO_TDEF_CUSTOM, .desc="Testing a hundred potatoes" }, + { .T=0x7fffffff, .default_val=0xffffffff, .unit=OSMO_TDEF_M, .desc="Very large" }, + { .T=-23, .default_val=239471, .desc="Negative T number" }, + { .T=30, .default_val=50, .desc="Testing range min", .min_val=20 }, + { .T=31, .default_val=50, .desc="Testing range max", .max_val=52 }, + { .T=32, .default_val=50, .desc="Testing range both", .min_val=20, .max_val=52 }, + {} // <-- important! last entry shall be zero +}; + +static struct osmo_tdef tdefs_tea[] = { + { .T=1, .default_val=50, .desc="Water Boiling Timeout" }, + { .T=2, .default_val=300, .desc="Tea brewing" }, + { .T=3, .default_val=5, .unit=OSMO_TDEF_M, .desc="Let tea cool down before drinking" }, + { .T=4, .default_val=20, .unit=OSMO_TDEF_M, .desc="Forgot to drink tea while it's warm" }, + {} +}; + +static struct osmo_tdef tdefs_software[] = { + { .T=1, .default_val=30, .unit=OSMO_TDEF_M, .desc="Write code" }, + { .T=2, .default_val=20, .unit=OSMO_TDEF_MS, .desc="Hit segfault" }, + { .T=3, .default_val=480, .unit=OSMO_TDEF_M, .desc="Fix bugs" }, + {} +}; + +static struct osmo_tdef_group tdef_groups[] = { + { + .name = "tea", + .desc = "Tea time", + .tdefs = tdefs_tea, + }, + { + .name = "test", + .desc = "Test timers", + .tdefs = tdefs_test, + }, + { + .name = "software", + .desc = "Typical software development cycle", + .tdefs = tdefs_software, + }, + {} +}; + +enum tdef_vty_test_nodes { + TIMER_NODE = _LAST_OSMOVTY_NODE + 1, +}; + +/* This example puts 'timer' configuration commands directly at the root of the CONFIG_NODE. + * This TIMER_NODE is merely needed as a hook for the vty_write() command, but becomes an empty node in the VTY docs. + * It is possible to cheat around needing this if you choose to config_write_timer() in another root nodes' write cb. + * Another example using a 'network' subnode is \ref tdef_vty_config_subnode_test.c */ +static struct cmd_node timer_node = { + TIMER_NODE, + "%s(config-timer)# ", + 1, +}; + +static int config_write_timer(struct vty *vty) +{ + osmo_tdef_vty_groups_write(vty, ""); + return CMD_SUCCESS; +} + +static void timer_init_vty() +{ + /* Again, this is merely to get a vty write hook, see above. */ + install_node(&timer_node, config_write_timer); + + osmo_tdef_vty_groups_init(CONFIG_NODE, tdef_groups); +} + +/* ------------------- THE REST is just boilerplate osmo main() ------------------- */ + +void *root_ctx = NULL; + +static void print_help() +{ + printf( "options:\n" + " -h --help this text\n" + " -d --debug MASK Enable debugging (e.g. -d DRSL:DOML:DLAPDM)\n" + " -D --daemonize For the process into a background daemon\n" + " -c --config-file Specify the filename of the config file\n" + " -s --disable-color Don't use colors in stderr log output\n" + " -T --timestamp Prefix every log line with a timestamp\n" + " -V --version Print version information and exit\n" + " -e --log-level Set a global log-level\n" + ); +} + +static struct { + const char *config_file; + int daemonize; +} cmdline_config = {}; + +static void handle_options(int argc, char **argv) +{ + while (1) { + int option_idx = 0, c; + static const struct option long_options[] = { + { "help", 0, 0, 'h' }, + { "debug", 1, 0, 'd' }, + { "daemonize", 0, 0, 'D' }, + { "config-file", 1, 0, 'c' }, + { "disable-color", 0, 0, 's' }, + { "timestamp", 0, 0, 'T' }, + { "version", 0, 0, 'V' }, + { "log-level", 1, 0, 'e' }, + {} + }; + + c = getopt_long(argc, argv, "hc:d:Dc:sTVe:", + long_options, &option_idx); + if (c == -1) + break; + + switch (c) { + case 'h': + print_help(); + exit(0); + case 's': + log_set_use_color(osmo_stderr_target, 0); + break; + case 'd': + log_parse_category_mask(osmo_stderr_target, optarg); + break; + case 'D': + cmdline_config.daemonize = 1; + break; + case 'c': + cmdline_config.config_file = optarg; + break; + case 'T': + log_set_print_timestamp(osmo_stderr_target, 1); + break; + case 'e': + log_set_log_level(osmo_stderr_target, atoi(optarg)); + break; + case 'V': + print_version(1); + exit(0); + break; + default: + /* catch unknown options *as well as* missing arguments. */ + fprintf(stderr, "Error in command line options. Exiting.\n"); + exit(-1); + } + } +} + +static int quit = 0; + +static void signal_handler(int signal) +{ + fprintf(stdout, "signal %u received\n", signal); + + switch (signal) { + case SIGINT: + case SIGTERM: + quit++; + break; + case SIGABRT: + osmo_generate_backtrace(); + /* in case of abort, we want to obtain a talloc report + * and then return to the caller, who will abort the process */ + case SIGUSR1: + talloc_report(tall_vty_ctx, stderr); + talloc_report_full(root_ctx, stderr); + break; + case SIGUSR2: + talloc_report_full(tall_vty_ctx, stderr); + break; + default: + break; + } +} + +static struct vty_app_info vty_info = { + .name = "tdef_vty_test", + .version = PACKAGE_VERSION, +}; + +static const struct log_info_cat default_categories[] = {}; + +const struct log_info log_info = { + .cat = default_categories, + .num_cat = ARRAY_SIZE(default_categories), +}; + +int main(int argc, char **argv) +{ + int rc; + + root_ctx = talloc_named_const(NULL, 0, "tdef_vty_test"); + + osmo_init_logging2(root_ctx, &log_info); + + vty_info.tall_ctx = root_ctx; + vty_init(&vty_info); + osmo_talloc_vty_add_cmds(); + + timer_init_vty(); /* <---- the only tdef relevant init */ + + handle_options(argc, argv); + + if (cmdline_config.config_file) { + rc = vty_read_config_file(cmdline_config.config_file, NULL); + if (rc < 0) { + fprintf(stderr, "Failed to parse the config file: '%s'\n", cmdline_config.config_file); + return 1; + } + } + + rc = telnet_init_dynif(root_ctx, NULL, vty_get_bind_addr(), 42042); + if (rc < 0) + return 2; + + signal(SIGINT, &signal_handler); + signal(SIGTERM, &signal_handler); + signal(SIGABRT, &signal_handler); + signal(SIGUSR1, &signal_handler); + signal(SIGUSR2, &signal_handler); + osmo_init_ignore_signals(); + + if (cmdline_config.daemonize) { + rc = osmo_daemonize(); + if (rc < 0) { + perror("Error during daemonize"); + return 6; + } + } + + while (!quit) { + log_reset_context(); + osmo_select_main(0); + } + + talloc_free(root_ctx); + talloc_free(tall_vty_ctx); + + return 0; +} diff -Nru libosmocore-1.6.0/tests/tdef/tdef_vty_config_root_test.vty libosmocore-1.7.0/tests/tdef/tdef_vty_config_root_test.vty --- libosmocore-1.6.0/tests/tdef/tdef_vty_config_root_test.vty 1970-01-01 00:00:00.000000000 +0000 +++ libosmocore-1.7.0/tests/tdef/tdef_vty_config_root_test.vty 2022-06-28 15:00:51.000000000 +0000 @@ -0,0 +1,323 @@ +tdef_vty_test> list +... + show timer [(tea|test|software)] [TNNNN] +... + +tdef_vty_test> show timer ? + [tea] Tea time + [test] Test timers + [software] Typical software development cycle + +tdef_vty_test> show timer test ? + [TNNNN] T- or X-timer-number -- 3GPP compliant timer number of the format '1234' or 'T1234' or 't1234'; Osmocom-specific timer number of the format: 'X1234' or 'x1234'. + +tdef_vty_test> show timer +tea: T1 = 50 s Water Boiling Timeout (default: 50 s) +tea: T2 = 300 s Tea brewing (default: 300 s) +tea: T3 = 5 m Let tea cool down before drinking (default: 5 m) +tea: T4 = 20 m Forgot to drink tea while it's warm (default: 20 m) +test: T1 = 100 s Testing a hundred seconds (default: 100 s) +test: T2 = 100 ms Testing a hundred milliseconds (default: 100 ms) +test: T3 = 100 m Testing a hundred minutes (default: 100 m) +test: T4 = 100 Testing a hundred potatoes (default: 100) +test: T2147483647 = 4294967295 m Very large (default: 4294967295 m) +test: X23 = 239471 s Negative T number (default: 239471 s) +test: T30 = 50 s Testing range min (default: 50 s, range: [20 .. inf]) +test: T31 = 50 s Testing range max (default: 50 s, range: [0 .. 52]) +test: T32 = 50 s Testing range both (default: 50 s, range: [20 .. 52]) +software: T1 = 30 m Write code (default: 30 m) +software: T2 = 20 ms Hit segfault (default: 20 ms) +software: T3 = 480 m Fix bugs (default: 480 m) + +tdef_vty_test> enable +tdef_vty_test# show timer +tea: T1 = 50 s Water Boiling Timeout (default: 50 s) +tea: T2 = 300 s Tea brewing (default: 300 s) +tea: T3 = 5 m Let tea cool down before drinking (default: 5 m) +tea: T4 = 20 m Forgot to drink tea while it's warm (default: 20 m) +test: T1 = 100 s Testing a hundred seconds (default: 100 s) +test: T2 = 100 ms Testing a hundred milliseconds (default: 100 ms) +test: T3 = 100 m Testing a hundred minutes (default: 100 m) +test: T4 = 100 Testing a hundred potatoes (default: 100) +test: T2147483647 = 4294967295 m Very large (default: 4294967295 m) +test: X23 = 239471 s Negative T number (default: 239471 s) +test: T30 = 50 s Testing range min (default: 50 s, range: [20 .. inf]) +test: T31 = 50 s Testing range max (default: 50 s, range: [0 .. 52]) +test: T32 = 50 s Testing range both (default: 50 s, range: [20 .. 52]) +software: T1 = 30 m Write code (default: 30 m) +software: T2 = 20 ms Hit segfault (default: 20 ms) +software: T3 = 480 m Fix bugs (default: 480 m) + +tdef_vty_test# configure terminal + +tdef_vty_test(config)# show running-config +... !timer + +tdef_vty_test(config)# list +... + timer [(tea|test|software)] [TNNNN] [(<0-2147483647>|default)] +... + +tdef_vty_test(config)# timer ? + [tea] Tea time + [test] Test timers + [software] Typical software development cycle + +tdef_vty_test(config)# timer sof T123 ? + [<0-2147483647>] New timer value + [default] Set to default timer value + +tdef_vty_test(config)# timer sof T123 ? + [<0-2147483647>] New timer value + [default] Set to default timer value + +tdef_vty_test(config)# timer test ? + [TNNNN] T- or X-timer-number -- 3GPP compliant timer number of the format '1234' or 'T1234' or 't1234'; Osmocom-specific timer number of the format: 'X1234' or 'x1234'. + +tdef_vty_test(config)# timer test t2 ? + [<0-2147483647>] New timer value + [default] Set to default timer value + +tdef_vty_test(config)# do show timer +tea: T1 = 50 s Water Boiling Timeout (default: 50 s) +tea: T2 = 300 s Tea brewing (default: 300 s) +tea: T3 = 5 m Let tea cool down before drinking (default: 5 m) +tea: T4 = 20 m Forgot to drink tea while it's warm (default: 20 m) +test: T1 = 100 s Testing a hundred seconds (default: 100 s) +test: T2 = 100 ms Testing a hundred milliseconds (default: 100 ms) +test: T3 = 100 m Testing a hundred minutes (default: 100 m) +test: T4 = 100 Testing a hundred potatoes (default: 100) +test: T2147483647 = 4294967295 m Very large (default: 4294967295 m) +test: X23 = 239471 s Negative T number (default: 239471 s) +test: T30 = 50 s Testing range min (default: 50 s, range: [20 .. inf]) +test: T31 = 50 s Testing range max (default: 50 s, range: [0 .. 52]) +test: T32 = 50 s Testing range both (default: 50 s, range: [20 .. 52]) +software: T1 = 30 m Write code (default: 30 m) +software: T2 = 20 ms Hit segfault (default: 20 ms) +software: T3 = 480 m Fix bugs (default: 480 m) + +tdef_vty_test(config)# do show timer tea +tea: T1 = 50 s Water Boiling Timeout (default: 50 s) +tea: T2 = 300 s Tea brewing (default: 300 s) +tea: T3 = 5 m Let tea cool down before drinking (default: 5 m) +tea: T4 = 20 m Forgot to drink tea while it's warm (default: 20 m) + +tdef_vty_test(config)# do show timer tea 2 +tea: T2 = 300 s Tea brewing (default: 300 s) + +tdef_vty_test(config)# do show timer tea t2 +tea: T2 = 300 s Tea brewing (default: 300 s) + +tdef_vty_test(config)# do show timer tea T2 +tea: T2 = 300 s Tea brewing (default: 300 s) + +tdef_vty_test(config)# do show timer tea T5 +% No such timer: T5 + +tdef_vty_test(config)# do show timer tea T0 +% No such timer: T0 + +tdef_vty_test(config)# do show timer tea X123 +% No such timer: X123 + +tdef_vty_test(config)# do show timer tea T-123 +% Invalid T timer argument (should be 'T1234' or 'X1234'): 'T-123' + +tdef_vty_test(config)# do show timer t +% Ambiguous command. + +tdef_vty_test(config)# do show timer te +% Ambiguous command. + +tdef_vty_test(config)# do show timer te T2 +% Ambiguous command. + + +tdef_vty_test(config)# timer tea 3 30 +tdef_vty_test(config)# timer tea T3 +tea: T3 = 30 m Let tea cool down before drinking (default: 5 m) + +tdef_vty_test(config)# timer tea t3 31 +tdef_vty_test(config)# timer tea T3 +tea: T3 = 31 m Let tea cool down before drinking (default: 5 m) + +tdef_vty_test(config)# timer tea T3 32 +tdef_vty_test(config)# timer tea T3 +tea: T3 = 32 m Let tea cool down before drinking (default: 5 m) + +tdef_vty_test(config)# timer tea X123 99 +% No such timer: X123 + +tdef_vty_test(config)# timer tea T-123 99 +% Invalid T timer argument (should be 'T1234' or 'X1234'): 'T-123' + +tdef_vty_test(config)# timer tea T0 0 +% No such timer: T0 + +tdef_vty_test(config)# timer tea T123 default +% No such timer: T123 + +tdef_vty_test(config)# timer tea +tea: T1 = 50 s Water Boiling Timeout (default: 50 s) +tea: T2 = 300 s Tea brewing (default: 300 s) +tea: T3 = 32 m Let tea cool down before drinking (default: 5 m) +tea: T4 = 20 m Forgot to drink tea while it's warm (default: 20 m) + +tdef_vty_test(config)# timer t +% Ambiguous command. + +tdef_vty_test(config)# timer te T2 +% Ambiguous command. + +tdef_vty_test(config)# timer test T2 100 + +tdef_vty_test(config)# timer tes T2 100 + +tdef_vty_test(config)# timer te T2 100 +% Ambiguous command. + +tdef_vty_test(config)# timer test 30 40 +tdef_vty_test(config)# timer test 30 60 +tdef_vty_test(config)# timer test 30 10 +% Timer T30 value 10 is out of range [20 .. inf] + +tdef_vty_test(config)# timer test 31 40 +tdef_vty_test(config)# timer test 31 60 +% Timer T31 value 60 is out of range [0 .. 52] +tdef_vty_test(config)# timer test 31 10 + +tdef_vty_test(config)# timer test 32 40 +tdef_vty_test(config)# timer test 32 60 +% Timer T32 value 60 is out of range [20 .. 52] +tdef_vty_test(config)# timer test 32 10 +% Timer T32 value 10 is out of range [20 .. 52] + +tdef_vty_test(config)# timer test +test: T1 = 100 s Testing a hundred seconds (default: 100 s) +test: T2 = 100 ms Testing a hundred milliseconds (default: 100 ms) +test: T3 = 100 m Testing a hundred minutes (default: 100 m) +test: T4 = 100 Testing a hundred potatoes (default: 100) +test: T2147483647 = 4294967295 m Very large (default: 4294967295 m) +test: X23 = 239471 s Negative T number (default: 239471 s) +test: T30 = 60 s Testing range min (default: 50 s, range: [20 .. inf]) +test: T31 = 10 s Testing range max (default: 50 s, range: [0 .. 52]) +test: T32 = 40 s Testing range both (default: 50 s, range: [20 .. 52]) + +tdef_vty_test(config)# do show timer software +software: T1 = 30 m Write code (default: 30 m) +software: T2 = 20 ms Hit segfault (default: 20 ms) +software: T3 = 480 m Fix bugs (default: 480 m) + +tdef_vty_test(config)# do show timer software 1 +software: T1 = 30 m Write code (default: 30 m) + +tdef_vty_test(config)# do show timer software t1 +software: T1 = 30 m Write code (default: 30 m) + +tdef_vty_test(config)# do show timer software T1 +software: T1 = 30 m Write code (default: 30 m) + +tdef_vty_test(config)# do show timer software T99 +% No such timer: T99 + +tdef_vty_test(config)# do show timer software X123123 +% No such timer: X123123 + +tdef_vty_test(config)# do show timer software T-123123 +% Invalid T timer argument (should be 'T1234' or 'X1234'): 'T-123123' + +tdef_vty_test(config)# do show timer software T0 +% No such timer: T0 + +tdef_vty_test(config)# timer software 1 11 +tdef_vty_test(config)# timer software T1 +software: T1 = 11 m Write code (default: 30 m) + +tdef_vty_test(config)# timer software t1 12 +tdef_vty_test(config)# timer software T1 +software: T1 = 12 m Write code (default: 30 m) + +tdef_vty_test(config)# timer software T1 13 +tdef_vty_test(config)# timer software T2 0 +tdef_vty_test(config)# timer software +software: T1 = 13 m Write code (default: 30 m) +software: T2 = 0 ms Hit segfault (default: 20 ms) +software: T3 = 480 m Fix bugs (default: 480 m) + +tdef_vty_test(config)# timer softw +software: T1 = 13 m Write code (default: 30 m) +software: T2 = 0 ms Hit segfault (default: 20 ms) +software: T3 = 480 m Fix bugs (default: 480 m) + +tdef_vty_test(config)# timer softw T3 +software: T3 = 480 m Fix bugs (default: 480 m) + +tdef_vty_test(config)# timer softw T3 23 + +tdef_vty_test(config)# timer +tea: T1 = 50 s Water Boiling Timeout (default: 50 s) +tea: T2 = 300 s Tea brewing (default: 300 s) +tea: T3 = 32 m Let tea cool down before drinking (default: 5 m) +tea: T4 = 20 m Forgot to drink tea while it's warm (default: 20 m) +test: T1 = 100 s Testing a hundred seconds (default: 100 s) +test: T2 = 100 ms Testing a hundred milliseconds (default: 100 ms) +test: T3 = 100 m Testing a hundred minutes (default: 100 m) +test: T4 = 100 Testing a hundred potatoes (default: 100) +test: T2147483647 = 4294967295 m Very large (default: 4294967295 m) +test: X23 = 239471 s Negative T number (default: 239471 s) +test: T30 = 60 s Testing range min (default: 50 s, range: [20 .. inf]) +test: T31 = 10 s Testing range max (default: 50 s, range: [0 .. 52]) +test: T32 = 40 s Testing range both (default: 50 s, range: [20 .. 52]) +software: T1 = 13 m Write code (default: 30 m) +software: T2 = 0 ms Hit segfault (default: 20 ms) +software: T3 = 23 m Fix bugs (default: 480 m) + +tdef_vty_test(config)# do show timer +tea: T1 = 50 s Water Boiling Timeout (default: 50 s) +tea: T2 = 300 s Tea brewing (default: 300 s) +tea: T3 = 32 m Let tea cool down before drinking (default: 5 m) +tea: T4 = 20 m Forgot to drink tea while it's warm (default: 20 m) +test: T1 = 100 s Testing a hundred seconds (default: 100 s) +test: T2 = 100 ms Testing a hundred milliseconds (default: 100 ms) +test: T3 = 100 m Testing a hundred minutes (default: 100 m) +test: T4 = 100 Testing a hundred potatoes (default: 100) +test: T2147483647 = 4294967295 m Very large (default: 4294967295 m) +test: X23 = 239471 s Negative T number (default: 239471 s) +test: T30 = 60 s Testing range min (default: 50 s, range: [20 .. inf]) +test: T31 = 10 s Testing range max (default: 50 s, range: [0 .. 52]) +test: T32 = 40 s Testing range both (default: 50 s, range: [20 .. 52]) +software: T1 = 13 m Write code (default: 30 m) +software: T2 = 0 ms Hit segfault (default: 20 ms) +software: T3 = 23 m Fix bugs (default: 480 m) + +tdef_vty_test(config)# show running-config +... !timer +timer tea T3 32 +timer test T30 60 +timer test T31 10 +timer test T32 40 +timer software T1 13 +timer software T2 0 +timer software T3 23 +... !timer + +tdef_vty_test(config)# timer tea T3 default +tdef_vty_test(config)# timer software T1 default +tdef_vty_test(config)# show running-config +... !timer +timer test T30 60 +timer test T31 10 +timer test T32 40 +timer software T2 0 +timer software T3 23 +... !timer + +tdef_vty_test(config)# timer softw 2 default +tdef_vty_test(config)# timer software 2 default +tdef_vty_test(config)# show running-config +... !timer +timer test T30 60 +timer test T31 10 +timer test T32 40 +timer software T3 23 +... !timer diff -Nru libosmocore-1.6.0/tests/tdef/tdef_vty_config_subnode_test.c libosmocore-1.7.0/tests/tdef/tdef_vty_config_subnode_test.c --- libosmocore-1.6.0/tests/tdef/tdef_vty_config_subnode_test.c 1970-01-01 00:00:00.000000000 +0000 +++ libosmocore-1.7.0/tests/tdef/tdef_vty_config_subnode_test.c 2022-06-28 15:00:51.000000000 +0000 @@ -0,0 +1,284 @@ +/* Test implementation for osmo_tdef VTY configuration API. */ +/* + * (C) 2019 by sysmocom s.f.m.c. GmbH + * + * All Rights Reserved + * + * SPDX-License-Identifier: GPL-2.0+ + * + * Author: Neels Hofmeyr + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#define _GNU_SOURCE +#include +#include +#include +#include + +#include + +#include +#include +#include + +#include +#include + +#include + +#include "config.h" + +/* ------------------- HERE IS THE INTERESTING TDEF RELEVANT PART ------------------- */ + +/* This example keeps a single global timer group and offers a custom 'timer' VTY command in a 'network' subnode below + * the CONFIG_NODE. + * the tdef_vty_config_subnode_test.vty transcript test. + */ + +static struct osmo_tdef global_tdefs[] = { + { .T=1, .default_val=100, .desc="Testing a hundred seconds" }, // default is .unit=OSMO_TDEF_S == 0 + { .T=2, .default_val=100, .unit=OSMO_TDEF_MS, .desc="Testing a hundred milliseconds" }, + { .T=3, .default_val=100, .unit=OSMO_TDEF_M, .desc="Testing a hundred minutes" }, + { .T=4, .default_val=100, .unit=OSMO_TDEF_CUSTOM, .desc="Testing a hundred potatoes" }, + { .T=0x7fffffff, .default_val=0xffffffff, .unit=OSMO_TDEF_M, .desc="Very large" }, + { .T=-23, .default_val=239471, .desc="Negative T number" }, + {} // <-- important! last entry shall be zero +}; + +enum tdef_vty_test_nodes { + GSMNET_NODE = _LAST_OSMOVTY_NODE + 1, +}; + +/* This example offers 'timer T123' commands within an "unrelated" already existing subnode. */ +static struct cmd_node gsmnet_node = { + GSMNET_NODE, + "%s(config-net)# ", + 1, +}; + +DEFUN(show_timer, show_timer_cmd, + "show timer " OSMO_TDEF_VTY_ARG_T_OPTIONAL, + SHOW_STR "Show timers\n" + OSMO_TDEF_VTY_DOC_T) +{ + const char *T_arg = argc > 0 ? argv[0] : NULL; + return osmo_tdef_vty_show_cmd(vty, global_tdefs, T_arg, NULL); +} + +DEFUN(cfg_net_timer, cfg_net_timer_cmd, + "timer " OSMO_TDEF_VTY_ARG_SET_OPTIONAL, + "Configure or show timers\n" + OSMO_TDEF_VTY_DOC_SET) +{ + /* If any arguments are missing, redirect to 'show' */ + if (argc < 2) + return show_timer(self, vty, argc, argv); + return osmo_tdef_vty_set_cmd(vty, global_tdefs, argv); +} + +DEFUN(cfg_net, cfg_net_cmd, + "network", "Enter network node\n") +{ + vty->node = GSMNET_NODE; + return CMD_SUCCESS; +} + +static int config_write_gsmnet(struct vty *vty) +{ + vty_out(vty, "net%s", VTY_NEWLINE); + /* usually, here would be the output of any other 'net' config items... */ + + osmo_tdef_vty_write(vty, global_tdefs, " timer "); + return CMD_SUCCESS; +} + +static void gsmnet_init_vty() +{ + install_node(&gsmnet_node, config_write_gsmnet); + install_element(CONFIG_NODE, &cfg_net_cmd); + + osmo_tdefs_reset(global_tdefs); + install_element_ve(&show_timer_cmd); + install_element(GSMNET_NODE, &cfg_net_timer_cmd); +} + +/* ------------------- THE REST is just boilerplate osmo main() ------------------- */ + +void *root_ctx = NULL; + +static void print_help() +{ + printf( "options:\n" + " -h --help this text\n" + " -d --debug MASK Enable debugging (e.g. -d DRSL:DOML:DLAPDM)\n" + " -D --daemonize For the process into a background daemon\n" + " -c --config-file Specify the filename of the config file\n" + " -s --disable-color Don't use colors in stderr log output\n" + " -T --timestamp Prefix every log line with a timestamp\n" + " -V --version Print version information and exit\n" + " -e --log-level Set a global log-level\n" + ); +} + +static struct { + const char *config_file; + int daemonize; +} cmdline_config = {}; + +static void handle_options(int argc, char **argv) +{ + while (1) { + int option_idx = 0, c; + static const struct option long_options[] = { + { "help", 0, 0, 'h' }, + { "debug", 1, 0, 'd' }, + { "daemonize", 0, 0, 'D' }, + { "config-file", 1, 0, 'c' }, + { "disable-color", 0, 0, 's' }, + { "timestamp", 0, 0, 'T' }, + { "version", 0, 0, 'V' }, + { "log-level", 1, 0, 'e' }, + {} + }; + + c = getopt_long(argc, argv, "hc:d:Dc:sTVe:", + long_options, &option_idx); + if (c == -1) + break; + + switch (c) { + case 'h': + print_help(); + exit(0); + case 's': + log_set_use_color(osmo_stderr_target, 0); + break; + case 'd': + log_parse_category_mask(osmo_stderr_target, optarg); + break; + case 'D': + cmdline_config.daemonize = 1; + break; + case 'c': + cmdline_config.config_file = optarg; + break; + case 'T': + log_set_print_timestamp(osmo_stderr_target, 1); + break; + case 'e': + log_set_log_level(osmo_stderr_target, atoi(optarg)); + break; + case 'V': + print_version(1); + exit(0); + break; + default: + /* catch unknown options *as well as* missing arguments. */ + fprintf(stderr, "Error in command line options. Exiting.\n"); + exit(-1); + } + } +} + +static int quit = 0; + +static void signal_handler(int signal) +{ + fprintf(stdout, "signal %u received\n", signal); + + switch (signal) { + case SIGINT: + case SIGTERM: + quit++; + break; + case SIGABRT: + osmo_generate_backtrace(); + /* in case of abort, we want to obtain a talloc report + * and then return to the caller, who will abort the process */ + case SIGUSR1: + talloc_report(tall_vty_ctx, stderr); + talloc_report_full(root_ctx, stderr); + break; + case SIGUSR2: + talloc_report_full(tall_vty_ctx, stderr); + break; + default: + break; + } +} + +static struct vty_app_info vty_info = { + .name = "tdef_vty_test", + .version = PACKAGE_VERSION, +}; + +static const struct log_info_cat default_categories[] = {}; + +const struct log_info log_info = { + .cat = default_categories, + .num_cat = ARRAY_SIZE(default_categories), +}; + +int main(int argc, char **argv) +{ + int rc; + + root_ctx = talloc_named_const(NULL, 0, "tdef_vty_test"); + + osmo_init_logging2(root_ctx, &log_info); + + vty_info.tall_ctx = root_ctx; + vty_init(&vty_info); + osmo_talloc_vty_add_cmds(); + + gsmnet_init_vty(); /* <--- relevant init for this example */ + + handle_options(argc, argv); + + if (cmdline_config.config_file) { + rc = vty_read_config_file(cmdline_config.config_file, NULL); + if (rc < 0) { + fprintf(stderr, "Failed to parse the config file: '%s'\n", cmdline_config.config_file); + return 1; + } + } + + rc = telnet_init_dynif(root_ctx, NULL, vty_get_bind_addr(), 42042); + if (rc < 0) + return 2; + + signal(SIGINT, &signal_handler); + signal(SIGTERM, &signal_handler); + signal(SIGABRT, &signal_handler); + signal(SIGUSR1, &signal_handler); + signal(SIGUSR2, &signal_handler); + osmo_init_ignore_signals(); + + if (cmdline_config.daemonize) { + rc = osmo_daemonize(); + if (rc < 0) { + perror("Error during daemonize"); + return 6; + } + } + + while (!quit) { + log_reset_context(); + osmo_select_main(0); + } + + talloc_free(root_ctx); + talloc_free(tall_vty_ctx); + + return 0; +} diff -Nru libosmocore-1.6.0/tests/tdef/tdef_vty_config_subnode_test.vty libosmocore-1.7.0/tests/tdef/tdef_vty_config_subnode_test.vty --- libosmocore-1.6.0/tests/tdef/tdef_vty_config_subnode_test.vty 1970-01-01 00:00:00.000000000 +0000 +++ libosmocore-1.7.0/tests/tdef/tdef_vty_config_subnode_test.vty 2022-06-28 15:00:51.000000000 +0000 @@ -0,0 +1,128 @@ +tdef_vty_test> list +... !timer + show timer [TNNNN] +... !timer + +tdef_vty_test> show timer ? + [TNNNN] T- or X-timer-number -- 3GPP compliant timer number of the format '1234' or 'T1234' or 't1234'; Osmocom-specific timer number of the format: 'X1234' or 'x1234'. + +tdef_vty_test> show timer +T1 = 100 s Testing a hundred seconds (default: 100 s) +T2 = 100 ms Testing a hundred milliseconds (default: 100 ms) +T3 = 100 m Testing a hundred minutes (default: 100 m) +T4 = 100 Testing a hundred potatoes (default: 100) +T2147483647 = 4294967295 m Very large (default: 4294967295 m) +X23 = 239471 s Negative T number (default: 239471 s) + +tdef_vty_test> enable +tdef_vty_test# show timer +T1 = 100 s Testing a hundred seconds (default: 100 s) +T2 = 100 ms Testing a hundred milliseconds (default: 100 ms) +T3 = 100 m Testing a hundred minutes (default: 100 m) +T4 = 100 Testing a hundred potatoes (default: 100) +T2147483647 = 4294967295 m Very large (default: 4294967295 m) +X23 = 239471 s Negative T number (default: 239471 s) + +tdef_vty_test# configure terminal +tdef_vty_test(config)# show running-config +... !timer + +tdef_vty_test(config)# network + +tdef_vty_test(config-net)# do show timer +T1 = 100 s Testing a hundred seconds (default: 100 s) +T2 = 100 ms Testing a hundred milliseconds (default: 100 ms) +T3 = 100 m Testing a hundred minutes (default: 100 m) +T4 = 100 Testing a hundred potatoes (default: 100) +T2147483647 = 4294967295 m Very large (default: 4294967295 m) +X23 = 239471 s Negative T number (default: 239471 s) + +tdef_vty_test(config-net)# do show timer T3 +T3 = 100 m Testing a hundred minutes (default: 100 m) +tdef_vty_test(config-net)# do show timer 3 +T3 = 100 m Testing a hundred minutes (default: 100 m) +tdef_vty_test(config-net)# do show timer t3 +T3 = 100 m Testing a hundred minutes (default: 100 m) + +tdef_vty_test(config-net)# timer T1 5 +tdef_vty_test(config-net)# timer T1 +T1 = 5 s Testing a hundred seconds (default: 100 s) + +tdef_vty_test(config-net)# timer t1 678 +tdef_vty_test(config-net)# timer T1 +T1 = 678 s Testing a hundred seconds (default: 100 s) + +tdef_vty_test(config-net)# timer 1 9012345 +tdef_vty_test(config-net)# timer T1 +T1 = 9012345 s Testing a hundred seconds (default: 100 s) + +tdef_vty_test(config-net)# do show timer T666 +% No such timer: T666 +tdef_vty_test(config-net)# do show timer t666 +% No such timer: T666 +tdef_vty_test(config-net)# do show timer 666 +% No such timer: T666 + +tdef_vty_test(config-net)# timer T666 +% No such timer: T666 +tdef_vty_test(config-net)# timer t666 +% No such timer: T666 +tdef_vty_test(config-net)# timer 666 +% No such timer: T666 + +tdef_vty_test(config-net)# timer T666 5 +% No such timer: T666 + +tdef_vty_test(config-net)# timer X23 42 +tdef_vty_test(config-net)# timer X23 +X23 = 42 s Negative T number (default: 239471 s) + +tdef_vty_test(config-net)# timer x23 43 +tdef_vty_test(config-net)# timer x23 +X23 = 43 s Negative T number (default: 239471 s) + +tdef_vty_test(config-net)# do show timer +T1 = 9012345 s Testing a hundred seconds (default: 100 s) +T2 = 100 ms Testing a hundred milliseconds (default: 100 ms) +T3 = 100 m Testing a hundred minutes (default: 100 m) +T4 = 100 Testing a hundred potatoes (default: 100) +T2147483647 = 4294967295 m Very large (default: 4294967295 m) +X23 = 43 s Negative T number (default: 239471 s) + +tdef_vty_test(config-net)# timer T-23 42 +% Invalid T timer argument (should be 'T1234' or 'X1234'): 'T-23' +tdef_vty_test(config-net)# timer T-23 +% Invalid T timer argument (should be 'T1234' or 'X1234'): 'T-23' + +tdef_vty_test(config-net)# timer t-23 42 +% Invalid T timer argument (should be 'T1234' or 'X1234'): 't-23' +tdef_vty_test(config-net)# timer t-23 +% Invalid T timer argument (should be 'T1234' or 'X1234'): 't-23' + +tdef_vty_test(config-net)# timer X-23 42 +% Invalid T timer argument (should be 'T1234' or 'X1234'): 'X-23' +tdef_vty_test(config-net)# timer X-23 +% Invalid T timer argument (should be 'T1234' or 'X1234'): 'X-23' + +tdef_vty_test(config-net)# timer x-23 42 +% Invalid T timer argument (should be 'T1234' or 'X1234'): 'x-23' +tdef_vty_test(config-net)# timer x-23 +% Invalid T timer argument (should be 'T1234' or 'X1234'): 'x-23' + +tdef_vty_test(config-net)# timer -23 42 +% Invalid T timer argument (should be 'T1234' or 'X1234'): '-23' +tdef_vty_test(config-net)# timer -23 +% Invalid T timer argument (should be 'T1234' or 'X1234'): '-23' + +tdef_vty_test(config-net)# show running-config +... !timer +net + timer T1 9012345 + timer X23 43 +... !timer + +tdef_vty_test(config-net)# timer T1 default +tdef_vty_test(config-net)# timer X23 default + +tdef_vty_test(config-net)# show running-config +... !timer diff -Nru libosmocore-1.6.0/tests/tdef/tdef_vty_dynamic_test.c libosmocore-1.7.0/tests/tdef/tdef_vty_dynamic_test.c --- libosmocore-1.6.0/tests/tdef/tdef_vty_dynamic_test.c 1970-01-01 00:00:00.000000000 +0000 +++ libosmocore-1.7.0/tests/tdef/tdef_vty_dynamic_test.c 2022-06-28 15:00:51.000000000 +0000 @@ -0,0 +1,358 @@ +/* Test implementation for osmo_tdef VTY configuration API. */ +/* + * (C) 2019 by sysmocom s.f.m.c. GmbH + * + * All Rights Reserved + * + * SPDX-License-Identifier: GPL-2.0+ + * + * Author: Neels Hofmeyr + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#define _GNU_SOURCE +#include +#include +#include +#include + +#include + +#include +#include +#include + +#include +#include + +#include + +#include "config.h" + +void *root_ctx = NULL; + +/* ------------------- HERE IS THE INTERESTING TDEF RELEVANT PART ------------------- */ + +/* This example keeps a separate list of timers for each instance of a dynamically allocated instance of a VTY node, + * for example of keeping separate timers for each BTS in a BSC. + */ + +static const struct osmo_tdef bts_default_tdefs[] = { + { .T=1111, .default_val=2, .desc="Dynamic Duo" }, + { .T=2222, .default_val=1, .desc="BATMAN" }, + { .T=3333, .default_val=12, .desc="Dadadadadadadadadadadada" }, + { .T=4444, .default_val=500, .unit=OSMO_TDEF_MS, .desc="POW!" }, + {} +}; + + +/* Boilerplate dynamic VTY node ... */ + +enum tdef_vty_test_nodes { + MEMBER_NODE = _LAST_OSMOVTY_NODE + 1, +}; + +static struct cmd_node member_node = { + MEMBER_NODE, + "%s(config-member)# ", + 1, +}; + +struct member { + struct llist_head entry; + char name[23]; + struct osmo_tdef *tdefs; +}; + +LLIST_HEAD(all_members); + +struct member *member_alloc(const char *name) +{ + struct member *m = talloc_zero(root_ctx, struct member); + osmo_strlcpy(m->name, name, sizeof(m->name)); + + /* DYNAMIC TDEF COPIES */ + m->tdefs = (struct osmo_tdef*)talloc_size(m, sizeof(bts_default_tdefs)); + memcpy((char*)m->tdefs, (char*)&bts_default_tdefs, sizeof(bts_default_tdefs)); + osmo_tdefs_reset(m->tdefs); + + llist_add_tail(&m->entry, &all_members); + return m; +} + +struct member *member_find(const char *name) +{ + struct member *m; + llist_for_each_entry(m, &all_members, entry) { + if (!strcmp(m->name, name)) + return m; + } + return NULL; +} + +DEFUN(cfg_member, cfg_member_cmd, + "member NAME", + "Enter member node\n" "Existing or new member node name\n") +{ + const char *name = argv[0]; + struct member *m = member_find(name); + if (!m) + m = member_alloc(name); + vty->index = m; + vty->node = MEMBER_NODE; + return CMD_SUCCESS; +} + + +/* TDEF SPECIFIC VTY */ + +static bool startswith(const char *str, const char *startswith_str) +{ + if (!startswith_str) + return true; + if (!str) + return false; + return strncmp(str, startswith_str, strlen(startswith_str)) == 0; +} + +DEFUN(show_timer, show_member_timer_cmd, + "show member-timer [NAME] " OSMO_TDEF_VTY_ARG_T_OPTIONAL, + SHOW_STR "Show timers for a specific member" "member name\n" + OSMO_TDEF_VTY_DOC_T) +{ + const char *name = argc > 0 ? argv[0] : NULL; + struct member *m; + const char *T_arg = argc > 1 ? argv[1] : NULL; + int shown = 0; + + llist_for_each_entry(m, &all_members, entry) { + if (!name || startswith(m->name, name)) { + osmo_tdef_vty_show_cmd(vty, m->tdefs, T_arg, "%11s: ", m->name); + shown ++; + } + } + if (!shown) { + vty_out(vty, "%% No such member: %s%s", name ? : "(none)", VTY_NEWLINE); + return CMD_WARNING; + } + return CMD_SUCCESS; +} + +DEFUN(cfg_member_timer, cfg_member_timer_cmd, + "timer " OSMO_TDEF_VTY_ARG_SET_OPTIONAL, + "Configure or show timers for this member\n" + OSMO_TDEF_VTY_DOC_SET) +{ + struct member *m = vty->index; + + if (!m || !m->tdefs) { + vty_out(vty, "%% No timers here%s", VTY_NEWLINE); + return CMD_WARNING; + } + + /* If any arguments are missing, redirect to 'show' */ + if (argc < 2) { + const char *T_arg = argc > 0 ? argv[0] : NULL; + return osmo_tdef_vty_show_cmd(vty, m->tdefs, T_arg, "%11s: ", m->name); + } + + return osmo_tdef_vty_set_cmd(vty, m->tdefs, argv); +} + +static int config_write_member(struct vty *vty) +{ + struct member *m; + llist_for_each_entry(m, &all_members, entry) { + vty_out(vty, "member %s%s", m->name, VTY_NEWLINE); + osmo_tdef_vty_write(vty, m->tdefs, " timer "); + } + + return CMD_SUCCESS; +} + +static void member_init_vty() +{ + install_node(&member_node, config_write_member); + install_element(CONFIG_NODE, &cfg_member_cmd); + + install_element_ve(&show_member_timer_cmd); + install_element(MEMBER_NODE, &cfg_member_timer_cmd); +} + +/* ------------------- THE REST is just boilerplate osmo main() ------------------- */ + +static void print_help() +{ + printf( "options:\n" + " -h --help this text\n" + " -d --debug MASK Enable debugging (e.g. -d DRSL:DOML:DLAPDM)\n" + " -D --daemonize For the process into a background daemon\n" + " -c --config-file Specify the filename of the config file\n" + " -s --disable-color Don't use colors in stderr log output\n" + " -T --timestamp Prefix every log line with a timestamp\n" + " -V --version Print version information and exit\n" + " -e --log-level Set a global log-level\n" + ); +} + +static struct { + const char *config_file; + int daemonize; +} cmdline_config = {}; + +static void handle_options(int argc, char **argv) +{ + while (1) { + int option_idx = 0, c; + static const struct option long_options[] = { + { "help", 0, 0, 'h' }, + { "debug", 1, 0, 'd' }, + { "daemonize", 0, 0, 'D' }, + { "config-file", 1, 0, 'c' }, + { "disable-color", 0, 0, 's' }, + { "timestamp", 0, 0, 'T' }, + { "version", 0, 0, 'V' }, + { "log-level", 1, 0, 'e' }, + {} + }; + + c = getopt_long(argc, argv, "hc:d:Dc:sTVe:", + long_options, &option_idx); + if (c == -1) + break; + + switch (c) { + case 'h': + print_help(); + exit(0); + case 's': + log_set_use_color(osmo_stderr_target, 0); + break; + case 'd': + log_parse_category_mask(osmo_stderr_target, optarg); + break; + case 'D': + cmdline_config.daemonize = 1; + break; + case 'c': + cmdline_config.config_file = optarg; + break; + case 'T': + log_set_print_timestamp(osmo_stderr_target, 1); + break; + case 'e': + log_set_log_level(osmo_stderr_target, atoi(optarg)); + break; + case 'V': + print_version(1); + exit(0); + break; + default: + /* catch unknown options *as well as* missing arguments. */ + fprintf(stderr, "Error in command line options. Exiting.\n"); + exit(-1); + } + } +} + +static int quit = 0; + +static void signal_handler(int signal) +{ + fprintf(stdout, "signal %u received\n", signal); + + switch (signal) { + case SIGINT: + case SIGTERM: + quit++; + break; + case SIGABRT: + osmo_generate_backtrace(); + /* in case of abort, we want to obtain a talloc report + * and then return to the caller, who will abort the process */ + case SIGUSR1: + talloc_report(tall_vty_ctx, stderr); + talloc_report_full(root_ctx, stderr); + break; + case SIGUSR2: + talloc_report_full(tall_vty_ctx, stderr); + break; + default: + break; + } +} + +static struct vty_app_info vty_info = { + .name = "tdef_vty_test", + .version = PACKAGE_VERSION, +}; + +static const struct log_info_cat default_categories[] = {}; + +const struct log_info log_info = { + .cat = default_categories, + .num_cat = ARRAY_SIZE(default_categories), +}; + +int main(int argc, char **argv) +{ + int rc; + + root_ctx = talloc_named_const(NULL, 0, "tdef_vty_test"); + + osmo_init_logging2(root_ctx, &log_info); + + vty_info.tall_ctx = root_ctx; + vty_init(&vty_info); + osmo_talloc_vty_add_cmds(); + + member_init_vty(); /* <--- relevant init for this example */ + + handle_options(argc, argv); + + if (cmdline_config.config_file) { + rc = vty_read_config_file(cmdline_config.config_file, NULL); + if (rc < 0) { + fprintf(stderr, "Failed to parse the config file: '%s'\n", cmdline_config.config_file); + return 1; + } + } + + rc = telnet_init_dynif(root_ctx, NULL, vty_get_bind_addr(), 42042); + if (rc < 0) + return 2; + + signal(SIGINT, &signal_handler); + signal(SIGTERM, &signal_handler); + signal(SIGABRT, &signal_handler); + signal(SIGUSR1, &signal_handler); + signal(SIGUSR2, &signal_handler); + osmo_init_ignore_signals(); + + if (cmdline_config.daemonize) { + rc = osmo_daemonize(); + if (rc < 0) { + perror("Error during daemonize"); + return 6; + } + } + + while (!quit) { + log_reset_context(); + osmo_select_main(0); + } + + talloc_free(root_ctx); + talloc_free(tall_vty_ctx); + + return 0; +} diff -Nru libosmocore-1.6.0/tests/tdef/tdef_vty_dynamic_test.vty libosmocore-1.7.0/tests/tdef/tdef_vty_dynamic_test.vty --- libosmocore-1.6.0/tests/tdef/tdef_vty_dynamic_test.vty 1970-01-01 00:00:00.000000000 +0000 +++ libosmocore-1.7.0/tests/tdef/tdef_vty_dynamic_test.vty 2022-06-28 15:00:51.000000000 +0000 @@ -0,0 +1,83 @@ +tdef_vty_test> list +... + show member-timer [NAME] [TNNNN] +... + +tdef_vty_test> enable +tdef_vty_test# configure terminal + +tdef_vty_test(config)# member robin +tdef_vty_test(config-member)# timer + robin: T1111 = 2 s Dynamic Duo (default: 2 s) + robin: T2222 = 1 s BATMAN (default: 1 s) + robin: T3333 = 12 s Dadadadadadadadadadadada (default: 12 s) + robin: T4444 = 500 ms POW! (default: 500 ms) + +tdef_vty_test(config-member)# timer T2222 423 +tdef_vty_test(config-member)# timer T2222 + robin: T2222 = 423 s BATMAN (default: 1 s) + +tdef_vty_test(config-member)# timer + robin: T1111 = 2 s Dynamic Duo (default: 2 s) + robin: T2222 = 423 s BATMAN (default: 1 s) + robin: T3333 = 12 s Dadadadadadadadadadadada (default: 12 s) + robin: T4444 = 500 ms POW! (default: 500 ms) + +tdef_vty_test(config-member)# do show member-timer + robin: T1111 = 2 s Dynamic Duo (default: 2 s) + robin: T2222 = 423 s BATMAN (default: 1 s) + robin: T3333 = 12 s Dadadadadadadadadadadada (default: 12 s) + robin: T4444 = 500 ms POW! (default: 500 ms) + +tdef_vty_test(config-member)# exit + +tdef_vty_test(config)# member batman +tdef_vty_test(config-member)# timer 3333 17 +tdef_vty_test(config-member)# timer 3333 + batman: T3333 = 17 s Dadadadadadadadadadadada (default: 12 s) + +tdef_vty_test(config-member)# show running-config + +Current configuration: +... +member robin + timer T2222 423 +member batman + timer T3333 17 +... + +tdef_vty_test(config-member)# timer 3333 default + +tdef_vty_test(config-member)# show running-config +... +member robin + timer T2222 423 +member batman +... !timer + +tdef_vty_test(config-member)# exit +tdef_vty_test(config)# exit +tdef_vty_test# show member-timer + robin: T1111 = 2 s Dynamic Duo (default: 2 s) + robin: T2222 = 423 s BATMAN (default: 1 s) + robin: T3333 = 12 s Dadadadadadadadadadadada (default: 12 s) + robin: T4444 = 500 ms POW! (default: 500 ms) + batman: T1111 = 2 s Dynamic Duo (default: 2 s) + batman: T2222 = 1 s BATMAN (default: 1 s) + batman: T3333 = 12 s Dadadadadadadadadadadada (default: 12 s) + batman: T4444 = 500 ms POW! (default: 500 ms) + +tdef_vty_test# show member-timer batman + batman: T1111 = 2 s Dynamic Duo (default: 2 s) + batman: T2222 = 1 s BATMAN (default: 1 s) + batman: T3333 = 12 s Dadadadadadadadadadadada (default: 12 s) + batman: T4444 = 500 ms POW! (default: 500 ms) + +tdef_vty_test# show member-timer robin + robin: T1111 = 2 s Dynamic Duo (default: 2 s) + robin: T2222 = 423 s BATMAN (default: 1 s) + robin: T3333 = 12 s Dadadadadadadadadadadada (default: 12 s) + robin: T4444 = 500 ms POW! (default: 500 ms) + +tdef_vty_test# show member-timer joker +% No such member: joker diff -Nru libosmocore-1.6.0/tests/tdef/tdef_vty_test_config_root.c libosmocore-1.7.0/tests/tdef/tdef_vty_test_config_root.c --- libosmocore-1.6.0/tests/tdef/tdef_vty_test_config_root.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/tests/tdef/tdef_vty_test_config_root.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,295 +0,0 @@ -/* Test implementation for osmo_tdef VTY configuration API. */ -/* - * (C) 2019 by sysmocom s.f.m.c. GmbH - * - * All Rights Reserved - * - * SPDX-License-Identifier: GPL-2.0+ - * - * Author: Neels Hofmeyr - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * 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. - */ - -#define _GNU_SOURCE -#include -#include -#include -#include - -#include - -#include -#include -#include - -#include -#include - -#include - -#include "config.h" - -/* ------------------- HERE IS THE INTERESTING TDEF RELEVANT PART ------------------- */ - -/* This example keeps several separate timer groups and offers 'timer' VTY commands at the root of the config node. See - * the tdef_vty_test_config_root.vty transcript test. - */ - -static struct osmo_tdef tdefs_test[] = { - { .T=1, .default_val=100, .desc="Testing a hundred seconds" }, // default is .unit=OSMO_TDEF_S == 0 - { .T=2, .default_val=100, .unit=OSMO_TDEF_MS, .desc="Testing a hundred milliseconds" }, - { .T=3, .default_val=100, .unit=OSMO_TDEF_M, .desc="Testing a hundred minutes" }, - { .T=4, .default_val=100, .unit=OSMO_TDEF_CUSTOM, .desc="Testing a hundred potatoes" }, - { .T=0x7fffffff, .default_val=0xffffffff, .unit=OSMO_TDEF_M, .desc="Very large" }, - { .T=-23, .default_val=239471, .desc="Negative T number" }, - { .T=30, .default_val=50, .desc="Testing range min", .min_val=20 }, - { .T=31, .default_val=50, .desc="Testing range max", .max_val=52 }, - { .T=32, .default_val=50, .desc="Testing range both", .min_val=20, .max_val=52 }, - {} // <-- important! last entry shall be zero -}; - -static struct osmo_tdef tdefs_tea[] = { - { .T=1, .default_val=50, .desc="Water Boiling Timeout" }, - { .T=2, .default_val=300, .desc="Tea brewing" }, - { .T=3, .default_val=5, .unit=OSMO_TDEF_M, .desc="Let tea cool down before drinking" }, - { .T=4, .default_val=20, .unit=OSMO_TDEF_M, .desc="Forgot to drink tea while it's warm" }, - {} -}; - -static struct osmo_tdef tdefs_software[] = { - { .T=1, .default_val=30, .unit=OSMO_TDEF_M, .desc="Write code" }, - { .T=2, .default_val=20, .unit=OSMO_TDEF_MS, .desc="Hit segfault" }, - { .T=3, .default_val=480, .unit=OSMO_TDEF_M, .desc="Fix bugs" }, - {} -}; - -static struct osmo_tdef_group tdef_groups[] = { - { - .name = "tea", - .desc = "Tea time", - .tdefs = tdefs_tea, - }, - { - .name = "test", - .desc = "Test timers", - .tdefs = tdefs_test, - }, - { - .name = "software", - .desc = "Typical software development cycle", - .tdefs = tdefs_software, - }, - {} -}; - -enum tdef_vty_test_nodes { - TIMER_NODE = _LAST_OSMOVTY_NODE + 1, -}; - -/* This example puts 'timer' configuration commands directly at the root of the CONFIG_NODE. - * This TIMER_NODE is merely needed as a hook for the vty_write() command, but becomes an empty node in the VTY docs. - * It is possible to cheat around needing this if you choose to config_write_timer() in another root nodes' write cb. - * Another example using a 'network' subnode is \ref tdef_vty_test_config_subnode.c */ -static struct cmd_node timer_node = { - TIMER_NODE, - "%s(config-timer)# ", - 1, -}; - -static int config_write_timer(struct vty *vty) -{ - osmo_tdef_vty_groups_write(vty, ""); - return CMD_SUCCESS; -} - -static void timer_init_vty() -{ - /* Again, this is merely to get a vty write hook, see above. */ - install_node(&timer_node, config_write_timer); - - osmo_tdef_vty_groups_init(CONFIG_NODE, tdef_groups); -} - -/* ------------------- THE REST is just boilerplate osmo main() ------------------- */ - -void *root_ctx = NULL; - -static void print_help() -{ - printf( "options:\n" - " -h --help this text\n" - " -d --debug MASK Enable debugging (e.g. -d DRSL:DOML:DLAPDM)\n" - " -D --daemonize For the process into a background daemon\n" - " -c --config-file Specify the filename of the config file\n" - " -s --disable-color Don't use colors in stderr log output\n" - " -T --timestamp Prefix every log line with a timestamp\n" - " -V --version Print version information and exit\n" - " -e --log-level Set a global log-level\n" - ); -} - -static struct { - const char *config_file; - int daemonize; -} cmdline_config = {}; - -static void handle_options(int argc, char **argv) -{ - while (1) { - int option_idx = 0, c; - static const struct option long_options[] = { - { "help", 0, 0, 'h' }, - { "debug", 1, 0, 'd' }, - { "daemonize", 0, 0, 'D' }, - { "config-file", 1, 0, 'c' }, - { "disable-color", 0, 0, 's' }, - { "timestamp", 0, 0, 'T' }, - { "version", 0, 0, 'V' }, - { "log-level", 1, 0, 'e' }, - {} - }; - - c = getopt_long(argc, argv, "hc:d:Dc:sTVe:", - long_options, &option_idx); - if (c == -1) - break; - - switch (c) { - case 'h': - print_help(); - exit(0); - case 's': - log_set_use_color(osmo_stderr_target, 0); - break; - case 'd': - log_parse_category_mask(osmo_stderr_target, optarg); - break; - case 'D': - cmdline_config.daemonize = 1; - break; - case 'c': - cmdline_config.config_file = optarg; - break; - case 'T': - log_set_print_timestamp(osmo_stderr_target, 1); - break; - case 'e': - log_set_log_level(osmo_stderr_target, atoi(optarg)); - break; - case 'V': - print_version(1); - exit(0); - break; - default: - /* catch unknown options *as well as* missing arguments. */ - fprintf(stderr, "Error in command line options. Exiting.\n"); - exit(-1); - } - } -} - -static int quit = 0; - -static void signal_handler(int signal) -{ - fprintf(stdout, "signal %u received\n", signal); - - switch (signal) { - case SIGINT: - case SIGTERM: - quit++; - break; - case SIGABRT: - osmo_generate_backtrace(); - /* in case of abort, we want to obtain a talloc report - * and then return to the caller, who will abort the process */ - case SIGUSR1: - talloc_report(tall_vty_ctx, stderr); - talloc_report_full(root_ctx, stderr); - break; - case SIGUSR2: - talloc_report_full(tall_vty_ctx, stderr); - break; - default: - break; - } -} - -static struct vty_app_info vty_info = { - .name = "tdef_vty_test", - .version = PACKAGE_VERSION, -}; - -static const struct log_info_cat default_categories[] = {}; - -const struct log_info log_info = { - .cat = default_categories, - .num_cat = ARRAY_SIZE(default_categories), -}; - -int main(int argc, char **argv) -{ - int rc; - - root_ctx = talloc_named_const(NULL, 0, "tdef_vty_test"); - - osmo_init_logging2(root_ctx, &log_info); - - vty_info.tall_ctx = root_ctx; - vty_init(&vty_info); - osmo_talloc_vty_add_cmds(); - - timer_init_vty(); /* <---- the only tdef relevant init */ - - handle_options(argc, argv); - - if (cmdline_config.config_file) { - rc = vty_read_config_file(cmdline_config.config_file, NULL); - if (rc < 0) { - fprintf(stderr, "Failed to parse the config file: '%s'\n", cmdline_config.config_file); - return 1; - } - } - - rc = telnet_init_dynif(root_ctx, NULL, vty_get_bind_addr(), 42042); - if (rc < 0) - return 2; - - signal(SIGINT, &signal_handler); - signal(SIGTERM, &signal_handler); - signal(SIGABRT, &signal_handler); - signal(SIGUSR1, &signal_handler); - signal(SIGUSR2, &signal_handler); - osmo_init_ignore_signals(); - - if (cmdline_config.daemonize) { - rc = osmo_daemonize(); - if (rc < 0) { - perror("Error during daemonize"); - return 6; - } - } - - while (!quit) { - log_reset_context(); - osmo_select_main(0); - } - - talloc_free(root_ctx); - talloc_free(tall_vty_ctx); - - return 0; -} diff -Nru libosmocore-1.6.0/tests/tdef/tdef_vty_test_config_root.vty libosmocore-1.7.0/tests/tdef/tdef_vty_test_config_root.vty --- libosmocore-1.6.0/tests/tdef/tdef_vty_test_config_root.vty 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/tests/tdef/tdef_vty_test_config_root.vty 1970-01-01 00:00:00.000000000 +0000 @@ -1,323 +0,0 @@ -tdef_vty_test> list -... - show timer [(tea|test|software)] [TNNNN] -... - -tdef_vty_test> show timer ? - [tea] Tea time - [test] Test timers - [software] Typical software development cycle - -tdef_vty_test> show timer test ? - [TNNNN] T- or X-timer-number -- 3GPP compliant timer number of the format '1234' or 'T1234' or 't1234'; Osmocom-specific timer number of the format: 'X1234' or 'x1234'. - -tdef_vty_test> show timer -tea: T1 = 50 s Water Boiling Timeout (default: 50 s) -tea: T2 = 300 s Tea brewing (default: 300 s) -tea: T3 = 5 m Let tea cool down before drinking (default: 5 m) -tea: T4 = 20 m Forgot to drink tea while it's warm (default: 20 m) -test: T1 = 100 s Testing a hundred seconds (default: 100 s) -test: T2 = 100 ms Testing a hundred milliseconds (default: 100 ms) -test: T3 = 100 m Testing a hundred minutes (default: 100 m) -test: T4 = 100 Testing a hundred potatoes (default: 100) -test: T2147483647 = 4294967295 m Very large (default: 4294967295 m) -test: X23 = 239471 s Negative T number (default: 239471 s) -test: T30 = 50 s Testing range min (default: 50 s, range: [20 .. inf]) -test: T31 = 50 s Testing range max (default: 50 s, range: [0 .. 52]) -test: T32 = 50 s Testing range both (default: 50 s, range: [20 .. 52]) -software: T1 = 30 m Write code (default: 30 m) -software: T2 = 20 ms Hit segfault (default: 20 ms) -software: T3 = 480 m Fix bugs (default: 480 m) - -tdef_vty_test> enable -tdef_vty_test# show timer -tea: T1 = 50 s Water Boiling Timeout (default: 50 s) -tea: T2 = 300 s Tea brewing (default: 300 s) -tea: T3 = 5 m Let tea cool down before drinking (default: 5 m) -tea: T4 = 20 m Forgot to drink tea while it's warm (default: 20 m) -test: T1 = 100 s Testing a hundred seconds (default: 100 s) -test: T2 = 100 ms Testing a hundred milliseconds (default: 100 ms) -test: T3 = 100 m Testing a hundred minutes (default: 100 m) -test: T4 = 100 Testing a hundred potatoes (default: 100) -test: T2147483647 = 4294967295 m Very large (default: 4294967295 m) -test: X23 = 239471 s Negative T number (default: 239471 s) -test: T30 = 50 s Testing range min (default: 50 s, range: [20 .. inf]) -test: T31 = 50 s Testing range max (default: 50 s, range: [0 .. 52]) -test: T32 = 50 s Testing range both (default: 50 s, range: [20 .. 52]) -software: T1 = 30 m Write code (default: 30 m) -software: T2 = 20 ms Hit segfault (default: 20 ms) -software: T3 = 480 m Fix bugs (default: 480 m) - -tdef_vty_test# configure terminal - -tdef_vty_test(config)# show running-config -... !timer - -tdef_vty_test(config)# list -... - timer [(tea|test|software)] [TNNNN] [(<0-2147483647>|default)] -... - -tdef_vty_test(config)# timer ? - [tea] Tea time - [test] Test timers - [software] Typical software development cycle - -tdef_vty_test(config)# timer sof T123 ? - [<0-2147483647>] New timer value - [default] Set to default timer value - -tdef_vty_test(config)# timer sof T123 ? - [<0-2147483647>] New timer value - [default] Set to default timer value - -tdef_vty_test(config)# timer test ? - [TNNNN] T- or X-timer-number -- 3GPP compliant timer number of the format '1234' or 'T1234' or 't1234'; Osmocom-specific timer number of the format: 'X1234' or 'x1234'. - -tdef_vty_test(config)# timer test t2 ? - [<0-2147483647>] New timer value - [default] Set to default timer value - -tdef_vty_test(config)# do show timer -tea: T1 = 50 s Water Boiling Timeout (default: 50 s) -tea: T2 = 300 s Tea brewing (default: 300 s) -tea: T3 = 5 m Let tea cool down before drinking (default: 5 m) -tea: T4 = 20 m Forgot to drink tea while it's warm (default: 20 m) -test: T1 = 100 s Testing a hundred seconds (default: 100 s) -test: T2 = 100 ms Testing a hundred milliseconds (default: 100 ms) -test: T3 = 100 m Testing a hundred minutes (default: 100 m) -test: T4 = 100 Testing a hundred potatoes (default: 100) -test: T2147483647 = 4294967295 m Very large (default: 4294967295 m) -test: X23 = 239471 s Negative T number (default: 239471 s) -test: T30 = 50 s Testing range min (default: 50 s, range: [20 .. inf]) -test: T31 = 50 s Testing range max (default: 50 s, range: [0 .. 52]) -test: T32 = 50 s Testing range both (default: 50 s, range: [20 .. 52]) -software: T1 = 30 m Write code (default: 30 m) -software: T2 = 20 ms Hit segfault (default: 20 ms) -software: T3 = 480 m Fix bugs (default: 480 m) - -tdef_vty_test(config)# do show timer tea -tea: T1 = 50 s Water Boiling Timeout (default: 50 s) -tea: T2 = 300 s Tea brewing (default: 300 s) -tea: T3 = 5 m Let tea cool down before drinking (default: 5 m) -tea: T4 = 20 m Forgot to drink tea while it's warm (default: 20 m) - -tdef_vty_test(config)# do show timer tea 2 -tea: T2 = 300 s Tea brewing (default: 300 s) - -tdef_vty_test(config)# do show timer tea t2 -tea: T2 = 300 s Tea brewing (default: 300 s) - -tdef_vty_test(config)# do show timer tea T2 -tea: T2 = 300 s Tea brewing (default: 300 s) - -tdef_vty_test(config)# do show timer tea T5 -% No such timer: T5 - -tdef_vty_test(config)# do show timer tea T0 -% No such timer: T0 - -tdef_vty_test(config)# do show timer tea X123 -% No such timer: X123 - -tdef_vty_test(config)# do show timer tea T-123 -% Invalid T timer argument (should be 'T1234' or 'X1234'): 'T-123' - -tdef_vty_test(config)# do show timer t -% Ambiguous command. - -tdef_vty_test(config)# do show timer te -% Ambiguous command. - -tdef_vty_test(config)# do show timer te T2 -% Ambiguous command. - - -tdef_vty_test(config)# timer tea 3 30 -tdef_vty_test(config)# timer tea T3 -tea: T3 = 30 m Let tea cool down before drinking (default: 5 m) - -tdef_vty_test(config)# timer tea t3 31 -tdef_vty_test(config)# timer tea T3 -tea: T3 = 31 m Let tea cool down before drinking (default: 5 m) - -tdef_vty_test(config)# timer tea T3 32 -tdef_vty_test(config)# timer tea T3 -tea: T3 = 32 m Let tea cool down before drinking (default: 5 m) - -tdef_vty_test(config)# timer tea X123 99 -% No such timer: X123 - -tdef_vty_test(config)# timer tea T-123 99 -% Invalid T timer argument (should be 'T1234' or 'X1234'): 'T-123' - -tdef_vty_test(config)# timer tea T0 0 -% No such timer: T0 - -tdef_vty_test(config)# timer tea T123 default -% No such timer: T123 - -tdef_vty_test(config)# timer tea -tea: T1 = 50 s Water Boiling Timeout (default: 50 s) -tea: T2 = 300 s Tea brewing (default: 300 s) -tea: T3 = 32 m Let tea cool down before drinking (default: 5 m) -tea: T4 = 20 m Forgot to drink tea while it's warm (default: 20 m) - -tdef_vty_test(config)# timer t -% Ambiguous command. - -tdef_vty_test(config)# timer te T2 -% Ambiguous command. - -tdef_vty_test(config)# timer test T2 100 - -tdef_vty_test(config)# timer tes T2 100 - -tdef_vty_test(config)# timer te T2 100 -% Ambiguous command. - -tdef_vty_test(config)# timer test 30 40 -tdef_vty_test(config)# timer test 30 60 -tdef_vty_test(config)# timer test 30 10 -% Timer T30 value 10 is out of range [20 .. inf] - -tdef_vty_test(config)# timer test 31 40 -tdef_vty_test(config)# timer test 31 60 -% Timer T31 value 60 is out of range [0 .. 52] -tdef_vty_test(config)# timer test 31 10 - -tdef_vty_test(config)# timer test 32 40 -tdef_vty_test(config)# timer test 32 60 -% Timer T32 value 60 is out of range [20 .. 52] -tdef_vty_test(config)# timer test 32 10 -% Timer T32 value 10 is out of range [20 .. 52] - -tdef_vty_test(config)# timer test -test: T1 = 100 s Testing a hundred seconds (default: 100 s) -test: T2 = 100 ms Testing a hundred milliseconds (default: 100 ms) -test: T3 = 100 m Testing a hundred minutes (default: 100 m) -test: T4 = 100 Testing a hundred potatoes (default: 100) -test: T2147483647 = 4294967295 m Very large (default: 4294967295 m) -test: X23 = 239471 s Negative T number (default: 239471 s) -test: T30 = 60 s Testing range min (default: 50 s, range: [20 .. inf]) -test: T31 = 10 s Testing range max (default: 50 s, range: [0 .. 52]) -test: T32 = 40 s Testing range both (default: 50 s, range: [20 .. 52]) - -tdef_vty_test(config)# do show timer software -software: T1 = 30 m Write code (default: 30 m) -software: T2 = 20 ms Hit segfault (default: 20 ms) -software: T3 = 480 m Fix bugs (default: 480 m) - -tdef_vty_test(config)# do show timer software 1 -software: T1 = 30 m Write code (default: 30 m) - -tdef_vty_test(config)# do show timer software t1 -software: T1 = 30 m Write code (default: 30 m) - -tdef_vty_test(config)# do show timer software T1 -software: T1 = 30 m Write code (default: 30 m) - -tdef_vty_test(config)# do show timer software T99 -% No such timer: T99 - -tdef_vty_test(config)# do show timer software X123123 -% No such timer: X123123 - -tdef_vty_test(config)# do show timer software T-123123 -% Invalid T timer argument (should be 'T1234' or 'X1234'): 'T-123123' - -tdef_vty_test(config)# do show timer software T0 -% No such timer: T0 - -tdef_vty_test(config)# timer software 1 11 -tdef_vty_test(config)# timer software T1 -software: T1 = 11 m Write code (default: 30 m) - -tdef_vty_test(config)# timer software t1 12 -tdef_vty_test(config)# timer software T1 -software: T1 = 12 m Write code (default: 30 m) - -tdef_vty_test(config)# timer software T1 13 -tdef_vty_test(config)# timer software T2 0 -tdef_vty_test(config)# timer software -software: T1 = 13 m Write code (default: 30 m) -software: T2 = 0 ms Hit segfault (default: 20 ms) -software: T3 = 480 m Fix bugs (default: 480 m) - -tdef_vty_test(config)# timer softw -software: T1 = 13 m Write code (default: 30 m) -software: T2 = 0 ms Hit segfault (default: 20 ms) -software: T3 = 480 m Fix bugs (default: 480 m) - -tdef_vty_test(config)# timer softw T3 -software: T3 = 480 m Fix bugs (default: 480 m) - -tdef_vty_test(config)# timer softw T3 23 - -tdef_vty_test(config)# timer -tea: T1 = 50 s Water Boiling Timeout (default: 50 s) -tea: T2 = 300 s Tea brewing (default: 300 s) -tea: T3 = 32 m Let tea cool down before drinking (default: 5 m) -tea: T4 = 20 m Forgot to drink tea while it's warm (default: 20 m) -test: T1 = 100 s Testing a hundred seconds (default: 100 s) -test: T2 = 100 ms Testing a hundred milliseconds (default: 100 ms) -test: T3 = 100 m Testing a hundred minutes (default: 100 m) -test: T4 = 100 Testing a hundred potatoes (default: 100) -test: T2147483647 = 4294967295 m Very large (default: 4294967295 m) -test: X23 = 239471 s Negative T number (default: 239471 s) -test: T30 = 60 s Testing range min (default: 50 s, range: [20 .. inf]) -test: T31 = 10 s Testing range max (default: 50 s, range: [0 .. 52]) -test: T32 = 40 s Testing range both (default: 50 s, range: [20 .. 52]) -software: T1 = 13 m Write code (default: 30 m) -software: T2 = 0 ms Hit segfault (default: 20 ms) -software: T3 = 23 m Fix bugs (default: 480 m) - -tdef_vty_test(config)# do show timer -tea: T1 = 50 s Water Boiling Timeout (default: 50 s) -tea: T2 = 300 s Tea brewing (default: 300 s) -tea: T3 = 32 m Let tea cool down before drinking (default: 5 m) -tea: T4 = 20 m Forgot to drink tea while it's warm (default: 20 m) -test: T1 = 100 s Testing a hundred seconds (default: 100 s) -test: T2 = 100 ms Testing a hundred milliseconds (default: 100 ms) -test: T3 = 100 m Testing a hundred minutes (default: 100 m) -test: T4 = 100 Testing a hundred potatoes (default: 100) -test: T2147483647 = 4294967295 m Very large (default: 4294967295 m) -test: X23 = 239471 s Negative T number (default: 239471 s) -test: T30 = 60 s Testing range min (default: 50 s, range: [20 .. inf]) -test: T31 = 10 s Testing range max (default: 50 s, range: [0 .. 52]) -test: T32 = 40 s Testing range both (default: 50 s, range: [20 .. 52]) -software: T1 = 13 m Write code (default: 30 m) -software: T2 = 0 ms Hit segfault (default: 20 ms) -software: T3 = 23 m Fix bugs (default: 480 m) - -tdef_vty_test(config)# show running-config -... !timer -timer tea T3 32 -timer test T30 60 -timer test T31 10 -timer test T32 40 -timer software T1 13 -timer software T2 0 -timer software T3 23 -... !timer - -tdef_vty_test(config)# timer tea T3 default -tdef_vty_test(config)# timer software T1 default -tdef_vty_test(config)# show running-config -... !timer -timer test T30 60 -timer test T31 10 -timer test T32 40 -timer software T2 0 -timer software T3 23 -... !timer - -tdef_vty_test(config)# timer softw 2 default -tdef_vty_test(config)# timer software 2 default -tdef_vty_test(config)# show running-config -... !timer -timer test T30 60 -timer test T31 10 -timer test T32 40 -timer software T3 23 -... !timer diff -Nru libosmocore-1.6.0/tests/tdef/tdef_vty_test_config_subnode.c libosmocore-1.7.0/tests/tdef/tdef_vty_test_config_subnode.c --- libosmocore-1.6.0/tests/tdef/tdef_vty_test_config_subnode.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/tests/tdef/tdef_vty_test_config_subnode.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,288 +0,0 @@ -/* Test implementation for osmo_tdef VTY configuration API. */ -/* - * (C) 2019 by sysmocom s.f.m.c. GmbH - * - * All Rights Reserved - * - * SPDX-License-Identifier: GPL-2.0+ - * - * Author: Neels Hofmeyr - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * 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. - */ - -#define _GNU_SOURCE -#include -#include -#include -#include - -#include - -#include -#include -#include - -#include -#include - -#include - -#include "config.h" - -/* ------------------- HERE IS THE INTERESTING TDEF RELEVANT PART ------------------- */ - -/* This example keeps a single global timer group and offers a custom 'timer' VTY command in a 'network' subnode below - * the CONFIG_NODE. - * the tdef_vty_test_config_subnode.vty transcript test. - */ - -static struct osmo_tdef global_tdefs[] = { - { .T=1, .default_val=100, .desc="Testing a hundred seconds" }, // default is .unit=OSMO_TDEF_S == 0 - { .T=2, .default_val=100, .unit=OSMO_TDEF_MS, .desc="Testing a hundred milliseconds" }, - { .T=3, .default_val=100, .unit=OSMO_TDEF_M, .desc="Testing a hundred minutes" }, - { .T=4, .default_val=100, .unit=OSMO_TDEF_CUSTOM, .desc="Testing a hundred potatoes" }, - { .T=0x7fffffff, .default_val=0xffffffff, .unit=OSMO_TDEF_M, .desc="Very large" }, - { .T=-23, .default_val=239471, .desc="Negative T number" }, - {} // <-- important! last entry shall be zero -}; - -enum tdef_vty_test_nodes { - GSMNET_NODE = _LAST_OSMOVTY_NODE + 1, -}; - -/* This example offers 'timer T123' commands within an "unrelated" already existing subnode. */ -static struct cmd_node gsmnet_node = { - GSMNET_NODE, - "%s(config-net)# ", - 1, -}; - -DEFUN(show_timer, show_timer_cmd, - "show timer " OSMO_TDEF_VTY_ARG_T_OPTIONAL, - SHOW_STR "Show timers\n" - OSMO_TDEF_VTY_DOC_T) -{ - const char *T_arg = argc > 0 ? argv[0] : NULL; - return osmo_tdef_vty_show_cmd(vty, global_tdefs, T_arg, NULL); -} - -DEFUN(cfg_net_timer, cfg_net_timer_cmd, - "timer " OSMO_TDEF_VTY_ARG_SET_OPTIONAL, - "Configure or show timers\n" - OSMO_TDEF_VTY_DOC_SET) -{ - /* If any arguments are missing, redirect to 'show' */ - if (argc < 2) - return show_timer(self, vty, argc, argv); - return osmo_tdef_vty_set_cmd(vty, global_tdefs, argv); -} - -DEFUN(cfg_net, cfg_net_cmd, - "network", "Enter network node\n") -{ - vty->node = GSMNET_NODE; - return CMD_SUCCESS; -} - -static int config_write_gsmnet(struct vty *vty) -{ - vty_out(vty, "net%s", VTY_NEWLINE); - /* usually, here would be the output of any other 'net' config items... */ - - osmo_tdef_vty_write(vty, global_tdefs, " timer "); - return CMD_SUCCESS; -} - -static void gsmnet_init_vty() -{ - install_node(&gsmnet_node, config_write_gsmnet); - install_element(CONFIG_NODE, &cfg_net_cmd); - - osmo_tdefs_reset(global_tdefs); - install_element_ve(&show_timer_cmd); - install_element(GSMNET_NODE, &cfg_net_timer_cmd); -} - -/* ------------------- THE REST is just boilerplate osmo main() ------------------- */ - -void *root_ctx = NULL; - -static void print_help() -{ - printf( "options:\n" - " -h --help this text\n" - " -d --debug MASK Enable debugging (e.g. -d DRSL:DOML:DLAPDM)\n" - " -D --daemonize For the process into a background daemon\n" - " -c --config-file Specify the filename of the config file\n" - " -s --disable-color Don't use colors in stderr log output\n" - " -T --timestamp Prefix every log line with a timestamp\n" - " -V --version Print version information and exit\n" - " -e --log-level Set a global log-level\n" - ); -} - -static struct { - const char *config_file; - int daemonize; -} cmdline_config = {}; - -static void handle_options(int argc, char **argv) -{ - while (1) { - int option_idx = 0, c; - static const struct option long_options[] = { - { "help", 0, 0, 'h' }, - { "debug", 1, 0, 'd' }, - { "daemonize", 0, 0, 'D' }, - { "config-file", 1, 0, 'c' }, - { "disable-color", 0, 0, 's' }, - { "timestamp", 0, 0, 'T' }, - { "version", 0, 0, 'V' }, - { "log-level", 1, 0, 'e' }, - {} - }; - - c = getopt_long(argc, argv, "hc:d:Dc:sTVe:", - long_options, &option_idx); - if (c == -1) - break; - - switch (c) { - case 'h': - print_help(); - exit(0); - case 's': - log_set_use_color(osmo_stderr_target, 0); - break; - case 'd': - log_parse_category_mask(osmo_stderr_target, optarg); - break; - case 'D': - cmdline_config.daemonize = 1; - break; - case 'c': - cmdline_config.config_file = optarg; - break; - case 'T': - log_set_print_timestamp(osmo_stderr_target, 1); - break; - case 'e': - log_set_log_level(osmo_stderr_target, atoi(optarg)); - break; - case 'V': - print_version(1); - exit(0); - break; - default: - /* catch unknown options *as well as* missing arguments. */ - fprintf(stderr, "Error in command line options. Exiting.\n"); - exit(-1); - } - } -} - -static int quit = 0; - -static void signal_handler(int signal) -{ - fprintf(stdout, "signal %u received\n", signal); - - switch (signal) { - case SIGINT: - case SIGTERM: - quit++; - break; - case SIGABRT: - osmo_generate_backtrace(); - /* in case of abort, we want to obtain a talloc report - * and then return to the caller, who will abort the process */ - case SIGUSR1: - talloc_report(tall_vty_ctx, stderr); - talloc_report_full(root_ctx, stderr); - break; - case SIGUSR2: - talloc_report_full(tall_vty_ctx, stderr); - break; - default: - break; - } -} - -static struct vty_app_info vty_info = { - .name = "tdef_vty_test", - .version = PACKAGE_VERSION, -}; - -static const struct log_info_cat default_categories[] = {}; - -const struct log_info log_info = { - .cat = default_categories, - .num_cat = ARRAY_SIZE(default_categories), -}; - -int main(int argc, char **argv) -{ - int rc; - - root_ctx = talloc_named_const(NULL, 0, "tdef_vty_test"); - - osmo_init_logging2(root_ctx, &log_info); - - vty_info.tall_ctx = root_ctx; - vty_init(&vty_info); - osmo_talloc_vty_add_cmds(); - - gsmnet_init_vty(); /* <--- relevant init for this example */ - - handle_options(argc, argv); - - if (cmdline_config.config_file) { - rc = vty_read_config_file(cmdline_config.config_file, NULL); - if (rc < 0) { - fprintf(stderr, "Failed to parse the config file: '%s'\n", cmdline_config.config_file); - return 1; - } - } - - rc = telnet_init_dynif(root_ctx, NULL, vty_get_bind_addr(), 42042); - if (rc < 0) - return 2; - - signal(SIGINT, &signal_handler); - signal(SIGTERM, &signal_handler); - signal(SIGABRT, &signal_handler); - signal(SIGUSR1, &signal_handler); - signal(SIGUSR2, &signal_handler); - osmo_init_ignore_signals(); - - if (cmdline_config.daemonize) { - rc = osmo_daemonize(); - if (rc < 0) { - perror("Error during daemonize"); - return 6; - } - } - - while (!quit) { - log_reset_context(); - osmo_select_main(0); - } - - talloc_free(root_ctx); - talloc_free(tall_vty_ctx); - - return 0; -} diff -Nru libosmocore-1.6.0/tests/tdef/tdef_vty_test_config_subnode.vty libosmocore-1.7.0/tests/tdef/tdef_vty_test_config_subnode.vty --- libosmocore-1.6.0/tests/tdef/tdef_vty_test_config_subnode.vty 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/tests/tdef/tdef_vty_test_config_subnode.vty 1970-01-01 00:00:00.000000000 +0000 @@ -1,128 +0,0 @@ -tdef_vty_test> list -... !timer - show timer [TNNNN] -... !timer - -tdef_vty_test> show timer ? - [TNNNN] T- or X-timer-number -- 3GPP compliant timer number of the format '1234' or 'T1234' or 't1234'; Osmocom-specific timer number of the format: 'X1234' or 'x1234'. - -tdef_vty_test> show timer -T1 = 100 s Testing a hundred seconds (default: 100 s) -T2 = 100 ms Testing a hundred milliseconds (default: 100 ms) -T3 = 100 m Testing a hundred minutes (default: 100 m) -T4 = 100 Testing a hundred potatoes (default: 100) -T2147483647 = 4294967295 m Very large (default: 4294967295 m) -X23 = 239471 s Negative T number (default: 239471 s) - -tdef_vty_test> enable -tdef_vty_test# show timer -T1 = 100 s Testing a hundred seconds (default: 100 s) -T2 = 100 ms Testing a hundred milliseconds (default: 100 ms) -T3 = 100 m Testing a hundred minutes (default: 100 m) -T4 = 100 Testing a hundred potatoes (default: 100) -T2147483647 = 4294967295 m Very large (default: 4294967295 m) -X23 = 239471 s Negative T number (default: 239471 s) - -tdef_vty_test# configure terminal -tdef_vty_test(config)# show running-config -... !timer - -tdef_vty_test(config)# network - -tdef_vty_test(config-net)# do show timer -T1 = 100 s Testing a hundred seconds (default: 100 s) -T2 = 100 ms Testing a hundred milliseconds (default: 100 ms) -T3 = 100 m Testing a hundred minutes (default: 100 m) -T4 = 100 Testing a hundred potatoes (default: 100) -T2147483647 = 4294967295 m Very large (default: 4294967295 m) -X23 = 239471 s Negative T number (default: 239471 s) - -tdef_vty_test(config-net)# do show timer T3 -T3 = 100 m Testing a hundred minutes (default: 100 m) -tdef_vty_test(config-net)# do show timer 3 -T3 = 100 m Testing a hundred minutes (default: 100 m) -tdef_vty_test(config-net)# do show timer t3 -T3 = 100 m Testing a hundred minutes (default: 100 m) - -tdef_vty_test(config-net)# timer T1 5 -tdef_vty_test(config-net)# timer T1 -T1 = 5 s Testing a hundred seconds (default: 100 s) - -tdef_vty_test(config-net)# timer t1 678 -tdef_vty_test(config-net)# timer T1 -T1 = 678 s Testing a hundred seconds (default: 100 s) - -tdef_vty_test(config-net)# timer 1 9012345 -tdef_vty_test(config-net)# timer T1 -T1 = 9012345 s Testing a hundred seconds (default: 100 s) - -tdef_vty_test(config-net)# do show timer T666 -% No such timer: T666 -tdef_vty_test(config-net)# do show timer t666 -% No such timer: T666 -tdef_vty_test(config-net)# do show timer 666 -% No such timer: T666 - -tdef_vty_test(config-net)# timer T666 -% No such timer: T666 -tdef_vty_test(config-net)# timer t666 -% No such timer: T666 -tdef_vty_test(config-net)# timer 666 -% No such timer: T666 - -tdef_vty_test(config-net)# timer T666 5 -% No such timer: T666 - -tdef_vty_test(config-net)# timer X23 42 -tdef_vty_test(config-net)# timer X23 -X23 = 42 s Negative T number (default: 239471 s) - -tdef_vty_test(config-net)# timer x23 43 -tdef_vty_test(config-net)# timer x23 -X23 = 43 s Negative T number (default: 239471 s) - -tdef_vty_test(config-net)# do show timer -T1 = 9012345 s Testing a hundred seconds (default: 100 s) -T2 = 100 ms Testing a hundred milliseconds (default: 100 ms) -T3 = 100 m Testing a hundred minutes (default: 100 m) -T4 = 100 Testing a hundred potatoes (default: 100) -T2147483647 = 4294967295 m Very large (default: 4294967295 m) -X23 = 43 s Negative T number (default: 239471 s) - -tdef_vty_test(config-net)# timer T-23 42 -% Invalid T timer argument (should be 'T1234' or 'X1234'): 'T-23' -tdef_vty_test(config-net)# timer T-23 -% Invalid T timer argument (should be 'T1234' or 'X1234'): 'T-23' - -tdef_vty_test(config-net)# timer t-23 42 -% Invalid T timer argument (should be 'T1234' or 'X1234'): 't-23' -tdef_vty_test(config-net)# timer t-23 -% Invalid T timer argument (should be 'T1234' or 'X1234'): 't-23' - -tdef_vty_test(config-net)# timer X-23 42 -% Invalid T timer argument (should be 'T1234' or 'X1234'): 'X-23' -tdef_vty_test(config-net)# timer X-23 -% Invalid T timer argument (should be 'T1234' or 'X1234'): 'X-23' - -tdef_vty_test(config-net)# timer x-23 42 -% Invalid T timer argument (should be 'T1234' or 'X1234'): 'x-23' -tdef_vty_test(config-net)# timer x-23 -% Invalid T timer argument (should be 'T1234' or 'X1234'): 'x-23' - -tdef_vty_test(config-net)# timer -23 42 -% Invalid T timer argument (should be 'T1234' or 'X1234'): '-23' -tdef_vty_test(config-net)# timer -23 -% Invalid T timer argument (should be 'T1234' or 'X1234'): '-23' - -tdef_vty_test(config-net)# show running-config -... !timer -net - timer T1 9012345 - timer X23 43 -... !timer - -tdef_vty_test(config-net)# timer T1 default -tdef_vty_test(config-net)# timer X23 default - -tdef_vty_test(config-net)# show running-config -... !timer diff -Nru libosmocore-1.6.0/tests/tdef/tdef_vty_test_dynamic.c libosmocore-1.7.0/tests/tdef/tdef_vty_test_dynamic.c --- libosmocore-1.6.0/tests/tdef/tdef_vty_test_dynamic.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/tests/tdef/tdef_vty_test_dynamic.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,362 +0,0 @@ -/* Test implementation for osmo_tdef VTY configuration API. */ -/* - * (C) 2019 by sysmocom s.f.m.c. GmbH - * - * All Rights Reserved - * - * SPDX-License-Identifier: GPL-2.0+ - * - * Author: Neels Hofmeyr - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * 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. - */ - -#define _GNU_SOURCE -#include -#include -#include -#include - -#include - -#include -#include -#include - -#include -#include - -#include - -#include "config.h" - -void *root_ctx = NULL; - -/* ------------------- HERE IS THE INTERESTING TDEF RELEVANT PART ------------------- */ - -/* This example keeps a separate list of timers for each instance of a dynamically allocated instance of a VTY node, - * for example of keeping separate timers for each BTS in a BSC. - */ - -static const struct osmo_tdef bts_default_tdefs[] = { - { .T=1111, .default_val=2, .desc="Dynamic Duo" }, - { .T=2222, .default_val=1, .desc="BATMAN" }, - { .T=3333, .default_val=12, .desc="Dadadadadadadadadadadada" }, - { .T=4444, .default_val=500, .unit=OSMO_TDEF_MS, .desc="POW!" }, - {} -}; - - -/* Boilerplate dynamic VTY node ... */ - -enum tdef_vty_test_nodes { - MEMBER_NODE = _LAST_OSMOVTY_NODE + 1, -}; - -static struct cmd_node member_node = { - MEMBER_NODE, - "%s(config-member)# ", - 1, -}; - -struct member { - struct llist_head entry; - char name[23]; - struct osmo_tdef *tdefs; -}; - -LLIST_HEAD(all_members); - -struct member *member_alloc(const char *name) -{ - struct member *m = talloc_zero(root_ctx, struct member); - osmo_strlcpy(m->name, name, sizeof(m->name)); - - /* DYNAMIC TDEF COPIES */ - m->tdefs = (struct osmo_tdef*)talloc_size(m, sizeof(bts_default_tdefs)); - memcpy((char*)m->tdefs, (char*)&bts_default_tdefs, sizeof(bts_default_tdefs)); - osmo_tdefs_reset(m->tdefs); - - llist_add_tail(&m->entry, &all_members); - return m; -} - -struct member *member_find(const char *name) -{ - struct member *m; - llist_for_each_entry(m, &all_members, entry) { - if (!strcmp(m->name, name)) - return m; - } - return NULL; -} - -DEFUN(cfg_member, cfg_member_cmd, - "member NAME", - "Enter member node\n" "Existing or new member node name\n") -{ - const char *name = argv[0]; - struct member *m = member_find(name); - if (!m) - m = member_alloc(name); - vty->index = m; - vty->node = MEMBER_NODE; - return CMD_SUCCESS; -} - - -/* TDEF SPECIFIC VTY */ - -static bool startswith(const char *str, const char *startswith_str) -{ - if (!startswith_str) - return true; - if (!str) - return false; - return strncmp(str, startswith_str, strlen(startswith_str)) == 0; -} - -DEFUN(show_timer, show_member_timer_cmd, - "show member-timer [NAME] " OSMO_TDEF_VTY_ARG_T_OPTIONAL, - SHOW_STR "Show timers for a specific member" "member name\n" - OSMO_TDEF_VTY_DOC_T) -{ - const char *name = argc > 0 ? argv[0] : NULL; - struct member *m; - const char *T_arg = argc > 1 ? argv[1] : NULL; - int shown = 0; - - llist_for_each_entry(m, &all_members, entry) { - if (!name || startswith(m->name, name)) { - osmo_tdef_vty_show_cmd(vty, m->tdefs, T_arg, "%11s: ", m->name); - shown ++; - } - } - if (!shown) { - vty_out(vty, "%% No such member: %s%s", name ? : "(none)", VTY_NEWLINE); - return CMD_WARNING; - } - return CMD_SUCCESS; -} - -DEFUN(cfg_member_timer, cfg_member_timer_cmd, - "timer " OSMO_TDEF_VTY_ARG_SET_OPTIONAL, - "Configure or show timers for this member\n" - OSMO_TDEF_VTY_DOC_SET) -{ - struct member *m = vty->index; - - if (!m || !m->tdefs) { - vty_out(vty, "%% No timers here%s", VTY_NEWLINE); - return CMD_WARNING; - } - - /* If any arguments are missing, redirect to 'show' */ - if (argc < 2) { - const char *T_arg = argc > 0 ? argv[0] : NULL; - return osmo_tdef_vty_show_cmd(vty, m->tdefs, T_arg, "%11s: ", m->name); - } - - return osmo_tdef_vty_set_cmd(vty, m->tdefs, argv); -} - -static int config_write_member(struct vty *vty) -{ - struct member *m; - llist_for_each_entry(m, &all_members, entry) { - vty_out(vty, "member %s%s", m->name, VTY_NEWLINE); - osmo_tdef_vty_write(vty, m->tdefs, " timer "); - } - - return CMD_SUCCESS; -} - -static void member_init_vty() -{ - install_node(&member_node, config_write_member); - install_element(CONFIG_NODE, &cfg_member_cmd); - - install_element_ve(&show_member_timer_cmd); - install_element(MEMBER_NODE, &cfg_member_timer_cmd); -} - -/* ------------------- THE REST is just boilerplate osmo main() ------------------- */ - -static void print_help() -{ - printf( "options:\n" - " -h --help this text\n" - " -d --debug MASK Enable debugging (e.g. -d DRSL:DOML:DLAPDM)\n" - " -D --daemonize For the process into a background daemon\n" - " -c --config-file Specify the filename of the config file\n" - " -s --disable-color Don't use colors in stderr log output\n" - " -T --timestamp Prefix every log line with a timestamp\n" - " -V --version Print version information and exit\n" - " -e --log-level Set a global log-level\n" - ); -} - -static struct { - const char *config_file; - int daemonize; -} cmdline_config = {}; - -static void handle_options(int argc, char **argv) -{ - while (1) { - int option_idx = 0, c; - static const struct option long_options[] = { - { "help", 0, 0, 'h' }, - { "debug", 1, 0, 'd' }, - { "daemonize", 0, 0, 'D' }, - { "config-file", 1, 0, 'c' }, - { "disable-color", 0, 0, 's' }, - { "timestamp", 0, 0, 'T' }, - { "version", 0, 0, 'V' }, - { "log-level", 1, 0, 'e' }, - {} - }; - - c = getopt_long(argc, argv, "hc:d:Dc:sTVe:", - long_options, &option_idx); - if (c == -1) - break; - - switch (c) { - case 'h': - print_help(); - exit(0); - case 's': - log_set_use_color(osmo_stderr_target, 0); - break; - case 'd': - log_parse_category_mask(osmo_stderr_target, optarg); - break; - case 'D': - cmdline_config.daemonize = 1; - break; - case 'c': - cmdline_config.config_file = optarg; - break; - case 'T': - log_set_print_timestamp(osmo_stderr_target, 1); - break; - case 'e': - log_set_log_level(osmo_stderr_target, atoi(optarg)); - break; - case 'V': - print_version(1); - exit(0); - break; - default: - /* catch unknown options *as well as* missing arguments. */ - fprintf(stderr, "Error in command line options. Exiting.\n"); - exit(-1); - } - } -} - -static int quit = 0; - -static void signal_handler(int signal) -{ - fprintf(stdout, "signal %u received\n", signal); - - switch (signal) { - case SIGINT: - case SIGTERM: - quit++; - break; - case SIGABRT: - osmo_generate_backtrace(); - /* in case of abort, we want to obtain a talloc report - * and then return to the caller, who will abort the process */ - case SIGUSR1: - talloc_report(tall_vty_ctx, stderr); - talloc_report_full(root_ctx, stderr); - break; - case SIGUSR2: - talloc_report_full(tall_vty_ctx, stderr); - break; - default: - break; - } -} - -static struct vty_app_info vty_info = { - .name = "tdef_vty_test", - .version = PACKAGE_VERSION, -}; - -static const struct log_info_cat default_categories[] = {}; - -const struct log_info log_info = { - .cat = default_categories, - .num_cat = ARRAY_SIZE(default_categories), -}; - -int main(int argc, char **argv) -{ - int rc; - - root_ctx = talloc_named_const(NULL, 0, "tdef_vty_test"); - - osmo_init_logging2(root_ctx, &log_info); - - vty_info.tall_ctx = root_ctx; - vty_init(&vty_info); - osmo_talloc_vty_add_cmds(); - - member_init_vty(); /* <--- relevant init for this example */ - - handle_options(argc, argv); - - if (cmdline_config.config_file) { - rc = vty_read_config_file(cmdline_config.config_file, NULL); - if (rc < 0) { - fprintf(stderr, "Failed to parse the config file: '%s'\n", cmdline_config.config_file); - return 1; - } - } - - rc = telnet_init_dynif(root_ctx, NULL, vty_get_bind_addr(), 42042); - if (rc < 0) - return 2; - - signal(SIGINT, &signal_handler); - signal(SIGTERM, &signal_handler); - signal(SIGABRT, &signal_handler); - signal(SIGUSR1, &signal_handler); - signal(SIGUSR2, &signal_handler); - osmo_init_ignore_signals(); - - if (cmdline_config.daemonize) { - rc = osmo_daemonize(); - if (rc < 0) { - perror("Error during daemonize"); - return 6; - } - } - - while (!quit) { - log_reset_context(); - osmo_select_main(0); - } - - talloc_free(root_ctx); - talloc_free(tall_vty_ctx); - - return 0; -} diff -Nru libosmocore-1.6.0/tests/tdef/tdef_vty_test_dynamic.vty libosmocore-1.7.0/tests/tdef/tdef_vty_test_dynamic.vty --- libosmocore-1.6.0/tests/tdef/tdef_vty_test_dynamic.vty 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/tests/tdef/tdef_vty_test_dynamic.vty 1970-01-01 00:00:00.000000000 +0000 @@ -1,83 +0,0 @@ -tdef_vty_test> list -... - show member-timer [NAME] [TNNNN] -... - -tdef_vty_test> enable -tdef_vty_test# configure terminal - -tdef_vty_test(config)# member robin -tdef_vty_test(config-member)# timer - robin: T1111 = 2 s Dynamic Duo (default: 2 s) - robin: T2222 = 1 s BATMAN (default: 1 s) - robin: T3333 = 12 s Dadadadadadadadadadadada (default: 12 s) - robin: T4444 = 500 ms POW! (default: 500 ms) - -tdef_vty_test(config-member)# timer T2222 423 -tdef_vty_test(config-member)# timer T2222 - robin: T2222 = 423 s BATMAN (default: 1 s) - -tdef_vty_test(config-member)# timer - robin: T1111 = 2 s Dynamic Duo (default: 2 s) - robin: T2222 = 423 s BATMAN (default: 1 s) - robin: T3333 = 12 s Dadadadadadadadadadadada (default: 12 s) - robin: T4444 = 500 ms POW! (default: 500 ms) - -tdef_vty_test(config-member)# do show member-timer - robin: T1111 = 2 s Dynamic Duo (default: 2 s) - robin: T2222 = 423 s BATMAN (default: 1 s) - robin: T3333 = 12 s Dadadadadadadadadadadada (default: 12 s) - robin: T4444 = 500 ms POW! (default: 500 ms) - -tdef_vty_test(config-member)# exit - -tdef_vty_test(config)# member batman -tdef_vty_test(config-member)# timer 3333 17 -tdef_vty_test(config-member)# timer 3333 - batman: T3333 = 17 s Dadadadadadadadadadadada (default: 12 s) - -tdef_vty_test(config-member)# show running-config - -Current configuration: -... -member robin - timer T2222 423 -member batman - timer T3333 17 -... - -tdef_vty_test(config-member)# timer 3333 default - -tdef_vty_test(config-member)# show running-config -... -member robin - timer T2222 423 -member batman -... !timer - -tdef_vty_test(config-member)# exit -tdef_vty_test(config)# exit -tdef_vty_test# show member-timer - robin: T1111 = 2 s Dynamic Duo (default: 2 s) - robin: T2222 = 423 s BATMAN (default: 1 s) - robin: T3333 = 12 s Dadadadadadadadadadadada (default: 12 s) - robin: T4444 = 500 ms POW! (default: 500 ms) - batman: T1111 = 2 s Dynamic Duo (default: 2 s) - batman: T2222 = 1 s BATMAN (default: 1 s) - batman: T3333 = 12 s Dadadadadadadadadadadada (default: 12 s) - batman: T4444 = 500 ms POW! (default: 500 ms) - -tdef_vty_test# show member-timer batman - batman: T1111 = 2 s Dynamic Duo (default: 2 s) - batman: T2222 = 1 s BATMAN (default: 1 s) - batman: T3333 = 12 s Dadadadadadadadadadadada (default: 12 s) - batman: T4444 = 500 ms POW! (default: 500 ms) - -tdef_vty_test# show member-timer robin - robin: T1111 = 2 s Dynamic Duo (default: 2 s) - robin: T2222 = 423 s BATMAN (default: 1 s) - robin: T3333 = 12 s Dadadadadadadadadadadada (default: 12 s) - robin: T4444 = 500 ms POW! (default: 500 ms) - -tdef_vty_test# show member-timer joker -% No such member: joker diff -Nru libosmocore-1.6.0/tests/testsuite.at libosmocore-1.7.0/tests/testsuite.at --- libosmocore-1.6.0/tests/testsuite.at 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/tests/testsuite.at 2022-06-28 15:00:51.000000000 +0000 @@ -36,7 +36,7 @@ AT_SETUP([bitvec]) AT_KEYWORDS([bitvec]) cat $abs_srcdir/bitvec/bitvec_test.ok > expout -AT_CHECK([$abs_top_builddir/tests/bitvec/bitvec_test], [0], [expout], [ignore]) +AT_CHECK([$abs_top_builddir/tests/bitvec/bitvec_test], [0], [expout]) AT_CLEANUP AT_SETUP([bitcomp]) @@ -168,11 +168,18 @@ AT_CHECK([$abs_top_builddir/tests/gprs/gprs_test], [0], [expout], [ignore]) AT_CLEANUP -AT_SETUP([logging]) -AT_KEYWORDS([logging]) +AT_SETUP([logging_stream]) +AT_KEYWORDS([logging_stream]) cat $abs_srcdir/logging/logging_test.ok > expout cat $abs_srcdir/logging/logging_test.err > experr -AT_CHECK([$abs_top_builddir/tests/logging/logging_test], [0], [expout], [experr]) +AT_CHECK([$abs_top_builddir/tests/logging/logging_test stream], [0], [expout], [experr]) +AT_CLEANUP + +AT_SETUP([logging_wqueue]) +AT_KEYWORDS([logging_wqueue]) +cat $abs_srcdir/logging/logging_test.ok > expout +cat $abs_srcdir/logging/logging_test.err > experr +AT_CHECK([$abs_top_builddir/tests/logging/logging_test wqueue], [0], [expout], [experr]) AT_CLEANUP AT_SETUP([codec]) @@ -458,3 +465,9 @@ cat $abs_srcdir/time_cc/time_cc_test.ok > expout AT_CHECK([$abs_top_builddir/tests/time_cc/time_cc_test], [0], [expout], [ignore]) AT_CLEANUP + +AT_SETUP([iuup]) +AT_KEYWORDS([iuup]) +cat $abs_srcdir/iuup/iuup_test.ok > expout +AT_CHECK([$abs_top_builddir/tests/iuup/iuup_test], [0], [expout], [ignore]) +AT_CLEANUP diff -Nru libosmocore-1.6.0/tests/timer/clk_override_test.c libosmocore-1.7.0/tests/timer/clk_override_test.c --- libosmocore-1.6.0/tests/timer/clk_override_test.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/tests/timer/clk_override_test.c 2022-06-28 15:00:51.000000000 +0000 @@ -16,10 +16,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 diff -Nru libosmocore-1.6.0/tests/timer/timer_test.c libosmocore-1.7.0/tests/timer/timer_test.c --- libosmocore-1.6.0/tests/timer/timer_test.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/tests/timer/timer_test.c 2022-06-28 15:00:51.000000000 +0000 @@ -16,10 +16,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 diff -Nru libosmocore-1.6.0/tests/use_count/use_count_test.c libosmocore-1.7.0/tests/use_count/use_count_test.c --- libosmocore-1.6.0/tests/use_count/use_count_test.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/tests/use_count/use_count_test.c 2022-06-28 15:00:51.000000000 +0000 @@ -17,10 +17,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * 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 diff -Nru libosmocore-1.6.0/tests/use_count/use_count_test.err libosmocore-1.7.0/tests/use_count/use_count_test.err --- libosmocore-1.6.0/tests/use_count/use_count_test.err 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/tests/use_count/use_count_test.err 2022-06-28 15:00:51.000000000 +0000 @@ -11,9 +11,9 @@ 3 foos A few gets and puts, logging source file information -DFOO NOTICE foo(a){IN_USE}: a +1 barring: now used by 1 (barring) (use_count_test.c:223) -DFOO NOTICE foo(b){IN_USE}: b +1 barring: now used by 1 (barring) (use_count_test.c:225) -DFOO NOTICE foo(b){IN_USE}: b +1 fighting: now used by 2 (barring,fighting) (use_count_test.c:226) +DFOO NOTICE foo(a){IN_USE}: a +1 barring: now used by 1 (barring) (use_count_test.c:219) +DFOO NOTICE foo(b){IN_USE}: b +1 barring: now used by 1 (barring) (use_count_test.c:221) +DFOO NOTICE foo(b){IN_USE}: b +1 fighting: now used by 2 (barring,fighting) (use_count_test.c:222) all use counts: a: 1 (barring) @@ -22,7 +22,7 @@ 3 foos Attempt to get more than one on limited 'barring' user: -DFOO ERROR foo(b){IN_USE}: Attempt to get more than one barring (use_count_test.c:231) +DFOO ERROR foo(b){IN_USE}: Attempt to get more than one barring (use_count_test.c:227) osmo_use_count_get_put(b, barring, 1) returned error: -34 Numerical result out of range all use counts: @@ -32,7 +32,7 @@ 3 foos Put away one user of b -DFOO NOTICE foo(b){IN_USE}: b -1 barring: now used by 1 (fighting) (use_count_test.c:235) +DFOO NOTICE foo(b){IN_USE}: b -1 barring: now used by 1 (fighting) (use_count_test.c:231) all use counts: a: 1 (barring) diff -Nru libosmocore-1.6.0/tests/ussd/ussd_test.c libosmocore-1.7.0/tests/ussd/ussd_test.c --- libosmocore-1.6.0/tests/ussd/ussd_test.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/tests/ussd/ussd_test.c 2022-06-28 15:00:51.000000000 +0000 @@ -13,10 +13,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 diff -Nru libosmocore-1.6.0/tests/utils/utils_test.c libosmocore-1.7.0/tests/utils/utils_test.c --- libosmocore-1.6.0/tests/utils/utils_test.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/tests/utils/utils_test.c 2022-06-28 15:00:51.000000000 +0000 @@ -14,10 +14,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 diff -Nru libosmocore-1.6.0/tests/vty/vty_test.c libosmocore-1.7.0/tests/vty/vty_test.c --- libosmocore-1.6.0/tests/vty/vty_test.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/tests/vty/vty_test.c 2022-06-28 15:00:51.000000000 +0000 @@ -13,10 +13,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 @@ -542,9 +538,9 @@ /* Reserved for libraries */ [VTY_TEST_ATTR_UPPER] = 'X', /* Reserved for global attribues */ - [VTY_TEST_ATTR_RAFC_DOT] '.', - [VTY_TEST_ATTR_RAFC_EXCL] '!', - [VTY_TEST_ATTR_RAFC_AT] '@', + [VTY_TEST_ATTR_RAFC_DOT] = '.', + [VTY_TEST_ATTR_RAFC_EXCL] = '!', + [VTY_TEST_ATTR_RAFC_AT] = '@', }, }; diff -Nru libosmocore-1.6.0/tests/vty/vty_transcript_test.c libosmocore-1.7.0/tests/vty/vty_transcript_test.c --- libosmocore-1.6.0/tests/vty/vty_transcript_test.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/tests/vty/vty_transcript_test.c 2022-06-28 15:00:51.000000000 +0000 @@ -17,10 +17,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * 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. */ #define _GNU_SOURCE diff -Nru libosmocore-1.6.0/utils/conv_gen.py libosmocore-1.7.0/utils/conv_gen.py --- libosmocore-1.6.0/utils/conv_gen.py 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/utils/conv_gen.py 2022-06-28 15:00:51.000000000 +0000 @@ -16,10 +16,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * 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. */ """ diff -Nru libosmocore-1.6.0/utils/osmo-arfcn.c libosmocore-1.7.0/utils/osmo-arfcn.c --- libosmocore-1.6.0/utils/osmo-arfcn.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/utils/osmo-arfcn.c 2022-06-28 15:00:51.000000000 +0000 @@ -15,10 +15,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 @@ -97,7 +93,7 @@ { int arfcn, freq, pcs = 0, uplink = -1; int opt; - char *param; + char *param = NULL; enum program_mode mode = MODE_NONE; while ((opt = getopt(argc, argv, "pa:f:udh")) != -1) { diff -Nru libosmocore-1.6.0/utils/osmo-auc-gen.c libosmocore-1.7.0/utils/osmo-auc-gen.c --- libosmocore-1.6.0/utils/osmo-auc-gen.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/utils/osmo-auc-gen.c 2022-06-28 15:00:51.000000000 +0000 @@ -15,10 +15,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. - * */ diff -Nru libosmocore-1.6.0/utils/osmo-config-merge.c libosmocore-1.7.0/utils/osmo-config-merge.c --- libosmocore-1.6.0/utils/osmo-config-merge.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/utils/osmo-config-merge.c 2022-06-28 15:00:51.000000000 +0000 @@ -15,10 +15,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. - * */ /* diff -Nru libosmocore-1.6.0/utils/osmo-ns-dummy-vty.c libosmocore-1.7.0/utils/osmo-ns-dummy-vty.c --- libosmocore-1.6.0/utils/osmo-ns-dummy-vty.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/utils/osmo-ns-dummy-vty.c 2022-06-28 15:00:51.000000000 +0000 @@ -21,7 +21,6 @@ * */ -#include #include #include #include @@ -30,6 +29,7 @@ #include +#include #include #include #include diff -Nru libosmocore-1.6.0/utils/osmo-sim-test.c libosmocore-1.7.0/utils/osmo-sim-test.c --- libosmocore-1.6.0/utils/osmo-sim-test.c 2021-11-16 12:08:23.000000000 +0000 +++ libosmocore-1.7.0/utils/osmo-sim-test.c 2022-06-28 15:00:51.000000000 +0000 @@ -12,10 +12,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