Commit Graph

12 Commits

Author SHA1 Message Date
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 1f525ea71f layer23: subscriber: Split gsm_subscr_sim_pin() internally per-backend
Change-Id: I10968c5a43632e0e3054c2d6934cae0052c2daae
2023-05-19 13:56:58 +02:00
Pau Espin 48382f3797 layer23: subscriber: Split gsm_subscr_generate_kc() internally per-backend
Change-Id: I88365d23773a4bdc50a51807c775b3caff0bd425
2023-05-19 13:56:58 +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 f05ac96fd6 layer23: Migrate sim_ustate to enum + value_string
Change-Id: I83607caa0b76b6b30db59c53438a55726483b85d
2023-05-19 08:53:50 +00:00
Pau Espin 9f2561a592 layer23: modem: Store P-TMSI independently in subscriber
Change-Id: I6f6d230d8c3c4fce27ba87cf9f953dc9db83cb72
2023-04-26 14:14:29 +02:00
Pau Espin 7d45f4d4ee layer23: Use OSMO_IMSI_BUF_SIZE from libosmocore
Note: GSM_IMSI_LENGTH was 16 octets, and OSMO_IMSI_BUF_SIZE is 17
octets. Probably a bug in old osmocom-bb code since that code predates
the one in libosmocore.

Change-Id: I295444bb3b75ed236ea4af5563d9a9c9e590cab7
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 234c1f14fd layer23: Use libosmocore API to validate IMSI string
Change-Id: I2d4737dabcfb83a7b675c35ad973029a36658d5b
2023-04-24 17:06:10 +02:00
Pau Espin f15eeadb21 layer23: Move subscriber.{c,h} under common/
Some of those can be reused by other apps (like modem).

Change-Id: I3727e40bcc9a4ee93aaf2c4ced070cc789653e80
2023-01-16 13:34:31 +01:00