From ab3bb363578f9bffcdc3224347cf39d5b689dadc Mon Sep 17 00:00:00 2001 From: Guido Casati Date: Tue, 18 Feb 2025 11:15:00 +0100 Subject: [PATCH] Add eq_gprs_timer to common 5gmm_lib --- openair3/NAS/NR_UE/5GS/5GMM/MSG/fgmm_lib.c | 8 ++++++++ openair3/NAS/NR_UE/5GS/5GMM/MSG/fgmm_lib.h | 1 + 2 files changed, 9 insertions(+) diff --git a/openair3/NAS/NR_UE/5GS/5GMM/MSG/fgmm_lib.c b/openair3/NAS/NR_UE/5GS/5GMM/MSG/fgmm_lib.c index e21bc141c4..323cffe7e7 100644 --- a/openair3/NAS/NR_UE/5GS/5GMM/MSG/fgmm_lib.c +++ b/openair3/NAS/NR_UE/5GS/5GMM/MSG/fgmm_lib.c @@ -143,6 +143,14 @@ int decode_gprs_timer_ie(gprs_timer_t *timer, const byte_array_t *buffer) return decoded; } +/** @brief Equality check for GPRS Timer */ +bool eq_gprs_timer(const gprs_timer_t *a, const gprs_timer_t *b) +{ + _NAS_EQ_CHECK_INT(a->value, b->value); + _NAS_EQ_CHECK_INT(a->unit, b->unit); + return true; +} + /* Decode EAP Message (todo) */ int decode_eap_msg_ie(const byte_array_t *buffer) { diff --git a/openair3/NAS/NR_UE/5GS/5GMM/MSG/fgmm_lib.h b/openair3/NAS/NR_UE/5GS/5GMM/MSG/fgmm_lib.h index b09f19b828..4acf7368b5 100644 --- a/openair3/NAS/NR_UE/5GS/5GMM/MSG/fgmm_lib.h +++ b/openair3/NAS/NR_UE/5GS/5GMM/MSG/fgmm_lib.h @@ -161,6 +161,7 @@ int encode_pdu_session_ie(byte_array_t *buffer, nas_service_IEI_t iei, const uin int decode_pdu_session_ie(uint8_t *psi, const byte_array_t *buffer); int encode_gprs_timer_ie(byte_array_t *buffer, nas_service_IEI_t iei, const gprs_timer_t *timer); int decode_gprs_timer_ie(gprs_timer_t *timer, const byte_array_t *buffer); +bool eq_gprs_timer(const gprs_timer_t *a, const gprs_timer_t *b); int decode_eap_msg_ie(const byte_array_t *buffer); #endif /* FGS_LIB_H */ \ No newline at end of file