\doxysection{include/osmocom/sim/sim.h File Reference}
\label{sim_8h}\index{include/osmocom/sim/sim.h@{include/osmocom/sim/sim.h}}


Routines for helping with SIM (ISO/\+IEC 7816-\/4 more generally) communication.  


{\ttfamily \#include $<$osmocom/core/msgb.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/core/linuxlist.\+h$>$}\newline
\doxysubsection*{Data Structures}
\begin{DoxyCompactItemize}
\item 
struct \textbf{ osim\+\_\+apdu\+\_\+cmd\+\_\+hdr}
\begin{DoxyCompactList}\small\item\em APDU/\+TPDU command header. \end{DoxyCompactList}\item 
struct \textbf{ osim\+\_\+msgb\+\_\+cb}
\begin{DoxyCompactList}\small\item\em APDU command body. \end{DoxyCompactList}\item 
struct \textbf{ osim\+\_\+file\+\_\+ops}
\begin{DoxyCompactList}\small\item\em Operations for a given File. \end{DoxyCompactList}\item 
struct \textbf{ osim\+\_\+decoded\+\_\+element}
\begin{DoxyCompactList}\small\item\em A single decoded element inside a file. \end{DoxyCompactList}\item 
struct \textbf{ osim\+\_\+decoded\+\_\+data}
\begin{DoxyCompactList}\small\item\em Decoded data for a single file, consisting of all decoded elements. \end{DoxyCompactList}\item 
struct \textbf{ osim\+\_\+file\+\_\+desc}
\item 
struct \textbf{ osim\+\_\+file}
\begin{DoxyCompactList}\small\item\em A single instance of a file\+: Descriptor and contents. \end{DoxyCompactList}\item 
struct \textbf{ osim\+\_\+card\+\_\+sw}
\begin{DoxyCompactList}\small\item\em A card status word (SW) \end{DoxyCompactList}\item 
struct \textbf{ osim\+\_\+card\+\_\+app\+\_\+profile}
\begin{DoxyCompactList}\small\item\em A card application (e.\+g. \end{DoxyCompactList}\item 
struct \textbf{ osim\+\_\+card\+\_\+profile}
\begin{DoxyCompactList}\small\item\em A card profile (e.\+g. \end{DoxyCompactList}\item 
struct \textbf{ osim\+\_\+reader\+\_\+ops}
\item 
struct \textbf{ osim\+\_\+reader\+\_\+hdl}
\item 
struct \textbf{ osim\+\_\+card\+\_\+app\+\_\+hdl}
\begin{DoxyCompactList}\small\item\em descriptor for a given application present on a card \end{DoxyCompactList}\item 
struct \textbf{ osim\+\_\+card\+\_\+hdl}
\item 
struct \textbf{ osim\+\_\+chan\+\_\+hdl}
\end{DoxyCompactItemize}
\doxysubsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define \textbf{ APDU\+\_\+\+HDR\+\_\+\+LEN}~5
\item 
\#define \textbf{ MAX\+\_\+\+AID\+\_\+\+LEN}~16 /$\ast$ Table 13.\+2 of TS 102 221 $\ast$/
\item 
\#define \textbf{ OSIM\+\_\+\+MAX\+\_\+\+ATR\+\_\+\+LEN}~33
\begin{DoxyCompactList}\small\item\em Maximum Answer-\/\+To-\/\+Reset (ATR) size in bytes. \end{DoxyCompactList}\item 
\#define \textbf{ msgb\+\_\+apdu\+\_\+dr}(\+\_\+\+\_\+x)
\item 
\#define \textbf{ OSIM\+\_\+\+MSGB\+\_\+\+CB}(\+\_\+\+\_\+msgb)~((struct \textbf{ osim\+\_\+msgb\+\_\+cb} $\ast$)\&((\+\_\+\+\_\+msgb)-\/$>$cb[0]))
\item 
\#define \textbf{ msgb\+\_\+apdu\+\_\+case}(\+\_\+\+\_\+x)~\textbf{ OSIM\+\_\+\+MSGB\+\_\+\+CB}(\+\_\+\+\_\+x)-\/$>$\textbf{ apduc}
\begin{DoxyCompactList}\small\item\em status word from msgb-\/$>$cb \end{DoxyCompactList}\item 
\#define \textbf{ msgb\+\_\+apdu\+\_\+lc}(\+\_\+\+\_\+x)~\textbf{ OSIM\+\_\+\+MSGB\+\_\+\+CB}(\+\_\+\+\_\+x)-\/$>$\textbf{ lc}
\item 
\#define \textbf{ msgb\+\_\+apdu\+\_\+le}(\+\_\+\+\_\+x)~\textbf{ OSIM\+\_\+\+MSGB\+\_\+\+CB}(\+\_\+\+\_\+x)-\/$>$\textbf{ le}
\item 
\#define \textbf{ msgb\+\_\+apdu\+\_\+sw}(\+\_\+\+\_\+x)~\textbf{ OSIM\+\_\+\+MSGB\+\_\+\+CB}(\+\_\+\+\_\+x)-\/$>$\textbf{ sw}
\item 
\#define \textbf{ msgb\+\_\+apdu\+\_\+h}(\+\_\+\+\_\+x)~((struct \textbf{ osim\+\_\+apdu\+\_\+cmd\+\_\+hdr} $\ast$)(\+\_\+\+\_\+x)-\/$>$l2h)
\begin{DoxyCompactList}\small\item\em pointer to the command header of the APDU \end{DoxyCompactList}\item 
\#define \textbf{ msgb\+\_\+apdu\+\_\+dc}(\+\_\+\+\_\+x)~((\+\_\+\+\_\+x)-\/$>$l2h + sizeof(struct \textbf{ osim\+\_\+apdu\+\_\+cmd\+\_\+hdr}))
\item 
\#define \textbf{ msgb\+\_\+apdu\+\_\+de}(\+\_\+\+\_\+x)~((\+\_\+\+\_\+x)-\/$>$l2h + sizeof(struct \textbf{ osim\+\_\+apdu\+\_\+cmd\+\_\+hdr}) + \textbf{ msgb\+\_\+apdu\+\_\+lc}(\+\_\+\+\_\+x))
\item 
\#define \textbf{ F\+\_\+\+OPTIONAL}~0x0001
\item 
\#define \textbf{ SFI\+\_\+\+NONE}~0x\+FF
\item 
\#define \textbf{ EF}(pfid,  sfi,  pns,  pflags,  pnl,  \textbf{ ptype},  smin,  srec,  pdec,  penc)
\begin{DoxyCompactList}\small\item\em Convenience macros for defining EF. \end{DoxyCompactList}\item 
\#define \textbf{ EF\+\_\+\+TRANSP}(fid,  sfi,  ns,  \textbf{ flags},  smin,  srec,  nl,  dec,  enc)
\begin{DoxyCompactList}\small\item\em Convenience macros for defining EF. \end{DoxyCompactList}\item 
\#define \textbf{ EF\+\_\+\+TRANSP\+\_\+N}(fid,  sfi,  ns,  \textbf{ flags},  smin,  srec,  nl)
\begin{DoxyCompactList}\small\item\em Convenience macros for defining EF. \end{DoxyCompactList}\item 
\#define \textbf{ EF\+\_\+\+CYCLIC}(fid,  sfi,  ns,  \textbf{ flags},  smin,  srec,  nl,  dec,  enc)
\begin{DoxyCompactList}\small\item\em Convenience macros for defining EF. \end{DoxyCompactList}\item 
\#define \textbf{ EF\+\_\+\+CYCLIC\+\_\+N}(fid,  sfi,  ns,  \textbf{ flags},  smin,  srec,  nl)
\begin{DoxyCompactList}\small\item\em Convenience macros for defining EF. \end{DoxyCompactList}\item 
\#define \textbf{ EF\+\_\+\+LIN\+\_\+\+FIX}(fid,  sfi,  ns,  \textbf{ flags},  smin,  srec,  nl,  dec,  enc)
\begin{DoxyCompactList}\small\item\em Convenience macros for defining EF. \end{DoxyCompactList}\item 
\#define \textbf{ EF\+\_\+\+LIN\+\_\+\+FIX\+\_\+N}(fid,  sfi,  ns,  \textbf{ flags},  smin,  srec,  nl)
\begin{DoxyCompactList}\small\item\em Convenience macros for defining EF. \end{DoxyCompactList}\item 
\#define \textbf{ EF\+\_\+\+KEY}(fid,  sfi,  ns,  \textbf{ flags},  smin,  srec,  nl,  dec,  enc)
\begin{DoxyCompactList}\small\item\em Convenience macros for defining EF. \end{DoxyCompactList}\item 
\#define \textbf{ EF\+\_\+\+KEY\+\_\+N}(fid,  sfi,  ns,  \textbf{ flags},  smin,  srec,  nl)
\begin{DoxyCompactList}\small\item\em Convenience macros for defining EF. \end{DoxyCompactList}\item 
\#define \textbf{ OSIM\+\_\+\+CARD\+\_\+\+SW\+\_\+\+LAST}
\end{DoxyCompactItemize}
\doxysubsection*{Enumerations}
\begin{DoxyCompactItemize}
\item 
enum \textbf{ osim\+\_\+apdu\+\_\+case} \{ \newline
\textbf{ APDU\+\_\+\+CASE\+\_\+1}
, \newline
\textbf{ APDU\+\_\+\+CASE\+\_\+2S}
, \newline
\textbf{ APDU\+\_\+\+CASE\+\_\+2E}
, \newline
\textbf{ APDU\+\_\+\+CASE\+\_\+3S}
, \newline
\textbf{ APDU\+\_\+\+CASE\+\_\+3E}
, \newline
\textbf{ APDU\+\_\+\+CASE\+\_\+4S}
, \newline
\textbf{ APDU\+\_\+\+CASE\+\_\+4E}
 \}
\begin{DoxyCompactList}\small\item\em command-\/response pairs cases \end{DoxyCompactList}\item 
enum \textbf{ osim\+\_\+element\+\_\+type} \{ \newline
\textbf{ ELEM\+\_\+\+T\+\_\+\+NONE}
, \newline
\textbf{ ELEM\+\_\+\+T\+\_\+\+BOOL}
, \newline
\textbf{ ELEM\+\_\+\+T\+\_\+\+UINT8}
, \newline
\textbf{ ELEM\+\_\+\+T\+\_\+\+UINT16}
, \newline
\textbf{ ELEM\+\_\+\+T\+\_\+\+UINT32}
, \newline
\textbf{ ELEM\+\_\+\+T\+\_\+\+STRING}
, \newline
\textbf{ ELEM\+\_\+\+T\+\_\+\+BCD}
, \newline
\textbf{ ELEM\+\_\+\+T\+\_\+\+BYTES}
, \newline
\textbf{ ELEM\+\_\+\+T\+\_\+\+GROUP}
 \}
\item 
enum \textbf{ osim\+\_\+element\+\_\+repr} \{ \newline
\textbf{ ELEM\+\_\+\+REPR\+\_\+\+NONE}
, \newline
\textbf{ ELEM\+\_\+\+REPR\+\_\+\+DEC}
, \newline
\textbf{ ELEM\+\_\+\+REPR\+\_\+\+HEX}
 \}
\item 
enum \textbf{ osim\+\_\+file\+\_\+type} \{ \newline
\textbf{ TYPE\+\_\+\+NONE}
, \newline
\textbf{ TYPE\+\_\+\+DF}
, \newline
\textbf{ TYPE\+\_\+\+ADF}
, \newline
\textbf{ TYPE\+\_\+\+EF}
, \newline
\textbf{ TYPE\+\_\+\+EF\+\_\+\+INT}
, \newline
\textbf{ TYPE\+\_\+\+MF}
 \}
\item 
enum \textbf{ osim\+\_\+ef\+\_\+type} \{ \newline
\textbf{ EF\+\_\+\+TYPE\+\_\+\+TRANSP}
, \newline
\textbf{ EF\+\_\+\+TYPE\+\_\+\+RECORD\+\_\+\+FIXED}
, \newline
\textbf{ EF\+\_\+\+TYPE\+\_\+\+RECORD\+\_\+\+CYCLIC}
, \newline
\textbf{ EF\+\_\+\+TYPE\+\_\+\+KEY}
 \}
\item 
enum \textbf{ osim\+\_\+card\+\_\+sw\+\_\+type} \{ \newline
\textbf{ SW\+\_\+\+TYPE\+\_\+\+NONE}
, \newline
\textbf{ SW\+\_\+\+TYPE\+\_\+\+STR}
 \}
\item 
enum \textbf{ osim\+\_\+card\+\_\+sw\+\_\+class} \{ \newline
\textbf{ SW\+\_\+\+CLS\+\_\+\+NONE}
, \newline
\textbf{ SW\+\_\+\+CLS\+\_\+\+OK}
, \newline
\textbf{ SW\+\_\+\+CLS\+\_\+\+POSTP}
, \newline
\textbf{ SW\+\_\+\+CLS\+\_\+\+WARN}
, \newline
\textbf{ SW\+\_\+\+CLS\+\_\+\+ERROR}
 \}
\item 
enum \textbf{ ts102221\+\_\+fcp\+\_\+tag} \{ \newline
\textbf{ UICC\+\_\+\+FCP\+\_\+\+T\+\_\+\+FCP} = 0x62
, \newline
\textbf{ UICC\+\_\+\+FCP\+\_\+\+T\+\_\+\+FILE\+\_\+\+SIZE} = 0x80
, \newline
\textbf{ UICC\+\_\+\+FCP\+\_\+\+T\+\_\+\+TOT\+\_\+\+F\+\_\+\+SIZE} = 0x81
, \newline
\textbf{ UICC\+\_\+\+FCP\+\_\+\+T\+\_\+\+FILE\+\_\+\+DESC} = 0x82
, \newline
\textbf{ UICC\+\_\+\+FCP\+\_\+\+T\+\_\+\+FILE\+\_\+\+ID} = 0x83
, \newline
\textbf{ UICC\+\_\+\+FCP\+\_\+\+T\+\_\+\+DF\+\_\+\+NAME} = 0x84
, \newline
\textbf{ UICC\+\_\+\+FCP\+\_\+\+T\+\_\+\+SFID} = 0x88
, \newline
\textbf{ UICC\+\_\+\+FCP\+\_\+\+T\+\_\+\+LIFEC\+\_\+\+STS} = 0x8A
, \newline
\textbf{ UICC\+\_\+\+FCP\+\_\+\+T\+\_\+\+SEC\+\_\+\+ATTR\+\_\+\+REFEXP} = 0x8B
, \newline
\textbf{ UICC\+\_\+\+FCP\+\_\+\+T\+\_\+\+SEC\+\_\+\+ATTR\+\_\+\+COMP} = 0x8C
, \newline
\textbf{ UICC\+\_\+\+FCP\+\_\+\+T\+\_\+\+PROPRIETARY} = 0x\+A5
, \newline
\textbf{ UICC\+\_\+\+FCP\+\_\+\+T\+\_\+\+SEC\+\_\+\+ATTR\+\_\+\+EXP} = 0x\+AB
, \newline
\textbf{ UICC\+\_\+\+FCP\+\_\+\+T\+\_\+\+PIN\+\_\+\+STS\+\_\+\+DO} = 0x\+C6
 \}
\item 
enum \textbf{ osim\+\_\+proto} \{ \newline
\textbf{ OSIM\+\_\+\+PROTO\+\_\+\+T0} = 0
, \newline
\textbf{ OSIM\+\_\+\+PROTO\+\_\+\+T1} = 1
 \}
\item 
enum \textbf{ osim\+\_\+reader\+\_\+driver} \{ \newline
\textbf{ OSIM\+\_\+\+READER\+\_\+\+DRV\+\_\+\+PCSC} = 0
, \newline
\textbf{ OSIM\+\_\+\+READER\+\_\+\+DRV\+\_\+\+OPENCT} = 1
, \newline
\textbf{ OSIM\+\_\+\+READER\+\_\+\+DRV\+\_\+\+SERIAL} = 2
 \}
\end{DoxyCompactItemize}
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
struct \textbf{ osim\+\_\+apdu\+\_\+cmd\+\_\+hdr} \textbf{ \+\_\+\+\_\+attribute\+\_\+\+\_\+} ((packed))
\item 
struct \textbf{ osim\+\_\+msgb\+\_\+cb} \textbf{ \+\_\+\+\_\+attribute\+\_\+\+\_\+} ((\+\_\+\+\_\+may\+\_\+alias\+\_\+\+\_\+))
\item 
int \textbf{ osim\+\_\+init} (void $\ast$ctx)
\item 
struct \textbf{ osim\+\_\+file\+\_\+desc} $\ast$ \textbf{ osim\+\_\+file\+\_\+desc\+\_\+find\+\_\+name} (struct \textbf{ osim\+\_\+file\+\_\+desc} $\ast$parent, const char $\ast$\textbf{ name})
\item 
struct \textbf{ osim\+\_\+file\+\_\+desc} $\ast$ \textbf{ osim\+\_\+file\+\_\+desc\+\_\+find\+\_\+aid} (struct \textbf{ osim\+\_\+file\+\_\+desc} $\ast$parent, const uint8\+\_\+t $\ast$aid, uint8\+\_\+t aid\+\_\+len)
\item 
struct \textbf{ osim\+\_\+file\+\_\+desc} $\ast$ \textbf{ osim\+\_\+file\+\_\+desc\+\_\+find\+\_\+fid} (struct \textbf{ osim\+\_\+file\+\_\+desc} $\ast$parent, uint16\+\_\+t fid)
\item 
struct \textbf{ osim\+\_\+file\+\_\+desc} $\ast$ \textbf{ osim\+\_\+file\+\_\+desc\+\_\+find\+\_\+sfid} (struct \textbf{ osim\+\_\+file\+\_\+desc} $\ast$parent, uint8\+\_\+t sfid)
\item 
const struct \textbf{ osim\+\_\+card\+\_\+app\+\_\+profile} $\ast$ \textbf{ osim\+\_\+app\+\_\+profile\+\_\+find\+\_\+by\+\_\+name} (const char $\ast$\textbf{ name})
\begin{DoxyCompactList}\small\item\em Find any registered application profile based on its name (e.\+g. \end{DoxyCompactList}\item 
const struct \textbf{ osim\+\_\+card\+\_\+app\+\_\+profile} $\ast$ \textbf{ osim\+\_\+app\+\_\+profile\+\_\+find\+\_\+by\+\_\+aid} (const uint8\+\_\+t $\ast$aid, uint8\+\_\+t aid\+\_\+len)
\begin{DoxyCompactList}\small\item\em Find any registered application profile based on its AID. \end{DoxyCompactList}\item 
const struct \textbf{ osim\+\_\+card\+\_\+sw} $\ast$ \textbf{ osim\+\_\+app\+\_\+profile\+\_\+find\+\_\+sw} (const struct \textbf{ osim\+\_\+card\+\_\+app\+\_\+profile} $\ast$ap, uint16\+\_\+t sw\+\_\+in)
\begin{DoxyCompactList}\small\item\em Find application-\/specific status word within given card application profile. \end{DoxyCompactList}\item 
const struct \textbf{ osim\+\_\+card\+\_\+sw} $\ast$ \textbf{ osim\+\_\+cprof\+\_\+find\+\_\+sw} (const struct \textbf{ osim\+\_\+card\+\_\+profile} $\ast$cp, uint16\+\_\+t sw\+\_\+in)
\begin{DoxyCompactList}\small\item\em Find status word within given card profile. \end{DoxyCompactList}\item 
enum \textbf{ osim\+\_\+card\+\_\+sw\+\_\+class} \textbf{ osim\+\_\+sw\+\_\+class} (const struct \textbf{ osim\+\_\+chan\+\_\+hdl} $\ast$ch, uint16\+\_\+t sw\+\_\+in)
\item 
char $\ast$ \textbf{ osim\+\_\+print\+\_\+sw\+\_\+buf} (char $\ast$buf, size\+\_\+t buf\+\_\+len, const struct \textbf{ osim\+\_\+chan\+\_\+hdl} $\ast$ch, uint16\+\_\+t sw\+\_\+in)
\item 
char $\ast$ \textbf{ osim\+\_\+print\+\_\+sw} (const struct \textbf{ osim\+\_\+chan\+\_\+hdl} $\ast$ch, uint16\+\_\+t sw\+\_\+in)
\item 
char $\ast$ \textbf{ osim\+\_\+print\+\_\+sw\+\_\+c} (const void $\ast$ctx, const struct \textbf{ osim\+\_\+chan\+\_\+hdl} $\ast$ch, uint16\+\_\+t sw\+\_\+in)
\item 
struct \textbf{ msgb} $\ast$ \textbf{ osim\+\_\+new\+\_\+apdumsg} (uint8\+\_\+t \textbf{ cla}, uint8\+\_\+t \textbf{ ins}, uint8\+\_\+t \textbf{ p1}, uint8\+\_\+t \textbf{ p2}, uint16\+\_\+t \textbf{ lc}, uint16\+\_\+t \textbf{ le})
\begin{DoxyCompactList}\small\item\em Generate an APDU message and initialize APDU command header. \end{DoxyCompactList}\item 
int \textbf{ osim\+\_\+card\+\_\+hdl\+\_\+add\+\_\+app} (struct \textbf{ osim\+\_\+card\+\_\+hdl} $\ast$ch, const uint8\+\_\+t $\ast$aid, uint8\+\_\+t aid\+\_\+len, const char $\ast$label)
\begin{DoxyCompactList}\small\item\em Add an application to a given card. \end{DoxyCompactList}\item 
int \textbf{ osim\+\_\+transceive\+\_\+apdu} (struct \textbf{ osim\+\_\+chan\+\_\+hdl} $\ast$st, struct \textbf{ msgb} $\ast$amsg)
\item 
struct \textbf{ osim\+\_\+reader\+\_\+hdl} $\ast$ \textbf{ osim\+\_\+reader\+\_\+open} (enum \textbf{ osim\+\_\+reader\+\_\+driver} drv, int idx, const char $\ast$\textbf{ name}, void $\ast$ctx)
\item 
struct \textbf{ osim\+\_\+card\+\_\+hdl} $\ast$ \textbf{ osim\+\_\+card\+\_\+open} (struct \textbf{ osim\+\_\+reader\+\_\+hdl} $\ast$rh, enum \textbf{ osim\+\_\+proto} proto)
\item 
int \textbf{ osim\+\_\+card\+\_\+reset} (struct \textbf{ osim\+\_\+card\+\_\+hdl} $\ast$card, bool cold\+\_\+reset)
\item 
int \textbf{ osim\+\_\+card\+\_\+close} (struct \textbf{ osim\+\_\+card\+\_\+hdl} $\ast$card)
\end{DoxyCompactItemize}
\doxysubsection*{Variables}
\begin{DoxyCompactItemize}
\item 
uint8\+\_\+t \textbf{ cla}
\begin{DoxyCompactList}\small\item\em CLASS byte. \end{DoxyCompactList}\item 
uint8\+\_\+t \textbf{ ins}
\begin{DoxyCompactList}\small\item\em INSTRUCTION byte. \end{DoxyCompactList}\item 
uint8\+\_\+t \textbf{ p1}
\begin{DoxyCompactList}\small\item\em Parameter 1 byte. \end{DoxyCompactList}\item 
uint8\+\_\+t \textbf{ p2}
\begin{DoxyCompactList}\small\item\em Parameter 2 byte. \end{DoxyCompactList}\item 
uint8\+\_\+t \textbf{ p3}
\begin{DoxyCompactList}\small\item\em Parameter 3 byte, used for TPDU by T=0. \end{DoxyCompactList}\item 
enum \textbf{ osim\+\_\+apdu\+\_\+case} \textbf{ apduc}
\begin{DoxyCompactList}\small\item\em command-\/response pair case, defining the encoding of Lc and Le \end{DoxyCompactList}\item 
uint16\+\_\+t \textbf{ lc}
\begin{DoxyCompactList}\small\item\em number of bytes in the command data field Nc, which will encoded in 0, 1 or 3 bytes into Lc, depending on the case \end{DoxyCompactList}\item 
uint16\+\_\+t \textbf{ le}
\begin{DoxyCompactList}\small\item\em maximum number of bytes expected in the response data field, which will encoded in 0, 1, 2 or 3 bytes into Le, depending on the case \end{DoxyCompactList}\item 
uint16\+\_\+t \textbf{ sw}
\begin{DoxyCompactList}\small\item\em status word, composed of SW1 and SW2 bytes \end{DoxyCompactList}\item 
struct \textbf{ osim\+\_\+file\+\_\+ops} \textbf{ \+\_\+\+\_\+attribute\+\_\+\+\_\+}
\item 
const struct tlv\+\_\+definition \textbf{ ts102221\+\_\+fcp\+\_\+tlv\+\_\+def}
\item 
const struct \textbf{ value\+\_\+string} \textbf{ ts102221\+\_\+fcp\+\_\+vals} [14]
\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
Routines for helping with SIM (ISO/\+IEC 7816-\/4 more generally) communication. 



\doxysubsection{Macro Definition Documentation}
\mbox{\label{sim_8h_a9518480c382be95759d21628dab89a6a}} 
\index{sim.h@{sim.h}!APDU\_HDR\_LEN@{APDU\_HDR\_LEN}}
\index{APDU\_HDR\_LEN@{APDU\_HDR\_LEN}!sim.h@{sim.h}}
\doxysubsubsection{APDU\_HDR\_LEN}
{\footnotesize\ttfamily \#define APDU\+\_\+\+HDR\+\_\+\+LEN~5}

\mbox{\label{sim_8h_aef4eb16ea824a14bca9f896caf0929fb}} 
\index{sim.h@{sim.h}!EF@{EF}}
\index{EF@{EF}!sim.h@{sim.h}}
\doxysubsubsection{EF}
{\footnotesize\ttfamily \#define EF(\begin{DoxyParamCaption}\item[{}]{pfid,  }\item[{}]{sfi,  }\item[{}]{pns,  }\item[{}]{pflags,  }\item[{}]{pnl,  }\item[{}]{\textbf{ ptype},  }\item[{}]{smin,  }\item[{}]{srec,  }\item[{}]{pdec,  }\item[{}]{penc }\end{DoxyParamCaption})}

{\bfseries Value\+:}
\begin{DoxyCode}{0}
\DoxyCodeLine{        \{                                                               \(\backslash\)}
\DoxyCodeLine{                .fid            = pfid,                                 \(\backslash\)}
\DoxyCodeLine{                .sfid           = sfi,                                  \(\backslash\)}
\DoxyCodeLine{                .type           = TYPE\_EF,                               \(\backslash\)}
\DoxyCodeLine{                .ef\_type        = ptype,                           \(\backslash\)}
\DoxyCodeLine{                .short\_name     = pns,                                  \(\backslash\)}
\DoxyCodeLine{                .long\_name      = pnl,                                  \(\backslash\)}
\DoxyCodeLine{                .flags          = pflags,                               \(\backslash\)}
\DoxyCodeLine{                .ops            = \{ .encode = penc, .parse = pdec \},    \(\backslash\)}
\DoxyCodeLine{                .size           = \{ .min = smin, .rec = srec\},          \(\backslash\)}
\DoxyCodeLine{        \}}

\end{DoxyCode}


Convenience macros for defining EF. 

\mbox{\label{sim_8h_a7d34b0d9aeb3dfdb6a55f90513559eba}} 
\index{sim.h@{sim.h}!EF\_CYCLIC@{EF\_CYCLIC}}
\index{EF\_CYCLIC@{EF\_CYCLIC}!sim.h@{sim.h}}
\doxysubsubsection{EF\_CYCLIC}
{\footnotesize\ttfamily \#define EF\+\_\+\+CYCLIC(\begin{DoxyParamCaption}\item[{}]{fid,  }\item[{}]{sfi,  }\item[{}]{ns,  }\item[{}]{\textbf{ flags},  }\item[{}]{smin,  }\item[{}]{srec,  }\item[{}]{nl,  }\item[{}]{dec,  }\item[{}]{enc }\end{DoxyParamCaption})}

{\bfseries Value\+:}
\begin{DoxyCode}{0}
\DoxyCodeLine{                EF(fid, sfi, ns, flags, nl, EF\_TYPE\_RECORD\_CYCLIC,       \(\backslash\)}
\DoxyCodeLine{                   smin, srec, dec, enc)}

\end{DoxyCode}


Convenience macros for defining EF. 

\mbox{\label{sim_8h_a1736ecea9d7af74c93b22c9f8d8eb8d6}} 
\index{sim.h@{sim.h}!EF\_CYCLIC\_N@{EF\_CYCLIC\_N}}
\index{EF\_CYCLIC\_N@{EF\_CYCLIC\_N}!sim.h@{sim.h}}
\doxysubsubsection{EF\_CYCLIC\_N}
{\footnotesize\ttfamily \#define EF\+\_\+\+CYCLIC\+\_\+N(\begin{DoxyParamCaption}\item[{}]{fid,  }\item[{}]{sfi,  }\item[{}]{ns,  }\item[{}]{\textbf{ flags},  }\item[{}]{smin,  }\item[{}]{srec,  }\item[{}]{nl }\end{DoxyParamCaption})}

{\bfseries Value\+:}
\begin{DoxyCode}{0}
\DoxyCodeLine{                EF\_CYCLIC(fid, sfi, ns, flags, smin, srec, nl,         \(\backslash\)}
\DoxyCodeLine{                          \&default\_decode, NULL)}

\end{DoxyCode}


Convenience macros for defining EF. 

\mbox{\label{sim_8h_a0711f0035e3f254c456d1e8da0a88af4}} 
\index{sim.h@{sim.h}!EF\_KEY@{EF\_KEY}}
\index{EF\_KEY@{EF\_KEY}!sim.h@{sim.h}}
\doxysubsubsection{EF\_KEY}
{\footnotesize\ttfamily \#define EF\+\_\+\+KEY(\begin{DoxyParamCaption}\item[{}]{fid,  }\item[{}]{sfi,  }\item[{}]{ns,  }\item[{}]{\textbf{ flags},  }\item[{}]{smin,  }\item[{}]{srec,  }\item[{}]{nl,  }\item[{}]{dec,  }\item[{}]{enc }\end{DoxyParamCaption})}

{\bfseries Value\+:}
\begin{DoxyCode}{0}
\DoxyCodeLine{                EF(fid, sfi, ns, flags, nl, EF\_TYPE\_KEY,           \(\backslash\)}
\DoxyCodeLine{                   smin, srec, dec, enc)}

\end{DoxyCode}


Convenience macros for defining EF. 

\mbox{\label{sim_8h_ac1f9a00888acdc7bf8af58dddd980126}} 
\index{sim.h@{sim.h}!EF\_KEY\_N@{EF\_KEY\_N}}
\index{EF\_KEY\_N@{EF\_KEY\_N}!sim.h@{sim.h}}
\doxysubsubsection{EF\_KEY\_N}
{\footnotesize\ttfamily \#define EF\+\_\+\+KEY\+\_\+N(\begin{DoxyParamCaption}\item[{}]{fid,  }\item[{}]{sfi,  }\item[{}]{ns,  }\item[{}]{\textbf{ flags},  }\item[{}]{smin,  }\item[{}]{srec,  }\item[{}]{nl }\end{DoxyParamCaption})}

{\bfseries Value\+:}
\begin{DoxyCode}{0}
\DoxyCodeLine{                EF\_KEY(fid, sfi, ns, flags, smin, srec, nl,               \(\backslash\)}
\DoxyCodeLine{                       \&default\_decode, NULL)}

\end{DoxyCode}


Convenience macros for defining EF. 

\mbox{\label{sim_8h_ab7d0c62420898d1205028c8c74d45034}} 
\index{sim.h@{sim.h}!EF\_LIN\_FIX@{EF\_LIN\_FIX}}
\index{EF\_LIN\_FIX@{EF\_LIN\_FIX}!sim.h@{sim.h}}
\doxysubsubsection{EF\_LIN\_FIX}
{\footnotesize\ttfamily \#define EF\+\_\+\+LIN\+\_\+\+FIX(\begin{DoxyParamCaption}\item[{}]{fid,  }\item[{}]{sfi,  }\item[{}]{ns,  }\item[{}]{\textbf{ flags},  }\item[{}]{smin,  }\item[{}]{srec,  }\item[{}]{nl,  }\item[{}]{dec,  }\item[{}]{enc }\end{DoxyParamCaption})}

{\bfseries Value\+:}
\begin{DoxyCode}{0}
\DoxyCodeLine{                EF(fid, sfi, ns, flags, nl, EF\_TYPE\_RECORD\_FIXED, \(\backslash\)}
\DoxyCodeLine{                   smin, srec, dec, enc)}

\end{DoxyCode}


Convenience macros for defining EF. 

\mbox{\label{sim_8h_a7e50f2a2c8a05f4f3f0c8250fbb91d1e}} 
\index{sim.h@{sim.h}!EF\_LIN\_FIX\_N@{EF\_LIN\_FIX\_N}}
\index{EF\_LIN\_FIX\_N@{EF\_LIN\_FIX\_N}!sim.h@{sim.h}}
\doxysubsubsection{EF\_LIN\_FIX\_N}
{\footnotesize\ttfamily \#define EF\+\_\+\+LIN\+\_\+\+FIX\+\_\+N(\begin{DoxyParamCaption}\item[{}]{fid,  }\item[{}]{sfi,  }\item[{}]{ns,  }\item[{}]{\textbf{ flags},  }\item[{}]{smin,  }\item[{}]{srec,  }\item[{}]{nl }\end{DoxyParamCaption})}

{\bfseries Value\+:}
\begin{DoxyCode}{0}
\DoxyCodeLine{                EF\_LIN\_FIX(fid, sfi, ns, flags, smin, srec, nl,       \(\backslash\)}
\DoxyCodeLine{                           \&default\_decode, NULL)}

\end{DoxyCode}


Convenience macros for defining EF. 

\mbox{\label{sim_8h_ae4989b52aa976586a597e959b98d9141}} 
\index{sim.h@{sim.h}!EF\_TRANSP@{EF\_TRANSP}}
\index{EF\_TRANSP@{EF\_TRANSP}!sim.h@{sim.h}}
\doxysubsubsection{EF\_TRANSP}
{\footnotesize\ttfamily \#define EF\+\_\+\+TRANSP(\begin{DoxyParamCaption}\item[{}]{fid,  }\item[{}]{sfi,  }\item[{}]{ns,  }\item[{}]{\textbf{ flags},  }\item[{}]{smin,  }\item[{}]{srec,  }\item[{}]{nl,  }\item[{}]{dec,  }\item[{}]{enc }\end{DoxyParamCaption})}

{\bfseries Value\+:}
\begin{DoxyCode}{0}
\DoxyCodeLine{                EF(fid, sfi, ns, flags, nl, EF\_TYPE\_TRANSP,             \(\backslash\)}
\DoxyCodeLine{                   smin, srec, dec, enc)}

\end{DoxyCode}


Convenience macros for defining EF. 

\mbox{\label{sim_8h_a52a2cf308bbf30a8f90f097be07e7fcc}} 
\index{sim.h@{sim.h}!EF\_TRANSP\_N@{EF\_TRANSP\_N}}
\index{EF\_TRANSP\_N@{EF\_TRANSP\_N}!sim.h@{sim.h}}
\doxysubsubsection{EF\_TRANSP\_N}
{\footnotesize\ttfamily \#define EF\+\_\+\+TRANSP\+\_\+N(\begin{DoxyParamCaption}\item[{}]{fid,  }\item[{}]{sfi,  }\item[{}]{ns,  }\item[{}]{\textbf{ flags},  }\item[{}]{smin,  }\item[{}]{srec,  }\item[{}]{nl }\end{DoxyParamCaption})}

{\bfseries Value\+:}
\begin{DoxyCode}{0}
\DoxyCodeLine{                EF\_TRANSP(fid, sfi, ns, flags, smin, srec,             \(\backslash\)}
\DoxyCodeLine{                          nl, \&default\_decode, NULL)}

\end{DoxyCode}


Convenience macros for defining EF. 

\mbox{\label{sim_8h_aac1f46919efc75516d7055b59e00095c}} 
\index{sim.h@{sim.h}!F\_OPTIONAL@{F\_OPTIONAL}}
\index{F\_OPTIONAL@{F\_OPTIONAL}!sim.h@{sim.h}}
\doxysubsubsection{F\_OPTIONAL}
{\footnotesize\ttfamily \#define F\+\_\+\+OPTIONAL~0x0001}

\mbox{\label{sim_8h_a4afaebf0dccbfbdad5fdc171cd19dcb5}} 
\index{sim.h@{sim.h}!MAX\_AID\_LEN@{MAX\_AID\_LEN}}
\index{MAX\_AID\_LEN@{MAX\_AID\_LEN}!sim.h@{sim.h}}
\doxysubsubsection{MAX\_AID\_LEN}
{\footnotesize\ttfamily \#define MAX\+\_\+\+AID\+\_\+\+LEN~16 /$\ast$ Table 13.\+2 of TS 102 221 $\ast$/}

\mbox{\label{sim_8h_a314b1476143338b833fbb7ed230c4f75}} 
\index{sim.h@{sim.h}!msgb\_apdu\_case@{msgb\_apdu\_case}}
\index{msgb\_apdu\_case@{msgb\_apdu\_case}!sim.h@{sim.h}}
\doxysubsubsection{msgb\_apdu\_case}
{\footnotesize\ttfamily \#define msgb\+\_\+apdu\+\_\+case(\begin{DoxyParamCaption}\item[{}]{\+\_\+\+\_\+x }\end{DoxyParamCaption})~\textbf{ OSIM\+\_\+\+MSGB\+\_\+\+CB}(\+\_\+\+\_\+x)-\/$>$\textbf{ apduc}}



status word from msgb-\/$>$cb 

\mbox{\label{sim_8h_a20741dd005bd27472c8fe00c0e17de8c}} 
\index{sim.h@{sim.h}!msgb\_apdu\_dc@{msgb\_apdu\_dc}}
\index{msgb\_apdu\_dc@{msgb\_apdu\_dc}!sim.h@{sim.h}}
\doxysubsubsection{msgb\_apdu\_dc}
{\footnotesize\ttfamily \#define msgb\+\_\+apdu\+\_\+dc(\begin{DoxyParamCaption}\item[{}]{\+\_\+\+\_\+x }\end{DoxyParamCaption})~((\+\_\+\+\_\+x)-\/$>$l2h + sizeof(struct \textbf{ osim\+\_\+apdu\+\_\+cmd\+\_\+hdr}))}

\mbox{\label{sim_8h_aed78fbf01d9f84899e1a187a218d9199}} 
\index{sim.h@{sim.h}!msgb\_apdu\_de@{msgb\_apdu\_de}}
\index{msgb\_apdu\_de@{msgb\_apdu\_de}!sim.h@{sim.h}}
\doxysubsubsection{msgb\_apdu\_de}
{\footnotesize\ttfamily \#define msgb\+\_\+apdu\+\_\+de(\begin{DoxyParamCaption}\item[{}]{\+\_\+\+\_\+x }\end{DoxyParamCaption})~((\+\_\+\+\_\+x)-\/$>$l2h + sizeof(struct \textbf{ osim\+\_\+apdu\+\_\+cmd\+\_\+hdr}) + \textbf{ msgb\+\_\+apdu\+\_\+lc}(\+\_\+\+\_\+x))}

\mbox{\label{sim_8h_ac36dd3eafc49396a7bb6d4b1f7f7c739}} 
\index{sim.h@{sim.h}!msgb\_apdu\_dr@{msgb\_apdu\_dr}}
\index{msgb\_apdu\_dr@{msgb\_apdu\_dr}!sim.h@{sim.h}}
\doxysubsubsection{msgb\_apdu\_dr}
{\footnotesize\ttfamily \#define msgb\+\_\+apdu\+\_\+dr(\begin{DoxyParamCaption}\item[{}]{\+\_\+\+\_\+x }\end{DoxyParamCaption})}

\mbox{\label{sim_8h_a1fe749253d6ef39817ccfa1ec7e01e4b}} 
\index{sim.h@{sim.h}!msgb\_apdu\_h@{msgb\_apdu\_h}}
\index{msgb\_apdu\_h@{msgb\_apdu\_h}!sim.h@{sim.h}}
\doxysubsubsection{msgb\_apdu\_h}
{\footnotesize\ttfamily \#define msgb\+\_\+apdu\+\_\+h(\begin{DoxyParamCaption}\item[{}]{\+\_\+\+\_\+x }\end{DoxyParamCaption})~((struct \textbf{ osim\+\_\+apdu\+\_\+cmd\+\_\+hdr} $\ast$)(\+\_\+\+\_\+x)-\/$>$l2h)}



pointer to the command header of the APDU 

\mbox{\label{sim_8h_a8654dafb585c71830199c47807cbd92f}} 
\index{sim.h@{sim.h}!msgb\_apdu\_lc@{msgb\_apdu\_lc}}
\index{msgb\_apdu\_lc@{msgb\_apdu\_lc}!sim.h@{sim.h}}
\doxysubsubsection{msgb\_apdu\_lc}
{\footnotesize\ttfamily \#define msgb\+\_\+apdu\+\_\+lc(\begin{DoxyParamCaption}\item[{}]{\+\_\+\+\_\+x }\end{DoxyParamCaption})~\textbf{ OSIM\+\_\+\+MSGB\+\_\+\+CB}(\+\_\+\+\_\+x)-\/$>$\textbf{ lc}}

\mbox{\label{sim_8h_a8735646e58d698962b65e7570907a43d}} 
\index{sim.h@{sim.h}!msgb\_apdu\_le@{msgb\_apdu\_le}}
\index{msgb\_apdu\_le@{msgb\_apdu\_le}!sim.h@{sim.h}}
\doxysubsubsection{msgb\_apdu\_le}
{\footnotesize\ttfamily \#define msgb\+\_\+apdu\+\_\+le(\begin{DoxyParamCaption}\item[{}]{\+\_\+\+\_\+x }\end{DoxyParamCaption})~\textbf{ OSIM\+\_\+\+MSGB\+\_\+\+CB}(\+\_\+\+\_\+x)-\/$>$\textbf{ le}}

\mbox{\label{sim_8h_af1fbf1c582f57a4c69047498efbf3645}} 
\index{sim.h@{sim.h}!msgb\_apdu\_sw@{msgb\_apdu\_sw}}
\index{msgb\_apdu\_sw@{msgb\_apdu\_sw}!sim.h@{sim.h}}
\doxysubsubsection{msgb\_apdu\_sw}
{\footnotesize\ttfamily \#define msgb\+\_\+apdu\+\_\+sw(\begin{DoxyParamCaption}\item[{}]{\+\_\+\+\_\+x }\end{DoxyParamCaption})~\textbf{ OSIM\+\_\+\+MSGB\+\_\+\+CB}(\+\_\+\+\_\+x)-\/$>$\textbf{ sw}}

\mbox{\label{sim_8h_ac33ba27b1bb09225aa3fccaeb02f44fe}} 
\index{sim.h@{sim.h}!OSIM\_CARD\_SW\_LAST@{OSIM\_CARD\_SW\_LAST}}
\index{OSIM\_CARD\_SW\_LAST@{OSIM\_CARD\_SW\_LAST}!sim.h@{sim.h}}
\doxysubsubsection{OSIM\_CARD\_SW\_LAST}
{\footnotesize\ttfamily \#define OSIM\+\_\+\+CARD\+\_\+\+SW\+\_\+\+LAST}

{\bfseries Value\+:}
\begin{DoxyCode}{0}
\DoxyCodeLine{        \{                       \(\backslash\)}
\DoxyCodeLine{        .code = 0, .mask = 0, .type = SW\_TYPE\_NONE, \(\backslash\)}
\DoxyCodeLine{        .class = SW\_CLS\_NONE, .u.str = NULL          \(\backslash\)}
\DoxyCodeLine{\}}

\end{DoxyCode}
\mbox{\label{sim_8h_a75b2ddef550f77e9059d8449b77b8670}} 
\index{sim.h@{sim.h}!OSIM\_MAX\_ATR\_LEN@{OSIM\_MAX\_ATR\_LEN}}
\index{OSIM\_MAX\_ATR\_LEN@{OSIM\_MAX\_ATR\_LEN}!sim.h@{sim.h}}
\doxysubsubsection{OSIM\_MAX\_ATR\_LEN}
{\footnotesize\ttfamily \#define OSIM\+\_\+\+MAX\+\_\+\+ATR\+\_\+\+LEN~33}



Maximum Answer-\/\+To-\/\+Reset (ATR) size in bytes. 

\begin{DoxyNote}{Note}
defined in ISO/\+IEC 7816-\/3\+:2006(E) section 8.\+2.\+1 as 32, on top the initial character TS of section 8.\+1 
\end{DoxyNote}
\begin{DoxyRemark}{Remarks}
technical there is no size limitation since Yi present in T0,TDi will indicate if more interface bytes are present, including TDi+i 
\end{DoxyRemark}
\mbox{\label{sim_8h_acc7dc519faefc6e8a01ed91c7488f534}} 
\index{sim.h@{sim.h}!OSIM\_MSGB\_CB@{OSIM\_MSGB\_CB}}
\index{OSIM\_MSGB\_CB@{OSIM\_MSGB\_CB}!sim.h@{sim.h}}
\doxysubsubsection{OSIM\_MSGB\_CB}
{\footnotesize\ttfamily \#define OSIM\+\_\+\+MSGB\+\_\+\+CB(\begin{DoxyParamCaption}\item[{}]{\+\_\+\+\_\+msgb }\end{DoxyParamCaption})~((struct \textbf{ osim\+\_\+msgb\+\_\+cb} $\ast$)\&((\+\_\+\+\_\+msgb)-\/$>$cb[0]))}

\mbox{\label{sim_8h_a33d58b658da0657f63273be966376264}} 
\index{sim.h@{sim.h}!SFI\_NONE@{SFI\_NONE}}
\index{SFI\_NONE@{SFI\_NONE}!sim.h@{sim.h}}
\doxysubsubsection{SFI\_NONE}
{\footnotesize\ttfamily \#define SFI\+\_\+\+NONE~0x\+FF}



\doxysubsection{Enumeration Type Documentation}
\mbox{\label{sim_8h_a18fa3961483d9fc22a1da3b6f9cd7107}} 
\index{sim.h@{sim.h}!osim\_apdu\_case@{osim\_apdu\_case}}
\index{osim\_apdu\_case@{osim\_apdu\_case}!sim.h@{sim.h}}
\doxysubsubsection{osim\_apdu\_case}
{\footnotesize\ttfamily enum \textbf{ osim\+\_\+apdu\+\_\+case}}



command-\/response pairs cases 

Enumeration used to identify the APDU structure based on command-\/response pair case , as specified in ISO/\+IEC 7816-\/3\+:2006(E) §12.1. \begin{DoxyEnumFields}{Enumerator}
\raisebox{\heightof{T}}[0pt][0pt]{\index{APDU\_CASE\_1@{APDU\_CASE\_1}!sim.h@{sim.h}}\index{sim.h@{sim.h}!APDU\_CASE\_1@{APDU\_CASE\_1}}}\mbox{\label{sim_8h_a18fa3961483d9fc22a1da3b6f9cd7107ac20301ef5253f071ea5a6abd9d2e6359}} 
APDU\+\_\+\+CASE\+\_\+1&command header, no command data field, no response data field \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{APDU\_CASE\_2S@{APDU\_CASE\_2S}!sim.h@{sim.h}}\index{sim.h@{sim.h}!APDU\_CASE\_2S@{APDU\_CASE\_2S}}}\mbox{\label{sim_8h_a18fa3961483d9fc22a1da3b6f9cd7107aad9a696d15f784622619586ae053fcc7}} 
APDU\+\_\+\+CASE\+\_\+2S&command header, no command data field, response data field (short) \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{APDU\_CASE\_2E@{APDU\_CASE\_2E}!sim.h@{sim.h}}\index{sim.h@{sim.h}!APDU\_CASE\_2E@{APDU\_CASE\_2E}}}\mbox{\label{sim_8h_a18fa3961483d9fc22a1da3b6f9cd7107a7635049efc14a8a293936b4dbae9cc4f}} 
APDU\+\_\+\+CASE\+\_\+2E&command header, no command data field, response data field (extended) \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{APDU\_CASE\_3S@{APDU\_CASE\_3S}!sim.h@{sim.h}}\index{sim.h@{sim.h}!APDU\_CASE\_3S@{APDU\_CASE\_3S}}}\mbox{\label{sim_8h_a18fa3961483d9fc22a1da3b6f9cd7107a84e9dd1ccd77bd37b57b054eecbf64cd}} 
APDU\+\_\+\+CASE\+\_\+3S&command header, command data field (short), no response data field \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{APDU\_CASE\_3E@{APDU\_CASE\_3E}!sim.h@{sim.h}}\index{sim.h@{sim.h}!APDU\_CASE\_3E@{APDU\_CASE\_3E}}}\mbox{\label{sim_8h_a18fa3961483d9fc22a1da3b6f9cd7107a29cd53dd96fb68525e02bcd46d1bacc6}} 
APDU\+\_\+\+CASE\+\_\+3E&command header, command data field (extended), no response data field \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{APDU\_CASE\_4S@{APDU\_CASE\_4S}!sim.h@{sim.h}}\index{sim.h@{sim.h}!APDU\_CASE\_4S@{APDU\_CASE\_4S}}}\mbox{\label{sim_8h_a18fa3961483d9fc22a1da3b6f9cd7107a49d995210fe6b9c0c72391ed0e417319}} 
APDU\+\_\+\+CASE\+\_\+4S&command header, command data field (short), response data field (short) \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{APDU\_CASE\_4E@{APDU\_CASE\_4E}!sim.h@{sim.h}}\index{sim.h@{sim.h}!APDU\_CASE\_4E@{APDU\_CASE\_4E}}}\mbox{\label{sim_8h_a18fa3961483d9fc22a1da3b6f9cd7107a9f997b707ab28fa1d6145edcc3271002}} 
APDU\+\_\+\+CASE\+\_\+4E&command header, command data field (extended), response data field (extended) \\
\hline

\end{DoxyEnumFields}
\mbox{\label{sim_8h_a2b204c58c0ce8c47302f83329bc447e5}} 
\index{sim.h@{sim.h}!osim\_card\_sw\_class@{osim\_card\_sw\_class}}
\index{osim\_card\_sw\_class@{osim\_card\_sw\_class}!sim.h@{sim.h}}
\doxysubsubsection{osim\_card\_sw\_class}
{\footnotesize\ttfamily enum \textbf{ osim\+\_\+card\+\_\+sw\+\_\+class}}

\begin{DoxyEnumFields}{Enumerator}
\raisebox{\heightof{T}}[0pt][0pt]{\index{SW\_CLS\_NONE@{SW\_CLS\_NONE}!sim.h@{sim.h}}\index{sim.h@{sim.h}!SW\_CLS\_NONE@{SW\_CLS\_NONE}}}\mbox{\label{sim_8h_a2b204c58c0ce8c47302f83329bc447e5a388013f9184f9d2f1319aa3389eb69dd}} 
SW\+\_\+\+CLS\+\_\+\+NONE&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{SW\_CLS\_OK@{SW\_CLS\_OK}!sim.h@{sim.h}}\index{sim.h@{sim.h}!SW\_CLS\_OK@{SW\_CLS\_OK}}}\mbox{\label{sim_8h_a2b204c58c0ce8c47302f83329bc447e5a71aecb3ef2a729c57c90882c5d507d57}} 
SW\+\_\+\+CLS\+\_\+\+OK&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{SW\_CLS\_POSTP@{SW\_CLS\_POSTP}!sim.h@{sim.h}}\index{sim.h@{sim.h}!SW\_CLS\_POSTP@{SW\_CLS\_POSTP}}}\mbox{\label{sim_8h_a2b204c58c0ce8c47302f83329bc447e5ad44e8f70026057ee54c35d4833c331a3}} 
SW\+\_\+\+CLS\+\_\+\+POSTP&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{SW\_CLS\_WARN@{SW\_CLS\_WARN}!sim.h@{sim.h}}\index{sim.h@{sim.h}!SW\_CLS\_WARN@{SW\_CLS\_WARN}}}\mbox{\label{sim_8h_a2b204c58c0ce8c47302f83329bc447e5a31aa5d8916ab6975ac2afe2354987f43}} 
SW\+\_\+\+CLS\+\_\+\+WARN&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{SW\_CLS\_ERROR@{SW\_CLS\_ERROR}!sim.h@{sim.h}}\index{sim.h@{sim.h}!SW\_CLS\_ERROR@{SW\_CLS\_ERROR}}}\mbox{\label{sim_8h_a2b204c58c0ce8c47302f83329bc447e5ad14c2b7935ea7e17a2ea4658e95ba220}} 
SW\+\_\+\+CLS\+\_\+\+ERROR&\\
\hline

\end{DoxyEnumFields}
\mbox{\label{sim_8h_acab828a9d2a82403b16f01ac362b464f}} 
\index{sim.h@{sim.h}!osim\_card\_sw\_type@{osim\_card\_sw\_type}}
\index{osim\_card\_sw\_type@{osim\_card\_sw\_type}!sim.h@{sim.h}}
\doxysubsubsection{osim\_card\_sw\_type}
{\footnotesize\ttfamily enum \textbf{ osim\+\_\+card\+\_\+sw\+\_\+type}}

\begin{DoxyEnumFields}{Enumerator}
\raisebox{\heightof{T}}[0pt][0pt]{\index{SW\_TYPE\_NONE@{SW\_TYPE\_NONE}!sim.h@{sim.h}}\index{sim.h@{sim.h}!SW\_TYPE\_NONE@{SW\_TYPE\_NONE}}}\mbox{\label{sim_8h_acab828a9d2a82403b16f01ac362b464fa98441b310ec3ebf89ce0d1da587b23c2}} 
SW\+\_\+\+TYPE\+\_\+\+NONE&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{SW\_TYPE\_STR@{SW\_TYPE\_STR}!sim.h@{sim.h}}\index{sim.h@{sim.h}!SW\_TYPE\_STR@{SW\_TYPE\_STR}}}\mbox{\label{sim_8h_acab828a9d2a82403b16f01ac362b464fa3db7236e8266f49424be149339009158}} 
SW\+\_\+\+TYPE\+\_\+\+STR&\\
\hline

\end{DoxyEnumFields}
\mbox{\label{sim_8h_aee4e50d1dec71a64ba1993314358d6a1}} 
\index{sim.h@{sim.h}!osim\_ef\_type@{osim\_ef\_type}}
\index{osim\_ef\_type@{osim\_ef\_type}!sim.h@{sim.h}}
\doxysubsubsection{osim\_ef\_type}
{\footnotesize\ttfamily enum \textbf{ osim\+\_\+ef\+\_\+type}}

\begin{DoxyEnumFields}{Enumerator}
\raisebox{\heightof{T}}[0pt][0pt]{\index{EF\_TYPE\_TRANSP@{EF\_TYPE\_TRANSP}!sim.h@{sim.h}}\index{sim.h@{sim.h}!EF\_TYPE\_TRANSP@{EF\_TYPE\_TRANSP}}}\mbox{\label{sim_8h_aee4e50d1dec71a64ba1993314358d6a1a022fbfb712ead67e500cb117dd4f286a}} 
EF\+\_\+\+TYPE\+\_\+\+TRANSP&Transparent EF. \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{EF\_TYPE\_RECORD\_FIXED@{EF\_TYPE\_RECORD\_FIXED}!sim.h@{sim.h}}\index{sim.h@{sim.h}!EF\_TYPE\_RECORD\_FIXED@{EF\_TYPE\_RECORD\_FIXED}}}\mbox{\label{sim_8h_aee4e50d1dec71a64ba1993314358d6a1a243729be1158d825040a843030868b0d}} 
EF\+\_\+\+TYPE\+\_\+\+RECORD\+\_\+\+FIXED&Fixed-\/\+Size Record EF. \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{EF\_TYPE\_RECORD\_CYCLIC@{EF\_TYPE\_RECORD\_CYCLIC}!sim.h@{sim.h}}\index{sim.h@{sim.h}!EF\_TYPE\_RECORD\_CYCLIC@{EF\_TYPE\_RECORD\_CYCLIC}}}\mbox{\label{sim_8h_aee4e50d1dec71a64ba1993314358d6a1a47a6193ae37b450713aa1f1591dd17e3}} 
EF\+\_\+\+TYPE\+\_\+\+RECORD\+\_\+\+CYCLIC&Cyclic Record EF. \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{EF\_TYPE\_KEY@{EF\_TYPE\_KEY}!sim.h@{sim.h}}\index{sim.h@{sim.h}!EF\_TYPE\_KEY@{EF\_TYPE\_KEY}}}\mbox{\label{sim_8h_aee4e50d1dec71a64ba1993314358d6a1ad6e88c1da4f40f89f49ccb84ff063db7}} 
EF\+\_\+\+TYPE\+\_\+\+KEY&Key file as used in TETRA. \\
\hline

\end{DoxyEnumFields}
\mbox{\label{sim_8h_a7044e2eb079fd6d31567cab46f461124}} 
\index{sim.h@{sim.h}!osim\_element\_repr@{osim\_element\_repr}}
\index{osim\_element\_repr@{osim\_element\_repr}!sim.h@{sim.h}}
\doxysubsubsection{osim\_element\_repr}
{\footnotesize\ttfamily enum \textbf{ osim\+\_\+element\+\_\+repr}}

\begin{DoxyEnumFields}{Enumerator}
\raisebox{\heightof{T}}[0pt][0pt]{\index{ELEM\_REPR\_NONE@{ELEM\_REPR\_NONE}!sim.h@{sim.h}}\index{sim.h@{sim.h}!ELEM\_REPR\_NONE@{ELEM\_REPR\_NONE}}}\mbox{\label{sim_8h_a7044e2eb079fd6d31567cab46f461124adb74c95a70034dbf72ebb64445c13635}} 
ELEM\+\_\+\+REPR\+\_\+\+NONE&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{ELEM\_REPR\_DEC@{ELEM\_REPR\_DEC}!sim.h@{sim.h}}\index{sim.h@{sim.h}!ELEM\_REPR\_DEC@{ELEM\_REPR\_DEC}}}\mbox{\label{sim_8h_a7044e2eb079fd6d31567cab46f461124aca3b46718266a997224ad6b6cfacbe80}} 
ELEM\+\_\+\+REPR\+\_\+\+DEC&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{ELEM\_REPR\_HEX@{ELEM\_REPR\_HEX}!sim.h@{sim.h}}\index{sim.h@{sim.h}!ELEM\_REPR\_HEX@{ELEM\_REPR\_HEX}}}\mbox{\label{sim_8h_a7044e2eb079fd6d31567cab46f461124a8b9777198e655e839279b3fe46ae748c}} 
ELEM\+\_\+\+REPR\+\_\+\+HEX&\\
\hline

\end{DoxyEnumFields}
\mbox{\label{sim_8h_a9177d8d591c65d72055102b9f15de863}} 
\index{sim.h@{sim.h}!osim\_element\_type@{osim\_element\_type}}
\index{osim\_element\_type@{osim\_element\_type}!sim.h@{sim.h}}
\doxysubsubsection{osim\_element\_type}
{\footnotesize\ttfamily enum \textbf{ osim\+\_\+element\+\_\+type}}

\begin{DoxyEnumFields}{Enumerator}
\raisebox{\heightof{T}}[0pt][0pt]{\index{ELEM\_T\_NONE@{ELEM\_T\_NONE}!sim.h@{sim.h}}\index{sim.h@{sim.h}!ELEM\_T\_NONE@{ELEM\_T\_NONE}}}\mbox{\label{sim_8h_a9177d8d591c65d72055102b9f15de863af5e542e6c2fd5968562821401e6227d4}} 
ELEM\+\_\+\+T\+\_\+\+NONE&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{ELEM\_T\_BOOL@{ELEM\_T\_BOOL}!sim.h@{sim.h}}\index{sim.h@{sim.h}!ELEM\_T\_BOOL@{ELEM\_T\_BOOL}}}\mbox{\label{sim_8h_a9177d8d591c65d72055102b9f15de863a6ed35cc4581f701f4631c99d4248fbad}} 
ELEM\+\_\+\+T\+\_\+\+BOOL&a boolean flag \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{ELEM\_T\_UINT8@{ELEM\_T\_UINT8}!sim.h@{sim.h}}\index{sim.h@{sim.h}!ELEM\_T\_UINT8@{ELEM\_T\_UINT8}}}\mbox{\label{sim_8h_a9177d8d591c65d72055102b9f15de863a96fb72ece305d57e8fc42408ae0463ee}} 
ELEM\+\_\+\+T\+\_\+\+UINT8&unsigned integer \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{ELEM\_T\_UINT16@{ELEM\_T\_UINT16}!sim.h@{sim.h}}\index{sim.h@{sim.h}!ELEM\_T\_UINT16@{ELEM\_T\_UINT16}}}\mbox{\label{sim_8h_a9177d8d591c65d72055102b9f15de863a0ffa29c460e0ad9b6080018b8782a452}} 
ELEM\+\_\+\+T\+\_\+\+UINT16&unsigned integer \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{ELEM\_T\_UINT32@{ELEM\_T\_UINT32}!sim.h@{sim.h}}\index{sim.h@{sim.h}!ELEM\_T\_UINT32@{ELEM\_T\_UINT32}}}\mbox{\label{sim_8h_a9177d8d591c65d72055102b9f15de863a1b615fe9f8ff4f33044948bca651d14f}} 
ELEM\+\_\+\+T\+\_\+\+UINT32&unsigned integer \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{ELEM\_T\_STRING@{ELEM\_T\_STRING}!sim.h@{sim.h}}\index{sim.h@{sim.h}!ELEM\_T\_STRING@{ELEM\_T\_STRING}}}\mbox{\label{sim_8h_a9177d8d591c65d72055102b9f15de863a7fddfca0b2a1c91858d3e780188f57a7}} 
ELEM\+\_\+\+T\+\_\+\+STRING&generic string \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{ELEM\_T\_BCD@{ELEM\_T\_BCD}!sim.h@{sim.h}}\index{sim.h@{sim.h}!ELEM\_T\_BCD@{ELEM\_T\_BCD}}}\mbox{\label{sim_8h_a9177d8d591c65d72055102b9f15de863a75bc294aa87686cd4793f1a8643251b5}} 
ELEM\+\_\+\+T\+\_\+\+BCD&BCD encoded digits. \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{ELEM\_T\_BYTES@{ELEM\_T\_BYTES}!sim.h@{sim.h}}\index{sim.h@{sim.h}!ELEM\_T\_BYTES@{ELEM\_T\_BYTES}}}\mbox{\label{sim_8h_a9177d8d591c65d72055102b9f15de863a85ffc4856ba8f65e5a5b435c77e2ee70}} 
ELEM\+\_\+\+T\+\_\+\+BYTES&BCD encoded digits. \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{ELEM\_T\_GROUP@{ELEM\_T\_GROUP}!sim.h@{sim.h}}\index{sim.h@{sim.h}!ELEM\_T\_GROUP@{ELEM\_T\_GROUP}}}\mbox{\label{sim_8h_a9177d8d591c65d72055102b9f15de863a488372fc9ed98f92ac9ca9f219c957ab}} 
ELEM\+\_\+\+T\+\_\+\+GROUP&group container, has siblings \\
\hline

\end{DoxyEnumFields}
\mbox{\label{sim_8h_a38d77cdbd659621c32fe0724917b5fcd}} 
\index{sim.h@{sim.h}!osim\_file\_type@{osim\_file\_type}}
\index{osim\_file\_type@{osim\_file\_type}!sim.h@{sim.h}}
\doxysubsubsection{osim\_file\_type}
{\footnotesize\ttfamily enum \textbf{ osim\+\_\+file\+\_\+type}}

\begin{DoxyEnumFields}{Enumerator}
\raisebox{\heightof{T}}[0pt][0pt]{\index{TYPE\_NONE@{TYPE\_NONE}!sim.h@{sim.h}}\index{sim.h@{sim.h}!TYPE\_NONE@{TYPE\_NONE}}}\mbox{\label{sim_8h_a38d77cdbd659621c32fe0724917b5fcda01a66f4d8d66e4614c1c900c5a1c37ff}} 
TYPE\+\_\+\+NONE&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{TYPE\_DF@{TYPE\_DF}!sim.h@{sim.h}}\index{sim.h@{sim.h}!TYPE\_DF@{TYPE\_DF}}}\mbox{\label{sim_8h_a38d77cdbd659621c32fe0724917b5fcdab05ad0c3fc1bc5b3f4a3d7ad0b51c2e4}} 
TYPE\+\_\+\+DF&Dedicated File. \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{TYPE\_ADF@{TYPE\_ADF}!sim.h@{sim.h}}\index{sim.h@{sim.h}!TYPE\_ADF@{TYPE\_ADF}}}\mbox{\label{sim_8h_a38d77cdbd659621c32fe0724917b5fcda4e630b95beccfaeb563bfc1914d11140}} 
TYPE\+\_\+\+ADF&Application Dedicated File. \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{TYPE\_EF@{TYPE\_EF}!sim.h@{sim.h}}\index{sim.h@{sim.h}!TYPE\_EF@{TYPE\_EF}}}\mbox{\label{sim_8h_a38d77cdbd659621c32fe0724917b5fcda6079bae7e02bd33f6ffbc80bd3dad288}} 
TYPE\+\_\+\+EF&Entry File. \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{TYPE\_EF\_INT@{TYPE\_EF\_INT}!sim.h@{sim.h}}\index{sim.h@{sim.h}!TYPE\_EF\_INT@{TYPE\_EF\_INT}}}\mbox{\label{sim_8h_a38d77cdbd659621c32fe0724917b5fcdae3eb90c9f84114862ce0a8f5fc1e356d}} 
TYPE\+\_\+\+EF\+\_\+\+INT&Internal Entry File. \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{TYPE\_MF@{TYPE\_MF}!sim.h@{sim.h}}\index{sim.h@{sim.h}!TYPE\_MF@{TYPE\_MF}}}\mbox{\label{sim_8h_a38d77cdbd659621c32fe0724917b5fcda27fe72b3e083a3004a362104c108feee}} 
TYPE\+\_\+\+MF&Master File. \\
\hline

