Commit Graph

30 Commits

Author SHA1 Message Date
Andreas Eversberg 845ad38328 Fix VTY command to set IMEISV.
The pointer and size must given for the SV portion of the character
array only.

Fixes: CID#314049, CID#314048
Change-Id: Ieff4ca886dec71aae1b6ecf2b623d600426580da
2023-08-08 04:30:33 +00:00
Pau Espin 8bd2e644b5 layer23: subscriber: Implement LOCIGPRS read/write for testcard backend
Change-Id: Ibcaaf430587a3a270398e9a9eeab6ee98514c3c8
2023-05-22 16:12:09 +02:00
Pau Espin fd461b0218 layer23: Define barr field as bool
Change-Id: I02b95fa5437be1325cfa80fc40350280540fe802
2023-05-22 16:12:09 +02:00
Pau Espin 741ef88d42 layer23: Define (r)plmn_valid field as bool
Change-Id: Ia2316bae5e4f5035f31b4da3937e025537aaf224
2023-05-22 16:12:09 +02:00
Pau Espin 4c8017f011 layer23: Define always_search_hplmn field as bool
Change-Id: I0efc16a2362fbfec64cf6ca85bb32db8beb241a3
2023-05-22 16:12:09 +02:00
Pau Espin c2402244c1 layer23: Define imsi_attached field as bool
Change-Id: I47e234dcef4c5af09023318dda45d40c8c92b312
2023-05-22 16:12:09 +02:00
Pau Espin e1bef2d89c layer23: vty: Rename testsim node functions
Change-Id: If84297f026e6804436a0bf16c5c992161cd71ee4
2023-05-22 16:12:09 +02:00
Pau Espin 3348f49179 Migrate network identifier fields to modern osmocom structures
This allows using well tested standarized API to print, compare, etc. usual
identifiers like PLMN, LAI, etc.
It also simplifies code by avoiding passing lots of parameters and
making it easier to identify which fields go packed together.
This is specially important since in the future more of those
identifiers will be added for GPRS.

Change-Id: I07a9289825c09ed748e53d36a746ea164c8a5d7f
2023-05-22 16:12:04 +02:00
Pau Espin 7b53ad536c layer23: Generalize subscriber SIM insert API
With this patch, during VTY config the SIM type is selected, and the app
calls a generic gsm_subscriber_insert() API which will take of
internally initializing and starting whatever specific-backend setup is
needed.

Change-Id: I5aa34ae297ec0114e1d2355d59fdd77b43b35464
2023-05-19 13:56:58 +02:00
Pau Espin fd1552c225 layer23: subscriber: Move sap specific code inside subscriber.c
Step forward towards a generic subscriber interface.

Change-Id: I780f06203cd6971866d81060a5ecee8bc00782f4
2023-05-19 13:56:58 +02:00
Pau Espin 1ad195e28f layer23: rework store & pass of test_sim param to gsm_subscr_testcard() API
This way the gsm_subscr_testcard() API looks similar to that of other
backends (sim, sap). Furthermore, the callers of the API don't need to
pass tons of params. This is important since in the future there will be
more params (eg. gprs related ones), so it makes no sense to keep
increasing the param list in there.

Change-Id: I07fc5a6ed59e65d6b96c0a2f87b1f496d39ad76d
2023-05-19 13:56:58 +02:00
Pau Espin 4ea84d3ae5 layer23: Move all test_sim settings to its own substruct
This way it becomes clear those fields are related only to test_sim
module, and not some general "test" feature.

Change-Id: I56830c6b905bcbce7e19adbfe5427fd826d15e8c
2023-05-19 08:53:50 +00:00
Vadim Yanitskiy 7a6e1874cb copyright: fix typo: sysmocom s/s.m.f.c./s.f.m.c./ GmbH
Change-Id: I408cde7f2b4642500e5362052365c92856c02bef
2023-05-18 18:51:15 +07:00
Pau Espin 993c4b4be6 layer23: vty: Move imei related commands to common/
Change-Id: I3c71586c0eb437ce63beaae5adf8fac6c27e2896
2023-04-26 14:14:29 +02:00
Pau Espin c58b5f0dbc layer23: vty: Move sim related commands to common/
Change-Id: I9e95732255c248b000f1045c395a15217d10db78
2023-04-26 14:14:29 +02:00
Pau Espin da13bed837 layer23: Move 'show {subscriber,support}' to common/'
Those modules are aready in common/, so they can be added to the shared
VTY interface to introspect MS objects.

