pcsc-lite 2.3.0
ifdhandler.h File Reference
#include <pcsclite.h>

Go to the source code of this file.

Data Structures

struct  _DEVICE_CAPABILITIES
 
struct  _ICC_STATE
 
struct  _PROTOCOL_OPTIONS
 
struct  _SCARD_IO_HEADER
 Use by SCardTransmit() More...
 

Macros

#define TAG_IFD_ATR   0x0303
 ATR.
 
#define TAG_IFD_SLOTNUM   0x0180
 select a slot
 
#define TAG_IFD_SLOT_THREAD_SAFE   0x0FAC
 support access to different slots of the reader
 
#define TAG_IFD_THREAD_SAFE   0x0FAD
 driver is thread safe
 
#define TAG_IFD_SLOTS_NUMBER   0x0FAE
 number of slots of the reader
 
#define TAG_IFD_SIMULTANEOUS_ACCESS   0x0FAF
 number of reader the driver can manage
 
#define TAG_IFD_POLLING_THREAD   0x0FB0
 not used.
 
#define TAG_IFD_POLLING_THREAD_KILLABLE   0x0FB1
 the polling thread can be killed
 
#define TAG_IFD_STOP_POLLING_THREAD   0x0FB2
 method used to stop the polling thread (instead of just pthread_kill())
 
#define TAG_IFD_POLLING_THREAD_WITH_TIMEOUT   0x0FB3
 driver uses a polling thread with a timeout parameter
 
#define TAG_IFD_DEVICE_REMOVED   0x0FB4
 signals the reader has been removed
 
#define IFD_HVERSION_1_0   0x00010000
 
#define IFD_HVERSION_2_0   0x00020000
 
#define IFD_HVERSION_3_0   0x00030000
 
#define IFD_POWER_UP   500
 power up the card
 
#define IFD_POWER_DOWN   501
 power down the card
 
#define IFD_RESET   502
 warm reset
 
#define IFD_NEGOTIATE_PTS1   1
 negotiate PTS1
 
#define IFD_NEGOTIATE_PTS2   2
 negotiate PTS2
 
#define IFD_NEGOTIATE_PTS3   4
 negotiate PTS3
 
#define IFD_SUCCESS   0
 no error
 
#define IFD_ERROR_TAG   600
 tag unknown
 
#define IFD_ERROR_SET_FAILURE   601
 set failed
 
#define IFD_ERROR_VALUE_READ_ONLY   602
 value is read only
 
#define IFD_ERROR_PTS_FAILURE   605
 failed to negotiate PTS
 
#define IFD_ERROR_NOT_SUPPORTED   606
 
#define IFD_PROTOCOL_NOT_SUPPORTED   607
 requested protocol not supported
 
#define IFD_ERROR_POWER_ACTION   608
 power up failed
 
#define IFD_ERROR_SWALLOW   609
 
#define IFD_ERROR_EJECT   610
 
#define IFD_ERROR_CONFISCATE   611
 
#define IFD_COMMUNICATION_ERROR   612
 generic error
 
#define IFD_RESPONSE_TIMEOUT   613
 timeout
 
#define IFD_NOT_SUPPORTED   614
 request is not supported
 
#define IFD_ICC_PRESENT   615
 card is present
 
#define IFD_ICC_NOT_PRESENT   616
 card is absent
 
#define IFD_NO_SUCH_DEVICE   617
 The IFD_NO_SUCH_DEVICE error must be returned by the driver when it detects the reader is no more present.
 
#define IFD_ERROR_INSUFFICIENT_BUFFER   618
 buffer is too small
 

Typedefs

typedef struct _DEVICE_CAPABILITIES DEVICE_CAPABILITIES
 
typedef struct _DEVICE_CAPABILITIESPDEVICE_CAPABILITIES
 
typedef struct _ICC_STATE ICC_STATE
 
typedef struct _ICC_STATEPICC_STATE
 
typedef struct _PROTOCOL_OPTIONS PROTOCOL_OPTIONS
 
typedef struct _PROTOCOL_OPTIONSPPROTOCOL_OPTIONS
 
typedef struct _SCARD_IO_HEADER SCARD_IO_HEADER
 Use by SCardTransmit()
 
typedef struct _SCARD_IO_HEADERPSCARD_IO_HEADER
 
typedef long RESPONSECODE
 

Functions

RESPONSECODE IFDHCreateChannelByName (DWORD Lun, LPSTR DeviceName)
 This function is required to open a communications channel to the port listed by DeviceName.
 