\end{DoxyEnumFields}
\mbox{\label{sim_8h_a0bdcd0dbd3e470525507b6e093e194bd}} 
\index{sim.h@{sim.h}!osim\_proto@{osim\_proto}}
\index{osim\_proto@{osim\_proto}!sim.h@{sim.h}}
\doxysubsubsection{osim\_proto}
{\footnotesize\ttfamily enum \textbf{ osim\+\_\+proto}}

\begin{DoxyEnumFields}{Enumerator}
\raisebox{\heightof{T}}[0pt][0pt]{\index{OSIM\_PROTO\_T0@{OSIM\_PROTO\_T0}!sim.h@{sim.h}}\index{sim.h@{sim.h}!OSIM\_PROTO\_T0@{OSIM\_PROTO\_T0}}}\mbox{\label{sim_8h_a0bdcd0dbd3e470525507b6e093e194bda32e687b6b4d9a682e04bb79df74ca798}} 
OSIM\+\_\+\+PROTO\+\_\+\+T0&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{OSIM\_PROTO\_T1@{OSIM\_PROTO\_T1}!sim.h@{sim.h}}\index{sim.h@{sim.h}!OSIM\_PROTO\_T1@{OSIM\_PROTO\_T1}}}\mbox{\label{sim_8h_a0bdcd0dbd3e470525507b6e093e194bda001508c8c38e3b81887a097bea3a3b94}} 
OSIM\+\_\+\+PROTO\+\_\+\+T1&\\
\hline

