lists.osmocom.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

gerrit-log

Thread Start a new thread
Download
Threads by month
  • ----- 2026 -----
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2025 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
gerrit-log@lists.osmocom.org

January 2023

  • 1 participants
  • 2205 discussions
Change in libosmo-gprs[master]: rlcmac: Enqueue LLC PDUs based on RadioPriority and SAPI
by pespin 30 Jan '23

30 Jan '23
Attention is currently required from: pespin, fixeria. Hello osmith, Jenkins Builder, fixeria, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmo-gprs/+/31098 to look at the new patch set (#4). Change subject: rlcmac: Enqueue LLC PDUs based on RadioPriority and SAPI ...................................................................... rlcmac: Enqueue LLC PDUs based on RadioPriority and SAPI llc_queue and codel code has been taken from osmo-pcu.git 6a5b1b1f3ef83f87a9df1d4511e22f59039e11ed and have been refactored to fit in libosmo-gprs (removed llc_pdu structs, reworked struct types being enqueued, etc.). Support for queues based on radio_prio has also been added. Related: OS#5500 Change-Id: Icdaa046fb6a71367f10beee16dcf9a5b7b61022e --- M include/osmocom/gprs/rlcmac/Makefile.am A include/osmocom/gprs/rlcmac/codel.h A include/osmocom/gprs/rlcmac/gre.h A include/osmocom/gprs/rlcmac/llc_queue.h M include/osmocom/gprs/rlcmac/rlcmac.h M include/osmocom/gprs/rlcmac/rlcmac_private.h M src/rlcmac/Makefile.am A src/rlcmac/codel.c A src/rlcmac/gre.c A src/rlcmac/llc_queue.c M src/rlcmac/rlcmac.c M src/rlcmac/rlcmac_prim.c 12 files changed, 716 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-gprs refs/changes/98/31098/4 -- To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/31098 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-gprs Gerrit-Branch: master Gerrit-Change-Id: Icdaa046fb6a71367f10beee16dcf9a5b7b61022e Gerrit-Change-Number: 31098 Gerrit-PatchSet: 4 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: newpatchset
1 0
0 0
Change in osmocom-bb[master]: layer23: Support configuring GSMTAP through VTY in l23 apps.
by pespin 30 Jan '23

30 Jan '23
Attention is currently required from: pespin. Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmocom-bb/+/31108 to look at the new patch set (#2). Change subject: layer23: Support configuring GSMTAP through VTY in l23 apps. ...................................................................... layer23: Support configuring GSMTAP through VTY in l23 apps. This allow all l23 apps supporting L23_OPT_VTY and L23_OPT_TAP to dynamically configure gsmtap through a "gsmtap" VTY node: gsmtap gsmtap-remote-host 127.0.0.2 gsmtap-sapi bcch gsmtap-sapi ccch gsmtap-sapi rach gsmtap-sapi agch gsmtap-sapi pch gsmtap-sapi sdcch gsmtap-sapi tch/f gsmtap-sapi tch/h gsmtap-sapi pacch gsmtap-sapi pdtch gsmtap-sapi ptcch gsmtap-sapi cbch gsmtap-category gprs dl-unknown gsmtap-category gprs dl-dummy gsmtap-category gprs dl-ctrl gsmtap-category gprs dl-data-gprs gsmtap-category gprs dl-data-egprs gsmtap-category gprs ul-unknown gsmtap-category gprs ul-dummy gsmtap-category gprs ul-ctrl gsmtap-category gprs ul-data-gprs gsmtap-category gprs ul-data-egprs VTY cmd "gsmtap-sapi" enables/disables tapping on general channel types, while "gsmtap-category" allows fine-grained selection of messages being tapped within the enabled sapis which would tap those messages. Change-Id: I2582a1633d37d350a7f4c2bb5e03793bdf46e839 --- M src/host/layer23/include/osmocom/bb/common/l23_app.h M src/host/layer23/include/osmocom/bb/common/vty.h M src/host/layer23/src/common/l1ctl.c M src/host/layer23/src/common/main.c M src/host/layer23/src/common/sim.c M src/host/layer23/src/common/vty.c M src/host/layer23/src/mobile/main.c 7 files changed, 314 insertions(+), 20 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/08/31108/2 -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/31108 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I2582a1633d37d350a7f4c2bb5e03793bdf46e839 Gerrit-Change-Number: 31108 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newpatchset
1 0
0 0
Change in osmocom-bb[master]: layer23: Support configuring GSMTAP through VTY in l23 apps.
by Jenkins Builder 30 Jan '23

30 Jan '23
Jenkins Builder has posted comments on this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/31108 ) Change subject: layer23: Support configuring GSMTAP through VTY in l23 apps. ...................................................................... Patch Set 1: (6 comments) File src/host/layer23/include/osmocom/bb/common/l23_app.h: Robot Comment from checkpatch (run ID jenkins-gerrit-lint-3100): https://gerrit.osmocom.org/c/osmocom-bb/+/31108/comment/4529ece9_8f92831f PS1, Line 22: L23_GSMTAP_C_DL_DUMMY = 1, /* downlink dummy blocks */ please, no space before tabs File src/host/layer23/src/common/vty.c: Robot Comment from checkpatch (run ID jenkins-gerrit-lint-3100): https://gerrit.osmocom.org/c/osmocom-bb/+/31108/comment/331e9bdf_187575f0 PS1, Line 150: { GSMTAP_CHANNEL_CBCH51,"CBCH" }, space required after that ',' (ctx:VxV) Robot Comment from checkpatch (run ID jenkins-gerrit-lint-3100): https://gerrit.osmocom.org/c/osmocom-bb/+/31108/comment/a34d2173_9f5d7bfa PS1, Line 470: "|",")", VTY_DO_LOWER); space required after that ',' (ctx:VxV) Robot Comment from checkpatch (run ID jenkins-gerrit-lint-3100): https://gerrit.osmocom.org/c/osmocom-bb/+/31108/comment/95b0e18f_d52e50f6 PS1, Line 477: "|",")", VTY_DO_LOWER); space required after that ',' (ctx:VxV) Robot Comment from checkpatch (run ID jenkins-gerrit-lint-3100): https://gerrit.osmocom.org/c/osmocom-bb/+/31108/comment/83471faa_9131d940 PS1, Line 485: "|",")", VTY_DO_LOWER); space required after that ',' (ctx:VxV) Robot Comment from checkpatch (run ID jenkins-gerrit-lint-3100): https://gerrit.osmocom.org/c/osmocom-bb/+/31108/comment/691d2430_2b98d65e PS1, Line 491: "|",")", VTY_DO_LOWER); space required after that ',' (ctx:VxV) -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/31108 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I2582a1633d37d350a7f4c2bb5e03793bdf46e839 Gerrit-Change-Number: 31108 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-CC: Jenkins Builder Gerrit-Comment-Date: Mon, 30 Jan 2023 16:46:58 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
1 0
0 0
Change in osmocom-bb[master]: layer23: Support configuring GSMTAP through VTY in l23 apps.
by pespin 30 Jan '23

30 Jan '23
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmocom-bb/+/31108 ) Change subject: layer23: Support configuring GSMTAP through VTY in l23 apps. ...................................................................... layer23: Support configuring GSMTAP through VTY in l23 apps. This allow all l23 apps supporting L23_OPT_VTY and L23_OPT_TAP to dynamically configure gsmtap through a "gsmtap" VTY node: gsmtap gsmtap-remote-host 127.0.0.2 gsmtap-sapi bcch gsmtap-sapi ccch gsmtap-sapi rach gsmtap-sapi agch gsmtap-sapi pch gsmtap-sapi sdcch gsmtap-sapi tch/f gsmtap-sapi tch/h gsmtap-sapi pacch gsmtap-sapi pdtch gsmtap-sapi ptcch gsmtap-sapi cbch gsmtap-category gprs dl-unknown gsmtap-category gprs dl-dummy gsmtap-category gprs dl-ctrl gsmtap-category gprs dl-data-gprs gsmtap-category gprs dl-data-egprs gsmtap-category gprs ul-unknown gsmtap-category gprs ul-dummy gsmtap-category gprs ul-ctrl gsmtap-category gprs ul-data-gprs gsmtap-category gprs ul-data-egprs Change-Id: I2582a1633d37d350a7f4c2bb5e03793bdf46e839 --- M src/host/layer23/include/osmocom/bb/common/l23_app.h M src/host/layer23/include/osmocom/bb/common/vty.h M src/host/layer23/src/common/l1ctl.c M src/host/layer23/src/common/main.c M src/host/layer23/src/common/sim.c M src/host/layer23/src/common/vty.c M src/host/layer23/src/mobile/main.c 7 files changed, 314 insertions(+), 20 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/08/31108/1 diff --git a/src/host/layer23/include/osmocom/bb/common/l23_app.h b/src/host/layer23/include/osmocom/bb/common/l23_app.h index d442e7e..d747aab 100644 --- a/src/host/layer23/include/osmocom/bb/common/l23_app.h +++ b/src/host/layer23/include/osmocom/bb/common/l23_app.h @@ -2,6 +2,7 @@ #define _L23_APP_H #include <osmocom/core/tun.h> +#include <osmocom/core/gsmtap.h> struct option; struct vty_app_info; @@ -15,6 +16,29 @@ L23_OPT_DBG = 1 << 4, }; +/* see bts->gsmtap_categ_mask */ +enum l23_gsmtap_category { + L23_GSMTAP_C_DL_UNKNOWN = 0, /* unknown or undecodable downlink blocks */ + L23_GSMTAP_C_DL_DUMMY = 1, /* downlink dummy blocks */ + L23_GSMTAP_C_DL_CTRL = 2, /* downlink control blocks */ + L23_GSMTAP_C_DL_DATA_GPRS = 3, /* downlink GPRS data blocks */ + L23_GSMTAP_C_DL_DATA_EGPRS = 4, /* downlink EGPRS data blocks */ + + L23_GSMTAP_C_UL_UNKNOWN = 5, /* unknown or undecodable uplink blocks */ + L23_GSMTAP_C_UL_DUMMY = 6, /* uplink dummy blocks */ + L23_GSMTAP_C_UL_CTRL = 7, /* uplink control blocks */ + L23_GSMTAP_C_UL_DATA_GPRS = 8, /* uplink GPRS data blocks */ + L23_GSMTAP_C_UL_DATA_EGPRS = 9, /* uplink EGPRS data blocks */ +}; + +struct l23_global_config { + char *gsmtap_remote_host; + uint32_t gsmtap_sapi_mask; /* see l23_gsmtap_category */ + uint32_t gsmtap_categ_gprs_mask; + struct gsmtap_inst *gsmtap_inst; +}; +extern struct l23_global_config l23_cfg; + extern void *l23_ctx; /* initialization, called once when starting the app, before reading VTY config */ diff --git a/src/host/layer23/include/osmocom/bb/common/vty.h b/src/host/layer23/include/osmocom/bb/common/vty.h index 259725e..4ff96fe 100644 --- a/src/host/layer23/include/osmocom/bb/common/vty.h +++ b/src/host/layer23/include/osmocom/bb/common/vty.h @@ -10,6 +10,7 @@ enum l23_vty_node { MS_NODE = _LAST_OSMOVTY_NODE + 1, + GSMTAP_NODE, _LAST_L23VTY_NODE, }; diff --git a/src/host/layer23/src/common/l1ctl.c b/src/host/layer23/src/common/l1ctl.c index 5ba1a1f..95b1e9a 100644 --- a/src/host/layer23/src/common/l1ctl.c +++ b/src/host/layer23/src/common/l1ctl.c @@ -39,14 +39,13 @@ #include <osmocom/gsm/rsl.h> #include <osmocom/bb/common/l1ctl.h> +#include <osmocom/bb/common/l23_app.h> #include <osmocom/bb/common/osmocom_data.h> #include <osmocom/bb/common/ms.h> #include <osmocom/bb/common/l1l2_interface.h> #include <osmocom/gsm/lapdm.h> #include <osmocom/bb/common/logging.h> -extern struct gsmtap_inst *gsmtap_inst; - #define CB_FCCH -1 #define CB_SCH -2 #define CB_BCCH -3 @@ -317,7 +316,7 @@ * to clog up your logs */ if (!is_fill_frame(gsmtap_chan_type, ccch->data)) { /* send CCCH data via GSMTAP */ - gsmtap_send(gsmtap_inst, ntohs(dl->band_arfcn), chan_ts, + gsmtap_send(l23_cfg.gsmtap_inst, ntohs(dl->band_arfcn), chan_ts, gsmtap_chan_type, chan_ss, tm.fn, dl->rx_level-110, dl->snr, ccch->data, sizeof(ccch->data)); } @@ -394,7 +393,7 @@ /* send copy via GSMTAP */ if (rsl_dec_chan_nr(chan_nr, &chan_type, &chan_ss, &chan_ts) == 0) { uint8_t gsmtap_chan_type = chantype_rsl2gsmtap2(chan_type, link_id, false); - gsmtap_send(gsmtap_inst, ms->rrlayer.cd_now.arfcn | GSMTAP_ARFCN_F_UPLINK, + gsmtap_send(l23_cfg.gsmtap_inst, ms->rrlayer.cd_now.arfcn | GSMTAP_ARFCN_F_UPLINK, chan_ts, gsmtap_chan_type, chan_ss, 0, 127, 0, msg->l2h, msgb_l2len(msg)); } else { diff --git a/src/host/layer23/src/common/main.c b/src/host/layer23/src/common/main.c index 82bbc60..92a4325 100644 --- a/src/host/layer23/src/common/main.c +++ b/src/host/layer23/src/common/main.c @@ -33,7 +33,6 @@ #include <osmocom/core/linuxlist.h> #include <osmocom/core/application.h> #include <osmocom/core/gsmtap_util.h> -#include <osmocom/core/gsmtap.h> #include <osmocom/core/utils.h> #include <osmocom/vty/vty.h> #include <osmocom/vty/logging.h> @@ -53,6 +52,7 @@ #include "config.h" void *l23_ctx = NULL; +struct l23_global_config l23_cfg; static char *sap_socket_path = "/tmp/osmocom_sap"; struct llist_head ms_list; @@ -63,7 +63,6 @@ int (*l23_app_work)(void) = NULL; int (*l23_app_exit)(void) = NULL; int quit = 0; -struct gsmtap_inst *gsmtap_inst; const char *openbsc_copyright = "%s" @@ -288,13 +287,29 @@ exit(1); } - if (gsmtap_ip) { - gsmtap_inst = gsmtap_source_init(gsmtap_ip, GSMTAP_UDP_PORT, 1); - if (!gsmtap_inst) { - fprintf(stderr, "Failed during gsmtap_init()\n"); - exit(1); + if (app_supp_opt & L23_OPT_TAP) { + if (gsmtap_ip) { + if (l23_cfg.gsmtap_remote_host != NULL) { + LOGP(DLGLOBAL, LOGL_NOTICE, + "Command line argument '-i %s' overrides " + "'gsmtap-remote-host %s' from the config file\n", + gsmtap_ip, l23_cfg.gsmtap_remote_host); + talloc_free(l23_cfg.gsmtap_remote_host); + } + l23_cfg.gsmtap_remote_host = talloc_strdup(l23_ctx, gsmtap_ip); } - gsmtap_source_add_sink(gsmtap_inst); + + if (l23_cfg.gsmtap_remote_host) { + LOGP(DLGLOBAL, LOGL_NOTICE, + "Setting up GSMTAP Um forwarding to '%s:%u'\n", + l23_cfg.gsmtap_remote_host, GSMTAP_UDP_PORT); + l23_cfg.gsmtap_inst = gsmtap_source_init(l23_cfg.gsmtap_remote_host, GSMTAP_UDP_PORT, 1); + if (!l23_cfg.gsmtap_inst) { + fprintf(stderr, "Failed during gsmtap_init()\n"); + exit(1); + } + gsmtap_source_add_sink(l23_cfg.gsmtap_inst); + } } if (l23_app_start) { diff --git a/src/host/layer23/src/common/sim.c b/src/host/layer23/src/common/sim.c index bd50f62..34abbc2 100644 --- a/src/host/layer23/src/common/sim.c +++ b/src/host/layer23/src/common/sim.c @@ -24,12 +24,11 @@ #include <osmocom/core/gsmtap.h> #include <osmocom/bb/common/logging.h> +#include <osmocom/bb/common/l23_app.h> #include <osmocom/bb/common/osmocom_data.h> #include <osmocom/bb/common/ms.h> #include <osmocom/bb/common/l1ctl.h> -extern struct gsmtap_inst *gsmtap_inst; - static int sim_process_job(struct osmocom_ms *ms); /* @@ -874,7 +873,7 @@ if ((ms->sim.apdu_len + length) <= sizeof(ms->sim.apdu_data)) { memcpy(ms->sim.apdu_data + ms->sim.apdu_len, data, length); ms->sim.apdu_len += length; - gsmtap_send_ex(gsmtap_inst, GSMTAP_TYPE_SIM, + gsmtap_send_ex(l23_cfg.gsmtap_inst, GSMTAP_TYPE_SIM, 0, 0, 0, 0, 0, 0, 0, ms->sim.apdu_data, ms->sim.apdu_len); } } diff --git a/src/host/layer23/src/common/vty.c b/src/host/layer23/src/common/vty.c index 2e7dea8..e57559e 100644 --- a/src/host/layer23/src/common/vty.c +++ b/src/host/layer23/src/common/vty.c @@ -26,9 +26,11 @@ #include <osmocom/gsm/gsm48.h> #include <osmocom/core/talloc.h> #include <osmocom/core/signal.h> +#include <osmocom/core/gsmtap.h> #include <osmocom/crypt/auth.h> #include <osmocom/bb/common/vty.h> +#include <osmocom/bb/common/l23_app.h> #include <osmocom/bb/common/osmocom_data.h> #include <osmocom/bb/common/ms.h> #include <osmocom/bb/common/networks.h> @@ -38,7 +40,6 @@ #include <osmocom/bb/mobile/mncc_ms.h> #include <osmocom/bb/mobile/transaction.h> #include <osmocom/bb/mobile/vty.h> -#include <osmocom/bb/mobile/app_mobile.h> #include <osmocom/bb/mobile/gsm480_ss.h> #include <osmocom/bb/mobile/gsm411_sms.h> #include <osmocom/vty/telnet_interface.h> @@ -52,6 +53,12 @@ 1 }; +static struct cmd_node gsmtap_node = { + GSMTAP_NODE, + "%s(gsmtap)# ", + 1 +}; + static void l23_vty_restart_required_warn(struct vty *vty, struct osmocom_ms *ms) { if (l23_vty_reading) @@ -120,6 +127,168 @@ VTY_NEWLINE); } +/* "gsmtap" config */ +gDEFUN(l23_cfg_gsmtap, l23_cfg_gsmtap_cmd, "gsmtap", + "Configure GSMTAP\n") +{ + vty->node = GSMTAP_NODE; + return CMD_SUCCESS; +} + +static const struct value_string gsmtap_sapi_names[] = { + { GSMTAP_CHANNEL_BCCH, "BCCH" }, + { GSMTAP_CHANNEL_CCCH, "CCCH" }, + { GSMTAP_CHANNEL_RACH, "RACH" }, + { GSMTAP_CHANNEL_AGCH, "AGCH" }, + { GSMTAP_CHANNEL_PCH, "PCH" }, + { GSMTAP_CHANNEL_SDCCH, "SDCCH" }, + { GSMTAP_CHANNEL_TCH_F, "TCH/F" }, + { GSMTAP_CHANNEL_TCH_H, "TCH/H" }, + { GSMTAP_CHANNEL_PACCH, "PACCH" }, + { GSMTAP_CHANNEL_PDCH, "PDTCH" }, + { GSMTAP_CHANNEL_PTCCH, "PTCCH" }, + { GSMTAP_CHANNEL_CBCH51,"CBCH" }, + { GSMTAP_CHANNEL_ACCH, "SACCH" }, + { 0, NULL } +}; + +static const struct value_string gsmtap_categ_gprs_names[] = { + { L23_GSMTAP_C_DL_UNKNOWN, "dl-unknown" }, + { L23_GSMTAP_C_DL_DUMMY, "dl-dummy" }, + { L23_GSMTAP_C_DL_CTRL, "dl-ctrl" }, + { L23_GSMTAP_C_DL_DATA_GPRS, "dl-data-gprs" }, + { L23_GSMTAP_C_DL_DATA_EGPRS, "dl-data-egprs" }, + { L23_GSMTAP_C_UL_UNKNOWN, "ul-unknown" }, + { L23_GSMTAP_C_UL_DUMMY, "ul-dummy" }, + { L23_GSMTAP_C_UL_CTRL, "ul-ctrl" }, + { L23_GSMTAP_C_UL_DATA_GPRS, "ul-data-gprs" }, + { L23_GSMTAP_C_UL_DATA_EGPRS, "ul-data-egprs" }, + { 0, NULL } +}; + +static const struct value_string gsmtap_categ_gprs_help[] = { + { L23_GSMTAP_C_DL_UNKNOWN, "Unknown / Unparseable / Erroneous Downlink Blocks" }, + { L23_GSMTAP_C_DL_DUMMY, "Downlink Dummy Blocks" }, + { L23_GSMTAP_C_DL_CTRL, "Downlink Control Blocks" }, + { L23_GSMTAP_C_DL_DATA_GPRS, "Downlink Data Blocks (GPRS)" }, + { L23_GSMTAP_C_DL_DATA_EGPRS, "Downlink Data Blocks (EGPRS)" }, + { L23_GSMTAP_C_UL_UNKNOWN, "Unknown / Unparseable / Erroneous Downlink Blocks" }, + { L23_GSMTAP_C_UL_DUMMY, "Uplink Dummy Blocks" }, + { L23_GSMTAP_C_UL_CTRL, "Uplink Control Blocks" }, + { L23_GSMTAP_C_UL_DATA_GPRS, "Uplink Data Blocks (GPRS)" }, + { L23_GSMTAP_C_UL_DATA_EGPRS, "Uplink Data Blocks (EGPRS)" }, + { 0, NULL } +}; + +DEFUN(cfg_gsmtap_gsmtap_remote_host, + cfg_gsmtap_gsmtap_remote_host_cmd, + "gsmtap-remote-host [HOSTNAME]", + "Enable GSMTAP Um logging (see also 'gsmtap-category')\n" + "Remote IP address or hostname ('localhost' if omitted)\n") +{ + osmo_talloc_replace_string(l23_ctx, &l23_cfg.gsmtap_remote_host, + argc > 0 ? argv[0] : "localhost"); + + if (vty->type != VTY_FILE) + vty_out(vty, "%% This command requires restart%s", VTY_NEWLINE); + + return CMD_SUCCESS; +} + +DEFUN(cfg_gsmtap_no_gsmtap_remote_host, + cfg_gsmtap_no_gsmtap_remote_host_cmd, + "no gsmtap-remote-host", + NO_STR "Disable GSMTAP Um logging\n") +{ + if (l23_cfg.gsmtap_remote_host) + TALLOC_FREE(l23_cfg.gsmtap_remote_host); + + if (vty->type != VTY_FILE) + vty_out(vty, "%% This command requires restart%s", VTY_NEWLINE); + + return CMD_SUCCESS; +} + +DEFUN(cfg_gsmtap_gsmtap_sapi_all, cfg_gsmtap_gsmtap_sapi_all_cmd, + "gsmtap-sapi (enable-all|disable-all)", + "Enable/disable sending of UL/DL messages over GSMTAP\n" + "Enable all kinds of messages (all SAPI)\n" + "Disable all kinds of messages (all SAPI)\n") +{ + if (argv[0][0] == 'e') + l23_cfg.gsmtap_sapi_mask = UINT32_MAX; + else + l23_cfg.gsmtap_sapi_mask = 0x00; + + return CMD_SUCCESS; +} + +DEFUN(cfg_gsmtap_gsmtap_sapi, cfg_gsmtap_gsmtap_sapi_cmd, + "HIDDEN", "HIDDEN") +{ + int sapi; + + sapi = get_string_value(gsmtap_sapi_names, argv[0]); + OSMO_ASSERT(sapi >= 0); + l23_cfg.gsmtap_sapi_mask |= (1 << sapi); + + return CMD_SUCCESS; +} + +DEFUN(cfg_gsmtap_no_gsmtap_sapi, cfg_gsmtap_no_gsmtap_sapi_cmd, + "HIDDEN", "HIDDEN") +{ + int sapi; + + sapi = get_string_value(gsmtap_sapi_names, argv[0]); + OSMO_ASSERT(sapi >= 0); + + l23_cfg.gsmtap_sapi_mask &= ~(1 << sapi); + + return CMD_SUCCESS; +} + +DEFUN(cfg_gsmtap_gsmtap_categ_gprs_all, cfg_gsmtap_gsmtap_categ_gprs_all_cmd, + "gsmtap-category gprs (enable-all|disable-all)", + "Enable/disable sending of UL/DL messages over GSMTAP\n" + "Enable all kinds of messages (all categories)\n" + "Disable all kinds of messages (all categories)\n") +{ + + if (strcmp(argv[0], "enable-all") == 0) + l23_cfg.gsmtap_categ_gprs_mask = UINT32_MAX; + else + l23_cfg.gsmtap_categ_gprs_mask = 0x00; + + return CMD_SUCCESS; +} + +DEFUN(cfg_gsmtap_gsmtap_categ_gprs, cfg_gsmtap_gsmtap_categ_gprs_cmd, "HIDDEN", "HIDDEN") +{ + int categ; + + categ = get_string_value(gsmtap_categ_gprs_names, argv[0]); + if (categ < 0) + return CMD_WARNING; + + l23_cfg.gsmtap_categ_gprs_mask |= (1 << categ); + + return CMD_SUCCESS; +} + +DEFUN(cfg_gsmtap_no_gsmtap_categ_gprs, cfg_gsmtap_no_gsmtap_categ_gprs_cmd, "HIDDEN", "HIDDEN") +{ + int categ; + + categ = get_string_value(gsmtap_categ_gprs_names, argv[0]); + if (categ < 0) + return CMD_WARNING; + + l23_cfg.gsmtap_categ_gprs_mask &= ~(1 << categ); + + return CMD_SUCCESS; +} + gDEFUN(l23_show_ms, l23_show_ms_cmd, "show ms [MS_NAME]", SHOW_STR "Display available MS entities\n") @@ -228,6 +397,40 @@ return data.ms_stop.rc; } +static int l23_vty_config_write_gsmtap_node(struct vty *vty) +{ + const char *sapi_buf; + unsigned int i; + + vty_out(vty, "gsmtap%s", VTY_NEWLINE); + + if (l23_cfg.gsmtap_remote_host) + vty_out(vty, " gsmtap-remote-host %s%s", l23_cfg.gsmtap_remote_host, VTY_NEWLINE); + else + vty_out(vty, " no gsmtap-remote-host%s", VTY_NEWLINE); + + for (i = 0; i < sizeof(uint32_t) * 8; i++) { + if (l23_cfg.gsmtap_sapi_mask & ((uint32_t) 1 << i)) { + sapi_buf = get_value_string_or_null(gsmtap_sapi_names, i); + if (sapi_buf == NULL) + continue; + sapi_buf = osmo_str_tolower(sapi_buf); + vty_out(vty, " gsmtap-sapi %s%s", sapi_buf, VTY_NEWLINE); + } + } + + for (i = 0; i < 32; i++) { + if (l23_cfg.gsmtap_categ_gprs_mask & ((uint32_t)1 << i)) { + const char *category_buf; + if (!(category_buf = get_value_string_or_null(gsmtap_categ_gprs_names, i))) + continue; + vty_out(vty, " gsmtap-category gprs %s%s", category_buf, VTY_NEWLINE); + } + } + + return CMD_SUCCESS; +} + void l23_vty_config_write_ms_node(struct vty *vty, const struct osmocom_ms *ms, const char *prefix) { size_t prefix_len = strlen(prefix); @@ -260,9 +463,62 @@ vty_out(vty, "!%s", VTY_NEWLINE); } +static void l23_vty_init_gsmtap(void) +{ + cfg_gsmtap_gsmtap_sapi_cmd.string = vty_cmd_string_from_valstr(l23_ctx, gsmtap_sapi_names, + "gsmtap-sapi (", + "|",")", VTY_DO_LOWER); + cfg_gsmtap_gsmtap_sapi_cmd.doc = vty_cmd_string_from_valstr(l23_ctx, gsmtap_sapi_names, + "Enable sending of UL/DL messages over GSMTAP\n", + "\n", "", 0); + + cfg_gsmtap_no_gsmtap_sapi_cmd.string = vty_cmd_string_from_valstr(l23_ctx, gsmtap_sapi_names, + "no gsmtap-sapi (", + "|",")", VTY_DO_LOWER); + cfg_gsmtap_no_gsmtap_sapi_cmd.doc = vty_cmd_string_from_valstr(l23_ctx, gsmtap_sapi_names, + NO_STR "Disable sending of UL/DL messages over GSMTAP\n", + "\n", "", 0); + + + cfg_gsmtap_gsmtap_categ_gprs_cmd.string = vty_cmd_string_from_valstr(l23_ctx, gsmtap_categ_gprs_names, + "gsmtap-category gprs (", + "|",")", VTY_DO_LOWER); + cfg_gsmtap_gsmtap_categ_gprs_cmd.doc = vty_cmd_string_from_valstr(l23_ctx, gsmtap_categ_gprs_help, + "GSMTAP Category\n" "GPRS\n", + "\n", "", 0); + cfg_gsmtap_no_gsmtap_categ_gprs_cmd.string = vty_cmd_string_from_valstr(l23_ctx, gsmtap_categ_gprs_names, + "no gsmtap-category gprs (", + "|",")", VTY_DO_LOWER); + cfg_gsmtap_no_gsmtap_categ_gprs_cmd.doc = vty_cmd_string_from_valstr(l23_ctx, gsmtap_categ_gprs_help, + NO_STR "GSMTAP Category\n" "GPRS\n", + "\n", "", 0); + + install_element(CONFIG_NODE, &l23_cfg_gsmtap_cmd); + + install_node(&gsmtap_node, l23_vty_config_write_gsmtap_node); + install_element(GSMTAP_NODE, &cfg_gsmtap_gsmtap_remote_host_cmd); + install_element(GSMTAP_NODE, &cfg_gsmtap_no_gsmtap_remote_host_cmd); + install_element(GSMTAP_NODE, &cfg_gsmtap_gsmtap_sapi_all_cmd); + install_element(GSMTAP_NODE, &cfg_gsmtap_gsmtap_sapi_cmd); + install_element(GSMTAP_NODE, &cfg_gsmtap_no_gsmtap_sapi_cmd); + install_element(GSMTAP_NODE, &cfg_gsmtap_gsmtap_categ_gprs_all_cmd); + install_element(GSMTAP_NODE, &cfg_gsmtap_gsmtap_categ_gprs_cmd); + install_element(GSMTAP_NODE, &cfg_gsmtap_no_gsmtap_categ_gprs_cmd); +} + int l23_vty_init(int (*config_write_ms_node_cb)(struct vty *), osmo_signal_cbfn *l23_vty_signal_cb) { + struct l23_app_info *app; + unsigned int app_supp_opt = 0x00; int rc = 0; + + app = l23_app_info(); + if (app && app->cfg_supported != NULL) + app_supp_opt = app->cfg_supported(); + + if (app_supp_opt & L23_OPT_TAP) + l23_vty_init_gsmtap(); + install_node(&ms_node, config_write_ms_node_cb); install_element(MS_NODE, &cfg_ms_layer2_cmd); install_element(MS_NODE, &cfg_ms_shutdown_cmd); diff --git a/src/host/layer23/src/mobile/main.c b/src/host/layer23/src/mobile/main.c index 9acb9a9..6d0d5a3 100644 --- a/src/host/layer23/src/mobile/main.c +++ b/src/host/layer23/src/mobile/main.c @@ -51,10 +51,10 @@ #include "config.h" void *l23_ctx = NULL; +struct l23_global_config l23_cfg; struct llist_head ms_list; static char *gsmtap_ip = 0; static const char *custom_cfg_file = NULL; -struct gsmtap_inst *gsmtap_inst = NULL; static char *config_file = NULL; char *config_dir = NULL; int daemonize = 0; @@ -306,12 +306,12 @@ } if (gsmtap_ip) { - gsmtap_inst = gsmtap_source_init(gsmtap_ip, GSMTAP_UDP_PORT, 1); - if (!gsmtap_inst) { + l23_cfg.gsmtap_inst = gsmtap_source_init(gsmtap_ip, GSMTAP_UDP_PORT, 1); + if (!l23_cfg.gsmtap_inst) { fprintf(stderr, "Failed during gsmtap_init()\n"); exit(1); } - gsmtap_source_add_sink(gsmtap_inst); + gsmtap_source_add_sink(l23_cfg.gsmtap_inst); } if (l23_app_start) { -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/31108 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I2582a1633d37d350a7f4c2bb5e03793bdf46e839 Gerrit-Change-Number: 31108 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in osmocom-bb[master]: layer23: Integreate mobile further into l23_app
by pespin 30 Jan '23

