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
常顺宇
OpenXG-RAN
Commits
7fe8d45d
Commit
7fe8d45d
authored
Aug 17, 2016
by
Frédéric Leroy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor(conf2uedata): move usim_data funcions in conf_usim.[c|h]
parent
f03e2dbc
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
371 additions
and
352 deletions
+371
-352
cmake_targets/nas_sim_tools/CMakeLists.txt
cmake_targets/nas_sim_tools/CMakeLists.txt
+1
-0
openair3/NAS/TOOLS/conf2uedata.c
openair3/NAS/TOOLS/conf2uedata.c
+20
-311
openair3/NAS/TOOLS/conf2uedata.h
openair3/NAS/TOOLS/conf2uedata.h
+2
-39
openair3/NAS/TOOLS/conf_emm.c
openair3/NAS/TOOLS/conf_emm.c
+1
-1
openair3/NAS/TOOLS/conf_emm.h
openair3/NAS/TOOLS/conf_emm.h
+1
-1
openair3/NAS/TOOLS/conf_usim.c
openair3/NAS/TOOLS/conf_usim.c
+301
-0
openair3/NAS/TOOLS/conf_usim.h
openair3/NAS/TOOLS/conf_usim.h
+45
-0
No files found.
cmake_targets/nas_sim_tools/CMakeLists.txt
View file @
7fe8d45d
...
...
@@ -19,6 +19,7 @@ set(conf2uedata_SRC
${
OPENAIR_DIR
}
/openair3/NAS/TOOLS/conf2uedata.c
${
OPENAIR_DIR
}
/openair3/NAS/TOOLS/conf_emm.c
${
OPENAIR_DIR
}
/openair3/NAS/TOOLS/conf_user_data.c
${
OPENAIR_DIR
}
/openair3/NAS/TOOLS/conf_usim.c
${
OPENAIR_DIR
}
/openair3/NAS/TOOLS/fs.c
${
OPENAIR_DIR
}
/openair3/NAS/TOOLS/display.c
${
OPENAIR_DIR
}
/openair3/NAS/UE/API/USIM/usim_api.c
...
...
openair3/NAS/TOOLS/conf2uedata.c
View file @
7fe8d45d
This diff is collapsed.
Click to expand it.
openair3/NAS/TOOLS/conf2uedata.h
View file @
7fe8d45d
...
...
@@ -6,7 +6,7 @@
#include "usim_api.h"
#define UE "UE"
#define SIM "SIM"
#define PLMN "PLMN"
#define FULLNAME "FULLNAME"
...
...
@@ -14,16 +14,6 @@
#define MNC "MNC"
#define MCC "MCC"
#define MSIN "MSIN"
#define USIM_API_K "USIM_API_K"
#define OPC "OPC"
#define MSISDN "MSISDN"
#define UE_IMEI "IMEI"
#define MANUFACTURER "MANUFACTURER"
#define MODEL "MODEL"
#define PINCODE "PIN"
#define HPLMN "HPLMN"
#define UCPLMN "UCPLMN_LIST"
#define OPLMN "OPLMN_LIST"
...
...
@@ -31,26 +21,9 @@
#define FPLMN "FPLMN_LIST"
#define EHPLMN "EHPLMN_LIST"
#define KSI USIM_KSI_NOT_AVAILABLE
#define KSI_ASME USIM_KSI_NOT_AVAILABLE
#define INT_ALGO USIM_INT_EIA1
#define ENC_ALGO USIM_ENC_EEA0
#define SECURITY_ALGORITHMS (ENC_ALGO | INT_ALGO)
#define OPC_SIZE 16
#define MIN_TAC 0x0000
#define MAX_TAC 0xFFFE
#define DEFAULT_TMSI 0x0000000D
#define DEFAULT_P_TMSI 0x0000000D
#define DEFAULT_M_TMSI 0x0000000D
#define DEFAULT_LAC 0xFFFE
#define DEFAULT_RAC 0x01
#define DEFAULT_TAC 0x0001
#define DEFAULT_MME_ID 0x0102
#define DEFAULT_MME_CODE 0x0F
/*
* PLMN network operator record
*/
...
...
@@ -70,12 +43,6 @@ typedef struct {
const
char
*
mcc
;
}
plmn_conf_param_t
;
extern
const
char
*
msin
;
extern
const
char
*
usim_api_k
;
extern
const
char
*
msisdn
;
extern
const
char
*
opc
;
extern
const
char
*
hplmn
;
extern
int
*
ucplmn
;
extern
int
*
oplmn
;
extern
int
*
ocplmn
;
...
...
@@ -99,14 +66,10 @@ int parse_config_file(const char *output_dir, const char *filename);
void
_display_usage
(
void
);
void
fill_network_record_list
(
void
);
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
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
);
int
get_plmn_index
(
const
char
*
mccmnc
);
int
parse_ue_plmn_param
(
config_setting_t
*
ue_setting
,
int
user_id
);
int
parse_ue_plmn_param
(
config_setting_t
*
ue_setting
,
int
user_id
,
const
char
**
hplmn
);
int
fill_ucplmn
(
config_setting_t
*
setting
,
int
use_id
);
int
fill_oplmn
(
config_setting_t
*
setting
,
int
use_id
);
int
fill_ocplmn
(
config_setting_t
*
setting
,
int
use_id
);
...
...
openair3/NAS/TOOLS/conf_emm.c
View file @
7fe8d45d
...
...
@@ -5,7 +5,7 @@
#include "conf_emm.h"
#include "fs.h"
void
gen_emm_data
(
emm_nvdata_t
*
emm_data
)
{
void
gen_emm_data
(
emm_nvdata_t
*
emm_data
,
const
char
*
hplmn
,
const
char
*
msin
)
{
hplmn_index
=
get_plmn_index
(
hplmn
);
memset
(
emm_data
,
0
,
sizeof
(
emm_nvdata_t
));
int
hplmn_index
=
get_plmn_index
(
hplmn
);
...
...
openair3/NAS/TOOLS/conf_emm.h
View file @
7fe8d45d
...
...
@@ -3,7 +3,7 @@
#include "emmData.h"
void
gen_emm_data
(
emm_nvdata_t
*
emm_data
);
void
gen_emm_data
(
emm_nvdata_t
*
emm_data
,
const
char
*
hplmn
,
const
char
*
msin
);
int
write_emm_data
(
const
char
*
directory
,
int
user_id
,
emm_nvdata_t
*
emm_data
);
int
get_msin_parity
(
const
char
*
msin
);
...
...
openair3/NAS/TOOLS/conf_usim.c
0 → 100644
View file @
7fe8d45d
This diff is collapsed.
Click to expand it.
openair3/NAS/TOOLS/conf_usim.h
0 → 100644
View file @
7fe8d45d
#ifndef _CONF_USIM_H
#define _CONF_USIM_H
#include <libconfig.h>
#include "usim_api.h"
#define SIM "SIM"
#define MSIN "MSIN"
#define USIM_API_K "USIM_API_K"
#define OPC "OPC"
#define MSISDN "MSISDN"
#define KSI USIM_KSI_NOT_AVAILABLE
#define KSI_ASME USIM_KSI_NOT_AVAILABLE
#define OPC_SIZE 16
#define DEFAULT_TMSI 0x0000000D
#define DEFAULT_P_TMSI 0x0000000D
#define DEFAULT_M_TMSI 0x0000000D
#define DEFAULT_RAC 0x01
#define DEFAULT_TAC 0x0001
#define DEFAULT_LAC 0xFFFE
#define DEFAULT_MME_ID 0x0102
#define DEFAULT_MME_CODE 0x0F
#define INT_ALGO USIM_INT_EIA1
#define ENC_ALGO USIM_ENC_EEA0
#define SECURITY_ALGORITHMS (ENC_ALGO | INT_ALGO)
typedef
struct
{
const
char
*
msin
;
const
char
*
usim_api_k
;
const
char
*
msisdn
;
const
char
*
opc
;
const
char
*
hplmn
;
}
usim_data_conf_t
;
int
parse_ue_sim_param
(
config_setting_t
*
ue_setting
,
int
user_id
,
usim_data_conf_t
*
u
);
int
write_usim_data
(
const
char
*
directory
,
int
user_id
,
usim_data_t
*
usim_data
);
void
gen_usim_data
(
usim_data_conf_t
*
u
,
usim_data_t
*
usim_data
);
#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