RESPONSECODE IFDHControl (DWORD Lun, DWORD dwControlCode, PUCHAR TxBuffer, DWORD TxLength, PUCHAR RxBuffer, DWORD RxLength, LPDWORD pdwBytesReturned)
 This function performs a data exchange with the reader (not the card) specified by Lun.
 
RESPONSECODE IFDHCreateChannel (DWORD Lun, DWORD Channel)
 This function is required to open a communications channel to the port listed by Channel.
 
RESPONSECODE IFDHCloseChannel (DWORD Lun)
 This function should close the reader communication channel for the particular reader.
 
RESPONSECODE IFDHGetCapabilities (DWORD Lun, DWORD Tag, PDWORD Length, PUCHAR Value)
 This function should get the slot/card capabilities for a particular slot/card specified by Lun.
 
RESPONSECODE IFDHSetCapabilities (DWORD Lun, DWORD Tag, DWORD Length, PUCHAR Value)
 This function should set the slot/card capabilities for a particular slot/card specified by Lun.
 
RESPONSECODE IFDHSetProtocolParameters (DWORD Lun, DWORD Protocol, UCHAR Flags, UCHAR PTS1, UCHAR PTS2, UCHAR PTS3)
 This function should set the Protocol Type Selection (PTS) of a particular card/slot using the three PTS parameters sent.
 
RESPONSECODE IFDHPowerICC (DWORD Lun, DWORD Action, PUCHAR Atr, PDWORD AtrLength)
 This function controls the power and reset signals of the smart card reader at the particular reader/slot specified by Lun.
 
RESPONSECODE IFDHTransmitToICC (DWORD Lun, SCARD_IO_HEADER SendPci, PUCHAR TxBuffer, DWORD TxLength, PUCHAR RxBuffer, PDWORD RxLength, PSCARD_IO_HEADER RecvPci)
 This function performs an APDU exchange with the card/slot specified by Lun.
 
RESPONSECODE IFDHICCPresence (DWORD Lun)
 This function returns the status of the card inserted in the reader/slot specified by Lun.
 

Macro Definition Documentation

◆ IFD_COMMUNICATION_ERROR

#define IFD_COMMUNICATION_ERROR   612

generic error

Definition at line 362 of file ifdhandler.h.

◆ IFD_ERROR_CONFISCATE

#define IFD_ERROR_CONFISCATE   611

Definition at line 361 of file ifdhandler.h.

◆ IFD_ERROR_EJECT

#define IFD_ERROR_EJECT   610

Definition at line 360 of file ifdhandler.h.

◆ IFD_ERROR_INSUFFICIENT_BUFFER

#define IFD_ERROR_INSUFFICIENT_BUFFER   618

buffer is too small

Definition at line 373 of file ifdhandler.h.

◆ IFD_ERROR_NOT_SUPPORTED

#define IFD_ERROR_NOT_SUPPORTED   606

Definition at line 356 of file ifdhandler.h.

◆ IFD_ERROR_POWER_ACTION

#define IFD_ERROR_POWER_ACTION   608

power up failed

Definition at line 358 of file ifdhandler.h.

◆ IFD_ERROR_PTS_FAILURE

#define IFD_ERROR_PTS_FAILURE   605

failed to negotiate PTS

Definition at line 355 of file ifdhandler.h.

◆ IFD_ERROR_SET_FAILURE

#define IFD_ERROR_SET_FAILURE   601

set failed

Definition at line 353 of file ifdhandler.h.

◆ IFD_ERROR_SWALLOW

#define IFD_ERROR_SWALLOW   609

Definition at line 359 of file ifdhandler.h.

◆ IFD_ERROR_TAG

#define IFD_ERROR_TAG   600

tag unknown

Definition at line 352 of file ifdhandler.h.

◆ IFD_ERROR_VALUE_READ_ONLY

#define IFD_ERROR_VALUE_READ_ONLY   602

value is read only

Definition at line 354 of file ifdhandler.h.

◆ IFD_HVERSION_1_0

#define IFD_HVERSION_1_0   0x00010000

Definition at line 336 of file ifdhandler.h.

◆ IFD_HVERSION_2_0

#define IFD_HVERSION_2_0   0x00020000

Definition at line 337 of file ifdhandler.h.

◆ IFD_HVERSION_3_0

#define IFD_HVERSION_3_0   0x00030000

Definition at line 338 of file ifdhandler.h.

◆ IFD_ICC_NOT_PRESENT

#define IFD_ICC_NOT_PRESENT   616

card is absent

Definition at line 366 of file ifdhandler.h.

◆ IFD_ICC_PRESENT

