pcsc-lite  1.8.20
Functions
atrhandler.c File Reference

This keeps track of smart card 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 (int *availableProtocols, int *currentProtocol, PUCHAR pucAtr, DWORD dwLength)
 parse an ATR More...
 

Detailed Description

This keeps track of smart card 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

◆ ATRDecodeAtr()

short ATRDecodeAtr ( int *  availableProtocols,
int *  currentProtocol,
PUCHAR  pucAtr,
DWORD  dwLength 
)

parse an ATR

Parameters
[out]availableProtocolsavailable protocols
[out]currentProtocolcurrent protocol
[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
1Success

Definition at line 66 of file atrhandler.c.