\end{DoxyEnumFields}
\mbox{\label{sim_8h_aee6db897833233161af2bc3f60e00e7a}} 
\index{sim.h@{sim.h}!osim\_reader\_driver@{osim\_reader\_driver}}
\index{osim\_reader\_driver@{osim\_reader\_driver}!sim.h@{sim.h}}
\doxysubsubsection{osim\_reader\_driver}
{\footnotesize\ttfamily enum \textbf{ osim\+\_\+reader\+\_\+driver}}

\begin{DoxyEnumFields}{Enumerator}
\raisebox{\heightof{T}}[0pt][0pt]{\index{OSIM\_READER\_DRV\_PCSC@{OSIM\_READER\_DRV\_PCSC}!sim.h@{sim.h}}\index{sim.h@{sim.h}!OSIM\_READER\_DRV\_PCSC@{OSIM\_READER\_DRV\_PCSC}}}\mbox{\label{sim_8h_aee6db897833233161af2bc3f60e00e7aaee27347a043fa4a8c17933fdaa4dd28f}} 
OSIM\+\_\+\+READER\+\_\+\+DRV\+\_\+\+PCSC&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{OSIM\_READER\_DRV\_OPENCT@{OSIM\_READER\_DRV\_OPENCT}!sim.h@{sim.h}}\index{sim.h@{sim.h}!OSIM\_READER\_DRV\_OPENCT@{OSIM\_READER\_DRV\_OPENCT}}}\mbox{\label{sim_8h_aee6db897833233161af2bc3f60e00e7aa58305226d01e8fdfc2c3f8ed07a0a3e2}} 
OSIM\+\_\+\+READER\+\_\+\+DRV\+\_\+\+OPENCT&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{OSIM\_READER\_DRV\_SERIAL@{OSIM\_READER\_DRV\_SERIAL}!sim.h@{sim.h}}\index{sim.h@{sim.h}!OSIM\_READER\_DRV\_SERIAL@{OSIM\_READER\_DRV\_SERIAL}}}\mbox{\label{sim_8h_aee6db897833233161af2bc3f60e00e7aa0b84c4bffde8609a29d042a43797f1e9}} 
OSIM\+\_\+\+READER\+\_\+\+DRV\+\_\+\+SERIAL&\\
\hline

