Go to the documentation of this file.
8 #ifndef OPENCT_DRIVER_H
9 #define OPENCT_DRIVER_H
15 #include <openct/device.h>
170 time_t timeout,
const char *message,
171 void *atr,
size_t atr_len);
186 time_t timeout,
const char *message);
210 int slot,
unsigned int timeout,
const char *prompt,
211 const unsigned char *data,
size_t data_len,
212 unsigned char *resp,
size_t resp_len);
232 const unsigned char *buffer,
249 unsigned char *buffer,
291 const void *sbuf,
size_t slen,
292 void *rbuf,
size_t rlen);
306 unsigned char *rbuf,
size_t rlen);
320 const unsigned char *sbuf,
size_t slen);
324 const void *sbuf,
const size_t slen,
325 void *rbuf,
size_t rlen);
377 extern void ifd_driver_register(
const char *,
379 extern const ifd_driver_t *ifd_driver_get(
const char *);
380 extern int ifd_driver_add_id(
const char *,
const char *);
381 extern const char * ifd_driver_for_id(
ifd_devid_t *);
386 extern ifd_protocol_t * ifd_protocol_select(
ifd_reader_t *,
int,
int);
387 extern int ifd_protocol_transceive(ifd_protocol_t *proto,
389 const void *,
size_t,
391 extern int ifd_protocol_resynchronize(ifd_protocol_t *,
int);
int(* card_reset)(ifd_reader_t *reader, int slot, void *atr, size_t atr_len)
Reset the card and fetch the ATR.
int(* close)(ifd_reader_t *reader)
Close the reader.
int(* after_command)(ifd_reader_t *)
Execute after command.
int(* set_protocol)(ifd_reader_t *reader, int slot, int protocol)
Select the smart card communication protocol.
int(* deactivate)(ifd_reader_t *reader)
Deactivate the smart card reader.
int(* event)(ifd_reader_t *, int *status, size_t status_size)
Event callback.
int(* sync_write)(ifd_reader_t *reader, int slot, int proto, unsigned short addr, const unsigned char *sbuf, size_t slen)
Write data to a synchronous smart card.
int(* get_eventfd)(ifd_reader_t *, short *events)
Get event fd.
int(* before_command)(ifd_reader_t *)
Execute before command.
int(* transparent)(ifd_reader_t *reader, int slot, const void *sbuf, size_t slen, void *rbuf, size_t rlen)
Transceive a protocol data unit.
int(* activate)(ifd_reader_t *reader)
Activate the smart card reader.
int(* perform_verify)(ifd_reader_t *reader, int slot, unsigned int timeout, const char *prompt, const unsigned char *data, size_t data_len, unsigned char *resp, size_t resp_len)
Request the PIN and have the card verify it.
int(* recv)(ifd_reader_t *reader, unsigned int dad, unsigned char *buffer, size_t len, long timeout)
Receive an APDU response using the currently selected protocol.
int(* send)(ifd_reader_t *reader, unsigned int dad, const unsigned char *buffer, size_t len)
Send an APDU using the currently selected protocol.
int(* card_eject)(ifd_reader_t *reader, int slot, time_t timeout, const char *message)
Eject the smart card.
int(* change_speed)(ifd_reader_t *reader, unsigned int speed)
Change the communication protocol speed.
int(* output)(ifd_reader_t *reader, const char *message)
Output a message on the reader's display.
int(* change_parity)(ifd_reader_t *reader, int parity)
Change the communication protocol parity.
int(* sync_read)(ifd_reader_t *reader, int slot, int proto, unsigned short addr, unsigned char *rbuf, size_t rlen)
Read data from a synchronous smart card.
int(* error)(ifd_reader_t *)
Error callback.
int(* open)(ifd_reader_t *reader, const char *name)
Open the reader.
int(* card_request)(ifd_reader_t *reader, int slot, time_t timeout, const char *message, void *atr, size_t atr_len)
Prompts the insertion of a smart card in the reader and performs a card reset.
int(* card_status)(ifd_reader_t *reader, int slot, int *status)
Fetch the card status.
libp11, Copyright (C) 2005 Olaf Kirch <okir@lst.de> |  |