30 Jan '23
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmocom-bb/+/31107 ) Change subject: layer23: Integreate mobile further into l23_app ...................................................................... layer23: Integreate mobile further into l23_app Several functions and data structures in mobile app are refactored to follow more closely the l23_app API and structures. These movements allow starting to use already some shared infrastructure defined under layer23/common. This is not a full migration to l23_app, since mobile still keeps a separate main() with a few extra code. This commit is rather a step towards an eventual merge of mobile's main.cpp into layer23/common/main.c This is a preparation commit to later one adding gsmtap VTY configuration to all l23 apps. Change-Id: I3141b6cb4a0482970f434180ef8dda3af1d4aa0c --- M src/host/layer23/include/osmocom/bb/mobile/app_mobile.h M src/host/layer23/src/mobile/app_mobile.c M src/host/layer23/src/mobile/main.c M src/host/layer23/src/mobile/vty_interface.c 4 files changed, 150 insertions(+), 86 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/07/31107/1 diff --git a/src/host/layer23/include/osmocom/bb/mobile/app_mobile.h b/src/host/layer23/include/osmocom/bb/mobile/app_mobile.h index 7a3669d..940dbce 100644 --- a/src/host/layer23/include/osmocom/bb/mobile/app_mobile.h +++ b/src/host/layer23/include/osmocom/bb/mobile/app_mobile.h @@ -8,9 +8,6 @@ struct osmocom_ms; struct vty; -int l23_app_init(const char *config_file); -int l23_app_exit(void); -int l23_app_work(int *quit); int mobile_delete(struct osmocom_ms *ms, int force); struct osmocom_ms *mobile_new(char *name); int mobile_work(struct osmocom_ms *ms); diff --git a/src/host/layer23/src/mobile/app_mobile.c b/src/host/layer23/src/mobile/app_mobile.c index 285672d..938c7ea 100644 --- a/src/host/layer23/src/mobile/app_mobile.c +++ b/src/host/layer23/src/mobile/app_mobile.c @@ -29,6 +29,7 @@ #include <osmocom/bb/common/gps.h> #include <osmocom/bb/common/sap_interface.h> #include <osmocom/bb/common/sim.h> +#include <osmocom/bb/common/l23_app.h> #include <osmocom/bb/mobile/gsm48_rr.h> #include <osmocom/bb/mobile/gsm480_ss.h> @@ -43,8 +44,7 @@ #include <osmocom/bb/mobile/gapk_io.h> #include <osmocom/bb/mobile/primitives.h> -#include <osmocom/vty/ports.h> -#include <osmocom/vty/logging.h> +#include <osmocom/vty/vty.h> #include <osmocom/vty/telnet_interface.h> #include <osmocom/core/msgb.h> @@ -58,12 +58,12 @@ extern void *l23_ctx; extern struct llist_head ms_list; -extern int vty_reading; int mncc_recv_internal(struct osmocom_ms *ms, int msg_type, void *arg); int mncc_recv_external(struct osmocom_ms *ms, int msg_type, void *arg); int mncc_recv_dummy(struct osmocom_ms *ms, int msg_type, void *arg); -static int quit; +static int _quit; +extern int quit; /* l23 main */ /* handle ms instance */ int mobile_work(struct osmocom_ms *ms) @@ -381,20 +381,20 @@ case S_GLOBAL_SHUTDOWN: /* force to exit, if signalled */ if (signal_data && *((uint8_t *)signal_data)) - quit = 1; + _quit = 1; llist_for_each_entry_safe(ms, ms2, &ms_list, entity) - mobile_delete(ms, quit); + mobile_delete(ms, _quit); /* quit, after all MS processes are gone */ - quit = 1; + _quit = 1; break; } return 0; } /* global work handler */ -int l23_app_work(int *_quit) +int _mobile_app_work(void) { struct osmocom_ms *ms, *ms2; int work = 0; @@ -424,12 +424,12 @@ } /* return, if a shutdown was scheduled (quit = 1) */ - *_quit = quit; + quit = _quit; return work; } /* global exit */ -int l23_app_exit(void) +int _mobile_app_exit(void) { osmo_signal_unregister_handler(SS_L1CTL, &gsm322_l1_signal, NULL); osmo_signal_unregister_handler(SS_L1CTL, &mobile_signal_cb, NULL); @@ -442,53 +442,10 @@ return 0; } -static struct vty_app_info vty_info = { - .name = "OsmocomBB", - .version = PACKAGE_VERSION, -}; -/* global init */ -int l23_app_init(const char *config_file) +int _mobile_app_start(void) { - struct telnet_connection dummy_conn; - int rc = 0; - - osmo_gps_init(); - -#ifdef WITH_GAPK_IO - /* Init GAPK audio I/O */ - gapk_io_init(); -#endif - - vty_info.tall_ctx = l23_ctx; - vty_init(&vty_info); - logging_vty_add_cmds(); - ms_vty_init(); - dummy_conn.priv = NULL; - vty_reading = 1; - if (config_file != NULL) { - rc = vty_read_config_file(config_file, &dummy_conn); - if (rc < 0) { - LOGP(DMOB, LOGL_FATAL, "Failed to parse the configuration " - "file '%s'\n", config_file); - LOGP(DMOB, LOGL_FATAL, "Please make sure the file " - "'%s' exists, or use an example from " - "'doc/examples/mobile/'\n", config_file); - return rc; - } - LOGP(DMOB, LOGL_INFO, "Using configuration from '%s'\n", config_file); - } - vty_reading = 0; - rc = telnet_init_default(l23_ctx, NULL, OSMO_VTY_PORT_BB); - if (rc < 0) { - LOGP(DMOB, LOGL_FATAL, "Cannot init VTY on %s port %u: %s\n", - vty_get_bind_addr(), OSMO_VTY_PORT_BB, strerror(errno)); - return rc; - } - - osmo_signal_register_handler(SS_GLOBAL, &global_signal_cb, NULL); - osmo_signal_register_handler(SS_L1CTL, &mobile_signal_cb, NULL); - osmo_signal_register_handler(SS_L1CTL, &gsm322_l1_signal, NULL); + int rc; if (llist_empty(&ms_list)) { struct osmocom_ms *ms; @@ -503,16 +460,59 @@ return rc; } - quit = 0; + _quit = 0; return 0; } +/* global init */ +int l23_app_init(void) +{ + l23_app_start = _mobile_app_start; + l23_app_work = _mobile_app_work; + l23_app_exit = _mobile_app_exit; + osmo_gps_init(); + +#ifdef WITH_GAPK_IO + /* Init GAPK audio I/O */ + gapk_io_init(); +#endif + + osmo_signal_register_handler(SS_GLOBAL, &global_signal_cb, NULL); + osmo_signal_register_handler(SS_L1CTL, &mobile_signal_cb, NULL); + osmo_signal_register_handler(SS_L1CTL, &gsm322_l1_signal, NULL); + + return 0; +} + +static int _mobile_vty_init(void) +{ + return ms_vty_init(); +} + +static int l23_cfg_supported(void) +{ + return L23_OPT_ARFCN | L23_OPT_TAP | L23_OPT_VTY | L23_OPT_DBG; +} + +static struct vty_app_info _mobile_vty_info = { + .name = "modem", + .version = PACKAGE_VERSION, +}; + +static struct l23_app_info info = { + .copyright = "Copyright (C) 2022 by sysmocom - s.m.f.c. GmbH <info(a)sysmocom.de>\n", + .cfg_supported = &l23_cfg_supported, + .vty_info = &_mobile_vty_info, + .vty_init = _mobile_vty_init, +}; + struct l23_app_info *l23_app_info(void) { - return NULL; /* TODO: implement mobile as a full l23_app. */ + return &info; } + void mobile_set_started(struct osmocom_ms *ms, bool state) { ms->started = state; diff --git a/src/host/layer23/src/mobile/main.c b/src/host/layer23/src/mobile/main.c index 088e6c9..9acb9a9 100644 --- a/src/host/layer23/src/mobile/main.c +++ b/src/host/layer23/src/mobile/main.c @@ -19,6 +19,8 @@ #include <osmocom/bb/common/osmocom_data.h> #include <osmocom/bb/common/logging.h> +#include <osmocom/bb/common/l23_app.h> +#include <osmocom/bb/common/vty.h> #include <osmocom/bb/mobile/app_mobile.h> #include <osmocom/core/talloc.h> @@ -27,6 +29,10 @@ #include <osmocom/core/gsmtap.h> #include <osmocom/core/signal.h> #include <osmocom/core/application.h> +#include <osmocom/vty/vty.h> +#include <osmocom/vty/logging.h> +#include <osmocom/vty/telnet_interface.h> +#include <osmocom/vty/ports.h> #include <arpa/inet.h> @@ -42,13 +48,21 @@ #include <time.h> #include <libgen.h> +#include "config.h" + void *l23_ctx = NULL; struct llist_head ms_list; static char *gsmtap_ip = 0; static const char *custom_cfg_file = NULL; struct gsmtap_inst *gsmtap_inst = NULL; +static char *config_file = NULL; char *config_dir = NULL; int daemonize = 0; +int quit = 0; + +int (*l23_app_start)(void) = NULL; +int (*l23_app_work)(void) = NULL; +int (*l23_app_exit)(void) = NULL; int mobile_delete(struct osmocom_ms *ms, int force); int mobile_signal_cb(unsigned int subsys, unsigned int signal, @@ -198,11 +212,45 @@ } } +static int _vty_init(struct l23_app_info *app) +{ + static struct vty_app_info l23_vty_info = { + .name = "OsmocomBB", + .version = PACKAGE_VERSION, + }; + int rc; + + OSMO_ASSERT(app->vty_info); + app->vty_info->tall_ctx = l23_ctx; + vty_init(app->vty_info ? : &l23_vty_info); + logging_vty_add_cmds(); + if (app->vty_init) + app->vty_init(); + if (config_file) { + LOGP(DLGLOBAL, LOGL_INFO, "Using configuration from '%s'\n", config_file); + l23_vty_reading = true; + rc = vty_read_config_file(config_file, NULL); + l23_vty_reading = false; + if (rc < 0) { + LOGP(DLGLOBAL, LOGL_FATAL, + "Failed to parse the configuration file '%s'\n", config_file); + return rc; + } + } + rc = telnet_init_default(l23_ctx, NULL, OSMO_VTY_PORT_BB); + if (rc < 0) { + LOGP(DMOB, LOGL_FATAL, "Cannot init VTY on %s port %u: %s\n", + vty_get_bind_addr(), OSMO_VTY_PORT_BB, strerror(errno)); + return rc; + } + return rc; +} + int main(int argc, char **argv) { - char *config_file; - int quit = 0; int rc; + struct l23_app_info *app; + unsigned int app_supp_opt = 0x00; printf("%s\n", openbsc_copyright); @@ -217,21 +265,23 @@ /* Init default stderr logging */ osmo_init_logging2(l23_ctx, &log_info); + rc = l23_app_init(); + if (rc < 0) { + fprintf(stderr, "Failed during l23_app_init()\n"); + exit(1); + } + + app = l23_app_info(); + if (app && app->cfg_supported != NULL) + app_supp_opt = app->cfg_supported(); + + rc = handle_options(argc, argv); if (rc) { /* Abort in case of parsing errors */ fprintf(stderr, "Error in command line options. Exiting.\n"); return 1; } - if (gsmtap_ip) { - gsmtap_inst = gsmtap_source_init(gsmtap_ip, GSMTAP_UDP_PORT, 1); - if (!gsmtap_inst) { - fprintf(stderr, "Failed during gsmtap_init()\n"); - exit(1); - } - gsmtap_source_add_sink(gsmtap_inst); - } - if (custom_cfg_file) { /* Use full path provided by user */ config_file = talloc_strdup(l23_ctx, custom_cfg_file); @@ -250,9 +300,27 @@ config_dir = talloc_strdup(l23_ctx, config_file); config_dir = dirname(config_dir); - rc = l23_app_init(config_file); - if (rc) - exit(rc); + if (app_supp_opt & L23_OPT_VTY) { + if (_vty_init(app) < 0) + exit(1); + } + + if (gsmtap_ip) { + gsmtap_inst = gsmtap_source_init(gsmtap_ip, GSMTAP_UDP_PORT, 1); + if (!gsmtap_inst) { + fprintf(stderr, "Failed during gsmtap_init()\n"); + exit(1); + } + gsmtap_source_add_sink(gsmtap_inst); + } + + if (l23_app_start) { + rc = l23_app_start(); + if (rc < 0) { + fprintf(stderr, "Failed during l23_app_start()\n"); + exit(1); + } + } signal(SIGINT, sighandler); signal(SIGTSTP, sighandler); @@ -271,7 +339,7 @@ } while (1) { - l23_app_work(&quit); + l23_app_work(); if (quit && llist_empty(&ms_list)) break; osmo_select_main(0); diff --git a/src/host/layer23/src/mobile/vty_interface.c b/src/host/layer23/src/mobile/vty_interface.c index 3ffdc54..05690ab 100644 --- a/src/host/layer23/src/mobile/vty_interface.c +++ b/src/host/layer23/src/mobile/vty_interface.c @@ -106,12 +106,11 @@ return 0; } -int vty_reading = 0; static int hide_default = 0; static void vty_restart(struct vty *vty, struct osmocom_ms *ms) { - if (vty_reading) + if (l23_vty_reading) return; if (ms->shutdown != MS_SHUTDOWN_NONE) return; @@ -1183,7 +1182,7 @@ } if (!found) { - if (!vty_reading) { + if (!l23_vty_reading) { vty_out(vty, "MS name '%s' does not exits, try " "'ms %s create'%s", argv[0], argv[0], VTY_NEWLINE); @@ -2270,7 +2269,7 @@ struct gsm_support *sup = &ms->support; \ if (!sup->item) { \ vty_out(vty, desc " not supported%s", VTY_NEWLINE); \ - if (vty_reading) \ + if (l23_vty_reading) \ return CMD_SUCCESS; \ return CMD_WARNING; \ } \ @@ -2288,7 +2287,7 @@ struct gsm_support *sup = &ms->support; \ if (!sup->item) { \ vty_out(vty, desc " not supported%s", VTY_NEWLINE); \ - if (vty_reading) \ + if (l23_vty_reading) \ return CMD_SUCCESS; \ return CMD_WARNING; \ } \ @@ -2381,7 +2380,7 @@ set->class_900 = atoi(argv[0]); - if (set->class_900 < sup->class_900 && !vty_reading) + if (set->class_900 < sup->class_900 && !l23_vty_reading) vty_out(vty, "Note: You selected a higher class than supported " " by hardware!%s", VTY_NEWLINE); @@ -2402,7 +2401,7 @@ set->class_850 = atoi(argv[0]); - if (set->class_850 < sup->class_850 && !vty_reading) + if (set->class_850 < sup->class_850 && !l23_vty_reading) vty_out(vty, "Note: You selected a higher class than supported " " by hardware!%s", VTY_NEWLINE); @@ -2423,7 +2422,7 @@ set->class_400 = atoi(argv[0]); - if (set->class_400 < sup->class_400 && !vty_reading) + if (set->class_400 < sup->class_400 && !l23_vty_reading) vty_out(vty, "Note: You selected a higher class than supported " " by hardware!%s", VTY_NEWLINE); @@ -2443,7 +2442,7 @@ set->class_dcs = atoi(argv[0]); if (((set->class_dcs + 1) & 3) < ((sup->class_dcs + 1) & 3) - && !vty_reading) + && !l23_vty_reading) vty_out(vty, "Note: You selected a higher class than supported " " by hardware!%s", VTY_NEWLINE); @@ -2463,7 +2462,7 @@ set->class_pcs = atoi(argv[0]); if (((set->class_pcs + 1) & 3) < ((sup->class_pcs + 1) & 3) - && !vty_reading) + && !l23_vty_reading) vty_out(vty, "Note: You selected a higher class than supported " " by hardware!%s", VTY_NEWLINE); @@ -2489,7 +2488,7 @@ else ch_cap = GSM_CAP_SDCCH; - if (ch_cap > sup->ch_cap && !vty_reading) { + if (ch_cap > sup->ch_cap && !l23_vty_reading) { vty_out(vty, "You selected an higher capability than supported " " by hardware!%s", VTY_NEWLINE); return CMD_WARNING; -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/31107 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I3141b6cb4a0482970f434180ef8dda3af1d4aa0c Gerrit-Change-Number: 31107 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in osmo-bts[master]: vty: Fix typo in symbol name
by pespin 30 Jan '23

