Walter Franzini wrote:
> char CT_Init (unsigned int ctn, unsigned int pn);
>
> pn "denotes the physical interface through wich the CardTerminal is
> accessed".
> In ctapi.pdf (page 25) you can see how port numbers map to physical
> address.
> In ctapi-0.96/scio.c we can find another way to map pn->address
> (/dev/ttySpn)
> ^^
> This is ambiguous. What pn=3 means ?
> 1) /dev/ttyS3 (ctapi-0.96)
> 2) 0x340 (ctapi.pdf)
> 3) both, if you connect 2 different CardTerminal to your PC.
>
> How about:
> struct CT_Info {
> int fd;
> void *CT_private;
> /* ... */
> };
> struct CT_Info ct;
> CT_Init ("/dev/ct1", &ct);
>
> CT_Data (&ct, ....);
> CT_Close (&ct);
>
> ...
>
Your are correct, but ctapi-0.96 is niot based on that doc from SCM. it's based in
the spec from GMD.
You can find it under: http://www.darmstadt.gmd.de/~eckstein/CT/mkt.html#SPEK
Part 8 describes the "Host-CT-Interface for MCTs with V.24/V.28 connection"
An other problem is that you chaged the definition of CT_init and this is
impossible, because there are apps (under Windows) that use the CT-API and CT-BCS
as they are defined.
bye
Gregor
***************************************************************
Linux Smart Card Developers - M.U.S.C.L.E.
(Movement for the Use of Smart Cards in a Linux Environment)
http://www.linuxnet.com/smartcard/index.html
***************************************************************