#define IFD_ICC_PRESENT   615

card is present

Definition at line 365 of file ifdhandler.h.

◆ IFD_NEGOTIATE_PTS1

#define IFD_NEGOTIATE_PTS1   1

negotiate PTS1

Definition at line 347 of file ifdhandler.h.

◆ IFD_NEGOTIATE_PTS2

#define IFD_NEGOTIATE_PTS2   2

negotiate PTS2

Definition at line 348 of file ifdhandler.h.

◆ IFD_NEGOTIATE_PTS3

#define IFD_NEGOTIATE_PTS3   4

negotiate PTS3

Definition at line 349 of file ifdhandler.h.

◆ IFD_NO_SUCH_DEVICE

#define IFD_NO_SUCH_DEVICE   617

The IFD_NO_SUCH_DEVICE error must be returned by the driver when it detects the reader is no more present.

This will tell pcscd to remove the reader from the list of available readers.

Definition at line 372 of file ifdhandler.h.

◆ IFD_NOT_SUPPORTED

#define IFD_NOT_SUPPORTED   614

request is not supported

Definition at line 364 of file ifdhandler.h.

◆ IFD_POWER_DOWN

#define IFD_POWER_DOWN   501

power down the card

Definition at line 344 of file ifdhandler.h.

◆ IFD_POWER_UP

#define IFD_POWER_UP   500

power up the card

Definition at line 343 of file ifdhandler.h.

◆ IFD_PROTOCOL_NOT_SUPPORTED

#define IFD_PROTOCOL_NOT_SUPPORTED   607

requested protocol not supported

Definition at line 357 of file ifdhandler.h.

◆ IFD_RESET

#define IFD_RESET   502

warm reset

Definition at line 345 of file ifdhandler.h.

◆ IFD_RESPONSE_TIMEOUT

#define IFD_RESPONSE_TIMEOUT   613

timeout

Definition at line 363 of file ifdhandler.h.

◆ IFD_SUCCESS

#define IFD_SUCCESS   0

no error

Definition at line 351 of file ifdhandler.h.

◆ TAG_IFD_ATR

#define TAG_IFD_ATR   0x0303

ATR.

Definition at line 321 of file ifdhandler.h.

◆ TAG_IFD_DEVICE_REMOVED

#define TAG_IFD_DEVICE_REMOVED   0x0FB4

signals the reader has been removed

Definition at line 331 of file ifdhandler.h.

◆ TAG_IFD_POLLING_THREAD

#define TAG_IFD_POLLING_THREAD   0x0FB0

not used.

See TAG_IFD_POLLING_THREAD_WITH_TIMEOUT

Definition at line 327 of file ifdhandler.h.

◆ TAG_IFD_POLLING_THREAD_KILLABLE

#define TAG_IFD_POLLING_THREAD_KILLABLE   0x0FB1

the polling thread can be killed

Definition at line 328 of file ifdhandler.h.

◆ TAG_IFD_POLLING_THREAD_WITH_TIMEOUT

#define TAG_IFD_POLLING_THREAD_WITH_TIMEOUT   0x0FB3

driver uses a polling thread with a timeout parameter

Definition at line 330 of file ifdhandler.h.

◆ TAG_IFD_SIMULTANEOUS_ACCESS

#define TAG_IFD_SIMULTANEOUS_ACCESS   0x0FAF

number of reader the driver can manage

Definition at line 326 of file ifdhandler.h.

◆ TAG_IFD_SLOT_THREAD_SAFE

#define TAG_IFD_SLOT_THREAD_SAFE   0x0FAC

support access to different slots of the reader

Definition at line 323 of file ifdhandler.h.

◆ TAG_IFD_SLOTNUM

#define TAG_IFD_SLOTNUM   0x0180

select a slot

Definition at line 322 of file ifdhandler.h.

◆ TAG_IFD_SLOTS_NUMBER

#define TAG_IFD_SLOTS_NUMBER   0x0FAE

number of slots of the reader

Definition at line 325 of file ifdhandler.h.

◆ TAG_IFD_STOP_POLLING_THREAD

#define TAG_IFD_STOP_POLLING_THREAD   0x0FB2

method used to stop the polling thread (instead of just pthread_kill())

Definition at line 329 of file ifdhandler.h.

◆ TAG_IFD_THREAD_SAFE

#define TAG_IFD_THREAD_SAFE   0x0FAD

driver is thread safe

Definition at line 324 of file ifdhandler.h.

Typedef Documentation

◆ RESPONSECODE

typedef long RESPONSECODE

Definition at line 376 of file ifdhandler.h.