Change-Id: Ie4d85bbb1d0af8894683589d8b936f9884f79be9
2023-04-26 14:14:29 +02:00
Pau Espin 7626d0816f layer23: Use GSM_RESERVED_TMSI from libosmocore everywhere
Change-Id: Ib9483b8ae4067994aef523291733ae706ffabe7a
2023-04-26 14:14:29 +02:00
Pau Espin 65cde7dd04 layer23: modem: Fix wrong 'radio not started' vty message
Change-Id: I8871c9d0e820beb75d7820b5a2d8d3c77dac379d
2023-04-25 18:14:33 +02:00
Pau Espin 7019f1bf2b layer23: Move testsim node to common/
Change-Id: Ife34403a715809b43e7a4cd5ce4dec8616fc08af
2023-04-25 18:14:25 +02:00
Pau Espin a78c3927a0 layer23: common/vty: Drop includes pointing to mobile app
Change-Id: I025b09500547a739240fc07fa04cb38378ed71db
2023-04-24 16:56:15 +02:00
Pau Espin a7bf51ac0e layer23: Move vty_notify() to common/
Change-Id: Ic0a98e66adffa9fefeee6e69a4b5c691e0e9c789
2023-04-24 16:54:11 +02:00
Pau Espin 79ea13fccc layer23: Support cpu-sched vty node from libosmocore
Change-Id: I1affb401bf355360fe306568c9b5c005dbd0746c
2023-03-29 13:08:17 +02:00
Vadim Yanitskiy 9feb5057da layer23: refactor the application API concept
With this set of changes we have a cleaner l23 app architecture:

* struct vty_app_info: all l23 applications must define this struct;
* struct vty_app_info: *cfg_supported() becomes a mask of L23_OPT_*;
* struct vty_app_info: explicitly set L23_OPT_* in all l23 apps;
* drop l23_app_info(), there can be only one vty_app_info per an app;

It's no more needed to obtain the vty_app_info by calling a function
and checking the returned value against NULL everywhere.  This kind
of information is rather static (not dynamically composed) and needs
not to be encapsulated into functions.

Change-Id: I89004cd5308927305f79b102f7b695709148df6d
2023-03-13 06:16:48 +07:00
Max 22f12ba92e vty: fix local-host docs
Change-Id: I69d0fa32105a3d114cdcae84ef2cc3ada578f13a
2023-03-08 22:05:07 +03:00
Max 736438693e mobile: allow configuring local GSMTAP address
Change-Id: Ia1555db653cf0bb20af74617f33aad31c971bfdb
2023-03-08 17:47:04 +00:00
Max 0fb9853582 mobile: add vty statsd support
Change-Id: I7905b44478dcb9bcf0a1a68fde95f470c07edca3
2023-02-21 08:49:13 +00:00
Pau Espin f1e99e59e2 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
 remote-host 127.0.0.1
 lchan sacch
 lchan lsacch
 lchan sacch/4
 lchan sacch/8
 lchan sacch/f
 lchan sacch/h
 lchan unknown
 lchan bcch
 lchan ccch
 lchan rach
 lchan agch
 lchan pch
 lchan sdcch
 lchan sdcch/4
 lchan sdcch/8
 lchan facch/f
 lchan facch/h
 lchan pacch
 lchan cbch
 lchan pdch
 lchan pttch
 lchan cbch
 lchan tch/f
 lchan tch/h
 category gprs dl-unknown
 category gprs dl-dummy
 category gprs dl-ctrl
 category gprs dl-data-gprs
 category gprs dl-data-egprs
 category gprs ul-unknown
 category gprs ul-dummy
 category gprs ul-ctrl
 category gprs ul-data-gprs
 category gprs ul-data-egprs

VTY cmd "lchan" enables/disables tapping on general channel types,
while "category" allows fine-grained selection of messages being
tapped within the enabled lchan which would tap those messages.

Change-Id: I2582a1633d37d350a7f4c2bb5e03793bdf46e839
2023-02-02 18:18:21 +01:00
Pau Espin 8f59b1a0b9 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
2023-01-17 18:16:34 +00:00
Pau Espin 3b8d5bb26a layer23: Move '(no) shutdown' VTY code to common/vty.c
Change-Id: Ib5c9b6f3efa255d67980945db9f98dd8a112af0e
2023-01-17 18:16:34 +00:00
Pau Espin adb67e5106 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
2023-01-16 13:34:28 +01:00