\end{DoxyEnumFields}
\mbox{\label{sim_8h_a415329f464fea85fac3f5879f2073739}} 
\index{sim.h@{sim.h}!ts102221\_fcp\_tag@{ts102221\_fcp\_tag}}
\index{ts102221\_fcp\_tag@{ts102221\_fcp\_tag}!sim.h@{sim.h}}
\doxysubsubsection{ts102221\_fcp\_tag}
{\footnotesize\ttfamily enum \textbf{ ts102221\+\_\+fcp\+\_\+tag}}

\begin{DoxyEnumFields}{Enumerator}
\raisebox{\heightof{T}}[0pt][0pt]{\index{UICC\_FCP\_T\_FCP@{UICC\_FCP\_T\_FCP}!sim.h@{sim.h}}\index{sim.h@{sim.h}!UICC\_FCP\_T\_FCP@{UICC\_FCP\_T\_FCP}}}\mbox{\label{sim_8h_a415329f464fea85fac3f5879f2073739a2ea5c36b0a625071d871182419c394ac}} 
UICC\+\_\+\+FCP\+\_\+\+T\+\_\+\+FCP&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{UICC\_FCP\_T\_FILE\_SIZE@{UICC\_FCP\_T\_FILE\_SIZE}!sim.h@{sim.h}}\index{sim.h@{sim.h}!UICC\_FCP\_T\_FILE\_SIZE@{UICC\_FCP\_T\_FILE\_SIZE}}}\mbox{\label{sim_8h_a415329f464fea85fac3f5879f2073739a45a07b57f4d4d3cd7614be768106448d}} 
UICC\+\_\+\+FCP\+\_\+\+T\+\_\+\+FILE\+\_\+\+SIZE&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{UICC\_FCP\_T\_TOT\_F\_SIZE@{UICC\_FCP\_T\_TOT\_F\_SIZE}!sim.h@{sim.h}}\index{sim.h@{sim.h}!UICC\_FCP\_T\_TOT\_F\_SIZE@{UICC\_FCP\_T\_TOT\_F\_SIZE}}}\mbox{\label{sim_8h_a415329f464fea85fac3f5879f2073739ac558c97fdedafc1e0e25d7edd4cfa819}} 
UICC\+\_\+\+FCP\+\_\+\+T\+\_\+\+TOT\+\_\+\+F\+\_\+\+SIZE&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{UICC\_FCP\_T\_FILE\_DESC@{UICC\_FCP\_T\_FILE\_DESC}!sim.h@{sim.h}}\index{sim.h@{sim.h}!UICC\_FCP\_T\_FILE\_DESC@{UICC\_FCP\_T\_FILE\_DESC}}}\mbox{\label{sim_8h_a415329f464fea85fac3f5879f2073739a08d8a549b7e769d12f63166f38026a4a}} 
UICC\+\_\+\+FCP\+\_\+\+T\+\_\+\+FILE\+\_\+\+DESC&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{UICC\_FCP\_T\_FILE\_ID@{UICC\_FCP\_T\_FILE\_ID}!sim.h@{sim.h}}\index{sim.h@{sim.h}!UICC\_FCP\_T\_FILE\_ID@{UICC\_FCP\_T\_FILE\_ID}}}\mbox{\label{sim_8h_a415329f464fea85fac3f5879f2073739a20e6c35a63b86f720e526339113129a5}} 
UICC\+\_\+\+FCP\+\_\+\+T\+\_\+\+FILE\+\_\+\+ID&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{UICC\_FCP\_T\_DF\_NAME@{UICC\_FCP\_T\_DF\_NAME}!sim.h@{sim.h}}\index{sim.h@{sim.h}!UICC\_FCP\_T\_DF\_NAME@{UICC\_FCP\_T\_DF\_NAME}}}\mbox{\label{sim_8h_a415329f464fea85fac3f5879f2073739a761643cd62bf19fe429e27080086980e}} 
UICC\+\_\+\+FCP\+\_\+\+T\+\_\+\+DF\+\_\+\+NAME&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{UICC\_FCP\_T\_SFID@{UICC\_FCP\_T\_SFID}!sim.h@{sim.h}}\index{sim.h@{sim.h}!UICC\_FCP\_T\_SFID@{UICC\_FCP\_T\_SFID}}}\mbox{\label{sim_8h_a415329f464fea85fac3f5879f2073739a60066f7dc6ef33980f1548c8c15c2988}} 
UICC\+\_\+\+FCP\+\_\+\+T\+\_\+\+SFID&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{UICC\_FCP\_T\_LIFEC\_STS@{UICC\_FCP\_T\_LIFEC\_STS}!sim.h@{sim.h}}\index{sim.h@{sim.h}!UICC\_FCP\_T\_LIFEC\_STS@{UICC\_FCP\_T\_LIFEC\_STS}}}\mbox{\label{sim_8h_a415329f464fea85fac3f5879f2073739a8dab5fbee9cdec5100c48dc0a5c93586}} 
UICC\+\_\+\+FCP\+\_\+\+T\+\_\+\+LIFEC\+\_\+\+STS&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{UICC\_FCP\_T\_SEC\_ATTR\_REFEXP@{UICC\_FCP\_T\_SEC\_ATTR\_REFEXP}!sim.h@{sim.h}}\index{sim.h@{sim.h}!UICC\_FCP\_T\_SEC\_ATTR\_REFEXP@{UICC\_FCP\_T\_SEC\_ATTR\_REFEXP}}}\mbox{\label{sim_8h_a415329f464fea85fac3f5879f2073739a7cb563b8d93b2dc11a8456b1f0e3d2b3}} 
UICC\+\_\+\+FCP\+\_\+\+T\+\_\+\+SEC\+\_\+\+ATTR\+\_\+\+REFEXP&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{UICC\_FCP\_T\_SEC\_ATTR\_COMP@{UICC\_FCP\_T\_SEC\_ATTR\_COMP}!sim.h@{sim.h}}\index{sim.h@{sim.h}!UICC\_FCP\_T\_SEC\_ATTR\_COMP@{UICC\_FCP\_T\_SEC\_ATTR\_COMP}}}\mbox{\label{sim_8h_a415329f464fea85fac3f5879f2073739a2107c146021b71b17807a68fbb24cd1b}} 
UICC\+\_\+\+FCP\+\_\+\+T\+\_\+\+SEC\+\_\+\+ATTR\+\_\+\+COMP&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{UICC\_FCP\_T\_PROPRIETARY@{UICC\_FCP\_T\_PROPRIETARY}!sim.h@{sim.h}}\index{sim.h@{sim.h}!UICC\_FCP\_T\_PROPRIETARY@{UICC\_FCP\_T\_PROPRIETARY}}}\mbox{\label{sim_8h_a415329f464fea85fac3f5879f2073739a2eb6fc4016e905c456db8ca36b210396}} 
UICC\+\_\+\+FCP\+\_\+\+T\+\_\+\+PROPRIETARY&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{UICC\_FCP\_T\_SEC\_ATTR\_EXP@{UICC\_FCP\_T\_SEC\_ATTR\_EXP}!sim.h@{sim.h}}\index{sim.h@{sim.h}!UICC\_FCP\_T\_SEC\_ATTR\_EXP@{UICC\_FCP\_T\_SEC\_ATTR\_EXP}}}\mbox{\label{sim_8h_a415329f464fea85fac3f5879f2073739a8f8a8655eedee80c52e80f3ebbaa3ab5}} 
UICC\+\_\+\+FCP\+\_\+\+T\+\_\+\+SEC\+\_\+\+ATTR\+\_\+\+EXP&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{UICC\_FCP\_T\_PIN\_STS\_DO@{UICC\_FCP\_T\_PIN\_STS\_DO}!sim.h@{sim.h}}\index{sim.h@{sim.h}!UICC\_FCP\_T\_PIN\_STS\_DO@{UICC\_FCP\_T\_PIN\_STS\_DO}}}\mbox{\label{sim_8h_a415329f464fea85fac3f5879f2073739aa33e85cb86954d5a89d22128128a68b8}} 
UICC\+\_\+\+FCP\+\_\+\+T\+\_\+\+PIN\+\_\+\+STS\+\_\+\+DO&\\
\hline

