Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG UE
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
Michael Black
OpenXG UE
Commits
fc125a75
Commit
fc125a75
authored
Aug 26, 2016
by
Frédéric Leroy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(conf2uedata): add a selector for displaying files
parent
5c0e9d13
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
50 additions
and
23 deletions
+50
-23
openair3/NAS/TOOLS/conf2uedata.c
openair3/NAS/TOOLS/conf2uedata.c
+2
-2
openair3/NAS/TOOLS/display.c
openair3/NAS/TOOLS/display.c
+40
-20
openair3/NAS/TOOLS/display.h
openair3/NAS/TOOLS/display.h
+8
-1
No files found.
openair3/NAS/TOOLS/conf2uedata.c
View file @
fc125a75
...
...
@@ -46,7 +46,7 @@ int main(int argc, char**argv) {
exit
(
1
);
}
display_data_from_directory
(
output_dir
);
display_data_from_directory
(
output_dir
,
DISPLAY_ALL
);
exit
(
0
);
}
...
...
@@ -55,7 +55,7 @@ int main(int argc, char**argv) {
* Displays command line usage
*/
void
_display_usage
(
void
)
{
fprintf
(
stderr
,
"usage: conf2uedata [OPTION]
[directory]
...
\n
"
);
fprintf
(
stderr
,
"usage: conf2uedata [OPTION]...
\n
"
);
fprintf
(
stderr
,
"
\t
[-c]
\t
Config file to use
\n
"
);
fprintf
(
stderr
,
"
\t
[-o]
\t
output file directory
\n
"
);
fprintf
(
stderr
,
"
\t
[-h]
\t
Display this usage
\n
"
);
...
...
openair3/NAS/TOOLS/display.c
View file @
fc125a75
...
...
@@ -28,29 +28,49 @@
PRINT_PLMN_DIGIT((plmn).MNCdigit2); \
PRINT_PLMN_DIGIT((plmn).MNCdigit3)
void
display_data_from_directory
(
const
char
*
directory
)
{
// return number of files displayed
int
display_data_from_directory
(
const
char
*
directory
,
int
flags
)
{
int
user_id
=
0
;
char
*
filename
;
bool
found
=
true
;
int
displayed_count
=
0
;
filename
=
get_ue_filename
(
directory
,
user_id
);
while
(
file_exist_and_is_readable
(
filename
)
)
{
while
(
found
)
{
found
=
false
;
if
(
flags
&
DISPLAY_UEDATA
)
{
filename
=
get_ue_filename
(
directory
,
user_id
);
if
(
file_exist_and_is_readable
(
filename
)
)
{
display_ue_data
(
filename
);
displayed_count
+=
1
;
found
=
true
;
}
free
(
filename
);
}
if
(
flags
&
DISPLAY_EMM
)
{
filename
=
get_emm_filename
(
directory
,
user_id
);
if
(
file_exist_and_is_readable
(
filename
)
)
{
display_emm_data
(
filename
);
displayed_count
+=
1
;
found
=
true
;
}
free
(
filename
);
}
if
(
flags
&
DISPLAY_USIM
)
{
filename
=
get_usim_filename
(
directory
,
user_id
);
if
(
file_exist_and_is_readable
(
filename
)
)
{
display_usim_data
(
filename
);
displayed_count
+=
1
;
found
=
true
;
}
free
(
filename
);
}
user_id
+=
1
;
filename
=
get_ue_filename
(
directory
,
user_id
);
}
free
(
filename
)
;
return
displayed_count
;
}
void
display_ue_data
(
const
char
*
filename
)
{
...
...
openair3/NAS/TOOLS/display.h
View file @
fc125a75
#ifndef _DISPLAY_H
#define _DISPLAY_H
void
display_data_from_directory
(
const
char
*
directory
);
#define DISPLAY_EMM 1
#define DISPLAY_USIM 2
#define DISPLAY_UEDATA 4
#define DISPLAY_ALL 7
// return number of files displayed
int
display_data_from_directory
(
const
char
*
directory
,
int
flags
);
void
display_ue_data
(
const
char
*
filename
);
void
display_emm_data
(
const
char
*
filename
);
void
display_usim_data
(
const
char
*
filename
);
...
...
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