diff --git a/cmake_targets/tools/build_helper b/cmake_targets/tools/build_helper
index 95f237ab330b9f04c16141d29bbd896171049bbd..d35f90fcce20a1f9c66e3470c013d1f0b65bcac8 100755
--- a/cmake_targets/tools/build_helper
+++ b/cmake_targets/tools/build_helper
@@ -197,8 +197,8 @@ check_warnings() {
 #argument:
 #    $1: log file
 check_errors() {
-  #we look for 'warning:' in the compilation log file
-  error_count=`grep "error:" "$1" | wc -l`
+  #we look for 'error:' in the compilation log file
+  error_count=`grep -c "error:" "$1"`
   if [ $error_count -gt 0 ]; then
     echo_error "ERROR: $error_count error. See $1"
   fi
diff --git a/executables/nr-gnb.c b/executables/nr-gnb.c
index 327c01af6a29a80a7051253e08299847351e2961..bc3dccf4fa8c092024d8a79ba3523cf75f05c9a3 100644
--- a/executables/nr-gnb.c
+++ b/executables/nr-gnb.c
@@ -466,7 +466,7 @@ void init_gNB_Tpool(int inst) {
     pushNotifiedFIFO(gNB->L1_tx_free,msgL1Tx); // to unblock the process in the beginning
   }
 
-  if (!get_softmodem_params()->emulate_l1) 
+  if ((!get_softmodem_params()->emulate_l1) && (!IS_SOFTMODEM_NOSTATS_BIT))
      threadCreate(&proc->L1_stats_thread,nrL1_stats_thread,(void*)gNB,"L1_stats",-1,OAI_PRIORITY_RT_LOW);
 
   threadCreate(&proc->pthread_tx_reorder, tx_reorder_thread, (void *)gNB, "thread_tx_reorder", -1, OAI_PRIORITY_RT_MAX);
diff --git a/executables/nr-ue.c b/executables/nr-ue.c
index 01e6c6213845563d4618848c7a34d1dedb7b66e9..7b39dfdcaa779049ff32161eb9e9d1bc0966bac8 100644
--- a/executables/nr-ue.c
+++ b/executables/nr-ue.c
@@ -1109,8 +1109,10 @@ void init_NR_UE_threads(int nb_inst) {
 
     LOG_I(PHY,"Intializing UE Threads for instance %d (%p,%p)...\n",inst,PHY_vars_UE_g[inst],PHY_vars_UE_g[inst][0]);
     threadCreate(&threads[inst], UE_thread, (void *)UE, "UEthread", -1, OAI_PRIORITY_RT_MAX);
-    pthread_t stat_pthread;
-    threadCreate(&stat_pthread, nrL1_UE_stats_thread, UE, "L1_UE_stats", -1, OAI_PRIORITY_RT_LOW);
+    if (!IS_SOFTMODEM_NOSTATS_BIT) {
+      pthread_t stat_pthread;
+      threadCreate(&stat_pthread, nrL1_UE_stats_thread, UE, "L1_UE_stats", -1, OAI_PRIORITY_RT_LOW);
+    }
   }
 }
 
diff --git a/executables/softmodem-common.c b/executables/softmodem-common.c
index c78fc70243c6e138f06e9a2cb89fc0be46e2c8c9..bf30cab847ec7d0aaab0e2e611143bab57875556 100644
--- a/executables/softmodem-common.c
+++ b/executables/softmodem-common.c
@@ -85,6 +85,7 @@ char *get_softmodem_function(uint64_t *sofmodemfunc_mask_ptr) {
 }
 
 void get_common_options(uint32_t execmask) {
+  int32_t stats_disabled = 0;
   uint32_t online_log_messages=0;
   uint32_t glog_level=0 ;
   uint32_t start_telnetsrv = 0, start_telnetclt = 0;
@@ -149,6 +150,8 @@ void get_common_options(uint32_t execmask) {
 
   if(worker_config != NULL)   set_worker_conf(worker_config);
   nfapi_setmode(nfapi_mode);
+  if (stats_disabled)
+    set_softmodem_optmask(SOFTMODEM_NOSTATS_BIT);
 }
 void softmodem_printresources(int sig, telnet_printfunc_t pf) {
   struct rusage usage;
diff --git a/executables/softmodem-common.h b/executables/softmodem-common.h
index 0310453ca0e7b5b588e59335d2894d2b5c42846d..a2ba68023465ae387ad673121415833bb0d47b94 100644
--- a/executables/softmodem-common.h
+++ b/executables/softmodem-common.h
@@ -101,6 +101,7 @@ extern "C"
 #define CONFIG_HLP_NFAPI         "Change the nFAPI mode for NR\n"
 #define CONFIG_L1_EMULATOR       "Run in L1 emulated mode (disable PHY layer)\n"
 #define CONFIG_HLP_CONTINUOUS_TX "perform continuous transmission, even in TDD mode (to work around USRP issues)\n"
+#define CONFIG_HLP_STATS_DISABLE "disable globally the stats generation and persistence"
 
 /*-----------------------------------------------------------------------------------------------------------------------------------------------------*/
 /*                                            command line parameters common to eNodeB and UE                                                          */
@@ -171,6 +172,7 @@ extern int usrp_tx_thread;
     {"non-stop",             CONFIG_HLP_NONSTOP,      PARAMFLAG_BOOL, iptr:&NON_STOP,                     defintval:0,           TYPE_INT,    0},                     \
     {"emulate-l1",           CONFIG_L1_EMULATOR,      PARAMFLAG_BOOL, iptr:&EMULATE_L1,                   defintval:0,           TYPE_INT,    0},                     \
     {"continuous-tx",        CONFIG_HLP_CONTINUOUS_TX,PARAMFLAG_BOOL, iptr:&CONTINUOUS_TX,                defintval:0,           TYPE_INT,    0},                     \
+    {"disable-stats",        CONFIG_HLP_STATS_DISABLE, PARAMFLAG_BOOL, iptr:&stats_disabled,               defintval:0,           TYPE_INT,    0},                     \
   }
 
 #define CONFIG_HLP_NSA           "Enable NSA mode \n"
@@ -217,6 +219,7 @@ extern int usrp_tx_thread;
 #define SOFTMODEM_GNB_BIT             (1<<21)
 #define SOFTMODEM_4GUE_BIT            (1<<22)
 #define SOFTMODEM_5GUE_BIT            (1<<23)
+#define SOFTMODEM_NOSTATS_BIT         (1<<24)
 #define SOFTMODEM_FUNC_BITS (SOFTMODEM_ENB_BIT | SOFTMODEM_GNB_BIT | SOFTMODEM_5GUE_BIT | SOFTMODEM_4GUE_BIT)
 #define MAPPING_SOFTMODEM_FUNCTIONS {{"enb",SOFTMODEM_ENB_BIT},{"gnb",SOFTMODEM_GNB_BIT},{"4Gue",SOFTMODEM_4GUE_BIT},{"5Gue",SOFTMODEM_5GUE_BIT}}
 
@@ -234,6 +237,7 @@ extern int usrp_tx_thread;
 #define IS_SOFTMODEM_GNB_BIT         ( get_softmodem_optmask() & SOFTMODEM_GNB_BIT)
 #define IS_SOFTMODEM_4GUE_BIT        ( get_softmodem_optmask() & SOFTMODEM_4GUE_BIT)
 #define IS_SOFTMODEM_5GUE_BIT        ( get_softmodem_optmask() & SOFTMODEM_5GUE_BIT)
+#define IS_SOFTMODEM_NOSTATS_BIT     ( get_softmodem_optmask() & SOFTMODEM_NOSTATS_BIT)
 
 typedef struct {
   uint64_t       optmask;
diff --git a/nfapi/oai_integration/nfapi_vnf.c b/nfapi/oai_integration/nfapi_vnf.c
index d13dc5d1c50f0340fdb935961a624f1251778acf..8cc1bda7828bb3f1dfde92f7e862157906e6c9b8 100644
--- a/nfapi/oai_integration/nfapi_vnf.c
+++ b/nfapi/oai_integration/nfapi_vnf.c
@@ -217,7 +217,7 @@ void oai_create_enb(void) {
   }
 
   // This will cause phy_config_request to be installed. That will result in RRC configuring the PHY
-  // that will result in eNB->configured being set to TRUE.
+  // that will result in eNB->configured being set to true.
   // See we need to wait for that to happen otherwise the NFAPI message exchanges won't contain the right parameter values
   if (RC.eNB[0][0]->if_inst==0 || RC.eNB[0][0]->if_inst->PHY_config_req==0 || RC.eNB[0][0]->if_inst->schedule_response==0) {
     NFAPI_TRACE(NFAPI_TRACE_INFO, "RC.eNB[0][0]->if_inst->PHY_config_req is not installed - install it\n");
@@ -267,7 +267,7 @@ void oai_create_gnb(void) {
 
 
   // This will cause phy_config_request to be installed. That will result in RRC configuring the PHY
-  // that will result in gNB->configured being set to TRUE.
+  // that will result in gNB->configured being set to true.
   // See we need to wait for that to happen otherwise the NFAPI message exchanges won't contain the right parameter values
   if (RC.gNB[0]->if_inst==0 || RC.gNB[0]->if_inst->NR_PHY_config_req==0 || RC.gNB[0]->if_inst->NR_Schedule_response==0) {
     NFAPI_TRACE(NFAPI_TRACE_INFO, "RC.gNB[0][0]->if_inst->NR_PHY_config_req is not installed - install it\n");
diff --git a/openair1/PHY/LTE_ESTIMATION/lte_ul_channel_estimation.c b/openair1/PHY/LTE_ESTIMATION/lte_ul_channel_estimation.c
index c867292942f840d3bffd2891769ddf9b0d4dc7ca..9327fe9fe89a255249794470e4160ec440732406 100644
--- a/openair1/PHY/LTE_ESTIMATION/lte_ul_channel_estimation.c
+++ b/openair1/PHY/LTE_ESTIMATION/lte_ul_channel_estimation.c
@@ -41,10 +41,10 @@ extern int16_t *ul_ref_sigs_rx[30][2][34];
 
 int32_t lte_ul_channel_estimation(LTE_DL_FRAME_PARMS *frame_parms,
                                   L1_rxtx_proc_t *proc,
-                        				  LTE_eNB_ULSCH_t * ulsch,
-				                          int32_t **ul_ch_estimates,
-				                          int32_t **ul_ch_estimates_time,
-				                          int32_t **rxdataF_ext,
+				  LTE_eNB_ULSCH_t * ulsch,
+				  int32_t **ul_ch_estimates,
+				  int32_t **ul_ch_estimates_time,
+				  int32_t **rxdataF_ext,
                                   module_id_t UE_id,
                                   unsigned char l,
                                   unsigned char Ns) {
@@ -88,7 +88,7 @@ int32_t lte_ul_channel_estimation(LTE_DL_FRAME_PARMS *frame_parms,
   }
 
   uint16_t N_rb_alloc = ulsch->harq_processes[harq_pid]->nb_rb;
-  int32_t tmp_estimates[N_rb_alloc*12] __attribute__((aligned(16)));
+  int32_t tmp_estimates[N_rb_alloc*12] __attribute__((aligned(32)));
   Msc_RS = N_rb_alloc*12;
   cyclic_shift = (frame_parms->pusch_config_common.ul_ReferenceSignalsPUSCH.cyclicShift +
                   ulsch->harq_processes[harq_pid]->n_DMRS2 +
@@ -334,14 +334,14 @@ int32_t lte_ul_channel_estimation(LTE_DL_FRAME_PARMS *frame_parms,
             current_phase2 = cmin(abs(current_phase2),127);
             //          msg("sym: %d, current_phase1: %d, ru: %d + j%d, current_phase2: %d, ru: %d + j%d\n",k,current_phase1,ru1[2*current_phase1],ru1[2*current_phase1+1],current_phase2,ru2[2*current_phase2],ru2[2*current_phase2+1]);
             // rotate channel estimates by estimated phase
-            rotate_cpx_vector((int16_t *) ul_ch1,
-                              &ru1[2*current_phase1],
-                              (int16_t *) &ul_ch_estimates[aa][frame_parms->N_RB_UL*12*k],
+            rotate_cpx_vector((c16_t *) ul_ch1,
+                              (c16_t *)&ru1[2*current_phase1],
+                              (c16_t *) &ul_ch_estimates[aa][frame_parms->N_RB_UL*12*k],
                               Msc_RS,
                               15);
-            rotate_cpx_vector((int16_t *) ul_ch2,
-                              &ru2[2*current_phase2],
-                              (int16_t *) &tmp_estimates[0],
+            rotate_cpx_vector((c16_t *) ul_ch2,
+                              (c16_t *)&ru2[2*current_phase2],
+                              (c16_t *) tmp_estimates,
                               Msc_RS,
                               15);
             // Combine the two rotated estimates
@@ -657,14 +657,14 @@ int32_t lte_ul_channel_estimation_RRU(LTE_DL_FRAME_PARMS *frame_parms,
           current_phase2 = cmin(abs(current_phase2),127);
           //          msg("sym: %d, current_phase1: %d, ru: %d + j%d, current_phase2: %d, ru: %d + j%d\n",k,current_phase1,ru1[2*current_phase1],ru1[2*current_phase1+1],current_phase2,ru2[2*current_phase2],ru2[2*current_phase2+1]);
           // rotate channel estimates by estimated phase
-          rotate_cpx_vector((int16_t *) ul_ch1,
-                            &ru1[2*current_phase1],
-                            (int16_t *) &ul_ch_estimates[aa][frame_parms->N_RB_UL*12*k],
+          rotate_cpx_vector((c16_t *) ul_ch1,
+                            (c16_t *) &ru1[2*current_phase1],
+                            (c16_t *) &ul_ch_estimates[aa][frame_parms->N_RB_UL*12*k],
                             Msc_RS,
                             15);
-          rotate_cpx_vector((int16_t *) ul_ch2,
-                            &ru2[2*current_phase2],
-                            (int16_t *) &tmp_estimates[0],
+          rotate_cpx_vector((c16_t *) ul_ch2,
+                            (c16_t *) &ru2[2*current_phase2],
+                            (c16_t *) &tmp_estimates[0],
                             Msc_RS,
                             15);
           // Combine the two rotated estimates
diff --git a/openair1/PHY/LTE_TRANSPORT/dci_tools.c b/openair1/PHY/LTE_TRANSPORT/dci_tools.c
index 1bbe9eb39a28159559597ae5008e4a623b5d7c68..dc73a56568edd39fc469c20fd642c604d15cd938 100644
--- a/openair1/PHY/LTE_TRANSPORT/dci_tools.c
+++ b/openair1/PHY/LTE_TRANSPORT/dci_tools.c
@@ -1997,7 +1997,7 @@ int get_narrowband_index(int N_RB_UL,int rb) {
 void fill_ulsch(PHY_VARS_eNB *eNB,int UE_id,nfapi_ul_config_ulsch_pdu *ulsch_pdu,int frame,int subframe) {
   uint8_t harq_pid;
   //uint8_t UE_id;
-  boolean_t new_ulsch = (find_ulsch(ulsch_pdu->ulsch_pdu_rel8.rnti,eNB,SEARCH_EXIST)==-1) ? TRUE : FALSE;
+  const bool new_ulsch = find_ulsch(ulsch_pdu->ulsch_pdu_rel8.rnti,eNB,SEARCH_EXIST) == -1;
   //AssertFatal((UE_id=find_ulsch(ulsch_pdu->ulsch_pdu_rel8.rnti,eNB,SEARCH_EXIST_OR_FREE))>=0,
   //        "No existing/free UE ULSCH for rnti %x\n",ulsch_pdu->ulsch_pdu_rel8.rnti);
   LTE_eNB_ULSCH_t *ulsch=eNB->ulsch[UE_id];
@@ -2063,7 +2063,7 @@ void fill_ulsch(PHY_VARS_eNB *eNB,int UE_id,nfapi_ul_config_ulsch_pdu *ulsch_pdu
 
   if ((ulsch->harq_processes[harq_pid]->status == SCH_IDLE) ||
       (ulsch->harq_processes[harq_pid]->ndi    != ulsch_pdu->ulsch_pdu_rel8.new_data_indication) ||
-      (new_ulsch == TRUE)) {
+      (new_ulsch == true)) {
     ulsch->harq_processes[harq_pid]->status        = ACTIVE;
     ulsch->harq_processes[harq_pid]->TBS           = ulsch_pdu->ulsch_pdu_rel8.size<<3;
     ulsch->harq_processes[harq_pid]->Msc_initial   = 12*ulsch_pdu->ulsch_pdu_rel8.number_of_resource_blocks;
diff --git a/openair1/PHY/LTE_TRANSPORT/defs_NB_IoT.h b/openair1/PHY/LTE_TRANSPORT/defs_NB_IoT.h
index 3574ba67405c271fefe0a43d01936fb49010efd6..d90216c3e6ace8f32baae4ccf13de9d7d4ccd345 100644
--- a/openair1/PHY/LTE_TRANSPORT/defs_NB_IoT.h
+++ b/openair1/PHY/LTE_TRANSPORT/defs_NB_IoT.h
@@ -509,7 +509,7 @@ typedef struct {
   /// Position of first CCE of the dci
   int                   firstCCE;
   /// flag to indicate that this is a RA response
-  boolean_t      ra_flag;
+  bool                  ra_flag;
   /// rnti
   rnti_t                rnti;
   /// Format
diff --git a/openair1/PHY/MODULATION/nr_modulation.c b/openair1/PHY/MODULATION/nr_modulation.c
index 8352a7f5a64a00bb45a2abb8a0e0a7b21b0f6159..8ebd70fb92e8ce9083a64efa2d3f50cce5d97437 100644
--- a/openair1/PHY/MODULATION/nr_modulation.c
+++ b/openair1/PHY/MODULATION/nr_modulation.c
@@ -618,20 +618,20 @@ void init_symbol_rotation(NR_DL_FRAME_PARMS *fp) {
 
     double f0 = f[ll];
     double Ncpm1 = Ncp0;
-    int16_t *symbol_rotation = fp->symbol_rotation[ll];
+    c16_t *symbol_rotation = fp->symbol_rotation[ll];
 
     double tl = 0;
     double poff = 2 * M_PI * ((Ncp0 * Tc)) * f0;
     double exp_re = cos(poff);
     double exp_im = sin(-poff);
-    symbol_rotation[0] = (int16_t)floor(exp_re * 32767);
-    symbol_rotation[1] = (int16_t)floor(exp_im * 32767);
+    symbol_rotation[0].r = (int16_t)floor(exp_re * 32767);
+    symbol_rotation[0].i = (int16_t)floor(exp_im * 32767);
     LOG_I(PHY, "Doing symbol rotation calculation for gNB TX/RX, f0 %f Hz, Nsymb %d\n", f0, nsymb);
     LOG_I(PHY, "Symbol rotation %d/%d => (%d,%d)\n",
       0,
       nsymb,
-      symbol_rotation[0],
-      symbol_rotation[1]);
+      symbol_rotation[0].r,
+      symbol_rotation[0].i);
 
     for (int l = 1; l < nsymb; l++) {
 
@@ -646,15 +646,15 @@ void init_symbol_rotation(NR_DL_FRAME_PARMS *fp) {
       poff = 2 * M_PI * (tl + (Ncp * Tc)) * f0;
       exp_re = cos(poff);
       exp_im = sin(-poff);
-      symbol_rotation[l<<1] = (int16_t)floor(exp_re * 32767);
-      symbol_rotation[1 + (l<<1)] = (int16_t)floor(exp_im * 32767);
+      symbol_rotation[l].r = (int16_t)floor(exp_re * 32767);
+      symbol_rotation[l].i = (int16_t)floor(exp_im * 32767);
 
       LOG_I(PHY, "Symbol rotation %d/%d => tl %f (%d,%d) (%f)\n",
         l,
         nsymb,
         tl,
-        symbol_rotation[l<<1],
-        symbol_rotation[1 + (l<<1)],
+        symbol_rotation[l].r,
+        symbol_rotation[l].i,
         (poff / 2 / M_PI) - floor(poff / 2 / M_PI));
 
       Ncpm1 = Ncp;
@@ -670,13 +670,13 @@ void init_timeshift_rotation(NR_DL_FRAME_PARMS *fp)
     double poff = -i * 2.0 * M_PI * sample_offset / fp->ofdm_symbol_size;
     double exp_re = cos(poff);
     double exp_im = sin(-poff);
-    fp->timeshift_symbol_rotation[i*2] = (int16_t)round(exp_re * 32767);
-    fp->timeshift_symbol_rotation[i*2+1] = (int16_t)round(exp_im * 32767);
+    fp->timeshift_symbol_rotation[i].r = (int16_t)round(exp_re * 32767);
+    fp->timeshift_symbol_rotation[i].i = (int16_t)round(exp_im * 32767);
 
     if (i < 10)
       LOG_I(PHY,"Timeshift symbol rotation %d => (%d,%d) %f\n",i,
-            fp->timeshift_symbol_rotation[i*2],
-            fp->timeshift_symbol_rotation[i*2+1],
+            fp->timeshift_symbol_rotation[i].r,
+            fp->timeshift_symbol_rotation[i].i,
             poff);
   }
 }
diff --git a/openair1/PHY/MODULATION/ofdm_mod.c b/openair1/PHY/MODULATION/ofdm_mod.c
index 2f075e8218d7da918b8826a6167014aef7e93d95..0b8f22a0943ef920fd4a37f2951cfa312f84bbdf 100644
--- a/openair1/PHY/MODULATION/ofdm_mod.c
+++ b/openair1/PHY/MODULATION/ofdm_mod.c
@@ -46,18 +46,18 @@ void normal_prefix_mod(int32_t *txdataF,int32_t *txdata,uint8_t nsymb,LTE_DL_FRA
 
   
   PHY_ofdm_mod(txdataF,        // input
-	       txdata,         // output
-	       frame_parms->ofdm_symbol_size,                
+               txdata,         // output
+               frame_parms->ofdm_symbol_size,                
 
-	       1,                 // number of symbols
-	       frame_parms->nb_prefix_samples0,               // number of prefix samples
-	       CYCLIC_PREFIX);
+               1,                 // number of symbols
+               frame_parms->nb_prefix_samples0,               // number of prefix samples
+               CYCLIC_PREFIX);
   PHY_ofdm_mod(txdataF+frame_parms->ofdm_symbol_size,        // input
-	       txdata+OFDM_SYMBOL_SIZE_COMPLEX_SAMPLES0,         // output
-	       frame_parms->ofdm_symbol_size,                
-	       nsymb-1,
-	       frame_parms->nb_prefix_samples,               // number of prefix samples
-	       CYCLIC_PREFIX);
+               txdata+OFDM_SYMBOL_SIZE_COMPLEX_SAMPLES0,         // output
+               frame_parms->ofdm_symbol_size,                
+               nsymb-1,
+               frame_parms->nb_prefix_samples,               // number of prefix samples
+               CYCLIC_PREFIX);
   
 
   
@@ -341,14 +341,14 @@ void do_OFDM_mod(int32_t **txdataF, int32_t **txdata, uint32_t frame,uint16_t ne
 }
 
 void apply_nr_rotation(NR_DL_FRAME_PARMS *fp,
-		       int16_t* trxdata,
-		       int slot,
-		       int first_symbol,
-		       int nsymb,
-		       int length) {
+                       int16_t* trxdata,
+                       int slot,
+                       int first_symbol,
+                       int nsymb,
+                       int length) {
   int symb_offset = (slot%fp->slots_per_subframe)*fp->symbols_per_slot;
 
-  int16_t *symbol_rotation = fp->symbol_rotation[0];
+  c16_t *symbol_rotation = fp->symbol_rotation[0];
 
   for (int sidx=0;sidx<nsymb;sidx++) {
 
@@ -357,14 +357,14 @@ void apply_nr_rotation(NR_DL_FRAME_PARMS *fp,
       slot,
       sidx + first_symbol + symb_offset,
       length,
-      symbol_rotation[2 * (sidx + first_symbol + symb_offset)],
-      symbol_rotation[1 + 2 * (sidx + first_symbol + symb_offset)]);
+      symbol_rotation[sidx + first_symbol + symb_offset].r,
+      symbol_rotation[sidx + first_symbol + symb_offset].i);
 
-    rotate_cpx_vector(trxdata + (sidx * length * 2),
-                      &symbol_rotation[2 * (sidx + first_symbol + symb_offset)],
-                      trxdata + (sidx * length * 2),
+    rotate_cpx_vector(((c16_t*) trxdata) + sidx * length,
+                      symbol_rotation + sidx + first_symbol + symb_offset,
+                      ((c16_t*) trxdata) + sidx * length,
                       length,
                       15);
   }
 }
-		       
+                       
diff --git a/openair1/PHY/MODULATION/slot_fep_nr.c b/openair1/PHY/MODULATION/slot_fep_nr.c
index 139b730ce1bb515046340fef8fc6394d5c22451a..548db21878e5fb870ab547d62f1c148db456666c 100644
--- a/openair1/PHY/MODULATION/slot_fep_nr.c
+++ b/openair1/PHY/MODULATION/slot_fep_nr.c
@@ -98,25 +98,25 @@ int nr_slot_fep(PHY_VARS_NR_UE *ue,
     stop_meas(&ue->rx_dft_stats);
 
     int symb_offset = (Ns%frame_parms->slots_per_subframe)*frame_parms->symbols_per_slot;
-    int32_t rot2 = ((uint32_t*)frame_parms->symbol_rotation[0])[symbol+symb_offset];
-    ((int16_t*)&rot2)[1]=-((int16_t*)&rot2)[1];
+    c16_t rot2 = frame_parms->symbol_rotation[0][symbol+symb_offset];
+    rot2.i=-rot2.i;
 
 #ifdef DEBUG_FEP
     //  if (ue->frame <100)
     printf("slot_fep: slot %d, symbol %d rx_offset %u, rotation symbol %d %d.%d\n", Ns,symbol, rx_offset,
-	   symbol+symb_offset,((int16_t*)&rot2)[0],((int16_t*)&rot2)[1]);
+	   symbol+symb_offset,rot2.r,rot2.i);
 #endif
 
-    rotate_cpx_vector((int16_t *)&common_vars->common_vars_rx_data_per_thread[proc->thread_id].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol],
-		      (int16_t*)&rot2,
-		      (int16_t *)&common_vars->common_vars_rx_data_per_thread[proc->thread_id].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol],
+    rotate_cpx_vector((c16_t *)&common_vars->common_vars_rx_data_per_thread[proc->thread_id].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol],
+		      &rot2,
+		      (c16_t *)&common_vars->common_vars_rx_data_per_thread[proc->thread_id].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol],
 		      frame_parms->ofdm_symbol_size,
 		      15);
 
-    int16_t *shift_rot = frame_parms->timeshift_symbol_rotation;
+    c16_t *shift_rot = frame_parms->timeshift_symbol_rotation;
 
     multadd_cpx_vector((int16_t *)&common_vars->common_vars_rx_data_per_thread[proc->thread_id].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol],
-          shift_rot,
+          (int16_t *)shift_rot,
           (int16_t *)&common_vars->common_vars_rx_data_per_thread[proc->thread_id].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol],
           1,
           frame_parms->ofdm_symbol_size,
@@ -214,18 +214,18 @@ int nr_slot_fep_init_sync(PHY_VARS_NR_UE *ue,
     stop_meas(&ue->rx_dft_stats);
 
     int symb_offset = (Ns%frame_parms->slots_per_subframe)*frame_parms->symbols_per_slot;
-    int32_t rot2 = ((uint32_t*)frame_parms->symbol_rotation[0])[symbol + symb_offset];
-    ((int16_t*)&rot2)[1]=-((int16_t*)&rot2)[1];
+    c16_t rot2 = frame_parms->symbol_rotation[0][symbol + symb_offset];
+    rot2.i=-rot2.i;
 
 #ifdef DEBUG_FEP
     //  if (ue->frame <100)
     printf("slot_fep: slot %d, symbol %d rx_offset %u, rotation symbol %d %d.%d\n", Ns,symbol, rx_offset,
-	   symbol+symb_offset,((int16_t*)&rot2)[0],((int16_t*)&rot2)[1]);
+	   symbol+symb_offset,rot2.r,rot2.i);
 #endif
 
-    rotate_cpx_vector((int16_t *)&common_vars->common_vars_rx_data_per_thread[proc->thread_id].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol],
-		      (int16_t*)&rot2,
-		      (int16_t *)&common_vars->common_vars_rx_data_per_thread[proc->thread_id].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol],
+    rotate_cpx_vector((c16_t *)&common_vars->common_vars_rx_data_per_thread[proc->thread_id].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol],
+		      &rot2,
+		      (c16_t *)&common_vars->common_vars_rx_data_per_thread[proc->thread_id].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol],
 		      frame_parms->ofdm_symbol_size,
 		      15);
   }
@@ -310,19 +310,19 @@ void apply_nr_rotation_ul(NR_DL_FRAME_PARMS *frame_parms,
 
   for (int symbol=first_symbol;symbol<nsymb;symbol++) {
     
-    uint32_t rot2 = ((uint32_t*)frame_parms->symbol_rotation[1])[symbol + symb_offset];
-    ((int16_t*)&rot2)[1]=-((int16_t*)&rot2)[1];
-    LOG_D(PHY,"slot %d, symb_offset %d rotating by %d.%d\n",slot,symb_offset,((int16_t*)&rot2)[0],((int16_t*)&rot2)[1]);
-    rotate_cpx_vector((int16_t *)&rxdataF[soffset+(frame_parms->ofdm_symbol_size*symbol)],
-		      (int16_t*)&rot2,
-		      (int16_t *)&rxdataF[soffset+(frame_parms->ofdm_symbol_size*symbol)],
+    c16_t rot2 = frame_parms->symbol_rotation[1][symbol + symb_offset];
+    rot2.i=-rot2.i;
+    LOG_D(PHY,"slot %d, symb_offset %d rotating by %d.%d\n",slot,symb_offset,rot2.r,rot2.i);
+    rotate_cpx_vector((c16_t *)&rxdataF[soffset+(frame_parms->ofdm_symbol_size*symbol)],
+		      &rot2,
+		      (c16_t *)&rxdataF[soffset+(frame_parms->ofdm_symbol_size*symbol)],
 		      length,
 		      15);
 
-    int16_t *shift_rot = frame_parms->timeshift_symbol_rotation;
+    c16_t *shift_rot = frame_parms->timeshift_symbol_rotation;
 
     multadd_cpx_vector((int16_t *)&rxdataF[soffset+(frame_parms->ofdm_symbol_size*symbol)],
-          shift_rot,
+          (int16_t *)shift_rot,
           (int16_t *)&rxdataF[soffset+(frame_parms->ofdm_symbol_size*symbol)],
           1,
           length,
diff --git a/openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c b/openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c
index cd3b535b3fd8024b1a3040bd1d1ecd53823bb446..fe23e1b56f7be7e868a5d41c85f50a4d10a1ddf3 100644
--- a/openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c
+++ b/openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c
@@ -854,7 +854,6 @@ void nr_pusch_ptrs_processing(PHY_VARS_gNB *gNB,
                               uint32_t nb_re_pusch)
 {
   //#define DEBUG_UL_PTRS 1
-  int16_t *phase_per_symbol = NULL;
   int32_t *ptrs_re_symbol   = NULL;
   int8_t   ret = 0;
 
@@ -871,20 +870,20 @@ void nr_pusch_ptrs_processing(PHY_VARS_gNB *gNB,
   uint8_t  *ptrsReOffset    = &rel15_ul->pusch_ptrs.ptrs_ports_list[0].ptrs_re_offset;
   /* loop over antennas */
   for (int aarx=0; aarx<frame_parms->nb_antennas_rx; aarx++) {
-    phase_per_symbol = (int16_t*)gNB->pusch_vars[ulsch_id]->ptrs_phase_per_slot[aarx];
+    c16_t *phase_per_symbol = (c16_t*)gNB->pusch_vars[ulsch_id]->ptrs_phase_per_slot[aarx];
     ptrs_re_symbol = &gNB->pusch_vars[ulsch_id]->ptrs_re_per_slot;
     *ptrs_re_symbol = 0;
-    phase_per_symbol[(2*symbol)+1] = 0; // Imag
+    phase_per_symbol[symbol].i = 0; 
     /* set DMRS estimates to 0 angle with magnitude 1 */
     if(is_dmrs_symbol(symbol,*dmrsSymbPos)) {
       /* set DMRS real estimation to 32767 */
-      phase_per_symbol[2*symbol]=(int16_t)((1<<15)-1); // 32767
+      phase_per_symbol[symbol].r=INT16_MAX; // 32767
 #ifdef DEBUG_UL_PTRS
-      printf("[PHY][PTRS]: DMRS Symbol %d -> %4d + j*%4d\n", symbol, phase_per_symbol[2*symbol],phase_per_symbol[(2*symbol)+1]);
+      printf("[PHY][PTRS]: DMRS Symbol %d -> %4d + j*%4d\n", symbol, phase_per_symbol[symbol].r,phase_per_symbol[symbol].i);
 #endif
     }
     else {// real ptrs value is set to 0
-      phase_per_symbol[2*symbol] = 0; // Real
+      phase_per_symbol[symbol].r = 0; 
     }
 
     if(symbol == *startSymbIndex) {
@@ -909,7 +908,7 @@ void nr_pusch_ptrs_processing(PHY_VARS_gNB *gNB,
                              symbol,frame_parms->ofdm_symbol_size,
                              (int16_t*)&gNB->pusch_vars[ulsch_id]->rxdataF_comp[aarx][(symbol * nb_re_pusch)],
                              gNB->nr_gold_pusch_dmrs[rel15_ul->scid][nr_tti_rx][symbol],
-                             &phase_per_symbol[2* symbol],
+                             (int16_t*)&phase_per_symbol[symbol],
                              ptrs_re_symbol);
     }
     /* For last OFDM symbol at each antenna perform interpolation and compensation for the slot*/
@@ -919,7 +918,7 @@ void nr_pusch_ptrs_processing(PHY_VARS_gNB *gNB,
       /*------------------------------------------------------------------------------------------------------- */
       /* If L-PTRS is > 0 then we need interpolation */
       if(*L_ptrs > 0) {
-        ret = nr_ptrs_process_slot(*dmrsSymbPos, *ptrsSymbPos, phase_per_symbol, *startSymbIndex, *nbSymb);
+        ret = nr_ptrs_process_slot(*dmrsSymbPos, *ptrsSymbPos, (int16_t*)phase_per_symbol, *startSymbIndex, *nbSymb);
         if(ret != 0) {
           LOG_W(PHY,"[PTRS] Compensation is skipped due to error in PTRS slot processing !!\n");
         }
@@ -938,11 +937,11 @@ void nr_pusch_ptrs_processing(PHY_VARS_gNB *gNB,
         /* Skip rotation if the slot processing is wrong */
         if((!is_dmrs_symbol(i,*dmrsSymbPos)) && (ret == 0)) {
 #ifdef DEBUG_UL_PTRS
-          printf("[PHY][UL][PTRS]: Rotate Symbol %2d with  %d + j* %d\n", i, phase_per_symbol[2* i],phase_per_symbol[(2* i) +1]);
+          printf("[PHY][UL][PTRS]: Rotate Symbol %2d with  %d + j* %d\n", i, phase_per_symbol[i].r,phase_per_symbol[i].i);
 #endif
-          rotate_cpx_vector((int16_t*)&gNB->pusch_vars[ulsch_id]->rxdataF_comp[aarx][(i * rel15_ul->rb_size * NR_NB_SC_PER_RB)],
-                            &phase_per_symbol[2* i],
-                            (int16_t*)&gNB->pusch_vars[ulsch_id]->rxdataF_comp[aarx][(i * rel15_ul->rb_size * NR_NB_SC_PER_RB)],
+          rotate_cpx_vector((c16_t*)&gNB->pusch_vars[ulsch_id]->rxdataF_comp[aarx][(i * rel15_ul->rb_size * NR_NB_SC_PER_RB)],
+                            &phase_per_symbol[i],
+                            (c16_t*)&gNB->pusch_vars[ulsch_id]->rxdataF_comp[aarx][(i * rel15_ul->rb_size * NR_NB_SC_PER_RB)],
                             ((*nb_rb) * NR_NB_SC_PER_RB), 15);
         }// if not DMRS Symbol
       }// symbol loop
diff --git a/openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c b/openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c
index 8936a69e70b764738ecb9cc818b1890116346282..ba7e61afe67b6972d542d35144c9ced773845b9c 100644
--- a/openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c
+++ b/openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c
@@ -1657,7 +1657,6 @@ void nr_pdsch_ptrs_processing(PHY_VARS_NR_UE *ue,
                               RX_type_t rx_type)
 {
   //#define DEBUG_DL_PTRS 1
-  int16_t *phase_per_symbol = NULL;
   int32_t *ptrs_re_symbol = NULL;
   int8_t   ret = 0;
   /* harq specific variables */
@@ -1701,20 +1700,20 @@ void nr_pdsch_ptrs_processing(PHY_VARS_NR_UE *ue,
   }
   /* loop over antennas */
   for (int aarx=0; aarx<frame_parms->nb_antennas_rx; aarx++) {
-    phase_per_symbol = (int16_t*)pdsch_vars[gNB_id]->ptrs_phase_per_slot[aarx];
+    c16_t *phase_per_symbol = (c16_t*)pdsch_vars[gNB_id]->ptrs_phase_per_slot[aarx];
     ptrs_re_symbol = (int32_t*)pdsch_vars[gNB_id]->ptrs_re_per_slot[aarx];
     ptrs_re_symbol[symbol] = 0;
-    phase_per_symbol[(2*symbol)+1] = 0; // Imag
+    phase_per_symbol[symbol].i = 0; // Imag
     /* set DMRS estimates to 0 angle with magnitude 1 */
     if(is_dmrs_symbol(symbol,*dmrsSymbPos)) {
       /* set DMRS real estimation to 32767 */
-      phase_per_symbol[2*symbol]=(int16_t)((1<<15)-1); // 32767
+      phase_per_symbol[symbol].r=INT16_MAX; // 32767
 #ifdef DEBUG_DL_PTRS
-      printf("[PHY][PTRS]: DMRS Symbol %d -> %4d + j*%4d\n", symbol, phase_per_symbol[2*symbol],phase_per_symbol[(2*symbol)+1]);
+      printf("[PHY][PTRS]: DMRS Symbol %d -> %4d + j*%4d\n", symbol, phase_per_symbol[symbol].r,phase_per_symbol[symbol].i);
 #endif
     }
     else { // real ptrs value is set to 0
-      phase_per_symbol[2*symbol] = 0; // Real
+      phase_per_symbol[symbol].r = 0; // Real
     }
 
     if(dlsch0_harq->status == ACTIVE) {
@@ -1740,7 +1739,7 @@ void nr_pdsch_ptrs_processing(PHY_VARS_NR_UE *ue,
                                symbol,frame_parms->ofdm_symbol_size,
                                (int16_t*)&pdsch_vars[gNB_id]->rxdataF_comp0[aarx][(symbol * nb_re_pdsch)],
                                ue->nr_gold_pdsch[gNB_id][nr_slot_rx][symbol][0],
-                               &phase_per_symbol[2* symbol],
+                               (int16_t*)&phase_per_symbol[symbol],
                                &ptrs_re_symbol[symbol]);
       }
     }// HARQ 0
@@ -1752,7 +1751,7 @@ void nr_pdsch_ptrs_processing(PHY_VARS_NR_UE *ue,
       /*------------------------------------------------------------------------------------------------------- */
       /* If L-PTRS is > 0 then we need interpolation */
       if(*L_ptrs > 0) {
-        ret = nr_ptrs_process_slot(*dmrsSymbPos, *ptrsSymbPos, phase_per_symbol, *startSymbIndex, *nbSymb);
+        ret = nr_ptrs_process_slot(*dmrsSymbPos, *ptrsSymbPos, (int16_t*)phase_per_symbol, *startSymbIndex, *nbSymb);
         if(ret != 0) {
           LOG_W(PHY,"[PTRS] Compensation is skipped due to error in PTRS slot processing !!\n");
         }
@@ -1771,11 +1770,11 @@ void nr_pdsch_ptrs_processing(PHY_VARS_NR_UE *ue,
         /* Skip rotation if the slot processing is wrong */
         if((!is_dmrs_symbol(i,*dmrsSymbPos)) && (ret == 0)) {
 #ifdef DEBUG_DL_PTRS
-          printf("[PHY][DL][PTRS]: Rotate Symbol %2d with  %d + j* %d\n", i, phase_per_symbol[2* i],phase_per_symbol[(2* i) +1]);
+          printf("[PHY][DL][PTRS]: Rotate Symbol %2d with  %d + j* %d\n", i, phase_per_symbol[i].r,phase_per_symbol[i].i);
 #endif
-          rotate_cpx_vector((int16_t*)&pdsch_vars[gNB_id]->rxdataF_comp0[aarx][(i * (*nb_rb) * NR_NB_SC_PER_RB)],
-                            &phase_per_symbol[2* i],
-                            (int16_t*)&pdsch_vars[gNB_id]->rxdataF_comp0[aarx][(i * (*nb_rb) * NR_NB_SC_PER_RB)],
+          rotate_cpx_vector((c16_t*)&pdsch_vars[gNB_id]->rxdataF_comp0[aarx][(i * (*nb_rb) * NR_NB_SC_PER_RB)],
+                            &phase_per_symbol[i],
+                            (c16_t*)&pdsch_vars[gNB_id]->rxdataF_comp0[aarx][(i * (*nb_rb) * NR_NB_SC_PER_RB)],
                             ((*nb_rb) * NR_NB_SC_PER_RB), 15);
         }// if not DMRS Symbol
       }// symbol loop
diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_transport_ue.h b/openair1/PHY/NR_UE_TRANSPORT/nr_transport_ue.h
index 7ecba40c3a878bf5365783e270eb449f5f8c0726..fd8eada2459743d5cb579fa9be54c7b8d1f13bc1 100644
--- a/openair1/PHY/NR_UE_TRANSPORT/nr_transport_ue.h
+++ b/openair1/PHY/NR_UE_TRANSPORT/nr_transport_ue.h
@@ -342,7 +342,7 @@ typedef struct {
   /// Position of first CCE of the dci
   int firstCCE;
   /// flag to indicate that this is a RA response
-  boolean_t ra_flag;
+  bool ra_flag;
   /// rnti
   rnti_t rnti;
   /// rnti type
diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c b/openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c
index a07a19d085f43c0628416d699595fdaf09126d43..eaeffd08099a987c9c848d9043fb5a862311dace 100644
--- a/openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c
+++ b/openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c
@@ -597,17 +597,15 @@ uint8_t nr_ue_pusch_common_procedures(PHY_VARS_NR_UE *UE,
   int symb_offset = (slot%frame_parms->slots_per_subframe)*frame_parms->symbols_per_slot;
   for(ap = 0; ap < n_antenna_ports; ap++) {
     for (int s=0;s<NR_NUMBER_OF_SYMBOLS_PER_SLOT;s++){
-
-      LOG_D(PHY,"In %s: rotating txdataF symbol %d (%d) => (%d.%d)\n",
-        __FUNCTION__,
-        s,
-        s + symb_offset,
-        frame_parms->symbol_rotation[1][2 * (s + symb_offset)],
-        frame_parms->symbol_rotation[1][1 + (2 * (s + symb_offset))]);
-
-      rotate_cpx_vector((int16_t *)&txdataF[ap][frame_parms->ofdm_symbol_size * s],
-                        &frame_parms->symbol_rotation[1][2 * (s + symb_offset)],
-                        (int16_t *)&txdataF[ap][frame_parms->ofdm_symbol_size * s],
+      c16_t rot=((c16_t*)frame_parms->symbol_rotation[1])[s + symb_offset];
+      LOG_D(PHY,"rotating txdataF symbol %d (%d) => (%d.%d)\n",
+	    s,
+	    s + symb_offset,
+	    rot.r, rot.i);
+
+      rotate_cpx_vector((c16_t *)&txdataF[ap][frame_parms->ofdm_symbol_size * s],
+                        &rot,
+                        (c16_t *)&txdataF[ap][frame_parms->ofdm_symbol_size * s],
                         frame_parms->ofdm_symbol_size,
                         15);
     }
diff --git a/openair1/PHY/TOOLS/calibration_scope.c b/openair1/PHY/TOOLS/calibration_scope.c
index da1acb517570e78fa352fcbb289def26fcc67064..d3397b033f1da10d07fd343a7f6fa951392b1874 100644
--- a/openair1/PHY/TOOLS/calibration_scope.c
+++ b/openair1/PHY/TOOLS/calibration_scope.c
@@ -34,7 +34,7 @@ typedef struct OAIgraph {
   int h;
   int waterFallh;
   double *waterFallAvg;
-  boolean_t initDone;
+  bool initDone;
   int iteration;
   void (*funct) (struct OAIgraph *graph, calibData_t *);
 } OAIgraph_t;
@@ -159,7 +159,7 @@ static void oai_xygraph_getbuff(OAIgraph_t *graph, float **x, float **y, int len
   *y=old_y;
 }
 
-static void oai_xygraph(OAIgraph_t *graph, float *x, float *y, int len, int layer, boolean_t NoAutoScale) {
+static void oai_xygraph(OAIgraph_t *graph, float *x, float *y, int len, int layer, bool NoAutoScale) {
   fl_redraw_object(graph->graph);
 
   if ( NoAutoScale && graph->iteration%NoAutoScale == 0) {
diff --git a/openair1/PHY/TOOLS/cmult_sv.c b/openair1/PHY/TOOLS/cmult_sv.c
index dc57964ca52a60ff699ff0d0066c5376512ce5ec..a9d502b9eb1b5d7a9ff0259030af7324389394c7 100644
--- a/openair1/PHY/TOOLS/cmult_sv.c
+++ b/openair1/PHY/TOOLS/cmult_sv.c
@@ -144,207 +144,10 @@ void multadd_real_four_symbols_vector_complex_scalar(int16_t *x,
   _m_empty();
 
 }
-
-/*
-int rotate_cpx_vector(int16_t *x,
-                      int16_t *alpha,
-                      int16_t *y,
-                      uint32_t N,
-                      uint16_t output_shift,
-                      uint8_t format)
-{
-  // Multiply elementwise two complex vectors of N elements
-  // x        - input 1    in the format  |Re0  Im0 Re0 Im0|,......,|Re(N-1)  Im(N-1) Re(N-1) Im(N-1)|
-  //            We assume x1 with a dynamic of 15 bit maximum
-  //
-  // alpha      - input 2    in the format  |Re0 Im0|
-  //            We assume x2 with a dynamic of 15 bit maximum
-  //
-  // y        - output     in the format  |Re0  Im0 Re0 Im0|,......,|Re(N-1)  Im(N-1) Re(N-1) Im(N-1)|
-  //
-  // N        - the size f the vectors (this function does N cpx mpy. WARNING: N>=4;
-  //
-  // output_shift - shift at output to return in Q1.15
-  // format - 0 means alpha is in shuffled format, 1 means x is in shuffled format
-
-  uint32_t i;                 // loop counter
-
-  register __m128i m0,m1;
-
-
-
-  __m128i *x_128;
-  __m128i *y_128;
-
-
-  shift = _mm_cvtsi32_si128(output_shift);
-  x_128 = (__m128i *)&x[0];
-
-  if (format==0) {  // alpha is in shuffled format for complex multiply
-    ((int16_t *)&alpha_128)[0] = alpha[0];
-    ((int16_t *)&alpha_128)[1] = -alpha[1];
-    ((int16_t *)&alpha_128)[2] = alpha[1];
-    ((int16_t *)&alpha_128)[3] = alpha[0];
-    ((int16_t *)&alpha_128)[4] = alpha[0];
-    ((int16_t *)&alpha_128)[5] = -alpha[1];
-    ((int16_t *)&alpha_128)[6] = alpha[1];
-    ((int16_t *)&alpha_128)[7] = alpha[0];
-  } else { // input is in shuffled format for complex multiply
-    ((int16_t *)&alpha_128)[0] = alpha[0];
-    ((int16_t *)&alpha_128)[1] = alpha[1];
-    ((int16_t *)&alpha_128)[2] = alpha[0];
-    ((int16_t *)&alpha_128)[3] = alpha[1];
-    ((int16_t *)&alpha_128)[4] = alpha[0];
-    ((int16_t *)&alpha_128)[5] = alpha[1];
-    ((int16_t *)&alpha_128)[6] = alpha[0];
-    ((int16_t *)&alpha_128)[7] = alpha[1];
-  }
-
-  y_128 = (__m128i *)&y[0];
-
-  //  _mm_empty();
-  //  return(0);
-
-  // we compute 4 cpx multiply for each loop
-  for(i=0; i<(N>>3); i++) {
-
-    m0 = _mm_madd_epi16(x_128[0],alpha_128); //pmaddwd_r2r(mm1,mm0);         // 1- compute x1[0]*x2[0]
-    m0 = _mm_sra_epi32(m0,shift);        // 1- shift right by shift in order to  compensate for the input amplitude
-    m1=m0;
-    m0 = _mm_packs_epi32(m1,m0);        // 1- pack in a 128 bit register [re im re im]
-    y_128[0] = _mm_unpacklo_epi32(m0,m0);        // 1- pack in a 128 bit register [re im re im]
-    m0 = _mm_madd_epi16(x_128[1],alpha_128); //pmaddwd_r2r(mm1,mm0);         // 1- compute x1[0]*x2[0]
-    m0 = _mm_sra_epi32(m0,shift);        // 1- shift right by shift in order to  compensate for the input amplitude
-    m1 = m0;
-    m1 = _mm_packs_epi32(m1,m0);        // 1- pack in a 128 bit register [re im re im]
-    y_128[1] = _mm_unpacklo_epi32(m1,m1);        // 1- pack in a 128 bit register [re im re im]
-    m0 = _mm_madd_epi16(x_128[2],alpha_128); //pmaddwd_r2r(mm1,mm0);         // 1- compute x1[0]*x2[0]
-    m0 = _mm_sra_epi32(m0,shift);        // 1- shift right by shift in order to  compensate for the input amplitude
-    m1 = m0;
-    m1 = _mm_packs_epi32(m1,m0);        // 1- pack in a 128 bit register [re im re im]
-    y_128[2] = _mm_unpacklo_epi32(m1,m1);        // 1- pack in a 128 bit register [re im re im]
-    m0 = _mm_madd_epi16(x_128[3],alpha_128); //pmaddwd_r2r(mm1,mm0);         // 1- compute x1[0]*x2[0]
-    m0 = _mm_sra_epi32(m0,shift);        // 1- shift right by shift in order to  compensate for the input amplitude
-    m1 = m0;
-    m1 = _mm_packs_epi32(m1,m0);        // 1- pack in a 128 bit register [re im re im]
-    y_128[3] = _mm_unpacklo_epi32(m1,m1);        // 1- pack in a 128 bit register [re im re im]
-    if (format==1) {  // Put output in proper format (Re,-Im,Im,Re), shuffle = (0,1,3,2) = 0x1e
-
-      y_128[0] = _mm_shufflelo_epi16(y_128[0],0x1e);
-      y_128[0] = _mm_shufflehi_epi16(y_128[0],0x1e);
-      ((int16_t*)&y_128[0])[1] = -((int16_t*)&y_128[0])[1];
-      ((int16_t*)&y_128[0])[5] = -((int16_t*)&y_128[0])[5];
-      y_128[1] = _mm_shufflelo_epi16(y_128[1],0x1e);
-      y_128[1] = _mm_shufflehi_epi16(y_128[1],0x1e);
-      ((int16_t*)&y_128[1])[1] = -((int16_t*)&y_128[1])[1];
-      ((int16_t*)&y_128[1])[5] = -((int16_t*)&y_128[1])[5];
-      y_128[2] = _mm_shufflelo_epi16(y_128[2],0x1e);
-      y_128[2] = _mm_shufflehi_epi16(y_128[2],0x1e);
-      ((int16_t*)&y_128[2])[1] = -((int16_t*)&y_128[2])[1];
-      ((int16_t*)&y_128[2])[5] = -((int16_t*)&y_128[2])[5];
-      y_128[3] = _mm_shufflelo_epi16(y_128[3],0x1e);
-      y_128[3] = _mm_shufflehi_epi16(y_128[3],0x1e);
-      ((int16_t*)&y_128[3])[1] = -((int16_t*)&y_128[3])[1];
-      ((int16_t*)&y_128[3])[5] = -((int16_t*)&y_128[3])[5];
-    }
-
-
-    x_128+=4;
-    y_128 +=4;
-  }
-
-
-  _mm_empty();
-  _m_empty();
-
-  return(0);
-}
-
-int rotate_cpx_vector2(int16_t *x,
-                       int16_t *alpha,
-                       int16_t *y,
-                       uint32_t N,
-                       uint16_t output_shift,
-                       uint8_t format)
-{
-  // Multiply elementwise two complex vectors of N elements
-  // x        - input 1    in the format  |Re0  Im0 Re0 Im0|,......,|Re(N-1)  Im(N-1) Re(N-1) Im(N-1)|
-  //            We assume x1 with a dynamic of 15 bit maximum
-  //
-  // alpha      - input 2    in the format  |Re0 Im0|
-  //            We assume x2 with a dynamic of 15 bit maximum
-  //
-  // y        - output     in the format  |Re0  Im0 Re0 Im0|,......,|Re(N-1)  Im(N-1) Re(N-1) Im(N-1)|
-  //
-  // N        - the size f the vectors (this function does N cpx mpy. WARNING: N>=4;
-  //
-  // log2_amp - increase the output amplitude by a factor 2^log2_amp (default is 0)
-  //            WARNING: log2_amp>0 can cause overflow!!
-
-  uint32_t i;                 // loop counter
-
-  register __m128i m0,m1;
-
-
-  __m128i *x_128;
-  __m128i *y_128;
-
-
-  shift = _mm_cvtsi32_si128(output_shift);
-  x_128 = (__m128i *)&x[0];
-
-  if (format==0) {  // alpha is in shuffled format for complex multiply
-    ((int16_t *)&alpha_128)[0] = alpha[0];
-    ((int16_t *)&alpha_128)[1] = -alpha[1];
-    ((int16_t *)&alpha_128)[2] = alpha[1];
-    ((int16_t *)&alpha_128)[3] = alpha[0];
-    ((int16_t *)&alpha_128)[4] = alpha[0];
-    ((int16_t *)&alpha_128)[5] = -alpha[1];
-    ((int16_t *)&alpha_128)[6] = alpha[1];
-    ((int16_t *)&alpha_128)[7] = alpha[0];
-  } else { // input is in shuffled format for complex multiply
-    ((int16_t *)&alpha_128)[0] = alpha[0];
-    ((int16_t *)&alpha_128)[1] = alpha[1];
-    ((int16_t *)&alpha_128)[2] = alpha[0];
-    ((int16_t *)&alpha_128)[3] = alpha[1];
-    ((int16_t *)&alpha_128)[4] = alpha[0];
-    ((int16_t *)&alpha_128)[5] = alpha[1];
-    ((int16_t *)&alpha_128)[6] = alpha[0];
-    ((int16_t *)&alpha_128)[7] = alpha[1];
-  }
-
-  y_128 = (__m128i *)&y[0];
-
-  // we compute 4 cpx multiply for each loop
-  for(i=0; i<(N>>1); i++) {
-
-
-    m0 = _mm_madd_epi16(x_128[i],alpha_128); //pmaddwd_r2r(mm1,mm0);         // 1- compute x1[0]*x2[0]
-    m0 = _mm_sra_epi32(m0,shift);        // 1- shift right by shift in order to  compensate for the input amplitude
-    m1=m0;
-    m1 = _mm_packs_epi32(m1,m0);        // 1- pack in a 128 bit register [re im re im]
-    y_128[i] = _mm_unpacklo_epi32(m1,m1);        // 1- pack in a 128 bit register [re im re im]
-    if (format==1) {  // Put output in proper format (Re,-Im,Im,Re), shuffle = (0,1,3,2) = 0x1e
-
-      y_128[i] = _mm_shufflelo_epi16(y_128[i],0x1e);
-      y_128[i] = _mm_shufflehi_epi16(y_128[i],0x1e);
-      ((int16_t*)&y_128[i])[1] = -((int16_t*)&y_128[i])[1];
-      ((int16_t*)&y_128[i])[5] = -((int16_t*)&y_128[i])[5];
-    }
-  }
-
-
-  _mm_empty();
-  _m_empty();
-
-
-  return(0);
-}
-*/
-
-int rotate_cpx_vector(int16_t *x,
-                      int16_t *alpha,
-                      int16_t *y,
+#ifdef __AVX2__
+void rotate_cpx_vector(c16_t *x,
+                      c16_t *alpha,
+                      c16_t *y,
                       uint32_t N,
                       uint16_t output_shift)
 {
@@ -372,28 +175,28 @@ int rotate_cpx_vector(int16_t *x,
   __m128i shift = _mm_cvtsi32_si128(output_shift);
   register simd_q15_t m0,m1,m2,m3;
 
-  ((int16_t *)&alpha_128)[0] = alpha[0];
-  ((int16_t *)&alpha_128)[1] = -alpha[1];
-  ((int16_t *)&alpha_128)[2] = alpha[1];
-  ((int16_t *)&alpha_128)[3] = alpha[0];
-  ((int16_t *)&alpha_128)[4] = alpha[0];
-  ((int16_t *)&alpha_128)[5] = -alpha[1];
-  ((int16_t *)&alpha_128)[6] = alpha[1];
-  ((int16_t *)&alpha_128)[7] = alpha[0];
+  ((int16_t *)&alpha_128)[0] = alpha->r;
+  ((int16_t *)&alpha_128)[1] = -alpha->i;
+  ((int16_t *)&alpha_128)[2] = alpha->i;
+  ((int16_t *)&alpha_128)[3] = alpha->r;
+  ((int16_t *)&alpha_128)[4] = alpha->r;
+  ((int16_t *)&alpha_128)[5] = -alpha->i;
+  ((int16_t *)&alpha_128)[6] = alpha->i;
+  ((int16_t *)&alpha_128)[7] = alpha->r;
 #elif defined(__arm__)
   int32x4_t shift;
   int32x4_t ab_re0,ab_re1,ab_im0,ab_im1,re32,im32;
   int16_t reflip[8]  __attribute__((aligned(16))) = {1,-1,1,-1,1,-1,1,-1};
   int32x4x2_t xtmp;
 
-  ((int16_t *)&alpha_128)[0] = alpha[0];
-  ((int16_t *)&alpha_128)[1] = alpha[1];
-  ((int16_t *)&alpha_128)[2] = alpha[0];
-  ((int16_t *)&alpha_128)[3] = alpha[1];
-  ((int16_t *)&alpha_128)[4] = alpha[0];
-  ((int16_t *)&alpha_128)[5] = alpha[1];
-  ((int16_t *)&alpha_128)[6] = alpha[0];
-  ((int16_t *)&alpha_128)[7] = alpha[1];
+  ((int16_t *)&alpha_128)[0] = alpha->r;
+  ((int16_t *)&alpha_128)[1] = alpha->i;
+  ((int16_t *)&alpha_128)[2] = alpha->r;
+  ((int16_t *)&alpha_128)[3] = alpha->i;
+  ((int16_t *)&alpha_128)[4] = alpha->r;
+  ((int16_t *)&alpha_128)[5] = alpha->i;
+  ((int16_t *)&alpha_128)[6] = alpha->r;
+  ((int16_t *)&alpha_128)[7] = alpha->i;
   int16x8_t bflip = vrev32q_s16(alpha_128);
   int16x8_t bconj = vmulq_s16(alpha_128,*(int16x8_t *)reflip);
   shift = vdupq_n_s32(-output_shift);
@@ -439,9 +242,9 @@ int rotate_cpx_vector(int16_t *x,
   _mm_empty();
   _m_empty();
 
-  return(0);
+  return;
 }
-
+#endif
 /*
 int mult_vector32_scalar(int16_t *x1,
                          int x2,
@@ -536,7 +339,7 @@ main ()
   int16_t input[256] __attribute__((aligned(16)));
   int16_t input2[256] __attribute__((aligned(16)));
   int16_t output[256] __attribute__((aligned(16)));
-  int16_t alpha[2];
+  c16_t alpha;
 
   int i;
 
@@ -574,8 +377,8 @@ main ()
   input2[14] = 1000;
   input2[15] = 2000;
 
-  alpha[0]=32767;
-  alpha[1]=0;
+  alpha->r=32767;
+  alpha->i=0;
 
   //mult_cpx_vector(input,input2,output,L,0);
   rotate_cpx_vector_norep(input,alpha,input,L,15);
diff --git a/openair1/PHY/TOOLS/nr_phy_scope.c b/openair1/PHY/TOOLS/nr_phy_scope.c
index 723813fbb62632ba31b8f82e609a5dc74685174a..d4b28361d2420afc856a36e312ce8dd62bfac026 100644
--- a/openair1/PHY/TOOLS/nr_phy_scope.c
+++ b/openair1/PHY/TOOLS/nr_phy_scope.c
@@ -60,7 +60,7 @@ typedef struct OAIgraph {
   int h;
   int waterFallh;
   double *waterFallAvg;
-  boolean_t initDone;
+  bool initDone;
   int iteration;
   void (*gNBfunct) (struct OAIgraph *graph, scopeData_t *p, int UE_id);
   void (*nrUEfunct)(scopeGraphData_t **data, struct OAIgraph *graph, PHY_VARS_NR_UE *phy_vars_ue, int eNB_id, int UE_id);
@@ -208,7 +208,7 @@ static void oai_xygraph_getbuff(OAIgraph_t *graph, float **x, float **y, int len
   *y=old_y;
 }
 
-static void oai_xygraph(OAIgraph_t *graph, float *x, float *y, int len, int layer, boolean_t NoAutoScale) {
+static void oai_xygraph(OAIgraph_t *graph, float *x, float *y, int len, int layer, bool NoAutoScale) {
   fl_redraw_object(graph->graph);
 
   if ( NoAutoScale && graph->iteration%NoAutoScale == 0) {
diff --git a/openair1/PHY/TOOLS/tools_defs.h b/openair1/PHY/TOOLS/tools_defs.h
index 839beb3dc9a4f5911ed775dff3e37eaadc59f3ee..c471978f461bb9387cac167b5e5ff8f308d8c5b1 100644
--- a/openair1/PHY/TOOLS/tools_defs.h
+++ b/openair1/PHY/TOOLS/tools_defs.h
@@ -37,6 +37,7 @@ extern "C" {
 #include <stdint.h>
 #include <assert.h>
 #include "PHY/sse_intrin.h"
+#include "common/utils/assertions.h"
 
 #define CEILIDIV(a,b) ((a+b-1)/b)
 #define ROUNDIDIV(a,b) (((a<<1)+b)/(b<<1))
@@ -104,15 +105,6 @@ void multadd_complex_vector_real_scalar(int16_t *x,
                                         uint8_t zero_flag,
                                         uint32_t N);
 
-int rotate_cpx_vector(int16_t *x,
-                      int16_t *alpha,
-                      int16_t *y,
-                      uint32_t N,
-                      uint16_t output_shift);
-
-
-
-
 /*!\fn void init_fft(uint16_t size,uint8_t logsize,uint16_t *rev)
 \brief Initialize the FFT engine for a given size
 @param size Size of the FFT
@@ -461,7 +453,7 @@ idft_size_idx_t get_idft(int ofdm_symbol_size)
 }
 
 
-/*!\fn int32_t rotate_cpx_vector(int16_t *x,int16_t *alpha,int16_t *y,uint32_t N,uint16_t output_shift)
+/*!\fn int32_t rotate_cpx_vector(c16_t *x,c16_t *alpha,c16_t *y,uint32_t N,uint16_t output_shift)
 This function performs componentwise multiplication of a vector with a complex scalar.
 @param x Vector input (Q1.15)  in the format  |Re0  Im0|,......,|Re(N-1) Im(N-1)|
 @param alpha Scalar input (Q1.15) in the format  |Re0 Im0|
@@ -471,11 +463,11 @@ This function performs componentwise multiplication of a vector with a complex s
 
 The function implemented is : \f$\mathbf{y} = \alpha\mathbf{x}\f$
 */
-int32_t rotate_cpx_vector(int16_t *x,
-                          int16_t *alpha,
-                          int16_t *y,
-                          uint32_t N,
-                          uint16_t output_shift);
+void rotate_cpx_vector(c16_t *x,
+                       c16_t *alpha,
+                       c16_t *y,
+                       uint32_t N,
+                       uint16_t output_shift);
 
 
 //cadd_sv.c
diff --git a/openair1/PHY/defs_common.h b/openair1/PHY/defs_common.h
index 47e17cc935325af423652d6e9db849239c6857c2..c93e3a7de9c0fa32b5e81b6305d3a9184d4ff107 100644
--- a/openair1/PHY/defs_common.h
+++ b/openair1/PHY/defs_common.h
@@ -754,7 +754,7 @@ typedef struct {
   /// Position of first CCE of the dci
   int firstCCE;
   /// flag to indicate that this is a RA response
-  boolean_t ra_flag;
+  bool ra_flag;
   /// rnti
   rnti_t rnti;
   /// harq_pid
@@ -775,7 +775,7 @@ typedef struct {
   /// Position of first CCE of the dci
   int firstCCE;
   /// flag to indicate that this is a RA response
-  boolean_t ra_flag;
+  bool ra_flag;
   /// rnti
   rnti_t rnti;
   /// Format
@@ -806,7 +806,7 @@ typedef struct {
   /// Position of first CCE of the dci
   int firstCCE;
   /// flag to indicate that this is a RA response
-  boolean_t ra_flag;
+  bool ra_flag;
   /// rnti
   rnti_t rnti;
   /// Format
diff --git a/openair1/PHY/defs_nr_common.h b/openair1/PHY/defs_nr_common.h
index c1c94cc2cc0e6829a757aa620090a0e5deda657a..1b7dffb04e554a7f25d3ef543d8796db17579126 100644
--- a/openair1/PHY/defs_nr_common.h
+++ b/openair1/PHY/defs_nr_common.h
@@ -377,10 +377,10 @@ struct NR_DL_FRAME_PARMS {
   lte_prefix_type_t Ncp;
   /// sequence which is computed based on carrier frequency and numerology to rotate/derotate each OFDM symbol according to Section 5.3 in 38.211
   /// First dimension is for the direction of the link (0 DL, 1 UL)
-  int16_t symbol_rotation[2][224*2];
+  c16_t symbol_rotation[2][224];
   /// sequence used to compensate the phase rotation due to timeshifted OFDM symbols
   /// First dimenstion is for different CP lengths
-  int16_t timeshift_symbol_rotation[4096*2] __attribute__ ((aligned (16)));
+  c16_t timeshift_symbol_rotation[4096*2] __attribute__ ((aligned (16)));
   /// shift of pilot position in one RB
   uint8_t nushift;
   /// SRS configuration from TS 38.331 RRC
diff --git a/openair1/SCHED_NR/phy_procedures_nr_gNB.c b/openair1/SCHED_NR/phy_procedures_nr_gNB.c
index 2c56e2e4b2d8774d8e9b5a3056444b2ef37969c5..1428987d404aa04de86469f5e2688ebf4104033e 100644
--- a/openair1/SCHED_NR/phy_procedures_nr_gNB.c
+++ b/openair1/SCHED_NR/phy_procedures_nr_gNB.c
@@ -625,6 +625,7 @@ int phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx) {
   /* those variables to log T_GNB_PHY_PUCCH_PUSCH_IQ only when we try to decode */
   int pucch_decode_done = 0;
   int pusch_decode_done = 0;
+  int phy_procedures_errors = 0;
 
   VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_gNB_UESPEC_RX,1);
   LOG_D(PHY,"phy_procedures_gNB_uespec_RX frame %d, slot %d\n",frame_rx,slot_rx);
@@ -764,7 +765,8 @@ int phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx) {
           if (no_sig) {
             LOG_D(PHY, "PUSCH not detected in frame %d, slot %d\n", frame_rx, slot_rx);
             nr_fill_indication(gNB, frame_rx, slot_rx, ULSCH_id, harq_pid, 1,1);
-            return 1;
+            phy_procedures_errors++;
+            continue;
           }
           gNB->pusch_vars[ULSCH_id]->ulsch_power_tot=0;
           gNB->pusch_vars[ULSCH_id]->ulsch_noise_power_tot=0;
@@ -788,7 +790,8 @@ int phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx) {
                /* in case of phy_test mode, we still want to decode to measure execution time. 
                   Therefore, we don't yet call nr_fill_indication, it will be called later */
                nr_fill_indication(gNB,frame_rx, slot_rx, ULSCH_id, harq_pid, 1,1);
-               return 1;
+               phy_procedures_errors++;
+               continue;
              }
           } else {
             LOG_D(PHY, "PUSCH detected in %d.%d (%d,%d,%d)\n",frame_rx,slot_rx,
@@ -855,5 +858,5 @@ int phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx) {
   }
 
   VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_gNB_UESPEC_RX,0);
-  return 0;
+  return phy_procedures_errors;
 }
diff --git a/openair1/SCHED_UE/phy_procedures_lte_ue.c b/openair1/SCHED_UE/phy_procedures_lte_ue.c
index aa0ff0db80fe9506d796f9f927464e11add22a38..cdf4cf39f9a59696050985080b93f40a82769fe7 100644
--- a/openair1/SCHED_UE/phy_procedures_lte_ue.c
+++ b/openair1/SCHED_UE/phy_procedures_lte_ue.c
@@ -460,7 +460,7 @@ void ue_compute_srs_occasion(PHY_VARS_UE *ue,
       is_pucch2_subframe = (is_ri_TXOp(ue,proc,eNB_id) && (ue->cqi_report_config[eNB_id].CQI_ReportPeriodic.ri_ConfigIndex>0)) || is_pucch2_subframe;
 
       // check ACK/SR transmission
-      if(frame_parms->soundingrs_ul_config_common.ackNackSRS_SimultaneousTransmission == FALSE) {
+      if(frame_parms->soundingrs_ul_config_common.ackNackSRS_SimultaneousTransmission == false) {
         if(is_SR_TXOp(ue,proc,eNB_id)) {
           uint32_t SR_payload = 0;
 
diff --git a/openair1/SIMULATION/NR_UE_PHY/unit_tests/src/pucch_uci_test.c b/openair1/SIMULATION/NR_UE_PHY/unit_tests/src/pucch_uci_test.c
index 31fe15a6de8ed377a4da95aaa50b82d7d8fa2f8a..12d50065fa83a4e2bc04d522ccbaa6612c31d720 100644
--- a/openair1/SIMULATION/NR_UE_PHY/unit_tests/src/pucch_uci_test.c
+++ b/openair1/SIMULATION/NR_UE_PHY/unit_tests/src/pucch_uci_test.c
@@ -165,7 +165,7 @@ void common_pucch_configuration(PHY_VARS_NR_UE *ue, uint8_t gNB_id, int pucch_in
 int test_pucch_basic_error(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *proc)
 {
   int v_return = 0;
-  bool reset_harq = FALSE;
+  bool reset_harq = false;
 
   printf("%s", tst_separator);
 
@@ -175,7 +175,7 @@ int test_pucch_basic_error(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *pr
 
   common_pucch_configuration(ue, gNB_id, TST_PUCCH_COMMON_CONFIG_INDEX_KO);
 
-  if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != FALSE) {
+  if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != false) {
     v_return = -1;
   }
 
@@ -186,7 +186,7 @@ int test_pucch_basic_error(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *pr
 
   printf("\n  => Test : Error due to acknownlegment not set \n");
 
-  if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != FALSE) {
+  if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != false) {
     v_return = -1;
   }
 
@@ -194,7 +194,7 @@ int test_pucch_basic_error(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *pr
 
   printf("\n  => Test : Error due to DAI not set \n");
 
-  if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != FALSE) {
+  if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != false) {
     v_return = -1;
   }
 
@@ -202,7 +202,7 @@ int test_pucch_basic_error(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *pr
 
   harq_status->vDAI_DL = NR_DL_MAX_DAI + 1;
 
-  if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != FALSE) {
+  if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != false) {
     v_return = -1;
   }
 
@@ -210,7 +210,7 @@ int test_pucch_basic_error(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *pr
 
   harq_status->vDAI_DL = 0;
 
-  if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != FALSE) {
+  if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != false) {
     v_return = -1;
   }
 
@@ -218,7 +218,7 @@ int test_pucch_basic_error(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *pr
 
   harq_status->send_harq_status = 1;  /* ack ready to be send */
 
-  if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != FALSE) {
+  if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != false) {
     v_return = -1;
   }
 
@@ -228,7 +228,7 @@ int test_pucch_basic_error(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *pr
 
   harq_status->vDAI_DL = 1;
 
-  if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != FALSE) {
+  if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != false) {
     v_return = -1;
   }
 
@@ -236,7 +236,7 @@ int test_pucch_basic_error(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *pr
 
   printf("\n  => Test : Error due to PUCCH format with multiple cells not already implemented \n");
 
-  if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != FALSE) {
+  if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != false) {
     v_return = -1;
   }
 
@@ -260,7 +260,7 @@ int test_pucch_basic_error(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *pr
 int test_pucch_common_config_single_transport_block(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *proc)
 {
   int v_return = 0;
-  bool reset_harq = FALSE;
+  bool reset_harq = false;
 
   printf("%s", tst_separator);
 
@@ -273,7 +273,7 @@ int test_pucch_common_config_single_transport_block(PHY_VARS_NR_UE *ue, int gNB_
 
   printf("\n  => Test : PUCCH format from common config in prach mode: one positive downlink ACKnowledgment \n");
 
-  if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != TRUE) {
+  if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) {
    v_return = -1;
   }
 
@@ -281,7 +281,7 @@ int test_pucch_common_config_single_transport_block(PHY_VARS_NR_UE *ue, int gNB_
 
   printf("\n  => Test : PUCCH format from common config in prach mode: one negative downlink ACKnowledgment \n");
 
-  if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != TRUE) {
+  if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) {
    v_return = -1;
   }
 
@@ -304,7 +304,7 @@ int test_pucch_common_config_single_transport_block(PHY_VARS_NR_UE *ue, int gNB_
 
   printf("\n  => Test : PUCCH format from common config in dedicated mode: two positive downlink ACKnowledgments \n");
 
-  if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != TRUE) {
+  if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) {
     v_return = -1;
   }
 
@@ -312,7 +312,7 @@ int test_pucch_common_config_single_transport_block(PHY_VARS_NR_UE *ue, int gNB_
 
   printf("\n  => Test : PUCCH format from common config in dedicated mode: one positive and one negative downlink ACKnowledgments \n");
 
-  if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != TRUE) {
+  if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) {
     v_return = -1;
   }
 
@@ -320,22 +320,22 @@ int test_pucch_common_config_single_transport_block(PHY_VARS_NR_UE *ue, int gNB_
 
   printf("\n  => Test : PUCCH format from common config in dedicated mode: two negative downlink ACKnowledgments \n");
 
-  if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != TRUE) {
+  if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) {
     v_return = -1;
   }
 
   harq_status->ack = DL_ACK;
-  reset_harq = TRUE;
+  reset_harq = true;
 
   printf("\n  => Test : PUCCH format from common config in dedicated mode: no resource is found \n");
 
-  if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != FALSE) {
+  if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != false) {
     v_return = -1;
   }
 
   printf("\n  => Test : PUCCH format from common config in dedicated mode: no PUCCH after reset of pending harq ACKnowledgments \n");
 
-  if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != FALSE) {
+  if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != false) {
     v_return = -1;
   }
 
@@ -362,7 +362,7 @@ void init_pucch_dedicated_configuration(PHY_VARS_NR_UE *ue, uint8_t gNB_id)
   int i,j;
 
   /* set cell group parameters which are supported */
-  ue->cell_group_config.physicalCellGroupConfig.harq_ACK_SpatialBundlingPUCCH = FALSE;
+  ue->cell_group_config.physicalCellGroupConfig.harq_ACK_SpatialBundlingPUCCH = false;
   ue->cell_group_config.physicalCellGroupConfig.pdsch_HARQ_ACK_Codebook = dynamic;
 
   ue->PDSCH_ServingCellConfig.codeBlockGroupTransmission = NULL;
@@ -554,7 +554,7 @@ int test_pucch_dedicated_single_transport_block(PHY_VARS_NR_UE *ue, int gNB_id,
 #define   TST_NB_STEP_SINGLE_TRANSPORT_BLOCK      (4)
 
   int v_return = 0;
-  int reset_harq = FALSE;
+  int reset_harq = false;
   int dl_harq_pid[TST_NB_STEP_SINGLE_TRANSPORT_BLOCK] = {TST_DL_HARQ_PID_FIRST, TST_DL_HARQ_PID_SECOND, TST_DL_HARQ_PID_THIRD, TST_DL_HARQ_PID_FOURTH };
   int pucch_resource_indicator[TST_NB_STEP_SINGLE_TRANSPORT_BLOCK][2] = { { 0, 4 }, { 1, 0 } , { 1, 3 } , { 5, 7 } };
   NR_UE_HARQ_STATUS_t *harq_status;
@@ -575,7 +575,7 @@ int test_pucch_dedicated_single_transport_block(PHY_VARS_NR_UE *ue, int gNB_id,
 
   printf("\n  => Test : PUCCH format from dedicated config : pucch resource indicator is invalid \n");
 
-  if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != FALSE) {
+  if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != false) {
     v_return = -1;
   }
 
@@ -595,14 +595,14 @@ int test_pucch_dedicated_single_transport_block(PHY_VARS_NR_UE *ue, int gNB_id,
 
       /* reset ack context on last test */
       if ((i == (TST_NB_STEP_SINGLE_TRANSPORT_BLOCK-1)) && (j == 1)) {
-        reset_harq = TRUE;
+        reset_harq = true;
       }
 
       harq_status->pucch_resource_indicator = pucch_resource_indicator[i][j];
 
       printf("\n  => Test : PUCCH format from dedicated config with 1 transport block : with %d downlink ACKnowledgments and pucch resource indicator %d \n", i+1, pucch_resource_indicator[i][j]);
 
-      if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != TRUE) {
+      if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) {
         v_return = -1;
       }
     }
@@ -627,11 +627,11 @@ int test_pucch_dedicated_single_transport_block(PHY_VARS_NR_UE *ue, int gNB_id,
     harq_status->pucch_resource_indicator = pucch_resource_indicator[i][0];
   }
 
-  reset_harq = TRUE;
+  reset_harq = true;
 
   printf("\n  => Test : PUCCH format from dedicated config with 1 transport block and missed PDSCH : with %d downlink ACKnowledgments and pucch resource indicator %d \n", i+1, pucch_resource_indicator[3][0]);
 
-  if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != TRUE) {
+  if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) {
     v_return = -1;
   }
 
@@ -659,7 +659,7 @@ int test_pucch_dedicated_two_transport_blocks(PHY_VARS_NR_UE *ue, int gNB_id, UE
 #define   TST_NB_STEP_TWO_TRANSPORT_BLOCKS      (4)
 
   int v_return = 0;
-  int reset_harq = FALSE;
+  int reset_harq = false;
   int dl_harq_pid[TST_NB_STEP_TWO_TRANSPORT_BLOCKS] = {TST_DL_HARQ_PID_FIRST, TST_DL_HARQ_PID_SECOND, TST_DL_HARQ_PID_THIRD, TST_DL_HARQ_PID_FOURTH };
   int pucch_resource_indicator[TST_NB_STEP_TWO_TRANSPORT_BLOCKS][2] = { { 0, 1 }, { 3, 7 } , { 2 , 4 } , { 4 , 6 } };
   NR_UE_HARQ_STATUS_t *harq_status;
@@ -694,7 +694,7 @@ int test_pucch_dedicated_two_transport_blocks(PHY_VARS_NR_UE *ue, int gNB_id, UE
 
       /* reset ack context on last test */
       if ((i == (TST_NB_STEP_TWO_TRANSPORT_BLOCKS-1)) && (j == 1)) {
-        reset_harq = TRUE;
+        reset_harq = true;
       }
 
       harq_status = &ue->dlsch[proc->thread_id][gNB_id][0]->harq_processes[dl_harq_pid[i]].harq_ack;
@@ -703,7 +703,7 @@ int test_pucch_dedicated_two_transport_blocks(PHY_VARS_NR_UE *ue, int gNB_id, UE
 
       printf("\n  => Test : PUCCH format from dedicated config with 2 transport blocks : with %d downlink ACKnowledgments and pucch resource indicator %d \n", i+1, pucch_resource_indicator[i][j]);
 
-      if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != TRUE) {
+      if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) {
         printf("Test fail \n");
         v_return = -1;
       }
@@ -714,7 +714,7 @@ int test_pucch_dedicated_two_transport_blocks(PHY_VARS_NR_UE *ue, int gNB_id, UE
   /* some transport blocks have been missed and they need to be nack by UE in order to be retransmitted by the network */
   /* here first and third block receptions have been missed */
 
-  reset_harq = TRUE;
+  reset_harq = true;
 
   for (int i = 1; i < TST_NB_STEP_TWO_TRANSPORT_BLOCKS; i = i + 1) {
 
@@ -743,7 +743,7 @@ int test_pucch_dedicated_two_transport_blocks(PHY_VARS_NR_UE *ue, int gNB_id, UE
 
   printf("\n  => Test : PUCCH format from dedicated config with 2 transport blocks and 1 missed PDSCH : with %d downlink ACKnowledgments and pucch resource indicator %d \n", 4, pucch_resource_indicator[3][0]);
 
-  if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != TRUE) {
+  if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) {
     printf("Test fail \n");
     v_return = -1;
   }
@@ -775,7 +775,7 @@ int test_pucch_dedicated_two_transport_blocks(PHY_VARS_NR_UE *ue, int gNB_id, UE
     }
   }
 
-  if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != TRUE) {
+  if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) {
    printf("Test fail \n");
    v_return = -1;
   }
@@ -907,7 +907,7 @@ int test_sr_alone_dedicated(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *p
 
   tst_scheduling_request_payload = 0;
 
-  if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != FALSE) {
+  if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != false) {
    printf("Test fail \n");
    v_return = -1;
   }
@@ -916,7 +916,7 @@ int test_sr_alone_dedicated(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *p
 
   tst_scheduling_request_payload = 1;
 
-  if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != TRUE) {
+  if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) {
     printf("Test fail \n");
     v_return = -1;
   }
@@ -929,7 +929,7 @@ int test_sr_alone_dedicated(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *p
 
   tst_scheduling_request_payload = 1;
 
-  if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != TRUE) {
+  if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) {
     printf("Test fail \n");
     v_return = -1;
   }
@@ -958,7 +958,7 @@ int test_sr_alone_dedicated(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *p
 int test_sr_ack_dedicated(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *proc)
 {
   int v_return = 0;
-  int reset_harq = 0;
+  bool reset_harq = false;
   int sr_config_id = 0;
   int sr_resource_id = 0;
   int sr_offset = 0;
@@ -988,7 +988,7 @@ int test_sr_ack_dedicated(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *pro
 
   tst_scheduling_request_payload = 0;  /* set sr payload */
 
-  if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != TRUE) {
+  if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) {
     printf("Test fail \n");
     v_return = -1;
   }
@@ -997,7 +997,7 @@ int test_sr_ack_dedicated(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *pro
 
   tst_scheduling_request_payload = 1;  /* set sr payload */
 
-  if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != TRUE) {
+  if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) {
    printf("Test fail \n");
    v_return = -1;
   }
@@ -1006,7 +1006,7 @@ int test_sr_ack_dedicated(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *pro
 
   harq_status->pucch_resource_indicator = pucch_resource_indicator[1];
 
-  if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != TRUE) {
+  if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) {
     printf("Test fail \n");
     v_return = -1;
   }
@@ -1027,7 +1027,7 @@ int test_sr_ack_dedicated(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *pro
 
   tst_scheduling_request_payload = 1;  /* set sr payload */
 
-  if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != TRUE) {
+  if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) {
     printf("Test fail \n");
     v_return = -1;
   }
@@ -1035,9 +1035,9 @@ int test_sr_ack_dedicated(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *pro
   printf("\n  => Test : PUCCH format from dedicated config with a positive scheduling request and two positive acks \n");
 
   harq_status->pucch_resource_indicator = pucch_resource_indicator[1];
-  reset_harq = TRUE;
+  reset_harq = true;
 
-  if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != TRUE) {
+  if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) {
    printf("Test fail \n");
    v_return = -1;
   }
@@ -1065,7 +1065,7 @@ int test_sr_ack_dedicated(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *pro
 int test_csi_dedicated(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *proc)
 {
   int v_return = 0;
-  int reset_harq = FALSE;
+  int reset_harq = false;
   int sr_config_id = 0;
   int sr_resource_id = 0;
   int sr_offset = 0;
@@ -1079,7 +1079,7 @@ int test_csi_dedicated(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *proc)
 
   printf("\n  => Test : PUCCH format from dedicated config with CSI alone \n");
 
-  if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != TRUE) {
+  if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) {
     printf("Test fail \n");
     v_return = -1;
   }
@@ -1102,7 +1102,7 @@ int test_csi_dedicated(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *proc)
 
   ue->pucch_config_dedicated_nr[gNB_id].formatConfig[2-1]->simultaneousHARQ_ACK_CSI = enable_feature; /* format 2 */
 
-  if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != TRUE) {
+  if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) {
     printf("Test fail \n");
     v_return = -1;
   }
@@ -1115,9 +1115,9 @@ int test_csi_dedicated(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *proc)
 
   tst_scheduling_request_payload = 0;  /* set sr payload */
 
-  reset_harq = TRUE;
+  reset_harq = true;
 
-  if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != TRUE) {
+  if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) {
     printf("Test fail \n");
     v_return = -1;
   }
@@ -1126,7 +1126,7 @@ int test_csi_dedicated(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *proc)
 
   harq_status->pucch_resource_indicator = pucch_resource_indicator[4];
 
-  if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != TRUE) {
+  if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) {
     printf("Test fail \n");
     v_return = -1;
   }
@@ -1135,7 +1135,7 @@ int test_csi_dedicated(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *proc)
 
   printf("\n  => Test : PUCCH format from dedicated config with positive SR and CSI \n");
 
-  if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != TRUE) {
+  if (pucch_procedures_ue_nr(ue, gNB_id, proc, reset_harq) != true) {
     printf("Test fail \n");
     v_return = -1;
   }
diff --git a/openair2/COMMON/commonDef.h b/openair2/COMMON/commonDef.h
index b37230cdd45ffbd9154556bb4ed5aa46d7185af6..e18db881f04940f74e4bfeb6a4e9ac7e1b8cfc6a 100644
--- a/openair2/COMMON/commonDef.h
+++ b/openair2/COMMON/commonDef.h
@@ -43,27 +43,6 @@ Description Contains global common definitions
 #include <stddef.h>
 #include <stdbool.h>
 
-/* boolean_t is also defined in openair2/COMMON/platform_types.h
- * let's protect potential redefinition
- */
-
-#ifndef _BOOLEAN_T_DEFINED_
-#define _BOOLEAN_T_DEFINED_
-
-typedef signed char        boolean_t;
-
-#if !defined(TRUE)
-#define TRUE               (boolean_t)0x01
-#endif
-
-#if !defined(FALSE)
-#define FALSE              (boolean_t)0x00
-#endif
-
-#define BOOL_NOT(b) (b^TRUE)
-
-#endif /* _BOOLEAN_T_DEFINED_ */
-
 #define NAS_UE_ID_FMT "0x%06x"
 
 /****************************************************************************/
diff --git a/openair2/COMMON/mac_rlc_primitives.h b/openair2/COMMON/mac_rlc_primitives.h
index 4e3e22781c5fbb9494c23f271ddfe543bae2be2f..3d6dcc810035471bfc87fb8d97763ce1e427abb8 100644
--- a/openair2/COMMON/mac_rlc_primitives.h
+++ b/openair2/COMMON/mac_rlc_primitives.h
@@ -145,7 +145,7 @@ struct mac_tx_tb_management {
 struct mac_rx_tb_management {
   unsigned char             *data_ptr;
   tb_size_t                  tb_size;      // in bits
-  boolean_t                  valid_checksum;
+  bool                       valid_checksum;
   unsigned char              first_bit;    // 0 if data starts on byte boundary(b7), 1 if b6, 2 if b5, etc
 };
 
diff --git a/openair2/COMMON/platform_types.h b/openair2/COMMON/platform_types.h
index 67300da308b92ed05e7f901ae15436794f675826..f2297219936779186ef88ea245bc0016e6871221 100644
--- a/openair2/COMMON/platform_types.h
+++ b/openair2/COMMON/platform_types.h
@@ -32,35 +32,12 @@
 
 #if !defined(NAS_NETLINK)
 #include <stdint.h>
+#include <stdbool.h>
 #else
 #include <linux/types.h>
 typedef void * intptr_t;
 #endif
 
-//-----------------------------------------------------------------------------
-// GENERIC TYPES
-//-----------------------------------------------------------------------------
-
-/* boolean_t is also defined in openair2/COMMON/commonDef.h,
- * let's protect potential redefinition
- */
-#ifndef _BOOLEAN_T_DEFINED_
-  #define _BOOLEAN_T_DEFINED_
-
-  typedef signed char        boolean_t;
-
-  #if !defined(TRUE)
-    #define TRUE               (boolean_t)0x01
-  #endif
-
-  #if !defined(FALSE)
-    #define FALSE              (boolean_t)0x00
-  #endif
-
-  #define BOOL_NOT(b) (b^TRUE)
-
-#endif /* _BOOLEAN_T_DEFINED_ */
-
 //-----------------------------------------------------------------------------
 // GENERIC ACCESS STRATUM TYPES
 //-----------------------------------------------------------------------------
@@ -77,25 +54,25 @@ typedef int16_t               smodule_id_t;
 typedef long              rb_id_t;
 typedef long              srb_id_t;
 
-typedef boolean_t             MBMS_flag_t;
-#define  MBMS_FLAG_NO         FALSE
-#define  MBMS_FLAG_YES        TRUE
+typedef bool MBMS_flag_t;
+#define MBMS_FLAG_NO  false
+#define MBMS_FLAG_YES true
 
-typedef boolean_t             eNB_flag_t;
-#define  ENB_FLAG_NO          FALSE
-#define  ENB_FLAG_YES         TRUE
+typedef bool eNB_flag_t;
+#define ENB_FLAG_NO  false
+#define ENB_FLAG_YES true
 
-typedef boolean_t             gNB_flag_t;
-#define  GNB_FLAG_NO          FALSE
-#define  GNB_FLAG_YES         TRUE
+typedef bool gNB_flag_t;
+#define GNB_FLAG_NO  false
+#define GNB_FLAG_YES true
 
-typedef boolean_t             srb_flag_t;
-#define  SRB_FLAG_NO          FALSE
-#define  SRB_FLAG_YES         TRUE
+typedef bool srb_flag_t;
+#define SRB_FLAG_NO  false
+#define SRB_FLAG_YES true
 
-typedef boolean_t             sl_discovery_flag_t;
-#define  SL_DISCOVERY_FLAG_NO          FALSE
-#define  SL_DISCOVERY_FLAG_YES         TRUE
+typedef bool sl_discovery_flag_t;
+#define SL_DISCOVERY_FLAG_NO  false
+#define SL_DISCOVERY_FLAG_YES true
 
 typedef enum link_direction_e {
   UNKNOWN_DIR          = 0,
@@ -152,8 +129,8 @@ typedef uint16_t           rlc_usn_t;
 typedef int32_t            rlc_buffer_occupancy_t;
 typedef signed int         rlc_op_status_t;
 
-#define  SDU_CONFIRM_NO          FALSE
-#define  SDU_CONFIRM_YES         TRUE
+#define  SDU_CONFIRM_NO          false
+#define  SDU_CONFIRM_YES         true
 //-----------------------------------------------------------------------------
 // PDCP TYPES
 //-----------------------------------------------------------------------------
@@ -242,7 +219,7 @@ typedef struct protocol_ctxt_s {
   frame_t     frame;         /*!< \brief  LTE frame number.*/
   sub_frame_t subframe;      /*!< \brief  LTE sub frame number.*/
   eNB_index_t eNB_index;     /*!< \brief  valid for UE indicating the index of connected eNB(s)      */
-  boolean_t		brOption;
+  bool        brOption;
 } protocol_ctxt_t;
 // warning time hardcoded
 #define PROTOCOL_CTXT_TIME_MILLI_SECONDS(CtXt_h) ((CtXt_h)->frame*10+(CtXt_h)->subframe)
diff --git a/openair2/ENB_APP/enb_config.c b/openair2/ENB_APP/enb_config.c
index f4550f63a15b3e067da94975db420b3c57d221af..00ffd4cc1342776915c8608a364476345c7212f9 100644
--- a/openair2/ENB_APP/enb_config.c
+++ b/openair2/ENB_APP/enb_config.c
@@ -583,9 +583,9 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
                              "Failed to parse eNB configuration file %s, enb %u define %s: ENABLE,DISABLE!\n",
                              RC.config_file_name, i, ENB_CONFIG_STRING_PRACH_HIGH_SPEED);
               else if (strcmp(ccparams_lte.prach_high_speed, "ENABLE") == 0) {
-                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].prach_high_speed = TRUE;
+                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].prach_high_speed = true;
               } else if (strcmp(ccparams_lte.prach_high_speed, "DISABLE") == 0) {
-                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].prach_high_speed = FALSE;
+                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].prach_high_speed = false;
               } else
                 AssertFatal (0,
                              "Failed to parse eNB configuration file %s, enb %u unknown value \"%s\" for prach_config choice: ENABLE,DISABLE !\n",
@@ -689,9 +689,9 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
                              "Failed to parse eNB configuration file %s, enb %u define %s: ENABLE,DISABLE!\n",
                              RC.config_file_name, i, ENB_CONFIG_STRING_PUSCH_ENABLE64QAM);
               else if (strcmp(ccparams_lte.pusch_enable64QAM, "ENABLE") == 0) {
-                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pusch_enable64QAM = TRUE;
+                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pusch_enable64QAM = true;
               } else if (strcmp(ccparams_lte.pusch_enable64QAM, "DISABLE") == 0) {
-                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pusch_enable64QAM = FALSE;
+                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pusch_enable64QAM = false;
               } else
                 AssertFatal (0,
                              "Failed to parse eNB configuration file %s, enb %u unknown value \"%s\" for pusch_enable64QAM choice: ENABLE,DISABLE!\n",
@@ -702,9 +702,9 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
                              "Failed to parse eNB configuration file %s, enb %u define %s: ENABLE,DISABLE!\n",
                              RC.config_file_name, i, ENB_CONFIG_STRING_PUSCH_GROUP_HOPPING_EN);
               else if (strcmp(ccparams_lte.pusch_groupHoppingEnabled, "ENABLE") == 0) {
-                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pusch_groupHoppingEnabled = TRUE;
+                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pusch_groupHoppingEnabled = true;
               } else if (strcmp(ccparams_lte.pusch_groupHoppingEnabled, "DISABLE") == 0) {
-                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pusch_groupHoppingEnabled= FALSE;
+                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pusch_groupHoppingEnabled= false;
               } else
                 AssertFatal (0,
                              "Failed to parse eNB configuration file %s, enb %u unknown value \"%s\" for pusch_groupHoppingEnabled choice: ENABLE,DISABLE!\n",
@@ -723,9 +723,9 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
                              "Failed to parse eNB configuration file %s, enb %u define %s: ENABLE,DISABLE!\n",
                              RC.config_file_name, i, ENB_CONFIG_STRING_PUSCH_SEQUENCE_HOPPING_EN);
               else if (strcmp(ccparams_lte.pusch_sequenceHoppingEnabled, "ENABLE") == 0) {
-                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pusch_sequenceHoppingEnabled = TRUE;
+                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pusch_sequenceHoppingEnabled = true;
               } else if (strcmp(ccparams_lte.pusch_sequenceHoppingEnabled, "DISABLE") == 0) {
-                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pusch_sequenceHoppingEnabled = FALSE;
+                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pusch_sequenceHoppingEnabled = false;
               } else
                 AssertFatal (0,
                              "Failed to parse eNB configuration file %s, enb %u unknown value \"%s\" for pusch_sequenceHoppingEnabled choice: ENABLE,DISABLE!\n",
@@ -766,15 +766,15 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
                      RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].phich_duration,ccparams_lte.phich_duration);
 
               if (strcmp(ccparams_lte.srs_enable, "ENABLE") == 0) {
-                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].srs_enable= TRUE;
+                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].srs_enable= true;
               } else if (strcmp(ccparams_lte.srs_enable, "DISABLE") == 0) {
-                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].srs_enable= FALSE;
+                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].srs_enable= false;
               } else
                 AssertFatal (0,
                              "Failed to parse eNB configuration file %s, enb %u unknown value \"%s\" for srs_BandwidthConfig choice: ENABLE,DISABLE !\n",
                              RC.config_file_name, i, ccparams_lte.srs_enable);
 
-              if (RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].srs_enable== TRUE) {
+              if (RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].srs_enable== true) {
                 RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].srs_BandwidthConfig= ccparams_lte.srs_BandwidthConfig;
 
                 if ((ccparams_lte.srs_BandwidthConfig < 0) ||
@@ -791,18 +791,18 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
                                RC.config_file_name, i, ccparams_lte.srs_SubframeConfig);
 
                 if (strcmp(ccparams_lte.srs_ackNackST, "ENABLE") == 0) {
-                  RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].srs_ackNackST= TRUE;
+                  RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].srs_ackNackST= true;
                 } else if (strcmp(ccparams_lte.srs_ackNackST, "DISABLE") == 0) {
-                  RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].srs_ackNackST= FALSE;
+                  RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].srs_ackNackST= false;
                 } else
                   AssertFatal (0,
                                "Failed to parse eNB configuration file %s, enb %u unknown value \"%s\" for srs_BandwidthConfig choice: ENABLE,DISABLE !\n",
                                RC.config_file_name, i, ccparams_lte.srs_ackNackST);
 
                 if (strcmp(ccparams_lte.srs_MaxUpPts, "ENABLE") == 0) {
-                  RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].srs_MaxUpPts= TRUE;
+                  RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].srs_MaxUpPts= true;
                 } else if (strcmp(ccparams_lte.srs_MaxUpPts, "DISABLE") == 0) {
-                  RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].srs_MaxUpPts= FALSE;
+                  RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].srs_MaxUpPts= false;
                 } else
                   AssertFatal (0,
                                "Failed to parse eNB configuration file %s, enb %u unknown value \"%s\" for srs_MaxUpPts choice: ENABLE,DISABLE !\n",
@@ -921,7 +921,7 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
                              RC.config_file_name, i, ccparams_lte.rach_numberOfRA_Preambles);
 
               if (strcmp(ccparams_lte.rach_preamblesGroupAConfig, "ENABLE") == 0) {
-                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].rach_preamblesGroupAConfig= TRUE;
+                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].rach_preamblesGroupAConfig= true;
                 RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].rach_sizeOfRA_PreamblesGroupA= (ccparams_lte.rach_sizeOfRA_PreamblesGroupA/4)-1;
 
                 if ((ccparams_lte.rach_numberOfRA_Preambles <4) ||
@@ -976,7 +976,7 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
                                "Failed to parse eNB configuration file %s, enb %u unknown value \"%s\" for rach_messagePowerOffsetGroupB choice: minusinfinity,dB0,dB5,dB8,dB10,dB12,dB15,dB18!\n",
                                RC.config_file_name, i, ccparams_lte.rach_messagePowerOffsetGroupB);
               } else if (strcmp(ccparams_lte.rach_preamblesGroupAConfig, "DISABLE") == 0) {
-                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].rach_preamblesGroupAConfig= FALSE;
+                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].rach_preamblesGroupAConfig= false;
               } else
                 AssertFatal (0,
                              "Failed to parse eNB configuration file %s, enb %u unknown value \"%s\" for rach_preamblesGroupAConfig choice: ENABLE,DISABLE !\n",
@@ -1254,9 +1254,9 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
                              "Failed to parse eNB configuration file %s, enb %u define %s: TRUE,FALSE!\n",
                              RC.config_file_name, i, ENB_CONFIG_STRING_MBMS_DEDICATED_SERVING_CELL);
               else if (strcmp(ccparams_lte.mbms_dedicated_serving_cell, "ENABLE") == 0) {
-                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].mbms_dedicated_serving_cell = TRUE;
+                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].mbms_dedicated_serving_cell = true;
               } else  if (strcmp(ccparams_lte.mbms_dedicated_serving_cell, "DISABLE") == 0) {
-                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].mbms_dedicated_serving_cell  = FALSE;
+                RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].mbms_dedicated_serving_cell  = false;
               } else {
                 AssertFatal (0,
                              "Failed to parse eNB configuration file %s, enb %u unknown value \"%s\" for mbms_dedicated_serving_cell choice: TRUE or FALSE !\n",
diff --git a/openair2/ENB_APP/enb_config_eMTC.c b/openair2/ENB_APP/enb_config_eMTC.c
index 2e71f17e9d871365b39eec6bea908caaf01c0bb3..e4ff458886b06fe99437de821d834c7a33e090dd 100644
--- a/openair2/ENB_APP/enb_config_eMTC.c
+++ b/openair2/ENB_APP/enb_config_eMTC.c
@@ -61,18 +61,18 @@ void fill_eMTC_configuration(MessageDef *msg_p,  ccparams_eMTC_t *eMTCconfig, in
 
 
   if (!strcmp(eMTCconfig->cellSelectionInfoCE_r13, "ENABLE")) {
-    RRC_CONFIGURATION_REQ(msg_p).cellSelectionInfoCE_r13[cc_idx] = TRUE;
+    RRC_CONFIGURATION_REQ(msg_p).cellSelectionInfoCE_r13[cc_idx] = true;
     RRC_CONFIGURATION_REQ(msg_p).q_RxLevMinCE_r13[cc_idx]= eMTCconfig->q_RxLevMinCE_r13;
     //                            RRC_CONFIGURATION_REQ(msg_p).q_QualMinRSRQ_CE_r13[cc_idx]= calloc(1, sizeof(long));
     //                            *RRC_CONFIGURATION_REQ(msg_p).q_QualMinRSRQ_CE_r13[cc_idx]= q_QualMinRSRQ_CE_r13;
   } else {
-    RRC_CONFIGURATION_REQ(msg_p).cellSelectionInfoCE_r13[cc_idx] = FALSE;
+    RRC_CONFIGURATION_REQ(msg_p).cellSelectionInfoCE_r13[cc_idx] = false;
   }
 
 
 
   if (!strcmp(eMTCconfig->bandwidthReducedAccessRelatedInfo_r13, "ENABLE")) {
-    RRC_CONFIGURATION_REQ(msg_p).bandwidthReducedAccessRelatedInfo_r13[cc_idx] = TRUE;
+    RRC_CONFIGURATION_REQ(msg_p).bandwidthReducedAccessRelatedInfo_r13[cc_idx] = true;
 
 
 
@@ -106,7 +106,7 @@ void fill_eMTC_configuration(MessageDef *msg_p,  ccparams_eMTC_t *eMTCconfig, in
     }
 
   } else {
-    RRC_CONFIGURATION_REQ(msg_p).bandwidthReducedAccessRelatedInfo_r13[cc_idx] = FALSE;
+    RRC_CONFIGURATION_REQ(msg_p).bandwidthReducedAccessRelatedInfo_r13[cc_idx] = false;
   }
 
   char schedulingInfoBrPath[MAX_OPTNAME_SIZE * 2];
@@ -127,10 +127,10 @@ void fill_eMTC_configuration(MessageDef *msg_p,  ccparams_eMTC_t *eMTCconfig, in
 
   RRC_CONFIGURATION_REQ(msg_p).fdd_DownlinkOrTddSubframeBitmapBR_r13[cc_idx] = CALLOC(1, sizeof(BOOLEAN_t));
   if (!strcmp(eMTCconfig->fdd_DownlinkOrTddSubframeBitmapBR_r13, "subframePattern40-r13")) {
-    *RRC_CONFIGURATION_REQ(msg_p).fdd_DownlinkOrTddSubframeBitmapBR_r13[cc_idx] = FALSE;
+    *RRC_CONFIGURATION_REQ(msg_p).fdd_DownlinkOrTddSubframeBitmapBR_r13[cc_idx] = false;
     RRC_CONFIGURATION_REQ(msg_p).fdd_DownlinkOrTddSubframeBitmapBR_val_r13[cc_idx] = eMTCconfig->fdd_DownlinkOrTddSubframeBitmapBR_val_r13;
   } else {
-    *RRC_CONFIGURATION_REQ(msg_p).fdd_DownlinkOrTddSubframeBitmapBR_r13[cc_idx] = TRUE;
+    *RRC_CONFIGURATION_REQ(msg_p).fdd_DownlinkOrTddSubframeBitmapBR_r13[cc_idx] = true;
     RRC_CONFIGURATION_REQ(msg_p).fdd_DownlinkOrTddSubframeBitmapBR_val_r13[cc_idx] = eMTCconfig->fdd_DownlinkOrTddSubframeBitmapBR_val_r13;
   }
 
@@ -156,18 +156,18 @@ void fill_eMTC_configuration(MessageDef *msg_p,  ccparams_eMTC_t *eMTCconfig, in
 
   if (!strcmp(eMTCconfig->freqHoppingParametersDL_r13, "ENABLE"))
     {
-      RRC_CONFIGURATION_REQ(msg_p).freqHoppingParametersDL_r13[cc_idx] = TRUE;
+      RRC_CONFIGURATION_REQ(msg_p).freqHoppingParametersDL_r13[cc_idx] = true;
 
       if (!strcmp(eMTCconfig->interval_DLHoppingConfigCommonModeA_r13, "interval-TDD-r13"))
-	RRC_CONFIGURATION_REQ(msg_p).interval_DLHoppingConfigCommonModeA_r13[cc_idx] = FALSE;
+	RRC_CONFIGURATION_REQ(msg_p).interval_DLHoppingConfigCommonModeA_r13[cc_idx] = false;
       else
-	RRC_CONFIGURATION_REQ(msg_p).interval_DLHoppingConfigCommonModeA_r13[cc_idx] = TRUE;
+	RRC_CONFIGURATION_REQ(msg_p).interval_DLHoppingConfigCommonModeA_r13[cc_idx] = true;
       RRC_CONFIGURATION_REQ(msg_p).interval_DLHoppingConfigCommonModeA_r13_val[cc_idx] = eMTCconfig->interval_DLHoppingConfigCommonModeA_r13_val;
 
       if (!strcmp(eMTCconfig->interval_DLHoppingConfigCommonModeB_r13, "interval-TDD-r13"))
-	RRC_CONFIGURATION_REQ(msg_p).interval_DLHoppingConfigCommonModeB_r13[cc_idx] = FALSE;
+	RRC_CONFIGURATION_REQ(msg_p).interval_DLHoppingConfigCommonModeB_r13[cc_idx] = false;
       else
-	RRC_CONFIGURATION_REQ(msg_p).interval_DLHoppingConfigCommonModeB_r13[cc_idx] = TRUE;
+	RRC_CONFIGURATION_REQ(msg_p).interval_DLHoppingConfigCommonModeB_r13[cc_idx] = true;
       RRC_CONFIGURATION_REQ(msg_p).interval_DLHoppingConfigCommonModeB_r13_val[cc_idx] = eMTCconfig->interval_DLHoppingConfigCommonModeB_r13_val;
 
       RRC_CONFIGURATION_REQ(msg_p).mpdcch_pdsch_HoppingNB_r13[cc_idx] = calloc(1, sizeof(long));
@@ -188,7 +188,7 @@ void fill_eMTC_configuration(MessageDef *msg_p,  ccparams_eMTC_t *eMTCconfig, in
     }
   else
     {
-      RRC_CONFIGURATION_REQ(msg_p).freqHoppingParametersDL_r13[cc_idx] = FALSE;
+      RRC_CONFIGURATION_REQ(msg_p).freqHoppingParametersDL_r13[cc_idx] = false;
     }
 
   /** ------------------------------SIB2/3 BR------------------------------------------ */
@@ -213,9 +213,9 @@ void fill_eMTC_configuration(MessageDef *msg_p,  ccparams_eMTC_t *eMTCconfig, in
 		 "Failed to parse eNB configuration file %s, enb %d define %s: ENABLE,DISABLE!\n",
 		 config_fname, cell_idx,ENB_CONFIG_STRING_PRACH_HIGH_SPEED);
   else if (strcmp(eMTCconfig->ccparams.prach_high_speed, "ENABLE") == 0) {
-    RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].prach_high_speed = TRUE;
+    RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].prach_high_speed = true;
   } else if (strcmp(eMTCconfig->ccparams.prach_high_speed, "DISABLE") == 0) {
-    RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].prach_high_speed = FALSE;
+    RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].prach_high_speed = false;
   } else
     AssertFatal (0,
 		 "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for prach_config choice: ENABLE,DISABLE !\n",
@@ -310,9 +310,9 @@ void fill_eMTC_configuration(MessageDef *msg_p,  ccparams_eMTC_t *eMTCconfig, in
 		 "Failed to parse eNB configuration file %s, enb %d define %s: ENABLE,DISABLE!\n",
 		 config_fname, cell_idx,ENB_CONFIG_STRING_PUSCH_ENABLE64QAM);
   else if (strcmp(eMTCconfig->ccparams.pusch_enable64QAM, "ENABLE") == 0) {
-    RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pusch_enable64QAM = TRUE;
+    RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pusch_enable64QAM = true;
   }  else if (strcmp(eMTCconfig->ccparams.pusch_enable64QAM, "DISABLE") == 0) {
-    RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pusch_enable64QAM = FALSE;
+    RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pusch_enable64QAM = false;
   } else
     AssertFatal (0,
 		 "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pusch_enable64QAM choice: ENABLE,DISABLE!\n",
@@ -323,9 +323,9 @@ void fill_eMTC_configuration(MessageDef *msg_p,  ccparams_eMTC_t *eMTCconfig, in
 		 "Failed to parse eNB configuration file %s, enb %d define %s: ENABLE,DISABLE!\n",
 		 config_fname, cell_idx,ENB_CONFIG_STRING_PUSCH_GROUP_HOPPING_EN);
   else if (strcmp(eMTCconfig->ccparams.pusch_groupHoppingEnabled, "ENABLE") == 0) {
-    RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pusch_groupHoppingEnabled = TRUE;
+    RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pusch_groupHoppingEnabled = true;
   }  else if (strcmp(eMTCconfig->ccparams.pusch_groupHoppingEnabled, "DISABLE") == 0) {
-    RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pusch_groupHoppingEnabled= FALSE;
+    RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pusch_groupHoppingEnabled= false;
   } else
     AssertFatal (0,
 		 "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pusch_groupHoppingEnabled choice: ENABLE,DISABLE!\n",
@@ -343,9 +343,9 @@ void fill_eMTC_configuration(MessageDef *msg_p,  ccparams_eMTC_t *eMTCconfig, in
 		 "Failed to parse eNB configuration file %s, enb %d define %s: ENABLE,DISABLE!\n",
 		 config_fname, cell_idx,ENB_CONFIG_STRING_PUSCH_SEQUENCE_HOPPING_EN);
   else if (strcmp(eMTCconfig->ccparams.pusch_sequenceHoppingEnabled, "ENABLE") == 0) {
-    RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pusch_sequenceHoppingEnabled = TRUE;
+    RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pusch_sequenceHoppingEnabled = true;
   }  else if (strcmp(eMTCconfig->ccparams.pusch_sequenceHoppingEnabled, "DISABLE") == 0) {
-    RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pusch_sequenceHoppingEnabled = FALSE;
+    RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].pusch_sequenceHoppingEnabled = false;
   } else
     AssertFatal (0,
 		 "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pusch_sequenceHoppingEnabled choice: ENABLE,DISABLE!\n",
@@ -385,15 +385,15 @@ void fill_eMTC_configuration(MessageDef *msg_p,  ccparams_eMTC_t *eMTCconfig, in
 	 RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].phich_duration,eMTCconfig->ccparams.phich_duration);
 
   if (strcmp(eMTCconfig->ccparams.srs_enable, "ENABLE") == 0) {
-    RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].srs_enable= TRUE;
+    RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].srs_enable= true;
   } else if (strcmp(eMTCconfig->ccparams.srs_enable, "DISABLE") == 0) {
-    RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].srs_enable= FALSE;
+    RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].srs_enable= false;
   } else
     AssertFatal (0,
 		 "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for srs_BandwidthConfig choice: ENABLE,DISABLE !\n",
 		 config_fname, cell_idx,eMTCconfig->ccparams.srs_enable);
 
-  if (RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].srs_enable== TRUE) {
+  if (RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].srs_enable== true) {
     RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].srs_BandwidthConfig= eMTCconfig->ccparams.srs_BandwidthConfig;
 
     if ((eMTCconfig->ccparams.srs_BandwidthConfig < 0) || (eMTCconfig->ccparams.srs_BandwidthConfig >7))
@@ -408,18 +408,18 @@ void fill_eMTC_configuration(MessageDef *msg_p,  ccparams_eMTC_t *eMTCconfig, in
 		   config_fname, cell_idx,eMTCconfig->ccparams.srs_SubframeConfig);
 
     if (strcmp(eMTCconfig->ccparams.srs_ackNackST, "ENABLE") == 0) {
-      RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].srs_ackNackST= TRUE;
+      RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].srs_ackNackST= true;
     } else if (strcmp(eMTCconfig->ccparams.srs_ackNackST, "DISABLE") == 0) {
-      RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].srs_ackNackST= FALSE;
+      RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].srs_ackNackST= false;
     } else
       AssertFatal (0,
 		   "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for srs_BandwidthConfig choice: ENABLE,DISABLE !\n",
 		   config_fname, cell_idx,eMTCconfig->ccparams.srs_ackNackST);
 
     if (strcmp(eMTCconfig->ccparams.srs_MaxUpPts, "ENABLE") == 0) {
-      RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].srs_MaxUpPts= TRUE;
+      RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].srs_MaxUpPts= true;
     } else if (strcmp(eMTCconfig->ccparams.srs_MaxUpPts, "DISABLE") == 0) {
-      RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].srs_MaxUpPts= FALSE;
+      RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].srs_MaxUpPts= false;
     } else
       AssertFatal (0,
 		   "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for srs_MaxUpPts choice: ENABLE,DISABLE !\n",
@@ -535,7 +535,7 @@ void fill_eMTC_configuration(MessageDef *msg_p,  ccparams_eMTC_t *eMTCconfig, in
 		 config_fname, cell_idx,eMTCconfig->ccparams.rach_numberOfRA_Preambles);
 
   if (strcmp(eMTCconfig->ccparams.rach_preamblesGroupAConfig, "ENABLE") == 0) {
-    RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].rach_preamblesGroupAConfig= TRUE;
+    RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].rach_preamblesGroupAConfig= true;
     RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].rach_sizeOfRA_PreamblesGroupA= (eMTCconfig->ccparams.rach_sizeOfRA_PreamblesGroupA/4)-1;
 
     if ((eMTCconfig->ccparams.rach_numberOfRA_Preambles <4) || (eMTCconfig->ccparams.rach_numberOfRA_Preambles>60) || ((eMTCconfig->ccparams.rach_numberOfRA_Preambles&3)!=0))
@@ -588,7 +588,7 @@ void fill_eMTC_configuration(MessageDef *msg_p,  ccparams_eMTC_t *eMTCconfig, in
 		   "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for rach_messagePowerOffsetGroupB choice: minusinfinity,dB0,dB5,dB8,dB10,dB12,dB15,dB18!\n",
 		   config_fname, cell_idx,eMTCconfig->ccparams.rach_messagePowerOffsetGroupB);
   } else if (strcmp(eMTCconfig->ccparams.rach_preamblesGroupAConfig, "DISABLE") == 0) {
-    RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].rach_preamblesGroupAConfig= FALSE;
+    RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig_BR[cc_idx].rach_preamblesGroupAConfig= false;
   } else
     AssertFatal (0,
 		 "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for rach_preamblesGroupAConfig choice: ENABLE,DISABLE !\n",
@@ -847,14 +847,14 @@ void fill_eMTC_configuration(MessageDef *msg_p,  ccparams_eMTC_t *eMTCconfig, in
 
 
   if (!strcmp(eMTCconfig->prach_ConfigCommon_v1310, "ENABLE")) {
-    RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[cc_idx].prach_ConfigCommon_v1310 = TRUE;
+    RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[cc_idx].prach_ConfigCommon_v1310 = true;
 
     RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[cc_idx].mpdcch_startSF_CSS_RA_r13 = calloc(1, sizeof(BOOLEAN_t));
 
     if (!strcmp(eMTCconfig->mpdcch_startSF_CSS_RA_r13, "tdd-r13")) {
-      *RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[cc_idx].mpdcch_startSF_CSS_RA_r13 = FALSE;
+      *RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[cc_idx].mpdcch_startSF_CSS_RA_r13 = false;
     } else {
-      *RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[cc_idx].mpdcch_startSF_CSS_RA_r13 = TRUE;
+      *RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[cc_idx].mpdcch_startSF_CSS_RA_r13 = true;
     }
 
     if (!strcmp(eMTCconfig->mpdcch_startSF_CSS_RA_r13_val, "v1")) {
@@ -882,7 +882,7 @@ void fill_eMTC_configuration(MessageDef *msg_p,  ccparams_eMTC_t *eMTCconfig, in
     RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[cc_idx].prach_HoppingOffset_r13 = calloc(1, sizeof(long));
     *RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[cc_idx].prach_HoppingOffset_r13 = eMTCconfig->prach_HoppingOffset_r13;
   } else {
-    RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[cc_idx].prach_ConfigCommon_v1310 = FALSE;
+    RRC_CONFIGURATION_REQ(msg_p).radioresourceconfig_BR[cc_idx].prach_ConfigCommon_v1310 = false;
   }
 
 
@@ -1169,7 +1169,7 @@ void fill_eMTC_configuration(MessageDef *msg_p,  ccparams_eMTC_t *eMTCconfig, in
 
 
   /** PCCH CONFIG V1310 */
-  RRC_CONFIGURATION_REQ(msg_p).pcch_config_v1310[cc_idx] = TRUE;
+  RRC_CONFIGURATION_REQ(msg_p).pcch_config_v1310[cc_idx] = true;
   RRC_CONFIGURATION_REQ(msg_p).paging_narrowbands_r13[cc_idx] = eMTCconfig->paging_narrowbands_r13;
   RRC_CONFIGURATION_REQ(msg_p).mpdcch_numrepetition_paging_r13[cc_idx] = eMTCconfig->mpdcch_numrepetition_paging_r13;
 
@@ -1220,7 +1220,7 @@ void fill_eMTC_configuration(MessageDef *msg_p,  ccparams_eMTC_t *eMTCconfig, in
 
 
   /** SIB2 FREQ HOPPING PARAMETERS R13 */
-  RRC_CONFIGURATION_REQ(msg_p).sib2_freq_hoppingParameters_r13_exists[cc_idx] = TRUE;
+  RRC_CONFIGURATION_REQ(msg_p).sib2_freq_hoppingParameters_r13_exists[cc_idx] = true;
 
   char sib2FreqHoppingParametersR13Path[MAX_OPTNAME_SIZE*2 + 16];
   sprintf(sib2FreqHoppingParametersR13Path, "%s.%s", brparamspath, ENB_CONFIG_STRING_SIB2_FREQ_HOPPINGPARAMETERS_R13);
diff --git a/openair2/ENB_APP/flexran_agent_ran_api.c b/openair2/ENB_APP/flexran_agent_ran_api.c
index 9926ec9e20639d356b5e1ccdc6cf13b0a5cf83a4..3113c07798168a9aecb1f44218fd9162f39f9362 100644
--- a/openair2/ENB_APP/flexran_agent_ran_api.c
+++ b/openair2/ENB_APP/flexran_agent_ran_api.c
@@ -127,7 +127,7 @@ int flexran_get_mac_ue_id_rnti(mid_t mod_id, rnti_t rnti) {
 
   /* get the (active) UE with RNTI i */
   for (n = 0; n < MAX_MOBILES_PER_ENB; ++n) {
-    if (RC.mac[mod_id]->UE_info.active[n] == TRUE
+    if (RC.mac[mod_id]->UE_info.active[n] == true
         && rnti == UE_RNTI(mod_id, n)) {
       return n;
     }
@@ -143,7 +143,7 @@ int flexran_get_mac_ue_id(mid_t mod_id, int i) {
 
   /* get the (i+1)'th active UE */
   for (n = 0; n < MAX_MOBILES_PER_ENB; ++n) {
-    if (RC.mac[mod_id]->UE_info.active[n] == TRUE) {
+    if (RC.mac[mod_id]->UE_info.active[n] == true) {
       if (i == 0)
         return n;
 
@@ -580,7 +580,7 @@ uint8_t flexran_get_n_SB(mid_t mod_id, uint8_t cc_id) {
 Protocol__FlexQam flexran_get_enable64QAM(mid_t mod_id, uint8_t cc_id) {
   if (!phy_is_present(mod_id, cc_id)) return 0;
 
-  if (RC.eNB[mod_id][cc_id]->frame_parms.pusch_config_common.enable64QAM == TRUE)
+  if (RC.eNB[mod_id][cc_id]->frame_parms.pusch_config_common.enable64QAM == true)
     return PROTOCOL__FLEX_QAM__FLEQ_MOD_64QAM;
   else
     return PROTOCOL__FLEX_QAM__FLEQ_MOD_16QAM;
@@ -3585,7 +3585,7 @@ int flexran_set_new_plmn_id(mid_t mod_id, int CC_id, size_t n_plmn, Protocol__Fl
                          int CC_id,
                          BOOLEAN_t brOption,
                          RrcConfigurationReq *configuration);
-  carrier->sizeof_SIB1 = do_SIB1(carrier, mod_id, CC_id, FALSE, conf);
+  carrier->sizeof_SIB1 = do_SIB1(carrier, mod_id, CC_id, false, conf);
   if (carrier->sizeof_SIB1 < 0)
     return -1337; /* SIB1 encoding failed, hell will probably break loose */
 
diff --git a/openair2/F1AP/dummy_enb.c b/openair2/F1AP/dummy_enb.c
index 9085fdb57cd772eb39319199540f2a22817a94da..8e185c951dffb59b1c88df35a0c0c3975184e43b 100644
--- a/openair2/F1AP/dummy_enb.c
+++ b/openair2/F1AP/dummy_enb.c
@@ -32,18 +32,18 @@ void apply_macrlc_config(gNB_RRC_INST *rrc,
   abort();
 }
 
-boolean_t sdap_data_req(protocol_ctxt_t *ctxt_p,
-                        const srb_flag_t srb_flag,
-                        const rb_id_t rb_id,
-                        const mui_t mui,
-                        const confirm_t confirm,
-                        const sdu_size_t sdu_buffer_size,
-                        unsigned char *const sdu_buffer,
-                        const pdcp_transmission_mode_t pt_mode,
-                        const uint32_t *sourceL2Id,
-                        const uint32_t *destinationL2Id,
-                        const uint8_t qfi,
-                        const boolean_t rqi,
-                        const int pdusession_id) {
+bool sdap_data_req(protocol_ctxt_t *ctxt_p,
+                   const srb_flag_t srb_flag,
+                   const rb_id_t rb_id,
+                   const mui_t mui,
+                   const confirm_t confirm,
+                   const sdu_size_t sdu_buffer_size,
+                   unsigned char *const sdu_buffer,
+                   const pdcp_transmission_mode_t pt_mode,
+                   const uint32_t *sourceL2Id,
+                   const uint32_t *destinationL2Id,
+                   const uint8_t qfi,
+                   const bool rqi,
+                   const int pdusession_id) {
 abort();
 }
diff --git a/openair2/F1AP/f1ap_common.h b/openair2/F1AP/f1ap_common.h
index 66451530a61194479ac98e5f23fb17e78c5cdb60..6b64e1b59e74bbf3c3ac9016d4c3744efba75861 100644
--- a/openair2/F1AP/f1ap_common.h
+++ b/openair2/F1AP/f1ap_common.h
@@ -363,13 +363,6 @@
   # error "You are compiling f1ap with the wrong version of ASN1C"
 #endif
 
-#ifndef FALSE
-  #define FALSE (0)
-#endif
-#ifndef TRUE
-  #define TRUE  (!FALSE)
-#endif
-
 #define F1AP_UE_ID_FMT  "0x%06"PRIX32
 
 #include "assertions.h"
diff --git a/openair2/F1AP/f1ap_du_rrc_message_transfer.c b/openair2/F1AP/f1ap_du_rrc_message_transfer.c
index a9f82f42b378ee6e07384bba05ade8a55f567a00..e158e9519a9ef73524a7f53a46f11fc3033871a1 100644
--- a/openair2/F1AP/f1ap_du_rrc_message_transfer.c
+++ b/openair2/F1AP/f1ap_du_rrc_message_transfer.c
@@ -509,7 +509,7 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t       instance,
 
   LOG_I(F1AP, "Received DL RRC Transfer on srb_id %ld\n", srb_id);
   rlc_op_status_t    rlc_status;
-  boolean_t          ret             = TRUE;
+  bool               ret             = true;
   mem_block_t       *pdcp_pdu_p      = NULL;
   pdcp_pdu_p = get_free_mem_block(rrc_dl_sdu_len, __func__);
 
@@ -539,27 +539,27 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t       instance,
     switch (rlc_status) {
       case RLC_OP_STATUS_OK:
         //LOG_I(F1AP, "Data sending request over RLC succeeded!\n");
-        ret=TRUE;
+        ret=true;
         break;
 
       case RLC_OP_STATUS_BAD_PARAMETER:
         LOG_W(F1AP, "Data sending request over RLC failed with 'Bad Parameter' reason!\n");
-        ret= FALSE;
+        ret= false;
         break;
 
       case RLC_OP_STATUS_INTERNAL_ERROR:
         LOG_W(F1AP, "Data sending request over RLC failed with 'Internal Error' reason!\n");
-        ret= FALSE;
+        ret= false;
         break;
 
       case RLC_OP_STATUS_OUT_OF_RESSOURCES:
         LOG_W(F1AP, "Data sending request over RLC failed with 'Out of Resources' reason!\n");
-        ret= FALSE;
+        ret= false;
         break;
 
       default:
         LOG_W(F1AP, "RLC returned an unknown status code after PDCP placed the order to send some data (Status Code:%d)\n", rlc_status);
-        ret= FALSE;
+        ret= false;
         break;
     } // switch case
 
@@ -667,9 +667,9 @@ int DU_send_UL_RRC_MESSAGE_TRANSFER(instance_t instance,
 
           UE_sched_ctrl_t *UE_scheduling_control = &(RC.mac[instance]->UE_info.UE_sched_ctrl[UE_id_mac]);
 
-          if (UE_scheduling_control->cdrx_waiting_ack == TRUE) {
-            UE_scheduling_control->cdrx_waiting_ack = FALSE;
-            UE_scheduling_control->cdrx_configured = TRUE; // Set to TRUE when RRC Connection Reconfiguration Complete is received
+          if (UE_scheduling_control->cdrx_waiting_ack == true) {
+            UE_scheduling_control->cdrx_waiting_ack = false;
+            UE_scheduling_control->cdrx_configured = true; // Set to TRUE when RRC Connection Reconfiguration Complete is received
             LOG_I(F1AP, "CDRX configuration activated after RRC Connection Reconfiguration Complete reception\n");
           }
 
diff --git a/openair2/F1AP/f1ap_du_ue_context_management.c b/openair2/F1AP/f1ap_du_ue_context_management.c
index 6dbe820465f697be64399f2f7e16a631018db112..74e0200f09a77fef5580d7dc81efd15e030d529a 100644
--- a/openair2/F1AP/f1ap_du_ue_context_management.c
+++ b/openair2/F1AP/f1ap_du_ue_context_management.c
@@ -42,16 +42,16 @@
 #include "openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h"
 #include <openair3/ocp-gtpu/gtp_itf.h>
 
-boolean_t lteDURecvCb( protocol_ctxt_t  *ctxt_pP,
-                       const srb_flag_t     srb_flagP,
-                       const rb_id_t        rb_idP,
-                       const mui_t          muiP,
-                       const confirm_t      confirmP,
-                       const sdu_size_t     sdu_buffer_sizeP,
-                       unsigned char *const sdu_buffer_pP,
-                       const pdcp_transmission_mode_t modeP,
-                       const uint32_t *sourceL2Id,
-                       const uint32_t *destinationL2Id) {
+bool lteDURecvCb(protocol_ctxt_t  *ctxt_pP,
+                 const srb_flag_t     srb_flagP,
+                 const rb_id_t        rb_idP,
+                 const mui_t          muiP,
+                 const confirm_t      confirmP,
+                 const sdu_size_t     sdu_buffer_sizeP,
+                 unsigned char *const sdu_buffer_pP,
+                 const pdcp_transmission_mode_t modeP,
+                 const uint32_t *sourceL2Id,
+                 const uint32_t *destinationL2Id) {
   // The buffer comes from the stack in gtp-u thread, we have a make a separate buffer to enqueue in a inter-thread message queue
   mem_block_t *sdu=get_free_mem_block(sdu_buffer_sizeP, __func__);
   memcpy(sdu->data,  sdu_buffer_pP,  sdu_buffer_sizeP);
@@ -704,7 +704,7 @@ int DU_send_UE_CONTEXT_RELEASE_REQUEST(instance_t instance,
       LOG_E(F1AP,"Not found rnti: %x\n", rnti);
   } else {
     for (int n = 0; n < MAX_MOBILES_PER_ENB; ++n) {
-      if (RC.mac[instance]->UE_info.active[n] == TRUE
+      if (RC.mac[instance]->UE_info.active[n] == true
           && rnti == UE_RNTI(instance, n)) {
         UE_out_of_sync = RC.mac[instance]->UE_info.UE_sched_ctrl[n].ul_out_of_sync;
         break;
@@ -856,7 +856,7 @@ int DU_handle_UE_CONTEXT_RELEASE_COMMAND(instance_t       instance,
 
   if(RC.rrc && RC.rrc[instance]->node_type == ngran_eNB_DU){
     for (int n = 0; n < MAX_MOBILES_PER_ENB; ++n) {
-      if (RC.mac[instance]->UE_info.active[n] == TRUE
+      if (RC.mac[instance]->UE_info.active[n] == true
           && rnti == UE_RNTI(instance, n)) {
         UE_out_of_sync = RC.mac[instance]->UE_info.UE_sched_ctrl[n].ul_out_of_sync;
         break;
diff --git a/openair2/LAYER2/MAC/config.c b/openair2/LAYER2/MAC/config.c
index d22485d23f261823d8b028c90a46b056273eb9eb..52a9048cd07624006261e4fc9118207b2778160c 100644
--- a/openair2/LAYER2/MAC/config.c
+++ b/openair2/LAYER2/MAC/config.c
@@ -1104,7 +1104,7 @@ void eNB_Config_Local_DRX(instance_t Mod_id,
 
   /* Get struct to modify */
   UE_scheduling_control = &(UE_info_mac->UE_sched_ctrl[UE_id]);
-  UE_scheduling_control->cdrx_configured = FALSE; // will be set to true when no error
+  UE_scheduling_control->cdrx_configured = false; // will be set to true when no error
 
   /* Check drx_Configuration */
   if (drx_Configuration == NULL) {
@@ -1119,9 +1119,9 @@ void eNB_Config_Local_DRX(instance_t Mod_id,
   }
 
   /* Modify scheduling control structure according to DRX configuration: doesn't support every configurations! */  
-  UE_scheduling_control->cdrx_configured = FALSE; // will be set to true when receiving RRC Reconfiguration Complete
-  UE_scheduling_control->cdrx_waiting_ack = TRUE; // waiting for RRC Reconfiguration Complete message
-  UE_scheduling_control->in_active_time = FALSE;
+  UE_scheduling_control->cdrx_configured = false; // will be set to true when receiving RRC Reconfiguration Complete
+  UE_scheduling_control->cdrx_waiting_ack = true; // waiting for RRC Reconfiguration Complete message
+  UE_scheduling_control->in_active_time = false;
   UE_scheduling_control->dci0_ongoing_timer = 0;
   UE_scheduling_control->on_duration_timer = 0;
   struct LTE_DRX_Config__setup *choiceSetup = &drx_Configuration->choice.setup;
@@ -1297,13 +1297,13 @@ void eNB_Config_Local_DRX(instance_t Mod_id,
   }
 
   if (choiceSetup->shortDRX == NULL) {
-    UE_scheduling_control->in_short_drx_cycle = FALSE;
+    UE_scheduling_control->in_short_drx_cycle = false;
     UE_scheduling_control->drx_shortCycle_timer_value = 0;
     UE_scheduling_control->short_drx_cycle_duration = 0;
     UE_scheduling_control->drx_shortCycle_timer = 0;
     UE_scheduling_control->drx_shortCycle_timer_thres = -1;
   } else {
-    UE_scheduling_control->in_short_drx_cycle = FALSE;
+    UE_scheduling_control->in_short_drx_cycle = false;
     UE_scheduling_control->drx_shortCycle_timer_value = (uint8_t) choiceSetup->shortDRX->drxShortCycleTimer;
 
     switch (choiceSetup->shortDRX->shortDRX_Cycle) {
@@ -1380,7 +1380,7 @@ void eNB_Config_Local_DRX(instance_t Mod_id,
     UE_scheduling_control->drx_shortCycle_timer_thres = UE_scheduling_control->drx_shortCycle_timer_value * UE_scheduling_control->short_drx_cycle_duration;
   }
 
-  UE_scheduling_control->in_long_drx_cycle = FALSE;
+  UE_scheduling_control->in_long_drx_cycle = false;
   UE_scheduling_control->drx_longCycle_timer = 0;
 
   switch (choiceSetup->longDRX_CycleStartOffset.present) {
diff --git a/openair2/LAYER2/MAC/defs_NB_IoT.h b/openair2/LAYER2/MAC/defs_NB_IoT.h
index d4945f0182d5b3ddfd0bbb81b554a27b59d75b20..abe780741c05c225f30758cfc5b622644e6da58d 100644
--- a/openair2/LAYER2/MAC/defs_NB_IoT.h
+++ b/openair2/LAYER2/MAC/defs_NB_IoT.h
@@ -243,7 +243,6 @@ typedef struct {
   // -1:No UE in list
   int tail;
   int num_UEs;
-  //boolean_t active[MAX_MAX_MOBILES_PER_ENB_NB_IoT];
 
 } UE_list_NB_IoT_t;
 
@@ -403,7 +402,7 @@ typedef struct schedule_result{
   // pointer to DCI
   void *DCI_pdu;
   // when all the procedure related to this DCI, enable this flag
-  boolean_t DCI_release;
+  bool DCI_release;
   // Indicate the channel which to transmit
   channel_NB_IoT_t channel;
   // rnti
@@ -452,7 +451,7 @@ typedef enum ce_level_e{
 /*! \brief eNB template for the Random access information */
 typedef struct RA_TEMPLATE_NB_IoT_s{
 
-  boolean_t active;
+  bool active;
   uint32_t msg3_retransmit_count;
   uint32_t msg4_retransmit_count;
   uint16_t ta;
@@ -461,8 +460,8 @@ typedef struct RA_TEMPLATE_NB_IoT_s{
   rnti_t ue_rnti;
   rnti_t ra_rnti;
   struct RA_TEMPLATE_NB_IoT_s *next, *prev;
-  boolean_t wait_msg4_ack;
-  boolean_t wait_msg3_ack;
+  bool wait_msg4_ack;
+  bool wait_msg3_ack;
   uint8_t rar_buffer[7];
 
 } RA_TEMPLATE_NB_IoT;
@@ -530,7 +529,7 @@ typedef  struct {
   uint32_t       pdus_in_buffer;  /*!< \brief Number of PDUs buffered in RLC protocol instance (OBSOLETE). */
   uint32_t       head_sdu_creation_time;           /*!< \brief Head SDU creation time. */
   uint32_t       head_sdu_remaining_size_to_send;  /*!< \brief remaining size of sdu: could be the total size or the remaining size of already segmented sdu */
-  boolean_t      head_sdu_is_segmented;     /*!< \brief 0 if head SDU has not been segmented, 1 if already segmented */
+  bool           head_sdu_is_segmented;     /*!< \brief 0 if head SDU has not been segmented, 1 if already segmented */
 } mac_rlc_status_resp_NB_IoT_t;
 
 // global variables
diff --git a/openair2/LAYER2/MAC/eNB_scheduler.c b/openair2/LAYER2/MAC/eNB_scheduler.c
index d647eff7cbe7800c5fe49d24cca69885a9c7314a..53ab98a33fb9f87bc45429384206a4e8c03c170b 100644
--- a/openair2/LAYER2/MAC/eNB_scheduler.c
+++ b/openair2/LAYER2/MAC/eNB_scheduler.c
@@ -135,7 +135,7 @@ void schedule_SRS(module_id_t module_idP,
           UE_scheduling_control = &(UE_info->UE_sched_ctrl[UE_id]);
 
           /* Test if Active Time not running since 6+ subframes */
-          if (UE_scheduling_control->cdrx_configured == TRUE && UE_scheduling_control->in_active_time == FALSE) {
+          if (UE_scheduling_control->cdrx_configured == true && UE_scheduling_control->in_active_time == false) {
             /*
              * TODO: 6+ subframes condition not checked here
              */
@@ -204,7 +204,7 @@ void schedule_CSI(module_id_t module_idP,
     cc = &eNB->common_channels[CC_id];
 
     for (UE_id = 0; UE_id < MAX_MOBILES_PER_ENB; UE_id++) {
-      if (UE_info->active[UE_id] == FALSE) {
+      if (UE_info->active[UE_id] == false) {
         continue;
       }
 
@@ -223,9 +223,9 @@ void schedule_CSI(module_id_t module_idP,
       */
       UE_scheduling_control = &(UE_info->UE_sched_ctrl[UE_id]);
 
-      if (UE_scheduling_control->cdrx_configured == TRUE) {
+      if (UE_scheduling_control->cdrx_configured == true) {
         /* Test if CQI masking activated */
-        if (UE_scheduling_control->cqi_mask_boolean == TRUE) {
+        if (UE_scheduling_control->cqi_mask_boolean == true) {
           // CQI masking => test if onDurationTime not running since 6+ subframe
           if (UE_scheduling_control->on_duration_timer == 0) {
             /*
@@ -234,7 +234,7 @@ void schedule_CSI(module_id_t module_idP,
             continue;
           }
         } else { // No CQI masking => test if Active Time not running since 6+ subframe
-          if (UE_scheduling_control->in_active_time == FALSE) {
+          if (UE_scheduling_control->in_active_time == false) {
             /*
              * TODO: 6+ subframes condition not checked here
              */
@@ -677,8 +677,8 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP,
       }
 
       /* Set and increment CDRX related timers */
-      if (UE_scheduling_control->cdrx_configured == TRUE) {
-        boolean_t harq_active_time_condition = FALSE;
+      if (UE_scheduling_control->cdrx_configured == true) {
+        bool harq_active_time_condition = false;
         UE_TEMPLATE *UE_template = NULL;
         unsigned long active_time_condition = 0; // variable used only for tracing purpose
 
@@ -721,7 +721,7 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP,
             UE_scheduling_control->ul_synchronous_harq_timer[CC_id][harq_process_id]++;
 
             if (UE_scheduling_control->ul_synchronous_harq_timer[CC_id][harq_process_id] > 5) {
-              harq_active_time_condition = TRUE;
+              harq_active_time_condition = true;
               UE_scheduling_control->ul_synchronous_harq_timer[CC_id][harq_process_id] = 0;
               active_time_condition = 5; // for tracing purpose
             }
@@ -747,24 +747,24 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP,
 
             /* When timer expires switch into short or long DRX cycle */
             if (UE_scheduling_control->drx_shortCycle_timer_thres > 0) {
-              UE_scheduling_control->in_short_drx_cycle = TRUE;
+              UE_scheduling_control->in_short_drx_cycle = true;
               UE_scheduling_control->drx_shortCycle_timer = 0;
-              UE_scheduling_control->in_long_drx_cycle = FALSE;
+              UE_scheduling_control->in_long_drx_cycle = false;
             } else {
-              UE_scheduling_control->in_long_drx_cycle = TRUE;
+              UE_scheduling_control->in_long_drx_cycle = true;
             }
           }
         }
 
         /* Short DRX Cycle */
-        if (UE_scheduling_control->in_short_drx_cycle == TRUE) {
+        if (UE_scheduling_control->in_short_drx_cycle == true) {
           UE_scheduling_control->drx_shortCycle_timer++;
 
           /* When the Short DRX cycles are over, switch to long DRX cycle */
           if (UE_scheduling_control->drx_shortCycle_timer > UE_scheduling_control->drx_shortCycle_timer_thres) {
             UE_scheduling_control->drx_shortCycle_timer = 0;
-            UE_scheduling_control->in_short_drx_cycle = FALSE;
-            UE_scheduling_control->in_long_drx_cycle = TRUE;
+            UE_scheduling_control->in_short_drx_cycle = false;
+            UE_scheduling_control->in_long_drx_cycle = true;
             UE_scheduling_control->drx_longCycle_timer = 0;
           }
         } else {
@@ -772,7 +772,7 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP,
         }
 
         /* Long DRX Cycle */
-        if (UE_scheduling_control->in_long_drx_cycle == TRUE) {
+        if (UE_scheduling_control->in_long_drx_cycle == true) {
           UE_scheduling_control->drx_longCycle_timer++;
 
           if (UE_scheduling_control->drx_longCycle_timer > UE_scheduling_control->drx_longCycle_timer_thres) {
@@ -783,18 +783,18 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP,
         }
 
         /* Check for error cases */
-        if ((UE_scheduling_control->in_short_drx_cycle == TRUE) && (UE_scheduling_control->in_long_drx_cycle == TRUE)) {
+        if ((UE_scheduling_control->in_short_drx_cycle == true) && (UE_scheduling_control->in_long_drx_cycle == true)) {
           LOG_E(MAC, "Error in C-DRX: UE id %d is in both short and long DRX cycle. Should not happen. Back it to long cycle only\n", UE_id);
-          UE_scheduling_control->in_short_drx_cycle = FALSE;
+          UE_scheduling_control->in_short_drx_cycle = false;
         }
 
         /* Condition to start On Duration Timer */
-        if (UE_scheduling_control->in_short_drx_cycle == TRUE && UE_scheduling_control->on_duration_timer == 0) {
+        if (UE_scheduling_control->in_short_drx_cycle == true && UE_scheduling_control->on_duration_timer == 0) {
           if (((frameP * 10) + subframeP) % (UE_scheduling_control->short_drx_cycle_duration) ==
               (UE_scheduling_control->drx_start_offset) % (UE_scheduling_control->short_drx_cycle_duration)) {
             UE_scheduling_control->on_duration_timer = 1;
           }
-        } else if (UE_scheduling_control->in_long_drx_cycle == TRUE && UE_scheduling_control->on_duration_timer == 0) {
+        } else if (UE_scheduling_control->in_long_drx_cycle == true && UE_scheduling_control->on_duration_timer == 0) {
           if (((frameP * 10) + subframeP) % (UE_scheduling_control->drx_longCycle_timer_thres) ==
               (UE_scheduling_control->drx_start_offset)) {
             UE_scheduling_control->on_duration_timer = 1;
@@ -811,7 +811,7 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP,
         /* (a)synchronous HARQ processes handling for Active Time */
         for (int harq_process_id = 0; harq_process_id < 8; harq_process_id++) {
           if (UE_scheduling_control->drx_retransmission_timer[harq_process_id] > 0) {
-            harq_active_time_condition = TRUE;
+            harq_active_time_condition = true;
             active_time_condition = 2; // for tracing purpose
             break;
           }
@@ -822,9 +822,9 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP,
             UE_scheduling_control->drx_inactivity_timer > 1 ||
             harq_active_time_condition ||
             UE_template->ul_SR > 0) {
-          UE_scheduling_control->in_active_time = TRUE;
+          UE_scheduling_control->in_active_time = true;
         } else {
-          UE_scheduling_control->in_active_time = FALSE;
+          UE_scheduling_control->in_active_time = false;
         }
 
         /* BEGIN VCD */
diff --git a/openair2/LAYER2/MAC/eNB_scheduler_RA.c b/openair2/LAYER2/MAC/eNB_scheduler_RA.c
index e5b95a7f470db7fb9422a2543bb3b53a0c9396cf..c659df8d31a6fabdcddcd658f9c4fae85fdf5f0b 100644
--- a/openair2/LAYER2/MAC/eNB_scheduler_RA.c
+++ b/openair2/LAYER2/MAC/eNB_scheduler_RA.c
@@ -1225,7 +1225,7 @@ check_Msg4_retransmission(module_id_t module_idP, int CC_idP,
     LOG_D(MAC,"[eNB %d][RAPROC] Frame %d, Subframe %d: state:IDLE\n", module_idP, frameP, subframeP);
     UE_id = find_UE_id(module_idP, ra->rnti);
     DevAssert(UE_id != -1);
-    mac->UE_info.UE_template[UE_PCCID(module_idP, UE_id)][UE_id].configured = TRUE;
+    mac->UE_info.UE_template[UE_PCCID(module_idP, UE_id)][UE_id].configured = true;
     mac->UE_info.UE_template[UE_PCCID(module_idP, UE_id)][UE_id].pusch_repetition_levels=ra->pusch_repetition_levels;
     cancel_ra_proc(module_idP, CC_idP, frameP, ra->rnti);
   }
diff --git a/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c b/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c
index 596d978a98900184c5ea0840ba701858ae11a84e..08986221154e0bc82053d9cfe958be90778dc75e 100644
--- a/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c
+++ b/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c
@@ -2075,7 +2075,7 @@ schedule_PCH(module_id_t module_idP,
     for (uint16_t i = 0; i < MAX_MOBILES_PER_ENB; i++) {
       ue_pf_po = &UE_PF_PO[CC_id][i];
 
-      if (ue_pf_po->enable_flag != TRUE) {
+      if (ue_pf_po->enable_flag != true) {
         continue;
       }
 
diff --git a/openair2/LAYER2/MAC/eNB_scheduler_fairRR.c b/openair2/LAYER2/MAC/eNB_scheduler_fairRR.c
index 6c9ffabd4f7e6b18aa173e30f040c0659d12e895..9836b643d4109b956b53fa2cc8769b11bf6afb46 100644
--- a/openair2/LAYER2/MAC/eNB_scheduler_fairRR.c
+++ b/openair2/LAYER2/MAC/eNB_scheduler_fairRR.c
@@ -69,7 +69,7 @@ int last_ulsch_ue_id_volte[MAX_NUM_CCs] = {-1};
   uint16_t pre_nb_rbs_required[2][MAX_NUM_CCs][NUMBER_OF_UE_MAX];
   uint8_t dlsch_ue_select_tbl_in_use;
   uint8_t new_dlsch_ue_select_tbl_in_use;
-  boolean_t pre_scd_activeUE[NUMBER_OF_UE_MAX];
+  bool pre_scd_activeUE[NUMBER_OF_UE_MAX];
   eNB_UE_STATS pre_scd_eNB_UE_stats[MAX_NUM_CCs][NUMBER_OF_UE_MAX];
 #endif
 
@@ -125,7 +125,7 @@ void pre_scd_nb_rbs_required(    module_id_t     module_idP,
   UE_info_t *UE_info = &RC.mac[module_idP]->UE_info;
 
   for (UE_id = 0; UE_id <NUMBER_OF_UE_MAX; UE_id++) {
-    if (pre_scd_activeUE[UE_id] != TRUE)
+    if (pre_scd_activeUE[UE_id] != true)
       continue;
 
     // store dlsch buffer
@@ -210,7 +210,7 @@ void dlsch_scheduler_pre_ue_select_fairRR(
     DL_req          = &eNB->DL_req[CC_id].dl_config_request_body;
 
     for (UE_id = 0; UE_id < NUMBER_OF_UE_MAX; UE_id++) {
-      if (UE_info->active[UE_id] == FALSE) {
+      if (UE_info->active[UE_id] == false) {
         continue;
       }
 
@@ -331,7 +331,7 @@ void dlsch_scheduler_pre_ue_select_fairRR(
         break;
       }
 
-      if (UE_info->active[UE_id] == FALSE) {
+      if (UE_info->active[UE_id] == false) {
         continue;
       }
 
@@ -459,7 +459,7 @@ void dlsch_scheduler_pre_ue_select_fairRR(
         break;
       }
 
-      if (UE_info->active[UE_id] == FALSE) {
+      if (UE_info->active[UE_id] == false) {
         continue;
       }
 
@@ -607,7 +607,7 @@ static void dlsch_scheduler_pre_processor_reset_fairRR(
       if (rnti == NOT_A_RNTI)
         continue;
 
-      if (UE_info->active[UE_id] != TRUE)
+      if (UE_info->active[UE_id] != true)
         continue;
 
       LOG_D(MAC, "Running preprocessor for UE %d (%x)\n", UE_id, rnti);
@@ -755,7 +755,7 @@ static void assign_rbs_required_fairRR(
 
   // clear rb allocations across all CC_id
   for (UE_id = 0; UE_id < MAX_MOBILES_PER_ENB; UE_id++) {
-    if (UE_info->active[UE_id] != TRUE)
+    if (UE_info->active[UE_id] != true)
       continue;
 
     pCCid = UE_PCCID(Mod_id, UE_id);
@@ -945,7 +945,7 @@ void dlsch_scheduler_pre_processor_fairRR (module_id_t   Mod_id,
     min_rb_unit[CC_id] = get_min_rb_unit(Mod_id, CC_id);
 
     for (i = 0; i < NUMBER_OF_UE_MAX; i++) {
-      if (UE_info->active[i] != TRUE)
+      if (UE_info->active[i] != true)
         continue;
 
       UE_id = i;
@@ -2241,7 +2241,7 @@ void ulsch_scheduler_pre_ue_select_fairRR(
 
   // UE round >0
   for ( UE_id = 0; UE_id < NUMBER_OF_UE_MAX; UE_id++ ) {
-    if (UE_info->active[UE_id] == FALSE)
+    if (UE_info->active[UE_id] == false)
       continue;
 
     rnti = UE_RNTI(module_idP,UE_id);
@@ -2251,7 +2251,7 @@ void ulsch_scheduler_pre_ue_select_fairRR(
 
     CC_id = UE_PCCID(module_idP,UE_id);
 
-    if (UE_info->UE_template[CC_id][UE_id].configured == FALSE)
+    if (UE_info->UE_template[CC_id][UE_id].configured == false)
       continue;
 
     if (UE_info->UE_sched_ctrl[UE_id].ul_failure_timer > 0
@@ -2401,7 +2401,7 @@ void ulsch_scheduler_pre_ue_select_fairRR(
   }
 
   for ( UE_id = 0; UE_id < NUMBER_OF_UE_MAX; UE_id++ ) {
-    if (UE_info->active[UE_id] == FALSE)
+    if (UE_info->active[UE_id] == false)
       continue;
 
     rnti = UE_RNTI(module_idP,UE_id);
@@ -2414,7 +2414,7 @@ void ulsch_scheduler_pre_ue_select_fairRR(
     if (UE_id > last_ulsch_ue_id[CC_id])
       continue;
 
-    if (UE_info->UE_template[CC_id][UE_id].configured == FALSE)
+    if (UE_info->UE_template[CC_id][UE_id].configured == false)
       continue;
 
     if (UE_info->UE_sched_ctrl[UE_id].ul_failure_timer > 0
diff --git a/openair2/LAYER2/MAC/eNB_scheduler_primitives.c b/openair2/LAYER2/MAC/eNB_scheduler_primitives.c
index d53e0cadd3fa5db23506c815ef4c3bb32ed373c1..4469d0a3f95dcf6117d24df1211a8552f2325a73 100644
--- a/openair2/LAYER2/MAC/eNB_scheduler_primitives.c
+++ b/openair2/LAYER2/MAC/eNB_scheduler_primitives.c
@@ -1989,7 +1989,7 @@ find_UE_id(module_id_t mod_idP,
     return -1;
 
   for (UE_id = 0; UE_id < MAX_MOBILES_PER_ENB; UE_id++) {
-    if (UE_info->active[UE_id] == TRUE) {
+    if (UE_info->active[UE_id] == true) {
       int CC_id = UE_PCCID(mod_idP, UE_id);
       if (CC_id>=0 && CC_id<NFAPI_CC_MAX && UE_info->UE_template[CC_id][UE_id].rnti == rntiP) {
         return UE_id;
@@ -2063,7 +2063,7 @@ UE_RNTI(module_id_t mod_idP,
 }
 
 //------------------------------------------------------------------------------
-boolean_t
+bool
 is_UE_active(module_id_t mod_idP,
              int ue_idP)
 //------------------------------------------------------------------------------
@@ -2187,20 +2187,20 @@ add_new_ue(module_id_t mod_idP,
         UE_info->num_UEs);
 
   for (i = 0; i < MAX_MOBILES_PER_ENB; i++) {
-    if (UE_info->active[i] == TRUE)
+    if (UE_info->active[i] == true)
       continue;
 
     UE_id = i;
     memset(&UE_info->UE_template[cc_idP][UE_id], 0, sizeof(UE_TEMPLATE));
     UE_info->UE_template[cc_idP][UE_id].rnti = rntiP;
-    UE_info->UE_template[cc_idP][UE_id].configured = FALSE;
+    UE_info->UE_template[cc_idP][UE_id].configured = false;
     UE_info->numactiveCCs[UE_id] = 1;
     UE_info->numactiveULCCs[UE_id] = 1;
     UE_info->pCC_id[UE_id] = cc_idP;
     UE_info->ordered_CCids[0][UE_id] = cc_idP;
     UE_info->ordered_ULCCids[0][UE_id] = cc_idP;
     UE_info->num_UEs++;
-    UE_info->active[UE_id] = TRUE;
+    UE_info->active[UE_id] = true;
     add_ue_list(&UE_info->list, UE_id);
     dump_ue_list(&UE_info->list);
     pp_impl_param_t* dl = &RC.mac[mod_idP]->pre_processor_dl;
@@ -2280,7 +2280,7 @@ rrc_mac_remove_ue(module_id_t mod_idP,
         UE_id,
         pCC_id,
         rntiP);
-  UE_info->active[UE_id] = FALSE;
+  UE_info->active[UE_id] = false;
   UE_info->num_UEs--;
 
   remove_ue_list(&UE_info->list, UE_id);
@@ -3488,7 +3488,7 @@ has_ul_grant(module_id_t module_idP,
 }
 
 //------------------------------------------------------------------------------
-boolean_t
+bool
 CCE_allocation_infeasible(int module_idP,
                           int CC_idP,
                           int format_flag,
@@ -3501,7 +3501,7 @@ CCE_allocation_infeasible(int module_idP,
   nfapi_dl_config_request_pdu_t *dl_config_pdu = &DL_req->dl_config_pdu_list[DL_req->number_pdu];
   nfapi_hi_dci0_request_body_t *HI_DCI0_req    = &RC.mac[module_idP]->HI_DCI0_req[CC_idP][subframe].hi_dci0_request_body;
   nfapi_hi_dci0_request_pdu_t *hi_dci0_pdu     = &HI_DCI0_req->hi_dci0_pdu_list[HI_DCI0_req->number_of_dci + HI_DCI0_req->number_of_hi];
-  boolean_t res = TRUE;
+  bool res = true;
 
   if (format_flag != 2) { // DL DCI
     if (DL_req->number_pdu == MAX_NUM_DL_PDU) {
@@ -3517,7 +3517,7 @@ CCE_allocation_infeasible(int module_idP,
             subframe, format_flag, rnti, aggregation);
 
       if (allocate_CCEs(module_idP, CC_idP, 0, subframe, 0) != -1)
-        res = FALSE;
+        res = false;
 
       DL_req->number_pdu--;
     }
@@ -3532,7 +3532,7 @@ CCE_allocation_infeasible(int module_idP,
       HI_DCI0_req->number_of_dci++;
 
       if (allocate_CCEs(module_idP, CC_idP, 0, subframe, 0) != -1)
-        res = FALSE;
+        res = false;
 
       HI_DCI0_req->number_of_dci--;
     }
@@ -5029,7 +5029,7 @@ SR_indication(module_id_t mod_idP,
   if (UE_id != -1) {
     UE_scheduling_ctrl = &(UE_info->UE_sched_ctrl[UE_id]);
 
-    if ((UE_scheduling_ctrl->cdrx_configured == TRUE) &&
+    if ((UE_scheduling_ctrl->cdrx_configured == true) &&
         (UE_scheduling_ctrl->dci0_ongoing_timer > 0)  &&
         (UE_scheduling_ctrl->dci0_ongoing_timer < 8)) {
       LOG_D(MAC, "[eNB %d][SR %x] Frame %d subframeP %d Signaling SR for UE %d on CC_id %d.  \
@@ -5052,7 +5052,7 @@ SR_indication(module_id_t mod_idP,
       }
 
       UE_info->UE_template[cc_idP][UE_id].ul_SR = 1;
-      UE_info->UE_template[cc_idP][UE_id].ul_active = TRUE;
+      UE_info->UE_template[cc_idP][UE_id].ul_active = true;
       VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_SR_INDICATION, 1);
       VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_SR_INDICATION, 0);
     }
diff --git a/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c b/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c
index d4f486f76162e683fd5f2c327767eddbc4e769b6..a31b8bdd03d91d81983ae7c220ad0fbca8693f31 100644
--- a/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c
+++ b/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c
@@ -242,7 +242,7 @@ rx_sdu(const module_id_t enb_mod_idP,
       }
 
       /* CDRX UL HARQ timers */
-      if (UE_scheduling_control->cdrx_configured == TRUE) {
+      if (UE_scheduling_control->cdrx_configured == true) {
         /* Synchronous UL HARQ */
         UE_scheduling_control->ul_synchronous_harq_timer[CC_idP][harq_pid] = 5;
         /*
@@ -1003,7 +1003,7 @@ rx_sdu(const module_id_t enb_mod_idP,
 
   /* CDRX UL HARQ timers */
   if (UE_id != -1) {
-    if (UE_scheduling_control->cdrx_configured == TRUE) {
+    if (UE_scheduling_control->cdrx_configured == true) {
       /* Synchronous UL HARQ */
       UE_scheduling_control->ul_synchronous_harq_timer[CC_idP][harq_pid] = 5;
       /*
@@ -1447,7 +1447,7 @@ schedule_ulsch_rnti(module_id_t   module_idP,
       continue;
 
     // don't schedule if Msg5 is not received yet
-    if (UE_info->UE_template[CC_id][UE_id].configured == FALSE) {
+    if (UE_info->UE_template[CC_id][UE_id].configured == false) {
       LOG_D(MAC,
             "[eNB %d] frame %d, subframe %d, UE %d: not configured, skipping "
             "UE scheduling \n",
@@ -2033,7 +2033,7 @@ void schedule_ulsch_rnti_emtc(module_id_t   module_idP,
     }
 
     /* Don't schedule if Msg4 is not received yet */
-    if (UE_template->configured == FALSE) {
+    if (UE_template->configured == false) {
       LOG_D(MAC,"[eNB %d] frame %d subframe %d, UE %d: not configured, skipping UE scheduling \n",
             module_idP,
             frameP,
diff --git a/openair2/LAYER2/MAC/mac.h b/openair2/LAYER2/MAC/mac.h
index 6637d05a8afacc5f18e117058d36e0936f2f4b2a..2392c8506b7870d018943f9852a5a6ee069c6610 100644
--- a/openair2/LAYER2/MAC/mac.h
+++ b/openair2/LAYER2/MAC/mac.h
@@ -811,9 +811,9 @@ typedef struct {
   /// TBS from last UL scheduling
   int TBS_UL[8];
   /// Flag to indicate UL has been scheduled at least once
-  boolean_t ul_active;
+  bool ul_active;
   /// Flag to indicate UE has been configured (ACK from RRCConnectionSetup received)
-  boolean_t configured;
+  bool configured;
 
   /// MCS from last scheduling
   uint8_t mcs[8];
@@ -1026,16 +1026,16 @@ typedef struct {
 
   /* C-DRX related timers */
   /* Note: only valid for FDD and LTE UE when this comment is written (11-01-19)*/
-  /// is TRUE if the cqi mask feature is activated by RRC configuration
-  boolean_t cqi_mask_boolean;
-  /// is TRUE if the following drx parameters are configured for UE
-  boolean_t cdrx_configured;
+  /// is true if the cqi mask feature is activated by RRC configuration
+  bool cqi_mask_boolean;
+  /// is true if the following drx parameters are configured for UE
+  bool cdrx_configured;
   /*
-   * if TRUE, the eNB has configured the CDRX locally, but is waiting for the UE to acknowledge
+   * if true, the eNB has configured the CDRX locally, but is waiting for the UE to acknowledge
    * the activation. This is needed, during the RRC configuration process, when the context is
    * configured on the eNB side, but not yet on the UE side...
    */
-  boolean_t cdrx_waiting_ack;
+  bool cdrx_waiting_ack;
   /*
    * Is set when a ULSCH scheduling is done and run until the first corresponding transmission is done (4 subframes).
    * When set, SR cannot be set for the UE. This allows OAI to avoid concidering a SR as uncompleted if the UE sends
@@ -1043,16 +1043,16 @@ typedef struct {
    * create a lost in timers synchronization.
    */
   uint8_t dci0_ongoing_timer;
-  /// is TRUE if the UE is in "Active Time", hence listening to PDCCH
-  boolean_t in_active_time;
+  /// is true if the UE is in "Active Time", hence listening to PDCCH
+  bool in_active_time;
   /// OnDurationTimer
   uint16_t  on_duration_timer;
   uint16_t  on_duration_timer_thres;
   /// drx-InactivityTimer
   uint16_t  drx_inactivity_timer;
   uint16_t  drx_inactivity_timer_thres;
-  /// is TRUE if UE is currently in short DRX cycle
-  boolean_t in_short_drx_cycle;
+  /// is true if UE is currently in short DRX cycle
+  bool in_short_drx_cycle;
   /// drxShortCycleTimer int (1..16) (number of short DRX cycles duration before long DRX cycles)
   uint8_t  drx_shortCycle_timer_value;
   /// shortDRX-Cycle (duration of one short DRX cycle)
@@ -1060,8 +1060,8 @@ typedef struct {
   /// DRX short cycle timer before switching to long DRX cycle = drx_shortCycle_timer_value * short_drx_cycle_duration
   uint16_t  drx_shortCycle_timer;
   uint16_t  drx_shortCycle_timer_thres;
-  /// is TRUE if UE is currently in long DRX cycle
-  boolean_t in_long_drx_cycle;
+  /// is true if UE is currently in long DRX cycle
+  bool in_long_drx_cycle;
   /// longDRX-CycleStartOffset (long DRX cycle timer)
   uint16_t  drx_longCycle_timer;
   uint16_t  drx_longCycle_timer_thres;
@@ -1183,7 +1183,7 @@ typedef struct {
   UE_sched_ctrl_t UE_sched_ctrl[MAX_MOBILES_PER_ENB];
   UE_list_t list;
   int num_UEs;
-  boolean_t active[MAX_MOBILES_PER_ENB];
+  bool active[MAX_MOBILES_PER_ENB];
 } UE_info_t;
 
 /*! \brief deleting control information*/
@@ -1191,9 +1191,9 @@ typedef struct {
   ///rnti of UE
   rnti_t rnti;
   ///remove UE context flag
-  boolean_t removeContextFlg;
+  bool removeContextFlg;
   ///remove RA flag
-  boolean_t raFlag;
+  bool raFlag;
 } UE_free_ctrl_t;
 /*! \brief REMOVE UE list used by eNB to order UEs/CC for deleting*/
 typedef struct {
diff --git a/openair2/LAYER2/MAC/mac_extern.h b/openair2/LAYER2/MAC/mac_extern.h
index 522dc2721ff0674ba4cb4d29a431a43f7f40458d..212422898be33c72f7cf149e5259ef5f12cad99d 100644
--- a/openair2/LAYER2/MAC/mac_extern.h
+++ b/openair2/LAYER2/MAC/mac_extern.h
@@ -71,7 +71,7 @@ extern rb_id_t mbms_rab_id;
 extern uint16_t pre_nb_rbs_required[2][MAX_NUM_CCs][NUMBER_OF_UE_MAX];
 extern uint8_t dlsch_ue_select_tbl_in_use;
 extern uint8_t new_dlsch_ue_select_tbl_in_use;
-extern boolean_t pre_scd_activeUE[NUMBER_OF_UE_MAX];
+extern bool pre_scd_activeUE[NUMBER_OF_UE_MAX];
 extern eNB_UE_STATS pre_scd_eNB_UE_stats[MAX_NUM_CCs][NUMBER_OF_UE_MAX];
 #endif
 
diff --git a/openair2/LAYER2/MAC/mac_proto.h b/openair2/LAYER2/MAC/mac_proto.h
index b92ce85608fa726952fad9574589ac1ef3dde6e1..889c727fdd5a98ca560e52ff01180e17720e5fb0 100644
--- a/openair2/LAYER2/MAC/mac_proto.h
+++ b/openair2/LAYER2/MAC/mac_proto.h
@@ -400,7 +400,7 @@ int find_RA_id(module_id_t mod_idP, int CC_idP, rnti_t rntiP);
 rnti_t UE_RNTI(module_id_t module_idP, int UE_id);
 int UE_PCCID(module_id_t module_idP, int UE_id);
 uint8_t find_active_UEs(module_id_t module_idP);
-boolean_t is_UE_active(module_id_t module_idP, int UE_id);
+bool is_UE_active(module_id_t module_idP, int UE_id);
 uint8_t get_aggregation(uint8_t bw_index, uint8_t cqi, uint8_t dci_fmt);
 
 int8_t find_active_UEs_with_traffic(module_id_t module_idP);
@@ -416,11 +416,11 @@ int get_nCCE_offset(int *CCE_table,
 
 int allocate_CCEs(int module_idP, int CC_idP, frame_t frameP, sub_frame_t subframeP, int test_only);
 
-boolean_t CCE_allocation_infeasible(int module_idP,
-                                    int CC_idP,
-                                    int common_flag,
-                                    int subframe,
-                                    int aggregation, int rnti);
+bool CCE_allocation_infeasible(int module_idP,
+                               int CC_idP,
+                               int common_flag,
+                               int subframe,
+                               int aggregation, int rnti);
 /* tries to allocate a CCE. If it succeeds, reserves NFAPI DCI and DLSCH config */
 int CCE_try_allocate_dlsch(int module_id,
                            int CC_id,
@@ -741,13 +741,12 @@ BSR_SHORT *get_bsr_short(module_id_t module_idP, uint8_t bsr_len);
 */
 BSR_LONG *get_bsr_long(module_id_t module_idP, uint8_t bsr_len);
 
-/*! \fn  boolean_t update_bsr(module_id_t module_idP, frame_t frameP,sub_frame_t subframeP)
+/*! \fn  bool update_bsr(module_id_t module_idP, frame_t frameP,sub_frame_t subframeP)
    \brief get the rlc stats and update the bsr level for each lcid
 \param[in] Mod_id instance of the UE
 \param[in] frame Frame index
 */
-boolean_t update_bsr(module_id_t module_idP, frame_t frameP,
-                     sub_frame_t subframeP, eNB_index_t eNB_index);
+bool update_bsr(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP, eNB_index_t eNB_index);
 
 /*! \fn  locate_BsrIndexByBufferSize (int *table, int size, int value)
    \brief locate the BSR level in the table as defined in 36.321. This function requires that he values in table to be monotonic, either increasing or decreasing. The returned value is not less than 0, nor greater than n-1, where n is the size of table.
diff --git a/openair2/LAYER2/MAC/pre_processor.c b/openair2/LAYER2/MAC/pre_processor.c
index bb969668d6b32bf3cfdd44e9f0809bfc220bc28a..db4d51a92f8efabb3e9b102ca053a9467a3ddb9f 100644
--- a/openair2/LAYER2/MAC/pre_processor.c
+++ b/openair2/LAYER2/MAC/pre_processor.c
@@ -638,7 +638,7 @@ dlsch_scheduler_pre_processor(module_id_t Mod_id,
       LOG_E(MAC, "UE %d has RNTI NOT_A_RNTI!\n", UE_id);
       continue;
     }
-    if (UE_info->active[UE_id] != TRUE) {
+    if (UE_info->active[UE_id] != true) {
       LOG_E(MAC, "UE %d RNTI %x is NOT active!\n", UE_id, rnti);
       continue;
     }
diff --git a/openair2/LAYER2/MAC/ue_procedures.c b/openair2/LAYER2/MAC/ue_procedures.c
index 926c44381cbefccd38c6a35a798c48d5dc8ac59b..d7796d1d40437c037ea218d9d4579bc5bb1f812d 100644
--- a/openair2/LAYER2/MAC/ue_procedures.c
+++ b/openair2/LAYER2/MAC/ue_procedures.c
@@ -2325,8 +2325,8 @@ ue_get_sdu(module_id_t module_idP, int CC_id, frame_t frameP,
   uint8_t bsr_len = 0, bsr_ce_len = 0, bsr_header_len = 0;
   uint8_t phr_header_len = 0, phr_ce_len = 0, phr_len = 0;
   uint8_t lcid = 0, lcid_rlc_pdu_count = 0;
-  boolean_t is_lcid_processed = FALSE;
-  boolean_t is_all_lcid_processed = FALSE;
+  bool is_lcid_processed = false;
+  bool is_all_lcid_processed = false;
   uint16_t sdu_lengths[8] = { 0, 0, 0, 0, 0, 0, 0, 0 };
   uint8_t sdu_lcids[8] = { 0, 0, 0, 0, 0, 0, 0, 0 };
   uint8_t payload_offset = 0, num_sdus = 0;
@@ -2444,11 +2444,11 @@ ue_get_sdu(module_id_t module_idP, int CC_id, frame_t frameP,
   // Check for DCCH first
   // TO DO: Multiplex in the order defined by the logical channel prioritization
   for (lcid = DCCH;
-       (lcid < MAX_NUM_LCID) && (is_all_lcid_processed == FALSE); lcid++) {
+       (lcid < MAX_NUM_LCID) && (is_all_lcid_processed == false); lcid++) {
     if (UE_mac_inst[module_idP].scheduling_info.LCID_status[lcid] ==
         LCID_NOT_EMPTY) {
       lcid_rlc_pdu_count = 0;
-      is_lcid_processed = FALSE;
+      is_lcid_processed = false;
       lcid_buffer_occupancy_old =
         mac_rlc_get_buffer_occupancy_ind(module_idP,
                                          UE_mac_inst[module_idP].
@@ -2536,8 +2536,8 @@ ue_get_sdu(module_id_t module_idP, int CC_id, frame_t frameP,
             //No more remaining TBS after this PDU
             //exit the function
             rlc_pdu_header_len_last = 1;
-            is_lcid_processed = TRUE;
-            is_all_lcid_processed = TRUE;
+            is_lcid_processed = true;
+            is_all_lcid_processed = true;
           } else {
             rlc_pdu_header_len_last =
               (sdu_lengths[num_sdus] > 128) ? 3 : 2;
@@ -2547,8 +2547,8 @@ ue_get_sdu(module_id_t module_idP, int CC_id, frame_t frameP,
                 (bsr_len + phr_len + total_rlc_pdu_header_len +
                  rlc_pdu_header_len_last + sdu_length_total)) {
               rlc_pdu_header_len_last = 1;
-              is_lcid_processed = TRUE;
-              is_all_lcid_processed = TRUE;
+              is_lcid_processed = true;
+              is_all_lcid_processed = true;
             }
           }
 
@@ -2559,7 +2559,7 @@ ue_get_sdu(module_id_t module_idP, int CC_id, frame_t frameP,
           lcid_rlc_pdu_count++;
         } else {
           /* avoid infinite loop ... */
-          is_lcid_processed = TRUE;
+          is_lcid_processed = true;
         }
 
         /* Get updated BO after multiplexing this PDU */
@@ -3164,7 +3164,7 @@ ue_scheduler(const module_id_t module_idP,
   }
 
   //Check whether Regular BSR is triggered
-  if (update_bsr(module_idP, txFrameP, txSubframeP, eNB_indexP) == TRUE) {
+  if (update_bsr(module_idP, txFrameP, txSubframeP, eNB_indexP) == true) {
     // call SR procedure to generate pending SR and BSR for next PUCCH/PUSCH TxOp.  This should implement the procedures
     // outlined in Sections 5.4.4 an 5.4.5 of 36.321
     UE_mac_inst[module_idP].scheduling_info.SR_pending = 1;
@@ -3251,11 +3251,11 @@ ue_scheduler(const module_id_t module_idP,
 // to be improved
 
 
-boolean_t
+bool
 update_bsr(module_id_t module_idP, frame_t frameP,
            sub_frame_t subframeP, eNB_index_t eNB_index) {
   mac_rlc_status_resp_t rlc_status;
-  boolean_t bsr_regular_triggered = FALSE;
+  bool bsr_regular_triggered = false;
   uint8_t lcid;
   uint8_t lcgid;
   uint8_t num_lcid_with_data = 0; // for LCID with data only if LCGID is defined
@@ -3352,7 +3352,7 @@ update_bsr(module_id_t module_idP, frame_t frameP,
           (lcgid_buffer_remain
            [UE_mac_inst[module_idP].scheduling_info.LCGID[lcid]] ==
            0)) {
-        bsr_regular_triggered = TRUE;
+        bsr_regular_triggered = true;
         LOG_D(MAC,
               "[UE %d] PDCCH Tick : MAC BSR Triggered LCID%d LCGID%d data become available at frame %d subframe %d\n",
               module_idP, lcid,
@@ -3364,7 +3364,7 @@ update_bsr(module_id_t module_idP, frame_t frameP,
 
     // Trigger Regular BSR if ReTxBSR Timer has expired and UE has data for transmission
     if (UE_mac_inst[module_idP].scheduling_info.retxBSR_SF == 0) {
-      bsr_regular_triggered = TRUE;
+      bsr_regular_triggered = true;
 
       if ((UE_mac_inst[module_idP].BSR_reporting_active &
            BSR_TRIGGER_REGULAR) == 0) {
diff --git a/openair2/LAYER2/NR_MAC_COMMON/nr_mac_extern.h b/openair2/LAYER2/NR_MAC_COMMON/nr_mac_extern.h
index 4b37c19dff25bdb6208aea2233338af8f61ac2fc..7bbe8d68a751c4cb9ce36b10be00332bc53b14a3 100644
--- a/openair2/LAYER2/NR_MAC_COMMON/nr_mac_extern.h
+++ b/openair2/LAYER2/NR_MAC_COMMON/nr_mac_extern.h
@@ -74,7 +74,7 @@ extern uint8_t rb_table[34];
 extern uint16_t pre_nb_rbs_required[2][MAX_NUM_CCs][NUMBER_OF_UE_MAX];
 extern uint8_t dlsch_ue_select_tbl_in_use;
 extern uint8_t new_dlsch_ue_select_tbl_in_use;
-extern boolean_t pre_scd_activeUE[NUMBER_OF_UE_MAX];
+extern bool pre_scd_activeUE[NUMBER_OF_UE_MAX];
 extern eNB_UE_STATS pre_scd_eNB_UE_stats[MAX_NUM_CCs][NUMBER_OF_UE_MAX];
 #endif*/
 
diff --git a/openair2/LAYER2/NR_MAC_UE/config_ue.c b/openair2/LAYER2/NR_MAC_UE/config_ue.c
index 5ffccf28d315a2ed7f355ffe703719f7310e6dbb..072f0e58de8f295c591c545dcb8ab0e8275a47f7 100644
--- a/openair2/LAYER2/NR_MAC_UE/config_ue.c
+++ b/openair2/LAYER2/NR_MAC_UE/config_ue.c
@@ -580,7 +580,7 @@ int nr_rrc_mac_config_req_ue_logicalChannelBearer(
     int                             cc_idP,
     uint8_t                         gNB_index,
     long                            logicalChannelIdentity,
-    boolean_t                       status){
+    bool                            status){
     NR_UE_MAC_INST_t *mac = get_mac_inst(module_id);
     mac->logicalChannelBearer_exist[logicalChannelIdentity] = status;
     return 0;
diff --git a/openair2/LAYER2/NR_MAC_UE/mac_defs.h b/openair2/LAYER2/NR_MAC_UE/mac_defs.h
index da39d3e0ed68ccefcaf789b4caa289360bb7007c..35302eaafba9562134574c3b317b22c9b3a3dc26 100644
--- a/openair2/LAYER2/NR_MAC_UE/mac_defs.h
+++ b/openair2/LAYER2/NR_MAC_UE/mac_defs.h
@@ -420,7 +420,7 @@ typedef struct {
   uint8_t BSR_reporting_active;
 
   /// LogicalChannelConfig has bearer.
-  boolean_t logicalChannelBearer_exist[NR_MAX_NUM_LCID];
+  bool logicalChannelBearer_exist[NR_MAX_NUM_LCID];
   NR_UE_SCHEDULING_INFO   scheduling_info;
 
   /// PHR
@@ -551,7 +551,7 @@ typedef struct prach_association_pattern {
 
 // SSB details
 typedef struct ssb_info {
-  boolean_t transmitted; // True if the SSB index is transmitted according to the SSB positions map configuration
+  bool transmitted; // True if the SSB index is transmitted according to the SSB positions map configuration
   prach_occasion_info_t *mapped_ro[MAX_NB_RO_PER_SSB_IN_ASSOCIATION_PATTERN]; // List of mapped RACH Occasions to this SSB index
   uint16_t nb_mapped_ro; // Total number of mapped ROs to this SSB index
 } ssb_info_t;
diff --git a/openair2/LAYER2/NR_MAC_UE/mac_proto.h b/openair2/LAYER2/NR_MAC_UE/mac_proto.h
index 01673c22d6f5956744d5b035b792c33782ef7f5e..d5174b3a449ed465c1451651233fbbcad3791ea0 100644
--- a/openair2/LAYER2/NR_MAC_UE/mac_proto.h
+++ b/openair2/LAYER2/NR_MAC_UE/mac_proto.h
@@ -85,14 +85,12 @@ int8_t nr_ue_decode_BCCH_DL_SCH(module_id_t module_id,
    \param cc_id                     component carrier id
    \param gNB_index                 gNB index
    \param long                      logicalChannelIdentity
-   \param boolean_t                 status*/
-int nr_rrc_mac_config_req_ue_logicalChannelBearer(
-	    module_id_t                 module_id,
-	    int                         cc_idP,
-	    uint8_t                     gNB_index,
-	    long                        logicalChannelIdentity,
-	    boolean_t                   status
-);
+   \param bool                      status*/
+int nr_rrc_mac_config_req_ue_logicalChannelBearer(module_id_t module_id,
+                                                  int         cc_idP,
+                                                  uint8_t     gNB_index,
+                                                  long        logicalChannelIdentity,
+                                                  bool        status);
 
 /**\brief primitive from RRC layer to MAC layer for configuration L1/L2, now supported 4 rrc messages: MIB, cell_group_config for MAC/PHY, spcell_config(serving cell config)
    \param module_id                 module id
@@ -154,14 +152,14 @@ void fill_scheduled_response(nr_scheduled_response_t *scheduled_response,
 */
 int8_t nr_ue_get_SR(module_id_t module_idP, frame_t frameP, slot_t slotP);
 
-/*! \fn  boolean_t update_bsr(module_id_t module_idP, frame_t frameP, slot_t slotP, uint8_t gNB_index)
+/*! \fn  bool update_bsr(module_id_t module_idP, frame_t frameP, slot_t slotP, uint8_t gNB_index)
    \brief get the rlc stats and update the bsr level for each lcid
 \param[in] Mod_id instance of the UE
 \param[in] frameP Frame index
 \param[in] slot slotP number
 \param[in] uint8_t gNB_index
 */
-boolean_t nr_update_bsr(module_id_t module_idP, frame_t frameP, slot_t slotP, uint8_t gNB_index);
+bool nr_update_bsr(module_id_t module_idP, frame_t frameP, slot_t slotP, uint8_t gNB_index);
 
 /*! \fn  nr_locate_BsrIndexByBufferSize (int *table, int size, int value)
    \brief locate the BSR level in the table as defined in 38.321. This function requires that he values in table to be monotonic, either increasing or decreasing. The returned value is not less than 0, nor greater than n-1, where n is the size of table.
diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c
index 735ff1bd546f8a0ed8742e1a9050c40524295ae2..507cdb2661df4f2598189be7611ab9e599e1aca0 100644
--- a/openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c
+++ b/openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c
@@ -325,7 +325,7 @@ void ssb_rach_config(RA_config_t *ra, NR_PRACH_RESOURCES_t *prach_resources, NR_
   // =======================================
 
   NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR ssb_perRACH_config = nr_rach_ConfigCommon->ssb_perRACH_OccasionAndCB_PreamblesPerSSB->present;
-  boolean_t multiple_ssb_per_ro; // true if more than one or exactly one SSB per RACH occasion, false if more than one RO per SSB
+  bool multiple_ssb_per_ro; // true if more than one or exactly one SSB per RACH occasion, false if more than one RO per SSB
   uint8_t ssb_rach_ratio; // Nb of SSBs per RACH or RACHs per SSB
   int total_preambles_per_ssb;
   uint8_t ssb_nb_in_ro;
diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
index 163f893baf9e000fdbad7276cc362ae7d73b0e6a..a41b9db0cb9e5d9e150adaefdc0b8c1cfc62f9b6 100644
--- a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
+++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
@@ -2012,7 +2012,7 @@ int find_pucch_resource_set(NR_UE_MAC_INST_t *mac, int uci_size) {
 *                processing slots of reception/transmission
 *                gNB_id identifier
 *
-* RETURN :       TRUE a valid resource has been found
+* RETURN :       true a valid resource has been found
 *
 * DESCRIPTION :  return tx harq process identifier for given transmission slot
 *                TS 38.213 9.2.1  PUCCH Resource Sets
@@ -2142,7 +2142,7 @@ uint8_t get_downlink_ack(NR_UE_MAC_INST_t *mac,
   int number_harq_feedback = 0;
   uint32_t dai_current = 0;
   uint32_t dai_max = 0;
-  bool two_transport_blocks = FALSE;
+  bool two_transport_blocks = false;
   int number_of_code_word = 1;
   int U_DAI_c = 0;
   int N_m_c_rx = 0;
@@ -2164,7 +2164,7 @@ uint8_t get_downlink_ack(NR_UE_MAC_INST_t *mac,
       bwpd->pdsch_Config->choice.setup &&
       bwpd->pdsch_Config->choice.setup->maxNrofCodeWordsScheduledByDCI &&
       bwpd->pdsch_Config->choice.setup->maxNrofCodeWordsScheduledByDCI[0] == 2) {
-    two_transport_blocks = TRUE;
+    two_transport_blocks = true;
     number_of_code_word = 2;
   }
 
@@ -2264,7 +2264,7 @@ uint8_t get_downlink_ack(NR_UE_MAC_INST_t *mac,
   * For a monitoring occasion of a PDCCH with DCI format 1_0 or DCI format 1_1 in at least one serving cell,
   * when a UE receives a PDSCH with one transport block and the value of higher layer parameter maxNrofCodeWordsScheduledByDCI is 2,
   * the HARQ-ACK response is associated with the first transport block and the UE generates a NACK for the second transport block
-  * if spatial bundling is not applied (HARQ-ACK-spatial-bundling-PUCCH = FALSE) and generates HARQ-ACK value of ACK for the second
+  * if spatial bundling is not applied (HARQ-ACK-spatial-bundling-PUCCH = false) and generates HARQ-ACK value of ACK for the second
   * transport block if spatial bundling is applied.
   */
 
@@ -2275,7 +2275,7 @@ uint8_t get_downlink_ack(NR_UE_MAC_INST_t *mac,
         ack_data[code_word][i] = 0;     /* nack data transport block which has been missed */
         number_harq_feedback++;
       }
-      if (two_transport_blocks == TRUE) {
+      if (two_transport_blocks == true) {
         dai_total[code_word][i] = dai[code_word][i]; /* for a single cell, dai_total is the same as dai of first cell */
       }
     }
@@ -2306,7 +2306,7 @@ uint8_t get_downlink_ack(NR_UE_MAC_INST_t *mac,
       o_ACK = o_ACK | (ack_data[1][m] << O_bit_number_cw1);
     }
 
-    if (two_transport_blocks == TRUE) {
+    if (two_transport_blocks == true) {
       O_bit_number_cw0 = (8 * j) + 2*(V_temp - 1);
     }
     else {
@@ -2321,7 +2321,7 @@ uint8_t get_downlink_ack(NR_UE_MAC_INST_t *mac,
     j = j + 1;
   }
 
-  if (two_transport_blocks == TRUE) {
+  if (two_transport_blocks == true) {
     O_ACK = 2 * ( 4 * j + V_temp2);  /* for two transport blocks */
   }
   else {
diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
index ad6bf3cdc4508e3f8c0c3ab99f8576b9183c7b1f..f6a42ccaab6408878b9e58fc8904b74d85885837 100644
--- a/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
+++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
@@ -1247,7 +1247,7 @@ NR_UE_L2_STATE_t nr_ue_scheduler(nr_downlink_indication_t *dl_info, nr_uplink_in
   }
 
   //Check whether Regular BSR is triggered
-  if (nr_update_bsr(mod_id, txFrameP, txSlotP, gNB_indexP) == TRUE) {
+  if (nr_update_bsr(mod_id, txFrameP, txSlotP, gNB_indexP) == true) {
     // call SR procedure to generate pending SR and BSR for next PUCCH/PUSCH TxOp.  This should implement the procedures
     // outlined in Sections 5.4.4 an 5.4.5 of 38.321
     mac->scheduling_info.SR_pending = 1;
@@ -1260,10 +1260,10 @@ NR_UE_L2_STATE_t nr_ue_scheduler(nr_downlink_indication_t *dl_info, nr_uplink_in
 
 }
 
-boolean_t
+bool
 nr_update_bsr(module_id_t module_idP, frame_t frameP, slot_t slotP, uint8_t gNB_index) {
   mac_rlc_status_resp_t rlc_status;
-  boolean_t bsr_regular_triggered = FALSE;
+  bool bsr_regular_triggered = false;
   uint8_t lcid;
   uint8_t lcgid;
   uint8_t num_lcid_with_data = 0; // for LCID with data only if LCGID is defined
@@ -1356,7 +1356,7 @@ nr_update_bsr(module_id_t module_idP, frame_t frameP, slot_t slotP, uint8_t gNB_
          which belong to any LCG and for which data is already available for transmission
        */
       {
-        bsr_regular_triggered = TRUE;
+        bsr_regular_triggered = true;
         LOG_D(NR_MAC, "[UE %d] PDCCH Tick : MAC BSR Triggered LCID%d LCGID%d data become available at frame %d slot %d\n",
               module_idP, lcid,
               mac->scheduling_info.LCGID[lcid],
@@ -1367,7 +1367,7 @@ nr_update_bsr(module_id_t module_idP, frame_t frameP, slot_t slotP, uint8_t gNB_
 
     // Trigger Regular BSR if ReTxBSR Timer has expired and UE has data for transmission
     if (mac->scheduling_info.retxBSR_SF == 0) {
-      bsr_regular_triggered = TRUE;
+      bsr_regular_triggered = true;
 
       if ((mac->BSR_reporting_active & NR_BSR_TRIGGER_REGULAR) == 0) {
         LOG_I(NR_MAC, "[UE %d] PDCCH Tick : MAC BSR Triggered ReTxBSR Timer expiry at frame %d slot %d\n",
@@ -1628,7 +1628,7 @@ static void build_ro_list(NR_UE_MAC_INST_t *mac) {
   int y2;  // PRACH Configuration Index table additional variable used to compute the valid frame numbers
   uint8_t slot_shift_for_map;
   uint8_t map_shift;
-  boolean_t even_slot_invalid;
+  bool even_slot_invalid;
   int64_t s_map;
   uint8_t prach_conf_start_symbol; // Starting symbol of the PRACH occasions in the PRACH slot
   uint8_t N_t_slot; // Number of PRACH occasions in a 14-symbols PRACH slot
@@ -1900,7 +1900,7 @@ static void map_ssb_to_ro(NR_UE_MAC_INST_t *mac) {
     mac->scc_SIB->uplinkConfigCommon->initialUplinkBWP.rach_ConfigCommon->choice.setup;
   NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR ssb_perRACH_config = setup->ssb_perRACH_OccasionAndCB_PreamblesPerSSB->present;
 
-  boolean_t multiple_ssb_per_ro; // true if more than one or exactly one SSB per RACH occasion, false if more than one RO per SSB
+  bool multiple_ssb_per_ro; // true if more than one or exactly one SSB per RACH occasion, false if more than one RO per SSB
   uint8_t ssb_rach_ratio; // Nb of SSBs per RACH or RACHs per SSB
   uint16_t required_nb_of_prach_occasion; // Nb of RACH occasions required to map all the SSBs
   uint8_t required_nb_of_prach_conf_period; // Nb of PRACH configuration periods required to map all the SSBs
diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
index c502975f7c279863dacfff41d2cee35ed37ba570..63e1086be4e61f33a3040a83e4b1151be1a00dad 100644
--- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
+++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
@@ -365,6 +365,18 @@ void nr_store_dlsch_buffer(module_id_t module_id,
   }
 }
 
+void abort_nr_dl_harq(NR_UE_info_t* UE, int8_t harq_pid) {
+
+  NR_UE_sched_ctrl_t *sched_ctrl = &UE->UE_sched_ctrl;
+  NR_UE_harq_t *harq = &sched_ctrl->harq_processes[harq_pid];
+
+  harq->ndi ^= 1;
+  harq->round = 0;
+  UE->mac_stats.dl.errors++;
+  add_tail_nr_list(&sched_ctrl->available_dl_harq, harq_pid);
+
+}
+
 bool allocate_dl_retransmission(module_id_t module_id,
                                 frame_t frame,
                                 sub_frame_t slot,
@@ -378,6 +390,17 @@ bool allocate_dl_retransmission(module_id_t module_id,
   NR_UE_sched_ctrl_t *sched_ctrl = &UE->UE_sched_ctrl;
   NR_sched_pdsch_t *retInfo = &sched_ctrl->harq_processes[current_harq_pid].sched_pdsch;
   NR_CellGroupConfig_t *cg = UE->CellGroup;
+  NR_pdsch_semi_static_t *ps = &sched_ctrl->pdsch_semi_static;
+
+  //TODO remove this and handle retransmission with old nrOfLayers
+  //     once ps structure is removed
+  if(ps->nrOfLayers < retInfo->nrOfLayers) {
+    LOG_W(NR_MAC,"Cannot schedule retransmission. RI changed from %d to %d\n",
+          retInfo->nrOfLayers, ps->nrOfLayers);
+    abort_nr_dl_harq(UE, current_harq_pid);
+    remove_front_nr_list(&sched_ctrl->retrans_dl_harq);
+    return false;
+  }
 
   NR_BWP_DownlinkDedicated_t *bwpd =
       cg &&
@@ -401,7 +424,6 @@ bool allocate_dl_retransmission(module_id_t module_id,
   const uint16_t bwpSize = coresetid == 0 ? RC.nrmac[module_id]->cset0_bwp_size : NRRIV2BW(genericParameters->locationAndBandwidth, MAX_BWP_SIZE);
 
   int rbStart = 0; // start wrt BWPstart
-  NR_pdsch_semi_static_t *ps = &sched_ctrl->pdsch_semi_static;
   int rbSize = 0;
   const int tda = get_dl_tda(RC.nrmac[module_id], scc, slot);
   AssertFatal(tda>=0,"Unable to find PDSCH time domain allocation in list\n");
@@ -1353,6 +1375,8 @@ void nr_schedule_ue_spec(module_id_t module_id,
       /* save which time allocation has been used, to be used on
        * retransmissions */
       harq->sched_pdsch.time_domain_allocation = ps->time_domain_allocation;
+      /* save nr of layers for retransmissions */
+      harq->sched_pdsch.nrOfLayers = ps->nrOfLayers;
 
       // ta command is sent, values are reset
       if (sched_ctrl->ta_apply) {
diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
index a3accf5313615ab6f6e55d2fde87e4d735f69345..fb8121978b0bb916fa29fcd03018bde99fe54fc5 100644
--- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
+++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
@@ -300,12 +300,8 @@ static void handle_dl_harq(NR_UE_info_t * UE,
     harq->round = 0;
     harq->ndi ^= 1;
   } else if (harq->round >= harq_round_max - 1) {
-    add_tail_nr_list(&UE->UE_sched_ctrl.available_dl_harq, harq_pid);
-    harq->round = 0;
-    harq->ndi ^= 1;
-    NR_mac_stats_t *stats = &UE->mac_stats;
-    stats->dl.errors++;
-    LOG_D(NR_MAC, "retransmission error for UE %04x (total %"PRIu64")\n", UE->rnti, stats->dl.errors);
+    abort_nr_dl_harq(UE, harq_pid);
+    LOG_D(NR_MAC, "retransmission error for UE %04x (total %"PRIu64")\n", UE->rnti, UE->mac_stats.dl.errors);
   } else {
     LOG_D(PHY,"NACK for: pid %d, ue %04x\n",harq_pid, UE->rnti);
     add_tail_nr_list(&UE->UE_sched_ctrl.retrans_dl_harq, harq_pid);
diff --git a/openair2/LAYER2/NR_MAC_gNB/mac_proto.h b/openair2/LAYER2/NR_MAC_gNB/mac_proto.h
index 851890af1951e4052cac4f6ee1b4d4f213d961be..30ab8f662fd28ba457b1cd1da4f3321ae8529c88 100644
--- a/openair2/LAYER2/NR_MAC_gNB/mac_proto.h
+++ b/openair2/LAYER2/NR_MAC_gNB/mac_proto.h
@@ -520,4 +520,6 @@ size_t dump_mac_stats(gNB_MAC_INST *gNB, char *output, size_t strlen, bool reset
 
 void process_CellGroup(NR_CellGroupConfig_t *CellGroup, NR_UE_sched_ctrl_t *sched_ctrl);
 
+void abort_nr_dl_harq(NR_UE_info_t* UE, int8_t harq_pid);
+
 #endif /*__LAYER2_NR_MAC_PROTO_H__*/
diff --git a/openair2/LAYER2/NR_MAC_gNB/main.c b/openair2/LAYER2/NR_MAC_gNB/main.c
index 9b9fd4e76cbed3900730877eca4af3d13ecde5c0..c05af4d4a8f00e7ea022c8db9f875280ab174c14 100644
--- a/openair2/LAYER2/NR_MAC_gNB/main.c
+++ b/openair2/LAYER2/NR_MAC_gNB/main.c
@@ -211,8 +211,8 @@ void mac_top_init_gNB(void)
         RC.nrmac[i]->pre_processor_dl = nr_init_fr1_dlsch_preprocessor(i, 0);
         RC.nrmac[i]->pre_processor_ul = nr_init_fr1_ulsch_preprocessor(i, 0);
       }
-      pthread_create(&RC.nrmac[i]->stats_thread,NULL,nrmac_stats_thread,(void*)RC.nrmac[i]);
-
+      if (!IS_SOFTMODEM_NOSTATS_BIT)
+        pthread_create(&RC.nrmac[i]->stats_thread, NULL, nrmac_stats_thread, (void*)RC.nrmac[i]);
     }//END for (i = 0; i < RC.nb_nr_macrlc_inst; i++)
 
     AssertFatal(rlc_module_init(1) == 0,"Could not initialize RLC layer\n");
diff --git a/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h b/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
index 7b14bd41db309713292a70e21adcd6f8244b1957..590e8c538cfe2de2e1ae48dd9849992dfd8df545 100644
--- a/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
+++ b/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
@@ -440,6 +440,7 @@ typedef struct NR_sched_pdsch {
   /// only important for retransmissions; otherwise, the TDA in
   /// NR_pdsch_semi_static_t has precedence
   int time_domain_allocation;
+  uint8_t nrOfLayers;
 } NR_sched_pdsch_t;
 
 typedef struct NR_UE_harq {
@@ -641,7 +642,6 @@ typedef struct {
 } NR_UE_sched_ctrl_t;
 
 typedef struct {
-  boolean_t fiveG_connected;
   uicc_t *uicc;
 } NRUEcontext_t;
 
diff --git a/openair2/LAYER2/PDCP_v10.1.0/pdcp.c b/openair2/LAYER2/PDCP_v10.1.0/pdcp.c
index 108a5dbe91435b6e1265360d2abc5c14df37e097..9adc6ecb5dfc90aa72926d3b233f281814261758 100644
--- a/openair2/LAYER2/PDCP_v10.1.0/pdcp.c
+++ b/openair2/LAYER2/PDCP_v10.1.0/pdcp.c
@@ -139,7 +139,7 @@ extern volatile int oai_exit;
 pthread_t pdcp_stats_thread_desc;
 
 // will be called when 4G F1 implementation will use GTP-U instead of protobuf
-boolean_t cu_f1u_data_req(
+bool cu_f1u_data_req(
   protocol_ctxt_t  *ctxt_pP,
   const srb_flag_t srb_flagP,
   const rb_id_t rb_id,
@@ -228,7 +228,7 @@ rlc_op_status_t cu_send_to_du(const protocol_ctxt_t *const ctxt,
 	__func__, rb_id, size);
   extern instance_t CUuniqInstance;
   itti_send_msg_to_task(TASK_GTPV1_U, CUuniqInstance, message_p);
-  return TRUE;
+  return true;
 }
 
 //-----------------------------------------------------------------------------
@@ -239,18 +239,16 @@ rlc_op_status_t cu_send_to_du(const protocol_ctxt_t *const ctxt,
  * this mem_block_t to be dissected for testing purposes. For further details see test
  * code at targets/TEST/PDCP/test_pdcp.c:test_pdcp_data_req()
  */
-boolean_t pdcp_data_req(
-  protocol_ctxt_t  *ctxt_pP,
-  const srb_flag_t     srb_flagP,
-  const rb_id_t        rb_idP,
-  const mui_t          muiP,
-  const confirm_t      confirmP,
-  const sdu_size_t     sdu_buffer_sizeP,
-  unsigned char *const sdu_buffer_pP,
-  const pdcp_transmission_mode_t modeP,
-  const uint32_t *const sourceL2Id,
-  const uint32_t *const destinationL2Id
-)
+bool pdcp_data_req(protocol_ctxt_t  *ctxt_pP,
+                   const srb_flag_t     srb_flagP,
+                   const rb_id_t        rb_idP,
+                   const mui_t          muiP,
+                   const confirm_t      confirmP,
+                   const sdu_size_t     sdu_buffer_sizeP,
+                   unsigned char *const sdu_buffer_pP,
+                   const pdcp_transmission_mode_t modeP,
+                   const uint32_t *const sourceL2Id,
+                   const uint32_t *const destinationL2Id)
 //-----------------------------------------------------------------------------
 {
   pdcp_t            *pdcp_p          = NULL;
@@ -261,7 +259,7 @@ boolean_t pdcp_data_req(
   uint16_t           current_sn      = 0;
   mem_block_t       *pdcp_pdu_p      = NULL;
   rlc_op_status_t    rlc_status;
-  boolean_t          ret             = TRUE;
+  bool               ret             = true;
   hash_key_t         key             = HASHTABLE_NOT_A_KEY_VALUE;
   hashtable_rc_t     h_rc;
   uint8_t            rb_offset= (srb_flagP == 0) ? DTCH -1 : 0;
@@ -277,7 +275,7 @@ boolean_t pdcp_data_req(
 
   if (sdu_buffer_sizeP == 0) {
     LOG_W(PDCP, "Handed SDU is of size 0! Ignoring...\n");
-    return FALSE;
+    return false;
   }
 
   /*
@@ -287,12 +285,12 @@ boolean_t pdcp_data_req(
               sdu_buffer_sizeP, MAX_IP_PACKET_SIZE);
 
   if (modeP == PDCP_TRANSMISSION_MODE_TRANSPARENT) {
-    AssertError (rb_idP < NB_RB_MBMS_MAX, return FALSE, "RB id is too high (%ld/%d) %u %u!\n", rb_idP, NB_RB_MBMS_MAX, ctxt_pP->module_id, ctxt_pP->rnti);
+    AssertError (rb_idP < NB_RB_MBMS_MAX, return false, "RB id is too high (%ld/%d) %u %u!\n", rb_idP, NB_RB_MBMS_MAX, ctxt_pP->module_id, ctxt_pP->rnti);
   } else {
     if (srb_flagP) {
-      AssertError (rb_idP < 3, return FALSE, "RB id is too high (%ld/%d) %u %u!\n", rb_idP, 3, ctxt_pP->module_id, ctxt_pP->rnti);
+      AssertError (rb_idP < 3, return false, "RB id is too high (%ld/%d) %u %u!\n", rb_idP, 3, ctxt_pP->module_id, ctxt_pP->rnti);
     } else {
-      AssertError (rb_idP < LTE_maxDRB, return FALSE, "RB id is too high (%ld/%d) %u %u!\n", rb_idP, LTE_maxDRB, ctxt_pP->module_id, ctxt_pP->rnti);
+      AssertError (rb_idP < LTE_maxDRB, return false, "RB id is too high (%ld/%d) %u %u!\n", rb_idP, LTE_maxDRB, ctxt_pP->module_id, ctxt_pP->rnti);
     }
   }
 
@@ -304,7 +302,7 @@ boolean_t pdcp_data_req(
       LOG_W(PDCP, PROTOCOL_CTXT_FMT" Instance is not configured for rb_id %ld Ignoring SDU...\n",
             PROTOCOL_CTXT_ARGS(ctxt_pP),
             rb_idP);
-      return FALSE;
+      return false;
     }
   }
 
@@ -371,7 +369,7 @@ boolean_t pdcp_data_req(
         memset(&pdu_header.mac_i[0],0,PDCP_CONTROL_PLANE_DATA_PDU_MAC_I_SIZE);
         memset(&pdcp_pdu_p->data[sdu_buffer_sizeP + pdcp_header_len],0,PDCP_CONTROL_PLANE_DATA_PDU_MAC_I_SIZE);
 
-        if (pdcp_serialize_control_plane_data_pdu_with_SRB_sn_buffer((unsigned char *)pdcp_pdu_p->data, &pdu_header) == FALSE) {
+        if (pdcp_serialize_control_plane_data_pdu_with_SRB_sn_buffer((unsigned char *)pdcp_pdu_p->data, &pdu_header) == false) {
           LOG_E(PDCP, PROTOCOL_PDCP_CTXT_FMT" Cannot fill PDU buffer with relevant header fields!\n",
                 PROTOCOL_PDCP_CTXT_ARGS(ctxt_pP,pdcp_p));
 
@@ -382,7 +380,7 @@ boolean_t pdcp_data_req(
           }
 
           VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_DATA_REQ,VCD_FUNCTION_OUT);
-          return FALSE;
+          return false;
         }
       } else {
         pdcp_user_plane_data_pdu_header_with_long_sn pdu_header;
@@ -390,7 +388,7 @@ boolean_t pdcp_data_req(
         pdu_header.sn = pdcp_get_next_tx_seq_number(pdcp_p);
         current_sn = pdu_header.sn ;
 
-        if (pdcp_serialize_user_plane_data_pdu_with_long_sn_buffer((unsigned char *)pdcp_pdu_p->data, &pdu_header) == FALSE) {
+        if (pdcp_serialize_user_plane_data_pdu_with_long_sn_buffer((unsigned char *)pdcp_pdu_p->data, &pdu_header) == false) {
           LOG_E(PDCP, PROTOCOL_PDCP_CTXT_FMT" Cannot fill PDU buffer with relevant header fields!\n",
                 PROTOCOL_PDCP_CTXT_ARGS(ctxt_pP,pdcp_p));
 
@@ -401,7 +399,7 @@ boolean_t pdcp_data_req(
           }
 
           VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_DATA_REQ,VCD_FUNCTION_OUT);
-          return FALSE;
+          return false;
         }
       }
 
@@ -422,7 +420,7 @@ boolean_t pdcp_data_req(
         }
 
         VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_DATA_REQ,VCD_FUNCTION_OUT);
-        return FALSE;
+        return false;
       }
 
       LOG_D(PDCP, "Sequence number %d is assigned to current PDU\n", current_sn);
@@ -481,7 +479,7 @@ boolean_t pdcp_data_req(
             ctxt_pP->module_id,
             rb_idP);
       VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_DATA_REQ,VCD_FUNCTION_OUT);
-      return FALSE;
+      return false;
     }
 
     /*
@@ -497,16 +495,16 @@ boolean_t pdcp_data_req(
 
       if (ctxt_pP->enb_flag == ENB_FLAG_YES && NODE_IS_DU(RC.rrc[ctxt_pP->module_id]->node_type)) {
         LOG_E(PDCP, "Can't be DU, bad node type %d \n", RC.rrc[ctxt_pP->module_id]->node_type);
-        ret=FALSE;
+        ret = false;
       } else {
         rlc_status = pdcp_params.send_rlc_data_req_func(ctxt_pP, srb_flagP, MBMS_FLAG_NO, rb_idP, muiP,
                      confirmP, pdcp_pdu_size, pdcp_pdu_p,sourceL2Id,
                      destinationL2Id);
-	ret=FALSE;
+        ret = false;
         switch (rlc_status) {
           case RLC_OP_STATUS_OK:
             LOG_D(PDCP, "Data sending request over RLC succeeded!\n");
-            ret=TRUE;
+            ret=true;
             break;
 
           case RLC_OP_STATUS_BAD_PARAMETER:
@@ -544,7 +542,7 @@ boolean_t pdcp_data_req(
         itti_send_msg_to_task (TASK_CU_F1, ctxt_pP->module_id, message_p);
         //CU_send_DL_RRC_MESSAGE_TRANSFER(ctxt_pP->module_id, message_p);
         LOG_I(PDCP, "Send F1AP_DL_RRC_MESSAGE with ITTI\n");
-        ret=TRUE;
+        ret=true;
       } else {
         rlc_status = rlc_data_req(ctxt_pP
                                   , srb_flagP
@@ -561,27 +559,27 @@ boolean_t pdcp_data_req(
         switch (rlc_status) {
           case RLC_OP_STATUS_OK:
             LOG_D(PDCP, "Data sending request over RLC succeeded!\n");
-            ret=TRUE;
+            ret=true;
             break;
 
           case RLC_OP_STATUS_BAD_PARAMETER:
             LOG_W(PDCP, "Data sending request over RLC failed with 'Bad Parameter' reason!\n");
-            ret= FALSE;
+            ret= false;
             break;
 
           case RLC_OP_STATUS_INTERNAL_ERROR:
             LOG_W(PDCP, "Data sending request over RLC failed with 'Internal Error' reason!\n");
-            ret= FALSE;
+            ret= false;
             break;
 
           case RLC_OP_STATUS_OUT_OF_RESSOURCES:
             LOG_W(PDCP, "Data sending request over RLC failed with 'Out of Resources' reason!\n");
-            ret= FALSE;
+            ret= false;
             break;
 
           default:
             LOG_W(PDCP, "RLC returned an unknown status code after PDCP placed the order to send some data (Status Code:%d)\n", rlc_status);
-            ret= FALSE;
+            ret= false;
             break;
         } // switch case
       }
@@ -596,7 +594,7 @@ boolean_t pdcp_data_req(
 
   /*
    * Control arrives here only if rlc_data_req() returns RLC_OP_STATUS_OK
-   * so we return TRUE afterwards
+   * so we return true afterwards
    */
 
   for (pdcp_uid=0; pdcp_uid< MAX_MOBILES_PER_ENB; pdcp_uid++) {
@@ -619,7 +617,7 @@ boolean_t pdcp_data_req(
 
 
 //-----------------------------------------------------------------------------
-boolean_t
+bool
 pdcp_data_ind(
   const protocol_ctxt_t *const ctxt_pP,
   const srb_flag_t   srb_flagP,
@@ -638,7 +636,7 @@ pdcp_data_ind(
   pdcp_sn_t    sequence_number = 0;
   volatile sdu_size_t   payload_offset  = 0;
   rb_id_t      rb_id            = rb_idP;
-  boolean_t    packet_forwarded = FALSE;
+  bool         packet_forwarded = false;
   hash_key_t      key             = HASHTABLE_NOT_A_KEY_VALUE;
   hashtable_rc_t  h_rc;
   uint8_t      rb_offset= (srb_flagP == 0) ? DTCH -1 :0;
@@ -654,7 +652,7 @@ pdcp_data_ind(
               "[MSG] PDCP UL %s PDU on rb_id %ld\n", (srb_flagP)? "CONTROL" : "DATA", rb_idP);
 
   if (MBMS_flagP) {
-    AssertError (rb_idP < NB_RB_MBMS_MAX, return FALSE,
+    AssertError (rb_idP < NB_RB_MBMS_MAX, return false,
                  "RB id is too high (%ld/%d) %u rnti %x!\n",
                  rb_idP,
                  NB_RB_MBMS_MAX,
@@ -680,12 +678,12 @@ pdcp_data_ind(
     }
   } else {
     rb_id = rb_idP % LTE_maxDRB;
-    AssertError (rb_id < LTE_maxDRB, return FALSE, "RB id is too high (%ld/%d) %u UE %x!\n",
+    AssertError (rb_id < LTE_maxDRB, return false, "RB id is too high (%ld/%d) %u UE %x!\n",
                  rb_id,
                  LTE_maxDRB,
                  ctxt_pP->module_id,
                  ctxt_pP->rnti);
-    AssertError (rb_id > 0, return FALSE, "RB id is too low (%ld/%d) %u UE %x!\n",
+    AssertError (rb_id > 0, return false, "RB id is too low (%ld/%d) %u UE %x!\n",
                  rb_id,
                  LTE_maxDRB,
                  ctxt_pP->module_id,
@@ -700,14 +698,14 @@ pdcp_data_ind(
             key);
       free_mem_block(sdu_buffer_pP, __func__);
       VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_DATA_IND,VCD_FUNCTION_OUT);
-      return FALSE;
+      return false;
     }
   }
 
 
   if (sdu_buffer_sizeP == 0) {
     LOG_W(PDCP, "SDU buffer size is zero! Ignoring this chunk!\n");
-    return FALSE;
+    return false;
   }
 
   if (ctxt_pP->enb_flag) {
@@ -764,13 +762,13 @@ pdcp_data_ind(
       }
 
       VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_DATA_IND,VCD_FUNCTION_OUT);
-      return FALSE;
+      return false;
     }
 
 #if 0
 
     /* Removed by Cedric */
-    if (pdcp_is_rx_seq_number_valid(sequence_number, pdcp_p, srb_flagP) == TRUE) {
+    if (pdcp_is_rx_seq_number_valid(sequence_number, pdcp_p, srb_flagP) == true) {
       LOG_T(PDCP, "Incoming PDU has a sequence number (%d) in accordance with RX window\n", sequence_number);
       /* if (dc == PDCP_DATA_PDU )
       LOG_D(PDCP, "Passing piggybacked SDU to NAS driver...\n");
@@ -788,7 +786,7 @@ pdcp_data_ind(
        */
       LOG_W(PDCP, "Ignoring PDU...\n");
       free_mem_block(sdu_buffer_pP, __func__);
-      return FALSE;
+      return false;
     }
 
 #endif
@@ -837,7 +835,7 @@ pdcp_data_ind(
         LOG_W(PDCP, "Ignoring PDU...\n");
         free_mem_block(sdu_buffer_pP, __func__);
         /* TODO: indicate integrity verification failure to upper layer */
-        return FALSE;
+        return false;
       }
 
       if (sequence_number < pdcp_p->next_pdcp_rx_sn)
@@ -864,7 +862,7 @@ pdcp_data_ind(
       }
 
       VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_DATA_IND,VCD_FUNCTION_OUT);
-      return TRUE;
+      return true;
     } /* if (srb_flagP) */
 
     /*
@@ -892,7 +890,7 @@ pdcp_data_ind(
           LOG_W(PDCP, "Ignoring PDU...\n");
           free_mem_block(sdu_buffer_pP, __func__);
           /* TODO: indicate integrity verification failure to upper layer */
-          return FALSE;
+          return false;
         } else if (pdcp_p->next_pdcp_rx_sn - sequence_number > reordering_window) {
           pdcp_p->rx_hfn++;
           rx_hfn_for_count  = pdcp_p->rx_hfn;
@@ -948,7 +946,7 @@ pdcp_data_ind(
           LOG_W(PDCP, "Ignoring PDU...\n");
           free_mem_block(sdu_buffer_pP, __func__);
           /* TODO: indicate integrity verification failure to upper layer */
-          return FALSE;
+          return false;
         }
 
         /* TODO: specs say we have to store this PDU in a list and then deliver
@@ -1015,7 +1013,7 @@ pdcp_data_ind(
           LOG_W(PDCP, "Ignoring PDU...\n");
           free_mem_block(sdu_buffer_pP, __func__);
           /* TODO: indicate integrity verification failure to upper layer */
-          return FALSE;
+          return false;
         }
 
         break;
@@ -1039,7 +1037,7 @@ pdcp_data_ind(
     }
 
     VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_DATA_IND,VCD_FUNCTION_OUT);
-    return TRUE;
+    return true;
   }
 
   // XXX Decompression would be done at this point
@@ -1051,7 +1049,7 @@ pdcp_data_ind(
    */
 
   if (LINK_ENB_PDCP_TO_GTPV1U) {
-    if ((TRUE == ctxt_pP->enb_flag) && (FALSE == srb_flagP)) {
+    if ((true == ctxt_pP->enb_flag) && (false == srb_flagP)) {
       LOG_D(PDCP, "Sending packet to GTP, Calling GTPV1U_ENB_TUNNEL_DATA_REQ  ue %x rab %ld len %u\n",
             ctxt_pP->rnti,
             rb_id + 4,
@@ -1069,10 +1067,10 @@ pdcp_data_ind(
       GTPV1U_ENB_TUNNEL_DATA_REQ(message_p).rnti         = ctxt_pP->rnti;
       GTPV1U_ENB_TUNNEL_DATA_REQ(message_p).rab_id       = rb_id + 4;
       itti_send_msg_to_task(TASK_GTPV1_U, INSTANCE_DEFAULT, message_p);
-      packet_forwarded = TRUE;
+      packet_forwarded = true;
     }
   } else {
-    packet_forwarded = FALSE;
+    packet_forwarded = false;
   }
 
 #ifdef MBMS_MULTICAST_OUT
@@ -1086,13 +1084,13 @@ pdcp_data_ind(
    // dest_addr.sin_addr.s_addr = ip_header->daddr;
 
    // sendto(mbms_socket, &sdu_buffer_pP->data[payload_offset], sdu_buffer_sizeP - payload_offset, MSG_DONTWAIT, (struct sockaddr*)&dest_addr, sizeof(dest_addr));
-   // //packet_forwarded = TRUE;
+   // //packet_forwarded = true;
 
   }
 
 #endif
 
-  if (FALSE == packet_forwarded) {
+  if (false == packet_forwarded) {
     notifiedFIFO_elt_t * new_sdu_p = newNotifiedFIFO_elt(sdu_buffer_sizeP - payload_offset + sizeof (pdcp_data_ind_header_t), 0, NULL, NULL);
 
       if ((MBMS_flagP == 0) && (pdcp_p->rlc_mode == RLC_MODE_AM)) {
@@ -1185,7 +1183,7 @@ pdcp_data_ind(
   }
 
   VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_DATA_IND,VCD_FUNCTION_OUT);
-  return TRUE;
+  return true;
 }
 
 void pdcp_update_stats(const protocol_ctxt_t *const  ctxt_pP) {
@@ -1297,7 +1295,7 @@ pdcp_run (
                                   NULL, NULL
                                  );
 
-          if (result != TRUE)
+          if (result != true)
             LOG_E(PDCP, "PDCP data request failed!\n");
 
           // Message buffer has been processed, free it now.
@@ -1420,7 +1418,7 @@ pdcp_mbms_run (
 //                                  NULL, NULL
 //                                 );
 //
-//          if (result != TRUE)
+//          if (result != true)
 //            LOG_E(PDCP, "PDCP data request failed!\n");
 //
 //          // Message buffer has been processed, free it now.
@@ -1549,10 +1547,7 @@ void pdcp_add_UE(const protocol_ctxt_t *const  ctxt_pP) {
 }
 
 //-----------------------------------------------------------------------------
-boolean_t
-pdcp_remove_UE(
-  const protocol_ctxt_t *const  ctxt_pP
-)
+bool pdcp_remove_UE(const protocol_ctxt_t *const  ctxt_pP)
 //-----------------------------------------------------------------------------
 {
   LTE_DRB_Identity_t  srb_id         = 0;
@@ -1599,19 +1594,17 @@ pdcp_remove_UE(
 
 
 //-----------------------------------------------------------------------------
-boolean_t
-rrc_pdcp_config_asn1_req (
-  const protocol_ctxt_t *const  ctxt_pP,
-  LTE_SRB_ToAddModList_t  *const srb2add_list_pP,
-  LTE_DRB_ToAddModList_t  *const drb2add_list_pP,
-  LTE_DRB_ToReleaseList_t *const drb2release_list_pP,
-  const uint8_t                   security_modeP,
-  uint8_t                  *const kRRCenc_pP,
-  uint8_t                  *const kRRCint_pP,
-  uint8_t                  *const kUPenc_pP,
-  LTE_PMCH_InfoList_r9_t  *const pmch_InfoList_r9_pP,
-  rb_id_t                 *const defaultDRB
-)
+bool
+rrc_pdcp_config_asn1_req(const protocol_ctxt_t *const  ctxt_pP,
+                         LTE_SRB_ToAddModList_t  *const srb2add_list_pP,
+                         LTE_DRB_ToAddModList_t  *const drb2add_list_pP,
+                         LTE_DRB_ToReleaseList_t *const drb2release_list_pP,
+                         const uint8_t                   security_modeP,
+                         uint8_t                  *const kRRCenc_pP,
+                         uint8_t                  *const kRRCint_pP,
+                         uint8_t                  *const kUPenc_pP,
+                         LTE_PMCH_InfoList_r9_t  *const pmch_InfoList_r9_pP,
+                         rb_id_t                 *const defaultDRB)
 //-----------------------------------------------------------------------------
 {
   long int        lc_id          = 0;
@@ -1669,7 +1662,7 @@ rrc_pdcp_config_asn1_req (
                 PROTOCOL_PDCP_CTXT_ARGS(ctxt_pP, pdcp_p),
                 key);
           free(pdcp_p);
-          return TRUE;
+          return true;
         } else {
           LOG_D(PDCP, PROTOCOL_PDCP_CTXT_FMT" CONFIG_ACTION_ADD key 0x%"PRIx64"\n",
                 PROTOCOL_PDCP_CTXT_ARGS(ctxt_pP, pdcp_p),
@@ -1784,13 +1777,13 @@ rrc_pdcp_config_asn1_req (
                 PROTOCOL_PDCP_CTXT_ARGS(ctxt_pP, pdcp_p),
                 key_defaultDRB);
           free(pdcp_p);
-          return TRUE;
+          return true;
         } else if (h_rc != HASH_TABLE_OK) {
           LOG_E(PDCP, PROTOCOL_PDCP_CTXT_FMT" CONFIG_ACTION_ADD ADD key 0x%"PRIx64" FAILED\n",
                 PROTOCOL_PDCP_CTXT_ARGS(ctxt_pP, pdcp_p),
                 key);
           free(pdcp_p);
-          return TRUE;
+          return true;
         } else {
           LOG_D(PDCP, PROTOCOL_PDCP_CTXT_FMT" CONFIG_ACTION_ADD ADD key 0x%"PRIx64"\n",
                 PROTOCOL_PDCP_CTXT_ARGS(ctxt_pP, pdcp_p),
@@ -1944,7 +1937,7 @@ rrc_pdcp_config_asn1_req (
         if (ctxt_pP->enb_flag) {
           drb_id =  (mch_id * LTE_maxSessionPerPMCH ) + lc_id ;//+ (LTE_maxDRB + 3)*MAX_MOBILES_PER_ENB; // 1
 
-          if (pdcp_mbms_array_eNB[ctxt_pP->module_id][mch_id][lc_id].instanciated_instance == TRUE) {
+          if (pdcp_mbms_array_eNB[ctxt_pP->module_id][mch_id][lc_id].instanciated_instance == true) {
             action = CONFIG_ACTION_MBMS_MODIFY;
           } else {
             action = CONFIG_ACTION_MBMS_ADD;
@@ -1952,7 +1945,7 @@ rrc_pdcp_config_asn1_req (
         } else {
           drb_id =  (mch_id * LTE_maxSessionPerPMCH ) + lc_id; // + (LTE_maxDRB + 3); // 15
 
-          if (pdcp_mbms_array_ue[ctxt_pP->module_id][mch_id][lc_id].instanciated_instance == TRUE) {
+          if (pdcp_mbms_array_ue[ctxt_pP->module_id][mch_id][lc_id].instanciated_instance == true) {
             action = CONFIG_ACTION_MBMS_MODIFY;
           } else {
             action = CONFIG_ACTION_MBMS_ADD;
@@ -1990,23 +1983,22 @@ rrc_pdcp_config_asn1_req (
 }
 
 //-----------------------------------------------------------------------------
-boolean_t
-pdcp_config_req_asn1 (
-  const protocol_ctxt_t *const  ctxt_pP,
-  pdcp_t          *const        pdcp_pP,
-  const srb_flag_t              srb_flagP,
-  const rlc_mode_t              rlc_modeP,
-  const config_action_t         actionP,
-  const uint16_t                lc_idP,
-  const uint16_t                mch_idP,
-  const rb_id_t                 rb_idP,
-  const uint8_t                 rb_snP,
-  const uint8_t                 rb_reportP,
-  const uint16_t                header_compression_profileP,
-  const uint8_t                 security_modeP,
-  uint8_t         *const        kRRCenc_pP,
-  uint8_t         *const        kRRCint_pP,
-  uint8_t         *const        kUPenc_pP)
+bool
+pdcp_config_req_asn1(const protocol_ctxt_t *const  ctxt_pP,
+                     pdcp_t          *const        pdcp_pP,
+                     const srb_flag_t              srb_flagP,
+                     const rlc_mode_t              rlc_modeP,
+                     const config_action_t         actionP,
+                     const uint16_t                lc_idP,
+                     const uint16_t                mch_idP,
+                     const rb_id_t                 rb_idP,
+                     const uint8_t                 rb_snP,
+                     const uint8_t                 rb_reportP,
+                     const uint16_t                header_compression_profileP,
+                     const uint8_t                 security_modeP,
+                     uint8_t         *const        kRRCenc_pP,
+                     uint8_t         *const        kRRCint_pP,
+                     uint8_t         *const        kUPenc_pP)
 //-----------------------------------------------------------------------------
 {
 
@@ -2015,7 +2007,7 @@ pdcp_config_req_asn1 (
       DevAssert(pdcp_pP != NULL);
 
       if (ctxt_pP->enb_flag == ENB_FLAG_YES) {
-        pdcp_pP->is_ue = FALSE;
+        pdcp_pP->is_ue = false;
         pdcp_add_UE(ctxt_pP);
 
         //pdcp_eNB_UE_instance_to_rnti[ctxtP->module_id] = ctxt_pP->rnti;
@@ -2035,11 +2027,11 @@ pdcp_config_req_asn1 (
 
         //pdcp_eNB_UE_instance_to_rnti_index = (pdcp_eNB_UE_instance_to_rnti_index + 1) % MAX_MOBILES_PER_ENB;
       } else {
-        pdcp_pP->is_ue = TRUE;
+        pdcp_pP->is_ue = true;
         pdcp_UE_UE_module_id_to_rnti[ctxt_pP->module_id] = ctxt_pP->rnti;
       }
 
-      pdcp_pP->is_srb                     = (srb_flagP == SRB_FLAG_YES) ? TRUE : FALSE;
+      pdcp_pP->is_srb                     = srb_flagP == SRB_FLAG_YES;
       pdcp_pP->lcid                       = lc_idP;
       pdcp_pP->rb_id                      = rb_idP;
       pdcp_pP->header_compression_profile = header_compression_profileP;
@@ -2162,10 +2154,10 @@ pdcp_config_req_asn1 (
             rb_idP);
 
       if (ctxt_pP->enb_flag == ENB_FLAG_YES) {
-        pdcp_mbms_array_eNB[ctxt_pP->module_id][mch_idP][lc_idP].instanciated_instance = TRUE ;
+        pdcp_mbms_array_eNB[ctxt_pP->module_id][mch_idP][lc_idP].instanciated_instance = true ;
         pdcp_mbms_array_eNB[ctxt_pP->module_id][mch_idP][lc_idP].rb_id = rb_idP;
       } else {
-        pdcp_mbms_array_ue[ctxt_pP->module_id][mch_idP][lc_idP].instanciated_instance = TRUE ;
+        pdcp_mbms_array_ue[ctxt_pP->module_id][mch_idP][lc_idP].instanciated_instance = true ;
         pdcp_mbms_array_ue[ctxt_pP->module_id][mch_idP][lc_idP].rb_id = rb_idP;
       }
 
@@ -2245,10 +2237,10 @@ void rrc_pdcp_config_req (
         pdcp_p->rb_id  = rb_idP;
 
         if (ctxt_pP->enb_flag == ENB_FLAG_NO) {
-          pdcp_p->is_ue = TRUE;
+          pdcp_p->is_ue = true;
           pdcp_UE_UE_module_id_to_rnti[ctxt_pP->module_id] = ctxt_pP->rnti;
         } else {
-          pdcp_p->is_ue = FALSE;
+          pdcp_p->is_ue = false;
         }
 
         pdcp_p->next_pdcp_tx_sn = 0;
@@ -2321,10 +2313,10 @@ void rrc_pdcp_config_req (
           pdcp_p->rb_id  = rb_idP;
 
           if (ctxt_pP->enb_flag == ENB_FLAG_NO) {
-            pdcp_p->is_ue = TRUE;
+            pdcp_p->is_ue = true;
             pdcp_UE_UE_module_id_to_rnti[ctxt_pP->module_id] = ctxt_pP->rnti;
           } else {
-            pdcp_p->is_ue = FALSE;
+            pdcp_p->is_ue = false;
           }
 
           pdcp_p->next_pdcp_tx_sn = 0;
diff --git a/openair2/LAYER2/PDCP_v10.1.0/pdcp.h b/openair2/LAYER2/PDCP_v10.1.0/pdcp.h
index 332ee382d712bd3c161623845d9a08d1d002569a..8cbc49d756356f697428e536843539b1b9bf72d2 100644
--- a/openair2/LAYER2/PDCP_v10.1.0/pdcp.h
+++ b/openair2/LAYER2/PDCP_v10.1.0/pdcp.h
@@ -51,7 +51,7 @@ typedef rlc_op_status_t  (*send_rlc_data_req_func_t)(const protocol_ctxt_t *cons
 						     const rb_id_t, const mui_t,
     confirm_t, sdu_size_t, mem_block_t *,const uint32_t *const, const uint32_t *const);
 
-typedef boolean_t (pdcp_data_ind_t)( const protocol_ctxt_t *, const srb_flag_t,
+typedef bool (pdcp_data_ind_t)( const protocol_ctxt_t *, const srb_flag_t,
 						 const MBMS_flag_t, const rb_id_t, const sdu_size_t,
 						 mem_block_t *,const uint32_t *const, const uint32_t *const);
 typedef pdcp_data_ind_t* pdcp_data_ind_func_t;
@@ -153,14 +153,13 @@ typedef struct pdcp_stats_s {
 
 
 typedef struct pdcp_s {
-  //boolean_t     instanciated_instance;
   uint16_t       header_compression_profile;
 
   /* SR: added this flag to distinguish UE/eNB instance as pdcp_run for virtual
    * mode can receive data on NETLINK for eNB while eNB_flag = 0 and for UE when eNB_flag = 1
    */
-  boolean_t is_ue;
-  boolean_t is_srb;
+  bool is_ue;
+  bool is_srb;
 
   /* Configured security algorithms */
   uint8_t cipheringAlgorithm;
@@ -217,7 +216,7 @@ typedef struct pdcp_s {
 } pdcp_t;
 
 typedef struct pdcp_mbms_s {
-  boolean_t instanciated_instance;
+  bool instanciated_instance;
   rb_id_t   rb_id;
 } pdcp_mbms_t;
 
@@ -230,7 +229,7 @@ typedef struct pdcp_mbms_s {
  * under targets/TEST/PDCP/
  */
 
-/*! \fn boolean_t pdcp_data_req(const protocol_ctxt_t* const  , srb_flag_t , rb_id_t , mui_t , confirm_t ,sdu_size_t , unsigned char* , pdcp_transmission_mode_t )
+/*! \fn bool pdcp_data_req(const protocol_ctxt_t* const  , srb_flag_t , rb_id_t , mui_t , confirm_t ,sdu_size_t , unsigned char* , pdcp_transmission_mode_t )
 * \brief This functions handles data transfer requests coming either from RRC or from IP
 * \param[in] ctxt_pP        Running context.
 * \param[in] rab_id         Radio Bearer ID
@@ -239,38 +238,34 @@ typedef struct pdcp_mbms_s {
 * \param[in] sdu_buffer_size Size of incoming SDU in bytes
 * \param[in] sdu_buffer      Buffer carrying SDU
 * \param[in] mode            flag to indicate whether the userplane data belong to the control plane or data plane or transparent
-* \return TRUE on success, FALSE otherwise
+* \return true on success, false otherwise
 * \note None
 * @ingroup _pdcp
 */
 
-boolean_t pdcp_data_req(
-  protocol_ctxt_t  *ctxt_pP,
-  const srb_flag_t srb_flagP,
-  const rb_id_t rb_id,
-  const mui_t muiP,
-  const confirm_t confirmP,
-  const sdu_size_t sdu_buffer_size,
-  unsigned char *const sdu_buffer,
-  const pdcp_transmission_mode_t mode,
-  const uint32_t * sourceL2Id,
-  const uint32_t * destinationL2Id
-);
-
-boolean_t cu_f1u_data_req(
-  protocol_ctxt_t  *ctxt_pP,
-  const srb_flag_t srb_flagP,
-  const rb_id_t rb_id,
-  const mui_t muiP,
-  const confirm_t confirmP,
-  const sdu_size_t sdu_buffer_size,
-  unsigned char *const sdu_buffer,
-  const pdcp_transmission_mode_t mode,
-  const uint32_t *const sourceL2Id,
-  const uint32_t *const destinationL2Id
-  );
-
-/*! \fn boolean_t pdcp_data_ind(const protocol_ctxt_t* const, srb_flag_t, MBMS_flag_t, rb_id_t, sdu_size_t, mem_block_t*, boolean_t)
+bool pdcp_data_req(protocol_ctxt_t  *ctxt_pP,
+                   const srb_flag_t srb_flagP,
+                   const rb_id_t rb_id,
+                   const mui_t muiP,
+                   const confirm_t confirmP,
+                   const sdu_size_t sdu_buffer_size,
+                   unsigned char *const sdu_buffer,
+                   const pdcp_transmission_mode_t mode,
+                   const uint32_t * sourceL2Id,
+                   const uint32_t * destinationL2Id);
+
+bool cu_f1u_data_req(protocol_ctxt_t  *ctxt_pP,
+                     const srb_flag_t srb_flagP,
+                     const rb_id_t rb_id,
+                     const mui_t muiP,
+                     const confirm_t confirmP,
+                     const sdu_size_t sdu_buffer_size,
+                     unsigned char *const sdu_buffer,
+                     const pdcp_transmission_mode_t mode,
+                     const uint32_t *const sourceL2Id,
+                     const uint32_t *const destinationL2Id);
+
+/*! \fn bool pdcp_data_ind(const protocol_ctxt_t* const, srb_flag_t, MBMS_flag_t, rb_id_t, sdu_size_t, mem_block_t*, bool)
 * \brief This functions handles data transfer indications coming from RLC
 * \param[in] ctxt_pP        Running context.
 * \param[in] Shows if rb is SRB
@@ -279,7 +274,7 @@ boolean_t cu_f1u_data_req(
 * \param[in] sdu_buffer_size Size of incoming SDU in bytes
 * \param[in] sdu_buffer Buffer carrying SDU
 * \param[in] is_data_plane flag to indicate whether the userplane data belong to the control plane or data plane
-* \return TRUE on success, FALSE otherwise
+* \return TRUE on success, false otherwise
 * \note None
 * @ingroup _pdcp
 */
@@ -316,20 +311,18 @@ void rrc_pdcp_config_req (
 * \param[in]  defaultDRB        Default DRB ID
 * \return     A status about the processing, OK or error code.
 */
-boolean_t rrc_pdcp_config_asn1_req (
-  const protocol_ctxt_t *const  ctxt_pP,
-  LTE_SRB_ToAddModList_t  *const srb2add_list,
-  LTE_DRB_ToAddModList_t  *const drb2add_list,
-  LTE_DRB_ToReleaseList_t *const drb2release_list,
-  const uint8_t                   security_modeP,
-  uint8_t                  *const kRRCenc,
-  uint8_t                  *const kRRCint,
-  uint8_t                  *const kUPenc,
-  LTE_PMCH_InfoList_r9_t  *pmch_InfoList_r9,
-  rb_id_t                 *const defaultDRB
-);
-
-/*! \fn boolean_t pdcp_config_req_asn1 (const protocol_ctxt_t* const ctxt_pP, srb_flag_t srb_flagP, uint32_t  action, rb_id_t rb_id, uint8_t rb_sn, uint8_t rb_report, uint16_t header_compression_profile, uint8_t security_mode)
+bool rrc_pdcp_config_asn1_req(const protocol_ctxt_t *const  ctxt_pP,
+                              LTE_SRB_ToAddModList_t  *const srb2add_list,
+                              LTE_DRB_ToAddModList_t  *const drb2add_list,
+                              LTE_DRB_ToReleaseList_t *const drb2release_list,
+                              const uint8_t                   security_modeP,
+                              uint8_t                  *const kRRCenc,
+                              uint8_t                  *const kRRCint,
+                              uint8_t                  *const kUPenc,
+                              LTE_PMCH_InfoList_r9_t  *pmch_InfoList_r9,
+                              rb_id_t                 *const defaultDRB);
+
+/*! \fn bool pdcp_config_req_asn1 (const protocol_ctxt_t* const ctxt_pP, srb_flag_t srb_flagP, uint32_t  action, rb_id_t rb_id, uint8_t rb_sn, uint8_t rb_report, uint16_t header_compression_profile, uint8_t security_mode)
 * \brief  Function for RRC to configure a Radio Bearer.
 * \param[in]  ctxt_pP           Running context.
 * \param[in]  pdcp_pP            Pointer on PDCP structure.
@@ -349,22 +342,21 @@ boolean_t rrc_pdcp_config_asn1_req (
 * \param[in]  kUPenc             User-Plane encryption key
 * \return     A status about the processing, OK or error code.
 */
-boolean_t pdcp_config_req_asn1 (
-  const protocol_ctxt_t *const  ctxt_pP,
-  pdcp_t         *const pdcp_pP,
-  const srb_flag_t       srb_flagP,
-  const rlc_mode_t       rlc_mode,
-  const uint32_t         action,
-  const uint16_t         lc_id,
-  const uint16_t         mch_id,
-  const rb_id_t          rb_id,
-  const uint8_t          rb_sn,
-  const uint8_t          rb_report,
-  const uint16_t         header_compression_profile,
-  const uint8_t          security_mode,
-  uint8_t         *const kRRCenc,
-  uint8_t         *const kRRCint,
-  uint8_t         *const kUPenc);
+bool pdcp_config_req_asn1(const protocol_ctxt_t *const  ctxt_pP,
+                          pdcp_t         *const pdcp_pP,
+                          const srb_flag_t       srb_flagP,
+                          const rlc_mode_t       rlc_mode,
+                          const uint32_t         action,
+                          const uint16_t         lc_id,
+                          const uint16_t         mch_id,
+                          const rb_id_t          rb_id,
+                          const uint8_t          rb_sn,
+                          const uint8_t          rb_report,
+                          const uint16_t         header_compression_profile,
+                          const uint8_t          security_mode,
+                          uint8_t         *const kRRCenc,
+                          uint8_t         *const kRRCint,
+                          uint8_t         *const kUPenc);
 
 /*! \fn void pdcp_add_UE(const protocol_ctxt_t* const  ctxt_pP)
 * \brief  Function (for RRC) to add a new UE in PDCP module
@@ -373,13 +365,12 @@ boolean_t pdcp_config_req_asn1 (
 */
 void pdcp_add_UE(const protocol_ctxt_t *const  ctxt_pP);
 
-/*! \fn boolean_t pdcp_remove_UE(const protocol_ctxt_t* const  ctxt_pP)
+/*! \fn bool pdcp_remove_UE(const protocol_ctxt_t* const  ctxt_pP)
 * \brief  Function for RRC to remove UE from PDCP module hashtable
 * \param[in]  ctxt_pP           Running context.
 * \return     A status about the processing, OK or error code.
 */
-boolean_t pdcp_remove_UE(
-  const protocol_ctxt_t *const  ctxt_pP);
+bool pdcp_remove_UE(const protocol_ctxt_t *const  ctxt_pP);
 
 /*! \fn void rrc_pdcp_config_release( const protocol_ctxt_t* const, rb_id_t)
 * \brief This functions is unused
diff --git a/openair2/LAYER2/PDCP_v10.1.0/pdcp_primitives.c b/openair2/LAYER2/PDCP_v10.1.0/pdcp_primitives.c
index ef674132c45f38d9e38ed4c564559e4edee85237..77d3cf3857a3d32f2616ea8ae95709ac4e308f6d 100644
--- a/openair2/LAYER2/PDCP_v10.1.0/pdcp_primitives.c
+++ b/openair2/LAYER2/PDCP_v10.1.0/pdcp_primitives.c
@@ -32,7 +32,7 @@
 #include "pdcp.h"
 #include "pdcp_primitives.h"
 
-extern boolean_t util_mark_nth_bit_of_octet(uint8_t* octet, uint8_t index);
+extern bool util_mark_nth_bit_of_octet(uint8_t* octet, uint8_t index);
 
 /*
  * Parses data/control field out of buffer of User Plane PDCP Data PDU with
@@ -123,13 +123,13 @@ uint8_t pdcp_get_sequence_number_of_pdu_with_SRB_sn(unsigned char* pdu_buffer)
  * Fills the incoming buffer with the fields of the header for srb sn
  *
  * @param pdu_buffer PDCP PDU buffer
- * @return TRUE on success, FALSE otherwise
+ * @return true on success, false otherwise
  */
-boolean_t pdcp_serialize_control_plane_data_pdu_with_SRB_sn_buffer(unsigned char* pdu_buffer, \
-    pdcp_control_plane_data_pdu_header* pdu)
+bool pdcp_serialize_control_plane_data_pdu_with_SRB_sn_buffer(unsigned char* pdu_buffer,
+                                                              pdcp_control_plane_data_pdu_header* pdu)
 {
   if (pdu_buffer == NULL || pdu == NULL) {
-    return FALSE;
+    return false;
   }
 
   /*
@@ -138,20 +138,20 @@ boolean_t pdcp_serialize_control_plane_data_pdu_with_SRB_sn_buffer(unsigned char
   uint8_t sequence_number = pdu->sn;
   pdu_buffer[0] = sequence_number & 0x1F; // 5bit sn
 
-  return TRUE;
+  return true;
 }
 
 /*
  * Fills the incoming buffer with the fields of the header for long sn
  *
  * @param pdu_buffer PDCP PDU buffer
- * @return TRUE on success, FALSE otherwise
+ * @return true on success, false otherwise
  */
-boolean_t pdcp_serialize_user_plane_data_pdu_with_long_sn_buffer(unsigned char* pdu_buffer, \
-    pdcp_user_plane_data_pdu_header_with_long_sn* pdu)
+bool pdcp_serialize_user_plane_data_pdu_with_long_sn_buffer(unsigned char* pdu_buffer,
+                                                            pdcp_user_plane_data_pdu_header_with_long_sn* pdu)
 {
   if (pdu_buffer == NULL || pdu == NULL) {
-    return FALSE;
+    return false;
   }
 
   /*
@@ -170,7 +170,7 @@ boolean_t pdcp_serialize_user_plane_data_pdu_with_long_sn_buffer(unsigned char*
     pdu_buffer[0] |= 0x80; // set the first bit as 1
   }
 
-  return TRUE;
+  return true;
 }
 
 /*
@@ -178,13 +178,14 @@ boolean_t pdcp_serialize_user_plane_data_pdu_with_long_sn_buffer(unsigned char*
  *
  * @param pdu_buffer The buffer that PDU will be serialized into
  * @param pdu A status report header
- * @return TRUE on success, FALSE otherwise
+ * @return true on success, false otherwise
  */
-boolean_t pdcp_serialize_control_pdu_for_pdcp_status_report(unsigned char* pdu_buffer, \
-    uint8_t bitmap[512], pdcp_control_pdu_for_pdcp_status_report* pdu)
+bool pdcp_serialize_control_pdu_for_pdcp_status_report(unsigned char* pdu_buffer,
+                                                       uint8_t bitmap[512],
+                                                       pdcp_control_pdu_for_pdcp_status_report* pdu)
 {
   if (pdu_buffer == NULL || pdu == NULL) {
-    return FALSE;
+    return false;
   }
 
   /*
@@ -205,6 +206,6 @@ boolean_t pdcp_serialize_control_pdu_for_pdcp_status_report(unsigned char* pdu_b
    */
   memcpy(pdu_buffer + 2, bitmap, 512);
 
-  return TRUE;
+  return true;
 }
 
diff --git a/openair2/LAYER2/PDCP_v10.1.0/pdcp_primitives.h b/openair2/LAYER2/PDCP_v10.1.0/pdcp_primitives.h
index 8b5ebe7287c52ddbb15409edceec218569127b0d..423f69afc9cdfb47041c5b19852244fd75391a18 100644
--- a/openair2/LAYER2/PDCP_v10.1.0/pdcp_primitives.h
+++ b/openair2/LAYER2/PDCP_v10.1.0/pdcp_primitives.h
@@ -142,18 +142,18 @@ uint8_t pdcp_get_sequence_number_of_pdu_with_SRB_sn(unsigned char* pdu_buffer);
  * Fills the incoming buffer with the fields of the header for SRB1
  *
  * @param pdu_buffer PDCP PDU buffer
- * @return TRUE on success, FALSE otherwise
+ * @return true on success, false otherwise
  */
-boolean_t pdcp_serialize_control_plane_data_pdu_with_SRB_sn_buffer(unsigned char* pdu_buffer, \
-    pdcp_control_plane_data_pdu_header* pdu);
+bool pdcp_serialize_control_plane_data_pdu_with_SRB_sn_buffer(unsigned char* pdu_buffer,
+                                                              pdcp_control_plane_data_pdu_header* pdu);
 /*
  * Fills the incoming buffer with the fields of the header for long SN (RLC UM and AM)
  *
  * @param pdu_buffer PDCP PDU buffer
- * @return TRUE on success, FALSE otherwise
+ * @return true on success, false otherwise
  */
-boolean_t pdcp_serialize_user_plane_data_pdu_with_long_sn_buffer(unsigned char* pdu_buffer, \
-    pdcp_user_plane_data_pdu_header_with_long_sn* pdu);
+bool pdcp_serialize_user_plane_data_pdu_with_long_sn_buffer(unsigned char* pdu_buffer,
+                                                            pdcp_user_plane_data_pdu_header_with_long_sn* pdu);
 
 /*
  * Fills the incoming status report header with given value of bitmap
@@ -162,10 +162,11 @@ boolean_t pdcp_serialize_user_plane_data_pdu_with_long_sn_buffer(unsigned char*
  * @param FMS First Missing PDCP SN
  * @param bitmap Received/Missing sequence number bitmap
  * @param pdu A status report header
- * @return TRUE on success, FALSE otherwise
+ * @return true on success, false otherwise
  */
-boolean_t pdcp_serialize_control_pdu_for_pdcp_status_report(unsigned char* pdu_buffer, \
-    uint8_t bitmap[512], pdcp_control_pdu_for_pdcp_status_report* pdu);
+bool pdcp_serialize_control_pdu_for_pdcp_status_report(unsigned char* pdu_buffer,
+                                                       uint8_t bitmap[512],
+                                                       pdcp_control_pdu_for_pdcp_status_report* pdu);
 
 int pdcp_netlink_dequeue_element(const protocol_ctxt_t* const  ctxt_pP,
                                  struct pdcp_netlink_element_s **data_ppP);
diff --git a/openair2/LAYER2/PDCP_v10.1.0/pdcp_sequence_manager.c b/openair2/LAYER2/PDCP_v10.1.0/pdcp_sequence_manager.c
index cdc583ef217873df5f794f6f9359136d1c2a1a33..31beb3a9e0663dff64ba6f2c3b0750b3b93217bf 100644
--- a/openair2/LAYER2/PDCP_v10.1.0/pdcp_sequence_manager.c
+++ b/openair2/LAYER2/PDCP_v10.1.0/pdcp_sequence_manager.c
@@ -33,12 +33,12 @@
 /*
  * Initializes sequence numbering state
  * @param pdcp_entity The PDCP entity to be initialized
- * @return boolean_t TRUE on success, FALSE otherwise
+ * @return bool true on success, false otherwise
  */
-boolean_t pdcp_init_seq_numbers(pdcp_t* pdcp_entity)
+bool pdcp_init_seq_numbers(pdcp_t* pdcp_entity)
 {
   if (pdcp_entity == NULL) {
-    return FALSE;
+    return false;
   }
 
   /* Sequence number state variables */
@@ -55,34 +55,34 @@ boolean_t pdcp_init_seq_numbers(pdcp_t* pdcp_entity)
   // Shall UE and eNB behave differently on initialization? (see 7.1.e)
   pdcp_entity->last_submitted_pdcp_rx_sn = 4095;
 
-  return TRUE;
+  return true;
 }
 
-boolean_t pdcp_is_seq_num_size_valid(pdcp_t* pdcp_entity)
+bool pdcp_is_seq_num_size_valid(pdcp_t* pdcp_entity)
 {
   if (pdcp_entity == NULL) {
-    return FALSE;
+    return false;
   }
 
   // Check if the size of SN is valid (see 3GPP TS 36.323 v10.1.0 item 6.3.2)
   if (pdcp_entity->seq_num_size != 5 && pdcp_entity->seq_num_size != 7 && pdcp_entity->seq_num_size != 12) {
     LOG_W(PDCP, "Incoming SN size is invalid! (Expected: {5 | 7 | 12}, Received: %d\n", pdcp_entity->seq_num_size);
-    return FALSE;
+    return false;
   }
 
-  return TRUE;
+  return true;
 }
 
 /**
  * Check if SN number is in the range according to SN size
  */
-boolean_t pdcp_is_seq_num_valid(uint16_t seq_num, uint8_t seq_num_size)
+bool pdcp_is_seq_num_valid(uint16_t seq_num, uint8_t seq_num_size)
 {
   if (seq_num >= 0 && seq_num <= pdcp_calculate_max_seq_num_for_given_size(seq_num_size)) {
-    return TRUE;
+    return true;
   }
 
-  return FALSE;
+  return false;
 }
 
 uint16_t pdcp_calculate_max_seq_num_for_given_size(uint8_t seq_num_size)
@@ -96,7 +96,7 @@ uint16_t pdcp_calculate_max_seq_num_for_given_size(uint8_t seq_num_size)
 
 uint16_t pdcp_get_next_tx_seq_number(pdcp_t* pdcp_entity)
 {
-  if (pdcp_is_seq_num_size_valid(pdcp_entity) == FALSE) {
+  if (pdcp_is_seq_num_size_valid(pdcp_entity) == false) {
     return -1;
   }
 
@@ -118,10 +118,10 @@ uint16_t pdcp_get_next_tx_seq_number(pdcp_t* pdcp_entity)
   return pdcp_seq_num;
 }
 
-boolean_t pdcp_advance_rx_window(pdcp_t* pdcp_entity)
+bool pdcp_advance_rx_window(pdcp_t* pdcp_entity)
 {
-  if (pdcp_is_seq_num_size_valid(pdcp_entity) == FALSE) {
-    return FALSE;
+  if (pdcp_is_seq_num_size_valid(pdcp_entity) == false) {
+    return false;
   }
 
   /*
@@ -137,10 +137,10 @@ boolean_t pdcp_advance_rx_window(pdcp_t* pdcp_entity)
     pdcp_entity->next_pdcp_rx_sn++;
   }
 
-  return TRUE;
+  return true;
 }
 
-boolean_t pdcp_mark_current_pdu_as_received(uint16_t seq_num, pdcp_t* pdcp_entity)
+bool pdcp_mark_current_pdu_as_received(uint16_t seq_num, pdcp_t* pdcp_entity)
 {
   /*
    * Incoming sequence number and PDCP entity were already
@@ -158,5 +158,5 @@ boolean_t pdcp_mark_current_pdu_as_received(uint16_t seq_num, pdcp_t* pdcp_entit
   LOG_D(PDCP, "Marking %d. bit of %d. octet of status bitmap\n", (seq_num % 8) + 1, octet_index);
   util_mark_nth_bit_of_octet(&pdcp_entity->missing_pdu_bitmap[octet_index], seq_num % 8);
   util_print_binary_representation((uint8_t*)"Current state of relevant octet: ", pdcp_entity->missing_pdu_bitmap[octet_index]);
-  return TRUE;
+  return true;
 }
diff --git a/openair2/LAYER2/PDCP_v10.1.0/pdcp_sequence_manager.h b/openair2/LAYER2/PDCP_v10.1.0/pdcp_sequence_manager.h
index 172c9810e69c29ad81f911f6b61a72759cf9812e..bff98d1b00ed84b1356e69ad4e1cd55abb50acaf 100644
--- a/openair2/LAYER2/PDCP_v10.1.0/pdcp_sequence_manager.h
+++ b/openair2/LAYER2/PDCP_v10.1.0/pdcp_sequence_manager.h
@@ -35,17 +35,17 @@
  * @param pdcp_entity The PDCP entity to be initialized
  * @return none
  */
-boolean_t pdcp_init_seq_numbers(pdcp_t* pdcp_entity);
+bool pdcp_init_seq_numbers(pdcp_t* pdcp_entity);
 /**
  * Checks if incoming PDCP entitiy pointer and relevant sequence number size is valid
- * @return TRUE (0x01) if it is valid, FALSE (0x00) otherwise
+ * @return true (0x01) if it is valid, false (0x00) otherwise
  */
-boolean_t pdcp_is_seq_num_size_valid(pdcp_t* pdcp_entity);
+bool pdcp_is_seq_num_size_valid(pdcp_t* pdcp_entity);
 /**
  * Check if SN number is in the range according to SN size
- * @return TRUE if it is valid, FALSE otherwise
+ * @return true if it is valid, false otherwise
  */
-boolean_t pdcp_is_seq_num_valid(uint16_t seq_num, uint8_t seq_num_size);
+bool pdcp_is_seq_num_valid(uint16_t seq_num, uint8_t seq_num_size);
 /**
  * Returns the maximum allowed sequence number value for given size of SN field
  * @return Max sequence number value
@@ -58,11 +58,11 @@ uint16_t pdcp_get_next_tx_seq_number(pdcp_t* pdcp_entity);
 /**
  * Advances the RX window state of given PDCP entity upon successfull receipt of a SDU
  */
-boolean_t pdcp_advance_rx_window(pdcp_t* pdcp_entity);
+bool pdcp_advance_rx_window(pdcp_t* pdcp_entity);
 /**
 * Updates missing PDU bitmap with incoming sequence number
-* @return TRUE if successful, FALSE otherwise
+* @return true if successful, false otherwise
 */
-boolean_t pdcp_mark_current_pdu_as_received(uint16_t seq_num, pdcp_t* pdcp_entity);
+bool pdcp_mark_current_pdu_as_received(uint16_t seq_num, pdcp_t* pdcp_entity);
 
 #endif
diff --git a/openair2/LAYER2/PDCP_v10.1.0/pdcp_util.c b/openair2/LAYER2/PDCP_v10.1.0/pdcp_util.c
index cf8218829fe605a51f47365c513a8832011fa635..79f6d688203620ee25802dd8e4471f6aaea85472 100644
--- a/openair2/LAYER2/PDCP_v10.1.0/pdcp_util.c
+++ b/openair2/LAYER2/PDCP_v10.1.0/pdcp_util.c
@@ -130,9 +130,9 @@ void util_print_binary_representation(unsigned char* message, uint8_t octet)
  *
  * @param octet 8-bit data
  * @param index Index of bit to be set
- * @return TRUE on success, FALSE otherwise
+ * @return true on success, false otherwise
  */
-boolean_t util_mark_nth_bit_of_octet(uint8_t* octet, uint8_t index)
+bool util_mark_nth_bit_of_octet(uint8_t* octet, uint8_t index)
 {
   uint8_t mask = 0x80;
 
@@ -148,6 +148,6 @@ boolean_t util_mark_nth_bit_of_octet(uint8_t* octet, uint8_t index)
    */
   *octet |= mask;
 
-  return TRUE;
+  return true;
 }
 
diff --git a/openair2/LAYER2/PDCP_v10.1.0/pdcp_util.h b/openair2/LAYER2/PDCP_v10.1.0/pdcp_util.h
index 49846c7a9fbd75bfbefb64f1d32af56cb958e262..89b8ff672f7824867fae61dcfdc8cf24ca1d81a6 100644
--- a/openair2/LAYER2/PDCP_v10.1.0/pdcp_util.h
+++ b/openair2/LAYER2/PDCP_v10.1.0/pdcp_util.h
@@ -66,8 +66,8 @@ void util_print_binary_representation(unsigned char* message, uint8_t octet);
  *
  * @param octet Octet
  * @param index Index
- * @return TRUE on success, FALSE otherwise
+ * @return true on success, false otherwise
  */
-boolean_t util_mark_nth_bit_of_octet(uint8_t* octet, uint8_t index);
+bool util_mark_nth_bit_of_octet(uint8_t* octet, uint8_t index);
 
 #endif // PDCP_UTIL_H
diff --git a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am.c b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am.c
index 4eb0907046aef6ef7301878a26b24df22ec2a83a..ddc7bf85e851f14fac0bdcac0c8279d0c391870d 100644
--- a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am.c
+++ b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am.c
@@ -52,7 +52,7 @@ rlc_am_get_status_pdu_buffer_occupancy(
   rlc_sn_t sn_cursor = rlc_pP->vr_r;
   rlc_sn_t sn_prev = rlc_pP->vr_r;
   rlc_sn_t sn_end = rlc_pP->vr_ms;
-  boolean_t segment_loop_end    = false;
+  bool segment_loop_end    = false;
 
   if (sn_prev != sn_end) {
     while ((RLC_AM_DIFF_SN(sn_prev,rlc_pP->vr_r) < RLC_AM_DIFF_SN(sn_end,rlc_pP->vr_r)) && (cursor_p != NULL)) {
diff --git a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_entity.h b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_entity.h
index 1b6d8375655d00a98b5851daf8e40cc4c207535f..95c47943a49abcfc0501aa0e306178e4cbd1538c 100644
--- a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_entity.h
+++ b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_entity.h
@@ -54,7 +54,7 @@ typedef struct rlc_am_entity_s {
 
   rb_id_t           rb_id;                              /*!< \brief Radio bearer identifier, for statistics and trace purpose. */
   logical_chan_id_t channel_id;                         /*!< \brief Transport channel identifier. */
-  boolean_t         is_data_plane;                      /*!< \brief To know if the RLC belongs to a data radio bearer or a signalling radio bearer, for statistics and trace purpose. */
+  bool              is_data_plane;                      /*!< \brief To know if the RLC belongs to a data radio bearer or a signalling radio bearer, for statistics and trace purpose. */
 
   rlc_buffer_occupancy_t sdu_buffer_occupancy;               /*!< \brief Number of bytes of unsegmented SDUs. */
   rlc_buffer_occupancy_t status_buffer_occupancy;            /*!< \brief Number of bytes of control PDUs waiting for transmission. */
@@ -76,7 +76,7 @@ typedef struct rlc_am_entity_s {
   rlc_am_tx_data_pdu_management_t *tx_data_pdu_buffer;       /*!< \brief Transmission PDU data buffer. Used also for retransmissions */
   signed int      retrans_num_pdus;                          /*!< \brief Number of PDUs in the retransmission buffer. */
   signed int      retrans_num_bytes_to_retransmit;           /*!< \brief Number of bytes in the retransmission buffer to be retransmitted. Only payload is taken into account */
-  boolean_t       force_poll;                                /*!< \brief force poll due to t_poll_retransmit time-out. */
+  bool            force_poll;                                /*!< \brief force poll due to t_poll_retransmit time-out. */
 
   //---------------------------------------------------------------------
   // RX BUFFERS
@@ -186,8 +186,8 @@ typedef struct rlc_am_entity_s {
   // note occupancy of other buffers is deducted from nb elements in lists
   rlc_buffer_occupancy_t  buffer_occupancy_retransmission_buffer;   /*!< \brief Number of PDUs. */
 
-  boolean_t               initialized;                               /*!< \brief Boolean for rlc_am_entity_t struct initialization. */
-  boolean_t               configured;                               /*!< \brief Boolean for rlc_am_entity_t struct  configuration. */
+  bool                    initialized;                               /*!< \brief Boolean for rlc_am_entity_t struct initialization. */
+  bool                    configured;                               /*!< \brief Boolean for rlc_am_entity_t struct  configuration. */
 } rlc_am_entity_t;
 /** @} */
 #    endif
diff --git a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_init.c b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_init.c
index cb09f24855aa789cffdea78b3d4851a08e54f901..8ff29fa44bfe944e1c859ec79e04a0fb5bcec5e5 100644
--- a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_init.c
+++ b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_init.c
@@ -32,7 +32,7 @@ rlc_am_init(
   const protocol_ctxt_t* const  ctxt_pP,
   rlc_am_entity_t *const        rlc_pP)
 {
-  if (rlc_pP->initialized == TRUE) {
+  if (rlc_pP->initialized == true) {
     LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[AM INIT] INITIALIZATION ALREADY DONE, DOING NOTHING\n",
           PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP));
   } else {
@@ -79,7 +79,7 @@ rlc_am_init(
 
     rlc_pP->last_absolute_subframe_status_indication = 0xFFFFFFFF; // any value > 1
 
-    rlc_pP->initialized                  = TRUE;
+    rlc_pP->initialized                  = true;
   }
 }
 //-----------------------------------------------------------------------------
@@ -134,7 +134,7 @@ rlc_am_reestablish(
 
   rlc_pP->last_absolute_subframe_status_indication = 0xFFFFFFFF; // any value > 1
 
-  rlc_pP->initialized                  = TRUE;
+  rlc_pP->initialized                  = true;
 
 }
 
@@ -197,7 +197,7 @@ rlc_am_configure(
   const uint32_t                t_reorderingP,
   const uint32_t                t_status_prohibitP)
 {
-  if (rlc_pP->configured == TRUE) {
+  if (rlc_pP->configured == true) {
     LOG_I(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[RECONFIGURE] max_retx_threshold %d poll_pdu %d poll_byte %d t_poll_retransmit %d t_reordering %d t_status_prohibit %d\n",
           PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
           max_retx_thresholdP,
@@ -235,7 +235,7 @@ rlc_am_configure(
     rlc_am_init_timer_reordering     (ctxt_pP, rlc_pP, t_reorderingP);
     rlc_am_init_timer_status_prohibit(ctxt_pP, rlc_pP, t_status_prohibitP);
 
-    rlc_pP->configured = TRUE;
+    rlc_pP->configured = true;
   }
 
 }
diff --git a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_reassembly.c b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_reassembly.c
index 0957c20bdfc2ba6ae64811edbfcf11fdd3369285..a5f0b4f9ef096ecd1b1a8e78da076dc3141d23d3 100644
--- a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_reassembly.c
+++ b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_reassembly.c
@@ -183,12 +183,10 @@ rlc_am_send_sdu (
   }
 }
 //-----------------------------------------------------------------------------
-void
-rlc_am_reassemble_pdu(
-  const protocol_ctxt_t *const ctxt_pP,
-  rlc_am_entity_t *const      rlc_pP,
-  mem_block_t *const          tb_pP,
-  boolean_t free_rlc_pdu) {
+void rlc_am_reassemble_pdu(const protocol_ctxt_t *const ctxt_pP,
+                           rlc_am_entity_t *const      rlc_pP,
+                           mem_block_t *const          tb_pP,
+                           bool free_rlc_pdu) {
   int i,j;
   rlc_am_pdu_info_t *pdu_info        = &((rlc_am_rx_pdu_management_t *)(tb_pP->data))->pdu_info;
   LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[REASSEMBLY PDU] TRY REASSEMBLY PDU SN=%03d\n",
diff --git a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_reassembly.h b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_reassembly.h
index bf9bd58fb52887b4b2f1cfdd08b2c1fe44bce3a3..839e7d9304fbce3cb2371017018b19f9921e97c7 100644
--- a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_reassembly.h
+++ b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_reassembly.h
@@ -57,14 +57,14 @@ void rlc_am_reassembly   (const protocol_ctxt_t* const ctxtP, rlc_am_entity_t *
 */
 void rlc_am_send_sdu     (const protocol_ctxt_t* const ctxtP, rlc_am_entity_t * const rlc_pP);
 
-/*! \fn void rlc_am_reassemble_pdu(const protocol_ctxt_t* const ctxtP, rlc_am_entity_t * const rlc_pP, const  mem_block_t* const tb_pP,boolean_t free_rlc_pdu)
+/*! \fn void rlc_am_reassemble_pdu(const protocol_ctxt_t* const ctxtP, rlc_am_entity_t * const rlc_pP, const  mem_block_t* const tb_pP, bool free_rlc_pdu)
 * \brief    Reassembly a RLC AM PDU, depending of the content of this PDU, data will be reassemblied to the current output SDU, the current will be sent to higher layers or not, after or before the reassembly, or no send of SDU will be triggered, depending on FI field in PDU header.
 * \param[in]  ctxtP                       Running context.
 * \param[in]  rlc_pP                      RLC AM protocol instance pointer.
 * \param[in]  tb_pP                       RLC AM PDU embedded in a mem_block_t.
 * \param[in]  free_rlc_pdu                Flag for freeing RLC AM PDU after reassembly.
 */
-void rlc_am_reassemble_pdu(const protocol_ctxt_t* const ctxtP, rlc_am_entity_t * const rlc_pP, mem_block_t* const tb_pP,boolean_t free_rlc_pdu);
+void rlc_am_reassemble_pdu(const protocol_ctxt_t* const ctxtP, rlc_am_entity_t * const rlc_pP, mem_block_t* const tb_pP, bool free_rlc_pdu);
 /** @} */
 #endif
 
diff --git a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_receiver.c b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_receiver.c
index 916d1513b0f1f1f0c65ddac2c9bc64a89eb81169..a749aa035e1e161e2cc76b998a126b225cec9289 100644
--- a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_receiver.c
+++ b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_receiver.c
@@ -328,7 +328,7 @@ rlc_am_receive_process_data_pdu (
   rlc_am_pdu_info_t*  pdu_info_p         = &((rlc_am_rx_pdu_management_t*)(tb_pP->data))->pdu_info;
   rlc_am_pdu_sn_10_t* rlc_am_pdu_sn_10_p = (rlc_am_pdu_sn_10_t*)first_byte_pP;
   rlc_am_rx_pdu_status_t pdu_status		= RLC_AM_DATA_PDU_STATUS_OK;
-  boolean_t		reassemble = false;
+  bool reassemble = false;
 
   if (rlc_am_get_data_pdu_infos(ctxt_pP,rlc_pP, rlc_am_pdu_sn_10_p, tb_size_in_bytesP, pdu_info_p) >= 0) {
 
diff --git a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_retransmit.c b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_retransmit.c
index 56b37e1e3953e1e4bcb6af5514ff111966b06b69..7129307739a376f470b6c12ce91422bf67fb8525 100644
--- a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_retransmit.c
+++ b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_retransmit.c
@@ -29,13 +29,12 @@
 #include "LAYER2/MAC/mac_extern.h"
 #include "common/utils/LOG/log.h"
 //-----------------------------------------------------------------------------
-boolean_t rlc_am_nack_pdu (
-  const protocol_ctxt_t* const  ctxt_pP,
-  rlc_am_entity_t *const rlc_pP,
-  const rlc_sn_t snP,
-  const rlc_sn_t prev_nack_snP,
-  sdu_size_t so_startP,
-  sdu_size_t so_endP)
+bool rlc_am_nack_pdu(const protocol_ctxt_t* const  ctxt_pP,
+                     rlc_am_entity_t *const rlc_pP,
+                     const rlc_sn_t snP,
+                     const rlc_sn_t prev_nack_snP,
+                     sdu_size_t so_startP,
+                     sdu_size_t so_endP)
 {
   // 5.2.1 Retransmission
   // ...
@@ -54,8 +53,8 @@ boolean_t rlc_am_nack_pdu (
   rlc_am_tx_data_pdu_management_t *tx_data_pdu_buffer_p = &rlc_pP->tx_data_pdu_buffer[snP % RLC_AM_WINDOW_SIZE];
   //int          pdu_sdu_index;
   //int          sdu_index;
-  boolean_t status = TRUE;
-  boolean_t retx_count_increment = FALSE;
+  bool status = true;
+  bool retx_count_increment = false;
   sdu_size_t pdu_data_to_retx = 0;
 
   if (mb_p != NULL) {
@@ -63,7 +62,7 @@ boolean_t rlc_am_nack_pdu (
     if(so_startP > so_endP) {
       LOG_E(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[NACK-PDU] ERROR NACK MISSING PDU, so_startP %d, so_endP %d\n",
             PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),so_startP, so_endP);
-      status = FALSE;
+      status = false;
     }
     // Handle full PDU NACK first
     else if ((so_startP == 0) && (so_endP == 0x7FFF)) {
@@ -71,9 +70,7 @@ boolean_t rlc_am_nack_pdu (
     		pdu_data_to_retx = tx_data_pdu_buffer_p->payload_size;
             /* Increment VtReTxNext if this is the first NACK or if some segments have already been transmitted */
             if ((tx_data_pdu_buffer_p->flags.retransmit == 0) || (tx_data_pdu_buffer_p->nack_so_start))
-            {
-            	retx_count_increment = TRUE;
-            }
+              retx_count_increment = true;
 
             tx_data_pdu_buffer_p->nack_so_start = 0;
             tx_data_pdu_buffer_p->num_holes     = 0;
@@ -89,11 +86,11 @@ boolean_t rlc_am_nack_pdu (
     	      if(tx_data_pdu_buffer_p->nack_so_start >= tx_data_pdu_buffer_p->payload_size){
               LOG_E(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[NACK-PDU] ERROR NACK MISSING PDU, nack_so_start %d, payload_size %d\n",
                     PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),tx_data_pdu_buffer_p->nack_so_start, tx_data_pdu_buffer_p->payload_size);
-    	        status = FALSE;
+              status = false;
     	      }
     	}
     	else {
-    		status = FALSE;
+        status = false;
     	}
     }
     else if (tx_data_pdu_buffer_p->flags.max_retransmit == 0) {
@@ -107,9 +104,8 @@ boolean_t rlc_am_nack_pdu (
 	    	if (prev_nack_snP != snP) {
 	    		/* New NACK_SN with SO */
                 /* check whether a new segment is to be placed in Retransmission Buffer, then increment vrReTx */
-                if ((tx_data_pdu_buffer_p->flags.retransmit == 0) || (so_startP < tx_data_pdu_buffer_p->nack_so_start)) {
-                	retx_count_increment = TRUE;
-                }
+                if ((tx_data_pdu_buffer_p->flags.retransmit == 0) || (so_startP < tx_data_pdu_buffer_p->nack_so_start))
+                  retx_count_increment = true;
 
 	            tx_data_pdu_buffer_p->num_holes     = 1;
 	            tx_data_pdu_buffer_p->retx_hole_index = 0;
@@ -129,21 +125,18 @@ boolean_t rlc_am_nack_pdu (
 		            tx_data_pdu_buffer_p->nack_so_stop = so_endP;
 		            tx_data_pdu_buffer_p->num_holes ++;
 		            pdu_data_to_retx = so_endP - so_startP + 1;
+          } else {
+            status = false;
 	    		}
-	    		else {
-	    			status = FALSE;
-	    		}
-	    	}
-	    	else {
-	    		status = FALSE;
+        } else {
+          status = false;
 	    	}
 		}
 		else {
-			status = FALSE;
+      status = false;
 		}
-    }
-    else {
-    	status = FALSE;
+    } else {
+      status = false;
     }
 
     if (status) {
@@ -175,17 +168,16 @@ boolean_t rlc_am_nack_pdu (
     LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[NACK-PDU] ERROR NACK MISSING PDU SN %05d\n",
           PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
           snP);
-    status = FALSE;
+    status = false;
   }
 
   return status;
 }
 //-----------------------------------------------------------------------------
-void rlc_am_ack_pdu (
-  const protocol_ctxt_t* const  ctxt_pP,
-  rlc_am_entity_t *const rlc_pP,
-  const rlc_sn_t snP,
-  boolean_t free_pdu)
+void rlc_am_ack_pdu(const protocol_ctxt_t* const  ctxt_pP,
+                    rlc_am_entity_t *const rlc_pP,
+                    const rlc_sn_t snP,
+                    bool free_pdu)
 {
   mem_block_t* mb_p         = rlc_pP->tx_data_pdu_buffer[snP % RLC_AM_WINDOW_SIZE].mem_block;
   rlc_am_tx_data_pdu_management_t *tx_data_pdu_buffer = &rlc_pP->tx_data_pdu_buffer[snP % RLC_AM_WINDOW_SIZE];
@@ -283,7 +275,7 @@ mem_block_t* rlc_am_retransmit_get_am_segment(
 	sdu_size_t     retx_so_start,retx_so_stop; //starting and ending SO for retransmission in this PDU
 	rlc_sn_t sn = pdu_mngt->sn;
 	uint16_t	header_so_part;
-	boolean_t fi_start, fi_end;
+	bool fi_start, fi_end;
 	uint8_t sdu_index = 0;
 	uint8_t sdu_segment_index = 0;
 	uint8_t num_LIs_pdu_segment = pdu_mngt->nb_sdus - 1;
@@ -377,11 +369,11 @@ mem_block_t* rlc_am_retransmit_get_am_segment(
 		/* Set FI part to false if SO Start and SO End are different from PDU boundaries */
 		if (retx_so_start)
 		{
-			fi_start = FALSE;
+			fi_start = false;
 		}
 		if (retx_so_stop < pdu_mngt->payload_size - 1)
 		{
-			fi_end = FALSE;
+			fi_end = false;
 		}
 
 		/* Header content is filled at the end */
@@ -423,7 +415,7 @@ mem_block_t* rlc_am_retransmit_get_am_segment(
 			else
 			{
 				/* if retx_so_start is still not included then set data_size with full original PDU data size */
-				/* Set fi_start to FALSE in this case */
+				/* Set fi_start to false in this case */
 				data_size = pdu_mngt->payload_size;
 			}
 			sdu_index ++;
@@ -432,7 +424,7 @@ mem_block_t* rlc_am_retransmit_get_am_segment(
 		if (retx_so_start == data_size)
 		{
 			/* Set FI Start if retx_so_start = cumulated data size */
-			fi_start = TRUE;
+			fi_start = true;
 			/* there must be at least one SDU more */
 //Assertion(eNB)_PRAN_DesignDocument_annex No.778
             if(sdu_index >= pdu_mngt->nb_sdus)
@@ -464,8 +456,8 @@ mem_block_t* rlc_am_retransmit_get_am_segment(
 		}
 		else if (retx_so_start != 0)
 		{
-			/* in all other cases set fi_start to FALSE if it SO Start is not 0 */
-			fi_start = FALSE;
+			/* in all other cases set fi_start to false if it SO Start is not 0 */
+			fi_start = false;
 		}
 
 		/* Set first SDU portion of the segment */
@@ -582,10 +574,10 @@ mem_block_t* rlc_am_retransmit_get_am_segment(
 				"RLC AM Tx PDU Segment Data Error: retx_so_stop=%d OriginalPDUDataLength=%d SOStart=%d SegmentLength=%d numLISegment=%d numLIPDU=%d sn=%d LcId=%d !\n",
 				retx_so_stop,pdu_mngt->payload_size,retx_so_start,*payload_sizeP,num_LIs_pdu_segment,pdu_mngt->nb_sdus - 1,sn,rlc_pP->channel_id);
 */
-		/* init FI End to FALSE if retx_so_stop is not end of PDU */
+		/* init FI End to false if retx_so_stop is not end of PDU */
 		if (retx_so_stop != pdu_mngt->payload_size - 1)
 		{
-			fi_end = FALSE;
+			fi_end = false;
 		}
 
 		/* Check consistency between sdus_segment_size and payload_sizeP */
@@ -596,7 +588,7 @@ mem_block_t* rlc_am_retransmit_get_am_segment(
 			data_size += sdus_segment_size[i];
 			if ((retx_so_stop == data_size - 1) && (i < num_LIs_pdu_segment))
 			{
-				fi_end = TRUE;
+				fi_end = true;
 			}
 		}
 //Assertion(eNB)_PRAN_DesignDocument_annex No.782
@@ -665,7 +657,7 @@ mem_block_t* rlc_am_retransmit_get_am_segment(
 			pdu_mngt->nack_so_start = pdu_mngt->hole_so_start[pdu_mngt->retx_hole_index];
 		}
 
-		/* Content is supposed to be init with 0 so with FIStart=FIEnd=TRUE */
+		/* Content is supposed to be init with 0 so with FIStart=FIEnd=true */
 		RLC_AM_PDU_SET_D_C(*pdu_segment_header_p);
 		RLC_AM_PDU_SET_RF(*pdu_segment_header_p);
 		/* Change FI */
diff --git a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_retransmit.h b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_retransmit.h
index fc5268931420556c41a4f0ca2af8d25d38f29bad..c34d06337da71763d9d27bf3a1bb46c8cbe8c4cc 100644
--- a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_retransmit.h
+++ b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_retransmit.h
@@ -35,7 +35,7 @@
 #    ifndef __RLC_AM_RETRANSMIT_H__
 #        define __RLC_AM_RETRANSMIT_H__
 //-----------------------------------------------------------------------------
-/*! \fn boolean_t  rlc_am_nack_pdu (const protocol_ctxt_t* const  ctxt_pP, rlc_am_entity_t *rlcP, int16_t snP, int16_t prev_nack_snP,sdu_size_t so_startP, sdu_size_t so_endP)
+/*! \fn bool  rlc_am_nack_pdu (const protocol_ctxt_t* const  ctxt_pP, rlc_am_entity_t *rlcP, int16_t snP, int16_t prev_nack_snP,sdu_size_t so_startP, sdu_size_t so_endP)
 * \brief      The RLC AM PDU which have the sequence number snP is marked NACKed with segment offset fields.
 * \param[in]  ctxtP        Running context.
 * \param[in]  rlcP         RLC AM protocol instance pointer.
@@ -46,13 +46,12 @@
 * \return                  OK/KO
 * \note It may appear a new hole in the retransmission buffer depending on the segment offset informations. Depending on the state of the retransmission buffer, negative confirmation can be sent to higher layers about the drop by the RLC AM instance of a particular SDU.
 */
-boolean_t         rlc_am_nack_pdu (
-                              const protocol_ctxt_t* const  ctxt_pP,
-                              rlc_am_entity_t *const rlcP,
-                              const rlc_sn_t snP,
-							  const rlc_sn_t prev_nack_snP,
-                              sdu_size_t so_startP,
-                              sdu_size_t so_endP);
+bool rlc_am_nack_pdu(const protocol_ctxt_t* const  ctxt_pP,
+                     rlc_am_entity_t *const rlcP,
+                     const rlc_sn_t snP,
+                     const rlc_sn_t prev_nack_snP,
+                     sdu_size_t so_startP,
+                     sdu_size_t so_endP);
 
 /*! \fn void rlc_am_ack_pdu (const protocol_ctxt_t* const  ctxt_pP,rlc_am_entity_t *rlcP, rlc_sn_t snP)
 * \brief      The RLC AM PDU which have the sequence number snP is marked ACKed.
@@ -62,11 +61,10 @@ boolean_t         rlc_am_nack_pdu (
 * \param[in]  free_pdu     Boolean indicating that the PDU can be freed because smaller than new vtA.
 * \note                    Depending on the state of the retransmission buffer, positive confirmation can be sent to higher layers about the receiving by the peer RLC AM instance of a particular SDU.
 */
-void         rlc_am_ack_pdu (
-                              const protocol_ctxt_t* const  ctxt_pP,
-                              rlc_am_entity_t *const rlcP,
-                              const rlc_sn_t snP,
-							  boolean_t free_pdu);
+void rlc_am_ack_pdu(const protocol_ctxt_t* const  ctxt_pP,
+                    rlc_am_entity_t *const rlcP,
+                    const rlc_sn_t snP,
+							      bool free_pdu);
 
 /*! \fn mem_block_t* rlc_am_retransmit_get_copy (const protocol_ctxt_t* const  ctxt_pP, rlc_am_entity_t *rlcP, rlc_sn_t snP)
 * \brief      The RLC AM PDU which have the sequence number snP is marked ACKed.
diff --git a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_rx_list.c b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_rx_list.c
index 4a065539013f323cb16a146cf2dd07b975ff7a6d..bd578abab2a817d0f97e34eb575d5930ea362cff 100644
--- a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_rx_list.c
+++ b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_rx_list.c
@@ -31,14 +31,13 @@
 #include "common/utils/LOG/log.h"
 
 
-boolean_t rlc_am_rx_check_vr_reassemble(
-		  const protocol_ctxt_t* const ctxt_pP,
-		  const rlc_am_entity_t* const rlc_pP)
+bool rlc_am_rx_check_vr_reassemble(const protocol_ctxt_t* const ctxt_pP,
+                                   const rlc_am_entity_t* const rlc_pP)
 {
 	mem_block_t*       cursor_p                    = rlc_pP->receiver_buffer.head;
 	rlc_am_rx_pdu_management_t * pdu_cursor_mgnt_p = NULL;
 	sdu_size_t          next_waited_so = 0;
-	boolean_t reassemble = FALSE;
+	bool reassemble = false;
 
 	if (cursor_p != NULL) {
 
@@ -48,7 +47,7 @@ boolean_t rlc_am_rx_check_vr_reassemble(
 		if (sn_ref != rlc_pP->vr_r) {
 			/* Case vrR has advanced from head : most likely case */
 
-			reassemble = TRUE;
+			reassemble = true;
 			/* Handle first SN if it is made of PDU segments : set them all to be reassembled */
 			if (pdu_info_p->rf) {
 				pdu_cursor_mgnt_p = (rlc_am_rx_pdu_management_t *) (cursor_p->data);
@@ -58,7 +57,7 @@ boolean_t rlc_am_rx_check_vr_reassemble(
                 {
                    LOG_E(RLC, "AM Rx Check Reassembly head SN=%d with PDU segments != vrR=%d should be fully received LCID=%d\n",
                          sn_ref,rlc_pP->vr_r,rlc_pP->channel_id);
-                   return FALSE;
+                   return false;
                 }
 /*
 				AssertFatal(pdu_cursor_mgnt_p->all_segments_received > 0,"AM Rx Check Reassembly head SN=%d with PDU segments != vrR=%d should be fully received LCID=%d\n",
@@ -94,7 +93,7 @@ boolean_t rlc_am_rx_check_vr_reassemble(
               {
                  LOG_E(RLC, "AM Rx Check Reassembly vr=%d should be partly received SNHead=%d LCID=%d\n",
                        rlc_pP->vr_r,sn_ref,rlc_pP->channel_id);
-                 return FALSE;
+                 return false;
               }
 /*
 				AssertFatal(pdu_cursor_mgnt_p->all_segments_received == 0,"AM Rx Check Reassembly vr=%d should be partly received SNHead=%d LCID=%d\n",
@@ -123,7 +122,7 @@ boolean_t rlc_am_rx_check_vr_reassemble(
             {
                LOG_E(RLC, "AM Rx Check Reassembly SNHead=vr=%d should be partly received LCID=%d\n",
                      rlc_pP->vr_r,rlc_pP->channel_id);
-               return FALSE;
+               return false;
             }
 /*
 			AssertFatal(pdu_cursor_mgnt_p->all_segments_received == 0,"AM Rx Check Reassembly SNHead=vr=%d should be partly received LCID=%d\n",
@@ -132,7 +131,7 @@ boolean_t rlc_am_rx_check_vr_reassemble(
 			while ((cursor_p != NULL) && (pdu_info_p->sn == rlc_pP->vr_r) && (pdu_info_p->so == next_waited_so)) {
 				if (pdu_cursor_mgnt_p->segment_reassembled == RLC_AM_RX_PDU_SEGMENT_REASSEMBLE_NO) {
 					pdu_cursor_mgnt_p->segment_reassembled = RLC_AM_RX_PDU_SEGMENT_REASSEMBLE_PENDING;
-					reassemble = TRUE;
+					reassemble = true;
 				}
 				next_waited_so += pdu_info_p->payload_size;
 				cursor_p = cursor_p->next;
@@ -157,7 +156,7 @@ mem_block_t * create_new_segment_from_pdu(
 	int16_t  new_li_list[RLC_AM_MAX_SDU_IN_PDU];
 	int16_t header_size = 0;
 	uint8_t	num_li = 0;
-	boolean_t fi_start, fi_end, lsf;
+	bool fi_start, fi_end, lsf;
 
 	/* Init some PDU Segment header fixed parameters */
 	fi_start = !((pdu_rx_info_p->fi & 0x2) >> 1);
@@ -170,11 +169,11 @@ mem_block_t * create_new_segment_from_pdu(
 		header_size = RLC_AM_PDU_SEGMENT_HEADER_MIN_SIZE;
 
 		if (so_offset) {
-			fi_start = FALSE;
+			fi_start = false;
 		}
 		if (so_offset + data_length_to_copy != pdu_rx_info_p->payload_size) {
-			fi_end = FALSE;
-			lsf = FALSE;
+			fi_end = false;
+			lsf = false;
 		}
 	} // end no LI in original segment
 	else {
@@ -185,7 +184,7 @@ mem_block_t * create_new_segment_from_pdu(
 
 		/* set LSF to false if we know that end of the original segment will not be copied */
 		if (so_offset + data_length_to_copy != pdu_rx_info_p->payload_size) {
-			lsf = FALSE;
+			lsf = false;
 		}
 
 		/* catch the first LI containing so_offset */
@@ -223,7 +222,7 @@ mem_block_t * create_new_segment_from_pdu(
 				num_li = j;
 				/* set FI End if remaining size = 0  */
 				if (remaining_size == 0) {
-					fi_end = TRUE;
+					fi_end = true;
 				}
 			}
 		}
@@ -263,7 +262,7 @@ mem_block_t * create_new_segment_from_pdu(
 		}
 
 		/* Fill Header part in the buffer */
-		/* Content is supposed to be init with 0 so with FIStart=FIEnd=TRUE */
+		/* Content is supposed to be init with 0 so with FIStart=FIEnd=true */
 		/* copy first two bytes from original: D/C + RF + FI + E+ SN*/
 		memset(pdu_segment_header_p, 0, header_size);
 		RLC_AM_PDU_SET_D_C(*pdu_segment_header_p);
@@ -1106,7 +1105,7 @@ rlc_am_rx_list_reassemble_rlc_sdus(
   do {
     if (rlc_am_rx_pdu_management_p->all_segments_received > 0) {
       cursor_p = list2_remove_head(&rlc_pP->receiver_buffer);
-      rlc_am_reassemble_pdu(ctxt_pP, rlc_pP, cursor_p,TRUE);
+      rlc_am_reassemble_pdu(ctxt_pP, rlc_pP, cursor_p, true);
       rlc_am_rx_old_pdu_management = rlc_am_rx_pdu_management_p;
       cursor_p = list2_get_head(&rlc_pP->receiver_buffer);
 
@@ -1123,7 +1122,7 @@ rlc_am_rx_list_reassemble_rlc_sdus(
     else if (rlc_am_rx_pdu_management_p->segment_reassembled == RLC_AM_RX_PDU_SEGMENT_REASSEMBLE_PENDING) {
     	rlc_am_rx_pdu_management_p->segment_reassembled = RLC_AM_RX_PDU_SEGMENT_REASSEMBLED;
 
-        rlc_am_reassemble_pdu(ctxt_pP, rlc_pP, cursor_p,FALSE);
+        rlc_am_reassemble_pdu(ctxt_pP, rlc_pP, cursor_p, false);
         rlc_am_rx_old_pdu_management = rlc_am_rx_pdu_management_p;
         cursor_p = cursor_p->next;
 
diff --git a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_rx_list.h b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_rx_list.h
index fd8704964d1a5fd0f752f0454f80a4ffafb604a6..18e423312cba1a53f40e1198eb2486ebacecfc54 100644
--- a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_rx_list.h
+++ b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_rx_list.h
@@ -61,13 +61,13 @@ rlc_am_rx_pdu_status_t rlc_am_rx_list_check_duplicate_insert_pdu(const protocol_
 */
 signed int rlc_am_rx_list_insert_pdu(const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t* const rlcP,  mem_block_t* const tbP);
 
-/*! \fn boolean_t rlc_am_rx_check_vr_reassemble(const protocol_ctxt_t* const ctxt_pP,const rlc_am_entity_t* const rlc_pP)
+/*! \fn bool rlc_am_rx_check_vr_reassemble(const protocol_ctxt_t* const ctxt_pP,const rlc_am_entity_t* const rlc_pP)
 * \brief      Check if reassembly taking into account potential new vrR value
 * \param[in]  ctxt_pP        Running context.
 * \param[in]  rlcP         RLC AM protocol instance pointer.
-* \return     TRUE if reassembly must be done, FALSE else
+* \return     true if reassembly must be done, false else
 */
-boolean_t rlc_am_rx_check_vr_reassemble(const protocol_ctxt_t* const ctxt_pP,const rlc_am_entity_t* const rlc_pP);
+bool rlc_am_rx_check_vr_reassemble(const protocol_ctxt_t* const ctxt_pP,const rlc_am_entity_t* const rlc_pP);
 
 /*! \fn void rlc_am_rx_check_all_byte_segments(const protocol_ctxt_t* const ctxt_pP, rlc_am_entity_t* const rlcP, mem_block_t* const tbP)
 * \brief      Check if all sub-segments of a PDU are received, if yes then call rlc_am_rx_mark_all_segments_received() procedure.
diff --git a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_segment.c b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_segment.c
index ed81e119acb2eb4e72a4d53d1373c8d18565ed64..9e7c3338f813eed7e4cd0022da57770d06fa3ab8 100644
--- a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_segment.c
+++ b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_segment.c
@@ -32,12 +32,11 @@
 #include "common/utils/LOG/log.h"
 
 //-----------------------------------------------------------------------------
-void rlc_am_pdu_polling (
-  const protocol_ctxt_t* const  ctxt_pP,
-  rlc_am_entity_t *const rlc_pP,
-  rlc_am_pdu_sn_10_t *const pdu_pP,
-  const int16_t payload_sizeP,
-  boolean_t is_new_pdu)
+void rlc_am_pdu_polling(const protocol_ctxt_t* const  ctxt_pP,
+                        rlc_am_entity_t *const rlc_pP,
+                        rlc_am_pdu_sn_10_t *const pdu_pP,
+                        const int16_t payload_sizeP,
+                        bool is_new_pdu)
 {
   // 5.2.2 Polling
   // An AM RLC entity can poll its peer AM RLC entity in order to trigger STATUS reporting at the peer AM RLC entity.
diff --git a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_segment.h b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_segment.h
index dc754d08e498b61024e00dffd194c4a4aa44da5e..1e472302c82effd27fdf38c92218d65e3a91c897 100644
--- a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_segment.h
+++ b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_segment.h
@@ -36,14 +36,14 @@
 #        define __RLC_AM_SEGMENT_H__
 //-----------------------------------------------------------------------------
 
-/*! \fn void rlc_am_pdu_polling (const protocol_ctxt_t* const  ctxt_pP, rlc_am_entity_t *const rlcP, rlc_am_pdu_sn_10_t *pduP, int16_t payload_sizeP,boolean_t is_new_pdu)
+/*! \fn void rlc_am_pdu_polling (const protocol_ctxt_t* const  ctxt_pP, rlc_am_entity_t *const rlcP, rlc_am_pdu_sn_10_t *pduP, int16_t payload_sizeP, bool is_new_pdu)
 * \brief      Set or not the poll bit in the PDU header depending on RLC AM protocol variables.
 * \param[in]  ctxt_pP          Running context.
 * \param[in]  rlcP           RLC AM protocol instance pointer.
 * \param[in]  pduP           Pointer on the header of the PDU in order to be able to set the poll bit if necessary.
 * \param[in]  payload_sizeP  Size of the payload of the PDU.
 */
-void rlc_am_pdu_polling (const protocol_ctxt_t* const  ctxt_pP, rlc_am_entity_t *const rlcP, rlc_am_pdu_sn_10_t *pduP, int16_t payload_sizeP,boolean_t is_new_pdu);
+void rlc_am_pdu_polling (const protocol_ctxt_t* const  ctxt_pP, rlc_am_entity_t *const rlcP, rlc_am_pdu_sn_10_t *pduP, int16_t payload_sizeP, bool is_new_pdu);
 
 /*! \fn void rlc_am_segment_10 (const protocol_ctxt_t* const  ctxt_pP, rlc_am_entity_t * const rlcP)
 * \brief      Segment a PDU with 10 bits sequence number, based on segmentation information given by MAC (size to transmit).
diff --git a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_status_report.c b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_status_report.c
index 02a0247a03d2e8a3c8dc0e498a364838506d33bf..f1e6c961e704ee5ce26cf9a5b1dce2d1512cb02c 100644
--- a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_status_report.c
+++ b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_status_report.c
@@ -237,7 +237,7 @@ rlc_am_receive_process_control_pdu(
   rlc_sn_t        nack_sn,prev_nack_sn;
   sdu_size_t    data_cnf_so_stop = 0x7FFF;
   unsigned int nack_index;
-  boolean_t status = TRUE;
+  bool status = true;
 
   if (rlc_am_get_control_pdu_infos(rlc_am_pdu_sn_10_p, tb_size_in_bytes_pP, &rlc_pP->control_pdu_info) >= 0) {
     rlc_am_tx_buffer_display(ctxt_pP, rlc_pP, " TX BUFFER BEFORE PROCESS OF STATUS PDU");
@@ -282,7 +282,7 @@ rlc_am_receive_process_control_pdu(
     if (RLC_AM_DIFF_SN(rlc_pP->vt_s,rlc_pP->vt_a) >= RLC_AM_DIFF_SN(ack_sn,rlc_pP->vt_a)) {
       if (rlc_pP->control_pdu_info.num_nack == 0) {
         while (sn_cursor != ack_sn) {
-          rlc_am_ack_pdu(ctxt_pP, rlc_pP, sn_cursor,TRUE);
+          rlc_am_ack_pdu(ctxt_pP, rlc_pP, sn_cursor, true);
           sn_cursor = RLC_AM_NEXT_SN(sn_cursor);
         }
 
@@ -294,7 +294,7 @@ rlc_am_receive_process_control_pdu(
         prev_nack_sn = 0x3FFF;
 
         while (sn_cursor != nack_sn) {
-          rlc_am_ack_pdu(ctxt_pP, rlc_pP, sn_cursor,TRUE);
+          rlc_am_ack_pdu(ctxt_pP, rlc_pP, sn_cursor, true);
           sn_cursor = RLC_AM_NEXT_SN(sn_cursor);
         }
 
@@ -316,7 +316,7 @@ rlc_am_receive_process_control_pdu(
             rlc_am_ack_pdu(ctxt_pP,
                            rlc_pP,
                            sn_cursor,
-                           FALSE);
+                           false);
           } else {
             status = rlc_am_nack_pdu (ctxt_pP,
                                       rlc_pP,
@@ -348,13 +348,13 @@ rlc_am_receive_process_control_pdu(
       LOG_E(RLC, PROTOCOL_RLC_AM_CTXT_FMT" WARNING CONTROL PDU ACK SN %d OUT OF WINDOW vtA=%d vtS=%d\n",
             PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),ack_sn,rlc_pP->vt_a,rlc_pP->vt_s);
       *tb_size_in_bytes_pP = 0;
-      status = FALSE;
+      status = false;
     }
   } else {
     LOG_E(RLC, PROTOCOL_RLC_AM_CTXT_FMT" ERROR IN DECODING CONTROL PDU\n",
           PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP));
     *tb_size_in_bytes_pP = 0;
-    status = FALSE;
+    status = false;
   }
 
   if (status) {
@@ -480,8 +480,8 @@ rlc_am_send_status_pdu(
   int                           waited_so             = 0;
   mem_block_t                  *tb_p                  = NULL;
   sdu_size_t                    pdu_size              = 0;
-  boolean_t           status_report_completed = false;
-  boolean_t           segment_loop_end    = false;
+  bool                          status_report_completed = false;
+  bool                          segment_loop_end    = false;
   memset(&control_pdu_info, 0, sizeof(rlc_am_control_pdu_info_t));
   LOG_D(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[SEND-STATUS] nb_bits_to_transmit %d (15 already allocated for header)\n",
         PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
diff --git a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_test.c b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_test.c
index 7a95a62787a58c65e114ca76bf4723e2c9c15ade..e898a601c2c7759ac41a12fffd947e4556d29b33 100644
--- a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_test.c
+++ b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_test.c
@@ -1170,7 +1170,7 @@ void rlc_am_v9_3_0_test(void)
 {
   //     initscr();
   //     cbreak();
-  //     keypad(stdscr, TRUE);
+  //     keypad(stdscr, true);
   // under test
   pool_buffer_init();
   set_comp_log(RLC, LOG_ERR, LOG_MED, 1);
diff --git a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_timer_poll_retransmit.c b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_timer_poll_retransmit.c
index 969ed2d7a54815a085786c84c4aece717c5e087a..7aead2f30a46aa64a9e79207db673ed9af911aed 100644
--- a/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_timer_poll_retransmit.c
+++ b/openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_timer_poll_retransmit.c
@@ -111,7 +111,7 @@ rlc_am_check_timer_poll_retransmit(
 	  }
 
 
-      rlc_pP->force_poll= TRUE;
+      rlc_pP->force_poll = true;
       //BugFix : new ms_time_out is computed when next poll is transmitter
     }
   }
diff --git a/openair2/LAYER2/RLC/TM_v9.3.0/rlc_tm.c b/openair2/LAYER2/RLC/TM_v9.3.0/rlc_tm.c
index 4e3fffe176e3ba32917a38bf44c9d13e21536fc8..f079696aa911d8491cb6b0bf1e9db3e0c4d58763 100644
--- a/openair2/LAYER2/RLC/TM_v9.3.0/rlc_tm.c
+++ b/openair2/LAYER2/RLC/TM_v9.3.0/rlc_tm.c
@@ -31,13 +31,11 @@
 #include "list.h"
 #include "LAYER2/MAC/mac_extern.h"
 //-----------------------------------------------------------------------------
-void
-rlc_tm_send_sdu (
-  const protocol_ctxt_t* const  ctxt_pP,
-  rlc_tm_entity_t * const rlc_pP,
-  const boolean_t         error_indicationP,
-  uint8_t * const         srcP,
-  const sdu_size_t        length_in_bitsP)
+void rlc_tm_send_sdu(const protocol_ctxt_t* const ctxt_pP,
+                     rlc_tm_entity_t *      const rlc_pP,
+                     const bool                   error_indicationP,
+                     uint8_t *              const srcP,
+                     const sdu_size_t             length_in_bitsP)
 {
   int             length_in_bytes;
 #if DEBUG_RLC_TM_DISPLAY_ASCII_DATA
diff --git a/openair2/LAYER2/RLC/TM_v9.3.0/rlc_tm.h b/openair2/LAYER2/RLC/TM_v9.3.0/rlc_tm.h
index d2bab33b1a428fe703cac72a8fd094c5b9f35a0c..de7b9b8170673969f6713ba3b59983de27f03e90 100644
--- a/openair2/LAYER2/RLC/TM_v9.3.0/rlc_tm.h
+++ b/openair2/LAYER2/RLC/TM_v9.3.0/rlc_tm.h
@@ -51,7 +51,7 @@
 /*! \fn void rlc_tm_send_sdu (
 *        const protocol_ctxt_t* const  ctxt_pP,
 *        rlc_tm_entity_t * const rlc_pP,
-*        const boolean_t         error_indicationP,
+*        const bool            error_indicationP,
 *        uint8_t * const         srcP,
 *        const sdu_size_t        length_in_bitsP)
 * \brief    Send SDU if any reassemblied to upper layer.
@@ -60,12 +60,11 @@
 * \param[in]  srcP                SDU data pointer.
 * \param[in]  length_in_bitsP     Length of SDU in bits.
 */
-void rlc_tm_send_sdu (
-                 const protocol_ctxt_t* const  ctxt_pP,
-                 rlc_tm_entity_t * const rlc_pP,
-                 const boolean_t         error_indicationP,
-                 uint8_t * const         srcP,
-                 const sdu_size_t        length_in_bitsP);
+void rlc_tm_send_sdu(const protocol_ctxt_t* const  ctxt_pP,
+                     rlc_tm_entity_t * const rlc_pP,
+                     const bool         error_indicationP,
+                     uint8_t * const         srcP,
+                     const sdu_size_t        length_in_bitsP);
 
 /*! \fn void rlc_tm_no_segment (const protocol_ctxt_t* const  ctxt_pP, rlc_tm_entity_t * const rlcP)
 * \brief    Schedule a SDU to be transmited by lower layers.
diff --git a/openair2/LAYER2/RLC/TM_v9.3.0/rlc_tm_entity.h b/openair2/LAYER2/RLC/TM_v9.3.0/rlc_tm_entity.h
index 1a13982df65fd2bac70d02dae4452c7ea0711e0c..3c2f1804bec6eff71530fc36032252d772b45f24 100644
--- a/openair2/LAYER2/RLC/TM_v9.3.0/rlc_tm_entity.h
+++ b/openair2/LAYER2/RLC/TM_v9.3.0/rlc_tm_entity.h
@@ -40,14 +40,13 @@
 * \brief Structure containing a RLC TM instance protocol variables, allocation variables, buffers and other miscellaneous variables.
 */
 typedef struct rlc_tm_entity {
-  boolean_t            allocation;         /*!< \brief Boolean for rlc_tm_entity_t struct allocation. */
+  bool                 allocation;         /*!< \brief Boolean for rlc_tm_entity_t struct allocation. */
   rlc_protocol_state_t protocol_state;     /*!< \brief Protocol state, can be RLC_NULL_STATE, RLC_DATA_TRANSFER_READY_STATE, RLC_LOCAL_SUSPEND_STATE. */
-  boolean_t            is_uplink_downlink; /*!< \brief Is this instance is a transmitter, a receiver or both? */
-  boolean_t            is_data_plane;      /*!< \brief To know if the RLC belongs to a data radio bearer or a signalling radio bearer, for statistics and trace purpose. */
+  bool                 is_uplink_downlink; /*!< \brief Is this instance is a transmitter, a receiver or both? */
+  bool                 is_data_plane;      /*!< \brief To know if the RLC belongs to a data radio bearer or a signalling radio bearer, for statistics and trace purpose. */
   // for stats and trace purpose :
   logical_chan_id_t    channel_id;         /*!< \brief Transport channel identifier. */
   rb_id_t              rb_id;              /*!< \brief Radio bearer identifier, for statistics and trace purpose. */
-  //boolean_t            is_enb;             /*!< \brief To know if the RLC belongs to a eNB or UE. */
   //-----------------------------
   // tranmission
   //-----------------------------
diff --git a/openair2/LAYER2/RLC/TM_v9.3.0/rlc_tm_init.c b/openair2/LAYER2/RLC/TM_v9.3.0/rlc_tm_init.c
index 22e6f4d78d1a4d1b8d0dc4c855216bda7068caed..a838b2a00663e0ebb6706605b1379232da9d51de 100644
--- a/openair2/LAYER2/RLC/TM_v9.3.0/rlc_tm_init.c
+++ b/openair2/LAYER2/RLC/TM_v9.3.0/rlc_tm_init.c
@@ -133,10 +133,9 @@ rlc_tm_cleanup (
 }
 
 //-----------------------------------------------------------------------------
-void rlc_tm_configure(
-  const protocol_ctxt_t* const  ctxt_pP,
-  rlc_tm_entity_t * const rlcP,
-  const boolean_t is_uplink_downlinkP)
+void rlc_tm_configure(const protocol_ctxt_t* const  ctxt_pP,
+                      rlc_tm_entity_t * const rlcP,
+                      const bool is_uplink_downlinkP)
 {
   rlcP->is_uplink_downlink = is_uplink_downlinkP;
   rlc_tm_reset_state_variables (ctxt_pP, rlcP);
diff --git a/openair2/LAYER2/RLC/TM_v9.3.0/rlc_tm_init.h b/openair2/LAYER2/RLC/TM_v9.3.0/rlc_tm_init.h
index 57e2116a724969c37e538659628791263cb6ebb8..f315a0311ae3badd25a06753b4974abed62b8c38 100644
--- a/openair2/LAYER2/RLC/TM_v9.3.0/rlc_tm_init.h
+++ b/openair2/LAYER2/RLC/TM_v9.3.0/rlc_tm_init.h
@@ -78,27 +78,24 @@ void rlc_tm_init (
 * \brief    Reset protocol variables and state variables to initial values.
 * \param[in]  rlcP                      RLC TM protocol instance pointer.
 */
-void rlc_tm_reset_state_variables (
-                        const protocol_ctxt_t* const  ctxt_pP,
-                        rlc_tm_entity_t * const rlcP);
+void rlc_tm_reset_state_variables(const protocol_ctxt_t* const ctxt_pP,
+                                  rlc_tm_entity_t * const rlcP);
 
 /*! \fn void rlc_tm_cleanup(rlc_tm_entity_t * const rlcP)
 * \brief    Free all allocated memory (lists and buffers) previously allocated by this RLC TM instance.
 * \param[in]  rlcP                      RLC TM protocol instance pointer.
 */
-void rlc_tm_cleanup(
-                        rlc_tm_entity_t * const rlcP);
+void rlc_tm_cleanup(rlc_tm_entity_t * const rlcP);
 
-/*! \fn void rlc_tm_configure(const protocol_ctxt_t* const  ctxt_pP,rlc_tm_entity_t * const rlcP, const boolean_t is_uplink_downlinkP)
+/*! \fn void rlc_tm_configure(const protocol_ctxt_t* const  ctxt_pP,rlc_tm_entity_t * const rlcP, const bool is_uplink_downlinkP)
 * \brief    Configure RLC TM protocol parameters.
 * \param[in]  rlcP                      RLC TM protocol instance pointer.
 * \param[in]  is_uplink_downlinkP       Is this instance is TRANSMITTER_ONLY,
 RECEIVER_ONLY, or TRANSMITTER_AND_RECEIVER.
 */
-void rlc_tm_configure(
-                        const protocol_ctxt_t* const  ctxt_pP,
-                        rlc_tm_entity_t * const rlcP,
-                        const boolean_t is_uplink_downlinkP);
+void rlc_tm_configure(const protocol_ctxt_t* const  ctxt_pP,
+                      rlc_tm_entity_t * const rlcP,
+                      const bool is_uplink_downlinkP);
 
 /*! \fn void rlc_tm_set_debug_infos(const protocol_ctxt_t* const  ctxt_pP, rlc_tm_entity_t * const rlcP, const rb_id_t rb_idP, const srb_flag_t srb_flagP)
 * \brief    Set debug informations for a RLC TM protocol instance, these informations are only for trace purpose.
diff --git a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_control_primitives.c b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_control_primitives.c
index bec815ac5da6a93d4c96daaeaae2a4a611e69282..f2cb4f09b1e3227851a004c8d0271021ab101523 100644
--- a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_control_primitives.c
+++ b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_control_primitives.c
@@ -263,7 +263,7 @@ rlc_um_init (
     }
 
     rlc_pP->first_pdu = 1;
-    rlc_pP->initialized = TRUE;
+    rlc_pP->initialized = true;
   }
 }
 //-----------------------------------------------------------------------------
diff --git a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_entity.h b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_entity.h
index 3250ac85b85c925cfaea642af929f200eecd4752..7bfa3d60ffe6f8c4ba104c9357f9689dd22d21de 100644
--- a/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_entity.h
+++ b/openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_entity.h
@@ -53,12 +53,11 @@ typedef struct rlc_um_timer_s {
 */
 
 typedef struct rlc_um_entity_s {
-  boolean_t            initialized;        /*!< \brief Boolean for rlc_am_entity_t struct initialization. */
-  boolean_t            is_uplink_downlink; /*!< \brief Is this instance is a transmitter, a receiver or both? */
+  bool                 initialized;        /*!< \brief Boolean for rlc_am_entity_t struct initialization. */
+  bool                 is_uplink_downlink; /*!< \brief Is this instance is a transmitter, a receiver or both? */
   rlc_protocol_state_t protocol_state;     /*!< \brief Protocol state, can be RLC_NULL_STATE, RLC_DATA_TRANSFER_READY_STATE, RLC_LOCAL_SUSPEND_STATE. */
-  boolean_t            is_data_plane;      /*!< \brief To know if the RLC belongs to a data radio bearer or a signalling radio bearer, for statistics and trace purpose. */
-  //boolean_t            is_enb;             /*!< \brief To know if the RLC belongs to a eNB or UE. */
-  boolean_t            is_mxch;            /*!< \brief To know if the RLC belongs to a MBMS bearer. */
+  bool                 is_data_plane;      /*!< \brief To know if the RLC belongs to a data radio bearer or a signalling radio bearer, for statistics and trace purpose. */
+  bool                 is_mxch;            /*!< \brief To know if the RLC belongs to a MBMS bearer. */
   //-----------------------------
   // PROTOCOL VARIABLES
   //-----------------------------
@@ -114,7 +113,7 @@ typedef struct rlc_um_entity_s {
   //-----------------------------
   // STATISTICS
   //-----------------------------
-  boolean_t         first_pdu;                        /*!< \brief Act as a boolean, tells if the next PDU is the first PDU to be received. */
+  bool              first_pdu;                        /*!< \brief Act as a boolean, tells if the next PDU is the first PDU to be received. */
 
   unsigned int stat_tx_pdcp_sdu;                      /*!< \brief Number of SDUs received from upper layers. */
   unsigned int stat_tx_pdcp_bytes;                    /*!< \brief Number of SDU bytes received from upper layers. */
diff --git a/openair2/LAYER2/RLC/rlc.c b/openair2/LAYER2/RLC/rlc.c
index b9dcf0414b99024195fe1a6bdc26f4ba7e10ef06..ec90817500d55bdf30b901518754e05f7a08f9cb 100644
--- a/openair2/LAYER2/RLC/rlc.c
+++ b/openair2/LAYER2/RLC/rlc.c
@@ -41,13 +41,12 @@
 #include "common/ran_context.h"
 extern RAN_CONTEXT_t RC;
 
-extern boolean_t pdcp_data_ind(
-  const protocol_ctxt_t *const ctxt_pP,
-  const srb_flag_t srb_flagP,
-  const MBMS_flag_t MBMS_flagP,
-  const rb_id_t rb_idP,
-  const sdu_size_t sdu_buffer_sizeP,
-  mem_block_t *const sdu_buffer_pP);
+extern bool pdcp_data_ind(const protocol_ctxt_t *const ctxt_pP,
+                          const srb_flag_t srb_flagP,
+                          const MBMS_flag_t MBMS_flagP,
+                          const rb_id_t rb_idP,
+                          const sdu_size_t sdu_buffer_sizeP,
+                          mem_block_t *const sdu_buffer_pP);
 
 #define DEBUG_RLC_PDCP_INTERFACE 1
 //#define TRACE_RLC_PAYLOAD 1
@@ -397,7 +396,7 @@ rlc_op_status_t rlc_data_req     (const protocol_ctxt_t *const ctxt_pP,
 
   VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RLC_DATA_REQ,VCD_FUNCTION_IN);
 
-  if (MBMS_flagP == TRUE) {
+  if (MBMS_flagP == true) {
     if (ctxt_pP->enb_flag) {
       log_ch_id = rlc_mbms_enb_get_lcid_by_rb_id(ctxt_pP->module_id,rb_idP);
       mbms_id_p = &rlc_mbms_lcid2service_session_id_eNB[ctxt_pP->module_id][log_ch_id];
diff --git a/openair2/LAYER2/RLC/rlc.h b/openair2/LAYER2/RLC/rlc.h
index 1e5b7947d7a384f209776fce7a9af2136e3eda04..1e17ff96bfcfa2a8060040dba9465b4a23163f2b 100644
--- a/openair2/LAYER2/RLC/rlc.h
+++ b/openair2/LAYER2/RLC/rlc.h
@@ -107,7 +107,7 @@ typedef  struct {
   rlc_buffer_occupancy_t       pdus_in_buffer;  /*!< \brief Number of PDUs buffered in RLC protocol instance (OBSOLETE). */
   frame_t                      head_sdu_creation_time;           /*!< \brief Head SDU creation time. */
   sdu_size_t                   head_sdu_remaining_size_to_send;  /*!< \brief remaining size of sdu: could be the total size or the remaining size of already segmented sdu */
-  boolean_t                    head_sdu_is_segmented;     /*!< \brief 0 if head SDU has not been segmented, 1 if already segmented */
+  bool                         head_sdu_is_segmented;     /*!< \brief 0 if head SDU has not been segmented, 1 if already segmented */
 } mac_rlc_status_resp_t;
 
 
diff --git a/openair2/LAYER2/RLC/rlc_mac.c b/openair2/LAYER2/RLC/rlc_mac.c
index 89cbe4c406c0e34dc0c981ffd9e66d6c634c56a7..0e1cb89fd7145262489f9c44269f4bc2c80826ee 100644
--- a/openair2/LAYER2/RLC/rlc_mac.c
+++ b/openair2/LAYER2/RLC/rlc_mac.c
@@ -425,8 +425,8 @@ rlc_buffer_occupancy_t mac_rlc_get_buffer_occupancy_ind(
   /* Assumptions : for UE only */
   /* At each TTI, Buffer Occupancy is first computed in mac_rlc_status_ind called by MAC ue_scheduler() function */
   /* Then this function is called during MAC multiplexing ue_get_sdu(), and it may be call several times for the same bearer if it is in AM mode and there are several PDU types to transmit */
-  //AssertFatal(enb_flagP == FALSE,"RLC Tx mac_rlc_get_buffer_occupancy_ind function is not implemented for eNB LcId=%d\n", channel_idP);
-  if(enb_flagP != FALSE) {
+  //AssertFatal(enb_flagP == false,"RLC Tx mac_rlc_get_buffer_occupancy_ind function is not implemented for eNB LcId=%d\n", channel_idP);
+  if(enb_flagP != false) {
     LOG_E(RLC, "Tx mac_rlc_get_buffer_occupancy_ind function is not implemented for eNB LcId=%u\n", channel_idP);
     return 0;
   }
diff --git a/openair2/LAYER2/RLC/rlc_rrc.c b/openair2/LAYER2/RLC/rlc_rrc.c
index 4313f379fe0f9e5475dbd8053215f0c73567f5d8..ed9af5efb2541c46d87c8a30637c46b06565022e 100644
--- a/openair2/LAYER2/RLC/rlc_rrc.c
+++ b/openair2/LAYER2/RLC/rlc_rrc.c
@@ -480,7 +480,7 @@ rlc_op_status_t rrc_rlc_remove_rlc   (
   /* for no gcc warnings */
   (void)lcid;
 
-  if (MBMS_flagP == TRUE) {
+  if (MBMS_flagP == true) {
     if (ctxt_pP->enb_flag) {
       lcid = rlc_mbms_enb_get_lcid_by_rb_id(ctxt_pP->module_id,rb_idP);
       mbms_id_p = &rlc_mbms_lcid2service_session_id_eNB[ctxt_pP->module_id][lcid];
@@ -581,7 +581,7 @@ rlc_union_t *rrc_rlc_add_rlc   (
   rlc_mbms_id_t         *mbms_id_p  = NULL;
   logical_chan_id_t      lcid            = 0;
 
-  if (MBMS_flagP == FALSE) {
+  if (MBMS_flagP == false) {
     //AssertFatal (rb_idP < NB_RB_MAX, "RB id is too high (%u/%d)!\n", rb_idP, NB_RB_MAX);
     //AssertFatal (chan_idP < RLC_MAX_LC, "LC id is too high (%u/%d)!\n", chan_idP, RLC_MAX_LC);
     if(rb_idP >= NB_RB_MAX) {
@@ -595,7 +595,7 @@ rlc_union_t *rrc_rlc_add_rlc   (
     }
   }
 
-  if (MBMS_flagP == TRUE) {
+  if (MBMS_flagP == true) {
     if (ctxt_pP->enb_flag) {
       lcid = rlc_mbms_enb_get_lcid_by_rb_id(ctxt_pP->module_id,rb_idP);
       mbms_id_p = &rlc_mbms_lcid2service_session_id_eNB[ctxt_pP->module_id][lcid];
@@ -640,11 +640,11 @@ rlc_union_t *rrc_rlc_add_rlc   (
   } else if (h_rc == HASH_TABLE_KEY_NOT_EXISTS) {
     rlc_union_p = calloc(1, sizeof(rlc_union_t));
     h_rc = hashtable_insert(rlc_coll_p, key, rlc_union_p);
-    if(MBMS_flagP != TRUE)
+    if(MBMS_flagP != true)
     	h_lcid_rc = hashtable_insert(rlc_coll_p, key_lcid, rlc_union_p);
 
     if ((h_rc == HASH_TABLE_OK) && (h_lcid_rc == HASH_TABLE_OK)) {
-      if (MBMS_flagP == TRUE) {
+      if (MBMS_flagP == true) {
         LOG_I(RLC, PROTOCOL_CTXT_FMT" RLC service id %u session id %u rrc_rlc_add_rlc\n",
               PROTOCOL_CTXT_ARGS(ctxt_pP),
               mbms_id_p->service_id,
diff --git a/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c b/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c
index fc794ad169f8fce827f863d10e72217ce7928340..9598bf1ad6a4d8b6407aec0455e214aeb6cb847a 100644
--- a/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c
+++ b/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c
@@ -359,15 +359,14 @@ static void enqueue_pdcp_data_ind(
   if (pthread_mutex_unlock(&pq.m) != 0) abort();
 }
 
-boolean_t pdcp_data_ind(
-  const protocol_ctxt_t *const  ctxt_pP,
-  const srb_flag_t srb_flagP,
-  const MBMS_flag_t MBMS_flagP,
-  const rb_id_t rb_id,
-  const sdu_size_t sdu_buffer_size,
-  mem_block_t *const sdu_buffer,
-  const uint32_t *const srcID,
-  const uint32_t *const dstID)
+bool pdcp_data_ind(const protocol_ctxt_t *const  ctxt_pP,
+                   const srb_flag_t srb_flagP,
+                   const MBMS_flag_t MBMS_flagP,
+                   const rb_id_t rb_id,
+                   const sdu_size_t sdu_buffer_size,
+                   mem_block_t *const sdu_buffer,
+                   const uint32_t *const srcID,
+                   const uint32_t *const dstID)
 {
   enqueue_pdcp_data_ind(ctxt_pP,
                         srb_flagP,
@@ -438,7 +437,7 @@ static void *enb_tun_read_thread(void *_)
     ctxt.rnti = rnti;
 
     uint8_t qfi = 7;
-    boolean_t rqi = 0;
+    bool rqi = 0;
     int pdusession_id = 10;
 
     sdap_data_req(&ctxt, SRB_FLAG_NO, rb_id, RLC_MUI_UNDEFINED,
@@ -484,7 +483,7 @@ static void *ue_tun_read_thread(void *_)
 
     ctxt.rnti = rnti;
 
-    boolean_t dc = SDAP_HDR_UL_DATA_PDU;
+    bool dc = SDAP_HDR_UL_DATA_PDU;
     uint8_t qfi = 7;
     int pdusession_id = 10;
 
@@ -858,7 +857,7 @@ void pdcp_run(const protocol_ctxt_t *const  ctxt_pP)
                              RRC_DCCH_DATA_REQ(msg_p).mode,
                              NULL, NULL);
 
-      if (result != TRUE)
+      if (result != true)
         LOG_E(PDCP, "PDCP data request failed!\n");
       result = itti_free(ITTI_MSG_ORIGIN_ID(msg_p), RRC_DCCH_DATA_REQ(msg_p).sdu_p);
       AssertFatal(result == EXIT_SUCCESS, "Failed to free memory (%d)!\n", result);
@@ -950,7 +949,7 @@ static void add_drb_am(int is_gnb, int rnti, struct NR_DRB_ToAddMod *s,
   int has_sdap = 0;
   int has_sdapULheader=0;
   int has_sdapDLheader=0;
-  boolean_t is_sdap_DefaultDRB = false;
+  bool is_sdap_DefaultDRB = false;
   NR_QFI_t *mappedQFIs2Add = NULL;
   uint8_t mappedQFIs2AddCount=0;
   if (s->cnAssociation->present == NR_DRB_ToAddMod__cnAssociation_PR_eps_BearerIdentity)
@@ -1033,20 +1032,18 @@ static void add_drb(int is_gnb, int rnti, struct NR_DRB_ToAddMod *s,
   LOG_I(PDCP, "%s:%s:%d: added DRB for UE RNTI %x\n", __FILE__, __FUNCTION__, __LINE__, rnti);
 }
 
-boolean_t nr_rrc_pdcp_config_asn1_req(
-  const protocol_ctxt_t *const  ctxt_pP,
-  NR_SRB_ToAddModList_t  *const srb2add_list,
-  NR_DRB_ToAddModList_t  *const drb2add_list,
-  NR_DRB_ToReleaseList_t *const drb2release_list,
-  const uint8_t                   security_modeP,
-  uint8_t                  *const kRRCenc,
-  uint8_t                  *const kRRCint,
-  uint8_t                  *const kUPenc,
-  uint8_t                  *const kUPint
-  ,LTE_PMCH_InfoList_r9_t  *pmch_InfoList_r9
-  ,rb_id_t                 *const defaultDRB,
-  struct NR_CellGroupConfig__rlc_BearerToAddModList *rlc_bearer2add_list)
-  //struct NR_RLC_Config     *rlc_Config)
+bool nr_rrc_pdcp_config_asn1_req(const protocol_ctxt_t *const  ctxt_pP,
+                                 NR_SRB_ToAddModList_t  *const srb2add_list,
+                                 NR_DRB_ToAddModList_t  *const drb2add_list,
+                                 NR_DRB_ToReleaseList_t *const drb2release_list,
+                                 const uint8_t                   security_modeP,
+                                 uint8_t                  *const kRRCenc,
+                                 uint8_t                  *const kRRCint,
+                                 uint8_t                  *const kUPenc,
+                                 uint8_t                  *const kUPint,
+                                 LTE_PMCH_InfoList_r9_t  *pmch_InfoList_r9,
+                                 rb_id_t                 *const defaultDRB,
+                                 struct NR_CellGroupConfig__rlc_BearerToAddModList *rlc_bearer2add_list)
 {
   int rnti = ctxt_pP->rnti;
   int i;
@@ -1104,17 +1101,16 @@ boolean_t nr_rrc_pdcp_config_asn1_req(
 }
 
 /* Dummy function due to dependency from LTE libraries */
-boolean_t rrc_pdcp_config_asn1_req(
-  const protocol_ctxt_t *const  ctxt_pP,
-  LTE_SRB_ToAddModList_t  *const srb2add_list,
-  LTE_DRB_ToAddModList_t  *const drb2add_list,
-  LTE_DRB_ToReleaseList_t *const drb2release_list,
-  const uint8_t                   security_modeP,
-  uint8_t                  *const kRRCenc,
-  uint8_t                  *const kRRCint,
-  uint8_t                  *const kUPenc
-  ,LTE_PMCH_InfoList_r9_t  *pmch_InfoList_r9
-  ,rb_id_t                 *const defaultDRB)
+bool rrc_pdcp_config_asn1_req(const protocol_ctxt_t *const  ctxt_pP,
+                              LTE_SRB_ToAddModList_t  *const srb2add_list,
+                              LTE_DRB_ToAddModList_t  *const drb2add_list,
+                              LTE_DRB_ToReleaseList_t *const drb2release_list,
+                              const uint8_t                   security_modeP,
+                              uint8_t                  *const kRRCenc,
+                              uint8_t                  *const kRRCint,
+                              uint8_t                  *const kUPenc,
+                              LTE_PMCH_InfoList_r9_t  *pmch_InfoList_r9,
+                              rb_id_t                 *const defaultDRB)
 {
   return 0;
 }
@@ -1219,8 +1215,7 @@ uint64_t get_pdcp_optmask(void)
   return pdcp_optmask;
 }
 
-boolean_t pdcp_remove_UE(
-  const protocol_ctxt_t *const  ctxt_pP)
+bool pdcp_remove_UE(const protocol_ctxt_t *const ctxt_pP)
 {
   int rnti = ctxt_pP->rnti;
 
@@ -1275,13 +1270,12 @@ void pdcp_config_set_security(
   nr_pdcp_manager_unlock(nr_pdcp_ue_manager);
 }
 
-static boolean_t pdcp_data_req_srb(
-  protocol_ctxt_t  *ctxt_pP,
-  const rb_id_t rb_id,
-  const mui_t muiP,
-  const confirm_t confirmP,
-  const sdu_size_t sdu_buffer_size,
-  unsigned char *const sdu_buffer)
+static bool pdcp_data_req_srb(protocol_ctxt_t  *ctxt_pP,
+                              const rb_id_t rb_id,
+                              const mui_t muiP,
+                              const confirm_t confirmP,
+                              const sdu_size_t sdu_buffer_size,
+                              unsigned char *const sdu_buffer)
 {
   LOG_D(PDCP, "%s() called, size %d\n", __func__, sdu_buffer_size);
   nr_pdcp_ue_t *ue;
@@ -1322,13 +1316,12 @@ static boolean_t pdcp_data_req_srb(
 }
 
 
-static boolean_t pdcp_data_req_drb(
-  protocol_ctxt_t  *ctxt_pP,
-  const rb_id_t rb_id,
-  const mui_t muiP,
-  const confirm_t confirmP,
-  const sdu_size_t sdu_buffer_size,
-  unsigned char *const sdu_buffer)
+static bool pdcp_data_req_drb(protocol_ctxt_t  *ctxt_pP,
+                              const rb_id_t rb_id,
+                              const mui_t muiP,
+                              const confirm_t confirmP,
+                              const sdu_size_t sdu_buffer_size,
+                              unsigned char *const sdu_buffer)
 {
   LOG_D(PDCP, "%s() called, size %d\n", __func__, sdu_buffer_size);
   nr_pdcp_ue_t *ue;
@@ -1368,19 +1361,16 @@ static boolean_t pdcp_data_req_drb(
   return 1;
 }
 
-boolean_t cu_f1u_data_req(
-  protocol_ctxt_t  *ctxt_pP,
-  const srb_flag_t srb_flagP,
-  const rb_id_t rb_id,
-  const mui_t muiP,
-  const confirm_t confirmP,
-  const sdu_size_t sdu_buffer_size,
-  unsigned char *const sdu_buffer,
-  const pdcp_transmission_mode_t mode
-  ,const uint32_t *const sourceL2Id
-  ,const uint32_t *const destinationL2Id
-  ) {
-
+bool cu_f1u_data_req(protocol_ctxt_t  *ctxt_pP,
+                     const srb_flag_t srb_flagP,
+                     const rb_id_t rb_id,
+                     const mui_t muiP,
+                     const confirm_t confirmP,
+                     const sdu_size_t sdu_buffer_size,
+                     unsigned char *const sdu_buffer,
+                     const pdcp_transmission_mode_t mode,
+                     const uint32_t *const sourceL2Id,
+                     const uint32_t *const destinationL2Id) {
   //Force instance id to 0, OAI incoherent instance management
   ctxt_pP->instance=0;
   mem_block_t *memblock = get_free_mem_block(sdu_buffer_size, __func__);
@@ -1397,18 +1387,16 @@ boolean_t cu_f1u_data_req(
   return ret;
 }
 
-boolean_t pdcp_data_req(
-  protocol_ctxt_t  *ctxt_pP,
-  const srb_flag_t srb_flagP,
-  const rb_id_t rb_id,
-  const mui_t muiP,
-  const confirm_t confirmP,
-  const sdu_size_t sdu_buffer_size,
-  unsigned char *const sdu_buffer,
-  const pdcp_transmission_mode_t mode
-  ,const uint32_t *const sourceL2Id
-  ,const uint32_t *const destinationL2Id
-  )
+bool pdcp_data_req(protocol_ctxt_t  *ctxt_pP,
+                   const srb_flag_t srb_flagP,
+                   const rb_id_t rb_id,
+                   const mui_t muiP,
+                   const confirm_t confirmP,
+                   const sdu_size_t sdu_buffer_size,
+                   unsigned char *const sdu_buffer,
+                   const pdcp_transmission_mode_t mode,
+                   const uint32_t *const sourceL2Id,
+                   const uint32_t *const destinationL2Id)
 {
   if (srb_flagP) {
    return pdcp_data_req_srb(ctxt_pP, rb_id, muiP, confirmP, sdu_buffer_size, sdu_buffer);
diff --git a/openair2/M2AP/m2ap_common.h b/openair2/M2AP/m2ap_common.h
index 95da064b4abdfc1882ade115e9d400a370147d4f..0a6895fcb7f3aa08226e7f2aaad22e9b36b4e9ea 100644
--- a/openair2/M2AP/m2ap_common.h
+++ b/openair2/M2AP/m2ap_common.h
@@ -55,11 +55,6 @@
 # define M2AP_PORT 36423
 #endif
 
-#ifndef TRUE
-#define TRUE 1
-#define FALSE 0
-#endif
-
 extern int asn1_xer_print;
 
 #if defined(ENB_MODE)
diff --git a/openair2/RRC/LITE/rrc_common.c b/openair2/RRC/LITE/rrc_common.c
index a4239e857d97acc5e9b41ea07599c93f1e94f691..f0c4e94c9990b5af3f631110ec21f5ab88bd951d 100644
--- a/openair2/RRC/LITE/rrc_common.c
+++ b/openair2/RRC/LITE/rrc_common.c
@@ -306,7 +306,7 @@ rrc_rx_tx(
       LOG_D(RRC,"SFN.SN %d.%d => release timer %d/%d\n",ctxt_pP->frame,ctxt_pP->subframe,
 	    ue_context_p->ue_context.ue_release_timer,ue_context_p->ue_context.ue_release_timer_thres);
       if ((ctxt_pP->frame == 0) && (ctxt_pP->subframe==0)) {
-	if (ue_context_p->ue_context.Initialue_identity_s_TMSI.presence == TRUE) {
+	if (ue_context_p->ue_context.Initialue_identity_s_TMSI.presence == true) {
 	  LOG_I(RRC,"UE rnti %x:S-TMSI %x failure timer %d/20000\n",
 		ue_context_p->ue_context.rnti,
 		ue_context_p->ue_context.Initialue_identity_s_TMSI.m_tmsi,
diff --git a/openair2/RRC/LTE/L2_interface.c b/openair2/RRC/LTE/L2_interface.c
index 0a63acc8fb8882ded746feaa3316a3b626859503..c12d2aa873e3e55e2160037f9ce5f28a9a922410 100644
--- a/openair2/RRC/LTE/L2_interface.c
+++ b/openair2/RRC/LTE/L2_interface.c
@@ -299,7 +299,7 @@ mac_rrc_data_ind(
   const uint8_t        *sduP,
   const sdu_size_t      sdu_lenP,
   const uint8_t         mbsfn_sync_areaP,
-  const boolean_t   brOption
+  const bool            brOption
 )
 //--------------------------------------------------------------------------
 {
diff --git a/openair2/RRC/LTE/L2_interface_common.c b/openair2/RRC/LTE/L2_interface_common.c
index 1993fe7de0973278c63cde20d1f247a174371f9b..660bd91dda8d99d05a8051f0a22724d71fed188a 100644
--- a/openair2/RRC/LTE/L2_interface_common.c
+++ b/openair2/RRC/LTE/L2_interface_common.c
@@ -58,7 +58,7 @@ rrc_data_req(
 {
   if(sdu_sizeP == 255) {
     LOG_I(RRC,"sdu_sizeP == 255");
-    return FALSE;
+    return false;
   }
 
   MessageDef *message_p;
@@ -94,7 +94,7 @@ rrc_data_req(
   if (ctxt_pP->enb_flag && NODE_IS_CU(RC.rrc[ctxt_pP->module_id]->node_type))
     pdcp_run(ctxt_pP);
 
-  return TRUE; // TODO should be changed to a CNF message later, currently RRC lite does not used the returned value anyway.
+  return true; // TODO should be changed to a CNF message later, currently RRC lite does not used the returned value anyway.
 }
 
 //------------------------------------------------------------------------------
diff --git a/openair2/RRC/LTE/L2_interface_ue.c b/openair2/RRC/LTE/L2_interface_ue.c
index 534030864a295a2a59c95366ae448a0d66e5363f..850ecf1b588132179bf79ad30b97bfe708b26bd4 100644
--- a/openair2/RRC/LTE/L2_interface_ue.c
+++ b/openair2/RRC/LTE/L2_interface_ue.c
@@ -298,7 +298,7 @@ rrc_data_req_ue(
       TASK_PDCP_UE,
       ctxt_pP->instance,
       message_p);
-    return TRUE; // TODO should be changed to a CNF message later, currently RRC lite does not used the returned value anyway.
+    return true; // TODO should be changed to a CNF message later, currently RRC lite does not used the returned value anyway.
   }
 }
 
diff --git a/openair2/RRC/LTE/MESSAGES/asn1_msg.c b/openair2/RRC/LTE/MESSAGES/asn1_msg.c
index c34c65b19503fca2515d973575fa97316e062756..e5024e35055a289e9a09c87bddb1383f0508557f 100644
--- a/openair2/RRC/LTE/MESSAGES/asn1_msg.c
+++ b/openair2/RRC/LTE/MESSAGES/asn1_msg.c
@@ -343,7 +343,7 @@ uint8_t do_MIB_SL(const protocol_ctxt_t *const ctxt_pP, const uint8_t eNB_index,
 
   if (in_coverage > 0 ) {
     //in coverage
-    mib_sl->inCoverage_r12 = TRUE;
+    mib_sl->inCoverage_r12 = true;
     mib_sl->sl_Bandwidth_r12 = *UE_rrc_inst[ctxt_pP->module_id].sib2[eNB_index]->freqInfo.ul_Bandwidth;
 
     if (UE_rrc_inst[ctxt_pP->module_id].sib1[eNB_index]->tdd_Config) {
@@ -366,7 +366,7 @@ uint8_t do_MIB_SL(const protocol_ctxt_t *const ctxt_pP, const uint8_t eNB_index,
   } else {
     //Todo - out of coverage for V2X
     // Todo - UE has a selected SyncRef UE
-    mib_sl->inCoverage_r12 = FALSE;
+    mib_sl->inCoverage_r12 = false;
     //set sl-Bandwidth, subframeAssignmentSL and reserved from the pre-configured parameters
   }
 
@@ -989,7 +989,7 @@ uint8_t do_SIB1(rrc_eNB_carrier_data_t *carrier,
   sib1_1250->nonCriticalExtension = NULL;
   ////Rel1310
   if ((configuration->schedulingInfoSIB1_BR_r13[CC_id] != 0) &&
-      (brOption==TRUE)) {
+      (brOption==true)) {
     sib1_1250->nonCriticalExtension = calloc(1, sizeof(LTE_SystemInformationBlockType1_v1310_IEs_t));
     memset(sib1_1250->nonCriticalExtension, 0, sizeof(LTE_SystemInformationBlockType1_v1310_IEs_t));
     LTE_SystemInformationBlockType1_v1310_IEs_t *sib1_1310 = sib1_1250->nonCriticalExtension;
@@ -1279,7 +1279,7 @@ uint8_t do_SIB23(uint8_t Mod_id,
   *sib2 = &sib2_part->choice.sib2;
   *sib3 = &sib3_part->choice.sib3;
 
-  if ((configuration->eMBMS_configured > 0) && (brOption==FALSE)) {
+  if ((configuration->eMBMS_configured > 0) && (brOption==false)) {
     sib13_part = CALLOC(1,sizeof(struct LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member));
     memset(sib13_part,0,sizeof(struct LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member));
     sib13_part->present = LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib13_v920;
@@ -2781,7 +2781,7 @@ do_RRCConnectionSetup(
   mac_MainConfig->ul_SCH_Config->maxHARQ_Tx = maxHARQ_Tx; // max number of UL HARQ transmission
   mac_MainConfig->ul_SCH_Config->periodicBSR_Timer = periodicBSR_Timer;
   mac_MainConfig->ul_SCH_Config->retxBSR_Timer = LTE_RetxBSR_Timer_r12_sf320; // LTE_RetxBSR_Timer_r12_sf5120  // regular BSR timer
-  mac_MainConfig->ul_SCH_Config->ttiBundling = 0; // FALSE
+  mac_MainConfig->ul_SCH_Config->ttiBundling = 0; // false
   //* timeAlignmentTimerDedicated *//
   mac_MainConfig->timeAlignmentTimerDedicated = LTE_TimeAlignmentTimer_infinity;
   //* DRX Config *//
@@ -3135,7 +3135,7 @@ uint8_t do_RRCConnectionSetup_BR(
   //mac_MainConfig->ul_SCH_Config->maxHARQ_Tx = maxHARQ_Tx;
   mac_MainConfig->ul_SCH_Config->periodicBSR_Timer = periodicBSR_Timer;
   mac_MainConfig->ul_SCH_Config->retxBSR_Timer = LTE_RetxBSR_Timer_r12_sf320;
-  mac_MainConfig->ul_SCH_Config->ttiBundling = 0; // FALSE
+  mac_MainConfig->ul_SCH_Config->ttiBundling = 0; // false
   mac_MainConfig->timeAlignmentTimerDedicated = LTE_TimeAlignmentTimer_infinity;
   mac_MainConfig->drx_Config = NULL;
   mac_MainConfig->phr_Config = CALLOC(1, sizeof(*mac_MainConfig->phr_Config));
diff --git a/openair2/RRC/LTE/defs_NB_IoT.h b/openair2/RRC/LTE/defs_NB_IoT.h
index c76bdea53f228cecba6c1ebb807498b893148a19..b98dbe22ccdc64b79682a215570df2684a384ea7 100644
--- a/openair2/RRC/LTE/defs_NB_IoT.h
+++ b/openair2/RRC/LTE/defs_NB_IoT.h
@@ -156,7 +156,7 @@ typedef struct UE_RRC_INFO_NB_IoT_s {
 #define RRC_TRANSACTION_IDENTIFIER_NUMBER  3
 
 typedef struct UE_S_TMSI_NB_IoT_s {
-  boolean_t  presence;
+  bool       presence;
   mme_code_t mme_code;
   m_tmsi_t   m_tmsi;
 } __attribute__ ((__packed__)) UE_S_TMSI_NB_IoT;
diff --git a/openair2/RRC/LTE/rrc_UE.c b/openair2/RRC/LTE/rrc_UE.c
index 9b37853ed2b2ac5503f29632e66e9f88cf3bbf99..577ee3effdf3dc90d3ee696958d451d4f9e74d79 100644
--- a/openair2/RRC/LTE/rrc_UE.c
+++ b/openair2/RRC/LTE/rrc_UE.c
@@ -4351,8 +4351,8 @@ void rrc_ue_generate_nrMeasurementReport(protocol_ctxt_t *const ctxt_pP, uint8_t
         AssertFatal(size >= 0, "do_nrMeasurementReport failed \n");
         LOG_I(RRC, "[UE %d] Frame %d : Generating Measurement Report for eNB %d\n",
               ctxt_pP->module_id, ctxt_pP->frame, eNB_index);
-        int result = pdcp_data_req(ctxt_pP,  SRB_FLAG_YES, DCCH, rrc_mui++, 0, size, buffer, PDCP_TRANSMISSION_MODE_DATA,NULL, NULL);
-        AssertFatal (result == TRUE, "PDCP data request failed!\n");
+        const bool result = pdcp_data_req(ctxt_pP,  SRB_FLAG_YES, DCCH, rrc_mui++, 0, size, buffer, PDCP_TRANSMISSION_MODE_DATA,NULL, NULL);
+        AssertFatal (result == true, "PDCP data request failed!\n");
       }
     }
   }
@@ -4370,7 +4370,6 @@ void rrc_ue_generate_MeasurementReport(protocol_ctxt_t *const ctxt_pP, uint8_t e
   long             nElem, nElem1;
   float            rsrp_filtered, rsrq_filtered;
   static frame_t   pframe=0;
-  int              result;
   nElem = 98;
   nElem1 = 35;
   target_eNB_offset = UE_rrc_inst[ctxt_pP->module_id].Info[0].handoverTarget; // eNB_offset of target eNB: used to obtain the mod_id of target eNB
@@ -4420,8 +4419,8 @@ void rrc_ue_generate_MeasurementReport(protocol_ctxt_t *const ctxt_pP, uint8_t e
         AssertFatal(size >= 0, "do_MeasurementReport failed \n");
         LOG_I(RRC, "[UE %d] Frame %d : Generating Measurement Report for eNB %d. Size is %zu\n",
               ctxt_pP->module_id, ctxt_pP->frame, eNB_index, size);
-        result = pdcp_data_req(ctxt_pP,  SRB_FLAG_YES, DCCH, rrc_mui++, 0, size, buffer, PDCP_TRANSMISSION_MODE_DATA,NULL, NULL);
-        AssertFatal (result == TRUE, "PDCP data request failed!\n");
+        const bool result = pdcp_data_req(ctxt_pP,  SRB_FLAG_YES, DCCH, rrc_mui++, 0, size, buffer, PDCP_TRANSMISSION_MODE_DATA,NULL, NULL);
+        AssertFatal (result == true, "PDCP data request failed!\n");
         //LOG_D(RRC, "[UE %d] Frame %d Sending MeasReport (%d bytes) through DCCH%d to PDCP \n",ue_mod_idP,frameP, size, DCCH);
       }
 
diff --git a/openair2/RRC/LTE/rrc_defs.h b/openair2/RRC/LTE/rrc_defs.h
index 64baf5e2ace04a3687e2df3a0168bcab3c2d3f8a..22c8a14863e69c6b2f4aaf18bcaf857a57db2692 100644
--- a/openair2/RRC/LTE/rrc_defs.h
+++ b/openair2/RRC/LTE/rrc_defs.h
@@ -367,7 +367,7 @@ typedef struct UE_RRC_INFO_s {
 } __attribute__ ((__packed__)) UE_RRC_INFO;
 
 typedef struct UE_S_TMSI_s {
-  boolean_t  presence;
+  bool       presence;
   mme_code_t mme_code;
   m_tmsi_t   m_tmsi;
 } __attribute__ ((__packed__)) UE_S_TMSI;
@@ -931,7 +931,7 @@ typedef struct UE_RRC_INST_s {
 } UE_RRC_INST;
 
 typedef struct UE_PF_PO_s {
-  boolean_t enable_flag;  /* flag indicate whether current object is used */
+  bool      enable_flag;  /* flag indicate whether current object is used */
   uint16_t ue_index_value;  /* UE index value */
   uint8_t PF_min;  /* minimal value of Paging Frame (PF) */
   uint8_t PO;  /* Paging Occasion (PO) */
diff --git a/openair2/RRC/LTE/rrc_eNB.c b/openair2/RRC/LTE/rrc_eNB.c
index ea98d3169d50f6dcebe186bce87546040a4d9fcd..a5d938cdf617aa4a91beeae6158c90642ec560b9 100644
--- a/openair2/RRC/LTE/rrc_eNB.c
+++ b/openair2/RRC/LTE/rrc_eNB.c
@@ -150,7 +150,7 @@ init_SI(
   LTE_SystemInformationBlockType1_v1310_IEs_t *sib1_v13ext=(LTE_SystemInformationBlockType1_v1310_IEs_t *)NULL;
   LOG_D(RRC,"%s()\n\n\n\n",__FUNCTION__);
 
-  if(configuration->radioresourceconfig[CC_id].mbms_dedicated_serving_cell == TRUE) {
+  if(configuration->radioresourceconfig[CC_id].mbms_dedicated_serving_cell == true) {
     LOG_A(RRC, "Configuring MIB FeMBMS (N_RB_DL %d)\n",
           (int)configuration->N_RB_DL[CC_id]);
     RC.rrc[ctxt_pP->module_id]->carrier[CC_id].MIB_FeMBMS = (uint8_t *) malloc16(4);
@@ -266,7 +266,7 @@ init_SI(
     carrier->sizeof_SIB1 = do_SIB1(&rrc->carrier[CC_id],
                                    ctxt_pP->module_id,
                                    CC_id,
-                                   FALSE,
+                                   false,
                                    configuration
                                   );
     AssertFatal(carrier->sizeof_SIB1 != 255,"FATAL, RC.rrc[enb_mod_idP].carrier[CC_id].sizeof_SIB1 == 255");
@@ -276,7 +276,7 @@ init_SI(
       RC.rrc[ctxt_pP->module_id]->carrier[CC_id].SIB1_BR = (uint8_t *) malloc16(32);
       RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sizeof_SIB1_BR = do_SIB1(&RC.rrc[ctxt_pP->module_id]->carrier[CC_id],
           ctxt_pP->module_id,
-          CC_id, TRUE, configuration);
+          CC_id, true, configuration);
     }
   }
 
@@ -285,7 +285,7 @@ init_SI(
     AssertFatal(carrier->SIB23!=NULL,"cannot allocate memory for SIB");
     carrier->sizeof_SIB23 = do_SIB23(ctxt_pP->module_id,
                                      CC_id,
-                                     FALSE,
+                                     false,
                                      configuration
                                     );
     LOG_I(RRC,"do_SIB23, size %d \n ", carrier->sizeof_SIB23);
@@ -295,7 +295,7 @@ init_SI(
     if (configuration->schedulingInfoSIB1_BR_r13[CC_id]>0) {
       carrier->SIB23_BR = (uint8_t *) malloc16(64);
       AssertFatal(carrier->SIB23_BR!=NULL,"cannot allocate memory for SIB");
-      carrier->sizeof_SIB23_BR = do_SIB23(ctxt_pP->module_id, CC_id, TRUE, configuration);
+      carrier->sizeof_SIB23_BR = do_SIB23(ctxt_pP->module_id, CC_id, true, configuration);
     }
 
     LOG_T(RRC, PROTOCOL_RRC_CTXT_FMT" SIB2/3 Contents (partial)\n",
@@ -661,7 +661,7 @@ rrc_eNB_get_next_transaction_identifier(
 ////-----------------------------------------------------------------------------
 //{
 //
-//    boolean_t      reg = FALSE;
+//    bool      reg = false;
 //    module_id_t    i;
 //
 //    AssertFatal(enb_mod_idP < NB_eNB_INST, "eNB index invalid (%d/%d)!", enb_mod_idP, NB_eNB_INST);
@@ -669,12 +669,12 @@ rrc_eNB_get_next_transaction_identifier(
 //    for (i = 0; i < MAX_MOBILES_PER_ENB; i++) {
 //        if (RC.rrc[enb_mod_idP]->Info.UE_info[i] == UE_identity) {
 //            // UE_identity already registered
-//            reg = TRUE;
+//            reg = true;
 //            break;
 //        }
 //    }
 //
-//    if (reg == FALSE) {
+//    if (reg == false) {
 //        return (UE_MODULE_INVALID);
 //    } else
 //        return (i);
@@ -713,7 +713,7 @@ rrc_eNB_ue_context_stmsi_exist(
           m_tmsiP, mme_codeP, ue_context_p,
           ue_context_p->ue_context.rnti);
 
-    if (ue_context_p->ue_context.Initialue_identity_s_TMSI.presence == TRUE) {
+    if (ue_context_p->ue_context.Initialue_identity_s_TMSI.presence == true) {
       printf("=> S-TMSI %x, MME %x\n",
              ue_context_p->ue_context.Initialue_identity_s_TMSI.m_tmsi,
              ue_context_p->ue_context.Initialue_identity_s_TMSI.mme_code);
@@ -986,7 +986,7 @@ void remove_UE_from_freelist(module_id_t mod_id, rnti_t rnti) {
   pthread_mutex_unlock(&lock_ue_freelist);
 }
 
-void put_UE_in_freelist(module_id_t mod_id, rnti_t rnti, boolean_t removeFlag) {
+void put_UE_in_freelist(module_id_t mod_id, rnti_t rnti, bool removeFlag) {
   UE_free_list_t                           *free_list = NULL;
   eNB_MAC_INST                             *eNB_MAC = RC.mac[mod_id];
   pthread_mutex_lock(&lock_ue_freelist);
@@ -1013,7 +1013,7 @@ void release_UE_in_freeList(module_id_t mod_id) {
   PHY_VARS_eNB                             *eNB_PHY = NULL;
   struct rrc_eNB_ue_context_s              *ue_context_pP = NULL;
   eNB_MAC_INST                             *eNB_MAC = RC.mac[mod_id];
-  boolean_t                                 remove_UEContext;
+  bool                                      remove_UEContext;
   rnti_t                                    rnti;
   int                                       head, tail, ue_num;
   pthread_mutex_lock(&lock_ue_freelist);
@@ -1678,7 +1678,7 @@ rrc_eNB_process_RRCConnectionReestablishmentComplete(
   ue_context_pP->ue_context.rnti               = ctxt_pP->rnti;
 
   if (EPC_MODE_ENABLED) {
-    uint8_t send_security_mode_command = FALSE;
+    uint8_t send_security_mode_command = false;
     rrc_pdcp_config_security(
       ctxt_pP,
       ue_context_pP,
@@ -2332,7 +2332,7 @@ rrc_eNB_generate_dedicatedRRCConnectionReconfiguration(const protocol_ctxt_t *co
         // PDCP
         PDCP_rlc_AM = CALLOC(1, sizeof(*PDCP_rlc_AM));
         DRB_pdcp_config->rlc_AM = PDCP_rlc_AM;
-        PDCP_rlc_AM->statusReportRequired = FALSE;
+        PDCP_rlc_AM->statusReportRequired = false;
         break;
 
       default :
@@ -2590,7 +2590,7 @@ rrc_eNB_modify_dedicatedRRCConnectionReconfiguration(const protocol_ctxt_t *cons
 
         PDCP_rlc_AM = CALLOC(1, sizeof(*PDCP_rlc_AM));
         DRB_pdcp_config->rlc_AM = PDCP_rlc_AM;
-        PDCP_rlc_AM->statusReportRequired = FALSE;
+        PDCP_rlc_AM->statusReportRequired = false;
         break;
 
       default :
@@ -2951,7 +2951,7 @@ void rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t
 #ifdef RRC_DEFAULT_RAB_IS_AM // EXMIMO_IOT
   PDCP_rlc_AM = CALLOC(1, sizeof(*PDCP_rlc_AM));
   DRB_pdcp_config->rlc_AM = PDCP_rlc_AM;
-  PDCP_rlc_AM->statusReportRequired = FALSE;
+  PDCP_rlc_AM->statusReportRequired = false;
 #else
   PDCP_rlc_UM = CALLOC(1, sizeof(*PDCP_rlc_UM));
   DRB_pdcp_config->rlc_UM = PDCP_rlc_UM;
@@ -3347,7 +3347,7 @@ void rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t
     ReportConfig_NR->reportConfig.choice.reportConfigInterRAT.triggerType.choice.event.eventId.present = LTE_ReportConfigInterRAT__triggerType__event__eventId_PR_eventB1_NR_r15;
     ReportConfig_NR->reportConfig.choice.reportConfigInterRAT.triggerType.choice.event.eventId.choice.eventB1_NR_r15.b1_ThresholdNR_r15.present = LTE_ThresholdNR_r15_PR_nr_RSRP_r15;
     ReportConfig_NR->reportConfig.choice.reportConfigInterRAT.triggerType.choice.event.eventId.choice.eventB1_NR_r15.b1_ThresholdNR_r15.choice.nr_RSRP_r15 = 0;
-    ReportConfig_NR->reportConfig.choice.reportConfigInterRAT.triggerType.choice.event.eventId.choice.eventB1_NR_r15.reportOnLeave_r15 = FALSE;
+    ReportConfig_NR->reportConfig.choice.reportConfigInterRAT.triggerType.choice.event.eventId.choice.eventB1_NR_r15.reportOnLeave_r15 = false;
     ReportConfig_NR->reportConfig.choice.reportConfigInterRAT.triggerType.choice.event.hysteresis = 2;
     ReportConfig_NR->reportConfig.choice.reportConfigInterRAT.triggerType.choice.event.timeToTrigger = LTE_TimeToTrigger_ms80;
     ReportConfig_NR->reportConfig.choice.reportConfigInterRAT.maxReportCells = 4;
@@ -3361,9 +3361,9 @@ void rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t
 
     if (ReportConfig_NR->reportConfig.choice.reportConfigInterRAT.ext7->reportQuantityCellNR_r15 == NULL) exit(1);
 
-    ReportConfig_NR->reportConfig.choice.reportConfigInterRAT.ext7->reportQuantityCellNR_r15->ss_rsrp = TRUE;
-    ReportConfig_NR->reportConfig.choice.reportConfigInterRAT.ext7->reportQuantityCellNR_r15->ss_rsrq = TRUE;
-    ReportConfig_NR->reportConfig.choice.reportConfigInterRAT.ext7->reportQuantityCellNR_r15->ss_sinr = TRUE;
+    ReportConfig_NR->reportConfig.choice.reportConfigInterRAT.ext7->reportQuantityCellNR_r15->ss_rsrp = true;
+    ReportConfig_NR->reportConfig.choice.reportConfigInterRAT.ext7->reportQuantityCellNR_r15->ss_rsrq = true;
+    ReportConfig_NR->reportConfig.choice.reportConfigInterRAT.ext7->reportQuantityCellNR_r15->ss_sinr = true;
     ASN_SEQUENCE_ADD(&ReportConfig_list->list, ReportConfig_NR);
     LOG_A(RRC, "Generating RRCCConnectionReconfigurationRequest (NRUE Measurement Report Request).\n");
   }
@@ -3714,7 +3714,7 @@ flexran_rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt
 #ifdef RRC_DEFAULT_RAB_IS_AM // EXMIMO_IOT
   PDCP_rlc_AM = CALLOC(1, sizeof(*PDCP_rlc_AM));
   DRB_pdcp_config->rlc_AM = PDCP_rlc_AM;
-  PDCP_rlc_AM->statusReportRequired = FALSE;
+  PDCP_rlc_AM->statusReportRequired = 0; // FALSE
 #else
   PDCP_rlc_UM = CALLOC(1, sizeof(*PDCP_rlc_UM));
   DRB_pdcp_config->rlc_UM = PDCP_rlc_UM;
@@ -5052,7 +5052,7 @@ check_handovers(
         && ue_context_p->ue_context.handover_info != NULL &&
         ue_context_p->ue_context.handover_info->forwarding_state == FORWARDING_NO_EMPTY ) {
       MessageDef   *msg_p;
-      int    result;
+      bool result;
       protocol_ctxt_t  ctxt;
 
       do {
@@ -5090,7 +5090,7 @@ check_handovers(
                                       GTPV1U_ENB_DATA_FORWARDING_IND (msg_p).mode, NULL, NULL
                                      );
 
-              if (result != TRUE) {
+              if (result != true) {
                 LOG_E(RRC, "target enb send data forwarding buffer to PDCP request failed!\n");
               } else {
                 LOG_D(RRC, "target enb send data forwarding buffer to PDCP!\n");
@@ -5158,7 +5158,7 @@ check_handovers(
                                       GTPV1U_ENB_END_MARKER_IND (msg_p).mode, NULL, NULL
                                      );
 
-              if (result != TRUE) {
+              if (result != true) {
                 LOG_E(RRC, "target enb send spgw buffer to PDCP request failed!\n");
               } else {
                 LOG_D(RRC, "target enb send spgw buffer to PDCP!\n");
@@ -5390,7 +5390,7 @@ rrc_eNB_generate_HO_RRCConnectionReconfiguration(const protocol_ctxt_t *const ct
 #ifdef RRC_DEFAULT_RAB_IS_AM // EXMIMO_IOT
   PDCP_rlc_AM = CALLOC(1, sizeof(*PDCP_rlc_AM));
   DRB_pdcp_config->rlc_AM = PDCP_rlc_AM;
-  PDCP_rlc_AM->statusReportRequired = FALSE;
+  PDCP_rlc_AM->statusReportRequired = 0; // FALSE
 #else
   PDCP_rlc_UM = CALLOC(1, sizeof(*PDCP_rlc_UM));
   DRB_pdcp_config->rlc_UM = PDCP_rlc_UM;
@@ -6280,10 +6280,7 @@ rrc_eNB_configure_rbs_handover(struct rrc_eNB_ue_context_s *ue_context_p, protoc
       ctxt_pP,
       ue_context_p,
       ue_context_p->ue_context.kenb);
-    rrc_pdcp_config_security(
-      ctxt_pP,
-      ue_context_p,
-      FALSE);
+    rrc_pdcp_config_security(ctxt_pP, ue_context_p, false);
   }
 
   // Add a new user (called during the HO procedure)
@@ -6361,9 +6358,9 @@ rrc_eNB_process_RRCConnectionReconfigurationComplete(
 
     UE_sched_ctrl_t *UE_scheduling_control = &(RC.mac[module_id]->UE_info.UE_sched_ctrl[UE_id_mac]);
 
-    if (UE_scheduling_control->cdrx_waiting_ack == TRUE) {
-      UE_scheduling_control->cdrx_waiting_ack = FALSE;
-      UE_scheduling_control->cdrx_configured = TRUE; // Set to TRUE when RRC Connection Reconfiguration is received
+    if (UE_scheduling_control->cdrx_waiting_ack == true) {
+      UE_scheduling_control->cdrx_waiting_ack = false;
+      UE_scheduling_control->cdrx_configured = true; // Set to TRUE when RRC Connection Reconfiguration is received
       LOG_I(RRC, "CDRX configuration activated after RRC Connection Reconfiguration Complete reception\n");
     }
   }
@@ -6627,7 +6624,7 @@ rrc_eNB_generate_RRCConnectionSetup(
 )
 //-----------------------------------------------------------------------------
 {
-  boolean_t is_mtc = ctxt_pP->brOption;
+  bool is_mtc = ctxt_pP->brOption;
   LTE_LogicalChannelConfig_t             *SRB1_logicalChannelConfig;  //,*SRB2_logicalChannelConfig;
   LTE_SRB_ToAddModList_t                **SRB_configList;
   LTE_SRB_ToAddMod_t                     *SRB1_config;
@@ -7284,7 +7281,7 @@ rrc_eNB_decode_ccch(
                   LOG_E(RRC, "%s:%d:%s: rrc_eNB_get_next_free_ue_context returned NULL\n", __FILE__, __LINE__, __FUNCTION__);
 
                 if (ue_context_p != NULL) {
-                  ue_context_p->ue_context.Initialue_identity_s_TMSI.presence = TRUE;
+                  ue_context_p->ue_context.Initialue_identity_s_TMSI.presence = true;
                   ue_context_p->ue_context.Initialue_identity_s_TMSI.mme_code = mme_code;
                   ue_context_p->ue_context.Initialue_identity_s_TMSI.m_tmsi = m_tmsi;
                 } else {
@@ -8766,7 +8763,7 @@ void rrc_subframe_process(protocol_ctxt_t *const ctxt_pP, const int CC_id) {
 
     if ((ctxt_pP->frame&127) == 0 && ctxt_pP->subframe ==0) {
       if (fd) {
-        if (ue_context_p->ue_context.Initialue_identity_s_TMSI.presence == TRUE) {
+        if (ue_context_p->ue_context.Initialue_identity_s_TMSI.presence == true) {
           fprintf(fd,"RRC UE rnti %x: S-TMSI %x failure timer %d/8\n",
                 ue_context_p->ue_context.rnti,
                 ue_context_p->ue_context.Initialue_identity_s_TMSI.m_tmsi,
diff --git a/openair2/RRC/LTE/rrc_eNB_GTPV1U.c b/openair2/RRC/LTE/rrc_eNB_GTPV1U.c
index 575a38ee3d9ddf56102f35fad5a74a3b96b0598f..64b5594dd9e100343c681b747c910d14969747fa 100644
--- a/openair2/RRC/LTE/rrc_eNB_GTPV1U.c
+++ b/openair2/RRC/LTE/rrc_eNB_GTPV1U.c
@@ -84,23 +84,20 @@ rrc_eNB_process_GTPV1U_CREATE_TUNNEL_RESP(
 }
 
 //------------------------------------------------------------------------------
-boolean_t
-gtpv_data_req(
-  const protocol_ctxt_t*   const ctxt_pP,
-  const rb_id_t                  rb_idP,
-  const mui_t                    muiP,
-  const confirm_t                confirmP,
-  const sdu_size_t               sdu_sizeP,
-  uint8_t*                 const buffer_pP,
-  const pdcp_transmission_mode_t modeP,
-  uint32_t task_id
-)
+bool gtpv_data_req(const protocol_ctxt_t*   const ctxt_pP,
+                   const rb_id_t                  rb_idP,
+                   const mui_t                    muiP,
+                   const confirm_t                confirmP,
+                   const sdu_size_t               sdu_sizeP,
+                   uint8_t*                 const buffer_pP,
+                   const pdcp_transmission_mode_t modeP,
+                   uint32_t task_id)
 //------------------------------------------------------------------------------
 {
   if(sdu_sizeP == 0)
   {
     LOG_I(GTPU,"gtpv_data_req sdu_sizeP == 0");
-    return FALSE;
+    return false;
   }
   LOG_D(GTPU,"gtpv_data_req ue rnti %x sdu_sizeP %d rb id %ld", ctxt_pP->rnti, sdu_sizeP, rb_idP);
   MessageDef *message_p;
@@ -129,7 +126,7 @@ gtpv_data_req(
     GTPV1U_ENB_DATA_FORWARDING_IND (message_p).eNB_index = ctxt_pP->eNB_index;
     
     itti_send_msg_to_task (TASK_DATA_FORWARDING, ctxt_pP->instance, message_p);
-    return TRUE; // TODO should be changed to a CNF message later, currently RRC lite does not used the returned value anyway.
+    return true; // TODO should be changed to a CNF message later, currently RRC lite does not used the returned value anyway.
   } else if (task_id == TASK_END_MARKER){
     
     LOG_I(GTPU,"gtpv_data_req task_id = TASK_END_MARKER\n");
@@ -152,23 +149,22 @@ gtpv_data_req(
     GTPV1U_ENB_END_MARKER_IND (message_p).eNB_index = ctxt_pP->eNB_index;
     
     itti_send_msg_to_task (TASK_END_MARKER, ctxt_pP->instance, message_p);
-    return TRUE; // TODO should be changed to a CNF message later, currently RRC lite does not used the returned value anyway.
+    return true; // TODO should be changed to a CNF message later, currently RRC lite does not used the returned value anyway.
   }
   LOG_E(RRC, "Impossible state\n");
-  return FALSE;
+  return false;
 }
 
-boolean_t gtpv_data_req_new (
-  protocol_ctxt_t  *ctxt,
-  const srb_flag_t     srb_flagP,
-  const rb_id_t        rb_idP,
-  const mui_t          muiP,
-  const confirm_t      confirmP,
-  const sdu_size_t     sdu_buffer_sizeP,
-  unsigned char *const sdu_buffer_pP,
-  const pdcp_transmission_mode_t modeP,
-  const uint32_t *sourceL2Id,
-  const uint32_t *destinationL2Id) {
+bool gtpv_data_req_new(protocol_ctxt_t  *ctxt,
+                       const srb_flag_t     srb_flagP,
+                       const rb_id_t        rb_idP,
+                       const mui_t          muiP,
+                       const confirm_t      confirmP,
+                       const sdu_size_t     sdu_buffer_sizeP,
+                       unsigned char *const sdu_buffer_pP,
+                       const pdcp_transmission_mode_t modeP,
+                       const uint32_t *sourceL2Id,
+                       const uint32_t *destinationL2Id) {
   int task;
 
   if (sdu_buffer_sizeP==0)
diff --git a/openair2/RRC/LTE/rrc_eNB_GTPV1U.h b/openair2/RRC/LTE/rrc_eNB_GTPV1U.h
index ab789099caeee90bee21c38ce0e9eea9c6160cb9..f991cbd5f62bb46f3c4da73c93de2cc5db80a8ec 100644
--- a/openair2/RRC/LTE/rrc_eNB_GTPV1U.h
+++ b/openair2/RRC/LTE/rrc_eNB_GTPV1U.h
@@ -60,16 +60,13 @@ void rrc_eNB_send_GTPV1U_ENB_DELETE_TUNNEL_REQ(
   rrc_eNB_ue_context_t* ue_context_pP
 );
 
-boolean_t
-gtpv_data_req(
-  const protocol_ctxt_t*   const ctxt_pP,
-  const rb_id_t                  rb_idP,
-  const mui_t                    muiP,
-  const confirm_t                confirmP,
-  const sdu_size_t               sdu_sizeP,
-  uint8_t*                 const buffer_pP,
-  const pdcp_transmission_mode_t modeP,
-  uint32_t task_id
-);
+bool gtpv_data_req(const protocol_ctxt_t*   const ctxt_pP,
+                   const rb_id_t                  rb_idP,
+                   const mui_t                    muiP,
+                   const confirm_t                confirmP,
+                   const sdu_size_t               sdu_sizeP,
+                   uint8_t*                 const buffer_pP,
+                   const pdcp_transmission_mode_t modeP,
+                   uint32_t task_id);
 
 #endif /* RRC_ENB_GTPV1U_H_ */
diff --git a/openair2/RRC/LTE/rrc_eNB_S1AP.c b/openair2/RRC/LTE/rrc_eNB_S1AP.c
index f24c9ab1b616df1c3cf5d781c4feb515c435ffbf..aefbc0183157fb5189a834f830f8e42b8f34d1ac 100644
--- a/openair2/RRC/LTE/rrc_eNB_S1AP.c
+++ b/openair2/RRC/LTE/rrc_eNB_S1AP.c
@@ -402,15 +402,13 @@ static e_LTE_SecurityAlgorithmConfig__integrityProtAlgorithm rrc_eNB_select_inte
  *\param mod_id Instance ID of eNB.
  *\param ue_index Instance ID of UE in the eNB.
  *\param security_capabilities The security capabilities received from S1AP.
- *\return TRUE if at least one algorithm has been changed else FALSE.
+ *\return true if at least one algorithm has been changed else false.
  */
 int
-rrc_eNB_process_security(
-  const protocol_ctxt_t *const ctxt_pP,
-  rrc_eNB_ue_context_t *const ue_context_pP,
-  security_capabilities_t *security_capabilities_pP
-) {
-  boolean_t                                             changed = FALSE;
+rrc_eNB_process_security(const protocol_ctxt_t *const ctxt_pP,
+                         rrc_eNB_ue_context_t *const ue_context_pP,
+                         security_capabilities_t *security_capabilities_pP) {
+  bool                                                  changed = false;
   LTE_CipheringAlgorithm_r12_t                          cipheringAlgorithm;
   e_LTE_SecurityAlgorithmConfig__integrityProtAlgorithm integrityProtAlgorithm;
   /* Save security parameters */
@@ -428,14 +426,14 @@ rrc_eNB_process_security(
 
   if (ue_context_pP->ue_context.ciphering_algorithm != cipheringAlgorithm) {
     ue_context_pP->ue_context.ciphering_algorithm = cipheringAlgorithm;
-    changed = TRUE;
+    changed = true;
   }
 
   integrityProtAlgorithm = rrc_eNB_select_integrity (ue_context_pP->ue_context.security_capabilities.integrity_algorithms);
 
   if (ue_context_pP->ue_context.integrity_algorithm != integrityProtAlgorithm) {
     ue_context_pP->ue_context.integrity_algorithm = integrityProtAlgorithm;
-    changed = TRUE;
+    changed = true;
   }
 
   LOG_I (RRC, "[eNB %d][UE %x] Selected security algorithms (%p): %lx, %x, %s\n",
@@ -532,7 +530,7 @@ rrc_pdcp_config_security(
       pdcp_p,
       DCCH,
       DCCH+2,
-      (send_security_mode_command == TRUE)  ?
+      (send_security_mode_command == true)  ?
       0 | (ue_context_pP->ue_context.integrity_algorithm << 4) :
       (ue_context_pP->ue_context.ciphering_algorithm )         |
       (ue_context_pP->ue_context.integrity_algorithm << 4),
@@ -960,12 +958,12 @@ int rrc_eNB_process_S1AP_INITIAL_CONTEXT_SETUP_REQ(MessageDef *msg_p, const char
       ue_context_p,
       S1AP_INITIAL_CONTEXT_SETUP_REQ(msg_p).security_key);
     {
-      uint8_t send_security_mode_command = TRUE;
+      uint8_t send_security_mode_command = true;
 #ifndef EXMIMO_IOT
 
       if ((ue_context_p->ue_context.ciphering_algorithm == SecurityAlgorithmConfig__cipheringAlgorithm_eea0)
           && (ue_context_p->ue_context.integrity_algorithm == INTEGRITY_ALGORITHM_NONE)) {
-        send_security_mode_command = FALSE;
+        send_security_mode_command = false;
       }
 
 #endif
@@ -978,7 +976,7 @@ int rrc_eNB_process_S1AP_INITIAL_CONTEXT_SETUP_REQ(MessageDef *msg_p, const char
         rrc_eNB_generate_SecurityModeCommand (
           &ctxt,
           ue_context_p);
-        send_security_mode_command = FALSE;
+        send_security_mode_command = false;
         // apply ciphering after RRC security command mode
         rrc_pdcp_config_security(
           &ctxt,
@@ -1414,19 +1412,19 @@ int rrc_eNB_process_S1AP_E_RAB_MODIFY_REQ(MessageDef *msg_p, const char *msg_nam
     /* Save e RAB information for later */
     {
       int j;
-      boolean_t is_treated[S1AP_MAX_E_RAB] = {FALSE};
+      bool is_treated[S1AP_MAX_E_RAB] = {false};
       uint8_t nb_of_failed_e_rabs = 0;
 
       // keep the previous bearer
       // the index for the rec
       for (i = 0; i < S1AP_E_RAB_MODIFY_REQ (msg_p).nb_e_rabs_tomodify; i++) {
-        if (is_treated[i] == TRUE) {
+        if (is_treated[i] == true) {
           // already treated
           continue;
         }
 
         for (j = i+1; j < S1AP_E_RAB_MODIFY_REQ (msg_p).nb_e_rabs_tomodify; j++) {
-          if (is_treated[j] == FALSE &&
+          if (is_treated[j] == false &&
               S1AP_E_RAB_MODIFY_REQ(msg_p).e_rab_modify_params[j].e_rab_id == S1AP_E_RAB_MODIFY_REQ(msg_p).e_rab_modify_params[i].e_rab_id) {
             // handle multiple E-RAB ID
             ue_context_p->ue_context.modify_e_rab[j].status = E_RAB_STATUS_NEW;
@@ -1434,12 +1432,12 @@ int rrc_eNB_process_S1AP_E_RAB_MODIFY_REQ(MessageDef *msg_p, const char *msg_nam
             ue_context_p->ue_context.modify_e_rab[j].cause = S1AP_CAUSE_RADIO_NETWORK;
             ue_context_p->ue_context.modify_e_rab[j].cause_value = 31;//S1ap_CauseRadioNetwork_multiple_E_RAB_ID_instances;
             nb_of_failed_e_rabs++;
-            is_treated[i] = TRUE;
-            is_treated[j] = TRUE;
+            is_treated[i] = true;
+            is_treated[j] = true;
           }
         }
 
-        if (is_treated[i] == TRUE) {
+        if (is_treated[i] == true) {
           // handle multiple E-RAB ID
           ue_context_p->ue_context.modify_e_rab[i].status = E_RAB_STATUS_NEW;
           ue_context_p->ue_context.modify_e_rab[i].param.e_rab_id = S1AP_E_RAB_MODIFY_REQ(msg_p).e_rab_modify_params[i].e_rab_id;
@@ -1456,7 +1454,7 @@ int rrc_eNB_process_S1AP_E_RAB_MODIFY_REQ(MessageDef *msg_p, const char *msg_nam
           ue_context_p->ue_context.modify_e_rab[i].cause = S1AP_CAUSE_NAS;
           ue_context_p->ue_context.modify_e_rab[i].cause_value = 3;//S1ap_CauseNas_unspecified;
           nb_of_failed_e_rabs++;
-          is_treated[i] = TRUE;
+          is_treated[i] = true;
           continue;
         }
 
@@ -1474,19 +1472,19 @@ int rrc_eNB_process_S1AP_E_RAB_MODIFY_REQ(MessageDef *msg_p, const char *msg_nam
             ue_context_p->ue_context.modify_e_rab[i].param.nas_pdu.buffer = S1AP_E_RAB_MODIFY_REQ(msg_p).e_rab_modify_params[i].nas_pdu.buffer;
             ue_context_p->ue_context.modify_e_rab[i].param.sgw_addr = ue_context_p->ue_context.e_rab[j].param.sgw_addr;
             ue_context_p->ue_context.modify_e_rab[i].param.gtp_teid = ue_context_p->ue_context.e_rab[j].param.gtp_teid;
-            is_treated[i] = TRUE;
+            is_treated[i] = true;
             break;
           }
         }
 
-        if (is_treated[i] == FALSE) {
+        if (is_treated[i] == false) {
           // handle Unknown E-RAB ID
           ue_context_p->ue_context.modify_e_rab[i].status = E_RAB_STATUS_NEW;
           ue_context_p->ue_context.modify_e_rab[i].param.e_rab_id = S1AP_E_RAB_MODIFY_REQ(msg_p).e_rab_modify_params[i].e_rab_id;
           ue_context_p->ue_context.modify_e_rab[i].cause = S1AP_CAUSE_RADIO_NETWORK;
           ue_context_p->ue_context.modify_e_rab[i].cause_value = 30;//S1ap_CauseRadioNetwork_unknown_E_RAB_ID;
           nb_of_failed_e_rabs++;
-          is_treated[i] = TRUE;
+          is_treated[i] = true;
         }
       }
 
@@ -1824,8 +1822,8 @@ int rrc_eNB_process_PAGING_IND(MessageDef *msg_p, const char *msg_name, instance
           uint8_t i = 0;
 
           for (i = 0; i < MAX_MOBILES_PER_ENB; i++) {
-            if ((UE_PF_PO[CC_id][i].enable_flag == TRUE && UE_PF_PO[CC_id][i].ue_index_value == (uint16_t)(S1AP_PAGING_IND(msg_p).ue_index_value))
-                || (UE_PF_PO[CC_id][i].enable_flag != TRUE)) {
+            if ((UE_PF_PO[CC_id][i].enable_flag == true && UE_PF_PO[CC_id][i].ue_index_value == (uint16_t)(S1AP_PAGING_IND(msg_p).ue_index_value))
+                || (UE_PF_PO[CC_id][i].enable_flag != true)) {
               /* set T = min(Tc,Tue) */
               UE_PF_PO[CC_id][i].T = T;
               /* set UE_ID */
@@ -1845,12 +1843,12 @@ int rrc_eNB_process_PAGING_IND(MessageDef *msg_p, const char *msg_name, instance
                 UE_PF_PO[CC_id][i].PO = (frame_type==FDD) ? (4*(i_s&1)+(5*(i_s>>1))) : ((i_s&1)+(5*(i_s>>1)));
               }
 
-              if (UE_PF_PO[CC_id][i].enable_flag == TRUE) {
+              if (UE_PF_PO[CC_id][i].enable_flag == true) {
                 //paging exist UE log
                 LOG_D(RRC,"[eNB %ld] CC_id %d In S1AP_PAGING_IND: Update exist UE %d, T %d, PF %d, PO %d\n", instance, CC_id, UE_PF_PO[CC_id][i].ue_index_value, T, UE_PF_PO[CC_id][i].PF_min, UE_PF_PO[CC_id][i].PO);
               } else {
                 /* set enable_flag */
-                UE_PF_PO[CC_id][i].enable_flag = TRUE;
+                UE_PF_PO[CC_id][i].enable_flag = true;
                 //paging new UE log
                 LOG_D(RRC,"[eNB %ld] CC_id %d In S1AP_PAGING_IND: Insert a new UE %d, T %d, PF %d, PO %d\n", instance, CC_id, UE_PF_PO[CC_id][i].ue_index_value, T, UE_PF_PO[CC_id][i].PF_min, UE_PF_PO[CC_id][i].PO);
               }
diff --git a/openair2/RRC/LTE/rrc_proto.h b/openair2/RRC/LTE/rrc_proto.h
index f0456005f5270a5a073aabe8134c87243d758e3e..7bd3fbf758c7f0d3f2d92f0d51c3a743c569a13d 100644
--- a/openair2/RRC/LTE/rrc_proto.h
+++ b/openair2/RRC/LTE/rrc_proto.h
@@ -457,7 +457,7 @@ mac_rrc_data_ind(
   const uint8_t        *sduP,
   const sdu_size_t      sdu_lenP,
   const uint8_t         mbsfn_sync_areaP,
-  const boolean_t   brOption
+  const bool            brOption
 );
 
 int8_t
@@ -685,7 +685,7 @@ extern RRC_release_list_t   rrc_release_info;
 extern pthread_mutex_t      lock_ue_freelist;
 
 void remove_UE_from_freelist(module_id_t mod_id, rnti_t rnti);
-void put_UE_in_freelist(module_id_t mod_id, rnti_t rnti, boolean_t removeFlag);
+void put_UE_in_freelist(module_id_t mod_id, rnti_t rnti, bool removeFlag);
 void release_UE_in_freeList(module_id_t mod_id);
 
 /** @}*/
diff --git a/openair2/RRC/NR/L2_nr_interface.c b/openair2/RRC/NR/L2_nr_interface.c
index 161d1cd847495ed416e1a40d19f28c046c126e32..6fc0566cbd533261d93f19b7ff1092c72afb8c82 100644
--- a/openair2/RRC/NR/L2_nr_interface.c
+++ b/openair2/RRC/NR/L2_nr_interface.c
@@ -168,7 +168,7 @@ nr_rrc_data_req(
 {
   if(sdu_sizeP == 255) {
     LOG_D(RRC,"sdu_sizeP == 255");
-    return FALSE;
+    return false;
   }
 
   MessageDef *message_p;
@@ -204,7 +204,7 @@ nr_rrc_data_req(
   if (ctxt_pP->enb_flag && NODE_IS_CU(RC.nrrrc[ctxt_pP->module_id]->node_type))
     pdcp_run(ctxt_pP);
 
-  return TRUE; // TODO should be changed to a CNF message later, currently RRC lite does not used the returned value anyway.
+  return true; // TODO should be changed to a CNF message later, currently RRC lite does not used the returned value anyway.
 }
 
 uint16_t mac_rrc_nr_data_req(const module_id_t Mod_idP,
@@ -315,7 +315,7 @@ int8_t nr_mac_rrc_data_ind(const module_id_t     module_idP,
                            const rb_id_t         srb_idP,
                            const uint8_t        *sduP,
                            const sdu_size_t      sdu_lenP,
-                           const boolean_t   brOption) {
+                           const bool            brOption) {
 
   if (NODE_IS_DU(RC.nrrrc[module_idP]->node_type)) {
     LOG_W(RRC,"[DU %d][RAPROC] Received SDU for CCCH on SRB %ld length %d for UE id %d RNTI %x \n",
diff --git a/openair2/RRC/NR/nr_rrc_defs.h b/openair2/RRC/NR/nr_rrc_defs.h
index 3488080f27318ab16185c1c404f178ff4e9d63e4..1b322ed92532005ab506382d9db044a352dd8705 100644
--- a/openair2/RRC/NR/nr_rrc_defs.h
+++ b/openair2/RRC/NR/nr_rrc_defs.h
@@ -173,7 +173,7 @@ typedef struct UE_RRC_INFO_NR_s {
 } __attribute__ ((__packed__)) NR_UE_RRC_INFO;
 
 typedef struct UE_S_TMSI_NR_s {
-  boolean_t                                           presence;
+  bool                                                presence;
   uint16_t                                            amf_set_id;
   uint8_t                                             amf_pointer;
   uint32_t                                            fiveg_tmsi;
diff --git a/openair2/RRC/NR/nr_rrc_proto.h b/openair2/RRC/NR/nr_rrc_proto.h
index d569b91aa8684feac9130c6b6f07f84005a81cbb..dc6e14215ff24f44665270fa010cca04b885dfee 100644
--- a/openair2/RRC/NR/nr_rrc_proto.h
+++ b/openair2/RRC/NR/nr_rrc_proto.h
@@ -174,18 +174,16 @@ int8_t nr_mac_rrc_bwp_switch_req(const module_id_t     module_idP,
                                  const int             dl_bwp_id,
                                  const int             ul_bwp_id);
 
-int8_t nr_mac_rrc_data_ind(
-    const module_id_t     module_idP,
-    const int             CC_id,
-    const frame_t         frameP,
-    const sub_frame_t     sub_frameP,
-    const int             UE_id,
-    const rnti_t          rntiP,
-    const rb_id_t         srb_idP,
-    const uint8_t        *sduP,
-    const sdu_size_t      sdu_lenP,
-    const boolean_t   brOption
-);
+int8_t nr_mac_rrc_data_ind(const module_id_t     module_idP,
+                           const int             CC_id,
+                           const frame_t         frameP,
+                           const sub_frame_t     sub_frameP,
+                           const int             UE_id,
+                           const rnti_t          rntiP,
+                           const rb_id_t         srb_idP,
+                           const uint8_t        *sduP,
+                           const sdu_size_t      sdu_lenP,
+                           const bool            brOption);
 
 int nr_rrc_reconfiguration_req(rrc_gNB_ue_context_t         *const ue_context_pP,
                                protocol_ctxt_t              *const ctxt_pP,
@@ -219,16 +217,15 @@ rlc_op_status_t nr_rrc_rlc_config_asn1_req (const protocol_ctxt_t   * const ctxt
     const LTE_PMCH_InfoList_r9_t * const pmch_InfoList_r9_pP,
     struct NR_CellGroupConfig__rlc_BearerToAddModList *rlc_bearer2add_list);
 
-boolean_t nr_rrc_pdcp_config_asn1_req(
-  const protocol_ctxt_t *const  ctxt_pP,
-  NR_SRB_ToAddModList_t  *const srb2add_list,
-  NR_DRB_ToAddModList_t  *const drb2add_list,
-  NR_DRB_ToReleaseList_t *const drb2release_list,
-  const uint8_t                   security_modeP,
-  uint8_t                  *const kRRCenc,
-  uint8_t                  *const kRRCint,
-  uint8_t                  *const kUPenc,
-  uint8_t                  *const kUPint
-  ,LTE_PMCH_InfoList_r9_t  *pmch_InfoList_r9
-  ,rb_id_t                 *const defaultDRB,
-  struct NR_CellGroupConfig__rlc_BearerToAddModList *rlc_bearer2add_list);
+bool nr_rrc_pdcp_config_asn1_req(const protocol_ctxt_t *const  ctxt_pP,
+                                 NR_SRB_ToAddModList_t  *const srb2add_list,
+                                 NR_DRB_ToAddModList_t  *const drb2add_list,
+                                 NR_DRB_ToReleaseList_t *const drb2release_list,
+                                 const uint8_t                   security_modeP,
+                                 uint8_t                  *const kRRCenc,
+                                 uint8_t                  *const kRRCint,
+                                 uint8_t                  *const kUPenc,
+                                 uint8_t                  *const kUPint,
+                                 LTE_PMCH_InfoList_r9_t   *pmch_InfoList_r9,
+                                 rb_id_t                  *const defaultDRB,
+                                 struct NR_CellGroupConfig__rlc_BearerToAddModList *rlc_bearer2add_list);
diff --git a/openair2/RRC/NR/rrc_gNB.c b/openair2/RRC/NR/rrc_gNB.c
index 3d9508133681cd81f962b29e97171a95fee455c8..43082003df36dd62ff3123844aeec13e786f620d 100755
--- a/openair2/RRC/NR/rrc_gNB.c
+++ b/openair2/RRC/NR/rrc_gNB.c
@@ -116,16 +116,16 @@ uint8_t first_rrcreconfiguration = 0;
 ///---------------------------------------------------------------------------------------------------------------///
 ///---------------------------------------------------------------------------------------------------------------///
 
-boolean_t DURecvCb( protocol_ctxt_t  *ctxt_pP,
-                    const srb_flag_t     srb_flagP,
-                    const rb_id_t        rb_idP,
-                    const mui_t          muiP,
-                    const confirm_t      confirmP,
-                    const sdu_size_t     sdu_buffer_sizeP,
-                    unsigned char *const sdu_buffer_pP,
-                    const pdcp_transmission_mode_t modeP,
-                    const uint32_t *sourceL2Id,
-                    const uint32_t *destinationL2Id) {
+bool DURecvCb(protocol_ctxt_t  *ctxt_pP,
+              const srb_flag_t     srb_flagP,
+              const rb_id_t        rb_idP,
+              const mui_t          muiP,
+              const confirm_t      confirmP,
+              const sdu_size_t     sdu_buffer_sizeP,
+              unsigned char *const sdu_buffer_pP,
+              const pdcp_transmission_mode_t modeP,
+              const uint32_t *sourceL2Id,
+              const uint32_t *destinationL2Id) {
   // The buffer comes from the stack in gtp-u thread, we have a make a separate buffer to enqueue in a inter-thread message queue
   mem_block_t *sdu=get_free_mem_block(sdu_buffer_sizeP, __func__);
   memcpy(sdu->data,  sdu_buffer_pP,  sdu_buffer_sizeP);
@@ -917,7 +917,7 @@ rrc_gNB_generate_dedicatedRRCReconfiguration(
       sdap_config->sdap_HeaderDL = NR_SDAP_Config__sdap_HeaderDL_absent;
       sdap_config->sdap_HeaderUL = NR_SDAP_Config__sdap_HeaderUL_absent;
     }
-    sdap_config->defaultDRB = TRUE;
+    sdap_config->defaultDRB = true;
     sdap_config->mappedQoS_FlowsToAdd = calloc(1, sizeof(struct NR_SDAP_Config__mappedQoS_FlowsToAdd));
     memset(sdap_config->mappedQoS_FlowsToAdd, 0, sizeof(struct NR_SDAP_Config__mappedQoS_FlowsToAdd));
 
@@ -1826,7 +1826,7 @@ rrc_gNB_process_RRCConnectionReestablishmentComplete(
   ue_context_pP->ue_context.rnti               = ctxt_pP->rnti;
 
   if (AMF_MODE_ENABLED) {
-    uint8_t send_security_mode_command = FALSE;
+    uint8_t send_security_mode_command = false;
     nr_rrc_pdcp_config_security(
       ctxt_pP,
       ue_context_pP,
@@ -2113,7 +2113,7 @@ int nr_rrc_gNB_decode_ccch(protocol_ctxt_t    *const ctxt_pP,
               }
 
               if (ue_context_p != NULL) {
-                ue_context_p->ue_context.Initialue_identity_5g_s_TMSI.presence = TRUE;
+                ue_context_p->ue_context.Initialue_identity_5g_s_TMSI.presence = true;
                 ue_context_p->ue_context.ng_5G_S_TMSI_Part1 = s_tmsi_part1;
               }
             }
@@ -2590,7 +2590,7 @@ rrc_gNB_decode_dcch(
                   fiveg_s_TMSI, fiveg_s_TMSI >> 38, fiveg_s_TMSI >> 38,
                   (fiveg_s_TMSI >> 32) & 0x3F, (fiveg_s_TMSI >> 32) & 0x3F,
                   (uint32_t)fiveg_s_TMSI);
-              if (ue_context_p->ue_context.Initialue_identity_5g_s_TMSI.presence == TRUE) {
+              if (ue_context_p->ue_context.Initialue_identity_5g_s_TMSI.presence == true) {
                   ue_context_p->ue_context.Initialue_identity_5g_s_TMSI.amf_set_id = fiveg_s_TMSI >> 38;
                   ue_context_p->ue_context.Initialue_identity_5g_s_TMSI.amf_pointer = (fiveg_s_TMSI >> 32) & 0x3F;
                   ue_context_p->ue_context.Initialue_identity_5g_s_TMSI.fiveg_tmsi = (uint32_t)fiveg_s_TMSI;
@@ -3235,7 +3235,6 @@ static int  rrc_process_DU_DL(MessageDef *msg_p, const char *msg_name, instance_
   
   LOG_I(F1AP, "Received DL RRC Transfer on srb_id %ld\n", req->srb_id);
   //   rlc_op_status_t    rlc_status;
-  //   boolean_t          ret             = TRUE;
   
   //LOG_I(F1AP, "PRRCContainer size %lu:", ie->value.choice.RRCContainer.size);
   //for (int i = 0; i < ie->value.choice.RRCContainer.size; i++)
@@ -3260,23 +3259,23 @@ static int  rrc_process_DU_DL(MessageDef *msg_p, const char *msg_name, instance_
   //   switch (rlc_status) {
   //     case RLC_OP_STATUS_OK:
   //       //LOG_I(F1AP, "Data sending request over RLC succeeded!\n");
-  //       ret=TRUE;
+  //       ret=true;
   //       break;
   //     case RLC_OP_STATUS_BAD_PARAMETER:
   //       LOG_W(F1AP, "Data sending request over RLC failed with 'Bad Parameter' reason!\n");
-  //       ret= FALSE;
+  //       ret= false;
   //       break;
   //     case RLC_OP_STATUS_INTERNAL_ERROR:
   //       LOG_W(F1AP, "Data sending request over RLC failed with 'Internal Error' reason!\n");
-  //       ret= FALSE;
+  //       ret= false;
   //       break;
   //     case RLC_OP_STATUS_OUT_OF_RESSOURCES:
   //       LOG_W(F1AP, "Data sending request over RLC failed with 'Out of Resources' reason!\n");
-  //       ret= FALSE;
+  //       ret= false;
   //       break;
   //     default:
   //       LOG_W(F1AP, "RLC returned an unknown status code after PDCP placed the order to send some data (Status Code:%d)\n", rlc_status);
-  //       ret= FALSE;
+  //       ret= false;
   //       break;
   //   } // switch case
   //   return ret;
@@ -3940,7 +3939,7 @@ void nr_rrc_subframe_process(protocol_ctxt_t *const ctxt_pP, const int CC_id) {
     gNB_MAC_INST *nrmac=RC.nrmac[ctxt_pP->module_id]; //WHAT A BEAUTIFULL RACE CONDITION !!!
 
     if (fd) {
-      if (ue_context_p->ue_context.Initialue_identity_5g_s_TMSI.presence == TRUE) {
+      if (ue_context_p->ue_context.Initialue_identity_5g_s_TMSI.presence == true) {
         fprintf(fd,"NR RRC UE rnti %x: S-TMSI %x failure timer %d/8\n",
                 ue_context_p->ue_id_rnti,
                 ue_context_p->ue_context.Initialue_identity_5g_s_TMSI.fiveg_tmsi,
diff --git a/openair2/RRC/NR/rrc_gNB_NGAP.c b/openair2/RRC/NR/rrc_gNB_NGAP.c
index 0dcd06466355b24f638b259a957287fa3a443ffc..6663ddea8575d349a80e80f10f87c8f815657e53 100644
--- a/openair2/RRC/NR/rrc_gNB_NGAP.c
+++ b/openair2/RRC/NR/rrc_gNB_NGAP.c
@@ -708,7 +708,7 @@ rrc_gNB_process_security(
   rrc_gNB_ue_context_t *const ue_context_pP,
   ngap_security_capabilities_t *security_capabilities_pP
 ) {
-  boolean_t                                             changed = FALSE;
+  bool                                                  changed = false;
   NR_CipheringAlgorithm_t                               cipheringAlgorithm;
   e_NR_IntegrityProtAlgorithm                           integrityProtAlgorithm;
   /* Save security parameters */
@@ -726,14 +726,14 @@ rrc_gNB_process_security(
 
   if (ue_context_pP->ue_context.ciphering_algorithm != cipheringAlgorithm) {
     ue_context_pP->ue_context.ciphering_algorithm = cipheringAlgorithm;
-    changed = TRUE;
+    changed = true;
   }
 
   integrityProtAlgorithm = rrc_gNB_select_integrity(ctxt_pP, ue_context_pP->ue_context.security_capabilities.nRintegrity_algorithms);
 
   if (ue_context_pP->ue_context.integrity_algorithm != integrityProtAlgorithm) {
     ue_context_pP->ue_context.integrity_algorithm = integrityProtAlgorithm;
-    changed = TRUE;
+    changed = true;
   }
 
   LOG_I (NR_RRC, "[gNB %d][UE %x] Selected security algorithms (%p): %lx, %x, %s\n",
@@ -1126,17 +1126,17 @@ rrc_gNB_process_NGAP_PDUSESSION_MODIFY_REQ(
     ue_context_p->ue_context.gNB_ue_ngap_id = gNB_ue_ngap_id;
     {
       int j;
-      boolean_t is_treated[NGAP_MAX_PDUSESSION] = {FALSE};
+      bool is_treated[NGAP_MAX_PDUSESSION] = {false};
       uint8_t nb_of_failed_pdusessions = 0;
 
       for (i = 0; i < nb_pdusessions_tomodify; i++) {
-        if (is_treated[i] == TRUE) {
+        if (is_treated[i] == true) {
           continue;
         }
         
         //Check if same PDU session ID to handle multiple pdu sessions
         for (j = i+1; j < nb_pdusessions_tomodify; j++) {
-          if (is_treated[j] == FALSE &&
+          if (is_treated[j] == false &&
               NGAP_PDUSESSION_MODIFY_REQ(msg_p).pdusession_modify_params[j].pdusession_id == 
                 NGAP_PDUSESSION_MODIFY_REQ(msg_p).pdusession_modify_params[i].pdusession_id) {
             // handle multiple pdu session id
@@ -1147,12 +1147,12 @@ rrc_gNB_process_NGAP_PDUSESSION_MODIFY_REQ(
             ue_context_p->ue_context.modify_pdusession[j].cause               = NGAP_CAUSE_RADIO_NETWORK;
             ue_context_p->ue_context.modify_pdusession[j].cause_value         = NGAP_CauseRadioNetwork_multiple_PDU_session_ID_instances;
             nb_of_failed_pdusessions++;
-            is_treated[i] = TRUE;
-            is_treated[j] = TRUE;
+            is_treated[i] = true;
+            is_treated[j] = true;
           }
         }
         // handle multiple pdu session id case
-        if (is_treated[i] == TRUE) {
+        if (is_treated[i] == true) {
           LOG_D(NR_RRC, "handle multiple pdu session id \n");
           ue_context_p->ue_context.modify_pdusession[i].status              = PDU_SESSION_STATUS_NEW;
           ue_context_p->ue_context.modify_pdusession[i].param.pdusession_id = 
@@ -1195,13 +1195,13 @@ rrc_gNB_process_NGAP_PDUSESSION_MODIFY_REQ(
             ue_context_p->ue_context.modify_pdusession[i].param.gtp_teid = 
               ue_context_p->ue_context.pduSession[j].param.gtp_teid;
             
-            is_treated[i] = TRUE;
+            is_treated[i] = true;
             break;
           }
         }
 
         // handle Unknown pdu session ID
-        if (is_treated[i] == FALSE) {
+        if (is_treated[i] == false) {
           LOG_D(NR_RRC, "handle Unknown pdu session ID \n");
           ue_context_p->ue_context.modify_pdusession[i].status              = PDU_SESSION_STATUS_NEW;
           ue_context_p->ue_context.modify_pdusession[i].param.pdusession_id = 
@@ -1209,7 +1209,7 @@ rrc_gNB_process_NGAP_PDUSESSION_MODIFY_REQ(
           ue_context_p->ue_context.modify_pdusession[i].cause               = NGAP_CAUSE_RADIO_NETWORK;
           ue_context_p->ue_context.modify_pdusession[i].cause_value         = NGAP_CauseRadioNetwork_unknown_PDU_session_ID;
           nb_of_failed_pdusessions++;
-          is_treated[i] = TRUE;
+          is_treated[i] = true;
         }
       }
 
diff --git a/openair2/RRC/NR/rrc_gNB_reconfig.c b/openair2/RRC/NR/rrc_gNB_reconfig.c
index 44212cbf7afdf16e29a34ed49fe6f8296ba2c2c6..2ee3a26c4b0c6a56e9fa2788651171a998276dbf 100644
--- a/openair2/RRC/NR/rrc_gNB_reconfig.c
+++ b/openair2/RRC/NR/rrc_gNB_reconfig.c
@@ -47,9 +47,6 @@
 #include "LAYER2/nr_rlc/nr_rlc_oai_api.h"
 #include "nr_rrc_config.h"
 
-#define false 0
-#define true 1
-
 void fix_servingcellconfigdedicated(NR_ServingCellConfig_t *scd) {
 
   int b = 0;
diff --git a/openair2/RRC/NR_UE/L2_interface_ue.c b/openair2/RRC/NR_UE/L2_interface_ue.c
index 6f0c7fc27fa2c868ec456b0a4aa539fdd79ba774..b4508e2627d767194a3b58a4b708e7488e60ffa7 100644
--- a/openair2/RRC/NR_UE/L2_interface_ue.c
+++ b/openair2/RRC/NR_UE/L2_interface_ue.c
@@ -181,6 +181,6 @@ rrc_data_req_nr_ue(
       TASK_PDCP_UE,
       ctxt_pP->instance,
       message_p);
-    return TRUE; // TODO should be changed to a CNF message later, currently RRC lite does not used the returned value anyway.
+    return true; // TODO should be changed to a CNF message later, currently RRC lite does not used the returned value anyway.
 
 }
diff --git a/openair2/RRC/NR_UE/rrc_UE.c b/openair2/RRC/NR_UE/rrc_UE.c
index 50ec32772de354c87f7722aebe23abbe918238a0..078f7f51a170f25eb75cb3664682bf009b66250a 100644
--- a/openair2/RRC/NR_UE/rrc_UE.c
+++ b/openair2/RRC/NR_UE/rrc_UE.c
@@ -2014,7 +2014,7 @@ nr_rrc_ue_establish_srb2(
    int i, cnt;
 
    if( radioBearerConfig->srb3_ToRelease != NULL){
-     if( *radioBearerConfig->srb3_ToRelease == TRUE){
+     if( *radioBearerConfig->srb3_ToRelease == true){
        //TODO (release the PDCP entity and the srb-Identity of the SRB3.)
      }
    }
diff --git a/openair2/SDAP/nr_sdap/nr_sdap.c b/openair2/SDAP/nr_sdap/nr_sdap.c
index 74ef93aff743fa9929e9c0d3aa2227dc5c45ec5b..dd7a76920d30c43887db01d964f6f9d7861710e2 100644
--- a/openair2/SDAP/nr_sdap/nr_sdap.c
+++ b/openair2/SDAP/nr_sdap/nr_sdap.c
@@ -21,19 +21,19 @@
 
 #include "nr_sdap.h"
 
-boolean_t sdap_data_req(protocol_ctxt_t *ctxt_p,
-                        const srb_flag_t srb_flag,
-                        const rb_id_t rb_id,
-                        const mui_t mui,
-                        const confirm_t confirm,
-                        const sdu_size_t sdu_buffer_size,
-                        unsigned char *const sdu_buffer,
-                        const pdcp_transmission_mode_t pt_mode,
-                        const uint32_t *sourceL2Id,
-                        const uint32_t *destinationL2Id,
-                        const uint8_t qfi,
-                        const boolean_t rqi,
-                        const int pdusession_id) {
+bool sdap_data_req(protocol_ctxt_t *ctxt_p,
+                   const srb_flag_t srb_flag,
+                   const rb_id_t rb_id,
+                   const mui_t mui,
+                   const confirm_t confirm,
+                   const sdu_size_t sdu_buffer_size,
+                   unsigned char *const sdu_buffer,
+                   const pdcp_transmission_mode_t pt_mode,
+                   const uint32_t *sourceL2Id,
+                   const uint32_t *destinationL2Id,
+                   const uint8_t qfi,
+                   const bool rqi,
+                   const int pdusession_id) {
   nr_sdap_entity_t *sdap_entity;
   sdap_entity = nr_sdap_get_entity(ctxt_p->rnti, pdusession_id);
 
@@ -42,19 +42,19 @@ boolean_t sdap_data_req(protocol_ctxt_t *ctxt_p,
     return 0;
   }
 
-  boolean_t ret = sdap_entity->tx_entity(sdap_entity,
-                                         ctxt_p,
-                                         srb_flag,
-                                         rb_id,
-                                         mui,
-                                         confirm,
-                                         sdu_buffer_size,
-                                         sdu_buffer,
-                                         pt_mode,
-                                         sourceL2Id,
-                                         destinationL2Id,
-                                         qfi,
-                                         rqi);
+  bool ret = sdap_entity->tx_entity(sdap_entity,
+                                    ctxt_p,
+                                    srb_flag,
+                                    rb_id,
+                                    mui,
+                                    confirm,
+                                    sdu_buffer_size,
+                                    sdu_buffer,
+                                    pt_mode,
+                                    sourceL2Id,
+                                    destinationL2Id,
+                                    qfi,
+                                    rqi);
   return ret;
 }
 
diff --git a/openair2/SDAP/nr_sdap/nr_sdap.h b/openair2/SDAP/nr_sdap/nr_sdap.h
index cd702cfd7f39d2b6698842b3fa1b643458ba0710..5959ca15589783dd84c51e21257875101d04ce36 100644
--- a/openair2/SDAP/nr_sdap/nr_sdap.h
+++ b/openair2/SDAP/nr_sdap/nr_sdap.h
@@ -32,20 +32,19 @@
  * Downlink - gNB
  * Uplink   - nrUE
  */
-boolean_t sdap_data_req(protocol_ctxt_t *ctxt_p,
-                        const srb_flag_t srb_flag,
-                        const rb_id_t rb_id,
-                        const mui_t mui,
-                        const confirm_t confirm,
-                        const sdu_size_t sdu_buffer_size,
-                        unsigned char *const sdu_buffer,
-                        const pdcp_transmission_mode_t pt_mode,
-                        const uint32_t *sourceL2Id,
-                        const uint32_t *destinationL2Id,
-                        const uint8_t qfi,
-                        const boolean_t rqi,
-                        const int pdusession_id
-                       );
+bool sdap_data_req(protocol_ctxt_t *ctxt_p,
+                   const srb_flag_t srb_flag,
+                   const rb_id_t rb_id,
+                   const mui_t mui,
+                   const confirm_t confirm,
+                   const sdu_size_t sdu_buffer_size,
+                   unsigned char *const sdu_buffer,
+                   const pdcp_transmission_mode_t pt_mode,
+                   const uint32_t *sourceL2Id,
+                   const uint32_t *destinationL2Id,
+                   const uint8_t qfi,
+                   const bool rqi,
+                   const int pdusession_id);
 
 /*
  * TS 37.324 4.4 Functions
diff --git a/openair2/SDAP/nr_sdap/nr_sdap_entity.c b/openair2/SDAP/nr_sdap/nr_sdap_entity.c
index 79532748d2895107a9a0e6717af3cb62c0987e59..5e3627296c56b62a15e3a33bdd390cb746913168 100644
--- a/openair2/SDAP/nr_sdap/nr_sdap_entity.c
+++ b/openair2/SDAP/nr_sdap/nr_sdap_entity.c
@@ -46,23 +46,22 @@ void nr_pdcp_submit_sdap_ctrl_pdu(int rnti, rb_id_t sdap_ctrl_pdu_drb, nr_sdap_u
   return;
 }
 
-static boolean_t nr_sdap_tx_entity(nr_sdap_entity_t *entity,
-                                   protocol_ctxt_t *ctxt_p,
-                                   const srb_flag_t srb_flag,
-                                   const rb_id_t rb_id,
-                                   const mui_t mui,
-                                   const confirm_t confirm,
-                                   const sdu_size_t sdu_buffer_size,
-                                   unsigned char *const sdu_buffer,
-                                   const pdcp_transmission_mode_t pt_mode,
-                                   const uint32_t *sourceL2Id,
-                                   const uint32_t *destinationL2Id,
-                                   const uint8_t qfi,
-                                   const boolean_t rqi
-                                  ) {
+static bool nr_sdap_tx_entity(nr_sdap_entity_t *entity,
+                              protocol_ctxt_t *ctxt_p,
+                              const srb_flag_t srb_flag,
+                              const rb_id_t rb_id,
+                              const mui_t mui,
+                              const confirm_t confirm,
+                              const sdu_size_t sdu_buffer_size,
+                              unsigned char *const sdu_buffer,
+                              const pdcp_transmission_mode_t pt_mode,
+                              const uint32_t *sourceL2Id,
+                              const uint32_t *destinationL2Id,
+                              const uint8_t qfi,
+                              const bool rqi) {
   /* The offset of the SDAP header, it might be 0 if the has_sdap is not true in the pdcp entity. */
   int offset=0;
-  boolean_t ret=false;
+  bool ret = false;
   /*Hardcode DRB ID given from upper layer (ue/enb_tun_read_thread rb_id), it will change if we have SDAP*/
   rb_id_t sdap_drb_id = rb_id;
   int pdcp_ent_has_sdap = 0;
@@ -297,7 +296,7 @@ static void nr_sdap_rx_entity(nr_sdap_entity_t *entity,
   }
 }
 
-void nr_sdap_qfi2drb_map_update(nr_sdap_entity_t *entity, uint8_t qfi, rb_id_t drb, boolean_t hasSdap){
+void nr_sdap_qfi2drb_map_update(nr_sdap_entity_t *entity, uint8_t qfi, rb_id_t drb, bool hasSdap) {
   if(qfi < SDAP_MAX_QFI &&
      qfi > SDAP_MAP_RULE_EMPTY &&
      drb > 0 &&
@@ -390,7 +389,7 @@ void nr_sdap_ue_qfi2drb_config(nr_sdap_entity_t *existing_sdap_entity,
 nr_sdap_entity_t *new_nr_sdap_entity(int has_sdap,
                                      uint16_t rnti,
                                      int pdusession_id,
-                                     boolean_t is_defaultDRB,
+                                     bool is_defaultDRB,
                                      uint8_t drb_identity,
                                      NR_QFI_t *mapped_qfi_2_add,
                                      uint8_t mappedQFIs2AddCount)
diff --git a/openair2/SDAP/nr_sdap/nr_sdap_entity.h b/openair2/SDAP/nr_sdap/nr_sdap_entity.h
index b46e5bf4e3462bef98b65b5e2e799b14dc7b6319..635289d4d48cfc4f7d41564f87c8668236bc19a6 100644
--- a/openair2/SDAP/nr_sdap/nr_sdap_entity.h
+++ b/openair2/SDAP/nr_sdap/nr_sdap_entity.h
@@ -64,7 +64,7 @@ typedef struct nr_sdap_ul_hdr_s {
 
 typedef struct qfi2drb_s {
   rb_id_t drb_id;
-  boolean_t hasSdap;
+  bool    hasSdap;
 } qfi2drb_t;
 
 void nr_pdcp_submit_sdap_ctrl_pdu(int rnti, rb_id_t sdap_ctrl_pdu_drb, nr_sdap_ul_hdr_t ctrl_pdu);
@@ -75,7 +75,7 @@ typedef struct nr_sdap_entity_s {
   int pdusession_id;
   qfi2drb_t qfi2drb_table[SDAP_MAX_QFI];
 
-  void (*qfi2drb_map_update)(struct nr_sdap_entity_s *entity, uint8_t qfi, rb_id_t drb, boolean_t hasSdap);
+  void (*qfi2drb_map_update)(struct nr_sdap_entity_s *entity, uint8_t qfi, rb_id_t drb, bool hasSdap);
   void (*qfi2drb_map_delete)(struct nr_sdap_entity_s *entity, uint8_t qfi);
   rb_id_t (*qfi2drb_map)(struct nr_sdap_entity_s *entity, uint8_t qfi, rb_id_t upper_layer_rb_id);
 
@@ -84,20 +84,19 @@ typedef struct nr_sdap_entity_s {
   void (*sdap_submit_ctrl_pdu)(int rnti, rb_id_t sdap_ctrl_pdu_drb, nr_sdap_ul_hdr_t ctrl_pdu);
 
 
-  boolean_t (*tx_entity)(struct nr_sdap_entity_s *entity,
-                         protocol_ctxt_t *ctxt_p,
-                         const srb_flag_t srb_flag,
-                         const rb_id_t rb_id,
-                         const mui_t mui,
-                         const confirm_t confirm,
-                         const sdu_size_t sdu_buffer_size,
-                         unsigned char *const sdu_buffer,
-                         const pdcp_transmission_mode_t pt_mode,
-                         const uint32_t *sourceL2Id,
-                         const uint32_t *destinationL2Id,
-                         const uint8_t qfi,
-                         const boolean_t rqi
-                         );
+  bool (*tx_entity)(struct nr_sdap_entity_s *entity,
+                    protocol_ctxt_t *ctxt_p,
+                    const srb_flag_t srb_flag,
+                    const rb_id_t rb_id,
+                    const mui_t mui,
+                    const confirm_t confirm,
+                    const sdu_size_t sdu_buffer_size,
+                    unsigned char *const sdu_buffer,
+                    const pdcp_transmission_mode_t pt_mode,
+                    const uint32_t *sourceL2Id,
+                    const uint32_t *destinationL2Id,
+                    const uint8_t qfi,
+                    const bool rqi);
 
   void (*rx_entity)(struct nr_sdap_entity_s *entity,
                     rb_id_t pdcp_entity,
@@ -114,7 +113,7 @@ typedef struct nr_sdap_entity_s {
 } nr_sdap_entity_t;
 
 /* QFI to DRB Mapping Related Function */
-void nr_sdap_qfi2drb_map_update(nr_sdap_entity_t *entity, uint8_t qfi, rb_id_t drb, boolean_t hasSdap);
+void nr_sdap_qfi2drb_map_update(nr_sdap_entity_t *entity, uint8_t qfi, rb_id_t drb, bool hasSdap);
 
 /* QFI to DRB Mapping Related Function */
 void nr_sdap_qfi2drb_map_del(nr_sdap_entity_t *entity, uint8_t qfi);
@@ -168,7 +167,7 @@ void nr_sdap_ue_qfi2drb_config(nr_sdap_entity_t *existing_sdap_entity,
 nr_sdap_entity_t *new_nr_sdap_entity(int has_sdap,
                                      uint16_t rnti,
                                      int pdusession_id,
-                                     boolean_t is_defaultDRB,
+                                     bool is_defaultDRB,
                                      uint8_t default_DRB,
                                      NR_QFI_t *mapped_qfi_2_add,
                                      uint8_t mappedQFIs2AddCount);
diff --git a/openair2/UTIL/OMG/defs.h b/openair2/UTIL/OMG/defs.h
index 06c9bf6e73fe1a5adc3c2f6022157969ccfd43ce..1102a69cc56a7ee85c825bb2a73de6291d87e7e6 100644
--- a/openair2/UTIL/OMG/defs.h
+++ b/openair2/UTIL/OMG/defs.h
@@ -29,12 +29,6 @@
 
 #include <stdlib.h>
 
-// TYPEDEFS
-
-#define true 1
-#define false 0
-
-//typedef char bool;
 #include <stdbool.h>
 #include "omg_constants.h"
 
diff --git a/openair2/X2AP/x2ap_common.h b/openair2/X2AP/x2ap_common.h
index a2f903a73725f812b44314e02408ad40ceed145f..7dd88ffa21a2f496a3ebf2f7ca5790d6e3aa65b8 100644
--- a/openair2/X2AP/x2ap_common.h
+++ b/openair2/X2AP/x2ap_common.h
@@ -52,11 +52,6 @@
 # define X2AP_PORT 36422
 #endif
 
-#ifndef TRUE
-#define TRUE 1
-#define FALSE 0
-#endif
-
 extern int asn1_xer_print;
 
 #if defined(ENB_MODE)
diff --git a/openair3/M3AP/m3ap_common.h b/openair3/M3AP/m3ap_common.h
index 7f68510314fa31b18148a222e7769cdd17990c49..c5f55bc70a293e16cc7360c6f55e2d2549598b6d 100644
--- a/openair3/M3AP/m3ap_common.h
+++ b/openair3/M3AP/m3ap_common.h
@@ -52,11 +52,6 @@
 # define M3AP_PORT 36444
 #endif
 
-#ifndef TRUE
-#define TRUE 1
-#define FALSE 0
-#endif
-
 extern int asn1_xer_print;
 
 #if defined(ENB_MODE)
diff --git a/openair3/NAS/COMMON/UTIL/nas_timer.c b/openair3/NAS/COMMON/UTIL/nas_timer.c
index 8448d9a78cce62155edfc34ab35c266b5bfe6d48..b67a3bc232f8d8402c891e327658ab2a41b8a346 100644
--- a/openair3/NAS/COMMON/UTIL/nas_timer.c
+++ b/openair3/NAS/COMMON/UTIL/nas_timer.c
@@ -121,7 +121,7 @@ static nas_timer_database_t _nas_timer_db = {
 static void _nas_timer_db_init(void);
 
 static int _nas_timer_db_get_id(void);
-static int _nas_timer_db_is_active(int id);
+static bool _nas_timer_db_is_active(int id);
 static nas_timer_entry_t *_nas_timer_db_create_entry(long sec,
     nas_timer_callback_t cb, void *args);
 static void _nas_timer_db_delete_entry(int id);
@@ -130,7 +130,7 @@ static void _nas_timer_db_insert_entry(int id, nas_timer_entry_t *te);
 static int _nas_timer_db_insert(timer_queue_t *entry);
 
 static nas_timer_entry_t *_nas_timer_db_remove_entry(int id);
-static int _nas_timer_db_remove(timer_queue_t *entry);
+static bool _nas_timer_db_remove(timer_queue_t *entry);
 
 /*
  * -----------------------------------------------------------------------------
@@ -408,12 +408,12 @@ static int _nas_timer_db_get_id(void)
  **      Others:    _nas_timer_db                              **
  **                                                                        **
  ** Outputs:     None                                                      **
- **      Return:    TRUE if the timer entry is active; FALSE   **
+ **      Return:    true if the timer entry is active; false   **
  **             if it is not an active timer entry.        **
  **      Others:    None                                       **
  **                                                                        **
  ***************************************************************************/
-static int _nas_timer_db_is_active(int id)
+static bool _nas_timer_db_is_active(int id)
 {
   return ( (id != NAS_TIMER_INACTIVE_ID) &&
            (_nas_timer_db.tq[id].id != NAS_TIMER_INACTIVE_ID) );
@@ -562,11 +562,11 @@ static int _nas_timer_db_insert(timer_queue_t *entry)
   } else {
     /* The new entry is the first entry of the list */
     _nas_timer_db.head = entry;
-    return TRUE;
+    return true;
   }
 
   /* The new entry is NOT the first entry of the list */
-  return FALSE;
+  return false;
 }
 
 /****************************************************************************
@@ -588,7 +588,7 @@ static int _nas_timer_db_insert(timer_queue_t *entry)
  ***************************************************************************/
 static nas_timer_entry_t *_nas_timer_db_remove_entry(int id)
 {
-  int restart;
+  bool restart;
 
   /* The identifier of the timer is valid within the timer queue */
   assert(_nas_timer_db.tq[id].id == id);
@@ -622,7 +622,7 @@ static nas_timer_entry_t *_nas_timer_db_remove_entry(int id)
   return (_nas_timer_db.tq[id].entry);
 }
 
-static int _nas_timer_db_remove(timer_queue_t *entry)
+static bool _nas_timer_db_remove(timer_queue_t *entry)
 {
   /* Update the pointer from the previous entry */
   /* prev ---> entry ---> next */
@@ -644,12 +644,12 @@ static int _nas_timer_db_remove(timer_queue_t *entry)
 
     if (_nas_timer_db.head != NULL) {
       /* Other timers are scheduled to expire */
-      return TRUE;
+      return true;
     }
   }
 
   /* The entry was NOT the first entry of the list */
-  return FALSE;
+  return false;
 }
 
 /*
diff --git a/openair3/NAS/COMMON/UTIL/socket.c b/openair3/NAS/COMMON/UTIL/socket.c
index 53a6ec8823d063bb5ec1d7d87154015af2981bd6..20c071203df0ab92a54c8707683c13d12a98aa5a 100644
--- a/openair3/NAS/COMMON/UTIL/socket.c
+++ b/openair3/NAS/COMMON/UTIL/socket.c
@@ -397,7 +397,7 @@ static int _socket_set_option(int sfd)
    * and it will simply open another socket on the same port and
    * continue listening.
    */
-  optval = TRUE;
+  optval = true;
 
   if (setsockopt (sfd, SOL_SOCKET, SO_REUSEADDR, &optval, sizeof(optval)) < 0) {
     return RETURNerror;
@@ -405,12 +405,12 @@ static int _socket_set_option(int sfd)
 
   /* IPV6_V6ONLY socket option
    * -------------------------
-   * When option is set to TRUE, the socket is restricted to sending and
+   * When option is set to true, the socket is restricted to sending and
    * receiving IPv6 packets only.
-   * When option is set to FALSE, the socket can be used to send and receive
+   * When option is set to false, the socket can be used to send and receive
    * packets to and from an IPv6 address or an IPv4-mapped IPv6 address.
    */
-  optval = FALSE;
+  optval = false;
 
   if (setsockopt (sfd, IPPROTO_IPV6, IPV6_V6ONLY, &optval, sizeof(optval)) < 0) {
     return RETURNerror;
diff --git a/openair3/NAS/COMMON/UTIL/stty.c b/openair3/NAS/COMMON/UTIL/stty.c
index eceb0b06b139294326ef911f81de8e1aec8b68c0..fe87a63e44045ff6f50876fab2ae1c12f0c6bac2 100644
--- a/openair3/NAS/COMMON/UTIL/stty.c
+++ b/openair3/NAS/COMMON/UTIL/stty.c
@@ -192,7 +192,7 @@ static sttyset_t stty_params[] = {
   { NULL, 0,  0,    0 }
 };
 
-static int _stty_set_this(struct termios *term, const sttyset_t *p, int turnon);
+static int _stty_set_this(struct termios *term, const sttyset_t *p, bool turnon);
 
 /****************************************************************************/
 /******************  E X P O R T E D    F U N C T I O N S  ******************/
@@ -207,7 +207,7 @@ static int _stty_set_this(struct termios *term, const sttyset_t *p, int turnon);
  **                                                                        **
  ** Inputs:  p:   The TTY parameters                         **
  **    turnon:  Indicate whether the parameter should be   **
- **                             turned on (TRUE) or turned off (FALSE)     **
+ **                             turned on (true) or turned off (false)     **
  **    Others:  None                                       **
  **                                                                        **
  ** Outputs:   term:    The termios structure to fill              **
@@ -223,7 +223,7 @@ int stty_set(int fd, const char *params)
   register char *s;
   struct termios term;
   register int i;
-  int mode;
+  bool mode;
 
   /* Get current tty attributes */
   if ( tcgetattr(fd, &term) < 0 ) {
@@ -234,10 +234,10 @@ int stty_set(int fd, const char *params)
   p = strtok(s," \t\n");
 
   while (p && (rc != RETURNerror)) {
-    mode = 1;
+    mode = true;
 
     if ( *p == '-' ) {
-      mode = 0;
+      mode = false;
       p++;
     }
 
@@ -275,7 +275,7 @@ int stty_set(int fd, const char *params)
  **                                                                        **
  ** Inputs:  p:   The TTY parameters                         **
  **    turnon:  Indicate whether the parameter should be   **
- **                             turned on (TRUE) or turned off (FALSE)     **
+ **                             turned on (true) or turned off (false)     **
  **    Others:  None                                       **
  **                                                                        **
  ** Outputs:   term:    The termios structure to fill              **
@@ -283,7 +283,7 @@ int stty_set(int fd, const char *params)
  **    Others:  None                                       **
  **                                                                        **
  ***************************************************************************/
-static int _stty_set_this(struct termios *term, const sttyset_t *p, int turnon)
+static int _stty_set_this(struct termios *term, const sttyset_t *p, bool turnon)
 {
   int rc = RETURNok;
 
diff --git a/openair3/NAS/TEST/AS_SIMULATOR/as_simulator.c b/openair3/NAS/TEST/AS_SIMULATOR/as_simulator.c
index bbc37d18a3caaa3380a32c081f6afa3a0a10bd6a..387c3de3a8c07d7c8ee2d3019c5d044308b38346 100644
--- a/openair3/NAS/TEST/AS_SIMULATOR/as_simulator.c
+++ b/openair3/NAS/TEST/AS_SIMULATOR/as_simulator.c
@@ -120,12 +120,12 @@ static socket_id_t * _as_simulator_mme_sid = NULL;
 /*
  * UE NAS process connection manager's running indicator
  */
-static int _as_simulator_ue_is_running = FALSE;
+static bool _as_simulator_ue_is_running = false;
 
 /*
  * MME NAS process connection manager's running indicator
  */
-static int _as_simulator_mme_is_running = FALSE;
+static bool _as_simulator_mme_is_running = false;
 
 static int _set_signal_handler(int signal, void (handler)(int));
 static void _signal_handler(int signal_number);
@@ -307,8 +307,8 @@ static void _signal_handler(int signal_number)
 {
   printf("\nWARNING\t: %s - Signal %d received\n", __FUNCTION__,
          signal_number);
-  _as_simulator_ue_is_running = FALSE;
-  _as_simulator_mme_is_running = FALSE;
+  _as_simulator_ue_is_running = false;
+  _as_simulator_mme_is_running = false;
 }
 
 /*
@@ -321,7 +321,7 @@ static void* _as_simulator_ue_mngr(void* args)
   int msg_id;
   as_message_t msg;
 
-  _as_simulator_ue_is_running = TRUE;
+  _as_simulator_ue_is_running = true;
 
   printf("INFO\t: %s - UE connection manager started\n", __FUNCTION__);
 
@@ -388,7 +388,7 @@ static void* _as_simulator_ue_mngr(void* args)
   }
 
   /* Close the connection to the network sublayer */
-  _as_simulator_ue_is_running = FALSE;
+  _as_simulator_ue_is_running = false;
   printf("ERROR\t: The UE connection manager exited\n");
   return (NULL);
 }
@@ -403,7 +403,7 @@ static void* _as_simulator_mme_mngr(void* args)
   int msg_id;
   as_message_t msg;
 
-  _as_simulator_mme_is_running = TRUE;
+  _as_simulator_mme_is_running = true;
 
   printf("INFO\t: %s - MME connection manager started\n", __FUNCTION__);
 
@@ -469,7 +469,7 @@ static void* _as_simulator_mme_mngr(void* args)
   }
 
   /* Close the connection to the network sublayer */
-  _as_simulator_mme_is_running = FALSE;
+  _as_simulator_mme_is_running = false;
   printf("ERROR\t: %s - The MME connection manager exited\n", __FUNCTION__);
   return (NULL);
 }
diff --git a/openair3/NAS/TEST/NETWORK/network_simulator.c b/openair3/NAS/TEST/NETWORK/network_simulator.c
index 461f701f95181d08a1c8cd2cb4a6a6de7dc33f8e..492a709463f348f0ad72b2308dbe3539dfc02fe6 100644
--- a/openair3/NAS/TEST/NETWORK/network_simulator.c
+++ b/openair3/NAS/TEST/NETWORK/network_simulator.c
@@ -208,7 +208,7 @@ static const OctetString* _network_simulator_pdn[NETWORK_IP_MAX][2] = {
 static int _set_signal_handler(int signal, void (handler)(int));
 static void _signal_handler(int signal_number);
 static int _process_message(int msgID, const as_message_t* req);
-static int _assign_pdn_address(int ue_pdn_type, int is_initial, int* pdn_type, OctetString* pdn);
+static int _assign_pdn_address(int ue_pdn_type, bool is_initial, int* pdn_type, OctetString* pdn);
 
 /* Functions used to process messages received from the Access Stratum */
 static int _process_cell_info_req(const cell_info_req_t* req, cell_info_cnf_t* rsp);
@@ -283,7 +283,7 @@ int main (int argc, const char* argv[])
   /*
    * Network simulator main loop
    */
-  while (TRUE) {
+  while (true) {
     as_message_t msg;
 
     /* Receive message from the NAS */
@@ -1072,11 +1072,11 @@ static int _process_pdn_connectivity_request(const pdn_connectivity_request_msg*
     /* Assign PDN address */
     if (apn.length > 0) {
       request->accesspointname.accesspointnamevalue = apn;
-      esm_cause = _assign_pdn_address(requested_pdn_type, FALSE, &pdn_type,
+      esm_cause = _assign_pdn_address(requested_pdn_type, false, &pdn_type,
                                       &request->pdnaddress.pdnaddressinformation);
     } else {
       request->accesspointname.accesspointnamevalue = EURECOM_APN;
-      esm_cause = _assign_pdn_address(requested_pdn_type, TRUE, &pdn_type,
+      esm_cause = _assign_pdn_address(requested_pdn_type, true, &pdn_type,
                                       &request->pdnaddress.pdnaddressinformation);
     }
 
diff --git a/openair3/NAS/TEST/USER/user_simulator.c b/openair3/NAS/TEST/USER/user_simulator.c
index 1c429c3b8508c1b766d0c27a0d1289d3d2edb8a7..3050c166927f932fe7ac37b27a175786cd884174 100644
--- a/openair3/NAS/TEST/USER/user_simulator.c
+++ b/openair3/NAS/TEST/USER/user_simulator.c
@@ -192,7 +192,7 @@ int main (int argc, const char* argv[])
   /*
    * User simulator main loop
    */
-  while (TRUE) {
+  while (true) {
     char c;
     int len;
 
@@ -293,7 +293,7 @@ static void _signal_handler(int signal_number)
  */
 static void* _receive_thread(void* arg)
 {
-  while (TRUE) {
+  while (true) {
     /* Receive AT response from the NAS sublayer */
     int rbytes = USER_RECV(_user_simulator_recv_buffer,
                            USER_SIMULATOR_BUFFER_SIZE);
diff --git a/openair3/NAS/UE/API/USER/at_command.c b/openair3/NAS/UE/API/USER/at_command.c
index ab85b2d2fa6fe994ffe6956e79d431c9e00a4e5c..a6591c6748227301cb9b7a3c5555d1889d084e1f 100644
--- a/openair3/NAS/UE/API/USER/at_command.c
+++ b/openair3/NAS/UE/API/USER/at_command.c
@@ -354,7 +354,7 @@ static int ParseString(char * at_str, at_command_t* at_command)
   char* terminal_character_index = NULL;
   int num_of_chars_to_compare = -1;
   int handler_index;
-  int handler_found = FALSE;
+  bool handler_found = false;
   int check_for_carriage_return_index = 0;
 
   /*
@@ -415,7 +415,7 @@ static int ParseString(char * at_str, at_command_t* at_command)
     if (strncasecmp(at_str, _at_command_handler[handler_index].command,
                     num_of_chars_to_compare) != 0) continue;
 
-    handler_found = TRUE;
+    handler_found = true;
     break;
   }
 
@@ -681,7 +681,7 @@ static unsigned int NumberOfParameters(const unsigned char* str)
  **      Others:  None                                       **
  **                                                                        **
  ** Outputs:   None                                                      **
- **      Return:  TRUE, FALSE                                **
+ **      Return:  true, false                                **
  **      Others:  None                                       **
  **                                                                        **
  ***************************************************************************/
@@ -689,11 +689,11 @@ static unsigned int IsNumeric(const char* str, size_t len)
 {
   while (len-- > 0) {
     if (!isdigit(str[len])) {
-      return FALSE;
+      return false;
     }
   }
 
-  return TRUE;
+  return true;
 }
 
 /****************************************************************************/
@@ -719,7 +719,7 @@ static int parse_e1(const char* string, int position, at_command_t* at_command)
 static int parse_q0(const char* string, int position, at_command_t* at_command)
 {
   /* Result code suppression Q0 */
-  at_error_code_suppression_q1 = FALSE;
+  at_error_code_suppression_q1 = false;
   at_command->id = 0;
   at_command->mask = AT_COMMAND_NO_PARAM;
   return at_command->id;
@@ -728,7 +728,7 @@ static int parse_q0(const char* string, int position, at_command_t* at_command)
 static int parse_q1(const char* string, int position, at_command_t* at_command)
 {
   /* Result code suppression Q1 */
-  at_error_code_suppression_q1 = TRUE;
+  at_error_code_suppression_q1 = true;
   at_command->id = 0;
   at_command->mask = AT_COMMAND_NO_PARAM;
   return at_command->id;
@@ -738,7 +738,7 @@ static int parse_v0(const char* string, int position, at_command_t* at_command)
 {
   /* Response format V0 (numeric result code + limited header) */
   at_error_format = AT_ERROR_NUMERIC;
-  at_response_format_v1 = FALSE;
+  at_response_format_v1 = false;
   at_command->id = 0;
   at_command->mask = AT_COMMAND_NO_PARAM;
   return at_command->id;
@@ -748,7 +748,7 @@ static int parse_v1(const char* string, int position, at_command_t* at_command)
 {
   /* Response format V1 (verbose result code + full header) */
   at_error_format = AT_ERROR_VERBOSE;
-  at_response_format_v1 = TRUE;
+  at_response_format_v1 = true;
   at_command->id = 0;
   at_command->mask = AT_COMMAND_NO_PARAM;
   return at_command->id;
diff --git a/openair3/NAS/UE/API/USER/at_error.c b/openair3/NAS/UE/API/USER/at_error.c
index d004c897368bc4d467954c02ac125ea0ef856985..bad7127adc4de4cd10493c24b44edf2ad793eb5c 100644
--- a/openair3/NAS/UE/API/USER/at_error.c
+++ b/openair3/NAS/UE/API/USER/at_error.c
@@ -55,10 +55,10 @@ extern int at_response_format_v1;
 /*
  * Result code suppression indicator (set by ATQ0 and ATQ1)
  * -------------------------------------------------------
- *  FALSE - Result codes are transmitted to the user application
- *  TRUE  - Result codes are suppressed and not transmitted
+ *  false - Result codes are transmitted to the user application
+ *  true  - Result codes are suppressed and not transmitted
  */
-int at_error_code_suppression_q1 = FALSE;
+bool at_error_code_suppression_q1 = false;
 
 /*
  * Verbose mode indicator (set by ATV0, ATV1 and AT+CMEE)
diff --git a/openair3/NAS/UE/API/USER/at_response.c b/openair3/NAS/UE/API/USER/at_response.c
index 859db90d7e0d5393045771260e30b35f968e7484..eef0385750cffd5b181f432c84002f149ea45289 100644
--- a/openair3/NAS/UE/API/USER/at_response.c
+++ b/openair3/NAS/UE/API/USER/at_response.c
@@ -52,10 +52,10 @@ Description Defines structure of the AT command response returned after
 /*
  * Response format indicator (set by ATV0 and ATV1)
  * -----------------------------------------------
- *  TRUE  - <CR><LF><text><CR><LF>, <CR><LF><verbose code><CR><LF>
- *  FALSE - <text><CR><LF>, <numeric code><CR><LF>
+ *  true  - <CR><LF><text><CR><LF>, <CR><LF><verbose code><CR><LF>
+ *  false - <text><CR><LF>, <numeric code><CR><LF>
  */
-int at_response_format_v1 = TRUE;
+bool at_response_format_v1 = true;
 
 /****************************************************************************/
 /*******************  L O C A L    D E F I N I T I O N S  *******************/
diff --git a/openair3/NAS/UE/EMM/Attach.c b/openair3/NAS/UE/EMM/Attach.c
index 5e7a1f578b76c68803089cb52fd1cda893b7b6fa..52f7ebce4488d0d6b39455122aa3d7f2ef518961 100644
--- a/openair3/NAS/UE/EMM/Attach.c
+++ b/openair3/NAS/UE/EMM/Attach.c
@@ -146,7 +146,7 @@ int emm_proc_attach(nas_user_t *user, emm_proc_attach_type_t type)
 
   /* Update the emergency bearer service indicator */
   if (type == EMM_ATTACH_TYPE_EMERGENCY) {
-    user->emm_data->is_emergency = TRUE;
+    user->emm_data->is_emergency = true;
   }
 
   /* Setup initial NAS information message to transfer */
@@ -211,7 +211,7 @@ int emm_proc_attach(nas_user_t *user, emm_proc_attach_type_t type)
   }
 
   /* Setup EPS NAS security data */
-  emm_as_set_security_data(&emm_as->sctx, user->emm_data->security, FALSE, FALSE);
+  emm_as_set_security_data(&emm_as->sctx, user->emm_data->security, false, false);
   emm_as->ksi = EMM_AS_NO_KEY_AVAILABLE;
 
   if (user->emm_data->security) {
@@ -230,8 +230,8 @@ int emm_proc_attach(nas_user_t *user, emm_proc_attach_type_t type)
    * is requested to setup a default EPS bearer
    */
   esm_sap.primitive = ESM_PDN_CONNECTIVITY_REQ;
-  esm_sap.is_standalone = FALSE;
-  esm_sap.data.pdn_connect.is_defined = TRUE;
+  esm_sap.is_standalone = false;
+  esm_sap.data.pdn_connect.is_defined = true;
   esm_sap.data.pdn_connect.cid = 1;
   /* TODO: PDN type should be set according to the IP capability of the UE */
   esm_sap.data.pdn_connect.pdn_type = NET_PDN_TYPE_IPV4;
@@ -387,7 +387,7 @@ int emm_proc_attach_accept(nas_user_t *user, long t3412, long t3402, long t3423,
 
   if (n_eplmns > 0) {
     for (i = 0; (i < n_eplmns) && (i < EMM_DATA_EPLMN_MAX); i++) {
-      int is_forbidden = FALSE;
+      bool is_forbidden = false;
 
       if (!user->emm_data->is_emergency) {
         /* If the attach procedure is not for emergency bearer
@@ -395,7 +395,7 @@ int emm_proc_attach_accept(nas_user_t *user, long t3412, long t3402, long t3423,
          * code that is already in the list of forbidden PLMNs */
         for (j = 0; j < user->emm_data->fplmn.n_plmns; j++) {
           if (PLMNS_ARE_EQUAL(eplmn[i], user->emm_data->fplmn.plmn[j])) {
-            is_forbidden = TRUE;
+            is_forbidden = true;
             break;
           }
         }
@@ -418,7 +418,7 @@ int emm_proc_attach_accept(nas_user_t *user, long t3412, long t3402, long t3423,
    * Notify ESM that a default EPS bearer has to be activated
    */
   esm_sap.primitive = ESM_DEFAULT_EPS_BEARER_CONTEXT_ACTIVATE_REQ;
-  esm_sap.is_standalone = FALSE;
+  esm_sap.is_standalone = false;
   esm_sap.recv = esm_msg_pP;
   rc = esm_sap_send(user, &esm_sap);
 
@@ -445,7 +445,7 @@ int emm_proc_attach_accept(nas_user_t *user, long t3412, long t3402, long t3423,
     emm_sap.u.emm_as.u.data.ueid = user->ueid;
     /* Setup EPS NAS security data */
     emm_as_set_security_data(&emm_sap.u.emm_as.u.data.sctx,
-                             user->emm_data->security, FALSE, TRUE);
+                             user->emm_data->security, false, true);
     /* Get the activate default EPS bearer context accept message
      * to be transfered within the ESM container of the attach
      * complete message */
@@ -546,7 +546,7 @@ int emm_proc_attach_reject(nas_user_t *user, int emm_cause, const OctetString *e
   case EMM_CAUSE_EPS_NOT_ALLOWED:
   case EMM_CAUSE_BOTH_NOT_ALLOWED:
     /* Consider the USIM as invalid for EPS services */
-    user->emm_data->usim_is_valid = FALSE;
+    user->emm_data->usim_is_valid = false;
     /* Delete the list of equivalent PLMNs */
     user->emm_data->nvdata.eplmn.n_plmns = 0;
     break;
@@ -682,7 +682,7 @@ int emm_proc_attach_reject(nas_user_t *user, int emm_cause, const OctetString *e
   if (esm_msg_pP != NULL) {
     esm_sap_t esm_sap;
     esm_sap.primitive = ESM_PDN_CONNECTIVITY_REJ;
-    esm_sap.is_standalone = FALSE;
+    esm_sap.is_standalone = false;
     esm_sap.recv = esm_msg_pP;
     rc = esm_sap_send(user, &esm_sap);
   }
@@ -731,7 +731,7 @@ int emm_proc_attach_complete(void *args)
 
   /* Set the EPS update status to EU1 UPDATED */
   user->emm_data->status = EU1_UPDATED;
-  user->emm_data->is_attached = TRUE;
+  user->emm_data->is_attached = true;
 
   /*
    * Notify EMM that network attach complete message has been delivered
@@ -747,7 +747,7 @@ int emm_proc_attach_complete(void *args)
      * Complete message
      */
     esm_sap.primitive = ESM_DEFAULT_EPS_BEARER_CONTEXT_ACTIVATE_CNF;
-    esm_sap.is_standalone = FALSE;
+    esm_sap.is_standalone = false;
     rc = esm_sap_send(user, &esm_sap);
   }
 
@@ -766,7 +766,7 @@ int emm_proc_attach_complete(void *args)
  **      The  UE  shall restart the attach  procedure when timer   **
  **      T3411 expires.                                            **
  **                                                                        **
- ** Inputs:  is_initial:    TRUE if the NAS message that failed to be  **
+ ** Inputs:  is_initial:    true if the NAS message that failed to be  **
  **             transfered is an initial NAS message (ESM  **
  **             message embedded within an Attach Request  **
  **             message)                                   **
@@ -778,7 +778,7 @@ int emm_proc_attach_complete(void *args)
  **      Others:    T3410, T3411                               **
  **                                                                        **
  ***************************************************************************/
-int emm_proc_attach_failure(int is_initial, void *args)
+int emm_proc_attach_failure(bool is_initial, void *args)
 {
   LOG_FUNC_IN;
   int rc = RETURNok;
@@ -804,7 +804,7 @@ int emm_proc_attach_failure(int is_initial, void *args)
      * to be transmitted
      */
     esm_sap.primitive = ESM_PDN_CONNECTIVITY_REJ;
-    esm_sap.is_standalone = FALSE;
+    esm_sap.is_standalone = false;
     esm_sap.recv = NULL;
   } else {
     /*
@@ -813,7 +813,7 @@ int emm_proc_attach_failure(int is_initial, void *args)
      * has failed to be transmitted
      */
     esm_sap.primitive = ESM_DEFAULT_EPS_BEARER_CONTEXT_ACTIVATE_REJ;
-    esm_sap.is_standalone = FALSE;
+    esm_sap.is_standalone = false;
     esm_sap.recv = NULL;
   }
 
@@ -919,7 +919,7 @@ int emm_proc_attach_set_emergency(emm_data_t *emm_data)
   LOG_TRACE(WARNING, "EMM-PROC  - UE is now attached to the network for "
             "emergency bearer services only");
 
-  emm_data->is_emergency = TRUE;
+  emm_data->is_emergency = true;
 
   LOG_FUNC_RETURN(RETURNok);
 }
@@ -950,7 +950,7 @@ int emm_proc_attach_set_detach(void *nas_user)
             "EMM-PROC  - UE is now locally detached from the network");
 
   /* Reset the network attachment indicator */
-  user->emm_data->is_attached = FALSE;
+  user->emm_data->is_attached = false;
   /*
    * Notify that the UE is locally detached from the network
    */
diff --git a/openair3/NAS/UE/EMM/Authentication.c b/openair3/NAS/UE/EMM/Authentication.c
index a2762d08e838461323728a9f205fef783df9395f..a3b58f89f42bf5f5cd8aca173629ba623954058f 100644
--- a/openair3/NAS/UE/EMM/Authentication.c
+++ b/openair3/NAS/UE/EMM/Authentication.c
@@ -129,7 +129,7 @@ static int _authentication_kasme(const OctetString *autn,
  **      authentication challenge data and respond with an AUTHEN- **
  **      TICATION RESPONSE message to the network.                 **
  **                                                                        **
- ** Inputs:  native_ksi:    TRUE if the security context is of type    **
+ ** Inputs:  native_ksi:    true if the security context is of type    **
  **             native (for KSIASME)                       **
  **      ksi:       The NAS ket sey identifier                 **
  **      rand:      Authentication parameter RAND              **
@@ -179,14 +179,14 @@ int emm_proc_authentication_request(nas_user_t *user, int native_ksi, int ksi,
   OctetString res = {AUTH_RES_SIZE, authentication_data->res};
 
   if ((memcmp(authentication_data->rand, rand->value, AUTH_CK_SIZE) != 0) ||
-      (authentication_data->auth_process_started == FALSE)) {
+      (authentication_data->auth_process_started == false)) {
     /*
      * There is no valid stored RAND in the ME or the stored RAND is
      * different from the new received value in the AUTHENTICATION
      * REQUEST message OR if this is first time UE starting the
      * Authentication process
      */
-	authentication_data->auth_process_started = TRUE;
+	authentication_data->auth_process_started = true;
     OctetString auts;
     auts.length = 0;
     auts.value = (uint8_t *)malloc(AUTH_AUTS_SIZE);
@@ -308,7 +308,7 @@ int emm_proc_authentication_request(nas_user_t *user, int native_ksi, int ksi,
   emm_sap.u.emm_as.u.security.res = &res;
   /* Setup EPS NAS security data */
   emm_as_set_security_data(&emm_sap.u.emm_as.u.security.sctx,
-                           user->emm_data->security, FALSE, TRUE);
+                           user->emm_data->security, false, true);
   rc = emm_sap_send(user, &emm_sap);
 
   if (rc != RETURNerror) {
@@ -398,7 +398,7 @@ int emm_proc_authentication_reject(nas_user_t *user)
   }
 
   /* Consider the USIM invalid */
-  user->emm_data->usim_is_valid = FALSE;
+  user->emm_data->usim_is_valid = false;
 
   /* Stop timer T3410 */
   if (emm_timers->T3410.id != NAS_TIMER_INACTIVE_ID) {
@@ -652,7 +652,7 @@ static int _authentication_abnormal_cases_cde(nas_user_t *user, int emm_cause,
   emm_sap.u.emm_as.u.security.auts = auts;
   /* Setup EPS NAS security data */
   emm_as_set_security_data(&emm_sap.u.emm_as.u.security.sctx,
-                           user->emm_data->security, FALSE, TRUE);
+                           user->emm_data->security, false, true);
   rc = emm_sap_send(user, &emm_sap);
 
   if (rc != RETURNerror) {
diff --git a/openair3/NAS/UE/EMM/Detach.c b/openair3/NAS/UE/EMM/Detach.c
index b61bcdc14dc7e7ea1d04ff61896ca4db7137d01e..654486226e0cd00b615b5bf366e1b9bc96777aec 100644
--- a/openair3/NAS/UE/EMM/Detach.c
+++ b/openair3/NAS/UE/EMM/Detach.c
@@ -114,7 +114,7 @@ static int _emm_detach_abort(nas_user_t *user, emm_proc_detach_type_t type);
  **      Return:    RETURNok, RETURNerror                      **
  **                                                                        **
  ***************************************************************************/
-int emm_proc_detach(nas_user_t *user, emm_proc_detach_type_t type, int switch_off)
+int emm_proc_detach(nas_user_t *user, emm_proc_detach_type_t type, bool switch_off)
 {
   LOG_FUNC_IN;
 
@@ -154,7 +154,7 @@ int emm_proc_detach(nas_user_t *user, emm_proc_detach_type_t type, int switch_of
   emm_as->guti = user->emm_data->guti;
   emm_as->ueid = user->ueid;
   /* Setup EPS NAS security data */
-  emm_as_set_security_data(&emm_as->sctx, user->emm_data->security, FALSE, TRUE);
+  emm_as_set_security_data(&emm_as->sctx, user->emm_data->security, false, true);
 
   /*
    * Notify EMM-AS SAP that Detach Request message has to
@@ -280,7 +280,7 @@ int emm_proc_detach_accept(void* args)
  **      Others:    None                                       **
  **                                                                        **
  ***************************************************************************/
-int emm_proc_detach_failure(int is_initial, void *args)
+int emm_proc_detach_failure(bool is_initial, void *args)
 {
   LOG_FUNC_IN;
 
@@ -405,8 +405,7 @@ void *emm_detach_t3421_handler(void *args)
     emm_as->guti = user->emm_data->guti;
     emm_as->ueid = user->ueid;
     /* Setup EPS NAS security data */
-    emm_as_set_security_data(&emm_as->sctx, user->emm_data->security,
-                             FALSE, TRUE);
+    emm_as_set_security_data(&emm_as->sctx, user->emm_data->security, false, true);
 
     /*
      * Notify EMM-AS SAP that Detach Request message has to
diff --git a/openair3/NAS/UE/EMM/EmmStatusHdl.c b/openair3/NAS/UE/EMM/EmmStatusHdl.c
index 367d0327f4f1c6d6984adf44651c416da839b262..9ac2fc794b91a7d9397b28ab29c0456aa8b1ac43 100644
--- a/openair3/NAS/UE/EMM/EmmStatusHdl.c
+++ b/openair3/NAS/UE/EMM/EmmStatusHdl.c
@@ -137,8 +137,7 @@ int emm_proc_status(nas_user_t *user, int emm_cause)
   emm_sap.u.emm_as.u.status.guti = user->emm_data->guti;
   sctx = user->emm_data->security;
   /* Setup EPS NAS security data */
-  emm_as_set_security_data(&emm_sap.u.emm_as.u.status.sctx, sctx,
-                           FALSE, TRUE);
+  emm_as_set_security_data(&emm_sap.u.emm_as.u.status.sctx, sctx, false, true);
 
   rc = emm_sap_send(user, &emm_sap);
 
diff --git a/openair3/NAS/UE/EMM/Identification.c b/openair3/NAS/UE/EMM/Identification.c
index 0364c6d22f2c79797a345aa2596c61e6b67ed1a2..d4fc85a931bcb6fab0cf7b39ee1f8560e4850554 100644
--- a/openair3/NAS/UE/EMM/Identification.c
+++ b/openair3/NAS/UE/EMM/Identification.c
@@ -199,8 +199,7 @@ int emm_proc_identification_request(nas_user_t *user, emm_proc_identity_type_t t
   emm_sap.u.emm_as.u.security.ueid = user->ueid;
   emm_sap.u.emm_as.u.security.msgType = EMM_AS_MSG_TYPE_IDENT;
   /* Setup EPS NAS security data */
-  emm_as_set_security_data(&emm_sap.u.emm_as.u.security.sctx,
-                           user->emm_data->security, FALSE, TRUE);
+  emm_as_set_security_data(&emm_sap.u.emm_as.u.security.sctx, user->emm_data->security, false, true);
   rc = emm_sap_send(user, &emm_sap);
 
   LOG_FUNC_RETURN (rc);
diff --git a/openair3/NAS/UE/EMM/IdleMode.c b/openair3/NAS/UE/EMM/IdleMode.c
index 362d5e5b4af56ec9c677d7844ce51da9c0d7e007..50a318355c534cd26fe69730d0b0d03e8c75fcdd 100644
--- a/openair3/NAS/UE/EMM/IdleMode.c
+++ b/openair3/NAS/UE/EMM/IdleMode.c
@@ -663,8 +663,8 @@ int emm_proc_plmn_selection(nas_user_t *user, int index)
  **      to camp on an acceptable cell, irrespective of its PLMN   **
  **      identity, so that only emergency calls can be made.       **
  **                                                                        **
- ** Inputs:  found:     TRUE if a suitable cell of the chosen      **
- **             PLMN has been found; FALSE otherwise.      **
+ ** Inputs:  found:     true if a suitable cell of the chosen      **
+ **             PLMN has been found; false otherwise.      **
  **      tac:       The code of the location/tracking area the **
  **             chosen PLMN belongs to                     **
  **      ci:        The identifier of the cell                 **
@@ -685,7 +685,7 @@ int emm_proc_plmn_selection_end(nas_user_t *user, int found, tac_t tac, ci_t ci,
   emm_plmn_list_t *emm_plmn_list = user->emm_plmn_list;
   user_api_id_t *user_api_id = user->user_api_id;
   int index = emm_plmn_list->index;
-  int select_next_plmn = FALSE;
+  bool select_next_plmn = false;
 
   LOG_TRACE(INFO, "EMM-IDLE  - %s cell found for PLMN %d in %s mode",
             (found)? "One" : "No", index,
@@ -694,7 +694,7 @@ int emm_proc_plmn_selection_end(nas_user_t *user, int found, tac_t tac, ci_t ci,
             "Automatic/manual");
 
   if (found) {
-    int is_forbidden = FALSE;
+    bool is_forbidden = false;
 
     /* Select the PLMN of which a suitable cell has been found */
     emm_data->splmn = *emm_plmn_list->plmn[index];
@@ -721,7 +721,7 @@ int emm_proc_plmn_selection_end(nas_user_t *user, int found, tac_t tac, ci_t ci,
       /* Check if the selected PLMN is in the forbidden list */
       for (i = 0; i < emm_data->fplmn.n_plmns; i++) {
         if (PLMNS_ARE_EQUAL(emm_data->splmn, emm_data->fplmn.plmn[i])) {
-          is_forbidden = TRUE;
+          is_forbidden = true;
           break;
         }
       }
@@ -730,7 +730,7 @@ int emm_proc_plmn_selection_end(nas_user_t *user, int found, tac_t tac, ci_t ci,
         for (i = 0; i < emm_data->fplmn_gprs.n_plmns; i++) {
           if (PLMNS_ARE_EQUAL(emm_data->splmn,
                               emm_data->fplmn_gprs.plmn[i])) {
-            is_forbidden = TRUE;
+            is_forbidden = true;
             break;
           }
         }
@@ -745,7 +745,7 @@ int emm_proc_plmn_selection_end(nas_user_t *user, int found, tac_t tac, ci_t ci,
       if (!is_forbidden) {
         for (i = 0; i < emm_data->ftai.n_tais; i++) {
           if (TAIS_ARE_EQUAL(tai, emm_data->ftai.tai[i])) {
-            is_forbidden = TRUE;
+            is_forbidden = true;
             break;
           }
         }
@@ -754,7 +754,7 @@ int emm_proc_plmn_selection_end(nas_user_t *user, int found, tac_t tac, ci_t ci,
       if (!is_forbidden) {
         for (i = 0; i < emm_data->ftai_roaming.n_tais; i++) {
           if (TAIS_ARE_EQUAL(tai, emm_data->ftai_roaming.tai[i])) {
-            is_forbidden = TRUE;
+            is_forbidden = true;
             break;
           }
         }
@@ -793,7 +793,7 @@ int emm_proc_plmn_selection_end(nas_user_t *user, int found, tac_t tac, ci_t ci,
      * Try to select the next PLMN in the ordered list of available PLMNs
      */
     index += 1;
-    select_next_plmn = TRUE;
+    select_next_plmn = true;
 
     /* Bypass the previously selected PLMN */
     if (index == emm_plmn_list->splmn) {
@@ -809,7 +809,7 @@ int emm_proc_plmn_selection_end(nas_user_t *user, int found, tac_t tac, ci_t ci,
      * registered or equivalent PLMNs is ongoing
      */
     index += 1;
-    select_next_plmn = TRUE;
+    select_next_plmn = true;
   }
 
   else if (emm_data->plmn_mode == EMM_DATA_PLMN_MANUAL) {
@@ -830,7 +830,7 @@ int emm_proc_plmn_selection_end(nas_user_t *user, int found, tac_t tac, ci_t ci,
      */
     emm_data->plmn_mode = EMM_DATA_PLMN_AUTO;
     index = emm_plmn_list->hplmn;
-    select_next_plmn = TRUE;
+    select_next_plmn = true;
   }
 
   /*
@@ -851,7 +851,7 @@ int emm_proc_plmn_selection_end(nas_user_t *user, int found, tac_t tac, ci_t ci,
     } else {
       /* No suitable cell of any PLMN within the ordered list
        * of available PLMNs has been found */
-      select_next_plmn = FALSE;
+      select_next_plmn = false;
       emm_sap.primitive = EMMREG_NO_CELL;
     }
   }
@@ -892,11 +892,11 @@ int emm_proc_plmn_selection_end(nas_user_t *user, int found, tac_t tac, ci_t ci,
       if (emm_plmn_list->splmn == emm_plmn_list->rplmn) {
         /* The selected PLMN is the registered PLMN */
         LOG_TRACE(INFO, "EMM-IDLE  - The selected PLMN is the registered PLMN");
-        emm_data->is_rplmn = TRUE;
+        emm_data->is_rplmn = true;
       } else if (emm_plmn_list->splmn < emm_plmn_list->hplmn) {
         /* The selected PLMN is in the list of equivalent PLMNs */
         LOG_TRACE(INFO, "EMM-IDLE  - The selected PLMN is in the list of equivalent PLMNs");
-        emm_data->is_eplmn = TRUE;
+        emm_data->is_eplmn = true;
       }
 
       /*
diff --git a/openair3/NAS/UE/EMM/LowerLayer.c b/openair3/NAS/UE/EMM/LowerLayer.c
index 01b07fc35606b7662c6f7d545fb6c681fd1bcb9e..538ba210991e0c8d13ef2f755474ccd4f25c60ac 100644
--- a/openair3/NAS/UE/EMM/LowerLayer.c
+++ b/openair3/NAS/UE/EMM/LowerLayer.c
@@ -208,7 +208,7 @@ int lowerlayer_data_ind(nas_user_t *user, const OctetString *data)
   LOG_FUNC_IN;
 
   esm_sap.primitive = ESM_UNITDATA_IND;
-  esm_sap.is_standalone = TRUE;
+  esm_sap.is_standalone = true;
   esm_sap.ueid = user->ueid;
 
   esm_sap.recv = data;
@@ -250,7 +250,7 @@ int lowerlayer_data_req(nas_user_t *user, const OctetString *data)
   emm_sap.u.emm_as.u.data.NASmsg.length = data->length;
   emm_sap.u.emm_as.u.data.NASmsg.value = data->value;
   /* Setup EPS NAS security data */
-  emm_as_set_security_data(&emm_sap.u.emm_as.u.data.sctx, sctx, FALSE, TRUE);
+  emm_as_set_security_data(&emm_sap.u.emm_as.u.data.sctx, sctx, false, true);
   rc = emm_sap_send(user, &emm_sap);
 
   LOG_FUNC_RETURN (rc);
@@ -336,7 +336,7 @@ int emm_proc_lowerlayer_success(lowerlayer_data_t *lowerlayer_data)
  ** Description: Handles EMM procedure to be executed upon receiving noti- **
  **      fication that data failed to be delivered to the network. **
  **                                                                        **
- ** Inputs:  is_initial:    TRUE if the NAS message that failed to be  **
+ ** Inputs:  is_initial:    true if the NAS message that failed to be  **
  **             transfered is an initial NAS message       **
  **      Others:    None                                       **
  **                                                                        **
@@ -345,7 +345,7 @@ int emm_proc_lowerlayer_success(lowerlayer_data_t *lowerlayer_data)
  **      Others:    None                                       **
  **                                                                        **
  ***************************************************************************/
-int emm_proc_lowerlayer_failure(lowerlayer_data_t *lowerlayer_data, int is_initial)
+int emm_proc_lowerlayer_failure(lowerlayer_data_t *lowerlayer_data, bool is_initial)
 {
   LOG_FUNC_IN;
 
diff --git a/openair3/NAS/UE/EMM/LowerLayer.h b/openair3/NAS/UE/EMM/LowerLayer.h
index 0d8eefc7f3830170be3625e420df6526e39e1db2..ed60e379bc7f7be42df25efb92ad66505ef15400 100644
--- a/openair3/NAS/UE/EMM/LowerLayer.h
+++ b/openair3/NAS/UE/EMM/LowerLayer.h
@@ -72,7 +72,7 @@ int emm_proc_lowerlayer_initialize(lowerlayer_data_t *lowerlayer_data, lowerlaye
                                    lowerlayer_release_callback_t release,
                                    void *args);
 int emm_proc_lowerlayer_success(lowerlayer_data_t *lowerlayer_data);
-int emm_proc_lowerlayer_failure(lowerlayer_data_t *lowerlayer_data, int is_initial);
+int emm_proc_lowerlayer_failure(lowerlayer_data_t *lowerlayer_data, bool is_initial);
 int emm_proc_lowerlayer_release(lowerlayer_data_t *lowerlayer_data);
 
 
diff --git a/openair3/NAS/UE/EMM/LowerLayer_defs.h b/openair3/NAS/UE/EMM/LowerLayer_defs.h
index 6035d4ed12db9111ef0bd75e7f81a550c4e58018..1a0ae7d6564719fc1f61a95eb729b73c71759c23 100644
--- a/openair3/NAS/UE/EMM/LowerLayer_defs.h
+++ b/openair3/NAS/UE/EMM/LowerLayer_defs.h
@@ -11,7 +11,7 @@ typedef int (*lowerlayer_success_callback_t)(void *);
  * Type of EMM procedure callback function executed when data are not
  * delivered to the network because a lower layer failure occurred
  */
-typedef int (*lowerlayer_failure_callback_t)(int, void *);
+typedef int (*lowerlayer_failure_callback_t)(bool, void *);
 
 /*
  * Type of EMM procedure callback function executed when NAS signalling
diff --git a/openair3/NAS/UE/EMM/SAP/EmmDeregisteredAttemptingToAttach.c b/openair3/NAS/UE/EMM/SAP/EmmDeregisteredAttemptingToAttach.c
index f58cf4b9e0928a01ab2abfe425ebad06985fc0db..3fa47094c7b2e0199e59bcb814d4ec8669775236 100644
--- a/openair3/NAS/UE/EMM/SAP/EmmDeregisteredAttemptingToAttach.c
+++ b/openair3/NAS/UE/EMM/SAP/EmmDeregisteredAttemptingToAttach.c
@@ -120,7 +120,7 @@ int EmmDeregisteredAttemptingToAttach(nas_user_t *user, const emm_reg_t *evt)
     /*
      * Data failed to be delivered to the network
      */
-    rc = emm_proc_lowerlayer_failure(user->lowerlayer_data, FALSE);
+    rc = emm_proc_lowerlayer_failure(user->lowerlayer_data, false);
     break;
 
   default:
diff --git a/openair3/NAS/UE/EMM/SAP/EmmDeregisteredLimitedService.c b/openair3/NAS/UE/EMM/SAP/EmmDeregisteredLimitedService.c
index 4310f963cd41b87cffa509c059ef3f617e595df9..c0763009b850a20160799b308eea592b6fc24218 100644
--- a/openair3/NAS/UE/EMM/SAP/EmmDeregisteredLimitedService.c
+++ b/openair3/NAS/UE/EMM/SAP/EmmDeregisteredLimitedService.c
@@ -133,7 +133,7 @@ int EmmDeregisteredLimitedService(nas_user_t *user, const emm_reg_t *evt)
     /*
      * Initial NAS message failed to be delivered to the network
      */
-    rc = emm_proc_lowerlayer_failure(user->lowerlayer_data, TRUE);
+    rc = emm_proc_lowerlayer_failure(user->lowerlayer_data, true);
     break;
 
   case _EMMREG_LOWERLAYER_RELEASE:
diff --git a/openair3/NAS/UE/EMM/SAP/EmmDeregisteredNormalService.c b/openair3/NAS/UE/EMM/SAP/EmmDeregisteredNormalService.c
index f77c2921a319070eebc069f392ed13c27afcec26..0925cb4e0f2dfa8620efdc1d413bdc7ccb2e7267 100644
--- a/openair3/NAS/UE/EMM/SAP/EmmDeregisteredNormalService.c
+++ b/openair3/NAS/UE/EMM/SAP/EmmDeregisteredNormalService.c
@@ -141,7 +141,7 @@ int EmmDeregisteredNormalService(nas_user_t *user, const emm_reg_t *evt)
     /*
      * Initial NAS message failed to be delivered to the network
      */
-    rc = emm_proc_lowerlayer_failure(user->lowerlayer_data, TRUE);
+    rc = emm_proc_lowerlayer_failure(user->lowerlayer_data, true);
     break;
 
   case _EMMREG_LOWERLAYER_RELEASE:
diff --git a/openair3/NAS/UE/EMM/SAP/EmmRegistered.c b/openair3/NAS/UE/EMM/SAP/EmmRegistered.c
index fbd3e1ce63e18fe14bd96b42102553111c323ea6..2cd25f77d60d253e5287321e83d77dea2aa8b187 100644
--- a/openair3/NAS/UE/EMM/SAP/EmmRegistered.c
+++ b/openair3/NAS/UE/EMM/SAP/EmmRegistered.c
@@ -143,7 +143,7 @@ int EmmRegistered(nas_user_t *user, const emm_reg_t *evt)
     /*
      * Data transfer message failed to be delivered
      */
-    rc = emm_proc_lowerlayer_failure(user->lowerlayer_data, FALSE);
+    rc = emm_proc_lowerlayer_failure(user->lowerlayer_data, false);
     break;
 
   case _EMMREG_LOWERLAYER_RELEASE:
diff --git a/openair3/NAS/UE/EMM/SAP/EmmRegisteredInitiated.c b/openair3/NAS/UE/EMM/SAP/EmmRegisteredInitiated.c
index 36929fc4d7feb47b125b90d7ac92891812416327..a770e08bab2be3d82cff3f7714ccf6a22bacf7d6 100644
--- a/openair3/NAS/UE/EMM/SAP/EmmRegisteredInitiated.c
+++ b/openair3/NAS/UE/EMM/SAP/EmmRegisteredInitiated.c
@@ -240,7 +240,7 @@ int EmmRegisteredInitiated(nas_user_t *user, const emm_reg_t *evt)
      * any message transfered by EMM common procedures requested
      * by the network.
      */
-    rc = emm_proc_lowerlayer_failure(user->lowerlayer_data, FALSE);
+    rc = emm_proc_lowerlayer_failure(user->lowerlayer_data, false);
     break;
 
   case _EMMREG_LOWERLAYER_RELEASE:
diff --git a/openair3/NAS/UE/EMM/SAP/emm_as.c b/openair3/NAS/UE/EMM/SAP/emm_as.c
index ea4eefadeba8ffecb1097686de6e984d5f48889f..de6dee4a5e18e741a24a2a15e1b07b517a679649 100644
--- a/openair3/NAS/UE/EMM/SAP/emm_as.c
+++ b/openair3/NAS/UE/EMM/SAP/emm_as.c
@@ -679,7 +679,7 @@ static int _emm_as_cell_info_res(nas_user_t *user, const emm_as_cell_info_t *msg
 
   int AcT = NET_ACCESS_EUTRAN;
 
-  if (msg->found == TRUE) {
+  if (msg->found == true) {
     /* Get the first supported access technology */
     while (AcT != NET_ACCESS_UNAVAILABLE) {
       if (msg->rat & (1 << AcT)) {
@@ -1081,7 +1081,7 @@ static int _emm_as_data_req(const emm_data_t *emm_data, const emm_as_data_t *msg
   LOG_FUNC_IN;
   ul_info_transfer_req_t *as_msg = (ul_info_transfer_req_t *)ul_info_transfer_req_unaligned;
   int size = 0;
-  int is_encoded = FALSE;
+  bool is_encoded = false;
 
   LOG_TRACE(INFO, "EMMAS-SAP - Send AS data transfer request");
 
@@ -1114,7 +1114,7 @@ static int _emm_as_data_req(const emm_data_t *emm_data, const emm_as_data_t *msg
     default:
       /* Send other NAS messages as already encoded ESM messages */
       size = msg->NASmsg.length;
-      is_encoded = TRUE;
+      is_encoded = true;
       break;
     }
 
diff --git a/openair3/NAS/UE/EMM/SAP/emm_asDef.h b/openair3/NAS/UE/EMM/SAP/emm_asDef.h
index 7bd464ec04d377841818163f6636d724c7d626d4..4f6182a2c9c38d1867786d8c55986643918a2a11 100644
--- a/openair3/NAS/UE/EMM/SAP/emm_asDef.h
+++ b/openair3/NAS/UE/EMM/SAP/emm_asDef.h
@@ -150,7 +150,7 @@ typedef struct emm_as_establish_s {
   uint32_t ueid;      /* UE lower layer identifier         */
   emm_as_EPS_identity_t UEid; /* UE's EPS mobile identity      */
   emm_as_security_data_t sctx;/* EPS NAS security context      */
-  int switch_off;     /* TRUE if the UE is switched off    */
+  bool switch_off;     /* true if the UE is switched off    */
   uint8_t type;       /* Network attach/detach type        */
   uint8_t RRCcause;       /* Connection establishment cause    */
   uint8_t RRCtype;        /* Associated call type          */
@@ -194,7 +194,7 @@ typedef struct emm_as_data_s {
   uint32_t ueid;      /* UE lower layer identifier        */
   const GUTI_t *guti;     /* GUTI temporary mobile identity   */
   emm_as_security_data_t sctx;/* EPS NAS security context     */
-  int switch_off;     /* TRUE if the UE is switched off   */
+  bool switch_off;     /* true if the UE is switched off   */
   uint8_t type;       /* Network detach type          */
   uint8_t delivered;      /* Data message delivery indicator  */
 #define EMM_AS_NAS_DATA_ATTACH  0x01    /* Attach complete      */
diff --git a/openair3/NAS/UE/EMM/SAP/emm_esmDef.h b/openair3/NAS/UE/EMM/SAP/emm_esmDef.h
index aac37b46bfb6680df0dc907fd41a5eab0a150a58..6e7065f9139211b89fa3a900ece1f6178cfe2f14 100644
--- a/openair3/NAS/UE/EMM/SAP/emm_esmDef.h
+++ b/openair3/NAS/UE/EMM/SAP/emm_esmDef.h
@@ -71,9 +71,9 @@ typedef enum {
  * ---------------------------------------------
  */
 typedef struct {
-  int is_emergency;   /* Indicates whether the PDN connection is established
+  bool is_emergency;   /* Indicates whether the PDN connection is established
              * for emergency bearer services only       */
-  int is_attached;    /* Indicates whether the UE remains attached to the
+  bool is_attached;    /* Indicates whether the UE remains attached to the
              * network                  */
 } emm_esm_establish_t;
 
diff --git a/openair3/NAS/UE/EMM/SAP/emm_regDef.h b/openair3/NAS/UE/EMM/SAP/emm_regDef.h
index b66c0565ea6dfd0af0be73db21ae5c9c803bf82c..752f328375bc0d5764bf95472a60ad1192bdddd2 100644
--- a/openair3/NAS/UE/EMM/SAP/emm_regDef.h
+++ b/openair3/NAS/UE/EMM/SAP/emm_regDef.h
@@ -100,7 +100,7 @@ typedef struct {
  * -------------------------------------
  */
 typedef struct {
-  int is_emergency;   /* TRUE if the UE was attempting to register to
+  bool is_emergency;   /* true if the UE was attempting to register to
              * the network for emergency services only  */
 } emm_reg_attach_t;
 
@@ -109,7 +109,7 @@ typedef struct {
  * -------------------------------------
  */
 typedef struct {
-  int switch_off; /* TRUE if the UE is switched off       */
+  bool switch_off; /* true if the UE is switched off       */
   int type;       /* Network detach type              */
 } emm_reg_detach_t;
 
diff --git a/openair3/NAS/UE/EMM/SecurityModeControl.c b/openair3/NAS/UE/EMM/SecurityModeControl.c
index f9a02b1a7055a2e502d8fe758c16b101b474d31c..fd3332669b024581f5c659ccf79f543c9238874d 100644
--- a/openair3/NAS/UE/EMM/SecurityModeControl.c
+++ b/openair3/NAS/UE/EMM/SecurityModeControl.c
@@ -124,7 +124,7 @@ static void _security_release(emm_security_context_t *ctx);
  **      grity algorithm and ciphered with the selected NAS ciphe-         **
  **      ring algorithm.                                                   **
  **                                                                        **
- ** Inputs:  native_ksi:    TRUE if the security context is of type        **
+ ** Inputs:  native_ksi:    true if the security context is of type        **
  **             native (for KSIASME)                                       **
  **      ksi:       The NAS ket sey identifier                             **
  **      seea:      Selected EPS cyphering algorithm                       **
@@ -145,7 +145,7 @@ int emm_proc_security_mode_command(nas_user_t *user, int native_ksi, int ksi,
 
   int rc = RETURNerror;
   int emm_cause = EMM_CAUSE_SUCCESS;
-  int security_context_is_new = FALSE;
+  int security_context_is_new = false;
   security_data_t *security_data = user->security_data;
 
   LOG_TRACE(INFO, "EMM-PROC  - Security mode control requested (ksi=%d)",
@@ -263,7 +263,7 @@ int emm_proc_security_mode_command(nas_user_t *user, int native_ksi, int ksi,
           user->emm_data->security->ul_count.overflow = 0;
           user->emm_data->security->ul_count.seq_num = 0;
           /* Set new security context indicator */
-          security_context_is_new = TRUE;
+          security_context_is_new = true;
         }
       }
 
@@ -328,7 +328,7 @@ int emm_proc_security_mode_command(nas_user_t *user, int native_ksi, int ksi,
   emm_sap.u.emm_as.u.security.emm_cause = emm_cause;
   /* Setup EPS NAS security data */
   emm_as_set_security_data(&emm_sap.u.emm_as.u.security.sctx,
-                           user->emm_data->security, security_context_is_new, TRUE);
+                           user->emm_data->security, security_context_is_new, true);
   rc = emm_sap_send(user, &emm_sap);
 
   LOG_FUNC_RETURN (rc);
diff --git a/openair3/NAS/UE/EMM/emmData.h b/openair3/NAS/UE/EMM/emmData.h
index dfdfb34e77ecd90f9d36f2a6c382d56b4f636bbe..50219b788376782cc547146484fdb1623dfcf8ed 100644
--- a/openair3/NAS/UE/EMM/emmData.h
+++ b/openair3/NAS/UE/EMM/emmData.h
@@ -112,7 +112,7 @@ typedef struct {
 #define EMM_DETACH_COUNTER_MAX  5
   unsigned int count;      /* Counter used to limit the number of
                   * subsequently detach attempts    */
-  int switch_off;      /* UE switch-off indicator     */
+  bool switch_off;      /* UE switch-off indicator     */
   emm_proc_detach_type_t type; /* Type of the detach procedure
                   * currently in progress       */
 } emm_detach_data_t;
@@ -249,8 +249,8 @@ typedef struct emm_data_s {
 
   emm_eps_update_t    status;    /* The current EPS update status           */
   emm_ecm_state_t     ecm_status; /* The EPS Connection Management status   */
-  int                 is_attached;    /* Network attachment indicator       */
-  int                 is_emergency;   /* Emergency bearer services indicator*/
+  bool                is_attached;    /* Network attachment indicator       */
+  bool                is_emergency;   /* Emergency bearer services indicator*/
 
   /* Tracking Areas list the UE is registered to
    * Contains the list of TAIs that identify the tracking areas that
diff --git a/openair3/NAS/UE/EMM/emm_main.c b/openair3/NAS/UE/EMM/emm_main.c
index 329b59fae6746c312b3692b53393278952876369..74676c8b36baef3f685ba8a752a50080f7660daa 100644
--- a/openair3/NAS/UE/EMM/emm_main.c
+++ b/openair3/NAS/UE/EMM/emm_main.c
@@ -113,7 +113,7 @@ void _emm_attach_initialize(emm_attach_data_t *emm_attach_data) {
 
 void _emm_detach_initialize(emm_detach_data_t *emm_detach) {
   emm_detach->count = 0;
-  emm_detach->switch_off = FALSE;
+  emm_detach->switch_off = false;
   emm_detach->type = EMM_DETACH_TYPE_RESERVED;
 }
 
@@ -137,7 +137,7 @@ void emm_main_initialize(nas_user_t *user, emm_indication_callback_t cb, const c
   LOG_FUNC_IN;
   user->emm_data = calloc_or_fail(sizeof(emm_data_t));
   /* USIM validity indicator */
-  user->emm_data->usim_is_valid = FALSE;
+  user->emm_data->usim_is_valid = false;
   /* The IMEI read from the UE's non-volatile memory  */
   user->emm_data->imei = (imei_t *)malloc(sizeof(imei_t));
   user->emm_data->imei->length = _emm_main_get_imei(user->emm_data->imei, imei);
@@ -157,14 +157,14 @@ void emm_main_initialize(nas_user_t *user, emm_indication_callback_t cb, const c
   user->emm_data->plmn_rat = NET_ACCESS_UNAVAILABLE;
   /* Selected PLMN */
   memset(&user->emm_data->splmn, 0xFF, sizeof(plmn_t));
-  user->emm_data->is_rplmn = FALSE;
-  user->emm_data->is_eplmn = FALSE;
+  user->emm_data->is_rplmn = false;
+  user->emm_data->is_eplmn = false;
   /* Radio Access Technology of the serving cell */
   user->emm_data->rat = NET_ACCESS_UNAVAILABLE;
   /* Network registration status */
   user->emm_data->stat = NET_REG_STATE_OFF;
-  user->emm_data->is_attached = FALSE;
-  user->emm_data->is_emergency = FALSE;
+  user->emm_data->is_attached = false;
+  user->emm_data->is_emergency = false;
   /* Location/Tracking area code */
   user->emm_data->tac = 0;  // two byte in hexadecimal format
   /* Identifier of the serving cell */
@@ -201,7 +201,7 @@ void emm_main_initialize(nas_user_t *user, emm_indication_callback_t cb, const c
 
     /* The USIM application is present and valid */
     LOG_TRACE(INFO, "EMM-MAIN  - USIM application data successfully read");
-    user->emm_data->usim_is_valid = TRUE;
+    user->emm_data->usim_is_valid = true;
 
     /* print keys (for debugging) */
     {
@@ -844,12 +844,12 @@ AcT_t emm_main_get_plmn_rat(emm_data_t *emm_data)
  **      Others:    user->emm_data->                                 **
  **                                                                        **
  ** Outputs:     None                                                      **
- **      Return:    TRUE if the UE is currently attached to    **
- **             the network; FALSE otherwise.              **
+ **      Return:    true if the UE is currently attached to    **
+ **             the network; false otherwise.              **
  **      Others:    None                                       **
  **                                                                        **
  ***************************************************************************/
-int emm_main_is_attached(emm_data_t *emm_data)
+bool emm_main_is_attached(emm_data_t *emm_data)
 {
   LOG_FUNC_IN;
   LOG_FUNC_RETURN (emm_data->is_attached);
@@ -866,13 +866,13 @@ int emm_main_is_attached(emm_data_t *emm_data)
  **      Others:    user->emm_data->                                 **
  **                                                                        **
  ** Outputs:     None                                                      **
- **      Return:    TRUE if the UE is currently attached or is **
+ **      Return:    true if the UE is currently attached or is **
  **             attempting to attach to the network for    **
- **             emergency bearer services; FALSE otherwise **
+ **             emergency bearer services; false otherwise **
  **      Others:    None                                       **
  **                                                                        **
  ***************************************************************************/
-int emm_main_is_emergency(emm_data_t *emm_data)
+bool emm_main_is_emergency(emm_data_t *emm_data)
 {
   LOG_FUNC_IN;
   LOG_FUNC_RETURN (emm_data->is_attached && emm_data->is_emergency);
@@ -967,8 +967,8 @@ static int _emm_main_get_imei(imei_t *imei, const char *imei_str)
  **      Others:    None                                       **
  **                                                                        **
  ** Outputs:     None                                                      **
- **      Return:    TRUE if the first IMSI is found to match   **
- **             the second; FALSE otherwise.               **
+ **      Return:    true if the first IMSI is found to match   **
+ **             the second; false otherwise.               **
  **      Others:    None                                       **
  **                                                                        **
  ***************************************************************************/
@@ -977,16 +977,16 @@ static int _emm_main_imsi_cmp(imsi_t *imsi1, imsi_t *imsi2)
   int i;
 
   if (imsi1->length != imsi2->length) {
-    return FALSE;
+    return false;
   }
 
   for (i = 0; i < imsi1->length; i++) {
     if (imsi1->u.value[i] != imsi2->u.value[i]) {
-      return FALSE;
+      return false;
     }
   }
 
-  return TRUE;
+  return true;
 }
 
 /****************************************************************************
diff --git a/openair3/NAS/UE/EMM/emm_main.h b/openair3/NAS/UE/EMM/emm_main.h
index d30f778e3b7f7d2114e5d23c81da0cb393babcb2..d081024548ae4e2a4d705dd5a13e782990e5fb92 100644
--- a/openair3/NAS/UE/EMM/emm_main.h
+++ b/openair3/NAS/UE/EMM/emm_main.h
@@ -94,8 +94,8 @@ AcT_t emm_main_get_plmn_rat(emm_data_t *emm_data);
 const char *emm_main_get_registered_plmn(emm_plmn_list_t *emm_plmn_list, emm_data_t *emm_data, network_plmn_t *plmn, int format);
 
 /* User's getter for network attachment */
-int emm_main_is_attached(emm_data_t *emm_data);
-int emm_main_is_emergency(emm_data_t *emm_data);
+bool emm_main_is_attached(emm_data_t *emm_data);
+bool emm_main_is_emergency(emm_data_t *emm_data);
 
 
 #endif /* __EMM_MAIN_H__*/
diff --git a/openair3/NAS/UE/EMM/emm_proc.h b/openair3/NAS/UE/EMM/emm_proc.h
index 7d4024d9d63fd7a8ca228fe038db6f74e7311249..b93bb33bf16b7ebb31ed99b1d8d9b59bf5557feb 100644
--- a/openair3/NAS/UE/EMM/emm_proc.h
+++ b/openair3/NAS/UE/EMM/emm_proc.h
@@ -89,7 +89,7 @@ int emm_proc_attach_accept(nas_user_t *user, long T3412, long T3402, long T3423,
                            const OctetString *esm_msg);
 int emm_proc_attach_reject(nas_user_t *user, int emm_cause, const OctetString *esm_msg);
 int emm_proc_attach_complete(void *args);
-int emm_proc_attach_failure(int is_initial, void *args);
+int emm_proc_attach_failure(bool is_initial, void *args);
 int emm_proc_attach_release(void *args);
 int emm_proc_attach_restart(nas_user_t *user);
 
@@ -103,10 +103,10 @@ int emm_proc_attach_set_detach(void *user);
  *              Detach procedure
  * --------------------------------------------------------------------------
  */
-int emm_proc_detach(nas_user_t *user, emm_proc_detach_type_t type, int switch_off);
+int emm_proc_detach(nas_user_t *user, emm_proc_detach_type_t type, bool switch_off);
 int emm_proc_detach_request(void *args);
 int emm_proc_detach_accept(void *args);
-int emm_proc_detach_failure(int is_initial, void *args);
+int emm_proc_detach_failure(bool is_initial, void *args);
 int emm_proc_detach_release(void *args);
 
 
diff --git a/openair3/NAS/UE/ESM/DedicatedEpsBearerContextActivation.c b/openair3/NAS/UE/ESM/DedicatedEpsBearerContextActivation.c
index 21c3da3f195138e6dacbd6cba39c29b56b3c1a3c..db95dd648f7b3418d1166fb37a40ae4cc40f2273 100644
--- a/openair3/NAS/UE/ESM/DedicatedEpsBearerContextActivation.c
+++ b/openair3/NAS/UE/ESM/DedicatedEpsBearerContextActivation.c
@@ -131,7 +131,7 @@ int esm_proc_dedicated_eps_bearer_context_request(nas_user_t *user, int ebi, int
   }
 
   /* Assign dedicated EPS bearer context */
-  int new_ebi = esm_ebr_assign(user->esm_ebr_data, ebi, pid+1, FALSE);
+  int new_ebi = esm_ebr_assign(user->esm_ebr_data, ebi, pid+1, false);
 
   if (new_ebi == ESM_EBI_UNASSIGNED) {
     /* 3GPP TS 24.301, section 6.4.2.5, abnormal cases a and b
@@ -141,7 +141,7 @@ int esm_proc_dedicated_eps_bearer_context_request(nas_user_t *user, int ebi, int
     int old_pid, old_bid;
     /* Locally deactivate the existing EPS bearer context and proceed
      * with the requested dedicated EPS bearer context activation */
-    rc = esm_proc_eps_bearer_context_deactivate(user, TRUE, ebi,
+    rc = esm_proc_eps_bearer_context_deactivate(user, true, ebi,
          &old_pid, &old_bid);
 
     if (rc != RETURNok) {
@@ -149,7 +149,7 @@ int esm_proc_dedicated_eps_bearer_context_request(nas_user_t *user, int ebi, int
       *esm_cause = ESM_CAUSE_PROTOCOL_ERROR;
     } else {
       /* Assign new dedicated EPS bearer context */
-      ebi = esm_ebr_assign(user->esm_ebr_data, ebi, pid+1, FALSE);
+      ebi = esm_ebr_assign(user->esm_ebr_data, ebi, pid+1, false);
     }
   }
 
@@ -165,7 +165,7 @@ int esm_proc_dedicated_eps_bearer_context_request(nas_user_t *user, int ebi, int
       *esm_cause = ESM_CAUSE_SYNTACTICAL_ERROR_IN_PACKET_FILTER;
     } else {
       /* Create new dedicated EPS bearer context */
-      default_ebi = esm_ebr_context_create(esm_data, user->ueid, pid, ebi, FALSE, qos, tft);
+      default_ebi = esm_ebr_context_create(esm_data, user->ueid, pid, ebi, false, qos, tft);
 
       if (default_ebi != ESM_EBI_UNASSIGNED) {
         /* Dedicated EPS bearer contextx successfully created */
@@ -197,7 +197,7 @@ int esm_proc_dedicated_eps_bearer_context_request(nas_user_t *user, int ebi, int
  ** Inputs:  is_standalone: Not used                                   **
  **      ebi:       EPS bearer identity                        **
  **      msg:       Encoded ESM message to be sent             **
- **      ue_triggered:  TRUE if the EPS bearer context procedure   **
+ **      ue_triggered:  true if the EPS bearer context procedure   **
  **             was triggered by the UE                    **
  **      Others:    None                                       **
  **                                                                        **
@@ -206,8 +206,8 @@ int esm_proc_dedicated_eps_bearer_context_request(nas_user_t *user, int ebi, int
  **      Others:    None                                       **
  **                                                                        **
  ***************************************************************************/
-int esm_proc_dedicated_eps_bearer_context_accept(nas_user_t *user, int is_standalone, int ebi,
-    OctetString *msg, int ue_triggered)
+int esm_proc_dedicated_eps_bearer_context_accept(nas_user_t *user, bool is_standalone, int ebi,
+    OctetString *msg, bool ue_triggered)
 {
   LOG_FUNC_IN;
 
@@ -268,8 +268,8 @@ int esm_proc_dedicated_eps_bearer_context_accept(nas_user_t *user, int is_standa
  **      Others:    None                                       **
  **                                                                        **
  ***************************************************************************/
-int esm_proc_dedicated_eps_bearer_context_reject(nas_user_t *user, int is_standalone, int ebi,
-    OctetString *msg, int ue_triggered)
+int esm_proc_dedicated_eps_bearer_context_reject(nas_user_t *user, bool is_standalone, int ebi,
+    OctetString *msg, bool ue_triggered)
 {
   LOG_FUNC_IN;
 
diff --git a/openair3/NAS/UE/ESM/DefaultEpsBearerContextActivation.c b/openair3/NAS/UE/ESM/DefaultEpsBearerContextActivation.c
index 7c528d75691bc7527513074ba2c03db974834a64..f61b1498226a312738b4239e06596bfce533be91 100644
--- a/openair3/NAS/UE/ESM/DefaultEpsBearerContextActivation.c
+++ b/openair3/NAS/UE/ESM/DefaultEpsBearerContextActivation.c
@@ -103,7 +103,7 @@ int esm_proc_default_eps_bearer_context_request(nas_user_t *user, int pid, int e
             "requested by the network (ebi=%d)", ebi);
 
   /* Assign default EPS bearer context */
-  int new_ebi = esm_ebr_assign(user->esm_ebr_data, ebi, pid+1, TRUE);
+  int new_ebi = esm_ebr_assign(user->esm_ebr_data, ebi, pid+1, true);
 
   if (new_ebi == ESM_EBI_UNASSIGNED) {
     /* 3GPP TS 24.301, section 6.4.1.5, abnormal cases a and b
@@ -113,7 +113,7 @@ int esm_proc_default_eps_bearer_context_request(nas_user_t *user, int pid, int e
     int old_pid, old_bid;
     /* Locally deactivate the existing EPS bearer context and proceed
      * with the requested default EPS bearer context activation */
-    rc = esm_proc_eps_bearer_context_deactivate(user, TRUE, ebi,
+    rc = esm_proc_eps_bearer_context_deactivate(user, true, ebi,
          &old_pid, &old_bid);
 
     if (rc != RETURNok) {
@@ -121,13 +121,13 @@ int esm_proc_default_eps_bearer_context_request(nas_user_t *user, int pid, int e
       *esm_cause = ESM_CAUSE_PROTOCOL_ERROR;
     } else {
       /* Assign new default EPS bearer context */
-      ebi = esm_ebr_assign(user->esm_ebr_data, ebi, pid+1, TRUE);
+      ebi = esm_ebr_assign(user->esm_ebr_data, ebi, pid+1, true);
     }
   }
 
   if (ebi != ESM_EBI_UNASSIGNED) {
     /* Create new default EPS bearer context */
-    ebi = esm_ebr_context_create(esm_data, user->ueid, pid, ebi, TRUE, qos, NULL);
+    ebi = esm_ebr_context_create(esm_data, user->ueid, pid, ebi, true, qos, NULL);
 
     if (ebi != ESM_EBI_UNASSIGNED) {
       /* Default EPS bearer contextx successfully created */
@@ -165,9 +165,9 @@ int esm_proc_default_eps_bearer_context_request(nas_user_t *user, int pid, int e
  **             te message                                 **
  **      ebi:       EPS bearer identity                        **
  **      msg:       Encoded ESM message to be sent             **
- **      ue_triggered:  TRUE if the EPS bearer context procedure   **
+ **      ue_triggered:  true if the EPS bearer context procedure   **
  **             was triggered by the UE (should be always  **
- **             TRUE)                                      **
+ **             true)                                      **
  **      Others:    None                                       **
  **                                                                        **
  ** Outputs:     None                                                      **
@@ -175,8 +175,8 @@ int esm_proc_default_eps_bearer_context_request(nas_user_t *user, int pid, int e
  **      Others:    None                                       **
  **                                                                        **
  ***************************************************************************/
-int esm_proc_default_eps_bearer_context_accept(nas_user_t *user, int is_standalone, int ebi,
-    OctetString *msg, int ue_triggered)
+int esm_proc_default_eps_bearer_context_accept(nas_user_t *user, bool is_standalone, int ebi,
+    OctetString *msg, bool ue_triggered)
 {
   LOG_FUNC_IN;
 
@@ -245,8 +245,8 @@ int esm_proc_default_eps_bearer_context_accept(nas_user_t *user, int is_standalo
  **      Others:    None                                       **
  **                                                                        **
  ***************************************************************************/
-int esm_proc_default_eps_bearer_context_reject(nas_user_t *user, int is_standalone, int ebi,
-    OctetString *msg, int ue_triggered)
+int esm_proc_default_eps_bearer_context_reject(nas_user_t *user, bool is_standalone, int ebi,
+    OctetString *msg, bool ue_triggered)
 {
   LOG_FUNC_IN;
 
@@ -344,7 +344,7 @@ int esm_proc_default_eps_bearer_context_failure(nas_user_t *user)
             "ESM-PROC  - Default EPS bearer context activation failure");
 
   /* Release the default EPS bearer context and enter state INACTIVE */
-  int rc = esm_proc_eps_bearer_context_deactivate(user, TRUE, ebi, &pid, &bid);
+  int rc = esm_proc_eps_bearer_context_deactivate(user, true, ebi, &pid, &bid);
 
   if (rc != RETURNerror) {
     /* Reset default EPS bearer context internal data */
diff --git a/openair3/NAS/UE/ESM/EpsBearerContextDeactivation.c b/openair3/NAS/UE/ESM/EpsBearerContextDeactivation.c
index 5adbae05c6fee7337d18522f57b6101f8969d891..742e70cd4a72f886a133db9975d9234472953adc 100644
--- a/openair3/NAS/UE/ESM/EpsBearerContextDeactivation.c
+++ b/openair3/NAS/UE/ESM/EpsBearerContextDeactivation.c
@@ -97,7 +97,7 @@ static int _eps_bearer_release(nas_user_t *user, int ebi, int *pid, int *bid);
  **      has an EPS bearer context with specified EPS bearer iden- **
  **      tity activated.                                           **
  **                                                                        **
- ** Inputs:  is local:  TRUE if the EPS bearer context has to be   **
+ ** Inputs:  is local:  true if the EPS bearer context has to be   **
  **             locally released without peer-to-peer si-  **
  **             gnalling between the UE and the MME        **
  **      ebi:       EPS bearer identity of the EPS bearer con- **
@@ -111,7 +111,7 @@ static int _eps_bearer_release(nas_user_t *user, int ebi, int *pid, int *bid);
  **      Others:    None                                       **
  **                                                                        **
  ***************************************************************************/
-int esm_proc_eps_bearer_context_deactivate(nas_user_t *user, int is_local, int ebi,
+int esm_proc_eps_bearer_context_deactivate(nas_user_t *user, bool is_local, int ebi,
     int *pid, int *bid)
 {
   LOG_FUNC_IN;
@@ -213,7 +213,7 @@ int esm_proc_eps_bearer_context_deactivate_request(nas_user_t *user, int ebi, in
      * the PDN connection */
     if (*esm_cause == ESM_CAUSE_REACTIVATION_REQUESTED) {
       esm_sap_t esm_sap;
-      int active = FALSE;
+      bool active = false;
 
       /* 3GPP TS 24.301, section 6.4.4.3
        * The UE should re-initiate the UE requested PDN connectivity
@@ -242,8 +242,8 @@ int esm_proc_eps_bearer_context_deactivate_request(nas_user_t *user, int ebi, in
          * Notify ESM to re-initiate PDN connectivity procedure
          */
         esm_sap.primitive = ESM_PDN_CONNECTIVITY_REQ;
-        esm_sap.is_standalone = TRUE;
-        esm_sap.data.pdn_connect.is_defined = TRUE;
+        esm_sap.is_standalone = true;
+        esm_sap.data.pdn_connect.is_defined = true;
         esm_sap.data.pdn_connect.cid = pid + 1;
         rc = esm_sap_send(user, &esm_sap);
       }
@@ -265,10 +265,10 @@ int esm_proc_eps_bearer_context_deactivate_request(nas_user_t *user, int ebi, in
  **      DEACTIVATE EPS BEARER CONTEXT ACCEPT message and entering **
  **      the state BEARER CONTEXT INACTIVE.                        **
  **                                                                        **
- ** Inputs:  is_standalone: Should be always TRUE                      **
+ ** Inputs:  is_standalone: Should be always true                      **
  **      ebi:       EPS bearer identity                        **
  **      msg:       Encoded ESM message to be sent             **
- **      ue_triggered:  TRUE if the EPS bearer context procedure   **
+ **      ue_triggered:  true if the EPS bearer context procedure   **
  **             was triggered by the UE                    **
  **      Others:    None                                       **
  **                                                                        **
@@ -277,8 +277,8 @@ int esm_proc_eps_bearer_context_deactivate_request(nas_user_t *user, int ebi, in
  **      Others:    None                                       **
  **                                                                        **
  ***************************************************************************/
-int esm_proc_eps_bearer_context_deactivate_accept(nas_user_t *user, int is_standalone, int ebi,
-    OctetString *msg, int ue_triggered)
+int esm_proc_eps_bearer_context_deactivate_accept(nas_user_t *user, bool is_standalone, int ebi,
+    OctetString *msg, bool ue_triggered)
 {
   LOG_FUNC_IN;
 
@@ -371,7 +371,7 @@ static int _eps_bearer_release(nas_user_t *user, int ebi, int *pid, int *bid)
     LOG_TRACE(WARNING, "ESM-PROC  - Failed to release EPS bearer context");
   } else {
     /* Set the EPS bearer context state to INACTIVE */
-    rc = esm_ebr_set_status(user_api_id, esm_ebr_data, ebi, ESM_EBR_INACTIVE, FALSE);
+    rc = esm_ebr_set_status(user_api_id, esm_ebr_data, ebi, ESM_EBR_INACTIVE, false);
 
     if (rc != RETURNok) {
       /* The EPS bearer context was already in INACTIVE state */
diff --git a/openair3/NAS/UE/ESM/EsmStatusHdl.c b/openair3/NAS/UE/ESM/EsmStatusHdl.c
index def498a89b91ccc7d50cc6b4f6aa3d5cf7f5cebd..88f6550251f4d6413d950ed0ed943bb9998bacee 100644
--- a/openair3/NAS/UE/ESM/EsmStatusHdl.c
+++ b/openair3/NAS/UE/ESM/EsmStatusHdl.c
@@ -149,7 +149,7 @@ int esm_proc_status_ind(
  **                                                                        **
  ** Description: Initiates ESM status procedure.                           **
  **                                                                        **
- ** Inputs:  is_standalone: Not used - Always TRUE                     **
+ ** Inputs:  is_standalone: Not used - Always true                     **
  **      ueid:      UE lower layer identifier                  **
  **      ebi:       Not used                                   **
  **      msg:       Encoded ESM status message to be sent      **
@@ -161,9 +161,9 @@ int esm_proc_status_ind(
  **      Others:    None                                       **
  **                                                                        **
  ***************************************************************************/
-int esm_proc_status(nas_user_t *user, int is_standalone,
+int esm_proc_status(nas_user_t *user, bool is_standalone,
                     int ebi, OctetString *msg,
-                    int ue_triggered)
+                    bool ue_triggered)
 {
   LOG_FUNC_IN;
 
diff --git a/openair3/NAS/UE/ESM/PdnConnectivity.c b/openair3/NAS/UE/ESM/PdnConnectivity.c
index d17b5fde3c72341a94af41151acffbd4f2960c5e..a79320cccbd0d270d95bd96eba1a06d28d4eef3c 100644
--- a/openair3/NAS/UE/ESM/PdnConnectivity.c
+++ b/openair3/NAS/UE/ESM/PdnConnectivity.c
@@ -80,7 +80,7 @@ Description Defines the PDN connectivity ESM procedure executed by the
  * PDN connection handlers
  */
 static int _pdn_connectivity_create(esm_data_t *esm_data, int pid, const OctetString *apn,
-                                    esm_proc_pdn_type_t pdn_type, int is_emergency);
+                                    esm_proc_pdn_type_t pdn_type, bool is_emergency);
 static int _pdn_connectivity_update(esm_data_t *esm_data, int pid, const OctetString *apn,
                                     esm_proc_pdn_type_t pdn_type, const OctetString *pdn_addr, int esm_cause);
 static int _pdn_connectivity_delete(esm_data_t *esm_data, int pid);
@@ -121,7 +121,7 @@ static void *_pdn_connectivity_t3482_handler(void *);
  **             to be defined or undefined                 **
  **      pdn_type:  PDN connection type (IPv4, IPv6, IPv4v6)   **
  **      apn:       Access Point logical Name to be used       **
- **      is_emergency:  TRUE if the PDN connection has to be esta- **
+ **      is_emergency:  true if the PDN connection has to be esta- **
  **             blished for emergency bearer services      **
  **      Others:    None                                       **
  **                                                                        **
@@ -133,7 +133,7 @@ static void *_pdn_connectivity_t3482_handler(void *);
  ***************************************************************************/
 int esm_proc_pdn_connectivity(nas_user_t *user, int cid, int is_to_define,
                               esm_proc_pdn_type_t pdn_type,
-                              const OctetString *apn, int is_emergency,
+                              const OctetString *apn, bool is_emergency,
                               unsigned int *pti)
 {
     LOG_FUNC_IN;
@@ -270,7 +270,7 @@ int esm_proc_pdn_connectivity(nas_user_t *user, int cid, int is_to_define,
  **      pti:       Procedure transaction identity             **
  **      msg:       Encoded PDN connectivity request message   **
  **             to be sent                                 **
- **      sent_by_ue:    Not used - Always TRUE                     **
+ **      sent_by_ue:    Not used - Always true                     **
  **      Others:    None                                       **
  **                                                                        **
  ** Outputs:     None                                                      **
@@ -278,8 +278,8 @@ int esm_proc_pdn_connectivity(nas_user_t *user, int cid, int is_to_define,
  **      Others:    None                                       **
  **                                                                        **
  ***************************************************************************/
-int esm_proc_pdn_connectivity_request(nas_user_t *user, int is_standalone, int pti,
-                                      OctetString *msg, int sent_by_ue)
+int esm_proc_pdn_connectivity_request(nas_user_t *user, bool is_standalone, int pti,
+                                      OctetString *msg, bool sent_by_ue)
 {
     LOG_FUNC_IN;
     esm_pt_data_t *esm_pt_data = user->esm_pt_data;
@@ -523,7 +523,7 @@ int esm_proc_pdn_connectivity_complete(nas_user_t *user)
  **      PDN connectivity procedure which is still pending in the  **
  **      PROCEDURE TRANSACTION INACTIVE or PENDING state.          **
  **                                                                        **
- ** Inputs:  is_pending:    TRUE if this PDN connectivity procedure    **
+ ** Inputs:  is_pending:    true if this PDN connectivity procedure    **
  **             transaction is in the PENDING state        **
  **      Others:    None                                       **
  **                                                                        **
@@ -679,7 +679,7 @@ static void *_pdn_connectivity_t3482_handler(void *args)
  ** Inputs:  pid:       Identifier of the PDN connection entry     **
  **      apn:       Access Point Name of the PDN connection    **
  **      pdn_type:  PDN type (IPv4, IPv6, IPv4v6)              **
- **      is_emergency:  TRUE if the PDN connection has to be esta- **
+ **      is_emergency:  true if the PDN connection has to be esta- **
  **             blished for emergency bearer services      **
  **                                                                        **
  ** Outputs:     None                                                      **
@@ -688,7 +688,7 @@ static void *_pdn_connectivity_t3482_handler(void *args)
  ***************************************************************************/
 static int _pdn_connectivity_create(esm_data_t *esm_data, int pid, const OctetString *apn,
                                     esm_proc_pdn_type_t pdn_type,
-                                    int is_emergency)
+                                    bool is_emergency)
 {
     esm_pdn_t *pdn = NULL;
 
@@ -720,7 +720,7 @@ static int _pdn_connectivity_create(esm_data_t *esm_data, int pid, const OctetSt
         /* Set the PDN connection identifier */
         esm_data->pdn[pid].pid = pid;
         /* Reset the PDN connection active indicator */
-        esm_data->pdn[pid].is_active = FALSE;
+        esm_data->pdn[pid].is_active = false;
         /* Setup the PDN connection data */
         esm_data->pdn[pid].data = pdn;
     }
@@ -744,7 +744,7 @@ static int _pdn_connectivity_create(esm_data_t *esm_data, int pid, const OctetSt
     }
 
     pdn->type = pdn_type;
-    pdn->addr_realloc = FALSE;
+    pdn->addr_realloc = false;
 
     return (RETURNok);
 }
@@ -825,7 +825,7 @@ static int _pdn_connectivity_update(esm_data_t *esm_data, int pid, const OctetSt
          * the other IP version using the UE requested PDN connectivity
          * procedure to the same APN with a single address PDN type
          * (IPv4 or IPv6) other than the one already activated */
-        pdn->addr_realloc = TRUE;
+        pdn->addr_realloc = true;
     } else if ( (esm_cause == ESM_CAUSE_PDN_TYPE_IPV4_ONLY_ALLOWED) ||
                 (esm_cause == ESM_CAUSE_PDN_TYPE_IPV6_ONLY_ALLOWED) ) {
         /* The UE requested IPv4 or IPv6 address and the network allows
@@ -833,9 +833,9 @@ static int _pdn_connectivity_update(esm_data_t *esm_data, int pid, const OctetSt
          * The UE shall not subsequently initiate another UE requested
          * PDN connectivity procedure to the same APN to obtain a PDN
          * type different from the one allowed by the network */
-        pdn->addr_realloc = FALSE;
+        pdn->addr_realloc = false;
     } else if (pdn_type != ESM_PDN_TYPE_IPV4V6) {
-        pdn->addr_realloc = TRUE;
+        pdn->addr_realloc = true;
     }
 
     return (RETURNok);
diff --git a/openair3/NAS/UE/ESM/PdnDisconnect.c b/openair3/NAS/UE/ESM/PdnDisconnect.c
index 6665126e40a007983969db1277173129929cd37d..cb7b3225bcfab82c0ea452c0d5a9dbd765c4789a 100644
--- a/openair3/NAS/UE/ESM/PdnDisconnect.c
+++ b/openair3/NAS/UE/ESM/PdnDisconnect.c
@@ -155,7 +155,7 @@ int esm_proc_pdn_disconnect(esm_data_t *esm_data, int cid, unsigned int *pti, un
  **      PDN DISCONNECT REQUEST message to the MME, starting timer **
  **      T3492 and entering state PROCEDURE TRANSACTION PENDING.   **
  **                                                                        **
- ** Inputs:  is_standalone: Should be always TRUE                      **
+ ** Inputs:  is_standalone: Should be always true                      **
  **      pti:       Procedure transaction identity             **
  **      msg:       Encoded PDN disconnect request message to  **
  **             be sent                                    **
@@ -167,8 +167,8 @@ int esm_proc_pdn_disconnect(esm_data_t *esm_data, int cid, unsigned int *pti, un
  **      Others:    None                                       **
  **                                                                        **
  ***************************************************************************/
-int esm_proc_pdn_disconnect_request(nas_user_t *user, int is_standalone, int pti,
-                                    OctetString *msg, int sent_by_ue)
+int esm_proc_pdn_disconnect_request(nas_user_t *user, bool is_standalone, int pti,
+                                    OctetString *msg, bool sent_by_ue)
 {
   LOG_FUNC_IN;
 
@@ -326,7 +326,7 @@ int esm_proc_pdn_disconnect_reject(nas_user_t *user, int pti, int *esm_cause)
        */
       esm_sap_t esm_sap;
       esm_sap.primitive = ESM_EPS_BEARER_CONTEXT_DEACTIVATE_REQ;
-      esm_sap.is_standalone = TRUE;
+      esm_sap.is_standalone = true;
       esm_sap.recv = NULL;
       esm_sap.send.length = 0;
       esm_sap.data.eps_bearer_context_deactivate.ebi = ebi;
@@ -444,7 +444,7 @@ static void *_pdn_disconnect_t3492_handler(void *args)
          */
         esm_sap_t esm_sap;
         esm_sap.primitive = ESM_EPS_BEARER_CONTEXT_DEACTIVATE_REQ;
-        esm_sap.is_standalone = TRUE;
+        esm_sap.is_standalone = true;
         esm_sap.recv = NULL;
         esm_sap.send.length = 0;
         esm_sap.data.eps_bearer_context_deactivate.ebi = ebi;
diff --git a/openair3/NAS/UE/ESM/SAP/esm_sap.c b/openair3/NAS/UE/ESM/SAP/esm_sap.c
index e039f66a3a882c1b6304456e9698ae03f82d600e..f1663175d43cc3ba1cd9cd737b60302f0197a41e 100644
--- a/openair3/NAS/UE/ESM/SAP/esm_sap.c
+++ b/openair3/NAS/UE/ESM/SAP/esm_sap.c
@@ -63,9 +63,9 @@ Description Defines the ESM Service Access Points at which the EPS
 /*******************  L O C A L    D E F I N I T I O N S  *******************/
 /****************************************************************************/
 
-static int _esm_sap_recv(nas_user_t *user, int msg_type, int is_standalone,
+static int _esm_sap_recv(nas_user_t *user, int msg_type, bool is_standalone,
                          const OctetString *req, OctetString *rsp, esm_sap_error_t *err);
-static int _esm_sap_send(nas_user_t *user, int msg_type, int is_standalone, int pti, int ebi,
+static int _esm_sap_send(nas_user_t *user, int msg_type, bool is_standalone, int pti, int ebi,
                          const esm_sap_data_t *data, OctetString *rsp);
 
 
@@ -171,7 +171,7 @@ int esm_sap_send(nas_user_t *user, esm_sap_t *msg)
       }
 
       /* Define new PDN context */
-      rc = esm_proc_pdn_connectivity(user, pdn_connect->cid, TRUE,
+      rc = esm_proc_pdn_connectivity(user, pdn_connect->cid, true,
                                      pdn_connect->pdn_type, &apn,
                                      pdn_connect->is_emergency, NULL);
 
@@ -183,7 +183,7 @@ int esm_sap_send(nas_user_t *user, esm_sap_t *msg)
     if (pdn_connect->is_defined) {
       unsigned int pti;
       /* Assign new procedure transaction identity */
-      rc = esm_proc_pdn_connectivity(user, pdn_connect->cid, TRUE,
+      rc = esm_proc_pdn_connectivity(user, pdn_connect->cid, true,
                                      pdn_connect->pdn_type, NULL,
                                      pdn_connect->is_emergency, &pti);
 
@@ -205,7 +205,7 @@ int esm_sap_send(nas_user_t *user, esm_sap_t *msg)
 
       if ( msg->is_standalone && pdn_connect->is_defined ) {
         /* Undefine the specified PDN context */
-        rc = esm_proc_pdn_connectivity(user, pdn_connect->cid, FALSE,
+        rc = esm_proc_pdn_connectivity(user, pdn_connect->cid, false,
                                        pdn_connect->pdn_type, NULL,
                                        pdn_connect->is_emergency, NULL);
       } else if (msg->recv != NULL) {
@@ -214,7 +214,7 @@ int esm_sap_send(nas_user_t *user, esm_sap_t *msg)
                            msg->recv, &msg->send, &msg->err);
       } else {
         /* The PDN connectivity procedure locally failed */
-        rc = esm_proc_pdn_connectivity_failure(user, TRUE);
+        rc = esm_proc_pdn_connectivity_failure(user, true);
       }
     }
     break;
@@ -230,7 +230,7 @@ int esm_sap_send(nas_user_t *user, esm_sap_t *msg)
 
     if (rc != RETURNerror) {
       /* Send PDN disconnect request */
-      rc = _esm_sap_send(user, PDN_DISCONNECT_REQUEST, TRUE, pti, ebi,
+      rc = _esm_sap_send(user, PDN_DISCONNECT_REQUEST, true, pti, ebi,
                          &msg->data, &msg->send);
     }
   }
@@ -278,7 +278,7 @@ int esm_sap_send(nas_user_t *user, esm_sap_t *msg)
     rc = esm_proc_default_eps_bearer_context_failure(user);
 
     if (rc != RETURNerror) {
-      rc = esm_proc_pdn_connectivity_failure(user, FALSE);
+      rc = esm_proc_pdn_connectivity_failure(user, false);
     }
 
     break;
@@ -306,7 +306,7 @@ int esm_sap_send(nas_user_t *user, esm_sap_t *msg)
     /*
      * Locally deactivate EPS bearer context
      */
-    rc = esm_proc_eps_bearer_context_deactivate(user, TRUE,
+    rc = esm_proc_eps_bearer_context_deactivate(user, true,
          msg->data.eps_bearer_context_deactivate.ebi, &pid, &bid);
   }
   break;
@@ -359,7 +359,7 @@ int esm_sap_send(nas_user_t *user, esm_sap_t *msg)
  **      Return:    RETURNok, RETURNerror                      **
  **                                                                        **
  ***************************************************************************/
-static int _esm_sap_recv(nas_user_t *user, int msg_type, int is_standalone,
+static int _esm_sap_recv(nas_user_t *user, int msg_type, bool is_standalone,
                          const OctetString *req, OctetString *rsp,
                          esm_sap_error_t *err)
 {
@@ -422,7 +422,7 @@ static int _esm_sap_recv(nas_user_t *user, int msg_type, int is_standalone,
    * was triggered network-internally */
   int triggered_by_ue = (pti != PROCEDURE_TRANSACTION_IDENTITY_UNASSIGNED);
   /* Indicate whether the received message shall be ignored */
-  int is_discarded = FALSE;
+  bool is_discarded = false;
 
   if (esm_cause != ESM_CAUSE_SUCCESS) {
     LOG_TRACE(ERROR, "ESM-SAP   - Failed to decode expected ESM message "
@@ -455,7 +455,7 @@ static int _esm_sap_recv(nas_user_t *user, int msg_type, int is_standalone,
            * of already accepted activate default EPS bearer context
            * request message
            */
-          is_discarded = TRUE;
+          is_discarded = true;
         }
       } else {
         /* Return reject message */
@@ -493,7 +493,7 @@ static int _esm_sap_recv(nas_user_t *user, int msg_type, int is_standalone,
            * of already accepted activate dedicated EPS bearer context
            * request message
            */
-          is_discarded = TRUE;
+          is_discarded = true;
         }
       } else {
         /* Return reject message */
@@ -525,7 +525,7 @@ static int _esm_sap_recv(nas_user_t *user, int msg_type, int is_standalone,
          * received with PTI reserved value, or assigned value
          * that does not match any PTI in use
          */
-        is_discarded = TRUE;
+        is_discarded = true;
       } else if ( (esm_cause == ESM_CAUSE_SUCCESS) ||
                   (esm_cause == ESM_CAUSE_INVALID_EPS_BEARER_IDENTITY) ) {
         /* Return accept message */
@@ -541,7 +541,7 @@ static int _esm_sap_recv(nas_user_t *user, int msg_type, int is_standalone,
            * message with the EPS bearer identity set to the received
            * EPS bearer identity
            */
-          is_discarded = TRUE;
+          is_discarded = true;
         }
       }
 
@@ -565,7 +565,7 @@ static int _esm_sap_recv(nas_user_t *user, int msg_type, int is_standalone,
          * Ignore PDN connectivity reject message received with
          * reserved or unassigned EPS bearer identity value
          */
-        is_discarded = TRUE;
+        is_discarded = true;
       }
 
       break;
@@ -588,7 +588,7 @@ static int _esm_sap_recv(nas_user_t *user, int msg_type, int is_standalone,
          * Ignore PDN disconnect reject message received with
          * reserved or unassigned EPS bearer identity value
          */
-        is_discarded = TRUE;
+        is_discarded = true;
       }
 
       break;
@@ -629,7 +629,7 @@ static int _esm_sap_recv(nas_user_t *user, int msg_type, int is_standalone,
        * onto the network */
       esm_procedure = esm_proc_status;
       /* Discard received ESM message */
-      is_discarded = TRUE;
+      is_discarded = true;
     }
   } else {
     /* ESM message processing succeed */
@@ -687,7 +687,7 @@ static int _esm_sap_recv(nas_user_t *user, int msg_type, int is_standalone,
  **      Return:    RETURNok, RETURNerror                      **
  **                                                                        **
  ***************************************************************************/
-static int _esm_sap_send(nas_user_t *user, int msg_type, int is_standalone,
+static int _esm_sap_send(nas_user_t *user, int msg_type, bool is_standalone,
                          int pti, int ebi, const esm_sap_data_t *data,
                          OctetString *rsp)
 {
@@ -697,7 +697,7 @@ static int _esm_sap_send(nas_user_t *user, int msg_type, int is_standalone,
   int rc = RETURNok;
 
   /* Indicate whether the message is sent by the UE or the MME */
-  int sent_by_ue = TRUE;
+  bool sent_by_ue = true;
 
   ESM_msg esm_msg;
   memset(&esm_msg, 0 , sizeof(ESM_msg));
diff --git a/openair3/NAS/UE/ESM/SAP/esm_sapDef.h b/openair3/NAS/UE/ESM/SAP/esm_sapDef.h
index 4ff7c7e9ddccd0b5b776e356e86e8d4c90ba2b5d..2d3227ba75fbe379d46e5eea5aa177c9cd3eb84a 100644
--- a/openair3/NAS/UE/ESM/SAP/esm_sapDef.h
+++ b/openair3/NAS/UE/ESM/SAP/esm_sapDef.h
@@ -109,11 +109,11 @@ typedef struct esm_activate_eps_default_bearer_context_s {
  */
 typedef struct esm_pdn_connectivity_s {
   int cid;        /* PDN connection local identifier      */
-  int is_defined; /* Indicates whether a PDN context has been defined
+  bool is_defined; /* Indicates whether a PDN context has been defined
              * for the specified APN            */
   int pdn_type;   /* PDN address type (IPv4, IPv6, IPv4v6)    */
   const char *apn;    /* PDN's Access Point Name          */
-  int is_emergency;   /* Indicates whether the PDN context has been
+  bool is_emergency;   /* Indicates whether the PDN context has been
              * defined to establish connection for emergency
              * bearer services              */
 } esm_pdn_connectivity_t;
@@ -149,7 +149,7 @@ typedef union {
 
 typedef struct esm_sap_s {
   esm_primitive_t primitive;  /* ESM-SAP primitive to process     */
-  int is_standalone;      /* Indicates whether the ESM message handled
+  bool is_standalone;      /* Indicates whether the ESM message handled
                  * within this primitive has to be sent/received
                  * standalone or together within an EMM related
                  * message              */
diff --git a/openair3/NAS/UE/ESM/SAP/esm_send.c b/openair3/NAS/UE/ESM/SAP/esm_send.c
index 020d9d89e3c9c0188be205e4d6a30c9ad481f005..e710d745ad57c7d594c9c5b2903a91a3155efee5 100644
--- a/openair3/NAS/UE/ESM/SAP/esm_send.c
+++ b/openair3/NAS/UE/ESM/SAP/esm_send.c
@@ -132,7 +132,7 @@ int esm_send_status(int pti, int ebi, esm_status_msg *msg, int esm_cause)
  **      Others:    None                                       **
  **                                                                        **
  ***************************************************************************/
-int esm_send_pdn_connectivity_request(int pti, int is_emergency, int pdn_type,
+int esm_send_pdn_connectivity_request(int pti, bool is_emergency, int pdn_type,
                                       const char *apn,
                                       pdn_connectivity_request_msg *msg)
 {
diff --git a/openair3/NAS/UE/ESM/SAP/esm_send.h b/openair3/NAS/UE/ESM/SAP/esm_send.h
index f97454027ae05dde8f7ec725949c0db26a3999a0..b9bcab0f397b3054e2827be33f6e9c9127d04e13 100644
--- a/openair3/NAS/UE/ESM/SAP/esm_send.h
+++ b/openair3/NAS/UE/ESM/SAP/esm_send.h
@@ -40,6 +40,8 @@ Description Defines functions executed at the ESM Service Access
 #ifndef __ESM_SEND_H__
 #define __ESM_SEND_H__
 
+#include <stdbool.h>
+
 #include "EsmStatus.h"
 
 
@@ -90,7 +92,7 @@ int esm_send_status(int pti, int ebi, esm_status_msg *msg, int esm_cause);
  * Transaction related messages
  * ----------------------------
  */
-int esm_send_pdn_connectivity_request(int pti, int is_emergency, int pdn_type,
+int esm_send_pdn_connectivity_request(int pti, bool is_emergency, int pdn_type,
                                       const char *apn, pdn_connectivity_request_msg *msg);
 int esm_send_pdn_disconnect_request(int pti, int ebi,
                                     pdn_disconnect_request_msg *msg);
diff --git a/openair3/NAS/UE/ESM/esmData.h b/openair3/NAS/UE/ESM/esmData.h
index 16f4707a3775b73b6c619078f654c6b2125098fd..525f4ec00a7d1df28ad3feffb5b601b129cfcedb 100644
--- a/openair3/NAS/UE/ESM/esmData.h
+++ b/openair3/NAS/UE/ESM/esmData.h
@@ -37,6 +37,7 @@ Description Defines internal private data handled by EPS Session
 
 *****************************************************************************/
 #include <stdio.h>  // sprintf
+#include <stdbool.h>
 
 #include "networkDef.h"
 #include "OctetString.h"
@@ -92,7 +93,7 @@ typedef enum {
 typedef struct esm_ebr_context_s {
   unsigned char ebi;      /* EPS bearer identity          */
   esm_ebr_state status;   /* EPS bearer context status        */
-  int is_default_ebr;     /* TRUE if the bearer context is associated
+  bool is_default_ebr;     /* bool if the bearer context is associated
                  * to a default EPS bearer      */
   char cid;           /* Identifier of the PDN context the EPS
                  * bearer context has been assigned to  */
@@ -137,7 +138,7 @@ typedef struct esm_bearer_s {
 typedef struct esm_pdn_s {
   unsigned int pti;   /* Identity of the procedure transaction executed
              * to activate the PDN connection entry     */
-  int is_emergency;   /* Emergency bearer services indicator      */
+  bool is_emergency;   /* Emergency bearer services indicator      */
   OctetString apn;    /* Access Point Name currently in used      */
   int ambr;       /* Aggregate Maximum Bit Rate of this APN   */
   int type;       /* Address PDN type (IPv4, IPv6, IPv4v6)    */
@@ -147,7 +148,7 @@ typedef struct esm_pdn_s {
                                      ESM_DATA_IPV6_ADDRESS_SIZE)
   /* IPv4 PDN address and/or IPv6 prefix      */
   char ip_addr[ESM_DATA_IP_ADDRESS_SIZE+1];
-  int addr_realloc;   /* Indicates whether the UE is allowed to subsequently
+  bool addr_realloc;   /* Indicates whether the UE is allowed to subsequently
              * request another PDN connectivity to the same APN
              * using an address PDN type (IPv4 or IPv6) other
              * than the one already activated       */
@@ -175,7 +176,7 @@ typedef struct esm_data_context_s {
 #define ESM_DATA_PDN_MAX    4
   struct {
     int pid;     /* Identifier of the PDN connection        */
-    int is_active;   /* TRUE/FALSE if the PDN connection is active/inactive
+    bool is_active;   /* true/false if the PDN connection is active/inactive
               * or the process to activate/deactivate the PDN
               * connection is in progress           */
     esm_pdn_t *data; /* Active PDN connection data          */
diff --git a/openair3/NAS/UE/ESM/esm_ebr.c b/openair3/NAS/UE/ESM/esm_ebr.c
index 3a62812eca7128f6d06eba008b988b3f97c6b50b..4c6b56cec9a903ade5aa05b2d1d7a5b0ffdd9c36 100644
--- a/openair3/NAS/UE/ESM/esm_ebr.c
+++ b/openair3/NAS/UE/ESM/esm_ebr.c
@@ -153,7 +153,7 @@ void esm_ebr_register_callback(esm_indication_callback_t cb)
  **      ebi:       Identity of the new EPS bearer context     **
  **      cid:       Identifier of the PDN context the EPS bea- **
  **             rer context is associated to               **
- **      default_ebr    TRUE if the new bearer context is associa- **
+ **      default_ebr    bool if the new bearer context is associa- **
  **             ted to a default EPS bearer                **
  **      Others:    None                                       **
  **                                                                        **
@@ -163,7 +163,7 @@ void esm_ebr_register_callback(esm_indication_callback_t cb)
  **             the not assigned EBI (0) otherwise.        **
  **                                                                        **
  ***************************************************************************/
-int esm_ebr_assign(esm_ebr_data_t *esm_ebr_data, int ebi, int cid, int default_ebr)
+int esm_ebr_assign(esm_ebr_data_t *esm_ebr_data, int ebi, int cid, bool default_ebr)
 {
   esm_ebr_context_t *ebr_ctx = NULL;
   int                i;
@@ -284,7 +284,7 @@ int esm_ebr_release(esm_ebr_data_t *esm_ebr_data,
  **                                                                        **
  **      ebi:       The identity of the EPS bearer             **
  **      status:    The new EPS bearer context status          **
- **      ue_requested:  TRUE/FALSE if the modification of the EPS  **
+ **      ue_requested:  true/false if the modification of the EPS  **
  **             bearer context status was requested by the **
  **             UE/network                                 **
  **      Others:    None                                       **
@@ -294,7 +294,7 @@ int esm_ebr_release(esm_ebr_data_t *esm_ebr_data,
  **                                                                        **
  ***************************************************************************/
 int esm_ebr_set_status(user_api_id_t *user_api_id, esm_ebr_data_t *esm_ebr_data,
-  int ebi, esm_ebr_state status, int ue_requested)
+  int ebi, esm_ebr_state status, bool ue_requested)
 {
   esm_ebr_context_t *ebr_ctx;
   esm_ebr_state old_status;
@@ -385,11 +385,11 @@ esm_ebr_state esm_ebr_get_status(esm_ebr_data_t *esm_ebr_data,
  **      Others:    None                                       **
  **                                                                        **
  ** Outputs:     None                                                      **
- **      Return:    TRUE, FALSE                                **
+ **      Return:    true, false                                **
  **      Others:    None                                       **
  **                                                                        **
  ***************************************************************************/
-int esm_ebr_is_reserved(esm_ebr_data_t *esm_ebr_data, int ebi)
+bool esm_ebr_is_reserved(esm_ebr_data_t *esm_ebr_data, int ebi)
 {
   return ( (ebi != ESM_EBI_UNASSIGNED) && (ebi < ESM_EBI_MIN) );
 }
@@ -404,12 +404,11 @@ int esm_ebr_is_reserved(esm_ebr_data_t *esm_ebr_data, int ebi)
  **      ebi:       The identity of the EPS bearer             **
  **                                                                        **
  ** Outputs:     None                                                      **
- **      Return:    TRUE, FALSE                                **
+ **      Return:    true, false                                **
  **      Others:    None                                       **
  **                                                                        **
  ***************************************************************************/
-int esm_ebr_is_not_in_use(esm_ebr_data_t *esm_ebr_data,
-  int ebi)
+bool esm_ebr_is_not_in_use(esm_ebr_data_t *esm_ebr_data, int ebi)
 {
 
   return ( (ebi == ESM_EBI_UNASSIGNED) ||
diff --git a/openair3/NAS/UE/ESM/esm_ebr.h b/openair3/NAS/UE/ESM/esm_ebr.h
index 6de4a048a49ef7b32bc073a00a90b3df373a72fe..4447a227baa9d1630ce8cd6c57317e315963937c 100644
--- a/openair3/NAS/UE/ESM/esm_ebr.h
+++ b/openair3/NAS/UE/ESM/esm_ebr.h
@@ -75,15 +75,15 @@ typedef int (*esm_indication_callback_t) (user_api_id_t *user_api_id, int, netwo
 
 void esm_ebr_register_callback(esm_indication_callback_t cb);
 
-int esm_ebr_is_reserved(esm_ebr_data_t *esm_ebr_data, int ebi);
+bool esm_ebr_is_reserved(esm_ebr_data_t *esm_ebr_data, int ebi);
 
 esm_ebr_data_t *esm_ebr_initialize(void);
-int esm_ebr_assign(esm_ebr_data_t *esm_ebr_data, int ebi, int cid, int default_ebr);
+int esm_ebr_assign(esm_ebr_data_t *esm_ebr_data, int ebi, int cid, bool default_ebr);
 int esm_ebr_release(esm_ebr_data_t *esm_ebr_data, int ebi);
 
-int esm_ebr_set_status(user_api_id_t *user_api_id, esm_ebr_data_t *esm_ebr_data, int ebi, esm_ebr_state status, int ue_requested);
+int esm_ebr_set_status(user_api_id_t *user_api_id, esm_ebr_data_t *esm_ebr_data, int ebi, esm_ebr_state status, bool ue_requested);
 esm_ebr_state esm_ebr_get_status(esm_ebr_data_t *esm_ebr_data, int ebi);
 
-int esm_ebr_is_not_in_use(esm_ebr_data_t *esm_ebr_data, int ebi);
+bool esm_ebr_is_not_in_use(esm_ebr_data_t *esm_ebr_data, int ebi);
 
 #endif /* __ESM_EBR_H__*/
diff --git a/openair3/NAS/UE/ESM/esm_ebr_context.c b/openair3/NAS/UE/ESM/esm_ebr_context.c
index b801ca2ad54e788a884f0e5cb2a6ee28a3a5f263..ca69687abe5230849e6b697c6b1d554042c9f792 100644
--- a/openair3/NAS/UE/ESM/esm_ebr_context.c
+++ b/openair3/NAS/UE/ESM/esm_ebr_context.c
@@ -84,7 +84,7 @@ static int _esm_ebr_context_check_precedence(const network_tft_t *,
  ** Inputs: **
  **      pid:       PDN connection identifier                  **
  **      ebi:       EPS bearer identity                        **
- **      is_default:    TRUE if the new bearer is a default EPS    **
+ **      is_default:    true if the new bearer is a default EPS    **
  **             bearer context                             **
  **      esm_qos:   EPS bearer level QoS parameters            **
  **      tft:       Traffic flow template parameters           **
@@ -98,7 +98,7 @@ static int _esm_ebr_context_check_precedence(const network_tft_t *,
  ***************************************************************************/
 int esm_ebr_context_create(
   esm_data_t *esm_data, int ueid,
-  int pid, int ebi, int is_default,
+  int pid, int ebi, bool is_default,
   const network_qos_t *qos, const network_tft_t *tft) {
   int                 bid     = 0;
   esm_data_context_t *esm_ctx = NULL;
@@ -185,11 +185,11 @@ int esm_ebr_context_create(
 
       if (is_default) {
         /* Set the PDN connection activation indicator */
-        esm_ctx->pdn[pid].is_active = TRUE;
+        esm_ctx->pdn[pid].is_active = true;
 
         /* Update the emergency bearer services indicator */
         if (pdn->is_emergency) {
-          esm_ctx->emergency = TRUE;
+          esm_ctx->emergency = true;
         }
 
         // LG ADD TEMP
@@ -383,7 +383,7 @@ int esm_ebr_context_create(
  ***************************************************************************/
 int esm_ebr_context_release(nas_user_t *user,
                             int ebi, int *pid, int *bid) {
-  int found = FALSE;
+  bool found = false;
   esm_pdn_t *pdn = NULL;
   esm_data_context_t *esm_ctx;
   esm_ebr_data_t *esm_ebr_data = user->esm_ebr_data;
@@ -416,7 +416,7 @@ int esm_ebr_context_release(nas_user_t *user,
             }
 
             /* The EPS bearer context entry is found */
-            found = TRUE;
+            found = true;
             break;
           }
         }
@@ -450,7 +450,7 @@ int esm_ebr_context_release(nas_user_t *user,
 
         if (pdn->bearer[*bid] != NULL) {
           ebi = pdn->bearer[*bid]->ebi;
-          found = TRUE;
+          found = true;
         }
       }
     }
@@ -503,7 +503,7 @@ int esm_ebr_context_release(nas_user_t *user,
 
           /* Set the EPS bearer context state to INACTIVE */
           esm_ebr_set_status(user_api_id, esm_ebr_data, pdn->bearer[i]->ebi,
-                             ESM_EBR_INACTIVE, TRUE);
+                             ESM_EBR_INACTIVE, true);
           /* Release EPS bearer data */
           esm_ebr_release(esm_ebr_data, pdn->bearer[i]->ebi);
           // esm_ebr_release()
@@ -519,11 +519,11 @@ int esm_ebr_context_release(nas_user_t *user,
       }
 
       /* Reset the PDN connection activation indicator */
-      esm_ctx->pdn[*pid].is_active = FALSE;
+      esm_ctx->pdn[*pid].is_active = false;
 
       /* Update the emergency bearer services indicator */
       if (pdn->is_emergency) {
-        esm_ctx->emergency = FALSE;
+        esm_ctx->emergency = false;
       }
     }
 
@@ -534,7 +534,7 @@ int esm_ebr_context_release(nas_user_t *user,
     if (esm_ctx->n_ebrs == 0) {
       emm_sap_t emm_sap;
       emm_sap.primitive = EMMESM_ESTABLISH_CNF;
-      emm_sap.u.emm_esm.u.establish.is_attached = FALSE;
+      emm_sap.u.emm_esm.u.establish.is_attached = false;
       (void) emm_sap_send(user, &emm_sap);
     }
     /* 3GPP TS 24.301, section 6.4.4.3, 6.4.4.6
@@ -546,8 +546,8 @@ int esm_ebr_context_release(nas_user_t *user,
     else if (esm_ctx->emergency && (esm_ctx->n_ebrs == 1) ) {
       emm_sap_t emm_sap;
       emm_sap.primitive = EMMESM_ESTABLISH_CNF;
-      emm_sap.u.emm_esm.u.establish.is_attached = TRUE;
-      emm_sap.u.emm_esm.u.establish.is_emergency = TRUE;
+      emm_sap.u.emm_esm.u.establish.is_attached = true;
+      emm_sap.u.emm_esm.u.establish.is_emergency = true;
       (void) emm_sap_send(user, &emm_sap);
     }
 
diff --git a/openair3/NAS/UE/ESM/esm_ebr_context.h b/openair3/NAS/UE/ESM/esm_ebr_context.h
index d7dfb1da70f2c1a4f8861dadd1cf71e205eaa5b4..c72f3f0e8b62a834fb41e6f4771dd846490d4a34 100644
--- a/openair3/NAS/UE/ESM/esm_ebr_context.h
+++ b/openair3/NAS/UE/ESM/esm_ebr_context.h
@@ -66,7 +66,7 @@ typedef enum {
 /******************  E X P O R T E D    F U N C T I O N S  ******************/
 /****************************************************************************/
 
-int esm_ebr_context_create(esm_data_t *esm_data, int ueid, int pid, int ebi, int is_default,
+int esm_ebr_context_create(esm_data_t *esm_data, int ueid, int pid, int ebi, bool is_default,
                            const network_qos_t *qos, const network_tft_t *tft);
 
 int esm_ebr_context_release(nas_user_t *user, int ebi, int *pid, int *bid);
diff --git a/openair3/NAS/UE/ESM/esm_main.c b/openair3/NAS/UE/ESM/esm_main.c
index 288e7486796f68a4efa0ce3b5af16ba34cf9555f..895e463726bf7ba2447b2d0b97c854cb94186bfb 100644
--- a/openair3/NAS/UE/ESM/esm_main.c
+++ b/openair3/NAS/UE/ESM/esm_main.c
@@ -96,12 +96,12 @@ void esm_main_initialize(nas_user_t *user, esm_indication_callback_t cb)
 
   for (i = 0; i < ESM_DATA_PDN_MAX + 1; i++) {
     esm_data->pdn[i].pid = -1;
-    esm_data->pdn[i].is_active = FALSE;
+    esm_data->pdn[i].is_active = false;
     esm_data->pdn[i].data = NULL;
   }
 
   /* Emergency bearer services indicator */
-  esm_data->emergency = FALSE;
+  esm_data->emergency = false;
 
   /* Initialize the procedure transaction identity manager */
 
@@ -225,12 +225,12 @@ int esm_main_get_nb_pdns(esm_data_t *esm_data)
  ** Inputs:  None                                                      **
  **                                                                        **
  ** Outputs:     None                                                      **
- **      Return:    TRUE if a PDN connection for emergency     **
+ **      Return:    true if a PDN connection for emergency     **
  **             bearer services is established             **
  **      Others:    None                                       **
  **                                                                        **
  ***************************************************************************/
-int esm_main_has_emergency(esm_data_t *esm_data)
+bool esm_main_has_emergency(esm_data_t *esm_data)
 {
   LOG_FUNC_IN;
 
@@ -245,16 +245,16 @@ int esm_main_has_emergency(esm_data_t *esm_data)
  **                                                                        **
  ** Inputs:  cid:       PDN connection identifier                  **
  **                                                                        **
- ** Outputs:     state:     TRUE if the current state of the PDN con-  **
- **             nection is ACTIVE; FALSE otherwise.        **
- **      Return:    TRUE if the specified PDN connection has a **
- **             PDN context defined; FALSE if no any PDN   **
+ ** Outputs:     state:     true if the current state of the PDN con-  **
+ **             nection is ACTIVE; false otherwise.        **
+ **      Return:    true if the specified PDN connection has a **
+ **             PDN context defined; false if no any PDN   **
  **             context has been defined for the specified **
  **             connection.                                **
  **      Others:    None                                       **
  **                                                                        **
  ***************************************************************************/
-int esm_main_get_pdn_status(nas_user_t *user, int cid, int *state)
+bool esm_main_get_pdn_status(nas_user_t *user, int cid, bool *state)
 {
   LOG_FUNC_IN;
 
@@ -263,14 +263,14 @@ int esm_main_get_pdn_status(nas_user_t *user, int cid, int *state)
   esm_ebr_data_t *esm_ebr_data = user-> esm_ebr_data;
 
   if (pid >= ESM_DATA_PDN_MAX) {
-    return (FALSE);
+    return (false);
   } else if (pid != esm_data->pdn[pid].pid) {
     LOG_TRACE(WARNING, "ESM-MAIN  - PDN connection %d is not defined", cid);
-    return (FALSE);
+    return (false);
   } else if (esm_data->pdn[pid].data == NULL) {
     LOG_TRACE(ERROR, "ESM-MAIN  - PDN connection %d has not been allocated",
               cid);
-    return (FALSE);
+    return (false);
   }
 
   if (esm_data->pdn[pid].data->bearer[0] != NULL) {
@@ -281,7 +281,7 @@ int esm_main_get_pdn_status(nas_user_t *user, int cid, int *state)
   }
 
   /* The PDN connection has not been activated yet */
-  LOG_FUNC_RETURN (TRUE);
+  LOG_FUNC_RETURN (true);
 }
 
 /****************************************************************************
@@ -301,7 +301,7 @@ int esm_main_get_pdn_status(nas_user_t *user, int cid, int *state)
  **                                                                        **
  ***************************************************************************/
 int esm_main_get_pdn(esm_data_t *esm_data, int cid, int *type, const char **apn,
-                     int *is_emergency, int *is_active)
+                     bool *is_emergency, bool *is_active)
 {
   LOG_FUNC_IN;
 
diff --git a/openair3/NAS/UE/ESM/esm_main.h b/openair3/NAS/UE/ESM/esm_main.h
index 6e6ecc0db4668b806449ecab5f2c90171adb9c48..ca8679c5b7a6cb2f90846f63b0b7db7f21b82dbf 100644
--- a/openair3/NAS/UE/ESM/esm_main.h
+++ b/openair3/NAS/UE/ESM/esm_main.h
@@ -69,10 +69,9 @@ void esm_main_cleanup(esm_data_t *esm_data);
 /* User's getter for PDN connections and EPS bearer contexts */
 int esm_main_get_nb_pdns_max(esm_data_t *esm_data);
 int esm_main_get_nb_pdns(esm_data_t *esm_data);
-int esm_main_has_emergency(esm_data_t *esm_data);
-int esm_main_get_pdn_status(nas_user_t *user, int cid, int *state);
-int esm_main_get_pdn(esm_data_t *esm_data, int cid, int *type, const char **apn, int *is_emergency,
-                     int *is_active);
+bool esm_main_has_emergency(esm_data_t *esm_data);
+bool esm_main_get_pdn_status(nas_user_t *user, int cid, bool *state);
+int esm_main_get_pdn(esm_data_t *esm_data, int cid, int *type, const char **apn, bool *is_emergency, bool *is_active);
 int esm_main_get_pdn_addr(esm_data_t *esm_data, int cid, const char **ipv4addr, const char **ipv6addr);
 
 
diff --git a/openair3/NAS/UE/ESM/esm_proc.h b/openair3/NAS/UE/ESM/esm_proc.h
index 941cfa620db3f35fc87a2787a65238f8a29f34b1..42a925327e3bfa7a0005e3d90ff529ed4bfd5625 100644
--- a/openair3/NAS/UE/ESM/esm_proc.h
+++ b/openair3/NAS/UE/ESM/esm_proc.h
@@ -79,7 +79,7 @@ typedef enum {
  * Type of the ESM procedure callback executed when requested by the UE
  * or initiated by the network
  */
-typedef int (*esm_proc_procedure_t) (nas_user_t *user, int, int, OctetString *, int);
+typedef int (*esm_proc_procedure_t) (nas_user_t *user, bool, int, OctetString *, bool);
 
 /* EPS bearer level QoS parameters */
 typedef network_qos_t esm_proc_qos_t;
@@ -113,8 +113,7 @@ typedef struct {
  * --------------------------------------------------------------------------
  */
 int esm_proc_status_ind(int pti, int ebi, int *esm_cause);
-int esm_proc_status(nas_user_t *user, int is_standalone, int pti, OctetString *msg,
-                    int sent_by_ue);
+int esm_proc_status(nas_user_t *user, bool is_standalone, int pti, OctetString *msg, bool sent_by_ue);
 
 
 /*
@@ -123,10 +122,10 @@ int esm_proc_status(nas_user_t *user, int is_standalone, int pti, OctetString *m
  * --------------------------------------------------------------------------
  */
 int esm_proc_pdn_connectivity(nas_user_t *user, int cid, int to_define,
-                              esm_proc_pdn_type_t pdn_type, const OctetString *apn, int is_emergency,
+                              esm_proc_pdn_type_t pdn_type, const OctetString *apn, bool is_emergency,
                               unsigned int *pti);
-int esm_proc_pdn_connectivity_request(nas_user_t *user, int is_standalone, int pti,
-                                      OctetString *msg, int sent_by_ue);
+int esm_proc_pdn_connectivity_request(nas_user_t *user, bool is_standalone, int pti,
+                                      OctetString *msg, bool sent_by_ue);
 int esm_proc_pdn_connectivity_accept(nas_user_t *user, int pti, esm_proc_pdn_type_t pdn_type,
                                      const OctetString *pdn_address, const OctetString *apn, int *esm_cause);
 int esm_proc_pdn_connectivity_reject(nas_user_t *user, int pti, int *esm_cause);
@@ -140,8 +139,8 @@ int esm_proc_pdn_connectivity_failure(nas_user_t *user, int is_pending);
  * --------------------------------------------------------------------------
  */
 int esm_proc_pdn_disconnect(esm_data_t *esm_data, int cid, unsigned int *pti, unsigned int *ebi);
-int esm_proc_pdn_disconnect_request(nas_user_t *user, int is_standalone, int pti,
-                                    OctetString *msg, int sent_by_ue);
+int esm_proc_pdn_disconnect_request(nas_user_t *user, bool is_standalone, int pti,
+                                    OctetString *msg, bool sent_by_ue);
 
 int esm_proc_pdn_disconnect_accept(esm_pt_data_t *esm_pt_data, int pti, int *esm_cause);
 int esm_proc_pdn_disconnect_reject(nas_user_t *user, int pti, int *esm_cause);
@@ -157,10 +156,10 @@ int esm_proc_default_eps_bearer_context_request(nas_user_t *user, int pid, int e
 int esm_proc_default_eps_bearer_context_complete(default_eps_bearer_context_data_t *default_eps_bearer_context_data);
 int esm_proc_default_eps_bearer_context_failure(nas_user_t *user);
 
-int esm_proc_default_eps_bearer_context_accept(nas_user_t *user, int is_standalone, int ebi,
-    OctetString *msg, int ue_triggered);
-int esm_proc_default_eps_bearer_context_reject(nas_user_t *user, int is_standalone, int ebi,
-    OctetString *msg, int ue_triggered);
+int esm_proc_default_eps_bearer_context_accept(nas_user_t *user, bool is_standalone, int ebi,
+    OctetString *msg, bool ue_triggered);
+int esm_proc_default_eps_bearer_context_reject(nas_user_t *user, bool is_standalone, int ebi,
+    OctetString *msg, bool ue_triggered);
 
 /*
  * --------------------------------------------------------------------------
@@ -171,10 +170,10 @@ int esm_proc_default_eps_bearer_context_reject(nas_user_t *user, int is_standalo
 int esm_proc_dedicated_eps_bearer_context_request(nas_user_t *user, int ebi, int default_ebi,
     const esm_proc_qos_t *qos, const esm_proc_tft_t *tft, int *esm_cause);
 
-int esm_proc_dedicated_eps_bearer_context_accept(nas_user_t *user, int is_standalone, int ebi,
-    OctetString *msg, int ue_triggered);
-int esm_proc_dedicated_eps_bearer_context_reject(nas_user_t *user, int is_standalone, int ebi,
-    OctetString *msg, int ue_triggered);
+int esm_proc_dedicated_eps_bearer_context_accept(nas_user_t *user, bool is_standalone, int ebi,
+    OctetString *msg, bool ue_triggered);
+int esm_proc_dedicated_eps_bearer_context_reject(nas_user_t *user, bool is_standalone, int ebi,
+    OctetString *msg, bool ue_triggered);
 
 /*
  * --------------------------------------------------------------------------
@@ -182,11 +181,11 @@ int esm_proc_dedicated_eps_bearer_context_reject(nas_user_t *user, int is_standa
  * --------------------------------------------------------------------------
  */
 
-int esm_proc_eps_bearer_context_deactivate(nas_user_t *user, int is_local, int ebi, int *pid,
+int esm_proc_eps_bearer_context_deactivate(nas_user_t *user, bool is_local, int ebi, int *pid,
     int *bid);
 int esm_proc_eps_bearer_context_deactivate_request(nas_user_t *user, int ebi, int *esm_cause);
 
-int esm_proc_eps_bearer_context_deactivate_accept(nas_user_t *user, int is_standalone, int ebi,
-    OctetString *msg, int ue_triggered);
+int esm_proc_eps_bearer_context_deactivate_accept(nas_user_t *user, bool is_standalone, int ebi,
+    OctetString *msg, bool ue_triggered);
 
 #endif /* __ESM_PROC_H__*/
diff --git a/openair3/NAS/UE/ESM/esm_pt.c b/openair3/NAS/UE/ESM/esm_pt.c
index f253291fd9fdcd822f2800ee0cda62d62a936a7c..d9f593fb5718918cc45f22917e32b3811c5938a4 100644
--- a/openair3/NAS/UE/ESM/esm_pt.c
+++ b/openair3/NAS/UE/ESM/esm_pt.c
@@ -482,11 +482,11 @@ int esm_pt_get_pending_pti(esm_pt_data_t *esm_pt_data, esm_pt_state status)
  ** Inputs:  pti:       The identity of the procedure transaction  **
  **                                                                        **
  ** Outputs:     None                                                      **
- **      Return:    TRUE, FALSE                                **
+ **      Return:    true, false                                **
  **      Others:    None                                       **
  **                                                                        **
  ***************************************************************************/
-int esm_pt_is_not_in_use(esm_pt_data_t *esm_pt_data, int pti)
+bool esm_pt_is_not_in_use(esm_pt_data_t *esm_pt_data, int pti)
 {
   return ( (pti == ESM_PT_UNASSIGNED) ||
            (esm_pt_data->context[pti - ESM_PTI_MIN] == NULL) ||
@@ -504,11 +504,11 @@ int esm_pt_is_not_in_use(esm_pt_data_t *esm_pt_data, int pti)
  **      Others:    None                                       **
  **                                                                        **
  ** Outputs:     None                                                      **
- **      Return:    TRUE, FALSE                                **
+ **      Return:    true, false                                **
  **      Others:    None                                       **
  **                                                                        **
  ***************************************************************************/
-int esm_pt_is_reserved(int pti)
+bool esm_pt_is_reserved(int pti)
 {
   return ( (pti != ESM_PT_UNASSIGNED) && (pti > ESM_PTI_MAX) );
 }
diff --git a/openair3/NAS/UE/ESM/esm_pt.h b/openair3/NAS/UE/ESM/esm_pt.h
index 3179e0f47b7f044e105e2730cebf96859ccf7fa6..b0c62253abca39df0c3f4324c24cb5084aebc6c4 100644
--- a/openair3/NAS/UE/ESM/esm_pt.h
+++ b/openair3/NAS/UE/ESM/esm_pt.h
@@ -64,7 +64,7 @@ Description Defines functions used to handle ESM procedure transactions.
 /******************  E X P O R T E D    F U N C T I O N S  ******************/
 /****************************************************************************/
 
-int esm_pt_is_reserved(int pti);
+bool esm_pt_is_reserved(int pti);
 
 esm_pt_data_t *esm_pt_initialize(void);
 
@@ -79,6 +79,6 @@ int esm_pt_set_status(esm_pt_data_t *esm_pt_data, int pti, esm_pt_state status);
 esm_pt_state esm_pt_get_status(esm_pt_data_t *esm_pt_data, int pti);
 int esm_pt_get_pending_pti(esm_pt_data_t *esm_pt_data, esm_pt_state status);
 
-int esm_pt_is_not_in_use(esm_pt_data_t *esm_pt_data, int pti);
+bool esm_pt_is_not_in_use(esm_pt_data_t *esm_pt_data, int pti);
 
 #endif /* __ESM_PT_H__*/
diff --git a/openair3/NAS/UE/UEprocess.c b/openair3/NAS/UE/UEprocess.c
index 7b9a1be42242a98ac2998512af95cf85c16b9134..a3a1c9c79b6862600823b5c62fcda12bd30507ae 100644
--- a/openair3/NAS/UE/UEprocess.c
+++ b/openair3/NAS/UE/UEprocess.c
@@ -205,7 +205,7 @@ static void *_nas_user_mngr(void *args)
   LOG_FUNC_IN;
 
   pthread_setname_np( pthread_self(), "nas_user_mngr");
-  int exit_loop = FALSE;
+  bool exit_loop = false;
 
   int *fd = (int *) args;
 
@@ -251,7 +251,7 @@ static void *_nas_network_mngr(void *args)
   LOG_TRACE (INFO, "UE-MAIN   - Network connection manager started (%d)", *fd);
 
   /* Network receiving loop */
-  while (TRUE) {
+  while (true) {
     /* Read the network data message */
     bytes = network_api_read_data (*fd);
 
diff --git a/openair3/NAS/UE/nas_proc.c b/openair3/NAS/UE/nas_proc.c
index 9350590788a738a88a11763697e34c15ed44a433..41230696a4881a9853e4f53a821a33bfcd3de6b3 100644
--- a/openair3/NAS/UE/nas_proc.c
+++ b/openair3/NAS/UE/nas_proc.c
@@ -64,8 +64,8 @@ Description NAS procedure call manager
 #define NAS_PROC_RSRP_UNKNOWN   255
 
 
-static int _nas_proc_activate(nas_user_t *user, int cid, int apply_to_all);
-static int _nas_proc_deactivate(nas_user_t *user, int cid, int apply_to_all);
+static int _nas_proc_activate(nas_user_t *user, int cid, bool apply_to_all);
+static int _nas_proc_deactivate(nas_user_t *user, int cid, bool apply_to_all);
 
 /****************************************************************************/
 /******************  E X P O R T E D    F U N C T I O N S  ******************/
@@ -93,7 +93,7 @@ void nas_proc_initialize(nas_user_t *user, emm_indication_callback_t emm_cb,
   LOG_FUNC_IN;
 
   /* Initialize local NAS data */
-  user->proc.EPS_capability_status = FALSE;
+  user->proc.EPS_capability_status = false;
   user->proc.rsrq = NAS_PROC_RSRQ_UNKNOWN;
   user->proc.rsrp = NAS_PROC_RSRP_UNKNOWN;
 
@@ -129,7 +129,7 @@ void nas_proc_cleanup(nas_user_t *user)
   LOG_FUNC_IN;
 
   /* Detach the UE from the EPS network */
-  int rc = nas_proc_detach(user, TRUE);
+  int rc = nas_proc_detach(user, true);
 
   if (rc != RETURNok) {
     LOG_TRACE(ERROR, "NAS-PROC  - Failed to detach from the network");
@@ -176,7 +176,7 @@ int nas_proc_enable_s1_mode(nas_user_t *user)
    * Notify the EMM procedure call manager that EPS capability
    * of the UE is enabled
    */
-  user->proc.EPS_capability_status = TRUE;
+  user->proc.EPS_capability_status = true;
   emm_sap.primitive = EMMREG_S1_ENABLED;
   rc = emm_sap_send(user, &emm_sap);
 
@@ -209,7 +209,7 @@ int nas_proc_disable_s1_mode(nas_user_t *user)
    * Notify the EMM procedure call manager that EPS capability
    * of the UE is disabled
    */
-  user->proc.EPS_capability_status = FALSE;
+  user->proc.EPS_capability_status = false;
   emm_sap.primitive = EMMREG_S1_DISABLED;
   rc = emm_sap_send(user, &emm_sap);
 
@@ -231,7 +231,7 @@ int nas_proc_disable_s1_mode(nas_user_t *user)
  **      Others:    None                                       **
  **                                                                        **
  ***************************************************************************/
-int nas_proc_get_eps(nas_user_t *user, int *stat)
+int nas_proc_get_eps(nas_user_t *user, bool *stat)
 {
   LOG_FUNC_IN;
 
@@ -449,7 +449,7 @@ int nas_proc_deregister(nas_user_t *user)
  **      Others:    None                                       **
  **                                                                        **
  ***************************************************************************/
-int nas_proc_get_reg_data(nas_user_t *user, int *mode, int *selected, int format,
+int nas_proc_get_reg_data(nas_user_t *user, int *mode, bool *selected, int format,
                           network_plmn_t *oper, int *AcT)
 {
   LOG_FUNC_IN;
@@ -462,12 +462,12 @@ int nas_proc_get_reg_data(nas_user_t *user, int *mode, int *selected, int format
 
   if (oper_name != NULL) {
     /* An operator is currently selected */
-    *selected = TRUE;
+    *selected = true;
     /* Get the supported Radio Access Technology */
     *AcT = emm_main_get_plmn_rat(user->emm_data);
   } else {
     /* No any operator is selected */
-    *selected = FALSE;
+    *selected = false;
     *AcT = NET_ACCESS_UNAVAILABLE;
   }
 
@@ -558,7 +558,7 @@ int nas_proc_get_loc_info(nas_user_t *user, char *tac, char *ci, int *AcT)
  **                                                                        **
  ** Description: Initiates a detach procedure                              **
  **                                                                        **
- ** Inputs:  switch_off:    TRUE if the detach is due to UE switch-off **
+ ** Inputs:  switch_off:    true if the detach is due to UE switch-off **
  **      Others:    None                                       **
  **                                                                        **
  ** Outputs:     None                                                      **
@@ -566,7 +566,7 @@ int nas_proc_get_loc_info(nas_user_t *user, char *tac, char *ci, int *AcT)
  **      Others:    None                                       **
  **                                                                        **
  ***************************************************************************/
-int nas_proc_detach(nas_user_t *user, int switch_off)
+int nas_proc_detach(nas_user_t *user, bool switch_off)
 {
   LOG_FUNC_IN;
 
@@ -607,7 +607,7 @@ int nas_proc_attach(nas_user_t *user)
   if ( !emm_main_is_attached(user->emm_data) ) {
     /* Initiate an Attach procedure */
     emm_sap.primitive = EMMREG_ATTACH_INIT;
-    emm_sap.u.emm_reg.u.attach.is_emergency = FALSE;
+    emm_sap.u.emm_reg.u.attach.is_emergency = false;
     rc = emm_sap_send(user, &emm_sap);
   }
 
@@ -624,16 +624,16 @@ int nas_proc_attach(nas_user_t *user)
  **      Others:    None                                       **
  **                                                                        **
  ** Outputs:     None                                                      **
- **      Return:    TRUE if the UE is currently attached to    **
+ **      Return:    true if the UE is currently attached to    **
  **             the network                                **
  **      Others:    None                                       **
  **                                                                        **
  ***************************************************************************/
-int nas_proc_get_attach_status(nas_user_t *user)
+bool nas_proc_get_attach_status(nas_user_t *user)
 {
   LOG_FUNC_IN;
 
-  int is_attached = emm_main_is_attached(user->emm_data);
+  bool is_attached = emm_main_is_attached(user->emm_data);
 
   LOG_FUNC_RETURN (is_attached);
 }
@@ -690,10 +690,10 @@ int nas_proc_get_pdn_status(nas_user_t *user, int *cids, int *states, int n_pdn_
   /* For all PDN contexts */
   for (cid = 1; (cid < n_pdn+1) && (n_defined_pdn < n_pdn_max); cid++) {
     /* Get the status of this PDN */
-    int state = FALSE;
-    int is_defined = esm_main_get_pdn_status(user, cid, &state);
+    bool state = false;
+    bool is_defined = esm_main_get_pdn_status(user, cid, &state);
 
-    if (is_defined != FALSE) {
+    if (is_defined != false) {
       /* This PDN has been defined */
       *(cids++) = cid;
       *(states++) = state;
@@ -734,7 +734,7 @@ int nas_proc_get_pdn_param(esm_data_t *esm_data, int *cids, int *types, const ch
 
   /* For all PDN contexts */
   for (cid = 1; (cid < n_pdn+1) && (n_defined_pdn < n_pdn_max); cid++) {
-    int emergency, active;
+    bool emergency, active;
     /* Get PDN connection parameters */
     int rc = esm_main_get_pdn(esm_data, cid, types, apns, &emergency, &active);
 
@@ -845,8 +845,8 @@ int nas_proc_set_pdn(nas_user_t *user, int cid, int type, const char *apn, int i
 
   esm_sap_t esm_sap;
   esm_sap.primitive = ESM_PDN_CONNECTIVITY_REQ;
-  esm_sap.is_standalone = TRUE;
-  esm_sap.data.pdn_connect.is_defined = FALSE;
+  esm_sap.is_standalone = true;
+  esm_sap.data.pdn_connect.is_defined = false;
   esm_sap.data.pdn_connect.cid = cid;
   esm_sap.data.pdn_connect.pdn_type = type;
   esm_sap.data.pdn_connect.apn = apn;
@@ -882,8 +882,8 @@ int nas_proc_reset_pdn(nas_user_t *user, int cid)
 
   esm_sap_t esm_sap;
   esm_sap.primitive = ESM_PDN_CONNECTIVITY_REJ;
-  esm_sap.is_standalone = TRUE;
-  esm_sap.data.pdn_connect.is_defined = TRUE;
+  esm_sap.is_standalone = true;
+  esm_sap.data.pdn_connect.is_defined = true;
   esm_sap.data.pdn_connect.cid = cid;
   /*
    * Notify ESM that the specified PDN context has to be undefined
@@ -916,7 +916,7 @@ int nas_proc_deactivate_pdn(nas_user_t *user, int cid)
 
   if (cid > 0) {
     /* Deactivate only the specified PDN context */
-    rc = _nas_proc_deactivate(user, cid, FALSE);
+    rc = _nas_proc_deactivate(user, cid, false);
   } else {
     /* Do not deactivate the PDN connection established during initial
      * network attachment (identifier 1) */
@@ -924,7 +924,7 @@ int nas_proc_deactivate_pdn(nas_user_t *user, int cid)
 
     /* Deactivate all active PDN contexts */
     while ((rc != RETURNerror) && (cid < esm_main_get_nb_pdns_max(user->esm_data)+1)) {
-      rc = _nas_proc_deactivate(user, cid++, TRUE);
+      rc = _nas_proc_deactivate(user, cid++, true);
     }
   }
 
@@ -970,13 +970,13 @@ int nas_proc_activate_pdn(nas_user_t *user, int cid)
   if (rc != RETURNerror) {
     if (cid > 0) {
       /* Activate only the specified PDN context */
-      rc = _nas_proc_activate(user, cid, FALSE);
+      rc = _nas_proc_activate(user, cid, false);
     } else {
       cid = 1;
 
       /* Activate all defined PDN contexts */
       while ((rc != RETURNerror) && (cid < esm_main_get_nb_pdns_max(user->esm_data)+1)) {
-        rc = _nas_proc_activate(user, cid++, TRUE);
+        rc = _nas_proc_activate(user, cid++, true);
       }
     }
   }
@@ -1177,7 +1177,7 @@ int nas_proc_ul_transfer_cnf(nas_user_t *user)
    */
   emm_sap.primitive = EMMAS_DATA_IND;
   emm_sap.u.emm_as.u.data.ueid = user->ueid;
-  emm_sap.u.emm_as.u.data.delivered = TRUE;
+  emm_sap.u.emm_as.u.data.delivered = true;
   emm_sap.u.emm_as.u.data.NASmsg.length = 0;
   rc = emm_sap_send(user, &emm_sap);
 
@@ -1214,7 +1214,7 @@ int nas_proc_ul_transfer_rej(nas_user_t *user)
    */
   emm_sap.primitive = EMMAS_DATA_IND;
   emm_sap.u.emm_as.u.data.ueid = user->ueid;
-  emm_sap.u.emm_as.u.data.delivered = FALSE;
+  emm_sap.u.emm_as.u.data.delivered = false;
   emm_sap.u.emm_as.u.data.NASmsg.length = 0;
   rc = emm_sap_send(user, &emm_sap);
 
@@ -1251,7 +1251,7 @@ int nas_proc_dl_transfer_ind(nas_user_t *user, const Byte_t *data, uint32_t len)
      */
     emm_sap.primitive = EMMAS_DATA_IND;
     emm_sap.u.emm_as.u.data.ueid = user->ueid;
-    emm_sap.u.emm_as.u.data.delivered = TRUE;
+    emm_sap.u.emm_as.u.data.delivered = true;
     emm_sap.u.emm_as.u.data.NASmsg.length = len;
     emm_sap.u.emm_as.u.data.NASmsg.value = (uint8_t *)data;
     rc = emm_sap_send(user, &emm_sap);
@@ -1274,7 +1274,7 @@ int nas_proc_dl_transfer_ind(nas_user_t *user, const Byte_t *data, uint32_t len)
  **                                                                        **
  ** Inputs:  cid:       Identifier of the PDN context used to es-  **
  **             tablished connectivity to specified PDN    **
- **      apply_to_all:  TRUE if the PDN connectivity procedure is  **
+ **      apply_to_all:  true if the PDN connectivity procedure is  **
  **             initiated to establish connectivity to all **
  **             defined PDNs                               **
  **      Others:    None                                       **
@@ -1284,12 +1284,12 @@ int nas_proc_dl_transfer_ind(nas_user_t *user, const Byte_t *data, uint32_t len)
  **      Others:    None                                       **
  **                                                                        **
  ***************************************************************************/
-static int _nas_proc_activate(nas_user_t *user, int cid, int apply_to_all)
+static int _nas_proc_activate(nas_user_t *user, int cid, bool apply_to_all)
 {
   LOG_FUNC_IN;
 
   int rc;
-  int active = FALSE;
+  bool active = false;
 
   esm_sap_t esm_sap;
 
@@ -1332,8 +1332,8 @@ static int _nas_proc_activate(nas_user_t *user, int cid, int apply_to_all)
    * for the specified PDN
    */
   esm_sap.primitive = ESM_PDN_CONNECTIVITY_REQ;
-  esm_sap.is_standalone = TRUE;
-  esm_sap.data.pdn_connect.is_defined = TRUE;
+  esm_sap.is_standalone = true;
+  esm_sap.data.pdn_connect.is_defined = true;
   esm_sap.data.pdn_connect.cid = cid;
   rc = esm_sap_send(user, &esm_sap);
 
@@ -1347,7 +1347,7 @@ static int _nas_proc_activate(nas_user_t *user, int cid, int apply_to_all)
  ** Description: Initiates a PDN disconnect procedure                      **
  **                                                                        **
  ** Inputs:  cid:       Identifier of the PDN context              **
- **      apply_to_all:  TRUE if the PDN disconnect procedure is    **
+ **      apply_to_all:  true if the PDN disconnect procedure is    **
  **             initiated to request disconnection from    **
  **             all active PDNs                            **
  **      Others:    None                                       **
@@ -1357,15 +1357,15 @@ static int _nas_proc_activate(nas_user_t *user, int cid, int apply_to_all)
  **      Others:    None                                       **
  **                                                                        **
  ***************************************************************************/
-static int _nas_proc_deactivate(nas_user_t *user, int cid, int apply_to_all)
+static int _nas_proc_deactivate(nas_user_t *user, int cid, bool apply_to_all)
 {
   LOG_FUNC_IN;
 
   int rc;
   int pdn_type;
   const char *apn;
-  int emergency = FALSE;
-  int active = FALSE;
+  bool emergency = false;
+  bool active = false;
 
   /* Get PDN context parameters */
   rc = esm_main_get_pdn(user->esm_data, cid, &pdn_type, &apn, &emergency, &active);
diff --git a/openair3/NAS/UE/nas_proc.h b/openair3/NAS/UE/nas_proc.h
index 4e653549ae0698826f0fb69d41052a5fbbdc2429..bd88691de87f7f8176e0d1e847c9100554bf116c 100644
--- a/openair3/NAS/UE/nas_proc.h
+++ b/openair3/NAS/UE/nas_proc.h
@@ -74,7 +74,7 @@ void nas_proc_cleanup(nas_user_t *user);
 
 int nas_proc_enable_s1_mode(nas_user_t *user);
 int nas_proc_disable_s1_mode(nas_user_t *user);
-int nas_proc_get_eps(nas_user_t *user, int *stat);
+int nas_proc_get_eps(nas_user_t *user, bool *stat);
 
 int nas_proc_get_imsi(emm_data_t *emm_data, char *imsi_str);
 int nas_proc_get_msisdn(nas_user_t *user, char *msisdn_str, int *ton_npi);
@@ -83,16 +83,16 @@ int nas_proc_get_signal_quality(nas_user_t *user, int *rsrq, int *rsrp);
 
 int nas_proc_register(nas_user_t *user, int mode, int format, const network_plmn_t *oper, int AcT);
 int nas_proc_deregister(nas_user_t *user);
-int nas_proc_get_reg_data(nas_user_t *user, int *mode, int *selected, int format,
+int nas_proc_get_reg_data(nas_user_t *user, int *mode, bool *selected, int format,
                           network_plmn_t *oper, int *AcT);
 int nas_proc_get_oper_list(nas_user_t *user, const char **oper_list);
 
 int nas_proc_get_reg_status(nas_user_t *user, int *stat);
 int nas_proc_get_loc_info(nas_user_t *user, char *tac, char *ci, int *AcT);
 
-int nas_proc_detach(nas_user_t *user, int switch_off);
+int nas_proc_detach(nas_user_t *user, bool switch_off);
 int nas_proc_attach(nas_user_t *user);
-int nas_proc_get_attach_status(nas_user_t *user);
+bool nas_proc_get_attach_status(nas_user_t *user);
 
 int nas_proc_reset_pdn(nas_user_t *user, int cid);
 int nas_proc_set_pdn(nas_user_t *user, int cid, int type, const char *apn, int ipv4_addr,
diff --git a/openair3/NAS/UE/nas_proc_defs.h b/openair3/NAS/UE/nas_proc_defs.h
index 1ce2bfd929df7734eafd738df34787c388b263f6..09cf8e834e2a9113f1ebd397bd3300075ea0be01 100644
--- a/openair3/NAS/UE/nas_proc_defs.h
+++ b/openair3/NAS/UE/nas_proc_defs.h
@@ -1,12 +1,14 @@
 #ifndef _NAS_PROC_DEFS_H
 #define _NAS_PROC_DEFS_H
 
+#include <stdbool.h>
+
 /*
  * Local NAS data
  */
 typedef struct {
   /* EPS capibility status */
-  int EPS_capability_status;
+  bool EPS_capability_status;
   /* Reference signal received quality    */
   int rsrq;
   /* Reference signal received power      */
diff --git a/openair3/NAS/UE/nas_ue_task.c b/openair3/NAS/UE/nas_ue_task.c
index a94445349cf648597c913cc44d82583cd7300a8b..34bf6cb3ad5e923fe457c550326d63c47c10dc80 100644
--- a/openair3/NAS/UE/nas_ue_task.c
+++ b/openair3/NAS/UE/nas_ue_task.c
@@ -43,10 +43,10 @@ uint16_t ue_idx_standalone = 0xFFFF;
 
 char *make_port_str_from_ueid(const char *base_port_str, int ueid);
 
-static int nas_ue_process_events(nas_user_container_t *users, struct epoll_event *events, int nb_events)
+static bool nas_ue_process_events(nas_user_container_t *users, struct epoll_event *events, int nb_events)
 {
   int event;
-  int exit_loop = FALSE;
+  bool exit_loop = false;
 
   LOG_I(NAS, "[UE] Received %d events\n", nb_events);
 
@@ -310,7 +310,7 @@ void *nas_ue_task(void *args_p)
     nb_events = itti_get_events(TASK_NAS_UE, &events);
 
     if ((nb_events > 0) && (events != NULL)) {
-      if (nas_ue_process_events(users, events, nb_events) == TRUE) {
+      if (nas_ue_process_events(users, events, nb_events) == true) {
         LOG_E(NAS, "[UE] Received exit loop\n");
       }
     }
diff --git a/openair3/NAS/UE/nas_user.c b/openair3/NAS/UE/nas_user.c
index d3467eddd518349d3f8fc527bd6c27574870daeb..56e41e4610e1fc8eedef9a774740e0388e6b7017 100644
--- a/openair3/NAS/UE/nas_user.c
+++ b/openair3/NAS/UE/nas_user.c
@@ -187,10 +187,10 @@ void nas_user_initialize(nas_user_t *user, emm_indication_callback_t emm_cb,
  **                             from which data have been received         **
  **              Others:        None                                       **
  **                                                                        **
- ** Outputs:     Return:        FALSE, TRUE                                **
+ ** Outputs:     Return:        false, true                                **
  **                                                                        **
  ***************************************************************************/
-int nas_user_receive_and_process(nas_user_t *user, char *message)
+bool nas_user_receive_and_process(nas_user_t *user, char *message)
 {
   LOG_FUNC_IN;
 
@@ -212,13 +212,13 @@ int nas_user_receive_and_process(nas_user_t *user, char *message)
        * exit from the receiving loop */
       LOG_TRACE (ERROR, "UE-MAIN   - "
                  "Failed to read data from the user application layer");
-      LOG_FUNC_RETURN(TRUE);
+      LOG_FUNC_RETURN(true);
     }
   }
 
   if (bytes == 0) {
     /* A signal was caught before any data were available */
-    LOG_FUNC_RETURN(FALSE);
+    LOG_FUNC_RETURN(false);
   }
 
   /* Decode the user data message */
@@ -268,12 +268,12 @@ int nas_user_receive_and_process(nas_user_t *user, char *message)
          * exit from the receiving loop */
         LOG_TRACE (ERROR, "UE-MAIN   - "
                    "Failed to send data to the user application layer");
-        LOG_FUNC_RETURN(TRUE);
+        LOG_FUNC_RETURN(true);
       }
     }
   }
 
-  LOG_FUNC_RETURN(FALSE);
+  LOG_FUNC_RETURN(false);
 }
 
 /****************************************************************************
@@ -989,7 +989,7 @@ static int _nas_user_proc_cops(nas_user_t *user, const at_command_t *data)
   char oper_buffer[NET_FORMAT_MAX_SIZE], *oper = oper_buffer;
   memset(oper, 0, NET_FORMAT_MAX_SIZE);
 
-  int oper_is_selected;
+  bool oper_is_selected;
 
   at_response->id = data->id;
   at_response->type = data->type;
@@ -1266,7 +1266,7 @@ static int _nas_user_proc_cgatt(nas_user_t *user, const at_command_t *data)
       if (data->command.cgatt.state == AT_CGATT_ATTACHED) {
         ret_code = nas_proc_attach(user);
       } else if (data->command.cgatt.state == AT_CGATT_DETACHED) {
-        ret_code = nas_proc_detach(user, FALSE);
+        ret_code = nas_proc_detach(user, false);
       }
 
       if (ret_code != RETURNok) {
@@ -1284,7 +1284,7 @@ static int _nas_user_proc_cgatt(nas_user_t *user, const at_command_t *data)
     /*
      * Read command returns the current EPS service state.
      */
-    if (nas_proc_get_attach_status(user) != TRUE) {
+    if (nas_proc_get_attach_status(user) != true) {
       cgatt->state = AT_CGATT_DETACHED;
     } else {
       cgatt->state = AT_CGATT_ATTACHED;
@@ -1821,7 +1821,7 @@ static int _nas_user_proc_cgdcont(nas_user_t *user, const at_command_t *data)
   int emergency = AT_CGDCONT_EBS_DEFAULT;
   int p_cscf = AT_CGDCONT_PCSCF_DEFAULT;
   int im_cn_signalling = AT_CGDCONT_IM_CM_DEFAULT;
-  int reset_pdn = TRUE;
+  bool reset_pdn = true;
 
   at_response->id = data->id;
   at_response->type = data->type;
@@ -1870,7 +1870,7 @@ static int _nas_user_proc_cgdcont(nas_user_t *user, const at_command_t *data)
         break;
       }
 
-      reset_pdn = FALSE;
+      reset_pdn = false;
     }
 
     if (data->mask & AT_CGDCONT_APN_MASK) {
diff --git a/openair3/NAS/UE/nas_user.h b/openair3/NAS/UE/nas_user.h
index 1ded438ddd1c5982f42c10d3eb3121f2f1eb915a..63920540d4dd138cbe0034f02022cd7aed787f0a 100644
--- a/openair3/NAS/UE/nas_user.h
+++ b/openair3/NAS/UE/nas_user.h
@@ -63,7 +63,7 @@ Description NAS procedure functions triggered by the user
 void nas_user_initialize(nas_user_t *user, emm_indication_callback_t emm_cb,
                          esm_indication_callback_t esm_cb, const char *version);
 
-int nas_user_receive_and_process(nas_user_t *user, char *message);
+bool nas_user_receive_and_process(nas_user_t *user, char *message);
 
 int nas_user_process_data(nas_user_t *user, const void *data);
 
diff --git a/openair3/NGAP/ngap_common.h b/openair3/NGAP/ngap_common.h
index 60f7beacd06eb9ef37d86ec705b75e627ea305b3..a550b6e436781ff7e58b6095364197a7edd6ca2d 100644
--- a/openair3/NGAP/ngap_common.h
+++ b/openair3/NGAP/ngap_common.h
@@ -102,13 +102,6 @@
 # error "You are compiling ngap with the wrong version of ASN1C"
 #endif
 
-#ifndef FALSE
-# define FALSE (0)
-#endif
-#ifndef TRUE
-# define TRUE  (!FALSE)
-#endif
-
 #define NGAP_UE_ID_FMT  "0x%06"PRIX32
 
 extern int asn_debug;
diff --git a/openair3/S1AP/s1ap_common.h b/openair3/S1AP/s1ap_common.h
index 3c07f92a7f5b1dd6e91ad3a833772709caf300c4..d383b622b6197108259d1ad2b77156566fb90b4d 100644
--- a/openair3/S1AP/s1ap_common.h
+++ b/openair3/S1AP/s1ap_common.h
@@ -61,13 +61,6 @@
 # error "You are compiling s1ap with the wrong version of ASN1C"
 #endif
 
-#ifndef FALSE
-# define FALSE (0)
-#endif
-#ifndef TRUE
-# define TRUE  (!FALSE)
-#endif
-
 #define S1AP_UE_ID_FMT  "0x%06"PRIX32
 
 extern int asn_debug;
diff --git a/openair3/S1AP/s1ap_eNB_trace.c b/openair3/S1AP/s1ap_eNB_trace.c
index 695eeb4ef836a340f4639153ba06699172596f0b..de84682ec1aaf882446ee36720dc295b5d3e7acb 100644
--- a/openair3/S1AP/s1ap_eNB_trace.c
+++ b/openair3/S1AP/s1ap_eNB_trace.c
@@ -115,7 +115,7 @@ int s1ap_eNB_handle_trace_start(uint32_t         assoc_id,
     container = &pdu->choice.initiatingMessage.value.choice.TraceStart;
 
     S1AP_FIND_PROTOCOLIE_BY_ID(S1AP_TraceStartIEs_t, ie, container,
-                               S1AP_ProtocolIE_ID_id_eNB_UE_S1AP_ID, TRUE);
+                               S1AP_ProtocolIE_ID_id_eNB_UE_S1AP_ID, true);
     mme_ref_p = s1ap_eNB_get_MME(NULL, assoc_id, 0);
     DevAssert(mme_ref_p != NULL);
   if (ie != NULL) {
diff --git a/openair3/ocp-gtpu/gtp_itf.cpp b/openair3/ocp-gtpu/gtp_itf.cpp
index a6bda28b5712826837b86fea127f61af761e28e9..3626e0b8eddfd6221b0bfef39f3c7be47c5a3b41 100644
--- a/openair3/ocp-gtpu/gtp_itf.cpp
+++ b/openair3/ocp-gtpu/gtp_itf.cpp
@@ -21,7 +21,7 @@ extern "C" {
 #include "openair2/SDAP/nr_sdap/nr_sdap.h"
 //#include <openair1/PHY/phy_extern.h>
 
-static boolean_t is_gnb = false;
+static bool is_gnb = false;
 
 #pragma pack(1)
 
@@ -969,7 +969,7 @@ static int Gtpv1uHandleGpdu(int h,
   int offset = sizeof(Gtpv1uMsgHeaderT);
 
   uint8_t qfi = 0;
-  boolean_t rqi = FALSE;
+  bool rqi = false;
   uint32_t NR_PDCP_PDU_SN = 0;
 
   /* if E, S, or PN is set then there are 4 more bytes of header */
diff --git a/openair3/ocp-gtpu/gtp_itf.h b/openair3/ocp-gtpu/gtp_itf.h
index dd52481729d09e2c64061cd5e215ec56d691ac28..51a47e8c827c8ea633ce562805abc6afe3caeb18 100644
--- a/openair3/ocp-gtpu/gtp_itf.h
+++ b/openair3/ocp-gtpu/gtp_itf.h
@@ -8,32 +8,30 @@
 extern "C" {
 #endif
 
-typedef boolean_t (*gtpCallback)(
-  protocol_ctxt_t  *ctxt_pP,
-  const srb_flag_t     srb_flagP,
-  const rb_id_t        rb_idP,
-  const mui_t          muiP,
-  const confirm_t      confirmP,
-  const sdu_size_t     sdu_buffer_sizeP,
-  unsigned char *const sdu_buffer_pP,
-  const pdcp_transmission_mode_t modeP,
-  const uint32_t *sourceL2Id,
-  const uint32_t *destinationL2Id);
+typedef bool (*gtpCallback)(protocol_ctxt_t  *ctxt_pP,
+                            const srb_flag_t     srb_flagP,
+                            const rb_id_t        rb_idP,
+                            const mui_t          muiP,
+                            const confirm_t      confirmP,
+                            const sdu_size_t     sdu_buffer_sizeP,
+                            unsigned char *const sdu_buffer_pP,
+                            const pdcp_transmission_mode_t modeP,
+                            const uint32_t *sourceL2Id,
+                            const uint32_t *destinationL2Id);
 
-typedef boolean_t (*gtpCallbackSDAP)(
-  protocol_ctxt_t  *ctxt_pP,
-  const srb_flag_t     srb_flagP,
-  const rb_id_t        rb_idP,
-  const mui_t          muiP,
-  const confirm_t      confirmP,
-  const sdu_size_t     sdu_buffer_sizeP,
-  unsigned char *const sdu_buffer_pP,
-  const pdcp_transmission_mode_t modeP,
-  const uint32_t *sourceL2Id,
-  const uint32_t *destinationL2Id,
-  const uint8_t   qfi,
-  const boolean_t rqi,
-  const int       pdusession_id);
+typedef bool (*gtpCallbackSDAP)(protocol_ctxt_t  *ctxt_pP,
+                                const srb_flag_t     srb_flagP,
+                                const rb_id_t        rb_idP,
+                                const mui_t          muiP,
+                                const confirm_t      confirmP,
+                                const sdu_size_t     sdu_buffer_sizeP,
+                                unsigned char *const sdu_buffer_pP,
+                                const pdcp_transmission_mode_t modeP,
+                                const uint32_t *sourceL2Id,
+                                const uint32_t *destinationL2Id,
+                                const uint8_t   qfi,
+                                const bool      rqi,
+                                const int       pdusession_id);
 
 typedef struct openAddr_s {
   char originHost[HOST_NAME_MAX];
diff --git a/targets/ARCH/COMMON/common_lib.h b/targets/ARCH/COMMON/common_lib.h
index 78acc373ee5ac3df3ad2d9822a6a7a400a5bb9d1..0f11447bf416da5476df5d257f26acc303d4b2bd 100644
--- a/targets/ARCH/COMMON/common_lib.h
+++ b/targets/ARCH/COMMON/common_lib.h
@@ -380,7 +380,7 @@ struct openair0_device_t {
       @param buff Buffer which holds the samples (2 dimensional)
       @param nsamps number of samples to be sent
       @param number of antennas 
-      @param flags flags must be set to TRUE if timestamp parameter needs to be applied
+      @param flags flags must be set to true if timestamp parameter needs to be applied
   */
   int (*trx_write_func)(openair0_device *device, openair0_timestamp timestamp, void **buff, int nsamps,int antenna_id, int flags);
 
@@ -390,7 +390,7 @@ struct openair0_device_t {
       @param buff Buffer which holds the samples (1 dimensional)
       @param nsamps number of samples to be sent
       @param antenna_id index of the antenna if the device has multiple anteannas
-      @param flags flags must be set to TRUE if timestamp parameter needs to be applied
+      @param flags flags must be set to true if timestamp parameter needs to be applied
   */
   int (*trx_write_func2)(openair0_device *device, openair0_timestamp timestamp, void *buff, int nsamps,int antenna_id, int flags);
 
diff --git a/targets/ARCH/IRIS/USERSPACE/LIB/iris_lib.cpp b/targets/ARCH/IRIS/USERSPACE/LIB/iris_lib.cpp
index 1273097f3b901468f6ffd56ff2737fcbf22114c0..47bbadfe2823544b094fe9ce916207b08a5ab869 100644
--- a/targets/ARCH/IRIS/USERSPACE/LIB/iris_lib.cpp
+++ b/targets/ARCH/IRIS/USERSPACE/LIB/iris_lib.cpp
@@ -134,7 +134,7 @@ static void trx_iris_end(openair0_device *device) {
       @param buff Buffer which holds the samples
       @param nsamps number of samples to be sent
       @param antenna_id index of the antenna if the device has multiple anteannas
-      @param flags flags must be set to TRUE if timestamp parameter needs to be applied
+      @param flags flags must be set to true if timestamp parameter needs to be applied
 */
 
 
diff --git a/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp b/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
index eb670d302e4a8a310531253078add2b4fe0b2066..7c0180e5e789e6cdb3a02a5a2eea91930d5dc869 100644
--- a/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
+++ b/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
@@ -331,7 +331,7 @@ static void trx_usrp_end(openair0_device *device) {
       @param buff Buffer which holds the samples
       @param nsamps number of samples to be sent
       @param antenna_id index of the antenna if the device has multiple antennas
-      @param flags flags must be set to TRUE if timestamp parameter needs to be applied
+      @param flags flags must be set to true if timestamp parameter needs to be applied
 */
 static int trx_usrp_write(openair0_device *device,
 			  openair0_timestamp timestamp,
@@ -352,7 +352,7 @@ static int trx_usrp_write(openair0_device *device,
 
   AssertFatal( MAX_WRITE_THREAD_BUFFER_SIZE >= cc,"Do not support more than %d cc number\n", MAX_WRITE_THREAD_BUFFER_SIZE);
 
-    boolean_t first_packet_state=false,last_packet_state=false;
+  bool first_packet_state=false,last_packet_state=false;
 
     if (flags_lsb == 2) { // start of burst
       //      s->tx_md.start_of_burst = true;
@@ -481,7 +481,7 @@ VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_BEAM_SWITCHI
       @param buff Buffer which holds the samples
       @param nsamps number of samples to be sent
       @param antenna_id index of the antenna if the device has multiple antennas
-      @param flags flags must be set to TRUE if timestamp parameter needs to be applied
+      @param flags flags must be set to true if timestamp parameter needs to be applied
 */
 void *trx_usrp_write_thread(void * arg){
   int ret=0;
@@ -1030,9 +1030,13 @@ extern "C" {
     }
 
     if (device_adds[0].get("type") == "n3xx") {
-      printf("Found USRP n300\n");
+      const std::string product = device_adds[0].get("product");
+      printf("Found USRP %s\n", product.c_str());
       device->type=USRP_N300_DEV;
-      usrp_master_clock = 122.88e6;
+      if (product == "n320")
+        usrp_master_clock = 245.76e6; // N320 does not support 122.88e6 master clock rate
+      else
+        usrp_master_clock = 122.88e6;
       args += boost::str(boost::format(",master_clock_rate=%f") % usrp_master_clock);
 
       if ( 0 != system("sysctl -w net.core.rmem_max=62500000 net.core.wmem_max=62500000") )
diff --git a/targets/ARCH/iqplayer/iqplayer_lib.c b/targets/ARCH/iqplayer/iqplayer_lib.c
index b62c1935d36967c88da984536846a60b9a9f7ca0..f6578d6e9a31707b3b0220465bb47bf7048b1615 100644
--- a/targets/ARCH/iqplayer/iqplayer_lib.c
+++ b/targets/ARCH/iqplayer/iqplayer_lib.c
@@ -158,7 +158,7 @@ static void trx_iqplayer_end(openair0_device *device) {
       @param buff Buffer which holds the samples
       @param nsamps number of samples to be sent
       @param antenna_id index of the antenna if the device has multiple antennas
-      @param flags flags must be set to TRUE if timestamp parameter needs to be applied
+      @param flags flags must be set to true if timestamp parameter needs to be applied
 */
 static int trx_iqplayer_write(openair0_device *device, openair0_timestamp timestamp, void **buff, int nsamps, int cc, int flags) {
   struct timespec req;
diff --git a/targets/ARCH/rfsimulator/stored_node.c b/targets/ARCH/rfsimulator/stored_node.c
index cf025680cd76d3665135a2002a9c5e5ad35158f4..17ab3cb734391e417dda4793993f1fddfac353c4 100644
--- a/targets/ARCH/rfsimulator/stored_node.c
+++ b/targets/ARCH/rfsimulator/stored_node.c
@@ -187,7 +187,7 @@ int main(int argc, char *argv[]) {
   }
 
   uint64_t typeStamp=ENB_MAGICDL;
-  boolean_t raw=false;
+  bool raw = false;
 
   if ( argc == 5 ) {
     raw=true;
diff --git a/targets/RT/USER/lte-enb.c b/targets/RT/USER/lte-enb.c
index a3048995a53f1de81d41aff08a83848eb698d52c..3d62d5c19ad5928afcee0719f71c23c77486bb98 100644
--- a/targets/RT/USER/lte-enb.c
+++ b/targets/RT/USER/lte-enb.c
@@ -231,9 +231,9 @@ static inline int rxtx(PHY_VARS_eNB *eNB,
     dlsch_ue_select_tbl_in_use = !dlsch_ue_select_tbl_in_use;
     // L2-emulator can work only one eNB.
     //      memcpy(&pre_scd_eNB_UE_stats,&RC.mac[ru->eNB_list[0]->Mod_id]->UE_info.eNB_UE_stats, sizeof(eNB_UE_STATS)*MAX_NUM_CCs*NUMBER_OF_UE_MAX);
-    //      memcpy(&pre_scd_activeUE, &RC.mac[ru->eNB_list[0]->Mod_id]->UE_info.active, sizeof(boolean_t)*NUMBER_OF_UE_MAX);
+    //      memcpy(&pre_scd_activeUE, &RC.mac[ru->eNB_list[0]->Mod_id]->UE_info.active, sizeof(bool)*NUMBER_OF_UE_MAX);
     memcpy(&pre_scd_eNB_UE_stats,&RC.mac[0]->UE_info.eNB_UE_stats, sizeof(eNB_UE_STATS)*MAX_NUM_CCs*NUMBER_OF_UE_MAX);
-    memcpy(&pre_scd_activeUE, &RC.mac[0]->UE_info.active, sizeof(boolean_t)*NUMBER_OF_UE_MAX);
+    memcpy(&pre_scd_activeUE, &RC.mac[0]->UE_info.active, sizeof(bool)*NUMBER_OF_UE_MAX);
     AssertFatal((ret= pthread_mutex_lock(&ru->proc.mutex_pre_scd))==0,"[eNB] error locking proc mutex for eNB pre scd, return %d\n",ret);
     ru->proc.instance_pre_scd++;
 
diff --git a/targets/RT/USER/lte-ru.c b/targets/RT/USER/lte-ru.c
index 836709b473c76334760d2e703bfd8dcce715a1b2..a7a0d2de321d988b87821e231fad841ac59d4cb1 100644
--- a/targets/RT/USER/lte-ru.c
+++ b/targets/RT/USER/lte-ru.c
@@ -1834,7 +1834,7 @@ static void *ru_thread( void *param ) {
         new_dlsch_ue_select_tbl_in_use = dlsch_ue_select_tbl_in_use;
         dlsch_ue_select_tbl_in_use = !dlsch_ue_select_tbl_in_use;
         memcpy(&pre_scd_eNB_UE_stats,&RC.mac[ru->eNB_list[0]->Mod_id]->UE_info.eNB_UE_stats, sizeof(eNB_UE_STATS)*MAX_NUM_CCs*NUMBER_OF_UE_MAX);
-        memcpy(&pre_scd_activeUE, &RC.mac[ru->eNB_list[0]->Mod_id]->UE_info.active, sizeof(boolean_t)*NUMBER_OF_UE_MAX);
+        memcpy(&pre_scd_activeUE, &RC.mac[ru->eNB_list[0]->Mod_id]->UE_info.active, sizeof(bool)*NUMBER_OF_UE_MAX);
         AssertFatal((ret=pthread_mutex_lock(&ru->proc.mutex_pre_scd))==0,"[eNB] error locking proc mutex for eNB pre scd\n");
         ru->proc.instance_pre_scd++;
 
diff --git a/targets/TEST/PDCP/test_pdcp.c b/targets/TEST/PDCP/test_pdcp.c
index b62edf1215410921f3c9e27fbe7d4c55b9400fd3..d6becf87c1499167d1399a0ea8c6defa7cd1a8ac 100644
--- a/targets/TEST/PDCP/test_pdcp.c
+++ b/targets/TEST/PDCP/test_pdcp.c
@@ -100,7 +100,7 @@ int main(int argc, char **argv)
   list_init(&test_pdu_rx_list, NULL);
   logInit();
 
-  if (init_pdcp_entity(&pdcp_array[0]) == TRUE && init_pdcp_entity(&pdcp_array[1]) == TRUE)
+  if (init_pdcp_entity(&pdcp_array[0]) == true && init_pdcp_entity(&pdcp_array[1]) == true)
     msg("[TEST] PDCP entity initialization OK\n");
   else {
     msg("[TEST] Cannot initialize PDCP entities!\n");
@@ -109,7 +109,7 @@ int main(int argc, char **argv)
 
   /* Initialize PDCP state variables */
   for (index = 0; index < 2; ++index) {
-    if (pdcp_init_seq_numbers(&pdcp_array[index]) == FALSE) {
+    if (pdcp_init_seq_numbers(&pdcp_array[index]) == false) {
       msg("[TEST] Cannot initialize sequence numbers of PDCP entity %d!\n", index);
       exit(1);
     } else {
@@ -120,11 +120,11 @@ int main(int argc, char **argv)
 #if TEST_RX_AND_TX_WINDOW
 
   /* Test TX window */
-  if (test_tx_window() == FALSE)
+  if (test_tx_window() == false)
     test_result = 1;
 
   /* Test RX window */
-  if (test_rx_window() == FALSE)
+  if (test_rx_window() == false)
     test_result = 1;
 
 #endif
@@ -132,11 +132,11 @@ int main(int argc, char **argv)
 #if TEST_PDCP_DATA_REQUEST_AND_INDICATION
 
   /* Test pdcp_data_req() method in pdcp.c */
-  if (test_pdcp_data_req() == FALSE)
+  if (test_pdcp_data_req() == false)
     test_result = 1;
 
   /* Test pdcp_data_ind() method in pdcp.c */
-  if (test_pdcp_data_ind() == FALSE)
+  if (test_pdcp_data_ind() == false)
     test_result = 1;
 
 #endif
@@ -150,10 +150,10 @@ int main(int argc, char **argv)
   return test_result;
 }
 
-BOOL init_pdcp_entity(pdcp_t *pdcp_entity)
+bool init_pdcp_entity(pdcp_t *pdcp_entity)
 {
   if (pdcp_entity == NULL)
-    return FALSE;
+    return false;
 
   /*
    * Initialize sequence number state variables of relevant PDCP entity
@@ -171,10 +171,10 @@ BOOL init_pdcp_entity(pdcp_t *pdcp_entity)
       pdcp_entity->next_pdcp_rx_sn, pdcp_entity->tx_hfn, pdcp_entity->rx_hfn, \
       pdcp_entity->last_submitted_pdcp_rx_sn, pdcp_entity->seq_num_size);
 
-  return TRUE;
+  return true;
 }
 
-BOOL test_tx_window(void)
+bool test_tx_window(void)
 {
   unsigned long index = 0;
 
@@ -185,33 +185,33 @@ BOOL test_tx_window(void)
       msg("TX packet # %07lu seq # %04d hfn # %04d\n", index, pseudo_tx_sn, pdcp_array[0].tx_hfn);
     else {
       msg("TX packet is out-of-window!\n");
-      return FALSE;
+      return false;
     }
   }
 
-  return TRUE;
+  return true;
 }
 
-BOOL test_rx_window(void)
+bool test_rx_window(void)
 {
   unsigned long index = 0;
 
   for (index = 0; index < NUMBER_OF_TEST_PACKETS; ++index) {
     u16 pseudo_rx_sn = (index == 0) ? 0 : index % WINDOW_SIZE;
 
-    if (pdcp_is_rx_seq_number_valid(pseudo_rx_sn, &pdcp_array[1]) == TRUE) {
+    if (pdcp_is_rx_seq_number_valid(pseudo_rx_sn, &pdcp_array[1]) == true) {
       msg("RX packet # %07lu seq # %04d last-submitted # %04d hfn # %04d\n", \
           index, pdcp_array[1].next_pdcp_rx_sn, pdcp_array[1].last_submitted_pdcp_rx_sn, pdcp_array[1].rx_hfn);
     } else {
       msg("RX packet seq # %04lu is not valid!\n", index);
-      return FALSE;
+      return false;
     }
   }
 
-  return TRUE;
+  return true;
 }
 
-BOOL test_pdcp_data_req(void)
+bool test_pdcp_data_req(void)
 {
   unsigned char* pdcp_test_pdu_buffer = NULL;
   unsigned char pdcp_test_pdu_buffer_size = DUMMY_BUFFER_SIZE + PDCP_USER_PLANE_DATA_PDU_LONG_SN_HEADER_SIZE;
@@ -224,7 +224,7 @@ BOOL test_pdcp_data_req(void)
 
   if (pdcp_test_pdu_buffer == NULL) {
     msg("Cannot allocate a buffer for test!\n");
-    return FALSE;
+    return false;
   }
 
   /*
@@ -241,7 +241,7 @@ BOOL test_pdcp_data_req(void)
     /*
      * Ask PDCP to create a PDU with given buffer and enqueue it to `test_pdu_tx_list`
      */
-    if (pdcp_data_req(0, 0, 10, DUMMY_BUFFER, &pdcp_array[0], &test_pdu_tx_list) == TRUE) {
+    if (pdcp_data_req(0, 0, 10, DUMMY_BUFFER, &pdcp_array[0], &test_pdu_tx_list) == true) {
       msg("[TEST] Starting to dissect PDU created by PDCP...\n");
 
       /*
@@ -251,7 +251,7 @@ BOOL test_pdcp_data_req(void)
 
       if (pdcp_test_pdu_buffer_size == 0 ) {
         msg("[TEST] PDU created by pdcp_data_req() is invalid!\n");
-        return FALSE;
+        return false;
       }
 
       /*
@@ -269,7 +269,7 @@ BOOL test_pdcp_data_req(void)
        */
       if (pdcp_test_pdu_buffer[0] & 0x80) {
         msg("[TEST] First bit is not 0, which means this is not a Data PDU!\n");
-        return FALSE;
+        return false;
       } else {
         msg("[TEST] First bit is 0 so this is a Data PDU, OK\n");
       }
@@ -279,7 +279,7 @@ BOOL test_pdcp_data_req(void)
        */
       if ((pdcp_test_pdu_buffer[0] & 0x70) != 0) {
         msg("[TEST] Reserved bits are not 0!\n");
-        return FALSE;
+        return false;
       } else {
         msg("[TEST] Reserved bits are all 0, OK\n");
       }
@@ -292,21 +292,21 @@ BOOL test_pdcp_data_req(void)
 
       if (sequence_number != index % WINDOW_SIZE) {
         msg("[TEST] Sequence numbers are out-of-order!\n");
-        return FALSE;
+        return false;
       } else {
         msg("[TEST] Sequence number is correct\n");
       }
 
     } else {
       msg("[TEST] pdcp_data_req() returned FALSE!\n");
-      return FALSE;
+      return false;
     }
   }
 
-  return TRUE;
+  return true;
 }
 
-BOOL test_pdcp_data_ind(void)
+bool test_pdcp_data_ind(void)
 {
   /*
    * This is the list that pdcp_data_ind() takes to put pdcp_data_ind_header_t
@@ -341,9 +341,9 @@ BOOL test_pdcp_data_ind(void)
 
     test_sdu = list_remove_head(&test_pdu_rx_list);
 
-    if (pdcp_data_ind(0, 0, test_sdu_size, test_sdu, &pdcp_array[0], &test_pdu_indication_list) == FALSE) {
+    if (pdcp_data_ind(0, 0, test_sdu_size, test_sdu, &pdcp_array[0], &test_pdu_indication_list) == false) {
       msg("[TEST] pdcp_data_ind() failed to handle data indication!\n");
-      return FALSE;
+      return false;
     } else {
       msg("[TEST] pdcp_data_ind() succcessfuly handled data indication\n");
     }
@@ -359,7 +359,7 @@ BOOL test_pdcp_data_ind(void)
 
     if (test_data_ind_header == NULL) {
       msg("[TEST] Data indication header is not valid!\n");
-      return FALSE;
+      return false;
     } else {
       pdcp_data_ind_header_t* indication_header = (pdcp_data_ind_header_t*)test_data_ind_header->data;
 
@@ -370,7 +370,7 @@ BOOL test_pdcp_data_ind(void)
         msg("[TEST] Radio bearer ID is correct\n");
       } else {
         msg("[TEST] Radio bearer ID is not correct! (expected: 0, parsed: %d)\n", indication_header->rb_id);
-        return FALSE;
+        return false;
       }
 
       /*
@@ -380,7 +380,7 @@ BOOL test_pdcp_data_ind(void)
         msg("[TEST] SDU size is correct\n");
       } else {
         msg("[TEST] SDU size is not correct! (expected: %d, parsed: %d)\n", DUMMY_BUFFER_SIZE, indication_header->data_size);
-        return FALSE;
+        return false;
       }
 
       /*
@@ -412,11 +412,11 @@ BOOL test_pdcp_data_ind(void)
       print_byte_stream("[TEST] TXed data: ", DUMMY_BUFFER, DUMMY_BUFFER_SIZE);
       print_byte_stream("[TEST] RXed data: ", (unsigned char*)&(test_data_ind_header->data[data_index]), DUMMY_BUFFER_SIZE);
 
-      return FALSE;
+      return false;
     }
   }
 
-  return TRUE;
+  return true;
 }
 
 
diff --git a/targets/TEST/PDCP/test_pdcp.h b/targets/TEST/PDCP/test_pdcp.h
index 0da174cc8caad238452240d5bc70bcf435901a1d..629f6f253910bf5e69fe8767005e7a2328829782 100644
--- a/targets/TEST/PDCP/test_pdcp.h
+++ b/targets/TEST/PDCP/test_pdcp.h
@@ -42,17 +42,17 @@ int pdcp_fifo_flush_sdus (void) { return 0; }
 int pdcp_fifo_read_input_sdus_remaining_bytes (void) { return 0; }
 int pdcp_fifo_read_input_sdus (void) { return 0; }
 
-BOOL init_pdcp_entity(pdcp_t *pdcp_entity);
-BOOL test_tx_window(void);
-BOOL test_rx_window(void);
-BOOL test_pdcp_data_req(void);
-BOOL test_pdcp_data_ind(void);
+bool init_pdcp_entity(pdcp_t *pdcp_entity);
+bool test_tx_window(void);
+bool test_rx_window(void);
+bool test_pdcp_data_req(void);
+bool test_pdcp_data_ind(void);
 
 /*
  * PDCP methods that are going to be utilised throughout the test
  */
-extern BOOL pdcp_init_seq_numbers(pdcp_t* pdcp_entity);
+extern bool pdcp_init_seq_numbers(pdcp_t* pdcp_entity);
 extern u16 pdcp_get_next_tx_seq_number(pdcp_t* pdcp_entity);
-extern BOOL pdcp_is_rx_seq_number_valid(u16 seq_num, pdcp_t* pdcp_entity);
+extern bool pdcp_is_rx_seq_number_valid(u16 seq_num, pdcp_t* pdcp_entity);
 
 #endif
diff --git a/targets/TEST/PDCP/with_rlc/test_pdcp_rlc.c b/targets/TEST/PDCP/with_rlc/test_pdcp_rlc.c
index 378ee95c3bea10fbf8b4a019fb788dd4208184fa..7b8017172435300c4d3ef7a4044724263d90f1d3 100644
--- a/targets/TEST/PDCP/with_rlc/test_pdcp_rlc.c
+++ b/targets/TEST/PDCP/with_rlc/test_pdcp_rlc.c
@@ -109,7 +109,7 @@ int pdcp_fifo_flush_sdus () {}
 int pdcp_fifo_read_input_sdus_remaining_bytes () {}
 int pdcp_fifo_read_input_sdus () {}
 
-BOOL init_pdcp_entity(pdcp_t *pdcp_entity);
+bool init_pdcp_entity(pdcp_t *pdcp_entity);
 
 //-----------------------------------------------------------------------------
 void pdcp_rlc_test_mac_rlc_loop (struct mac_data_ind *data_indP,  struct mac_data_req *data_requestP, int* drop_countP, int *tx_packetsP, int* dropped_tx_packetsP) //-----------------------------------------------------------------------------
@@ -230,7 +230,7 @@ int main(int argc, char **argv)
   pdcp_module_init();
   logInit();
 
-  if (init_pdcp_entity(&pdcp_array[0][1]) == TRUE && init_pdcp_entity(&pdcp_array[1][1]) == TRUE)
+  if (init_pdcp_entity(&pdcp_array[0][1]) == true && init_pdcp_entity(&pdcp_array[1][1]) == true)
     msg("PDCP entity initialization OK\n");
   else {
     msg("Cannot initialize PDCP entities!\n");
@@ -239,7 +239,7 @@ int main(int argc, char **argv)
 
   /* Initialize PDCP state variables */
   for (index = 0; index < 2; ++index) {
-    if (pdcp_init_seq_numbers(&pdcp_array[index][1]) == FALSE) {
+    if (pdcp_init_seq_numbers(&pdcp_array[index][1]) == false) {
       msg("Cannot initialize %s PDCP entity!\n", ((index == 0) ? "first" : "second"));
       exit(1);
     }
@@ -275,11 +275,11 @@ int main(int argc, char **argv)
 }
 
 //-----------------------------------------------------------------------------
-BOOL init_pdcp_entity(pdcp_t *pdcp_entity)
+bool init_pdcp_entity(pdcp_t *pdcp_entity)
 //-----------------------------------------------------------------------------
 {
   if (pdcp_entity == NULL)
-    return FALSE;
+    return false;
 
   /*
    * Initialize sequence number state variables of relevant PDCP entity
@@ -292,6 +292,6 @@ BOOL init_pdcp_entity(pdcp_t *pdcp_entity)
   pdcp_entity->last_submitted_pdcp_rx_sn = 4095;
   pdcp_entity->seq_num_size = 12;
 
-  return TRUE;
+  return true;
 }