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 osmocom-bb[master]: layer23: Let each app allocate its ms obj and start layer2 when needed
by pespin 13 Jan '23

13 Jan '23
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmocom-bb/+/30979 ) Change subject: layer23: Let each app allocate its ms obj and start layer2 when needed ...................................................................... layer23: Let each app allocate its ms obj and start layer2 when needed This allows apps to allocate the objects as they please: simple apps can statically allocate it at startup. Others may want to allocate them through VTY. Some apps may also want to dynamically start and stop layer2. Change-Id: I32f99df76a5513eff9df5489d28d60aedf96dec3 --- M src/host/layer23/include/osmocom/bb/common/l23_app.h M src/host/layer23/include/osmocom/bb/common/ms.h M src/host/layer23/src/common/main.c M src/host/layer23/src/common/ms.c M src/host/layer23/src/misc/app_bcch_scan.c M src/host/layer23/src/misc/app_cbch_sniff.c M src/host/layer23/src/misc/app_ccch_scan.c M src/host/layer23/src/misc/app_cell_log.c M src/host/layer23/src/misc/app_echo_test.c M src/host/layer23/src/modem/app_modem.c 10 files changed, 107 insertions(+), 47 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/79/30979/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 633c764..3c07f70 100644 --- a/src/host/layer23/include/osmocom/bb/common/l23_app.h +++ b/src/host/layer23/include/osmocom/bb/common/l23_app.h @@ -16,14 +16,14 @@ extern void *l23_ctx; /* initialization, called once when starting the app, before reading VTY config */ -extern int l23_app_init(struct osmocom_ms *ms); +extern int l23_app_init(void); /* Start work after reading VTY config and starting layer23 components, * immediately before entering main select loop */ -extern int (*l23_app_start)(struct osmocom_ms *ms); +extern int (*l23_app_start)(void); -extern int (*l23_app_work)(struct osmocom_ms *ms); -extern int (*l23_app_exit)(struct osmocom_ms *ms); +extern int (*l23_app_work)(void); +extern int (*l23_app_exit)(void); /* configuration options */ struct l23_app_info { diff --git a/src/host/layer23/include/osmocom/bb/common/ms.h b/src/host/layer23/include/osmocom/bb/common/ms.h index 9fd4c7a..f40e181 100644 --- a/src/host/layer23/include/osmocom/bb/common/ms.h +++ b/src/host/layer23/include/osmocom/bb/common/ms.h @@ -99,3 +99,5 @@ }; struct osmocom_ms *osmocom_ms_alloc(void *ctx, const char *name); + +extern uint16_t cfg_test_arfcn; diff --git a/src/host/layer23/src/common/main.c b/src/host/layer23/src/common/main.c index aef7ac1..eecd29f 100644 --- a/src/host/layer23/src/common/main.c +++ b/src/host/layer23/src/common/main.c @@ -54,13 +54,12 @@ static char *sap_socket_path = "/tmp/osmocom_sap"; struct llist_head ms_list; -static struct osmocom_ms *ms = NULL; static char *gsmtap_ip = NULL; static char *config_file = NULL; -int (*l23_app_start)(struct osmocom_ms *ms) = NULL; -int (*l23_app_work)(struct osmocom_ms *ms) = NULL; -int (*l23_app_exit)(struct osmocom_ms *ms) = NULL; +int (*l23_app_start)(void) = NULL; +int (*l23_app_work)(void) = NULL; +int (*l23_app_exit)(void) = NULL; int quit = 0; struct gsmtap_inst *gsmtap_inst; @@ -169,7 +168,7 @@ sap_socket_path = talloc_strdup(l23_ctx, optarg); break; case 'a': - ms->test_arfcn = atoi(optarg); + cfg_test_arfcn = atoi(optarg); break; case 'i': gsmtap_ip = optarg; @@ -200,7 +199,7 @@ fprintf(stderr, "Signal %d received.\n", sigset); if (l23_app_exit) - rc = l23_app_exit(ms); + rc = l23_app_exit(); if (rc != -EBUSY) exit (0); @@ -270,9 +269,7 @@ print_copyright(); - ms = osmocom_ms_alloc(l23_ctx, "1"); - - rc = l23_app_init(ms); + rc = l23_app_init(); if (rc < 0) { fprintf(stderr, "Failed during l23_app_init()\n"); exit(1); @@ -289,12 +286,6 @@ exit(1); } - rc = layer2_open(ms, ms->settings.layer2_socket_path); - if (rc < 0) { - fprintf(stderr, "Failed during layer2_open()\n"); - exit(1); - } - if (gsmtap_ip) { gsmtap_inst = gsmtap_source_init(gsmtap_ip, GSMTAP_UDP_PORT, 1); if (!gsmtap_inst) { @@ -305,7 +296,7 @@ } if (l23_app_start) { - rc = l23_app_start(ms); + rc = l23_app_start(); if (rc < 0) { fprintf(stderr, "Failed during l23_app_start()\n"); exit(1); @@ -319,7 +310,7 @@ while (!quit) { if (l23_app_work) - l23_app_work(ms); + l23_app_work(); osmo_select_main(0); } diff --git a/src/host/layer23/src/common/ms.c b/src/host/layer23/src/common/ms.c index 9851ebe..558505a 100644 --- a/src/host/layer23/src/common/ms.c +++ b/src/host/layer23/src/common/ms.c @@ -21,6 +21,9 @@ extern struct llist_head ms_list; +/* Default value be configured by cmdline arg: */ +uint16_t cfg_test_arfcn = 871; + struct osmocom_ms *osmocom_ms_alloc(void *ctx, const char *name) { struct osmocom_ms *ms; @@ -31,7 +34,7 @@ talloc_set_name(ms, "ms_%s", name); ms->name = talloc_strdup(ms, name); - ms->test_arfcn = 871; + ms->test_arfcn = cfg_test_arfcn; ms->lapdm_channel.lapdm_dcch.l1_ctx = ms; ms->lapdm_channel.lapdm_dcch.l3_ctx = ms; ms->lapdm_channel.lapdm_acch.l1_ctx = ms; diff --git a/src/host/layer23/src/misc/app_bcch_scan.c b/src/host/layer23/src/misc/app_bcch_scan.c index fc9bca8..86d3638 100644 --- a/src/host/layer23/src/misc/app_bcch_scan.c +++ b/src/host/layer23/src/misc/app_bcch_scan.c @@ -21,6 +21,8 @@ #include <osmocom/bb/common/l1ctl.h> #include <osmocom/bb/common/logging.h> #include <osmocom/bb/common/l23_app.h> +#include <osmocom/bb/common/l1l2_interface.h> +#include <osmocom/bb/common/ms.h> #include <osmocom/bb/misc/layer3.h> #include <osmocom/core/msgb.h> @@ -31,6 +33,8 @@ #include <l1ctl_proto.h> #include "bcch_scan.h" +static struct osmocom_ms *g_ms; + static int signal_cb(unsigned int subsys, unsigned int signal, void *handler_data, void *signal_data) { @@ -47,14 +51,23 @@ return 0; } -static int _bcch_scan_start(struct osmocom_ms *ms) +static int _bcch_scan_start() { - l1ctl_tx_reset_req(ms, L1CTL_RES_T_FULL); + int rc; + + rc = layer2_open(g_ms, g_ms->settings.layer2_socket_path); + if (rc < 0) { + fprintf(stderr, "Failed during layer2_open()\n"); + return rc; + } + + l1ctl_tx_reset_req(g_ms, L1CTL_RES_T_FULL); return 0; } -int l23_app_init(struct osmocom_ms *ms) +int l23_app_init(void) { + g_ms = osmocom_ms_alloc(l23_ctx, "1"); /* don't do layer3_init() as we don't want an actual L3 */ fps_init(); l23_app_start = _bcch_scan_start; diff --git a/src/host/layer23/src/misc/app_cbch_sniff.c b/src/host/layer23/src/misc/app_cbch_sniff.c index d04faa9..b58b4de 100644 --- a/src/host/layer23/src/misc/app_cbch_sniff.c +++ b/src/host/layer23/src/misc/app_cbch_sniff.c @@ -25,6 +25,8 @@ #include <osmocom/bb/common/l23_app.h> #include <osmocom/bb/misc/layer3.h> #include <osmocom/bb/common/sysinfo.h> +#include <osmocom/bb/common/l1l2_interface.h> +#include <osmocom/bb/common/ms.h> #include <osmocom/core/msgb.h> #include <osmocom/core/talloc.h> @@ -36,7 +38,7 @@ #include <l1ctl_proto.h> -struct osmocom_ms *g_ms; +static struct osmocom_ms *g_ms; struct gsm48_sysinfo g_sysinfo = {}; static int try_cbch(struct osmocom_ms *ms, struct gsm48_sysinfo *s) @@ -196,22 +198,31 @@ return 0; } -static int _cbch_sniff_start(struct osmocom_ms *ms) +static int _cbch_sniff_start(void) { - l1ctl_tx_reset_req(ms, L1CTL_RES_T_FULL); + int rc; + + rc = layer2_open(g_ms, g_ms->settings.layer2_socket_path); + if (rc < 0) { + fprintf(stderr, "Failed during layer2_open()\n"); + return rc; + } + + l1ctl_tx_reset_req(g_ms, L1CTL_RES_T_FULL); /* FIXME: L1CTL_RES_T_FULL doesn't reset dedicated mode * (if previously set), so we release it here. */ - l1ctl_tx_dm_rel_req(ms); + l1ctl_tx_dm_rel_req(g_ms); return 0; } -int l23_app_init(struct osmocom_ms *ms) +int l23_app_init(void) { /* don't do layer3_init() as we don't want an actual L3 */ l23_app_start = _cbch_sniff_start; - g_ms = ms; - lapdm_channel_set_l3(&ms->lapdm_channel, &rcv_rsl, ms); + g_ms = osmocom_ms_alloc(l23_ctx, "1"); + + lapdm_channel_set_l3(&g_ms->lapdm_channel, &rcv_rsl, g_ms); return osmo_signal_register_handler(SS_L1CTL, &signal_cb, NULL); } diff --git a/src/host/layer23/src/misc/app_ccch_scan.c b/src/host/layer23/src/misc/app_ccch_scan.c index da8223c..5b03362 100644 --- a/src/host/layer23/src/misc/app_ccch_scan.c +++ b/src/host/layer23/src/misc/app_ccch_scan.c @@ -35,10 +35,13 @@ #include <osmocom/bb/common/ms.h> #include <osmocom/bb/common/l1ctl.h> #include <osmocom/bb/common/l23_app.h> +#include <osmocom/bb/common/l1l2_interface.h> +#include <osmocom/bb/common/ms.h> #include <l1ctl_proto.h> static struct { + struct osmocom_ms *ms; int ccch_mode; } app_state; @@ -491,18 +494,28 @@ return 0; } -static int _ccch_scan_start(struct osmocom_ms *ms) +static int _ccch_scan_start(void) { - l1ctl_tx_reset_req(ms, L1CTL_RES_T_FULL); + int rc; + + rc = layer2_open(app_state.ms, app_state.ms->settings.layer2_socket_path); + if (rc < 0) { + fprintf(stderr, "Failed during layer2_open()\n"); + return rc; + } + + l1ctl_tx_reset_req(app_state.ms, L1CTL_RES_T_FULL); return 0; } -int l23_app_init(struct osmocom_ms *ms) +int l23_app_init(void) { l23_app_start = _ccch_scan_start; + app_state.ms = osmocom_ms_alloc(l23_ctx, "1"); + osmo_signal_register_handler(SS_L1CTL, &signal_cb, NULL); - return layer3_init(ms); + return layer3_init(app_state.ms); } static struct l23_app_info info = { diff --git a/src/host/layer23/src/misc/app_cell_log.c b/src/host/layer23/src/misc/app_cell_log.c index 43980e9..6eb5dc3 100644 --- a/src/host/layer23/src/misc/app_cell_log.c +++ b/src/host/layer23/src/misc/app_cell_log.c @@ -26,6 +26,8 @@ #include <osmocom/bb/common/l23_app.h> #include <osmocom/bb/common/logging.h> #include <osmocom/bb/common/gps.h> +#include <osmocom/bb/common/l1l2_interface.h> +#include <osmocom/bb/common/ms.h> #include <osmocom/bb/misc/cell_log.h> #include <osmocom/core/application.h> @@ -39,20 +41,29 @@ char *logname = "/dev/null"; int RACH_MAX = 2; +static struct osmocom_ms *g_ms; -int _scan_start(struct osmocom_ms *ms) +int _scan_start(void) { - l1ctl_tx_reset_req(ms, L1CTL_RES_T_FULL); + int rc; + + rc = layer2_open(g_ms, g_ms->settings.layer2_socket_path); + if (rc < 0) { + fprintf(stderr, "Failed during layer2_open()\n"); + return rc; + } + + l1ctl_tx_reset_req(g_ms, L1CTL_RES_T_FULL); return 0; } -int _scan_work(struct osmocom_ms *ms) +int _scan_work(void) { return 0; } -int _scan_exit(struct osmocom_ms *ms) +int _scan_exit(void) { /* in case there is a lockup during exit */ signal(SIGINT, SIG_DFL); @@ -65,7 +76,7 @@ return 0; } -int l23_app_init(struct osmocom_ms *ms) +int l23_app_init(void) { int rc; @@ -79,7 +90,9 @@ l23_app_work = _scan_work; l23_app_exit = _scan_exit; - rc = scan_init(ms); + g_ms = osmocom_ms_alloc(l23_ctx, "1"); + + rc = scan_init(g_ms); if (rc) return rc; diff --git a/src/host/layer23/src/misc/app_echo_test.c b/src/host/layer23/src/misc/app_echo_test.c index 3cf854a..c8acfc3 100644 --- a/src/host/layer23/src/misc/app_echo_test.c +++ b/src/host/layer23/src/misc/app_echo_test.c @@ -40,8 +40,10 @@ osmo_timer_schedule(&test_data.timer, 1, 0); } -int l23_app_init(struct osmocom_ms *ms) +int l23_app_init(void) { + struct osmocom_ms *ms = osmocom_ms_alloc(l23_ctx, "1"); + test_data.timer.cb = &test_tmr_cb; test_data.timer.data = ms; diff --git a/src/host/layer23/src/modem/app_modem.c b/src/host/layer23/src/modem/app_modem.c index b4791f3..08105ed 100644 --- a/src/host/layer23/src/modem/app_modem.c +++ b/src/host/layer23/src/modem/app_modem.c @@ -40,12 +40,14 @@ #include <osmocom/bb/common/logging.h> #include <osmocom/bb/common/l1ctl.h> #include <osmocom/bb/common/l23_app.h> +#include <osmocom/bb/common/l1l2_interface.h> #include <osmocom/bb/common/sysinfo.h> #include <osmocom/bb/modem/vty.h> #include <l1ctl_proto.h> static struct { + struct osmocom_ms *ms; enum ccch_mode ccch_mode; struct gsm48_sysinfo si; @@ -467,13 +469,21 @@ return 0; } -static int _modem_start(struct osmocom_ms *ms) +static int _modem_start(void) { - l1ctl_tx_reset_req(ms, L1CTL_RES_T_FULL); + int rc; + + rc = layer2_open(app_data.ms, app_data.ms->settings.layer2_socket_path); + if (rc < 0) { + fprintf(stderr, "Failed during layer2_open()\n"); + return rc; + } + + l1ctl_tx_reset_req(app_data.ms, L1CTL_RES_T_FULL); return 0; } -int l23_app_init(struct osmocom_ms *ms) +int l23_app_init(void) { l23_app_start = _modem_start; @@ -481,8 +491,10 @@ log_set_category_filter(osmo_stderr_target, DLCSN1, 1, LOGL_DEBUG); log_set_category_filter(osmo_stderr_target, DRR, 1, LOGL_INFO); + app_data.ms = osmocom_ms_alloc(l23_ctx, "1"); + osmo_signal_register_handler(SS_L1CTL, &signal_cb, NULL); - lapdm_channel_set_l3(&ms->lapdm_channel, &modem_rslms_cb, ms); + lapdm_channel_set_l3(&app_data.ms->lapdm_channel, &modem_rslms_cb, app_data.ms); return 0; } -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/30979 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I32f99df76a5513eff9df5489d28d60aedf96dec3 Gerrit-Change-Number: 30979 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in osmocom-bb[master]: layer23: Move layer2-socket VTY command to common/
by pespin 13 Jan '23

13 Jan '23
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmocom-bb/+/30978 ) Change subject: layer23: Move layer2-socket VTY command to common/ ...................................................................... layer23: Move layer2-socket VTY command to common/ This allows configuring layer2-socket for other apps than mobile, like the "modem" one. Change-Id: If7419f8fc54a54eed68a076968d93dba5ac977b7 --- M src/host/layer23/include/osmocom/bb/common/l1l2_interface.h M src/host/layer23/include/osmocom/bb/common/settings.h M src/host/layer23/include/osmocom/bb/common/vty.h M src/host/layer23/src/common/main.c M src/host/layer23/src/common/ms.c M src/host/layer23/src/common/settings.c M src/host/layer23/src/common/vty.c M src/host/layer23/src/mobile/app_mobile.c M src/host/layer23/src/mobile/vty_interface.c 9 files changed, 50 insertions(+), 25 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/78/30978/1 diff --git a/src/host/layer23/include/osmocom/bb/common/l1l2_interface.h b/src/host/layer23/include/osmocom/bb/common/l1l2_interface.h index 4f46914..9cb993c 100644 --- a/src/host/layer23/include/osmocom/bb/common/l1l2_interface.h +++ b/src/host/layer23/include/osmocom/bb/common/l1l2_interface.h @@ -3,6 +3,8 @@ #include <osmocom/core/msgb.h> +#define L2_DEFAULT_SOCKET_PATH "/tmp/osmocom_l2" + int layer2_open(struct osmocom_ms *ms, const char *socket_path); int layer2_close(struct osmocom_ms *ms); int osmo_send_l1(struct osmocom_ms *ms, struct msgb *msg); diff --git a/src/host/layer23/include/osmocom/bb/common/settings.h b/src/host/layer23/include/osmocom/bb/common/settings.h index c9a3622..8ebf049 100644 --- a/src/host/layer23/include/osmocom/bb/common/settings.h +++ b/src/host/layer23/include/osmocom/bb/common/settings.h @@ -180,5 +180,7 @@ char *gsm_check_imei(const char *imei, const char *sv); int gsm_random_imei(struct gsm_settings *set); +extern char *layer2_socket_path; + #endif /* _settings_h */ diff --git a/src/host/layer23/include/osmocom/bb/common/vty.h b/src/host/layer23/include/osmocom/bb/common/vty.h index 4aeb6cb..89e1463 100644 --- a/src/host/layer23/include/osmocom/bb/common/vty.h +++ b/src/host/layer23/include/osmocom/bb/common/vty.h @@ -21,6 +21,9 @@ void l23_vty_config_write_ms_node(struct vty *vty, struct osmocom_ms *ms, const char *prefix); void l23_vty_config_write_ms_node_contents(struct vty *vty, struct osmocom_ms *ms, const char *prefix); void l23_vty_config_write_ms_node_contents_final(struct vty *vty, struct osmocom_ms *ms, const char *prefix); + +extern bool l23_vty_reading; + extern struct llist_head ms_list; extern struct cmd_element l23_show_ms_cmd; diff --git a/src/host/layer23/src/common/main.c b/src/host/layer23/src/common/main.c index 837879b..aef7ac1 100644 --- a/src/host/layer23/src/common/main.c +++ b/src/host/layer23/src/common/main.c @@ -25,6 +25,7 @@ #include <osmocom/bb/misc/layer3.h> #include <osmocom/bb/common/logging.h> #include <osmocom/bb/common/l23_app.h> +#include <osmocom/bb/common/vty.h> #include <osmocom/core/msgb.h> #include <osmocom/core/talloc.h> @@ -51,7 +52,6 @@ void *l23_ctx = NULL; -static char *layer2_socket_path = "/tmp/osmocom_l2"; static char *sap_socket_path = "/tmp/osmocom_sap"; struct llist_head ms_list; static struct osmocom_ms *ms = NULL; @@ -163,7 +163,7 @@ exit(0); break; case 's': - layer2_socket_path = talloc_strdup(l23_ctx, optarg); + layer2_socket_path = optarg; break; case 'S': sap_socket_path = talloc_strdup(l23_ctx, optarg); @@ -230,7 +230,9 @@ if (app->vty_init) app->vty_init(); if (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); @@ -287,7 +289,7 @@ exit(1); } - rc = layer2_open(ms, layer2_socket_path); + rc = layer2_open(ms, ms->settings.layer2_socket_path); if (rc < 0) { fprintf(stderr, "Failed during layer2_open()\n"); exit(1); diff --git a/src/host/layer23/src/common/ms.c b/src/host/layer23/src/common/ms.c index 74dabc2..9851ebe 100644 --- a/src/host/layer23/src/common/ms.c +++ b/src/host/layer23/src/common/ms.c @@ -45,5 +45,8 @@ /* Register a new MS */ llist_add_tail(&ms->entity, &ms_list); + gsm_support_init(ms); + gsm_settings_init(ms); + return ms; } diff --git a/src/host/layer23/src/common/settings.c b/src/host/layer23/src/common/settings.c index d607aff..fd7177d 100644 --- a/src/host/layer23/src/common/settings.c +++ b/src/host/layer23/src/common/settings.c @@ -27,8 +27,11 @@ #include <osmocom/bb/common/osmocom_data.h> #include <osmocom/bb/common/ms.h> #include <osmocom/bb/common/networks.h> +#include <osmocom/bb/common/l1l2_interface.h> -static char *layer2_socket_path = "/tmp/osmocom_l2"; +/* Used to set default path globally through cmdline */ +char *layer2_socket_path = L2_DEFAULT_SOCKET_PATH; + static char *sap_socket_path = "/tmp/osmocom_sap"; static char *mncc_socket_path = "/tmp/ms_mncc"; static char *alsa_dev_default = "default"; diff --git a/src/host/layer23/src/common/vty.c b/src/host/layer23/src/common/vty.c index c8a46be..9e4a6c4 100644 --- a/src/host/layer23/src/common/vty.c +++ b/src/host/layer23/src/common/vty.c @@ -42,12 +42,24 @@ #include <osmocom/vty/telnet_interface.h> #include <osmocom/vty/misc.h> +bool l23_vty_reading = false; + static struct cmd_node ms_node = { MS_NODE, "%s(ms)# ", 1 }; +static void l23_vty_restart(struct vty *vty, struct osmocom_ms *ms) +{ + if (l23_vty_reading) + return; + if (ms->shutdown != MS_SHUTDOWN_NONE) + return; + vty_out(vty, "You must restart MS '%s' ('shutdown / no shutdown') for " + "change to take effect!%s", ms->name, VTY_NEWLINE); +} + struct osmocom_ms *l23_vty_get_ms(const char *name, struct vty *vty) { struct osmocom_ms *ms; @@ -151,6 +163,19 @@ return CMD_WARNING; } +DEFUN(cfg_ms_layer2, cfg_ms_layer2_cmd, "layer2-socket PATH", + "Define socket path to connect between layer 2 and layer 1\n" + "Unix socket, default '/tmp/osmocom_l2'") +{ + struct osmocom_ms *ms = vty->index; + struct gsm_settings *set = &ms->settings; + + OSMO_STRLCPY_ARRAY(set->layer2_socket_path, argv[0]); + + l23_vty_restart(vty, ms); + return CMD_SUCCESS; +} + DEFUN(cfg_ms_no_shutdown, cfg_ms_no_shutdown_cmd, "no shutdown", NO_STR "Activate and run MS") { @@ -215,9 +240,13 @@ l23_vty_config_write_ms_node_contents_final(vty, ms, prefix_content); } +/* placeholder for shared VTY commands */ void l23_vty_config_write_ms_node_contents(struct vty *vty, struct osmocom_ms *ms, const char *prefix) { - /* placeholder for shared VTY commands */ + struct gsm_settings *set = &ms->settings; + + vty_out(vty, "%slayer2-socket %s%s", prefix, set->layer2_socket_path, + VTY_NEWLINE); } /* placeholder for shared VTY commands. Must be put at the end of the node: */ @@ -247,6 +276,7 @@ { int rc = 0; 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); install_element(MS_NODE, &cfg_ms_shutdown_force_cmd); install_element(MS_NODE, &cfg_ms_no_shutdown_cmd); diff --git a/src/host/layer23/src/mobile/app_mobile.c b/src/host/layer23/src/mobile/app_mobile.c index b438ed0..ad4ac5d 100644 --- a/src/host/layer23/src/mobile/app_mobile.c +++ b/src/host/layer23/src/mobile/app_mobile.c @@ -341,11 +341,7 @@ return NULL; } - gsm_support_init(ms); - gsm_settings_init(ms); - mobile_set_shutdown(ms, MS_SHUTDOWN_COMPL); - return ms; } diff --git a/src/host/layer23/src/mobile/vty_interface.c b/src/host/layer23/src/mobile/vty_interface.c index 706ddec..8938025 100644 --- a/src/host/layer23/src/mobile/vty_interface.c +++ b/src/host/layer23/src/mobile/vty_interface.c @@ -1300,8 +1300,6 @@ l23_vty_config_write_ms_node_contents(vty, ms, " "); - vty_out(vty, " layer2-socket %s%s", set->layer2_socket_path, - VTY_NEWLINE); vty_out(vty, " sap-socket %s%s", set->sap_socket_path, VTY_NEWLINE); vty_out(vty, " mncc-socket %s%s", set->mncc_socket_path, VTY_NEWLINE); switch (set->mncc_handler) { @@ -1574,19 +1572,6 @@ return CMD_SUCCESS; } -DEFUN(cfg_ms_layer2, cfg_ms_layer2_cmd, "layer2-socket PATH", - "Define socket path to connect between layer 2 and layer 1\n" - "Unix socket, default '/tmp/osmocom_l2'") -{ - struct osmocom_ms *ms = vty->index; - struct gsm_settings *set = &ms->settings; - - OSMO_STRLCPY_ARRAY(set->layer2_socket_path, argv[0]); - - vty_restart(vty, ms); - return CMD_SUCCESS; -} - DEFUN(cfg_ms_sap, cfg_ms_sap_cmd, "sap-socket PATH", "Define socket path to connect to SIM reader\n" "Unix socket, default '/tmp/osmocom_sap'") @@ -3051,7 +3036,6 @@ /* MS_NODE is installed by l23_vty_init(). App specific commands below: */ install_element(MS_NODE, &cfg_ms_show_this_cmd); - install_element(MS_NODE, &cfg_ms_layer2_cmd); install_element(MS_NODE, &cfg_ms_sap_cmd); install_element(MS_NODE, &cfg_ms_mncc_sock_cmd); install_element(MS_NODE, &cfg_ms_mncc_handler_cmd); -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/30978 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: If7419f8fc54a54eed68a076968d93dba5ac977b7 Gerrit-Change-Number: 30978 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in osmocom-bb[master]: layer23: Move '(no) shutdown' VTY code to common/vty.c
by pespin 13 Jan '23

13 Jan '23
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmocom-bb/+/30972 to look at the new patch set (#2). Change subject: layer23: Move '(no) shutdown' VTY code to common/vty.c ...................................................................... layer23: Move '(no) shutdown' VTY code to common/vty.c Change-Id: Ib5c9b6f3efa255d67980945db9f98dd8a112af0e --- A doc/examples/modem/modem.cfg M src/host/layer23/include/osmocom/bb/common/osmocom_data.h M src/host/layer23/include/osmocom/bb/common/vty.h M src/host/layer23/src/common/vty.c M src/host/layer23/src/mobile/vty_interface.c M src/host/layer23/src/modem/vty.c 6 files changed, 149 insertions(+), 61 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/72/30972/2 -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/30972 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: Ib5c9b6f3efa255d67980945db9f98dd8a112af0e Gerrit-Change-Number: 30972 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset
1 0
0 0
Change in osmocom-bb[master]: layer23: Move script_lua call outside of settings.c
by pespin 13 Jan '23

13 Jan '23
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmocom-bb/+/30977 ) Change subject: layer23: Move script_lua call outside of settings.c ...................................................................... layer23: Move script_lua call outside of settings.c The only caller of gsm_settings_exit() is in app_mobile so far, which is the only app supporting/using lua scripting so far. Change-Id: I634a4514ead9d064e7509c3fbbb3a2c89c7f3a56 --- M src/host/layer23/src/mobile/app_mobile.c M src/host/layer23/src/mobile/settings.c 2 files changed, 1 insertion(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/77/30977/1 diff --git a/src/host/layer23/src/mobile/app_mobile.c b/src/host/layer23/src/mobile/app_mobile.c index b2133f7..b438ed0 100644 --- a/src/host/layer23/src/mobile/app_mobile.c +++ b/src/host/layer23/src/mobile/app_mobile.c @@ -417,6 +417,7 @@ if (ms->deleting) { gsm_settings_exit(ms); + script_lua_close(ms); llist_del(&ms->entity); talloc_free(ms); work = 1; diff --git a/src/host/layer23/src/mobile/settings.c b/src/host/layer23/src/mobile/settings.c index b6e251b..3d4d712 100644 --- a/src/host/layer23/src/mobile/settings.c +++ b/src/host/layer23/src/mobile/settings.c @@ -160,9 +160,6 @@ llist_del(&abbrev->list); talloc_free(abbrev); } - - script_lua_close(ms); - return 0; } -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/30977 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I634a4514ead9d064e7509c3fbbb3a2c89c7f3a56 Gerrit-Change-Number: 30977 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in osmocom-bb[master]: layer23: Move settings.{c,h} under common/
by pespin 13 Jan '23

13 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/+/30975 to look at the new patch set (#3). Change subject: layer23: Move settings.{c,h} under common/ ...................................................................... layer23: Move settings.{c,h} under common/ Some of those can be reused by other apps (like modem). Change-Id: I0a741b2384195d512fdc49eda6762241f385b1f1 --- M src/host/layer23/include/osmocom/bb/common/Makefile.am M src/host/layer23/include/osmocom/bb/common/ms.h R src/host/layer23/include/osmocom/bb/common/settings.h M src/host/layer23/include/osmocom/bb/mobile/Makefile.am M src/host/layer23/src/common/Makefile.am R src/host/layer23/src/common/settings.c M src/host/layer23/src/mobile/Makefile.am M src/host/layer23/src/mobile/gsm322.c M src/host/layer23/src/mobile/gsm48_rr.c M src/host/layer23/src/mobile/mnccms.c 10 files changed, 8 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/75/30975/3 -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/30975 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I0a741b2384195d512fdc49eda6762241f385b1f1 Gerrit-Change-Number: 30975 Gerrit-PatchSet: 3 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: Move settings.{c,h} under common/
by pespin 13 Jan '23

13 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/+/30975 to look at the new patch set (#2). Change subject: layer23: Move settings.{c,h} under common/ ...................................................................... layer23: Move settings.{c,h} under common/ Some of those can be reused by other apps (like modem). Change-Id: I0a741b2384195d512fdc49eda6762241f385b1f1 --- M src/host/layer23/include/osmocom/bb/common/Makefile.am M src/host/layer23/include/osmocom/bb/common/ms.h R src/host/layer23/include/osmocom/bb/common/settings.h M src/host/layer23/include/osmocom/bb/mobile/Makefile.am M src/host/layer23/src/common/Makefile.am R src/host/layer23/src/common/settings.c M src/host/layer23/src/mobile/Makefile.am M src/host/layer23/src/mobile/gsm322.c M src/host/layer23/src/mobile/gsm48_rr.c M src/host/layer23/src/mobile/mnccms.c 10 files changed, 8 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/75/30975/2 -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/30975 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I0a741b2384195d512fdc49eda6762241f385b1f1 Gerrit-Change-Number: 30975 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]: mobile: settings.h: Add missing type forward declaration
by pespin 13 Jan '23

13 Jan '23
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmocom-bb/+/30976 ) Change subject: mobile: settings.h: Add missing type forward declaration ...................................................................... mobile: settings.h: Add missing type forward declaration Change-Id: Ibdfa905e2bd24f03d23ce114e969647b07a2009f --- M src/host/layer23/include/osmocom/bb/mobile/settings.h 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/76/30976/1 diff --git a/src/host/layer23/include/osmocom/bb/mobile/settings.h b/src/host/layer23/include/osmocom/bb/mobile/settings.h index 7b64e40..c9a3622 100644 --- a/src/host/layer23/include/osmocom/bb/mobile/settings.h +++ b/src/host/layer23/include/osmocom/bb/mobile/settings.h @@ -4,6 +4,8 @@ #include <osmocom/core/utils.h> #include <osmocom/core/linuxlist.h> +struct osmocom_ms; + #define MOB_C7_DEFLT_ANY_TIMEOUT 30 /* CC (Call Control) message handling entity */ -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/30976 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: Ibdfa905e2bd24f03d23ce114e969647b07a2009f Gerrit-Change-Number: 30976 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in osmocom-bb[master]: layer23: Move support.{c,h} under common/
by pespin 13 Jan '23

13 Jan '23
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmocom-bb/+/30973 ) Change subject: layer23: Move support.{c,h} under common/ ...................................................................... layer23: Move support.{c,h} under common/ Some of those can be reused by other apps (like modem). Change-Id: I3c5af4db8e603aa004d0b6410b09b5143173b874 --- M src/host/layer23/include/osmocom/bb/common/Makefile.am M src/host/layer23/include/osmocom/bb/common/ms.h R src/host/layer23/include/osmocom/bb/common/support.h M src/host/layer23/include/osmocom/bb/mobile/Makefile.am M src/host/layer23/src/common/Makefile.am R src/host/layer23/src/common/support.c M src/host/layer23/src/mobile/Makefile.am 7 files changed, 5 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/73/30973/1 diff --git a/src/host/layer23/include/osmocom/bb/common/Makefile.am b/src/host/layer23/include/osmocom/bb/common/Makefile.am index c756b8e..54799be 100644 --- a/src/host/layer23/include/osmocom/bb/common/Makefile.am +++ b/src/host/layer23/include/osmocom/bb/common/Makefile.am @@ -13,5 +13,6 @@ sap_fsm.h \ sap_interface.h \ sim.h \ + support.h \ vty.h \ $(NULL) diff --git a/src/host/layer23/include/osmocom/bb/common/ms.h b/src/host/layer23/include/osmocom/bb/common/ms.h index bbb5491..3a16293 100644 --- a/src/host/layer23/include/osmocom/bb/common/ms.h +++ b/src/host/layer23/include/osmocom/bb/common/ms.h @@ -6,10 +6,10 @@ #include <osmocom/core/write_queue.h> /* FIXME no 'mobile' specific stuff should be here */ -#include <osmocom/bb/mobile/support.h> #include <osmocom/bb/mobile/settings.h> #include <osmocom/bb/mobile/subscriber.h> #include <osmocom/gsm/lapdm.h> +#include <osmocom/bb/common/support.h> #include <osmocom/bb/common/sap_interface.h> #include <osmocom/bb/common/sap_proto.h> #include <osmocom/bb/mobile/gsm48_rr.h> diff --git a/src/host/layer23/include/osmocom/bb/mobile/support.h b/src/host/layer23/include/osmocom/bb/common/support.h similarity index 99% rename from src/host/layer23/include/osmocom/bb/mobile/support.h rename to src/host/layer23/include/osmocom/bb/common/support.h index c56c78e..2fae57e 100644 --- a/src/host/layer23/include/osmocom/bb/mobile/support.h +++ b/src/host/layer23/include/osmocom/bb/common/support.h @@ -110,7 +110,7 @@ uint16_t start; uint16_t end; uint16_t max; - uint16_t temp; + uint16_t temp; }; extern struct gsm_support_scan_max gsm_sup_smax[]; diff --git a/src/host/layer23/include/osmocom/bb/mobile/Makefile.am b/src/host/layer23/include/osmocom/bb/mobile/Makefile.am index 978a701..e18b2bd 100644 --- a/src/host/layer23/include/osmocom/bb/mobile/Makefile.am +++ b/src/host/layer23/include/osmocom/bb/mobile/Makefile.am @@ -1,4 +1,4 @@ noinst_HEADERS = gsm322.h gsm480_ss.h gsm411_sms.h gsm48_cc.h gsm48_mm.h \ - gsm48_rr.h mncc.h settings.h subscriber.h support.h \ + gsm48_rr.h mncc.h settings.h subscriber.h \ transaction.h vty.h mncc_sock.h mncc_ms.h primitives.h \ app_mobile.h voice.h gapk_io.h diff --git a/src/host/layer23/src/common/Makefile.am b/src/host/layer23/src/common/Makefile.am index 7d27eb1..36342df 100644 --- a/src/host/layer23/src/common/Makefile.am +++ b/src/host/layer23/src/common/Makefile.am @@ -24,6 +24,7 @@ sap_proto.c \ sap_interface.c \ sim.c \ + support.c \ sysinfo.c \ utils.c \ vty.c \ diff --git a/src/host/layer23/src/mobile/support.c b/src/host/layer23/src/common/support.c similarity index 100% rename from src/host/layer23/src/mobile/support.c rename to src/host/layer23/src/common/support.c diff --git a/src/host/layer23/src/mobile/Makefile.am b/src/host/layer23/src/mobile/Makefile.am index a83e082..9ee0b72 100644 --- a/src/host/layer23/src/mobile/Makefile.am +++ b/src/host/layer23/src/mobile/Makefile.am @@ -29,7 +29,6 @@ primitives.c \ settings.c \ subscriber.c \ - support.c \ transaction.c \ vty_interface.c \ voice.c \ -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/30973 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I3c5af4db8e603aa004d0b6410b09b5143173b874 Gerrit-Change-Number: 30973 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in osmocom-bb[master]: layer23: Initial VTY framework to share VTY code between apps
by pespin 13 Jan '23

13 Jan '23
Attention is currently required from: pespin. Hello Jenkins Builder, fixeria, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmocom-bb/+/30961 to look at the new patch set (#7). Change subject: layer23: Initial VTY framework to share VTY code between apps ...................................................................... layer23: Initial VTY framework to share VTY code between apps A small layer23 framework is added which allows apps to easily share/reuse VTY commands while giving some flexiblity to add new per-app specific configs/cmds, since not all commands may be relevant for all apps. Some of the mobile app code is moved to common, and sample infra is added to modem app. Future commits will most probably keep moving more stuff mobile->common and then reusing those in modem app, as found needed. Change-Id: Iabfb3129199488d790b89884bc1e424f2aca696f --- M src/host/layer23/include/osmocom/bb/common/Makefile.am A src/host/layer23/include/osmocom/bb/common/vty.h M src/host/layer23/include/osmocom/bb/mobile/vty.h M src/host/layer23/include/osmocom/bb/modem/Makefile.am A src/host/layer23/include/osmocom/bb/modem/vty.h M src/host/layer23/src/common/Makefile.am A src/host/layer23/src/common/vty.c M src/host/layer23/src/mobile/vty_interface.c M src/host/layer23/src/modem/Makefile.am M src/host/layer23/src/modem/app_modem.c A src/host/layer23/src/modem/vty.c 11 files changed, 340 insertions(+), 75 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/61/30961/7 -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/30961 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: Iabfb3129199488d790b89884bc1e424f2aca696f Gerrit-Change-Number: 30961 Gerrit-PatchSet: 7 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newpatchset
1 0
0 0
Change in osmocom-bb[master]: layer23: Move subscriber.{c,h} under common/
by pespin 13 Jan '23

13 Jan '23
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmocom-bb/+/30974 ) Change subject: layer23: Move subscriber.{c,h} under common/ ...................................................................... layer23: Move subscriber.{c,h} under common/ Some of those can be reused by other apps (like modem). Change-Id: I3727e40bcc9a4ee93aaf2c4ced070cc789653e80 --- M src/host/layer23/include/osmocom/bb/common/Makefile.am M src/host/layer23/include/osmocom/bb/common/ms.h R src/host/layer23/include/osmocom/bb/common/subscriber.h M src/host/layer23/include/osmocom/bb/mobile/Makefile.am M src/host/layer23/src/common/Makefile.am R src/host/layer23/src/common/subscriber.c M src/host/layer23/src/mobile/Makefile.am M src/host/layer23/src/mobile/gsm48_mm.c 8 files changed, 6 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/74/30974/1 diff --git a/src/host/layer23/include/osmocom/bb/common/Makefile.am b/src/host/layer23/include/osmocom/bb/common/Makefile.am index 54799be..f09353b 100644 --- a/src/host/layer23/include/osmocom/bb/common/Makefile.am +++ b/src/host/layer23/include/osmocom/bb/common/Makefile.am @@ -13,6 +13,7 @@ sap_fsm.h \ sap_interface.h \ sim.h \ + subscriber.h \ support.h \ vty.h \ $(NULL) diff --git a/src/host/layer23/include/osmocom/bb/common/ms.h b/src/host/layer23/include/osmocom/bb/common/ms.h index 3a16293..db6b276 100644 --- a/src/host/layer23/include/osmocom/bb/common/ms.h +++ b/src/host/layer23/include/osmocom/bb/common/ms.h @@ -7,8 +7,8 @@ /* FIXME no 'mobile' specific stuff should be here */ #include <osmocom/bb/mobile/settings.h> -#include <osmocom/bb/mobile/subscriber.h> #include <osmocom/gsm/lapdm.h> +#include <osmocom/bb/common/subscriber.h> #include <osmocom/bb/common/support.h> #include <osmocom/bb/common/sap_interface.h> #include <osmocom/bb/common/sap_proto.h> diff --git a/src/host/layer23/include/osmocom/bb/mobile/subscriber.h b/src/host/layer23/include/osmocom/bb/common/subscriber.h similarity index 100% rename from src/host/layer23/include/osmocom/bb/mobile/subscriber.h rename to src/host/layer23/include/osmocom/bb/common/subscriber.h diff --git a/src/host/layer23/include/osmocom/bb/mobile/Makefile.am b/src/host/layer23/include/osmocom/bb/mobile/Makefile.am index e18b2bd..6d9950b 100644 --- a/src/host/layer23/include/osmocom/bb/mobile/Makefile.am +++ b/src/host/layer23/include/osmocom/bb/mobile/Makefile.am @@ -1,4 +1,4 @@ noinst_HEADERS = gsm322.h gsm480_ss.h gsm411_sms.h gsm48_cc.h gsm48_mm.h \ - gsm48_rr.h mncc.h settings.h subscriber.h \ + gsm48_rr.h mncc.h settings.h \ transaction.h vty.h mncc_sock.h mncc_ms.h primitives.h \ app_mobile.h voice.h gapk_io.h diff --git a/src/host/layer23/src/common/Makefile.am b/src/host/layer23/src/common/Makefile.am index 36342df..4dfa1f3 100644 --- a/src/host/layer23/src/common/Makefile.am +++ b/src/host/layer23/src/common/Makefile.am @@ -24,6 +24,7 @@ sap_proto.c \ sap_interface.c \ sim.c \ + subscriber.c \ support.c \ sysinfo.c \ utils.c \ diff --git a/src/host/layer23/src/mobile/subscriber.c b/src/host/layer23/src/common/subscriber.c similarity index 99% rename from src/host/layer23/src/mobile/subscriber.c rename to src/host/layer23/src/common/subscriber.c index 164622a..89cacb7 100644 --- a/src/host/layer23/src/mobile/subscriber.c +++ b/src/host/layer23/src/common/subscriber.c @@ -28,8 +28,8 @@ #include <osmocom/bb/common/sap_interface.h> #include <osmocom/bb/common/sap_proto.h> #include <osmocom/bb/common/networks.h> +#include <osmocom/bb/common/subscriber.h> #include <osmocom/bb/mobile/vty.h> -#include <osmocom/bb/mobile/subscriber.h> /* enable to get an empty list of forbidden PLMNs, even if stored on SIM. * if list is changed, the result is not written back to SIM */ diff --git a/src/host/layer23/src/mobile/Makefile.am b/src/host/layer23/src/mobile/Makefile.am index 9ee0b72..dedee5f 100644 --- a/src/host/layer23/src/mobile/Makefile.am +++ b/src/host/layer23/src/mobile/Makefile.am @@ -28,7 +28,6 @@ mncc_sock.c \ primitives.c \ settings.c \ - subscriber.c \ transaction.c \ vty_interface.c \ voice.c \ diff --git a/src/host/layer23/src/mobile/gsm48_mm.c b/src/host/layer23/src/mobile/gsm48_mm.c index 500eff6..60be569 100644 --- a/src/host/layer23/src/mobile/gsm48_mm.c +++ b/src/host/layer23/src/mobile/gsm48_mm.c @@ -34,6 +34,7 @@ #include <osmocom/bb/common/networks.h> #include <osmocom/bb/common/l1ctl.h> #include <osmocom/bb/common/utils.h> +#include <osmocom/bb/common/subscriber.h> #include <osmocom/bb/mobile/gsm48_cc.h> #include <osmocom/bb/mobile/gsm480_ss.h> #include <osmocom/bb/mobile/gsm411_sms.h> @@ -42,7 +43,6 @@ #include <osmocom/bb/mobile/vty.h> #include <osmocom/bb/mobile/gsm48_rr.h> #include <osmocom/bb/mobile/gsm322.h> -#include <osmocom/bb/mobile/subscriber.h> extern void *l23_ctx; -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/30974 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I3727e40bcc9a4ee93aaf2c4ced070cc789653e80 Gerrit-Change-Number: 30974 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 123
  • 124
  • 125
  • 126
  • 127
  • 128
  • 129
  • ...
  • 221
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.