Cleanup common_lib.h

This change reduces the number of dependecies of common_lib.h and simplifies
the task of implementing an external OAI radio library.
This commit is contained in:
Bartosz Podrygajlo
2026-03-31 11:50:35 +02:00
parent af4b0d53e9
commit e4d2d2b827
33 changed files with 77 additions and 50 deletions
+11
View File
@@ -17,6 +17,7 @@
#include <sys/socket.h>
#include <net/if.h>
#include <netinet/ether.h>
#include "common/utils/threadPool/notified_fifo.h"
#define MAX_INST 4
@@ -29,6 +30,14 @@
#define APP_HEADER_SIZE_BYTES (ECPRICOMMON_BYTES + ECPRIPCID_BYTES + sizeof(openair0_timestamp_t))
#define ECPRIREV 1 // ECPRI Version 1, C=0 - single ECPRI message per OAI TX packet
/*! \brief Structure used for initializing UDP read threads */
typedef struct {
openair0_device_t *device;
int thread_id;
pthread_t pthread;
notifiedFIFO_t *resp;
} udp_ctx_t;
/*!\brief opaque ethernet data structure */
typedef struct {
@@ -115,6 +124,8 @@ typedef struct {
struct ether_header ehd;
/*!\brief local address (user) for RAW socket*/
struct sockaddr_ll local_addrd_ll;
/*!brief UDP TX thread context*/
udp_ctx_t **utx;
} eth_state_t;