pcsc-lite  1.7.4
Functions
atrhandler.c File Reference

This keeps track of smartcard protocols, timing issues and ATR (Answer-to-Reset) handling. More...

#include "config.h"
#include <string.h>
#include "misc.h"
#include "pcsclite.h"
#include "debuglog.h"
#include "atrhandler.h"

Go to the source code of this file.

Functions

short ATRDecodeAtr (SMARTCARD_EXTENSION *psExtension, PUCHAR pucAtr, DWORD dwLength)
 Uncomment the following for ATR debugging or use .

Detailed Description

This keeps track of smartcard protocols, timing issues and ATR (Answer-to-Reset) handling.

Note:
use ./configure --enable-debugatr to enable debug messages to be logged.

Definition in file atrhandler.c.


Function Documentation

short ATRDecodeAtr ( SMARTCARD_EXTENSION psExtension,
PUCHAR  pucAtr,
DWORD  dwLength 
)

Uncomment the following for ATR debugging or use .

/configure --enable-debugatr parse an ATR

Parameters:
[out]psExtension
[in]pucAtrATR
[in]dwLengthATR length
Returns:
Return values:
0Atr must have TS and T0
0Unable to decode TS byte
0Unable to decode LNS
0Unable do decode T protocol
0Maximum attribute size
0Maximum attribute size
1Success

Definition at line 44 of file atrhandler.c.

References SCARD_PROTOCOL_UNDEFINED, SCARD_PROTOCOL_T0, SCARD_PROTOCOL_T1, SCARD_PROTOCOL_T15, and MAX_ATR_SIZE.

Referenced by PHGetDefaultProtocol(), and PHGetAvailableProtocols().