Add send function pointers to VNF

This commit is contained in:
Rúben Soares Silva
2025-06-26 16:57:08 +01:00
parent 2089655a97
commit 52a0ceac04
8 changed files with 86 additions and 54 deletions
+3 -3
View File
@@ -20,7 +20,7 @@
#include "nfapi_vnf_interface.h"
typedef struct
struct vnf_t
{
nfapi_vnf_config_t _public;
@@ -31,11 +31,11 @@ typedef struct
uint8_t tx_message_buffer[NFAPI_MAX_PACKED_MESSAGE_SIZE];
uint16_t next_phy_id;
} vnf_t;
};
int vnf_pack_and_send_p5_message(vnf_t* vnf, uint16_t p5_idx, nfapi_p4_p5_message_header_t* msg, uint16_t msg_len);
int vnf_nr_pack_and_send_p5_message(vnf_t* vnf, uint16_t p5_idx, nfapi_nr_p4_p5_message_header_t* msg, uint16_t msg_len);
bool vnf_nr_send_p5_message(vnf_t* vnf, uint16_t p5_idx, nfapi_nr_p4_p5_message_header_t* msg, uint32_t msg_len);
int vnf_pack_and_send_p4_message(vnf_t* vnf, uint16_t p5_idx, nfapi_p4_p5_message_header_t* msg, uint16_t msg_len);
+3 -3
View File
@@ -108,7 +108,7 @@ typedef struct nfapi_vnf_p7_connection_info {
} nfapi_vnf_p7_connection_info_t;
typedef struct {
struct vnf_p7_t{
nfapi_vnf_p7_config_t _public;
@@ -121,7 +121,7 @@ typedef struct {
uint8_t* rx_message_buffer; // would this be better put in the p7 conenction info?
uint16_t rx_message_buffer_size;
} vnf_p7_t;
};
uint32_t vnf_get_current_time_hr(void);
@@ -139,7 +139,7 @@ nfapi_vnf_p7_connection_info_t* vnf_p7_connection_info_list_find(vnf_p7_t* vnf_p
nfapi_vnf_p7_connection_info_t* vnf_p7_connection_info_list_delete(vnf_p7_t* vnf_p7, uint16_t phy_id);
int vnf_p7_pack_and_send_p7_msg(vnf_p7_t* vnf_p7, nfapi_p7_message_header_t* header);
int vnf_nr_p7_pack_and_send_p7_msg(vnf_p7_t* vnf_p7, nfapi_nr_p7_message_header_t* header);
bool vnf_nr_send_p7_msg(vnf_p7_t* vnf_p7, nfapi_nr_p7_message_header_t* header);
void vnf_p7_release_msg(vnf_p7_t* vnf_p7, nfapi_p7_message_header_t* header);
void vnf_p7_release_pdu(vnf_p7_t* vnf_p7, void* pdu);