\end{DoxyEnumFields}


\doxysubsection{Function Documentation}
\mbox{\label{sim_8h_a7f0c949ab65eaeb1084d8d0d700db3d2}} 
\index{sim.h@{sim.h}!\_\_attribute\_\_@{\_\_attribute\_\_}}
\index{\_\_attribute\_\_@{\_\_attribute\_\_}!sim.h@{sim.h}}
\doxysubsubsection{\_\_attribute\_\_()}
{\footnotesize\ttfamily struct \textbf{ osim\+\_\+msgb\+\_\+cb} \+\_\+\+\_\+attribute\+\_\+\+\_\+ (\begin{DoxyParamCaption}\item[{(\+\_\+\+\_\+may\+\_\+alias\+\_\+\+\_\+)}]{ }\end{DoxyParamCaption})}

\mbox{\label{sim_8h_ab2cae1c97f978efae5dea91076d1b8c5}} 
\index{sim.h@{sim.h}!osim\_app\_profile\_find\_by\_aid@{osim\_app\_profile\_find\_by\_aid}}
\index{osim\_app\_profile\_find\_by\_aid@{osim\_app\_profile\_find\_by\_aid}!sim.h@{sim.h}}
\doxysubsubsection{osim\_app\_profile\_find\_by\_aid()}
{\footnotesize\ttfamily const struct \textbf{ osim\+\_\+card\+\_\+app\+\_\+profile} $\ast$ osim\+\_\+app\+\_\+profile\+\_\+find\+\_\+by\+\_\+aid (\begin{DoxyParamCaption}\item[{const uint8\+\_\+t $\ast$}]{aid,  }\item[{uint8\+\_\+t}]{aid\+\_\+len }\end{DoxyParamCaption})}



