libosmosim 1.9.0.209-e0c63
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 msgb::l2h, msgb_apdu_le, and msgb_get_u16().
Referenced by transceive_apdu_t0().
int osim_card_close | ( | struct osim_card_hdl * | card | ) |
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 | ||
) |
struct osim_reader_hdl * osim_reader_open | ( | enum osim_reader_driver | driver, |
int | idx, | ||
const char * | name, | ||
void * | ctx | ||
) |
int osim_transceive_apdu | ( | struct osim_chan_hdl * | st, |
struct msgb * | amsg | ||
) |
References osim_chan_hdl::card, OSIM_PROTO_T0, osim_card_hdl::proto, and transceive_apdu_t0().
|
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::l3h, msgb_alloc(), msgb_apdu_case, msgb_apdu_dc, msgb_apdu_de, msgb_apdu_h, msgb_apdu_lc, msgb_apdu_le, msgb_apdu_sw, msgb_free(), msgb_get(), msgb_l3len(), msgb_length(), msgb_put(), msgb_put_u16(), osim_reader_hdl::ops, OSMO_MIN, osim_apdu_cmd_hdr::p1, osim_apdu_cmd_hdr::p2, osim_apdu_cmd_hdr::p3, osim_card_hdl::reader, sw, msgb::tail, and osim_reader_ops::transceive.
Referenced by osim_transceive_apdu().