From 11783e755a306843dff60df21a692aee9bd9e6c7 Mon Sep 17 00:00:00 2001
From: Raphael Defosseux <raphael.defosseux@eurecom.fr>
Date: Fri, 15 May 2020 15:39:11 +0200
Subject: [PATCH] Fixing errored/missing circular dependency protection

Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
---
 common/utils/T/tracer/config.h                |  6 ++--
 common/utils/T/tracer/packet-mac-lte.h        |  4 +++
 common/utils/assertions.h                     |  8 ++---
 common/utils/nr/nr_common.h                   |  5 +++
 .../utils/telnetsrv/telnetsrv_cpumeasur_def.h |  4 +++
 .../utils/telnetsrv/telnetsrv_ltemeasur_def.h |  4 +++
 .../utils/telnetsrv/telnetsrv_measurements.h  |  5 +++
 common/utils/telnetsrv/telnetsrv_phycmd.h     |  4 +++
 common/utils/telnetsrv/telnetsrv_proccmd.h    |  5 +++
 openair1/PHY/LTE_REFSIG/mod_table.h           |  5 +++
 openair1/PHY/LTE_TRANSPORT/dlsch_tbs_full.h   |  4 +++
 openair1/PHY/LTE_TRANSPORT/prach_extern.h     |  5 +++
 openair1/PHY/LTE_TRANSPORT/pucch_extern.h     |  5 +++
 openair1/PHY/NR_REFSIG/nr_mod_table.h         | 26 +++++++++++++++
 openair1/PHY/NR_UE_TRANSPORT/dci_nr.h         |  5 +++
 openair1/PHY/TOOLS/smbv.h                     |  3 ++
 openair1/PHY/phy_vars_ue.h                    |  6 ++--
 openair1/SIMULATION/ETH_TRANSPORT/socket.h    |  5 +--
 openair2/DOCS/TEMPLATES/CODE/example_doxy.h   |  4 +++
 openair2/ENB_APP/L1_paramdef.h                |  4 +++
 openair2/ENB_APP/MACRLC_paramdef.h            |  4 +++
 openair2/ENB_APP/NB_IoT_paramdef.h            |  5 +++
 openair2/ENB_APP/enb_paramdef_emtc.h          |  5 +++
 openair2/ENB_APP/enb_paramdef_mce.h           |  6 ++--
 openair2/ENB_APP/enb_paramdef_mme.h           |  7 ++--
 openair2/GNB_APP/L1_nr_paramdef.h             |  3 ++
 openair2/GNB_APP/MACRLC_nr_paramdef.h         |  3 ++
 openair2/GNB_APP/gnb_paramdef.h               |  4 +++
 openair2/LAYER2/MAC/config_NB_IoT.h           |  4 +--
 openair2/M2AP/m2ap_MCE_handler.h              |  6 ++--
 .../M2AP/m2ap_MCE_management_procedures.h     |  6 ++--
 openair2/M2AP/m2ap_eNB_generate_messages.h    |  6 ++--
 .../M2AP/m2ap_eNB_management_procedures.h     |  6 ++--
 openair2/NETWORK_DRIVER/LITE/proto_extern.h   |  4 +--
 openair2/NETWORK_DRIVER/MESH/proto_extern.h   |  4 +--
 openair2/RRC/LTE/rrc_eNB_UE_context.h         |  2 ++
 openair2/RRC/NR/rrc_gNB_UE_context.h          |  5 +--
 openair2/UTIL/OCG/OCG_if.h                    |  4 +--
 openair2/UTIL/OPT/mac_pcap.h                  |  5 ++-
 openair2/UTIL/OPT/packet-mac-lte.h            |  4 +++
 openair2/UTIL/OSA/osa_defs.h                  |  6 ++--
 openair2/UTIL/OTG/traffic_config.h            |  5 +++
 .../X2AP/x2ap_eNB_management_procedures.h     |  6 ++--
 openair3/M3AP/m3ap_MCE_generate_messages.h    | 25 ++-------------
 openair3/M3AP/m3ap_MCE_handler.h              |  6 ++--
 .../M3AP/m3ap_MCE_management_procedures.h     |  6 ++--
 .../M3AP/m3ap_MME_management_procedures.h     |  6 ++--
 openair3/MME_APP/enb_paramdef_mme.h           |  4 +++
 openair3/MME_APP/mme_config.h                 |  7 ++--
 openair3/NAS/COMMON/UTIL/socket.h             |  6 ++--
 openair3/NAS/TEST/USER/user_parser.h          |  6 ++--
 openair3/TEST/oaisim_mme_test_s1c_s1ap.h      |  5 +++
 openair3/TEST/oaisim_mme_test_s1c_scenario.h  |  5 +++
 openair3/UTILS/mme_config.h                   |  8 ++---
 targets/ARCH/ETHERNET/USERSPACE/LIB/if_defs.h |  5 +++
 targets/COMMON/create_tasks_mbms.h            | 32 -------------------
 56 files changed, 226 insertions(+), 122 deletions(-)
 delete mode 100644 targets/COMMON/create_tasks_mbms.h

diff --git a/common/utils/T/tracer/config.h b/common/utils/T/tracer/config.h
index 07290c71a35..765b1261334 100644
--- a/common/utils/T/tracer/config.h
+++ b/common/utils/T/tracer/config.h
@@ -1,5 +1,5 @@
-#ifndef _CONFIG_H_
-#define _CONFIG_H_
+#ifndef __COMMON_UTILS_T_TRACER_CONFIG__H__
+#define __COMMON_UTILS_T_TRACER_CONFIG__H__
 
 void clear_remote_config(void);
 void append_received_config_chunk(char *buf, int length);
@@ -7,4 +7,4 @@ void load_config_file(char *filename);
 void verify_config(void);
 void get_local_config(char **txt, int *len);
 
-#endif /* _CONFIG_H_ */
+#endif /* __COMMON_UTILS_T_TRACER_CONFIG__H__ */
diff --git a/common/utils/T/tracer/packet-mac-lte.h b/common/utils/T/tracer/packet-mac-lte.h
index 1bc6df632b7..54e6d1a09bb 100644
--- a/common/utils/T/tracer/packet-mac-lte.h
+++ b/common/utils/T/tracer/packet-mac-lte.h
@@ -33,6 +33,9 @@
  * SUCH DAMAGE
  */
 
+#ifndef __COMMON_UTILS_T_TRACER_PACKET_MAC_LTE__H__
+#define __COMMON_UTILS_T_TRACER_PACKET_MAC_LTE__H__
+
 //#include "ws_symbol_export.h"
 
 /* radioType */
@@ -139,3 +142,4 @@
    continues until the end of the frame) */
 #define MAC_LTE_PAYLOAD_TAG 0x01
 
+#endif
diff --git a/common/utils/assertions.h b/common/utils/assertions.h
index 97f18662748..48d8df401ce 100644
--- a/common/utils/assertions.h
+++ b/common/utils/assertions.h
@@ -19,6 +19,9 @@
  *      contact@openairinterface.org
  */
 
+#ifndef __COMMON_UTILS_ASSERTIONS__H__
+#define __COMMON_UTILS_ASSERTIONS__H__
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <inttypes.h>
@@ -30,9 +33,6 @@
 # include "backtrace.h"
 #endif
 
-#ifndef ASSERTIONS_H_
-#define ASSERTIONS_H_
-
 void output_log_mem(void);
 #define _Assert_Exit_                           \
     fprintf(stderr, "\nExiting execution\n");   \
@@ -83,4 +83,4 @@ do {                                                            \
     }                                                           \
 } while(0)
 
-#endif /* ASSERTIONS_H_ */
+#endif /* __COMMON_UTILS_ASSERTIONS__H__ */
diff --git a/common/utils/nr/nr_common.h b/common/utils/nr/nr_common.h
index 979cf863436..5601c0fcbf8 100644
--- a/common/utils/nr/nr_common.h
+++ b/common/utils/nr/nr_common.h
@@ -30,6 +30,9 @@
  * \warning
  */
 
+#ifndef __COMMON_UTILS_NR_NR_COMMON__H__
+#define __COMMON_UTILS_NR_NR_COMMON__H__
+
 #include <stdint.h>
 #include "assertions.h"
 
@@ -63,3 +66,5 @@ void SLIV2SL(int SLIV,int *S,int *L);
 #define max(a,b) cmax(a,b)
 #define min(a,b) cmin(a,b)
 #endif
+
+#endif
diff --git a/common/utils/telnetsrv/telnetsrv_cpumeasur_def.h b/common/utils/telnetsrv/telnetsrv_cpumeasur_def.h
index 89ced509a45..7a45b351f32 100644
--- a/common/utils/telnetsrv/telnetsrv_cpumeasur_def.h
+++ b/common/utils/telnetsrv/telnetsrv_cpumeasur_def.h
@@ -32,6 +32,8 @@
  * \warning
  */
 
