src/ccid-internal.h File Reference

#include <libusb.h>
#include <ccid-spec.h>
Include dependency graph for ccid-internal.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  _chipcard
struct  _cci
struct  _xfr

Defines

#define trace(cci, fmt, x...)

Functions

_private int _probe_descriptors (struct libusb_device *dev, int *cp, int *ip, int *ap)
 Probe a USB device for a CCID interface.
_private int _RDR_to_PC (struct _cci *cci, unsigned int slot, struct _xfr *xfr)
_private unsigned int _RDR_to_PC_SlotStatus (struct _cci *cci, struct _xfr *xfr)
_private unsigned int _RDR_to_PC_DataBlock (struct _cci *cci, struct _xfr *xfr)
_private int _PC_to_RDR_GetSlotStatus (struct _cci *cci, unsigned int slot, struct _xfr *xfr)
_private int _PC_to_RDR_IccPowerOn (struct _cci *cci, unsigned int slot, struct _xfr *xfr, unsigned int voltage)
_private int _PC_to_RDR_IccPowerOff (struct _cci *cci, unsigned int slot, struct _xfr *xfr)
_private int _PC_to_RDR_XfrBlock (struct _cci *cci, unsigned int slot, struct _xfr *xfr)
_private int _cci_wait_for_interrupt (struct _cci *cci)
_private struct _xfr_xfr_do_alloc (size_t txbuf, size_t rxbuf)
_private void _xfr_do_free (struct _xfr *xfr)
_private void _hex_dumpf (FILE *f, const uint8_t *tmp, size_t len, size_t llen)

Define Documentation

#define trace ( cci,
fmt,
x...   ) 

Function Documentation

_private int _cci_wait_for_interrupt ( struct _cci cci  ) 

Definition at line 24 of file cci.c.

References _chipcard::cc_status, _cci::cci_dev, _cci::cci_intrp, _cci::cci_slot, _cci::cci_xfr, CHIPCARD_NOT_PRESENT, CHIPCARD_PRESENT, RDR_to_PC_HardwareError, RDR_to_PC_NotifySlotChange, trace, x_rbuflen(), and _xfr::x_rxhdr.

Referenced by chipcard_wait_for_card().

Here is the call graph for this function:

Here is the caller graph for this function:

_private void _hex_dumpf ( FILE *  f,
const uint8_t *  tmp,
size_t  len,
size_t  llen 
)

Definition at line 11 of file util.c.

Referenced by _PC_to_RDR_XfrBlock(), _RDR_to_PC_DataBlock(), fill_ccid_desc(), hex_dump(), and hex_dumpf().

Here is the caller graph for this function:

_private int _PC_to_RDR_GetSlotStatus ( struct _cci cci,
unsigned int  slot,
struct _xfr xfr 
)

Definition at line 301 of file cci.c.

References _PC_to_RDR(), ccid_msg::bMessageType, PC_to_RDR_GetSlotStatus, trace, and _xfr::x_txhdr.

Referenced by cci_probe(), chipcard_slot_status(), and chipcard_wait_for_card().

Here is the call graph for this function:

Here is the caller graph for this function:

_private int _PC_to_RDR_IccPowerOff ( struct _cci cci,
unsigned int  slot,
struct _xfr xfr 
)

Definition at line 348 of file cci.c.

References _PC_to_RDR(), ccid_msg::bMessageType, PC_to_RDR_IccPowerOff, trace, and _xfr::x_txhdr.

Referenced by chipcard_slot_off().

Here is the call graph for this function:

Here is the caller graph for this function:

_private int _PC_to_RDR_IccPowerOn ( struct _cci cci,
unsigned int  slot,
struct _xfr xfr,
unsigned int  voltage 
)

Definition at line 315 of file cci.c.

References _PC_to_RDR(), ccid_msg::bMessageType, CHIPCARD_1_8V, CHIPCARD_3V, CHIPCARD_5V, CHIPCARD_AUTO_VOLTAGE, ccid_msg::out, PC_to_RDR_IccPowerOn, trace, and _xfr::x_txhdr.

Referenced by chipcard_slot_on().

Here is the call graph for this function:

Here is the caller graph for this function:

_private int _PC_to_RDR_XfrBlock ( struct _cci cci,
unsigned int  slot,
struct _xfr xfr 
)

Definition at line 287 of file cci.c.

References _hex_dumpf(), _PC_to_RDR(), ccid_msg::bMessageType, _cci::cci_tf, PC_to_RDR_XfrBlock, trace, _xfr::x_txbuf, _xfr::x_txhdr, and _xfr::x_txlen.

Referenced by chipcard_transact().

Here is the call graph for this function:

Here is the caller graph for this function:

_private int _probe_descriptors ( struct libusb_device *  dev,
int *  cp,
int *  ip,
int *  ap 
)

Probe a USB device for a CCID interface.

Parameters:
dev ccidev_t representing a physical device.
cp Pointer to an integer to retrieve configuration number.
ip Pointer to an integer to retrieve interface number.
ap Pointer to an integer to retrieve alternate setting number.
Returns:
zero indicates failure.

Definition at line 260 of file ccidev.c.

References check_interface(), and check_vendor_dev_list().

Referenced by cci_probe(), ccid_device(), and ccid_get_device_list().

Here is the call graph for this function:

Here is the caller graph for this function:

_private int _RDR_to_PC ( struct _cci cci,
unsigned int  slot,
struct _xfr xfr 
)
_private unsigned int _RDR_to_PC_DataBlock ( struct _cci cci,
struct _xfr xfr 
)

Definition at line 69 of file cci.c.

References _hex_dumpf(), ccid_msg::bMessageType, _cci::cci_tf, ccid_msg::in, RDR_to_PC_DataBlock, trace, _xfr::x_rxbuf, _xfr::x_rxhdr, and _xfr::x_rxlen.

Referenced by chipcard_slot_on(), and chipcard_transact().

Here is the call graph for this function:

Here is the caller graph for this function:

_private unsigned int _RDR_to_PC_SlotStatus ( struct _cci cci,
struct _xfr xfr 
)
_private struct _xfr* _xfr_do_alloc ( size_t  txbuf,
size_t  rxbuf 
) [read]

Definition at line 15 of file xfr.c.

References _xfr::x_rxbuf, _xfr::x_rxhdr, _xfr::x_rxmax, _xfr::x_txbuf, _xfr::x_txhdr, and _xfr::x_txmax.

Referenced by cci_probe(), and xfr_alloc().

Here is the caller graph for this function:

_private void _xfr_do_free ( struct _xfr xfr  ) 

Definition at line 155 of file xfr.c.

Referenced by cci_close(), cci_probe(), and xfr_free().

Here is the caller graph for this function:

Generated on Sun Jan 2 08:35:03 2011 for ccid-utils by  doxygen 1.6.3