Commit ef2dee59 authored by Frédéric Leroy's avatar Frédéric Leroy

refactor(conf2uedata): separate processing and writing of data

parent 8461a56a
This diff is collapsed.
......@@ -2,7 +2,10 @@
#define _CONF2UEDATA_H
#include <libconfig.h>
#include "emmData.h"
#include "usim_api.h"
#include "userDef.h"
#define USER "USER"
#define UE "UE"
......@@ -70,8 +73,6 @@ typedef struct {
const char *mcc;
} plmn_conf_param_t;
extern const char* output_dir;
extern const char *msin;
extern const char *usim_api_k;
extern const char *msisdn;
......@@ -96,16 +97,21 @@ extern plmn_conf_param_t* user_plmn_list;
extern network_record_t* user_network_record_list;
int get_config_from_file(const char *filename, config_t *config);
int parse_config_file(const char *filename);
int parse_config_file(const char *output_dir, const char *filename);
void _display_usage(void);
void gen_emm_data(int user_id) ;
void gen_usim_data(int user_id);
void gen_emm_data(int user_id, emm_nvdata_t *emm_data);
void fill_network_record_list(void);
int parse_ue_user_param(config_setting_t *ue_setting, int user_id, user_nvdata_t *user_data);
void write_user_data(const char *directory, int user_id, user_nvdata_t *data);
int write_emm_data(const char *directory, int user_id, emm_nvdata_t *emm_data);
int write_usim_data(const char *directory, int user_id, usim_data_t *usim_data);
void gen_usim_data(usim_data_t *usim_data);
int _luhn(const char* cc);
int parse_ue_user_param(config_setting_t *ue_setting, int user_id);
int parse_ue_sim_param(config_setting_t *ue_setting, int user_id);
int parse_plmn_param(config_setting_t *plmn_setting, int index);
int parse_plmns(config_setting_t *all_plmn_setting);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment