libosmosim 1.9.0.209-e0c63
Osmocom SIM library
reader.c File Reference

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_hdlosim_reader_open (enum osim_reader_driver driver, int idx, const char *name, void *ctx)
 
struct osim_card_hdlosim_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)
 

Detailed Description

Card reader abstraction for libosmosim.

Function Documentation

◆ get_sw()

static int get_sw ( struct msgb resp)
static

References msgb::l2h, msgb_apdu_le, and msgb_get_u16().

Referenced by transceive_apdu_t0().

◆ osim_card_close()

◆ osim_card_open()

◆ osim_card_reset()

int osim_card_reset ( struct osim_card_hdl card,
bool  cold_reset 
)

◆ osim_reader_open()

struct osim_reader_hdl * osim_reader_open ( enum osim_reader_driver  driver,
int  idx,
const char *  name,
void *  ctx 
)

◆ osim_transceive_apdu()

int osim_transceive_apdu ( struct osim_chan_hdl st,
struct msgb amsg 
)

◆ transceive_apdu_t0()