VNF/PNF mode set using --vnf --pnf options

This commit is contained in:
MaheshK1995
2020-06-27 17:24:19 +05:30
parent abefe1a095
commit f17fc6dafd
3 changed files with 14 additions and 4 deletions
+12
View File
@@ -44,6 +44,7 @@
#include "../utils/LOG/log.h"
#define CONFIG_SHAREDLIBFORMAT "libparams_%s.so"
extern uint8_t nfapi_mode;
int load_config_sharedlib(configmodule_interface_t *cfgptr) {
void *lib_handle;
@@ -212,6 +213,17 @@ configmodule_interface_t *load_configmodule(int argc,
if ( (strcmp(argv[i]+1, "h") == 0) || (strstr(argv[i]+1, "help_") != NULL ) ) {
tmpflags = CONFIG_HELP;
}
if( strcmp(argv[i], "--vnf") == 0 ){
printf("\nVNF ENABLED\n");
nfapi_mode = 2;
}
if( strcmp(argv[i], "--pnf") == 0 ){
printf("\nPNF ENABLED\n");
nfapi_mode = 1;
}
}
/* look for the OAI_CONFIGMODULE environment variable */