diff options
author | Harald Welte <laforge@osmocom.org> | 2020-03-22 10:30:10 +0100 |
---|---|---|
committer | laforge <laforge@osmocom.org> | 2020-05-05 19:41:12 +0000 |
commit | 3a6bedf1e5f8ef32243e86fa753c6433a22b936d (patch) | |
tree | f3513008790744f016d50454f10f9c566f0d3c0e /include/osmocom/sim/sim.h | |
parent | c9eab828ea4a9f508a013cf5cc1e0384a0e62e4c (diff) |
sim: When decoding SW, take application specific SW into account
So far we only looked at SW definitions of the card profile. However,
if we have a currently selected application, we also must check
that application for SW definitions.
This breaks ABI and API all over the place, but as there are no
known users beyond osmo-sim-test, this is acceptable.
Change-Id: I3a1d60898529c173f73587e34c155660ba5f5fb1
Diffstat (limited to 'include/osmocom/sim/sim.h')
-rw-r--r-- | include/osmocom/sim/sim.h | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/include/osmocom/sim/sim.h b/include/osmocom/sim/sim.h index 33ebdd75..bfd1ac94 100644 --- a/include/osmocom/sim/sim.h +++ b/include/osmocom/sim/sim.h @@ -309,6 +309,7 @@ osim_app_profile_find_by_name(const char *name); const struct osim_card_app_profile * osim_app_profile_find_by_aid(const uint8_t *aid, uint8_t aid_len); +const struct osim_card_sw *osim_app_profile_find_sw(const struct osim_card_app_profile *ap, uint16_t sw_in); /*! A card profile (e.g. SIM card */ struct osim_card_profile { @@ -319,15 +320,13 @@ struct osim_card_profile { const struct osim_card_sw **sws; }; -const struct osim_card_sw *osim_find_sw(const struct osim_card_profile *cp, - uint16_t sw); -enum osim_card_sw_class osim_sw_class(const struct osim_card_profile *cp, - uint16_t sw_in); +const struct osim_card_sw *osim_cprof_find_sw(const struct osim_card_profile *cp, uint16_t sw_in); -struct osim_card_hdl; -char *osim_print_sw_buf(char *buf, size_t buf_len, const struct osim_card_hdl *ch, uint16_t sw_in); -char *osim_print_sw(const struct osim_card_hdl *ch, uint16_t sw_in); -char *osim_print_sw_c(const void *ctx, const struct osim_card_hdl *ch, uint16_t sw_in); +struct osim_chan_hdl; +enum osim_card_sw_class osim_sw_class(const struct osim_chan_hdl *ch, uint16_t sw_in); +char *osim_print_sw_buf(char *buf, size_t buf_len, const struct osim_chan_hdl *ch, uint16_t sw_in); +char *osim_print_sw(const struct osim_chan_hdl *ch, uint16_t sw_in); +char *osim_print_sw_c(const void *ctx, const struct osim_chan_hdl *ch, uint16_t sw_in); extern const struct tlv_definition ts102221_fcp_tlv_def; extern const struct value_string ts102221_fcp_vals[14]; |