|
libosmosim UNKNOWN
Osmocom SIM library
|
Card reader abstraction for libosmosim. More...
#include <errno.h>#include <stdint.h>#include <stdlib.h>#include <string.h>#include <stdio.h>#include <netinet/in.h>#include <osmocom/core/msgb.h>#include <osmocom/sim/sim.h>#include "config.h"#include "sim_int.h"Functions | |
| static int | get_sw (struct msgb *resp) |
| static int | transceive_apdu_t0 (struct osim_card_hdl *st, struct msgb *amsg) |
| int | osim_transceive_apdu (struct osim_chan_hdl *st, struct msgb *amsg) |
| struct osim_reader_hdl * | osim_reader_open (enum osim_reader_driver driver, int idx, const char *name, void *ctx) |
| struct osim_card_hdl * | osim_card_open (struct osim_reader_hdl *rh, enum osim_proto proto) |
| int | osim_card_reset (struct osim_card_hdl *card, bool cold_reset) |
| int | osim_card_close (struct osim_card_hdl *card) |
Card reader abstraction for libosmosim.
|
static |
References get_sw(), and msgb_apdu_le.
Referenced by get_sw(), and transceive_apdu_t0().
| int osim_card_close | ( | struct osim_card_hdl * | card | ) |
References osim_reader_hdl::card, osim_reader_ops::card_close, osim_reader_hdl::ops, osim_card_close(), and osim_card_hdl::reader.
Referenced by osim_card_close().
| struct osim_card_hdl * osim_card_open | ( | struct osim_reader_hdl * | rh, |
| enum osim_proto | proto ) |
References osim_reader_ops::card_open, osim_reader_hdl::ops, osim_card_open(), osim_card_hdl::proto, and osim_reader_hdl::proto_supported.
Referenced by osim_card_open().
| int osim_card_reset | ( | struct osim_card_hdl * | card, |
| bool | cold_reset ) |
References osim_reader_hdl::card, osim_reader_ops::card_reset, osim_reader_hdl::ops, osim_card_reset(), and osim_card_hdl::reader.
Referenced by osim_card_reset().
| struct osim_reader_hdl * osim_reader_open | ( | enum osim_reader_driver | driver, |
| int | idx, | ||
| const char * | name, | ||
| void * | ctx ) |
References osim_reader_hdl::ops, OSIM_PROTO_T0, OSIM_READER_DRV_PCSC, osim_reader_open(), pcsc_reader_ops, osim_reader_hdl::proto_supported, and osim_reader_ops::reader_open.
Referenced by osim_reader_open().
| int osim_transceive_apdu | ( | struct osim_chan_hdl * | st, |
| struct msgb * | amsg ) |
References osim_chan_hdl::card, OSIM_PROTO_T0, osim_transceive_apdu(), osim_card_hdl::proto, and transceive_apdu_t0().
Referenced by osim_transceive_apdu().
|
static |
References APDU_CASE_1, APDU_CASE_2E, APDU_CASE_2S, APDU_CASE_3E, APDU_CASE_3S, APDU_CASE_4E, APDU_CASE_4S, get_sw(), osim_apdu_cmd_hdr::ins, msgb_apdu_case, msgb_apdu_dc, msgb_apdu_de, msgb_apdu_h, msgb_apdu_lc, msgb_apdu_le, msgb_apdu_sw, osim_reader_hdl::ops, osim_apdu_cmd_hdr::p1, osim_apdu_cmd_hdr::p2, osim_apdu_cmd_hdr::p3, osim_card_hdl::reader, sw, osim_reader_ops::transceive, and transceive_apdu_t0().
Referenced by osim_transceive_apdu(), and transceive_apdu_t0().