Sophie

Sophie

distrib > Fedora > 13 > i386 > by-pkgid > 3ef085c66d4a743f8dec260630a0b19c > files > 4

pcsc-lite-doc-1.5.5-4.fc13.noarch.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>pcsc-lite: atrhandler.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.6.2-20100208 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li><a href="dirs.html"><span>Directories</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="files.html"><span>File&nbsp;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
  <div class="navpath"><a class="el" href="dir_c68a5dfdca54003c765e303a18006edb.html">src</a>
  </div>
</div>
<div class="contents">
<h1>atrhandler.c File Reference</h1>
<p>This keeps track of smartcard protocols, timing issues and ATR (Answer-to-Reset) handling.  
<a href="#_details">More...</a></p>
<code>#include &quot;config.h&quot;</code><br/>
<code>#include &lt;string.h&gt;</code><br/>
<code>#include &quot;misc.h&quot;</code><br/>
<code>#include &quot;<a class="el" href="pcsclite_8h_source.html">pcsclite.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="debuglog_8h_source.html">debuglog.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="atrhandler_8h_source.html">atrhandler.h</a>&quot;</code><br/>
<div class="dynheader">
Include dependency graph for atrhandler.c:</div>
<div class="dynsection">
</div>

<p><a href="atrhandler_8c_source.html">Go to the source code of this file.</a></p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">short&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="atrhandler_8c.html#a84127d39d788360749d94c602ab3e129">ATRDecodeAtr</a> (<a class="el" href="struct__SMARTCARD__EXTENSION.html">PSMARTCARD_EXTENSION</a> psExtension, PUCHAR pucAtr, DWORD dwLength)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Uncomment the following for ATR debugging or use .  <a href="#a84127d39d788360749d94c602ab3e129"></a><br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>This keeps track of smartcard protocols, timing issues and ATR (Answer-to-Reset) handling. </p>
<dl class="note"><dt><b>Note:</b></dt><dd>use ./configure --enable-debugatr to enable debug messages to be logged. </dd></dl>

<p>Definition in file <a class="el" href="atrhandler_8c_source.html">atrhandler.c</a>.</p>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="a84127d39d788360749d94c602ab3e129"></a><!-- doxytag: member="atrhandler.c::ATRDecodeAtr" ref="a84127d39d788360749d94c602ab3e129" args="(PSMARTCARD_EXTENSION psExtension, PUCHAR pucAtr, DWORD dwLength)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">short ATRDecodeAtr </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct__SMARTCARD__EXTENSION.html">PSMARTCARD_EXTENSION</a>&nbsp;</td>
          <td class="paramname"> <em>psExtension</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">PUCHAR&nbsp;</td>
          <td class="paramname"> <em>pucAtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">DWORD&nbsp;</td>
          <td class="paramname"> <em>dwLength</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Uncomment the following for ATR debugging or use . </p>
<p>/configure --enable-debugatr parse an ATR </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"><tt>[out]</tt>&nbsp;</td><td valign="top"><em>psExtension</em>&nbsp;</td><td></td></tr>
    <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>pucAtr</em>&nbsp;</td><td>ATR </td></tr>
    <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>dwLength</em>&nbsp;</td><td>ATR length </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd></dd></dl>

<p><dl><dt><b>Return values:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>0</em>&nbsp;</td><td>Atr must have TS and T0</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>0</em>&nbsp;</td><td>Unable to decode TS byte</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>0</em>&nbsp;</td><td>Unable to decode LNS</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>0</em>&nbsp;</td><td>Unable do decode T protocol</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>0</em>&nbsp;</td><td>Maximum attribute size</td></tr>
    <tr><td valign="top"></td><td valign="top"><em>1</em>&nbsp;</td><td>Success </td></tr>
  </table>
  </dd>
</dl>
</p>

<p>Definition at line <a class="el" href="atrhandler_8c_source.html#l00043">43</a> of file <a class="el" href="atrhandler_8c_source.html">atrhandler.c</a>.</p>

<p>References <a class="el" href="pcsclite_8h_source.html#l00035">MAX_ATR_SIZE</a>, <a class="el" href="pcsclite_8h_source.html#l00141">SCARD_PROTOCOL_T0</a>, <a class="el" href="pcsclite_8h_source.html#l00142">SCARD_PROTOCOL_T1</a>, <a class="el" href="pcsclite_8h_source.html#l00144">SCARD_PROTOCOL_T15</a>, and <a class="el" href="pcsclite_8h_source.html#l00139">SCARD_PROTOCOL_UNDEFINED</a>.</p>

<p>Referenced by <a class="el" href="ifdwrapper_8c_source.html#l00318">IFDPowerICC()</a>, <a class="el" href="ifdwrapper_8c_source.html#l00412">IFDStatusICC()</a>, <a class="el" href="prothandler_8c_source.html#l00055">PHGetAvailableProtocols()</a>, and <a class="el" href="prothandler_8c_source.html#l00035">PHGetDefaultProtocol()</a>.</p>

</div>
</div>
</div>
<hr class="footer"/><address style="text-align: right;"><small>Generated by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2-20100208 </small></address>
</body>
</html>