libosmosim  1.9.2
Osmocom SIM library
gsm_int.h
Go to the documentation of this file.
1 
3 #include <sys/types.h>
4 #include <osmocom/sim/sim.h>
5 
8 
10  const struct osim_file_desc *desc,
11  int len, uint8_t *data);
12 
13 int gsm_lp_decode(struct osim_decoded_data *dd,
14  const struct osim_file_desc *desc,
15  int len, uint8_t *data);
16 
17 int gsm_imsi_decode(struct osim_decoded_data *dd,
18  const struct osim_file_desc *desc,
19  int len, uint8_t *data);
osim_card_hdl::prof
struct osim_card_profile * prof
card profile
Definition: sim.h:411
osim_card_app_hdl::aid
uint8_t aid[MAX_AID_LEN]
AID of the application.
Definition: sim.h:397
UICC_FCP_T_SEC_ATTR_COMP
@ UICC_FCP_T_SEC_ATTR_COMP
Definition: sim.h:351
osim_apdu_cmd_hdr::ins
uint8_t ins
INSTRUCTION byte.
Definition: sim.h:45
osim_file_desc::short_name
const char * short_name
Short Name (like EF.ICCID)
Definition: sim.h:174
osim_element_type
osim_element_type
Definition: sim.h:95
SW_CLS_WARN
@ SW_CLS_WARN
Definition: sim.h:274
ELEM_REPR_DEC
@ ELEM_REPR_DEC
Definition: sim.h:109
osim_cla_ins_card_profile::name
const char * name
Definition: class_tables.h:28
osim_app_profile_find_by_name
const struct osim_card_app_profile * osim_app_profile_find_by_name(const char *name)
Find any registered application profile based on its name (e.g.
Definition: core.c:245
ts11_11_sw
static const struct osim_card_sw ts11_11_sw[]
Definition: card_fs_sim.c:32
element_alloc_sub
struct osim_decoded_element * element_alloc_sub(struct osim_decoded_element *ee, const char *name, enum osim_element_type type, enum osim_element_repr repr)
Definition: core.c:98
osim_int_cprof_add_gsm
int osim_int_cprof_add_gsm(struct osim_file_desc *mf)
Definition: card_fs_sim.c:417
SW_TYPE_STR
@ SW_TYPE_STR
Definition: sim.h:267
osim_cla_ins_card_profile
Definition: class_tables.h:27
osim_chan_hdl::cur_app
struct osim_card_app_hdl * cur_app
currently selected application (if any)
Definition: sim.h:434
SW_CLS_POSTP
@ SW_CLS_POSTP
Definition: sim.h:273
TYPE_ADF
@ TYPE_ADF
Application Dedicated File.
Definition: sim.h:144
osim_card_app_hdl
descriptor for a given application present on a card
Definition: sim.h:393
uicc_sim_ins_case
static const struct osim_cla_ins_case uicc_sim_ins_case[]
Definition: class_tables.c:285
EF_CYCLIC_N
#define EF_CYCLIC_N(fid, sfi, ns, flags, smin, srec, nl)
Convenience macros for defining EF.
Definition: sim.h:228
osim_aprof_hpsim
struct osim_card_app_profile * osim_aprof_hpsim(void *ctx)
Definition: card_fs_hpsim.c:55
osim_cla_ins_card_profile::cic_arr_size
unsigned int cic_arr_size
Definition: class_tables.h:31
EF_KEY_N
#define EF_KEY_N(fid, sfi, ns, flags, smin, srec, nl)
Convenience macros for defining EF.
Definition: sim.h:246
osim_decoded_element::u
union osim_decoded_element::@0 u
osim_file
A single instance of a file: Descriptor and contents.
Definition: sim.h:189
SW_CLS_ERROR
@ SW_CLS_ERROR
Definition: sim.h:275
osim_card_app_profile::name
const char * name
human-readable name
Definition: sim.h:302
alloc_df
struct osim_file_desc * alloc_df(void *ctx, uint16_t fid, const char *name)
Definition: core.c:123
UICC_FCP_T_LIFEC_STS
@ UICC_FCP_T_LIFEC_STS
Definition: sim.h:349
ELEM_T_BCD
@ ELEM_T_BCD
BCD encoded digits.
Definition: sim.h:102
osim_file_decode
struct osim_decoded_data * osim_file_decode(struct osim_file *file, int len, uint8_t *data)
Definition: core.c:33
osim_card_app_profile
A card application (e.g.
Definition: sim.h:298
osim_gsm1111_cic_profile
const struct osim_cla_ins_card_profile osim_gsm1111_cic_profile
Definition: class_tables.c:102
usim_ef_in_df_5gs
static const struct osim_file_desc usim_ef_in_df_5gs[]
Definition: card_fs_usim.c:386
osim_decoded_element::list
struct llist_head list
Definition: sim.h:115
gp_cla_ins_helper
static int gp_cla_ins_helper(const struct osim_cla_ins_case *cic, const uint8_t *hdr)
Definition: class_tables.c:176
osim_cla_ins_case::ins_tbl
const uint8_t * ins_tbl
Definition: class_tables.h:24
osim_card_app_profile::adf
struct osim_file_desc * adf
file system description
Definition: sim.h:307
osim_file_encode
struct msgb * osim_file_encode(const struct osim_file_desc *desc, const struct osim_decoded_data *data)
Definition: core.c:53
UICC_FCP_T_SEC_ATTR_EXP
@ UICC_FCP_T_SEC_ATTR_EXP
Definition: sim.h:353
osim_app_profile_register
void osim_app_profile_register(struct osim_card_app_profile *aprof)
Register an application profile.
Definition: core.c:236
sim_ef_in_tetra
static const struct osim_file_desc sim_ef_in_tetra[]
Definition: card_fs_tetra.c:119
osim_cla_ins_case
Definition: class_tables.h:20
osim_decoded_data::decoded_elements
struct llist_head decoded_elements
list of 'struct decoded_element'
Definition: sim.h:137
osim_int_cprof_add_telecom
int osim_int_cprof_add_telecom(struct osim_file_desc *mf)
Definition: card_fs_sim.c:438
osim_cla_ins_case::cla
uint8_t cla
Definition: class_tables.h:21
UICC_FCP_T_PROPRIETARY
@ UICC_FCP_T_PROPRIETARY
Definition: sim.h:352
osim_file_desc::fid
uint16_t fid
File Identifier.
Definition: sim.h:169
alloc_adf_with_ef
struct osim_file_desc * alloc_adf_with_ef(void *ctx, const uint8_t *adf_name, uint8_t adf_name_len, const char *name, const struct osim_file_desc *in, int num)
Definition: core.c:156
SFI_NONE
#define SFI_NONE
Definition: sim.h:159
uicc046_cla_ins_helper
static int uicc046_cla_ins_helper(const struct osim_cla_ins_case *cic, const uint8_t *hdr)
Definition: class_tables.c:133
osim_chan_hdl::card
struct osim_card_hdl * card
card to which this channel belongs
Definition: sim.h:430
sim_card_sws
static const struct osim_card_sw * sim_card_sws[]
Definition: card_fs_sim.c:103
osim_decoded_data
Decoded data for a single file, consisting of all decoded elements.
Definition: sim.h:133
osim_card_hdl::apps
struct llist_head apps
list of applications found on card
Definition: sim.h:419
osim_file::desc
const struct osim_file_desc * desc
Descriptor for the file.
Definition: sim.h:191
F_OPTIONAL
#define F_OPTIONAL
Definition: sim.h:157
gsm_kc_decode
static int gsm_kc_decode(struct osim_decoded_data *dd, const struct osim_file_desc *desc, int len, uint8_t *data)
Definition: card_fs_sim.c:171
usim_ef_in_df_hnb
static const struct osim_file_desc usim_ef_in_df_hnb[]
Definition: card_fs_usim.c:332
osim_decoded_element::length
unsigned int length
Definition: sim.h:121
osim_cla_ins_case::cla_mask
uint8_t cla_mask
Definition: class_tables.h:22
osim_file_desc_find_sfid
struct osim_file_desc * osim_file_desc_find_sfid(struct osim_file_desc *parent, uint8_t sfid)
Definition: core.c:215
UICC_FCP_T_FILE_SIZE
@ UICC_FCP_T_FILE_SIZE
Definition: sim.h:343
TYPE_DF
@ TYPE_DF
Dedicated File.
Definition: sim.h:143
osim_file_desc_find_name
struct osim_file_desc * osim_file_desc_find_name(struct osim_file_desc *parent, const char *name)
Definition: core.c:175
sim_ef_in_graphics
const struct osim_file_desc sim_ef_in_graphics[]
Definition: card_fs_sim.c:412
EF_TRANSP_N
#define EF_TRANSP_N(fid, sfi, ns, flags, smin, srec, nl)
Convenience macros for defining EF.
Definition: sim.h:219
iccid_decode
static int iccid_decode(struct osim_decoded_data *dd, const struct osim_file_desc *desc, int len, uint8_t *data)
Definition: card_fs_sim.c:108
osim_decoded_element::type
enum osim_element_type type
Definition: sim.h:117
cla
uint8_t cla
CLASS byte.
Definition: sim.h:2
osim_card_app_profile::sw
const struct osim_card_sw * sw
Status words defined by application.
Definition: sim.h:309
osim_apdu_cmd_hdr::p1
uint8_t p1
Parameter 1 byte.
Definition: sim.h:46
MAX_AID_LEN
#define MAX_AID_LEN
Definition: sim.h:11
usim_ef_in_adf_usim
static const struct osim_file_desc usim_ef_in_adf_usim[]
Definition: card_fs_usim.c:65
osim_aprof_isim
struct osim_card_app_profile * osim_aprof_isim(void *ctx)
Definition: card_fs_isim.c:90
osim_int_cprof_add_gsm
int osim_int_cprof_add_gsm(struct osim_file_desc *mf)
Definition: card_fs_sim.c:417
usim_ef_in_df_wlan
static const struct osim_file_desc usim_ef_in_df_wlan[]
Definition: card_fs_usim.c:308
usim_ef_in_df_gsm_access
static const struct osim_file_desc usim_ef_in_df_gsm_access[]
Definition: card_fs_usim.c:53
osim_sw_class
enum osim_card_sw_class osim_sw_class(const struct osim_chan_hdl *ch, uint16_t sw_in)
Definition: core.c:442
osim_card_app_hdl::aid_len
uint8_t aid_len
Definition: sim.h:398
osim_decoded_element::name
const char * name
Definition: sim.h:119
uicc_ins_tbl_046
static const uint8_t uicc_ins_tbl_046[256]
Definition: class_tables.c:110
__element_alloc
static struct osim_decoded_element * __element_alloc(void *ctx, const char *name, enum osim_element_type type, enum osim_element_repr repr)
Definition: core.c:63
iso7816_ins_tbl
static const uint8_t iso7816_ins_tbl[]
Definition: class_tables.c:22
ELEM_T_UINT8
@ ELEM_T_UINT8
unsigned integer
Definition: sim.h:98
uicc_ins_tbl_8ce
static const uint8_t uicc_ins_tbl_8ce[256]
Definition: class_tables.c:195
APDU_CASE_1
@ APDU_CASE_1
command header, no command data field, no response data field
Definition: sim.h:25
UICC_FCP_T_SEC_ATTR_REFEXP
@ UICC_FCP_T_SEC_ATTR_REFEXP
Definition: sim.h:350
osim_cprof_find_sw
const struct osim_card_sw * osim_cprof_find_sw(const struct osim_card_profile *cp, uint16_t sw_in)
Find status word within given card profile.
Definition: core.c:416
osim_cprof_sim
struct osim_card_profile * osim_cprof_sim(void *ctx)
Definition: card_fs_sim.c:452
osim_card_sw_class
osim_card_sw_class
Definition: sim.h:270
gsm1111_ins_case
static const struct osim_cla_ins_case gsm1111_ins_case[]
Definition: class_tables.c:94
usim_ef_in_df_acdc
static const struct osim_file_desc usim_ef_in_df_acdc[]
Definition: card_fs_usim.c:380
gsm_lp_decode
int gsm_lp_decode(struct osim_decoded_data *dd, const struct osim_file_desc *desc, int len, uint8_t *data)
Definition: card_fs_sim.c:138
sim_ef_in_solsa
static const struct osim_file_desc sim_ef_in_solsa[]
Definition: card_fs_sim.c:353
osim_apdu_cmd_hdr::p2
uint8_t p2
Parameter 2 byte.
Definition: sim.h:47
APDU_CASE_4E
@ APDU_CASE_4E
command header, command data field (extended), response data field (extended)
Definition: sim.h:31
LLIST_HEAD
static LLIST_HEAD(g_app_profiles)
osim_decoded_element::representation
enum osim_element_repr representation
Definition: sim.h:118
ts31_103_sw
const struct osim_card_sw ts31_103_sw[]
Definition: card_fs_isim.c:34
osim_decoded_element::buf
uint8_t * buf
Definition: sim.h:126
osim_print_sw
char * osim_print_sw(const struct osim_chan_hdl *ch, uint16_t sw_in)
Definition: core.c:401
gsm_lp_decode
int gsm_lp_decode(struct osim_decoded_data *dd, const struct osim_file_desc *desc, int len, uint8_t *data)
Definition: card_fs_sim.c:138
ts102221_fcp_vals
const struct value_string ts102221_fcp_vals[14]
Definition: card_fs_uicc.c:191
osim_file_desc
Definition: sim.h:161
osim_cprof_uicc
struct osim_card_profile * osim_cprof_uicc(void *ctx, bool have_df_gsm)
Definition: card_fs_uicc.c:230
osim_card_app_profile::list
struct llist_head list
entry in the global list of card application profiles
Definition: sim.h:300
ts102221_uicc_sw
const struct osim_card_sw ts102221_uicc_sw[]
Definition: card_fs_uicc.c:31
gsm_int.h
APDU_CASE_4S
@ APDU_CASE_4S
command header, command data field (short), response data field (short)
Definition: sim.h:30
osim_uicc_sim_cic_profile
const struct osim_cla_ins_card_profile osim_uicc_sim_cic_profile
Definition: class_tables.c:340
isim_ef_in_adf_isim
static const struct osim_file_desc isim_ef_in_adf_isim[]
Definition: card_fs_isim.c:46
p2
uint8_t p2
Parameter 2 byte.
Definition: sim.h:5
UICC_FCP_T_SFID
@ UICC_FCP_T_SFID
Definition: sim.h:348
iso7816_4_ins_case
static const struct osim_cla_ins_case iso7816_4_ins_case[]
Definition: class_tables.c:41
sw
uint16_t sw
status word, composed of SW1 and SW2 bytes
Definition: sim.h:5
le
uint16_t le
maximum number of bytes expected in the response data field, which will encoded in 0,...
Definition: sim.h:4
osim_file_ops::parse
int(* parse)(struct osim_decoded_data *dd, const struct osim_file_desc *desc, int len, uint8_t *data)
Parse binary file data into osim_decoded_data.
Definition: sim.h:87
adf_usim_aid
static const uint8_t adf_usim_aid[]
Definition: card_fs_usim.c:410
osim_file_desc::sfid
uint8_t sfid
Short File IDentifier.
Definition: sim.h:170
osim_card_hdl_add_app
int osim_card_hdl_add_app(struct osim_card_hdl *ch, const uint8_t *aid, uint8_t aid_len, const char *label)
Add an application to a given card.
Definition: core.c:287
gp_ins_tbl_8ce
static const uint8_t gp_ins_tbl_8ce[256]
Definition: class_tables.c:215
usim_ef_in_df_mexe
static const struct osim_file_desc usim_ef_in_df_mexe[]
Definition: card_fs_usim.c:295
osim_app_profile_find_by_aid
const struct osim_card_app_profile * osim_app_profile_find_by_aid(const uint8_t *aid, uint8_t aid_len)
Find any registered application profile based on its AID.
Definition: core.c:258
osim_card_sw::type
enum osim_card_sw_type type
Definition: sim.h:284
osim_new_apdumsg
struct msgb * osim_new_apdumsg(uint8_t cla, uint8_t ins, uint8_t p1, uint8_t p2, uint16_t lc, uint16_t le)
Generate an APDU message and initialize APDU command header.
Definition: core.c:324
APDU_CASE_2E
@ APDU_CASE_2E
command header, no command data field, response data field (extended)
Definition: sim.h:27
osim_file_desc_find_fid
struct osim_file_desc * osim_file_desc_find_fid(struct osim_file_desc *parent, uint16_t fid)
Definition: core.c:203
osim_card_profile::mf
struct osim_file_desc * mf
Descriptor for the MF (root directory.
Definition: sim.h:324
osim_cla_ins_card_profile::cic_arr
const struct osim_cla_ins_case * cic_arr
Definition: class_tables.h:30
default_decode
int default_decode(struct osim_decoded_data *dd, const struct osim_file_desc *desc, int len, uint8_t *data)
Definition: core.c:461
osim_file_desc_find_aid
struct osim_file_desc * osim_file_desc_find_aid(struct osim_file_desc *parent, const uint8_t *aid, uint8_t aid_len)
Definition: core.c:187
ELEM_T_GROUP
@ ELEM_T_GROUP
group container, has siblings
Definition: sim.h:104
add_df_with_ef
struct osim_file_desc * add_df_with_ef(struct osim_file_desc *parent, uint16_t fid, const char *name, const struct osim_file_desc *in, int num)
Definition: core.c:139
tsim_sw
static const struct osim_card_sw tsim_sw[]
Definition: card_fs_tetra.c:33
osim_file_desc::child_list
struct llist_head child_list
list of children EF in DF
Definition: sim.h:163
uicc_ins_tbl_80
static const uint8_t uicc_ins_tbl_80[256]
Definition: class_tables.c:205
SW_CLS_OK
@ SW_CLS_OK
Definition: sim.h:272
gsm_plmnsel_decode
static int gsm_plmnsel_decode(struct osim_decoded_data *dd, const struct osim_file_desc *desc, int len, uint8_t *data)
Definition: card_fs_sim.c:189
osim_file_desc::df_name_len
uint8_t df_name_len
Definition: sim.h:172
APDU_CASE_2S
@ APDU_CASE_2S
command header, no command data field, response data field (short)
Definition: sim.h:26
osim_chan_hdl
Definition: sim.h:426
osim_card_hdl
Definition: sim.h:405
UICC_FCP_T_FILE_DESC
@ UICC_FCP_T_FILE_DESC
Definition: sim.h:345
ELEM_T_STRING
@ ELEM_T_STRING
generic string
Definition: sim.h:101
osim_decoded_element
A single decoded element inside a file.
Definition: sim.h:114
gsm1111_ins_tbl
static const uint8_t gsm1111_ins_tbl[256]
Definition: class_tables.c:68
osim_card_profile
A card profile (e.g.
Definition: sim.h:321
sim_ef_in_mf
static const struct osim_file_desc sim_ef_in_mf[]
Definition: card_fs_sim.c:235
osim_decoded_data::file
const struct osim_file * file
file to which we belong
Definition: sim.h:135
osim_element_repr
osim_element_repr
Definition: sim.h:107
ins
uint8_t ins
INSTRUCTION byte.
Definition: sim.h:3
adf_isim_aid
static const uint8_t adf_isim_aid[]
Definition: card_fs_isim.c:88
osim_card_app_hdl::list
struct llist_head list
member in card list of applications
Definition: sim.h:395
osim_file_desc::ops
struct osim_file_ops ops
Operations (parse/encode.
Definition: sim.h:178
p1
uint8_t p1
Parameter 1 byte.
Definition: sim.h:4
elp_decode
static int elp_decode(struct osim_decoded_data *dd, const struct osim_file_desc *desc, int len, uint8_t *data)
Definition: card_fs_sim.c:121
lc
uint16_t lc
number of bytes in the command data field Nc, which will encoded in 0, 1 or 3 bytes into Lc,...
Definition: sim.h:3
osim_print_sw_c
char * osim_print_sw_c(const void *ctx, const struct osim_chan_hdl *ch, uint16_t sw_in)
Definition: core.c:407
sim_ef_in_gsm
static const struct osim_file_desc sim_ef_in_gsm[]
Definition: card_fs_sim.c:243
UICC_FCP_T_TOT_F_SIZE
@ UICC_FCP_T_TOT_F_SIZE
Definition: sim.h:344
osim_card_hdl_find_app
struct osim_card_app_hdl * osim_card_hdl_find_app(struct osim_card_hdl *ch, const uint8_t *aid, uint8_t aid_len)
Definition: core.c:272
ts31_102_sw
const struct osim_card_sw ts31_102_sw[]
Definition: card_fs_usim.c:32
osim_file_desc::type
enum osim_file_type type
Type of the file (EF, DF, ...)
Definition: sim.h:166
uicc_ins_case
static const struct osim_cla_ins_case uicc_ins_case[]
Definition: class_tables.c:227
osim_apdu_cmd_hdr::cla
uint8_t cla
CLASS byte.
Definition: sim.h:44
osim_decoded_element::siblings
struct llist_head siblings
A list of sibling decoded_items.
Definition: sim.h:128
osim_cla_ins_case::helper
int(* helper)(const struct osim_cla_ins_case *cic, const uint8_t *hdr)
Definition: class_tables.h:23
sim_ef_in_mexe
static const struct osim_file_desc sim_ef_in_mexe[]
Definition: card_fs_sim.c:362
hpsim_ef_in_adf_hpsim
static const struct osim_file_desc hpsim_ef_in_adf_hpsim[]
Definition: card_fs_hpsim.c:43
gsm_hpplmn_decode
int gsm_hpplmn_decode(struct osim_decoded_data *dd, const struct osim_file_desc *desc, int len, uint8_t *data)
Definition: card_fs_sim.c:222
osim_decoded_element::u16
uint16_t u16
Definition: sim.h:124
usim_ef_in_solsa
static const struct osim_file_desc usim_ef_in_solsa[]
Definition: card_fs_usim.c:286
gsm_imsi_decode
int gsm_imsi_decode(struct osim_decoded_data *dd, const struct osim_file_desc *desc, int len, uint8_t *data)
Definition: card_fs_sim.c:154
osim_app_profile_find_sw
const struct osim_card_sw * osim_app_profile_find_sw(const struct osim_card_app_profile *ap, uint16_t sw_in)
Find application-specific status word within given card application profile.
Definition: core.c:431
SW_CLS_NONE
@ SW_CLS_NONE
Definition: sim.h:271
sim.h
uicc_ef_in_mf
static const struct osim_file_desc uicc_ef_in_mf[]
Definition: card_fs_uicc.c:180
ts31_104_sw
const struct osim_card_sw ts31_104_sw[]
Definition: card_fs_hpsim.c:34
adf_hpsim_aid
static const uint8_t adf_hpsim_aid[]
Definition: card_fs_hpsim.c:53
osim_uicc_cic_profile
const struct osim_cla_ins_card_profile osim_uicc_cic_profile
Definition: class_tables.c:277
osim_int_cprof_add_telecom
int osim_int_cprof_add_telecom(struct osim_file_desc *mf)
Definition: card_fs_sim.c:438
osim_aprof_usim
struct osim_card_app_profile * osim_aprof_usim(void *ctx)
Definition: card_fs_usim.c:412
UICC_FCP_T_FILE_ID
@ UICC_FCP_T_FILE_ID
Definition: sim.h:346
osim_card_sw::class
enum osim_card_sw_class class
Definition: sim.h:285
uicc_card_sws
static const struct osim_card_sw * uicc_card_sws[]
Definition: card_fs_uicc.c:174
osim_file_desc::df_name
const uint8_t * df_name
Definition: sim.h:171
UICC_FCP_T_PIN_STS_DO
@ UICC_FCP_T_PIN_STS_DO
Definition: sim.h:354
sim_ef_in_mf
static const struct osim_file_desc sim_ef_in_mf[]
Definition: card_fs_tetra.c:107
osim_card_app_hdl::prof
const struct osim_card_app_profile * prof
application profile (if any known)
Definition: sim.h:402
osim_card_app_profile::aid
uint8_t aid[MAX_AID_LEN]
AID of this application, as used in EF.DIR.
Definition: sim.h:304
osim_init
int osim_init(void *ctx)
Definition: core.c:473
osim_card_app_profile::aid_len
uint8_t aid_len
Definition: sim.h:305
APDU_CASE_3S
@ APDU_CASE_3S
command header, command data field (short), no response data field
Definition: sim.h:28
osim_card_sw::u
union osim_card_sw::@2 u
OSIM_CARD_SW_LAST
#define OSIM_CARD_SW_LAST
Definition: sim.h:292
sim_ef_in_telecom
static const struct osim_file_desc sim_ef_in_telecom[]
Definition: card_fs_sim.c:374
ELEM_T_UINT16
@ ELEM_T_UINT16
unsigned integer
Definition: sim.h:99
usim_ef_in_df_prose
static const struct osim_file_desc usim_ef_in_df_prose[]
Definition: card_fs_usim.c:348
osim_file_desc::list
struct llist_head list
local element in list
Definition: sim.h:162
osim_print_sw_buf
char * osim_print_sw_buf(char *buf, size_t buf_len, const struct osim_chan_hdl *ch, uint16_t sw_in)
Definition: core.c:366
osim_iso7816_cic_profile
const struct osim_cla_ins_card_profile osim_iso7816_cic_profile
Definition: class_tables.c:61
osim_decoded_element::u8
uint8_t u8
Definition: sim.h:123
osim_card_sw
A card status word (SW)
Definition: sim.h:279
osim_card_app_hdl::label
char * label
application label from EF_DIR
Definition: sim.h:400
add_filedesc
void add_filedesc(struct osim_file_desc *root, const struct osim_file_desc *in, int num)
Definition: core.c:113
UICC_FCP_T_DF_NAME
@ UICC_FCP_T_DF_NAME
Definition: sim.h:347
osim_card_profile::sws
const struct osim_card_sw ** sws
Array of pointers to status words.
Definition: sim.h:326
APDU_CASE_3E
@ APDU_CASE_3E
command header, command data field (extended), no response data field
Definition: sim.h:29
msgb_apdu_case
#define msgb_apdu_case(__x)
status word from msgb->cb
Definition: sim.h:66
gsm_imsi_decode
int gsm_imsi_decode(struct osim_decoded_data *dd, const struct osim_file_desc *desc, int len, uint8_t *data)
Definition: card_fs_sim.c:154
osim_file_desc::parent
struct osim_file_desc * parent
parent DF
Definition: sim.h:164
element_alloc
struct osim_decoded_element * element_alloc(struct osim_decoded_data *dd, const char *name, enum osim_element_type type, enum osim_element_repr repr)
Definition: core.c:83
tsim_card_sws
static const struct osim_card_sw * tsim_card_sws[]
Definition: card_fs_tetra.c:101
osim_determine_apdu_case
int osim_determine_apdu_case(const struct osim_cla_ins_card_profile *prof, const uint8_t *hdr)
Definition: class_tables.c:352
UICC_FCP_T_FCP
@ UICC_FCP_T_FCP
Definition: sim.h:342
gsm_hpplmn_decode
int gsm_hpplmn_decode(struct osim_decoded_data *dd, const struct osim_file_desc *desc, int len, uint8_t *data)
Definition: card_fs_sim.c:222
EF_TRANSP
#define EF_TRANSP(fid, sfi, ns, flags, smin, srec, nl, dec, enc)
Convenience macros for defining EF.
Definition: sim.h:215
osim_apdu_cmd_hdr
APDU/TPDU command header.
Definition: sim.h:43
osim_file_ops::encode
struct msgb *(* encode)(const struct osim_file_desc *desc, const struct osim_decoded_data *decoded)
Encode osim_decoded_data into binary file.
Definition: sim.h:91
ELEM_REPR_HEX
@ ELEM_REPR_HEX
Definition: sim.h:110
usim_ins_case
const uint8_t usim_ins_case[256]
Definition: class_tables.c:348
msgb_apdu_le
#define msgb_apdu_le(__x)
Definition: sim.h:68
msgb_apdu_lc
#define msgb_apdu_lc(__x)
Definition: sim.h:67
osim_cprof_tsim
struct osim_card_profile * osim_cprof_tsim(void *ctx)
Definition: card_fs_tetra.c:241
osim_card_sw::str
const char * str
Human-readable meaning of SW.
Definition: sim.h:288
sim_int.h
ts102221_fcp_tlv_def
const struct tlv_definition ts102221_fcp_tlv_def
Definition: card_fs_uicc.c:209
osim_card_profile::name
const char * name
Definition: sim.h:322
EF_LIN_FIX_N
#define EF_LIN_FIX_N(fid, sfi, ns, flags, smin, srec, nl)
Convenience macros for defining EF.
Definition: sim.h:237
__attribute__
static const uint8_t __attribute__((__unused__))
Definition: card_fs_uicc.c:228
class_tables.h
ELEM_T_BYTES
@ ELEM_T_BYTES
BCD encoded digits.
Definition: sim.h:103
ELEM_REPR_NONE
@ ELEM_REPR_NONE
Definition: sim.h:108