diff --git a/executables/agent_if/ans/sm_ag_if_ans.h b/executables/agent_if/ans/sm_ag_if_ans.h
index cf3ef614b14d9d03239720670c4ae875e8d5aefc..6bb0e4805bd9258a4f9ea94b5239852636ee709f 100644
--- a/executables/agent_if/ans/sm_ag_if_ans.h
+++ b/executables/agent_if/ans/sm_ag_if_ans.h
@@ -30,7 +30,8 @@
 #include "../ie/pdcp_data_ie.h"
 #include "../ie/slice_data_ie.h"
 #include "../ie/tc_data_ie.h"
-
+#include "../ie/gtp_data_ie.h"
+#include "../ie/kpm_data_ie.h"
 
 
 typedef enum{
@@ -39,6 +40,7 @@ typedef enum{
   PDCP_AGENT_IF_CTRL_ANS_V0, 
   SLICE_AGENT_IF_CTRL_ANS_V0,
   TC_AGENT_IF_CTRL_ANS_V0,
+  GTP_AGENT_IF_CTRL_ANS_V0,
 
   SM_AGENT_IF_ANS_V0_END,
 } sm_ag_if_ans_e;
@@ -50,6 +52,7 @@ typedef struct{
     pdcp_ctrl_out_t pdcp;
     slice_ctrl_out_t slice;
     tc_ctrl_out_t tc;
+    gtp_ctrl_out_t gtp;
   };
   sm_ag_if_ans_e type;
 } sm_ag_if_ans_t;
