From d54c2ee8c51b41b7f7a5a469efd6bb391a0c2b75 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Tue, 17 Jan 2012 18:25:50 +0100 Subject: initial checkin of 'libosmosim' --- src/sim/sim_int.h | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 src/sim/sim_int.h (limited to 'src/sim/sim_int.h') diff --git a/src/sim/sim_int.h b/src/sim/sim_int.h new file mode 100644 index 00000000..411c3225 --- /dev/null +++ b/src/sim/sim_int.h @@ -0,0 +1,38 @@ +#ifndef _SIM_INT_H + +#include + +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]; + + +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); + struct osim_card_hdl *(*card_open)(struct osim_reader_hdl *rh); + int (*transceive)(struct osim_reader_hdl *rh, struct msgb *msg); +}; + +const struct osim_reader_ops pcsc_reader_ops; + +#endif -- cgit v1.2.3 From d83d29610a7c63a387fee77dbc2b18b19dc83b14 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Mon, 4 Mar 2013 17:52:33 +0000 Subject: sim: further updates/fixes --- src/sim/sim_int.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/sim/sim_int.h') diff --git a/src/sim/sim_int.h b/src/sim/sim_int.h index 411c3225..73f144ca 100644 --- a/src/sim/sim_int.h +++ b/src/sim/sim_int.h @@ -28,7 +28,7 @@ add_adf_with_ef(struct osim_file_desc *parent, struct osim_reader_ops { const char *name; - struct osim_reader_hdl *(*reader_open)(int idx, 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); int (*transceive)(struct osim_reader_hdl *rh, struct msgb *msg); }; -- cgit v1.2.3 From 30115dbd72e121b6b5c29a8224419cc554024b95 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Sun, 4 May 2014 16:30:46 +0200 Subject: sim: Only one default_decode() function for all card types --- src/sim/sim_int.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/sim/sim_int.h') diff --git a/src/sim/sim_int.h b/src/sim/sim_int.h index 73f144ca..0a3772bc 100644 --- a/src/sim/sim_int.h +++ b/src/sim/sim_int.h @@ -12,6 +12,9 @@ element_alloc_sub(struct osim_decoded_element *ee, const char *name, 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); -- cgit v1.2.3 From 55790aa09a8f92d437ea06b3ef2c74465612fa8b Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Sun, 26 Oct 2014 18:46:50 +0100 Subject: sim: Prepare infrastructure for protocols != T=0 and other drivers --- src/sim/sim_int.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/sim/sim_int.h') diff --git a/src/sim/sim_int.h b/src/sim/sim_int.h index 0a3772bc..c10c5f08 100644 --- a/src/sim/sim_int.h +++ b/src/sim/sim_int.h @@ -32,7 +32,7 @@ add_adf_with_ef(struct osim_file_desc *parent, 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); + 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); }; -- cgit v1.2.3