30 Jan '23
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/31104 ) Change subject: vty: Fix typo in symbol name ...................................................................... vty: Fix typo in symbol name Change-Id: Ib33ffba348d6e9414eb904bfb7a2bd7ba2f55344 --- M src/common/vty.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jenkins Builder: Verified osmith: Looks good to me, but someone else must approve pespin: Looks good to me, approved diff --git a/src/common/vty.c b/src/common/vty.c index 7e36504..5877a41 100644 --- a/src/common/vty.c +++ b/src/common/vty.c @@ -2270,7 +2270,7 @@ return CMD_SUCCESS; } -DEFUN(cfg_trx_no_gsmtap_sapi, cfg_bts_no_gsmtap_sapi_cmd, +DEFUN(cfg_bts_no_gsmtap_sapi, cfg_bts_no_gsmtap_sapi_cmd, "HIDDEN", "HIDDEN") { struct gsm_bts *bts = vty->index; -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/31104 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Ib33ffba348d6e9414eb904bfb7a2bd7ba2f55344 Gerrit-Change-Number: 31104 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
Change in osmo-bts[master]: vty: Fix typo in symbol name
by pespin 30 Jan '23

30 Jan '23
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/31104 ) Change subject: vty: Fix typo in symbol name ...................................................................... Patch Set 1: (1 comment) Patchset: PS1: Submitting myself with a +1 since it's trivial. -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/31104 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Ib33ffba348d6e9414eb904bfb7a2bd7ba2f55344 Gerrit-Change-Number: 31104 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Mon, 30 Jan 2023 16:23:49 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
1 0
0 0
Change in osmo-bts[master]: vty: Fix typo in symbol name
by pespin 30 Jan '23

30 Jan '23
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/31104 ) Change subject: vty: Fix typo in symbol name ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/31104 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Ib33ffba348d6e9414eb904bfb7a2bd7ba2f55344 Gerrit-Change-Number: 31104 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Mon, 30 Jan 2023 16:23:35 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in libosmocore[master]: Add SI10 support
by osmith 30 Jan '23

