Commit Graph

18 Commits

Author SHA1 Message Date
Pau Espin 824d00f9e7 sm: Provide RAI obtained from network
MS needs to store this information, hence the app needs to be provided
with it.

Change-Id: Icd357d8c7f4848441da011d59a4e520785d64779
2023-05-22 08:42:47 +00:00
Pau Espin c57f5d70c4 sm: Allow passing old RAI during attach
This is stored by the MS and hence shall be passed by the application.

Change-Id: I13118bed3f7035ff9b4c2c21ed9557f48f5596e6
2023-05-22 08:42:47 +00:00
Vadim Yanitskiy a57e7293df copyright: fix typo: sysmocom s/s.m.f.c./s.f.m.c./ GmbH
Change-Id: I1235050daa0a7e6bb82a7bdcefeac4360dcaa188
2023-05-18 17:22:26 +07:00
Pau Espin 1ccc5e384b sm: Fix APN IE content not transmitted in Act PDP Ctx Req
Change-Id: I70be2ff5e7e0fea5e93d7b9963064c38a0382f30
2023-05-05 19:27:14 +02:00
Pau Espin 4c2f0ced47 sm: Use & forward to upper layers the PTMSI & TLLI received from GMM
App and SM itself may need access to PTMSI or TLLI.

PTMSI:
- App may want to store it somewhere in order to reuse it next time
  it wants to GMM Attach.
TLLI:
- App will need the TLLI to identify the MS when sending/receiving
  primitives over SN SAP (app<->SNDCP).
- SM layer will need the TLLI to communicate over SNSM SAP (SM<->SNDCP),
  as well as relay the information to the app if the GMM Attach happens
  implicitly over SMREG-Act_Pdp_Ctx.req -> GMMSM-Establish-Req.

Change-Id: I7b1b8ac414474652b438f15b7f07961032a0f56d
2023-05-05 14:44:58 +02:00
Pau Espin 5913437a0c sm: Fix pdp_act_cnf.accepted flag value swapped
Change-Id: Ieb7b4ce7121b82c40dbd16a50981390b47d94c82
2023-05-03 14:44:15 +02:00
Pau Espin d06e29bc9d sm: Avoid freeing the SME object too quickly
At that point in time we may still need it, for instance to send the
primitive to the upper layers. Still, we want it to be t the correct
state when that happens. Hence, delay freeing the object to happen in
next loop iteration, so that it is still available to submit the
primitive, and even skip freeing the object if the SM SAP user decides
to re-activate the PDP context in a synchronous code path from the
primitive callback.

Change-Id: I28655fc6286c92403e3e461cb6433b8567e20fd1
2023-05-03 12:26:43 +02:00
Pau Espin e23c097a5c sm: Implement rx Act PDP Ctx Rej
Change-Id: Ib534ebc2a3a0674675621da2f8bd0de218a08ef0
2023-05-03 12:26:43 +02:00
Pau Espin ab92a12c0a sm: Fix encoding of dynamic IP address in PDPActCtxReq
Change-Id: I2d830604d9d9a3f6939926ab67967d5527fdf5c3
2023-05-03 12:26:40 +02:00
Pau Espin 101c3d5da0 sm: Fill gmmsm.establish_req.attach_with_imsi
Change-Id: Ie4fbadc1c3a32375ccae84a4d54366d59ab7fe2f
2023-04-26 11:30:11 +00:00
Pau Espin 0eb8152aa1 sm: Fix potential null access due to missing check
Change-Id: I15532898f00c62cb2a63973decb401e929517cb3
2023-04-25 17:17:10 +02:00
Pau Espin d4858baf35 sm: Destroy PDP Context if activation fails
There's no use in keeping them in inactive state.
This allows upper layers recreating them upon next SMREG-PDP_ACT.req.

Change-Id: Ic9f9ae3becb0c26a55a3b08959a00a7df0bdb5b2
2023-04-25 17:15:24 +02:00
Pau Espin 0b603f41cf sm: Handle PCO in rx PDP Ctx Accept
Related: OS#5501
Change-Id: I15ff08cbefb463c8785a138406921563941e7e7d
2023-04-14 18:46:16 +02:00
Pau Espin ae5856f4e3 sm: Handle radio_prio,qos,llc_sapi in rx PDP Ctx Accept
Related: OS#5501
Change-Id: Icbd9ba82b6d8cbcfcaf5a80ddc801139c409c585
2023-04-14 18:39:29 +02:00
Pau Espin f644ae9d11 sm: Parse PDP address in rx PDP Ctx Accept
Related: OS#5501
Change-Id: Ic41edc14445f0f5d4ef20bb30b53d66fb56435de
2023-04-14 18:39:29 +02:00
Pau Espin dd17a692f9 sm: Start using SNSM SAP
Related: OS#5501
Change-Id: Ic5525bfa92e2591757d999610c0d59849d022d8d
2023-04-14 18:39:29 +02:00
Pau Espin 67a57b5272 Rename internal g_ctx -> g_{layer_name}_ctx
Otherwise if a test includes {layer_name}_private.h from several
libraries to use private APIs it will fail due to colliding g_ctx
pointers of different types.

Change-Id: Ib8a844551452b79bdb3a81968ffc1fd42ee1c5d9
2023-04-13 18:20:53 +02:00
Pau Espin 5e205c8375 Introduce libosmo-gprs-sm
This patch itnroduces all the boilerplate required to build and package
a new libosmo-gprs-sm.so library, which aims to contain the SM layer
implementation.
A minimal implementation is provided together with a unit test,
showcasing Activation of a PDP Context and requesting implicit GPRS
attach to GMM if it is not yet attached.
This commit also adds/improves code in GMM layer implementing the GMMSM
SAP which is used to interact SM<->GMM.

Related: OS#5501
Change-Id: I9b4a9a6364f7799540475e7e1d10ab2310768281
2023-03-30 13:49:29 +02:00