Projects
osmocom:latest
libosmo-netif
Log In
Username
Password
We truncated the diff of some files because they were too big. If you want to see the full diff for every file,
click here
.
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 4
View file
libosmo-netif.spec
Changed
@@ -14,30 +14,32 @@ Name: libosmo-netif Requires: osmocom-latest -Version: 1.2.0 +Version: 1.3.0 Release: 0 Summary: Osmocom library for muxed audio License: GPL-2.0-or-later Group: Productivity/Telephony/Utilities URL: https://osmocom.org/projects/libosmo-netif -Source: libosmo-netif_1.2.0.tar.xz +Source: libosmo-netif_1.3.0.tar.xz +Source1: rpmlintrc BuildRequires: automake BuildRequires: libtool >= 2 BuildRequires: lksctp-tools-devel BuildRequires: pkgconfig >= 0.20 -BuildRequires: pkgconfig(libosmocore) >= 1.7.0 -BuildRequires: pkgconfig(libosmogsm) >= 1.7.0 +BuildRequires: pkgconfig(libosmocore) >= 1.8.0 +BuildRequires: pkgconfig(libosmogsm) >= 1.8.0 +BuildRequires: pkgconfig(libosmocodec) >= 1.8.0 %description Network interface demuxer library for OsmoCom projects. -%package -n libosmonetif8 +%package -n libosmonetif11 Requires: osmocom-latest Summary: Osmocom library for muxed audio License: AGPL-3.0-or-later Group: System/Libraries -%description -n libosmonetif8 +%description -n libosmonetif11 Network interface demuxer library for OsmoCom projects. %package -n libosmonetif-devel @@ -45,7 +47,7 @@ Summary: Development files for the Osmocom muxed audio library License: AGPL-3.0-or-later Group: Development/Libraries/C and C++ -Requires: libosmonetif8 = %{version} +Requires: libosmonetif11 = %{version} %description -n libosmonetif-devel Network interface demuxer library for OsmoCom projects. @@ -54,7 +56,7 @@ applications that want to make use of libosmo-netif. %prep -%setup -q +%setup -n libosmo-netif -q %build echo "%{version}" >.tarball-version @@ -69,11 +71,11 @@ %check make %{?_smp_mflags} check || (find . -name testsuite.log -exec cat {} +) -%post -n libosmonetif8 -p /sbin/ldconfig -%postun -n libosmonetif8 -p /sbin/ldconfig +%post -n libosmonetif11 -p /sbin/ldconfig +%postun -n libosmonetif11 -p /sbin/ldconfig -%files -n libosmonetif8 -%{_libdir}/libosmonetif.so.8* +%files -n libosmonetif11 +%{_libdir}/libosmonetif.so.11* %files -n libosmonetif-devel %license COPYING
View file
libosmo-netif_1.2.0.tar.xz/tests/osmux/osmux_test2.c
Deleted
@@ -1,378 +0,0 @@ -/* (C) 2017 by sysmocom - s.f.m.c. GmbH <info@sysmocom.de> - * - * Author: Pau Espin Pedrol <pespin@sysmocom.de> - * - * 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. - */ - -#include <stdio.h> -#include <stdlib.h> -#include <stdbool.h> -#include <unistd.h> -#include <stdint.h> -#include <inttypes.h> -#include <string.h> -#include <signal.h> -#include <arpa/inet.h> -#include <sys/time.h> -#include <getopt.h> - -#include <osmocom/core/select.h> -#include <osmocom/core/application.h> -#include <osmocom/core/logging.h> -#include <osmocom/core/msgb.h> -#include <osmocom/netif/rtp.h> -#include <osmocom/netif/osmux.h> -#include <osmocom/netif/amr.h> - -static uint8_t osmux_next_seq; - -#define TIME_RTP_PKT_MS 20 -#define BATCH_FACTOR 6 -/* ----------------------------- */ - -/* Logging related stuff */ -#define INT2IDX(x) (-1*(x)-1) -struct log_info_cat jibuf_test_cat = { - INT2IDX(DLMUX) = { - .name = "DLMUX", - .description = "Osmocom Osmux", - .enabled = 1, .loglevel = LOGL_DEBUG, - }, -}; -const struct log_info log_info = { - .filter_fn = NULL, - .cat = jibuf_test_cat, - .num_cat = ARRAY_SIZE(jibuf_test_cat), -}; -/* ----------------------------- */ - -static void osmux_init(uint8_t seq) -{ - osmux_next_seq = seq; -} - -static struct msgb *osmux_new(uint8_t cid, uint8_t seq, uint8_t batch_factor) -{ - struct msgb *msg; - struct osmux_hdr *osmuxh; - - msg = msgb_alloc(1500, "test"); - if (!msg) - exit(EXIT_FAILURE); - msgb_put(msg, sizeof(struct osmux_hdr)); - - osmuxh = (struct osmux_hdr *)msg->data; - osmuxh->amr_q = 0; - osmuxh->amr_f = 0; - osmuxh->rtp_m = 0; - osmuxh->ctr = batch_factor - 1; - osmuxh->ft = 1; - osmuxh->seq = osmux_next_seq; - osmuxh->circuit_id = cid; - osmuxh->amr_ft = AMR_FT_2; /* 5.90 */ - osmuxh->amr_cmr = 0; - msgb_put(msg, osmo_amr_bytes(osmuxh->amr_ft)*batch_factor); - return msg; -} - -static struct msgb *osmux_next(void) -{ - osmux_next_seq++; - return osmux_new(0, osmux_next_seq, BATCH_FACTOR); -} - -static void sigalarm_handler(int foo) -{ - printf("FAIL: test did not run successfully\n"); - exit(EXIT_FAILURE); -} - - -static void clock_debug(char* str) -{ - struct timespec ts; - struct timeval tv; - osmo_clock_gettime(CLOCK_MONOTONIC, &ts); - osmo_gettimeofday(&tv, NULL); - printf("sys={%lu.%06lu}, mono={%lu.%06lu}: %s\n", - tv.tv_sec, tv.tv_usec, ts.tv_sec, ts.tv_nsec/1000, str); -} - -static void clock_override_enable(bool enable) -{ - osmo_gettimeofday_override = enable; - osmo_clock_override_enable(CLOCK_MONOTONIC, enable); -} - -static void clock_override_set(long sec, long usec) -{ - struct timespec *mono; - osmo_gettimeofday_override_time.tv_sec = sec; - osmo_gettimeofday_override_time.tv_usec = usec; - mono = osmo_clock_override_gettimespec(CLOCK_MONOTONIC); - mono->tv_sec = sec; - mono->tv_nsec = usec*1000; - - clock_debug("clock_override_set"); -} - -static void clock_override_add_debug(long sec, long usec, bool dbg) -{ - osmo_gettimeofday_override_add(sec, usec); - osmo_clock_override_add(CLOCK_MONOTONIC, sec, usec*1000); - if (dbg) - clock_debug("clock_override_add"); -} -#define clock_override_add(sec, usec) clock_override_add_debug(sec, usec, true) - -static void tx_cb(struct msgb *msg, void *data) -{ - struct osmux_out_handle *h_output = (struct osmux_out_handle *) data; - struct rtp_hdr *rtph; - char buf250; - rtph = osmo_rtp_get_hdr(msg); - snprintf(buf, sizeof(buf), "dequeue: seq=%"PRIu16" ts=%"PRIu32"%s enqueued=%u", - ntohs(rtph->sequence), ntohl(rtph->timestamp), rtph->marker ? " M" : "", - llist_count(&h_output->list)); - clock_debug(buf); - msgb_free(msg); -} - -#define PULL_NEXT(h_output) { \ - struct msgb *_msg; \ - struct osmux_hdr *_osmuxh; \ - int _rc; \ - _msg = osmux_next(); \ - _osmuxh = osmux_xfrm_output_pull(_msg); \ - OSMO_ASSERT(_osmuxh); \ - _rc = osmux_xfrm_output_sched((h_output), _osmuxh); \ - OSMO_ASSERT(_rc == _osmuxh->ctr+1); \ - } - -static void test_output_consecutive(void) -{ - struct osmux_out_handle h_output; - - printf("===test_output_consecutive===\n"); - - clock_override_enable(true); - clock_override_set(0, 0); - osmux_init(32); - osmux_xfrm_output_init2(&h_output, 0x7000000, 98); - h_output.rtp_seq = (uint16_t)50; - h_output.rtp_timestamp = (uint32_t)500; - osmux_xfrm_output_set_tx_cb(&h_output, tx_cb, &h_output); - - /* First osmux frame at t=0 */ - PULL_NEXT(&h_output); - clock_debug("first dequed before first select"); - osmo_select_main(0); - - clock_override_add(0, TIME_RTP_PKT_MS*1000); - clock_debug("second select, second dequed"); - osmo_select_main(0); - - clock_override_add(0, TIME_RTP_PKT_MS*1000); - clock_debug("third select, third dequed"); - osmo_select_main(0); - - clock_override_add(0, TIME_RTP_PKT_MS*1000); - clock_debug("fourth select, fourth dequed"); - osmo_select_main(0); - - clock_override_add(0, TIME_RTP_PKT_MS*1000); - clock_debug("fifth select, fifth dequed"); - osmo_select_main(0); - - clock_override_add(0, TIME_RTP_PKT_MS*1000); - clock_debug("sixth select, sixth dequed"); - osmo_select_main(0); - OSMO_ASSERT(llist_empty(&h_output.list)); - - /* Second osmux frame at t=80 */ - clock_debug("send second osmux frame");
View file
libosmo-netif_1.2.0.tar.xz/tests/osmux/osmux_test2.ok
Deleted
@@ -1,108 +0,0 @@ -===test_output_consecutive=== -sys={0.000000}, mono={0.000000}: clock_override_set -sys={0.000000}, mono={0.000000}: dequeue: seq=50 ts=500 M enqueued=5 -sys={0.000000}, mono={0.000000}: first dequed before first select -sys={0.020000}, mono={0.020000}: clock_override_add -sys={0.020000}, mono={0.020000}: second select, second dequed -sys={0.020000}, mono={0.020000}: dequeue: seq=51 ts=660 enqueued=4 -sys={0.040000}, mono={0.040000}: clock_override_add -sys={0.040000}, mono={0.040000}: third select, third dequed -sys={0.040000}, mono={0.040000}: dequeue: seq=52 ts=820 enqueued=3 -sys={0.060000}, mono={0.060000}: clock_override_add -sys={0.060000}, mono={0.060000}: fourth select, fourth dequed -sys={0.060000}, mono={0.060000}: dequeue: seq=53 ts=980 enqueued=2 -sys={0.080000}, mono={0.080000}: clock_override_add -sys={0.080000}, mono={0.080000}: fifth select, fifth dequed -sys={0.080000}, mono={0.080000}: dequeue: seq=54 ts=1140 enqueued=1 -sys={0.100000}, mono={0.100000}: clock_override_add -sys={0.100000}, mono={0.100000}: sixth select, sixth dequed -sys={0.100000}, mono={0.100000}: dequeue: seq=55 ts=1300 enqueued=0 -sys={0.100000}, mono={0.100000}: send second osmux frame -sys={0.100000}, mono={0.100000}: dequeue: seq=56 ts=1460 enqueued=5 -sys={0.100000}, mono={0.100000}: first dequed before first select -sys={0.120000}, mono={0.120000}: clock_override_add -sys={0.120000}, mono={0.120000}: second select, second dequed -sys={0.120000}, mono={0.120000}: dequeue: seq=57 ts=1620 enqueued=4 -sys={0.200000}, mono={0.200000}: clock_override_add -sys={0.200000}, mono={0.200000}: third select, four packet should be dequeued -sys={0.200000}, mono={0.200000}: dequeue: seq=58 ts=1780 enqueued=3 -sys={0.200000}, mono={0.200000}: dequeue: seq=59 ts=1940 enqueued=2 -sys={0.200000}, mono={0.200000}: dequeue: seq=60 ts=2100 enqueued=1 -sys={0.200000}, mono={0.200000}: dequeue: seq=61 ts=2260 enqueued=0 -sys={0.200000}, mono={0.200000}: calling flush on empty list, should do nothing -===test_output_interleaved=== -sys={0.000000}, mono={0.000000}: clock_override_set -sys={0.000000}, mono={0.000000}: dequeue: seq=50 ts=500 M enqueued=5 -sys={0.040000}, mono={0.040000}: clock_override_add -sys={0.040000}, mono={0.040000}: select, 3 dequed, 3 still queued -sys={0.040000}, mono={0.040000}: dequeue: seq=51 ts=660 enqueued=4 -sys={0.040000}, mono={0.040000}: dequeue: seq=52 ts=820 enqueued=3 -sys={0.040000}, mono={0.040000}: next frame arrives, 3 pending rtp packets are dequeued and first of new osmux frame too -sys={0.040000}, mono={0.040000}: dequeue: seq=53 ts=980 enqueued=8 -sys={0.040000}, mono={0.040000}: dequeue: seq=54 ts=1140 enqueued=7 -sys={0.040000}, mono={0.040000}: dequeue: seq=55 ts=1300 enqueued=6 -sys={0.040000}, mono={0.040000}: dequeue: seq=56 ts=1460 enqueued=5 -sys={0.140000}, mono={0.140000}: clock_override_add -sys={0.140000}, mono={0.140000}: calling select, then all should be out -sys={0.140000}, mono={0.140000}: dequeue: seq=57 ts=1620 enqueued=4 -sys={0.140000}, mono={0.140000}: dequeue: seq=58 ts=1780 enqueued=3 -sys={0.140000}, mono={0.140000}: dequeue: seq=59 ts=1940 enqueued=2 -sys={0.140000}, mono={0.140000}: dequeue: seq=60 ts=2100 enqueued=1 -sys={0.140000}, mono={0.140000}: dequeue: seq=61 ts=2260 enqueued=0 -===test_output_2together=== -sys={0.000000}, mono={0.000000}: clock_override_set -sys={0.000000}, mono={0.000000}: dequeue: seq=50 ts=500 M enqueued=5 -sys={0.000000}, mono={0.000000}: calling select in between 2 osmux recv -sys={0.000000}, mono={0.000000}: calling select after receiving 2nd osmux. Dequeue 1st osmux frame and 1st rtp from 2nd osmux frame. -sys={0.000000}, mono={0.000000}: dequeue: seq=51 ts=660 enqueued=10 -sys={0.000000}, mono={0.000000}: dequeue: seq=52 ts=820 enqueued=9 -sys={0.000000}, mono={0.000000}: dequeue: seq=53 ts=980 enqueued=8 -sys={0.000000}, mono={0.000000}: dequeue: seq=54 ts=1140 enqueued=7 -sys={0.000000}, mono={0.000000}: dequeue: seq=55 ts=1300 enqueued=6 -sys={0.000000}, mono={0.000000}: dequeue: seq=56 ts=1460 enqueued=5 -sys={0.100000}, mono={0.100000}: clock_override_add -sys={0.100000}, mono={0.100000}: select, all 5 remaining should be out -sys={0.100000}, mono={0.100000}: dequeue: seq=57 ts=1620 enqueued=4 -sys={0.100000}, mono={0.100000}: dequeue: seq=58 ts=1780 enqueued=3 -sys={0.100000}, mono={0.100000}: dequeue: seq=59 ts=1940 enqueued=2 -sys={0.100000}, mono={0.100000}: dequeue: seq=60 ts=2100 enqueued=1 -sys={0.100000}, mono={0.100000}: dequeue: seq=61 ts=2260 enqueued=0 -===test_output_frame_lost=== -sys={0.000000}, mono={0.000000}: clock_override_set -sys={0.000000}, mono={0.000000}: first osmux frame -sys={0.000000}, mono={0.000000}: dequeue: seq=50 ts=500 M enqueued=5 -sys={0.100000}, mono={0.100000}: clock_override_add -sys={0.100000}, mono={0.100000}: dequeue: seq=51 ts=660 enqueued=4 -sys={0.100000}, mono={0.100000}: dequeue: seq=52 ts=820 enqueued=3 -sys={0.100000}, mono={0.100000}: dequeue: seq=53 ts=980 enqueued=2 -sys={0.100000}, mono={0.100000}: dequeue: seq=54 ts=1140 enqueued=1 -sys={0.100000}, mono={0.100000}: dequeue: seq=55 ts=1300 enqueued=0 -sys={0.100000}, mono={0.100000}: one osmux frame is now lost (seq++) -sys={0.220000}, mono={0.220000}: clock_override_add -sys={0.220000}, mono={0.220000}: 3rd osmux frame arrives -sys={0.220000}, mono={0.220000}: dequeue: seq=56 ts=1460 M enqueued=5 -sys={0.320000}, mono={0.320000}: clock_override_add -sys={0.320000}, mono={0.320000}: dequeue: seq=57 ts=1620 enqueued=4 -sys={0.320000}, mono={0.320000}: dequeue: seq=58 ts=1780 enqueued=3 -sys={0.320000}, mono={0.320000}: dequeue: seq=59 ts=1940 enqueued=2 -sys={0.320000}, mono={0.320000}: dequeue: seq=60 ts=2100 enqueued=1 -sys={0.320000}, mono={0.320000}: dequeue: seq=61 ts=2260 enqueued=0 -===test_output_flush=== -sys={0.000000}, mono={0.000000}: clock_override_set -sys={0.000000}, mono={0.000000}: first osmux frame -sys={0.000000}, mono={0.000000}: dequeue: seq=50 ts=500 M enqueued=5 -sys={0.040000}, mono={0.040000}: clock_override_add -sys={0.040000}, mono={0.040000}: dequeue: seq=51 ts=660 enqueued=4 -sys={0.040000}, mono={0.040000}: dequeue: seq=52 ts=820 enqueued=3 -sys={0.040000}, mono={0.040000}: 2nd osmux frame arrives -sys={0.040000}, mono={0.040000}: flushing, all packet should be transmitted immediately -sys={0.040000}, mono={0.040000}: dequeue: seq=53 ts=980 enqueued=8 -sys={0.040000}, mono={0.040000}: dequeue: seq=54 ts=1140 enqueued=7 -sys={0.040000}, mono={0.040000}: dequeue: seq=55 ts=1300 enqueued=6 -sys={0.040000}, mono={0.040000}: dequeue: seq=56 ts=1460 enqueued=5 -sys={0.040000}, mono={0.040000}: dequeue: seq=57 ts=1620 enqueued=4 -sys={0.040000}, mono={0.040000}: dequeue: seq=58 ts=1780 enqueued=3 -sys={0.040000}, mono={0.040000}: dequeue: seq=59 ts=1940 enqueued=2 -sys={0.040000}, mono={0.040000}: dequeue: seq=60 ts=2100 enqueued=1 -sys={0.040000}, mono={0.040000}: dequeue: seq=61 ts=2260 enqueued=0 -OK: Test passed
View file
libosmo-netif_1.2.0.dsc -> libosmo-netif_1.3.0.dsc
Changed
@@ -1,22 +1,22 @@ Format: 3.0 (native) Source: libosmo-netif -Binary: libosmonetif8, libosmo-netif-dev, libosmo-netif-doc, libosmo-netif-dbg +Binary: libosmonetif11, libosmo-netif-dev, libosmo-netif-doc, libosmo-netif-dbg Architecture: any all -Version: 1.2.0 +Version: 1.3.0 Maintainer: Osmocom team <openbsc@lists.osmocom.org> Homepage: https://projects.osmocom.org/projects/libosmo-netif Standards-Version: 3.9.6 Vcs-Browser: https://gitea.osmocom.org/osmocom/libosmo-netif Vcs-Git: https://gitea.osmocom.org/osmocom/libosmo-netif -Build-Depends: debhelper (>= 9), autotools-dev, autoconf, automake, libtool, dh-autoreconf, libdpkg-perl, git, doxygen, libosmocore-dev (>= 1.7.0), pkg-config, libpcap0.8-dev, libsctp-dev +Build-Depends: debhelper (>= 9), autotools-dev, autoconf, automake, libtool, dh-autoreconf, libdpkg-perl, git, doxygen, libosmocore-dev (>= 1.8.0), pkg-config, libpcap0.8-dev, libsctp-dev Package-List: libosmo-netif-dbg deb debug extra arch=any libosmo-netif-dev deb libdevel optional arch=any libosmo-netif-doc deb doc optional arch=all - libosmonetif8 deb libs optional arch=any + libosmonetif11 deb libs optional arch=any Checksums-Sha1: - 82c889a606e370e1bbbf88aa2c9b97c5003db880 169548 libosmo-netif_1.2.0.tar.xz + 3ccd5889d74e846abe11113926027a8b1eaf5fc6 180288 libosmo-netif_1.3.0.tar.xz Checksums-Sha256: - 5ab6d3e501d5aab705c7ea06b1b593814284861f2d468812181738a8d4df826d 169548 libosmo-netif_1.2.0.tar.xz + 603f3318ec0ca35cbe1c1301f015b22e29205449a8d82a630751e5e5da7adc81 180288 libosmo-netif_1.3.0.tar.xz Files: - 6d0ead92d775d253ebf646b63f219e98 169548 libosmo-netif_1.2.0.tar.xz + b738aca6613ba1c392f5844833c9b43e 180288 libosmo-netif_1.3.0.tar.xz
View file
libosmo-netif_1.2.0.tar.xz/.tarball-version -> libosmo-netif_1.3.0.tar.xz/.tarball-version
Changed
@@ -1 +1 @@ -1.2.0 \ No newline at end of file +1.3.0
View file
libosmo-netif_1.2.0.tar.xz/Makefile.am -> libosmo-netif_1.3.0.tar.xz/Makefile.am
Changed
@@ -1,7 +1,7 @@ AUTOMAKE_OPTIONS = foreign dist-bzip2 1.6 ACLOCAL_AMFLAGS = -I m4 -SUBDIRS = include src examples tests +SUBDIRS = include src examples utils tests pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = libosmo-netif.pc
View file
libosmo-netif_1.2.0.tar.xz/configure.ac -> libosmo-netif_1.3.0.tar.xz/configure.ac
Changed
@@ -89,8 +89,9 @@ dnl Generate the output AM_CONFIG_HEADER(config.h) -PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 1.7.0) -PKG_CHECK_MODULES(LIBOSMOGSM, libosmogsm >= 1.7.0) +PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 1.8.0) +PKG_CHECK_MODULES(LIBOSMOGSM, libosmogsm >= 1.8.0) +PKG_CHECK_MODULES(LIBOSMOCODEC, libosmocodec >= 1.8.0) AC_ARG_ENABLE(lapd_examples, AS_HELP_STRING( @@ -99,7 +100,7 @@ ), lapd_examples=$enableval, lapd_examples="no") AS_IF(test "x$lapd_examples" = "xyes", - PKG_CHECK_MODULES(LIBOSMOABIS, libosmoabis >= 1.3.0) + PKG_CHECK_MODULES(LIBOSMOABIS, libosmoabis >= 1.4.0) AC_DEFINE(ENABLE_LAPD, 1, Enable LAPD examples) ) AM_CONDITIONAL(ENABLE_LAPD, test "x$lapd_examples" = "xyes") @@ -144,6 +145,7 @@ include/osmocom/netif/Makefile src/Makefile examples/Makefile + utils/Makefile tests/Makefile Doxyfile Makefile
View file
libosmo-netif_1.2.0.tar.xz/contrib/libosmo-netif.spec.in -> libosmo-netif_1.3.0.tar.xz/contrib/libosmo-netif.spec.in
Changed
@@ -13,6 +13,7 @@ # published by the Open Source Initiative. Name: libosmo-netif +Requires: osmocom-latest Version: @VERSION@ Release: 0 Summary: Osmocom library for muxed audio @@ -24,25 +25,28 @@ BuildRequires: libtool >= 2 BuildRequires: lksctp-tools-devel BuildRequires: pkgconfig >= 0.20 -BuildRequires: pkgconfig(libosmocore) >= 1.7.0 -BuildRequires: pkgconfig(libosmogsm) >= 1.7.0 +BuildRequires: pkgconfig(libosmocore) >= 1.8.0 +BuildRequires: pkgconfig(libosmogsm) >= 1.8.0 +BuildRequires: pkgconfig(libosmocodec) >= 1.8.0 %description Network interface demuxer library for OsmoCom projects. -%package -n libosmonetif8 +%package -n libosmonetif11 +Requires: osmocom-latest Summary: Osmocom library for muxed audio License: AGPL-3.0-or-later Group: System/Libraries -%description -n libosmonetif8 +%description -n libosmonetif11 Network interface demuxer library for OsmoCom projects. %package -n libosmonetif-devel +Requires: osmocom-latest Summary: Development files for the Osmocom muxed audio library License: AGPL-3.0-or-later Group: Development/Libraries/C and C++ -Requires: libosmonetif8 = %{version} +Requires: libosmonetif11 = %{version} %description -n libosmonetif-devel Network interface demuxer library for OsmoCom projects. @@ -66,11 +70,11 @@ %check make %{?_smp_mflags} check || (find . -name testsuite.log -exec cat {} +) -%post -n libosmonetif8 -p /sbin/ldconfig -%postun -n libosmonetif8 -p /sbin/ldconfig +%post -n libosmonetif11 -p /sbin/ldconfig +%postun -n libosmonetif11 -p /sbin/ldconfig -%files -n libosmonetif8 -%{_libdir}/libosmonetif.so.8* +%files -n libosmonetif11 +%{_libdir}/libosmonetif.so.11* %files -n libosmonetif-devel %license COPYING
View file
libosmo-netif_1.2.0.tar.xz/debian/changelog -> libosmo-netif_1.3.0.tar.xz/debian/changelog
Changed
@@ -1,3 +1,129 @@ +libosmo-netif (1.3.0) unstable; urgency=medium + + Pau Espin Pedrol + * rtp: Delay rtph ptr assign after validating length + * stream: assert params are not NULL in send/recv functions + * stream: getsockopt ret socklen_t is unsigned + * osmux.h: Add missing msgb.h header + * osmux.h: Define default Osmux port + * rtp: Avoid memcpy(len=0) + * examples/osmux-test-output: Avoid using deprecated Osmux API + * osmux: Drop long time deprecated APIs + * osmux: Move osmux_xfrm_output_set_tx_cb() further down to the xfrm_output section + * osmux: Allocate struct osmux_out_handle through API + * osmux: Allow the user to alloc msgbs used to provide generated RTP packets + * osmux: osmux_xfrm_input_close_circuit(): Log circuit not found + * stream: Fix typos in log messages + * stream: Unset fd value after close() before calling closed_cb() + * stream: Provide caller with SCTP flags during osmo_stream_*_recv() + * tests/osmo-pcap-test/osmux_test: Fix return condition check for osmux_xfrm_input() + * osmux: Improve logging non-usual conditions + * osmux: osmux_xfrm_input(): Propagate error code to inform caller + * osmux: Avoid duplicated RTP msg trigger Tx of osmux frame + * osmux: Change order of lines to follow packet fill order + * cosmetic: osmux: Fix typo in comment + * osmux: Unify return codes of osmux_batch_add() and osmux_batch_enqueue() + * osmux: Early return on error or batch full during osmux_replay_lost_packets() + * osmux: assert no batch factor greater than 8 is used + * tests/osmux_test2: Document unit tests + * tests/osmux: Always run with fake time + * tests: rename test osmux_test2 -> osmux_output_test + * osmux: Print osmux_hdr rtp_m field in osmux_snprintf() + * amr: Add data0 field to amr_hdr + * osmux: Proper encoding of osmux frames when when AMR FT changes + * tests/osmux: Add new osmux_input_test to validate AMR FT changes + * osmux: Fix AMR F,Q,CMR fields not properly encoded in osmux header + * cosmetic: osmux: Properly separate expressions with whitespace + * cosmetic: osmux: Fix typo in comment + * osmux: Fix osmux seqnum incremented globally instead of per circuit + * tests/osmux: Properly flush and free out_handle in osmux_test + * tests/osmux: Test rx of osmux seqnum wrap around + * osmux: Fix unwanted RTP marker bit upon rx of osmux seqnum wrap around + * stream: Set proper msgb length when returning sctp_notification + * stream: Erase sctp_msg_flags if receiving user data + * stream: Log rx of sctp notification SCTP_SEND_FAILED + * stream: Set sctp_ppid and sctp_stream when sctp notifciation is received + * stream: Remove unneeded break statement + * stream: Return 0 when receiving sctp notification SCTP_COMM_LOST + * stream: Document osmo_stream_srv_recv() SCTP specialties + * osmux: join osmux_xfrm_input_open_circuit() and osmux_batch_add_circuit() + * osmux: Take into account configured osmux_in_handle->osmux_seq field + * osmux: Split input and output code into separate files + * cosmetic: osmux: Make linter happy + * tests/osmo-pcap/osmux: Replace deprecated API osmux_xfrm_output_init2() + * osmux: Allocate struct osmux_out_handle through API + * osmux: Replace deprecated osmux_xfrm_input_* APIs in examples & tests + * osmux: Introduce API osmux_xfrm_input_get_deliver_cb_data() + * stream: Improve logging of SCTP_PEER_ADDR_CHANGE notification + * cosmetic: stream: Fix parameter name + * stream: Introduce APIs osmo_stream_{cli,srv}_clear_tx_queue() + * cosmetic: Fix indentation whitespace + * amr: Document SID frame length from spec + * osmux: Rework log formatting when replaying detected RTP gaps + * osmux: Use msgb_copy() API in osmux_replay_lost_packets() + * osmux: Log AMR FT when incorrect AMR payload size detected + * osmux: Fix naming of functions operating on osmux circuits + * osmux: rename internal struct osmux_batch -> osmux_link + * osmux: Add internal backpointer to in_handle to simplify param passing + * osmux: Fix endianness logging duplicaed seqnum + * osmux: Use internal struct to cache parsing state of rtp pkt from user + * osmux: dup in RTP pkt: check before applying queue flush due to Marker bit + * osmux: dup in RTP pkt: Replace potentially internally forged pkt with incoming one + * osmux: recreate lost RTP pkts before handling newest one + * osmux: Drop marker bit in forged RTP packets to fill gaps + * osmux: Add data0 field to osmux_hdr + * osmux: Drop noop OR during assignment + * tests/osmux: Test replay of one lost RTP packet when generating osmux batches + * tests/osmux: Test incoming RTP stream with seqnum jumps during wraparound + * tests/osmux: Test big seqnum holes (>batch_factor) in incoming RTP stream + * osmux: Obey current batch_size restrictions when creating forged RTP packets to fill holes + * osmux: Use better rationale when limiting amount of lost & forged RTP incoming packets + * osmux: Avoid filling in seqnum holes upon rx of RTP pkt with M bit set + * osmux: Set M bit in osmuxhdr if seqnum hole found encoding RTP pkts + * osmux: Support recreating lost RTP packets at start of the batch + * osmux: Introduce API osmux_xfrm_input_set_name() + * osmux: Improve logging of osmux_xfrm_input + * tests/osmux: Add extra asserts to validate osmux header is pulled correctly + * amr: Guard against incorrect AMR FT passed to osmo_amr_{bits,bytes}() + * osmux: Check received osmuxh->amr_ft is correct before using it + * osmux: Refactor osmux_xfrm_output_pull() to simplify code flow + * osmux_output: Refactor init code to avoid calling deprecated APIs internally + * amr.h: Fix missing include dependencies + * amr: osmo_amr_bwe_to_oa(): Modify loop to allow osmo_amr_bytes()=0 (NO_DATA) + * amr: osmo_amr_bwe_to_oa() define variable as unsigned + * amr: Add struct definition for AMR BWE header + * tests/amr: Add test case for unused FT=14 + * amr: Support all SID and NO_DATA amr formats + * osmux: Allow forwarding AMR NO_DATA frames + * stream: Log read/write flags + * stream: osmo_stream_*_write: Unifiy way to get data and length + * stream: Log error on short send + * stream: Avoid useless polling if tx_queue becomes empty + * stream: Fix tx data dropped upon show socket write + * amr.h: Fix AMR_FT_{GSM,TDMA,PDC}_EFR_SID_LEN + * amr: Add missing header stdbool.h + * amr: constify input buffer in osmo_amr_is_oa() + * amr: use struct bwe_hdr in osmo_amr_bwe_to_oa() + * amr: Clarify size of AMR BWE header and ToC + * amr: use OSMO_BYTES_FOR_BITS() + * amr: osmo_amr_bwe_to_oa(): validate input data is long enough + * Introduce utils/osmo-amr-inspect program + * osmo-amr-inspect: Improve robustness reading from stdin + + Vadim Yanitskiy + * tests/amr: fix less-than-zero comparison of an unsigned value + + Max + * Log more details in osmo_stream_srv_write() + * Properly handle send() return code + * Better handling of send() error + * Add assert for link check to osmo_stream_srv_create() + + Harald Welte + * Support building with -Werror=strict-prototypes / -Werror=old-style-definition + + -- Pau Espin Pedrol <pespin@sysmocom.de> Tue, 07 Feb 2023 13:28:19 +0100 + libosmo-netif (1.2.0) unstable; urgency=medium Pau Espin Pedrol
View file
libosmo-netif_1.2.0.tar.xz/debian/control -> libosmo-netif_1.3.0.tar.xz/debian/control
Changed
@@ -11,7 +11,7 @@ libdpkg-perl, git, doxygen, - libosmocore-dev (>= 1.7.0), + libosmocore-dev (>= 1.8.0), pkg-config, libpcap0.8-dev, libsctp-dev @@ -20,7 +20,7 @@ Vcs-Git: https://gitea.osmocom.org/osmocom/libosmo-netif Homepage: https://projects.osmocom.org/projects/libosmo-netif -Package: libosmonetif8 +Package: libosmonetif11 Section: libs Architecture: any Depends: osmocom-latest, ${shlibs:Depends}, ${misc:Depends} @@ -37,7 +37,7 @@ Depends: osmocom-latest, ${misc:Depends}, libosmocore-dev, libosmocore, - libosmonetif8 (= ${binary:Version}) + libosmonetif11 (= ${binary:Version}) Multi-Arch: same Description: Development headers for Osmocom network interface The libosmo-netif library is one of the libraries needed by the @@ -51,7 +51,7 @@ Architecture: all Section: doc Depends: osmocom-latest, ${misc:Depends}, - libosmonetif8, + libosmonetif11, libjs-jquery Description: Documentation for the Osmo network interface library The libosmo-netif library is one of the libraries needed by the @@ -64,7 +64,7 @@ Section: debug Architecture: any Priority: extra -Depends: osmocom-latest, libosmonetif8 (= ${binary:Version}), ${misc:Depends} +Depends: osmocom-latest, libosmonetif11 (= ${binary:Version}), ${misc:Depends} Multi-Arch: same Description: Debug symbols for Osmocom network interface library The libosmo-netif library is one of the libraries needed by the
View file
libosmo-netif_1.3.0.tar.xz/debian/libosmonetif11.install
Changed
(renamed from debian/libosmonetif8.install)
View file
libosmo-netif_1.2.0.tar.xz/examples/osmux-test-input.c -> libosmo-netif_1.3.0.tar.xz/examples/osmux-test-input.c
Changed
@@ -83,11 +83,7 @@ * This is the input handle for osmux. It stores the last osmux sequence that * has been used and the deliver function that sends the osmux batch. */ -struct osmux_in_handle h_input = { - .osmux_seq = 0, /* sequence number to start OSmux message from */ - .batch_factor = 4, /* batch up to 4 RTP messages */ - .deliver = osmux_deliver, -}; +struct osmux_in_handle *h_input; #define MAX_CONCURRENT_CALLS 8 @@ -165,9 +161,9 @@ if (ccid < 0) register_ccid(rtph->ssrc); - while ((ret = osmux_xfrm_input(&h_input, msg, ccid)) > 0) { + while ((ret = osmux_xfrm_input(h_input, msg, ccid)) > 0) { /* batch full, deliver it */ - osmux_xfrm_input_deliver(&h_input); + osmux_xfrm_input_deliver(h_input); } if (ret == -1) printf("something is wrong\n"); @@ -217,7 +213,10 @@ /* * initialize OSMUX handlers. */ - osmux_xfrm_input_init(&h_input); + h_input = osmux_xfrm_input_alloc(tall_test); + osmux_xfrm_input_set_initial_seqnum(h_input, 0); + osmux_xfrm_input_set_batch_factor(h_input, 4); + osmux_xfrm_input_set_deliver_cb(h_input, osmux_deliver, NULL); /* * initialize datagram server.
View file
libosmo-netif_1.2.0.tar.xz/examples/osmux-test-output.c -> libosmo-netif_1.3.0.tar.xz/examples/osmux-test-output.c
Changed
@@ -42,7 +42,7 @@ * This is the output handle for osmux, it stores last RTP sequence and * timestamp that has been used. There should be one per circuit ID. */ -static struct osmux_out_handle h_output; +static struct osmux_out_handle *h_output; static int fd; @@ -107,7 +107,7 @@ msg->len, buf); while((osmuxh = osmux_xfrm_output_pull(msg)) != NULL) - osmux_xfrm_output_sched(&h_output, osmuxh); + osmux_xfrm_output_sched(h_output, osmuxh); return 0; } @@ -117,7 +117,7 @@ LOGP(DOSMUX_TEST, LOGL_NOTICE, "closing OSMUX.\n"); osmo_dgram_close(conn); osmo_dgram_destroy(conn); - osmux_xfrm_output_flush(&h_output); + talloc_free(h_output); osmo_rtp_handle_free(rtp); amr_close(); exit(EXIT_SUCCESS); @@ -155,8 +155,10 @@ /* * initialize OSMUX handlers. */ - osmux_xfrm_output_init(&h_output, random()); - osmux_xfrm_output_set_tx_cb(&h_output, tx_cb, NULL); + h_output = osmux_xfrm_output_alloc(NULL); + osmux_xfrm_output_set_rtp_ssrc(h_output, random()); + osmux_xfrm_output_set_rtp_pl_type(h_output, 98); + osmux_xfrm_output_set_tx_cb(h_output, tx_cb, NULL); /* * initialize datagram server. */
View file
libosmo-netif_1.2.0.tar.xz/include/osmocom/netif/amr.h -> libosmo-netif_1.3.0.tar.xz/include/osmocom/netif/amr.h
Changed
@@ -1,6 +1,10 @@ #ifndef _OSMO_AMR_H_ #define _OSMO_AMR_H_ +#include <stddef.h> +#include <stdbool.h> +#include <stdint.h> + #include <osmocom/core/endian.h> /* As defined by RFC3267: Adaptive Multi-Rate (AMR) */ @@ -12,6 +16,37 @@ */ /* + * 4.3. Bandwidth-Efficient Mode: + * + * Summary from 4.3.4: Same as Octet aligned (see below) but without padding after header and ToC: + * 0 1 + * 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | CMR |F| FT |Q|X X X X X X| + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * + * X means AMR payload (padding in case of FT=NO_DATA). + */ +struct amr_hdr_bwe { +#if OSMO_IS_LITTLE_ENDIAN + uint8_t ft_hi:3, /* coding mode highest part */ + f:1, + cmr:4; /* Codec Mode Request */ + uint8_t data_start:6, + q:1, /* OK (not damaged) at origin? */ + ft_lo:1; /* coding mode lowest bit */ +#elif OSMO_IS_BIG_ENDIAN +/* auto-generated from the little endian part above (libosmocore/contrib/struct_endianess.py) */ + uint8_t cmr:4, f:1, ft_hi:3; + uint8_t ft_lo:1, q:1, data_start:6; +#endif + uint8_t data0; +} __attribute__((packed)); + +/* See diagram above: CMR (4) + F (1) + FT (4) + Q (1) = 10 */ +#define AMR_HDR_BWE_LEN_BITS 10 + +/* * 4.4. Octet-aligned Mode: * * 4.4.1. The Payload Header: @@ -57,6 +92,7 @@ uint8_t cmr:4, pad1:4; uint8_t f:1, ft:4, q:1, pad2:2; #endif + uint8_t data0; } __attribute__((packed)); static inline void *osmo_amr_get_payload(struct amr_hdr *amrh) @@ -67,51 +103,66 @@ /* AMR voice frame type identifiers * See also 3GPP TS 26.101, Table 1a: Interpretation of Frame Type, Mode * Indication and Mode Request fields */ -#define AMR_FT_0 0 /* 4.75 */ -#define AMR_FT_1 1 /* 5.15 */ -#define AMR_FT_2 2 /* 5.90 */ -#define AMR_FT_3 3 /* 6.70 */ -#define AMR_FT_4 4 /* 7.40 */ -#define AMR_FT_5 5 /* 7.95 */ -#define AMR_FT_6 6 /* 10.2 */ -#define AMR_FT_7 7 /* 12.2 */ -#define AMR_FT_SID 8 /* SID */ -#define AMR_FT_MAX 9 +#define AMR_FT_0 0 /* 4.75 */ +#define AMR_FT_1 1 /* 5.15 */ +#define AMR_FT_2 2 /* 5.90 */ +#define AMR_FT_3 3 /* 6.70 */ +#define AMR_FT_4 4 /* 7.40 */ +#define AMR_FT_5 5 /* 7.95 */ +#define AMR_FT_6 6 /* 10.2 */ +#define AMR_FT_7 7 /* 12.2 */ +#define AMR_FT_SID 8 /* AMR SID */ +#define AMR_FT_GSM_EFR_SID 9 /* GSM-EFR SID */ +#define AMR_FT_TDMA_EFR_SID 10 /* TDMA-EFR SID */ +#define AMR_FT_PDC_EFR_SID 11 /* PDC-EFR SID */ +/* version 16.0.0 Release 16: 12-14 for future use */ +#define AMR_FT_NO_DATA 15 /* NO_DATA */ +#define AMR_FT_MAX 16 /* INTERNAL, NO NOT USE OUTSIDE libosmo-netif */ /* AMR voice frame length (in bits). * See also RFC 3267, chapter 3.6. * * NOTE: These constants refer to the length of one AMR speech frame-block, * not counting CMR, TOC. */ -#define AMR_FT_0_LEN_BITS 95 /* 4.75 */ -#define AMR_FT_1_LEN_BITS 103 /* 5.15 */ -#define AMR_FT_2_LEN_BITS 118 /* 5.90 */ -#define AMR_FT_3_LEN_BITS 134 /* 6.70 */ -#define AMR_FT_4_LEN_BITS 148 /* 7.40 */ -#define AMR_FT_5_LEN_BITS 159 /* 7.95 */ -#define AMR_FT_6_LEN_BITS 204 /* 10.2 */ -#define AMR_FT_7_LEN_BITS 244 /* 12.2 */ -#define AMR_FT_SID_LEN_BITS 39 /* SID */ +#define AMR_FT_0_LEN_BITS 95 /* 4.75 */ +#define AMR_FT_1_LEN_BITS 103 /* 5.15 */ +#define AMR_FT_2_LEN_BITS 118 /* 5.90 */ +#define AMR_FT_3_LEN_BITS 134 /* 6.70 */ +#define AMR_FT_4_LEN_BITS 148 /* 7.40 */ +#define AMR_FT_5_LEN_BITS 159 /* 7.95 */ +#define AMR_FT_6_LEN_BITS 204 /* 10.2 */ +#define AMR_FT_7_LEN_BITS 244 /* 12.2 */ +#define AMR_FT_SID_LEN_BITS 39 /* SID */ +#define AMR_FT_GSM_EFR_SID_LEN_BITS 43 /* GSM-EFR SID */ +#define AMR_FT_TDMA_EFR_SID_LEN_BITS 38 /* TDMA-EFR SID */ +#define AMR_FT_PDC_EFR_SID_LEN_BITS 37 /* PDC-EFR SID */ +/* version 16.0.0 Release 16: 12-14 for future use */ +#define AMR_FT_NO_DATA_LEN_BITS 0 /* NO_DATA */ /* AMR voice frame length (in bytes, rounded). * * NOTE: These constants refer to the length of one AMR speech frame-block, * not counting CMR, TOC. */ -#define AMR_FT_0_LEN ((AMR_FT_0_LEN_BITS+7)/8) /* 4.75 */ -#define AMR_FT_1_LEN ((AMR_FT_1_LEN_BITS+7)/8) /* 5.15 */ -#define AMR_FT_2_LEN ((AMR_FT_2_LEN_BITS+7)/8) /* 5.90 */ -#define AMR_FT_3_LEN ((AMR_FT_3_LEN_BITS+7)/8) /* 6.70 */ -#define AMR_FT_4_LEN ((AMR_FT_4_LEN_BITS+7)/8) /* 7.40 */ -#define AMR_FT_5_LEN ((AMR_FT_5_LEN_BITS+7)/8) /* 7.95 */ -#define AMR_FT_6_LEN ((AMR_FT_6_LEN_BITS+7)/8) /* 10.2 */ -#define AMR_FT_7_LEN ((AMR_FT_7_LEN_BITS+7)/8) /* 12.2 */ -#define AMR_FT_SID_LEN ((AMR_FT_SID_LEN_BITS+7)/8) /* SID */ +#define AMR_FT_0_LEN ((AMR_FT_0_LEN_BITS+7)/8) /* 4.75 */ +#define AMR_FT_1_LEN ((AMR_FT_1_LEN_BITS+7)/8) /* 5.15 */ +#define AMR_FT_2_LEN ((AMR_FT_2_LEN_BITS+7)/8) /* 5.90 */ +#define AMR_FT_3_LEN ((AMR_FT_3_LEN_BITS+7)/8) /* 6.70 */ +#define AMR_FT_4_LEN ((AMR_FT_4_LEN_BITS+7)/8) /* 7.40 */ +#define AMR_FT_5_LEN ((AMR_FT_5_LEN_BITS+7)/8) /* 7.95 */ +#define AMR_FT_6_LEN ((AMR_FT_6_LEN_BITS+7)/8) /* 10.2 */ +#define AMR_FT_7_LEN ((AMR_FT_7_LEN_BITS+7)/8) /* 12.2 */ +#define AMR_FT_SID_LEN ((AMR_FT_SID_LEN_BITS+7)/8) /* SID */ +#define AMR_FT_GSM_EFR_SID_LEN ((AMR_FT_GSM_EFR_SID_LEN_BITS+7)/8) /* GSM-EFR SID */ +#define AMR_FT_TDMA_EFR_SID_LEN ((AMR_FT_TDMA_EFR_SID_LEN_BITS+7)/8) /* TDMA-EFR SID */ +#define AMR_FT_PDC_EFR_SID_LEN ((AMR_FT_PDC_EFR_SID_LEN_BITS+7)/8) /* PDC-EFR SID */ +/* version 16.0.0 Release 16: 12-14 for future use */ +#define AMR_FT_NO_DATA_LEN ((AMR_FT_NO_DATA_LEN_BITS+7)/8) /* NO_DATA */ int osmo_amr_ft_valid(uint8_t amr_ft); size_t osmo_amr_bytes(uint8_t amr_cmr); size_t osmo_amr_bits(uint8_t amr_ft); -bool osmo_amr_is_oa(uint8_t *payload, unsigned int payload_len); +bool osmo_amr_is_oa(const uint8_t *payload, unsigned int payload_len); int osmo_amr_oa_to_bwe(uint8_t *payload, unsigned int payload_len); int osmo_amr_bwe_to_oa(uint8_t *payload, unsigned int payload_len, unsigned int payload_maxlen);
View file
libosmo-netif_1.2.0.tar.xz/include/osmocom/netif/osmux.h -> libosmo-netif_1.3.0.tar.xz/include/osmocom/netif/osmux.h
Changed
@@ -3,6 +3,7 @@ #include <osmocom/core/endian.h> #include <osmocom/core/timer.h> +#include <osmocom/core/msgb.h> /*! \addtogroup osmux * @{ @@ -12,6 +13,8 @@ * Osmocom multiplex protocol helpers */ +#define OSMUX_DEFAULT_PORT 1984 + /* OSmux header: * * rtp_m (1 bit): RTP M field (RFC3550, RFC4867) @@ -50,10 +53,12 @@ /* auto-generated from the little endian part above (libosmocore/contrib/struct_endianess.py) */ uint8_t amr_ft:4, amr_cmr:4; #endif + uint8_t data0; } __attribute__((packed)); /* one to handle all existing RTP flows */ struct osmux_in_handle { + /* Initial Osmux seqnum for each circuit, set during osmux_xfrm_input_open_circuit() */ uint8_t osmux_seq; uint8_t batch_factor; uint16_t batch_size; @@ -72,6 +77,8 @@ #define OSMUX_MAX_CONCURRENT_CALLS 8 +typedef struct msgb *(*rtp_msgb_alloc_cb_t)(void *rtp_msgb_alloc_priv_data, + unsigned int msg_len); /* one per OSmux circuit_id, ie. one per RTP flow. */ struct osmux_out_handle { uint16_t rtp_seq; @@ -83,6 +90,8 @@ struct llist_head list; void (*tx_cb)(struct msgb *msg, void *data); /* Used defined rtp tx callback */ void *data; /* User defined opaque data structure */ + rtp_msgb_alloc_cb_t rtp_msgb_alloc_cb; /* User defined msgb alloc function for generated RTP pkts */ + void *rtp_msgb_alloc_cb_data; /* Opaque data pointer set by user and passed in rtp_msgb_alloc_cb() */ }; static inline uint8_t *osmux_get_payload(struct osmux_hdr *osmuxh) @@ -95,8 +104,15 @@ /* 1500 - sizeof(iphdr) = 20 bytes - sizeof(udphdr) = 8 bytes. */ #define OSMUX_BATCH_DEFAULT_MAX 1472 -void osmux_xfrm_input_init(struct osmux_in_handle *h); -void osmux_xfrm_input_fini(struct osmux_in_handle *h); +struct osmux_in_handle *osmux_xfrm_input_alloc(void *ctx); +void osmux_xfrm_input_init(struct osmux_in_handle *h) OSMO_DEPRECATED("Use osmux_xfrm_input_alloc() instead"); +void osmux_xfrm_input_fini(struct osmux_in_handle *h) OSMO_DEPRECATED("Use talloc_free() instead"); +void osmux_xfrm_input_set_name(struct osmux_in_handle *h, const char *name); +int osmux_xfrm_input_set_batch_factor(struct osmux_in_handle *h, uint8_t batch_factor); +void osmux_xfrm_input_set_batch_size(struct osmux_in_handle *h, uint16_t batch_size); +void osmux_xfrm_input_set_initial_seqnum(struct osmux_in_handle *h, uint8_t osmux_seqnum); +void osmux_xfrm_input_set_deliver_cb(struct osmux_in_handle *h, void (*deliver_cb)(struct msgb *msg, void *data), void *data); +void *osmux_xfrm_input_get_deliver_cb_data(struct osmux_in_handle *h); int osmux_xfrm_input_open_circuit(struct osmux_in_handle *h, int ccid, int dummy); void osmux_xfrm_input_close_circuit(struct osmux_in_handle *h, int ccid); @@ -104,16 +120,16 @@ int osmux_xfrm_input(struct osmux_in_handle *h, struct msgb *msg, int ccid); void osmux_xfrm_input_deliver(struct osmux_in_handle *h); -void osmux_xfrm_output_init(struct osmux_out_handle *h, uint32_t rtp_ssrc) OSMO_DEPRECATED("Use osmux_xfrm_output_init2() instead"); -void osmux_xfrm_output_init2(struct osmux_out_handle *h, uint32_t rtp_ssrc, uint8_t rtp_payload_type); +struct osmux_out_handle *osmux_xfrm_output_alloc(void *ctx); +void osmux_xfrm_output_init(struct osmux_out_handle *h, uint32_t rtp_ssrc) OSMO_DEPRECATED("Use osmux_xfrm_output_alloc() and osmux_xfrm_output_set_rtp_*() instead"); +void osmux_xfrm_output_init2(struct osmux_out_handle *h, uint32_t rtp_ssrc, uint8_t rtp_payload_type) OSMO_DEPRECATED("Use osmux_xfrm_output_alloc() and osmux_xfrm_output_set_rtp_*() instead"); +void osmux_xfrm_output_set_rtp_ssrc(struct osmux_out_handle *h, uint32_t rtp_ssrc); +void osmux_xfrm_output_set_rtp_pl_type(struct osmux_out_handle *h, uint32_t rtp_payload_type); void osmux_xfrm_output_set_tx_cb(struct osmux_out_handle *h, void (*tx_cb)(struct msgb *msg, void *data), void *data); -int osmux_xfrm_output(struct osmux_hdr *osmuxh, struct osmux_out_handle *h, struct llist_head *list) OSMO_DEPRECATED("Use osmux_xfrm_output_sched() instead"); +void osmux_xfrm_output_set_rtp_msgb_alloc_cb(struct osmux_out_handle *h, rtp_msgb_alloc_cb_t cb, void *cb_data); int osmux_xfrm_output_sched(struct osmux_out_handle *h, struct osmux_hdr *osmuxh); void osmux_xfrm_output_flush(struct osmux_out_handle *h); struct osmux_hdr *osmux_xfrm_output_pull(struct msgb *msg); - -void osmux_tx_sched(struct llist_head *list, void (*tx_cb)(struct msgb *msg, void *data), void *data) OSMO_DEPRECATED("Use osmux_xfrm_output_set_tx_cb() instead"); - /*! @} */ #endif
View file
libosmo-netif_1.2.0.tar.xz/include/osmocom/netif/sctp.h -> libosmo-netif_1.3.0.tar.xz/include/osmocom/netif/sctp.h
Changed
@@ -7,7 +7,17 @@ static inline const char *osmo_sctp_assoc_chg_str(enum sctp_sac_state val) { return get_value_string(osmo_sctp_assoc_chg_strs, val); } +enum sctp_spc_state; +extern const struct value_string osmo_sctp_paddr_chg_strs; +static inline const char *osmo_sctp_paddr_chg_str(enum sctp_spc_state val) +{ return get_value_string(osmo_sctp_paddr_chg_strs, val); } + enum sctp_sn_type; extern const struct value_string osmo_sctp_sn_type_strs; static inline const char *osmo_sctp_sn_type_str(enum sctp_sn_type val) { return get_value_string(osmo_sctp_sn_type_strs, val); } + +enum sctp_sn_error; +extern const struct value_string osmo_sctp_sn_error_strs; +static inline const char *osmo_sctp_sn_error_str(enum sctp_sn_error val) +{ return get_value_string(osmo_sctp_sn_error_strs, val); }
View file
libosmo-netif_1.2.0.tar.xz/include/osmocom/netif/stream.h -> libosmo-netif_1.3.0.tar.xz/include/osmocom/netif/stream.h
Changed
@@ -9,6 +9,10 @@ * @{ */ +/*! \brief Access SCTP flags from the msgb control buffer */ +#define OSMO_STREAM_SCTP_MSG_FLAGS_NOTIFICATION 0x80 /* sctp_recvmsg() flags=MSG_NOTIFICATION, msgb_data() contains "union sctp_notification*" */ +#define msgb_sctp_msg_flags(msg) (msg)->cb2 + /*! \brief Access the SCTP PPID from the msgb control buffer */ #define msgb_sctp_ppid(msg) (msg)->cb3 /*! \brief Access the SCTP Stream ID from the msgb control buffer */ @@ -52,6 +56,8 @@ void osmo_stream_srv_send(struct osmo_stream_srv *conn, struct msgb *msg); int osmo_stream_srv_recv(struct osmo_stream_srv *conn, struct msgb *msg); +void osmo_stream_srv_clear_tx_queue(struct osmo_stream_srv *conn); + /*! \brief Osmocom Stream Client: Single client connection */ struct osmo_stream_cli; @@ -85,6 +91,8 @@ void osmo_stream_cli_close(struct osmo_stream_cli *cli); void osmo_stream_cli_send(struct osmo_stream_cli *cli, struct msgb *msg); -int osmo_stream_cli_recv(struct osmo_stream_cli *conn, struct msgb *msg); +int osmo_stream_cli_recv(struct osmo_stream_cli *cli, struct msgb *msg); + +void osmo_stream_cli_clear_tx_queue(struct osmo_stream_cli *cli); /*! @} */
View file
libosmo-netif_1.2.0.tar.xz/src/Makefile.am -> libosmo-netif_1.3.0.tar.xz/src/Makefile.am
Changed
@@ -1,6 +1,6 @@ # 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=10:0:2 +LIBVERSION=11:0:0 AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir) AM_CFLAGS= -fPIC -Wall $(LIBOSMOCORE_CFLAGS) $(LIBOSMOGSM_CFLAGS) $(LIBOSMOABIS_CFLAGS) $(COVERAGE_CFLAGS) $(LIBSCTP_CFLAGS) @@ -17,6 +17,8 @@ ipa_unit.c \ jibuf.c \ osmux.c \ + osmux_input.c \ + osmux_output.c \ prim.c \ rs232.c \ rtp.c \
View file
libosmo-netif_1.2.0.tar.xz/src/amr.c -> libosmo-netif_1.3.0.tar.xz/src/amr.c
Changed
@@ -14,9 +14,11 @@ #include <unistd.h> #include <string.h> #include <stdbool.h> + +#include <osmocom/core/utils.h> #include <osmocom/netif/amr.h> -/* According to TS 26.101: +/* According to TS 26.101 Table A.1b: * * Frame type AMR code bits bytes * 0 4.75 95 12 @@ -27,18 +29,33 @@ * 5 7.95 159 20 * 6 10.20 204 26 * 7 12.20 244 31 + * 8 AMR SID 39 5 + * 9 GSM-EFR SID 43 5 + * 10 TDMA-EFR SID 38 5 + * 11 PDC-EFR SID 37 5 + * 12 NOT USED + * 13 NOT USED + * 14 NOT USED + * 15 NO DATA 0 0 */ -static size_t amr_ft_to_bitsAMR_FT_MAX = { - AMR_FT_0 = AMR_FT_0_LEN_BITS, - AMR_FT_1 = AMR_FT_1_LEN_BITS, - AMR_FT_2 = AMR_FT_2_LEN_BITS, - AMR_FT_3 = AMR_FT_3_LEN_BITS, - AMR_FT_4 = AMR_FT_4_LEN_BITS, - AMR_FT_5 = AMR_FT_5_LEN_BITS, - AMR_FT_6 = AMR_FT_6_LEN_BITS, - AMR_FT_7 = AMR_FT_7_LEN_BITS, - AMR_FT_SID = AMR_FT_SID_LEN_BITS, +static int amr_ft_to_bitsAMR_FT_MAX = { + AMR_FT_0 = AMR_FT_0_LEN_BITS, + AMR_FT_1 = AMR_FT_1_LEN_BITS, + AMR_FT_2 = AMR_FT_2_LEN_BITS, + AMR_FT_3 = AMR_FT_3_LEN_BITS, + AMR_FT_4 = AMR_FT_4_LEN_BITS, + AMR_FT_5 = AMR_FT_5_LEN_BITS, + AMR_FT_6 = AMR_FT_6_LEN_BITS, + AMR_FT_7 = AMR_FT_7_LEN_BITS, + AMR_FT_SID = AMR_FT_SID_LEN_BITS, + AMR_FT_GSM_EFR_SID = AMR_FT_GSM_EFR_SID_LEN_BITS, + AMR_FT_TDMA_EFR_SID = AMR_FT_TDMA_EFR_SID_LEN_BITS, + AMR_FT_PDC_EFR_SID = AMR_FT_PDC_EFR_SID_LEN_BITS, + 12 = 0, /* for future use */ + 13 = 0, /* for future use */ + 14 = 0, /* for future use */ + AMR_FT_NO_DATA = AMR_FT_NO_DATA_LEN_BITS, }; static size_t amr_ft_to_bytesAMR_FT_MAX = { @@ -51,15 +68,24 @@ AMR_FT_6 = AMR_FT_6_LEN, AMR_FT_7 = AMR_FT_7_LEN, AMR_FT_SID = AMR_FT_SID_LEN, + AMR_FT_GSM_EFR_SID = AMR_FT_GSM_EFR_SID_LEN, + AMR_FT_TDMA_EFR_SID = AMR_FT_TDMA_EFR_SID_LEN, + AMR_FT_PDC_EFR_SID = AMR_FT_PDC_EFR_SID_LEN, + 12 = 0, /* for future use */ + 13 = 0, /* for future use */ + 14 = 0, /* for future use */ + AMR_FT_NO_DATA = AMR_FT_NO_DATA_LEN, }; size_t osmo_amr_bits(uint8_t amr_ft) { + OSMO_ASSERT(amr_ft < AMR_FT_MAX); return amr_ft_to_bitsamr_ft; } size_t osmo_amr_bytes(uint8_t amr_ft) { + OSMO_ASSERT(amr_ft < AMR_FT_MAX); return amr_ft_to_bytesamr_ft; } @@ -67,37 +93,27 @@ { int ft; - for (ft = 0; ft < AMR_FT_MAX; ft++) { + for (ft = 0; ft < AMR_FT_PDC_EFR_SID; ft++) { if (amr_ft_to_bytesft == bytes) return ft; } + /* 12-14 not used, jump to 15 (AMR_FT_NO_DATA): */ + if (amr_ft_to_bytesAMR_FT_NO_DATA == bytes) + return AMR_FT_NO_DATA; + return -1; } int osmo_amr_ft_valid(uint8_t amr_ft) { - /* - * Extracted from RFC3267: - * - * "... with a FT value in the range 9-14 for AMR ... the whole packet - * SHOULD be discarded." - * - * "... packets containing only NO_DATA frames (FT=15) SHOULD NOT be - * transmitted." - * - * So, let's discard frames with a AMR FT >= 9. - */ - if (amr_ft >= AMR_FT_MAX) - return 0; - - return 1; + return amr_ft <= AMR_FT_PDC_EFR_SID || amr_ft == AMR_FT_NO_DATA; } /*! Check if an AMR frame is octet aligned by looking at the padding bits. * \paraminout payload user provided memory containing the AMR payload. * \paramin payload_len overall length of the AMR payload. * \returns true when the payload is octet aligned. */ -bool osmo_amr_is_oa(uint8_t *payload, unsigned int payload_len) +bool osmo_amr_is_oa(const uint8_t *payload, unsigned int payload_len) { /* NOTE: The distinction between octet-aligned and bandwith-efficient * mode normally relys on out of band methods that explicitly select @@ -172,7 +188,7 @@ } /* Calculate new payload length */ - bwe_payload_len = (10 + osmo_amr_bits(ft) + 7) / 8; + bwe_payload_len = OSMO_BYTES_FOR_BITS(AMR_HDR_BWE_LEN_BITS + osmo_amr_bits(ft)); return bwe_payload_len; } @@ -187,11 +203,14 @@ { uint8_t buf256; /* The header is only valid after shifting first two bytes to OA mode */ + struct amr_hdr_bwe *bwe_hdr = (struct amr_hdr_bwe *)payload; struct amr_hdr *oa_hdr; unsigned int i; - int oa_payload_len; + unsigned int oa_payload_len; + uint8_t ft; - memset(buf, 0, sizeof(buf)); + if (payload_len < sizeof(struct amr_hdr_bwe)) + return -1; if (payload_len + 1 > payload_maxlen) return -1; @@ -199,21 +218,27 @@ if (payload_len + 1 > sizeof(buf)) return -1; - buf0 = payload0 & 0xf0; - buf1 = payload0 << 4; - buf1 |= (payload1 >> 4) & 0x0c; + ft = (bwe_hdr->ft_hi << 1) | bwe_hdr->ft_lo; + if (!osmo_amr_ft_valid(ft)) + return -1; + if (OSMO_BYTES_FOR_BITS(AMR_HDR_BWE_LEN_BITS + osmo_amr_bits(ft)) > payload_len) + return -1; + + memset(buf, 0, sizeof(buf)); + oa_hdr = (struct amr_hdr *)buf; + oa_hdr->cmr = bwe_hdr->cmr; + oa_hdr->f = bwe_hdr->f; + oa_hdr->ft = ft; + oa_hdr->q = bwe_hdr->q; /* Calculate new payload length */ - oa_hdr = (struct amr_hdr *)buf; - if (!osmo_amr_ft_valid(oa_hdr->ft)) - return -1; - oa_payload_len = 2 + osmo_amr_bytes(oa_hdr->ft); + oa_payload_len = 2 + osmo_amr_bytes(ft); - for (i = 0; i < oa_payload_len - 3; i++) { - bufi + 2 = payloadi + 1 << 2; - bufi + 2 |= payloadi + 2 >> 6; + for (i = 2; i < oa_payload_len - 1; i++) { + bufi = payloadi - 1 << 2; + bufi |= payloadi >> 6; } - bufi + 2 = payloadi + 1 << 2; + bufi = payloadi - 1 << 2; memcpy(payload, buf, oa_payload_len); return oa_payload_len; @@ -243,8 +268,9 @@ amr_speech_len_bits = osmo_amr_bits(ft); amr_speech_len_bytes = osmo_amr_bytes(ft); - required_len_bits = amr_speech_len_bits + 10; /* shift of 10 bits */ - if (payload_len < (required_len_bits + 7)/8) + /* shift of AMR_HDR_BWE_LEN_BITS (10) bits, aka remove BWE Hdr + ToC: */ + required_len_bits = AMR_HDR_BWE_LEN_BITS + amr_speech_len_bits;
View file
libosmo-netif_1.2.0.tar.xz/src/osmux.c -> libosmo-netif_1.3.0.tar.xz/src/osmux.c
Changed
@@ -1,7 +1,7 @@ /* * (C) 2012-2017 by Pablo Neira Ayuso <pablo@gnumonks.org> * (C) 2012 by On Waves ehf <http://www.on-waves.com> - * (C) 2015-2017 by sysmocom - s.f.m.c. GmbH + * (C) 2015-2022 by sysmocom - s.f.m.c. GmbH * * SPDX-License-Identifier: GPL-2.0+ * @@ -44,977 +44,11 @@ * \brief Osmocom multiplex protocol helpers */ - -/* This allows you to debug timing reconstruction in the output path */ -#if 0 -#define DEBUG_TIMING 0 -#endif - -/* This allows you to debug osmux message transformations (spamming) */ -#if 0 -#define DEBUG_MSG 0 -#endif - -/* delta time between two RTP messages (in microseconds) */ -#define DELTA_RTP_MSG 20000 -/* delta time between two RTP messages (in samples, 8kHz) */ -#define DELTA_RTP_TIMESTAMP 160 - -static void *osmux_ctx; - static uint32_t osmux_get_payload_len(struct osmux_hdr *osmuxh) { return osmo_amr_bytes(osmuxh->amr_ft) * (osmuxh->ctr+1); } -static uint32_t osmux_ft_dummy_size(uint8_t amr_ft, uint8_t batch_factor) -{ - return sizeof(struct osmux_hdr) + (osmo_amr_bytes(amr_ft) * batch_factor); -} - -struct osmux_hdr *osmux_xfrm_output_pull(struct msgb *msg) -{ - struct osmux_hdr *osmuxh; -next: - osmuxh = NULL; - if (msg->len > sizeof(struct osmux_hdr)) { - size_t len; - - osmuxh = (struct osmux_hdr *)msg->data; - - switch (osmuxh->ft) { - case OSMUX_FT_VOICE_AMR: - break; - case OSMUX_FT_DUMMY: - len = osmux_ft_dummy_size(osmuxh->amr_ft, osmuxh->ctr + 1); - if (msgb_length(msg) < len) { - LOGP(DLMUX, LOGL_ERROR, "Discarding bad Dummy FT: %s\n", - osmo_hexdump(msg->data, msgb_length(msg))); - return NULL; - } - msgb_pull(msg, len); - goto next; - default: - LOGP(DLMUX, LOGL_ERROR, "Discarding unsupported Osmux FT %d\n", - osmuxh->ft); - return NULL; - } - if (!osmo_amr_ft_valid(osmuxh->amr_ft)) { - LOGP(DLMUX, LOGL_ERROR, "Discarding bad AMR FT %d\n", - osmuxh->amr_ft); - return NULL; - } - - len = osmo_amr_bytes(osmuxh->amr_ft) * (osmuxh->ctr+1) + - sizeof(struct osmux_hdr); - - if (msgb_length(msg) < len) { - LOGP(DLMUX, LOGL_ERROR, - "Discarding malformed OSMUX message: %s\n", - osmo_hexdump(msg->data, msgb_length(msg))); - return NULL; - } - - msgb_pull(msg, len); - } else if (msg->len > 0) { - LOGP(DLMUX, LOGL_ERROR, - "remaining %d bytes, broken osmuxhdr?\n", msg->len); - } - - return osmuxh; -} - -static struct msgb * -osmux_rebuild_rtp(struct osmux_out_handle *h, struct osmux_hdr *osmuxh, - void *payload, int payload_len, bool first_pkt) -{ - struct msgb *prev_msg, *out_msg; - struct timespec *prev_ts, *out_ts; - struct rtp_hdr *rtph; - struct amr_hdr *amrh; - struct timespec delta = { .tv_sec = 0, .tv_nsec = DELTA_RTP_MSG*1000 }; - - out_msg = msgb_alloc(sizeof(struct rtp_hdr) + - sizeof(struct amr_hdr) + - osmo_amr_bytes(osmuxh->amr_ft), - "OSMUX test"); - if (out_msg == NULL) - return NULL; - - /* Reconstruct RTP header */ - rtph = (struct rtp_hdr *)out_msg->data; - rtph->csrc_count = 0; - rtph->extension = 0; - rtph->version = RTP_VERSION; - rtph->payload_type = h->rtp_payload_type; - /* ... emulate timestamp and ssrc */ - rtph->timestamp = htonl(h->rtp_timestamp); - rtph->sequence = htons(h->rtp_seq); - rtph->ssrc = htonl(h->rtp_ssrc); - /* rtp packet with the marker bit is always guaranteed to be the first - * one. We want to notify with marker in 2 scenarios: - * 1- Sender told us through osmux frame rtp_m. - * 2- Sntermediate osmux frame lost (seq gap), otherwise rtp receiver only sees - * steady increase of delay - */ - rtph->marker = first_pkt && - (osmuxh->rtp_m || (osmuxh->seq != h->osmux_seq_ack + 1)); - - msgb_put(out_msg, sizeof(struct rtp_hdr)); - - /* Reconstruct AMR header */ - amrh = (struct amr_hdr *)out_msg->tail; - amrh->cmr = osmuxh->amr_cmr; - amrh->f = osmuxh->amr_f; - amrh->ft = osmuxh->amr_ft; - amrh->q = osmuxh->amr_q; - - msgb_put(out_msg, sizeof(struct amr_hdr)); - - /* add AMR speech data */ - memcpy(out_msg->tail, payload, payload_len); - msgb_put(out_msg, payload_len); - - /* bump last RTP sequence number and timestamp that has been used */ - h->rtp_seq++; - h->rtp_timestamp += DELTA_RTP_TIMESTAMP; - - out_ts = ((struct timespec *)&((out_msg)->cb0)); - if (first_pkt || llist_empty(&h->list)) { - osmo_clock_gettime(CLOCK_MONOTONIC, out_ts); - } else { - prev_msg = llist_last_entry(&h->list, struct msgb, list); - prev_ts = ((struct timespec *)&((prev_msg)->cb0)); - timespecadd(prev_ts, &delta, out_ts); - } - - return out_msg; -} - -int osmux_xfrm_output(struct osmux_hdr *osmuxh, struct osmux_out_handle *h, - struct llist_head *list) -{ - struct msgb *msg; - int i; - - INIT_LLIST_HEAD(list); - - for (i=0; i<osmuxh->ctr+1; i++) { - struct rtp_hdr *rtph; - - msg = osmux_rebuild_rtp(h, osmuxh, - osmux_get_payload(osmuxh) + - i * osmo_amr_bytes(osmuxh->amr_ft), - osmo_amr_bytes(osmuxh->amr_ft), !i); - if (msg == NULL) - continue; - - rtph = osmo_rtp_get_hdr(msg); - if (rtph == NULL) - continue; - -#ifdef DEBUG_MSG - { - char buf4096; - - osmo_rtp_snprintf(buf, sizeof(buf), msg); - bufsizeof(buf)-1 = '\0'; - LOGP(DLMUX, LOGL_DEBUG, "to BTS: %s\n", buf); - } -#endif - llist_add_tail(&msg->list, list); - } - - /* Update last seen seq number: */ - h->osmux_seq_ack = osmuxh->seq; - - return i; -} -
View file
libosmo-netif_1.3.0.tar.xz/src/osmux_input.c
Added
@@ -0,0 +1,858 @@ +/* + * (C) 2012-2017 by Pablo Neira Ayuso <pablo@gnumonks.org> + * (C) 2012 by On Waves ehf <http://www.on-waves.com> + * (C) 2015-2022 by sysmocom - s.f.m.c. GmbH + * + * 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. + */ + +#include <stdio.h> +#include <string.h> +#include <inttypes.h> + +#include <osmocom/core/msgb.h> +#include <osmocom/core/timer.h> +#include <osmocom/core/timer_compat.h> +#include <osmocom/core/select.h> +#include <osmocom/core/talloc.h> +#include <osmocom/core/logging.h> + +#include <osmocom/netif/amr.h> +#include <osmocom/netif/rtp.h> +#include <osmocom/netif/osmux.h> + +#include <arpa/inet.h> + +/*! \addtogroup osmux Osmocom Multiplex Protocol + * @{ + * + * This code implements a variety of utility functions related to the + * OSMUX user-plane multiplexing protocol, an efficient alternative to + * plain UDP/RTP streams for voice transport in back-haul of cellular + * networks. + * + * For information about the OSMUX protocol design, please see the + * OSMUX reference manual at + * http://ftp.osmocom.org/docs/latest/osmux-reference.pdf + */ + +/*! \file osmux_input.c + * \brief Osmocom multiplex protocol helpers (input) + */ + +/* This allows you to debug osmux message transformations (spamming) */ +#if 0 +#define DEBUG_MSG 0 +#endif + +/* delta time between two RTP messages (in microseconds) */ +#define DELTA_RTP_MSG 20000 +/* delta time between two RTP messages (in samples, 8kHz) */ +#define DELTA_RTP_TIMESTAMP 160 + +#define LOGMUXLK_(link, lvl, fmt, args ...) \ + LOGP(DLMUX, lvl, "%s,%u/%" PRIu16 "" fmt, \ + (link)->name, (link)->h->batch_size - (link)->remaining_bytes, \ + (link)->h->batch_size, \ + ## args) + +#define LOGMUXLK(link, lvl, fmt, args ...) \ + LOGMUXLK_(link, lvl, " " fmt, ## args) + +#define LOGMUXCID(link, circuit, lvl, fmt, args ...) \ + LOGMUXLK_(link, lvl, "CID=%" PRIu8 ",batched=%u/%u " fmt, \ + (circuit)->ccid, (circuit)->nmsgs, (link)->h->batch_factor, ## args) + + +static void *osmux_ctx; + +static uint32_t osmux_ft_dummy_size(uint8_t amr_ft, uint8_t batch_factor) +{ + return sizeof(struct osmux_hdr) + (osmo_amr_bytes(amr_ft) * batch_factor); +} + +/* This is (struct osmux_in_handle)->internal_data. + * TODO: API have been defined to access all fields of osmux_in_handle + * (deprecated osmux_xfrm_input_init()), hence at some point we remove struct + * osmux_in_handle definition from osmux.h and we move it here internally and + * merge it with struct osmux_link. + */ +struct osmux_link { + struct osmo_timer_list timer; + struct osmux_hdr *osmuxh; + struct llist_head circuit_list; + unsigned int remaining_bytes; + uint32_t nmsgs; + int ndummy; + char *name; + struct osmux_in_handle *h; /* backpointer to parent object */ +}; + +struct osmux_circuit { + struct llist_head head; + int ccid; + struct llist_head msg_list; + int nmsgs; + int dummy; + uint8_t seq; + int32_t last_transmitted_rtp_seq; /* -1 = unset */ + uint32_t last_transmitted_rtp_ts; /* Check last_transmitted_rtp_seq = -1 to detect unset */ +}; + +/* Used internally to temporarily cache all parsed content of an RTP pkt from user to be transmitted as Osmux */ +struct osmux_in_req { + struct osmux_circuit *circuit; + struct msgb *msg; + struct rtp_hdr *rtph; + uint32_t rtp_payload_len; + struct amr_hdr *amrh; + int amr_payload_len; +}; + +/* returns: 1 if batch is full, 0 if batch still not full, negative on error. */ +static int osmux_circuit_enqueue(struct osmux_link *link, struct osmux_circuit *circuit, struct msgb *msg) +{ + /* Validate amount of messages per batch. The counter field of the + * osmux header is just 3 bits long, so make sure it doesn't overflow. + */ + OSMO_ASSERT(link->h->batch_factor <= 8); + if (circuit->nmsgs >= link->h->batch_factor) { + struct rtp_hdr *rtph; + + rtph = osmo_rtp_get_hdr(msg); + if (rtph == NULL) + return -1; + + LOGMUXCID(link, circuit, LOGL_DEBUG, "Batch is full for RTP sssrc=%u\n", rtph->ssrc); + return 1; + } + + llist_add_tail(&msg->list, &circuit->msg_list); + circuit->nmsgs++; + return 0; +} + +static void osmux_circuit_dequeue(struct osmux_circuit *circuit, struct msgb *msg) +{ + llist_del(&msg->list); + circuit->nmsgs--; +} + +static void osmux_circuit_del_msgs(struct osmux_link *link, struct osmux_circuit *circuit) +{ + struct msgb *cur, *tmp; + llist_for_each_entry_safe(cur, tmp, &circuit->msg_list, list) { + osmux_circuit_dequeue(circuit, cur); + msgb_free(cur); + link->nmsgs--; + } +} + +struct osmux_input_state { + struct msgb *out_msg; + struct msgb *msg; + struct rtp_hdr *rtph; + struct amr_hdr *amrh; + uint32_t amr_payload_len; + struct osmux_circuit *circuit; + int add_osmux_hdr; +}; + +static int osmux_link_put(struct osmux_link *link, struct osmux_input_state *state) +{ + uint16_t rtp_seqnum = ntohs(state->rtph->sequence); + + if (state->add_osmux_hdr) { + bool seq_jump = state->circuit->last_transmitted_rtp_seq != -1 && + ((state->circuit->last_transmitted_rtp_seq + 1) & 0xffff) != rtp_seqnum; + struct osmux_hdr *osmuxh; + osmuxh = (struct osmux_hdr *)msgb_put(state->out_msg, + sizeof(struct osmux_hdr)); + osmuxh->ft = OSMUX_FT_VOICE_AMR; + osmuxh->ctr = 0; + osmuxh->rtp_m = state->rtph->marker || seq_jump; + osmuxh->seq = state->circuit->seq++; + osmuxh->circuit_id = state->circuit->ccid; + osmuxh->amr_ft = state->amrh->ft; + + /* annotate current osmux header */ + link->osmuxh = osmuxh; + } else { + if (link->osmuxh->ctr == 0x7) { + LOGMUXCID(link, state->circuit, LOGL_ERROR, + "Cannot encode RTP pkt ssrc=%u into osmux batch, too many packets\n", + state->rtph->ssrc); + return 0; + } + link->osmuxh->ctr++; + } + /* For fields below, we only use the last included in batch and ignore any previous: */ + link->osmuxh->amr_cmr = state->amrh->cmr; + link->osmuxh->amr_f = state->amrh->f; + link->osmuxh->amr_q = state->amrh->q; + + if (state->amr_payload_len > 0) {
View file
libosmo-netif_1.3.0.tar.xz/src/osmux_output.c
Added
@@ -0,0 +1,396 @@ +/* + * (C) 2012-2017 by Pablo Neira Ayuso <pablo@gnumonks.org> + * (C) 2012 by On Waves ehf <http://www.on-waves.com> + * (C) 2015-2022 by sysmocom - s.f.m.c. GmbH + * + * 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. + */ + +#include <stdio.h> +#include <string.h> + +#include <osmocom/core/msgb.h> +#include <osmocom/core/timer.h> +#include <osmocom/core/timer_compat.h> +#include <osmocom/core/select.h> +#include <osmocom/core/talloc.h> +#include <osmocom/core/logging.h> + +#include <osmocom/netif/amr.h> +#include <osmocom/netif/rtp.h> +#include <osmocom/netif/osmux.h> + +#include <arpa/inet.h> + +/*! \addtogroup osmux Osmocom Multiplex Protocol + * @{ + * + * This code implements a variety of utility functions related to the + * OSMUX user-plane multiplexing protocol, an efficient alternative to + * plain UDP/RTP streams for voice transport in back-haul of cellular + * networks. + * + * For information about the OSMUX protocol design, please see the + * OSMUX reference manual at + * http://ftp.osmocom.org/docs/latest/osmux-reference.pdf + */ + +/*! \file osmux_output.c + * \brief Osmocom multiplex protocol helpers (output) + */ + +/* delta time between two RTP messages (in microseconds) */ +#define DELTA_RTP_MSG 20000 +/* delta time between two RTP messages (in samples, 8kHz) */ +#define DELTA_RTP_TIMESTAMP 160 + +static uint32_t osmux_ft_dummy_size(uint8_t amr_ft, uint8_t batch_factor) +{ + return sizeof(struct osmux_hdr) + (osmo_amr_bytes(amr_ft) * batch_factor); +} + +struct osmux_hdr *osmux_xfrm_output_pull(struct msgb *msg) +{ + struct osmux_hdr *osmuxh; + size_t len; + +next: + if (msgb_length(msg) == 0) + return NULL; /* base case, we drained the msg successfully, tell user it is done. */ + + if (msgb_length(msg) < sizeof(struct osmux_hdr)) { + LOGP(DLMUX, LOGL_ERROR, "remaining %d bytes, broken osmuxhdr?\n", msgb_length(msg)); + return NULL; + } + + osmuxh = (struct osmux_hdr *)msgb_data(msg); + switch (osmuxh->ft) { + case OSMUX_FT_VOICE_AMR: + if (!osmo_amr_ft_valid(osmuxh->amr_ft)) { + LOGP(DLMUX, LOGL_ERROR, "Discarding bad AMR FT %d\n", osmuxh->amr_ft); + return NULL; + } + len = osmo_amr_bytes(osmuxh->amr_ft) * (osmuxh->ctr + 1) + sizeof(struct osmux_hdr); + if (msgb_length(msg) < len) { + LOGP(DLMUX, LOGL_ERROR, + "Discarding malformed OSMUX message: %s\n", + osmo_hexdump(msgb_data(msg), msgb_length(msg))); + return NULL; + } + msgb_pull(msg, len); + return osmuxh; + + case OSMUX_FT_DUMMY: + if (!osmo_amr_ft_valid(osmuxh->amr_ft)) { + LOGP(DLMUX, LOGL_ERROR, "Discarding bad Dummy FT: amr_ft=%u\n", osmuxh->amr_ft); + return NULL; + } + len = osmux_ft_dummy_size(osmuxh->amr_ft, osmuxh->ctr + 1); + if (msgb_length(msg) < len) { + LOGP(DLMUX, LOGL_ERROR, "Discarding bad Dummy FT: %s\n", + osmo_hexdump(msgb_data(msg), msgb_length(msg))); + return NULL; + } + msgb_pull(msg, len); + goto next; + + default: + LOGP(DLMUX, LOGL_ERROR, "Discarding unsupported Osmux FT %d\n", + osmuxh->ft); + return NULL; + } +} + +static struct msgb * +osmux_rebuild_rtp(struct osmux_out_handle *h, struct osmux_hdr *osmuxh, + void *payload, int payload_len, bool first_pkt) +{ + struct msgb *prev_msg, *out_msg; + struct timespec *prev_ts, *out_ts; + struct rtp_hdr *rtph; + struct amr_hdr *amrh; + struct timespec delta = { .tv_sec = 0, .tv_nsec = DELTA_RTP_MSG*1000 }; + unsigned int msg_len = sizeof(struct rtp_hdr) + + sizeof(struct amr_hdr) + + payload_len; + + if (h->rtp_msgb_alloc_cb) { + out_msg = h->rtp_msgb_alloc_cb(h->rtp_msgb_alloc_cb_data, msg_len); + } else { + out_msg = msgb_alloc(msg_len, "osmux-rtp"); + } + if (out_msg == NULL) + return NULL; + + /* Reconstruct RTP header */ + rtph = (struct rtp_hdr *)out_msg->data; + rtph->csrc_count = 0; + rtph->extension = 0; + rtph->version = RTP_VERSION; + rtph->payload_type = h->rtp_payload_type; + /* ... emulate timestamp and ssrc */ + rtph->timestamp = htonl(h->rtp_timestamp); + rtph->sequence = htons(h->rtp_seq); + rtph->ssrc = htonl(h->rtp_ssrc); + /* rtp packet with the marker bit is always guaranteed to be the first + * one. We want to notify with marker in 2 scenarios: + * 1- Sender told us through osmux frame rtp_m. + * 2- Intermediate osmux frame lost (seq gap), otherwise rtp receiver only sees + * steady increase of delay + */ + rtph->marker = first_pkt && + (osmuxh->rtp_m || (osmuxh->seq != ((h->osmux_seq_ack + 1) & 0xff))); + + msgb_put(out_msg, sizeof(struct rtp_hdr)); + + /* Reconstruct AMR header */ + amrh = (struct amr_hdr *)out_msg->tail; + amrh->cmr = osmuxh->amr_cmr; + amrh->f = osmuxh->amr_f; + amrh->ft = osmuxh->amr_ft; + amrh->q = osmuxh->amr_q; + + msgb_put(out_msg, sizeof(struct amr_hdr)); + + /* add AMR speech data */ + if (payload_len > 0) { + memcpy(out_msg->tail, payload, payload_len); + msgb_put(out_msg, payload_len); + } + + /* bump last RTP sequence number and timestamp that has been used */ + h->rtp_seq++; + h->rtp_timestamp += DELTA_RTP_TIMESTAMP; + + out_ts = ((struct timespec *)&((out_msg)->cb0)); + if (first_pkt || llist_empty(&h->list)) { + osmo_clock_gettime(CLOCK_MONOTONIC, out_ts); + } else { + prev_msg = llist_last_entry(&h->list, struct msgb, list); + prev_ts = ((struct timespec *)&((prev_msg)->cb0)); + timespecadd(prev_ts, &delta, out_ts); + } + + return out_msg; +} + +static void osmux_xfrm_output_trigger(void *data) +{ + struct osmux_out_handle *h = data; + struct timespec delay_ts, now; + struct msgb *msg, *next; + + llist_for_each_entry_safe(msg, next, &h->list, list) { + osmo_clock_gettime(CLOCK_MONOTONIC, &now); + struct timespec *msg_ts = ((struct timespec *)&((msg)->cb0)); + if (timespeccmp(msg_ts, &now, >)) { + timespecsub(msg_ts, &now, &delay_ts); + osmo_timer_schedule(&h->timer, + delay_ts.tv_sec, delay_ts.tv_nsec / 1000); + return; + } + + /* Transmit the rtp packet */ + llist_del(&msg->list);
View file
libosmo-netif_1.2.0.tar.xz/src/rtp.c -> libosmo-netif_1.3.0.tar.xz/src/rtp.c
Changed
@@ -89,13 +89,14 @@ struct rtp_hdr *osmo_rtp_get_hdr(struct msgb *msg) { - struct rtp_hdr *rtph = (struct rtp_hdr *)msg->data; + struct rtp_hdr *rtph; if (msg->len < sizeof(struct rtp_hdr)) { DEBUGPC(DLMUX, "received RTP frame too short (len = %d)\n", msg->len); return NULL; } + rtph = (struct rtp_hdr *)msg->data; if (rtph->version != RTP_VERSION) { DEBUGPC(DLMUX, "received RTP version %d not supported.\n", rtph->version); @@ -198,7 +199,8 @@ rtph->timestamp = htonl(h->tx.timestamp); h->tx.timestamp += duration; rtph->ssrc = htonl(h->tx.ssrc); - memcpy(msg->data + sizeof(struct rtp_hdr), data, payload_len); + if (payload_len > 0) + memcpy(msg->data + sizeof(struct rtp_hdr), data, payload_len); msgb_put(msg, sizeof(struct rtp_hdr) + payload_len); return msg;
View file
libosmo-netif_1.2.0.tar.xz/src/sctp.c -> libosmo-netif_1.3.0.tar.xz/src/sctp.c
Changed
@@ -10,6 +10,19 @@ { 0, NULL } }; +const struct value_string osmo_sctp_paddr_chg_strs = { + { SCTP_ADDR_AVAILABLE, "ADDR_AVAILABLE" }, + { SCTP_ADDR_UNREACHABLE, "ADDR_UNREACHABLE" }, + { SCTP_ADDR_REMOVED, "ADDR_REMOVED" }, + { SCTP_ADDR_ADDED, "ADDR_ADDED" }, + { SCTP_ADDR_MADE_PRIM, "ADDR_MADE_PRIM" }, + { SCTP_ADDR_CONFIRMED, "ADDR_CONFIRMED" }, +#ifdef SCTP_ADDR_PF + { SCTP_ADDR_PF, "ADDR_POTENTIALLY_FAILED" }, +#endif + { 0, NULL } +}; + const struct value_string osmo_sctp_sn_type_strs = { { SCTP_ASSOC_CHANGE, "ASSOC_CHANGE" }, { SCTP_PEER_ADDR_CHANGE, "PEER_ADDR_CHANGE" }, @@ -26,3 +39,15 @@ #endif { 0, NULL } }; + + +const struct value_string osmo_sctp_sn_error_strs = { + { SCTP_FAILED_THRESHOLD, "FAILED_THRESHOLD" }, + { SCTP_RECEIVED_SACK, "RECEIVED_SACK" }, + { SCTP_HEARTBEAT_SUCCESS, "HEARTBEAT_SUCCESS" }, + { SCTP_RESPONSE_TO_USER_REQ, "RESPONSE_TO_USER_REQ" }, + { SCTP_INTERNAL_ERROR, "INTERNAL_ERROR" }, + { SCTP_SHUTDOWN_GUARD_EXPIRES, "SHUTDOWN_GUARD_EXPIRES" }, + { SCTP_PEER_FAULTY, "PEER_FAULTY" }, + { 0, NULL } +};
View file
libosmo-netif_1.2.0.tar.xz/src/stream.c -> libosmo-netif_1.3.0.tar.xz/src/stream.c
Changed
@@ -49,6 +49,8 @@ #include <netinet/sctp.h> #endif +#include <osmocom/netif/sctp.h> + #define LOGSCLI(cli, level, fmt, args...) \ LOGP(DLINP, level, "%s %s(): " fmt, get_value_string(stream_cli_state_names, (cli)->state), __func__, ## args) @@ -87,7 +89,7 @@ return -1; } -static int sctp_sockopt_event_subscribe_size = 0; +static unsigned int sctp_sockopt_event_subscribe_size = 0; static int determine_sctp_sockopt_event_subscribe_size(void) { @@ -96,7 +98,7 @@ int sd, rc; /* only do this once */ - if (sctp_sockopt_event_subscribe_size != 0) + if (sctp_sockopt_event_subscribe_size > 0) return 0; sd = socket(AF_INET, SOCK_STREAM, IPPROTO_SCTP); @@ -108,7 +110,7 @@ if (rc < 0) return rc; - sctp_sockopt_event_subscribe_size = buf_len; + sctp_sockopt_event_subscribe_size = (unsigned int)buf_len; LOGP(DLINP, LOGL_INFO, "sizes of 'struct sctp_event_subscribe': compile-time %zu, kernel: %u\n", sizeof(struct sctp_event_subscribe), sctp_sockopt_event_subscribe_size); @@ -333,16 +335,14 @@ struct sctp_sndrcvinfo sinfo; #endif struct msgb *msg; - struct llist_head *lh; int ret; if (llist_empty(&cli->tx_queue)) { osmo_fd_write_disable(&cli->ofd); return 0; } - lh = cli->tx_queue.next; - llist_del(lh); - msg = llist_entry(lh, struct msgb, list); + msg = llist_first_entry(&cli->tx_queue, struct msgb, list); + llist_del(&msg->list); if (!osmo_stream_cli_is_connected(cli)) { LOGSCLI(cli, LOGL_ERROR, "not connected, dropping data!\n"); @@ -353,7 +353,7 @@ switch (cli->sk_domain) { case AF_UNIX: - ret = send(cli->ofd.fd, msg->data, msg->len, 0); + ret = send(cli->ofd.fd, msgb_data(msg), msgb_length(msg), 0); break; case AF_UNSPEC: case AF_INET: @@ -364,26 +364,40 @@ memset(&sinfo, 0, sizeof(sinfo)); sinfo.sinfo_ppid = htonl(msgb_sctp_ppid(msg)); sinfo.sinfo_stream = msgb_sctp_stream(msg); - ret = sctp_send(cli->ofd.fd, msg->data, msgb_length(msg), + ret = sctp_send(cli->ofd.fd, msgb_data(msg), msgb_length(msg), &sinfo, MSG_NOSIGNAL); break; #endif case IPPROTO_TCP: default: - ret = send(cli->ofd.fd, msg->data, msgb_length(msg), 0); + ret = send(cli->ofd.fd, msgb_data(msg), msgb_length(msg), 0); break; } break; default: ret = -ENOTSUP; } + + if (ret >= 0 && ret < msgb_length(msg)) { + LOGP(DLINP, LOGL_ERROR, "short send: %d < exp %u\n", ret, msgb_length(msg)); + /* Update msgb and re-add it at the start of the queue: */ + msgb_pull(msg, ret); + llist_add(&msg->list, &cli->tx_queue); + return 0; + } + if (ret < 0) { if (errno == EPIPE || errno == ENOTCONN) { osmo_stream_cli_reconnect(cli); } LOGSCLI(cli, LOGL_ERROR, "error %d to send\n", ret); } + msgb_free(msg); + + if (llist_empty(&cli->tx_queue)) + osmo_fd_write_disable(&cli->ofd); + return 0; } @@ -870,6 +884,8 @@ * \paramin msg Message buffer to enqueue in transmit queue */ void osmo_stream_cli_send(struct osmo_stream_cli *cli, struct msgb *msg) { + OSMO_ASSERT(cli); + OSMO_ASSERT(msg); msgb_enqueue(&cli->tx_queue, msg); osmo_fd_write_enable(&cli->ofd); } @@ -881,6 +897,8 @@ int osmo_stream_cli_recv(struct osmo_stream_cli *cli, struct msgb *msg) { int ret; + OSMO_ASSERT(cli); + OSMO_ASSERT(msg); ret = recv(cli->ofd.fd, msg->data, msg->data_len, 0); if (ret < 0) { @@ -899,6 +917,15 @@ return ret; } +void osmo_stream_cli_clear_tx_queue(struct osmo_stream_cli *cli) +{ + msgb_queue_free(&cli->tx_queue); + /* If in state 'connecting', keep WRITE flag up to receive + * socket connection signal and then transition to STATE_CONNECTED: */ + if (cli->state == STREAM_CLI_STATE_CONNECTED) + osmo_fd_write_disable(&cli->ofd); +} + /* * Server side. */ @@ -1287,22 +1314,20 @@ struct sctp_sndrcvinfo sinfo; #endif struct msgb *msg; - struct llist_head *lh; int ret; - LOGP(DLINP, LOGL_DEBUG, "sending data\n"); - if (llist_empty(&conn->tx_queue)) { osmo_fd_write_disable(&conn->ofd); return; } - lh = conn->tx_queue.next; - llist_del(lh); - msg = llist_entry(lh, struct msgb, list); + msg = llist_first_entry(&conn->tx_queue, struct msgb, list); + llist_del(&msg->list); + + LOGP(DLINP, LOGL_DEBUG, "sending %u bytes of data\n", msg->len); switch (conn->srv->sk_domain) { case AF_UNIX: - ret = send(conn->ofd.fd, msg->data, msg->len, 0); + ret = send(conn->ofd.fd, msgb_data(msg), msgb_length(msg), 0); break; case AF_INET: case AF_INET6: @@ -1313,26 +1338,39 @@ memset(&sinfo, 0, sizeof(sinfo)); sinfo.sinfo_ppid = htonl(msgb_sctp_ppid(msg)); sinfo.sinfo_stream = msgb_sctp_stream(msg); - ret = sctp_send(conn->ofd.fd, msg->data, msgb_length(msg), + ret = sctp_send(conn->ofd.fd, msgb_data(msg), msgb_length(msg), &sinfo, MSG_NOSIGNAL); break; #endif case IPPROTO_TCP: default: - ret = send(conn->ofd.fd, msg->data, msg->len, 0); + ret = send(conn->ofd.fd, msgb_data(msg), msgb_length(msg), 0); break; } break; default: - ret = -ENOTSUP; + ret = -1; + errno = ENOTSUP; } - if (ret < 0) { - LOGP(DLINP, LOGL_ERROR, "error to send\n"); + + if (ret >= 0 && ret < msgb_length(msg)) { + LOGP(DLINP, LOGL_ERROR, "short send: %d < exp %u\n", ret, msgb_length(msg)); + /* Update msgb and re-add it at the start of the queue: */ + msgb_pull(msg, ret); + llist_add(&msg->list, &conn->tx_queue); + return; }
View file
libosmo-netif_1.2.0.tar.xz/tests/Makefile.am -> libosmo-netif_1.3.0.tar.xz/tests/Makefile.am
Changed
@@ -1,14 +1,24 @@ AM_CFLAGS = -Wall -I$(top_srcdir)/include $(LIBOSMOCORE_CFLAGS) -g AM_LDFLAGS = $(LIBOSMOCORE_LDFLAGS) -no-install -check_PROGRAMS = osmux/osmux_test osmux/osmux_test2 stream/stream_test jibuf/jibuf_test amr/amr_test +check_PROGRAMS = \ + osmux/osmux_test \ + osmux/osmux_output_test \ + osmux/osmux_input_test \ + stream/stream_test \ + jibuf/jibuf_test \ + amr/amr_test \ + $(NULL) check_HEADERS = osmux_osmux_test_SOURCES = osmux/osmux_test.c osmux_osmux_test_LDADD = $(LIBOSMOCORE_LIBS) $(LIBOSMOGSM_LIBS) $(top_builddir)/src/libosmonetif.la -osmux_osmux_test2_SOURCES = osmux/osmux_test2.c -osmux_osmux_test2_LDADD = $(LIBOSMOCORE_LIBS) $(LIBOSMOGSM_LIBS) $(top_builddir)/src/libosmonetif.la +osmux_osmux_output_test_SOURCES = osmux/osmux_output_test.c +osmux_osmux_output_test_LDADD = $(LIBOSMOCORE_LIBS) $(LIBOSMOGSM_LIBS) $(top_builddir)/src/libosmonetif.la + +osmux_osmux_input_test_SOURCES = osmux/osmux_input_test.c +osmux_osmux_input_test_LDADD = $(LIBOSMOCORE_LIBS) $(LIBOSMOGSM_LIBS) $(top_builddir)/src/libosmonetif.la stream_stream_test_SOURCES = stream/stream_test.c stream_stream_test_LDADD = $(LIBOSMOCORE_LIBS) $(LIBOSMOGSM_LIBS) $(top_builddir)/src/libosmonetif.la @@ -62,7 +72,8 @@ EXTRA_DIST = testsuite.at $(srcdir)/package.m4 $(TESTSUITE) \ osmux/osmux_test.ok \ - osmux/osmux_test2.ok \ + osmux/osmux_output_test.ok \ + osmux/osmux_input_test.ok \ stream/stream_test.ok \ stream/stream_test.err \ jibuf/jibuf_test.ok \
View file
libosmo-netif_1.2.0.tar.xz/tests/amr/amr_test.c -> libosmo-netif_1.3.0.tar.xz/tests/amr/amr_test.c
Changed
@@ -48,7 +48,8 @@ "0004f89d67f1160935bde1996840", "0004633cc7f0630439ffe0000000", "0004eb81fc0758973b9edc782550", - "a078ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00fc", /* sample with invalid FT, will be detected as bandwith-efficient */ + "a070ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00fc", /* sample with invalid FT=14, will be detected as bandwith-efficient */ + "a078", /* sample with FT=15 NO_DATA */ "END", }; @@ -71,6 +72,7 @@ "f3c381bc7061c9f8507f6029de6115c16e5fa470c243b21b6e35dbb48bd84c00", "73c901b7a2004be7f85284b6ab7142acfe6872b1ae1c107d0588b551de7be650", "a7bfc03fc03fc03fc03fc03fc03fc03fc03fc03fc03fc03fc03fc03fc03fc03f", /* sample with invalid FT */ + "4780", /* FT=15 NO_DATA */ "END", }; @@ -209,7 +211,7 @@ { uint8_t buf256; uint8_t buf_chk256; - unsigned int ft; + int ft; unsigned int i = 0; int len;
View file
libosmo-netif_1.2.0.tar.xz/tests/amr/amr_test.ok -> libosmo-netif_1.3.0.tar.xz/tests/amr/amr_test.ok
Changed
@@ -157,12 +157,19 @@ rc: 14 Sample No.: 22 - octet aligned: a078ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00fc - 101000000111100011111111000000001111111100000000111111110000000011111111000000001111111100000000111111110000000011111111000000001111111100000000111111110000000011111111000000001111111100000000111111110000000011111111000000001111111100000000111111110000000011111100 + octet aligned: a070ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00fc + 101000000111000011111111000000001111111100000000111111110000000011111111000000001111111100000000111111110000000011111111000000001111111100000000111111110000000011111111000000001111111100000000111111110000000011111111000000001111111100000000111111110000000011111100 bw-efficient: (no data) rc: -1 +Sample No.: 23 + octet aligned: a078 + 1010000001111000 + bw-efficient: a780 + 1010011110000000 + rc: 2 + Testing conversion from bw-efficient to octet-aligned: @@ -281,9 +288,16 @@ Sample No.: 16 bw-efficient: a7bfc03fc03fc03fc03fc03fc03fc03fc03fc03fc03fc03fc03fc03fc03fc03f 1010011110111111110000000011111111000000001111111100000000111111110000000011111111000000001111111100000000111111110000000011111111000000001111111100000000111111110000000011111111000000001111111100000000111111110000000011111111000000001111111100000000111111 - octet aligned: - (no data) - rc: -1 + octet aligned: a078 + 1010000001111000 + rc: 2 + +Sample No.: 17 + bw-efficient: 4780 + 0100011110000000 + octet aligned: 4078 + 0100000001111000 + rc: 2 Testing conversion from octet-aligned to bw-efficient and inverse: @@ -310,6 +324,7 @@ Sample No.: 20... AMR mode: 0, OA: 14 bytes, BE: 14 bytes, OA: 14 bytes Sample No.: 21... AMR mode: 0, OA: 14 bytes, BE: 14 bytes, OA: 14 bytes Sample No.: 22... skipping a sample with a wrong FT +Sample No.: 23... AMR mode: 15, OA: 2 bytes, BE: 2 bytes, OA: 2 bytes Testing conversion from IuUP to bw-efficient and inverse: @@ -342,6 +357,7 @@ Sample No.: 20 ==>octet aligned Sample No.: 21 ==>octet aligned Sample No.: 22 ==>bandwith efficient +Sample No.: 23 ==>octet aligned Sample No.: 0 ==>bandwith efficient Sample No.: 1 ==>bandwith efficient Sample No.: 2 ==>bandwith efficient @@ -359,4 +375,5 @@ Sample No.: 14 ==>bandwith efficient Sample No.: 15 ==>bandwith efficient Sample No.: 16 ==>bandwith efficient +Sample No.: 17 ==>bandwith efficient OK: Test passed
View file
libosmo-netif_1.2.0.tar.xz/tests/jibuf/jibuf_test.c -> libosmo-netif_1.3.0.tar.xz/tests/jibuf/jibuf_test.c
Changed
@@ -622,7 +622,7 @@ /* This test aims at testing scenarios described in OS#3262, in which syncpoint packets can provoke a situation in which packets are stored out-of-order in the queue. */ -static void test_rtp_marker_queue_order() +static void test_rtp_marker_queue_order(void) { int min_delay = 60; struct msgb *msg;
View file
libosmo-netif_1.2.0.tar.xz/tests/jibuf/jibuf_tool.c -> libosmo-netif_1.3.0.tar.xz/tests/jibuf/jibuf_tool.c
Changed
@@ -113,7 +113,7 @@ /* Used for test pcap: */ static struct osmo_pcap osmo_pcap; static bool pcap_finished; -static struct osmux_out_handle pcap_osmux_h; +static struct osmux_out_handle *pcap_osmux_h; /* ----------------------------- */ static void sigalarm_handler(int foo) @@ -336,7 +336,7 @@ return cb->data; } -void rand_send_rtp_packet() +void rand_send_rtp_packet(void) { struct rtp_pkt_info *pinfo; @@ -438,7 +438,7 @@ /* This code below belongs to the osmux receiver */ while((osmuxh = osmux_xfrm_output_pull(msg)) != NULL) - osmux_xfrm_output_sched(&pcap_osmux_h, osmuxh); + osmux_xfrm_output_sched(pcap_osmux_h, osmuxh); msgb_free(msg); return 0; } @@ -458,7 +458,7 @@ } } -void rand_test_check() +void rand_test_check(void) { uint32_t drop_threshold = NUM_PACKETS_TO_SEND * 5 / 100; if (packets_dropped > drop_threshold) { @@ -475,7 +475,7 @@ } } -void rand_test() +void rand_test(void) { srandom(time(NULL)); rtp_first_seq = (uint16_t) random(); @@ -503,11 +503,11 @@ rand_test_check(); } -void pcap_test_check() { +void pcap_test_check(void) { } -void pcap_test() { +void pcap_test(void) { osmo_pcap_init(); osmo_pcap.h = osmo_pcap_test_open(opt_pcap_file); @@ -517,8 +517,10 @@ osmo_pcap.timer.cb = pcap_pkt_timer_cb; if(opt_osmux) { - osmux_xfrm_output_init2(&pcap_osmux_h, 0, 98); - osmux_xfrm_output_set_tx_cb(&pcap_osmux_h, glue_cb, NULL); + pcap_osmux_h = osmux_xfrm_output_alloc(NULL); + osmux_xfrm_output_set_rtp_ssrc(pcap_osmux_h, 0); + osmux_xfrm_output_set_rtp_pl_type(pcap_osmux_h, 98); + osmux_xfrm_output_set_tx_cb(pcap_osmux_h, glue_cb, NULL); } jb = osmo_jibuf_alloc(NULL); @@ -532,11 +534,12 @@ while(!pcap_finished || !osmo_jibuf_empty(jb)) { if (pcap_finished && opt_osmux) /* Flushing once should be enough */ - osmux_xfrm_output_flush(&pcap_osmux_h); + osmux_xfrm_output_flush(pcap_osmux_h); osmo_select_main(0); } osmo_jibuf_delete(jb); + talloc_free(pcap_osmux_h); pcap_test_check(); }
View file
libosmo-netif_1.2.0.tar.xz/tests/osmo-pcap-test/configure.ac -> libosmo-netif_1.3.0.tar.xz/tests/osmo-pcap-test/configure.ac
Changed
@@ -16,7 +16,7 @@ dnl kernel style compile messages m4_ifdef(AM_SILENT_RULES, AM_SILENT_RULES(yes)) -PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 1.7.0) +PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 1.8.0) AC_PROG_CC AC_DISABLE_STATIC
View file
libosmo-netif_1.2.0.tar.xz/tests/osmo-pcap-test/osmux_test.c -> libosmo-netif_1.3.0.tar.xz/tests/osmo-pcap-test/osmux_test.c
Changed
@@ -37,7 +37,7 @@ * This is the output handle for osmux, it stores last RTP sequence and * timestamp that has been used. There should be one per circuit ID. */ -static struct osmux_out_handle h_output; +static struct osmux_out_handle *h_output; static void tx_cb(struct msgb *msg, void *data) { @@ -57,7 +57,7 @@ /* This code below belongs to the osmux receiver */ while((osmuxh = osmux_xfrm_output_pull(batch_msg)) != NULL) - osmux_xfrm_output_sched(&h_output, osmuxh); + osmux_xfrm_output_sched(h_output, osmuxh); msgb_free(batch_msg); } @@ -65,11 +65,7 @@ * This is the input handle for osmux. It stores the last osmux sequence that * has been used and the deliver function that sends the osmux batch. */ -struct osmux_in_handle h_input = { - .osmux_seq = 0, /* sequence number to start OSmux message from */ - .batch_factor = 4, /* batch up to 4 RTP messages */ - .deliver = deliver, -}; +struct osmux_in_handle *h_input; #define MAX_CONCURRENT_CALLS 8 @@ -124,9 +120,9 @@ if (ccid < 0) register_ccid(rtph->ssrc); - while ((ret = osmux_xfrm_input(&h_input, msg, ccid)) > 1) { + while ((ret = osmux_xfrm_input(h_input, msg, ccid)) > 0) { /* batch full, deliver it */ - osmux_xfrm_input_deliver(&h_input); + osmux_xfrm_input_deliver(h_input); } if (ret == -1) printf("something is wrong\n"); @@ -189,9 +185,15 @@ osmo_pcap.timer.cb = osmo_pcap_pkt_timer_cb; - osmux_xfrm_input_init(&h_input); - osmux_xfrm_output_init2(&h_output, 0, 98); - osmux_xfrm_output_set_tx_cb(&h_output, tx_cb, NULL); + h_input = osmux_xfrm_input_alloc(tall_test); + osmux_xfrm_input_set_initial_seqnum(h_input, 0); + osmux_xfrm_input_set_batch_factor(h_input, 4); + osmux_xfrm_input_set_deliver_cb(h_input, deliver, NULL); + + h_output = osmux_xfrm_output_alloc(tall_test); + osmux_xfrm_output_set_rtp_ssrc(h_output, 0); + osmux_xfrm_output_set_rtp_pl_type(h_output, 98); + osmux_xfrm_output_set_tx_cb(h_output, tx_cb, NULL); /* first run */ osmo_pcap_pkt_timer_cb(NULL); @@ -200,5 +202,7 @@ osmo_select_main(0); } + talloc_free(h_output); + return ret; }
View file
libosmo-netif_1.3.0.tar.xz/tests/osmux/osmux_input_test.c
Added
@@ -0,0 +1,732 @@ +/* (C) 2022 by sysmocom - s.f.m.c. GmbH <info@sysmocom.de> + * + * Author: Pau Espin Pedrol <pespin@sysmocom.de> + * + * 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. + */ + +#include <stdio.h> +#include <stdlib.h> +#include <stdbool.h> +#include <unistd.h> +#include <stdint.h> +#include <inttypes.h> +#include <string.h> +#include <signal.h> +#include <arpa/inet.h> +#include <sys/time.h> +#include <getopt.h> + +#include <osmocom/core/select.h> +#include <osmocom/core/application.h> +#include <osmocom/core/logging.h> +#include <osmocom/core/msgb.h> +#include <osmocom/netif/rtp.h> +#include <osmocom/netif/osmux.h> +#include <osmocom/netif/amr.h> + +static uint16_t rtp_next_seq; +static uint16_t rtp_next_ts; + +void *tall_ctx; + +#define TIME_RTP_PKT_MS 20 +#define BATCH_FACTOR 6 +/* ----------------------------- */ + +/* Logging related stuff */ +#define INT2IDX(x) (-1*(x)-1) +struct log_info_cat jibuf_test_cat = { + INT2IDX(DLMUX) = { + .name = "DLMUX", + .description = "Osmocom Osmux", + .enabled = 1, .loglevel = LOGL_DEBUG, + }, +}; +const struct log_info log_info = { + .filter_fn = NULL, + .cat = jibuf_test_cat, + .num_cat = ARRAY_SIZE(jibuf_test_cat), +}; +/* ----------------------------- */ + +static void rtp_init(uint16_t seq, uint16_t ts) +{ + rtp_next_seq = seq; + rtp_next_ts = ts; +} + +static struct msgb *rtp_new(uint16_t seq, uint8_t timestamp, uint8_t marker) +{ + struct msgb *msg; + struct rtp_hdr *rtph; + + msg = msgb_alloc(1500, "rtp"); + if (!msg) + exit(EXIT_FAILURE); + msgb_put(msg, sizeof(struct rtp_hdr)); + + rtph = (struct rtp_hdr *)msg->data; + rtph->version = RTP_VERSION; + rtph->marker = marker; + rtph->sequence = htons(seq); + rtph->timestamp = htons(timestamp); + rtph->ssrc = 0x6789; + return msg; +} + +static struct msgb *rtp_next(void) +{ + rtp_next_seq++; + rtp_next_ts += TIME_RTP_PKT_MS; + return rtp_new(rtp_next_seq, rtp_next_ts, 0); +} + +static struct amr_hdr *rtp_append_amr(struct msgb *msg, uint8_t ft) +{ + struct amr_hdr *amrh; + struct rtp_hdr *rtph = (struct rtp_hdr *)msg->data; + + msgb_put(msg, sizeof(struct amr_hdr)); + amrh = (struct amr_hdr *)rtph->data; + + amrh->cmr = 0; + amrh->q = 1; + amrh->f = 0; + amrh->ft = ft; + msgb_put(msg, osmo_amr_bytes(amrh->ft)); + return amrh; +} + +static void sigalarm_handler(int foo) +{ + printf("FAIL: test did not run successfully\n"); + exit(EXIT_FAILURE); +} + +#define clock_debug(fmt, args...) \ + do { \ + struct timespec ts; \ + struct timeval tv; \ + osmo_clock_gettime(CLOCK_MONOTONIC, &ts); \ + osmo_gettimeofday(&tv, NULL); \ + fprintf(stdout, "sys={%lu.%06lu}, mono={%lu.%06lu}: " fmt "\n", \ + tv.tv_sec, tv.tv_usec, ts.tv_sec, ts.tv_nsec/1000, ##args); \ + } while (0) + +static void clock_override_enable(bool enable) +{ + osmo_gettimeofday_override = enable; + osmo_clock_override_enable(CLOCK_MONOTONIC, enable); +} + +static void clock_override_set(long sec, long usec) +{ + struct timespec *mono; + osmo_gettimeofday_override_time.tv_sec = sec; + osmo_gettimeofday_override_time.tv_usec = usec; + mono = osmo_clock_override_gettimespec(CLOCK_MONOTONIC); + mono->tv_sec = sec; + mono->tv_nsec = usec*1000; + + clock_debug("clock_override_set"); +} + +static void clock_override_add_debug(long sec, long usec, bool dbg) +{ + osmo_gettimeofday_override_add(sec, usec); + osmo_clock_override_add(CLOCK_MONOTONIC, sec, usec*1000); + if (dbg) + clock_debug("clock_override_add"); +} +#define clock_override_add(sec, usec) clock_override_add_debug(sec, usec, true) + +static void test_amr_ft_change_middle_batch_osmux_deliver_cb(struct msgb *batch_msg, void *data) +{ + struct osmux_hdr *osmuxh; + char buf2048; + int n = 0; + bool *osmux_transmitted = (bool *)data; + + osmux_snprintf(buf, sizeof(buf), batch_msg); + clock_debug("OSMUX message (len=%d): %s\n", batch_msg->len, buf); + + /* We expect 3 batches: */ + while ((osmuxh = osmux_xfrm_output_pull(batch_msg))) { + n++; + OSMO_ASSERT(osmuxh->ft == OSMUX_FT_VOICE_AMR); + OSMO_ASSERT(osmuxh->rtp_m == 0); + OSMO_ASSERT(osmuxh->amr_cmr == 0); + OSMO_ASSERT(osmuxh->amr_q == 1); + switch (n) { + case 1: + OSMO_ASSERT(osmuxh->seq == 0); + OSMO_ASSERT(osmuxh->ctr == 1); + OSMO_ASSERT(osmuxh->amr_ft == AMR_FT_2); + break; + case 2: + OSMO_ASSERT(osmuxh->seq == 1); + OSMO_ASSERT(osmuxh->ctr == 0); + OSMO_ASSERT(osmuxh->amr_ft == AMR_FT_6); + break; + case 3: + OSMO_ASSERT(osmuxh->seq == 2); + OSMO_ASSERT(osmuxh->ctr == 0); + OSMO_ASSERT(osmuxh->amr_ft == AMR_FT_1); + break; + } + } + OSMO_ASSERT(n == 3); + + msgb_free(batch_msg); + + *osmux_transmitted = true; +} +/* Test if an RTP pkt with changed AMR FT passed to osmux_input is properly + * processed: The current batch ends and a new batch with a new osmux header is + * appeneded to the generated packet. */ +static void test_amr_ft_change_middle_batch(void) +{ + struct msgb *msg; + int rc; + const uint8_t cid = 30; + bool osmux_transmitted = false; + struct osmux_in_handle *h_input;
View file
libosmo-netif_1.3.0.tar.xz/tests/osmux/osmux_input_test.ok
Added
@@ -0,0 +1,212 @@ +===test_amr_ft_change_middle_batch=== +sys={0.000000}, mono={0.000000}: clock_override_set +sys={0.020000}, mono={0.020000}: clock_override_add +sys={0.020000}, mono={0.020000}: Submit RTP with 1st AMR FT change +sys={0.040000}, mono={0.040000}: clock_override_add +sys={0.040000}, mono={0.040000}: Submit RTP with 2nd AMR FT change +sys={0.060000}, mono={0.060000}: clock_override_add +sys={0.080000}, mono={0.080000}: clock_override_add +sys={0.080000}, mono={0.080000}: Osmux frame should now be transmitted +sys={0.080000}, mono={0.080000}: OSMUX message (len=81): OSMUX seq=000 ccid=030 ft=1 rtp_m=0 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 , OSMUX seq=001 ccid=030 ft=1 rtp_m=0 ctr=0 amr_f=0 amr_q=1 amr_ft=06 amr_cmr=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 , OSMUX seq=002 ccid=030 ft=1 rtp_m=0 ctr=0 amr_f=0 amr_q=1 amr_ft=01 amr_cmr=00 00 00 00 00 00 00 00 00 00 00 00 00 00 + +sys={0.080000}, mono={0.080000}: Closing circuit +===test_last_amr_cmr_f_q_used=== +sys={0.000000}, mono={0.000000}: clock_override_set +sys={0.000000}, mono={0.000000}: Submit 2nd RTP packet, CMR changes +sys={0.020000}, mono={0.020000}: clock_override_add +sys={0.020000}, mono={0.020000}: Submit 3rd RTP packet with Q and CMR changes +sys={0.040000}, mono={0.040000}: clock_override_add +sys={0.060000}, mono={0.060000}: clock_override_add +sys={0.060000}, mono={0.060000}: Osmux frame should now be transmitted +sys={0.060000}, mono={0.060000}: OSMUX message (len=49): OSMUX seq=000 ccid=032 ft=1 rtp_m=0 ctr=2 amr_f=0 amr_q=0 amr_ft=02 amr_cmr=02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + +sys={0.060000}, mono={0.060000}: Closing circuit +===test_initial_osmux_seqnum=== +sys={0.000000}, mono={0.000000}: clock_override_set +sys={0.000000}, mono={0.000000}: Submit 2nd RTP packet, CMR changes +sys={0.020000}, mono={0.020000}: clock_override_add +sys={0.020000}, mono={0.020000}: OSMUX message (len=19): OSMUX seq=123 ccid=033 ft=1 rtp_m=0 ctr=0 amr_f=1 amr_q=1 amr_ft=02 amr_cmr=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + +sys={0.020000}, mono={0.020000}: Closing circuit +===test_rtp_dup=== +sys={0.000000}, mono={0.000000}: clock_override_set +sys={0.000000}, mono={0.000000}: Submit 2nd RTP packet, seqnum dup +sys={0.020000}, mono={0.020000}: clock_override_add +sys={0.020000}, mono={0.020000}: Submit 3rd RTP packet, triggers osmux batch +sys={0.040000}, mono={0.040000}: clock_override_add +sys={0.040000}, mono={0.040000}: OSMUX message (len=19): OSMUX seq=123 ccid=033 ft=1 rtp_m=0 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=00 12 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + +sys={0.040000}, mono={0.040000}: Closing circuit +===test_rtp_pkt_gap(60)=== +sys={0.000000}, mono={0.000000}: clock_override_set +sys={0.000000}, mono={0.000000}: 1st RTP packet is received +sys={0.000000}, mono={0.000000}: 2nd RTP packet is lost +sys={0.020000}, mono={0.020000}: clock_override_add +sys={0.020000}, mono={0.020000}: 3rd RTP packet is received +sys={0.040000}, mono={0.040000}: clock_override_add +sys={0.040000}, mono={0.040000}: 4th RTP packet is received +sys={0.060000}, mono={0.060000}: clock_override_add +sys={0.060000}, mono={0.060000}: osmux batch transmitted +sys={0.080000}, mono={0.080000}: clock_override_add +sys={0.080000}, mono={0.080000}: OSMUX message (len=64): OSMUX seq=123 ccid=033 ft=1 rtp_m=0 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + +sys={0.080000}, mono={0.080000}: Closing circuit +===test_rtp_pkt_gap(65533)=== +sys={0.000000}, mono={0.000000}: clock_override_set +sys={0.000000}, mono={0.000000}: 1st RTP packet is received +sys={0.000000}, mono={0.000000}: 2nd RTP packet is lost +sys={0.020000}, mono={0.020000}: clock_override_add +sys={0.020000}, mono={0.020000}: 3rd RTP packet is received +sys={0.040000}, mono={0.040000}: clock_override_add +sys={0.040000}, mono={0.040000}: 4th RTP packet is received +sys={0.060000}, mono={0.060000}: clock_override_add +sys={0.060000}, mono={0.060000}: osmux batch transmitted +sys={0.080000}, mono={0.080000}: clock_override_add +sys={0.080000}, mono={0.080000}: OSMUX message (len=64): OSMUX seq=123 ccid=033 ft=1 rtp_m=0 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + +sys={0.080000}, mono={0.080000}: Closing circuit +===test_rtp_pkt_gap(65534)=== +sys={0.000000}, mono={0.000000}: clock_override_set +sys={0.000000}, mono={0.000000}: 1st RTP packet is received +sys={0.000000}, mono={0.000000}: 2nd RTP packet is lost +sys={0.020000}, mono={0.020000}: clock_override_add +sys={0.020000}, mono={0.020000}: 3rd RTP packet is received +sys={0.040000}, mono={0.040000}: clock_override_add +sys={0.040000}, mono={0.040000}: 4th RTP packet is received +sys={0.060000}, mono={0.060000}: clock_override_add +sys={0.060000}, mono={0.060000}: osmux batch transmitted +sys={0.080000}, mono={0.080000}: clock_override_add +sys={0.080000}, mono={0.080000}: OSMUX message (len=64): OSMUX seq=123 ccid=033 ft=1 rtp_m=0 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + +sys={0.080000}, mono={0.080000}: Closing circuit +===test_rtp_pkt_gap(65535)=== +sys={0.000000}, mono={0.000000}: clock_override_set +sys={0.000000}, mono={0.000000}: 1st RTP packet is received +sys={0.000000}, mono={0.000000}: 2nd RTP packet is lost +sys={0.020000}, mono={0.020000}: clock_override_add +sys={0.020000}, mono={0.020000}: 3rd RTP packet is received +sys={0.040000}, mono={0.040000}: clock_override_add +sys={0.040000}, mono={0.040000}: 4th RTP packet is received +sys={0.060000}, mono={0.060000}: clock_override_add +sys={0.060000}, mono={0.060000}: osmux batch transmitted +sys={0.080000}, mono={0.080000}: clock_override_add +sys={0.080000}, mono={0.080000}: OSMUX message (len=64): OSMUX seq=123 ccid=033 ft=1 rtp_m=0 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + +sys={0.080000}, mono={0.080000}: Closing circuit +===test_rtp_pkt_gap_bigger_than_batch_factor(60)=== +sys={0.000000}, mono={0.000000}: clock_override_set +sys={0.000000}, mono={0.000000}: 1st RTP packet is received +sys={0.000000}, mono={0.000000}: 10 packets are lost +sys={0.020000}, mono={0.020000}: clock_override_add +sys={0.040000}, mono={0.040000}: clock_override_add +sys={0.060000}, mono={0.060000}: clock_override_add +sys={0.080000}, mono={0.080000}: clock_override_add +sys={0.100000}, mono={0.100000}: clock_override_add +sys={0.120000}, mono={0.120000}: clock_override_add +sys={0.140000}, mono={0.140000}: clock_override_add +sys={0.160000}, mono={0.160000}: clock_override_add +sys={0.180000}, mono={0.180000}: clock_override_add +sys={0.200000}, mono={0.200000}: clock_override_add +sys={0.200000}, mono={0.200000}: 12th RTP packet is received +sys={0.220000}, mono={0.220000}: clock_override_add +sys={0.220000}, mono={0.220000}: OSMUX message 1 (len=64): OSMUX seq=123 ccid=033 ft=1 rtp_m=0 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + +sys={0.220000}, mono={0.220000}: 12th+1 RTP packet is received +sys={0.240000}, mono={0.240000}: clock_override_add +sys={0.240000}, mono={0.240000}: 12th+2 RTP packet is received +sys={0.260000}, mono={0.260000}: clock_override_add +sys={0.260000}, mono={0.260000}: 12th+3 RTP packet is received +sys={0.280000}, mono={0.280000}: clock_override_add +sys={0.280000}, mono={0.280000}: osmux batch transmitted +sys={0.300000}, mono={0.300000}: clock_override_add +sys={0.300000}, mono={0.300000}: OSMUX message 2 (len=64): OSMUX seq=124 ccid=033 ft=1 rtp_m=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + +sys={0.300000}, mono={0.300000}: Closing circuit +===test_rtp_pkt_gap_bigger_than_batch_factor(65533)=== +sys={0.000000}, mono={0.000000}: clock_override_set +sys={0.000000}, mono={0.000000}: 1st RTP packet is received +sys={0.000000}, mono={0.000000}: 10 packets are lost +sys={0.020000}, mono={0.020000}: clock_override_add +sys={0.040000}, mono={0.040000}: clock_override_add +sys={0.060000}, mono={0.060000}: clock_override_add +sys={0.080000}, mono={0.080000}: clock_override_add +sys={0.100000}, mono={0.100000}: clock_override_add +sys={0.120000}, mono={0.120000}: clock_override_add +sys={0.140000}, mono={0.140000}: clock_override_add +sys={0.160000}, mono={0.160000}: clock_override_add +sys={0.180000}, mono={0.180000}: clock_override_add +sys={0.200000}, mono={0.200000}: clock_override_add +sys={0.200000}, mono={0.200000}: 12th RTP packet is received +sys={0.220000}, mono={0.220000}: clock_override_add +sys={0.220000}, mono={0.220000}: OSMUX message 1 (len=64): OSMUX seq=123 ccid=033 ft=1 rtp_m=0 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + +sys={0.220000}, mono={0.220000}: 12th+1 RTP packet is received +sys={0.240000}, mono={0.240000}: clock_override_add +sys={0.240000}, mono={0.240000}: 12th+2 RTP packet is received +sys={0.260000}, mono={0.260000}: clock_override_add +sys={0.260000}, mono={0.260000}: 12th+3 RTP packet is received +sys={0.280000}, mono={0.280000}: clock_override_add +sys={0.280000}, mono={0.280000}: osmux batch transmitted +sys={0.300000}, mono={0.300000}: clock_override_add +sys={0.300000}, mono={0.300000}: OSMUX message 2 (len=64): OSMUX seq=124 ccid=033 ft=1 rtp_m=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + +sys={0.300000}, mono={0.300000}: Closing circuit +===test_rtp_pkt_gap_bigger_than_batch_factor(65534)=== +sys={0.000000}, mono={0.000000}: clock_override_set +sys={0.000000}, mono={0.000000}: 1st RTP packet is received +sys={0.000000}, mono={0.000000}: 10 packets are lost +sys={0.020000}, mono={0.020000}: clock_override_add +sys={0.040000}, mono={0.040000}: clock_override_add +sys={0.060000}, mono={0.060000}: clock_override_add +sys={0.080000}, mono={0.080000}: clock_override_add +sys={0.100000}, mono={0.100000}: clock_override_add +sys={0.120000}, mono={0.120000}: clock_override_add +sys={0.140000}, mono={0.140000}: clock_override_add +sys={0.160000}, mono={0.160000}: clock_override_add +sys={0.180000}, mono={0.180000}: clock_override_add +sys={0.200000}, mono={0.200000}: clock_override_add +sys={0.200000}, mono={0.200000}: 12th RTP packet is received +sys={0.220000}, mono={0.220000}: clock_override_add +sys={0.220000}, mono={0.220000}: OSMUX message 1 (len=64): OSMUX seq=123 ccid=033 ft=1 rtp_m=0 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + +sys={0.220000}, mono={0.220000}: 12th+1 RTP packet is received +sys={0.240000}, mono={0.240000}: clock_override_add +sys={0.240000}, mono={0.240000}: 12th+2 RTP packet is received +sys={0.260000}, mono={0.260000}: clock_override_add +sys={0.260000}, mono={0.260000}: 12th+3 RTP packet is received +sys={0.280000}, mono={0.280000}: clock_override_add +sys={0.280000}, mono={0.280000}: osmux batch transmitted +sys={0.300000}, mono={0.300000}: clock_override_add +sys={0.300000}, mono={0.300000}: OSMUX message 2 (len=64): OSMUX seq=124 ccid=033 ft=1 rtp_m=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + +sys={0.300000}, mono={0.300000}: Closing circuit +===test_rtp_pkt_gap_bigger_than_batch_factor(65535)=== +sys={0.000000}, mono={0.000000}: clock_override_set +sys={0.000000}, mono={0.000000}: 1st RTP packet is received +sys={0.000000}, mono={0.000000}: 10 packets are lost +sys={0.020000}, mono={0.020000}: clock_override_add +sys={0.040000}, mono={0.040000}: clock_override_add +sys={0.060000}, mono={0.060000}: clock_override_add +sys={0.080000}, mono={0.080000}: clock_override_add +sys={0.100000}, mono={0.100000}: clock_override_add +sys={0.120000}, mono={0.120000}: clock_override_add +sys={0.140000}, mono={0.140000}: clock_override_add +sys={0.160000}, mono={0.160000}: clock_override_add +sys={0.180000}, mono={0.180000}: clock_override_add +sys={0.200000}, mono={0.200000}: clock_override_add +sys={0.200000}, mono={0.200000}: 12th RTP packet is received +sys={0.220000}, mono={0.220000}: clock_override_add +sys={0.220000}, mono={0.220000}: OSMUX message 1 (len=64): OSMUX seq=123 ccid=033 ft=1 rtp_m=0 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
View file
libosmo-netif_1.3.0.tar.xz/tests/osmux/osmux_output_test.c
Added
@@ -0,0 +1,449 @@ +/* (C) 2017 by sysmocom - s.f.m.c. GmbH <info@sysmocom.de> + * + * Author: Pau Espin Pedrol <pespin@sysmocom.de> + * + * 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. + */ + +#include <stdio.h> +#include <stdlib.h> +#include <stdbool.h> +#include <unistd.h> +#include <stdint.h> +#include <inttypes.h> +#include <string.h> +#include <signal.h> +#include <arpa/inet.h> +#include <sys/time.h> +#include <getopt.h> + +#include <osmocom/core/select.h> +#include <osmocom/core/application.h> +#include <osmocom/core/logging.h> +#include <osmocom/core/msgb.h> +#include <osmocom/netif/rtp.h> +#include <osmocom/netif/osmux.h> +#include <osmocom/netif/amr.h> + +static uint8_t osmux_next_seq; + +#define TIME_RTP_PKT_MS 20 +#define BATCH_FACTOR 6 +/* ----------------------------- */ + +/* Logging related stuff */ +#define INT2IDX(x) (-1*(x)-1) +struct log_info_cat jibuf_test_cat = { + INT2IDX(DLMUX) = { + .name = "DLMUX", + .description = "Osmocom Osmux", + .enabled = 1, .loglevel = LOGL_DEBUG, + }, +}; +const struct log_info log_info = { + .filter_fn = NULL, + .cat = jibuf_test_cat, + .num_cat = ARRAY_SIZE(jibuf_test_cat), +}; +/* ----------------------------- */ + +static void osmux_init(uint8_t seq) +{ + osmux_next_seq = seq; +} + +static struct msgb *osmux_new(uint8_t cid, uint8_t seq, uint8_t batch_factor) +{ + struct msgb *msg; + struct osmux_hdr *osmuxh; + + msg = msgb_alloc(1500, "test"); + if (!msg) + exit(EXIT_FAILURE); + msgb_put(msg, sizeof(struct osmux_hdr)); + + osmuxh = (struct osmux_hdr *)msg->data; + osmuxh->amr_q = 0; + osmuxh->amr_f = 0; + osmuxh->rtp_m = 0; + osmuxh->ctr = batch_factor - 1; + osmuxh->ft = 1; + osmuxh->seq = osmux_next_seq; + osmuxh->circuit_id = cid; + osmuxh->amr_ft = AMR_FT_2; /* 5.90 */ + osmuxh->amr_cmr = 0; + msgb_put(msg, osmo_amr_bytes(osmuxh->amr_ft)*batch_factor); + return msg; +} + +static struct msgb *osmux_next(void) +{ + osmux_next_seq++; + return osmux_new(0, osmux_next_seq, BATCH_FACTOR); +} + +static void sigalarm_handler(int foo) +{ + printf("FAIL: test did not run successfully\n"); + exit(EXIT_FAILURE); +} + + +static void clock_debug(char* str) +{ + struct timespec ts; + struct timeval tv; + osmo_clock_gettime(CLOCK_MONOTONIC, &ts); + osmo_gettimeofday(&tv, NULL); + printf("sys={%lu.%06lu}, mono={%lu.%06lu}: %s\n", + tv.tv_sec, tv.tv_usec, ts.tv_sec, ts.tv_nsec/1000, str); +} + +static void clock_override_enable(bool enable) +{ + osmo_gettimeofday_override = enable; + osmo_clock_override_enable(CLOCK_MONOTONIC, enable); +} + +static void clock_override_set(long sec, long usec) +{ + struct timespec *mono; + osmo_gettimeofday_override_time.tv_sec = sec; + osmo_gettimeofday_override_time.tv_usec = usec; + mono = osmo_clock_override_gettimespec(CLOCK_MONOTONIC); + mono->tv_sec = sec; + mono->tv_nsec = usec*1000; + + clock_debug("clock_override_set"); +} + +static void clock_override_add_debug(long sec, long usec, bool dbg) +{ + osmo_gettimeofday_override_add(sec, usec); + osmo_clock_override_add(CLOCK_MONOTONIC, sec, usec*1000); + if (dbg) + clock_debug("clock_override_add"); +} +#define clock_override_add(sec, usec) clock_override_add_debug(sec, usec, true) + +static void tx_cb(struct msgb *msg, void *data) +{ + struct osmux_out_handle *h_output = (struct osmux_out_handle *) data; + struct rtp_hdr *rtph; + char buf250; + rtph = osmo_rtp_get_hdr(msg); + snprintf(buf, sizeof(buf), "dequeue: seq=%"PRIu16" ts=%"PRIu32"%s enqueued=%u", + ntohs(rtph->sequence), ntohl(rtph->timestamp), rtph->marker ? " M" : "", + llist_count(&h_output->list)); + clock_debug(buf); + msgb_free(msg); +} + +#define PULL_NEXT(h_output) { \ + struct msgb *_msg; \ + struct osmux_hdr *_osmuxh; \ + int _rc; \ + _msg = osmux_next(); \ + _osmuxh = osmux_xfrm_output_pull(_msg); \ + OSMO_ASSERT(_osmuxh); \ + _rc = osmux_xfrm_output_sched((h_output), _osmuxh); \ + OSMO_ASSERT(_rc == _osmuxh->ctr+1); \ + } + +/* Test some regular scenario where frames arrive at exactly the time they should. */ +static void test_output_consecutive(void) +{ + struct osmux_out_handle *h_output; + + printf("===test_output_consecutive===\n"); + + clock_override_enable(true); + clock_override_set(0, 0); + osmux_init(32); + + h_output = osmux_xfrm_output_alloc(NULL); + osmux_xfrm_output_set_rtp_ssrc(h_output, 0x7000000); + osmux_xfrm_output_set_rtp_pl_type(h_output, 98); + osmux_xfrm_output_set_tx_cb(h_output, tx_cb, h_output); + h_output->rtp_seq = (uint16_t)50; + h_output->rtp_timestamp = (uint32_t)500; + + /* First osmux frame at t=0 */ + PULL_NEXT(h_output); + clock_debug("first dequed before first select"); + osmo_select_main(0); + + clock_override_add(0, TIME_RTP_PKT_MS*1000); + clock_debug("second select, second dequed"); + osmo_select_main(0); + + clock_override_add(0, TIME_RTP_PKT_MS*1000); + clock_debug("third select, third dequed"); + osmo_select_main(0); + + clock_override_add(0, TIME_RTP_PKT_MS*1000); + clock_debug("fourth select, fourth dequed"); + osmo_select_main(0); + + clock_override_add(0, TIME_RTP_PKT_MS*1000); + clock_debug("fifth select, fifth dequed"); + osmo_select_main(0); + + clock_override_add(0, TIME_RTP_PKT_MS*1000); + clock_debug("sixth select, sixth dequed"); + osmo_select_main(0);
View file
libosmo-netif_1.3.0.tar.xz/tests/osmux/osmux_output_test.ok
Added
@@ -0,0 +1,119 @@ +===test_output_consecutive=== +sys={0.000000}, mono={0.000000}: clock_override_set +sys={0.000000}, mono={0.000000}: dequeue: seq=50 ts=500 M enqueued=5 +sys={0.000000}, mono={0.000000}: first dequed before first select +sys={0.020000}, mono={0.020000}: clock_override_add +sys={0.020000}, mono={0.020000}: second select, second dequed +sys={0.020000}, mono={0.020000}: dequeue: seq=51 ts=660 enqueued=4 +sys={0.040000}, mono={0.040000}: clock_override_add +sys={0.040000}, mono={0.040000}: third select, third dequed +sys={0.040000}, mono={0.040000}: dequeue: seq=52 ts=820 enqueued=3 +sys={0.060000}, mono={0.060000}: clock_override_add +sys={0.060000}, mono={0.060000}: fourth select, fourth dequed +sys={0.060000}, mono={0.060000}: dequeue: seq=53 ts=980 enqueued=2 +sys={0.080000}, mono={0.080000}: clock_override_add +sys={0.080000}, mono={0.080000}: fifth select, fifth dequed +sys={0.080000}, mono={0.080000}: dequeue: seq=54 ts=1140 enqueued=1 +sys={0.100000}, mono={0.100000}: clock_override_add +sys={0.100000}, mono={0.100000}: sixth select, sixth dequed +sys={0.100000}, mono={0.100000}: dequeue: seq=55 ts=1300 enqueued=0 +sys={0.100000}, mono={0.100000}: send second osmux frame +sys={0.100000}, mono={0.100000}: dequeue: seq=56 ts=1460 enqueued=5 +sys={0.100000}, mono={0.100000}: first dequed before first select +sys={0.120000}, mono={0.120000}: clock_override_add +sys={0.120000}, mono={0.120000}: second select, second dequed +sys={0.120000}, mono={0.120000}: dequeue: seq=57 ts=1620 enqueued=4 +sys={0.200000}, mono={0.200000}: clock_override_add +sys={0.200000}, mono={0.200000}: third select, four packet should be dequeued +sys={0.200000}, mono={0.200000}: dequeue: seq=58 ts=1780 enqueued=3 +sys={0.200000}, mono={0.200000}: dequeue: seq=59 ts=1940 enqueued=2 +sys={0.200000}, mono={0.200000}: dequeue: seq=60 ts=2100 enqueued=1 +sys={0.200000}, mono={0.200000}: dequeue: seq=61 ts=2260 enqueued=0 +sys={0.200000}, mono={0.200000}: calling flush on empty list, should do nothing +===test_output_interleaved=== +sys={0.000000}, mono={0.000000}: clock_override_set +sys={0.000000}, mono={0.000000}: dequeue: seq=50 ts=500 M enqueued=5 +sys={0.040000}, mono={0.040000}: clock_override_add +sys={0.040000}, mono={0.040000}: select, 3 dequed, 3 still queued +sys={0.040000}, mono={0.040000}: dequeue: seq=51 ts=660 enqueued=4 +sys={0.040000}, mono={0.040000}: dequeue: seq=52 ts=820 enqueued=3 +sys={0.040000}, mono={0.040000}: next frame arrives, 3 pending rtp packets are dequeued and first of new osmux frame too +sys={0.040000}, mono={0.040000}: dequeue: seq=53 ts=980 enqueued=8 +sys={0.040000}, mono={0.040000}: dequeue: seq=54 ts=1140 enqueued=7 +sys={0.040000}, mono={0.040000}: dequeue: seq=55 ts=1300 enqueued=6 +sys={0.040000}, mono={0.040000}: dequeue: seq=56 ts=1460 enqueued=5 +sys={0.140000}, mono={0.140000}: clock_override_add +sys={0.140000}, mono={0.140000}: calling select, then all should be out +sys={0.140000}, mono={0.140000}: dequeue: seq=57 ts=1620 enqueued=4 +sys={0.140000}, mono={0.140000}: dequeue: seq=58 ts=1780 enqueued=3 +sys={0.140000}, mono={0.140000}: dequeue: seq=59 ts=1940 enqueued=2 +sys={0.140000}, mono={0.140000}: dequeue: seq=60 ts=2100 enqueued=1 +sys={0.140000}, mono={0.140000}: dequeue: seq=61 ts=2260 enqueued=0 +===test_output_2together=== +sys={0.000000}, mono={0.000000}: clock_override_set +sys={0.000000}, mono={0.000000}: dequeue: seq=50 ts=500 M enqueued=5 +sys={0.000000}, mono={0.000000}: calling select in between 2 osmux recv +sys={0.000000}, mono={0.000000}: calling select after receiving 2nd osmux. Dequeue 1st osmux frame and 1st rtp from 2nd osmux frame. +sys={0.000000}, mono={0.000000}: dequeue: seq=51 ts=660 enqueued=10 +sys={0.000000}, mono={0.000000}: dequeue: seq=52 ts=820 enqueued=9 +sys={0.000000}, mono={0.000000}: dequeue: seq=53 ts=980 enqueued=8 +sys={0.000000}, mono={0.000000}: dequeue: seq=54 ts=1140 enqueued=7 +sys={0.000000}, mono={0.000000}: dequeue: seq=55 ts=1300 enqueued=6 +sys={0.000000}, mono={0.000000}: dequeue: seq=56 ts=1460 enqueued=5 +sys={0.100000}, mono={0.100000}: clock_override_add +sys={0.100000}, mono={0.100000}: select, all 5 remaining should be out +sys={0.100000}, mono={0.100000}: dequeue: seq=57 ts=1620 enqueued=4 +sys={0.100000}, mono={0.100000}: dequeue: seq=58 ts=1780 enqueued=3 +sys={0.100000}, mono={0.100000}: dequeue: seq=59 ts=1940 enqueued=2 +sys={0.100000}, mono={0.100000}: dequeue: seq=60 ts=2100 enqueued=1 +sys={0.100000}, mono={0.100000}: dequeue: seq=61 ts=2260 enqueued=0 +===test_output_frame_lost=== +sys={0.000000}, mono={0.000000}: clock_override_set +sys={0.000000}, mono={0.000000}: first osmux frame +sys={0.000000}, mono={0.000000}: dequeue: seq=50 ts=500 M enqueued=5 +sys={0.100000}, mono={0.100000}: clock_override_add +sys={0.100000}, mono={0.100000}: dequeue: seq=51 ts=660 enqueued=4 +sys={0.100000}, mono={0.100000}: dequeue: seq=52 ts=820 enqueued=3 +sys={0.100000}, mono={0.100000}: dequeue: seq=53 ts=980 enqueued=2 +sys={0.100000}, mono={0.100000}: dequeue: seq=54 ts=1140 enqueued=1 +sys={0.100000}, mono={0.100000}: dequeue: seq=55 ts=1300 enqueued=0 +sys={0.100000}, mono={0.100000}: one osmux frame is now lost (seq++) +sys={0.220000}, mono={0.220000}: clock_override_add +sys={0.220000}, mono={0.220000}: 3rd osmux frame arrives +sys={0.220000}, mono={0.220000}: dequeue: seq=56 ts=1460 M enqueued=5 +sys={0.320000}, mono={0.320000}: clock_override_add +sys={0.320000}, mono={0.320000}: dequeue: seq=57 ts=1620 enqueued=4 +sys={0.320000}, mono={0.320000}: dequeue: seq=58 ts=1780 enqueued=3 +sys={0.320000}, mono={0.320000}: dequeue: seq=59 ts=1940 enqueued=2 +sys={0.320000}, mono={0.320000}: dequeue: seq=60 ts=2100 enqueued=1 +sys={0.320000}, mono={0.320000}: dequeue: seq=61 ts=2260 enqueued=0 +===test_output_flush=== +sys={0.000000}, mono={0.000000}: clock_override_set +sys={0.000000}, mono={0.000000}: first osmux frame +sys={0.000000}, mono={0.000000}: dequeue: seq=50 ts=500 M enqueued=5 +sys={0.040000}, mono={0.040000}: clock_override_add +sys={0.040000}, mono={0.040000}: dequeue: seq=51 ts=660 enqueued=4 +sys={0.040000}, mono={0.040000}: dequeue: seq=52 ts=820 enqueued=3 +sys={0.040000}, mono={0.040000}: 2nd osmux frame arrives +sys={0.040000}, mono={0.040000}: flushing, all packet should be transmitted immediately +sys={0.040000}, mono={0.040000}: dequeue: seq=53 ts=980 enqueued=8 +sys={0.040000}, mono={0.040000}: dequeue: seq=54 ts=1140 enqueued=7 +sys={0.040000}, mono={0.040000}: dequeue: seq=55 ts=1300 enqueued=6 +sys={0.040000}, mono={0.040000}: dequeue: seq=56 ts=1460 enqueued=5 +sys={0.040000}, mono={0.040000}: dequeue: seq=57 ts=1620 enqueued=4 +sys={0.040000}, mono={0.040000}: dequeue: seq=58 ts=1780 enqueued=3 +sys={0.040000}, mono={0.040000}: dequeue: seq=59 ts=1940 enqueued=2 +sys={0.040000}, mono={0.040000}: dequeue: seq=60 ts=2100 enqueued=1 +sys={0.040000}, mono={0.040000}: dequeue: seq=61 ts=2260 enqueued=0 +===test_output_seqnum_wraparound=== +sys={0.000000}, mono={0.000000}: clock_override_set +sys={0.000000}, mono={0.000000}: Sending osmux frame with seqnum=0 +sys={0.000000}, mono={0.000000}: dequeue: seq=50 ts=500 enqueued=5 +sys={0.040000}, mono={0.040000}: clock_override_add +sys={0.040000}, mono={0.040000}: dequeue: seq=51 ts=660 enqueued=4 +sys={0.040000}, mono={0.040000}: dequeue: seq=52 ts=820 enqueued=3 +sys={0.040000}, mono={0.040000}: flushing other RTP packets +sys={0.040000}, mono={0.040000}: dequeue: seq=53 ts=980 enqueued=2 +sys={0.040000}, mono={0.040000}: dequeue: seq=54 ts=1140 enqueued=1 +sys={0.040000}, mono={0.040000}: dequeue: seq=55 ts=1300 enqueued=0 +OK: Test passed
View file
libosmo-netif_1.2.0.tar.xz/tests/osmux/osmux_test.c -> libosmo-netif_1.3.0.tar.xz/tests/osmux/osmux_test.c
Changed
@@ -1,6 +1,7 @@ /* * (C) 2013 by Pablo Neira Ayuso <pablo@gnumonks.org> * (C) 2013 by On Waves ehf <http://www.on-waves.com> + * (C) 2022 by sysmocom - s.f.m.c. GmbH <info@sysmocom.de> * * 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 @@ -8,8 +9,6 @@ * (at your option) any later version. */ -#define OSMUX_TEST_USE_TIMING 0 - #include <stdio.h> #include <stdlib.h> #include <unistd.h> @@ -17,9 +16,6 @@ #include <string.h> #include <signal.h> #include <arpa/inet.h> -#if OSMUX_TEST_USE_TIMING -#include <sys/time.h> -#endif #include <osmocom/core/select.h> #include <osmocom/core/application.h> @@ -59,9 +55,6 @@ static int rtp_pkts; static int mark_pkts; -#if OSMUX_TEST_USE_TIMING -static struct timeval last; -#endif #define clock_debug(fmt, args...) \ do { \ @@ -92,20 +85,6 @@ { struct rtp_hdr *rtph = (struct rtp_hdr *)msg->data; char buf4096; -#if OSMUX_TEST_USE_TIMING - struct timeval now, diff; - - osmo_gettimeofday(&now, NULL); - timersub(&now, &last, &diff); - last = now; - - if (diff.tv_usec > 2*17000) { - clock_debug("delivery of reconstructed RTP lagged" - " (diff.tv_usec=%u > 2*17000)\n", - (unsigned int)diff.tv_usec); - exit(EXIT_FAILURE); - } -#endif osmo_rtp_snprintf(buf, sizeof(buf), msg); clock_debug("extracted packet: %s\n", buf); @@ -123,7 +102,7 @@ msgb_free(msg); } -static struct osmux_out_handle h_output; +static struct osmux_out_handle *h_output4; static void osmux_deliver(struct msgb *batch_msg, void *data) { @@ -137,15 +116,11 @@ * in a list. Then, reconstruct transmission timing. */ while((osmuxh = osmux_xfrm_output_pull(batch_msg)) != NULL) - osmux_xfrm_output_sched(&h_output, osmuxh); + osmux_xfrm_output_sched(h_outputosmuxh->circuit_id, osmuxh); msgb_free(batch_msg); } -struct osmux_in_handle h_input = { - .osmux_seq = 0, /* sequence number to start OSmux message from */ - .batch_factor = 4, /* batch up to 4 RTP messages */ - .deliver = osmux_deliver, -}; +struct osmux_in_handle *h_input; static void sigalarm_handler(int foo) { @@ -153,7 +128,8 @@ exit(EXIT_FAILURE); } -static void osmux_test_marker(int ccid) { +static void osmux_test_marker(int num_ccid) +{ struct msgb *msg; struct rtp_hdr *rtph = (struct rtp_hdr *)rtp_pkt; struct rtp_hdr *cpy_rtph; @@ -166,7 +142,7 @@ seq++; rtph->sequence = htons(seq); - for (j=0; j<4; j++) { + for (j = 0; j < num_ccid; j++) { msg = msgb_alloc(1500, "test"); if (!msg) exit(EXIT_FAILURE); @@ -181,19 +157,15 @@ } rtp_pkts++; - while (osmux_xfrm_input(&h_input, msg, j + ccid) > 0) { - osmux_xfrm_input_deliver(&h_input); + while (osmux_xfrm_input(h_input, msg, j) > 0) { + osmux_xfrm_input_deliver(h_input); } } -#if !OSMUX_TEST_USE_TIMING clock_override_add(0, PKT_TIME_USEC); -#endif } while (rtp_pkts) { -#if !OSMUX_TEST_USE_TIMING clock_override_add(1, 0); -#endif osmo_select_main(0); } @@ -239,17 +211,13 @@ * gaps between two messages to test the osmux replaying * feature. */ - osmux_xfrm_input(&h_input, msg, (i % 2) + ccid); + osmux_xfrm_input(h_input, msg, (i % 2) + ccid); if (i % 4 == 0) { -#if OSMUX_TEST_USE_TIMING - osmo_gettimeofday(&last, NULL); -#endif - /* After four RTP messages, squash them into the OSMUX * batch and call the routine to deliver it. */ - osmux_xfrm_input_deliver(&h_input); + osmux_xfrm_input_deliver(h_input); /* The first two RTP message (one per circuit ID batch) * are delivered immediately, wait until the three RTP @@ -258,9 +226,7 @@ */ for (j = 0; j < k-2; j++) { osmo_select_main(0); -#if !OSMUX_TEST_USE_TIMING clock_override_add(0, PKT_TIME_USEC); -#endif } k = 0; @@ -282,11 +248,9 @@ exit(EXIT_FAILURE); } -#if !OSMUX_TEST_USE_TIMING /* This test uses fake time to speedup the run, unless we want to manually * test time specific stuff */ clock_override_enable(true); -#endif /* This test doesn't use it, but osmux requires it internally. */ void *tall_ctx = talloc_named_const(NULL, 1, "Root context"); @@ -298,34 +262,45 @@ log_set_print_category_hex(osmo_stderr_target, 0); log_set_use_color(osmo_stderr_target, 0); - osmux_xfrm_output_init2(&h_output, 0x7000000, 98); - osmux_xfrm_output_set_tx_cb(&h_output, tx_cb, NULL); - /* These fields are set using random() */ - h_output.rtp_seq = 9158; - h_output.rtp_timestamp = 1681692777; + for (i = 0; i < ARRAY_SIZE(h_output); i++) { + h_outputi = osmux_xfrm_output_alloc(NULL); + osmux_xfrm_output_set_rtp_ssrc(h_outputi, 0x7000000 + i); + osmux_xfrm_output_set_rtp_pl_type(h_outputi, 98); + osmux_xfrm_output_set_tx_cb(h_outputi, tx_cb, NULL); + /* These fields are set using random() */ + h_outputi->rtp_seq = 9158; + h_outputi->rtp_timestamp = 1681692777; + } /* If the test takes longer than 10 seconds, abort it */ alarm(10); -#if !OSMUX_TEST_USE_TIMING /* Check if marker bit features work correctly */ - osmux_xfrm_input_init(&h_input); + h_input = osmux_xfrm_input_alloc(tall_ctx); + osmux_xfrm_input_set_name(h_input, "first"); + osmux_xfrm_input_set_initial_seqnum(h_input, 0); + osmux_xfrm_input_set_batch_factor(h_input, 4); + osmux_xfrm_input_set_deliver_cb(h_input, osmux_deliver, NULL); + for (i = 0; i < 4; i++)
View file
libosmo-netif_1.2.0.tar.xz/tests/osmux/osmux_test.ok -> libosmo-netif_1.3.0.tar.xz/tests/osmux/osmux_test.ok
Changed
@@ -1,122 +1,318 @@ -DLMUX initialized osmux input converter +DLMUX input-0,0/1472 Initialized osmux input converter +DLMUX first,0/1472CID=0,batched=0/4 Circuit opened successfully +DLMUX first,0/1472CID=1,batched=0/4 Circuit opened successfully +DLMUX first,0/1472CID=2,batched=0/4 Circuit opened successfully +DLMUX first,0/1472CID=3,batched=0/4 Circuit opened successfully sys={23.444242}, mono={0.020000}: clock_override_add sys={23.464242}, mono={0.040000}: clock_override_add sys={23.484242}, mono={0.060000}: clock_override_add sys={23.504242}, mono={0.080000}: clock_override_add -DLMUX Batch is full for RTP sssrc=1644169479 -sys={23.504242}, mono={0.080000}: OSMUX message (len=256): OSMUX seq=000 ccid=000 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=001 ccid=001 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=002 ccid=002 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=003 ccid=003 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 +DLMUX first,256/1472CID=0,batched=4/4 Batch is full for RTP sssrc=1644169479 +sys={23.504242}, mono={0.080000}: OSMUX message (len=256): OSMUX seq=000 ccid=000 ft=1 rtp_m=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=000 ccid=001 ft=1 rtp_m=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=000 ccid=002 ft=1 rtp_m=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=000 ccid=003 ft=1 rtp_m=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 sys={23.504242}, mono={0.080000}: extracted packet: RTP ver=2 ssrc=117440512 type=98 marker=1 ext=0 csrc_count=0 sequence=9158 timestamp=1681692777 20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 +sys={23.504242}, mono={0.080000}: extracted packet: RTP ver=2 ssrc=117440513 type=98 marker=1 ext=0 csrc_count=0 sequence=9158 timestamp=1681692777 20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 +sys={23.504242}, mono={0.080000}: extracted packet: RTP ver=2 ssrc=117440514 type=98 marker=1 ext=0 csrc_count=0 sequence=9158 timestamp=1681692777 20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 +sys={23.504242}, mono={0.080000}: extracted packet: RTP ver=2 ssrc=117440515 type=98 marker=1 ext=0 csrc_count=0 sequence=9158 timestamp=1681692777 20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 sys={23.524242}, mono={0.100000}: clock_override_add -sys={23.524242}, mono={0.100000}: OSMUX message (len=106): OSMUX seq=004 ccid=000 ft=1 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=005 ccid=001 ft=1 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=006 ccid=002 ft=1 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=007 ccid=003 ft=1 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 +sys={23.524242}, mono={0.100000}: OSMUX message (len=106): OSMUX seq=001 ccid=000 ft=1 rtp_m=0 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=001 ccid=001 ft=1 rtp_m=0 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=001 ccid=002 ft=1 rtp_m=0 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=001 ccid=003 ft=1 rtp_m=1 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 sys={23.544242}, mono={0.120000}: clock_override_add sys={23.564242}, mono={0.140000}: clock_override_add -sys={23.564242}, mono={0.140000}: OSMUX message (len=106): OSMUX seq=008 ccid=000 ft=1 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=009 ccid=001 ft=1 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=010 ccid=002 ft=1 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=011 ccid=003 ft=1 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 +sys={23.564242}, mono={0.140000}: OSMUX message (len=106): OSMUX seq=002 ccid=000 ft=1 rtp_m=0 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=002 ccid=001 ft=1 rtp_m=1 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=002 ccid=002 ft=1 rtp_m=1 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=002 ccid=003 ft=1 rtp_m=0 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 sys={23.584242}, mono={0.160000}: clock_override_add sys={23.604242}, mono={0.180000}: clock_override_add sys={23.624242}, mono={0.200000}: clock_override_add sys={23.644242}, mono={0.220000}: clock_override_add -DLMUX Batch is full for RTP sssrc=1644169479 -sys={23.644242}, mono={0.220000}: OSMUX message (len=256): OSMUX seq=012 ccid=000 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=013 ccid=001 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=014 ccid=002 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=015 ccid=003 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 +DLMUX first,256/1472CID=0,batched=4/4 Batch is full for RTP sssrc=1644169479 +sys={23.644242}, mono={0.220000}: OSMUX message (len=256): OSMUX seq=003 ccid=000 ft=1 rtp_m=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=003 ccid=001 ft=1 rtp_m=0 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=003 ccid=002 ft=1 rtp_m=0 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=003 ccid=003 ft=1 rtp_m=0 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 sys={23.664242}, mono={0.240000}: clock_override_add -sys={23.664242}, mono={0.240000}: OSMUX message (len=106): OSMUX seq=016 ccid=000 ft=1 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=017 ccid=001 ft=1 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=018 ccid=002 ft=1 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=019 ccid=003 ft=1 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 +sys={23.664242}, mono={0.240000}: OSMUX message (len=106): OSMUX seq=004 ccid=000 ft=1 rtp_m=0 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=004 ccid=001 ft=1 rtp_m=0 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=004 ccid=002 ft=1 rtp_m=0 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=004 ccid=003 ft=1 rtp_m=1 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 sys={23.684242}, mono={0.260000}: clock_override_add sys={23.704242}, mono={0.280000}: clock_override_add -sys={23.704242}, mono={0.280000}: OSMUX message (len=106): OSMUX seq=020 ccid=000 ft=1 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=021 ccid=001 ft=1 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=022 ccid=002 ft=1 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=023 ccid=003 ft=1 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 +sys={23.704242}, mono={0.280000}: OSMUX message (len=106): OSMUX seq=005 ccid=000 ft=1 rtp_m=0 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=005 ccid=001 ft=1 rtp_m=1 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=005 ccid=002 ft=1 rtp_m=1 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=005 ccid=003 ft=1 rtp_m=0 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 sys={23.724242}, mono={0.300000}: clock_override_add sys={23.744242}, mono={0.320000}: clock_override_add sys={23.764242}, mono={0.340000}: clock_override_add sys={23.784242}, mono={0.360000}: clock_override_add -DLMUX Batch is full for RTP sssrc=1644169479 -sys={23.784242}, mono={0.360000}: OSMUX message (len=256): OSMUX seq=024 ccid=000 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=025 ccid=001 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=026 ccid=002 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=027 ccid=003 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 +DLMUX first,256/1472CID=0,batched=4/4 Batch is full for RTP sssrc=1644169479 +sys={23.784242}, mono={0.360000}: OSMUX message (len=256): OSMUX seq=006 ccid=000 ft=1 rtp_m=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=006 ccid=001 ft=1 rtp_m=0 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=006 ccid=002 ft=1 rtp_m=0 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=006 ccid=003 ft=1 rtp_m=0 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 sys={23.804242}, mono={0.380000}: clock_override_add -sys={23.804242}, mono={0.380000}: OSMUX message (len=106): OSMUX seq=028 ccid=000 ft=1 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=029 ccid=001 ft=1 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=030 ccid=002 ft=1 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=031 ccid=003 ft=1 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 +sys={23.804242}, mono={0.380000}: OSMUX message (len=106): OSMUX seq=007 ccid=000 ft=1 rtp_m=0 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=007 ccid=001 ft=1 rtp_m=0 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=007 ccid=002 ft=1 rtp_m=0 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=007 ccid=003 ft=1 rtp_m=1 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 sys={23.824242}, mono={0.400000}: clock_override_add sys={23.844242}, mono={0.420000}: clock_override_add -sys={23.844242}, mono={0.420000}: OSMUX message (len=106): OSMUX seq=032 ccid=000 ft=1 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=033 ccid=001 ft=1 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=034 ccid=002 ft=1 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=035 ccid=003 ft=1 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 +sys={23.844242}, mono={0.420000}: OSMUX message (len=106): OSMUX seq=008 ccid=000 ft=1 rtp_m=0 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=008 ccid=001 ft=1 rtp_m=1 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=008 ccid=002 ft=1 rtp_m=1 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=008 ccid=003 ft=1 rtp_m=0 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 sys={23.864242}, mono={0.440000}: clock_override_add sys={23.884242}, mono={0.460000}: clock_override_add sys={23.904242}, mono={0.480000}: clock_override_add sys={23.924242}, mono={0.500000}: clock_override_add -DLMUX Batch is full for RTP sssrc=1644169479 -sys={23.924242}, mono={0.500000}: OSMUX message (len=256): OSMUX seq=036 ccid=000 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=037 ccid=001 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=038 ccid=002 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=039 ccid=003 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 +DLMUX first,256/1472CID=0,batched=4/4 Batch is full for RTP sssrc=1644169479 +sys={23.924242}, mono={0.500000}: OSMUX message (len=256): OSMUX seq=009 ccid=000 ft=1 rtp_m=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=009 ccid=001 ft=1 rtp_m=0 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=009 ccid=002 ft=1 rtp_m=0 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=009 ccid=003 ft=1 rtp_m=0 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 sys={23.944242}, mono={0.520000}: clock_override_add -sys={23.944242}, mono={0.520000}: OSMUX message (len=106): OSMUX seq=040 ccid=000 ft=1 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=041 ccid=001 ft=1 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=042 ccid=002 ft=1 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=043 ccid=003 ft=1 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 +sys={23.944242}, mono={0.520000}: OSMUX message (len=106): OSMUX seq=010 ccid=000 ft=1 rtp_m=0 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=010 ccid=001 ft=1 rtp_m=0 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=010 ccid=002 ft=1 rtp_m=0 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=010 ccid=003 ft=1 rtp_m=1 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 sys={23.964242}, mono={0.540000}: clock_override_add sys={23.984242}, mono={0.560000}: clock_override_add -sys={23.984242}, mono={0.560000}: OSMUX message (len=106): OSMUX seq=044 ccid=000 ft=1 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=045 ccid=001 ft=1 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=046 ccid=002 ft=1 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=047 ccid=003 ft=1 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 +sys={23.984242}, mono={0.560000}: OSMUX message (len=106): OSMUX seq=011 ccid=000 ft=1 rtp_m=0 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=011 ccid=001 ft=1 rtp_m=1 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=011 ccid=002 ft=1 rtp_m=1 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=011 ccid=003 ft=1 rtp_m=0 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 sys={24.004242}, mono={0.580000}: clock_override_add sys={24.024242}, mono={0.600000}: clock_override_add sys={24.044242}, mono={0.620000}: clock_override_add sys={24.064242}, mono={0.640000}: clock_override_add -DLMUX Batch is full for RTP sssrc=1644169479 -sys={24.064242}, mono={0.640000}: OSMUX message (len=256): OSMUX seq=048 ccid=000 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=049 ccid=001 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=050 ccid=002 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=051 ccid=003 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 +DLMUX first,256/1472CID=0,batched=4/4 Batch is full for RTP sssrc=1644169479 +sys={24.064242}, mono={0.640000}: OSMUX message (len=256): OSMUX seq=012 ccid=000 ft=1 rtp_m=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=012 ccid=001 ft=1 rtp_m=0 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=012 ccid=002 ft=1 rtp_m=0 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=012 ccid=003 ft=1 rtp_m=0 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 sys={24.084242}, mono={0.660000}: clock_override_add -sys={24.084242}, mono={0.660000}: OSMUX message (len=106): OSMUX seq=052 ccid=000 ft=1 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=053 ccid=001 ft=1 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=054 ccid=002 ft=1 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=055 ccid=003 ft=1 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 +sys={24.084242}, mono={0.660000}: OSMUX message (len=106): OSMUX seq=013 ccid=000 ft=1 rtp_m=0 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=013 ccid=001 ft=1 rtp_m=0 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=013 ccid=002 ft=1 rtp_m=0 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=013 ccid=003 ft=1 rtp_m=1 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 sys={24.104242}, mono={0.680000}: clock_override_add sys={24.124242}, mono={0.700000}: clock_override_add -sys={24.124242}, mono={0.700000}: OSMUX message (len=106): OSMUX seq=056 ccid=000 ft=1 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=057 ccid=001 ft=1 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=058 ccid=002 ft=1 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=059 ccid=003 ft=1 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 +sys={24.124242}, mono={0.700000}: OSMUX message (len=106): OSMUX seq=014 ccid=000 ft=1 rtp_m=0 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=014 ccid=001 ft=1 rtp_m=1 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=014 ccid=002 ft=1 rtp_m=1 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=014 ccid=003 ft=1 rtp_m=0 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 sys={24.144242}, mono={0.720000}: clock_override_add sys={24.164242}, mono={0.740000}: clock_override_add sys={24.184242}, mono={0.760000}: clock_override_add sys={24.204242}, mono={0.780000}: clock_override_add -DLMUX Batch is full for RTP sssrc=1644169479 -sys={24.204242}, mono={0.780000}: OSMUX message (len=256): OSMUX seq=060 ccid=000 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=061 ccid=001 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=062 ccid=002 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=063 ccid=003 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 +DLMUX first,256/1472CID=0,batched=4/4 Batch is full for RTP sssrc=1644169479 +sys={24.204242}, mono={0.780000}: OSMUX message (len=256): OSMUX seq=015 ccid=000 ft=1 rtp_m=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=015 ccid=001 ft=1 rtp_m=0 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=015 ccid=002 ft=1 rtp_m=0 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=015 ccid=003 ft=1 rtp_m=0 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 sys={24.224242}, mono={0.800000}: clock_override_add -sys={24.224242}, mono={0.800000}: OSMUX message (len=106): OSMUX seq=064 ccid=000 ft=1 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=065 ccid=001 ft=1 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=066 ccid=002 ft=1 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=067 ccid=003 ft=1 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 +sys={24.224242}, mono={0.800000}: OSMUX message (len=106): OSMUX seq=016 ccid=000 ft=1 rtp_m=0 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=016 ccid=001 ft=1 rtp_m=0 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=016 ccid=002 ft=1 rtp_m=0 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=016 ccid=003 ft=1 rtp_m=1 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 sys={24.244242}, mono={0.820000}: clock_override_add sys={24.264242}, mono={0.840000}: clock_override_add -sys={24.264242}, mono={0.840000}: OSMUX message (len=106): OSMUX seq=068 ccid=000 ft=1 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=069 ccid=001 ft=1 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=070 ccid=002 ft=1 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=071 ccid=003 ft=1 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 +sys={24.264242}, mono={0.840000}: OSMUX message (len=106): OSMUX seq=017 ccid=000 ft=1 rtp_m=0 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=017 ccid=001 ft=1 rtp_m=1 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=017 ccid=002 ft=1 rtp_m=1 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=017 ccid=003 ft=1 rtp_m=0 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 sys={24.284242}, mono={0.860000}: clock_override_add sys={24.304242}, mono={0.880000}: clock_override_add sys={24.324242}, mono={0.900000}: clock_override_add sys={24.344242}, mono={0.920000}: clock_override_add -DLMUX Batch is full for RTP sssrc=1644169479 -sys={24.344242}, mono={0.920000}: OSMUX message (len=256): OSMUX seq=072 ccid=000 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=073 ccid=001 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=074 ccid=002 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=075 ccid=003 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 +DLMUX first,256/1472CID=0,batched=4/4 Batch is full for RTP sssrc=1644169479 +sys={24.344242}, mono={0.920000}: OSMUX message (len=256): OSMUX seq=018 ccid=000 ft=1 rtp_m=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=018 ccid=001 ft=1 rtp_m=0 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=018 ccid=002 ft=1 rtp_m=0 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=018 ccid=003 ft=1 rtp_m=0 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 sys={24.364242}, mono={0.940000}: clock_override_add -sys={24.364242}, mono={0.940000}: OSMUX message (len=106): OSMUX seq=076 ccid=000 ft=1 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=077 ccid=001 ft=1 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=078 ccid=002 ft=1 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=079 ccid=003 ft=1 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 +sys={24.364242}, mono={0.940000}: OSMUX message (len=106): OSMUX seq=019 ccid=000 ft=1 rtp_m=0 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=019 ccid=001 ft=1 rtp_m=0 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=019 ccid=002 ft=1 rtp_m=0 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=019 ccid=003 ft=1 rtp_m=1 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 sys={24.384242}, mono={0.960000}: clock_override_add sys={24.404242}, mono={0.980000}: clock_override_add -sys={24.404242}, mono={0.980000}: OSMUX message (len=106): OSMUX seq=080 ccid=000 ft=1 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=081 ccid=001 ft=1 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=082 ccid=002 ft=1 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=083 ccid=003 ft=1 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 +sys={24.404242}, mono={0.980000}: OSMUX message (len=106): OSMUX seq=020 ccid=000 ft=1 rtp_m=0 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=020 ccid=001 ft=1 rtp_m=1 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=020 ccid=002 ft=1 rtp_m=1 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=020 ccid=003 ft=1 rtp_m=0 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 sys={24.424242}, mono={1.000000}: clock_override_add sys={24.444242}, mono={1.020000}: clock_override_add sys={24.464242}, mono={1.040000}: clock_override_add sys={24.484242}, mono={1.060000}: clock_override_add -DLMUX Batch is full for RTP sssrc=1644169479 -sys={24.484242}, mono={1.060000}: OSMUX message (len=256): OSMUX seq=084 ccid=000 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=085 ccid=001 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=086 ccid=002 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=087 ccid=003 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 +DLMUX first,256/1472CID=0,batched=4/4 Batch is full for RTP sssrc=1644169479 +sys={24.484242}, mono={1.060000}: OSMUX message (len=256): OSMUX seq=021 ccid=000 ft=1 rtp_m=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=021 ccid=001 ft=1 rtp_m=0 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=021 ccid=002 ft=1 rtp_m=0 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=021 ccid=003 ft=1 rtp_m=0 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 sys={24.504242}, mono={1.080000}: clock_override_add -sys={24.504242}, mono={1.080000}: OSMUX message (len=106): OSMUX seq=088 ccid=000 ft=1 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=089 ccid=001 ft=1 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=090 ccid=002 ft=1 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=091 ccid=003 ft=1 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 +sys={24.504242}, mono={1.080000}: OSMUX message (len=106): OSMUX seq=022 ccid=000 ft=1 rtp_m=0 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=022 ccid=001 ft=1 rtp_m=0 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=022 ccid=002 ft=1 rtp_m=0 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=022 ccid=003 ft=1 rtp_m=1 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 sys={24.524242}, mono={1.100000}: clock_override_add sys={24.544242}, mono={1.120000}: clock_override_add -sys={24.544242}, mono={1.120000}: OSMUX message (len=106): OSMUX seq=092 ccid=000 ft=1 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=093 ccid=001 ft=1 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=094 ccid=002 ft=1 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=095 ccid=003 ft=1 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 +sys={24.544242}, mono={1.120000}: OSMUX message (len=106): OSMUX seq=023 ccid=000 ft=1 rtp_m=0 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=023 ccid=001 ft=1 rtp_m=1 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=023 ccid=002 ft=1 rtp_m=1 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=023 ccid=003 ft=1 rtp_m=0 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 sys={24.564242}, mono={1.140000}: clock_override_add sys={24.584242}, mono={1.160000}: clock_override_add sys={24.604242}, mono={1.180000}: clock_override_add sys={24.624242}, mono={1.200000}: clock_override_add -DLMUX Batch is full for RTP sssrc=1644169479 -sys={24.624242}, mono={1.200000}: OSMUX message (len=256): OSMUX seq=096 ccid=000 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=097 ccid=001 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=098 ccid=002 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=099 ccid=003 ft=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 +DLMUX first,256/1472CID=0,batched=4/4 Batch is full for RTP sssrc=1644169479 +sys={24.624242}, mono={1.200000}: OSMUX message (len=256): OSMUX seq=024 ccid=000 ft=1 rtp_m=1 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=024 ccid=001 ft=1 rtp_m=0 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=024 ccid=002 ft=1 rtp_m=0 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=024 ccid=003 ft=1 rtp_m=0 ctr=3 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 sys={24.644242}, mono={1.220000}: clock_override_add -sys={24.644242}, mono={1.220000}: OSMUX message (len=106): OSMUX seq=100 ccid=000 ft=1 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=101 ccid=001 ft=1 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=102 ccid=002 ft=1 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=103 ccid=003 ft=1 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 +sys={24.644242}, mono={1.220000}: OSMUX message (len=106): OSMUX seq=025 ccid=000 ft=1 rtp_m=0 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=025 ccid=001 ft=1 rtp_m=0 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=025 ccid=002 ft=1 rtp_m=0 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=025 ccid=003 ft=1 rtp_m=1 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 sys={24.664242}, mono={1.240000}: clock_override_add sys={24.684242}, mono={1.260000}: clock_override_add -sys={24.684242}, mono={1.260000}: OSMUX message (len=106): OSMUX seq=104 ccid=000 ft=1 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=105 ccid=001 ft=1 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=106 ccid=002 ft=1 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=107 ccid=003 ft=1 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 +sys={24.684242}, mono={1.260000}: OSMUX message (len=106): OSMUX seq=026 ccid=000 ft=1 rtp_m=0 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=026 ccid=001 ft=1 rtp_m=1 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=026 ccid=002 ft=1 rtp_m=1 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=026 ccid=003 ft=1 rtp_m=0 ctr=1 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 sys={24.704242}, mono={1.280000}: clock_override_add sys={25.704242}, mono={2.280000}: clock_override_add -sys={25.704242}, mono={2.280000}: OSMUX message (len=76): OSMUX seq=108 ccid=000 ft=1 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=109 ccid=001 ft=1 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=110 ccid=002 ft=1 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=111 ccid=003 ft=1 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 +sys={25.704242}, mono={2.280000}: OSMUX message (len=76): OSMUX seq=027 ccid=000 ft=1 rtp_m=1 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=027 ccid=001 ft=1 rtp_m=0 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=027 ccid=002 ft=1 rtp_m=0 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 , OSMUX seq=027 ccid=003 ft=1 rtp_m=0 ctr=0 amr_f=0 amr_q=1 amr_ft=02 amr_cmr=02 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 sys={26.704242}, mono={3.280000}: clock_override_add +sys={26.704242}, mono={3.280000}: extracted packet: RTP ver=2 ssrc=117440515 type=98 marker=0 ext=0 csrc_count=0 sequence=9159 timestamp=1681692937 20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 +sys={26.704242}, mono={3.280000}: extracted packet: RTP ver=2 ssrc=117440515 type=98 marker=0 ext=0 csrc_count=0 sequence=9160 timestamp=1681693097 20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 +sys={26.704242}, mono={3.280000}: extracted packet: RTP ver=2 ssrc=117440515 type=98 marker=0 ext=0 csrc_count=0 sequence=9161 timestamp=1681693257 20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 +sys={26.704242}, mono={3.280000}: extracted packet: RTP ver=2 ssrc=117440515 type=98 marker=1 ext=0 csrc_count=0 sequence=9162 timestamp=1681693417 20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 +sys={26.704242}, mono={3.280000}: extracted packet: RTP ver=2 ssrc=117440515 type=98 marker=0 ext=0 csrc_count=0 sequence=9163 timestamp=1681693577 20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 +sys={26.704242}, mono={3.280000}: extracted packet: RTP ver=2 ssrc=117440515 type=98 marker=0 ext=0 csrc_count=0 sequence=9164 timestamp=1681693737 20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 +sys={26.704242}, mono={3.280000}: extracted packet: RTP ver=2 ssrc=117440515 type=98 marker=0 ext=0 csrc_count=0 sequence=9165 timestamp=1681693897 20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 +sys={26.704242}, mono={3.280000}: extracted packet: RTP ver=2 ssrc=117440515 type=98 marker=0 ext=0 csrc_count=0 sequence=9166 timestamp=1681694057 20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 +sys={26.704242}, mono={3.280000}: extracted packet: RTP ver=2 ssrc=117440515 type=98 marker=0 ext=0 csrc_count=0 sequence=9167 timestamp=1681694217 20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 +sys={26.704242}, mono={3.280000}: extracted packet: RTP ver=2 ssrc=117440515 type=98 marker=0 ext=0 csrc_count=0 sequence=9168 timestamp=1681694377 20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 +sys={26.704242}, mono={3.280000}: extracted packet: RTP ver=2 ssrc=117440515 type=98 marker=1 ext=0 csrc_count=0 sequence=9169 timestamp=1681694537 20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 +sys={26.704242}, mono={3.280000}: extracted packet: RTP ver=2 ssrc=117440515 type=98 marker=0 ext=0 csrc_count=0 sequence=9170 timestamp=1681694697 20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 +sys={26.704242}, mono={3.280000}: extracted packet: RTP ver=2 ssrc=117440515 type=98 marker=0 ext=0 csrc_count=0 sequence=9171 timestamp=1681694857 20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 +sys={26.704242}, mono={3.280000}: extracted packet: RTP ver=2 ssrc=117440515 type=98 marker=0 ext=0 csrc_count=0 sequence=9172 timestamp=1681695017 20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 +sys={26.704242}, mono={3.280000}: extracted packet: RTP ver=2 ssrc=117440515 type=98 marker=0 ext=0 csrc_count=0 sequence=9173 timestamp=1681695177 20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 +sys={26.704242}, mono={3.280000}: extracted packet: RTP ver=2 ssrc=117440515 type=98 marker=0 ext=0 csrc_count=0 sequence=9174 timestamp=1681695337 20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 +sys={26.704242}, mono={3.280000}: extracted packet: RTP ver=2 ssrc=117440515 type=98 marker=0 ext=0 csrc_count=0 sequence=9175 timestamp=1681695497 20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 +sys={26.704242}, mono={3.280000}: extracted packet: RTP ver=2 ssrc=117440515 type=98 marker=1 ext=0 csrc_count=0 sequence=9176 timestamp=1681695657 20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 +sys={26.704242}, mono={3.280000}: extracted packet: RTP ver=2 ssrc=117440515 type=98 marker=0 ext=0 csrc_count=0 sequence=9177 timestamp=1681695817 20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 +sys={26.704242}, mono={3.280000}: extracted packet: RTP ver=2 ssrc=117440515 type=98 marker=0 ext=0 csrc_count=0 sequence=9178 timestamp=1681695977 20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 +sys={26.704242}, mono={3.280000}: extracted packet: RTP ver=2 ssrc=117440515 type=98 marker=0 ext=0 csrc_count=0 sequence=9179 timestamp=1681696137 20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 +sys={26.704242}, mono={3.280000}: extracted packet: RTP ver=2 ssrc=117440515 type=98 marker=0 ext=0 csrc_count=0 sequence=9180 timestamp=1681696297 20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 +sys={26.704242}, mono={3.280000}: extracted packet: RTP ver=2 ssrc=117440515 type=98 marker=0 ext=0 csrc_count=0 sequence=9181 timestamp=1681696457 20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 +sys={26.704242}, mono={3.280000}: extracted packet: RTP ver=2 ssrc=117440515 type=98 marker=0 ext=0 csrc_count=0 sequence=9182 timestamp=1681696617 20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 +sys={26.704242}, mono={3.280000}: extracted packet: RTP ver=2 ssrc=117440515 type=98 marker=1 ext=0 csrc_count=0 sequence=9183 timestamp=1681696777 20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 +sys={26.704242}, mono={3.280000}: extracted packet: RTP ver=2 ssrc=117440515 type=98 marker=0 ext=0 csrc_count=0 sequence=9184 timestamp=1681696937 20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 +sys={26.704242}, mono={3.280000}: extracted packet: RTP ver=2 ssrc=117440515 type=98 marker=0 ext=0 csrc_count=0 sequence=9185 timestamp=1681697097 20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 +sys={26.704242}, mono={3.280000}: extracted packet: RTP ver=2 ssrc=117440515 type=98 marker=0 ext=0 csrc_count=0 sequence=9186 timestamp=1681697257 20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 +sys={26.704242}, mono={3.280000}: extracted packet: RTP ver=2 ssrc=117440515 type=98 marker=0 ext=0 csrc_count=0 sequence=9187 timestamp=1681697417 20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 +sys={26.704242}, mono={3.280000}: extracted packet: RTP ver=2 ssrc=117440515 type=98 marker=0 ext=0 csrc_count=0 sequence=9188 timestamp=1681697577 20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 +sys={26.704242}, mono={3.280000}: extracted packet: RTP ver=2 ssrc=117440515 type=98 marker=0 ext=0 csrc_count=0 sequence=9189 timestamp=1681697737 20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 +sys={26.704242}, mono={3.280000}: extracted packet: RTP ver=2 ssrc=117440515 type=98 marker=1 ext=0 csrc_count=0 sequence=9190 timestamp=1681697897 20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 +sys={26.704242}, mono={3.280000}: extracted packet: RTP ver=2 ssrc=117440515 type=98 marker=0 ext=0 csrc_count=0 sequence=9191 timestamp=1681698057 20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 +sys={26.704242}, mono={3.280000}: extracted packet: RTP ver=2 ssrc=117440515 type=98 marker=0 ext=0 csrc_count=0 sequence=9192 timestamp=1681698217 20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 +sys={26.704242}, mono={3.280000}: extracted packet: RTP ver=2 ssrc=117440515 type=98 marker=0 ext=0 csrc_count=0 sequence=9193 timestamp=1681698377 20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 +sys={26.704242}, mono={3.280000}: extracted packet: RTP ver=2 ssrc=117440515 type=98 marker=0 ext=0 csrc_count=0 sequence=9194 timestamp=1681698537 20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 +sys={26.704242}, mono={3.280000}: extracted packet: RTP ver=2 ssrc=117440515 type=98 marker=0 ext=0 csrc_count=0 sequence=9195 timestamp=1681698697 20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 +sys={26.704242}, mono={3.280000}: extracted packet: RTP ver=2 ssrc=117440515 type=98 marker=0 ext=0 csrc_count=0 sequence=9196 timestamp=1681698857 20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 +sys={26.704242}, mono={3.280000}: extracted packet: RTP ver=2 ssrc=117440515 type=98 marker=1 ext=0 csrc_count=0 sequence=9197 timestamp=1681699017 20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 +sys={26.704242}, mono={3.280000}: extracted packet: RTP ver=2 ssrc=117440515 type=98 marker=0 ext=0 csrc_count=0 sequence=9198 timestamp=1681699177 20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 +sys={26.704242}, mono={3.280000}: extracted packet: RTP ver=2 ssrc=117440515 type=98 marker=0 ext=0 csrc_count=0 sequence=9199 timestamp=1681699337 20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 +sys={26.704242}, mono={3.280000}: extracted packet: RTP ver=2 ssrc=117440515 type=98 marker=0 ext=0 csrc_count=0 sequence=9200 timestamp=1681699497 20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 +sys={26.704242}, mono={3.280000}: extracted packet: RTP ver=2 ssrc=117440515 type=98 marker=0 ext=0 csrc_count=0 sequence=9201 timestamp=1681699657 20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 +sys={26.704242}, mono={3.280000}: extracted packet: RTP ver=2 ssrc=117440515 type=98 marker=0 ext=0 csrc_count=0 sequence=9202 timestamp=1681699817 20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 +sys={26.704242}, mono={3.280000}: extracted packet: RTP ver=2 ssrc=117440515 type=98 marker=0 ext=0 csrc_count=0 sequence=9203 timestamp=1681699977 20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 +sys={26.704242}, mono={3.280000}: extracted packet: RTP ver=2 ssrc=117440515 type=98 marker=1 ext=0 csrc_count=0 sequence=9204 timestamp=1681700137 20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 +sys={26.704242}, mono={3.280000}: extracted packet: RTP ver=2 ssrc=117440515 type=98 marker=0 ext=0 csrc_count=0 sequence=9205 timestamp=1681700297 20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 +sys={26.704242}, mono={3.280000}: extracted packet: RTP ver=2 ssrc=117440515 type=98 marker=0 ext=0 csrc_count=0 sequence=9206 timestamp=1681700457 20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54 +sys={26.704242}, mono={3.280000}: extracted packet: RTP ver=2 ssrc=117440515 type=98 marker=0 ext=0 csrc_count=0 sequence=9207 timestamp=1681700617 20 14 ff d4 f9 ff fb e7 eb f9 9f f8 f2 26 33 65 54
View file
libosmo-netif_1.2.0.tar.xz/tests/stream/stream_test.err -> libosmo-netif_1.3.0.tar.xz/tests/stream/stream_test.err
Changed
@@ -20,7 +20,7 @@ {11.000009} autoreconnecting test step 3 client OK, server OK, FD reg 1 {11.000010} autoreconnecting test step 2 client OK, server OK, FD reg 0 -connection closed with srv +connection closed with client {11.000011} autoreconnecting test step 1 client OK, server NA, FD reg 0
View file
libosmo-netif_1.2.0.tar.xz/tests/testsuite.at -> libosmo-netif_1.3.0.tar.xz/tests/testsuite.at
Changed
@@ -14,10 +14,16 @@ AT_CHECK($abs_top_builddir/tests/osmux/osmux_test 2>&1, 0, expout, ignore) AT_CLEANUP -AT_SETUP(osmux_test2) -AT_KEYWORDS(osmux_test2) -cat $abs_srcdir/osmux/osmux_test2.ok > expout -AT_CHECK($abs_top_builddir/tests/osmux/osmux_test2, 0, expout, ignore) +AT_SETUP(osmux_output_test) +AT_KEYWORDS(osmux_output_test) +cat $abs_srcdir/osmux/osmux_output_test.ok > expout +AT_CHECK($abs_top_builddir/tests/osmux/osmux_output_test, 0, expout, ignore) +AT_CLEANUP + +AT_SETUP(osmux_input_test) +AT_KEYWORDS(osmux_input_test) +cat $abs_srcdir/osmux/osmux_input_test.ok > expout +AT_CHECK($abs_top_builddir/tests/osmux/osmux_input_test, 0, expout, ignore) AT_CLEANUP AT_SETUP(jibuf_test)
View file
libosmo-netif_1.3.0.tar.xz/utils
Added
+(directory)
View file
libosmo-netif_1.3.0.tar.xz/utils/Makefile.am
Added
@@ -0,0 +1,19 @@ +AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include +AM_CFLAGS = \ + -Wall \ + $(LIBOSMOCORE_CFLAGS) \ + $(LIBOSMOCODEC_CFLAGS) \ + $(LIBOSMOGSM_CFLAGS) \ + $(TALLOC_CFLAGS) \ + $(NULL) + +LDADD = \ + $(LIBOSMOCORE_LIBS) \ + $(LIBOSMOCODEC_LIBS) \ + $(LIBOSMOGSM_LIBS) \ + $(top_builddir)/src/libosmonetif.la \ + $(NULL) + +noinst_PROGRAMS = osmo-amr-inspect + +osmo_amr_inspect_SOURCES = osmo-amr-inspect.c
View file
libosmo-netif_1.3.0.tar.xz/utils/osmo-amr-inspect.c
Added
@@ -0,0 +1,325 @@ +/*! \file osmo-amr-inspect.c + * Utility program to inspect AMR payloads */ +/* + * (C) 2022 by sysmocom - s.f.m.c. GmbH <info@sysmocom.de> + * Author: Pau espin Pedrol <pespin@sysmocom.de> + * + * All Rights Reserved + * + * 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 <stdio.h> +#include <getopt.h> +#include <errno.h> +#include <unistd.h> +#include <stdlib.h> +#include <stdint.h> +#include <stdbool.h> +#include <strings.h> + +#include <osmocom/core/utils.h> +#include <osmocom/core/logging.h> +#include <osmocom/codec/codec.h> +#include <osmocom/netif/amr.h> + +enum force_amr_input_fmt { + FORCE_AMR_INPUT_FMT_AUTO = 0, + FORCE_AMR_INPUT_FMT_OA, + FORCE_AMR_INPUT_FMT_BWE, + FORCE_AMR_INPUT_FMT_ALL, +}; + +static enum force_amr_input_fmt force_fmt = FORCE_AMR_INPUT_FMT_AUTO; +static bool use_color = false; + +static void help(const char *progname) +{ + printf("Usage: %s -h -i filename -F (auto|oa|bwe|all) -C\n", + progname); +} + +#define println_color(color, fmt, args ...) \ + do { \ + if (use_color) \ + printf(color fmt OSMO_LOGCOLOR_END "\n", ## args); \ + else \ + printf(fmt "\n", ## args); \ + } while (0) + +#define println_red(fmt, args ...) \ + println_color(OSMO_LOGCOLOR_RED, fmt OSMO_LOGCOLOR_END, ## args) + +#define println_orange(fmt, args ...) \ + println_color(OSMO_LOGCOLOR_YELLOW, fmt OSMO_LOGCOLOR_END, ## args) + +static void inspect_amr_oa(const uint8_t *buf, size_t buf_len) +{ + const struct amr_hdr *hdr = (const struct amr_hdr *)buf; + size_t payload_len = buf_len - sizeof(*hdr); + const uint8_t *payload = hdr->data; + size_t ft_bytes, ft_bits; + printf(" octet-aligned\n"); + printf(" CMR: %u\n", hdr->cmr); + printf(" F: %u\n", hdr->f); + printf(" FT: %u (%s)\n", hdr->ft, osmo_amr_type_name(hdr->ft)); + printf(" Q: %u\n", hdr->q); + printf(" Payload (%lu bytes): %s\n", + buf_len - sizeof(*hdr), osmo_hexdump_nospc(payload, payload_len)); + + if (hdr->f) + println_orange(" WARN: F=%u not supported!", hdr->f); + if (!osmo_amr_ft_valid(hdr->cmr)) + println_red(" ERROR: CMR=%u not valid!", hdr->cmr); + if (!osmo_amr_ft_valid(hdr->ft)) + println_red(" ERROR: FT=%u not valid!", hdr->ft); + if (hdr->pad1 != 0) + println_orange(" WARN: PAD1=0x%x not zero!", hdr->pad1); + if (hdr->pad2 != 0) + println_orange(" WARN: PAD2=0x%x not zero!", hdr->pad2); + ft_bytes = osmo_amr_bytes(hdr->ft); + if (payload_len != ft_bytes) { + println_red(" ERROR: Wrong payload byte-length %lu != exp %lu!", payload_len, ft_bytes); + } else { + ft_bits = osmo_amr_bits(hdr->ft); + if (ft_bits/8 == ft_bytes) { + printf(" Payload has no padding (%lu bits)\n", ft_bits); + } else { + uint8_t last_byte = payloadpayload_len - 1; + uint8_t padding = last_byte & (0xff >> (ft_bits & 3)); + if (padding) + println_orange(" WARN: Payload last byte = 0x%02x has PAD=0x%02x not zero!", last_byte, padding); + } + } +} + +static void inspect_amr_bwe(const uint8_t *buf, size_t buf_len) +{ + const struct amr_hdr_bwe *hdr = (const struct amr_hdr_bwe *)buf; + size_t payload_len_bits = 6 + (buf_len - sizeof(*hdr))*8; + size_t ft_bits; + int rc; + uint8_t buf_oabuf_len + 1; + uint8_t ft = (hdr->ft_hi << 1) | hdr->ft_lo; + + printf(" bandwith-efficient\n"); + printf(" CMR: %u\n", hdr->cmr); + printf(" F: %u\n", hdr->f); + printf(" FT: %u (%s)\n", ft, osmo_amr_type_name(ft)); + printf(" Q: %u\n", hdr->q); + printf(" Payload first 6 bits: 0x%02x\n", hdr->data_start); + printf(" Payload continuation (%lu bytes): %s\n", buf_len - sizeof(*hdr), + osmo_hexdump_nospc(buf + sizeof(*hdr), buf_len - sizeof(*hdr))); + + if (hdr->f) + println_orange(" WARN: F=%u not supported!", hdr->f); + if (!osmo_amr_ft_valid(hdr->cmr)) + println_red(" ERROR: CMR=%u not valid!", hdr->cmr); + if (!osmo_amr_ft_valid(ft)) { + println_red(" ERROR: FT=%u not valid!", ft); + return; + } + ft_bits = osmo_amr_bits(ft); + if (ft_bits != payload_len_bits) { + println_red(" ERROR: Wrong payload bits-length %lu != exp %lu! (FT=%u)\n", payload_len_bits, ft_bits, ft); + return; + } + + if (!((AMR_HDR_BWE_LEN_BITS + ft_bits) & 0x03)) { + printf(" Payload has no padding (%lu bits with offset 10)\n", ft_bits); + } else { + uint8_t last_byte = bufbuf_len - 1; + uint8_t padding = last_byte & (0xff >> ((AMR_HDR_BWE_LEN_BITS + ft_bits) & 0x03)); + if (padding) + println_orange(" WARN: Payload last byte = 0x%02x has PAD=0x%02x not zero!", last_byte, padding); + } + + memcpy(buf_oa, buf, buf_len); + rc = osmo_amr_bwe_to_oa(buf_oa, buf_len, sizeof(buf_oa)); + if (rc < 0) { + println_red(" ERROR: Unable to convert to octet-aligned!"); + return; + } + printf(" Payload (octet-aligned %d bytes): %s", rc, + osmo_hexdump_nospc(buf_oa + sizeof(struct amr_hdr), rc)); +} + +static void inspect_amr(unsigned int i, const uint8_t *buf, size_t buf_len) +{ + bool is_oa; + printf("%u Buffer (%lu bytes): %s\n", i, buf_len, osmo_hexdump_nospc(buf, buf_len)); + is_oa = osmo_amr_is_oa(buf, buf_len); + switch (force_fmt) { + case FORCE_AMR_INPUT_FMT_AUTO: + if (is_oa) + inspect_amr_oa(buf, buf_len); + else + inspect_amr_bwe(buf, buf_len); + break; + case FORCE_AMR_INPUT_FMT_OA: + if (!is_oa) + println_orange(" WARN: detected as 'bwe' but forced as 'oa'"); + inspect_amr_oa(buf, buf_len); + break; + case FORCE_AMR_INPUT_FMT_BWE: + if (is_oa) + println_orange(" WARN: detected as 'oa' but forced as 'bwe'"); + inspect_amr_bwe(buf, buf_len); + break; + case FORCE_AMR_INPUT_FMT_ALL: + if (!is_oa) + println_orange(" WARN: detected as 'bwe' but forced as 'oa'"); + inspect_amr_oa(buf, buf_len); + if (is_oa) + println_orange(" WARN: detected as 'oa' but forced as 'bwe'"); + inspect_amr_bwe(buf, buf_len); + break; + default: + OSMO_ASSERT(0); + } + printf("\n"); +} + +static int read_file(const char *filename) +{ + FILE *fp; + char *line = NULL; + size_t len = 0; + ssize_t read; + uint8_t buf4096; + int rc = 0;
View file
rpmlintrc
Added
@@ -0,0 +1,5 @@ +# Don't abort the build when finding a library that depends on a package with +# a specific version. This is intentional for nightly builds, we don't want +# libraries from different build dates to be mixed as they might have ABI +# incompatibilities. +setBadness('shlib-fixed-dependency', 0)
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.