Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangjie
OpenXG-RAN
Commits
af402766
Commit
af402766
authored
Aug 24, 2016
by
Frédéric Leroy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(conf2uedata): add a selector for writing files
parent
6c588589
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
6 deletions
+20
-6
openair3/NAS/TOOLS/conf2uedata.c
openair3/NAS/TOOLS/conf2uedata.c
+1
-1
openair3/NAS/TOOLS/conf_parser.c
openair3/NAS/TOOLS/conf_parser.c
+13
-4
openair3/NAS/TOOLS/conf_parser.h
openair3/NAS/TOOLS/conf_parser.h
+6
-1
No files found.
openair3/NAS/TOOLS/conf2uedata.c
View file @
af402766
...
@@ -42,7 +42,7 @@ int main(int argc, char**argv) {
...
@@ -42,7 +42,7 @@ int main(int argc, char**argv) {
exit
(
1
);
exit
(
1
);
}
}
if
(
parse_config_file
(
output_dir
,
conf_file
)
==
false
)
{
if
(
parse_config_file
(
output_dir
,
conf_file
,
OUTPUT_ALL
)
==
false
)
{
exit
(
1
);
exit
(
1
);
}
}
...
...
openair3/NAS/TOOLS/conf_parser.c
View file @
af402766
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
#include "conf_user_data.h"
#include "conf_user_data.h"
#include "conf_user_plmn.h"
#include "conf_user_plmn.h"
bool
parse_config_file
(
const
char
*
output_dir
,
const
char
*
conf_filename
)
{
bool
parse_config_file
(
const
char
*
output_dir
,
const
char
*
conf_filename
,
int
output_flags
)
{
int
rc
=
true
;
int
rc
=
true
;
int
ret
;
int
ret
;
int
ue_nb
=
0
;
int
ue_nb
=
0
;
...
@@ -65,7 +65,6 @@ bool parse_config_file(const char *output_dir, const char *conf_filename) {
...
@@ -65,7 +65,6 @@ bool parse_config_file(const char *output_dir, const char *conf_filename) {
return
false
;
return
false
;
}
}
gen_user_data
(
&
user_data_conf
,
&
user_data
);
gen_user_data
(
&
user_data_conf
,
&
user_data
);
write_user_data
(
output_dir
,
i
,
&
user_data
);
rc
=
parse_ue_sim_param
(
ue_setting
,
i
,
&
usim_data_conf
);
rc
=
parse_ue_sim_param
(
ue_setting
,
i
,
&
usim_data_conf
);
if
(
rc
!=
true
)
{
if
(
rc
!=
true
)
{
...
@@ -73,11 +72,21 @@ bool parse_config_file(const char *output_dir, const char *conf_filename) {
...
@@ -73,11 +72,21 @@ bool parse_config_file(const char *output_dir, const char *conf_filename) {
return
false
;
return
false
;
}
}
gen_usim_data
(
&
usim_data_conf
,
&
usim_data
,
&
user_plmns
,
networks
);
gen_usim_data
(
&
usim_data_conf
,
&
usim_data
,
&
user_plmns
,
networks
);
write_usim_data
(
output_dir
,
i
,
&
usim_data
);
gen_emm_data
(
&
emm_data
,
usim_data_conf
.
hplmn
,
usim_data_conf
.
msin
,
gen_emm_data
(
&
emm_data
,
usim_data_conf
.
hplmn
,
usim_data_conf
.
msin
,
user_plmns
.
equivalents_home
.
size
,
networks
);
user_plmns
.
equivalents_home
.
size
,
networks
);
write_emm_data
(
output_dir
,
i
,
&
emm_data
);
if
(
output_flags
&
OUTPUT_UEDATA
)
{
write_user_data
(
output_dir
,
i
,
&
user_data
);
}
if
(
output_flags
&
OUTPUT_USIM
)
{
write_usim_data
(
output_dir
,
i
,
&
usim_data
);
}
if
(
output_flags
&
OUTPUT_EMM
)
{
write_emm_data
(
output_dir
,
i
,
&
emm_data
);
}
user_plmns_free
(
&
user_plmns
);
user_plmns_free
(
&
user_plmns
);
...
...
openair3/NAS/TOOLS/conf_parser.h
View file @
af402766
...
@@ -6,7 +6,12 @@
...
@@ -6,7 +6,12 @@
#define UE "UE"
#define UE "UE"
#define OUTPUT_EMM 1
#define OUTPUT_USIM 2
#define OUTPUT_UEDATA 4
#define OUTPUT_ALL 7
bool
get_config_from_file
(
const
char
*
filename
,
config_t
*
config
);
bool
get_config_from_file
(
const
char
*
filename
,
config_t
*
config
);
bool
parse_config_file
(
const
char
*
output_dir
,
const
char
*
filename
);
bool
parse_config_file
(
const
char
*
output_dir
,
const
char
*
filename
,
int
output_flags
);
#endif
#endif
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment