mirror of
https://gitea.osmocom.org/sim-card/simtrace2.git
synced 2026-03-19 23:08:34 +03:00
Add simtrace2-remsim applications
This commit is contained in:
31
host/apdu_dispatch.h
Normal file
31
host/apdu_dispatch.h
Normal file
@@ -0,0 +1,31 @@
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#include <osmocom/sim/sim.h>
|
||||
|
||||
struct apdu_context {
|
||||
struct osim_apdu_cmd_hdr hdr;
|
||||
uint8_t dc[256];
|
||||
uint8_t de[256];
|
||||
uint8_t sw[2];
|
||||
uint8_t apdu_case;
|
||||
struct {
|
||||
uint8_t tot;
|
||||
uint8_t cur;
|
||||
} lc;
|
||||
struct {
|
||||
uint8_t tot;
|
||||
uint8_t cur;
|
||||
} le;
|
||||
};
|
||||
|
||||
enum apdu_action {
|
||||
APDU_ACT_TX_CAPDU_TO_CARD = 0x0001,
|
||||
APDU_ACT_RX_MORE_CAPDU_FROM_READER = 0x0002,
|
||||
};
|
||||
|
||||
|
||||
int apdu_segment_in(struct apdu_context *ac, const uint8_t *apdu_buf,
|
||||
unsigned int apdu_len, bool new_apdu);
|
||||
Reference in New Issue
Block a user