Find any registered application profile based on its AID. 



References \textbf{ osim\+\_\+card\+\_\+app\+\_\+profile\+::aid}, \textbf{ osim\+\_\+card\+\_\+app\+\_\+profile\+::aid\+\_\+len}, \textbf{ osim\+\_\+card\+\_\+app\+\_\+profile\+::list}, and \textbf{ llist\+\_\+for\+\_\+each\+\_\+entry}.



Referenced by \textbf{ osim\+\_\+app\+\_\+profile\+\_\+register()}, and \textbf{ osim\+\_\+card\+\_\+hdl\+\_\+add\+\_\+app()}.

\mbox{\label{sim_8h_a1af2c427e38473dd42c5977e9b2c843f}} 
\index{sim.h@{sim.h}!osim\_app\_profile\_find\_by\_name@{osim\_app\_profile\_find\_by\_name}}
\index{osim\_app\_profile\_find\_by\_name@{osim\_app\_profile\_find\_by\_name}!sim.h@{sim.h}}
\doxysubsubsection{osim\_app\_profile\_find\_by\_name()}
{\footnotesize\ttfamily const struct \textbf{ osim\+\_\+card\+\_\+app\+\_\+profile} $\ast$ osim\+\_\+app\+\_\+profile\+\_\+find\+\_\+by\+\_\+name (\begin{DoxyParamCaption}\item[{const char $\ast$}]{name }\end{DoxyParamCaption})}



