pespin has submitted this change. (
https://gerrit.osmocom.org/c/libosmo-gprs/+/33772 )
Change subject: gmm: Make OSMO_GPRS_GMM_TLLI_UNASSIGNED def publicly available
......................................................................
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
---
M include/osmocom/gprs/gmm/gmm.h
M include/osmocom/gprs/gmm/gmm_private.h
M src/gmm/gmm.c
3 files changed, 18 insertions(+), 6 deletions(-)
Approvals:
Jenkins Builder: Verified
pespin: Looks good to me, approved
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 @@
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 @@
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 @@
/* 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;
--
To view, visit
https://gerrit.osmocom.org/c/libosmo-gprs/+/33772
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-gprs
Gerrit-Branch: master
Gerrit-Change-Id: I881b1370b283ceee98c035ed42b91f7e12611979
Gerrit-Change-Number: 33772
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged