Make GTP compile on its own, without LTE

Avoid the include gtpv1_u_messages_types.h, as this pulls in e.g., LTE
RRC definitions. The CU-UP load tester integrated in one of the
following commits should be able to build without LTE RRC, if it was for
GTP. Unfortunately, ITTI also pulls in LTE RRC, so it's also somewhat
useless...

Put some forward declarations instead. That also shows that the API is
unnecessarily complex, and would need some cleanup.
This commit is contained in:
Robert Schmidt
2025-01-20 14:49:37 +01:00
parent aa82d83228
commit 1e39f20d87

View File

@@ -1,16 +1,41 @@
#ifndef __GTPUNEW_ITF_H__
#define __GTPUNEW_ITF_H__
#include <stdint.h>
#include <limits.h>
#include <sys/socket.h>
#include <netinet/in.h>
#define GTPNOK -1
# define GTPU_HEADER_OVERHEAD_MAX 64
#include "openair2/COMMON/gtpv1_u_messages_types.h"
#include "common/platform_types.h"
#include "common/utils/hashtable/hashtable.h"
#ifdef __cplusplus
extern "C" {
#endif
/* forward declaration */
struct protocol_ctxt_s;
typedef struct protocol_ctxt_s protocol_ctxt_t;
struct gtpv1u_enb_create_tunnel_req_s;
typedef struct gtpv1u_enb_create_tunnel_req_s gtpv1u_enb_create_tunnel_req_t;
struct gtpv1u_enb_create_tunnel_resp_s;
typedef struct gtpv1u_enb_create_tunnel_resp_s gtpv1u_enb_create_tunnel_resp_t;
struct gtpv1u_enb_delete_tunnel_req_s;
typedef struct gtpv1u_enb_delete_tunnel_req_s gtpv1u_enb_delete_tunnel_req_t;
struct gtpv1u_enb_create_x2u_tunnel_req_s;
typedef struct gtpv1u_enb_create_x2u_tunnel_req_s gtpv1u_enb_create_x2u_tunnel_req_t;
struct gtpv1u_enb_create_x2u_tunnel_resp_s;
typedef struct gtpv1u_enb_create_x2u_tunnel_resp_s gtpv1u_enb_create_x2u_tunnel_resp_t;
struct gtpv1u_gnb_create_tunnel_req_s;
typedef struct gtpv1u_gnb_create_tunnel_req_s gtpv1u_gnb_create_tunnel_req_t;
struct gtpv1u_gnb_create_tunnel_resp_s;
typedef struct gtpv1u_gnb_create_tunnel_resp_s gtpv1u_gnb_create_tunnel_resp_t;
struct gtpv1u_gnb_delete_tunnel_req_s;
typedef struct gtpv1u_gnb_delete_tunnel_req_s gtpv1u_gnb_delete_tunnel_req_t;
typedef bool (*gtpCallback)(protocol_ctxt_t *ctxt_pP,
const srb_flag_t srb_flagP,
const rb_id_t rb_idP,
@@ -116,7 +141,7 @@ extern "C" {
hash_table_t *ue_mapping;
} gtpv1u_data_t;
#define GTPV1U_BEARER_OFFSET 3
#define GTPV1U_MAX_BEARERS_ID (max_val_LTE_DRB_Identity - GTPV1U_BEARER_OFFSET)
#define GTPV1U_MAX_BEARERS_ID (32 - GTPV1U_BEARER_OFFSET) /* max_val_LTE_DRB_Identity */
typedef enum {
BEARER_DOWN = 0,
BEARER_IN_CONFIG,