libosmosim 1.13.1.1-afb4 Osmocom SIM library

Functions | Variables
sim_int.h File Reference
`#include <osmocom/sim/sim.h>`

Go to the source code of this file.

## Functions
struct osim_decoded_element * | element_alloc (struct osim_decoded_data *dd, const char *name, enum osim_element_type type, enum osim_element_repr repr)
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)
int | default_decode (struct osim_decoded_data *dd, const struct osim_file_desc *desc, int len, uint8_t *data)
void | add_filedesc (struct osim_file_desc *root, const struct osim_file_desc *in, int num)
struct osim_file_desc * | alloc_df (void *ctx, uint16_t fid, const char *name)
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)
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)
void | osim_app_profile_register (struct osim_card_app_profile *aprof)
| Register an application profile. More...
struct osim_card_app_profile * | osim_aprof_usim (void *ctx)
struct osim_card_app_profile * | osim_aprof_isim (void *ctx)
struct osim_card_app_profile * | osim_aprof_hpsim (void *ctx)

## Variables
const struct osim_reader_ops | pcsc_reader_ops

## Function Documentation

## ◆ 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
| ) |  |

References add_filedesc(), alloc_df(), osim_file_desc::child_list, osim_file_desc::fid, osim_file_desc::list, llist_add_tail(), name, and osim_file_desc::parent.

Referenced by osim_aprof_usim(), osim_cprof_tsim(), osim_int_cprof_add_gsm(), and osim_int_cprof_add_telecom().

## ◆ add_filedesc()

void add_filedesc | ( | struct osim_file_desc * | root,
|  | const struct osim_file_desc * | in,
|  | int | num
| ) |  |

References osim_file_desc::child_list, osim_file_desc::list, and llist_add_tail().

Referenced by add_df_with_ef(), alloc_adf_with_ef(), osim_cprof_sim(), osim_cprof_tsim(), and osim_cprof_uicc().

## ◆ 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
| ) |  |

References add_filedesc(), alloc_df(), osim_file_desc::df_name, osim_file_desc::df_name_len, name, osim_file_desc::type, and TYPE_ADF.

Referenced by osim_aprof_hpsim(), osim_aprof_isim(), and osim_aprof_usim().

## ◆ alloc_df()

struct osim_file_desc * alloc_df | ( | void * | ctx,
|  | uint16_t | fid,
|  | const char * | name
| ) |  |

References osim_file_desc::child_list, osim_file_desc::fid, INIT_LLIST_HEAD, name, osim_file_desc::short_name, osim_file_desc::type, and TYPE_DF.

Referenced by add_df_with_ef(), alloc_adf_with_ef(), osim_cprof_sim(), osim_cprof_tsim(), and osim_cprof_uicc().

## ◆ default_decode()

int default_decode | ( | struct osim_decoded_data * | dd,
|  | const struct osim_file_desc * | desc,
|  | int | len,
|  | uint8_t * | data
| ) |  |

References osim_decoded_element::buf, data, ELEM_REPR_HEX, ELEM_T_BYTES, element_alloc(), len(), and osim_decoded_element::u.

## ◆ 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
| ) |  |

References __element_alloc(), osim_decoded_data::decoded_elements, osim_decoded_element::list, llist_add_tail(), osim_decoded_element::name, and osim_decoded_element::type.

Referenced by default_decode(), elp_decode(), gsm_hpplmn_decode(), gsm_imsi_decode(), gsm_kc_decode(), gsm_lp_decode(), gsm_plmnsel_decode(), and iccid_decode().

## ◆ 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
| ) |  |

References __element_alloc(), osim_decoded_element::list, llist_add(), osim_decoded_element::name, osim_decoded_element::siblings, osim_decoded_element::type, and osim_decoded_element::u.

Referenced by gsm_plmnsel_decode().

## ◆ osim_app_profile_register()

void osim_app_profile_register | ( | struct osim_card_app_profile * | aprof | ) |

Register an application profile.

Typically called at early start-up.

References osim_card_app_profile::aid, osim_card_app_profile::aid_len, osim_card_app_profile::list, llist_add_tail(), osim_card_app_profile::name, osim_app_profile_find_by_aid(), osim_app_profile_find_by_name(), and OSMO_ASSERT.

Referenced by osim_init().

## ◆ osim_aprof_hpsim()

struct osim_card_app_profile * osim_aprof_hpsim | ( | void * | ctx | ) |

References osim_card_app_profile::adf, adf_hpsim_aid, osim_card_app_profile::aid, osim_card_app_profile::aid_len, alloc_adf_with_ef(), ARRAY_SIZE, hpsim_ef_in_adf_hpsim, osim_card_app_profile::name, osim_card_app_profile::sw, and ts31_104_sw.

Referenced by osim_init().

## ◆ osim_aprof_isim()

struct osim_card_app_profile * osim_aprof_isim | ( | void * | ctx | ) |

References osim_card_app_profile::adf, adf_isim_aid, osim_card_app_profile::aid, osim_card_app_profile::aid_len, alloc_adf_with_ef(), ARRAY_SIZE, isim_ef_in_adf_isim, osim_card_app_profile::name, osim_card_app_profile::sw, and ts31_103_sw.

Referenced by osim_init().

## ◆ osim_aprof_usim()

struct osim_card_app_profile * osim_aprof_usim | ( | void * | ctx | ) |

References add_df_with_ef(), osim_card_app_profile::adf, adf_usim_aid, osim_card_app_profile::aid, osim_card_app_profile::aid_len, alloc_adf_with_ef(), ARRAY_SIZE, osim_card_app_profile::name, osim_card_app_profile::sw, ts31_102_sw, usim_ef_in_adf_usim, usim_ef_in_df_5gs, usim_ef_in_df_acdc, usim_ef_in_df_gsm_access, usim_ef_in_df_hnb, usim_ef_in_df_mexe, usim_ef_in_df_prose, usim_ef_in_df_wlan, and usim_ef_in_solsa.

Referenced by osim_init().

## Variable Documentation

## ◆ pcsc_reader_ops

const struct osim_reader_ops pcsc_reader_ops
| extern

Referenced by osim_reader_open().