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 3
View file
libosmo-netif.spec
Changed
@@ -14,19 +14,19 @@ Name: libosmo-netif Requires: osmocom-latest -Version: 1.1.0 +Version: 1.2.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.1.0.tar.xz +Source: libosmo-netif_1.2.0.tar.xz BuildRequires: automake BuildRequires: libtool >= 2 BuildRequires: lksctp-tools-devel BuildRequires: pkgconfig >= 0.20 -BuildRequires: pkgconfig(libosmocore) >= 1.5.0 -BuildRequires: pkgconfig(libosmogsm) >= 1.5.0 +BuildRequires: pkgconfig(libosmocore) >= 1.7.0 +BuildRequires: pkgconfig(libosmogsm) >= 1.7.0 %description Network interface demuxer library for OsmoCom projects.
View file
libosmo-netif_1.1.0.dsc -> libosmo-netif_1.2.0.dsc
Changed
@@ -2,21 +2,21 @@ Source: libosmo-netif Binary: libosmonetif8, libosmo-netif-dev, libosmo-netif-doc, libosmo-netif-dbg Architecture: any all -Version: 1.1.0 +Version: 1.2.0 Maintainer: Osmocom team <openbsc@lists.osmocom.org> Homepage: https://projects.osmocom.org/projects/libosmo-netif Standards-Version: 3.9.6 -Vcs-Browser: http://git.osmocom.org/libosmo-netif/ -Vcs-Git: git://git.osmocom.org/libosmo-netif.git -Build-Depends: debhelper (>= 9), autotools-dev, autoconf, automake, libtool, dh-autoreconf, libdpkg-perl, git, doxygen, libosmocore-dev (>= 1.5.0), pkg-config, libpcap0.8-dev, libsctp-dev +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 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 Checksums-Sha1: - 56497b45b8751a7e9c2e8803e529f26e31816f71 164464 libosmo-netif_1.1.0.tar.xz + 82c889a606e370e1bbbf88aa2c9b97c5003db880 169548 libosmo-netif_1.2.0.tar.xz Checksums-Sha256: - 93c225d095fc5dea18feacc0bd85d9767200330ee147e9fdc778102df6237b18 164464 libosmo-netif_1.1.0.tar.xz + 5ab6d3e501d5aab705c7ea06b1b593814284861f2d468812181738a8d4df826d 169548 libosmo-netif_1.2.0.tar.xz Files: - 6cbd51ad2dee7fffce383b21b2ab4c3b 164464 libosmo-netif_1.1.0.tar.xz + 6d0ead92d775d253ebf646b63f219e98 169548 libosmo-netif_1.2.0.tar.xz
View file
libosmo-netif_1.1.0.tar.xz/.tarball-version -> libosmo-netif_1.2.0.tar.xz/.tarball-version
Changed
@@ -1 +1 @@ -1.1.0 \ No newline at end of file +1.2.0 \ No newline at end of file
View file
libosmo-netif_1.1.0.tar.xz/README.md -> libosmo-netif_1.2.0.tar.xz/README.md
Changed
@@ -17,9 +17,9 @@ You can clone from the official libosmo-netif.git repository using - git clone git://git.osmocom.org/libosmo-netif.git + git clone https://gitea.osmocom.org/osmocom/libosmo-netif -There is a cgit interface at <http://git.osmocom.org/libosmo-netif/> +There is a web interface at <https://gitea.osmocom.org/osmocom/libosmo-netif> Documentation -------------
View file
libosmo-netif_1.1.0.tar.xz/configure.ac -> libosmo-netif_1.2.0.tar.xz/configure.ac
Changed
@@ -89,8 +89,8 @@ dnl Generate the output AM_CONFIG_HEADER(config.h) -PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 1.5.0) -PKG_CHECK_MODULES(LIBOSMOGSM, libosmogsm >= 1.5.0) +PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 1.7.0) +PKG_CHECK_MODULES(LIBOSMOGSM, libosmogsm >= 1.7.0) AC_ARG_ENABLE(lapd_examples, AS_HELP_STRING( @@ -99,7 +99,7 @@ ), lapd_examples=$enableval, lapd_examples="no") AS_IF(test "x$lapd_examples" = "xyes", - PKG_CHECK_MODULES(LIBOSMOABIS, libosmoabis >= 1.1.0) + PKG_CHECK_MODULES(LIBOSMOABIS, libosmoabis >= 1.3.0) AC_DEFINE(ENABLE_LAPD, 1, Enable LAPD examples) ) AM_CONDITIONAL(ENABLE_LAPD, test "x$lapd_examples" = "xyes")
View file
libosmo-netif_1.1.0.tar.xz/contrib/libosmo-netif.spec.in -> libosmo-netif_1.2.0.tar.xz/contrib/libosmo-netif.spec.in
Changed
@@ -24,8 +24,8 @@ BuildRequires: libtool >= 2 BuildRequires: lksctp-tools-devel BuildRequires: pkgconfig >= 0.20 -BuildRequires: pkgconfig(libosmocore) >= 1.5.0 -BuildRequires: pkgconfig(libosmogsm) >= 1.5.0 +BuildRequires: pkgconfig(libosmocore) >= 1.7.0 +BuildRequires: pkgconfig(libosmogsm) >= 1.7.0 %description Network interface demuxer library for OsmoCom projects.
View file
libosmo-netif_1.1.0.tar.xz/debian/changelog -> libosmo-netif_1.2.0.tar.xz/debian/changelog
Changed
@@ -1,3 +1,29 @@ +libosmo-netif (1.2.0) unstable; urgency=medium + + Pau Espin Pedrol + * Introduce sctp.h to provide SCTP related functionalities + * stream: Factor out sctp_recvmg long code chunk + * stream: Add support for AF_UNIX sockets + * Introduce osmo_prim_srv APIs + * prim: Add internal CTL SAPI to negotiate SAP versions + * prim: return last error code + * amr: Fix FormatType from parsing BWE AMR header + * amr: Fix length check in bwe<->iuup converters + + Alexander Couzens + * amr: don't rely on pad bits to be zero + * export osmo_amr_bits + * amr: Introduce APIs to convert BE to IuUP/IuFP format + + Philipp Maier + * amr: cosmetic: fix grammer in comment + * amr_test: increase test coverage for oa / bwe conversation + + Harald Welte + * update git URLs (git -> https; gitea) + + -- Pau Espin Pedrol <pespin@sysmocom.de> Tue, 28 Jun 2022 18:09:49 +0200 + libosmo-netif (1.1.0) unstable; urgency=medium Vadim Yanitskiy
View file
libosmo-netif_1.1.0.tar.xz/debian/control -> libosmo-netif_1.2.0.tar.xz/debian/control
Changed
@@ -11,13 +11,13 @@ libdpkg-perl, git, doxygen, - libosmocore-dev (>= 1.5.0), + libosmocore-dev (>= 1.7.0), pkg-config, libpcap0.8-dev, libsctp-dev Standards-Version: 3.9.6 -Vcs-Browser: http://git.osmocom.org/libosmo-netif/ -Vcs-Git: git://git.osmocom.org/libosmo-netif.git +Vcs-Browser: https://gitea.osmocom.org/osmocom/libosmo-netif +Vcs-Git: https://gitea.osmocom.org/osmocom/libosmo-netif Homepage: https://projects.osmocom.org/projects/libosmo-netif Package: libosmonetif8
View file
libosmo-netif_1.1.0.tar.xz/debian/copyright -> libosmo-netif_1.2.0.tar.xz/debian/copyright
Changed
@@ -1,6 +1,6 @@ Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: libosmo-netif -Source: git://git.osmocom.org/libosmo-netif.git +Source: https://gitea.osmocom.org/osmocom/libosmo-netif Files: * Copyright: 2012-2013 On-Waves
View file
libosmo-netif_1.1.0.tar.xz/include/osmocom/netif/Makefile.am -> libosmo-netif_1.2.0.tar.xz/include/osmocom/netif/Makefile.am
Changed
@@ -4,8 +4,13 @@ osmux.h \ ipa.h \ ipa_unit.h \ + prim.h \ rs232.h \ rtp.h \ stream.h +if ENABLE_LIBSCTP +osmonetif_HEADERS += sctp.h +endif + osmonetifdir = $(includedir)/osmocom/netif
View file
libosmo-netif_1.1.0.tar.xz/include/osmocom/netif/amr.h -> libosmo-netif_1.2.0.tar.xz/include/osmocom/netif/amr.h
Changed
@@ -109,10 +109,15 @@ 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); 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); +int osmo_amr_bwe_to_iuup(uint8_t *payload, unsigned int payload_len); +int osmo_amr_iuup_to_bwe(uint8_t *payload, unsigned int payload_len, + unsigned int payload_maxlen); +int osmo_amr_bytes_to_ft(size_t bytes); #endif
View file
libosmo-netif_1.2.0.tar.xz/include/osmocom/netif/prim.h
Added
@@ -0,0 +1,64 @@ +/* (C) 2021 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 Affero General Public License as published by + * the Free Software Foundation; either version 3 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 Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/lienses/>. + * + */ +#pragma once + +#include <stdint.h> + +#include <osmocom/core/prim.h> +#include <osmocom/core/select.h> +#include <osmocom/core/linuxlist.h> + +struct osmo_prim_srv_link; +struct osmo_prim_srv; + +typedef int (*osmo_prim_srv_conn_cb)(struct osmo_prim_srv *prim_srv); +/*! oph and related msgb is owned by srv and wll be freed after the callback returns. */ +typedef int (*osmo_prim_srv_rx_cb)(struct osmo_prim_srv *prim_srv, struct osmo_prim_hdr *oph); + +/*! Return value: + * RET=rem_version: Accept the version + * RET!=rem_version && RET > 0: Reject the requested version but propose another candidate version + * In this case, the client can decide whether to request another VER + * or close the connection. + * RET<0: Reject the proposed version and close the connection. + */ +typedef int (*osmo_prim_srv_rx_sapi_version)(struct osmo_prim_srv *prim_srv, uint32_t sapi, uint16_t rem_version); + +struct osmo_prim_hdr *osmo_prim_msgb_alloc(unsigned int sap, unsigned int primitive, + enum osmo_prim_operation operation, size_t alloc_len); + +struct osmo_prim_srv_link *osmo_prim_srv_link_alloc(void *ctx); +void osmo_prim_srv_link_free(struct osmo_prim_srv_link *prim_link); +int osmo_prim_srv_link_set_addr(struct osmo_prim_srv_link *prim_link, const char *path); +const char *osmo_prim_srv_link_get_addr(struct osmo_prim_srv_link *prim_link); +void osmo_prim_srv_link_set_priv(struct osmo_prim_srv_link *prim_link, void *priv); +void *osmo_prim_srv_link_get_priv(const struct osmo_prim_srv_link *prim_link); +void osmo_prim_srv_link_set_log_category(struct osmo_prim_srv_link *prim_link, int log_cat); +void osmo_prim_srv_link_set_opened_conn_cb(struct osmo_prim_srv_link *prim_link, osmo_prim_srv_conn_cb opened_conn_cb); +void osmo_prim_srv_link_set_closed_conn_cb(struct osmo_prim_srv_link *prim_link, osmo_prim_srv_conn_cb closed_conn_cb); +void osmo_prim_srv_link_set_rx_sapi_version_cb(struct osmo_prim_srv_link *prim_link, osmo_prim_srv_rx_sapi_version rx_sapi_version_cb); +void osmo_prim_srv_link_set_rx_cb(struct osmo_prim_srv_link *prim_link, osmo_prim_srv_rx_cb rx_cb); +void osmo_prim_srv_link_set_rx_msgb_alloc_len(struct osmo_prim_srv_link *prim_link, size_t alloc_len); +int osmo_prim_srv_link_open(struct osmo_prim_srv_link *prim_link); + +int osmo_prim_srv_send(struct osmo_prim_srv *prim_srv, struct msgb *msg); +struct osmo_prim_srv_link *osmo_prim_srv_get_link(struct osmo_prim_srv *prims_srv); +void osmo_prim_srv_set_priv(struct osmo_prim_srv *prim_srv, void *priv); +void *osmo_prim_srv_get_priv(const struct osmo_prim_srv *prim_srv); +void osmo_prim_srv_close(struct osmo_prim_srv *prim_srv);
View file
libosmo-netif_1.2.0.tar.xz/include/osmocom/netif/sctp.h
Added
@@ -0,0 +1,13 @@ +#pragma once + +#include <osmocom/core/utils.h> + +enum sctp_sac_state; +extern const struct value_string osmo_sctp_assoc_chg_strs; +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_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); }
View file
libosmo-netif_1.1.0.tar.xz/include/osmocom/netif/stream.h -> libosmo-netif_1.2.0.tar.xz/include/osmocom/netif/stream.h
Changed
@@ -25,6 +25,8 @@ int osmo_stream_srv_link_set_addrs(struct osmo_stream_srv_link *link, const char **addr, size_t addrcnt); void osmo_stream_srv_link_set_port(struct osmo_stream_srv_link *link, uint16_t port); void osmo_stream_srv_link_set_proto(struct osmo_stream_srv_link *link, uint16_t proto); +int osmo_stream_srv_link_set_type(struct osmo_stream_srv_link *link, int type); +int osmo_stream_srv_link_set_domain(struct osmo_stream_srv_link *link, int domain); void osmo_stream_srv_link_set_accept_cb(struct osmo_stream_srv_link *link, int (*accept_cb)(struct osmo_stream_srv_link *link, int fd)); void osmo_stream_srv_link_set_data(struct osmo_stream_srv_link *link, void *data); void *osmo_stream_srv_link_get_data(struct osmo_stream_srv_link *link); @@ -57,6 +59,8 @@ void osmo_stream_cli_set_addr(struct osmo_stream_cli *cli, const char *addr); int osmo_stream_cli_set_addrs(struct osmo_stream_cli *cli, const char **addr, size_t addrcnt); void osmo_stream_cli_set_port(struct osmo_stream_cli *cli, uint16_t port); +int osmo_stream_cli_set_type(struct osmo_stream_cli *cli, int type); +int osmo_stream_cli_set_domain(struct osmo_stream_cli *cli, int domain); void osmo_stream_cli_set_proto(struct osmo_stream_cli *cli, uint16_t proto); void osmo_stream_cli_set_local_addr(struct osmo_stream_cli *cli, const char *addr); int osmo_stream_cli_set_local_addrs(struct osmo_stream_cli *cli, const char **addr, size_t addrcnt);
View file
libosmo-netif_1.1.0.tar.xz/src/Makefile.am -> libosmo-netif_1.2.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=9:1:1 +LIBVERSION=10:0:2 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,11 @@ ipa_unit.c \ jibuf.c \ osmux.c \ + prim.c \ rs232.c \ rtp.c \ stream.c + +if ENABLE_LIBSCTP +libosmonetif_la_SOURCES += sctp.c +endif
View file
libosmo-netif_1.1.0.tar.xz/src/amr.c -> libosmo-netif_1.2.0.tar.xz/src/amr.c
Changed
@@ -63,6 +63,17 @@ return amr_ft_to_bytesamr_ft; } +int osmo_amr_bytes_to_ft(size_t bytes) +{ + int ft; + + for (ft = 0; ft < AMR_FT_MAX; ft++) { + if (amr_ft_to_bytesft == bytes) + return ft; + } + return -1; +} + int osmo_amr_ft_valid(uint8_t amr_ft) { /* @@ -92,8 +103,8 @@ * mode normally relys on out of band methods that explicitly select * one of the two modes. (See also RFC 3267, chapter 3.8). However the * A interface in GSM does not provide ways to communicate which mode - * is used exactly used. The following functions uses some heuristics - * to check if an AMR payload is octet aligned or not. */ + * is exactly used. The following functions uses some heuristics to + * check if an AMR payload is octet aligned or not. */ struct amr_hdr *oa_hdr = (struct amr_hdr *)payload; unsigned int frame_len; @@ -152,7 +163,7 @@ return -1; /* Move TOC close to CMR */ - payload0 |= (payload1 >> 4) & 0x0f; + payload0 = (payload0 & 0xf0) | ((payload1 >> 4) & 0x0f); payload1 = (payload1 << 4) & 0xf0; for (i = 0; i < frame_len; i++) { @@ -207,3 +218,72 @@ memcpy(payload, buf, oa_payload_len); return oa_payload_len; } + +/*! Convert an AMR frame from bandwith-efficient mode to IuuP/IuFP payload. + * The IuuP/IuPF payload only contains the class a, b, c bits. No header. + * \paraminout payload user provided memory containing the AMR payload. + * \paramin payload_len overall length of the AMR payload. + * \paramin payload_maxlen maximum length of the user provided memory. + * \returns resulting payload length, negative on error. */ +int osmo_amr_bwe_to_iuup(uint8_t *payload, unsigned int payload_len) +{ + /* The header is only valid after shifting first two bytes to OA mode */ + unsigned int i, required_len_bits; + unsigned int amr_speech_len_bytes, amr_speech_len_bits; + uint8_t ft; + + if (payload_len < 2) + return -1; + + /* Calculate new payload length */ + ft = ((payload0 & 0x07) << 1) | ((payload1 & 0x80) >> 7); + if (!osmo_amr_ft_valid(ft)) + return -1; + + 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) + return -1; + + for (i = 0; i < amr_speech_len_bytes; i++) { + /* we have to shift the payload by 10 bits to get only the Class A, B, C bits */ + payloadi = (payloadi + 1 << 2) | ((payloadi + 2) >> 6); + } + + return amr_speech_len_bytes; +} + +/*! Convert an AMR frame from IuuP/IuFP payload to bandwith-efficient mode. + * The IuuP/IuPF payload only contains the class a, b, c bits. No header. + * The resulting buffer has space at the start prepared to be filled by CMR, TOC. + * \paraminout payload user provided memory containing the AMR payload. + * \paramin payload_len overall length of the AMR payload. + * \paramin payload_maxlen maximum length of the user provided memory (payload_len + 2 required). + * \returns resulting payload length, negative on error. */ +int osmo_amr_iuup_to_bwe(uint8_t *payload, unsigned int payload_len, + unsigned int payload_maxlen) +{ + /* shift all bits by 10 */ + unsigned int i, required_len_bits, required_len_bytes; + + int ft = osmo_amr_bytes_to_ft(payload_len); + if (ft < 0) + return ft; + + required_len_bits = osmo_amr_bits(ft) + 10; + required_len_bytes = (required_len_bits + 7)/8; + if (payload_maxlen < required_len_bytes) + return -1; + + i = payload_len + 1; + payloadi = (payloadi - 2 << 6); + for (i = payload_len; i >= 2; i--) { + /* we have to shift the payload by 10 bits to get only the Class A, B, C bits */ + payloadi = (payloadi - 1 >> 2) | (payloadi - 2 << 6); + } + payloadi = (payloadi - 1 >> 2); + payload0 = 0; + return required_len_bytes; +}
View file
libosmo-netif_1.2.0.tar.xz/src/prim.c
Added
@@ -0,0 +1,461 @@ +/* (C) 2021 by sysmocom - s.f.m.c. GmbH <info@sysmocom.de> + * Author: Pau Espin Pedrol <pespin@sysmocom.de> + * All Rights Reserved + * + * SPDX-License-Identifier: GPL-2.0+ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ + +#include <stdio.h> +#include <unistd.h> +#include <stdlib.h> +#include <string.h> +#include <errno.h> +#include <assert.h> +#include <sys/socket.h> +#include <sys/un.h> +#include <inttypes.h> + +#include <osmocom/core/talloc.h> +#include <osmocom/core/select.h> +#include <osmocom/core/socket.h> +#include <osmocom/core/logging.h> + +#include <osmocom/netif/prim.h> +#include <osmocom/netif/stream.h> + +struct osmo_prim_pkt_hdr { + uint32_t sap; /*!< Service Access Point Identifier */ + uint16_t primitive; /*!< Primitive number */ + uint16_t operation; /*! Primitive Operation (enum osmo_prim_operation) */ +} __attribute__ ((packed)); + +/* Here we take advantage of the fact that sizeof(struct + * osmo_prim_pkt_hdr) <= sizeof(struct osmo_prim_hdr), so we don't need + * to allocate headroom when serializing later. + */ +osmo_static_assert(sizeof(struct osmo_prim_pkt_hdr) <= sizeof(struct osmo_prim_hdr), + osmo_prim_msgb_alloc_validate_headroom); + +/*! Allocate a primitive of given type and its associated msgb. +* \paramin sap Service Access Point +* \paramin primitive Primitive Number +* \paramin operation Primitive Operation (REQ/RESP/IND/CONF) +* \paramin alloc_len Total length (including struct osmo_prim_hdr) to allocate for the primitive +* \returns Pointer to allocated prim_hdr inisde its own msgb. The osmo_prim_hdr +* is pre-alocated & pre-filled. +*/ +struct osmo_prim_hdr *osmo_prim_msgb_alloc(unsigned int sap, unsigned int primitive, + enum osmo_prim_operation operation, size_t alloc_len) +{ + struct msgb *msg; + struct osmo_prim_hdr *oph; + + if (alloc_len < sizeof(*oph)) + return NULL; + + msg = msgb_alloc(alloc_len, "osmo_prim_msgb_alloc"); + oph = (struct osmo_prim_hdr *)msgb_put(msg, sizeof(*oph)); + osmo_prim_init(oph, sap, primitive, operation, msg); + msg->l2h = msg->tail; + + return oph; +} + +struct osmo_prim_srv_link { + void *priv; + char *addr; + int log_cat; /* Defaults to DLGLOBAL */ + struct osmo_stream_srv_link *stream; + osmo_prim_srv_conn_cb opened_conn_cb; + osmo_prim_srv_conn_cb closed_conn_cb; + osmo_prim_srv_rx_sapi_version rx_sapi_version_cb; + osmo_prim_srv_rx_cb rx_cb; + size_t rx_msgb_alloc_len; +}; + +struct osmo_prim_srv { + void *priv; + struct osmo_prim_srv_link *link; /* backpointer */ + struct osmo_stream_srv *stream; +}; + +/****************************** + * CONTROL SAP + ******************************/ +#define OSMO_PRIM_CTL_SAPI 0xffffffff +#define OSMO_PRIM_CTL_API_VERSION 0 + +enum sap_ctl_prim_type { + SAP_CTL_PRIM_HELLO, + _SAP_CTL_PRIM_MAX +}; + +const struct value_string sap_ctl_prim_type_names = { + OSMO_VALUE_STRING(SAP_CTL_PRIM_HELLO), + { 0, NULL } +}; + +/* HNB_CTL_PRIM_HELLO.ind, UL */ +struct sap_ctl_hello_param { + uint32_t sapi; /* SAPI for which we negotiate version */ + uint16_t api_version; /* The intended version */ +} __attribute__ ((packed)); + +struct sap_ctl_prim { + struct osmo_prim_hdr hdr; + union { + struct sap_ctl_hello_param hello_req; + struct sap_ctl_hello_param hello_cnf; + } u; +} __attribute__ ((packed)); + +static struct sap_ctl_prim *_sap_ctl_makeprim_hello_cnf(uint32_t sapi, uint16_t api_version) +{ + struct sap_ctl_prim *ctl_prim; + + ctl_prim = (struct sap_ctl_prim *)osmo_prim_msgb_alloc( + OSMO_PRIM_CTL_SAPI, SAP_CTL_PRIM_HELLO, PRIM_OP_CONFIRM, + sizeof(struct osmo_prim_hdr) + sizeof(struct sap_ctl_hello_param)); + msgb_put(ctl_prim->hdr.msg, sizeof(struct sap_ctl_hello_param)); + ctl_prim->u.hello_cnf.sapi = sapi; + ctl_prim->u.hello_cnf.api_version = api_version; + + return ctl_prim; +} + +/****************************** + * osmo_prim_srv + ******************************/ +#define LOGSRV(srv, lvl, fmt, args...) LOGP((srv)->link->log_cat, lvl, fmt, ## args) + +static int _srv_sap_ctl_rx_hello_req(struct osmo_prim_srv *prim_srv, struct sap_ctl_hello_param *hello_ind) +{ + struct sap_ctl_prim *prim_resp; + int rc; + + LOGSRV(prim_srv, LOGL_INFO, "Rx CTL-HELLO.req SAPI=%u API_VERSION=%u\n", hello_ind->sapi, hello_ind->api_version); + + if (hello_ind->sapi == OSMO_PRIM_CTL_SAPI) + rc = hello_ind->api_version == OSMO_PRIM_CTL_API_VERSION ? OSMO_PRIM_CTL_API_VERSION : -1; + else if (prim_srv->link->rx_sapi_version_cb) + rc = prim_srv->link->rx_sapi_version_cb(prim_srv, hello_ind->sapi, hello_ind->api_version); + else /* Accept whatever version by default: */ + rc = hello_ind->api_version; + + if (rc < 0) { + LOGSRV(prim_srv, LOGL_ERROR, + "SAPI=%u API_VERSION=%u not supported! destroying connection\n", + hello_ind->sapi, hello_ind->api_version); + osmo_stream_srv_set_flush_and_destroy(prim_srv->stream); + return rc; + } + prim_resp = _sap_ctl_makeprim_hello_cnf(hello_ind->sapi, (uint16_t)rc); + LOGSRV(prim_srv, LOGL_INFO, "Tx CTL-HELLO.cnf SAPI=%u API_VERSION=%u\n", + hello_ind->sapi, prim_resp->u.hello_cnf.api_version); + rc = osmo_prim_srv_send(prim_srv, prim_resp->hdr.msg); + return rc; +} + +static int _srv_sap_ctl_rx(struct osmo_prim_srv *prim_srv, struct osmo_prim_hdr *oph) +{ + switch (oph->operation) { + case PRIM_OP_REQUEST: + switch (oph->primitive) { + case SAP_CTL_PRIM_HELLO: + return _srv_sap_ctl_rx_hello_req(prim_srv, (struct sap_ctl_hello_param *)msgb_data(oph->msg)); + default: + LOGSRV(prim_srv, LOGL_ERROR, "Rx unknown CTL SAP primitive %u (len=%u)\n", + oph->primitive, msgb_length(oph->msg)); + return -EINVAL; + } + break; + case PRIM_OP_RESPONSE: + case PRIM_OP_INDICATION: + case PRIM_OP_CONFIRM: + default: + LOGSRV(prim_srv, LOGL_ERROR, "Rx CTL SAP unexpected primitive operation %s-%s (len=%u)\n", + get_value_string(sap_ctl_prim_type_names, oph->primitive), + get_value_string(osmo_prim_op_names, oph->operation), + msgb_length(oph->msg)); + return -EINVAL; + } +} + +static int _osmo_prim_srv_read_cb(struct osmo_stream_srv *srv) +{
View file
libosmo-netif_1.2.0.tar.xz/src/sctp.c
Added
@@ -0,0 +1,28 @@ +#include <netinet/sctp.h> +#include <osmocom/netif/sctp.h> + +const struct value_string osmo_sctp_assoc_chg_strs = { + { SCTP_COMM_UP, "COMM_UP" }, + { SCTP_COMM_LOST, "COMM_LOST" }, + { SCTP_RESTART, "RESTART" }, + { SCTP_SHUTDOWN_COMP, "SHUTDOWN_COMP" }, + { SCTP_CANT_STR_ASSOC, "CANT_STR_ASSOC" }, + { 0, NULL } +}; + +const struct value_string osmo_sctp_sn_type_strs = { + { SCTP_ASSOC_CHANGE, "ASSOC_CHANGE" }, + { SCTP_PEER_ADDR_CHANGE, "PEER_ADDR_CHANGE" }, + { SCTP_SHUTDOWN_EVENT, "SHUTDOWN_EVENT" }, + { SCTP_SEND_FAILED, "SEND_FAILED" }, + { SCTP_REMOTE_ERROR, "REMOTE_ERROR" }, + { SCTP_PARTIAL_DELIVERY_EVENT, "PARTIAL_DELIVERY_EVENT" }, + { SCTP_ADAPTATION_INDICATION, "ADAPTATION_INDICATION" }, +#ifdef SCTP_AUTHENTICATION_INDICATION + { SCTP_AUTHENTICATION_INDICATION, "AUTHENTICATION_INDICATION" }, +#endif +#ifdef SCTP_SENDER_DRY_EVENT + { SCTP_SENDER_DRY_EVENT, "SENDER_DRY_EVENT" }, +#endif + { 0, NULL } +};
View file
libosmo-netif_1.1.0.tar.xz/src/stream.c -> libosmo-netif_1.2.0.tar.xz/src/stream.c
Changed
@@ -256,6 +256,8 @@ char *local_addrOSMO_STREAM_MAX_ADDRS; uint8_t local_addrcnt; uint16_t local_port; + int sk_domain; + int sk_type; uint16_t proto; int (*connect_cb)(struct osmo_stream_cli *srv); int (*disconnect_cb)(struct osmo_stream_cli *srv); @@ -349,20 +351,31 @@ LOGSCLI(cli, LOGL_DEBUG, "sending %u bytes of data\n", msgb_length(msg)); - switch (cli->proto) { -#ifdef HAVE_LIBSCTP - case IPPROTO_SCTP: - 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), - &sinfo, MSG_NOSIGNAL); + switch (cli->sk_domain) { + case AF_UNIX: + ret = send(cli->ofd.fd, msg->data, msg->len, 0); break; + case AF_UNSPEC: + case AF_INET: + case AF_INET6: + switch (cli->proto) { +#ifdef HAVE_LIBSCTP + case IPPROTO_SCTP: + 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), + &sinfo, MSG_NOSIGNAL); + break; #endif - case IPPROTO_TCP: - default: - ret = send(cli->ofd.fd, msg->data, msgb_length(msg), 0); + case IPPROTO_TCP: + default: + ret = send(cli->ofd.fd, msg->data, msgb_length(msg), 0); + break; + } break; + default: + ret = -ENOTSUP; } if (ret < 0) { if (errno == EPIPE || errno == ENOTCONN) { @@ -374,6 +387,20 @@ return 0; } +static int _setsockopt_nosigpipe(struct osmo_stream_cli *cli) +{ +#ifdef SO_NOSIGPIPE + int ret; + int val = 1; + ret = setsockopt(cli->ofd.fd, SOL_SOCKET, SO_NOSIGPIPE, (void *)&val, sizeof(val)); + if (ret < 0) + LOGSCLI(cli, LOGL_DEBUG, "Failed setting SO_NOSIGPIPE: %s\n", strerror(errno)); + return ret; +#else + return 0; +#endif +} + static int osmo_stream_cli_fd_cb(struct osmo_fd *ofd, unsigned int what) { struct osmo_stream_cli *cli = ofd->data; @@ -395,15 +422,20 @@ LOGSCLI(cli, LOGL_DEBUG, "connection done.\n"); cli->state = STREAM_CLI_STATE_CONNECTED; - if (cli->proto == IPPROTO_SCTP) { -#ifdef SO_NOSIGPIPE - int val = 1; - - ret = setsockopt(ofd->fd, SOL_SOCKET, SO_NOSIGPIPE, (void*)&val, sizeof(val)); - if (ret < 0) - LOGSCLI(cli, LOGL_DEBUG, "Failed setting SO_NOSIGPIPE: %s\n", strerror(errno)); -#endif - sctp_sock_activate_events(ofd->fd); + switch (cli->sk_domain) { + case AF_UNIX: + _setsockopt_nosigpipe(cli); + break; + case AF_UNSPEC: + case AF_INET: + case AF_INET6: + if (cli->proto == IPPROTO_SCTP) { + _setsockopt_nosigpipe(cli); + sctp_sock_activate_events(ofd->fd); + } + break; + default: + break; } if (cli->connect_cb) cli->connect_cb(cli); @@ -441,6 +473,8 @@ if (!cli) return NULL; + cli->sk_domain = AF_UNSPEC; + cli->sk_type = SOCK_STREAM; cli->proto = IPPROTO_TCP; cli->ofd.fd = -1; cli->ofd.priv_nr = 0; /* XXX */ @@ -557,6 +591,46 @@ cli->flags |= OSMO_STREAM_CLI_F_RECONF; } +/*! \brief Set the socket type for the stream server link + * \paramin cli Stream Client to modify + * \paramin type Socket Type (like SOCK_STREAM (default), SOCK_SEQPACKET, ...) + * \returns zero on success, negative on error. + */ +int osmo_stream_cli_set_type(struct osmo_stream_cli *cli, int type) +{ + switch (type) { + case SOCK_STREAM: + case SOCK_SEQPACKET: + break; + default: + return -ENOTSUP; + } + cli->sk_type = type; + cli->flags |= OSMO_STREAM_CLI_F_RECONF; + return 0; +} + +/*! \brief Set the socket type for the stream server link + * \paramin cli Stream Client to modify + * \paramin type Socket Domain (like AF_UNSPEC (default for IP), AF_UNIX, AF_INET, ...) + * \returns zero on success, negative on error. + */ +int osmo_stream_cli_set_domain(struct osmo_stream_cli *cli, int domain) +{ + switch (domain) { + case AF_UNSPEC: + case AF_INET: + case AF_INET6: + case AF_UNIX: + break; + default: + return -ENOTSUP; + } + cli->sk_domain = domain; + cli->flags |= OSMO_STREAM_CLI_F_RECONF; + return 0; +} + /*! \brief Set the reconnect time of the stream client socket * \paramin cli Stream Client to modify * \paramin timeout Re-connect timeout in seconds or negative value to disable auto-reconnection */ @@ -731,21 +805,31 @@ cli->flags &= ~OSMO_STREAM_CLI_F_RECONF; - - switch (cli->proto) { -#ifdef HAVE_LIBSCTP - case IPPROTO_SCTP: - ret = osmo_sock_init2_multiaddr(AF_UNSPEC, SOCK_STREAM, cli->proto, - (const char **)cli->local_addr, cli->local_addrcnt, cli->local_port, - (const char **)cli->addr, cli->addrcnt, cli->port, - OSMO_SOCK_F_CONNECT|OSMO_SOCK_F_BIND|OSMO_SOCK_F_NONBLOCK); + switch (cli->sk_domain) { + case AF_UNIX: + ret = osmo_sock_unix_init(cli->sk_type, 0, cli->addr0, OSMO_SOCK_F_CONNECT|OSMO_SOCK_F_BIND|OSMO_SOCK_F_NONBLOCK); break; + case AF_INET: + case AF_INET6: + case AF_UNSPEC: + switch (cli->proto) { +#ifdef HAVE_LIBSCTP + case IPPROTO_SCTP: + ret = osmo_sock_init2_multiaddr(cli->sk_domain, cli->sk_type, cli->proto, + (const char **)cli->local_addr, cli->local_addrcnt, cli->local_port, + (const char **)cli->addr, cli->addrcnt, cli->port, + OSMO_SOCK_F_CONNECT|OSMO_SOCK_F_BIND|OSMO_SOCK_F_NONBLOCK); + break; #endif + default: + ret = osmo_sock_init2(cli->sk_domain, cli->sk_type, cli->proto, + cli->local_addr0, cli->local_port, + cli->addr0, cli->port, + OSMO_SOCK_F_CONNECT|OSMO_SOCK_F_BIND|OSMO_SOCK_F_NONBLOCK); + } + break; default: - ret = osmo_sock_init2(AF_UNSPEC, SOCK_STREAM, cli->proto, - cli->local_addr0, cli->local_port, - cli->addr0, cli->port, - OSMO_SOCK_F_CONNECT|OSMO_SOCK_F_BIND|OSMO_SOCK_F_NONBLOCK); + return -ENOTSUP;
View file
libosmo-netif_1.1.0.tar.xz/tests/amr/amr_test.c -> libosmo-netif_1.2.0.tar.xz/tests/amr/amr_test.c
Changed
@@ -29,6 +29,7 @@ "703c22f979890338540179209572624a0f8535871c2f7039cbf926b7e4425b6ef0", "703c2e671f3b1b0810412d5adae61e2b2a319885c6ced4e909b4eeaa2ea0f0cd80", "703cf8fc77356c948141686cda34d35220db719e36a359d86b64420dc64b563850", + "703c3eec9c37dfb201c093c57a1235a02af55ccc22f1c9593a6e058c368b4d7f50", "60344e300c0e6251342c2ae51fd8a698a945488d16c98922726f3e50", "60341fc722c7880328a9c280030bc9755c3ef519f80000295323e000", "60342c338655c00008efba03592419adf62478a79278b3e2d68ab0f0", @@ -47,7 +48,7 @@ "0004f89d67f1160935bde1996840", "0004633cc7f0630439ffe0000000", "0004eb81fc0758973b9edc782550", - "a078ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00fc", /* sample with invalid FT */ + "a078ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00fc", /* sample with invalid FT, will be detected as bandwith-efficient */ "END", }; @@ -55,14 +56,33 @@ char *bwe_amr_samples = { "f4495c7cda8f80", "f44aaa6c969780", + "7449c1e32c6780", + "74400000000380", + "703c493323b0bf68028086d15a00", + "703c59171697c53c01801fb6aa80", + "703c55029bb2e23a0020172e8b00", + "703c48f52442f08884a8050b8500", + "7038000000000000000000000000", + "7151434e01292c40c4735e4412204077", + "714eadbe13ac4694f4726f71985d64cd", "f3d09c20e32da600c025a72e0a9b360386e40f87e19282094adc1a11e397d1d4", "f3d39a49a09e7a802852e297e8c9246aadf5a45928bfc27177fed8404d97d3b8", "f3c2155b65131c68682079fab4810911200003b360ae0446000025f11e539dd0", "f3c381bc7061c9f8507f6029de6115c16e5fa470c243b21b6e35dbb48bd84c00", + "73c901b7a2004be7f85284b6ab7142acfe6872b1ae1c107d0588b551de7be650", "a7bfc03fc03fc03fc03fc03fc03fc03fc03fc03fc03fc03fc03fc03fc03fc03f", /* sample with invalid FT */ "END", }; +/* Some IuUP payload containg AMR */ +char *iuup_amr_samples = { + "7a687b8b29ba02013d3cb863a5af4206869618fb5336d504968d7541663210", + "4482803977dc1880b56aab097728a6bbbb48a57e3affe41125838a5ce65fc0", + "2683c1d26e", + "END", +}; + + void dump_bits(uint8_t *buf, int len) { unsigned int i; @@ -185,6 +205,56 @@ } } +void osmo_amr_iuup_to_bwe_and_inverse_test(void) +{ + uint8_t buf256; + uint8_t buf_chk256; + unsigned int ft; + + unsigned int i = 0; + int len; + int rc; + + printf("\n\n"); + printf + ("Testing conversion from IuUP to bw-efficient and inverse:\n"); + + while (1) { + if (strcmp(iuup_amr_samplesi, "END") == 0) + return; + printf("Sample No.: %d...", i); + + len = osmo_hexparse(iuup_amr_samplesi, buf, sizeof(buf)); + OSMO_ASSERT(len > 0); + i++; + + ft = osmo_amr_bytes_to_ft(len); + if (ft < 0) { + printf(" skipping a sample with a wrong FT\n"); + continue; + } + printf(" AMR mode: %d, IuUP: %d bytes,", ft, len); + memcpy(buf_chk, buf, sizeof(buf)); + + rc = osmo_amr_iuup_to_bwe(buf, len, sizeof(buf)); + OSMO_ASSERT(rc > 0); + OSMO_ASSERT((rc == len + 1) || (rc == len + 2)); + printf(" BE: %d bytes (%s),", rc, osmo_hexdump(buf, rc)); + + buf0 = (ft >> 1) & 0x07; + buf1 = ((ft & 0x01) << 7) | (buf1 & 0x3f); + rc = osmo_amr_bwe_to_iuup(buf, rc); + printf(" IuUP: %d bytes\n", rc); + OSMO_ASSERT(rc > 0); + OSMO_ASSERT(len == rc); + if (memcmp(buf, buf_chk, len) != 0) { + printf("Got: %s\n", osmo_hexdump(buf, len)); + printf("Expected:%s\n", osmo_hexdump(buf_chk, len)); + } + OSMO_ASSERT(memcmp(buf, buf_chk, len) == 0); + } +} + void osmo_amr_is_oa_test(void) { uint8_t buf256; @@ -239,6 +309,7 @@ osmo_amr_oa_to_bwe_test(); osmo_amr_bwe_to_oa_test(); osmo_amr_oa_to_bwe_and_inverse_test(); + osmo_amr_iuup_to_bwe_and_inverse_test(); osmo_amr_is_oa_test(); fprintf(stdout, "OK: Test passed\n");
View file
libosmo-netif_1.1.0.tar.xz/tests/amr/amr_test.ok -> libosmo-netif_1.2.0.tar.xz/tests/amr/amr_test.ok
Changed
@@ -24,132 +24,139 @@ rc: 32 Sample No.: 3 + octet aligned: 703c3eec9c37dfb201c093c57a1235a02af55ccc22f1c9593a6e058c368b4d7f50 + 011100000011110000111110111011001001110000110111110111111011001000000001110000001001001111000101011110100001001000110101101000000010101011110101010111001100110000100010111100011100100101011001001110100110111000000101100011000011011010001011010011010111111101010000 + bw-efficient: 73cfbb270df7ec807024f15e848d680abd573308bc72564e9b81630da2d35fd4 + 0111001111001111101110110010011100001101111101111110110010000000011100000010010011110001010111101000010010001101011010000000101010111101010101110011001100001000101111000111001001010110010011101001101110000001011000110000110110100010110100110101111111010100 + rc: 32 + +Sample No.: 4 octet aligned: 60344e300c0e6251342c2ae51fd8a698a945488d16c98922726f3e50 01100000001101000100111000110000000011000000111001100010010100010011010000101100001010101110010100011111110110001010011010011000101010010100010101001000100011010001011011001001100010010010001001110010011011110011111001010000 bw-efficient: 63538c030398944d0b0ab947f629a62a51522345b262489c9bcf94 011000110101001110001100000000110000001110011000100101000100110100001011000010101011100101000111111101100010100110100110001010100101000101010010001000110100010110110010011000100100100010011100100110111100111110010100 rc: 27 -Sample No.: 4 +Sample No.: 5 octet aligned: 60341fc722c7880328a9c280030bc9755c3ef519f80000295323e000 01100000001101000001111111000111001000101100011110001000000000110010100010101001110000101000000000000011000010111100100101110101010111000011111011110101000110011111100000000000000000000010100101010011001000111110000000000000 bw-efficient: 6347f1c8b1e200ca2a70a000c2f25d570fbd467e00000a54c8f800 011000110100011111110001110010001011000111100010000000001100101000101010011100001010000000000000110000101111001001011101010101110000111110111101010001100111111000000000000000000000101001010100110010001111100000000000 rc: 27 -Sample No.: 5 +Sample No.: 6 octet aligned: 60342c338655c00008efba03592419adf62478a79278b3e2d68ab0f0 01100000001101000010110000110011100001100101010111000000000000000000100011101111101110100000001101011001001001000001100110101101111101100010010001111000101001111001001001111000101100111110001011010110100010101011000011110000 bw-efficient: 634b0ce1957000023bee80d649066b7d891e29e49e2cf8b5a2ac3c 011000110100101100001100111000011001010101110000000000000000001000111011111011101000000011010110010010010000011001101011011111011000100100011110001010011110010010011110001011001111100010110101101000101010110000111100 rc: 27 -Sample No.: 6 +Sample No.: 7 octet aligned: 502c98ab841e491ff7a1a555016a32a3c7f913210630 01010000001011001001100010101011100001000001111001001001000111111111011110100001101001010101010100000001011010100011001010100011110001111111100100010011001000010000011000110000 bw-efficient: 52e62ae1079247fde86955405a8ca8f1fe44c8418c00 01010010111001100010101011100001000001111001001001000111111111011110100001101001010101010100000001011010100011001010100011110001111111100100010011001000010000011000110000000000 rc: 22 -Sample No.: 7 +Sample No.: 8 octet aligned: 502cc5459a0d200e7097c4dfe86ec8d27f1756d776f0 01010000001011001100010101000101100110100000110100100000000011100111000010010111110001001101111111101000011011101100100011010010011111110001011101010110110101110111011011110000 bw-efficient: 52f151668348039c25f137fa1bb2349fc5d5b5ddbc00 01010010111100010101000101100110100000110100100000000011100111000010010111110001001101111111101000011011101100100011010010011111110001011101010110110101110111011011110000000000 rc: 22 -Sample No.: 8 +Sample No.: 9 octet aligned: 502c42b332081813d7e916e7aa5e80d7fde812b8c080 01010000001011000100001010110011001100100000100000011000000100111101011111101001000101101110011110101010010111101000000011010111111111011110100000010010101110001100000010000000 bw-efficient: 52d0accc820604f5fa45b9ea97a035ff7a04ae302000 01010010110100001010110011001100100000100000011000000100111101011111101001000101101110011110101010010111101000000011010111111111011110100000010010101110001100000010000000000000 rc: 22 -Sample No.: 9 +Sample No.: 10 octet aligned: 40240343e959c79bacd20c77501054880a718db200 010000000010010000000011010000111110100101011001110001111001101110101100110100100000110001110111010100000001000001010100100010000000101001110001100011011011001000000000 bw-efficient: 4240d0fa5671e6eb34831dd4041522029c636c80 0100001001000000110100001111101001010110011100011110011011101011001101001000001100011101110101000000010000010101001000100000001010011100011000110110110010000000 rc: 20 -Sample No.: 10 +Sample No.: 11 octet aligned: 4024172c53401e39115ceecd12606df5689bdd0ca0 010000000010010000010111001011000101001101000000000111100011100100010001010111001110111011001101000100100110000001101101111101010110100010011011110111010000110010100000 bw-efficient: 4245cb14d0078e44573bb344981b7d5a26f74328 0100001001000101110010110001010011010000000001111000111001000100010101110011101110110011010001001001100000011011011111010101101000100110111101110100001100101000 rc: 20 -Sample No.: 11 +Sample No.: 12 octet aligned: 4024f871cf48801ec427f0fc3f7318898622062200 010000000010010011111000011100011100111101001000100000000001111011000100001001111111000011111100001111110111001100011000100010011000011000100010000001100010001000000000 bw-efficient: 427e1c73d22007b109fc3f0fdcc6226188818880 0100001001111110000111000111001111010010001000000000011110110001000010011111110000111111000011111101110011000110001000100110000110001000100000011000100010000000 rc: 20 -Sample No.: 12 +Sample No.: 13 octet aligned: 20141fd4c02667c742b164aef659ffe708 0010000000010100000111111101010011000000001001100110011111000111010000101011000101100100101011101111011001011001111111111110011100001000 bw-efficient: 2147f5300999f1d0ac592bbd967ff9c2 00100001010001111111010100110000000010011001100111110001110100001010110001011001001010111011110110010110011111111111100111000010 rc: 16 -Sample No.: 13 +Sample No.: 14 octet aligned: 2014197e10ead7b250bccbbf3b81887c64 0010000000010100000110010111111000010000111010101101011110110010010100001011110011001011101111110011101110000001100010000111110001100100 bw-efficient: 21465f843ab5ec942f32efcee0621f19 00100001010001100101111110000100001110101011010111101100100101000010111100110010111011111100111011100000011000100001111100011001 rc: 16 -Sample No.: 14 +Sample No.: 15 octet aligned: 2014e959f35fdfe5e9667ffbc088818088 0010000000010100111010010101100111110011010111111101111111100101111010010110011001111111111110111100000010001000100000011000000010001000 bw-efficient: 217a567cd7f7f97a599ffef022206022 00100001011110100101011001111100110101111111011111111001011110100101100110011111111111101111000000100010001000000110000000100010 rc: 16 -Sample No.: 15 +Sample No.: 16 octet aligned: 100c4e9ba850e30d5d53d04de41e7c 000100000000110001001110100110111010100001010000111000110000110101011101010100111101000001001101111001000001111001111100 bw-efficient: 10d3a6ea1438c35754f41379079f00 000100001101001110100110111010100001010000111000110000110101011101010100111101000001001101111001000001111001111100000000 rc: 15 -Sample No.: 16 +Sample No.: 17 octet aligned: 100c6c18e7b7fff53aeb055e7d1c54 000100000000110001101100000110001110011110110111111111111111010100111010111010110000010101011110011111010001110001010100 bw-efficient: 10db0639edfffd4ebac1579f471500 000100001101101100000110001110011110110111111111111111010100111010111010110000010101011110011111010001110001010100000000 rc: 15 -Sample No.: 17 +Sample No.: 18 octet aligned: 100c1fb967f7f1fdf547bf2e61c060 000100000000110000011111101110010110011111110111111100011111110111110101010001111011111100101110011000011100000001100000 bw-efficient: 10c7ee59fdfc7f7d51efcb98701800 000100001100011111101110010110011111110111111100011111110111110101010001111011111100101110011000011100000001100000000000 rc: 15 -Sample No.: 18 +Sample No.: 19 octet aligned: 0004f89d67f1160935bde1996840 0000000000000100111110001001110101100111111100010001011000001001001101011011110111100001100110010110100001000000 bw-efficient: 007e2759fc45824d6f78665a1000 0000000001111110001001110101100111111100010001011000001001001101011011110111100001100110010110100001000000000000 rc: 14 -Sample No.: 19 +Sample No.: 20 octet aligned: 0004633cc7f0630439ffe0000000 0000000000000100011000110011110011000111111100000110001100000100001110011111111111100000000000000000000000000000 bw-efficient: 0058cf31fc18c10e7ff800000000 0000000001011000110011110011000111111100000110001100000100001110011111111111100000000000000000000000000000000000 rc: 14 -Sample No.: 20 +Sample No.: 21 octet aligned: 0004eb81fc0758973b9edc782550 0000000000000100111010111000000111111100000001110101100010010111001110111001111011011100011110000010010101010000 bw-efficient: 007ae07f01d625cee7b71e095400 0000000001111010111000000111111100000001110101100010010111001110111001111011011100011110000010010101010000000000 rc: 14 -Sample No.: 21 +Sample No.: 22 octet aligned: a078ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00fc 101000000111100011111111000000001111111100000000111111110000000011111111000000001111111100000000111111110000000011111111000000001111111100000000111111110000000011111111000000001111111100000000111111110000000011111111000000001111111100000000111111110000000011111100 bw-efficient: @@ -174,34 +181,104 @@ rc: 7 Sample No.: 2 + bw-efficient: 7449c1e32c6780 + 01110100010010011100000111100011001011000110011110000000 + octet aligned: 704427078cb19c + 01110000010001000010011100000111100011001011000110011100 + rc: 7 + +Sample No.: 3 + bw-efficient: 74400000000380 + 01110100010000000000000000000000000000000000001110000000 + octet aligned: 7044000000000c + 01110000010001000000000000000000000000000000000000001100 + rc: 7 + +Sample No.: 4 + bw-efficient: 703c493323b0bf68028086d15a00 + 0111000000111100010010010011001100100011101100001011111101101000000000101000000010000110110100010101101000000000 + octet aligned: 7000f124cc8ec2fda00a021b4568 + 0111000000000000111100010010010011001100100011101100001011111101101000000000101000000010000110110100010101101000 + rc: 14 + +Sample No.: 5 + bw-efficient: 703c59171697c53c01801fb6aa80 + 0111000000111100010110010001011100010110100101111100010100111100000000011000000000011111101101101010101010000000 + octet aligned: 7000f1645c5a5f14f006007edaa8 + 0111000000000000111100010110010001011100010110100101111100010100111100000000011000000000011111101101101010101000 + rc: 14 + +Sample No.: 6 + bw-efficient: 703c55029bb2e23a0020172e8b00 + 0111000000111100010101010000001010011011101100101110001000111010000000000010000000010111001011101000101100000000 + octet aligned: 7000f1540a6ecb88e800805cba2c + 0111000000000000111100010101010000001010011011101100101110001000111010000000000010000000010111001011101000101100 + rc: 14 + +Sample No.: 7 + bw-efficient: 703c48f52442f08884a8050b8500 + 0111000000111100010010001111010100100100010000101111000010001000100001001010100000000101000010111000010100000000 + octet aligned: 7000f123d4910bc22212a0142e14
View file
libosmo-netif_1.1.0.tar.xz/tests/osmo-pcap-test/configure.ac -> libosmo-netif_1.2.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.5.0) +PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 1.7.0) AC_PROG_CC AC_DISABLE_STATIC
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
.