diff options
author | Vadim Yanitskiy <axilirator@gmail.com> | 2018-10-04 03:29:43 +0700 |
---|---|---|
committer | Vadim Yanitskiy <axilirator@gmail.com> | 2018-10-27 05:49:45 +0700 |
commit | f8edc4550671dcf0339091f5218e8275be0d2502 (patch) | |
tree | 106507a1d14140040cc10707d6658bd5f7e8dde7 /src/host/layer23/include/osmocom/bb | |
parent | d464fe5388819f3c432797e229740277da478d7d (diff) |
layer23/common: move SIM APDU caching from l1ctl.c
L1CTL implementation (i.e. l1ctl.c) is not a good place for the
SIM specific stuff. Let's move it to the proper place (i.e. sim.c).
As a bonus, this change fixes a possible problem of loosing the
cached APDUs if two or more L2&3 applications are using a single
LAPDm connection. The APDU buffer is dedicated per MS now.
Change-Id: I564c610e45aa3b630ca5d1ec6bc1cace0dc9c566
Diffstat (limited to 'src/host/layer23/include/osmocom/bb')
-rw-r--r-- | src/host/layer23/include/osmocom/bb/common/sim.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/host/layer23/include/osmocom/bb/common/sim.h b/src/host/layer23/include/osmocom/bb/common/sim.h index 95d2147c..8b1f830c 100644 --- a/src/host/layer23/include/osmocom/bb/common/sim.h +++ b/src/host/layer23/include/osmocom/bb/common/sim.h @@ -176,6 +176,10 @@ struct gsm_sim { uint8_t reset; uint8_t chv1_remain, chv2_remain; uint8_t unblk1_remain, unblk2_remain; + + /* APDU cache (used by GSMTAP) */ + uint8_t apdu_data[256 + 7]; + uint16_t apdu_len; }; struct sim_hdr { |