diff --git a/executables/agent_if/byte_array.h b/executables/agent_if/byte_array.h
new file mode 100644
index 0000000000000000000000000000000000000000..18aca02dabb4a5dfcdc10e7ed02c420ad37bd408
--- /dev/null
+++ b/executables/agent_if/byte_array.h
@@ -0,0 +1,62 @@
+/*
+ * 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 BYTE_ARRAY_H
+#define BYTE_ARRAY_H
+
+#include <stdbool.h>
+#include <stddef.h>
+#include <stdint.h>
+#include <string.h>
+
+typedef struct {
+  size_t len;
+  uint8_t *buf;
+} byte_array_t;
+
+/* create on the stack a byte_array_t named 'name' implemented as array of length 'length'*/
+#define BYTE_ARRAY_STACK(name, length)  \
+  uint8_t (name##_BuF)[(length)];       \
+  memset((name##_BuF), 0, sizeof((name##_BuF))); \
+  byte_array_t (name) = {.buf = (name##_BuF), .len = (length)}
+
+/* create on the heap a new 'byte_array_t' data structure named 'ba' from OCTET_STRING_t named 'octet' pointer*/
+#define BYTE_ARRAY_HEAP_CP_FROM_OCTET_STRING_POINTERS(ba, octet)  \
+  ba->buf = calloc(1, octet->size);\
+  assert(ba->buf!=NULL && "Memory exhausted");\
+  memcpy(ba->buf, octet->buf, octet->size);\
+  ba->len = octet->size;
+
+#define BYTE_ARRAY_HEAP_CP_FROM_OCTET_STRING(ba, octet)  \
+  ba.buf = calloc(1, octet.size);\
+  assert(ba.buf!=NULL && "Memory exhausted");\
+  memcpy(ba.buf, octet.buf, octet.size);\
+  ba.len = octet.size;
+
+byte_array_t copy_byte_array(byte_array_t src);
+
+void free_byte_array(byte_array_t ba);
+
+bool eq_byte_array(const byte_array_t* m0, const byte_array_t* m1);
+
+#endif
diff --git a/executables/agent_if/ie/gtp_data_ie.h b/executables/agent_if/ie/gtp_data_ie.h
new file mode 100644
index 0000000000000000000000000000000000000000..2b9f5d17082ad44cf4938ec0c93ca824ee84993b
--- /dev/null
+++ b/executables/agent_if/ie/gtp_data_ie.h
@@ -0,0 +1,263 @@
+/*
+ * 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 GTP_DATA_INFORMATION_ELEMENTS_H
+#define GTP_DATA_INFORMATION_ELEMENTS_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * 9 Information Elements (IE) , RIC Event Trigger Definition, RIC Action Definition, RIC Indication Header, RIC Indication Message, RIC Call Process ID, RIC Control Header, RIC Control Message, RIC Control Outcome and RAN Function Definition defined by ORAN-WG3.E2SM-v01.00.00 at Section 5
+ */
+
+#include <stdbool.h>
+#include <stdint.h>
+
+//////////////////////////////////////
+// RIC Event Trigger Definition
+/////////////////////////////////////
+
+typedef struct {
+  uint32_t ms;
+} gtp_event_trigger_t;
+
+void free_gtp_event_trigger(gtp_event_trigger_t* src); 
+
+gtp_event_trigger_t cp_gtp_event_trigger( gtp_event_trigger_t* src);
+
+bool eq_gtp_event_trigger(gtp_event_trigger_t* m0, gtp_event_trigger_t* m1);
+
+
+
+//////////////////////////////////////
+// RIC Action Definition 
+/////////////////////////////////////
+
+typedef struct {
+  uint32_t dummy;  
+} gtp_action_def_t;
+
+void free_gtp_action_def(gtp_action_def_t* src); 
+
+gtp_action_def_t cp_gtp_action_def(gtp_action_def_t* src);
+
+bool eq_gtp_action_def(gtp_event_trigger_t* m0,  gtp_event_trigger_t* m1);
+
+
+
+//////////////////////////////////////
+// RIC Indication Header 
+/////////////////////////////////////
+
+typedef struct{
+  uint32_t dummy;  
+} gtp_ind_hdr_t;
+
+void free_gtp_ind_hdr(gtp_ind_hdr_t* src); 
+
+gtp_ind_hdr_t cp_gtp_ind_hdr(gtp_ind_hdr_t const* src);
+
+bool eq_gtp_ind_hdr(gtp_ind_hdr_t* m0, gtp_ind_hdr_t* m1);
+
+
+//////////////////////////////////////
+// RIC Indication Message 
+/////////////////////////////////////
+
+typedef struct {
+  // ngu tunnel stats
+  uint32_t rnti; // user id
+  uint32_t teidgnb; // tunnel id from gnb
+  uint8_t qfi; // QoS flow indicator
+  uint8_t teidupf; // tunnel id from upf
+} gtp_ngu_t_stats_t; 
+
+typedef struct {
+  gtp_ngu_t_stats_t* ngut; 
+  uint32_t len;
+
+  int64_t tstamp;
+} gtp_ind_msg_t;
+
+void free_gtp_ind_msg(gtp_ind_msg_t* src); 
+
+gtp_ind_msg_t cp_gtp_ind_msg(gtp_ind_msg_t const* src);
+
+bool eq_gtp_ind_msg(gtp_ind_msg_t* m0, gtp_ind_msg_t* m1);
+
+
+//////////////////////////////////////
+// RIC Call Process ID 
+/////////////////////////////////////
+
+typedef struct {
+  uint32_t dummy;
+} gtp_call_proc_id_t;
+
+void free_gtp_call_proc_id( gtp_call_proc_id_t* src); 
+
+gtp_call_proc_id_t cp_gtp_call_proc_id( gtp_call_proc_id_t* src);
+
+bool eq_gtp_call_proc_id(gtp_call_proc_id_t* m0, gtp_call_proc_id_t* m1);
+
+
+
+//////////////////////////////////////
+// RIC Control Header 
+/////////////////////////////////////
+
+
+typedef struct {
+  uint32_t dummy;
+} gtp_ctrl_hdr_t;
+
+void free_gtp_ctrl_hdr( gtp_ctrl_hdr_t* src); 
+
+gtp_ctrl_hdr_t cp_gtp_ctrl_hdr(gtp_ctrl_hdr_t* src);
+
+bool eq_gtp_ctrl_hdr(gtp_ctrl_hdr_t* m0, gtp_ctrl_hdr_t* m1);
+
+
+
+//////////////////////////////////////
+// RIC Control Message 
+/////////////////////////////////////
+
+
+typedef struct {
+  uint32_t action;
+} gtp_ctrl_msg_t;
+
+void free_gtp_ctrl_msg( gtp_ctrl_msg_t* src); 
+
+gtp_ctrl_msg_t cp_gtp_ctrl_msg(gtp_ctrl_msg_t* src);
+
+bool eq_gtp_ctrl_msg(gtp_ctrl_msg_t* m0, gtp_ctrl_msg_t* m1);
+
+
+
+//////////////////////////////////////
+// RIC Control Outcome 
+/////////////////////////////////////
+
+typedef enum{
+  GTP_CTRL_OUT_OK,
+
+  GTP_CTRL_OUT_END
+} gtp_ctrl_out_e;
+
+
+typedef struct {
+  gtp_ctrl_out_e ans;
+} gtp_ctrl_out_t;
+
+void free_gtp_ctrl_out(gtp_ctrl_out_t* src); 
+
+gtp_ctrl_out_t cp_gtp_ctrl_out(gtp_ctrl_out_t* src);
+
+bool eq_gtp_ctrl_out(gtp_ctrl_out_t* m0, gtp_ctrl_out_t* m1);
+
+
+//////////////////////////////////////
+// RAN Function Definition 
+/////////////////////////////////////
+
+typedef struct {
+  uint32_t dummy;
+} gtp_func_def_t;
+
+void free_gtp_func_def( gtp_func_def_t* src); 
+
+gtp_func_def_t cp_gtp_func_def(gtp_func_def_t* src);
+
+bool eq_gtp_func_def(gtp_func_def_t* m0, gtp_func_def_t* m1);
+
+/////////////////////////////////////////////////
+//////////////////////////////////////////////////
+/////////////////////////////////////////////////
+
+
+/*
+ * O-RAN defined 5 Procedures: RIC Subscription, RIC Indication, RIC Control, E2 Setup and RIC Service Update 
+ * */
+
+
+///////////////
+/// RIC Subscription
+///////////////
+
+typedef struct{
+  gtp_event_trigger_t et; 
+  gtp_action_def_t* ad;
+} gtp_sub_data_t;
+
+///////////////
+// RIC Indication
+///////////////
+
+typedef struct{
+  gtp_ind_hdr_t hdr;
+  gtp_ind_msg_t msg;
+  gtp_call_proc_id_t* proc_id;
+} gtp_ind_data_t;
+
+void free_gtp_ind_data(gtp_ind_data_t* ind);
+
+gtp_ind_data_t cp_gtp_ind_data(gtp_ind_data_t const* src);
+
+///////////////
+// RIC Control
+///////////////
+
+typedef struct{
+  gtp_ctrl_hdr_t hdr;
+  gtp_ctrl_msg_t msg;
+} gtp_ctrl_req_data_t;
+
+typedef struct{
+  gtp_ctrl_out_t* out;
+} gtp_ctrl_out_data_t;
+
+///////////////
+// E2 Setup
+///////////////
+
+typedef struct{
+  gtp_func_def_t func_def;
+} gtp_e2_setup_data_t;
+
+///////////////
+// RIC Service Update
+///////////////
+
+typedef struct{
+  gtp_func_def_t func_def;
+} gtp_ric_service_update_t;
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
diff --git a/executables/agent_if/ie/kpm_data_ie.h b/executables/agent_if/ie/kpm_data_ie.h
new file mode 100644
index 0000000000000000000000000000000000000000..aff1c823f36ebcbec21c908c90a8c48052e88f0c
--- /dev/null
+++ b/executables/agent_if/ie/kpm_data_ie.h
@@ -0,0 +1,283 @@
+/*
+ * 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
+ */
+
+/*
+ * This interface implements the Information Elements (IE) data structures and algorithms according to O-RAN.WG3.E2SM-KPM-v02.02 and 
+ * the 5 associate O-RAN Procedures. Note that IEs 'RIC Call Process ID, RIC Control Header, RIC Control Message and RIC Control 
+ * Outcome' are not to be implemented.
+ * 
+ * IE for functional procedures:
+ *  SEC 1. RIC Event Trigger Definition
+ *  SEC 2. RIC Action Definition
+ *  SEC 3. RIC Indication Header 
+ *  SEC 4. RIC Indication Message 
+ * IE for global procedures:
+ *  SEC 5. RAN Function Definition
+ * 
+ * Procedures:
+ * SEC 6. RIC Subscription, RIC Indication, RIC Control, E2 Setup and RIC Service Update 
+ * 
+ * Caveats
+ * The data types inputs to the IE functions form an adapter layer from tradition C data types (i.e. string = char * ) to 
+ * ASN1/Flatbuffer generated data types. It is done just for convenience so that the main code of the RIC or the one from RAN
+ * can use traditional datatypes. In theory, if you have just ASN1, you could directly use the ASN1 generated datatypes in the 
+ * encoding/decoding routines, obsoleting this adapter.
+ */
+
+#ifndef KPM_DATA_INFORMATION_ELEMENTS_H
+#define KPM_DATA_INFORMATION_ELEMENTS_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "../byte_array.h"
+/* 
+ * SEC 0: General data types that make the mapping between ASN data types and RIC ones
+ */
+typedef byte_array_t            adapter_OCTET_STRING_t;
+typedef adapter_OCTET_STRING_t  adapter_PrintableString_t;
+typedef adapter_OCTET_STRING_t  adapter_TimeStamp_t; // IETF RFC 5905 , NTP spec, 4 bytes long
+
+/*******************************************************
+ * SEC 1. RIC Event Trigger Definition as per $8.2.1.1
+ *******************************************************/
+typedef struct kpm_event_trigger_t {
+  unsigned long ms; // reporting period in milliseconds
+} kpm_event_trigger_t;
+
+/*******************************************************
+ * SEC 2. RIC Action Definition as per $8.2.1.2
+ *******************************************************/
+
+typedef byte_array_t  adapter_MeasurementTypeName_t;
+typedef long	        adapter_MeasurementTypeID_t;
+typedef byte_array_t  adapter_PLMNIdentity_t;   // 3 bytes size
+typedef uint64_t      adapter_NRCellIdentity_t; // 36 bits size
+ 
+
+typedef long          adapter_QCI_t;
+typedef byte_array_t	adapter_SST_t;// size = 1 byte
+typedef byte_array_t  adapter_SD_t; // size = 3 byte
+
+typedef struct S_NSSAI {
+	adapter_SST_t	  sST;
+	adapter_SD_t	  *sD;	/* OPTIONAL */
+} adapter_S_NSSAI_t;
+
+typedef long	        adapter_FiveQI_t; // values: 0..255
+typedef long	        adapter_QosFlowIdentifier_t;
+
+/* 
+ * Structure 'adapter_LabelInfoList_t' defines the values of the subcounters that are applicable to an associated measurement type
+ * identified by measName or measID. All the fields are indicated as optional. If value is != NULL, it means presence of the optional 
+ * field.
+ */
+typedef struct adapter_LabelInfoList_t {
+  long	                        *noLabel;	/* OPTIONAL: looks like this is an enumeration datatype that accepts only true (0) */
+	adapter_PLMNIdentity_t	      *plmnID;	/* OPTIONAL */
+	adapter_S_NSSAI_t	            *sliceID;	/* OPTIONAL */
+	adapter_FiveQI_t	            *fiveQI;	/* OPTIONAL */
+	adapter_QosFlowIdentifier_t	  *qFI;	    /* OPTIONAL */
+	adapter_QCI_t	                *qCI;	    /* OPTIONAL */
+	adapter_QCI_t	                *qCImax;	/* OPTIONAL */
+	adapter_QCI_t	                *qCImin;	/* OPTIONAL */
+	long	                        *aRPmax;	/* OPTIONAL */
+	long	                        *aRPmin;	/* OPTIONAL */
+	long	                        *bitrateRange;/* OPTIONAL */
+	long	                        *layerMU_MIMO;/* OPTIONAL */
+	long	                        *sUM;	    /* OPTIONAL */
+	long	                        *distBinX;/* OPTIONAL */
+	long	                        *distBinY;/* OPTIONAL */
+	long	                        *distBinZ;/* OPTIONAL */
+	long	                        *preLabelOverride;/* OPTIONAL */
+	long	                        *startEndInd;	/* OPTIONAL */
+	long	                        *min;	    /* OPTIONAL */
+	long	                        *max;	    /* OPTIONAL */
+	long	                        *avg;	    /* OPTIONAL */
+} adapter_LabelInfoList_t;
+
+typedef struct MeasInfo_t {
+  enum {MeasurementType_NAME = 1, MeasurementType_ID=2}	measType;
+  adapter_MeasurementTypeName_t	 measName;
+	adapter_MeasurementTypeID_t	   measID; 
+	adapter_LabelInfoList_t	       *labelInfo;   // list implemented as array having a maximum of 'maxnoofLabelInfo' items
+  size_t                         labelInfo_len;// length of the array labelInfo
+} MeasInfo_t; 
+
+typedef uint64_t  adapter_EUTRACellIdentity_t; // 28 bit size
+
+typedef struct kpm_action_def_t
+{
+  /*
+   * RIC Style Type 1:  E2 Node Measurement. Used to carry measurement report from a target E2 Node. More in details, 
+   *                    it contains measurement types that Near-RT RIC is requesting to subscribe followed by a list 
+   *                    of subcounters to be measured for each measurement type, and a granularity period
+   *                    indicating collection interval of those measurements.
+   * RIC Style Type 2: Used to carry measurement report for a single UE of interest from a target E2 Node
+   * RIC Style Type 3: Used to carry UE-level measurement report for a group of UEs per
+   *                   measurement type matching subscribed conditions from a target E2 Node
+   * RIC Style Type 4: Used to carry measurement report for a group of UEs across a set of
+   *                   measurement types satisfying common subscribed conditions from a target E2 Node
+   * RIC Style Type 5: Used to carry measurement report for multiple UE of interest from a target E2 Node
+   */
+  long                          ric_style_type; // values: 1..5. This number defines the action definition type
+  
+  unsigned long                 granularity_period; // Measurement collection interval expressed in unit of 1 millisecond.
+
+  /* 
+   * list implemented as array of length 'MeasInfo_len' containing measurement names like 'DL Transmitted Data Volume' or 
+   * its correponding ID
+   */
+  size_t                        MeasInfo_len; // compulsory grater than 0
+  MeasInfo_t                    *MeasInfo;    
+  
+  // If cellGlobalIDtype == choice_NOTHING, the field 'cellGlobalID' in asn format will be NULL
+  enum { choice_NOTHING, choice_nR_CGI, choice_eUTRA_CGI } cellGlobalIDtype; 
+  
+  adapter_NRCellIdentity_t      nRCellIdentity;
+  adapter_PLMNIdentity_t	      pLMNIdentity;
+	adapter_EUTRACellIdentity_t   eUTRACellIdentity;
+
+  /* 
+   * XXX-extensions: below add all the info you might find in all the actions types . 
+   * Still missing some fields for action_def_2, action_def_3, action_def_4, action_def_5.
+   */
+} kpm_action_def_t;
+
+void free_kpm_action_def(kpm_action_def_t* src);
+void free_kpm_label_info(adapter_LabelInfoList_t *l);
+/************************************************
+ * SEC 3. RIC Indication Header as per $8.2.1.3.1
+ ************************************************/
+typedef struct {
+  adapter_TimeStamp_t        collectStartTime;   /* Measurement collection start time in UTC format.*/
+	adapter_PrintableString_t  *fileFormatversion;/* OPTIONAL */
+	adapter_PrintableString_t  *senderName;	      /* OPTIONAL */
+	adapter_PrintableString_t  *senderType;	      /* OPTIONAL */
+	adapter_PrintableString_t  *vendorName;	      /* OPTIONAL */
+} kpm_ind_hdr_t;
+
+void          free_kpm_ind_hdr(kpm_ind_hdr_t* src);
+kpm_ind_hdr_t cp_kpm_ind_hdr(kpm_ind_hdr_t const* src);
+/**************************************************
+ * SEC 4. RIC Indication Message as per $8.2.1.4.1
+ **************************************************/
+
+typedef struct adapter_MeasRecord_t {
+  enum {MeasRecord_int=1, MeasRecord_real,  MeasRecord_noval} type;
+	unsigned long	  int_val;
+	double	        real_val;
+} adapter_MeasRecord_t;
+
+typedef struct adapter_MeasDataItem_t {
+  size_t                    measRecord_len; // 1..
+	adapter_MeasRecord_t	    *measRecord; 
+	long	                    incompleteFlag;	// OPTIONAL: true(0) value indicates that the measurements record 
+                                            // is not reliable asn we pass to ASN this info, -1 means that the flag is not present
+} adapter_MeasDataItem_t;
+
+typedef struct {
+  size_t                    MeasData_len; // 1..
+  adapter_MeasDataItem_t    *MeasData;
+
+  /* 
+   * list implemented as array of length 'MeasInfo_len' containing measurement names like 'DL Transmitted Data Volume' or 
+   * its corresponding ID. It is the same mechanism used for 'action definition type 1'
+   */
+  size_t                    MeasInfo_len; 
+  MeasInfo_t                *MeasInfo;    // OPTIONAL, MeasInfo_len can be zero
+
+	unsigned long             *granulPeriod;	/* OPTIONAL */
+
+  /* 
+   * XXX-extensions: add all the info you might find in all the indication format types.
+   * Still missing some fields for supporting format_2 and format_3
+   */
+} kpm_ind_msg_t;
+
+void          free_kpm_ind_msg(kpm_ind_msg_t* src);
+kpm_ind_msg_t cp_kpm_ind_msg(kpm_ind_msg_t const* src);
+bool          eq_kpm_ind_msg(kpm_ind_msg_t const* m0, kpm_ind_msg_t const* m1);
+
+/*************************************************
+ * SEC 5. RAN Function Definition as per $8.2.2.1
+ *************************************************/
+typedef struct {
+  adapter_PrintableString_t	 ShortName;   // “ORAN-E2SM-KPM” aka SM_KPM_STR
+	adapter_PrintableString_t	 E2SM_OID;    // see cfr. O-RAN.WG3.E2SM-v02.01.pdf, table 5.1
+	adapter_PrintableString_t	 Description; // “KPM Monitor”
+	long	                     *ranFunction_Instance;	// OPTIONAL: it is suggested to be used when E2 Node declares
+                                                    // multiple RAN Function ID supporting the same  E2SM specification
+} adapter_ranFunction_Name_t; // cfr. O-RAN.WG3.E2SM-v02.01.pdf, $6.2.2.1
+
+typedef struct {
+// TODO
+} adapter_ric_EventTriggerStyleItem_t; 
+
+typedef struct {
+// TODO
+} adapter_ric_ReportStyleItem_t; 
+
+
+typedef struct {
+  adapter_ranFunction_Name_t ranFunction_Name; 
+
+  adapter_ric_EventTriggerStyleItem_t *ric_EventTriggerStyle_List; // OPTIONAL: used in action definition, only type 1 supported for the moment
+  size_t ric_EventTriggerStyle_List_len; // 0..maxnoofRICStyles 
+  
+  adapter_ric_ReportStyleItem_t *ric_ReportStyle_List;    // OPTIONAL: used in indication message, only type 1 supported for the mome   
+  size_t ric_ReportStyle_List_len; // 0..maxnoofRICStyles
+} kpm_func_def_t;
+
+/****************************************************************************************
+ * SEC 6. RIC Subscription, RIC Indication, RIC Control, E2 Setup and RIC Service Update 
+ ****************************************************************************************/
+// RIC subscription
+typedef struct {
+  kpm_event_trigger_t et; 
+  kpm_action_def_t    *ad;
+} kpm_sub_data_t; 
+
+// RIC indication
+typedef struct {
+  kpm_ind_hdr_t hdr;
+  kpm_ind_msg_t msg;
+} kpm_ind_data_t; 
+
+
+void            free_kpm_ind_data(kpm_ind_data_t* ind);
+kpm_ind_data_t  cp_kpm_ind_data(kpm_ind_data_t const* src);
+
+
+// SETUP REQUEST and RIC SERVICE UPDATE use the 'RAN function definition' IE
+typedef struct {
+  kpm_func_def_t func_def;
+} kpm_setup_data_t;
+void free_kpm_func_def(kpm_func_def_t* src);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
\ No newline at end of file
diff --git a/executables/agent_if/libe2_agent.a b/executables/agent_if/libe2_agent.a
index 24fb9e8b61fe66533141a0c509bba98c38cda7d6..090cb296e6068ad930af550f955c9843f5450313 100644
Binary files a/executables/agent_if/libe2_agent.a and b/executables/agent_if/libe2_agent.a differ
diff --git a/executables/agent_if/read/sm_ag_if_rd.c b/executables/agent_if/read/sm_ag_if_rd.c
index ec97cf82479d6b631cceb1049d7694a340696353..a59912b0281687c1ed43fcb3673f6b154eec802d 100644
--- a/executables/agent_if/read/sm_ag_if_rd.c
+++ b/executables/agent_if/read/sm_ag_if_rd.c
@@ -26,6 +26,8 @@
 #include "../ie/pdcp_data_ie.h"
 #include "../ie/slice_data_ie.h"
 #include "../ie/tc_data_ie.h"
+#include "../ie/gtp_data_ie.h"
+#include "../ie/kpm_data_ie.h"
 
 #include <assert.h>
 #include <stdlib.h>
@@ -44,6 +46,10 @@ void free_sm_ag_if_rd(sm_ag_if_rd_t* d)
     free_slice_ind_data(&d->slice_stats);
   } else if(d->type == TC_STATS_V0){
     free_tc_ind_data(&d->tc_stats);
+  } else if(d->type == GTP_STATS_V0){
+    free_gtp_ind_data(&d->gtp_stats);
+  } else if(d->type == KPM_STATS_V0){
+    free_kpm_ind_data(&d->kpm_stats);
   } else {
     assert(0!=0 && "Unforeseen case");
   }
@@ -66,6 +72,10 @@ sm_ag_if_rd_t cp_sm_ag_if_rd(sm_ag_if_rd_t const* d)
     ans.slice_stats = cp_slice_ind_data(&d->slice_stats);
   } else if(ans.type == TC_STATS_V0) {
     ans.tc_stats = cp_tc_ind_data(&d->tc_stats);
+  } else if(ans.type == GTP_STATS_V0) {
+    ans.gtp_stats = cp_gtp_ind_data(&d->gtp_stats);
+  } else if(ans.type == KPM_STATS_V0) {
+    ans.kpm_stats = cp_kpm_ind_data(&d->kpm_stats);
   } else {
     assert("Unknown type or not implemented");
   }
diff --git a/executables/agent_if/read/sm_ag_if_rd.h b/executables/agent_if/read/sm_ag_if_rd.h
index 8dfb5661292d02d7b66d2ccbcba84ed988d7d5aa..3241c4421ce69230aeed668a732e3952d1715b79 100644
--- a/executables/agent_if/read/sm_ag_if_rd.h
+++ b/executables/agent_if/read/sm_ag_if_rd.h
@@ -31,7 +31,8 @@
 #include "../ie/pdcp_data_ie.h"
 #include "../ie/slice_data_ie.h"
 #include "../ie/tc_data_ie.h"
-
+#include "../ie/gtp_data_ie.h"
+#include "../ie/kpm_data_ie.h"
 
 typedef enum{
   MAC_STATS_V0,
@@ -39,7 +40,8 @@ typedef enum{
   PDCP_STATS_V0,
   SLICE_STATS_V0,
   TC_STATS_V0,
-
+  GTP_STATS_V0, 
+  KPM_STATS_V0, 
   SM_AGENT_IF_READ_V0_END,
 } sm_ag_if_rd_e;
 
@@ -51,6 +53,8 @@ typedef struct{
     pdcp_ind_data_t pdcp_stats;
     slice_ind_data_t slice_stats;
     tc_ind_data_t tc_stats;
+    gtp_ind_data_t gtp_stats;
+    kpm_ind_data_t kpm_stats;
   };
   sm_ag_if_rd_e type;
 } sm_ag_if_rd_t;
diff --git a/executables/agent_if/write/sm_ag_if_wr.h b/executables/agent_if/write/sm_ag_if_wr.h
index d9bb8eec7e22bf391fa5311c40f359f15aecb3bb..d8a45fb1819be6209df756666c596221bb44a390 100644
--- a/executables/agent_if/write/sm_ag_if_wr.h
+++ b/executables/agent_if/write/sm_ag_if_wr.h
@@ -29,6 +29,8 @@
 #include "../ie/mac_data_ie.h"
 #include "../ie/slice_data_ie.h"
 #include "../ie/tc_data_ie.h"
+#include "../ie/gtp_data_ie.h"
+#include "../ie/kpm_data_ie.h"
 
 typedef enum{
   SUBSCRIBE_TIMER = 0,
@@ -37,7 +39,7 @@ typedef enum{
   PDCP_CTRL_REQ_V0 = 3,
   SLICE_CTRL_REQ_V0 = 4,
   TC_CTRL_REQ_V0 = 5,
-
+  GTP_CTRL_REQ_V0 = 6,
   SM_AGENT_IF_WRITE_V0_END,
 } sm_ag_if_wr_e;
 
@@ -49,6 +51,7 @@ typedef struct {
     pdcp_ctrl_req_data_t pdcp_req_ctrl;
     slice_ctrl_req_data_t slice_req_ctrl;
     tc_ctrl_req_data_t tc_req_ctrl;
+    gtp_ctrl_req_data_t gtp_ctrl;
   }; 
   sm_ag_if_wr_e type;
 } sm_ag_if_wr_t;