Find any registered application profile based on its name (e.\+g. 

\char`\"{}\+ADF.\+USIM\char`\"{}) 

References \textbf{ osim\+\_\+card\+\_\+app\+\_\+profile\+::list}, \textbf{ llist\+\_\+for\+\_\+each\+\_\+entry}, \textbf{ name}, and \textbf{ osim\+\_\+card\+\_\+app\+\_\+profile\+::name}.



Referenced by \textbf{ osim\+\_\+app\+\_\+profile\+\_\+register()}.

\mbox{\label{sim_8h_a673de5082794b80a75fedec73403dd7f}} 
\index{sim.h@{sim.h}!osim\_app\_profile\_find\_sw@{osim\_app\_profile\_find\_sw}}
\index{osim\_app\_profile\_find\_sw@{osim\_app\_profile\_find\_sw}!sim.h@{sim.h}}
\doxysubsubsection{osim\_app\_profile\_find\_sw()}
{\footnotesize\ttfamily const struct \textbf{ osim\+\_\+card\+\_\+sw} $\ast$ osim\+\_\+app\+\_\+profile\+\_\+find\+\_\+sw (\begin{DoxyParamCaption}\item[{const struct \textbf{ osim\+\_\+card\+\_\+app\+\_\+profile} $\ast$}]{ap,  }\item[{uint16\+\_\+t}]{sw\+\_\+in }\end{DoxyParamCaption})}



Find application-\/specific status word within given card application profile. 



References \textbf{ sw}, and \textbf{ osim\+\_\+card\+\_\+app\+\_\+profile\+::sw}.



Referenced by \textbf{ osim\+\_\+print\+\_\+sw\+\_\+buf()}, and \textbf{ osim\+\_\+sw\+\_\+class()}.

\mbox{\label{sim_8h_a41af2a461b449e304a704eba35bf20aa}} 
\index{sim.h@{sim.h}!osim\_card\_close@{osim\_card\_close}}
\index{osim\_card\_close@{osim\_card\_close}!sim.h@{sim.h}}
\doxysubsubsection{osim\_card\_close()}
{\footnotesize\ttfamily int osim\+\_\+card\+\_\+close (\begin{DoxyParamCaption}\item[{struct \textbf{ osim\+\_\+card\+\_\+hdl} $\ast$}]{card }\end{DoxyParamCaption})}



References \textbf{ osim\+\_\+reader\+\_\+hdl\+::card}, \textbf{ osim\+\_\+reader\+\_\+ops\+::card\+\_\+close}, \textbf{ osim\+\_\+reader\+\_\+hdl\+::ops}, and \textbf{ osim\+\_\+card\+\_\+hdl\+::reader}.

\mbox{\label{sim_8h_ad0a4d51bef9b52e529c0a10cd42c1b7d}} 
\index{sim.h@{sim.h}!osim\_card\_hdl\_add\_app@{osim\_card\_hdl\_add\_app}}
\index{osim\_card\_hdl\_add\_app@{osim\_card\_hdl\_add\_app}!sim.h@{sim.h}}
\doxysubsubsection{osim\_card\_hdl\_add\_app()}
{\footnotesize\ttfamily int osim\+\_\+card\+\_\+hdl\+\_\+add\+\_\+app (\begin{DoxyParamCaption}\item[{struct \textbf{ osim\+\_\+card\+\_\+hdl} $\ast$}]{ch,  }\item[{const uint8\+\_\+t $\ast$}]{aid,  }\item[{uint8\+\_\+t}]{aid\+\_\+len,  }\item[{const char $\ast$}]{label }\end{DoxyParamCaption})}



Add an application to a given card. 



References \textbf{ osim\+\_\+card\+\_\+app\+\_\+hdl\+::aid}, \textbf{ osim\+\_\+card\+\_\+app\+\_\+hdl\+::aid\+\_\+len}, \textbf{ osim\+\_\+card\+\_\+hdl\+::apps}, \textbf{ osim\+\_\+card\+\_\+app\+\_\+hdl\+::label}, \textbf{ osim\+\_\+card\+\_\+app\+\_\+hdl\+::list}, \textbf{ llist\+\_\+add\+\_\+tail()}, \textbf{ MAX\+\_\+\+AID\+\_\+\+LEN}, \textbf{ osim\+\_\+app\+\_\+profile\+\_\+find\+\_\+by\+\_\+aid()}, \textbf{ osim\+\_\+card\+\_\+hdl\+\_\+find\+\_\+app()}, and \textbf{ osim\+\_\+card\+\_\+app\+\_\+hdl\+::prof}.

\mbox{\label{sim_8h_af1c503b26556a3eecb43345cfdee9c6b}} 
\index{sim.h@{sim.h}!osim\_card\_open@{osim\_card\_open}}
\index{osim\_card\_open@{osim\_card\_open}!sim.h@{sim.h}}
\doxysubsubsection{osim\_card\_open()}
{\footnotesize\ttfamily struct \textbf{ osim\+\_\+card\+\_\+hdl} $\ast$ osim\+\_\+card\+\_\+open (\begin{DoxyParamCaption}\item[{struct \textbf{ osim\+\_\+reader\+\_\+hdl} $\ast$}]{rh,  }\item[{enum \textbf{ osim\+\_\+proto}}]{proto }\end{DoxyParamCaption})}



References \textbf{ osim\+\_\+reader\+\_\+ops\+::card\+\_\+open}, \textbf{ osim\+\_\+reader\+\_\+hdl\+::ops}, \textbf{ osim\+\_\+card\+\_\+hdl\+::proto}, and \textbf{ osim\+\_\+reader\+\_\+hdl\+::proto\+\_\+supported}.

\mbox{\label{sim_8h_a1cfcfad9aa83ac1f669796c6df872c68}} 
\index{sim.h@{sim.h}!osim\_card\_reset@{osim\_card\_reset}}
\index{osim\_card\_reset@{osim\_card\_reset}!sim.h@{sim.h}}
\doxysubsubsection{osim\_card\_reset()}
{\footnotesize\ttfamily int osim\+\_\+card\+\_\+reset (\begin{DoxyParamCaption}\item[{struct \textbf{ osim\+\_\+card\+\_\+hdl} $\ast$}]{card,  }\item[{bool}]{cold\+\_\+reset }\end{DoxyParamCaption})}



References \textbf{ osim\+\_\+reader\+\_\+hdl\+::card}, \textbf{ osim\+\_\+reader\+\_\+ops\+::card\+\_\+reset}, \textbf{ osim\+\_\+reader\+\_\+hdl\+::ops}, and \textbf{ osim\+\_\+card\+\_\+hdl\+::reader}.

\mbox{\label{sim_8h_a4cf2bc638943f63a295e97f0888e2a66}} 
\index{sim.h@{sim.h}!osim\_cprof\_find\_sw@{osim\_cprof\_find\_sw}}
\index{osim\_cprof\_find\_sw@{osim\_cprof\_find\_sw}!sim.h@{sim.h}}
\doxysubsubsection{osim\_cprof\_find\_sw()}
{\footnotesize\ttfamily const struct \textbf{ osim\+\_\+card\+\_\+sw} $\ast$ osim\+\_\+cprof\+\_\+find\+\_\+sw (\begin{DoxyParamCaption}\item[{const struct \textbf{ osim\+\_\+card\+\_\+profile} $\ast$}]{cp,  }\item[{uint16\+\_\+t}]{sw\+\_\+in }\end{DoxyParamCaption})}



Find status word within given card profile. 



References \textbf{ sw}, and \textbf{ osim\+\_\+card\+\_\+profile\+::sws}.



Referenced by \textbf{ osim\+\_\+print\+\_\+sw\+\_\+buf()}, and \textbf{ osim\+\_\+sw\+\_\+class()}.

\mbox{\label{sim_8h_a23aa361a207d1c07b93bc4ecbb1c1c5c}} 
\index{sim.h@{sim.h}!osim\_file\_desc\_find\_aid@{osim\_file\_desc\_find\_aid}}
\index{osim\_file\_desc\_find\_aid@{osim\_file\_desc\_find\_aid}!sim.h@{sim.h}}
\doxysubsubsection{osim\_file\_desc\_find\_aid()}
{\footnotesize\ttfamily struct \textbf{ osim\+\_\+file\+\_\+desc} $\ast$ osim\+\_\+file\+\_\+desc\+\_\+find\+\_\+aid (\begin{DoxyParamCaption}\item[{struct \textbf{ osim\+\_\+file\+\_\+desc} $\ast$}]{parent,  }\item[{const uint8\+\_\+t $\ast$}]{aid,  }\item[{uint8\+\_\+t}]{aid\+\_\+len }\end{DoxyParamCaption})}



References \textbf{ osim\+\_\+file\+\_\+desc\+::child\+\_\+list}, \textbf{ osim\+\_\+file\+\_\+desc\+::df\+\_\+name}, \textbf{ osim\+\_\+file\+\_\+desc\+::df\+\_\+name\+\_\+len}, \textbf{ osim\+\_\+file\+\_\+desc\+::list}, \textbf{ llist\+\_\+for\+\_\+each\+\_\+entry}, \textbf{ osim\+\_\+file\+\_\+desc\+::parent}, \textbf{ osim\+\_\+file\+\_\+desc\+::type}, and \textbf{ TYPE\+\_\+\+ADF}.

\mbox{\label{sim_8h_acd05c7cf1e03896a7c0ef569af395825}} 
\index{sim.h@{sim.h}!osim\_file\_desc\_find\_fid@{osim\_file\_desc\_find\_fid}}
\index{osim\_file\_desc\_find\_fid@{osim\_file\_desc\_find\_fid}!sim.h@{sim.h}}
\doxysubsubsection{osim\_file\_desc\_find\_fid()}
{\footnotesize\ttfamily struct \textbf{ osim\+\_\+file\+\_\+desc} $\ast$ osim\+\_\+file\+\_\+desc\+\_\+find\+\_\+fid (\begin{DoxyParamCaption}\item[{struct \textbf{ osim\+\_\+file\+\_\+desc} $\ast$}]{parent,  }\item[{uint16\+\_\+t}]{fid }\end{DoxyParamCaption})}



References \textbf{ osim\+\_\+file\+\_\+desc\+::child\+\_\+list}, \textbf{ osim\+\_\+file\+\_\+desc\+::fid}, \textbf{ osim\+\_\+file\+\_\+desc\+::list}, \textbf{ llist\+\_\+for\+\_\+each\+\_\+entry}, and \textbf{ osim\+\_\+file\+\_\+desc\+::parent}.

\mbox{\label{sim_8h_a3c5aeeb115e2bf7f56f63f58d1e9deef}} 
\index{sim.h@{sim.h}!osim\_file\_desc\_find\_name@{osim\_file\_desc\_find\_name}}
\index{osim\_file\_desc\_find\_name@{osim\_file\_desc\_find\_name}!sim.h@{sim.h}}
\doxysubsubsection{osim\_file\_desc\_find\_name()}
{\footnotesize\ttfamily struct \textbf{ osim\+\_\+file\+\_\+desc} $\ast$ osim\+\_\+file\+\_\+desc\+\_\+find\+\_\+name (\begin{DoxyParamCaption}\item[{struct \textbf{ osim\+\_\+file\+\_\+desc} $\ast$}]{parent,  }\item[{const char $\ast$}]{name }\end{DoxyParamCaption})}



References \textbf{ osim\+\_\+file\+\_\+desc\+::child\+\_\+list}, \textbf{ osim\+\_\+file\+\_\+desc\+::list}, \textbf{ llist\+\_\+for\+\_\+each\+\_\+entry}, \textbf{ name}, \textbf{ osim\+\_\+file\+\_\+desc\+::parent}, and \textbf{ osim\+\_\+file\+\_\+desc\+::short\+\_\+name}.

\mbox{\label{sim_8h_a07d382dd66bd16e3ab733af159f174fc}} 
\index{sim.h@{sim.h}!osim\_file\_desc\_find\_sfid@{osim\_file\_desc\_find\_sfid}}
\index{osim\_file\_desc\_find\_sfid@{osim\_file\_desc\_find\_sfid}!sim.h@{sim.h}}
\doxysubsubsection{osim\_file\_desc\_find\_sfid()}
{\footnotesize\ttfamily struct \textbf{ osim\+\_\+file\+\_\+desc} $\ast$ osim\+\_\+file\+\_\+desc\+\_\+find\+\_\+sfid (\begin{DoxyParamCaption}\item[{struct \textbf{ osim\+\_\+file\+\_\+desc} $\ast$}]{parent,  }\item[{uint8\+\_\+t}]{sfid }\end{DoxyParamCaption})}



References \textbf{ osim\+\_\+file\+\_\+desc\+::child\+\_\+list}, \textbf{ osim\+\_\+file\+\_\+desc\+::list}, \textbf{ llist\+\_\+for\+\_\+each\+\_\+entry}, \textbf{ osim\+\_\+file\+\_\+desc\+::parent}, \textbf{ SFI\+\_\+\+NONE}, and \textbf{ osim\+\_\+file\+\_\+desc\+::sfid}.

\mbox{\label{sim_8h_a87b674dda5a82fa4f3ae2b3f42c62e75}} 
\index{sim.h@{sim.h}!osim\_init@{osim\_init}}
\index{osim\_init@{osim\_init}!sim.h@{sim.h}}
\doxysubsubsection{osim\_init()}
{\footnotesize\ttfamily int osim\+\_\+init (\begin{DoxyParamCaption}\item[{void $\ast$}]{ctx }\end{DoxyParamCaption})}



References \textbf{ osim\+\_\+app\+\_\+profile\+\_\+register()}, \textbf{ osim\+\_\+aprof\+\_\+hpsim()}, \textbf{ osim\+\_\+aprof\+\_\+isim()}, and \textbf{ osim\+\_\+aprof\+\_\+usim()}.

\mbox{\label{sim_8h_a4d8128375c59e9754c32d27bb47c9f7e}} 
\index{sim.h@{sim.h}!osim\_new\_apdumsg@{osim\_new\_apdumsg}}
\index{osim\_new\_apdumsg@{osim\_new\_apdumsg}!sim.h@{sim.h}}
\doxysubsubsection{osim\_new\_apdumsg()}
{\footnotesize\ttfamily struct \textbf{ msgb} $\ast$ osim\+\_\+new\+\_\+apdumsg (\begin{DoxyParamCaption}\item[{uint8\+\_\+t}]{cla,  }\item[{uint8\+\_\+t}]{ins,  }\item[{uint8\+\_\+t}]{p1,  }\item[{uint8\+\_\+t}]{p2,  }\item[{uint16\+\_\+t}]{lc,  }\item[{uint16\+\_\+t}]{le }\end{DoxyParamCaption})}



Generate an APDU message and initialize APDU command header. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em cla} & CLASS byte \\
\hline
\mbox{\texttt{ in}}  & {\em ins} & INSTRUCTION byte \\
\hline
\mbox{\texttt{ in}}  & {\em p1} & Parameter 1 byte \\
\hline
\mbox{\texttt{ in}}  & {\em p2} & Parameter 2 byte \\
\hline
\mbox{\texttt{ in}}  & {\em lc} & number of bytes in the command data field Nc, which will encoded in 0, 1 or 3 bytes into Lc \\
\hline
\mbox{\texttt{ in}}  & {\em le} & maximum number of bytes expected in the response data field, which will encoded in 0, 1, 2 or 3 bytes into Le \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
an APDU message generated using provided APDU parameters
\end{DoxyReturn}
This function generates an APDU message, as defined in ISO/\+IEC 7816-\/4\+:2005(E) §5.1. The APDU command header, command and response fields lengths are initialized using the parameters. The APDU case is determined by the command and response fields lengths. 

References \textbf{ APDU\+\_\+\+CASE\+\_\+1}, \textbf{ APDU\+\_\+\+CASE\+\_\+2E}, \textbf{ APDU\+\_\+\+CASE\+\_\+2S}, \textbf{ APDU\+\_\+\+CASE\+\_\+3E}, \textbf{ APDU\+\_\+\+CASE\+\_\+3S}, \textbf{ APDU\+\_\+\+CASE\+\_\+4E}, \textbf{ APDU\+\_\+\+CASE\+\_\+4S}, \textbf{ cla}, \textbf{ osim\+\_\+apdu\+\_\+cmd\+\_\+hdr\+::cla}, \textbf{ ins}, \textbf{ osim\+\_\+apdu\+\_\+cmd\+\_\+hdr\+::ins}, \textbf{ msgb\+::l2h}, \textbf{ lc}, \textbf{ le}, \textbf{ msgb\+\_\+alloc()}, \textbf{ msgb\+\_\+apdu\+\_\+case}, \textbf{ msgb\+\_\+apdu\+\_\+lc}, \textbf{ msgb\+\_\+apdu\+\_\+le}, \textbf{ msgb\+\_\+put()}, \textbf{ p1}, \textbf{ osim\+\_\+apdu\+\_\+cmd\+\_\+hdr\+::p1}, \textbf{ p2}, and \textbf{ osim\+\_\+apdu\+\_\+cmd\+\_\+hdr\+::p2}.

