summaryrefslogtreecommitdiffstats
path: root/src/sim
diff options
context:
space:
mode:
authorKevin Redon <kevredon@mail.tsaitgaist.info>2012-09-11 11:40:41 +0200
committerHarald Welte <laforge@gnumonks.org>2014-10-26 19:09:22 +0100
commit0f0ee32d8115cc29d89e41539ed0aac01852cf94 (patch)
treeaa9ad6dfa4dafee6bdba3389f902e9571daaac93 /src/sim
parenta5c9255baa0dd97b564ea8d44444ac80c38153b9 (diff)
sim: comment/explain signature of osim_new_apdumsg
Diffstat (limited to 'src/sim')
-rw-r--r--src/sim/core.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/sim/core.c b/src/sim/core.c
index bc0d05c8..86907521 100644
--- a/src/sim/core.c
+++ b/src/sim/core.c
@@ -174,8 +174,15 @@ osim_file_find_name(struct osim_file_desc *parent, const char *name)
return NULL;
}
-
-
+/* create an APDU header
+ * APDU format as defined in ISO/IEC 7816-4:2005(E) ยง5.1
+ * - cla: CLASS byte
+ * - ins: INSTRUCTION byte
+ * - p1: Parameter 1 byte
+ * - p2: Parameter 2 byte
+ * - lc: number of bytes in the command data field Nc, which will encoded in 0, 1 or 3 bytes into Lc
+ * - le: maximum number of bytes expected in the response data field, which will encoded in 0, 1, 2 or 3 bytes into Le
+ */
struct msgb *osim_new_apdumsg(uint8_t cla, uint8_t ins, uint8_t p1,
uint8_t p2, uint16_t lc, uint16_t le)
{