30 Jan '23
Attention is currently required from: msuraev. osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/31036 ) Change subject: Add SI10 support ...................................................................... Patch Set 9: (1 comment) File include/osmocom/gsm/protocol/gsm_04_08.h: https://gerrit.osmocom.org/c/libosmocore/+/31036/comment/80ee12ab_027e9682 PS9, Line 1144: #elif OSMO_IS_BIG_ENDIAN > (and CI should complain about it, I'll look into why it doesn't run automatically.) -> https://osmocom.org/issues/5884 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/31036 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I3a5da543f083f31e873c67b5ec1b5a439187d8f3 Gerrit-Change-Number: 31036 Gerrit-PatchSet: 9 Gerrit-Owner: msuraev <msuraev(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-CC: osmith <osmith(a)sysmocom.de> Gerrit-Attention: msuraev <msuraev(a)sysmocom.de> Gerrit-Comment-Date: Mon, 30 Jan 2023 16:04:24 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: osmith <osmith(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
Change in libosmocore[master]: Add SI10 support
by osmith 30 Jan '23

30 Jan '23
Attention is currently required from: msuraev. osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/31036 ) Change subject: Add SI10 support ...................................................................... Patch Set 9: (1 comment) File include/osmocom/gsm/protocol/gsm_04_08.h: https://gerrit.osmocom.org/c/libosmocore/+/31036/comment/c00abee5_e26931df PS9, Line 1144: #elif OSMO_IS_BIG_ENDIAN this part needs to be generated with $ contrib/struct_endianess.py (and CI should complain about it, I'll look into why it doesn't run automatically.) -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/31036 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I3a5da543f083f31e873c67b5ec1b5a439187d8f3 Gerrit-Change-Number: 31036 Gerrit-PatchSet: 9 Gerrit-Owner: msuraev <msuraev(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-CC: osmith <osmith(a)sysmocom.de> Gerrit-Attention: msuraev <msuraev(a)sysmocom.de> Gerrit-Comment-Date: Mon, 30 Jan 2023 15:54:36 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • ...
  • 221
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.