Projects
osmocom:latest
osmo-bsc
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 10
View file
osmo-bsc_1.12.2.dsc -> osmo-bsc_1.12.3.dsc
Changed
@@ -2,7 +2,7 @@ Source: osmo-bsc Binary: osmo-bsc, osmo-bsc-dbg, abisip-find, osmo-bsc-ipaccess-utils, osmo-bsc-bs11-utils, osmo-bsc-meas-utils, osmo-bsc-doc Architecture: any all -Version: 1.12.2 +Version: 1.12.3 Maintainer: Osmocom team <openbsc@lists.osmocom.org> Homepage: https://projects.osmocom.org/projects/osmo-bsc Standards-Version: 3.9.8 @@ -18,8 +18,8 @@ osmo-bsc-ipaccess-utils deb net extra arch=any osmo-bsc-meas-utils deb net extra arch=any Checksums-Sha1: - 986a8eb13fdb0edc168668fef151b19a8a91ef7f 626208 osmo-bsc_1.12.2.tar.xz + c0c4e07cce417d9277c04206fcbeb637f9e26c15 628796 osmo-bsc_1.12.3.tar.xz Checksums-Sha256: - 02ed70bdd6836202028f5cba3b65d4b415490401d96b444203d8837e8e157e97 626208 osmo-bsc_1.12.2.tar.xz + ed8cd3fa8ce6a775ccd17069bd05aa3b233857a78770675f78b01afc4340f4fe 628796 osmo-bsc_1.12.3.tar.xz Files: - 783275f46f330ae2ac0f458cc28caa34 626208 osmo-bsc_1.12.2.tar.xz + e8e6d9f500749a61696af185cc0a98fc 628796 osmo-bsc_1.12.3.tar.xz
View file
osmo-bsc_1.12.2.tar.xz/.tarball-version -> osmo-bsc_1.12.3.tar.xz/.tarball-version
Changed
@@ -1 +1 @@ -1.12.2 +1.12.3
View file
osmo-bsc_1.12.2.tar.xz/contrib/jenkins.sh -> osmo-bsc_1.12.3.tar.xz/contrib/jenkins.sh
Changed
@@ -54,9 +54,9 @@ export LD_LIBRARY_PATH="$inst/lib" export PATH="$inst/bin:$PATH" +osmo-build-dep.sh libosmo-netif "" --disable-doxygen osmo-build-dep.sh libosmo-abis -osmo-build-dep.sh libosmo-netif -osmo-build-dep.sh libosmo-sccp +osmo-build-dep.sh libosmo-sigtran osmo-build-dep.sh osmo-mgw # Additional configure options and depends
View file
osmo-bsc_1.12.2.tar.xz/debian/changelog -> osmo-bsc_1.12.3.tar.xz/debian/changelog
Changed
@@ -1,3 +1,17 @@ +osmo-bsc (1.12.3) unstable; urgency=medium + + Oliver Smith + * contrib/jenkins: libosmo-sccp -> libosmo-sigtran + + Pau Espin Pedrol + * jenkins.sh: libosmo-netif no longer depends on libosmo-abis + * ipaccess-proxy: Fix wrong cb function passed + * Drop use of libosmo-abis osmocom/abis/ipaccess.h + * ipaccess-config: Use own e1_input ipaccess driver + * ipaccess-config: Remove unused function ipaccess_bts_handle_ccm() + + -- Oliver Smith <osmith@sysmocom.de> Fri, 06 Dec 2024 13:22:04 +0100 + osmo-bsc (1.12.2) unstable; urgency=medium Oliver Smith
View file
osmo-bsc_1.12.2.tar.xz/src/ipaccess/Makefile.am -> osmo-bsc_1.12.3.tar.xz/src/ipaccess/Makefile.am
Changed
@@ -41,6 +41,7 @@ ipaccess_config_SOURCES = \ ipaccess-config.c \ + ipaccess-config-e1-driver.c \ ipaccess-firmware.c \ network_listen.c \ stubs.c \
View file
osmo-bsc_1.12.3.tar.xz/src/ipaccess/ipaccess-config-e1-driver.c
Added
@@ -0,0 +1,476 @@ +/* OpenBSC Abis input driver for ip.access */ + +/* (C) 2024 by sysmocom - s.f.m.c. GmbH <info@sysmocom.de> + * (C) 2009-2021 by Harald Welte <laforge@gnumonks.org> + * (C) 2010 by Holger Hans Peter Freyther + * (C) 2010 by On-Waves + * + * All Rights Reserved + * + * SPDX-License-Identifier: AGPL-3.0+ + * + * 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/licenses/>. + * + */ + +#include <stdio.h> +#include <unistd.h> +#include <stdlib.h> +#include <stdbool.h> +#include <errno.h> +#include <netinet/tcp.h> +#include <string.h> +#include <time.h> +#include <fcntl.h> +#include <sys/socket.h> +#include <sys/ioctl.h> +#include <arpa/inet.h> + +#include <osmocom/core/select.h> +#include <osmocom/core/msgb.h> +#include <osmocom/core/macaddr.h> +#include <osmocom/core/logging.h> +#include <osmocom/core/talloc.h> +#include <osmocom/core/socket.h> +#include <osmocom/core/backtrace.h> +#include <osmocom/core/fsm.h> +#include <osmocom/core/signal.h> +#include <osmocom/gsm/tlv.h> +#include <osmocom/gsm/protocol/ipaccess.h> +#include <osmocom/gsm/ipa.h> +#include <osmocom/netif/stream.h> +#include <osmocom/netif/ipa.h> +#include <osmocom/abis/e1_input.h> +#include <osmocom/abis/ipa.h> + +/* default port at BTS for incoming connections */ +#define IPACCESS_BTS_LISTEN_OML_PORT 3006 + +/* global parameters of IPA input driver */ +struct ipaccess_config_proto_pars { + uint8_t dscp; + uint8_t priority; +}; +struct ipaccess_config_pars { + struct ipaccess_config_proto_pars oml; + struct ipaccess_config_proto_pars rsl; + char *connect_addr; +}; +struct ipaccess_config_pars g_e1inp_ipaccess_config_pars; + +static void *tall_ipa_ctx; + +struct ipaccess_line { + bool line_already_initialized; + struct osmo_stream_cli *ipa_cliNUM_E1_TS; /* 0=OML, 1+N=TRX_N */ +}; + +static int e1inp_int_snd_event(struct e1inp_ts *ts, struct e1inp_sign_link *link, int evt) +{ + struct input_signal_data isd; + isd.line = ts->line; + isd.ts_nr = ts->num; + isd.link_type = link->type; + isd.trx = link->trx; + isd.tei = link->tei; + isd.sapi = link->sapi; + + /* report further upwards */ + osmo_signal_dispatch(SS_L_INPUT, evt, &isd); + return 0; +} + +static inline struct e1inp_ts *ipaccess_line_ts(struct osmo_fd *bfd, struct e1inp_line *line) +{ + if (bfd->priv_nr == E1INP_SIGN_OML) + return e1inp_line_ipa_oml_ts(line); + else + return e1inp_line_ipa_rsl_ts(line, bfd->priv_nr - E1INP_SIGN_RSL); +} + + +static void _ipaccess_bts_down_cb(struct osmo_stream_cli *cli) +{ + struct e1inp_ts *e1i_ts = osmo_stream_cli_get_data(cli); + struct e1inp_line *line = e1i_ts->line; + + if (line->ops->sign_link_down) + line->ops->sign_link_down(line); +} + +/* See how ts->num is assigned in e1inp_line_create: line->tsi.num = i+1; +* As per e1inp_line_ipa_oml_ts(), first TS in line (ts->num=1) is OML. +* As per e1inp_line_ipa_rsl_ts(), second TS in line (ts->num>=2) is RSL. +*/ +static inline enum e1inp_sign_type ipaccess_e1i_ts_sign_type(const struct e1inp_ts *e1i_ts) +{ + OSMO_ASSERT(e1i_ts->num != 0); + if (e1i_ts->num == 1) + return E1INP_SIGN_OML; + return E1INP_SIGN_RSL; +} + +static inline unsigned int ipaccess_e1i_ts_trx_nr(const struct e1inp_ts *e1i_ts) +{ + enum e1inp_sign_type sign_type = ipaccess_e1i_ts_sign_type(e1i_ts); + if (sign_type == E1INP_SIGN_OML) + return 0; /* OML uses trx_nr=0 */ + OSMO_ASSERT(sign_type == E1INP_SIGN_RSL); + /* e1i_ts->num >= 2: */ + return e1i_ts->num - 2; +} + +static inline struct osmo_stream_cli *ipaccess_bts_e1i_ts_stream_cli(const struct e1inp_ts *e1i_ts) +{ + OSMO_ASSERT(e1i_ts); + struct ipaccess_line *il = e1i_ts->line->driver_data; + OSMO_ASSERT(il); + struct osmo_stream_cli *cli = il->ipa_clie1i_ts->num - 1; + OSMO_ASSERT(cli); + return cli; +} + +static void ipaccess_close(struct e1inp_sign_link *sign_link) +{ + struct e1inp_ts *e1i_ts = sign_link->ts; + struct osmo_fd *bfd = &e1i_ts->driver.ipaccess.fd; + struct osmo_stream_cli *cli; + + e1inp_int_snd_event(e1i_ts, sign_link, S_L_INP_TEI_DN); + /* the first e1inp_sign_link_destroy call closes the socket. */ + + cli = ipaccess_bts_e1i_ts_stream_cli(e1i_ts); + osmo_stream_cli_close(cli); + bfd->fd = -1; /* Compatibility with older implementations */ +} + +static bool e1i_ts_has_pending_tx_msgs(struct e1inp_ts *e1i_ts) +{ + struct e1inp_sign_link *link; + llist_for_each_entry(link, &e1i_ts->sign.sign_links, list) { + if (!llist_empty(&link->tx_list)) + return true; + } + return false; +} + +static int ipaccess_bts_send_msg(struct e1inp_ts *e1i_ts, + struct e1inp_sign_link *sign_link, + struct osmo_stream_cli *cli, + struct msgb *msg) +{ + switch (sign_link->type) { + case E1INP_SIGN_OML: + case E1INP_SIGN_RSL: + case E1INP_SIGN_OSMO: + break; + default: + msgb_free(msg); + return -EINVAL; + } + + msg->l2h = msg->data; + ipa_prepend_header(msg, sign_link->tei); + + LOGPITS(e1i_ts, DLMI, LOGL_DEBUG, "TX: %s\n", osmo_hexdump(msg->l2h, msgb_l2len(msg))); + osmo_stream_cli_send(cli, msg); + return 0; +} + +/* msg was enqueued in sign_link->tx_list. + * Pop it from that list, submit it to osmo_stream_cli: */ +static int ts_want_write(struct e1inp_ts *e1i_ts) +{ + int rc = 0; + struct osmo_stream_cli *cli = ipaccess_bts_e1i_ts_stream_cli(e1i_ts); + + /* get the next msg for this timeslot */ + while (e1i_ts_has_pending_tx_msgs(e1i_ts)) {
View file
osmo-bsc_1.12.2.tar.xz/src/ipaccess/ipaccess-config.c -> osmo-bsc_1.12.3.tar.xz/src/ipaccess/ipaccess-config.c
Changed
@@ -40,21 +40,21 @@ #include <osmocom/core/application.h> #include <osmocom/core/select.h> #include <osmocom/core/timer.h> -#include <osmocom/bsc/ipaccess.h> +#include <osmocom/core/talloc.h> +#include <osmocom/gsm/protocol/gsm_12_21.h> +#include <osmocom/gsm/protocol/ipaccess.h> +#include <osmocom/abis/abis.h> #include <osmocom/abis/e1_input.h> +#include <osmocom/bsc/ipaccess.h> #include <osmocom/bsc/abis_nm.h> #include <osmocom/bsc/signal.h> #include <osmocom/bsc/debug.h> #include <osmocom/bsc/network_listen.h> -#include <osmocom/abis/ipaccess.h> #include <osmocom/bsc/gsm_data.h> #include <osmocom/bsc/abis_nm.h> #include <osmocom/bsc/signal.h> #include <osmocom/bsc/debug.h> #include <osmocom/bsc/network_listen.h> -#include <osmocom/core/talloc.h> -#include <osmocom/abis/abis.h> -#include <osmocom/gsm/protocol/gsm_12_21.h> #include <osmocom/bsc/bss.h> #include <osmocom/bsc/bts.h> @@ -79,53 +79,15 @@ static struct abis_nm_sw_desc *sw_load1 = NULL; static struct abis_nm_sw_desc *sw_load2 = NULL; -extern int ipaccess_fd_cb(struct osmo_fd *bfd, unsigned int what); extern struct e1inp_line_ops ipaccess_e1inp_line_ops; -/* Actively connect to a BTS. Currently used by ipaccess-config.c */ -static int ipaccess_connect(struct e1inp_line *line, struct sockaddr_in *sa) -{ - struct e1inp_ts *e1i_ts = &line->ts0; - struct osmo_fd *bfd = &e1i_ts->driver.ipaccess.fd; - int ret, on = 1; - - bfd->fd = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); - bfd->cb = ipaccess_fd_cb; - bfd->when = OSMO_FD_READ | OSMO_FD_WRITE; - bfd->data = line; - bfd->priv_nr = E1INP_SIGN_OML; - - if (bfd->fd < 0) { - LOGP(DLINP, LOGL_ERROR, "could not create TCP socket.\n"); - return -EIO; - } - - ret = setsockopt(bfd->fd, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on)); - if (ret < 0) { - LOGP(DLINP, LOGL_ERROR, "could not set socket option\n"); - close(bfd->fd); - return -EIO; - } - - ret = connect(bfd->fd, (struct sockaddr *) sa, sizeof(*sa)); - if (ret < 0) { - LOGP(DLINP, LOGL_ERROR, "could not connect socket\n"); - close(bfd->fd); - return ret; - } - - ret = osmo_fd_register(bfd); - if (ret < 0) { - LOGP(DLINP, LOGL_ERROR, "unable to register socket fd\n"); - close(bfd->fd); - return ret; - } - return ret; - //return e1inp_line_register(line); -} +/* Functions from ipaccess-config-e1-driver.c: */ +extern void e1inp_ipaccess_config_init(void *ctx); +extern void e1inp_ipaccess_config_set_connect_addr(const char *connect_addr); + /* configure pseudo E1 line in ip.access style and connect to BTS */ -static int ia_config_connect(struct gsm_bts *bts, struct sockaddr_in *sin) +static int ia_config_connect(struct gsm_bts *bts, const char *bts_ip) { struct e1inp_line *line; struct e1inp_ts *sign_ts, *rsl_ts; @@ -135,13 +97,17 @@ if (!line) return -ENOMEM; - line->driver = e1inp_driver_find("ipa"); - if (!line->driver) { - fprintf(stderr, "cannot `ipa' driver, giving up.\n"); + e1inp_ipaccess_config_init(tall_bsc_ctx); + e1inp_ipaccess_config_set_connect_addr(bts_ip); + + line = e1inp_line_create(0, "ipaccess-config"); + if (!line) { + fprintf(stderr, "cannot create line with `ipaccess-config' driver, giving up.\n"); return -EINVAL; } e1inp_line_bind_ops(line, &ipaccess_e1inp_line_ops); e1_set_pcap_fd2(line, -1); /* Disable writing to pcap */ + e1inp_line_update(line); sign_ts = e1inp_line_ipa_oml_ts(line); rsl_ts = e1inp_line_ipa_rsl_ts(line, 0); @@ -164,11 +130,7 @@ bts->osmo_link = osmo_link; bts->c0->rsl_link_primary = rsl_link; - /* default port at BTS for incoming connections is 3006 */ - if (sin->sin_port == 0) - sin->sin_port = htons(3006); - - return ipaccess_connect(line, sin); + return 0; } /* @@ -1030,7 +992,6 @@ int main(int argc, char **argv) { struct gsm_bts *bts; - struct sockaddr_in sin; char *bts_ip; int rc, option_index = 0, stream_id = 0xff; @@ -1203,17 +1164,12 @@ if (!quiet) printf("Trying to connect to ip.access BTS %s...\n", bts_ip); - memset(&sin, 0, sizeof(sin)); - sin.sin_family = AF_INET; - inet_aton(bts_ip, &sin.sin_addr); - rc = ia_config_connect(bts, &sin); + rc = ia_config_connect(bts, bts_ip); if (rc < 0) { perror("Error connecting to the BTS"); exit(1); } - bts->oml_link->ts->sign.delay = 10; - bts->c0->rsl_link_primary->ts->sign.delay = 10; while (1) { rc = osmo_select_main(0); if (rc < 0)
View file
osmo-bsc_1.12.2.tar.xz/src/ipaccess/ipaccess-proxy.c -> osmo-bsc_1.12.3.tar.xz/src/ipaccess/ipaccess-proxy.c
Changed
@@ -37,18 +37,18 @@ #define _GNU_SOURCE #include <getopt.h> -#include <osmocom/bsc/gsm_data.h> #include <osmocom/core/application.h> #include <osmocom/core/select.h> -#include <osmocom/gsm/tlv.h> #include <osmocom/core/msgb.h> +#include <osmocom/core/socket.h> +#include <osmocom/core/talloc.h> +#include <osmocom/gsm/tlv.h> +#include <osmocom/gsm/protocol/ipaccess.h> #include <osmocom/gsm/ipa.h> #include <osmocom/abis/ipa.h> -#include <osmocom/abis/ipaccess.h> +#include <osmocom/bsc/gsm_data.h> #include <osmocom/bsc/debug.h> #include <osmocom/bsc/ipaccess.h> -#include <osmocom/core/socket.h> -#include <osmocom/core/talloc.h> /* one instance of an ip.access protocol proxy */ struct ipa_proxy { @@ -1021,7 +1021,7 @@ } bfd = &ipc->fd; - osmo_fd_setup(bfd, ret, OSMO_FD_READ | OSMO_FD_WRITE, ipaccess_fd_cb, ipc, priv_nr); + osmo_fd_setup(bfd, ret, OSMO_FD_READ | OSMO_FD_WRITE, proxy_ipaccess_fd_cb, ipc, priv_nr); ret = setsockopt(bfd->fd, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on)); if (ret < 0) {
View file
osmo-bsc_1.12.2.tar.xz/src/osmo-bsc/bts_ipaccess_nanobts.c -> osmo-bsc_1.12.3.tar.xz/src/osmo-bsc/bts_ipaccess_nanobts.c
Changed
@@ -25,25 +25,23 @@ #include <osmocom/gsm/tlv.h> -#include <osmocom/bsc/gsm_data.h> -#include <osmocom/bsc/signal.h> -#include <osmocom/bsc/abis_nm.h> -#include <osmocom/abis/e1_input.h> -#include <osmocom/gsm/tlv.h> #include <osmocom/core/msgb.h> #include <osmocom/core/socket.h> #include <osmocom/core/stat_item.h> #include <osmocom/core/talloc.h> #include <osmocom/core/utils.h> +#include <osmocom/core/logging.h> +#include <osmocom/gsm/tlv.h> +#include <osmocom/gsm/protocol/ipaccess.h> +#include <osmocom/gsm/ipa.h> +#include <osmocom/abis/e1_input.h> +#include <osmocom/abis/subchan_demux.h> #include <osmocom/bsc/gsm_data.h> +#include <osmocom/bsc/signal.h> #include <osmocom/bsc/abis_nm.h> #include <osmocom/bsc/abis_rsl.h> #include <osmocom/bsc/abis_osmo.h> #include <osmocom/bsc/debug.h> -#include <osmocom/abis/subchan_demux.h> -#include <osmocom/gsm/ipa.h> -#include <osmocom/abis/ipaccess.h> -#include <osmocom/core/logging.h> #include <osmocom/bsc/ipaccess.h> #include <osmocom/bsc/bts_ipaccess_nanobts_omlattr.h> #include <osmocom/bsc/paging.h>
View file
osmo-bsc_1.12.2.tar.xz/src/osmo-bsc/bts_osmobts.c -> osmo-bsc_1.12.3.tar.xz/src/osmo-bsc/bts_osmobts.c
Changed
@@ -24,21 +24,19 @@ #include <osmocom/gsm/tlv.h> -#include <osmocom/bsc/gsm_data.h> -#include <osmocom/bsc/signal.h> -#include <osmocom/bsc/abis_nm.h> -#include <osmocom/bsc/bts.h> -#include <osmocom/abis/e1_input.h> -#include <osmocom/gsm/tlv.h> #include <osmocom/core/msgb.h> #include <osmocom/core/talloc.h> +#include <osmocom/core/logging.h> +#include <osmocom/gsm/tlv.h> +#include <osmocom/gsm/protocol/ipaccess.h> +#include <osmocom/abis/e1_input.h> +#include <osmocom/abis/subchan_demux.h> #include <osmocom/bsc/gsm_data.h> +#include <osmocom/bsc/signal.h> #include <osmocom/bsc/abis_nm.h> +#include <osmocom/bsc/bts.h> #include <osmocom/bsc/abis_rsl.h> #include <osmocom/bsc/debug.h> -#include <osmocom/abis/subchan_demux.h> -#include <osmocom/abis/ipaccess.h> -#include <osmocom/core/logging.h> extern struct gsm_bts_model bts_model_nanobts;
View file
osmo-bsc_1.12.2.tar.xz/src/osmo-bsc/e1_config.c -> osmo-bsc_1.12.3.tar.xz/src/osmo-bsc/e1_config.c
Changed
@@ -23,11 +23,11 @@ #include <time.h> #include <netinet/in.h> -#include <osmocom/bsc/gsm_data.h> +#include <osmocom/core/talloc.h> +#include <osmocom/gsm/protocol/ipaccess.h> #include <osmocom/abis/e1_input.h> +#include <osmocom/bsc/gsm_data.h> #include <osmocom/bsc/misdn.h> -#include <osmocom/abis/ipaccess.h> -#include <osmocom/core/talloc.h> #include <osmocom/bsc/debug.h> #include <osmocom/bsc/abis_rsl.h> #include <osmocom/bsc/bts.h>
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
.