prothandler.c File Reference

This handles protocol defaults, PTS, etc. More...

#include "config.h"
#include <string.h>
#include "misc.h"
#include "pcscd.h"
#include "ifdhandler.h"
#include "debuglog.h"
#include "readerfactory.h"
#include "prothandler.h"
#include "atrhandler.h"
#include "ifdwrapper.h"
#include "eventhandler.h"

Include dependency graph for prothandler.c:

Go to the source code of this file.

Functions

UCHAR PHGetDefaultProtocol (PUCHAR pucAtr, DWORD dwLength)
 Get the default protocol used immediately after reset.
UCHAR PHGetAvailableProtocols (PUCHAR pucAtr, DWORD dwLength)
 Get the protocols supported by the card.
DWORD PHSetProtocol (struct ReaderContext *rContext, DWORD dwPreferred, UCHAR ucAvailable, UCHAR ucDefault)
 Determine which protocol to use.


Detailed Description

This handles protocol defaults, PTS, etc.

Definition in file prothandler.c.


Function Documentation

UCHAR PHGetAvailableProtocols ( PUCHAR  pucAtr,
DWORD  dwLength 
)

Get the protocols supported by the card.

These protocols are returned from the function as bit masks.

Definition at line 55 of file prothandler.c.

References ATRDecodeAtr().

Referenced by SCardConnect(), and SCardReconnect().

Here is the call graph for this function:

UCHAR PHGetDefaultProtocol ( PUCHAR  pucAtr,
DWORD  dwLength 
)

Get the default protocol used immediately after reset.

This protocol is returned from the function.

Definition at line 35 of file prothandler.c.

References ATRDecodeAtr().

Referenced by SCardConnect(), and SCardReconnect().

Here is the call graph for this function:

DWORD PHSetProtocol ( struct ReaderContext *  rContext,
DWORD  dwPreferred,
UCHAR  ucAvailable,
UCHAR  ucDefault 
)

Determine which protocol to use.

SCardConnect has a DWORD dwPreferredProtocols that is a bitmask of what protocols to use. Basically, if T=N where N is not zero will be used first if it is available in ucAvailable. Otherwise it will always default to T=0.

IFDSetPTS() is _always_ called so that the driver can initialise its data

Definition at line 80 of file prothandler.c.

References IFDSetPTS(), SCARD_PROTOCOL_T0, and SCARD_PROTOCOL_T1.

Referenced by SCardConnect(), and SCardReconnect().

Here is the call graph for this function:


Generated on Mon Aug 17 01:00:14 2009 for pcsc-lite by  doxygen 1.5.9