diff options
| author | Harald Welte <laforge@gnumonks.org> | 2014-10-26 20:14:04 +0100 |
|---|---|---|
| committer | Harald Welte <laforge@gnumonks.org> | 2014-10-26 20:14:04 +0100 |
| commit | a97ebc9599d4b3210d7127a2cc75d552e69eeb9a (patch) | |
| tree | 60eee24f5b78ad5115b21cb9996406e5cbf4fd3d /src/sim/sim_int.h | |
| parent | 42645d7d78a22db7b76039407b7b43bc0cc79c54 (diff) | |
| parent | 534163badec879a644af985c9f5d04b7c957a355 (diff) | |
Merge branch 'laforge/sim'
This contains some work from 2012 about creating a general library about
the data structure of data contained on SIM cards. This 'libosmosim' is
supposed to be used by (among others)
* tools to review/modify/personalize SIM card filesystem data
* virtual SIM card implementation
Diffstat (limited to 'src/sim/sim_int.h')
| -rw-r--r-- | src/sim/sim_int.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/src/sim/sim_int.h b/src/sim/sim_int.h new file mode 100644 index 00000000..c10c5f08 --- /dev/null +++ b/src/sim/sim_int.h @@ -0,0 +1,41 @@ +#ifndef _SIM_INT_H + +#include <osmocom/sim/sim.h> + +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); + +extern const struct osim_card_sw ts102221_uicc_sw[0]; + +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 * +add_adf_with_ef(struct osim_file_desc *parent, + const uint8_t *adf_name, uint8_t adf_name_len, + const char *name, const struct osim_file_desc *in, + int num); + +struct osim_reader_ops { + const char *name; + struct osim_reader_hdl *(*reader_open)(int idx, const char *name, void *ctx); + struct osim_card_hdl *(*card_open)(struct osim_reader_hdl *rh, enum osim_proto proto); + int (*transceive)(struct osim_reader_hdl *rh, struct msgb *msg); +}; + +const struct osim_reader_ops pcsc_reader_ops; + +#endif |
