Projects
osmocom:nightly
osmo-cbc
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 24
View file
osmo-cbc.spec
Changed
@@ -17,14 +17,14 @@ %define _lto_cflags %{nil} Name: osmo-cbc -Requires: osmocom-nightly = 1.0.0.202207200002 -Version: 0.3.0.23.dcf9.202207200002 +Requires: osmocom-nightly = 1.0.0.202207210002 +Version: 0.3.0.35.782d.202207210002 Release: 0 Summary: OsmoCBC: Osmocom's Cell Broadcast Centre for 3GPP mobile networks License: AGPL-3.0-or-later Group: Hardware/Mobile URL: https://osmocom.org/projects/osmo-cbc -Source: osmo-cbc_0.3.0.23.dcf9.202207200002.tar.gz +Source: osmo-cbc_0.3.0.35.782d.202207210002.tar.gz BuildRequires: automake >= 1.9 BuildRequires: libtool >= 2 BuildRequires: pkgconfig >= 0.20 @@ -44,7 +44,7 @@ OsmoCBC: Osmocom's Cell Broadcast Centre for 3GPP mobile networks. %package utils -Requires: osmocom-nightly = 1.0.0.202207200002 +Requires: osmocom-nightly = 1.0.0.202207210002 Summary: CLI utility to interface osmo-cbc REST interface License: MIT Group: Productivity/Telephony/Utilities @@ -53,7 +53,7 @@ CLI utility to interface with the osmo-cbc REST interface (ECBE). %package -n libosmo-sbcap0 -Requires: osmocom-nightly = 1.0.0.202207200002 +Requires: osmocom-nightly = 1.0.0.202207210002 Summary: Osmocom's library to encode/decode SBc-AP messages Group: System/Libraries @@ -61,7 +61,7 @@ Osmocom's library to encode/decode SBc-AP messages. %package -n libosmo-sbcap-devel -Requires: osmocom-nightly = 1.0.0.202207200002 +Requires: osmocom-nightly = 1.0.0.202207210002 Summary: Development files for libosmo-sbcap Group: Development/Libraries/C and C++ Requires: libosmo-sbcap0 = %{version}
View file
osmo-cbc_0.3.0.23.dcf9.202207200002.tar.gz/include/osmocom/cbc/internal.h
Deleted
@@ -1,119 +0,0 @@ -#pragma once - -#include <stdint.h> - -#include <osmocom/core/logging.h> -#include <osmocom/core/fsm.h> -#include <osmocom/vty/command.h> - -#include <osmocom/cbc/cbc_data.h> - -enum { - DCBSP, - DSBcAP, - DREST, -}; - -extern struct osmo_fsm cbsp_server_fsm; - -enum cbsp_server_event { - CBSP_SRV_E_RX_RST_COMPL, /* reset complete received */ - CBSP_SRV_E_RX_RST_FAIL, /* reset failure received */ - CBSP_SRV_E_RX_KA_COMPL, /* keep-alive complete received */ - CBSP_SRV_E_RX_RESTART, /* restart received */ - CBSP_SRV_E_CMD_RESET, /* RESET command from CBC */ - CBSP_SRV_E_CMD_CLOSE, /* CLOSE command from CBC */ -}; - -extern struct osmo_fsm sbcap_server_fsm; - -enum sbcap_server_event { - SBcAP_SRV_E_RX_RST_COMPL, /* reset complete received */ - SBcAP_SRV_E_RX_RST_FAIL, /* reset failure received */ - SBcAP_SRV_E_RX_KA_COMPL, /* keep-alive complete received */ - SBcAP_SRV_E_RX_RESTART, /* restart received */ - SBcAP_SRV_E_CMD_RESET, /* RESET command from CBC */ - SBcAP_SRV_E_CMD_CLOSE, /* CLOSE command from CBC */ -}; - - -/* rest_api.c */ -int rest_api_init(void *ctx, const char *bind_addr, uint16_t port); -void rest_api_fin(void); - -/* cbc_vty.c */ -enum cbc_vty_node { - CBC_NODE = _LAST_OSMOVTY_NODE + 1, - PEER_NODE, - CBSP_NODE, - SBcAP_NODE, - ECBE_NODE, -}; -void cbc_vty_init(void); - -/* message_handling.c */ -struct cbc_message *cbc_message_alloc(void *ctx, const struct cbc_message *cbcmsg); -int cbc_message_new(const struct cbc_message *cbcmsg, struct rest_it_op *op); -void cbc_message_delete(struct cbc_message *cbcmsg, struct rest_it_op *op); -struct cbc_message *cbc_message_by_id(uint16_t message_id); -int peer_new_cbc_message(struct cbc_peer *peer, struct cbc_message *cbcmsg); - -/* rest_it_op.c */ -void rest2main_read_cb(struct osmo_it_q *q, struct llist_head *item); - - -/* smscb_*fsm.c */ -enum smscb_fsm_event { - SMSCB_E_CHILD_DIED, - /* create a message (from REST) */ - SMSCB_E_CREATE, - /* replace a message (from REST) */ - SMSCB_E_REPLACE, - /* get status of a message (from REST) */ - SMSCB_E_STATUS, - /* delete a message (from REST) */ - SMSCB_E_DELETE, - /* CBSP peer confirms write */ - SMSCB_E_CBSP_WRITE_ACK, - SMSCB_E_CBSP_WRITE_NACK, - /* CBSP peer confirms replace */ - SMSCB_E_CBSP_REPLACE_ACK, - SMSCB_E_CBSP_REPLACE_NACK, - /* CBSP peer confirms delete */ - SMSCB_E_CBSP_DELETE_ACK, - SMSCB_E_CBSP_DELETE_NACK, - /* CBSP peer confirms status query */ - SMSCB_E_CBSP_STATUS_ACK, - SMSCB_E_CBSP_STATUS_NACK, - /* SBc-AP peer confirms write */ - SMSCB_E_SBCAP_WRITE_ACK, - SMSCB_E_SBCAP_WRITE_NACK, - /* SBc-AP peer confirms delete */ - SMSCB_E_SBCAP_DELETE_ACK, - SMSCB_E_SBCAP_DELETE_NACK, -}; - -enum smscb_fsm_state { - /* initial state after creation */ - SMSCB_S_INIT, - /* peer (BSC) have been notified of this SMSCB; we're waiting for ACK */ - SMSCB_S_WAIT_WRITE_ACK, - /* peer (BSC) have confirmed it, message is active */ - SMSCB_S_ACTIVE, - /* we have modified the message and sent REPLACE to peer; we're waiting for ACK */ - SMSCB_S_WAIT_REPLACE_ACK, - /* we have modified the message and sent REPLACE to peer; we're waiting for ACK */ - SMSCB_S_WAIT_STATUS_ACK, - /* we have deleted the message and sent KILL to peer; wait for ACK */ - SMSCB_S_WAIT_DELETE_ACK, - SMSCB_S_DELETED, -}; - -enum smscb_p_fsm_timer { - T_WAIT_WRITE_ACK, - T_WAIT_REPLACE_ACK, - T_WAIT_STATUS_ACK, - T_WAIT_DELETE_ACK, -}; - -extern const struct value_string smscb_fsm_event_names;
View file
osmo-cbc_0.3.0.23.dcf9.202207200002.tar.gz/src/cbc_data.c
Deleted
@@ -1,158 +0,0 @@ -/* Osmocom CBC (Cell Broacast Centre) */ - -/* (C) 2019 by Harald Welte <laforge@gnumonks.org> - * 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 <string.h> -#include <errno.h> - -#include <osmocom/core/linuxlist.h> -#include <osmocom/core/talloc.h> -#include <osmocom/core/utils.h> - -#include <osmocom/cbc/cbc_data.h> -#include <osmocom/cbc/cbsp_server.h> - -const struct value_string cbc_peer_proto_name = { - { CBC_PEER_PROTO_CBSP, "CBSP" }, - { CBC_PEER_PROTO_SABP, "SABP" }, - { CBC_PEER_PROTO_SBcAP, "SBc-AP" }, - { 0, NULL } -}; - -/* remove a peer from the message */ -int cbc_message_del_peer(struct cbc_message *cbcmsg, struct cbc_peer *peer) -{ - struct cbc_message_peer *mp, *mp2; - unsigned int i = 0; - - llist_for_each_entry_safe(mp, mp2, &cbcmsg->peers, list) { - if (mp->peer == peer) { - llist_del(&mp->list); - talloc_free(mp); - i++; - } - } - OSMO_ASSERT(i == 0 || i == 1); - return i; -} - -struct cbc_message_peer *cbc_message_peer_get(struct cbc_message *cbcmsg, struct cbc_peer *peer) -{ - struct cbc_message_peer *mp; - - llist_for_each_entry(mp, &cbcmsg->peers, list) { - if (mp->peer == peer) - return mp; - } - return NULL; -} - -#if 0 -/* add a new peer to the message */ -int cbc_message_add_peer(struct cbc_message *cbcmsg, struct cbc_peer *peer) -{ - struct cbc_message_peer *mp = talloc_zero(cbcmsg, struct cbc_message_peer); - if (mp) - return -ENOMEM; - - mp->peer = peer; - llist_add_tail(&mp->list, &cbcmsg->peers); - return 0; -} -#endif - - -/* look-up of cbc_peer by name */ -struct cbc_peer *cbc_peer_by_name(const char *name) -{ - struct cbc_peer *peer; - - llist_for_each_entry(peer, &g_cbc->peers, list) { - if (peer->name && !strcmp(name, peer->name)) - return peer; - } - return NULL; -} - -/* look-up of cbc_peer by tuple of (remote host, protocol) */ -struct cbc_peer *cbc_peer_by_addr_proto(const char *remote_host, uint16_t remote_port, - enum cbc_peer_protocol proto) -{ - struct cbc_peer *peer; - - llist_for_each_entry(peer, &g_cbc->peers, list) { - unsigned int i; - for (i = 0; i < peer->num_remote_host; i++) { - if (peer->proto != proto) - continue; - if (!strcasecmp(remote_host, peer->remote_hosti)) { - if (peer->remote_port == -1) - return peer; - else if (remote_port == peer->remote_port) - return peer; - } - } - } - return NULL; -} - -/* create a new cbc_peer */ -struct cbc_peer *cbc_peer_create(const char *name, enum cbc_peer_protocol proto) -{ - struct cbc_peer *peer; - if (name && cbc_peer_by_name(name)) - return NULL; - - peer = talloc_zero(g_cbc, struct cbc_peer); - if (!peer) - return NULL; - - peer->proto = proto; - peer->name = talloc_strdup(peer, name); - llist_add_tail(&peer->list, &g_cbc->peers); - - return peer; -} - -/* remove a cbc_peer */ -void cbc_peer_remove(struct cbc_peer *peer) -{ - struct cbc_message *cbcmsg; - - /* close any existing client connection */ - switch (peer->proto) { - case CBC_PEER_PROTO_CBSP: - if (peer->client.cbsp) - cbsp_cbc_client_close(peer->client.cbsp); - break; - default: - OSMO_ASSERT(0); - } - - /* iterate over messages; remove client from all message_peers */ - llist_for_each_entry(cbcmsg, &g_cbc->messages, list) { - cbc_message_del_peer(cbcmsg, peer); - } - - llist_del(&peer->list); - talloc_free(peer); -}
View file
osmo-cbc_0.3.0.23.dcf9.202207200002.dsc -> osmo-cbc_0.3.0.35.782d.202207210002.dsc
Changed
@@ -2,7 +2,7 @@ Source: osmo-cbc Binary: osmo-cbc, osmo-cbc-utils, osmo-cbc-dbg, osmo-cbc-doc, libosmo-sbcap0, libosmo-sbcap-dev Architecture: any all -Version: 0.3.0.23.dcf9.202207200002 +Version: 0.3.0.35.782d.202207210002 Maintainer: Osmocom team <openbsc@lists.osmocom.org> Homepage: https://projects.osmocom.org/projects/osmo-cbc Standards-Version: 3.9.8 @@ -17,8 +17,8 @@ osmo-cbc-doc deb doc optional arch=all osmo-cbc-utils deb net extra arch=any Checksums-Sha1: - 3b2f8c46300828885b9038c111ba960731880ad2 248326 osmo-cbc_0.3.0.23.dcf9.202207200002.tar.gz + 02c8ba45cd9167a38cadc08fed4f6262cf27f8ad 248705 osmo-cbc_0.3.0.35.782d.202207210002.tar.gz Checksums-Sha256: - 32defbb16911fb9f30be19ab75c2caad9df6c472ffe402d5ffc0d8aee4fcbd21 248326 osmo-cbc_0.3.0.23.dcf9.202207200002.tar.gz + 75fe56d1d875f7e3c0e061682270b60fbb87a56149722e0d440869ae0824e08a 248705 osmo-cbc_0.3.0.35.782d.202207210002.tar.gz Files: - d288e20f8074b7583cec83aa2cf5794e 248326 osmo-cbc_0.3.0.23.dcf9.202207200002.tar.gz + ac3dcb9351009b27eaed020b8ae51dcd 248705 osmo-cbc_0.3.0.35.782d.202207210002.tar.gz
View file
osmo-cbc_0.3.0.23.dcf9.202207200002.tar.gz/.tarball-version -> osmo-cbc_0.3.0.35.782d.202207210002.tar.gz/.tarball-version
Changed
@@ -1 +1 @@ -0.3.0.23-dcf9 \ No newline at end of file +0.3.0.35-782d \ No newline at end of file
View file
osmo-cbc_0.3.0.23.dcf9.202207200002.tar.gz/debian/changelog -> osmo-cbc_0.3.0.35.782d.202207210002.tar.gz/debian/changelog
Changed
@@ -1,8 +1,8 @@ -osmo-cbc (0.3.0.23.dcf9.202207200002) UNRELEASED; urgency=medium +osmo-cbc (0.3.0.35.782d.202207210002) UNRELEASED; urgency=medium * Snapshot build - -- Pau Espin Pedrol <pespin@sysmocom.de> Wed, 20 Jul 2022 00:10:15 +0000 + -- Pau Espin Pedrol <pespin@sysmocom.de> Thu, 21 Jul 2022 00:11:23 +0000 osmo-cbc (0.3.0) unstable; urgency=medium
View file
osmo-cbc_0.3.0.23.dcf9.202207200002.tar.gz/debian/control -> osmo-cbc_0.3.0.35.782d.202207210002.tar.gz/debian/control
Changed
@@ -25,27 +25,27 @@ Package: osmo-cbc Architecture: any Multi-Arch: foreign -Depends: osmocom-nightly (= 1.0.0.202207200002), ${misc:Depends}, ${shlibs:Depends} +Depends: osmocom-nightly (= 1.0.0.202207210002), ${misc:Depends}, ${shlibs:Depends} Description: OsmoCBC: Osmocom's Cell Broadcast Center Package: osmo-cbc-utils Architecture: any Multi-Arch: foreign -Depends: osmocom-nightly (= 1.0.0.202207200002), ${misc:Depends}, ${shlibs:Depends}, python3 +Depends: osmocom-nightly (= 1.0.0.202207210002), ${misc:Depends}, ${shlibs:Depends}, python3 Description: Utilities for OsmoCBC: Osmocom's Cell Broadcast Center Package: osmo-cbc-dbg Section: debug Architecture: any Multi-Arch: same -Depends: osmocom-nightly (= 1.0.0.202207200002), osmo-cbc (= ${binary:Version}), ${misc:Depends} +Depends: osmocom-nightly (= 1.0.0.202207210002), osmo-cbc (= ${binary:Version}), ${misc:Depends} Description: OsmoCBC: Osmocom's Cell Broadcast Center Package: osmo-cbc-doc Architecture: all Section: doc Priority: optional -Depends: osmocom-nightly (= 1.0.0.202207200002), ${misc:Depends} +Depends: osmocom-nightly (= 1.0.0.202207210002), ${misc:Depends} Description: ${misc:Package} PDF documentation Various manuals: user manual, VTY reference manual and/or protocol/interface manuals. @@ -55,12 +55,12 @@ Architecture: any Multi-Arch: same Pre-Depends: ${misc:Pre-Depends} -Depends: osmocom-nightly (= 1.0.0.202207200002), ${misc:Depends}, ${shlibs:Depends} +Depends: osmocom-nightly (= 1.0.0.202207210002), ${misc:Depends}, ${shlibs:Depends} Description: libosmo-sbcap: Osmocom's library to encode/decode SBc-AP messages Package: libosmo-sbcap-dev Section: libdevel Architecture: any Multi-Arch: same -Depends: osmocom-nightly (= 1.0.0.202207200002), libosmo-sbcap0 (= ${binary:Version}), ${misc:Depends} +Depends: osmocom-nightly (= 1.0.0.202207210002), libosmo-sbcap0 (= ${binary:Version}), ${misc:Depends} Description: libosmo-sbcap: Osmocom's library to encode/decode SBc-AP messages
View file
osmo-cbc_0.3.0.23.dcf9.202207200002.tar.gz/doc/examples/osmo-cbc/osmo-cbc.cfg -> osmo-cbc_0.3.0.35.782d.202207210002.tar.gz/doc/examples/osmo-cbc/osmo-cbc.cfg
Changed
@@ -1,15 +1,25 @@ - log stderr - logging level cbsp debug + logging level rest notice + logging level cbsp notice + logging level sbcap notice cbc unknown-peers reject - cbsp - local-ip 127.0.0.1 - local-port 48049 ecbe local-ip 127.0.0.1 local-port 12345 + cbsp + local-ip 127.0.0.1 + local-port 48049 sbcap local-ip 127.0.0.1 local-ip ::1 - local-port 6789 + local-port 29168 + peer example-bsc + protocol cbsp + remote-ip 127.0.0.2 + remote-port 48049 + peer example-mme + protocol sbcap + remote-ip 127.0.0.2 + remote-ip ::2 + remote-port 29168
View file
osmo-cbc_0.3.0.23.dcf9.202207200002.tar.gz/include/osmocom/cbc/Makefile.am -> osmo-cbc_0.3.0.35.782d.202207210002.tar.gz/include/osmocom/cbc/Makefile.am
Changed
@@ -1,9 +1,15 @@ noinst_HEADERS = \ cbc_data.h \ + cbc_peer.h \ + cbc_message.h \ + cbc_vty.h \ cbsp_server.h \ + cbsp_server_fsm.h \ charset.h \ - internal.h \ + debug.h \ sbcap_msg.h \ sbcap_server.h \ + sbcap_server_fsm.h \ rest_it_op.h \ + smscb_message_fsm.h \ $(NULL)
View file
osmo-cbc_0.3.0.23.dcf9.202207200002.tar.gz/include/osmocom/cbc/cbc_data.h -> osmo-cbc_0.3.0.35.782d.202207210002.tar.gz/include/osmocom/cbc/cbc_data.h
Changed
@@ -1,46 +1,12 @@ #pragma once #include <stdint.h> #include <stdbool.h> -#include <time.h> #include <osmocom/core/linuxlist.h> #include <osmocom/core/it_q.h> #include <osmocom/gsm/protocol/gsm_48_049.h> #include <osmocom/gsm/gsm23003.h> -struct osmo_cbsp_cbc_client; -struct osmo_sabp_cbc_client; -struct rest_it_op; - -#define CBC_MAX_ADDRS 8 - -/********************************************************************************* - * CBC Peer - *********************************************************************************/ - -enum cbc_peer_protocol { - CBC_PEER_PROTO_CBSP, - CBC_PEER_PROTO_SABP, - CBC_PEER_PROTO_SBcAP -}; - -struct cbc_peer { - struct llist_head list; /* linked to cbc.peers */ - const char *name; - - char *remote_hostCBC_MAX_ADDRS; /* remote IP address in string format */ - unsigned int num_remote_host; /* number of addresses present in remote_host */ - int remote_port; /* remote port number or -1 for random */ - bool unknown_dynamic_peer; /* dynamic/unknown peer; not saved in VTY */ - - enum cbc_peer_protocol proto; - union { - struct osmo_cbsp_cbc_client *cbsp; - struct osmo_sabp_cbc_client *sabp; - struct osmo_sbcap_cbc_client *sbcap; - } client; -}; - -extern const struct value_string cbc_peer_proto_name; +#define CBC_MAX_LOC_ADDRS 8 enum cbc_cell_id_type { CBC_CELL_ID_NONE, @@ -73,97 +39,6 @@ } num_compl; }; - -/********************************************************************************* - * CBC Message - *********************************************************************************/ - -/* a single SMSCB page of 82 user bytes (excluding any GSM specific header) */ -#define SMSCB_RAW_PAGE_LEN 82 -#define SMSCB_MAX_NUM_PAGES 15 - -/* representation of a plain SMSCB message without any metadata such as cell lists */ -struct smscb_message { - uint16_t message_id; - uint16_t serial_nr; - - bool is_etws; - union { - struct { - /* data coding scheme */ - uint8_t dcs; - /* number of pages containing valid information */ - unsigned int num_pages; - /* actual page data, concatenated */ - uint8_t dataSMSCB_MAX_NUM_PAGESSMSCB_RAW_PAGE_LEN; - /* total number of octets user data over _all_ the pages */ - uint16_t data_user_len; - } cbs; - struct { - /* WarningTypeValue 7bit parameter as per 23.041 9.3.24 */ - uint16_t warning_type; - /* Emergency User Alert */ - bool user_alert; - /* Popup on Display */ - bool popup_on_display; - uint8_t warning_sec_info50; - } etws; - }; -}; - -enum cbc_message_scope { - CBC_MSG_SCOPE_PLMN, - /* FIXME: more local/regional scopes than PLMN-wide */ -}; - -/* link between a SMSCB message and a peer (BSC, RNC, MME) */ -struct cbc_message_peer { - struct llist_head list; /* lined to cbc_message.peers */ - - /* 'cbcmsg' is not really needed, as the fsm instance parent points to - * the fsm instance of cbc_message, so we could also dereference those */ - struct cbc_message *cbcmsg; /* the SMSCB this relates to */ - struct cbc_peer *peer; /* the peer thos relates to */ - struct osmo_fsm_inst *fi; /* the FSM instance representing our state */ - - /* cells in which this message has been established/installed */ - struct llist_head cell_list; - /* cells in which this message has NOT been established/installed */ - struct llist_head fail_list; - /* number of broadcasts completed in cells of this peer */ - struct llist_head num_compl_list; -}; - -/* internal representation of a CBC message */ -struct cbc_message { - struct llist_head list; /* global list of currently active CBCs */ - - const char *cbe_name; /* name of the CBE originating this SMSCB */ - enum cbsp_category priority; - uint16_t rep_period; /* repetition period (1..4095) in units of 1.883s */ - bool extended_cbch; /* basic (false) or extended (true) CBCH */ - uint32_t warning_period_sec; /* warning period in seconds (0xffffffff = unlimited) */ - uint16_t num_bcast; /* number of broadcasts requested (0=unlimited) */ - - enum cbc_message_scope scope; - /* FIXME: data for other scopes than PLMN-wide */ - - /* SMSCB message with id, serial, dcs, pages, ... */ - struct smscb_message msg; - - struct osmo_fsm_inst *fi; /* FSM instance (smscb_message_fsm) */ - - /* CBC peers (BSCs, RNCs, MMEs) to which this message has already been sent */ - struct llist_head peers; - - struct rest_it_op *it_op; /* inter-thread queue operation currently processing */ - - struct { - time_t created; /* when was this message created? */ - time_t expired; /* when has this message expired? */ - } time; -}; - /********************************************************************************* * CBC itself *********************************************************************************/ @@ -176,7 +51,7 @@ int local_port; } cbsp; struct { - char *local_hostCBC_MAX_ADDRS; + char *local_hostCBC_MAX_LOC_ADDRS; unsigned int num_local_host; int local_port; } sbcap; @@ -196,14 +71,6 @@ extern struct cbc *g_cbc; - - -int cbc_message_del_peer(struct cbc_message *cbcmsg, struct cbc_peer *peer); -int cbc_message_add_peer(struct cbc_message *cbcmsg, struct cbc_peer *peer); -struct cbc_message_peer *smscb_peer_fsm_alloc(struct cbc_peer *peer, struct cbc_message *cbcmsg); -struct cbc_message_peer *cbc_message_peer_get(struct cbc_message *cbcmsg, struct cbc_peer *peer); -struct cbc_peer *cbc_peer_by_name(const char *name); -struct cbc_peer *cbc_peer_by_addr_proto(const char *remote_host, uint16_t remote_port, - enum cbc_peer_protocol proto); -struct cbc_peer *cbc_peer_create(const char *name, enum cbc_peer_protocol proto); -void cbc_peer_remove(struct cbc_peer *peer); +/* rest_api.c */ +int rest_api_init(void *ctx, const char *bind_addr, uint16_t port); +void rest_api_fin(void);
View file
osmo-cbc_0.3.0.35.782d.202207210002.tar.gz/include/osmocom/cbc/cbc_message.h
Added
@@ -0,0 +1,110 @@ +#pragma once +#include <stdint.h> +#include <stdbool.h> +#include <time.h> +#include <osmocom/core/linuxlist.h> +#include <osmocom/core/it_q.h> +#include <osmocom/gsm/protocol/gsm_48_049.h> +#include <osmocom/gsm/gsm23003.h> + + +/********************************************************************************* + * CBC Message + *********************************************************************************/ + +/* a single SMSCB page of 82 user bytes (excluding any GSM specific header) */ +#define SMSCB_RAW_PAGE_LEN 82 +#define SMSCB_MAX_NUM_PAGES 15 + +/* representation of a plain SMSCB message without any metadata such as cell lists */ +struct smscb_message { + uint16_t message_id; + uint16_t serial_nr; + + bool is_etws; + union { + struct { + /* data coding scheme */ + uint8_t dcs; + /* number of pages containing valid information */ + unsigned int num_pages; + /* actual page data, concatenated */ + uint8_t dataSMSCB_MAX_NUM_PAGESSMSCB_RAW_PAGE_LEN; + /* total number of octets user data over _all_ the pages */ + uint16_t data_user_len; + } cbs; + struct { + /* WarningTypeValue 7bit parameter as per 23.041 9.3.24 */ + uint16_t warning_type; + /* Emergency User Alert */ + bool user_alert; + /* Popup on Display */ + bool popup_on_display; + uint8_t warning_sec_info50; + } etws; + }; +}; + +enum cbc_message_scope { + CBC_MSG_SCOPE_PLMN, + /* FIXME: more local/regional scopes than PLMN-wide */ +}; + +/* link between a SMSCB message and a peer (BSC, RNC, MME) */ +struct cbc_message_peer { + struct llist_head list; /* lined to cbc_message.peers */ + + /* 'cbcmsg' is not really needed, as the fsm instance parent points to + * the fsm instance of cbc_message, so we could also dereference those */ + struct cbc_message *cbcmsg; /* the SMSCB this relates to */ + struct cbc_peer *peer; /* the peer thos relates to */ + struct osmo_fsm_inst *fi; /* the FSM instance representing our state */ + + /* cells in which this message has been established/installed */ + struct llist_head cell_list; + /* cells in which this message has NOT been established/installed */ + struct llist_head fail_list; + /* number of broadcasts completed in cells of this peer */ + struct llist_head num_compl_list; +}; + +/* internal representation of a CBC message */ +struct cbc_message { + struct llist_head list; /* global list of currently active CBCs */ + + const char *cbe_name; /* name of the CBE originating this SMSCB */ + enum cbsp_category priority; + uint16_t rep_period; /* repetition period (1..4095) in units of 1.883s */ + bool extended_cbch; /* basic (false) or extended (true) CBCH */ + uint32_t warning_period_sec; /* warning period in seconds (0xffffffff = unlimited) */ + uint16_t num_bcast; /* number of broadcasts requested (0=unlimited) */ + + enum cbc_message_scope scope; + /* FIXME: data for other scopes than PLMN-wide */ + + /* SMSCB message with id, serial, dcs, pages, ... */ + struct smscb_message msg; + + struct osmo_fsm_inst *fi; /* FSM instance (smscb_message_fsm) */ + + /* CBC peers (BSCs, RNCs, MMEs) to which this message has already been sent */ + struct llist_head peers; + + struct rest_it_op *it_op; /* inter-thread queue operation currently processing */ + + struct { + time_t created; /* when was this message created? */ + time_t expired; /* when has this message expired? */ + } time; +}; + +struct cbc_message *cbc_message_alloc(void *ctx, const struct cbc_message *cbcmsg); +int cbc_message_new(const struct cbc_message *cbcmsg, struct rest_it_op *op); +void cbc_message_delete(struct cbc_message *cbcmsg, struct rest_it_op *op); +struct cbc_message *cbc_message_by_id(uint16_t message_id); +int peer_new_cbc_message(struct cbc_peer *peer, struct cbc_message *cbcmsg); + +int cbc_message_del_peer(struct cbc_message *cbcmsg, struct cbc_peer *peer); +int cbc_message_add_peer(struct cbc_message *cbcmsg, struct cbc_peer *peer); +struct cbc_message_peer *smscb_peer_fsm_alloc(struct cbc_peer *peer, struct cbc_message *cbcmsg); +struct cbc_message_peer *cbc_message_peer_get(struct cbc_message *cbcmsg, struct cbc_peer *peer);
View file
osmo-cbc_0.3.0.35.782d.202207210002.tar.gz/include/osmocom/cbc/cbc_peer.h
Added
@@ -0,0 +1,46 @@ +#pragma once +#include <stdint.h> +#include <stdbool.h> +#include <osmocom/core/linuxlist.h> + +struct osmo_cbsp_cbc_client; +struct osmo_sabp_cbc_client; +struct osmo_sbcap_cbc_client; + +#define CBC_MAX_REM_ADDRS 8 + +/********************************************************************************* + * CBC Peer + *********************************************************************************/ + +enum cbc_peer_protocol { + CBC_PEER_PROTO_CBSP, + CBC_PEER_PROTO_SABP, + CBC_PEER_PROTO_SBcAP +}; + +struct cbc_peer { + struct llist_head list; /* linked to cbc.peers */ + const char *name; + + char *remote_hostCBC_MAX_REM_ADDRS; /* remote IP address in string format */ + unsigned int num_remote_host; /* number of addresses present in remote_host */ + int remote_port; /* remote port number or -1 for random */ + bool unknown_dynamic_peer; /* dynamic/unknown peer; not saved in VTY */ + + enum cbc_peer_protocol proto; + union { + struct osmo_cbsp_cbc_client *cbsp; + struct osmo_sabp_cbc_client *sabp; + struct osmo_sbcap_cbc_client *sbcap; + } client; +}; + +extern const struct value_string cbc_peer_proto_name; + +struct cbc_peer *cbc_peer_create(const char *name, enum cbc_peer_protocol proto); +void cbc_peer_remove(struct cbc_peer *peer); + +struct cbc_peer *cbc_peer_by_name(const char *name); +struct cbc_peer *cbc_peer_by_addr_proto(const char *remote_host, uint16_t remote_port, + enum cbc_peer_protocol proto);
View file
osmo-cbc_0.3.0.35.782d.202207210002.tar.gz/include/osmocom/cbc/cbc_vty.h
Added
@@ -0,0 +1,10 @@ +#pragma once + +enum cbc_vty_node { + CBC_NODE = _LAST_OSMOVTY_NODE + 1, + PEER_NODE, + CBSP_NODE, + SBcAP_NODE, + ECBE_NODE, +}; +void cbc_vty_init(void);
View file
osmo-cbc_0.3.0.23.dcf9.202207200002.tar.gz/include/osmocom/cbc/cbsp_server.h -> osmo-cbc_0.3.0.35.782d.202207210002.tar.gz/include/osmocom/cbc/cbsp_server.h
Changed
@@ -10,6 +10,7 @@ struct osmo_cbsp_cbc_client; struct osmo_fsm_inst; +struct cbc_peer; /* a CBC server */ struct osmo_cbsp_cbc {
View file
osmo-cbc_0.3.0.35.782d.202207210002.tar.gz/include/osmocom/cbc/cbsp_server_fsm.h
Added
@@ -0,0 +1,15 @@ +#pragma once + +#include <stdint.h> +#include <osmocom/core/fsm.h> + +extern struct osmo_fsm cbsp_server_fsm; + +enum cbsp_server_event { + CBSP_SRV_E_RX_RST_COMPL, /* reset complete received */ + CBSP_SRV_E_RX_RST_FAIL, /* reset failure received */ + CBSP_SRV_E_RX_KA_COMPL, /* keep-alive complete received */ + CBSP_SRV_E_RX_RESTART, /* restart received */ + CBSP_SRV_E_CMD_RESET, /* RESET command from CBC */ + CBSP_SRV_E_CMD_CLOSE, /* CLOSE command from CBC */ +};
View file
osmo-cbc_0.3.0.35.782d.202207210002.tar.gz/include/osmocom/cbc/debug.h
Added
@@ -0,0 +1,7 @@ +#pragma once + +enum { + DCBSP, + DSBcAP, + DREST, +};
View file
osmo-cbc_0.3.0.23.dcf9.202207200002.tar.gz/include/osmocom/cbc/rest_it_op.h -> osmo-cbc_0.3.0.35.782d.202207210002.tar.gz/include/osmocom/cbc/rest_it_op.h
Changed
@@ -7,7 +7,7 @@ #include <osmocom/core/linuxlist.h> #include <osmocom/core/it_q.h> -#include <osmocom/cbc/cbc_data.h> +#include <osmocom/cbc/cbc_message.h> enum rest_it_operation { REST_IT_OP_NONE, @@ -50,3 +50,4 @@ int rest_it_op_send_and_wait(struct rest_it_op *op); void rest_it_op_set_http_result(struct rest_it_op *op, uint32_t code, const char *body); void rest_it_op_complete(struct rest_it_op *op); +void rest2main_read_cb(struct osmo_it_q *q, struct llist_head *item);
View file
osmo-cbc_0.3.0.23.dcf9.202207200002.tar.gz/include/osmocom/cbc/sbcap_server.h -> osmo-cbc_0.3.0.35.782d.202207210002.tar.gz/include/osmocom/cbc/sbcap_server.h
Changed
@@ -13,6 +13,7 @@ struct osmo_sbcap_cbc_client; struct osmo_fsm_inst; +struct cbc_peer; /* a CBC server */ struct osmo_sbcap_cbc { @@ -33,11 +34,7 @@ struct llist_head list; /* stream server connection for this client */ struct osmo_stream_srv *conn; - /* partially received sbcap message (rx completion pending) */ - struct msgb *rx_msg; - struct osmo_fsm_inst *fi; - struct cbc_peer *peer; };
View file
osmo-cbc_0.3.0.35.782d.202207210002.tar.gz/include/osmocom/cbc/sbcap_server_fsm.h
Added
@@ -0,0 +1,15 @@ +#pragma once + +#include <stdint.h> +#include <osmocom/core/fsm.h> + +extern struct osmo_fsm sbcap_server_fsm; + +enum sbcap_server_event { + SBcAP_SRV_E_RX_RST_COMPL, /* reset complete received */ + SBcAP_SRV_E_RX_RST_FAIL, /* reset failure received */ + SBcAP_SRV_E_RX_KA_COMPL, /* keep-alive complete received */ + SBcAP_SRV_E_RX_RESTART, /* restart received */ + SBcAP_SRV_E_CMD_RESET, /* RESET command from CBC */ + SBcAP_SRV_E_CMD_CLOSE, /* CLOSE command from CBC */ +};
View file
osmo-cbc_0.3.0.35.782d.202207210002.tar.gz/include/osmocom/cbc/smscb_message_fsm.h
Added
@@ -0,0 +1,59 @@ +#pragma once + +#include <stdint.h> +#include <osmocom/core/fsm.h> + +enum smscb_fsm_event { + SMSCB_E_CHILD_DIED, + /* create a message (from REST) */ + SMSCB_E_CREATE, + /* replace a message (from REST) */ + SMSCB_E_REPLACE, + /* get status of a message (from REST) */ + SMSCB_E_STATUS, + /* delete a message (from REST) */ + SMSCB_E_DELETE, + /* CBSP peer confirms write */ + SMSCB_E_CBSP_WRITE_ACK, + SMSCB_E_CBSP_WRITE_NACK, + /* CBSP peer confirms replace */ + SMSCB_E_CBSP_REPLACE_ACK, + SMSCB_E_CBSP_REPLACE_NACK, + /* CBSP peer confirms delete */ + SMSCB_E_CBSP_DELETE_ACK, + SMSCB_E_CBSP_DELETE_NACK, + /* CBSP peer confirms status query */ + SMSCB_E_CBSP_STATUS_ACK, + SMSCB_E_CBSP_STATUS_NACK, + /* SBc-AP peer confirms write */ + SMSCB_E_SBCAP_WRITE_ACK, + SMSCB_E_SBCAP_WRITE_NACK, + /* SBc-AP peer confirms delete */ + SMSCB_E_SBCAP_DELETE_ACK, + SMSCB_E_SBCAP_DELETE_NACK, +}; + +enum smscb_fsm_state { + /* initial state after creation */ + SMSCB_S_INIT, + /* peer (BSC) have been notified of this SMSCB; we're waiting for ACK */ + SMSCB_S_WAIT_WRITE_ACK, + /* peer (BSC) have confirmed it, message is active */ + SMSCB_S_ACTIVE, + /* we have modified the message and sent REPLACE to peer; we're waiting for ACK */ + SMSCB_S_WAIT_REPLACE_ACK, + /* we have modified the message and sent REPLACE to peer; we're waiting for ACK */ + SMSCB_S_WAIT_STATUS_ACK, + /* we have deleted the message and sent KILL to peer; wait for ACK */ + SMSCB_S_WAIT_DELETE_ACK, + SMSCB_S_DELETED, +}; + +enum smscb_p_fsm_timer { + T_WAIT_WRITE_ACK, + T_WAIT_REPLACE_ACK, + T_WAIT_STATUS_ACK, + T_WAIT_DELETE_ACK, +}; + +extern const struct value_string smscb_fsm_event_names;
View file
osmo-cbc_0.3.0.23.dcf9.202207200002.tar.gz/src/Makefile.am -> osmo-cbc_0.3.0.35.782d.202207210002.tar.gz/src/Makefile.am
Changed
@@ -11,7 +11,8 @@ osmo_cbc_SOURCES = \ cbc_main.c \ - cbc_data.c \ + cbc_message.c \ + cbc_peer.c \ cbc_vty.c \ cbsp_server.c \ cbsp_server_fsm.c \
View file
osmo-cbc_0.3.0.23.dcf9.202207200002.tar.gz/src/cbc_main.c -> osmo-cbc_0.3.0.35.782d.202207210002.tar.gz/src/cbc_main.c
Changed
@@ -44,10 +44,12 @@ #include <osmocom/vty/logging.h> #include <osmocom/vty/misc.h> -#include <osmocom/cbc/internal.h> +#include <osmocom/cbc/debug.h> +#include <osmocom/cbc/rest_it_op.h> #include <osmocom/cbc/cbsp_server.h> #include <osmocom/cbc/sbcap_server.h> #include <osmocom/cbc/cbc_data.h> +#include <osmocom/cbc/cbc_vty.h> static void *tall_cbc_ctx; struct cbc *g_cbc;
View file
osmo-cbc_0.3.0.35.782d.202207210002.tar.gz/src/cbc_message.c
Added
@@ -0,0 +1,73 @@ +/* Osmocom CBC (Cell Broacast Centre) */ + +/* (C) 2019 by Harald Welte <laforge@gnumonks.org> + * 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 <string.h> +#include <errno.h> + +#include <osmocom/core/linuxlist.h> +#include <osmocom/core/talloc.h> +#include <osmocom/core/utils.h> + +#include <osmocom/cbc/cbc_message.h> + +/* remove a peer from the message */ +int cbc_message_del_peer(struct cbc_message *cbcmsg, struct cbc_peer *peer) +{ + struct cbc_message_peer *mp, *mp2; + unsigned int i = 0; + + llist_for_each_entry_safe(mp, mp2, &cbcmsg->peers, list) { + if (mp->peer == peer) { + llist_del(&mp->list); + talloc_free(mp); + i++; + } + } + OSMO_ASSERT(i == 0 || i == 1); + return i; +} + +struct cbc_message_peer *cbc_message_peer_get(struct cbc_message *cbcmsg, struct cbc_peer *peer) +{ + struct cbc_message_peer *mp; + + llist_for_each_entry(mp, &cbcmsg->peers, list) { + if (mp->peer == peer) + return mp; + } + return NULL; +} + +#if 0 +/* add a new peer to the message */ +int cbc_message_add_peer(struct cbc_message *cbcmsg, struct cbc_peer *peer) +{ + struct cbc_message_peer *mp = talloc_zero(cbcmsg, struct cbc_message_peer); + if (mp) + return -ENOMEM; + + mp->peer = peer; + llist_add_tail(&mp->list, &cbcmsg->peers); + return 0; +} +#endif
View file
osmo-cbc_0.3.0.35.782d.202207210002.tar.gz/src/cbc_peer.c
Added
@@ -0,0 +1,122 @@ +/* Osmocom CBC (Cell Broacast Centre) */ + +/* (C) 2019 by Harald Welte <laforge@gnumonks.org> + * 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 <string.h> +#include <errno.h> + +#include <osmocom/core/linuxlist.h> +#include <osmocom/core/talloc.h> +#include <osmocom/core/utils.h> + +#include <osmocom/cbc/cbc_message.h> +#include <osmocom/cbc/cbc_peer.h> +#include <osmocom/cbc/cbsp_server.h> +#include <osmocom/cbc/sbcap_server.h> + +const struct value_string cbc_peer_proto_name = { + { CBC_PEER_PROTO_CBSP, "CBSP" }, + { CBC_PEER_PROTO_SABP, "SABP" }, + { CBC_PEER_PROTO_SBcAP, "SBc-AP" }, + { 0, NULL } +}; + +/* create a new cbc_peer */ +struct cbc_peer *cbc_peer_create(const char *name, enum cbc_peer_protocol proto) +{ + struct cbc_peer *peer; + if (name && cbc_peer_by_name(name)) + return NULL; + + peer = talloc_zero(g_cbc, struct cbc_peer); + if (!peer) + return NULL; + + peer->proto = proto; + peer->name = talloc_strdup(peer, name); + llist_add_tail(&peer->list, &g_cbc->peers); + + return peer; +} + +/* remove a cbc_peer */ +void cbc_peer_remove(struct cbc_peer *peer) +{ + struct cbc_message *cbcmsg; + + /* close any existing client connection */ + switch (peer->proto) { + case CBC_PEER_PROTO_CBSP: + if (peer->client.cbsp) + cbsp_cbc_client_close(peer->client.cbsp); + break; + case CBC_PEER_PROTO_SBcAP: + if (peer->client.sbcap) + sbcap_cbc_client_close(peer->client.sbcap); + break; + case CBC_PEER_PROTO_SABP: + default: + OSMO_ASSERT(0); + } + + /* iterate over messages; remove client from all message_peers */ + llist_for_each_entry(cbcmsg, &g_cbc->messages, list) { + cbc_message_del_peer(cbcmsg, peer); + } + + llist_del(&peer->list); + talloc_free(peer); +} + +/* look-up of cbc_peer by name */ +struct cbc_peer *cbc_peer_by_name(const char *name) +{ + struct cbc_peer *peer; + + llist_for_each_entry(peer, &g_cbc->peers, list) { + if (peer->name && !strcmp(name, peer->name)) + return peer; + } + return NULL; +} + +/* look-up of cbc_peer by tuple of (remote host, protocol) */ +struct cbc_peer *cbc_peer_by_addr_proto(const char *remote_host, uint16_t remote_port, + enum cbc_peer_protocol proto) +{ + struct cbc_peer *peer; + + llist_for_each_entry(peer, &g_cbc->peers, list) { + unsigned int i; + for (i = 0; i < peer->num_remote_host; i++) { + if (peer->proto != proto) + continue; + if (!strcasecmp(remote_host, peer->remote_hosti)) { + if (peer->remote_port == -1) + return peer; + else if (remote_port == peer->remote_port) + return peer; + } + } + } + return NULL; +}
View file
osmo-cbc_0.3.0.23.dcf9.202207200002.tar.gz/src/cbc_vty.c -> osmo-cbc_0.3.0.35.782d.202207210002.tar.gz/src/cbc_vty.c
Changed
@@ -31,7 +31,9 @@ #include <osmocom/vty/vty.h> #include <osmocom/cbc/cbc_data.h> -#include <osmocom/cbc/internal.h> +#include <osmocom/cbc/cbc_message.h> +#include <osmocom/cbc/cbc_peer.h> +#include <osmocom/cbc/cbc_vty.h> #include <osmocom/cbc/cbsp_server.h> #include <osmocom/cbc/sbcap_server.h>
View file
osmo-cbc_0.3.0.23.dcf9.202207200002.tar.gz/src/cbsp_server.c -> osmo-cbc_0.3.0.35.782d.202207210002.tar.gz/src/cbsp_server.c
Changed
@@ -27,12 +27,15 @@ #include <osmocom/core/socket.h> #include <osmocom/core/msgb.h> #include <osmocom/core/logging.h> +#include <osmocom/core/fsm.h> #include <osmocom/gsm/cbsp.h> #include <osmocom/gsm/protocol/gsm_48_049.h> #include <osmocom/netif/stream.h> -#include <osmocom/cbc/internal.h> +#include <osmocom/cbc/debug.h> #include <osmocom/cbc/cbsp_server.h> +#include <osmocom/cbc/cbsp_server_fsm.h> +#include <osmocom/cbc/cbc_peer.h> #if 0 struct osmo_cbsp_bsc {
View file
osmo-cbc_0.3.0.23.dcf9.202207200002.tar.gz/src/cbsp_server_fsm.c -> osmo-cbc_0.3.0.35.782d.202207210002.tar.gz/src/cbsp_server_fsm.c
Changed
@@ -22,8 +22,12 @@ #include <osmocom/gsm/cbsp.h> +#include <osmocom/cbc/cbc_message.h> +#include <osmocom/cbc/cbc_peer.h> #include <osmocom/cbc/cbsp_server.h> -#include <osmocom/cbc/internal.h> +#include <osmocom/cbc/cbsp_server_fsm.h> +#include <osmocom/cbc/debug.h> +#include <osmocom/cbc/smscb_message_fsm.h> #define S(x) (1 << (x))
View file
osmo-cbc_0.3.0.23.dcf9.202207200002.tar.gz/src/message_handling.c -> osmo-cbc_0.3.0.35.782d.202207210002.tar.gz/src/message_handling.c
Changed
@@ -32,7 +32,9 @@ #include <osmocom/cbc/sbcap_server.h> #include <osmocom/cbc/sbcap_msg.h> #include <osmocom/cbc/rest_it_op.h> -#include <osmocom/cbc/internal.h> +#include <osmocom/cbc/debug.h> +#include <osmocom/cbc/cbc_peer.h> +#include <osmocom/cbc/smscb_message_fsm.h> /* convert cbc_message to osmo_cbsp_cell_list */ static int cbcmsg_to_cbsp_cell_list(const void *ctx, struct osmo_cbsp_cell_list *list,
View file
osmo-cbc_0.3.0.23.dcf9.202207200002.tar.gz/src/rest_api.c -> osmo-cbc_0.3.0.35.782d.202207210002.tar.gz/src/rest_api.c
Changed
@@ -37,7 +37,7 @@ #define PREFIX "/api/ecbe/v1" -#include <osmocom/cbc/internal.h> +#include <osmocom/cbc/debug.h> #include <osmocom/cbc/charset.h> #include <osmocom/cbc/cbc_data.h> #include <osmocom/cbc/rest_it_op.h>
View file
osmo-cbc_0.3.0.23.dcf9.202207200002.tar.gz/src/rest_it_op.c -> osmo-cbc_0.3.0.35.782d.202207210002.tar.gz/src/rest_it_op.c
Changed
@@ -23,11 +23,13 @@ #include <errno.h> #include <pthread.h> +#include <osmocom/core/talloc.h> #include <osmocom/core/linuxlist.h> #include <osmocom/core/it_q.h> +#include <osmocom/cbc/cbc_data.h> #include <osmocom/cbc/rest_it_op.h> -#include <osmocom/cbc/internal.h> +#include <osmocom/cbc/debug.h> /*********************************************************************** * HTTP THREAD
View file
osmo-cbc_0.3.0.23.dcf9.202207200002.tar.gz/src/sbcap_msg.c -> osmo-cbc_0.3.0.35.782d.202207210002.tar.gz/src/sbcap_msg.c
Changed
@@ -31,9 +31,9 @@ #include <osmocom/sbcap/sbcap_common.h> -#include <osmocom/cbc/cbc_data.h> +#include <osmocom/cbc/cbc_message.h> #include <osmocom/cbc/sbcap_server.h> -#include <osmocom/cbc/internal.h> +#include <osmocom/cbc/debug.h> /* 3GPP TS 36.413 9.2.1.53 */ #define SBCAP_WARN_MSG_CONTENTS_IE_MAX_LEN 9600
View file
osmo-cbc_0.3.0.23.dcf9.202207200002.tar.gz/src/sbcap_server.c -> osmo-cbc_0.3.0.35.782d.202207210002.tar.gz/src/sbcap_server.c
Changed
@@ -35,8 +35,11 @@ #include <osmocom/sbcap/sbcap_common.h> -#include <osmocom/cbc/internal.h> +#include <osmocom/cbc/cbc_data.h> #include <osmocom/cbc/sbcap_server.h> +#include <osmocom/cbc/sbcap_server_fsm.h> +#include <osmocom/cbc/cbc_peer.h> +#include <osmocom/cbc/debug.h> const char *sbcap_cbc_client_name(const struct osmo_sbcap_cbc_client *client) { @@ -59,7 +62,7 @@ struct osmo_sbcap_cbc *cbc = osmo_stream_srv_link_get_data(link); struct osmo_fd *ofd = osmo_stream_srv_get_ofd(conn); SBcAP_SBC_AP_PDU_t *pdu; - struct msgb *msg = msgb_alloc_c(client, 1500, "SBcAP-rx"); + struct msgb *msg = msgb_alloc_c(g_cbc, 1500, "SBcAP-rx"); struct sctp_sndrcvinfo sinfo; int flags = 0; int rc; @@ -89,11 +92,14 @@ case SCTP_ASSOC_CHANGE: LOGPSBCAPC(client, LOGL_DEBUG, "Rx sctp notif SCTP_ASSOC_CHANGE: %s\n", osmo_sctp_assoc_chg_str(notif->sn_assoc_change.sac_state)); + break; default: + LOGPSBCAPC(client, LOGL_DEBUG, "Rx sctp notif %s (%u)\n", + osmo_sctp_sn_type_str(notif->sn_header.sn_type), + notif->sn_header.sn_type); break; } rc = 0; - goto out; } if (rc == 0)
View file
osmo-cbc_0.3.0.23.dcf9.202207200002.tar.gz/src/sbcap_server_fsm.c -> osmo-cbc_0.3.0.35.782d.202207210002.tar.gz/src/sbcap_server_fsm.c
Changed
@@ -25,8 +25,12 @@ #include <osmocom/sbcap/sbcap_common.h> +#include <osmocom/cbc/cbc_message.h> #include <osmocom/cbc/sbcap_server.h> -#include <osmocom/cbc/internal.h> +#include <osmocom/cbc/sbcap_server_fsm.h> +#include <osmocom/cbc/debug.h> +#include <osmocom/cbc/cbc_peer.h> +#include <osmocom/cbc/smscb_message_fsm.h> #define S(x) (1 << (x))
View file
osmo-cbc_0.3.0.23.dcf9.202207200002.tar.gz/src/smscb_message_fsm.c -> osmo-cbc_0.3.0.35.782d.202207210002.tar.gz/src/smscb_message_fsm.c
Changed
@@ -32,8 +32,9 @@ #include <osmocom/cbc/cbc_data.h> #include <osmocom/cbc/cbsp_server.h> -#include <osmocom/cbc/internal.h> +#include <osmocom/cbc/debug.h> #include <osmocom/cbc/rest_it_op.h> +#include <osmocom/cbc/smscb_message_fsm.h> #define S(x) (1 << (x))
View file
osmo-cbc_0.3.0.23.dcf9.202207200002.tar.gz/src/smscb_peer_fsm.c -> osmo-cbc_0.3.0.35.782d.202207210002.tar.gz/src/smscb_peer_fsm.c
Changed
@@ -34,11 +34,13 @@ #include <osmocom/sbcap/sbcap_common.h> -#include <osmocom/cbc/cbc_data.h> +#include <osmocom/cbc/cbc_message.h> +#include <osmocom/cbc/cbc_peer.h> #include <osmocom/cbc/cbsp_server.h> #include <osmocom/cbc/sbcap_server.h> #include <osmocom/cbc/sbcap_msg.h> -#include <osmocom/cbc/internal.h> +#include <osmocom/cbc/debug.h> +#include <osmocom/cbc/smscb_message_fsm.h> #define S(x) (1 << (x))
View file
osmo-cbc_0.3.0.23.dcf9.202207200002.tar.gz/tests/sbcap/sbcap_test.c -> osmo-cbc_0.3.0.35.782d.202207210002.tar.gz/tests/sbcap/sbcap_test.c
Changed
@@ -161,7 +161,7 @@ OSMO_ASSERT(rval.code == RC_OK); OSMO_ASSERT(pdu); - OSMO_ASSERT(pdu->present = SBcAP_SBC_AP_PDU_PR_successfulOutcome); + OSMO_ASSERT(pdu->present == SBcAP_SBC_AP_PDU_PR_successfulOutcome); OSMO_ASSERT(pdu->choice.successfulOutcome.procedureCode == SBcAP_ProcedureId_Write_Replace_Warning); OSMO_ASSERT(pdu->choice.successfulOutcome.criticality == SBcAP_Criticality_reject);
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
.