Allocate VNF_info directly in config instead of global variable

This allows access to the VNF configuration in the various transport mechanisms straight from config, without this, the transport specific thread would cause a segmentation fault when trying to access the pack/unpack function pointers.
Add 2 functions to access the P5 and P7 VNF structures, to avoid having to always cast user_data and p7_vnfs
This commit is contained in:
Rúben Soares Silva
2025-10-23 08:45:24 +01:00
parent 206c7667e6
commit 244819c627
9 changed files with 87 additions and 79 deletions
+3 -1
View File
@@ -148,5 +148,7 @@ typedef struct {
void configure_nfapi_vnf(char *vnf_addr, int vnf_p5_port, char *pnf_ip_addr, int pnf_p7_port, int vnf_p7_port);
void configure_nr_nfapi_vnf(eth_params_t params);
nfapi_vnf_config_t *get_config();
vnf_p7_t *get_p7_vnf();
nfapi_vnf_p7_config_t *get_p7_vnf_config();
#endif /* NFAPI_VNF_H_ */