diff --git a/src/sim/card_fs_isim.c b/src/sim/card_fs_isim.c index d8699e89e..339e86277 100644 --- a/src/sim/card_fs_isim.c +++ b/src/sim/card_fs_isim.c @@ -46,17 +46,6 @@ static const struct osim_card_sw *isim_card_sws[] = { NULL }; -static int default_decode(struct osim_decoded_data *dd, - const struct osim_file_desc *desc, - int len, uint8_t *data) -{ - struct osim_decoded_element *elem; - - elem = element_alloc(dd, "Unknown Payload", ELEM_T_BYTES, ELEM_REPR_HEX); - elem->u.buf = talloc_memdup(elem, data, len); - - return 0; -} /* TS 31.103 Version 11.2.0 Release 11 / Chapoter 4.2 */ static const struct osim_file_desc isim_ef_in_adf_isim[] = { EF_TRANSP_N(0x6F02, 0x02, "EF.IMPI", 0, 1, 256, diff --git a/src/sim/card_fs_sim.c b/src/sim/card_fs_sim.c index ee8dd749e..e1244242c 100644 --- a/src/sim/card_fs_sim.c +++ b/src/sim/card_fs_sim.c @@ -135,19 +135,6 @@ static int elp_decode(struct osim_decoded_data *dd, return 0; } -static int default_decode(struct osim_decoded_data *dd, - const struct osim_file_desc *desc, - int len, uint8_t *data) -{ - struct osim_decoded_element *elem; - - elem = element_alloc(dd, "Unknown Payload", ELEM_T_BYTES, ELEM_REPR_HEX); - elem->u.buf = talloc_memdup(elem, data, len); - - return 0; -} - - /* 10.3.1 */ int gsm_lp_decode(struct osim_decoded_data *dd, const struct osim_file_desc *desc, diff --git a/src/sim/card_fs_usim.c b/src/sim/card_fs_usim.c index e16ad7bf4..02002cd2a 100644 --- a/src/sim/card_fs_usim.c +++ b/src/sim/card_fs_usim.c @@ -52,19 +52,6 @@ static const struct osim_card_sw *usim_card_sws[] = { NULL }; - -static int default_decode(struct osim_decoded_data *dd, - const struct osim_file_desc *desc, - int len, uint8_t *data) -{ - struct osim_decoded_element *elem; - - elem = element_alloc(dd, "Unknown Payload", ELEM_T_BYTES, ELEM_REPR_HEX); - elem->u.buf = talloc_memdup(elem, data, len); - - return 0; -} - /* TS 102 221 Chapter 13.1 */ static const struct osim_file_desc uicc_ef_in_mf[] = { EF_LIN_FIX_N(0x2f00, SFI_NONE, "EF.DIR", 0, 1, 32, diff --git a/src/sim/core.c b/src/sim/core.c index d1d4de731..dba378b6a 100644 --- a/src/sim/core.c +++ b/src/sim/core.c @@ -290,3 +290,15 @@ enum osim_card_sw_class osim_sw_class(const struct osim_card_profile *cp, return csw->class; } + +int default_decode(struct osim_decoded_data *dd, + const struct osim_file_desc *desc, + int len, uint8_t *data) +{ + struct osim_decoded_element *elem; + + elem = element_alloc(dd, "Unknown Payload", ELEM_T_BYTES, ELEM_REPR_HEX); + elem->u.buf = talloc_memdup(elem, data, len); + + return 0; +} diff --git a/src/sim/sim_int.h b/src/sim/sim_int.h index 73f144ca7..0a3772bc2 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);