\mbox{\label{sim_8h_af6af973c203c8725d18cdc306174e5d0}} 
\index{sim.h@{sim.h}!osim\_print\_sw@{osim\_print\_sw}}
\index{osim\_print\_sw@{osim\_print\_sw}!sim.h@{sim.h}}
\doxysubsubsection{osim\_print\_sw()}
{\footnotesize\ttfamily char $\ast$ osim\+\_\+print\+\_\+sw (\begin{DoxyParamCaption}\item[{const struct \textbf{ osim\+\_\+chan\+\_\+hdl} $\ast$}]{ch,  }\item[{uint16\+\_\+t}]{sw\+\_\+in }\end{DoxyParamCaption})}



References \textbf{ osim\+\_\+print\+\_\+sw\+\_\+buf()}.

\mbox{\label{sim_8h_a579b8c1d81de21d50b23199a32025bce}} 
\index{sim.h@{sim.h}!osim\_print\_sw\_buf@{osim\_print\_sw\_buf}}
\index{osim\_print\_sw\_buf@{osim\_print\_sw\_buf}!sim.h@{sim.h}}
\doxysubsubsection{osim\_print\_sw\_buf()}
{\footnotesize\ttfamily char $\ast$ osim\+\_\+print\+\_\+sw\+\_\+buf (\begin{DoxyParamCaption}\item[{char $\ast$}]{buf,  }\item[{size\+\_\+t}]{buf\+\_\+len,  }\item[{const struct \textbf{ osim\+\_\+chan\+\_\+hdl} $\ast$}]{ch,  }\item[{uint16\+\_\+t}]{sw\+\_\+in }\end{DoxyParamCaption})}



References \textbf{ osim\+\_\+chan\+\_\+hdl\+::card}, \textbf{ osim\+\_\+chan\+\_\+hdl\+::cur\+\_\+app}, \textbf{ osim\+\_\+app\+\_\+profile\+\_\+find\+\_\+sw()}, \textbf{ osim\+\_\+cprof\+\_\+find\+\_\+sw()}, \textbf{ osim\+\_\+card\+\_\+app\+\_\+hdl\+::prof}, \textbf{ osim\+\_\+card\+\_\+hdl\+::prof}, \textbf{ osim\+\_\+card\+\_\+sw\+::str}, \textbf{ SW\+\_\+\+TYPE\+\_\+\+STR}, \textbf{ osim\+\_\+card\+\_\+sw\+::type}, and \textbf{ osim\+\_\+card\+\_\+sw\+::u}.



Referenced by \textbf{ osim\+\_\+print\+\_\+sw()}, and \textbf{ osim\+\_\+print\+\_\+sw\+\_\+c()}.

\mbox{\label{sim_8h_a5c4a94aa1714e8922f5589eae4d21bfb}} 
\index{sim.h@{sim.h}!osim\_print\_sw\_c@{osim\_print\_sw\_c}}
\index{osim\_print\_sw\_c@{osim\_print\_sw\_c}!sim.h@{sim.h}}
\doxysubsubsection{osim\_print\_sw\_c()}
{\footnotesize\ttfamily char $\ast$ osim\+\_\+print\+\_\+sw\+\_\+c (\begin{DoxyParamCaption}\item[{const void $\ast$}]{ctx,  }\item[{const struct \textbf{ osim\+\_\+chan\+\_\+hdl} $\ast$}]{ch,  }\item[{uint16\+\_\+t}]{sw\+\_\+in }\end{DoxyParamCaption})}



References \textbf{ osim\+\_\+print\+\_\+sw\+\_\+buf()}.

\mbox{\label{sim_8h_a51e9984de3223c0275f6ed07dd8e9fd0}} 
\index{sim.h@{sim.h}!osim\_reader\_open@{osim\_reader\_open}}
\index{osim\_reader\_open@{osim\_reader\_open}!sim.h@{sim.h}}
\doxysubsubsection{osim\_reader\_open()}
{\footnotesize\ttfamily struct \textbf{ osim\+\_\+reader\+\_\+hdl} $\ast$ osim\+\_\+reader\+\_\+open (\begin{DoxyParamCaption}\item[{enum \textbf{ osim\+\_\+reader\+\_\+driver}}]{drv,  }\item[{int}]{idx,  }\item[{const char $\ast$}]{name,  }\item[{void $\ast$}]{ctx }\end{DoxyParamCaption})}



References \textbf{ name}, \textbf{ osim\+\_\+reader\+\_\+hdl\+::ops}, \textbf{ OSIM\+\_\+\+PROTO\+\_\+\+T0}, \textbf{ OSIM\+\_\+\+READER\+\_\+\+DRV\+\_\+\+PCSC}, \textbf{ pcsc\+\_\+reader\+\_\+ops}, \textbf{ osim\+\_\+reader\+\_\+hdl\+::proto\+\_\+supported}, and \textbf{ osim\+\_\+reader\+\_\+ops\+::reader\+\_\+open}.

\mbox{\label{sim_8h_ac480a85f701378d7171b1a81944d8da4}} 
\index{sim.h@{sim.h}!osim\_sw\_class@{osim\_sw\_class}}
\index{osim\_sw\_class@{osim\_sw\_class}!sim.h@{sim.h}}
\doxysubsubsection{osim\_sw\_class()}
{\footnotesize\ttfamily enum \textbf{ osim\+\_\+card\+\_\+sw\+\_\+class} osim\+\_\+sw\+\_\+class (\begin{DoxyParamCaption}\item[{const struct \textbf{ osim\+\_\+chan\+\_\+hdl} $\ast$}]{ch,  }\item[{uint16\+\_\+t}]{sw\+\_\+in }\end{DoxyParamCaption})}



References \textbf{ osim\+\_\+chan\+\_\+hdl\+::card}, \textbf{ osim\+\_\+card\+\_\+sw\+::class}, \textbf{ osim\+\_\+chan\+\_\+hdl\+::cur\+\_\+app}, \textbf{ osim\+\_\+app\+\_\+profile\+\_\+find\+\_\+sw()}, \textbf{ osim\+\_\+cprof\+\_\+find\+\_\+sw()}, \textbf{ OSMO\+\_\+\+ASSERT}, \textbf{ osim\+\_\+card\+\_\+app\+\_\+hdl\+::prof}, \textbf{ osim\+\_\+card\+\_\+hdl\+::prof}, and \textbf{ SW\+\_\+\+CLS\+\_\+\+NONE}.

\mbox{\label{sim_8h_a2d55db97588ce6352704be8ba8792ce8}} 
\index{sim.h@{sim.h}!osim\_transceive\_apdu@{osim\_transceive\_apdu}}
\index{osim\_transceive\_apdu@{osim\_transceive\_apdu}!sim.h@{sim.h}}
\doxysubsubsection{osim\_transceive\_apdu()}
{\footnotesize\ttfamily int osim\+\_\+transceive\+\_\+apdu (\begin{DoxyParamCaption}\item[{struct \textbf{ osim\+\_\+chan\+\_\+hdl} $\ast$}]{st,  }\item[{struct \textbf{ msgb} $\ast$}]{amsg }\end{DoxyParamCaption})}



References \textbf{ osim\+\_\+chan\+\_\+hdl\+::card}, \textbf{ OSIM\+\_\+\+PROTO\+\_\+\+T0}, \textbf{ osim\+\_\+card\+\_\+hdl\+::proto}, and \textbf{ transceive\+\_\+apdu\+\_\+t0()}.



\doxysubsection{Variable Documentation}
\mbox{\label{sim_8h_a8d3ddb9ac0de951b64522300f358aaf2}} 
\index{sim.h@{sim.h}!\_\_attribute\_\_@{\_\_attribute\_\_}}
\index{\_\_attribute\_\_@{\_\_attribute\_\_}!sim.h@{sim.h}}
\doxysubsubsection{\_\_attribute\_\_}
{\footnotesize\ttfamily struct \textbf{ osim\+\_\+file\+\_\+ops} \+\_\+\+\_\+attribute\+\_\+\+\_\+}

\mbox{\label{sim_8h_aa5db135afb6dea7215395b91ab6a9445}} 
\index{sim.h@{sim.h}!apduc@{apduc}}
\index{apduc@{apduc}!sim.h@{sim.h}}
\doxysubsubsection{apduc}
{\footnotesize\ttfamily enum \textbf{ osim\+\_\+apdu\+\_\+case} apduc}



command-\/response pair case, defining the encoding of Lc and Le 

\mbox{\label{sim_8h_a5e8df51a48b81af356458b89d7b0343b}} 
\index{sim.h@{sim.h}!cla@{cla}}
\index{cla@{cla}!sim.h@{sim.h}}
\doxysubsubsection{cla}
{\footnotesize\ttfamily uint8\+\_\+t cla}



CLASS byte. 



Referenced by \textbf{ osim\+\_\+determine\+\_\+apdu\+\_\+case()}, and \textbf{ osim\+\_\+new\+\_\+apdumsg()}.

\mbox{\label{sim_8h_a7863eb76b5cc95a371148ba1350b2259}} 
\index{sim.h@{sim.h}!ins@{ins}}
\index{ins@{ins}!sim.h@{sim.h}}
\doxysubsubsection{ins}
{\footnotesize\ttfamily uint8\+\_\+t ins}



INSTRUCTION byte. 



Referenced by \textbf{ gp\+\_\+cla\+\_\+ins\+\_\+helper()}, \textbf{ osim\+\_\+determine\+\_\+apdu\+\_\+case()}, \textbf{ osim\+\_\+new\+\_\+apdumsg()}, and \textbf{ uicc046\+\_\+cla\+\_\+ins\+\_\+helper()}.

\mbox{\label{sim_8h_a5d5004df6e8bbfc0dc9da8354deb7ce2}} 
\index{sim.h@{sim.h}!lc@{lc}}
\index{lc@{lc}!sim.h@{sim.h}}
\doxysubsubsection{lc}
{\footnotesize\ttfamily uint16\+\_\+t lc}



number of bytes in the command data field Nc, which will encoded in 0, 1 or 3 bytes into Lc, depending on the case 



Referenced by \textbf{ osim\+\_\+new\+\_\+apdumsg()}.

\mbox{\label{sim_8h_a100e0342d833722f75a8790c782ae5e1}} 
\index{sim.h@{sim.h}!le@{le}}
\index{le@{le}!sim.h@{sim.h}}
\doxysubsubsection{le}
{\footnotesize\ttfamily 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, depending on the case 



Referenced by \textbf{ osim\+\_\+new\+\_\+apdumsg()}.

\mbox{\label{sim_8h_a31550e6b3b1c0c189d567ced47d50f09}} 
\index{sim.h@{sim.h}!p1@{p1}}
\index{p1@{p1}!sim.h@{sim.h}}
\doxysubsubsection{p1}
{\footnotesize\ttfamily uint8\+\_\+t p1}



Parameter 1 byte. 



Referenced by \textbf{ gp\+\_\+cla\+\_\+ins\+\_\+helper()}, \textbf{ osim\+\_\+new\+\_\+apdumsg()}, and \textbf{ uicc046\+\_\+cla\+\_\+ins\+\_\+helper()}.

\mbox{\label{sim_8h_a4f36cdae5313abe8e7d7f6d144050d02}} 
\index{sim.h@{sim.h}!p2@{p2}}
\index{p2@{p2}!sim.h@{sim.h}}
\doxysubsubsection{p2}
{\footnotesize\ttfamily uint8\+\_\+t p2}



Parameter 2 byte. 



Referenced by \textbf{ osim\+\_\+new\+\_\+apdumsg()}, and \textbf{ uicc046\+\_\+cla\+\_\+ins\+\_\+helper()}.

\mbox{\label{sim_8h_a73eb733eb16cd609055e744862f845e5}} 
\index{sim.h@{sim.h}!p3@{p3}}
\index{p3@{p3}!sim.h@{sim.h}}
\doxysubsubsection{p3}
{\footnotesize\ttfamily uint8\+\_\+t p3}



Parameter 3 byte, used for TPDU by T=0. 



Referenced by \textbf{ gp\+\_\+cla\+\_\+ins\+\_\+helper()}.

\mbox{\label{sim_8h_a40aa640cd32fc53807a4dc72f8826d71}} 
\index{sim.h@{sim.h}!sw@{sw}}
\index{sw@{sw}!sim.h@{sim.h}}
\doxysubsubsection{sw}
{\footnotesize\ttfamily uint16\+\_\+t sw}



status word, composed of SW1 and SW2 bytes 



Referenced by \textbf{ osim\+\_\+app\+\_\+profile\+\_\+find\+\_\+sw()}, \textbf{ osim\+\_\+cprof\+\_\+find\+\_\+sw()}, and \textbf{ transceive\+\_\+apdu\+\_\+t0()}.

\mbox{\label{sim_8h_a269c35f60166a42f572a9f2eabcf4e69}} 
\index{sim.h@{sim.h}!ts102221\_fcp\_tlv\_def@{ts102221\_fcp\_tlv\_def}}
\index{ts102221\_fcp\_tlv\_def@{ts102221\_fcp\_tlv\_def}!sim.h@{sim.h}}
\doxysubsubsection{ts102221\_fcp\_tlv\_def}
{\footnotesize\ttfamily const struct tlv\+\_\+definition ts102221\+\_\+fcp\+\_\+tlv\+\_\+def\hspace{0.3cm}{\ttfamily [extern]}}

\mbox{\label{sim_8h_a8e9e5811060e746ab000751213f10c76}} 
\index{sim.h@{sim.h}!ts102221\_fcp\_vals@{ts102221\_fcp\_vals}}
\index{ts102221\_fcp\_vals@{ts102221\_fcp\_vals}!sim.h@{sim.h}}
\doxysubsubsection{ts102221\_fcp\_vals}
{\footnotesize\ttfamily const struct \textbf{ value\+\_\+string} ts102221\+\_\+fcp\+\_\+vals[14]\hspace{0.3cm}{\ttfamily [extern]}}

