summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Redon <kevredon@mail.tsaitgaist.info>2012-09-11 11:59:21 +0200
committerHarald Welte <laforge@gnumonks.org>2014-10-26 19:09:23 +0100
commitdede831fcd5ccc67ad4d0e05aaa9688c119a5b93 (patch)
tree87be93e1149af8c66bb7fdb59f493749dfcff78a
parent1707306da59a53c8ce72952fc5e41b999e36b73c (diff)
sim: add comment/explaination for structure osim_msgb_cb
-rw-r--r--include/osmocom/sim/sim.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/include/osmocom/sim/sim.h b/include/osmocom/sim/sim.h
index 12f0074d..e415843e 100644
--- a/include/osmocom/sim/sim.h
+++ b/include/osmocom/sim/sim.h
@@ -28,11 +28,12 @@ struct osim_apdu_cmd_hdr {
#define msgb_apdu_dr(__x)
+/* command body, as specified in ISO/IEC 7816-3:2006(E) ยง12.1 */
struct osim_msgb_cb {
- enum osim_apdu_case apduc;
- uint16_t lc;
- uint16_t le;
- uint16_t sw;
+ enum osim_apdu_case apduc; /* command-response pairs case, defining the encoding of Lc and Le */
+ uint16_t lc; /* number of bytes in the command data field Nc, which will encoded in 0, 1 or 3 bytes into Lc */
+ uint16_t le; /* maximum number of bytes expected in the response data field, which will encoded in 0, 1, 2 or 3 bytes into Le */
+ uint16_t sw; /* status word, composed of SW1 and SW2 bytes */
};
#define OSIM_MSGB_CB(__msgb) ((struct osim_msgb_cb *)&((__msgb)->cb[0]))
/*! \brief status word from msgb->cb */