gmm: Make OSMO_GPRS_GMM_TLLI_UNASSIGNED def publicly available

This can be used for users receiving the GMMRR_ASSIGN_REQ primitive to
find out if it's a creation, update or deletion of a TLLI.

Change-Id: I881b1370b283ceee98c035ed42b91f7e12611979
This commit is contained in:
Pau Espin 2023-07-17 18:04:03 +02:00
parent 2d121dcdb1
commit 34f4b94a98
3 changed files with 6 additions and 6 deletions

View File

@ -5,6 +5,9 @@
#include <stdint.h>
#include <stddef.h>
/* 3GPP TS 44.064 § 8.3 TLLI assignment procedures */
#define OSMO_GPRS_GMM_TLLI_UNASSIGNED (0xffffffff)
/* Use stack as MS or as network? */
enum osmo_gprs_gmm_location {
OSMO_GPRS_GMM_LOCATION_UNSET,

View File

@ -19,9 +19,6 @@
#include <osmocom/gprs/gmm/gmm_prim.h>
#include <osmocom/gprs/gmm/gmm_ms_fsm.h>
/* 3GPP TS 44.064 § 8.3 TLLI assignment procedures */
#define GPRS_GMM_TLLI_UNASSIGNED (0xffffffff)
#define GPRS_GMM_SESS_ID_UNASSIGNED (0xffffffff)
extern int g_gmm_log_cat[_OSMO_GPRS_GMM_LOGC_MAX];

View File

@ -165,7 +165,7 @@ struct gprs_gmm_entity *gprs_gmm_gmme_alloc(uint32_t ptmsi, const char *imsi)
gmme->ptmsi_sig = GSM_RESERVED_TMSI;
gmme->ptmsi = ptmsi;
gmme->old_ptmsi = GSM_RESERVED_TMSI;
gmme->old_tlli = GPRS_GMM_TLLI_UNASSIGNED;
gmme->old_tlli = OSMO_GPRS_GMM_TLLI_UNASSIGNED;
gmme->auth_ciph.req.ac_ref_nr = 0xff; /* invalid value */
OSMO_STRLCPY_ARRAY(gmme->imsi, imsi);
@ -299,7 +299,7 @@ uint32_t gprs_gmm_alloc_rand_tlli(void)
rc = -ERANGE;
failed:
LOGGMM(LOGL_ERROR, "Failed to allocate a TLLI: %d (%s)\n", rc, strerror(-rc));
return GPRS_GMM_TLLI_UNASSIGNED;
return OSMO_GPRS_GMM_TLLI_UNASSIGNED;
}
/* TS 24.008 4.7.2.1.1 READY timer behaviour (A/Gb mode only) */
@ -1000,7 +1000,7 @@ static int gprs_gmm_rx_detach_accept(struct gprs_gmm_entity *gmme, struct gsm48_
/* Submit LLGMM-ASSIGN-REQ as per TS 24.007 Annex C.3 */
gmme->old_tlli = gmme->tlli;
gmme->tlli = GPRS_GMM_TLLI_UNASSIGNED;
gmme->tlli = OSMO_GPRS_GMM_TLLI_UNASSIGNED;
rc = gprs_gmm_submit_llgmm_assing_req(gmme);
if (rc < 0)
goto rejected;