From 1707306da59a53c8ce72952fc5e41b999e36b73c Mon Sep 17 00:00:00 2001 From: Kevin Redon Date: Tue, 11 Sep 2012 11:54:52 +0200 Subject: sim: add comment/explaination for structure osim_apdu_cmd_hdr --- include/osmocom/sim/sim.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'include/osmocom') diff --git a/include/osmocom/sim/sim.h b/include/osmocom/sim/sim.h index 32731939..12f0074d 100644 --- a/include/osmocom/sim/sim.h +++ b/include/osmocom/sim/sim.h @@ -17,12 +17,13 @@ enum osim_apdu_case { APDU_CASE_4E /* command header, command data field (extended), response data field (extended) */ }; +/* command header, as specified in ISO/IEC 7816-3:2006(E) ยง12.2 */ struct osim_apdu_cmd_hdr { - uint8_t cla; - uint8_t ins; - uint8_t p1; - uint8_t p2; - uint8_t p3; + uint8_t cla; /* CLASS byte */ + uint8_t ins; /* INSTRUCTION byte */ + uint8_t p1; /* Parameter 1 byte */ + uint8_t p2; /* Parameter 2 byte */ + uint8_t p3; /* Parameter 3 byte, used for TPDU */ } __attribute__ ((packed)); #define msgb_apdu_dr(__x) -- cgit v1.2.3