From 047b4eea8b57b592438fc84c4853d39748c48562 Mon Sep 17 00:00:00 2001 From: Guido Casati Date: Mon, 11 Nov 2024 14:58:30 +0100 Subject: [PATCH] Refactor PDU Session Establish Accept IEI * use NAS macro to define enums and text description --- .../ESM/MSG/PduSessionEstablishmentAccept.h | 26 ++++++++++++------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/openair3/NAS/COMMON/ESM/MSG/PduSessionEstablishmentAccept.h b/openair3/NAS/COMMON/ESM/MSG/PduSessionEstablishmentAccept.h index c283079998..23c55cf170 100644 --- a/openair3/NAS/COMMON/ESM/MSG/PduSessionEstablishmentAccept.h +++ b/openair3/NAS/COMMON/ESM/MSG/PduSessionEstablishmentAccept.h @@ -23,19 +23,25 @@ #define PDU_SESSION_ESTABLISHMENT_ACCEPT_H_ #include +#include "NR_NAS_defs.h" /* PDU Session Establish Accept Optional IE Identifiers - TS 24.501 Table 8.3.2.1.1 */ -#define IEI_5GSM_CAUSE 0x59 /* 5GSM cause 9.11.4.2 */ -#define IEI_PDU_ADDRESS 0x29 /* PDU address 9.11.4.10 */ -#define IEI_RQ_TIMER_VALUE 0x56 /* GPRS timer 9.11.2.3 */ -#define IEI_SNSSAI 0x22 /* S-NSSAI 9.11.2.8 */ -#define IEI_ALWAYSON_PDU 0x80 /* Always-on PDU session indication 9.11.4.3 */ -#define IEI_MAPPED_EPS 0x75 /* Mapped EPS bearer contexts 9.11.4.8 */ -#define IEI_EAP_MSG 0x78 /* EAP message 9.11.2.2 */ -#define IEI_AUTH_QOS_DESC 0x79 /* QoS flow descriptions 9.11.4.12 */ -#define IEI_EXT_CONF_OPT 0x7b /* Extended protocol configuration options 9.11.4.6 */ -#define IEI_DNN 0x25 /* DNN 9.11.2.1B */ +#define FOREACH_IEI(IEI_DEF) \ + IEI_DEF(IEI_5GSM_CAUSE, 0x59) /* 5GSM cause 9.11.4.2 */ \ + IEI_DEF(IEI_PDU_ADDRESS, 0x29) /* PDU address 9.11.4.10 */ \ + IEI_DEF(IEI_RQ_TIMER_VALUE, 0x56) /* GPRS timer 9.11.2.3 */ \ + IEI_DEF(IEI_SNSSAI, 0x22) /* S-NSSAI 9.11.2.8 */ \ + IEI_DEF(IEI_ALWAYSON_PDU, 0x80) /* Always-on PDU session indication 9.11.4.3 */ \ + IEI_DEF(IEI_MAPPED_EPS, 0x75) /* Mapped EPS bearer contexts 9.11.4.8 */ \ + IEI_DEF(IEI_EAP_MSG, 0x78) /* EAP message 9.11.2.2 */ \ + IEI_DEF(IEI_AUTH_QOS_DESC, 0x79) /* QoS flow descriptions 9.11.4.12 */ \ + IEI_DEF(IEI_EXT_CONF_OPT, 0x7b) /* Extended protocol configuration options 9.11.4.6 */ \ + IEI_DEF(IEI_DNN, 0x25) /* DNN 9.11.2.1B */ + +static const text_info_t iei_text_desc[] = {FOREACH_IEI(TO_TEXT)}; + +typedef enum { FOREACH_IEI(TO_ENUM) } pduSessionEstablishment_IEI_t; /* PDU Session type value - TS 24.501 Table 9.11.4.10.1*/