+#ifndef __TELNETSRV_CPUMEASUR_DEF__H__
+#define __TELNETSRV_CPUMEASUR_DEF__H__
 
 #define CPU_PHYENB_MEASURE \
 { \
@@ -97,3 +99,5 @@
   {"pdcp_ip",                &(pdcpvars->pdcp_ip),0},\
   {"ip_pdcp",                &(pdcpvars->ip_pdcp),0},\
 }
+
+#endif
diff --git a/common/utils/telnetsrv/telnetsrv_ltemeasur_def.h b/common/utils/telnetsrv/telnetsrv_ltemeasur_def.h
index 160111f15e8..c1aab51e23d 100644
--- a/common/utils/telnetsrv/telnetsrv_ltemeasur_def.h
+++ b/common/utils/telnetsrv/telnetsrv_ltemeasur_def.h
@@ -32,6 +32,8 @@
  * \warning
  */
 
+#ifndef __TELNETSRV_LTEMEASUR_DEF__H__
+#define __TELNETSRV_LTEMEASUR_DEF__H__
 
 #define LTEMAC_MEASURE \
 { \
@@ -125,3 +127,5 @@
   {"timer_poll_retrans_tout",         NULL, TELNET_VARTYPE_UINT, 0},\
   {"timer_status_prohibit_tout",      NULL, TELNET_VARTYPE_UINT, 0},\
 }
+
+#endif
diff --git a/common/utils/telnetsrv/telnetsrv_measurements.h b/common/utils/telnetsrv/telnetsrv_measurements.h
index 80276bc2d03..08136df0fda 100644
--- a/common/utils/telnetsrv/telnetsrv_measurements.h
+++ b/common/utils/telnetsrv/telnetsrv_measurements.h
@@ -31,6 +31,10 @@
  * \note
  * \warning
  */
+
+#ifndef __TELNETSRV_MEASUREMENTS__H__
+#define __TELNETSRV_MEASUREMENTS__H__
+
 #include <dlfcn.h>
 #include "telnetsrv.h"
 #include "openair1/PHY/defs_eNB.h"
