Main Page   Data Structures   File List   Data Fields   Globals   Related Pages  

ctapi.c File Reference

Virtual CT-API library. More...

#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <ctapi.h>
#include <main.h>
#include <sw.h>

Functions

IS8 CT_forkIcc (void)
IS8 CT_stopIcc (void)
IS8 CT_ifdCmdResetCT (IU16 lenc, IU8 *command, IU16 *lenr, IU8 *response)
IS8 CT_ifdCmdRequestICC (IU16 lenc, IU8 *command, IU16 *lenr, IU8 *response)
IS8 CT_ifdCmdGetStatus (IU16 lenc, IU8 *command, IU16 *lenr, IU8 *response)
IS8 CT_ifdCmdEjectICC (IU16 lenc, IU8 *command, IU16 *lenr, IU8 *response)
IS8 CT_ifdCmdEepromFile (IU16 lenc, IU8 *command, IU16 *lenr, IU8 *response)
 Parses EEPROM FILE command. More...

IS8 CT_ifdCmd (IU16 lenc, IU8 *command, IU16 *lenr, IU8 *response)
int CT_t0 (IU16 lenc, IU8 *command, IU16 *lenr, IU8 *response)
IS8 CT_iccCmd (IU8 *dad, IU8 *sad, IU16 lenc, IU8 *command, IU16 *lenr, IU8 *response)
IS8 CT_init (IU16 ctn, IU16 pn)
IS8 CT_data (IU16 ctn, IU8 *dad, IU8 *sad, IU16 lenc, IU8 *command, IU16 *lenr, IU8 *response)
IS8 CT_close (IU16 ctn)

Variables

IS32 cthandle = -1
int fd_fromCard [2]
int fd_toCard [2]
pid_t pidVirtuaCard = 0
int loadEepromFile = FALSE
int saveEepromFile = FALSE
char eepromFile [256]
int fdEepromFile
char atr [32]
int atrlen = 0


Detailed Description

Virtual CT-API library.

Id:
ctapi.c,v 1.4 2002/12/24 13:29:57 m Exp


Function Documentation

IS8 CT_close IU16    ctn
 

IS8 CT_data IU16    ctn,
IU8   dad,
IU8   sad,
IU16    lenc,
IU8   command,
IU16   lenr,
IU8   response
 

IS8 CT_forkIcc void   
 

IS8 CT_iccCmd IU8   dad,
IU8   sad,
IU16    lenc,
IU8   command,
IU16   lenr,
IU8   response
 

IS8 CT_ifdCmd IU16    lenc,
IU8   command,
IU16   lenr,
IU8   response
 

IS8 CT_ifdCmdEepromFile IU16    lenc,
IU8   command,
IU16   lenr,
IU8   response
 

Parses EEPROM FILE command.

  • CLA: '20'
    • INS: 'E0'
    • P1:
      • bit 1: Save EEPROM to file at eject or reset.
      • bit 2: Load EEPROM from file at reset.
    • P2: RFU
    • Lc: Length of file name
    • Data: File name (possibly including path) without null-termination

IS8 CT_ifdCmdEjectICC IU16    lenc,
IU8   command,
IU16   lenr,
IU8   response
 

IS8 CT_ifdCmdGetStatus IU16    lenc,
IU8   command,
IU16   lenr,
IU8   response
 

IS8 CT_ifdCmdRequestICC IU16    lenc,
IU8   command,
IU16   lenr,
IU8   response
 

IS8 CT_ifdCmdResetCT IU16    lenc,
IU8   command,
IU16   lenr,
IU8   response
 

IS8 CT_init IU16    ctn,
IU16    pn
 

IS8 CT_stopIcc void   
 

int CT_t0 IU16    lenc,
IU8   command,
IU16   lenr,
IU8   response
 


Variable Documentation

char atr[32]
 

int atrlen = 0
 

IS32 cthandle = -1
 

char eepromFile[256]
 

int fd_fromCard[2]
 

int fd_toCard[2]
 

int fdEepromFile
 

int loadEepromFile = FALSE
 

pid_t pidVirtuaCard = 0
 

int saveEepromFile = FALSE
 


Copyright 2002 by Matthias Bruestle. This is licensed under the GNU General Public License.