aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2023-07-17 18:04:03 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2023-07-18 11:31:20 +0200
commit34f4b94a98000c525e4e8ba63fd1404583cefd78 (patch)
treecfbb12fad23c83542ec2c0cefc56b79e5e148852
parent2d121dcdb1dc18b49ed2220ddd492a4cce19a600 (diff)
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
-rw-r--r--include/osmocom/gprs/gmm/gmm.h3
-rw-r--r--include/osmocom/gprs/gmm/gmm_private.h3
-rw-r--r--src/gmm/gmm.c6
3 files changed, 6 insertions, 6 deletions
diff --git a/include/osmocom/gprs/gmm/gmm.h b/include/osmocom/gprs/gmm/gmm.h
index 49954e8..1fcd95b 100644
--- a/include/osmocom/gprs/gmm/gmm.h
+++ b/include/osmocom/gprs/gmm/gmm.h
@@ -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,
diff --git a/include/osmocom/gprs/gmm/gmm_private.h b/include/osmocom/gprs/gmm/gmm_private.h
index 5a29600..66ea8d7 100644
--- a/include/osmocom/gprs/gmm/gmm_private.h
+++ b/include/osmocom/gprs/gmm/gmm_private.h
@@ -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];
diff --git a/src/gmm/gmm.c b/src/gmm/gmm.c
index 9f7a9fd..8a293a3 100644
--- a/src/gmm/gmm.c
+++ b/src/gmm/gmm.c
@@ -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;