@@ -97,3 +101,4 @@ extern uint64_t measurcmd_getstatvalue(telnet_ltemeasurdef_t *measur,telnet_prin
 extern void     measurcmd_display_measures(telnet_printfunc_t prnt, telnet_ltemeasurdef_t  *statsptr, int stats_size);
 
 #endif  /* TELNETSRV_MEASURCMD_MAIN */
+#endif
diff --git a/common/utils/telnetsrv/telnetsrv_phycmd.h b/common/utils/telnetsrv/telnetsrv_phycmd.h
index e35b2a53ab4..0d574027fbf 100644
--- a/common/utils/telnetsrv/telnetsrv_phycmd.h
+++ b/common/utils/telnetsrv/telnetsrv_phycmd.h
@@ -30,6 +30,9 @@
  * \warning
  */
 
+#ifndef __TELNETSRV_PHYCMD__H__
+#define __TELNETSRV_PHYCMD__H__
+
 #ifdef TELNETSRV_PHYCMD_MAIN
 
 #include "common/utils/LOG/log.h"
@@ -61,3 +64,4 @@ extern void add_phy_cmds(void);
 
 /*-------------------------------------------------------------------------------------*/
 
+#endif
diff --git a/common/utils/telnetsrv/telnetsrv_proccmd.h b/common/utils/telnetsrv/telnetsrv_proccmd.h
index 1a0a8d25dc4..f130606b6c3 100644
--- a/common/utils/telnetsrv/telnetsrv_proccmd.h
+++ b/common/utils/telnetsrv/telnetsrv_proccmd.h
@@ -30,6 +30,10 @@
  * \note
  * \warning
  */
+
+#ifndef __TELNETSRV_PROCCMD__H__
+#define __TELNETSRV_PROCCMD__H__
+
 #include <dlfcn.h>
 #include "telnetsrv.h"
 
@@ -79,3 +83,4 @@ telnetshell_cmddef_t proc_cmdarray[] = {
 extern void add_proccmd_cmds(void);
 #endif  /* TELNETSRV_PROCCMD_MAIN */
 
+#endif
diff --git a/openair1/PHY/LTE_REFSIG/mod_table.h b/openair1/PHY/LTE_REFSIG/mod_table.h
index 7bdc1f518f1..29ae9f4495d 100644
--- a/openair1/PHY/LTE_REFSIG/mod_table.h
+++ b/openair1/PHY/LTE_REFSIG/mod_table.h
@@ -19,9 +19,14 @@
  *      contact@openairinterface.org
  */
 
+#ifndef __PHY_LTE_REFSIG_MOD_TABLE__H__
+#define __PHY_LTE_REFSIG_MOD_TABLE__H__
+
 #define MOD_TABLE_SIZE_SHORT 304
 #define MOD_TABLE_QPSK_OFFSET 1
 #define MOD_TABLE_16QAM_OFFSET 5
 #define MOD_TABLE_64QAM_OFFSET 21
 #define MOD_TABLE_PSS_OFFSET 85
 short mod_table[MOD_TABLE_SIZE_SHORT] = {0,0,768,768,768,-768,-768,768,-768,-768,343,343,343,1030,1030,343,1030,1030,343,-343,343,-1030,1030,-343,1030,-1030,-343,343,-343,1030,-1030,343,-1030,1030,-343,-343,-343,-1030,-1030,-343,-1030,-1030,503,503,503,168,168,503,168,168,503,838,503,1173,168,838,168,1173,838,503,838,168,1173,503,1173,168,838,838,838,1173,1173,838,1173,1173,503,-503,503,-168,168,-503,168,-168,503,-838,503,-1173,168,-838,168,-1173,838,-503,838,-168,1173,-503,1173,-168,838,-838,838,-1173,1173,-838,1173,-1173,-503,503,-503,168,-168,503,-168,168,-503,838,-503,1173,-168,838,-168,1173,-838,503,-838,168,-1173,503,-1173,168,-838,838,-838,1173,-1173,838,-1173,1173,-503,-503,-503,-168,-168,-503,-168,-168,-503,-838,-503,-1173,-168,-838,-168,-1173,-838,-503,-838,-168,-1173,-503,-1173,-168,-838,-838,-838,-1173,-1173,-838,-1173,-1173,1086,0,1081,-108,1065,-215,1038,-320,1001,-422,954,-519,897,-612,832,-698,758,-777,677,-849,589,-912,495,-966,397,-1011,294,-1046,189,-1070,81,-1083,-27,-1086,-135,-1078,-242,-1059,-346,-1030,-447,-990,-543,-941,-634,-882,-719,-814,-796,-739,-866,-656,-927,-566,-979,-471,-1021,-371,-1053,-268,-1074,-162,-1085,-54,-1085,54,-1074,162,-1053,268,-1021,371,-979,471,-927,566,-866,656,-796,739,-719,814,-634,882,-543,941,-447,990,-346,1030,-242,1059,-135,1078,-27,1086,81,1083,189,1070,294,1045,397,1011,495,966,589,912,677,849,758,777,832,698,897,612,954,519,1001,422,1038,320,1065,215,1081,108,16384,0,8192,0,4096,0,2048,0};
+
+#endif
diff --git a/openair1/PHY/LTE_TRANSPORT/dlsch_tbs_full.h b/openair1/PHY/LTE_TRANSPORT/dlsch_tbs_full.h
index 9673ba15b50..5a08b7a4023 100644
--- a/openair1/PHY/LTE_TRANSPORT/dlsch_tbs_full.h
+++ b/openair1/PHY/LTE_TRANSPORT/dlsch_tbs_full.h
@@ -19,6 +19,9 @@
  *      contact@openairinterface.org
  */
 
+#ifndef __DLSCH_TBS_FULL__H__
+#define __DLSCH_TBS_FULL__H__
+
 #define TBStable_rowCnt 27
 
 /** \brief "Transport block size table"
@@ -54,3 +57,4 @@ unsigned int TBStable[TBStable_rowCnt][110] = {{16,32,56,88,120,152,176,208,224,
 };
 
 unsigned int TBStable1C[32] = {40, 56, 72, 120, 136, 144, 176, 208, 224, 256, 280, 296, 328, 336, 392, 488, 552, 600, 632, 696, 776, 840, 904, 1000, 1064, 1128, 1224, 1288, 1384, 1480, 1608, 1736};
+#endif
diff --git a/openair1/PHY/LTE_TRANSPORT/prach_extern.h b/openair1/PHY/LTE_TRANSPORT/prach_extern.h
index 2f8a83e24f2..47fbd93ad7c 100644
--- a/openair1/PHY/LTE_TRANSPORT/prach_extern.h
+++ b/openair1/PHY/LTE_TRANSPORT/prach_extern.h
@@ -29,6 +29,10 @@
  * \note
  * \warning
  */
+
+#ifndef __PHY_LTE_TRANSPORT_PRACH_EXTERN__H__
+#define __PHY_LTE_TRANSPORT_PRACH_EXTERN__H__
+
 #include "PHY/sse_intrin.h"
 #include "PHY/defs_eNB.h"
 #include "PHY/phy_extern.h"
@@ -91,3 +95,4 @@ void compute_prach_seq(uint16_t rootSequenceIndex,
 		       lte_frame_type_t frame_type,
 		       uint32_t X_u[64][839]);
 
+#endif
diff --git a/openair1/PHY/LTE_TRANSPORT/pucch_extern.h b/openair1/PHY/LTE_TRANSPORT/pucch_extern.h
index 899b9043067..b1513748880 100644
--- a/openair1/PHY/LTE_TRANSPORT/pucch_extern.h
+++ b/openair1/PHY/LTE_TRANSPORT/pucch_extern.h
@@ -30,6 +30,9 @@
 * \warning
 */
 
+#ifndef __PHY_LTE_TRANSPORT_PUCCH_EXTERN__H__
+#define __PHY_LTE_TRANSPORT_PUCCH_EXTERN__H__
+
 #include <stdint.h>
 
 /* PUCCH format3 >> */
@@ -76,3 +79,5 @@ extern uint8_t Np4_TBL[4];
 // alpha_TBL
 extern int16_t alphaTBL_re[12];
 extern int16_t alphaTBL_im[12];
+
+#endif
diff --git a/openair1/PHY/NR_REFSIG/nr_mod_table.h b/openair1/PHY/NR_REFSIG/nr_mod_table.h
index a9984296990..c34dadb663e 100644
--- a/openair1/PHY/NR_REFSIG/nr_mod_table.h
+++ b/openair1/PHY/NR_REFSIG/nr_mod_table.h
@@ -1,3 +1,27 @@
+/*
+ * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The OpenAirInterface Software Alliance licenses this file to You under
+ * the OAI Public License, Version 1.1  (the "License"); you may not use this file
+ * except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.openairinterface.org/?page_id=698
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *-------------------------------------------------------------------------------
+ * For more information about the OpenAirInterface (OAI) Software Alliance:
+ *      contact@openairinterface.org
+ */
+
+#ifndef __PHY_NR_REFSIG_NR_MOD_TABLE__H__
+#define __PHY_NR_REFSIG_NR_MOD_TABLE__H__
+
 #define NR_MOD_TABLE_SIZE_SHORT 686
 #define NR_MOD_TABLE_BPSK_OFFSET 1
 #define NR_MOD_TABLE_QPSK_OFFSET 3
@@ -5,3 +29,5 @@
 #define NR_MOD_TABLE_QAM64_OFFSET 23
 #define NR_MOD_TABLE_QAM256_OFFSET 87
 short nr_mod_table[NR_MOD_TABLE_SIZE_SHORT] = {0,0,16384,16384,-16384,-16384,16384,16384,16384,-16384,-16384,16384,-16384,-16384,7327,7327,7327,21981,21981,7327,21981,21981,7327,-7327,7327,-21981,21981,-7327,21981,-21981,-7327,7327,-7327,21981,-21981,7327,-21981,21981,-7327,-7327,-7327,-21981,-21981,-7327,-21981,-21981,10726,10726,10726,3576,3576,10726,3576,3576,10726,17876,10726,25027,3576,17876,3576,25027,17876,10726,17876,3576,25027,10726,25027,3576,17876,17876,17876,25027,25027,17876,25027,25027,10726,-10726,10726,-3576,3576,-10726,3576,-3576,10726,-17876,10726,-25027,3576,-17876,3576,-25027,17876,-10726,17876,-3576,25027,-10726,25027,-3576,17876,-17876,17876,-25027,25027,-17876,25027,-25027,-10726,10726,-10726,3576,-3576,10726,-3576,3576,-10726,17876,-10726,25027,-3576,17876,-3576,25027,-17876,10726,-17876,3576,-25027,10726,-25027,3576,-17876,17876,-17876,25027,-25027,17876,-25027,25027,-10726,-10726,-10726,-3576,-3576,-10726,-3576,-3576,-10726,-17876,-10726,-25027,-3576,-17876,-3576,-25027,-17876,-10726,-17876,-3576,-25027,-10726,-25027,-3576,-17876,-17876,-17876,-25027,-25027,-17876,-25027,-25027,8886,8886,8886,12439,12439,8886,12439,12439,8886,5332,8886,1778,12439,5332,12439,1778,5332,8886,5332,12439,1778,8886,1778,12439,5332,5332,5332,1778,1778,5332,1778,1778,8886,19547,8886,15993,12439,19547,12439,15993,8886,23101,8886,26655,12439,23101,12439,26655,5332,19547,5332,15993,1778,19547,1778,15993,5332,23101,5332,26655,1778,23101,1778,26655,19547,8886,19547,12439,15993,8886,15993,12439,19547,5332,19547,1778,15993,5332,15993,1778,23101,8886,23101,12439,26655,8886,26655,12439,23101,5332,23101,1778,26655,5332,26655,1778,19547,19547,19547,15993,15993,19547,15993,15993,19547,23101,19547,26655,15993,23101,15993,26655,23101,19547,23101,15993,26655,19547,26655,15993,23101,23101,23101,26655,26655,23101,26655,26655,8886,-8886,8886,-12439,12439,-8886,12439,-12439,8886,-5332,8886,-1778,12439,-5332,12439,-1778,5332,-8886,5332,-12439,1778,-8886,1778,-12439,5332,-5332,5332,-1778,1778,-5332,1778,-1778,8886,-19547,8886,-15993,12439,-19547,12439,-15993,8886,-23101,8886,-26655,12439,-23101,12439,-26655,5332,-19547,5332,-15993,1778,-19547,1778,-15993,5332,-23101,5332,-26655,1778,-23101,1778,-26655,19547,-8886,19547,-12439,15993,-8886,15993,-12439,19547,-5332,19547,-1778,15993,-5332,15993,-1778,23101,-8886,23101,-12439,26655,-8886,26655,-12439,23101,-5332,23101,-1778,26655,-5332,26655,-1778,19547,-19547,19547,-15993,15993,-19547,15993,-15993,19547,-23101,19547,-26655,15993,-23101,15993,-26655,23101,-19547,23101,-15993,26655,-19547,26655,-15993,23101,-23101,23101,-26655,26655,-23101,26655,-26655,-8886,8886,-8886,12439,-12439,8886,-12439,12439,-8886,5332,-8886,1778,-12439,5332,-12439,1778,-5332,8886,-5332,12439,-1778,8886,-1778,12439,-5332,5332,-5332,1778,-1778,5332,-1778,1778,-8886,19547,-8886,15993,-12439,19547,-12439,15993,-8886,23101,-8886,26655,-12439,23101,-12439,26655,-5332,19547,-5332,15993,-1778,19547,-1778,15993,-5332,23101,-5332,26655,-1778,23101,-1778,26655,-19547,8886,-19547,12439,-15993,8886,-15993,12439,-19547,5332,-19547,1778,-15993,5332,-15993,1778,-23101,8886,-23101,12439,-26655,8886,-26655,12439,-23101,5332,-23101,1778,-26655,5332,-26655,1778,-19547,19547,-19547,15993,-15993,19547,-15993,15993,-19547,23101,-19547,26655,-15993,23101,-15993,26655,-23101,19547,-23101,15993,-26655,19547,-26655,15993,-23101,23101,-23101,26655,-26655,23101,-26655,26655,-8886,-8886,-8886,-12439,-12439,-8886,-12439,-12439,-8886,-5332,-8886,-1778,-12439,-5332,-12439,-1778,-5332,-8886,-5332,-12439,-1778,-8886,-1778,-12439,-5332,-5332,-5332,-1778,-1778,-5332,-1778,-1778,-8886,-19547,-8886,-15993,-12439,-19547,-12439,-15993,-8886,-23101,-8886,-26655,-12439,-23101,-12439,-26655,-5332,-19547,-5332,-15993,-1778,-19547,-1778,-15993,-5332,-23101,-5332,-26655,-1778,-23101,-1778,-26655,-19547,-8886,-19547,-12439,-15993,-8886,-15993,-12439,-19547,-5332,-19547,-1778,-15993,-5332,-15993,-1778,-23101,-8886,-23101,-12439,-26655,-8886,-26655,-12439,-23101,-5332,-23101,-1778,-26655,-5332,-26655,-1778,-19547,-19547,-19547,-15993,-15993,-19547,-15993,-15993,-19547,-23101,-19547,-26655,-15993,-23101,-15993,-26655,-23101,-19547,-23101,-15993,-26655,-19547,-26655,-15993,-23101,-23101,-23101,-26655,-26655,-23101,-26655,-26655};
+
+#endif
diff --git a/openair1/PHY/NR_UE_TRANSPORT/dci_nr.h b/openair1/PHY/NR_UE_TRANSPORT/dci_nr.h
index 95b6cfd2e2f..5f1321dd321 100644
--- a/openair1/PHY/NR_UE_TRANSPORT/dci_nr.h
+++ b/openair1/PHY/NR_UE_TRANSPORT/dci_nr.h
@@ -29,6 +29,10 @@
 * \note
 * \warning
 */
+
+#ifndef __PHY_NR_UE_TRANSPORT_DCI_NR__H__
+#define __PHY_NR_UE_TRANSPORT_DCI_NR__H__
+
 #ifndef USER_MODE
 #include "PHY/types.h"
 #else
@@ -118,4 +122,5 @@ typedef struct NR_DCI_INFO_EXTRACTED NR_DCI_INFO_EXTRACTED_t;
 
 
 #endif
+#endif
 
diff --git a/openair1/PHY/TOOLS/smbv.h b/openair1/PHY/TOOLS/smbv.h
index ef40a9ed7d0..f8fab67d014 100644
--- a/openair1/PHY/TOOLS/smbv.h
+++ b/openair1/PHY/TOOLS/smbv.h
@@ -23,6 +23,8 @@
   This library offers some functions to remotely program the R&S SMBV100A.
 */
 
+#ifndef __PHY_TOOLS_SMBV__H__
+#define __PHY_TOOLS_SMBV__H__
 
 #include <string.h>
 #include <stdio.h>
@@ -93,3 +95,4 @@ int smbv_configure_common_dci(const char* fname, uint8_t subframe, const char* t
 // item is the row in the DCI table
 int smbv_configure_ue_spec_dci(const char* fname, uint8_t subframe, uint8_t user, DCI_ALLOC_t *dci_alloc, uint8_t item);
 #endif
+#endif
diff --git a/openair1/PHY/phy_vars_ue.h b/openair1/PHY/phy_vars_ue.h
index 05f2e1b8f19..b85fa3dacc2 100644
--- a/openair1/PHY/phy_vars_ue.h
+++ b/openair1/PHY/phy_vars_ue.h
@@ -19,8 +19,8 @@
  *      contact@openairinterface.org
  */
 
-#ifndef __PHY_VARS_H__
-#define __PHY_VARS_H__
+#ifndef __PHY_VARS_UE__H__
+#define __PHY_VARS_UE__H__
 
 #include "PHY/types.h"
 #include "PHY/defs_UE.h"
@@ -133,4 +133,4 @@ int16_t unscrambling_lut[65536*16] __attribute__((aligned(32)));
 uint8_t scrambling_lut[65536*16] __attribute__((aligned(32)));
 
 uint8_t max_turbo_iterations=4;
-#endif /*__PHY_VARS_H__ */
+#endif /* __PHY_VARS_UE__H__ */
diff --git a/openair1/SIMULATION/ETH_TRANSPORT/socket.h b/openair1/SIMULATION/ETH_TRANSPORT/socket.h
index c7a2224375e..e9ca36bee2a 100644
--- a/openair1/SIMULATION/ETH_TRANSPORT/socket.h
+++ b/openair1/SIMULATION/ETH_TRANSPORT/socket.h
@@ -28,8 +28,9 @@
 * \email: lionel.gauthier@eurecom.fr
 */
 
-#ifndef __SOCKET_H__
-#    define __SOCKET_H__
+#ifndef __SIMULATION_ETH_TRANSPORT_SOCKET__H__
+#define __SIMULATION_ETH_TRANSPORT_SOCKET__H__
+
 #    ifdef SOCKET_C
 #        define private_socket(x) x
 #        define public_socket(x) x
diff --git a/openair2/DOCS/TEMPLATES/CODE/example_doxy.h b/openair2/DOCS/TEMPLATES/CODE/example_doxy.h
index c51bdbccabc..30d8ddb6009 100644
--- a/openair2/DOCS/TEMPLATES/CODE/example_doxy.h
+++ b/openair2/DOCS/TEMPLATES/CODE/example_doxy.h
@@ -31,6 +31,9 @@
 * \warning  this is a warning
 */
 
+#ifndef __DOCS_TEMPLATES_CODE_EXAMPLE_DOXY__H__
+#define __DOCS_TEMPLATES_CODE_EXAMPLE_DOXY__H__
+
 //-----------------------------------begin group-----------------------------
 
 
@@ -138,3 +141,4 @@ struct frame {
 int init(int src, int dst);
 
 //-----------------------end func proto-------------------
+#endif
diff --git a/openair2/ENB_APP/L1_paramdef.h b/openair2/ENB_APP/L1_paramdef.h
index 210b753afbb..72e77c38000 100644
--- a/openair2/ENB_APP/L1_paramdef.h
+++ b/openair2/ENB_APP/L1_paramdef.h
@@ -30,6 +30,8 @@
  * \warning
  */
 
+#ifndef __ENB_APP_L1_PARAMDEF__H__
+#define __ENB_APP_L1_PARAMDEF__H__
 
 /*-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
 
@@ -114,3 +116,5 @@
 #define L1_PUCCH1_DTX_EMTC3_THRESHOLD_IDX                  22
 #define L1_PUCCH1AB_DTX_EMTC3_THRESHOLD_IDX                23
 /*----------------------------------------------------------------------------------------------------------------------------------------------------*/
+
+#endif
diff --git a/openair2/ENB_APP/MACRLC_paramdef.h b/openair2/ENB_APP/MACRLC_paramdef.h
index 724dde6557e..55ce9d5059e 100644
--- a/openair2/ENB_APP/MACRLC_paramdef.h
+++ b/openair2/ENB_APP/MACRLC_paramdef.h
@@ -31,6 +31,8 @@
  */
 
 
+#ifndef __ENB_APP_MACRLC_PARAMDEF__H__
+#define __ENB_APP_MACRLC_PARAMDEF__H__
 
 /*----------------------------------------------------------------------------------------------------------------------------------------------------*/
 
@@ -104,3 +106,5 @@
 #define MACRLC_PUSCH10xSNR_IDX                                 18
 #define MACRLC_PUCCH10xSNR_IDX                                 19 
 /*---------------------------------------------------------------------------------------------------------------------------------------------------------*/
+
+#endif
diff --git a/openair2/ENB_APP/NB_IoT_paramdef.h b/openair2/ENB_APP/NB_IoT_paramdef.h
index 6409fe63ee5..8778f6d2e40 100644
--- a/openair2/ENB_APP/NB_IoT_paramdef.h
+++ b/openair2/ENB_APP/NB_IoT_paramdef.h
@@ -30,6 +30,9 @@
  * \warning
  */
 
+#ifndef __ENB_APP_NB_IOT_PARAMDEF__H__
+#define __ENB_APP_NB_IOT_PARAMDEF__H__
+
 #include "common/config/config_paramdesc.h"
 #include "SystemInformationBlockType2.h"
 #include "DL-GapConfig-NB-r13.h"
@@ -398,3 +401,5 @@
 /*-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
 /* NB IoT L1 configuration list section name   */
 #define NBIOT_L1LIST_CONFIG_STRING                          "NB-IoT_L1s"
+
+#endif
diff --git a/openair2/ENB_APP/enb_paramdef_emtc.h b/openair2/ENB_APP/enb_paramdef_emtc.h
index 7ec6f4940a3..de774c4ea69 100644
--- a/openair2/ENB_APP/enb_paramdef_emtc.h
+++ b/openair2/ENB_APP/enb_paramdef_emtc.h
@@ -30,6 +30,9 @@
  * \warning
  */
 
+#ifndef __ENB_APP_ENB_PARAMDEF_EMTC__H__
+#define __ENB_APP_ENB_PARAMDEF_EMTC__H__
+
 #include "common/config/config_paramdesc.h"
 #include "RRC_paramsvalues.h"
 
@@ -405,3 +408,5 @@ typedef struct ccparams_eMTC_s {
 {"sib2_interval_ULHoppingConfigCommonModeB_r13_val",                 NULL,   0,           iptr:&eMTCconfig->sib2_interval_ULHoppingConfigCommonModeB_r13_val,   defintval:0,            TYPE_UINT,       0}, \
 {"sib2_mpdcch_pdsch_hoppingOffset_r13",                              NULL,   0,           iptr:&eMTCconfig->sib2_mpdcch_pdsch_hoppingOffset_r13,                defintval:1,             TYPE_UINT,         0} \
 }
+
+#endif
diff --git a/openair2/ENB_APP/enb_paramdef_mce.h b/openair2/ENB_APP/enb_paramdef_mce.h
index 8a4dd157667..fdc2731e16b 100644
--- a/openair2/ENB_APP/enb_paramdef_mce.h
+++ b/openair2/ENB_APP/enb_paramdef_mce.h
@@ -30,6 +30,9 @@
  * \warning
  */
 
+#ifndef __ENB_APP_ENB_PARAMDEF_MCE__H__
+#define __ENB_APP_ENB_PARAMDEF_MCE__H__
+
 #include "common/config/config_paramdesc.h"
 #include "RRC_paramsvalues.h"
 
@@ -235,5 +238,4 @@
 #define MCE_CONFIG_STRING_NUM_FRAME_IDX	2
 #define MCE_CONFIG_STRING_SUBFRAME_ALLOCATION_IDX	3
 
-
-
+#endif
diff --git a/openair2/ENB_APP/enb_paramdef_mme.h b/openair2/ENB_APP/enb_paramdef_mme.h
index 0ff1df765c0..fde9b1c3a87 100644
--- a/openair2/ENB_APP/enb_paramdef_mme.h
+++ b/openair2/ENB_APP/enb_paramdef_mme.h
@@ -30,6 +30,9 @@
  * \warning
  */
 
+#ifndef __ENB_APP_ENB_PARAMDEF_MME__H__
+#define __ENB_APP_ENB_PARAMDEF_MME__H__
+
 #include "common/config/config_paramdesc.h"
 #include "RRC_paramsvalues.h"
 
@@ -77,6 +80,4 @@
 {MME_CONFIG_STRING_MME_PORT_FOR_M3C,                     NULL,      0,         uptr:&mme_port_for_m3c,           	 defintval:36444L,    TYPE_UINT,        0},      \
 } 
 
-
-
-
+#endif
diff --git a/openair2/GNB_APP/L1_nr_paramdef.h b/openair2/GNB_APP/L1_nr_paramdef.h
index 889a50c814b..a5a808c2811 100644
--- a/openair2/GNB_APP/L1_nr_paramdef.h
+++ b/openair2/GNB_APP/L1_nr_paramdef.h
@@ -30,6 +30,8 @@
  * \warning
  */
 
+#ifndef __GNB_APP_L1_NR_PARAMDEF__H__
+#define __GNB_APP_L1_NR_PARAMDEF__H__
 
 /*-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
 
@@ -71,3 +73,4 @@
 #define L1_REMOTE_N_PORTD_IDX                              8
 
 /*----------------------------------------------------------------------------------------------------------------------------------------------------*/
+#endif
diff --git a/openair2/GNB_APP/MACRLC_nr_paramdef.h b/openair2/GNB_APP/MACRLC_nr_paramdef.h
index b55aeacdce7..308af2eeb91 100644
--- a/openair2/GNB_APP/MACRLC_nr_paramdef.h
+++ b/openair2/GNB_APP/MACRLC_nr_paramdef.h
@@ -31,6 +31,8 @@
  */
 
 
+#ifndef __GNB_APP_MACRLC_NR_PARAMDEF__H__
+#define __GNB_APP_MACRLC_NR_PARAMDEF__H__
 
 /*----------------------------------------------------------------------------------------------------------------------------------------------------*/
 
@@ -96,3 +98,4 @@
 #define MACRLC_LOCAL_S_PORTD_IDX                               15
 #define MACRLC_REMOTE_S_PORTD_IDX                              16
 /*---------------------------------------------------------------------------------------------------------------------------------------------------------*/
+#endif
diff --git a/openair2/GNB_APP/gnb_paramdef.h b/openair2/GNB_APP/gnb_paramdef.h
index 2d9ecb8c8a5..84045fc622f 100644
--- a/openair2/GNB_APP/gnb_paramdef.h
+++ b/openair2/GNB_APP/gnb_paramdef.h
@@ -30,6 +30,9 @@
  * \warning
  */
 
+#ifndef __GNB_APP_GNB_PARAMDEF__H__
+#define __GNB_APP_GNB_PARAMDEF__H__
+
 #include "common/config/config_paramdesc.h"
 #include "RRC_nr_paramsvalues.h"
 
@@ -430,3 +433,4 @@ typedef struct ccparams_nr_x2 {
 #define CONFIG_HLP_WORKER                          "coding and FEP worker thread WORKER_DISABLE or WORKER_ENABLE\n"
 #define CONFIG_HLP_PARALLEL                        "PARALLEL_SINGLE_THREAD, PARALLEL_RU_L1_SPLIT, or PARALLEL_RU_L1_TRX_SPLIT(RU_L1_TRX_SPLIT by defult)\n"
 /*-------------------------------------------------------------------------------------------------------------------------------------------------------------*/
+#endif
diff --git a/openair2/LAYER2/MAC/config_NB_IoT.h b/openair2/LAYER2/MAC/config_NB_IoT.h
index fb8c85ebed2..1821b4e12d8 100644
--- a/openair2/LAYER2/MAC/config_NB_IoT.h
+++ b/openair2/LAYER2/MAC/config_NB_IoT.h
@@ -8,8 +8,8 @@
  *
  */
 
-#ifndef _CONFIG_H_
-#define _CONFIG_H_
+#ifndef __LAYER2_MAC_CONFIG_NB_IOT__H__
+#define __LAYER2_MAC_CONFIG_NB_IOT__H__
 
 //#include "NB_IoT_Message_definitions.h"
 
diff --git a/openair2/M2AP/m2ap_MCE_handler.h b/openair2/M2AP/m2ap_MCE_handler.h
index e9faae8f5d9..68cab5c8ac9 100644
--- a/openair2/M2AP/m2ap_MCE_handler.h
+++ b/openair2/M2AP/m2ap_MCE_handler.h
@@ -26,8 +26,8 @@
  * \version 0.1
  */
 
-#ifndef M2AP_MCE_HANDLERS_H_
-#define M2AP_MCE_HANDLERS_H_
+#ifndef __M2AP_MCE_HANDLERS__H__
+#define __M2AP_MCE_HANDLERS__H__
 
 #include "m2ap_MCE_defs.h"
 
@@ -40,4 +40,4 @@ int m2ap_MCE_handle_message(instance_t instance, uint32_t assoc_id, int32_t stre
                             //const uint8_t * const data, const uint32_t data_length);
 
 
-#endif /* M2AP_MCE_HANDLERS_H_ */
+#endif /* __M2AP_MCE_HANDLERS__H__ */
diff --git a/openair2/M2AP/m2ap_MCE_management_procedures.h b/openair2/M2AP/m2ap_MCE_management_procedures.h
index 9e13e723c96..4e8997dbc51 100644
--- a/openair2/M2AP/m2ap_MCE_management_procedures.h
+++ b/openair2/M2AP/m2ap_MCE_management_procedures.h
@@ -26,8 +26,8 @@
  * \version 0.1
  */
 
-#ifndef M2AP_MCE_MANAGEMENT_PROCEDURES_H_
-#define M2AP_MCE_MANAGEMENT_PROCEDURES_H
+#ifndef __M2AP_MCE_MANAGEMENT_PROCEDURES__H__
+#define __M2AP_MCE_MANAGEMENT_PROCEDURES__H__
 
 void m2ap_MCE_prepare_internal_data(void);
 
@@ -51,4 +51,4 @@ struct m2ap_MCE_data_s *m2ap_get_MCE(m2ap_MCE_instance_t *instance_p,
                                      int32_t assoc_id,
                                      uint16_t cnx_id);
 
-#endif /* M2AP_MCE_MANAGEMENT_PROCEDURES_H_ */
+#endif /* __M2AP_MCE_MANAGEMENT_PROCEDURES__H__ */
diff --git a/openair2/M2AP/m2ap_eNB_generate_messages.h b/openair2/M2AP/m2ap_eNB_generate_messages.h
index 49247405f78..793f7f18cf1 100644
--- a/openair2/M2AP/m2ap_eNB_generate_messages.h
+++ b/openair2/M2AP/m2ap_eNB_generate_messages.h
@@ -26,8 +26,8 @@
  * \version 0.1
  */
 
-#ifndef M2AP_ENB_GENERATE_MESSAGES_H_
-#define M2AP_ENB_GENERATE_MESSAGES_H_
+#ifndef __M2AP_ENB_GENERATE_MESSAGES__H__
+#define __M2AP_ENB_GENERATE_MESSAGES__H__
 
 #include "m2ap_eNB_defs.h"
 #include "m2ap_common.h"
@@ -60,4 +60,4 @@ int m2ap_eNB_set_cause (M2AP_Cause_t * cause_p,
 //                                          int m2_ue_id,
 //                                          m2ap_handover_cancel_cause_t cause);
 
-#endif /*  M2AP_ENB_GENERATE_MESSAGES_H_ */
+#endif /*  __M2AP_ENB_GENERATE_MESSAGES__H__ */
diff --git a/openair2/M2AP/m2ap_eNB_management_procedures.h b/openair2/M2AP/m2ap_eNB_management_procedures.h
index fbc49d01698..2b1dc4a44bc 100644
--- a/openair2/M2AP/m2ap_eNB_management_procedures.h
+++ b/openair2/M2AP/m2ap_eNB_management_procedures.h
@@ -26,8 +26,8 @@
  * \version 0.1
  */
 
-#ifndef M2AP_ENB_MANAGEMENT_PROCEDURES_H_
-#define M2AP_ENB_MANAGEMENT_PROCEDURES_H
+#ifndef __M2AP_ENB_MANAGEMENT_PROCEDURES__H__
+#define __M2AP_ENB_MANAGEMENT_PROCEDURES__H__
 
 void m2ap_eNB_prepare_internal_data(void);
 
@@ -51,4 +51,4 @@ struct m2ap_eNB_data_s *m2ap_get_eNB(m2ap_eNB_instance_t *instance_p,
                                      int32_t assoc_id,
                                      uint16_t cnx_id);
 
-#endif /* M2AP_ENB_MANAGEMENT_PROCEDURES_H_ */
+#endif /* __M2AP_ENB_MANAGEMENT_PROCEDURES__H__ */
diff --git a/openair2/NETWORK_DRIVER/LITE/proto_extern.h b/openair2/NETWORK_DRIVER/LITE/proto_extern.h
index f07083921f3..d4289ca1f2d 100644
--- a/openair2/NETWORK_DRIVER/LITE/proto_extern.h
+++ b/openair2/NETWORK_DRIVER/LITE/proto_extern.h
@@ -30,8 +30,8 @@
 
 ***************************************************************************/
 
-#ifndef _NAS_PROTO_H
-#define _NAS_PROTO_H
+#ifndef __NETWORK_DRIVER_LITE_PROTO_EXTERN__H__
+#define __NETWORK_DRIVER_LITE_PROTO_EXTERN__H__
 
 #include <linux/if_arp.h>
 #include <linux/types.h>
diff --git a/openair2/NETWORK_DRIVER/MESH/proto_extern.h b/openair2/NETWORK_DRIVER/MESH/proto_extern.h
index 2eae034257f..ac92b2f8bdc 100644
--- a/openair2/NETWORK_DRIVER/MESH/proto_extern.h
+++ b/openair2/NETWORK_DRIVER/MESH/proto_extern.h
@@ -29,8 +29,8 @@
 
 ***************************************************************************/
 
-#ifndef _NAS_PROTO_H
-#define _NAS_PROTO_H
+#ifndef __NETWORK_DRIVER_MESH_PROTO_EXTERN__H__
+#define __NETWORK_DRIVER_MESH_PROTO_EXTERN__H__
 
 #include <linux/if_arp.h>
 #include <linux/types.h>
diff --git a/openair2/RRC/LTE/rrc_eNB_UE_context.h b/openair2/RRC/LTE/rrc_eNB_UE_context.h
index 289b4d69d69..e22f517d501 100644
--- a/openair2/RRC/LTE/rrc_eNB_UE_context.h
+++ b/openair2/RRC/LTE/rrc_eNB_UE_context.h
@@ -28,6 +28,8 @@
  * \email: lionel.gauthier@eurecom.fr
  */
 #ifndef __RRC_ENB_UE_CONTEXT_H__
+#define __RRC_ENB_UE_CONTEXT_H__
+
 #include "collection/tree.h"
 #include "COMMON/platform_types.h"
 #include "rrc_defs.h"
diff --git a/openair2/RRC/NR/rrc_gNB_UE_context.h b/openair2/RRC/NR/rrc_gNB_UE_context.h
index 762d9642897..d703c4c34ca 100644
--- a/openair2/RRC/NR/rrc_gNB_UE_context.h
+++ b/openair2/RRC/NR/rrc_gNB_UE_context.h
@@ -27,8 +27,9 @@
  * \company Eurecom
  * \email: lionel.gauthier@eurecom.fr
  */
-#ifndef __RRC_ENB_UE_CONTEXT_H__
-#define __RRC_ENB_UE_CONTEXT_H__
+#ifndef __RRC_GNB_UE_CONTEXT_H__
+#define __RRC_GNB_UE_CONTEXT_H__
+
 #include "collection/tree.h"
 #include "COMMON/platform_types.h"
 #include "nr_rrc_defs.h"
diff --git a/openair2/UTIL/OCG/OCG_if.h b/openair2/UTIL/OCG/OCG_if.h
index c515d9746df..cc55b56f36c 100644
--- a/openair2/UTIL/OCG/OCG_if.h
+++ b/openair2/UTIL/OCG/OCG_if.h
@@ -30,8 +30,8 @@
 * \warning
 */
 
-#ifndef __CONFIGEN_IF_H__
-#define __CONFIG_IF_H__
+#ifndef __UTIL_OCG_OCG_IF__H__
+#define __UTIL_OCG_OCG_IF__H__
 
 #ifdef __cplusplus
 extern "C" {
diff --git a/openair2/UTIL/OPT/mac_pcap.h b/openair2/UTIL/OPT/mac_pcap.h
index 48b31bb3c07..3141d17d592 100644
--- a/openair2/UTIL/OPT/mac_pcap.h
+++ b/openair2/UTIL/OPT/mac_pcap.h
@@ -1,3 +1,6 @@
+#ifndef __UTIL_OPT_MAC_PCAP__H__
+#define __UTIL_OPT_MAC_PCAP__H__
+
 #include <stdio.h>
 #include <string.h>
 #include <arpa/inet.h>
@@ -42,4 +45,4 @@ typedef struct MAC_Context_Info_t {
   unsigned int   subframesSinceCaptureStart;
 } MAC_Context_Info_t;
 
-
+#endif
diff --git a/openair2/UTIL/OPT/packet-mac-lte.h b/openair2/UTIL/OPT/packet-mac-lte.h
index 4dfbe7912ec..2d36e02df4d 100644
--- a/openair2/UTIL/OPT/packet-mac-lte.h
+++ b/openair2/UTIL/OPT/packet-mac-lte.h
@@ -22,6 +22,8 @@
  modified to be used in OpenAir to create the LTE MAC/RLC encapsulated in UDP as per Wireshark feature 
  */
 
+#ifndef __UTIL_OPT_PACKET_MAC_LTE__H__
+#define __UTIL_OPT_PACKET_MAC_LTE__H__
 
 #include "ws_symbol_export.h"
 
@@ -376,3 +378,5 @@ typedef enum {
  * vi: set shiftwidth=4 tabstop=8 expandtab:
  * :indentSize=4:tabSize=8:noTabs=true:
  */
+
+#endif
diff --git a/openair2/UTIL/OSA/osa_defs.h b/openair2/UTIL/OSA/osa_defs.h
index 4812d82d916..3df350541f0 100644
--- a/openair2/UTIL/OSA/osa_defs.h
+++ b/openair2/UTIL/OSA/osa_defs.h
@@ -29,8 +29,8 @@
  * @ingroup security
 */
 
-#ifndef SECU_DEFS_H_
-#define SECU_DEFS_H_
+#ifndef __UTIL_OSA_OSA_DEFS__H__
+#define __UTIL_OSA_OSA_DEFS__H__
 
 #define EIA0_ALG_ID     0x00
 #define EIA1_128_ALG_ID 0x01
@@ -115,4 +115,4 @@ int stream_decrypt(uint8_t algorithm, stream_cipher_t *stream_cipher, uint8_t **
 int stream_check_integrity(uint8_t algorithm, stream_cipher_t *stream_cipher, uint8_t *expected);
 #undef SECU_DEBUG
 
-#endif /* SECU_DEFS_H_ */
+#endif /* __UTIL_OSA_OSA_DEFS__H__ */
diff --git a/openair2/UTIL/OTG/traffic_config.h b/openair2/UTIL/OTG/traffic_config.h
index 2f47682706b..c0a64a34650 100644
--- a/openair2/UTIL/OTG/traffic_config.h
+++ b/openair2/UTIL/OTG/traffic_config.h
@@ -19,6 +19,9 @@
  *      contact@openairinterface.org
  */
 
+#ifndef __UTIL_OTG_TRAFFIC_CONFIG__H__
+#define __UTIL_OTG_TRAFFIC_CONFIG__H__
+
 //IDT DISTRIBUTION PARAMETERS
 #define IDT_DIST GAUSSIAN
 #define IDT_MIN 2
@@ -40,3 +43,5 @@
 //SOCKET MODE
 #define DST_PORT 1234;
 #define DST_IP "127.0.0.1"
+
+#endif
diff --git a/openair2/X2AP/x2ap_eNB_management_procedures.h b/openair2/X2AP/x2ap_eNB_management_procedures.h
index c5217341c51..7082f5ac95b 100644
--- a/openair2/X2AP/x2ap_eNB_management_procedures.h
+++ b/openair2/X2AP/x2ap_eNB_management_procedures.h
@@ -26,8 +26,8 @@
  * \version 1.0
  */
 
-#ifndef X2AP_ENB_MANAGEMENT_PROCEDURES_H_
-#define X2AP_ENB_MANAGEMENT_PROCEDURES_H
+#ifndef __X2AP_ENB_MANAGEMENT_PROCEDURES__H__
+#define __X2AP_ENB_MANAGEMENT_PROCEDURES__H__
 
 void x2ap_eNB_prepare_internal_data(void);
 
@@ -51,4 +51,4 @@ struct x2ap_eNB_data_s *x2ap_get_eNB(x2ap_eNB_instance_t *instance_p,
                                      int32_t assoc_id,
                                      uint16_t cnx_id);
 
-#endif /* X2AP_ENB_MANAGEMENT_PROCEDURES_H_ */
+#endif /* __X2AP_ENB_MANAGEMENT_PROCEDURES__H__ */
diff --git a/openair3/M3AP/m3ap_MCE_generate_messages.h b/openair3/M3AP/m3ap_MCE_generate_messages.h
index 0884e8216e0..1a5733acc31 100644
--- a/openair3/M3AP/m3ap_MCE_generate_messages.h
+++ b/openair3/M3AP/m3ap_MCE_generate_messages.h
@@ -26,8 +26,8 @@
  * \version 0.1
  */
 
-#ifndef M2AP_ENB_GENERATE_MESSAGES_H_
-#define M2AP_ENB_GENERATE_MESSAGES_H_
+#ifndef __M3AP_MCE_GENERATE_MESSAGES__H__
+#define __M3AP_MCE_GENERATE_MESSAGES__H__
 
 #include "m2ap_eNB_defs.h"
 #include "m2ap_common.h"
@@ -37,27 +37,8 @@ int m2ap_eNB_generate_m2_setup_request(m2ap_eNB_instance_t *instance_p,
 
 int m2ap_MCE_generate_m2_setup_response(m2ap_eNB_instance_t *instance_p, m2ap_eNB_data_t *m2ap_eNB_data_p);
 
-/*int m2ap_MCE_generate_m2_setup_failure(instance_t instance,
-                                       uint32_t assoc_id,
-                                       M2AP_Cause_PR cause_type,
-                                       long cause_value,
-                                       long time_to_wait);*/
-
 int m2ap_eNB_set_cause (M2AP_Cause_t * cause_p,
                         M2AP_Cause_PR cause_type,
                         long cause_value);
 
-//int m2ap_eNB_generate_m2_handover_request (m2ap_eNB_instance_t *instance_p, m2ap_eNB_data_t *m2ap_eNB_data_p,
-//                                           m2ap_handover_req_t *m2ap_handover_req, int ue_id);
-//
-//int m2ap_eNB_generate_m2_handover_request_ack (m2ap_eNB_instance_t *instance_p, m2ap_eNB_data_t *m2ap_eNB_data_p,
-//                                               m2ap_handover_req_ack_t *m2ap_handover_req_ack);
-//
-//int m2ap_eNB_generate_m2_ue_context_release (m2ap_eNB_instance_t *instance_p, m2ap_eNB_data_t *m2ap_eNB_data_p,
-//                                             m2ap_ue_context_release_t *m2ap_ue_context_release);
-//
-//int m2ap_eNB_generate_m2_handover_cancel (m2ap_eNB_instance_t *instance_p, m2ap_eNB_data_t *m2ap_eNB_data_p,
-//                                          int m2_ue_id,
-//                                          m2ap_handover_cancel_cause_t cause);
-
-#endif /*  M2AP_ENB_GENERATE_MESSAGES_H_ */
+#endif /*  __M3AP_MCE_GENERATE_MESSAGES__H__ */
diff --git a/openair3/M3AP/m3ap_MCE_handler.h b/openair3/M3AP/m3ap_MCE_handler.h
index ce4997e80d7..bcd622570f9 100644
--- a/openair3/M3AP/m3ap_MCE_handler.h
+++ b/openair3/M3AP/m3ap_MCE_handler.h
@@ -26,8 +26,8 @@
  * \version 0.1
  */
 
-#ifndef M2AP_MCE_HANDLERS_H_
-#define M2AP_MCE_HANDLERS_H_
+#ifndef __M3AP_MCE_HANDLER__H__
+#define __M3AP_MCE_HANDLER__H__
 
 #include "m2ap_MCE_defs.h"
 
@@ -40,4 +40,4 @@ int m3ap_MCE_handle_message(instance_t instance, uint32_t assoc_id, int32_t stre
                             const uint8_t * const data, const uint32_t data_length);
 
 
-#endif /* M2AP_MCE_HANDLERS_H_ */
+#endif /* __M3AP_MCE_HANDLER__H__ */
diff --git a/openair3/M3AP/m3ap_MCE_management_procedures.h b/openair3/M3AP/m3ap_MCE_management_procedures.h
index 2d18df8c26d..27e8c928a0f 100644
--- a/openair3/M3AP/m3ap_MCE_management_procedures.h
+++ b/openair3/M3AP/m3ap_MCE_management_procedures.h
@@ -26,8 +26,8 @@
  * \version 0.1
  */
 
-#ifndef M3AP_MCE_MANAGEMENT_PROCEDURES_H_
-#define M3AP_MCE_MANAGEMENT_PROCEDURES_H
+#ifndef __M3AP_MCE_MANAGEMENT_PROCEDURES__H__
+#define __M3AP_MCE_MANAGEMENT_PROCEDURES__H__
 
 void m3ap_MCE_prepare_internal_data(void);
 
@@ -50,4 +50,4 @@ struct m3ap_MCE_data_s *m3ap_get_MCE(m3ap_MCE_instance_t *instance_p,
                                      int32_t assoc_id,
                                      uint16_t cnx_id);
 
-#endif /* M3AP_MCE_MANAGEMENT_PROCEDURES_H_ */
+#endif /* __M3AP_MCE_MANAGEMENT_PROCEDURES__H__ */
diff --git a/openair3/M3AP/m3ap_MME_management_procedures.h b/openair3/M3AP/m3ap_MME_management_procedures.h
index e966ee1f17e..b21189b9157 100644
--- a/openair3/M3AP/m3ap_MME_management_procedures.h
+++ b/openair3/M3AP/m3ap_MME_management_procedures.h
@@ -26,8 +26,8 @@
  * \version 0.1
  */
 
-#ifndef M3AP_MME_MANAGEMENT_PROCEDURES_H_
-#define M3AP_MME_MANAGEMENT_PROCEDURES_H
+#ifndef __M3AP_MME_MANAGEMENT_PROCEDURES__H__
+#define __M3AP_MME_MANAGEMENT_PROCEDURES__H__
 
 void m3ap_MME_prepare_internal_data(void);
 
@@ -51,4 +51,4 @@ struct m3ap_MME_data_s *m3ap_get_MME(m3ap_MME_instance_t *instance_p,
                                      int32_t assoc_id,
                                      uint16_t cnx_id);
 
-#endif /* M3AP_MME_MANAGEMENT_PROCEDURES_H_ */
+#endif /* __M3AP_MME_MANAGEMENT_PROCEDURES__H__ */
diff --git a/openair3/MME_APP/enb_paramdef_mme.h b/openair3/MME_APP/enb_paramdef_mme.h
index 3d65036553b..127c1855e77 100644
--- a/openair3/MME_APP/enb_paramdef_mme.h
+++ b/openair3/MME_APP/enb_paramdef_mme.h
@@ -30,6 +30,9 @@
  * \warning
  */
 
+#ifndef __MME_APP_ENB_PARAMDEF_MME__H__
+#define __MME_APP_ENB_PARAMDEF_MME__H__
+
 #include "common/config/config_paramdesc.h"
 #include "RRC_paramsvalues.h"
 
@@ -172,3 +175,4 @@ typedef struct ccparams_MME_s {
              { .s5= {NULL }}						     \
 }
 
+#endif
diff --git a/openair3/MME_APP/mme_config.h b/openair3/MME_APP/mme_config.h
index 4371ad55f6f..2eb0a66e85c 100644
--- a/openair3/MME_APP/mme_config.h
+++ b/openair3/MME_APP/mme_config.h
@@ -26,8 +26,9 @@
   EMAIL   : javier.morgade@ieee.org
 */
 
-#ifndef MME_CONFIG_H_
-#define MME_CONFIG_H_
+#ifndef __MME_APP_MME_CONFIG__H__
+#define __MME_APP_MME_CONFIG__H__
+
 #include <sys/socket.h>
 #include <netinet/in.h>
 #include <arpa/inet.h>
@@ -48,5 +49,5 @@
 
 int RCconfig_MME(void);
 
-#endif /* MME_CONFIG_H_ */
+#endif /* __MME_APP_MME_CONFIG__H__ */
 /** @} */
diff --git a/openair3/NAS/COMMON/UTIL/socket.h b/openair3/NAS/COMMON/UTIL/socket.h
index 033046d98c0..58bc6b85276 100644
--- a/openair3/NAS/COMMON/UTIL/socket.h
+++ b/openair3/NAS/COMMON/UTIL/socket.h
@@ -35,8 +35,8 @@ Author    Frederic Maurel
 Description Implements TCP socket handlers
 
 *****************************************************************************/
-#ifndef __SOCKET_H__
-#define __SOCKET_H__
+#ifndef __NAS_COMMON_UTIL_SOCKET__H__
+#define __NAS_COMMON_UTIL_SOCKET__H__
 
 #include <sys/types.h>
 
@@ -71,4 +71,4 @@ ssize_t socket_send(const void* id, const char* buffer, size_t length);
 
 void socket_close(void* id);
 
-#endif /* __SOCKET_H__*/
+#endif /* __NAS_COMMON_UTIL_SOCKET__H__ */
diff --git a/openair3/NAS/TEST/USER/user_parser.h b/openair3/NAS/TEST/USER/user_parser.h
index d1972de0289..e7fc07ee329 100644
--- a/openair3/NAS/TEST/USER/user_parser.h
+++ b/openair3/NAS/TEST/USER/user_parser.h
@@ -39,8 +39,8 @@ Description Command line parser of the user simulator process
 
 *****************************************************************************/
 
-#ifndef __USER_PARSER_H__
-#define __USER_PARSER__H__
+#ifndef __NAS_TEST_USER_USER_PARSER__H__
+#define __NAS_TEST_USER_USER_PARSER__H__
 
 /****************************************************************************/
 /*********************  G L O B A L    C O N S T A N T S  *******************/
@@ -74,4 +74,4 @@ const char* user_parser_get_port(void);
 const char* user_parser_get_devpath(void);
 const char* user_parser_get_devattr(void);
 
-#endif /* __USER_PARSER_H__*/
+#endif /* __NAS_TEST_USER_USER_PARSER__H__ */
diff --git a/openair3/TEST/oaisim_mme_test_s1c_s1ap.h b/openair3/TEST/oaisim_mme_test_s1c_s1ap.h
index 3633f11e867..4faec0e66e5 100644
--- a/openair3/TEST/oaisim_mme_test_s1c_s1ap.h
+++ b/openair3/TEST/oaisim_mme_test_s1c_s1ap.h
@@ -19,6 +19,9 @@
  *      contact@openairinterface.org
  */
 
+#ifndef __TEST_OAISIM_MME_TEST_S1C_S1AP__H__
+#define __TEST_OAISIM_MME_TEST_S1C_S1AP__H__
+
 #define _GNU_SOURCE
 #include <stdio.h>
 #include <stdlib.h>
@@ -53,3 +56,5 @@ void s1ap_eNB_register_mme(s1ap_eNB_instance_t *instance_p,
                                   uint16_t             out_streams);
 void s1ap_eNB_handle_register_eNB(instance_t instance, s1ap_register_enb_req_t *s1ap_register_eNB);
 void *s1ap_eNB_task(void *arg);
+
+#endif
diff --git a/openair3/TEST/oaisim_mme_test_s1c_scenario.h b/openair3/TEST/oaisim_mme_test_s1c_scenario.h
index 8c33f457418..8b9a8dd54a1 100644
--- a/openair3/TEST/oaisim_mme_test_s1c_scenario.h
+++ b/openair3/TEST/oaisim_mme_test_s1c_scenario.h
@@ -19,6 +19,9 @@
  *      contact@openairinterface.org
  */
 
+#ifndef __TEST_OAISIM_MME_TEST_S1C_SCENARIO__H__
+#define __TEST_OAISIM_MME_TEST_S1C_SCENARIO__H__
+
 #include <stdlib.h>
 #include <stdint.h>
 
@@ -49,3 +52,5 @@ int      compare_buffer(const uint8_t *buffer, const uint32_t length_buffer, con
 unsigned decode_hex_length(const char *h);
 int      decode_hex(uint8_t *dst, const char *h);
 uint8_t *decode_hex_dup(const char *hex);
+
+#endif
diff --git a/openair3/UTILS/mme_config.h b/openair3/UTILS/mme_config.h
index 37b7dff8651..417c8bbd5f4 100644
--- a/openair3/UTILS/mme_config.h
+++ b/openair3/UTILS/mme_config.h
@@ -19,14 +19,14 @@
  *      contact@openairinterface.org
  */
 
+#ifndef __UTILS_MME_CONFIG__H__
+#define __UTILS_MME_CONFIG__H__
+
 #include <pthread.h>
 #include <stdint.h>
 
 #include "mme_default_values.h"
 
-#ifndef MME_CONFIG_H_
-#define MME_CONFIG_H_
-
 #define MME_CONFIG_STRING_MME_CONFIG                     "MME"
 #define MME_CONFIG_STRING_REALM                          "REALM"
 #define MME_CONFIG_STRING_MAXENB                         "MAXENB"
@@ -183,4 +183,4 @@ int config_parse_opt_line(int argc, char *argv[], mme_config_t *mme_config);
 
 //int yyparse(struct mme_config_s *mme_config_p);
 
-#endif /* MME_CONFIG_H_ */
+#endif /* __UTILS_MME_CONFIG__H__ */
diff --git a/targets/ARCH/ETHERNET/USERSPACE/LIB/if_defs.h b/targets/ARCH/ETHERNET/USERSPACE/LIB/if_defs.h
index 95d00290271..5f55cb0c138 100644
--- a/targets/ARCH/ETHERNET/USERSPACE/LIB/if_defs.h
+++ b/targets/ARCH/ETHERNET/USERSPACE/LIB/if_defs.h
@@ -30,6 +30,9 @@
 * \warning
 */
 
+#ifndef __ETHERNET_USERSPACE_LIB_IF_DEFS__H__
+#define __ETHERNET_USERSPACE_LIB_IF_DEFS__H__
+
 #include <netinet/ether.h>
 #include <stdint.h>
 
@@ -84,3 +87,5 @@
 #define RAW_IF5_MOBIPASS_BLOCK_SIZE_BYTES 1280
 #define RAW_IF5_MOBIPASS_SIZE_BYTES (MAC_HEADER_SIZE_BYTES + sizeof_IF5_mobipass_header_t + RAW_IF5_MOBIPASS_BLOCK_SIZE_BYTES)
 #define PAYLOAD_MOBIPASS_NUM_SAMPLES  640
+
+#endif
diff --git a/targets/COMMON/create_tasks_mbms.h b/targets/COMMON/create_tasks_mbms.h
deleted file mode 100644
index 843897cefb4..00000000000
--- a/targets/COMMON/create_tasks_mbms.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The OpenAirInterface Software Alliance licenses this file to You under
- * the OAI Public License, Version 1.1  (the "License"); you may not use this file
- * except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.openairinterface.org/?page_id=698
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *-------------------------------------------------------------------------------
- * For more information about the OpenAirInterface (OAI) Software Alliance:
- *      contact@openairinterface.org
- */
-
-#ifndef CREATE_TASKS_H_
-#define CREATE_TASKS_H_
-
-/* External declaration of L2L1 task that depend on the target */
-extern void *l2l1_task(void *arg);
-
-int create_tasks(uint32_t enb_nb);
-int create_tasks_ue(uint32_t ue_nb);
-int create_tasks_mbms(uint32_t enb_nb);
-
-#endif /* CREATE_TASKS_H_ */
-- 
GitLab